@firecms/collection_editor 3.0.0-canary.211 → 3.0.0-canary.213
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 +42 -40
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +41 -39
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/src/ui/collection_editor/EnumForm.tsx +1 -1
- package/src/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +9 -2
package/dist/index.umd.js
CHANGED
|
@@ -1258,7 +1258,7 @@
|
|
|
1258
1258
|
}
|
|
1259
1259
|
let t10;
|
|
1260
1260
|
if ($[26] !== buildEntry || $[27] !== disabled || $[28] !== enumValuesPath || $[29] !== t8 || $[30] !== values.enumValues) {
|
|
1261
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx(core.ArrayContainer, { droppableId: enumValuesPath, addLabel: "Add enum value", value: values.enumValues, disabled, size: "small", buildEntry, onInternalIdAdded: setLastInternalIdAdded,
|
|
1261
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(core.ArrayContainer, { droppableId: enumValuesPath, addLabel: "Add enum value", value: values.enumValues, disabled, size: "small", buildEntry, onInternalIdAdded: setLastInternalIdAdded, canAddElements: true, onValueChange: t8, newDefaultEntry: t9 });
|
|
1262
1262
|
$[26] = buildEntry;
|
|
1263
1263
|
$[27] = disabled;
|
|
1264
1264
|
$[28] = enumValuesPath;
|
|
@@ -8789,102 +8789,104 @@
|
|
|
8789
8789
|
return t9;
|
|
8790
8790
|
}
|
|
8791
8791
|
function CollectionEditorImportDataPreview(t0) {
|
|
8792
|
-
const $ = reactCompilerRuntime.c(
|
|
8792
|
+
const $ = reactCompilerRuntime.c(19);
|
|
8793
8793
|
const {
|
|
8794
8794
|
importConfig,
|
|
8795
8795
|
properties,
|
|
8796
8796
|
propertiesOrder
|
|
8797
8797
|
} = t0;
|
|
8798
|
+
const authController = core.useAuthController();
|
|
8798
8799
|
const [loading, setLoading] = React.useState(false);
|
|
8799
8800
|
let t1;
|
|
8800
|
-
if ($[0] !==
|
|
8801
|
+
if ($[0] !== authController || $[1] !== importConfig || $[2] !== properties) {
|
|
8801
8802
|
t1 = async function loadEntities2() {
|
|
8802
|
-
const mappedData = importConfig.importData.map((d) => data_import_export.convertDataToEntity(d, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues));
|
|
8803
|
+
const mappedData = importConfig.importData.map((d) => data_import_export.convertDataToEntity(authController, d, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues));
|
|
8803
8804
|
importConfig.setEntities(mappedData);
|
|
8804
8805
|
};
|
|
8805
|
-
$[0] =
|
|
8806
|
-
$[1] =
|
|
8807
|
-
$[2] =
|
|
8806
|
+
$[0] = authController;
|
|
8807
|
+
$[1] = importConfig;
|
|
8808
|
+
$[2] = properties;
|
|
8809
|
+
$[3] = t1;
|
|
8808
8810
|
} else {
|
|
8809
|
-
t1 = $[
|
|
8811
|
+
t1 = $[3];
|
|
8810
8812
|
}
|
|
8811
8813
|
const loadEntities = t1;
|
|
8812
8814
|
let t2;
|
|
8813
|
-
if ($[
|
|
8815
|
+
if ($[4] !== loadEntities) {
|
|
8814
8816
|
t2 = () => {
|
|
8815
8817
|
loadEntities().finally(() => setLoading(false));
|
|
8816
8818
|
};
|
|
8817
|
-
$[
|
|
8818
|
-
$[
|
|
8819
|
+
$[4] = loadEntities;
|
|
8820
|
+
$[5] = t2;
|
|
8819
8821
|
} else {
|
|
8820
|
-
t2 = $[
|
|
8822
|
+
t2 = $[5];
|
|
8821
8823
|
}
|
|
8822
8824
|
let t3;
|
|
8823
|
-
if ($[
|
|
8825
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8824
8826
|
t3 = [];
|
|
8825
|
-
$[
|
|
8827
|
+
$[6] = t3;
|
|
8826
8828
|
} else {
|
|
8827
|
-
t3 = $[
|
|
8829
|
+
t3 = $[6];
|
|
8828
8830
|
}
|
|
8829
8831
|
React.useEffect(t2, t3);
|
|
8830
8832
|
const selectionController = core.useSelectionController();
|
|
8831
8833
|
if (loading) {
|
|
8832
8834
|
let t42;
|
|
8833
|
-
if ($[
|
|
8835
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8834
8836
|
t42 = /* @__PURE__ */ jsxRuntime.jsx(core.CircularProgressCenter, {});
|
|
8835
|
-
$[
|
|
8837
|
+
$[7] = t42;
|
|
8836
8838
|
} else {
|
|
8837
|
-
t42 = $[
|
|
8839
|
+
t42 = $[7];
|
|
8838
8840
|
}
|
|
8839
8841
|
return t42;
|
|
8840
8842
|
}
|
|
8841
8843
|
let t4;
|
|
8842
|
-
if ($[
|
|
8844
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8843
8845
|
t4 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8844
8846
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", children: "Imported data preview" }),
|
|
8845
8847
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", children: "Entities with the same id will be overwritten" })
|
|
8846
8848
|
] });
|
|
8847
|
-
$[
|
|
8849
|
+
$[8] = t4;
|
|
8848
8850
|
} else {
|
|
8849
|
-
t4 = $[
|
|
8851
|
+
t4 = $[8];
|
|
8850
8852
|
}
|
|
8851
8853
|
let t5;
|
|
8852
|
-
if ($[
|
|
8854
|
+
if ($[9] !== importConfig.entities) {
|
|
8853
8855
|
t5 = {
|
|
8854
8856
|
data: importConfig.entities,
|
|
8855
8857
|
dataLoading: false,
|
|
8856
8858
|
noMoreToLoad: false
|
|
8857
8859
|
};
|
|
8858
|
-
$[
|
|
8859
|
-
$[
|
|
8860
|
+
$[9] = importConfig.entities;
|
|
8861
|
+
$[10] = t5;
|
|
8860
8862
|
} else {
|
|
8861
|
-
t5 = $[
|
|
8863
|
+
t5 = $[10];
|
|
8862
8864
|
}
|
|
8863
8865
|
let t6;
|
|
8864
|
-
if ($[
|
|
8866
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8865
8867
|
t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12" });
|
|
8866
|
-
$[
|
|
8868
|
+
$[11] = t6;
|
|
8867
8869
|
} else {
|
|
8868
|
-
t6 = $[
|
|
8870
|
+
t6 = $[11];
|
|
8869
8871
|
}
|
|
8870
8872
|
let t7;
|
|
8871
|
-
if ($[
|
|
8873
|
+
if ($[12] !== propertiesOrder) {
|
|
8872
8874
|
t7 = propertiesOrder.map(_temp$1);
|
|
8873
|
-
$[
|
|
8874
|
-
$[
|
|
8875
|
+
$[12] = propertiesOrder;
|
|
8876
|
+
$[13] = t7;
|
|
8875
8877
|
} else {
|
|
8876
|
-
t7 = $[
|
|
8878
|
+
t7 = $[13];
|
|
8877
8879
|
}
|
|
8878
8880
|
let t8;
|
|
8879
|
-
if ($[
|
|
8881
|
+
if ($[14] !== properties || $[15] !== selectionController || $[16] !== t5 || $[17] !== t7) {
|
|
8880
8882
|
t8 = /* @__PURE__ */ jsxRuntime.jsx(core.EntityCollectionTable, { title: t4, tableController: t5, endAdornment: t6, filterable: false, sortable: false, selectionController, displayedColumnIds: t7, openEntityMode: "side_panel", properties, enablePopupIcon: false });
|
|
8881
|
-
$[
|
|
8882
|
-
$[
|
|
8883
|
-
$[
|
|
8884
|
-
$[
|
|
8885
|
-
$[
|
|
8883
|
+
$[14] = properties;
|
|
8884
|
+
$[15] = selectionController;
|
|
8885
|
+
$[16] = t5;
|
|
8886
|
+
$[17] = t7;
|
|
8887
|
+
$[18] = t8;
|
|
8886
8888
|
} else {
|
|
8887
|
-
t8 = $[
|
|
8889
|
+
t8 = $[18];
|
|
8888
8890
|
}
|
|
8889
8891
|
return t8;
|
|
8890
8892
|
}
|