@rebasepro/cms 0.19.1 → 0.19.2-canary.g09316f6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{CollectionEditorDialog-BeX4b92r.js → CollectionEditorDialog-DQjLtp1W.js} +75 -70
  2. package/dist/CollectionEditorDialog-DQjLtp1W.js.map +1 -0
  3. package/dist/{PropertyEditView-C7thfj4L.js → PropertyEditView-BMCCD2OI.js} +6 -6
  4. package/dist/PropertyEditView-BMCCD2OI.js.map +1 -0
  5. package/dist/{RouterCollectionsStudioView-BtjzvB6E.js → RouterCollectionsStudioView-DwsbIAqr.js} +9 -9
  6. package/dist/RouterCollectionsStudioView-DwsbIAqr.js.map +1 -0
  7. package/dist/{SchemaChangeDialog-CkqK6KOC.js → SchemaChangeDialog-BeP0A4MJ.js} +3 -3
  8. package/dist/SchemaChangeDialog-BeP0A4MJ.js.map +1 -0
  9. package/dist/collection_editor/serializable_types.d.ts +20 -0
  10. package/dist/collection_editor_ui.js +5 -5
  11. package/dist/components/CollectionTableBinding/fields/CompactEntityCellField.d.ts +23 -0
  12. package/dist/components/CollectionTableBinding/fields/TableRelationSelectorField.d.ts +1 -1
  13. package/dist/components/RelationSelector.d.ts +5 -1
  14. package/dist/data_import/utils/file_headers.d.ts +28 -4
  15. package/dist/editor.js +11 -11
  16. package/dist/editor.js.map +1 -1
  17. package/dist/{export--arni_VY.js → export-DJoGYb89.js} +2 -2
  18. package/dist/{export--arni_VY.js.map → export-DJoGYb89.js.map} +1 -1
  19. package/dist/{history-C2TpoQwi.js → history-BBpsdTrJ.js} +4 -4
  20. package/dist/history-BBpsdTrJ.js.map +1 -0
  21. package/dist/{import-DTkXNoBg.js → import-C4VQ0rwO.js} +2 -2
  22. package/dist/{import-DTkXNoBg.js.map → import-C4VQ0rwO.js.map} +1 -1
  23. package/dist/index.js +30 -35
  24. package/dist/index.js.map +1 -1
  25. package/dist/{markdown-CklalUUk.js → markdown-CCqp8ibf.js} +3 -3
  26. package/dist/markdown-CCqp8ibf.js.map +1 -0
  27. package/dist/util/view_constants.d.ts +3 -3
  28. package/dist/{util-DE1WQW6h.js → util-4oPxPkbp.js} +339 -155
  29. package/dist/util-4oPxPkbp.js.map +1 -0
  30. package/dist/{util-CfLFggP7.js → util-DB31IoJE.js} +4 -4
  31. package/dist/{util-CfLFggP7.js.map → util-DB31IoJE.js.map} +1 -1
  32. package/package.json +12 -11
  33. package/dist/CollectionEditorDialog-BeX4b92r.js.map +0 -1
  34. package/dist/PropertyEditView-C7thfj4L.js.map +0 -1
  35. package/dist/RouterCollectionsStudioView-BtjzvB6E.js.map +0 -1
  36. package/dist/SchemaChangeDialog-CkqK6KOC.js.map +0 -1
  37. package/dist/history-C2TpoQwi.js.map +0 -1
  38. package/dist/markdown-CklalUUk.js.map +0 -1
  39. package/dist/util-DE1WQW6h.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { A as getFieldId, At as convertDataToEntity, Ft as ImportSaveInProgress, Gt as SearchIconsView, Jn as useCollectionRegistryController, Kt as FieldCaption, Nt as getInferenceType, Ot as ImportNewPropertyFieldPreview, Pt as useImportConfig, Rt as ImportFileUpload, S as isSchemaChangeCancelled, Tt as useCollectionEditorController, Wt as PropertyConfigBadge, _ as useCollectionsConfigController, _n as useNavigationStateController, cn as useSelectionController, ct as useSafeSnackbarController, hn as useUrlController, i as namespaceToPropertiesOrderPath, k as getFieldConfig, kt as DataNewPropertiesMapping, l as validateCollectionJson, m as toSerializableCollectionConfig, n as getFullIdPath, o as CollectionGenerationApiError, r as idToPropertiesPath, t as getFullId, un as CollectionTableBinding } from "./util-DE1WQW6h.js";
3
- import { a as updatePropertyFromWidget, c as useAIModifiedPaths, i as supportedFields, n as PropertyForm, o as PropertyTree, r as PropertyFormDialog, s as AIModifiedPathsProvider } from "./PropertyEditView-C7thfj4L.js";
2
+ import { A as getFieldId, At as convertDataToEntity, Ft as ImportSaveInProgress, Gt as SearchIconsView, Jn as useCollectionRegistryController, Kt as FieldCaption, Nt as getInferenceType, Ot as ImportNewPropertyFieldPreview, Pt as useImportConfig, Rt as ImportFileUpload, S as isSchemaChangeCancelled, Tt as useCollectionEditorController, Wt as PropertyConfigBadge, _ as useCollectionsConfigController, _n as useNavigationStateController, cn as useSelectionController, ct as useSafeSnackbarController, hn as useUrlController, i as namespaceToPropertiesOrderPath, k as getFieldConfig, kt as DataNewPropertiesMapping, l as validateCollectionJson, m as toSerializableCollectionConfig, n as getFullIdPath, o as CollectionGenerationApiError, r as idToPropertiesPath, t as getFullId, un as CollectionTableBinding } from "./util-4oPxPkbp.js";
3
+ import { a as updatePropertyFromWidget, c as useAIModifiedPaths, i as supportedFields, n as PropertyForm, o as PropertyTree, r as PropertyFormDialog, s as AIModifiedPathsProvider } from "./PropertyEditView-BMCCD2OI.js";
4
4
  import * as React$1 from "react";
5
5
  import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
6
6
  import { Alert, AppWindow, ArrowLeftIcon, BooleanSwitchWithLabel, Button, Card, CheckIcon, Chip, CircularProgress, CircularProgressCenter, CodeIcon, ColumnsIcon, Container, CopyIcon, DebouncedTextField, Dialog, DialogActions, DialogContent, DialogTitle, ErrorBoundary, FileIcon, FileSearchIcon, FileTextIcon, IconButton, KanbanIcon, KeyIcon, LayoutGridIcon, ListIcon, LoadingButton, Menu, MultiSelect, MultiSelectItem, PanelLeftIcon, Paper, PlusIcon, Select, SelectItem, ShoppingCartIcon, SquareIcon, Tab, TableIcon, Tabs, TextField, ToggleButtonGroup, Tooltip, Trash2Icon, Typography, UserIcon, XIcon, cls, coolIconKeys, defaultBorderMixin, iconSize } from "@rebasepro/ui";
@@ -975,12 +975,12 @@ function CollectionPropertiesEditorForm({ showErrors, isNewCollection, propertyE
975
975
  };
976
976
  return /* @__PURE__ */ jsxs(Fragment, { children: [
977
977
  /* @__PURE__ */ jsxs("div", {
978
- className: "grid grid-cols-12 h-full min-h-0 bg-surface-50 dark:bg-surface-800",
978
+ className: "grid grid-cols-12 h-full min-h-0 bg-surface-sheet",
979
979
  children: [
980
980
  /* @__PURE__ */ jsxs("div", {
981
- className: cls("col-span-12 lg:col-span-5 h-full min-h-0 flex flex-col bg-surface-50 dark:bg-surface-800", !asDialog && "border-r " + defaultBorderMixin),
981
+ className: cls("col-span-12 lg:col-span-5 h-full min-h-0 flex flex-col bg-surface-sheet", !asDialog && "border-r " + defaultBorderMixin),
982
982
  children: [/* @__PURE__ */ jsxs("div", {
983
- className: cls("flex items-center justify-between px-3 py-2 border-b bg-surface-50 dark:bg-surface-900 min-h-[48px] shrink-0", defaultBorderMixin),
983
+ className: cls("flex items-center justify-between px-3 py-2 border-b min-h-[48px] shrink-0", defaultBorderMixin),
984
984
  children: [
985
985
  /* @__PURE__ */ jsx("div", {
986
986
  className: "flex-grow min-w-0 pr-2",
@@ -1024,7 +1024,7 @@ function CollectionPropertiesEditorForm({ showErrors, isNewCollection, propertyE
1024
1024
  })
1025
1025
  ]
1026
1026
  }), /* @__PURE__ */ jsxs("div", {
1027
- className: "flex-grow overflow-y-auto p-3 space-y-3 bg-surface-50 dark:bg-surface-800",
1027
+ className: "flex-grow overflow-y-auto p-3 space-y-3 bg-surface-sheet",
1028
1028
  children: [
1029
1029
  owner && /* @__PURE__ */ jsx("div", {
1030
1030
  className: "px-1 py-0.5",
@@ -1058,7 +1058,7 @@ function CollectionPropertiesEditorForm({ showErrors, isNewCollection, propertyE
1058
1058
  })]
1059
1059
  }),
1060
1060
  !asDialog && /* @__PURE__ */ jsx("div", {
1061
- className: "col-span-12 lg:col-span-7 p-4 md:py-8 md:px-4 h-full overflow-auto bg-surface-50 dark:bg-surface-800",
1061
+ className: "col-span-12 lg:col-span-7 p-4 md:py-8 md:px-4 h-full overflow-auto bg-surface-sheet",
1062
1062
  children: /* @__PURE__ */ jsxs("div", {
1063
1063
  className: "sticky top-8 min-h-full w-full flex flex-col justify-center",
1064
1064
  children: [
@@ -1231,22 +1231,22 @@ function CollectionJsonImportDialog({ open, onClose, onImport }) {
1231
1231
  children: [
1232
1232
  "Paste a JSON object representing your collection configuration. The JSON must include ",
1233
1233
  /* @__PURE__ */ jsx("code", {
1234
- className: "bg-surface-200 dark:bg-surface-700 px-1 rounded",
1234
+ className: "bg-surface-raised px-1 rounded",
1235
1235
  children: "id"
1236
1236
  }),
1237
1237
  ",",
1238
1238
  /* @__PURE__ */ jsx("code", {
1239
- className: "bg-surface-200 dark:bg-surface-700 px-1 rounded",
1239
+ className: "bg-surface-raised px-1 rounded",
1240
1240
  children: "name"
1241
1241
  }),
1242
1242
  ",",
1243
1243
  /* @__PURE__ */ jsx("code", {
1244
- className: "bg-surface-200 dark:bg-surface-700 px-1 rounded",
1244
+ className: "bg-surface-raised px-1 rounded",
1245
1245
  children: "path"
1246
1246
  }),
1247
1247
  ", and",
1248
1248
  /* @__PURE__ */ jsx("code", {
1249
- className: "bg-surface-200 dark:bg-surface-700 px-1 rounded",
1249
+ className: "bg-surface-raised px-1 rounded",
1250
1250
  children: "properties"
1251
1251
  }),
1252
1252
  "."
@@ -2527,7 +2527,7 @@ function CollectionRLSTab() {
2527
2527
  }) : /* @__PURE__ */ jsx("div", {
2528
2528
  className: "flex flex-col gap-3",
2529
2529
  children: rules.map((rule) => /* @__PURE__ */ jsxs(Paper, {
2530
- className: "p-4 border border-transparent hover:border-surface-200 dark:hover:border-surface-700 rounded-lg flex flex-col sm:flex-row sm:items-center justify-between gap-4 transition-colors bg-white dark:bg-surface-800 shadow-sm",
2530
+ className: "p-4 border border-transparent hover:border-surface-200 dark:hover:border-surface-700 rounded-lg flex flex-col sm:flex-row sm:items-center justify-between gap-4 transition-colors bg-surface-card shadow-sm",
2531
2531
  children: [/* @__PURE__ */ jsxs("div", {
2532
2532
  className: "flex flex-col gap-1.5 min-w-0",
2533
2533
  children: [/* @__PURE__ */ jsxs("div", {
@@ -2544,11 +2544,11 @@ function CollectionRLSTab() {
2544
2544
  className: "flex gap-2 text-xs pl-6 overflow-x-auto hide-scrollbar",
2545
2545
  children: [/* @__PURE__ */ jsxs(Chip, {
2546
2546
  size: "small",
2547
- className: "bg-surface-100 dark:bg-surface-900 text-text-secondary border-none",
2547
+ className: "bg-surface-raised text-text-secondary border-none",
2548
2548
  children: ["Action: ", rule.operation || "ALL"]
2549
2549
  }), /* @__PURE__ */ jsxs(Chip, {
2550
2550
  size: "small",
2551
- className: "bg-surface-100 dark:bg-surface-900 text-text-secondary border-none",
2551
+ className: "bg-surface-raised text-text-secondary border-none",
2552
2552
  children: ["Roles: ", Array.isArray(rule.roles) ? rule.roles.join(", ") : rule.roles]
2553
2553
  })]
2554
2554
  })]
@@ -2629,11 +2629,11 @@ function CollectionRLSTab() {
2629
2629
  className: "flex gap-2 text-xs pl-6 overflow-x-auto hide-scrollbar",
2630
2630
  children: [/* @__PURE__ */ jsxs(Chip, {
2631
2631
  size: "small",
2632
- className: "bg-white dark:bg-surface-900 text-text-secondary border-none",
2632
+ className: "bg-surface-card text-text-secondary border-none",
2633
2633
  children: ["Action: ", dp.cmd || "ALL"]
2634
2634
  }), /* @__PURE__ */ jsxs(Chip, {
2635
2635
  size: "small",
2636
- className: "bg-white dark:bg-surface-900 text-text-secondary border-none",
2636
+ className: "bg-surface-card text-text-secondary border-none",
2637
2637
  children: ["Roles: ", Array.isArray(dp.roles) ? dp.roles.join(", ") : dp.roles]
2638
2638
  })]
2639
2639
  })]
@@ -2720,10 +2720,10 @@ function InlinePolicyEditor({ policy, table, availableRoles, rolesUnavailable, o
2720
2720
  })]
2721
2721
  }),
2722
2722
  /* @__PURE__ */ jsx(DialogContent, {
2723
- className: "p-4 md:p-6 border-t dark:border-surface-700 bg-surface-50 dark:bg-surface-800",
2723
+ className: "p-4 md:p-6 border-t dark:border-surface-700 bg-surface-sheet",
2724
2724
  includeMargin: false,
2725
2725
  children: /* @__PURE__ */ jsxs(Paper, {
2726
- className: cls("p-4 md:p-6 flex flex-col gap-6 bg-white dark:bg-surface-800 border-none sm:border-solid rounded-none sm:rounded-xl", defaultBorderMixin),
2726
+ className: cls("p-4 md:p-6 flex flex-col gap-6 bg-surface-card border-none sm:border-solid rounded-none sm:rounded-xl", defaultBorderMixin),
2727
2727
  children: [
2728
2728
  /* @__PURE__ */ jsxs("div", {
2729
2729
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
@@ -2916,7 +2916,7 @@ function CollectionEditorDialog(props) {
2916
2916
  fullHeight: true,
2917
2917
  scrollable: false,
2918
2918
  maxWidth: "7xl",
2919
- className: "bg-surface-50 dark:bg-surface-800",
2919
+ className: "bg-surface-sheet",
2920
2920
  onOpenChange: (open) => !open ? handleCancel() : void 0,
2921
2921
  children: [/* @__PURE__ */ jsx(DialogTitle, {
2922
2922
  hidden: true,
@@ -3272,11 +3272,11 @@ function CollectionEditorInternal({ isNewCollection, configController, editedCol
3272
3272
  if (operations && aiModifiedPaths) aiModifiedPaths.addModifiedPaths(operations);
3273
3273
  };
3274
3274
  return /* @__PURE__ */ jsxs("div", {
3275
- className: "h-full w-full flex flex-col bg-surface-50 dark:bg-surface-800",
3275
+ className: "h-full w-full flex flex-col bg-surface-sheet",
3276
3276
  children: [/* @__PURE__ */ jsx(Formex, {
3277
3277
  value: formController,
3278
3278
  children: /* @__PURE__ */ jsxs(Fragment, { children: [!isNewCollection && /* @__PURE__ */ jsxs("div", {
3279
- className: cls("px-4 py-2 w-full flex shrink-0 items-center justify-between gap-4 bg-surface-50 dark:bg-surface-900 border-b", defaultBorderMixin),
3279
+ className: cls("px-4 py-2 w-full flex shrink-0 items-center justify-between gap-4 border-b", defaultBorderMixin),
3280
3280
  children: [/* @__PURE__ */ jsx("div", {
3281
3281
  className: "flex flex-1 items-center justify-end gap-4 min-w-0",
3282
3282
  children: /* @__PURE__ */ jsxs(Tabs, {
@@ -3336,7 +3336,7 @@ function CollectionEditorInternal({ isNewCollection, configController, editedCol
3336
3336
  onSubmit: formController.handleSubmit,
3337
3337
  className: "flex-grow flex flex-col min-h-0 relative",
3338
3338
  children: [/* @__PURE__ */ jsxs("div", {
3339
- className: "flex-grow flex flex-col min-h-0 relative w-full h-full bg-surface-50 dark:bg-surface-800",
3339
+ className: "flex-grow flex flex-col min-h-0 relative w-full h-full bg-surface-sheet",
3340
3340
  children: [
3341
3341
  currentView === "loading" && /* @__PURE__ */ jsx(CircularProgressCenter, {}),
3342
3342
  currentView === "extra_view" && usedPath && extraView?.View && /* @__PURE__ */ jsx(extraView.View, { path: usedPath }),
@@ -3429,7 +3429,7 @@ function CollectionEditorInternal({ isNewCollection, configController, editedCol
3429
3429
  })
3430
3430
  ]
3431
3431
  }), (!fullScreen || isNewCollection || !!error) && /* @__PURE__ */ jsxs("div", {
3432
- className: "shrink-0 w-full p-4 sm:px-6 sm:py-4 border-t border-surface-200 dark:border-surface-900 flex items-center justify-between gap-4 bg-surface-50 dark:bg-surface-900",
3432
+ className: "shrink-0 w-full p-4 sm:px-6 sm:py-4 border-t border-hairline flex items-center justify-between gap-4",
3433
3433
  children: [
3434
3434
  error && /* @__PURE__ */ jsx(ErrorView, { error }),
3435
3435
  isNewCollection && includeTemplates && currentView === "import_data_mapping" && /* @__PURE__ */ jsx(Button, {
@@ -3462,52 +3462,57 @@ function CollectionEditorInternal({ isNewCollection, configController, editedCol
3462
3462
  onClick: () => setCurrentView("general"),
3463
3463
  children: [/* @__PURE__ */ jsx(ArrowLeftIcon, {}), "Back"]
3464
3464
  }),
3465
- (!fullScreen || isNewCollection) && /* @__PURE__ */ jsx(Button, {
3466
- variant: "text",
3467
- color: "neutral",
3468
- onClick: () => {
3469
- handleCancel();
3470
- },
3471
- children: "Cancel"
3472
- }),
3473
- currentView === "welcome" && /* @__PURE__ */ jsx(Button, {
3474
- variant: "text",
3475
- onClick: () => onWelcomeScreenContinue(),
3476
- children: "Continue from scratch"
3477
- }),
3478
- isNewCollection && currentView === "import_data_mapping" && /* @__PURE__ */ jsx(Button, {
3479
- variant: "filled",
3480
- color: "primary",
3481
- onClick: onImportMappingComplete,
3482
- children: "Next"
3483
- }),
3484
- isNewCollection && currentView === "import_data_preview" && /* @__PURE__ */ jsx(Button, {
3485
- variant: "filled",
3486
- color: "primary",
3487
- onClick: () => {
3488
- setNextMode();
3489
- },
3490
- children: "Next"
3491
- }),
3492
- isNewCollection && (currentView === "general" || currentView === "properties") && /* @__PURE__ */ jsxs(LoadingButton, {
3493
- variant: "filled",
3494
- color: "primary",
3495
- type: "submit",
3496
- loading: isSubmitting,
3497
- disabled: isSubmitting || currentView === "general" && !validValues || configController?.readOnly,
3498
- startIcon: currentView === "properties" ? /* @__PURE__ */ jsx(CheckIcon, {}) : void 0,
3499
- children: [currentView === "general" && "Next", currentView === "properties" && "Create collection"]
3500
- }),
3501
- !isNewCollection && !fullScreen && /* @__PURE__ */ jsx(Tooltip, {
3502
- title: configController?.readOnly ? readOnlyTitle : void 0,
3503
- children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(LoadingButton, {
3504
- variant: "filled",
3505
- color: "primary",
3506
- type: "submit",
3507
- disabled: isSubmitting || configController?.readOnly,
3508
- loading: isSubmitting,
3509
- children: configController?.readOnly ? "Update collection (Read-only)" : "Update collection"
3510
- }) })
3465
+ /* @__PURE__ */ jsxs("div", {
3466
+ className: "flex items-center gap-2 ml-auto",
3467
+ children: [
3468
+ (!fullScreen || isNewCollection) && /* @__PURE__ */ jsx(Button, {
3469
+ variant: "text",
3470
+ color: "neutral",
3471
+ onClick: () => {
3472
+ handleCancel();
3473
+ },
3474
+ children: "Cancel"
3475
+ }),
3476
+ currentView === "welcome" && /* @__PURE__ */ jsx(Button, {
3477
+ variant: "text",
3478
+ onClick: () => onWelcomeScreenContinue(),
3479
+ children: "Continue from scratch"
3480
+ }),
3481
+ isNewCollection && currentView === "import_data_mapping" && /* @__PURE__ */ jsx(Button, {
3482
+ variant: "filled",
3483
+ color: "primary",
3484
+ onClick: onImportMappingComplete,
3485
+ children: "Next"
3486
+ }),
3487
+ isNewCollection && currentView === "import_data_preview" && /* @__PURE__ */ jsx(Button, {
3488
+ variant: "filled",
3489
+ color: "primary",
3490
+ onClick: () => {
3491
+ setNextMode();
3492
+ },
3493
+ children: "Next"
3494
+ }),
3495
+ isNewCollection && (currentView === "general" || currentView === "properties") && /* @__PURE__ */ jsxs(LoadingButton, {
3496
+ variant: "filled",
3497
+ color: "primary",
3498
+ type: "submit",
3499
+ loading: isSubmitting,
3500
+ disabled: isSubmitting || currentView === "general" && !validValues || configController?.readOnly,
3501
+ startIcon: currentView === "properties" ? /* @__PURE__ */ jsx(CheckIcon, {}) : void 0,
3502
+ children: [currentView === "general" && "Next", currentView === "properties" && "Create collection"]
3503
+ }),
3504
+ !isNewCollection && !fullScreen && /* @__PURE__ */ jsx(Tooltip, {
3505
+ title: configController?.readOnly ? readOnlyTitle : void 0,
3506
+ children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(LoadingButton, {
3507
+ variant: "filled",
3508
+ color: "primary",
3509
+ type: "submit",
3510
+ disabled: isSubmitting || configController?.readOnly,
3511
+ loading: isSubmitting,
3512
+ children: configController?.readOnly ? "Update collection (Read-only)" : "Update collection"
3513
+ }) })
3514
+ })
3515
+ ]
3511
3516
  })
3512
3517
  ]
3513
3518
  })]
@@ -3576,4 +3581,4 @@ var validateId = (value, isNewCollection, existingPaths, existingIds) => {
3576
3581
  //#endregion
3577
3582
  export { CollectionEditorDialog as n, CollectionEditorDialog_exports as r, CollectionEditor as t };
3578
3583
 
3579
- //# sourceMappingURL=CollectionEditorDialog-BeX4b92r.js.map
3584
+ //# sourceMappingURL=CollectionEditorDialog-DQjLtp1W.js.map