@firecms/collection_editor 3.0.0-canary.235 → 3.0.0-canary.237
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/ConfigControllerProvider.d.ts +0 -1
- package/dist/index.es.js +268 -260
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +268 -260
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collection_editor_controller.d.ts +0 -1
- package/dist/ui/collection_editor/CollectionEditorWelcomeView.d.ts +1 -1
- package/dist/useCollectionEditorPlugin.d.ts +3 -3
- package/package.json +8 -8
- package/src/ConfigControllerProvider.tsx +0 -5
- package/src/types/collection_editor_controller.tsx +0 -2
- package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +5 -21
- package/src/useCollectionEditorPlugin.tsx +5 -6
- package/src/utils/collections.ts +1 -0
package/dist/index.umd.js
CHANGED
|
@@ -8072,7 +8072,7 @@
|
|
|
8072
8072
|
}
|
|
8073
8073
|
};
|
|
8074
8074
|
function CollectionEditorWelcomeView(t0) {
|
|
8075
|
-
const $ = reactCompilerRuntime.c(
|
|
8075
|
+
const $ = reactCompilerRuntime.c(52);
|
|
8076
8076
|
const {
|
|
8077
8077
|
path,
|
|
8078
8078
|
pathSuggestions,
|
|
@@ -8109,6 +8109,10 @@
|
|
|
8109
8109
|
setFieldValue,
|
|
8110
8110
|
setValues
|
|
8111
8111
|
} = formex.useFormex();
|
|
8112
|
+
const noSuggestions = !loadingPathSuggestions && (filteredPathSuggestions ?? [])?.length === 0;
|
|
8113
|
+
if (!noSuggestions) {
|
|
8114
|
+
return null;
|
|
8115
|
+
}
|
|
8112
8116
|
let t3;
|
|
8113
8117
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8114
8118
|
t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row py-2 pt-3 items-center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h4", className: "flex-grow", children: "New collection" }) });
|
|
@@ -8160,173 +8164,162 @@
|
|
|
8160
8164
|
t7 = $[15];
|
|
8161
8165
|
}
|
|
8162
8166
|
let t8;
|
|
8163
|
-
if ($[16] !==
|
|
8164
|
-
t8 =
|
|
8165
|
-
$[16] = filteredPathSuggestions;
|
|
8166
|
-
$[17] = loadingPathSuggestions;
|
|
8167
|
-
$[18] = t8;
|
|
8168
|
-
} else {
|
|
8169
|
-
t8 = $[18];
|
|
8170
|
-
}
|
|
8171
|
-
let t9;
|
|
8172
|
-
if ($[19] !== t6 || $[20] !== t7 || $[21] !== t8) {
|
|
8173
|
-
t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8167
|
+
if ($[16] !== t6 || $[17] !== t7) {
|
|
8168
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8174
8169
|
t5,
|
|
8175
8170
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
|
|
8176
8171
|
t6,
|
|
8177
|
-
t7
|
|
8178
|
-
t8
|
|
8172
|
+
t7
|
|
8179
8173
|
] })
|
|
8180
8174
|
] });
|
|
8181
|
-
$[
|
|
8182
|
-
$[
|
|
8183
|
-
$[
|
|
8184
|
-
$[22] = t9;
|
|
8175
|
+
$[16] = t6;
|
|
8176
|
+
$[17] = t7;
|
|
8177
|
+
$[18] = t8;
|
|
8185
8178
|
} else {
|
|
8186
|
-
|
|
8179
|
+
t8 = $[18];
|
|
8180
|
+
}
|
|
8181
|
+
let t9;
|
|
8182
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8183
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
|
|
8184
|
+
$[19] = t9;
|
|
8185
|
+
} else {
|
|
8186
|
+
t9 = $[19];
|
|
8187
8187
|
}
|
|
8188
8188
|
let t10;
|
|
8189
|
-
if ($[
|
|
8190
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.
|
|
8191
|
-
$[
|
|
8189
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8190
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
|
|
8191
|
+
$[20] = t10;
|
|
8192
8192
|
} else {
|
|
8193
|
-
t10 = $[
|
|
8193
|
+
t10 = $[20];
|
|
8194
8194
|
}
|
|
8195
8195
|
let t11;
|
|
8196
|
-
if ($[
|
|
8197
|
-
t11 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
8198
|
-
|
|
8196
|
+
if ($[21] !== onContinue || $[22] !== setValues) {
|
|
8197
|
+
t11 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t10, onClick: () => {
|
|
8198
|
+
setValues(productsCollectionTemplate);
|
|
8199
|
+
onContinue();
|
|
8200
|
+
} });
|
|
8201
|
+
$[21] = onContinue;
|
|
8202
|
+
$[22] = setValues;
|
|
8203
|
+
$[23] = t11;
|
|
8199
8204
|
} else {
|
|
8200
|
-
t11 = $[
|
|
8205
|
+
t11 = $[23];
|
|
8201
8206
|
}
|
|
8202
8207
|
let t12;
|
|
8208
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8209
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
|
|
8210
|
+
$[24] = t12;
|
|
8211
|
+
} else {
|
|
8212
|
+
t12 = $[24];
|
|
8213
|
+
}
|
|
8214
|
+
let t13;
|
|
8203
8215
|
if ($[25] !== onContinue || $[26] !== setValues) {
|
|
8204
|
-
|
|
8205
|
-
setValues(
|
|
8216
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t12, onClick: () => {
|
|
8217
|
+
setValues(usersCollectionTemplate);
|
|
8206
8218
|
onContinue();
|
|
8207
8219
|
} });
|
|
8208
8220
|
$[25] = onContinue;
|
|
8209
8221
|
$[26] = setValues;
|
|
8210
|
-
$[27] =
|
|
8222
|
+
$[27] = t13;
|
|
8211
8223
|
} else {
|
|
8212
|
-
|
|
8224
|
+
t13 = $[27];
|
|
8213
8225
|
}
|
|
8214
|
-
let
|
|
8226
|
+
let t14;
|
|
8215
8227
|
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8216
|
-
|
|
8217
|
-
$[28] =
|
|
8228
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
|
|
8229
|
+
$[28] = t14;
|
|
8218
8230
|
} else {
|
|
8219
|
-
|
|
8231
|
+
t14 = $[28];
|
|
8220
8232
|
}
|
|
8221
|
-
let
|
|
8233
|
+
let t15;
|
|
8222
8234
|
if ($[29] !== onContinue || $[30] !== setValues) {
|
|
8223
|
-
|
|
8224
|
-
setValues(
|
|
8235
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t14, onClick: () => {
|
|
8236
|
+
setValues(blogCollectionTemplate);
|
|
8225
8237
|
onContinue();
|
|
8226
8238
|
} });
|
|
8227
8239
|
$[29] = onContinue;
|
|
8228
8240
|
$[30] = setValues;
|
|
8229
|
-
$[31] =
|
|
8241
|
+
$[31] = t15;
|
|
8230
8242
|
} else {
|
|
8231
|
-
|
|
8243
|
+
t15 = $[31];
|
|
8232
8244
|
}
|
|
8233
|
-
let
|
|
8245
|
+
let t16;
|
|
8234
8246
|
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8235
|
-
|
|
8236
|
-
$[32] =
|
|
8247
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
|
|
8248
|
+
$[32] = t16;
|
|
8237
8249
|
} else {
|
|
8238
|
-
|
|
8250
|
+
t16 = $[32];
|
|
8239
8251
|
}
|
|
8240
|
-
let
|
|
8252
|
+
let t17;
|
|
8241
8253
|
if ($[33] !== onContinue || $[34] !== setValues) {
|
|
8242
|
-
|
|
8243
|
-
setValues(
|
|
8254
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t16, onClick: () => {
|
|
8255
|
+
setValues(pagesCollectionTemplate);
|
|
8244
8256
|
onContinue();
|
|
8245
8257
|
} });
|
|
8246
8258
|
$[33] = onContinue;
|
|
8247
8259
|
$[34] = setValues;
|
|
8248
|
-
$[35] =
|
|
8249
|
-
} else {
|
|
8250
|
-
t16 = $[35];
|
|
8251
|
-
}
|
|
8252
|
-
let t17;
|
|
8253
|
-
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8254
|
-
t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
|
|
8255
|
-
$[36] = t17;
|
|
8260
|
+
$[35] = t17;
|
|
8256
8261
|
} else {
|
|
8257
|
-
t17 = $[
|
|
8262
|
+
t17 = $[35];
|
|
8258
8263
|
}
|
|
8259
8264
|
let t18;
|
|
8260
|
-
if ($[37] !==
|
|
8261
|
-
t18 = /* @__PURE__ */ jsxRuntime.
|
|
8262
|
-
|
|
8263
|
-
onContinue();
|
|
8264
|
-
} });
|
|
8265
|
-
$[37] = onContinue;
|
|
8266
|
-
$[38] = setValues;
|
|
8267
|
-
$[39] = t18;
|
|
8268
|
-
} else {
|
|
8269
|
-
t18 = $[39];
|
|
8270
|
-
}
|
|
8271
|
-
let t19;
|
|
8272
|
-
if ($[40] !== t12 || $[41] !== t14 || $[42] !== t16 || $[43] !== t18) {
|
|
8273
|
-
t19 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8274
|
-
t10,
|
|
8265
|
+
if ($[36] !== t11 || $[37] !== t13 || $[38] !== t15 || $[39] !== t17) {
|
|
8266
|
+
t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8267
|
+
t9,
|
|
8275
8268
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8269
|
+
t11,
|
|
8270
|
+
t13,
|
|
8271
|
+
t15,
|
|
8272
|
+
t17
|
|
8280
8273
|
] })
|
|
8281
8274
|
] });
|
|
8282
|
-
$[
|
|
8283
|
-
$[
|
|
8284
|
-
$[
|
|
8285
|
-
$[
|
|
8286
|
-
$[
|
|
8275
|
+
$[36] = t11;
|
|
8276
|
+
$[37] = t13;
|
|
8277
|
+
$[38] = t15;
|
|
8278
|
+
$[39] = t17;
|
|
8279
|
+
$[40] = t18;
|
|
8287
8280
|
} else {
|
|
8288
|
-
|
|
8281
|
+
t18 = $[40];
|
|
8289
8282
|
}
|
|
8290
|
-
let
|
|
8291
|
-
if ($[
|
|
8292
|
-
|
|
8283
|
+
let t19;
|
|
8284
|
+
if ($[41] !== onContinue || $[42] !== parentCollection) {
|
|
8285
|
+
t19 = !parentCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8293
8286
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Create a collection from a file (csv, json, xls, xslx...)" }),
|
|
8294
8287
|
/* @__PURE__ */ jsxRuntime.jsx(data_import_export.ImportFileUpload, { onDataAdded: (data, propertiesOrder) => onContinue(data, propertiesOrder) })
|
|
8295
8288
|
] });
|
|
8296
|
-
$[
|
|
8297
|
-
$[
|
|
8298
|
-
$[
|
|
8289
|
+
$[41] = onContinue;
|
|
8290
|
+
$[42] = parentCollection;
|
|
8291
|
+
$[43] = t19;
|
|
8299
8292
|
} else {
|
|
8300
|
-
|
|
8293
|
+
t19 = $[43];
|
|
8301
8294
|
}
|
|
8302
|
-
let
|
|
8303
|
-
if ($[
|
|
8304
|
-
|
|
8305
|
-
$[
|
|
8306
|
-
$[
|
|
8295
|
+
let t20;
|
|
8296
|
+
if ($[44] !== onContinue) {
|
|
8297
|
+
t20 = /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => onContinue(), className: "my-2", children: "Continue from scratch" }) });
|
|
8298
|
+
$[44] = onContinue;
|
|
8299
|
+
$[45] = t20;
|
|
8307
8300
|
} else {
|
|
8308
|
-
|
|
8301
|
+
t20 = $[45];
|
|
8309
8302
|
}
|
|
8310
|
-
let
|
|
8311
|
-
if ($[
|
|
8312
|
-
|
|
8303
|
+
let t21;
|
|
8304
|
+
if ($[46] !== t18 || $[47] !== t19 || $[48] !== t20 || $[49] !== t4 || $[50] !== t8) {
|
|
8305
|
+
t21 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
|
|
8313
8306
|
t3,
|
|
8314
8307
|
t4,
|
|
8315
|
-
|
|
8308
|
+
t8,
|
|
8309
|
+
t18,
|
|
8316
8310
|
t19,
|
|
8317
|
-
t20
|
|
8318
|
-
t21
|
|
8311
|
+
t20
|
|
8319
8312
|
] }) });
|
|
8320
|
-
$[
|
|
8321
|
-
$[
|
|
8322
|
-
$[
|
|
8323
|
-
$[
|
|
8324
|
-
$[
|
|
8325
|
-
$[
|
|
8313
|
+
$[46] = t18;
|
|
8314
|
+
$[47] = t19;
|
|
8315
|
+
$[48] = t20;
|
|
8316
|
+
$[49] = t4;
|
|
8317
|
+
$[50] = t8;
|
|
8318
|
+
$[51] = t21;
|
|
8326
8319
|
} else {
|
|
8327
|
-
|
|
8320
|
+
t21 = $[51];
|
|
8328
8321
|
}
|
|
8329
|
-
return
|
|
8322
|
+
return t21;
|
|
8330
8323
|
}
|
|
8331
8324
|
function TemplateButton(t0) {
|
|
8332
8325
|
const $ = reactCompilerRuntime.c(10);
|
|
@@ -9540,7 +9533,7 @@
|
|
|
9540
9533
|
const ConfigControllerContext = React.createContext({});
|
|
9541
9534
|
const CollectionEditorContext = React.createContext({});
|
|
9542
9535
|
const ConfigControllerProvider = React.memo(function ConfigControllerProvider2(t0) {
|
|
9543
|
-
const $ = reactCompilerRuntime.c(
|
|
9536
|
+
const $ = reactCompilerRuntime.c(65);
|
|
9544
9537
|
const {
|
|
9545
9538
|
children,
|
|
9546
9539
|
collectionConfigController,
|
|
@@ -9548,7 +9541,6 @@
|
|
|
9548
9541
|
reservedGroups,
|
|
9549
9542
|
collectionInference,
|
|
9550
9543
|
extraView,
|
|
9551
|
-
getPathSuggestions,
|
|
9552
9544
|
getUser,
|
|
9553
9545
|
getData,
|
|
9554
9546
|
onAnalyticsEvent
|
|
@@ -9669,26 +9661,24 @@
|
|
|
9669
9661
|
const createCollection = t3;
|
|
9670
9662
|
const t4 = configPermissions ?? defaultConfigPermissions;
|
|
9671
9663
|
let t5;
|
|
9672
|
-
if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !==
|
|
9664
|
+
if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !== t4) {
|
|
9673
9665
|
t5 = {
|
|
9674
9666
|
editCollection,
|
|
9675
9667
|
createCollection,
|
|
9676
9668
|
editProperty,
|
|
9677
|
-
configPermissions: t4
|
|
9678
|
-
getPathSuggestions
|
|
9669
|
+
configPermissions: t4
|
|
9679
9670
|
};
|
|
9680
9671
|
$[6] = createCollection;
|
|
9681
9672
|
$[7] = editCollection;
|
|
9682
9673
|
$[8] = editProperty;
|
|
9683
|
-
$[9] =
|
|
9684
|
-
$[10] =
|
|
9685
|
-
$[11] = t5;
|
|
9674
|
+
$[9] = t4;
|
|
9675
|
+
$[10] = t5;
|
|
9686
9676
|
} else {
|
|
9687
|
-
t5 = $[
|
|
9677
|
+
t5 = $[10];
|
|
9688
9678
|
}
|
|
9689
9679
|
const t6 = Boolean(currentDialog);
|
|
9690
9680
|
let t7;
|
|
9691
|
-
if ($[
|
|
9681
|
+
if ($[11] !== currentDialog || $[12] !== navigate || $[13] !== navigation) {
|
|
9692
9682
|
t7 = (collection_0) => {
|
|
9693
9683
|
if (currentDialog?.redirect) {
|
|
9694
9684
|
if (collection_0 && currentDialog?.isNewCollection && !currentDialog.parentCollectionIds.length) {
|
|
@@ -9698,29 +9688,28 @@
|
|
|
9698
9688
|
}
|
|
9699
9689
|
setCurrentDialog(void 0);
|
|
9700
9690
|
};
|
|
9701
|
-
$[
|
|
9702
|
-
$[
|
|
9703
|
-
$[
|
|
9704
|
-
$[
|
|
9691
|
+
$[11] = currentDialog;
|
|
9692
|
+
$[12] = navigate;
|
|
9693
|
+
$[13] = navigation;
|
|
9694
|
+
$[14] = t7;
|
|
9705
9695
|
} else {
|
|
9706
|
-
t7 = $[
|
|
9696
|
+
t7 = $[14];
|
|
9707
9697
|
}
|
|
9708
9698
|
let t8;
|
|
9709
|
-
if ($[
|
|
9710
|
-
t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView,
|
|
9711
|
-
$[
|
|
9712
|
-
$[
|
|
9713
|
-
$[
|
|
9714
|
-
$[
|
|
9715
|
-
$[
|
|
9716
|
-
$[
|
|
9717
|
-
$[
|
|
9718
|
-
$[
|
|
9719
|
-
$[
|
|
9720
|
-
$[
|
|
9721
|
-
$[26] = t8;
|
|
9699
|
+
if ($[15] !== collectionConfigController || $[16] !== collectionInference || $[17] !== currentDialog || $[18] !== extraView || $[19] !== getData || $[20] !== getUser || $[21] !== reservedGroups || $[22] !== t6 || $[23] !== t7) {
|
|
9700
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, getUser, handleClose: t7 });
|
|
9701
|
+
$[15] = collectionConfigController;
|
|
9702
|
+
$[16] = collectionInference;
|
|
9703
|
+
$[17] = currentDialog;
|
|
9704
|
+
$[18] = extraView;
|
|
9705
|
+
$[19] = getData;
|
|
9706
|
+
$[20] = getUser;
|
|
9707
|
+
$[21] = reservedGroups;
|
|
9708
|
+
$[22] = t6;
|
|
9709
|
+
$[23] = t7;
|
|
9710
|
+
$[24] = t8;
|
|
9722
9711
|
} else {
|
|
9723
|
-
t8 = $[
|
|
9712
|
+
t8 = $[24];
|
|
9724
9713
|
}
|
|
9725
9714
|
const t9 = Boolean(currentPropertyDialog);
|
|
9726
9715
|
const t10 = Boolean(currentPropertyDialog?.propertyKey);
|
|
@@ -9728,21 +9717,21 @@
|
|
|
9728
9717
|
const t12 = !currentPropertyDialog ? false : !currentPropertyDialog?.propertyKey;
|
|
9729
9718
|
const t13 = currentPropertyDialog?.collectionEditable ?? false;
|
|
9730
9719
|
let t14;
|
|
9731
|
-
if ($[
|
|
9720
|
+
if ($[25] !== currentPropertyDialog || $[26] !== getData || $[27] !== navigation) {
|
|
9732
9721
|
t14 = getData && currentPropertyDialog?.editedCollectionId ? () => {
|
|
9733
9722
|
console.debug("get data for property", currentPropertyDialog?.editedCollectionId);
|
|
9734
9723
|
const resolvedPath = navigation.resolveIdsFrom(currentPropertyDialog.editedCollectionId);
|
|
9735
9724
|
return getData(resolvedPath, []);
|
|
9736
9725
|
} : void 0;
|
|
9737
|
-
$[
|
|
9738
|
-
$[
|
|
9739
|
-
$[
|
|
9740
|
-
$[
|
|
9726
|
+
$[25] = currentPropertyDialog;
|
|
9727
|
+
$[26] = getData;
|
|
9728
|
+
$[27] = navigation;
|
|
9729
|
+
$[28] = t14;
|
|
9741
9730
|
} else {
|
|
9742
|
-
t14 = $[
|
|
9731
|
+
t14 = $[28];
|
|
9743
9732
|
}
|
|
9744
9733
|
let t15;
|
|
9745
|
-
if ($[
|
|
9734
|
+
if ($[29] !== collectionConfigController || $[30] !== currentPropertyDialog || $[31] !== snackbarController) {
|
|
9746
9735
|
t15 = (t162) => {
|
|
9747
9736
|
const {
|
|
9748
9737
|
id: id_0,
|
|
@@ -9771,15 +9760,15 @@
|
|
|
9771
9760
|
return false;
|
|
9772
9761
|
});
|
|
9773
9762
|
};
|
|
9774
|
-
$[
|
|
9775
|
-
$[
|
|
9776
|
-
$[
|
|
9777
|
-
$[
|
|
9763
|
+
$[29] = collectionConfigController;
|
|
9764
|
+
$[30] = currentPropertyDialog;
|
|
9765
|
+
$[31] = snackbarController;
|
|
9766
|
+
$[32] = t15;
|
|
9778
9767
|
} else {
|
|
9779
|
-
t15 = $[
|
|
9768
|
+
t15 = $[32];
|
|
9780
9769
|
}
|
|
9781
9770
|
let t16;
|
|
9782
|
-
if ($[
|
|
9771
|
+
if ($[33] !== collectionConfigController || $[34] !== currentPropertyDialog?.currentPropertiesOrder || $[35] !== currentPropertyDialog?.editedCollectionId || $[36] !== currentPropertyDialog?.namespace || $[37] !== currentPropertyDialog?.parentCollectionIds || $[38] !== currentPropertyDialog?.propertyKey || $[39] !== snackbarController) {
|
|
9783
9772
|
t16 = () => {
|
|
9784
9773
|
if (!currentPropertyDialog?.propertyKey) {
|
|
9785
9774
|
return;
|
|
@@ -9802,21 +9791,21 @@
|
|
|
9802
9791
|
return false;
|
|
9803
9792
|
});
|
|
9804
9793
|
};
|
|
9805
|
-
$[
|
|
9806
|
-
$[
|
|
9807
|
-
$[
|
|
9808
|
-
$[
|
|
9809
|
-
$[
|
|
9810
|
-
$[
|
|
9811
|
-
$[
|
|
9812
|
-
$[
|
|
9794
|
+
$[33] = collectionConfigController;
|
|
9795
|
+
$[34] = currentPropertyDialog?.currentPropertiesOrder;
|
|
9796
|
+
$[35] = currentPropertyDialog?.editedCollectionId;
|
|
9797
|
+
$[36] = currentPropertyDialog?.namespace;
|
|
9798
|
+
$[37] = currentPropertyDialog?.parentCollectionIds;
|
|
9799
|
+
$[38] = currentPropertyDialog?.propertyKey;
|
|
9800
|
+
$[39] = snackbarController;
|
|
9801
|
+
$[40] = t16;
|
|
9813
9802
|
} else {
|
|
9814
|
-
t16 = $[
|
|
9803
|
+
t16 = $[40];
|
|
9815
9804
|
}
|
|
9816
9805
|
let t17;
|
|
9817
9806
|
let t18;
|
|
9818
9807
|
let t19;
|
|
9819
|
-
if ($[
|
|
9808
|
+
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9820
9809
|
t17 = () => {
|
|
9821
9810
|
setCurrentPropertyDialog(void 0);
|
|
9822
9811
|
};
|
|
@@ -9824,64 +9813,64 @@
|
|
|
9824
9813
|
setCurrentPropertyDialog(void 0);
|
|
9825
9814
|
};
|
|
9826
9815
|
t19 = {};
|
|
9827
|
-
$[
|
|
9828
|
-
$[
|
|
9829
|
-
$[
|
|
9816
|
+
$[41] = t17;
|
|
9817
|
+
$[42] = t18;
|
|
9818
|
+
$[43] = t19;
|
|
9830
9819
|
} else {
|
|
9831
|
-
t17 = $[
|
|
9832
|
-
t18 = $[
|
|
9833
|
-
t19 = $[
|
|
9820
|
+
t17 = $[41];
|
|
9821
|
+
t18 = $[42];
|
|
9822
|
+
t19 = $[43];
|
|
9834
9823
|
}
|
|
9835
9824
|
let t20;
|
|
9836
|
-
if ($[
|
|
9825
|
+
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9837
9826
|
t20 = [];
|
|
9838
|
-
$[
|
|
9827
|
+
$[44] = t20;
|
|
9839
9828
|
} else {
|
|
9840
|
-
t20 = $[
|
|
9829
|
+
t20 = $[44];
|
|
9841
9830
|
}
|
|
9842
9831
|
const t21 = currentPropertyDialog?.property;
|
|
9843
9832
|
const t22 = currentPropertyDialog?.propertyKey;
|
|
9844
9833
|
let t23;
|
|
9845
|
-
if ($[
|
|
9834
|
+
if ($[45] !== propertyConfigs || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== t14 || $[51] !== t15 || $[52] !== t16 || $[53] !== t21 || $[54] !== t22 || $[55] !== t9) {
|
|
9846
9835
|
t23 = /* @__PURE__ */ jsxRuntime.jsx(PropertyFormDialog, { open: t9, includeIdAndName: true, existingProperty: t10, autoUpdateId: t11, autoOpenTypeSelect: t12, inArray: false, collectionEditable: t13, getData: t14, onPropertyChanged: t15, onPropertyChangedImmediate: false, onDelete: t16, onError: _temp2, onOkClicked: t17, onCancel: t18, initialErrors: t19, forceShowErrors: false, existingPropertyKeys: t20, allowDataInference: true, propertyConfigs, property: t21, propertyKey: t22 });
|
|
9847
|
-
$[
|
|
9848
|
-
$[
|
|
9849
|
-
$[
|
|
9850
|
-
$[
|
|
9851
|
-
$[
|
|
9852
|
-
$[
|
|
9853
|
-
$[
|
|
9854
|
-
$[
|
|
9855
|
-
$[
|
|
9856
|
-
$[
|
|
9857
|
-
$[
|
|
9858
|
-
$[
|
|
9859
|
-
} else {
|
|
9860
|
-
t23 = $[
|
|
9836
|
+
$[45] = propertyConfigs;
|
|
9837
|
+
$[46] = t10;
|
|
9838
|
+
$[47] = t11;
|
|
9839
|
+
$[48] = t12;
|
|
9840
|
+
$[49] = t13;
|
|
9841
|
+
$[50] = t14;
|
|
9842
|
+
$[51] = t15;
|
|
9843
|
+
$[52] = t16;
|
|
9844
|
+
$[53] = t21;
|
|
9845
|
+
$[54] = t22;
|
|
9846
|
+
$[55] = t9;
|
|
9847
|
+
$[56] = t23;
|
|
9848
|
+
} else {
|
|
9849
|
+
t23 = $[56];
|
|
9861
9850
|
}
|
|
9862
9851
|
let t24;
|
|
9863
|
-
if ($[
|
|
9852
|
+
if ($[57] !== children || $[58] !== t23 || $[59] !== t5 || $[60] !== t8) {
|
|
9864
9853
|
t24 = /* @__PURE__ */ jsxRuntime.jsxs(CollectionEditorContext.Provider, { value: t5, children: [
|
|
9865
9854
|
children,
|
|
9866
9855
|
t8,
|
|
9867
9856
|
t23
|
|
9868
9857
|
] });
|
|
9869
|
-
$[
|
|
9870
|
-
$[
|
|
9871
|
-
$[
|
|
9872
|
-
$[
|
|
9873
|
-
$[
|
|
9858
|
+
$[57] = children;
|
|
9859
|
+
$[58] = t23;
|
|
9860
|
+
$[59] = t5;
|
|
9861
|
+
$[60] = t8;
|
|
9862
|
+
$[61] = t24;
|
|
9874
9863
|
} else {
|
|
9875
|
-
t24 = $[
|
|
9864
|
+
t24 = $[61];
|
|
9876
9865
|
}
|
|
9877
9866
|
let t25;
|
|
9878
|
-
if ($[
|
|
9867
|
+
if ($[62] !== collectionConfigController || $[63] !== t24) {
|
|
9879
9868
|
t25 = /* @__PURE__ */ jsxRuntime.jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
|
|
9880
|
-
$[
|
|
9881
|
-
$[
|
|
9882
|
-
$[
|
|
9869
|
+
$[62] = collectionConfigController;
|
|
9870
|
+
$[63] = t24;
|
|
9871
|
+
$[64] = t25;
|
|
9883
9872
|
} else {
|
|
9884
|
-
t25 = $[
|
|
9873
|
+
t25 = $[64];
|
|
9885
9874
|
}
|
|
9886
9875
|
return t25;
|
|
9887
9876
|
}, equal);
|
|
@@ -10496,21 +10485,22 @@
|
|
|
10496
10485
|
return t8;
|
|
10497
10486
|
}
|
|
10498
10487
|
function useCollectionEditorPlugin(t0) {
|
|
10499
|
-
const $ = reactCompilerRuntime.c(
|
|
10488
|
+
const $ = reactCompilerRuntime.c(19);
|
|
10500
10489
|
const {
|
|
10501
10490
|
collectionConfigController,
|
|
10502
10491
|
configPermissions,
|
|
10503
10492
|
reservedGroups,
|
|
10504
10493
|
extraView,
|
|
10505
|
-
getPathSuggestions,
|
|
10506
10494
|
getUser,
|
|
10507
10495
|
collectionInference,
|
|
10508
10496
|
getData,
|
|
10509
|
-
onAnalyticsEvent
|
|
10497
|
+
onAnalyticsEvent,
|
|
10498
|
+
includeIntroView: t1
|
|
10510
10499
|
} = t0;
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10500
|
+
const includeIntroView = t1 === void 0 ? true : t1;
|
|
10501
|
+
let t2;
|
|
10502
|
+
if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getUser || $[6] !== onAnalyticsEvent || $[7] !== reservedGroups) {
|
|
10503
|
+
t2 = {
|
|
10514
10504
|
Component: ConfigControllerProvider,
|
|
10515
10505
|
props: {
|
|
10516
10506
|
collectionConfigController,
|
|
@@ -10518,7 +10508,6 @@
|
|
|
10518
10508
|
collectionInference,
|
|
10519
10509
|
reservedGroups,
|
|
10520
10510
|
extraView,
|
|
10521
|
-
getPathSuggestions,
|
|
10522
10511
|
getUser,
|
|
10523
10512
|
getData,
|
|
10524
10513
|
onAnalyticsEvent
|
|
@@ -10529,53 +10518,72 @@
|
|
|
10529
10518
|
$[2] = configPermissions;
|
|
10530
10519
|
$[3] = extraView;
|
|
10531
10520
|
$[4] = getData;
|
|
10532
|
-
$[5] =
|
|
10533
|
-
$[6] =
|
|
10534
|
-
$[7] =
|
|
10535
|
-
$[8] =
|
|
10536
|
-
$[9] = t1;
|
|
10521
|
+
$[5] = getUser;
|
|
10522
|
+
$[6] = onAnalyticsEvent;
|
|
10523
|
+
$[7] = reservedGroups;
|
|
10524
|
+
$[8] = t2;
|
|
10537
10525
|
} else {
|
|
10538
|
-
|
|
10526
|
+
t2 = $[8];
|
|
10539
10527
|
}
|
|
10540
|
-
let t2;
|
|
10541
10528
|
let t3;
|
|
10542
|
-
if ($[
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10529
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10530
|
+
t3 = /* @__PURE__ */ jsxRuntime.jsx(NewCollectionButton, {});
|
|
10531
|
+
$[9] = t3;
|
|
10532
|
+
} else {
|
|
10533
|
+
t3 = $[9];
|
|
10534
|
+
}
|
|
10535
|
+
let t4;
|
|
10536
|
+
if ($[10] !== includeIntroView) {
|
|
10537
|
+
t4 = includeIntroView ? /* @__PURE__ */ jsxRuntime.jsx(IntroWidget, {}) : void 0;
|
|
10538
|
+
$[10] = includeIntroView;
|
|
10539
|
+
$[11] = t4;
|
|
10540
|
+
} else {
|
|
10541
|
+
t4 = $[11];
|
|
10542
|
+
}
|
|
10543
|
+
let t5;
|
|
10544
|
+
if ($[12] !== t4) {
|
|
10545
|
+
t5 = {
|
|
10546
|
+
additionalActions: t3,
|
|
10547
|
+
additionalChildrenStart: t4,
|
|
10546
10548
|
CollectionActions: HomePageEditorCollectionAction,
|
|
10547
10549
|
AdditionalCards: NewCollectionCard
|
|
10548
10550
|
};
|
|
10549
|
-
|
|
10551
|
+
$[12] = t4;
|
|
10552
|
+
$[13] = t5;
|
|
10553
|
+
} else {
|
|
10554
|
+
t5 = $[13];
|
|
10555
|
+
}
|
|
10556
|
+
let t6;
|
|
10557
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10558
|
+
t6 = {
|
|
10550
10559
|
CollectionActionsStart: EditorCollectionActionStart,
|
|
10551
10560
|
CollectionActions: EditorCollectionAction,
|
|
10552
10561
|
HeaderAction: CollectionViewHeaderAction,
|
|
10553
10562
|
AddColumnComponent: PropertyAddColumnComponent
|
|
10554
10563
|
};
|
|
10555
|
-
$[
|
|
10556
|
-
$[11] = t3;
|
|
10564
|
+
$[14] = t6;
|
|
10557
10565
|
} else {
|
|
10558
|
-
|
|
10559
|
-
t3 = $[11];
|
|
10566
|
+
t6 = $[14];
|
|
10560
10567
|
}
|
|
10561
|
-
let
|
|
10562
|
-
if ($[
|
|
10563
|
-
|
|
10568
|
+
let t7;
|
|
10569
|
+
if ($[15] !== collectionConfigController.loading || $[16] !== t2 || $[17] !== t5) {
|
|
10570
|
+
t7 = {
|
|
10564
10571
|
key: "collection_editor",
|
|
10565
10572
|
loading: collectionConfigController.loading,
|
|
10566
|
-
provider:
|
|
10567
|
-
homePage:
|
|
10568
|
-
collectionView:
|
|
10573
|
+
provider: t2,
|
|
10574
|
+
homePage: t5,
|
|
10575
|
+
collectionView: t6
|
|
10569
10576
|
};
|
|
10570
|
-
$[
|
|
10571
|
-
$[
|
|
10572
|
-
$[
|
|
10577
|
+
$[15] = collectionConfigController.loading;
|
|
10578
|
+
$[16] = t2;
|
|
10579
|
+
$[17] = t5;
|
|
10580
|
+
$[18] = t7;
|
|
10573
10581
|
} else {
|
|
10574
|
-
|
|
10582
|
+
t7 = $[18];
|
|
10575
10583
|
}
|
|
10576
|
-
return
|
|
10584
|
+
return t7;
|
|
10577
10585
|
}
|
|
10578
|
-
function IntroWidget(
|
|
10586
|
+
function IntroWidget() {
|
|
10579
10587
|
const $ = reactCompilerRuntime.c(11);
|
|
10580
10588
|
const navigation = core.useNavigationController();
|
|
10581
10589
|
if (!navigation.topLevelNavigation) {
|
|
@@ -10583,35 +10591,35 @@
|
|
|
10583
10591
|
}
|
|
10584
10592
|
const authController = core.useAuthController();
|
|
10585
10593
|
const collectionEditorController = useCollectionEditorController();
|
|
10586
|
-
let
|
|
10594
|
+
let t0;
|
|
10587
10595
|
if ($[0] !== authController || $[1] !== collectionEditorController) {
|
|
10588
|
-
|
|
10596
|
+
t0 = collectionEditorController.configPermissions ? collectionEditorController.configPermissions({
|
|
10589
10597
|
user: authController.user
|
|
10590
10598
|
}).createCollections : true;
|
|
10591
10599
|
$[0] = authController;
|
|
10592
10600
|
$[1] = collectionEditorController;
|
|
10593
|
-
$[2] =
|
|
10601
|
+
$[2] = t0;
|
|
10594
10602
|
} else {
|
|
10595
|
-
|
|
10603
|
+
t0 = $[2];
|
|
10596
10604
|
}
|
|
10597
|
-
const canCreateCollections =
|
|
10605
|
+
const canCreateCollections = t0;
|
|
10598
10606
|
if (!navigation.initialised || (navigation.collections ?? []).length > 0) {
|
|
10599
10607
|
return null;
|
|
10600
10608
|
}
|
|
10609
|
+
let t1;
|
|
10601
10610
|
let t2;
|
|
10602
|
-
let t3;
|
|
10603
10611
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
$[3] =
|
|
10607
|
-
$[4] =
|
|
10612
|
+
t1 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "uppercase", children: "No collections found" });
|
|
10613
|
+
t2 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { children: "Start building collections in FireCMS easily. Map them to your existing database data, import from files, or use our templates." });
|
|
10614
|
+
$[3] = t1;
|
|
10615
|
+
$[4] = t2;
|
|
10608
10616
|
} else {
|
|
10609
|
-
|
|
10610
|
-
|
|
10617
|
+
t1 = $[3];
|
|
10618
|
+
t2 = $[4];
|
|
10611
10619
|
}
|
|
10612
|
-
let
|
|
10620
|
+
let t3;
|
|
10613
10621
|
if ($[5] !== canCreateCollections || $[6] !== collectionEditorController) {
|
|
10614
|
-
|
|
10622
|
+
t3 = canCreateCollections && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: collectionEditorController && canCreateCollections ? () => collectionEditorController.createCollection({
|
|
10615
10623
|
parentCollectionIds: [],
|
|
10616
10624
|
redirect: true,
|
|
10617
10625
|
sourceClick: "new_collection_card"
|
|
@@ -10621,31 +10629,31 @@
|
|
|
10621
10629
|
] });
|
|
10622
10630
|
$[5] = canCreateCollections;
|
|
10623
10631
|
$[6] = collectionEditorController;
|
|
10624
|
-
$[7] =
|
|
10632
|
+
$[7] = t3;
|
|
10625
10633
|
} else {
|
|
10626
|
-
|
|
10634
|
+
t3 = $[7];
|
|
10627
10635
|
}
|
|
10628
|
-
let
|
|
10636
|
+
let t4;
|
|
10629
10637
|
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10630
|
-
|
|
10631
|
-
$[8] =
|
|
10638
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { color: "secondary", children: "You can also define collections programmatically." });
|
|
10639
|
+
$[8] = t4;
|
|
10632
10640
|
} else {
|
|
10633
|
-
|
|
10641
|
+
t4 = $[8];
|
|
10634
10642
|
}
|
|
10635
|
-
let
|
|
10636
|
-
if ($[9] !==
|
|
10637
|
-
|
|
10643
|
+
let t5;
|
|
10644
|
+
if ($[9] !== t3) {
|
|
10645
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Paper, { className: "my-4 px-4 py-6 flex flex-col bg-white dark:bg-surface-accent-800 gap-2", children: [
|
|
10646
|
+
t1,
|
|
10638
10647
|
t2,
|
|
10639
10648
|
t3,
|
|
10640
|
-
t4
|
|
10641
|
-
t5
|
|
10649
|
+
t4
|
|
10642
10650
|
] });
|
|
10643
|
-
$[9] =
|
|
10644
|
-
$[10] =
|
|
10651
|
+
$[9] = t3;
|
|
10652
|
+
$[10] = t5;
|
|
10645
10653
|
} else {
|
|
10646
|
-
|
|
10654
|
+
t5 = $[10];
|
|
10647
10655
|
}
|
|
10648
|
-
return
|
|
10656
|
+
return t5;
|
|
10649
10657
|
}
|
|
10650
10658
|
const mergeCollections = (baseCollections, backendCollections = [], modifyCollection) => {
|
|
10651
10659
|
const markAsEditable = (c) => {
|