@firecms/collection_editor 3.0.0-3.0.0-beta.4.pre.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/ConfigControllerProvider.d.ts +37 -0
  4. package/dist/index.d.ts +11 -0
  5. package/dist/index.es.js +5454 -0
  6. package/dist/index.es.js.map +1 -0
  7. package/dist/index.umd.js +4 -0
  8. package/dist/index.umd.js.map +1 -0
  9. package/dist/types/collection_editor_controller.d.ts +36 -0
  10. package/dist/types/collection_inference.d.ts +2 -0
  11. package/dist/types/config_controller.d.ts +51 -0
  12. package/dist/types/config_permissions.d.ts +19 -0
  13. package/dist/types/persisted_collection.d.ts +6 -0
  14. package/dist/ui/CollectionViewHeaderAction.d.ts +10 -0
  15. package/dist/ui/EditorCollectionAction.d.ts +2 -0
  16. package/dist/ui/HomePageEditorCollectionAction.d.ts +2 -0
  17. package/dist/ui/MissingReferenceWidget.d.ts +3 -0
  18. package/dist/ui/NewCollectionButton.d.ts +1 -0
  19. package/dist/ui/NewCollectionCard.d.ts +2 -0
  20. package/dist/ui/PropertyAddColumnComponent.d.ts +6 -0
  21. package/dist/ui/RootCollectionSuggestions.d.ts +3 -0
  22. package/dist/ui/collection_editor/CollectionDetailsForm.d.ts +10 -0
  23. package/dist/ui/collection_editor/CollectionEditorDialog.d.ts +36 -0
  24. package/dist/ui/collection_editor/CollectionEditorWelcomeView.d.ts +15 -0
  25. package/dist/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +19 -0
  26. package/dist/ui/collection_editor/CollectionYupValidation.d.ts +14 -0
  27. package/dist/ui/collection_editor/EntityCustomViewsSelectDialog.d.ts +4 -0
  28. package/dist/ui/collection_editor/EnumForm.d.ts +12 -0
  29. package/dist/ui/collection_editor/GetCodeDialog.d.ts +5 -0
  30. package/dist/ui/collection_editor/PropertyEditView.d.ts +40 -0
  31. package/dist/ui/collection_editor/PropertyFieldPreview.d.ts +15 -0
  32. package/dist/ui/collection_editor/PropertySelectItem.d.ts +8 -0
  33. package/dist/ui/collection_editor/PropertyTree.d.ts +33 -0
  34. package/dist/ui/collection_editor/SubcollectionsEditTab.d.ts +12 -0
  35. package/dist/ui/collection_editor/SwitchControl.d.ts +8 -0
  36. package/dist/ui/collection_editor/UnsavedChangesDialog.d.ts +9 -0
  37. package/dist/ui/collection_editor/import/CollectionEditorImportDataPreview.d.ts +7 -0
  38. package/dist/ui/collection_editor/import/CollectionEditorImportMapping.d.ts +7 -0
  39. package/dist/ui/collection_editor/import/clean_import_data.d.ts +7 -0
  40. package/dist/ui/collection_editor/properties/BlockPropertyField.d.ts +8 -0
  41. package/dist/ui/collection_editor/properties/BooleanPropertyField.d.ts +3 -0
  42. package/dist/ui/collection_editor/properties/CommonPropertyFields.d.ts +10 -0
  43. package/dist/ui/collection_editor/properties/DateTimePropertyField.d.ts +3 -0
  44. package/dist/ui/collection_editor/properties/EnumPropertyField.d.ts +8 -0
  45. package/dist/ui/collection_editor/properties/KeyValuePropertyField.d.ts +3 -0
  46. package/dist/ui/collection_editor/properties/MapPropertyField.d.ts +8 -0
  47. package/dist/ui/collection_editor/properties/NumberPropertyField.d.ts +3 -0
  48. package/dist/ui/collection_editor/properties/ReferencePropertyField.d.ts +13 -0
  49. package/dist/ui/collection_editor/properties/RepeatPropertyField.d.ts +10 -0
  50. package/dist/ui/collection_editor/properties/StoragePropertyField.d.ts +5 -0
  51. package/dist/ui/collection_editor/properties/StringPropertyField.d.ts +5 -0
  52. package/dist/ui/collection_editor/properties/UrlPropertyField.d.ts +4 -0
  53. package/dist/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.d.ts +3 -0
  54. package/dist/ui/collection_editor/properties/validation/ArrayPropertyValidation.d.ts +5 -0
  55. package/dist/ui/collection_editor/properties/validation/GeneralPropertyValidation.d.ts +4 -0
  56. package/dist/ui/collection_editor/properties/validation/NumberPropertyValidation.d.ts +3 -0
  57. package/dist/ui/collection_editor/properties/validation/StringPropertyValidation.d.ts +11 -0
  58. package/dist/ui/collection_editor/properties/validation/ValidationPanel.d.ts +2 -0
  59. package/dist/ui/collection_editor/templates/blog_template.d.ts +2 -0
  60. package/dist/ui/collection_editor/templates/pages_template.d.ts +2 -0
  61. package/dist/ui/collection_editor/templates/products_template.d.ts +2 -0
  62. package/dist/ui/collection_editor/templates/users_template.d.ts +2 -0
  63. package/dist/ui/collection_editor/util.d.ts +5 -0
  64. package/dist/ui/collection_editor/utils/strings.d.ts +1 -0
  65. package/dist/ui/collection_editor/utils/supported_fields.d.ts +3 -0
  66. package/dist/ui/collection_editor/utils/update_property_for_widget.d.ts +2 -0
  67. package/dist/ui/collection_editor/utils/useTraceUpdate.d.ts +1 -0
  68. package/dist/useCollectionEditorController.d.ts +6 -0
  69. package/dist/useCollectionEditorPlugin.d.ts +49 -0
  70. package/dist/useCollectionsConfigController.d.ts +6 -0
  71. package/dist/utils/arrays.d.ts +1 -0
  72. package/dist/utils/entities.d.ts +3 -0
  73. package/package.json +85 -0
  74. package/src/ConfigControllerProvider.tsx +338 -0
  75. package/src/index.ts +35 -0
  76. package/src/types/collection_editor_controller.tsx +43 -0
  77. package/src/types/collection_inference.ts +3 -0
  78. package/src/types/config_controller.tsx +60 -0
  79. package/src/types/config_permissions.ts +20 -0
  80. package/src/types/persisted_collection.ts +9 -0
  81. package/src/ui/CollectionViewHeaderAction.tsx +43 -0
  82. package/src/ui/EditorCollectionAction.tsx +109 -0
  83. package/src/ui/HomePageEditorCollectionAction.tsx +84 -0
  84. package/src/ui/MissingReferenceWidget.tsx +37 -0
  85. package/src/ui/NewCollectionButton.tsx +16 -0
  86. package/src/ui/NewCollectionCard.tsx +48 -0
  87. package/src/ui/PropertyAddColumnComponent.tsx +42 -0
  88. package/src/ui/RootCollectionSuggestions.tsx +63 -0
  89. package/src/ui/collection_editor/CollectionDetailsForm.tsx +365 -0
  90. package/src/ui/collection_editor/CollectionEditorDialog.tsx +801 -0
  91. package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +213 -0
  92. package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +506 -0
  93. package/src/ui/collection_editor/CollectionYupValidation.tsx +7 -0
  94. package/src/ui/collection_editor/EntityCustomViewsSelectDialog.tsx +37 -0
  95. package/src/ui/collection_editor/EnumForm.tsx +357 -0
  96. package/src/ui/collection_editor/GetCodeDialog.tsx +110 -0
  97. package/src/ui/collection_editor/PropertyEditView.tsx +615 -0
  98. package/src/ui/collection_editor/PropertyFieldPreview.tsx +207 -0
  99. package/src/ui/collection_editor/PropertySelectItem.tsx +32 -0
  100. package/src/ui/collection_editor/PropertyTree.tsx +252 -0
  101. package/src/ui/collection_editor/SubcollectionsEditTab.tsx +262 -0
  102. package/src/ui/collection_editor/SwitchControl.tsx +39 -0
  103. package/src/ui/collection_editor/UnsavedChangesDialog.tsx +47 -0
  104. package/src/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +37 -0
  105. package/src/ui/collection_editor/import/CollectionEditorImportMapping.tsx +268 -0
  106. package/src/ui/collection_editor/import/clean_import_data.ts +53 -0
  107. package/src/ui/collection_editor/properties/BlockPropertyField.tsx +138 -0
  108. package/src/ui/collection_editor/properties/BooleanPropertyField.tsx +40 -0
  109. package/src/ui/collection_editor/properties/CommonPropertyFields.tsx +110 -0
  110. package/src/ui/collection_editor/properties/DateTimePropertyField.tsx +86 -0
  111. package/src/ui/collection_editor/properties/EnumPropertyField.tsx +114 -0
  112. package/src/ui/collection_editor/properties/KeyValuePropertyField.tsx +20 -0
  113. package/src/ui/collection_editor/properties/MapPropertyField.tsx +150 -0
  114. package/src/ui/collection_editor/properties/NumberPropertyField.tsx +38 -0
  115. package/src/ui/collection_editor/properties/ReferencePropertyField.tsx +160 -0
  116. package/src/ui/collection_editor/properties/RepeatPropertyField.tsx +109 -0
  117. package/src/ui/collection_editor/properties/StoragePropertyField.tsx +200 -0
  118. package/src/ui/collection_editor/properties/StringPropertyField.tsx +79 -0
  119. package/src/ui/collection_editor/properties/UrlPropertyField.tsx +89 -0
  120. package/src/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +45 -0
  121. package/src/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +50 -0
  122. package/src/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +61 -0
  123. package/src/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +115 -0
  124. package/src/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +150 -0
  125. package/src/ui/collection_editor/properties/validation/ValidationPanel.tsx +28 -0
  126. package/src/ui/collection_editor/templates/blog_template.ts +115 -0
  127. package/src/ui/collection_editor/templates/pages_template.ts +188 -0
  128. package/src/ui/collection_editor/templates/products_template.ts +88 -0
  129. package/src/ui/collection_editor/templates/users_template.ts +42 -0
  130. package/src/ui/collection_editor/util.ts +28 -0
  131. package/src/ui/collection_editor/utils/strings.ts +9 -0
  132. package/src/ui/collection_editor/utils/supported_fields.tsx +29 -0
  133. package/src/ui/collection_editor/utils/update_property_for_widget.ts +271 -0
  134. package/src/ui/collection_editor/utils/useTraceUpdate.tsx +23 -0
  135. package/src/useCollectionEditorController.tsx +9 -0
  136. package/src/useCollectionEditorPlugin.tsx +154 -0
  137. package/src/useCollectionsConfigController.tsx +9 -0
  138. package/src/utils/arrays.ts +3 -0
  139. package/src/utils/entities.ts +38 -0
  140. package/src/vite-env.d.ts +1 -0
@@ -0,0 +1,365 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import { EntityCollection, FieldCaption, IconForView, SearchIconsView, singular, toSnakeCase, } from "@firecms/core";
3
+ import {
4
+ Autocomplete,
5
+ AutocompleteItem,
6
+ BooleanSwitchWithLabel,
7
+ Chip,
8
+ cn,
9
+ Container,
10
+ DebouncedTextField,
11
+ Dialog,
12
+ ExpandablePanel,
13
+ IconButton,
14
+ Select,
15
+ SelectItem,
16
+ SettingsIcon,
17
+ TextField,
18
+ Tooltip,
19
+ Typography,
20
+ useAutoComplete
21
+ } from "@firecms/ui";
22
+
23
+ import { Field, getIn, useFormex } from "@firecms/formex";
24
+
25
+ export function CollectionDetailsForm({
26
+ isNewCollection,
27
+ reservedGroups,
28
+ existingPaths,
29
+ existingIds,
30
+ groups,
31
+ parentCollection
32
+ }: {
33
+ isNewCollection: boolean,
34
+ reservedGroups?: string[];
35
+ existingPaths?: string[];
36
+ existingIds?: string[];
37
+ groups: string[] | null;
38
+ parentCollection?: EntityCollection;
39
+ parentCollectionIds?: string[];
40
+ }) {
41
+
42
+ const groupRef = React.useRef<HTMLInputElement>(null);
43
+ const {
44
+ values,
45
+ setFieldValue,
46
+ handleChange,
47
+ touched,
48
+ errors,
49
+ setFieldTouched,
50
+ isSubmitting,
51
+ submitCount
52
+ } = useFormex<EntityCollection>();
53
+
54
+ const [iconDialogOpen, setIconDialogOpen] = useState(false);
55
+ const [advancedPanelExpanded, setAdvancedPanelExpanded] = useState(false);
56
+
57
+ const updateName = (name: string) => {
58
+ setFieldValue("name", name);
59
+
60
+ const pathTouched = getIn(touched, "path");
61
+ if (!pathTouched && isNewCollection && name) {
62
+ setFieldValue("path", toSnakeCase(name));
63
+ }
64
+
65
+ const idTouched = getIn(touched, "id");
66
+ if (!idTouched && isNewCollection && name) {
67
+ setFieldValue("id", toSnakeCase(name));
68
+ }
69
+
70
+ const singularNameTouched = getIn(touched, "singularName");
71
+ if (!singularNameTouched && isNewCollection && name) {
72
+ setFieldValue("singularName", singular(name));
73
+ }
74
+
75
+ };
76
+
77
+ useEffect(() => {
78
+ if (errors.id) {
79
+ setAdvancedPanelExpanded(true);
80
+ }
81
+ }, [errors.id]);
82
+
83
+ const collectionIcon = <IconForView collectionOrView={values}/>;
84
+
85
+ const groupOptions = groups?.filter((group) => !reservedGroups?.includes(group));
86
+
87
+ const {
88
+ inputFocused,
89
+ autoCompleteOpen,
90
+ setAutoCompleteOpen
91
+ } = useAutoComplete({
92
+ ref: groupRef
93
+ });
94
+
95
+ const isSubcollection = !!parentCollection;
96
+
97
+ let customIdValue: "true" | "false" | "optional" | "code_defined" | undefined;
98
+ if (typeof values.customId === "object") {
99
+ customIdValue = "code_defined";
100
+ } else if (values.customId === true) {
101
+ customIdValue = "true";
102
+ } else if (values.customId === false) {
103
+ customIdValue = "false";
104
+ } else if (values.customId === "optional") {
105
+ customIdValue = "optional";
106
+ }
107
+
108
+ const showErrors = submitCount > 0;
109
+ return (
110
+ <div className={"overflow-auto my-auto"}>
111
+ <Container maxWidth={"4xl"} className={"flex flex-col gap-4 p-8 m-auto"}>
112
+
113
+ <div>
114
+ <div
115
+ className="flex flex-row py-2 pt-3 items-center">
116
+ <Typography variant={!isNewCollection ? "h5" : "h4"} className={"flex-grow"}>
117
+ {isNewCollection ? "New collection" : `${values?.name} collection`}
118
+ </Typography>
119
+ <Tooltip title={"Change icon"}>
120
+ <IconButton
121
+ shape={"square"}
122
+ onClick={() => setIconDialogOpen(true)}>
123
+ {collectionIcon}
124
+ </IconButton>
125
+ </Tooltip>
126
+ </div>
127
+
128
+ {parentCollection && <Chip colorScheme={"tealDarker"}>
129
+ <Typography variant={"caption"}>
130
+ This is a subcollection of <b>{parentCollection.name}</b>
131
+ </Typography>
132
+ </Chip>}
133
+
134
+ </div>
135
+ <div className={"grid grid-cols-12 gap-4"}>
136
+
137
+ <div className={"col-span-12"}>
138
+ <TextField
139
+ value={values.name ?? ""}
140
+ onChange={(e: any) => updateName(e.target.value)}
141
+ label={"Name"}
142
+ required
143
+ error={showErrors && Boolean(errors.name)}/>
144
+ <FieldCaption error={touched.name && Boolean(errors.name)}>
145
+ {touched.name && Boolean(errors.name) ? errors.name : "Name of in this collection, usually a plural name (e.g. Products)"}
146
+ </FieldCaption>
147
+ </div>
148
+
149
+ <div className={cn("col-span-12 ", isSubcollection ? "" : "sm:col-span-8")}>
150
+ <Field name={"path"}
151
+ as={DebouncedTextField}
152
+ label={"Path"}
153
+ disabled={!isNewCollection}
154
+ required
155
+ error={showErrors && Boolean(errors.path)}/>
156
+
157
+ <FieldCaption error={touched.path && Boolean(errors.path)}>
158
+ {touched.path && Boolean(errors.path)
159
+ ? errors.path
160
+ : isSubcollection ? "Relative path to the parent (no need to include the parent path)" : "Path that this collection is stored in, in the database"}
161
+ </FieldCaption>
162
+
163
+ </div>
164
+
165
+ {!isSubcollection && <div className={"col-span-12 sm:col-span-4 relative"}>
166
+
167
+ <TextField error={showErrors && Boolean(errors.group)}
168
+ disabled={isSubmitting}
169
+ value={values.group ?? ""}
170
+ autoComplete="off"
171
+ onChange={(event) => setFieldValue("group", event.target.value)}
172
+ name={"group"}
173
+ inputRef={groupRef}
174
+ label="Group"/>
175
+ <Autocomplete
176
+ open={autoCompleteOpen && (groupOptions ?? []).length > 0}
177
+ setOpen={setAutoCompleteOpen}>
178
+ {groupOptions?.map((group, index) => {
179
+ return <AutocompleteItem
180
+ key={index + "_" + group}
181
+ onClick={() => {
182
+ setAutoCompleteOpen(false);
183
+ setFieldValue("group", group ?? null);
184
+ }}
185
+ >
186
+ <div className={"flex-grow"}>
187
+ {group}
188
+ </div>
189
+ </AutocompleteItem>;
190
+ })}
191
+ </Autocomplete>
192
+ <FieldCaption>
193
+ {showErrors && Boolean(errors.group) ? errors.group : "Group of the collection"}
194
+ </FieldCaption>
195
+ </div>}
196
+
197
+ <div className={"col-span-12"}>
198
+ <ExpandablePanel
199
+ expanded={advancedPanelExpanded}
200
+ onExpandedChange={setAdvancedPanelExpanded}
201
+ title={
202
+ <div className="flex flex-row text-gray-500">
203
+ <SettingsIcon/>
204
+ <Typography variant={"subtitle2"}
205
+ className="ml-2">
206
+ Advanced
207
+ </Typography>
208
+ </div>}
209
+ initiallyExpanded={false}>
210
+ <div className={"grid grid-cols-12 gap-4 p-4"}>
211
+
212
+ <div className={"col-span-12"}>
213
+ <Field name={"id"}
214
+ as={DebouncedTextField}
215
+ disabled={!isNewCollection}
216
+ label={"Collection id"}
217
+ error={showErrors && Boolean(errors.id)}/>
218
+ <FieldCaption error={touched.id && Boolean(errors.id)}>
219
+ {touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection"}
220
+ </FieldCaption>
221
+ </div>
222
+
223
+ <div className={"col-span-12"}>
224
+ <TextField
225
+ error={showErrors && Boolean(errors.singularName)}
226
+ name={"singularName"}
227
+ aria-describedby={"singularName-helper"}
228
+ onChange={(e) => {
229
+ setFieldTouched("singularName", true);
230
+ return handleChange(e);
231
+ }}
232
+ value={values.singularName ?? ""}
233
+ label={"Singular name"}/>
234
+ <FieldCaption error={showErrors && Boolean(errors.singularName)}>
235
+ {showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities"}
236
+ </FieldCaption>
237
+ </div>
238
+ <div className={"col-span-12"}>
239
+ <TextField
240
+ error={showErrors && Boolean(errors.description)}
241
+ name="description"
242
+ value={values.description ?? ""}
243
+ onChange={handleChange}
244
+ multiline
245
+ rows={2}
246
+ aria-describedby="description-helper-text"
247
+ label="Description"
248
+ />
249
+ <FieldCaption error={showErrors && Boolean(errors.description)}>
250
+ {showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown"}
251
+ </FieldCaption>
252
+ </div>
253
+
254
+ <div className={"col-span-12"}>
255
+ <Select
256
+ name="defaultSize"
257
+ label="Default row size"
258
+ position={"item-aligned"}
259
+ onChange={handleChange}
260
+ value={values.defaultSize ?? ""}
261
+ renderValue={(value: any) => value.toUpperCase()}
262
+ >
263
+ {["xs", "s", "m", "l", "xl"].map((value) => (
264
+ <SelectItem
265
+ key={`size-select-${value}`}
266
+ value={value}>
267
+ {value.toUpperCase()}
268
+ </SelectItem>
269
+ ))}
270
+ </Select>
271
+ </div>
272
+ <div className={"col-span-12"}>
273
+ <Select
274
+ name="customId"
275
+ label="Data IDs generation"
276
+ position={"item-aligned"}
277
+ disabled={customIdValue === "code_defined"}
278
+ onValueChange={(v) => {
279
+ if (v === "code_defined")
280
+ throw new Error("This should not happen");
281
+ else if (v === "true")
282
+ setFieldValue("customId", true);
283
+ else if (v === "false")
284
+ setFieldValue("customId", false);
285
+ else if (v === "optional")
286
+ setFieldValue("customId", "optional");
287
+ }}
288
+ value={customIdValue ?? ""}
289
+ renderValue={(value: any) => {
290
+ if (value === "code_defined")
291
+ return "Code defined";
292
+ else if (value === "true")
293
+ return "Users must define an ID";
294
+ else if (value === "optional")
295
+ return "Users can define an ID, but it is not required";
296
+ else
297
+ return "Document ID is generated automatically";
298
+ }}
299
+ >
300
+ <SelectItem value={"false"}>
301
+ Document ID is generated automatically
302
+ </SelectItem>
303
+ <SelectItem value={"true"}>
304
+ Users must define an ID
305
+ </SelectItem>
306
+ <SelectItem value={"optional"}>
307
+ Users can define an ID, but it is not required
308
+ </SelectItem>
309
+ </Select>
310
+ </div>
311
+ <div className={"col-span-12"}>
312
+ <BooleanSwitchWithLabel
313
+ position={"start"}
314
+ label="Collection group"
315
+ onValueChange={(v) => setFieldValue("collectionGroup", v)}
316
+ value={values.collectionGroup ?? false}
317
+ />
318
+ <FieldCaption>
319
+ A collection group consists of all collections with the same path. This allows
320
+ you
321
+ to query over multiple collections at once.
322
+ </FieldCaption>
323
+ </div>
324
+ <div className={"col-span-12"}>
325
+ <BooleanSwitchWithLabel
326
+ position={"start"}
327
+ label="Enable text search for this collection"
328
+ onValueChange={(v) => setFieldValue("textSearchEnabled", v)}
329
+ value={values.textSearchEnabled ?? false}
330
+ />
331
+ <FieldCaption>
332
+ Allow text search for this collection. If you have not specified a text search
333
+ delegate, this will use the built-in local text search. This is not recommended
334
+ for large collections, as it may incur in performance and cost issues.
335
+ </FieldCaption>
336
+ </div>
337
+ </div>
338
+ </ExpandablePanel>
339
+
340
+ </div>
341
+
342
+ </div>
343
+
344
+ <div style={{ height: "52px" }}/>
345
+
346
+ <Dialog
347
+ open={iconDialogOpen}
348
+ onOpenChange={setIconDialogOpen}
349
+ maxWidth={"xl"}
350
+ fullWidth
351
+ >
352
+ <div className={"p-4 overflow-auto min-h-[200px]"}>
353
+ <SearchIconsView selectedIcon={values.icon}
354
+ onIconSelected={(icon: string) => {
355
+ setIconDialogOpen(false);
356
+ setFieldValue("icon", icon);
357
+ }}/>
358
+ </div>
359
+
360
+ </Dialog>
361
+
362
+ </Container>
363
+ </div>
364
+ );
365
+ }