@firecms/collection_editor 3.0.0-canary.258 → 3.0.0-canary.259

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/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
- import { toSnakeCase, singular, IconForView, FieldCaption, SearchIconsView, ArrayContainer, serializeRegExp, useSnackbarController, resolveEnumValues, isPropertyBuilder, useCustomizationController, getFieldConfig, ErrorBoundary, PropertyConfigBadge, unslugify, useNavigationController, mergeDeep, DEFAULT_FIELD_CONFIGS, getFieldId, isValidRegExp, ConfirmationDialog, isEmptyObject, useLargeLayout, makePropertiesEditable, resolveEntityView, useAuthController, useSelectionController, CircularProgressCenter, EntityCollectionTable, slugify, randomString, removeUndefined, ErrorView, removeInitialAndTrailingSlashes, getDefaultPropertiesOrder, joinCollectionLists } from "@firecms/core";
3
+ import { toSnakeCase, singular, IconForView, FieldCaption, SearchIconsView, ArrayContainer, serializeRegExp, useSnackbarController, resolveEnumValues, isPropertyBuilder, useCustomizationController, getFieldConfig, ErrorBoundary, PropertyConfigBadge, unslugify, useNavigationController, mergeDeep, DEFAULT_FIELD_CONFIGS, getFieldId, isValidRegExp, ConfirmationDialog, isEmptyObject, useLargeLayout, makePropertiesEditable, resolveEntityView, useAuthController, useSelectionController, CircularProgressCenter, EntityCollectionTable, slugify, resolveEntityAction, randomString, removeUndefined, ErrorView, removeInitialAndTrailingSlashes, getDefaultPropertiesOrder, joinCollectionLists } from "@firecms/core";
4
4
  import * as React from "react";
5
5
  import React__default, { useContext, useState, useEffect, useMemo, useRef, useDeferredValue } from "react";
6
6
  import equal from "react-fast-compare";
@@ -704,14 +704,14 @@ function CollectionDetailsForm(t0) {
704
704
  const t76 = values.defaultSize ?? "";
705
705
  let t77;
706
706
  if ($[119] === Symbol.for("react.memo_cache_sentinel")) {
707
- t77 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
707
+ t77 = ["xs", "s", "m", "l", "xl"].map(_temp2$8);
708
708
  $[119] = t77;
709
709
  } else {
710
710
  t77 = $[119];
711
711
  }
712
712
  let t78;
713
713
  if ($[120] !== handleChange || $[121] !== t76) {
714
- t78 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(Select, { name: "defaultSize", size: "large", fullWidth: true, label: "Default row size", position: "item-aligned", onChange: handleChange, value: t76, renderValue: _temp$b, children: t77 }) });
714
+ t78 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(Select, { name: "defaultSize", size: "large", fullWidth: true, label: "Default row size", position: "item-aligned", onChange: handleChange, value: t76, renderValue: _temp$c, children: t77 }) });
715
715
  $[120] = handleChange;
716
716
  $[121] = t76;
717
717
  $[122] = t78;
@@ -788,7 +788,7 @@ function CollectionDetailsForm(t0) {
788
788
  }
789
789
  let t91;
790
790
  if ($[137] !== t85 || $[138] !== t86 || $[139] !== t87) {
791
- t91 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxs(Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t85, onValueChange: t86, value: t87, renderValue: _temp3$4, children: [
791
+ t91 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxs(Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t85, onValueChange: t86, value: t87, renderValue: _temp3$5, children: [
792
792
  t88,
793
793
  t89,
794
794
  t90
@@ -993,7 +993,7 @@ function CollectionDetailsForm(t0) {
993
993
  }
994
994
  return t111;
995
995
  }
996
- function _temp3$4(value_3) {
996
+ function _temp3$5(value_3) {
997
997
  if (value_3 === "code_defined") {
998
998
  return "Code defined";
999
999
  } else {
@@ -1008,10 +1008,10 @@ function _temp3$4(value_3) {
1008
1008
  }
1009
1009
  }
1010
1010
  }
1011
- function _temp2$7(value_2) {
1011
+ function _temp2$8(value_2) {
1012
1012
  return /* @__PURE__ */ jsx(SelectItem, { value: value_2, children: value_2.toUpperCase() }, `size-select-${value_2}`);
1013
1013
  }
1014
- function _temp$b(value_1) {
1014
+ function _temp$c(value_1) {
1015
1015
  return value_1.toUpperCase();
1016
1016
  }
1017
1017
  function DefaultDatabaseField(t0) {
@@ -1236,7 +1236,7 @@ function EnumFormFields(t0) {
1236
1236
  inferredValues.add(enumValue_0.id);
1237
1237
  });
1238
1238
  setFieldValue(enumValuesPath, [...newEnumValues, ...currentEnumValues], true);
1239
- }).catch(_temp$a).finally(() => setInferring(false));
1239
+ }).catch(_temp$b).finally(() => setInferring(false));
1240
1240
  };
1241
1241
  $[8] = enumValuesPath;
1242
1242
  $[9] = getData;
@@ -1359,7 +1359,7 @@ function EnumFormFields(t0) {
1359
1359
  }
1360
1360
  return t15;
1361
1361
  }
1362
- function _temp$a(e) {
1362
+ function _temp$b(e) {
1363
1363
  console.error(e);
1364
1364
  }
1365
1365
  const EnumEntry = React__default.memo(function EnumEntryInternal(t0) {
@@ -2148,7 +2148,7 @@ function StoragePropertyField(t0) {
2148
2148
  t192 = $[42];
2149
2149
  }
2150
2150
  if ($[43] !== acceptedFiles || $[44] !== disabled || $[45] !== handleTypesChange || $[46] !== t172 || $[47] !== t182 || $[48] !== t192) {
2151
- t10 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(MultiSelect, { className: "w-full", placeholder: "All file types allowed", disabled, name: acceptedFiles, value: t172, onValueChange: handleTypesChange, label: t182, renderValues: _temp3$3, children: t192 }) });
2151
+ t10 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(MultiSelect, { className: "w-full", placeholder: "All file types allowed", disabled, name: acceptedFiles, value: t172, onValueChange: handleTypesChange, label: t182, renderValues: _temp3$4, children: t192 }) });
2152
2152
  $[43] = acceptedFiles;
2153
2153
  $[44] = disabled;
2154
2154
  $[45] = handleTypesChange;
@@ -2411,16 +2411,16 @@ function StoragePropertyField(t0) {
2411
2411
  }
2412
2412
  return t24;
2413
2413
  }
2414
- function _temp3$3(selected) {
2414
+ function _temp3$4(selected) {
2415
2415
  if (!selected || selected.length === 0) {
2416
2416
  return "All file types allowed";
2417
2417
  }
2418
- return selected.map(_temp$9).filter(_temp2$6).join(", ");
2418
+ return selected.map(_temp$a).filter(_temp2$7).join(", ");
2419
2419
  }
2420
- function _temp2$6(v_0) {
2420
+ function _temp2$7(v_0) {
2421
2421
  return Boolean(v_0);
2422
2422
  }
2423
- function _temp$9(v) {
2423
+ function _temp$a(v) {
2424
2424
  return fileTypes[v];
2425
2425
  }
2426
2426
  function editableProperty(property) {
@@ -4496,8 +4496,8 @@ function CollectionsSelect(t0) {
4496
4496
  const collections = t1;
4497
4497
  let t2;
4498
4498
  if ($[10] !== collections || $[11] !== disabled || $[12] !== error || $[13] !== handleChange || $[14] !== pathPath || $[15] !== props || $[16] !== value) {
4499
- const groups = Array.from(new Set(Object.values(collections).map(_temp$8).filter(Boolean)).values());
4500
- const ungroupedCollections = collections.filter(_temp2$5);
4499
+ const groups = Array.from(new Set(Object.values(collections).map(_temp$9).filter(Boolean)).values());
4500
+ const ungroupedCollections = collections.filter(_temp2$6);
4501
4501
  let t32;
4502
4502
  if ($[18] !== collections) {
4503
4503
  t32 = (selected) => {
@@ -4528,7 +4528,7 @@ function CollectionsSelect(t0) {
4528
4528
  }
4529
4529
  t2 = /* @__PURE__ */ jsxs(Select, { error: Boolean(error), disabled, value: value ?? "", position: "item-aligned", name: pathPath, size: "large", fullWidth: true, onChange: handleChange, label: "Target collection", renderValue: t32, ...props, children: [
4530
4530
  groups.flatMap(t42),
4531
- ungroupedCollections && /* @__PURE__ */ jsx(SelectGroup, { label: "Views", children: ungroupedCollections.map(_temp3$2) })
4531
+ ungroupedCollections && /* @__PURE__ */ jsx(SelectGroup, { label: "Views", children: ungroupedCollections.map(_temp3$3) })
4532
4532
  ] });
4533
4533
  $[10] = collections;
4534
4534
  $[11] = disabled;
@@ -4561,16 +4561,16 @@ function CollectionsSelect(t0) {
4561
4561
  }
4562
4562
  return t4;
4563
4563
  }
4564
- function _temp3$2(collection_2) {
4564
+ function _temp3$3(collection_2) {
4565
4565
  return /* @__PURE__ */ jsx(SelectItem, { value: collection_2.id ?? collection_2.path, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row", children: [
4566
4566
  /* @__PURE__ */ jsx(IconForView, { collectionOrView: collection_2 }),
4567
4567
  /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "font-medium ml-4", children: collection_2?.name.toUpperCase() })
4568
4568
  ] }) }, collection_2.id ?? collection_2.path);
4569
4569
  }
4570
- function _temp2$5(col) {
4570
+ function _temp2$6(col) {
4571
4571
  return !col.group;
4572
4572
  }
4573
- function _temp$8(e) {
4573
+ function _temp$9(e) {
4574
4574
  return e.group;
4575
4575
  }
4576
4576
  function DateTimePropertyField(t0) {
@@ -4645,7 +4645,7 @@ function DateTimePropertyField(t0) {
4645
4645
  }
4646
4646
  let t10;
4647
4647
  if ($[14] !== disabled || $[15] !== t5 || $[16] !== t6 || $[17] !== t7) {
4648
- t10 = /* @__PURE__ */ jsxs(Select, { name: "mode", value: t5, error: t6, size: "large", onValueChange: t7, label: "Mode", fullWidth: true, renderValue: _temp$7, disabled, children: [
4648
+ t10 = /* @__PURE__ */ jsxs(Select, { name: "mode", value: t5, error: t6, size: "large", onValueChange: t7, label: "Mode", fullWidth: true, renderValue: _temp$8, disabled, children: [
4649
4649
  t8,
4650
4650
  t9
4651
4651
  ] });
@@ -4706,7 +4706,7 @@ function DateTimePropertyField(t0) {
4706
4706
  }
4707
4707
  let t20;
4708
4708
  if ($[30] !== disabled || $[31] !== t14 || $[32] !== t15 || $[33] !== t16) {
4709
- t20 = /* @__PURE__ */ jsxs(Select, { name: "autoValue", disabled, size: "large", fullWidth: true, value: t14, onValueChange: t15, renderValue: _temp2$4, error: t16, label: "Automatic value", children: [
4709
+ t20 = /* @__PURE__ */ jsxs(Select, { name: "autoValue", disabled, size: "large", fullWidth: true, value: t14, onValueChange: t15, renderValue: _temp2$5, error: t16, label: "Automatic value", children: [
4710
4710
  t17,
4711
4711
  t18,
4712
4712
  t19
@@ -4776,7 +4776,7 @@ function DateTimePropertyField(t0) {
4776
4776
  }
4777
4777
  return t27;
4778
4778
  }
4779
- function _temp2$4(v_2) {
4779
+ function _temp2$5(v_2) {
4780
4780
  switch (v_2) {
4781
4781
  case "on_create": {
4782
4782
  return "On create";
@@ -4789,7 +4789,7 @@ function _temp2$4(v_2) {
4789
4789
  }
4790
4790
  }
4791
4791
  }
4792
- function _temp$7(v_0) {
4792
+ function _temp$8(v_0) {
4793
4793
  switch (v_0) {
4794
4794
  case "date_time": {
4795
4795
  return "Date/Time";
@@ -5120,7 +5120,7 @@ function UrlPropertyField(t0) {
5120
5120
  }
5121
5121
  let t8;
5122
5122
  if ($[8] !== disabled || $[9] !== t2 || $[10] !== t3) {
5123
- t8 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxs(Select, { disabled, position: "item-aligned", fullWidth: true, onValueChange: t2, label: "Preview type", renderValue: _temp$6, value: t3, children: [
5123
+ t8 = /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxs(Select, { disabled, position: "item-aligned", fullWidth: true, onValueChange: t2, label: "Preview type", renderValue: _temp$7, value: t3, children: [
5124
5124
  t4,
5125
5125
  t5,
5126
5126
  t6,
@@ -5186,7 +5186,7 @@ function UrlPropertyField(t0) {
5186
5186
  }
5187
5187
  return t13;
5188
5188
  }
5189
- function _temp$6(value_0) {
5189
+ function _temp$7(value_0) {
5190
5190
  switch (value_0) {
5191
5191
  case "image": {
5192
5192
  return "Image";
@@ -5826,7 +5826,7 @@ function PropertyFormDialog(t0) {
5826
5826
  }
5827
5827
  let t7;
5828
5828
  if ($[20] !== onCancel) {
5829
- t7 = onCancel && /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => {
5829
+ t7 = onCancel && /* @__PURE__ */ jsx(Button, { variant: "text", color: "primary", onClick: () => {
5830
5830
  onCancel();
5831
5831
  formexRef.current?.resetForm();
5832
5832
  }, children: "Cancel" });
@@ -6482,7 +6482,7 @@ function WidgetSelectView(t0) {
6482
6482
  let t6;
6483
6483
  if ($[0] !== disabled || $[1] !== existing || $[2] !== inArray || $[3] !== initialProperty || $[4] !== onOpenChange || $[5] !== onValueChange || $[6] !== open || $[7] !== propertyConfigs || $[8] !== value) {
6484
6484
  const allSupportedFields = Object.entries(supportedFields).concat(Object.entries(propertyConfigs));
6485
- const displayedWidgets = (inArray ? allSupportedFields.filter(_temp$5) : allSupportedFields).map(_temp2$3).reduce(_temp3$1, {});
6485
+ const displayedWidgets = (inArray ? allSupportedFields.filter(_temp$6) : allSupportedFields).map(_temp2$4).reduce(_temp3$2, {});
6486
6486
  const key_0 = value;
6487
6487
  const propertyConfig_1 = key_0 ? DEFAULT_FIELD_CONFIGS[key_0] ?? propertyConfigs[key_0] : void 0;
6488
6488
  const baseProperty = propertyConfig_1?.property;
@@ -6664,19 +6664,19 @@ function _temp4$1(key_1) {
6664
6664
  }
6665
6665
  return "Custom/Other";
6666
6666
  }
6667
- function _temp3$1(a, b) {
6667
+ function _temp3$2(a, b) {
6668
6668
  return {
6669
6669
  ...a,
6670
6670
  ...b
6671
6671
  };
6672
6672
  }
6673
- function _temp2$3(t0) {
6673
+ function _temp2$4(t0) {
6674
6674
  const [key, propertyConfig_0] = t0;
6675
6675
  return {
6676
6676
  [key]: propertyConfig_0
6677
6677
  };
6678
6678
  }
6679
- function _temp$5(t0) {
6679
+ function _temp$6(t0) {
6680
6680
  const [, propertyConfig] = t0;
6681
6681
  return !isPropertyBuilder(propertyConfig.property) && propertyConfig.property?.dataType !== "array";
6682
6682
  }
@@ -6824,7 +6824,7 @@ function GetCodeDialog(t0) {
6824
6824
  if ($[3] !== code) {
6825
6825
  t3 = /* @__PURE__ */ jsxs(DialogContent, { children: [
6826
6826
  t2,
6827
- /* @__PURE__ */ jsx(Highlight, { theme: themes.vsDark, code, language: "typescript", children: _temp$4 })
6827
+ /* @__PURE__ */ jsx(Highlight, { theme: themes.vsDark, code, language: "typescript", children: _temp$5 })
6828
6828
  ] });
6829
6829
  $[3] = code;
6830
6830
  $[4] = t3;
@@ -6838,7 +6838,7 @@ function GetCodeDialog(t0) {
6838
6838
  e.preventDefault();
6839
6839
  snackbarController.open({
6840
6840
  type: "success",
6841
- message: `Copied`
6841
+ message: "Copied"
6842
6842
  });
6843
6843
  return navigator.clipboard.writeText(code);
6844
6844
  };
@@ -6857,7 +6857,7 @@ function GetCodeDialog(t0) {
6857
6857
  }
6858
6858
  let t6;
6859
6859
  if ($[9] !== t4) {
6860
- t6 = /* @__PURE__ */ jsxs(Button, { variant: "text", size: "small", onClick: t4, children: [
6860
+ t6 = /* @__PURE__ */ jsxs(Button, { variant: "text", size: "small", color: "primary", onClick: t4, children: [
6861
6861
  t5,
6862
6862
  "Copy to clipboard"
6863
6863
  ] });
@@ -6904,7 +6904,7 @@ function GetCodeDialog(t0) {
6904
6904
  }
6905
6905
  return t9;
6906
6906
  }
6907
- function _temp$4(t0) {
6907
+ function _temp$5(t0) {
6908
6908
  const {
6909
6909
  style,
6910
6910
  tokens,
@@ -7017,6 +7017,7 @@ function CollectionPropertiesEditorForm({
7017
7017
  const inferPropertiesFromData = doCollectionInference ? () => {
7018
7018
  if (!doCollectionInference) return;
7019
7019
  setInferringProperties(true);
7020
+ console.debug("CollectionEditor: inferring properties from data", doCollectionInference, values);
7020
7021
  doCollectionInference(values).then((newCollection) => {
7021
7022
  if (newCollection) makePropertiesEditable(newCollection.properties);
7022
7023
  if (!newCollection) {
@@ -7173,7 +7174,7 @@ function CollectionPropertiesEditorForm({
7173
7174
  /* @__PURE__ */ jsxs("div", { className: "ml-1 mt-2 flex flex-row gap-2", children: [
7174
7175
  /* @__PURE__ */ jsx(Tooltip, { title: "Get the code for this collection", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { variant: "filled", disabled: inferringProperties, onClick: () => setCodeDialogOpen(true), children: /* @__PURE__ */ jsx(CodeIcon, {}) }) }),
7175
7176
  inferPropertiesFromData && /* @__PURE__ */ jsx(Tooltip, { title: "Add new properties based on data", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { variant: "filled", disabled: inferringProperties, onClick: inferPropertiesFromData, children: inferringProperties ? /* @__PURE__ */ jsx(CircularProgress, { size: "small" }) : /* @__PURE__ */ jsx(AutorenewIcon, {}) }) }),
7176
- /* @__PURE__ */ jsx(Tooltip, { title: "Add new property", asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outlined", onClick: () => setNewPropertyDialogOpen(true), children: /* @__PURE__ */ jsx(AddIcon, {}) }) })
7177
+ /* @__PURE__ */ jsx(Tooltip, { title: "Add new property", asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outlined", color: "primary", onClick: () => setNewPropertyDialogOpen(true), children: /* @__PURE__ */ jsx(AddIcon, {}) }) })
7177
7178
  ] })
7178
7179
  ] }),
7179
7180
  /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyTree, { className: "pl-8", inferredPropertyKeys, selectedPropertyKey: selectedPropertyKey ? getFullId(selectedPropertyKey, selectedPropertyNamespace) : void 0, properties: values.properties, additionalFields: values.additionalFields, propertiesOrder: usedPropertiesOrder, onPropertyClick, onPropertyMove, onPropertyRemove: isNewCollection ? deleteProperty : void 0, collectionEditable, errors }) }),
@@ -7183,7 +7184,7 @@ function CollectionPropertiesEditorForm({
7183
7184
  selectedPropertyFullId && selectedProperty && !isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsx(PropertyForm, { inArray: false, existingProperty: !isNewCollection, autoUpdateId: false, allowDataInference: !isNewCollection, autoOpenTypeSelect: false, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: selectedProperty, onPropertyChanged, onDelete: deleteProperty, onError: onPropertyErrorInternal, forceShowErrors: showErrors, initialErrors, getData, propertyConfigs, collectionEditable }, `edit_view_${selectedPropertyIndex}`),
7184
7185
  !selectedProperty && /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col items-center justify-center h-full gap-4", children: [
7185
7186
  /* @__PURE__ */ jsx(Typography, { variant: "label", className: "", children: emptyCollection ? "Now you can add your first property" : "Select a property to edit it" }),
7186
- /* @__PURE__ */ jsxs(Button, { variant: "outlined", onClick: () => setNewPropertyDialogOpen(true), children: [
7187
+ /* @__PURE__ */ jsxs(Button, { variant: "outlined", color: "primary", onClick: () => setNewPropertyDialogOpen(true), children: [
7187
7188
  /* @__PURE__ */ jsx(AddIcon, {}),
7188
7189
  "Add new property"
7189
7190
  ] })
@@ -7253,7 +7254,7 @@ function UnsavedChangesDialog(t0) {
7253
7254
  }
7254
7255
  let t7;
7255
7256
  if ($[10] !== handleCancel) {
7256
- t7 = /* @__PURE__ */ jsx(Button, { variant: "text", onClick: handleCancel, autoFocus: true, children: " Cancel " });
7257
+ t7 = /* @__PURE__ */ jsx(Button, { variant: "text", color: "primary", onClick: handleCancel, autoFocus: true, children: " Cancel " });
7257
7258
  $[10] = handleCancel;
7258
7259
  $[11] = t7;
7259
7260
  } else {
@@ -7261,7 +7262,7 @@ function UnsavedChangesDialog(t0) {
7261
7262
  }
7262
7263
  let t8;
7263
7264
  if ($[12] !== handleOk) {
7264
- t8 = /* @__PURE__ */ jsx(Button, { onClick: handleOk, children: " Ok " });
7265
+ t8 = /* @__PURE__ */ jsx(Button, { color: "primary", onClick: handleOk, children: " Ok " });
7265
7266
  $[12] = handleOk;
7266
7267
  $[13] = t8;
7267
7268
  } else {
@@ -7329,7 +7330,7 @@ function EntityCustomViewsSelectDialog(t0) {
7329
7330
  }
7330
7331
  let t3;
7331
7332
  if ($[4] !== entityViews) {
7332
- t3 = (entityViews ?? []).length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "No custom views defined" });
7333
+ t3 = (entityViews ?? []).length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "No custom views defined. Define your custom views in the customization settings, before using this dialog." });
7333
7334
  $[4] = entityViews;
7334
7335
  $[5] = t3;
7335
7336
  } else {
@@ -7349,7 +7350,7 @@ function EntityCustomViewsSelectDialog(t0) {
7349
7350
  }
7350
7351
  let t5;
7351
7352
  if ($[9] !== onClose) {
7352
- t5 = /* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, { variant: "outlined", onClick: () => onClose(), children: "Cancel" }) });
7353
+ t5 = /* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, { variant: "outlined", color: "primary", onClick: () => onClose(), children: "Cancel" }) });
7353
7354
  $[9] = onClose;
7354
7355
  $[10] = t5;
7355
7356
  } else {
@@ -7416,8 +7417,8 @@ function SubcollectionsEditTab(t0) {
7416
7417
  let t8;
7417
7418
  let t9;
7418
7419
  if ($[2] !== collection.entityViews || $[3] !== contextEntityViews || $[4] !== subcollections || $[5] !== values.entityViews || $[6] !== values.name) {
7419
- const resolvedEntityViews = values.entityViews?.filter(_temp$3).map((e_0) => resolveEntityView(e_0, contextEntityViews)).filter(Boolean) ?? [];
7420
- const hardCodedEntityViews = collection.entityViews?.filter(_temp2$2) ?? [];
7420
+ const resolvedEntityViews = values.entityViews?.filter(_temp$4).map((e_0) => resolveEntityView(e_0, contextEntityViews)).filter(Boolean) ?? [];
7421
+ const hardCodedEntityViews = collection.entityViews?.filter(_temp2$3) ?? [];
7421
7422
  const totalEntityViews = resolvedEntityViews.length + hardCodedEntityViews.length;
7422
7423
  t12 = "overflow-auto my-auto";
7423
7424
  T3 = Container;
@@ -7526,7 +7527,7 @@ function SubcollectionsEditTab(t0) {
7526
7527
  t182 = $[36];
7527
7528
  }
7528
7529
  t2 = resolvedEntityViews.map(t182);
7529
- t3 = hardCodedEntityViews.map(_temp3);
7530
+ t3 = hardCodedEntityViews.map(_temp3$1);
7530
7531
  $[2] = collection.entityViews;
7531
7532
  $[3] = contextEntityViews;
7532
7533
  $[4] = subcollections;
@@ -7800,7 +7801,7 @@ function SubcollectionsEditTab(t0) {
7800
7801
  function _temp4(e_6) {
7801
7802
  return e_6.id;
7802
7803
  }
7803
- function _temp3(view_0) {
7804
+ function _temp3$1(view_0) {
7804
7805
  return /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsxs(TableCell, { align: "left", children: [
7805
7806
  /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "flex-grow", children: view_0.name }),
7806
7807
  /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-grow", children: [
@@ -7809,10 +7810,10 @@ function _temp3(view_0) {
7809
7810
  ] })
7810
7811
  ] }) }, view_0.key);
7811
7812
  }
7812
- function _temp2$2(e_1) {
7813
+ function _temp2$3(e_1) {
7813
7814
  return typeof e_1 !== "string";
7814
7815
  }
7815
- function _temp$3(e) {
7816
+ function _temp$4(e) {
7816
7817
  return typeof e === "string";
7817
7818
  }
7818
7819
  const productsCollectionTemplate = {
@@ -8254,7 +8255,7 @@ const pagesCollectionTemplate = {
8254
8255
  }
8255
8256
  };
8256
8257
  function CollectionEditorWelcomeView(t0) {
8257
- const $ = c(52);
8258
+ const $ = c(56);
8258
8259
  const {
8259
8260
  path,
8260
8261
  pathSuggestions,
@@ -8346,162 +8347,173 @@ function CollectionEditorWelcomeView(t0) {
8346
8347
  t7 = $[15];
8347
8348
  }
8348
8349
  let t8;
8349
- if ($[16] !== t6 || $[17] !== t7) {
8350
- t8 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8351
- t5,
8352
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
8353
- t6,
8354
- t7
8355
- ] })
8356
- ] });
8357
- $[16] = t6;
8358
- $[17] = t7;
8350
+ if ($[16] !== filteredPathSuggestions || $[17] !== loadingPathSuggestions) {
8351
+ t8 = (filteredPathSuggestions ?? []).length === 0 && !loadingPathSuggestions && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "No existing paths found" });
8352
+ $[16] = filteredPathSuggestions;
8353
+ $[17] = loadingPathSuggestions;
8359
8354
  $[18] = t8;
8360
8355
  } else {
8361
8356
  t8 = $[18];
8362
8357
  }
8363
8358
  let t9;
8364
- if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
8365
- t9 = /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
8366
- $[19] = t9;
8359
+ if ($[19] !== t6 || $[20] !== t7 || $[21] !== t8) {
8360
+ t9 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8361
+ t5,
8362
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
8363
+ t6,
8364
+ t7,
8365
+ t8
8366
+ ] })
8367
+ ] });
8368
+ $[19] = t6;
8369
+ $[20] = t7;
8370
+ $[21] = t8;
8371
+ $[22] = t9;
8367
8372
  } else {
8368
- t9 = $[19];
8373
+ t9 = $[22];
8369
8374
  }
8370
8375
  let t10;
8371
- if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
8372
- t10 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
8373
- $[20] = t10;
8376
+ if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
8377
+ t10 = /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
8378
+ $[23] = t10;
8374
8379
  } else {
8375
- t10 = $[20];
8380
+ t10 = $[23];
8376
8381
  }
8377
8382
  let t11;
8378
- if ($[21] !== onContinue || $[22] !== setValues) {
8379
- t11 = /* @__PURE__ */ jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t10, onClick: () => {
8380
- setValues(productsCollectionTemplate);
8381
- onContinue();
8382
- } });
8383
- $[21] = onContinue;
8384
- $[22] = setValues;
8385
- $[23] = t11;
8386
- } else {
8387
- t11 = $[23];
8388
- }
8389
- let t12;
8390
8383
  if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
8391
- t12 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
8392
- $[24] = t12;
8384
+ t11 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
8385
+ $[24] = t11;
8393
8386
  } else {
8394
- t12 = $[24];
8387
+ t11 = $[24];
8395
8388
  }
8396
- let t13;
8389
+ let t12;
8397
8390
  if ($[25] !== onContinue || $[26] !== setValues) {
8398
- t13 = /* @__PURE__ */ jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t12, onClick: () => {
8399
- setValues(usersCollectionTemplate);
8391
+ t12 = /* @__PURE__ */ jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t11, onClick: () => {
8392
+ setValues(productsCollectionTemplate);
8400
8393
  onContinue();
8401
8394
  } });
8402
8395
  $[25] = onContinue;
8403
8396
  $[26] = setValues;
8404
- $[27] = t13;
8397
+ $[27] = t12;
8405
8398
  } else {
8406
- t13 = $[27];
8399
+ t12 = $[27];
8407
8400
  }
8408
- let t14;
8401
+ let t13;
8409
8402
  if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
8410
- t14 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
8411
- $[28] = t14;
8403
+ t13 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
8404
+ $[28] = t13;
8412
8405
  } else {
8413
- t14 = $[28];
8406
+ t13 = $[28];
8414
8407
  }
8415
- let t15;
8408
+ let t14;
8416
8409
  if ($[29] !== onContinue || $[30] !== setValues) {
8417
- t15 = /* @__PURE__ */ jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t14, onClick: () => {
8418
- setValues(blogCollectionTemplate);
8410
+ t14 = /* @__PURE__ */ jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t13, onClick: () => {
8411
+ setValues(usersCollectionTemplate);
8419
8412
  onContinue();
8420
8413
  } });
8421
8414
  $[29] = onContinue;
8422
8415
  $[30] = setValues;
8423
- $[31] = t15;
8416
+ $[31] = t14;
8424
8417
  } else {
8425
- t15 = $[31];
8418
+ t14 = $[31];
8426
8419
  }
8427
- let t16;
8420
+ let t15;
8428
8421
  if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
8429
- t16 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
8430
- $[32] = t16;
8422
+ t15 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
8423
+ $[32] = t15;
8431
8424
  } else {
8432
- t16 = $[32];
8425
+ t15 = $[32];
8433
8426
  }
8434
- let t17;
8427
+ let t16;
8435
8428
  if ($[33] !== onContinue || $[34] !== setValues) {
8436
- t17 = /* @__PURE__ */ jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t16, onClick: () => {
8437
- setValues(pagesCollectionTemplate);
8429
+ t16 = /* @__PURE__ */ jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t15, onClick: () => {
8430
+ setValues(blogCollectionTemplate);
8438
8431
  onContinue();
8439
8432
  } });
8440
8433
  $[33] = onContinue;
8441
8434
  $[34] = setValues;
8442
- $[35] = t17;
8435
+ $[35] = t16;
8436
+ } else {
8437
+ t16 = $[35];
8438
+ }
8439
+ let t17;
8440
+ if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
8441
+ t17 = /* @__PURE__ */ jsx(Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
8442
+ $[36] = t17;
8443
8443
  } else {
8444
- t17 = $[35];
8444
+ t17 = $[36];
8445
8445
  }
8446
8446
  let t18;
8447
- if ($[36] !== t11 || $[37] !== t13 || $[38] !== t15 || $[39] !== t17) {
8448
- t18 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8449
- t9,
8447
+ if ($[37] !== onContinue || $[38] !== setValues) {
8448
+ t18 = /* @__PURE__ */ jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t17, onClick: () => {
8449
+ setValues(pagesCollectionTemplate);
8450
+ onContinue();
8451
+ } });
8452
+ $[37] = onContinue;
8453
+ $[38] = setValues;
8454
+ $[39] = t18;
8455
+ } else {
8456
+ t18 = $[39];
8457
+ }
8458
+ let t19;
8459
+ if ($[40] !== t12 || $[41] !== t14 || $[42] !== t16 || $[43] !== t18) {
8460
+ t19 = /* @__PURE__ */ jsxs("div", { className: "my-2", children: [
8461
+ t10,
8450
8462
  /* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
8451
- t11,
8452
- t13,
8453
- t15,
8454
- t17
8463
+ t12,
8464
+ t14,
8465
+ t16,
8466
+ t18
8455
8467
  ] })
8456
8468
  ] });
8457
- $[36] = t11;
8458
- $[37] = t13;
8459
- $[38] = t15;
8460
- $[39] = t17;
8461
- $[40] = t18;
8469
+ $[40] = t12;
8470
+ $[41] = t14;
8471
+ $[42] = t16;
8472
+ $[43] = t18;
8473
+ $[44] = t19;
8462
8474
  } else {
8463
- t18 = $[40];
8475
+ t19 = $[44];
8464
8476
  }
8465
- let t19;
8466
- if ($[41] !== onContinue || $[42] !== parentCollection) {
8467
- t19 = !parentCollection && /* @__PURE__ */ jsxs("div", { children: [
8477
+ let t20;
8478
+ if ($[45] !== onContinue || $[46] !== parentCollection) {
8479
+ t20 = !parentCollection && /* @__PURE__ */ jsxs("div", { children: [
8468
8480
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Create a collection from a file (csv, json, xls, xslx...)" }),
8469
8481
  /* @__PURE__ */ jsx(ImportFileUpload, { onDataAdded: (data, propertiesOrder) => onContinue(data, propertiesOrder) })
8470
8482
  ] });
8471
- $[41] = onContinue;
8472
- $[42] = parentCollection;
8473
- $[43] = t19;
8483
+ $[45] = onContinue;
8484
+ $[46] = parentCollection;
8485
+ $[47] = t20;
8474
8486
  } else {
8475
- t19 = $[43];
8487
+ t20 = $[47];
8476
8488
  }
8477
- let t20;
8478
- if ($[44] !== onContinue) {
8479
- t20 = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => onContinue(), className: "my-2", children: "Continue from scratch" }) });
8480
- $[44] = onContinue;
8481
- $[45] = t20;
8489
+ let t21;
8490
+ if ($[48] !== onContinue) {
8491
+ t21 = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => onContinue(), className: "my-2", children: "Continue from scratch" }) });
8492
+ $[48] = onContinue;
8493
+ $[49] = t21;
8482
8494
  } else {
8483
- t20 = $[45];
8495
+ t21 = $[49];
8484
8496
  }
8485
- let t21;
8486
- if ($[46] !== t18 || $[47] !== t19 || $[48] !== t20 || $[49] !== t4 || $[50] !== t8) {
8487
- t21 = /* @__PURE__ */ jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxs(Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
8497
+ let t22;
8498
+ if ($[50] !== t19 || $[51] !== t20 || $[52] !== t21 || $[53] !== t4 || $[54] !== t9) {
8499
+ t22 = /* @__PURE__ */ jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxs(Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
8488
8500
  t3,
8489
8501
  t4,
8490
- t8,
8491
- t18,
8502
+ t9,
8492
8503
  t19,
8493
- t20
8504
+ t20,
8505
+ t21
8494
8506
  ] }) });
8495
- $[46] = t18;
8496
- $[47] = t19;
8497
- $[48] = t20;
8498
- $[49] = t4;
8499
- $[50] = t8;
8500
- $[51] = t21;
8507
+ $[50] = t19;
8508
+ $[51] = t20;
8509
+ $[52] = t21;
8510
+ $[53] = t4;
8511
+ $[54] = t9;
8512
+ $[55] = t22;
8501
8513
  } else {
8502
- t21 = $[51];
8514
+ t22 = $[55];
8503
8515
  }
8504
- return t21;
8516
+ return t22;
8505
8517
  }
8506
8518
  function TemplateButton(t0) {
8507
8519
  const $ = c(10);
@@ -8602,7 +8614,7 @@ function CollectionEditorImportMapping(t0) {
8602
8614
  const previousFullId = getFullId(previousId, namespace);
8603
8615
  const previousPropertyPath = idToPropertiesPath(previousFullId);
8604
8616
  const currentPropertiesOrder = getCurrentPropertiesOrder(namespace);
8605
- const newPropertiesOrder_0 = currentPropertiesOrder.map((p) => p === previousId ? id : p).filter(_temp$2);
8617
+ const newPropertiesOrder_0 = currentPropertiesOrder.map((p) => p === previousId ? id : p).filter(_temp$3);
8606
8618
  updatePropertiesOrder(newPropertiesOrder_0, namespace);
8607
8619
  const newHeadersMapping = {
8608
8620
  ...importConfig.headersMapping
@@ -8768,7 +8780,7 @@ function CollectionEditorImportMapping(t0) {
8768
8780
  }
8769
8781
  return t13;
8770
8782
  }
8771
- function _temp$2(p_0) {
8783
+ function _temp$3(p_0) {
8772
8784
  return p_0 !== void 0;
8773
8785
  }
8774
8786
  function PropertySelect(t0) {
@@ -8841,7 +8853,7 @@ function PropertySelect(t0) {
8841
8853
  }
8842
8854
  let t9;
8843
8855
  if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
8844
- t9 = Object.entries(supportedFields).map(_temp2$1);
8856
+ t9 = Object.entries(supportedFields).map(_temp2$2);
8845
8857
  $[12] = t9;
8846
8858
  } else {
8847
8859
  t9 = $[12];
@@ -8871,7 +8883,7 @@ function PropertySelect(t0) {
8871
8883
  }
8872
8884
  return t11;
8873
8885
  }
8874
- function _temp2$1(t0) {
8886
+ function _temp2$2(t0) {
8875
8887
  const [key, widget_0] = t0;
8876
8888
  return /* @__PURE__ */ jsx(PropertySelectItem, { value: key, optionDisabled: false, propertyConfig: widget_0, existing: false }, key);
8877
8889
  }
@@ -9037,7 +9049,7 @@ function CollectionEditorImportDataPreview(t0) {
9037
9049
  }
9038
9050
  let t7;
9039
9051
  if ($[12] !== propertiesOrder) {
9040
- t7 = propertiesOrder.map(_temp$1);
9052
+ t7 = propertiesOrder.map(_temp$2);
9041
9053
  $[12] = propertiesOrder;
9042
9054
  $[13] = t7;
9043
9055
  } else {
@@ -9056,7 +9068,7 @@ function CollectionEditorImportDataPreview(t0) {
9056
9068
  }
9057
9069
  return t8;
9058
9070
  }
9059
- function _temp$1(p) {
9071
+ function _temp$2(p) {
9060
9072
  return {
9061
9073
  key: p,
9062
9074
  disabled: false
@@ -9110,6 +9122,355 @@ function cleanPropertiesFromImport(properties, parentSlug = "") {
9110
9122
  idColumn
9111
9123
  };
9112
9124
  }
9125
+ function EntityActionsSelectDialog(t0) {
9126
+ const $ = c(15);
9127
+ const {
9128
+ open,
9129
+ onClose
9130
+ } = t0;
9131
+ const {
9132
+ entityActions
9133
+ } = useCustomizationController();
9134
+ let t1;
9135
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
9136
+ t1 = /* @__PURE__ */ jsx(DialogTitle, { children: "Select custom action" });
9137
+ $[0] = t1;
9138
+ } else {
9139
+ t1 = $[0];
9140
+ }
9141
+ let t2;
9142
+ if ($[1] !== entityActions || $[2] !== onClose) {
9143
+ t2 = entityActions?.map((action) => /* @__PURE__ */ jsxs(Button, { onClick: () => onClose(action.key), fullWidth: true, variant: "text", children: [
9144
+ action.name,
9145
+ " (",
9146
+ action.key,
9147
+ ")"
9148
+ ] }, action.key));
9149
+ $[1] = entityActions;
9150
+ $[2] = onClose;
9151
+ $[3] = t2;
9152
+ } else {
9153
+ t2 = $[3];
9154
+ }
9155
+ let t3;
9156
+ if ($[4] !== entityActions) {
9157
+ t3 = (entityActions ?? []).length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "No custom actions defined. Define your custom actions in the customization settings, before using this dialog." });
9158
+ $[4] = entityActions;
9159
+ $[5] = t3;
9160
+ } else {
9161
+ t3 = $[5];
9162
+ }
9163
+ let t4;
9164
+ if ($[6] !== t2 || $[7] !== t3) {
9165
+ t4 = /* @__PURE__ */ jsxs(DialogContent, { className: "flex flex-col gap-4", children: [
9166
+ t2,
9167
+ t3
9168
+ ] });
9169
+ $[6] = t2;
9170
+ $[7] = t3;
9171
+ $[8] = t4;
9172
+ } else {
9173
+ t4 = $[8];
9174
+ }
9175
+ let t5;
9176
+ if ($[9] !== onClose) {
9177
+ t5 = /* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, { variant: "outlined", color: "primary", onClick: () => onClose(), children: "Cancel" }) });
9178
+ $[9] = onClose;
9179
+ $[10] = t5;
9180
+ } else {
9181
+ t5 = $[10];
9182
+ }
9183
+ let t6;
9184
+ if ($[11] !== open || $[12] !== t4 || $[13] !== t5) {
9185
+ t6 = /* @__PURE__ */ jsxs(Dialog, { maxWidth: "md", open, children: [
9186
+ t1,
9187
+ t4,
9188
+ t5
9189
+ ] });
9190
+ $[11] = open;
9191
+ $[12] = t4;
9192
+ $[13] = t5;
9193
+ $[14] = t6;
9194
+ } else {
9195
+ t6 = $[14];
9196
+ }
9197
+ return t6;
9198
+ }
9199
+ function EntityActionsEditTab(t0) {
9200
+ const $ = c(64);
9201
+ const {
9202
+ collection
9203
+ } = t0;
9204
+ const {
9205
+ entityActions: contextEntityActions
9206
+ } = useCustomizationController();
9207
+ const [addEntityActionDialogOpen, setAddEntityActionDialogOpen] = React__default.useState(false);
9208
+ const [actionToDelete, setActionToDelete] = React__default.useState();
9209
+ const {
9210
+ values,
9211
+ setFieldValue
9212
+ } = useFormex();
9213
+ let T0;
9214
+ let T1;
9215
+ let T2;
9216
+ let T3;
9217
+ let t1;
9218
+ let t10;
9219
+ let t2;
9220
+ let t3;
9221
+ let t4;
9222
+ let t5;
9223
+ let t6;
9224
+ let t7;
9225
+ let t8;
9226
+ let t9;
9227
+ if ($[0] !== collection.entityActions || $[1] !== contextEntityActions || $[2] !== values.entityActions) {
9228
+ const resolvedEntityActions = values.entityActions?.filter(_temp$1).map((e_0) => resolveEntityAction(e_0, contextEntityActions)).filter(Boolean) ?? [];
9229
+ const hardCodedEntityActions = collection.entityActions?.filter(_temp2$1) ?? [];
9230
+ const totalEntityActions = resolvedEntityActions.length + hardCodedEntityActions.length;
9231
+ t10 = "overflow-auto my-auto";
9232
+ T3 = Container;
9233
+ t8 = "2xl";
9234
+ t9 = "flex flex-col gap-4 p-8 m-auto";
9235
+ t7 = "flex flex-col gap-16";
9236
+ t4 = "flex-grow flex flex-col gap-4 items-start";
9237
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
9238
+ t5 = /* @__PURE__ */ jsx(Typography, { variant: "h5", children: "Custom actions" });
9239
+ $[17] = t5;
9240
+ } else {
9241
+ t5 = $[17];
9242
+ }
9243
+ if ($[18] !== totalEntityActions) {
9244
+ t6 = totalEntityActions === 0 && /* @__PURE__ */ jsx(Alert, { action: /* @__PURE__ */ jsx(Button, { variant: "text", size: "small", href: "https://firecms.co/docs/custom_actions", component: "a", rel: "noopener noreferrer", target: "_blank", children: "More info" }), children: "Define your own custom actions by uploading them with the CLI." });
9245
+ $[18] = totalEntityActions;
9246
+ $[19] = t6;
9247
+ } else {
9248
+ t6 = $[19];
9249
+ }
9250
+ T2 = Paper;
9251
+ t3 = "flex flex-col gap-4 p-2 w-full";
9252
+ T1 = Table;
9253
+ T0 = TableBody;
9254
+ let t112;
9255
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
9256
+ t112 = (action) => /* @__PURE__ */ jsxs(TableRow, { children: [
9257
+ /* @__PURE__ */ jsx(TableCell, { align: "left", children: /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "flex-grow", children: action.name }) }),
9258
+ /* @__PURE__ */ jsx(TableCell, { align: "right", children: /* @__PURE__ */ jsx(Tooltip, { title: "Remove", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: (e_2) => {
9259
+ e_2.preventDefault();
9260
+ e_2.stopPropagation();
9261
+ setActionToDelete(action.key);
9262
+ }, color: "inherit", children: /* @__PURE__ */ jsx(DeleteIcon, { size: "small" }) }) }) })
9263
+ ] }, action.key);
9264
+ $[20] = t112;
9265
+ } else {
9266
+ t112 = $[20];
9267
+ }
9268
+ t1 = resolvedEntityActions.map(t112);
9269
+ t2 = hardCodedEntityActions.map(_temp3);
9270
+ $[0] = collection.entityActions;
9271
+ $[1] = contextEntityActions;
9272
+ $[2] = values.entityActions;
9273
+ $[3] = T0;
9274
+ $[4] = T1;
9275
+ $[5] = T2;
9276
+ $[6] = T3;
9277
+ $[7] = t1;
9278
+ $[8] = t10;
9279
+ $[9] = t2;
9280
+ $[10] = t3;
9281
+ $[11] = t4;
9282
+ $[12] = t5;
9283
+ $[13] = t6;
9284
+ $[14] = t7;
9285
+ $[15] = t8;
9286
+ $[16] = t9;
9287
+ } else {
9288
+ T0 = $[3];
9289
+ T1 = $[4];
9290
+ T2 = $[5];
9291
+ T3 = $[6];
9292
+ t1 = $[7];
9293
+ t10 = $[8];
9294
+ t2 = $[9];
9295
+ t3 = $[10];
9296
+ t4 = $[11];
9297
+ t5 = $[12];
9298
+ t6 = $[13];
9299
+ t7 = $[14];
9300
+ t8 = $[15];
9301
+ t9 = $[16];
9302
+ }
9303
+ let t11;
9304
+ if ($[21] !== T0 || $[22] !== t1 || $[23] !== t2) {
9305
+ t11 = /* @__PURE__ */ jsxs(T0, { children: [
9306
+ t1,
9307
+ t2
9308
+ ] });
9309
+ $[21] = T0;
9310
+ $[22] = t1;
9311
+ $[23] = t2;
9312
+ $[24] = t11;
9313
+ } else {
9314
+ t11 = $[24];
9315
+ }
9316
+ let t12;
9317
+ if ($[25] !== T1 || $[26] !== t11) {
9318
+ t12 = /* @__PURE__ */ jsx(T1, { children: t11 });
9319
+ $[25] = T1;
9320
+ $[26] = t11;
9321
+ $[27] = t12;
9322
+ } else {
9323
+ t12 = $[27];
9324
+ }
9325
+ let t13;
9326
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
9327
+ t13 = () => {
9328
+ setAddEntityActionDialogOpen(true);
9329
+ };
9330
+ $[28] = t13;
9331
+ } else {
9332
+ t13 = $[28];
9333
+ }
9334
+ let t14;
9335
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
9336
+ t14 = /* @__PURE__ */ jsx(Button, { onClick: t13, variant: "text", startIcon: /* @__PURE__ */ jsx(AddIcon, {}), children: "Add custom entity action" });
9337
+ $[29] = t14;
9338
+ } else {
9339
+ t14 = $[29];
9340
+ }
9341
+ let t15;
9342
+ if ($[30] !== T2 || $[31] !== t12 || $[32] !== t3) {
9343
+ t15 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(T2, { className: t3, children: [
9344
+ t12,
9345
+ t14
9346
+ ] }) });
9347
+ $[30] = T2;
9348
+ $[31] = t12;
9349
+ $[32] = t3;
9350
+ $[33] = t15;
9351
+ } else {
9352
+ t15 = $[33];
9353
+ }
9354
+ let t16;
9355
+ if ($[34] !== t15 || $[35] !== t4 || $[36] !== t5 || $[37] !== t6) {
9356
+ t16 = /* @__PURE__ */ jsxs("div", { className: t4, children: [
9357
+ t5,
9358
+ t6,
9359
+ t15
9360
+ ] });
9361
+ $[34] = t15;
9362
+ $[35] = t4;
9363
+ $[36] = t5;
9364
+ $[37] = t6;
9365
+ $[38] = t16;
9366
+ } else {
9367
+ t16 = $[38];
9368
+ }
9369
+ let t17;
9370
+ if ($[39] !== t16 || $[40] !== t7) {
9371
+ t17 = /* @__PURE__ */ jsx("div", { className: t7, children: t16 });
9372
+ $[39] = t16;
9373
+ $[40] = t7;
9374
+ $[41] = t17;
9375
+ } else {
9376
+ t17 = $[41];
9377
+ }
9378
+ let t18;
9379
+ if ($[42] !== T3 || $[43] !== t17 || $[44] !== t8 || $[45] !== t9) {
9380
+ t18 = /* @__PURE__ */ jsx(T3, { maxWidth: t8, className: t9, children: t17 });
9381
+ $[42] = T3;
9382
+ $[43] = t17;
9383
+ $[44] = t8;
9384
+ $[45] = t9;
9385
+ $[46] = t18;
9386
+ } else {
9387
+ t18 = $[46];
9388
+ }
9389
+ let t19;
9390
+ if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
9391
+ t19 = /* @__PURE__ */ jsx("div", { style: {
9392
+ height: "52px"
9393
+ } });
9394
+ $[47] = t19;
9395
+ } else {
9396
+ t19 = $[47];
9397
+ }
9398
+ let t20;
9399
+ if ($[48] !== actionToDelete || $[49] !== setFieldValue || $[50] !== values.entityActions) {
9400
+ t20 = actionToDelete && /* @__PURE__ */ jsx(ConfirmationDialog, { open: Boolean(actionToDelete), onAccept: () => {
9401
+ setFieldValue("entityActions", values.entityActions?.filter((e_3) => e_3 !== actionToDelete));
9402
+ setActionToDelete(void 0);
9403
+ }, onCancel: () => setActionToDelete(void 0), title: /* @__PURE__ */ jsx(Fragment, { children: "Remove this action?" }), body: /* @__PURE__ */ jsxs(Fragment, { children: [
9404
+ "This will ",
9405
+ /* @__PURE__ */ jsx("b", { children: "not delete any data" }),
9406
+ ", only the action in the CMS"
9407
+ ] }) });
9408
+ $[48] = actionToDelete;
9409
+ $[49] = setFieldValue;
9410
+ $[50] = values.entityActions;
9411
+ $[51] = t20;
9412
+ } else {
9413
+ t20 = $[51];
9414
+ }
9415
+ let t21;
9416
+ if ($[52] !== contextEntityActions || $[53] !== setFieldValue || $[54] !== values.entityActions) {
9417
+ t21 = (selectedActionKey) => {
9418
+ if (selectedActionKey) {
9419
+ console.log("Selected action key:", selectedActionKey);
9420
+ const value = [...values.entityActions ?? [], selectedActionKey].filter((e_4) => typeof e_4 === "string" && (contextEntityActions ?? []).some((action_1) => action_1.key === e_4));
9421
+ setFieldValue("entityActions", value);
9422
+ }
9423
+ setAddEntityActionDialogOpen(false);
9424
+ };
9425
+ $[52] = contextEntityActions;
9426
+ $[53] = setFieldValue;
9427
+ $[54] = values.entityActions;
9428
+ $[55] = t21;
9429
+ } else {
9430
+ t21 = $[55];
9431
+ }
9432
+ let t22;
9433
+ if ($[56] !== addEntityActionDialogOpen || $[57] !== t21) {
9434
+ t22 = /* @__PURE__ */ jsx(EntityActionsSelectDialog, { open: addEntityActionDialogOpen, onClose: t21 });
9435
+ $[56] = addEntityActionDialogOpen;
9436
+ $[57] = t21;
9437
+ $[58] = t22;
9438
+ } else {
9439
+ t22 = $[58];
9440
+ }
9441
+ let t23;
9442
+ if ($[59] !== t10 || $[60] !== t18 || $[61] !== t20 || $[62] !== t22) {
9443
+ t23 = /* @__PURE__ */ jsxs("div", { className: t10, children: [
9444
+ t18,
9445
+ t19,
9446
+ t20,
9447
+ t22
9448
+ ] });
9449
+ $[59] = t10;
9450
+ $[60] = t18;
9451
+ $[61] = t20;
9452
+ $[62] = t22;
9453
+ $[63] = t23;
9454
+ } else {
9455
+ t23 = $[63];
9456
+ }
9457
+ return t23;
9458
+ }
9459
+ function _temp3(action_0) {
9460
+ return /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsxs(TableCell, { align: "left", children: [
9461
+ /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "flex-grow", children: action_0.name }),
9462
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-grow", children: [
9463
+ "This action is defined in code with key ",
9464
+ /* @__PURE__ */ jsx("code", { children: action_0.key })
9465
+ ] })
9466
+ ] }) }, action_0.key);
9467
+ }
9468
+ function _temp2$1(e_1) {
9469
+ return typeof e_1 !== "string";
9470
+ }
9471
+ function _temp$1(e) {
9472
+ return typeof e === "string";
9473
+ }
9113
9474
  function CollectionEditorDialog(props) {
9114
9475
  const $ = c(24);
9115
9476
  const open = props.open;
@@ -9348,10 +9709,10 @@ function CollectionEditorInternal({
9348
9709
  setCurrentView("details");
9349
9710
  }
9350
9711
  };
9351
- const doCollectionInference = (collection_0) => {
9712
+ const doCollectionInference = collectionInference ? (collection_0) => {
9352
9713
  if (!collectionInference) return void 0;
9353
9714
  return collectionInference?.(collection_0.path, collection_0.collectionGroup ?? false, parentPaths ?? []);
9354
- };
9715
+ } : void 0;
9355
9716
  const inferCollectionFromData = async (newCollection) => {
9356
9717
  try {
9357
9718
  if (!doCollectionInference) {
@@ -9570,7 +9931,8 @@ function CollectionEditorInternal({
9570
9931
  !isNewCollection && /* @__PURE__ */ jsxs(Tabs, { value: currentView, innerClassName: cls(defaultBorderMixin, "px-4 h-14 w-full justify-end bg-surface-50 dark:bg-surface-950 border-b"), onValueChange: (v) => setCurrentView(v), children: [
9571
9932
  /* @__PURE__ */ jsx(Tab, { value: "details", children: "Details" }),
9572
9933
  /* @__PURE__ */ jsx(Tab, { value: "properties", children: "Properties" }),
9573
- /* @__PURE__ */ jsx(Tab, { value: "subcollections", children: "Additional views" })
9934
+ /* @__PURE__ */ jsx(Tab, { value: "subcollections", children: "Additional views" }),
9935
+ /* @__PURE__ */ jsx(Tab, { value: "custom_actions", children: "Custom actions" })
9574
9936
  ] }),
9575
9937
  /* @__PURE__ */ jsxs("form", { noValidate: true, onSubmit: formController.handleSubmit, className: cls(isNewCollection ? "h-full" : "h-[calc(100%-48px)]", "flex-grow flex flex-col relative"), children: [
9576
9938
  currentView === "loading" && /* @__PURE__ */ jsx(CircularProgressCenter, {}),
@@ -9599,6 +9961,7 @@ function CollectionEditorInternal({
9599
9961
  setDeleteRequested(true);
9600
9962
  }, children: "Reset to code" })
9601
9963
  ] }) }),
9964
+ currentView === "custom_actions" && collection && /* @__PURE__ */ jsx(EntityActionsEditTab, { collection }),
9602
9965
  currentView === "subcollections" && collection && /* @__PURE__ */ jsx(SubcollectionsEditTab, { parentCollection, configController, getUser, collectionInference, parentCollectionIds, collection }),
9603
9966
  currentView === "properties" && /* @__PURE__ */ jsx(CollectionPropertiesEditorForm, { showErrors: submitCount > 0, isNewCollection, reservedGroups, onPropertyError: (propertyKey, namespace, error_0) => {
9604
9967
  const current = removeUndefined({
@@ -9610,28 +9973,28 @@ function CollectionEditorInternal({
9610
9973
  }, getUser, getData: getDataWithPath, doCollectionInference, propertyConfigs, collectionEditable, extraIcon: extraView?.icon && /* @__PURE__ */ jsx(IconButton, { color: "primary", onClick: () => setCurrentView("extra_view"), children: extraView.icon }) }),
9611
9974
  currentView !== "welcome" && /* @__PURE__ */ jsxs(DialogActions, { position: "absolute", children: [
9612
9975
  error && /* @__PURE__ */ jsx(ErrorView, { error }),
9613
- isNewCollection && includeTemplates && currentView === "import_data_mapping" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", onClick: () => {
9976
+ isNewCollection && includeTemplates && currentView === "import_data_mapping" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", color: "primary", onClick: () => {
9614
9977
  importConfig.setInUse(false);
9615
9978
  return setCurrentView("welcome");
9616
9979
  }, children: [
9617
9980
  /* @__PURE__ */ jsx(ArrowBackIcon, {}),
9618
9981
  "Back"
9619
9982
  ] }),
9620
- isNewCollection && includeTemplates && currentView === "import_data_preview" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", onClick: () => {
9983
+ isNewCollection && includeTemplates && currentView === "import_data_preview" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", color: "primary", onClick: () => {
9621
9984
  setCurrentView("import_data_mapping");
9622
9985
  }, children: [
9623
9986
  /* @__PURE__ */ jsx(ArrowBackIcon, {}),
9624
9987
  "Back"
9625
9988
  ] }),
9626
- isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", onClick: () => setCurrentView("welcome"), children: [
9989
+ isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxs(Button, { variant: "text", color: "primary", type: "button", onClick: () => setCurrentView("welcome"), children: [
9627
9990
  /* @__PURE__ */ jsx(ArrowBackIcon, {}),
9628
9991
  "Back"
9629
9992
  ] }),
9630
- isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", onClick: () => setCurrentView("details"), children: [
9993
+ isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxs(Button, { variant: "text", type: "button", color: "primary", onClick: () => setCurrentView("details"), children: [
9631
9994
  /* @__PURE__ */ jsx(ArrowBackIcon, {}),
9632
9995
  "Back"
9633
9996
  ] }),
9634
- /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => {
9997
+ /* @__PURE__ */ jsx(Button, { variant: "text", color: "primary", onClick: () => {
9635
9998
  handleCancel();
9636
9999
  }, children: "Cancel" }),
9637
10000
  isNewCollection && currentView === "import_data_mapping" && /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: onImportMappingComplete, children: "Next" }),
@@ -10124,14 +10487,14 @@ function EditorCollectionAction(t0) {
10124
10487
  }
10125
10488
  let t6;
10126
10489
  if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
10127
- t6 = /* @__PURE__ */ jsx(SettingsIcon, {});
10490
+ t6 = /* @__PURE__ */ jsx(SettingsIcon, { size: "small" });
10128
10491
  $[15] = t6;
10129
10492
  } else {
10130
10493
  t6 = $[15];
10131
10494
  }
10132
10495
  let t7;
10133
10496
  if ($[16] !== t4 || $[17] !== t5) {
10134
- t7 = /* @__PURE__ */ jsx(IconButton, { color: "primary", disabled: t4, onClick: t5, children: t6 });
10497
+ t7 = /* @__PURE__ */ jsx(IconButton, { size: "small", color: "primary", disabled: t4, onClick: t5, children: t6 });
10135
10498
  $[16] = t4;
10136
10499
  $[17] = t5;
10137
10500
  $[18] = t7;
@@ -10666,8 +11029,100 @@ function NewCollectionCard(t0) {
10666
11029
  }
10667
11030
  return t8;
10668
11031
  }
11032
+ function EditorEntityAction(t0) {
11033
+ const $ = c(23);
11034
+ const {
11035
+ path: fullPath,
11036
+ parentCollectionIds,
11037
+ collection,
11038
+ formContext
11039
+ } = t0;
11040
+ const authController = useAuthController();
11041
+ const navigationController = useNavigationController();
11042
+ const collectionEditorController = useCollectionEditorController();
11043
+ let t1;
11044
+ if ($[0] !== navigationController || $[1] !== parentCollectionIds) {
11045
+ t1 = navigationController.getCollectionFromIds(parentCollectionIds);
11046
+ $[0] = navigationController;
11047
+ $[1] = parentCollectionIds;
11048
+ $[2] = t1;
11049
+ } else {
11050
+ t1 = $[2];
11051
+ }
11052
+ const parentCollection = t1;
11053
+ let t2;
11054
+ if ($[3] !== authController || $[4] !== collection || $[5] !== collectionEditorController) {
11055
+ t2 = collectionEditorController.configPermissions ? collectionEditorController.configPermissions({
11056
+ user: authController.user,
11057
+ collection
11058
+ }).editCollections : true;
11059
+ $[3] = authController;
11060
+ $[4] = collection;
11061
+ $[5] = collectionEditorController;
11062
+ $[6] = t2;
11063
+ } else {
11064
+ t2 = $[6];
11065
+ }
11066
+ const canEditCollection = t2;
11067
+ const isDirty = formContext?.formex.dirty ?? false;
11068
+ const t3 = canEditCollection ? isDirty ? "You need to save the document before changing the schema" : "Edit schema for this form" : "You don't have permissions to edit this collection";
11069
+ const t4 = !canEditCollection || isDirty;
11070
+ let t5;
11071
+ if ($[7] !== canEditCollection || $[8] !== collection || $[9] !== collectionEditorController || $[10] !== fullPath || $[11] !== parentCollection || $[12] !== parentCollectionIds) {
11072
+ t5 = canEditCollection ? () => collectionEditorController?.editCollection({
11073
+ id: collection.id,
11074
+ fullPath,
11075
+ parentCollectionIds,
11076
+ parentCollection
11077
+ }) : void 0;
11078
+ $[7] = canEditCollection;
11079
+ $[8] = collection;
11080
+ $[9] = collectionEditorController;
11081
+ $[10] = fullPath;
11082
+ $[11] = parentCollection;
11083
+ $[12] = parentCollectionIds;
11084
+ $[13] = t5;
11085
+ } else {
11086
+ t5 = $[13];
11087
+ }
11088
+ let t6;
11089
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
11090
+ t6 = /* @__PURE__ */ jsx(SettingsIcon, { size: "small" });
11091
+ $[14] = t6;
11092
+ } else {
11093
+ t6 = $[14];
11094
+ }
11095
+ let t7;
11096
+ if ($[15] !== t4 || $[16] !== t5) {
11097
+ t7 = /* @__PURE__ */ jsx(IconButton, { color: "primary", disabled: t4, onClick: t5, children: t6 });
11098
+ $[15] = t4;
11099
+ $[16] = t5;
11100
+ $[17] = t7;
11101
+ } else {
11102
+ t7 = $[17];
11103
+ }
11104
+ let t8;
11105
+ if ($[18] !== t3 || $[19] !== t7) {
11106
+ t8 = /* @__PURE__ */ jsx(Tooltip, { asChild: true, title: t3, children: t7 });
11107
+ $[18] = t3;
11108
+ $[19] = t7;
11109
+ $[20] = t8;
11110
+ } else {
11111
+ t8 = $[20];
11112
+ }
11113
+ const editorButton = t8;
11114
+ let t9;
11115
+ if ($[21] !== editorButton) {
11116
+ t9 = /* @__PURE__ */ jsx(Fragment, { children: editorButton });
11117
+ $[21] = editorButton;
11118
+ $[22] = t9;
11119
+ } else {
11120
+ t9 = $[22];
11121
+ }
11122
+ return t9;
11123
+ }
10669
11124
  function useCollectionEditorPlugin(t0) {
10670
- const $ = c(21);
11125
+ const $ = c(22);
10671
11126
  const {
10672
11127
  collectionConfigController,
10673
11128
  configPermissions,
@@ -10741,6 +11196,7 @@ function useCollectionEditorPlugin(t0) {
10741
11196
  t5 = $[15];
10742
11197
  }
10743
11198
  let t6;
11199
+ let t7;
10744
11200
  if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
10745
11201
  t6 = {
10746
11202
  CollectionActionsStart: EditorCollectionActionStart,
@@ -10748,27 +11204,33 @@ function useCollectionEditorPlugin(t0) {
10748
11204
  HeaderAction: CollectionViewHeaderAction,
10749
11205
  AddColumnComponent: PropertyAddColumnComponent
10750
11206
  };
11207
+ t7 = {
11208
+ ActionsTop: EditorEntityAction
11209
+ };
10751
11210
  $[16] = t6;
11211
+ $[17] = t7;
10752
11212
  } else {
10753
11213
  t6 = $[16];
11214
+ t7 = $[17];
10754
11215
  }
10755
- let t7;
10756
- if ($[17] !== collectionConfigController.loading || $[18] !== t2 || $[19] !== t5) {
10757
- t7 = {
11216
+ let t8;
11217
+ if ($[18] !== collectionConfigController.loading || $[19] !== t2 || $[20] !== t5) {
11218
+ t8 = {
10758
11219
  key: "collection_editor",
10759
11220
  loading: collectionConfigController.loading,
10760
11221
  provider: t2,
10761
11222
  homePage: t5,
10762
- collectionView: t6
11223
+ collectionView: t6,
11224
+ form: t7
10763
11225
  };
10764
- $[17] = collectionConfigController.loading;
10765
- $[18] = t2;
10766
- $[19] = t5;
10767
- $[20] = t7;
11226
+ $[18] = collectionConfigController.loading;
11227
+ $[19] = t2;
11228
+ $[20] = t5;
11229
+ $[21] = t8;
10768
11230
  } else {
10769
- t7 = $[20];
11231
+ t8 = $[21];
10770
11232
  }
10771
- return t7;
11233
+ return t8;
10772
11234
  }
10773
11235
  function IntroWidget() {
10774
11236
  const $ = c(11);