@rebasepro/cms 0.20.1-canary.g4d882ca → 0.21.0
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.
- package/dist/{CollectionEditorDialog-Dqj1H2J1.js → CollectionEditorDialog-C-A_NCKB.js} +4 -4
- package/dist/{CollectionEditorDialog-Dqj1H2J1.js.map → CollectionEditorDialog-C-A_NCKB.js.map} +1 -1
- package/dist/JsonPreviewBinding-v0w3H0fp.js +35 -0
- package/dist/JsonPreviewBinding-v0w3H0fp.js.map +1 -0
- package/dist/{PropertyEditView-6bPyDphj.js → PropertyEditView-Dv7496fx.js} +2 -2
- package/dist/{PropertyEditView-6bPyDphj.js.map → PropertyEditView-Dv7496fx.js.map} +1 -1
- package/dist/{RouterCollectionsStudioView-DcVBjsxs.js → RouterCollectionsStudioView-DuDFEYuL.js} +4 -4
- package/dist/{RouterCollectionsStudioView-DcVBjsxs.js.map → RouterCollectionsStudioView-DuDFEYuL.js.map} +1 -1
- package/dist/collection_editor_ui.js +4 -4
- package/dist/components/CollectionViewBinding/CollectionViewStartActions.d.ts +6 -2
- package/dist/components/CollectionViewBinding/EntityCardBinding.d.ts +11 -1
- package/dist/components/DeleteEntityDialog.d.ts +11 -3
- package/dist/data_export/export/ExportCollectionAction.d.ts +1 -1
- package/dist/data_export/export/fetch_export_data.d.ts +10 -16
- package/dist/{export-uKD4QlR9.js → export-DtSmLT6u.js} +54 -42
- package/dist/export-DtSmLT6u.js.map +1 -0
- package/dist/form/EntityForm.d.ts +1 -1
- package/dist/{history-BGkpUl0-.js → history-C6kUDQ3f.js} +2 -2
- package/dist/{history-BGkpUl0-.js.map → history-C6kUDQ3f.js.map} +1 -1
- package/dist/{import-jRh_je8w.js → import-BciQBH5t.js} +2 -2
- package/dist/{import-jRh_je8w.js.map → import-BciQBH5t.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/selection/SelectionMenu.d.ts +27 -0
- package/dist/selection/index.d.ts +2 -0
- package/dist/selection/resolve_selection.d.ts +62 -0
- package/dist/types/components/EntityFormProps.d.ts +13 -0
- package/dist/util/entity_pages.d.ts +36 -0
- package/dist/util/map_with_concurrency.d.ts +16 -0
- package/dist/{util-CSqO4I0b.js → util-h6jhiiBE.js} +669 -190
- package/dist/util-h6jhiiBE.js.map +1 -0
- package/package.json +9 -9
- package/dist/export-uKD4QlR9.js.map +0 -1
- package/dist/util-CSqO4I0b.js.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
import { useModeController } from "@rebasepro/app";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Highlight, themes } from "prism-react-renderer";
|
|
5
|
+
//#region src/components/JsonPreviewBinding.tsx
|
|
6
|
+
function JsonPreviewBinding({ values }) {
|
|
7
|
+
const code = JSON.stringify(values, null, " ");
|
|
8
|
+
const { mode } = useModeController();
|
|
9
|
+
const preRef = useRef(null);
|
|
10
|
+
return /* @__PURE__ */ jsx(Highlight, {
|
|
11
|
+
theme: mode === "dark" ? themes.vsDark : themes.github,
|
|
12
|
+
code,
|
|
13
|
+
language: "json",
|
|
14
|
+
children: ({ style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ jsx("pre", {
|
|
15
|
+
ref: preRef,
|
|
16
|
+
style: {
|
|
17
|
+
...style,
|
|
18
|
+
backgroundColor: "inherit"
|
|
19
|
+
},
|
|
20
|
+
className: "max-w-6xl mx-auto p-8 rounded-xs text-sm",
|
|
21
|
+
children: tokens.map((line, i) => /* @__PURE__ */ jsx("div", {
|
|
22
|
+
...getLineProps({ line }),
|
|
23
|
+
className: "text-wrap",
|
|
24
|
+
children: line.map((token, key) => /* @__PURE__ */ jsx("span", {
|
|
25
|
+
...getTokenProps({ token }),
|
|
26
|
+
className: "word-break"
|
|
27
|
+
}, key))
|
|
28
|
+
}, i))
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { JsonPreviewBinding };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=JsonPreviewBinding-v0w3H0fp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JsonPreviewBinding-v0w3H0fp.js","names":[],"sources":["../src/components/JsonPreviewBinding.tsx"],"sourcesContent":["import React, { useRef } from \"react\";\nimport { Highlight, themes } from \"prism-react-renderer\";\nimport { useModeController } from \"@rebasepro/app\";\n\nexport function JsonPreviewBinding({ values }: { values: object }) {\n const code = JSON.stringify(values, null, \"\\t\");\n const { mode } = useModeController();\n const preRef = useRef<HTMLPreElement>(null);\n\n // Global keydown handler\n // const handleGlobalKeyDown = useCallback((e: KeyboardEvent) => {\n // // Check for Control (Windows/Linux) or Command (macOS) + \"a\":\n // if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === \"a\") {\n // // If our code view is mounted, perform selection\n // if (preRef.current) {\n // e.preventDefault();\n // e.stopPropagation();\n //\n // const selection = window.getSelection();\n // const range = document.createRange();\n // range.selectNodeContents(preRef.current);\n // if (selection) {\n // selection.removeAllRanges();\n // selection.addRange(range);\n // }\n // }\n // }\n // }, []);\n\n // // Attach the global keydown listener when component mounts,\n // // and remove it when it unmounts.\n // useEffect(() => {\n // document.addEventListener(\"keydown\", handleGlobalKeyDown);\n // return () => {\n // document.removeEventListener(\"keydown\", handleGlobalKeyDown);\n // };\n // }, [handleGlobalKeyDown]);\n\n return (\n <Highlight\n theme={mode === \"dark\" ? themes.vsDark : themes.github}\n code={code}\n language=\"json\"\n >\n {({ style, tokens, getLineProps, getTokenProps }) => (\n <pre\n // Bind the ref to our pre element so we can select its contents.\n ref={preRef}\n style={{\n ...style,\n backgroundColor: \"inherit\"\n }}\n className=\"max-w-6xl mx-auto p-8 rounded-xs text-sm\"\n >\n {tokens.map((line, i) => (\n <div key={i} {...getLineProps({ line })} className=\"text-wrap\">\n {line.map((token, key) => (\n <span key={key} {...getTokenProps({ token })} className=\"word-break\"/>\n ))}\n </div>\n ))}\n </pre>\n )}\n </Highlight>\n );\n}\n"],"mappings":";;;;;AAIA,SAAgB,mBAAmB,EAAE,UAA8B;CAC/D,MAAM,OAAO,KAAK,UAAU,QAAQ,MAAM,GAAI;CAC9C,MAAM,EAAE,SAAS,kBAAkB;CACnC,MAAM,SAAS,OAAuB,IAAI;CA+B1C,OACI,oBAAC,WAAD;EACI,OAAO,SAAS,SAAS,OAAO,SAAS,OAAO;EAC1C;EACN,UAAS;aAEP,EAAE,OAAO,QAAQ,cAAc,oBAC7B,oBAAC,OAAD;GAEI,KAAK;GACL,OAAO;IACH,GAAG;IACH,iBAAiB;GACrB;GACA,WAAU;aAEnB,OAAO,KAAK,MAAM,MACf,oBAAC,OAAD;IAAa,GAAI,aAAa,EAAE,KAAK,CAAC;IAAG,WAAU;cAC9C,KAAK,KAAK,OAAO,QACd,oBAAC,QAAD;KAAgB,GAAI,cAAc,EAAE,MAAM,CAAC;KAAG,WAAU;IAAa,GAA1D,GAA0D,CACxE;GACA,GAJK,CAIL,CACR;EACE,CAAA;CAEM,CAAA;AAEnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { A as getFieldId, E as DEFAULT_FIELD_CONFIGS,
|
|
2
|
+
import { A as getFieldId, E as DEFAULT_FIELD_CONFIGS, Kt as FieldCaption, Ut as ArrayContainer, Wt as PropertyConfigBadge, a as namespaceToPropertiesPath, ct as useSafeSnackbarController, g as toSerializableProperty, i as namespaceToPropertiesOrderPath, k as getFieldConfig, m as toSerializableCollectionConfig, n as getFullIdPath, r as idToPropertiesPath, t as getFullId, tr as useCollectionRegistryController } from "./util-h6jhiiBE.js";
|
|
3
3
|
import React, { createContext, useCallback, useContext, useDeferredValue, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { deepEqual } from "fast-equals";
|
|
5
5
|
import { AlertTriangleIcon, ArrowDownToLineIcon, ArrowUpToLineIcon, Badge, BooleanSwitchWithLabel, Button, Card, CheckSquareIcon, CircularProgress, DebouncedTextField, Dialog, DialogActions, DialogContent, DialogTitle, ErrorBoundary, ExpandablePanel, FileSearchIcon, FunctionSquareIcon, IconButton, InfoLabel, ListIcon, Menu, MenuItem, MinusCircleIcon, MoreVerticalIcon, MultiSelect, MultiSelectItem, Paper, PlusIcon, RefreshCcwIcon, Select, SelectItem, SettingsIcon, TextField, Tooltip, Trash2Icon, Typography, UploadCloudIcon, cls, defaultBorderMixin, iconSize } from "@rebasepro/ui";
|
|
@@ -3802,4 +3802,4 @@ function WidgetSelectViewItem({ onClick, initialProperty, propertyConfig, existi
|
|
|
3802
3802
|
//#endregion
|
|
3803
3803
|
export { updatePropertyFromWidget as a, useAIModifiedPaths as c, supportedFields as i, PropertyForm as n, PropertyTree as o, PropertyFormDialog as r, AIModifiedPathsProvider as s, PropertyEditView_exports as t };
|
|
3804
3804
|
|
|
3805
|
-
//# sourceMappingURL=PropertyEditView-
|
|
3805
|
+
//# sourceMappingURL=PropertyEditView-Dv7496fx.js.map
|