From 6bf6d158490eb899ea09fb9fbae43927cbe1ee51 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 20 Apr 2023 08:17:07 +0100 Subject: [PATCH] Rename sheet to grid --- .../backend/DataTable/DataTable.svelte | 47 ++++++++--------- .../GridCreateViewButton.svelte} | 2 +- .../GridExportButton.svelte} | 2 +- .../GridFilterButton.svelte} | 2 +- .../GridImportButton.svelte} | 2 +- .../GridManageAccessButton.svelte} | 2 +- .../GridRelationshipButton.svelte} | 2 +- .../GridCreateColumnModal.svelte} | 2 +- .../GridCreateEditRowModal.svelte} | 2 +- .../GridEditColumnModal.svelte} | 2 +- .../GridEditUserModal.svelte} | 2 +- .../cells/AttachmentCell.svelte | 2 +- .../{sheet => grid}/cells/BooleanCell.svelte | 0 .../{sheet => grid}/cells/DataCell.svelte | 8 +-- .../{sheet => grid}/cells/DateCell.svelte | 0 .../{sheet => grid}/cells/FormulaCell.svelte | 0 .../cells/GridCell.svelte} | 0 .../{sheet => grid}/cells/HeaderCell.svelte | 10 ++-- .../{sheet => grid}/cells/JSONCell.svelte | 0 .../{sheet => grid}/cells/LongFormCell.svelte | 0 .../cells/MultiSelectCell.svelte | 0 .../{sheet => grid}/cells/NumberCell.svelte | 0 .../{sheet => grid}/cells/OptionsCell.svelte | 0 .../cells/RelationshipCell.svelte | 2 +- .../{sheet => grid}/cells/TextCell.svelte | 0 .../controls/AddColumnButton.svelte | 2 +- .../controls/AddRowButton.svelte | 3 +- .../controls/BetaButton.svelte | 0 .../controls/DeleteButton.svelte | 2 +- .../controls/HideColumnsButton.svelte | 2 +- .../controls/RowHeightButton.svelte | 2 +- .../controls/SortButton.svelte | 2 +- .../src/components/grid/index.js | 1 + .../{sheet => grid}/layout/Avatar.svelte | 0 .../Sheet.svelte => grid/layout/Grid.svelte} | 52 +++++++++---------- .../layout/GridBody.svelte} | 17 +++--- .../layout/GridRow.svelte} | 2 +- .../layout/GridScrollWrapper.svelte} | 2 +- .../{sheet => grid}/layout/HeaderRow.svelte | 8 +-- .../{sheet => grid}/layout/NewRowTop.svelte | 14 ++--- .../{sheet => grid}/layout/RowCount.svelte | 2 +- .../layout/StickyColumn.svelte | 18 +++---- .../{sheet => grid}/layout/UserAvatars.svelte | 2 +- .../{sheet => grid}/lib/constants.js | 2 +- .../components/{sheet => grid}/lib/events.js | 4 +- .../{sheet => grid}/lib/renderers.js | 0 .../components/{sheet => grid}/lib/utils.js | 0 .../{sheet => grid}/lib/websocket.js | 0 .../overlays/KeyboardManager.svelte | 4 +- .../overlays/MenuOverlay.svelte | 2 +- .../overlays/ReorderOverlay.svelte | 8 +-- .../overlays/ResizeOverlay.svelte | 2 +- .../overlays/ScrollOverlay.svelte | 2 +- .../{sheet => grid}/stores/bounds.js | 0 .../{sheet => grid}/stores/clipboard.js | 0 .../{sheet => grid}/stores/columns.js | 0 .../{sheet => grid}/stores/index.js | 0 .../components/{sheet => grid}/stores/menu.js | 0 .../{sheet => grid}/stores/pagination.js | 0 .../{sheet => grid}/stores/reorder.js | 6 +-- .../{sheet => grid}/stores/resize.js | 0 .../components/{sheet => grid}/stores/rows.js | 0 .../{sheet => grid}/stores/scroll.js | 6 +-- .../components/{sheet => grid}/stores/ui.js | 2 +- .../{sheet => grid}/stores/users.js | 2 +- .../{sheet => grid}/stores/validation.js | 0 .../{sheet => grid}/stores/viewport.js | 0 .../frontend-core/src/components/index.js | 2 +- .../src/components/sheet/index.js | 1 - 69 files changed, 130 insertions(+), 133 deletions(-) rename packages/builder/src/components/backend/DataTable/buttons/{sheet/SheetCreateViewButton.svelte => grid/GridCreateViewButton.svelte} (89%) rename packages/builder/src/components/backend/DataTable/buttons/{sheet/SheetExportButton.svelte => grid/GridExportButton.svelte} (95%) rename packages/builder/src/components/backend/DataTable/buttons/{sheet/SheetFilterButton.svelte => grid/GridFilterButton.svelte} (85%) rename packages/builder/src/components/backend/DataTable/buttons/{sheet/SheetImportButton.svelte => grid/GridImportButton.svelte} (83%) rename packages/builder/src/components/backend/DataTable/buttons/{sheet/SheetManageAccessButton.svelte => grid/GridManageAccessButton.svelte} (81%) rename packages/builder/src/components/backend/DataTable/buttons/{sheet/SheetRelationshipButton.svelte => grid/GridRelationshipButton.svelte} (85%) rename packages/builder/src/components/backend/DataTable/modals/{sheet/SheetCreateColumnModal.svelte => grid/GridCreateColumnModal.svelte} (88%) rename packages/builder/src/components/backend/DataTable/modals/{sheet/SheetCreateEditRowModal.svelte => grid/GridCreateEditRowModal.svelte} (91%) rename packages/builder/src/components/backend/DataTable/modals/{sheet/SheetEditColumnModal.svelte => grid/GridEditColumnModal.svelte} (91%) rename packages/builder/src/components/backend/DataTable/modals/{sheet/SheetEditUserModal.svelte => grid/GridEditUserModal.svelte} (90%) rename packages/frontend-core/src/components/{sheet => grid}/cells/AttachmentCell.svelte (98%) rename packages/frontend-core/src/components/{sheet => grid}/cells/BooleanCell.svelte (100%) rename packages/frontend-core/src/components/{sheet => grid}/cells/DataCell.svelte (95%) rename packages/frontend-core/src/components/{sheet => grid}/cells/DateCell.svelte (100%) rename packages/frontend-core/src/components/{sheet => grid}/cells/FormulaCell.svelte (100%) rename packages/frontend-core/src/components/{sheet/cells/SheetCell.svelte => grid/cells/GridCell.svelte} (100%) rename packages/frontend-core/src/components/{sheet => grid}/cells/HeaderCell.svelte (96%) rename packages/frontend-core/src/components/{sheet => grid}/cells/JSONCell.svelte (100%) rename packages/frontend-core/src/components/{sheet => grid}/cells/LongFormCell.svelte (100%) rename packages/frontend-core/src/components/{sheet => grid}/cells/MultiSelectCell.svelte (100%) rename packages/frontend-core/src/components/{sheet => grid}/cells/NumberCell.svelte (100%) rename packages/frontend-core/src/components/{sheet => grid}/cells/OptionsCell.svelte (100%) rename packages/frontend-core/src/components/{sheet => grid}/cells/RelationshipCell.svelte (99%) rename packages/frontend-core/src/components/{sheet => grid}/cells/TextCell.svelte (100%) rename packages/frontend-core/src/components/{sheet => grid}/controls/AddColumnButton.svelte (84%) rename packages/frontend-core/src/components/{sheet => grid}/controls/AddRowButton.svelte (79%) rename packages/frontend-core/src/components/{sheet => grid}/controls/BetaButton.svelte (100%) rename packages/frontend-core/src/components/{sheet => grid}/controls/DeleteButton.svelte (96%) rename packages/frontend-core/src/components/{sheet => grid}/controls/HideColumnsButton.svelte (97%) rename packages/frontend-core/src/components/{sheet => grid}/controls/RowHeightButton.svelte (95%) rename packages/frontend-core/src/components/{sheet => grid}/controls/SortButton.svelte (97%) create mode 100644 packages/frontend-core/src/components/grid/index.js rename packages/frontend-core/src/components/{sheet => grid}/layout/Avatar.svelte (100%) rename packages/frontend-core/src/components/{sheet/layout/Sheet.svelte => grid/layout/Grid.svelte} (88%) rename packages/frontend-core/src/components/{sheet/layout/SheetBody.svelte => grid/layout/GridBody.svelte} (55%) rename packages/frontend-core/src/components/{sheet/layout/SheetRow.svelte => grid/layout/GridRow.svelte} (98%) rename packages/frontend-core/src/components/{sheet/layout/SheetScrollWrapper.svelte => grid/layout/GridScrollWrapper.svelte} (98%) rename packages/frontend-core/src/components/{sheet => grid}/layout/HeaderRow.svelte (73%) rename packages/frontend-core/src/components/{sheet => grid}/layout/NewRowTop.svelte (94%) rename packages/frontend-core/src/components/{sheet => grid}/layout/RowCount.svelte (76%) rename packages/frontend-core/src/components/{sheet => grid}/layout/StickyColumn.svelte (94%) rename packages/frontend-core/src/components/{sheet => grid}/layout/UserAvatars.svelte (87%) rename packages/frontend-core/src/components/{sheet => grid}/lib/constants.js (91%) rename packages/frontend-core/src/components/{sheet => grid}/lib/events.js (85%) rename packages/frontend-core/src/components/{sheet => grid}/lib/renderers.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/lib/utils.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/lib/websocket.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/overlays/KeyboardManager.svelte (98%) rename packages/frontend-core/src/components/{sheet => grid}/overlays/MenuOverlay.svelte (98%) rename packages/frontend-core/src/components/{sheet => grid}/overlays/ReorderOverlay.svelte (89%) rename packages/frontend-core/src/components/{sheet => grid}/overlays/ResizeOverlay.svelte (98%) rename packages/frontend-core/src/components/{sheet => grid}/overlays/ScrollOverlay.svelte (99%) rename packages/frontend-core/src/components/{sheet => grid}/stores/bounds.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/stores/clipboard.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/stores/columns.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/stores/index.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/stores/menu.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/stores/pagination.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/stores/reorder.js (97%) rename packages/frontend-core/src/components/{sheet => grid}/stores/resize.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/stores/rows.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/stores/scroll.js (95%) rename packages/frontend-core/src/components/{sheet => grid}/stores/ui.js (97%) rename packages/frontend-core/src/components/{sheet => grid}/stores/users.js (98%) rename packages/frontend-core/src/components/{sheet => grid}/stores/validation.js (100%) rename packages/frontend-core/src/components/{sheet => grid}/stores/viewport.js (100%) delete mode 100644 packages/frontend-core/src/components/sheet/index.js diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index 0134689157..acb3dacf93 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -2,19 +2,18 @@ import { tables } from "stores/backend" import EditRolesButton from "./buttons/EditRolesButton.svelte" import { TableNames } from "constants" - import { Sheet } from "@budibase/frontend-core" + import { Grid } from "@budibase/frontend-core" import { API } from "api" - - import SheetAddColumnModal from "components/backend/DataTable/modals/sheet/SheetCreateColumnModal.svelte" - import SheetCreateEditRowModal from "components/backend/DataTable/modals/sheet/SheetCreateEditRowModal.svelte" - import SheetEditUserModal from "components/backend/DataTable/modals/sheet/SheetEditUserModal.svelte" - import SheetCreateViewButton from "components/backend/DataTable/buttons/sheet/SheetCreateViewButton.svelte" - import SheetImportButton from "components/backend/DataTable/buttons/sheet/SheetImportButton.svelte" - import SheetExportButton from "components/backend/DataTable/buttons/sheet/SheetExportButton.svelte" - import SheetFilterButton from "components/backend/DataTable/buttons/sheet/SheetFilterButton.svelte" - import SheetManageAccessButton from "components/backend/DataTable/buttons/sheet/SheetManageAccessButton.svelte" - import SheetRelationshipButton from "components/backend/DataTable/buttons/sheet/SheetRelationshipButton.svelte" - import SheetEditColumnModal from "components/backend/DataTable/modals/sheet/SheetEditColumnModal.svelte" + import GridAddColumnModal from "components/backend/DataTable/modals/grid/GridCreateColumnModal.svelte" + import GridCreateEditRowModal from "components/backend/DataTable/modals/grid/GridCreateEditRowModal.svelte" + import GridEditUserModal from "components/backend/DataTable/modals/grid/GridEditUserModal.svelte" + import GridCreateViewButton from "components/backend/DataTable/buttons/grid/GridCreateViewButton.svelte" + import GridImportButton from "components/backend/DataTable/buttons/grid/GridImportButton.svelte" + import GridExportButton from "components/backend/DataTable/buttons/grid/GridExportButton.svelte" + import GridFilterButton from "components/backend/DataTable/buttons/grid/GridFilterButton.svelte" + import GridManageAccessButton from "components/backend/DataTable/buttons/grid/GridManageAccessButton.svelte" + import GridRelationshipButton from "components/backend/DataTable/buttons/grid/GridRelationshipButton.svelte" + import GridEditColumnModal from "components/backend/DataTable/modals/grid/GridEditColumnModal.svelte" const userSchemaOverrides = { firstName: { name: "First name", disabled: true }, @@ -30,7 +29,7 @@
- {#if isInternal} - + {/if} - + {#if isUsersTable} {/if} {#if !isInternal} - + {/if} - - - - - + + + + + {#if isUsersTable} - + {:else} - + {/if} - +