@firecms/collection_editor 3.0.0-canary.160 → 3.0.0-canary.162
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 +11 -11
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +2 -2
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +2 -2
- package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +2 -2
- package/src/ui/collection_editor/EnumForm.tsx +3 -3
- package/src/ui/collection_editor/PropertyEditView.tsx +2 -2
- package/src/ui/collection_editor/PropertyFieldPreview.tsx +3 -3
- package/src/ui/collection_editor/PropertyTree.tsx +2 -2
- package/src/ui/collection_editor/properties/MarkdownPropertyField.tsx +2 -2
- package/src/ui/collection_editor/properties/StoragePropertyField.tsx +2 -2
package/dist/index.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import { FieldCaption, SearchIconsView, toSnakeCase, singular, IconForView, Arra
|
|
|
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";
|
|
7
|
-
import { useAutoComplete, Chip, Typography, cls, TextField, Autocomplete, AutocompleteItem, SelectItem, Container, Tooltip, IconButton, DebouncedTextField, SettingsIcon,
|
|
7
|
+
import { useAutoComplete, Chip, Typography, cls, TextField, Autocomplete, AutocompleteItem, SelectItem, Container, Tooltip, IconButton, DebouncedTextField, SettingsIcon, CloseIcon, Select, BooleanSwitchWithLabel, ExpandablePanel, Dialog, Badge, AutorenewIcon, ListIcon, Button, CircularProgress, Paper, DialogTitle, DialogContent, DialogActions, RuleIcon, MultiSelectItem, CloudUploadIcon, MultiSelect, cardMixin, cardClickableMixin, cardSelectedMixin, FunctionsIcon, DoNotDisturbOnIcon, defaultBorderMixin, RemoveIcon, DragHandleIcon, AddIcon, SelectGroup, DeleteIcon, InfoLabel, fieldBackgroundMixin, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, WarningIcon, Card, ContentCopyIcon, CodeIcon, Table, TableBody, TableRow, TableCell, Alert, Icon, coolIconKeys, Tabs, Tab, ArrowBackIcon, LoadingButton, CheckIcon, Menu, MoreVertIcon, MenuItem, UndoIcon, SaveIcon } from "@firecms/ui";
|
|
8
8
|
import * as Yup from "yup";
|
|
9
9
|
import { useFormex, getIn, Field, useCreateFormex, Formex, clone } from "@firecms/formex";
|
|
10
10
|
import { extractEnumFromValues, buildPropertyFromData, buildEntityPropertiesFromData } from "@firecms/schema_inference";
|
|
@@ -435,7 +435,7 @@ function CollectionDetailsForm(t0) {
|
|
|
435
435
|
const t57 = !values.sideDialogWidth;
|
|
436
436
|
let t58;
|
|
437
437
|
if ($[83] === Symbol.for("react.memo_cache_sentinel")) {
|
|
438
|
-
t58 = /* @__PURE__ */ jsx(
|
|
438
|
+
t58 = /* @__PURE__ */ jsx(CloseIcon, { size: "small" });
|
|
439
439
|
$[83] = t58;
|
|
440
440
|
} else {
|
|
441
441
|
t58 = $[83];
|
|
@@ -1036,7 +1036,7 @@ function EnumFormFields(t0) {
|
|
|
1036
1036
|
let t6;
|
|
1037
1037
|
if ($[15] !== allowDataInference || $[16] !== disabled || $[17] !== inferValues || $[18] !== inferring) {
|
|
1038
1038
|
t6 = allowDataInference && /* @__PURE__ */ jsxs(Button, { loading: inferring, disabled: disabled || inferring, variant: "text", size: "small", onClick: inferValues, children: [
|
|
1039
|
-
inferring ? /* @__PURE__ */ jsx(CircularProgress, { size: "small" }) : /* @__PURE__ */ jsx(
|
|
1039
|
+
inferring ? /* @__PURE__ */ jsx(CircularProgress, { size: "small" }) : /* @__PURE__ */ jsx(AutorenewIcon, {}),
|
|
1040
1040
|
"Infer values from data"
|
|
1041
1041
|
] });
|
|
1042
1042
|
$[15] = allowDataInference;
|
|
@@ -1208,7 +1208,7 @@ const EnumEntry = React__default.memo(function EnumEntryInternal(t0) {
|
|
|
1208
1208
|
const t7 = `${enumValuesPath}[${index}].label`;
|
|
1209
1209
|
let t8;
|
|
1210
1210
|
if ($[15] !== inferredEntry) {
|
|
1211
|
-
t8 = inferredEntry && /* @__PURE__ */ jsx(
|
|
1211
|
+
t8 = inferredEntry && /* @__PURE__ */ jsx(AutorenewIcon, { size: "small" });
|
|
1212
1212
|
$[15] = inferredEntry;
|
|
1213
1213
|
$[16] = t8;
|
|
1214
1214
|
} else {
|
|
@@ -1886,7 +1886,7 @@ function StoragePropertyField(t0) {
|
|
|
1886
1886
|
T1 = ExpandablePanel;
|
|
1887
1887
|
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1888
1888
|
t13 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
1889
|
-
/* @__PURE__ */ jsx(
|
|
1889
|
+
/* @__PURE__ */ jsx(CloudUploadIcon, {}),
|
|
1890
1890
|
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-2", children: "File upload config" })
|
|
1891
1891
|
] });
|
|
1892
1892
|
$[37] = t13;
|
|
@@ -2402,7 +2402,7 @@ function NonEditablePropertyPreview(t0) {
|
|
|
2402
2402
|
}
|
|
2403
2403
|
let t4;
|
|
2404
2404
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2405
|
-
t4 = /* @__PURE__ */ jsx(
|
|
2405
|
+
t4 = /* @__PURE__ */ jsx(DoNotDisturbOnIcon, { color: "disabled", size: "small", className: "absolute -right-2 -top-2" });
|
|
2406
2406
|
$[7] = t4;
|
|
2407
2407
|
} else {
|
|
2408
2408
|
t4 = $[7];
|
|
@@ -2735,7 +2735,7 @@ function PropertyTreeEntry(t0) {
|
|
|
2735
2735
|
}
|
|
2736
2736
|
let t6;
|
|
2737
2737
|
if ($[31] !== isPropertyInferred) {
|
|
2738
|
-
t6 = isPropertyInferred && /* @__PURE__ */ jsx(Tooltip, { title: "Inferred property", children: /* @__PURE__ */ jsx(
|
|
2738
|
+
t6 = isPropertyInferred && /* @__PURE__ */ jsx(Tooltip, { title: "Inferred property", children: /* @__PURE__ */ jsx(AutorenewIcon, { size: "small", className: "p-2" }) });
|
|
2739
2739
|
$[31] = isPropertyInferred;
|
|
2740
2740
|
$[32] = t6;
|
|
2741
2741
|
} else {
|
|
@@ -4936,7 +4936,7 @@ function MarkdownPropertyField(t0) {
|
|
|
4936
4936
|
T1 = ExpandablePanel;
|
|
4937
4937
|
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
4938
4938
|
t12 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
4939
|
-
/* @__PURE__ */ jsx(
|
|
4939
|
+
/* @__PURE__ */ jsx(CloudUploadIcon, {}),
|
|
4940
4940
|
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "ml-2", children: "File upload config" })
|
|
4941
4941
|
] });
|
|
4942
4942
|
$[26] = t12;
|
|
@@ -6359,7 +6359,7 @@ function WidgetSelectViewItem(t0) {
|
|
|
6359
6359
|
}
|
|
6360
6360
|
let t3;
|
|
6361
6361
|
if ($[4] !== shouldWarnChangingDataType) {
|
|
6362
|
-
t3 = shouldWarnChangingDataType && /* @__PURE__ */ jsx(Tooltip, { title: "This widget uses a different data type than the initially selected widget. This can cause errors with existing data.", children: /* @__PURE__ */ jsx(
|
|
6362
|
+
t3 = shouldWarnChangingDataType && /* @__PURE__ */ jsx(Tooltip, { title: "This widget uses a different data type than the initially selected widget. This can cause errors with existing data.", children: /* @__PURE__ */ jsx(WarningIcon, { size: "smallest", className: "w-4" }) });
|
|
6363
6363
|
$[4] = shouldWarnChangingDataType;
|
|
6364
6364
|
$[5] = t3;
|
|
6365
6365
|
} else {
|
|
@@ -6822,7 +6822,7 @@ function CollectionPropertiesEditorForm({
|
|
|
6822
6822
|
extraIcon && /* @__PURE__ */ jsx("div", { className: "ml-4", children: extraIcon }),
|
|
6823
6823
|
/* @__PURE__ */ jsxs("div", { className: "ml-1 mt-2 flex flex-row gap-2", children: [
|
|
6824
6824
|
/* @__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, {}) }) }),
|
|
6825
|
-
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(
|
|
6825
|
+
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, {}) }) }),
|
|
6826
6826
|
/* @__PURE__ */ jsx(Tooltip, { title: "Add new property", asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outlined", onClick: () => setNewPropertyDialogOpen(true), children: /* @__PURE__ */ jsx(AddIcon, {}) }) })
|
|
6827
6827
|
] })
|
|
6828
6828
|
] }),
|
|
@@ -9274,7 +9274,7 @@ function CollectionEditorInternal({
|
|
|
9274
9274
|
isNewCollection && currentView === "import_data_preview" && /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: () => {
|
|
9275
9275
|
setNextMode();
|
|
9276
9276
|
}, children: "Next" }),
|
|
9277
|
-
isNewCollection && (currentView === "details" || currentView === "properties") && /* @__PURE__ */ jsxs(LoadingButton, { variant: "filled", color: "primary", type: "submit", loading: isSubmitting, disabled: isSubmitting || currentView === "details" && !validValues, startIcon: currentView === "properties" ? /* @__PURE__ */ jsx(
|
|
9277
|
+
isNewCollection && (currentView === "details" || currentView === "properties") && /* @__PURE__ */ jsxs(LoadingButton, { variant: "filled", color: "primary", type: "submit", loading: isSubmitting, disabled: isSubmitting || currentView === "details" && !validValues, startIcon: currentView === "properties" ? /* @__PURE__ */ jsx(CheckIcon, {}) : void 0, children: [
|
|
9278
9278
|
currentView === "details" && "Next",
|
|
9279
9279
|
currentView === "properties" && "Create collection"
|
|
9280
9280
|
] }),
|