slice-machine-ui 1.22.2 → 1.22.3-alpha.chore-introduce-css-modules.1

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 (168) hide show
  1. package/.depcheckrc +4 -1
  2. package/.eslintignore +1 -0
  3. package/components/DeleteVariationModal/index.tsx +12 -11
  4. package/components/Forms/CreateSliceModal/CreateSliceModal.tsx +2 -5
  5. package/components/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +9 -5
  6. package/components/Forms/RenameVariationModal/RenameVariationModal.tsx +12 -11
  7. package/components/ItemHeader/index.tsx +1 -0
  8. package/components/ListItem/index.tsx +5 -2
  9. package/components/ScreenshotChangesModal/VariationDropZone.tsx +31 -9
  10. package/components/ScreenshotChangesModal/index.tsx +3 -0
  11. package/components/ScreenshotChangesModal/useCustomScreenshot.tsx +5 -5
  12. package/components/Simulator/index.tsx +9 -3
  13. package/lib/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +2 -2
  14. package/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +2 -2
  15. package/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +12 -20
  16. package/lib/builders/CustomTypeBuilder/TabModal/update.tsx +3 -1
  17. package/lib/builders/CustomTypeBuilder/TabZone/index.tsx +119 -52
  18. package/lib/builders/CustomTypeBuilder/index.tsx +39 -42
  19. package/lib/builders/SliceBuilder/FieldZones/index.tsx +81 -56
  20. package/lib/builders/SliceBuilder/Sidebar/AddVariationModal.tsx +24 -16
  21. package/lib/builders/SliceBuilder/Sidebar/index.tsx +44 -46
  22. package/lib/builders/SliceBuilder/SimulatorButton/index.tsx +4 -28
  23. package/lib/builders/SliceBuilder/index.tsx +10 -96
  24. package/lib/builders/common/Zone/Card/components/Hints/CodeBlock.tsx +5 -1
  25. package/lib/builders/common/Zone/Card/components/NewField.tsx +16 -15
  26. package/lib/builders/common/Zone/Card/index.jsx +2 -0
  27. package/lib/builders/common/Zone/index.jsx +3 -1
  28. package/lib/models/common/ComponentUI.ts +0 -14
  29. package/lib/models/common/CustomType/sliceZone.ts +0 -29
  30. package/lib/models/common/CustomType/tab.ts +10 -142
  31. package/lib/models/common/widgets/Group/ListItem/index.jsx +61 -23
  32. package/out/404.html +1 -1
  33. package/out/_next/static/QLcban0JdGEoFu6NgapR9/_buildManifest.js +1 -0
  34. package/out/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js +1 -0
  35. package/out/_next/static/chunks/183-4feb6bb3eddbc768.js +1 -0
  36. package/out/_next/static/chunks/18539003-7b2711e6c51d6fac.js +97 -0
  37. package/out/_next/static/chunks/1cc2734a-2c5b6c0367fcde86.js +1 -0
  38. package/out/_next/static/chunks/25-8fedd33ad9b6de5b.js +1 -0
  39. package/out/_next/static/chunks/286-ed90373e9a469944.js +1 -0
  40. package/out/_next/static/chunks/318-541db69860d31138.js +1 -0
  41. package/out/_next/static/chunks/{505-3f1cf09a086dcba8.js → 376-0ed5822f8afcaa7c.js} +3 -3
  42. package/out/_next/static/chunks/4c744e84-e3161d754618373f.js +1 -0
  43. package/out/_next/static/chunks/50-cfc2514205b86001.js +1 -0
  44. package/out/_next/static/chunks/543-f8766685f7f451e2.js +1 -0
  45. package/out/_next/static/chunks/59b4e022-7a3b5554b806349f.js +1 -0
  46. package/out/_next/static/chunks/696-b12edad30a3617e5.js +31 -0
  47. package/out/_next/static/chunks/727-15cf3f2fea9a37e5.js +1 -0
  48. package/out/_next/static/chunks/731-501990ebe6a71b32.js +1 -0
  49. package/out/_next/static/chunks/904-ccd8ca3368ce29fc.js +1 -0
  50. package/out/_next/static/chunks/{918-38d08f1e885b222d.js → 918-5bb55fb464e34768.js} +1 -1
  51. package/out/_next/static/chunks/f36c6662-03bb5e9d9aa0b0aa.js +1 -0
  52. package/out/_next/static/chunks/pages/_app-3bb7f58b43c87166.js +430 -0
  53. package/out/_next/static/chunks/pages/changelog-68d115a14f1423d7.js +1 -0
  54. package/out/_next/static/chunks/pages/{changes-52c9d917808d1461.js → changes-1cf9e7888029f113.js} +1 -1
  55. package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-3a37eb3373bb8823.js → [customTypeId]-3f862ad6111a1fc0.js} +1 -1
  56. package/out/_next/static/chunks/pages/{custom-types-2f5664d9492b13fb.js → custom-types-94b8f8dbf7727412.js} +1 -1
  57. package/out/_next/static/chunks/pages/{index-d8e3a2c0d712904f.js → index-64cfb8b0948ba8ef.js} +1 -1
  58. package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-733f3890c0466a05.js → [pageTypeId]-d1ffca11c42f2603.js} +1 -1
  59. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-897ca93c114a1435.js +1 -0
  60. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-73dd999915509965.js +1 -0
  61. package/out/_next/static/chunks/pages/slices-7b09cb5130c63bb3.js +1 -0
  62. package/out/_next/static/css/37153180c3b0dd66.css +1 -0
  63. package/out/_next/static/css/538ecf581b0e7c11.css +1 -0
  64. package/out/_next/static/css/{5da5d3cd7a87c3cf.css → 72465cc1225f28a2.css} +1 -1
  65. package/out/_next/static/css/{77abb01eee0e43a7.css → b22c0750c14cc089.css} +1 -1
  66. package/out/_next/static/css/f8eb526e10bc2441.css +1 -0
  67. package/out/changelog.html +1 -1
  68. package/out/changes.html +1 -1
  69. package/out/custom-types/[customTypeId].html +1 -1
  70. package/out/custom-types.html +1 -1
  71. package/out/index.html +1 -1
  72. package/out/labs.html +1 -1
  73. package/out/page-types/[pageTypeId].html +1 -1
  74. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  75. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  76. package/out/slices.html +1 -1
  77. package/package.json +21 -11
  78. package/pages/slices/[lib]/[sliceName]/[variation]/index.tsx +25 -11
  79. package/pages/slices/[lib]/[sliceName]/[variation]/simulator.tsx +12 -9
  80. package/src/apiClient.ts +7 -6
  81. package/src/components/CodeBlock/CodeBlock.tsx +1 -0
  82. package/src/components/Kbd/Kbd.module.css +10 -0
  83. package/src/components/Kbd/Kbd.module.css.d.ts +5 -0
  84. package/src/components/Kbd/Kbd.tsx +1 -1
  85. package/src/components/Window/Window.tsx +7 -1
  86. package/src/domain/__tests__/customType.test.ts +785 -0
  87. package/src/domain/customType.ts +519 -6
  88. package/src/domain/slice.ts +166 -1
  89. package/src/features/autoSave/AutoSaveStatusIndicator.tsx +43 -0
  90. package/src/features/autoSave/useAutoSave.tsx +177 -0
  91. package/src/features/customTypes/EditDropdown.tsx +3 -0
  92. package/src/features/customTypes/actions/convertCustomToPageType.ts +2 -4
  93. package/src/features/customTypes/customTypesBuilder/CustomTypeProvider.tsx +90 -0
  94. package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +46 -79
  95. package/src/features/customTypes/customTypesMessages.ts +4 -0
  96. package/src/features/slices/actions/addSlicesToSliceZone.ts +2 -7
  97. package/src/features/slices/actions/uploadSliceScreenshot.ts +45 -0
  98. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +5 -5
  99. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +4 -10
  100. package/src/features/slices/sliceBuilder/SliceBuilderProvider.tsx +110 -0
  101. package/src/features/slices/sliceBuilder/actions/deleteVariation.ts +8 -24
  102. package/src/features/slices/sliceBuilder/actions/renameVariation.ts +8 -24
  103. package/src/features/slices/sliceCards/SharedSliceCard.tsx +1 -0
  104. package/src/hooks/useCurrentSlice.tsx +4 -16
  105. package/src/hooks/useScreenshotChangesModal.ts +1 -0
  106. package/src/hooks/useServerState.ts +1 -58
  107. package/src/modules/availableCustomTypes/index.ts +8 -3
  108. package/src/modules/simulator/index.ts +0 -2
  109. package/src/modules/slices/index.ts +32 -25
  110. package/src/modules/slices/selector.ts +30 -0
  111. package/src/modules/useSliceMachineActions.ts +20 -270
  112. package/src/redux/reducer.ts +0 -4
  113. package/src/redux/saga.ts +0 -6
  114. package/src/redux/type.ts +0 -4
  115. package/stylelint.config.js +17 -0
  116. package/test/src/modules/availableCustomTypes/index.test.ts +8 -10
  117. package/test/src/modules/simulator.test.ts +0 -2
  118. package/lib/models/common/CustomType/group.ts +0 -80
  119. package/lib/models/common/Variation.ts +0 -100
  120. package/out/_next/static/3vLhj_JZ10e4rwC2sTZNQ/_buildManifest.js +0 -1
  121. package/out/_next/static/chunks/18539003-4460ccbfe3109578.js +0 -97
  122. package/out/_next/static/chunks/482-49264466566eac99.js +0 -1
  123. package/out/_next/static/chunks/550-c80fd46fb64d1eef.js +0 -1
  124. package/out/_next/static/chunks/80-7b8a97d0122ff74a.js +0 -1
  125. package/out/_next/static/chunks/840-163f8a1040e6820d.js +0 -1
  126. package/out/_next/static/chunks/904-fe1af089657fb0cc.js +0 -1
  127. package/out/_next/static/chunks/958-3d829456f4f5632c.js +0 -1
  128. package/out/_next/static/chunks/pages/_app-f88a66f6532a8e87.js +0 -458
  129. package/out/_next/static/chunks/pages/changelog-4d0f2f1222e403fe.js +0 -1
  130. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-7b17cb59d0db03b5.js +0 -1
  131. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-ef11594ce026b650.js +0 -1
  132. package/out/_next/static/chunks/pages/slices-884a936a9a062a65.js +0 -1
  133. package/out/_next/static/css/1bbf650dfd37ce69.css +0 -1
  134. package/out/_next/static/css/7d650bca12dc4061.css +0 -1
  135. package/out/_next/static/css/cb33580e45d01b59.css +0 -1
  136. package/postcss.config.js +0 -2
  137. package/src/components/Kbd/Kbd.css.ts +0 -16
  138. package/src/domain/__tests__/CustomTypeModel.test.ts +0 -247
  139. package/src/layouts/WithSlice.tsx +0 -26
  140. package/src/modules/screenshots/actions.ts +0 -21
  141. package/src/modules/screenshots/sagas.ts +0 -70
  142. package/src/modules/selectedCustomType/actions.ts +0 -147
  143. package/src/modules/selectedCustomType/index.ts +0 -11
  144. package/src/modules/selectedCustomType/reducer.ts +0 -287
  145. package/src/modules/selectedCustomType/sagas.ts +0 -72
  146. package/src/modules/selectedCustomType/selectors.ts +0 -33
  147. package/src/modules/selectedCustomType/stateHelpers.ts +0 -42
  148. package/src/modules/selectedCustomType/types.ts +0 -9
  149. package/src/modules/selectedSlice/actions.ts +0 -106
  150. package/src/modules/selectedSlice/reducer.ts +0 -175
  151. package/src/modules/selectedSlice/sagas.ts +0 -72
  152. package/src/modules/selectedSlice/selectors.ts +0 -55
  153. package/src/modules/selectedSlice/types.ts +0 -3
  154. package/src/modules/toaster/utils.tsx +0 -23
  155. package/test/lib/models/common/CustomType/sliceZone.test.ts +0 -49
  156. package/test/pages/custom-types.test.tsx +0 -625
  157. package/test/src/modules/selectedCustomType/__fixtures__/model.json +0 -119
  158. package/test/src/modules/selectedCustomType/reducer.test.ts +0 -322
  159. package/test/src/modules/selectedCustomType/sagas.test.ts +0 -89
  160. package/test/src/modules/selectedCustomType/selectors.test.ts +0 -54
  161. package/test/src/modules/selectedSlice/__fixtures__/mocks.json +0 -171
  162. package/test/src/modules/selectedSlice/__fixtures__/model.json +0 -35
  163. package/test/src/modules/selectedSlice/__testutils__/getRefreshStateCreatorPayloadData.ts +0 -72
  164. package/test/src/modules/selectedSlice/__testutils__/getSelectedSliceDummyData.ts +0 -30
  165. package/test/src/modules/selectedSlice/reducer.test.ts +0 -170
  166. package/test/src/modules/selectedSlice/sagas.test.ts +0 -82
  167. package/test/src/modules/toaster/utils.test.ts +0 -50
  168. /package/out/_next/static/{3vLhj_JZ10e4rwC2sTZNQ → QLcban0JdGEoFu6NgapR9}/_ssgManifest.js +0 -0
@@ -11,8 +11,6 @@ import { Groups, GroupSM } from "../Group";
11
11
 
12
12
  import { SlicesSM, SliceZone } from "../Slices";
13
13
 
14
- import { SliceZone as SliceZoneOperations } from "./sliceZone";
15
-
16
14
  export const TabFields = t.array(
17
15
  t.type({
18
16
  key: t.string,
@@ -88,145 +86,15 @@ export const Tabs = {
88
86
  },
89
87
  };
90
88
 
91
- export type TabField = NestableWidget | UID | GroupSM;
92
-
93
- interface OrganisedFields {
94
- fields: ReadonlyArray<{ key: string; value: TabField }>;
95
- groups: ReadonlyArray<{ key: string; value: GroupSM }>;
96
- sliceZone?: DynamicSlices;
97
- }
98
-
99
- export const Tab = {
100
- init(id: string): TabSM {
101
- return { key: id, value: [] };
102
- },
103
- // eslint-disable-next-line @typescript-eslint/ban-types
104
- updateSliceZone(tab: TabSM): Function {
105
- return (mutate: (v: SlicesSM) => TabSM) => {
106
- return {
107
- ...tab,
108
- sliceZone: tab.sliceZone && mutate(tab.sliceZone),
109
- };
110
- };
111
- },
112
- updateGroup(tab: TabSM, groupId: string) {
113
- return (mutate: (v: GroupSM) => GroupSM): TabSM => {
114
- return {
115
- ...tab,
116
- value: tab.value.map((field) => {
117
- if (field.key === groupId && field.value.type === "Group") {
118
- return {
119
- key: groupId,
120
- value: mutate(field.value),
121
- };
122
- }
123
- return field;
124
- }),
125
- };
126
- };
127
- },
128
- addWidget(tab: TabSM, id: string, widget: TabField): TabSM {
129
- const elem = { key: id, value: widget };
130
-
131
- return {
132
- ...tab,
133
- value: [...tab.value, elem],
134
- };
135
- },
136
- replaceWidget(
137
- tab: TabSM,
138
- previousKey: string,
139
- newKey: string,
140
- value: TabField,
141
- ): TabSM {
142
- return {
143
- ...tab,
144
- value: tab.value.map((t) => {
145
- if (t.key === previousKey) {
146
- return {
147
- key: newKey,
148
- value,
149
- };
150
- }
151
- return t;
152
- }),
153
- };
154
- },
155
- reorderWidget(tab: TabSM, start: number, end: number): TabSM {
156
- const reorderedWidget: { key: string; value: TabField } | undefined =
157
- tab.value[start];
158
- // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
159
- if (!reorderedWidget)
160
- throw new Error(`Unable to reorder the widget at index ${start}.`);
161
-
162
- const reorderedArea = tab.value.reduce<
163
- Array<{ key: string; value: TabField }>
164
- >((acc, widget, index: number) => {
165
- const elems = [widget, reorderedWidget];
166
- switch (index) {
167
- case start:
168
- return acc;
169
- case end:
170
- return [...acc, ...(end > start ? elems : elems.reverse())];
171
- default:
172
- return [...acc, widget];
173
- }
174
- }, []);
175
- return {
176
- ...tab,
177
- value: reorderedArea,
178
- };
179
- },
180
- removeWidget(tab: TabSM, id: string): TabSM {
181
- const newTab = {
182
- ...tab,
183
- value: tab.value.filter((e) => e.key !== id),
184
- };
185
- return newTab;
186
- },
187
- createSliceZone(tab: TabSM, key: string): TabSM {
188
- return {
189
- ...tab,
190
- sliceZone: SliceZoneOperations.createEmpty(key),
191
- };
192
- },
193
- deleteSliceZone(tab: TabSM): TabSM {
194
- const { sliceZone: _, ...restTab } = tab;
195
-
196
- return restTab;
197
- },
198
-
199
- organiseFields(tabSM: TabSM) {
200
- const { fields, groups } = tabSM.value.reduce<OrganisedFields>(
201
- (acc: OrganisedFields, current: { key: string; value: TabField }) => {
202
- switch (current.value.type) {
203
- case "UID":
204
- return acc;
205
- case "Group":
206
- return {
207
- ...acc,
208
- groups: [
209
- ...acc.groups,
210
- { key: current.key, value: current.value },
211
- ],
212
- };
213
- return acc;
214
- default:
215
- return {
216
- ...acc,
217
- fields: [
218
- ...acc.fields,
219
- current as { key: string; value: TabField },
220
- ],
221
- };
222
- }
223
- },
224
- { fields: [], groups: [] },
225
- );
226
- return {
227
- fields,
228
- groups,
229
- sliceZone: tabSM.sliceZone,
230
- };
89
+ export const TabFieldsModel = {
90
+ fromSM(field: TabField): NestableWidget | UID | Group {
91
+ switch (field.type) {
92
+ case "Group":
93
+ return Groups.fromSM(field);
94
+ default:
95
+ return field;
96
+ }
231
97
  },
232
98
  };
99
+
100
+ export type TabField = NestableWidget | UID | GroupSM;
@@ -1,4 +1,5 @@
1
1
  import { Fragment, useState } from "react";
2
+ import { flushSync } from "react-dom";
2
3
 
3
4
  import { DragDropContext, Droppable } from "react-beautiful-dnd";
4
5
 
@@ -21,7 +22,14 @@ import sliceBuilderArray from "@lib/models/common/widgets/sliceBuilderArray";
21
22
  import Hint from "@lib/builders/common/Zone/Card/components/Hints";
22
23
 
23
24
  import ListItem from "@components/ListItem";
24
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
25
+ import { useCustomTypeState } from "@src/features/customTypes/customTypesBuilder/CustomTypeProvider";
26
+ import { TabFieldsModel } from "@lib/models/common/CustomType";
27
+ import {
28
+ addGroupField,
29
+ deleteGroupField,
30
+ reorderGroupField,
31
+ updateGroupField,
32
+ } from "@src/domain/customType";
25
33
 
26
34
  /* eslint-disable */
27
35
  const CustomListItem = ({
@@ -40,12 +48,7 @@ const CustomListItem = ({
40
48
  const [selectMode, setSelectMode] = useState(false);
41
49
  const [newFieldData, setNewFieldData] = useState(null);
42
50
  const [editModalData, setEditModalData] = useState({ isOpen: false });
43
- const {
44
- addFieldIntoGroup,
45
- deleteFieldIntoGroup,
46
- replaceFieldIntoGroup,
47
- reorderFieldIntoGroup,
48
- } = useSliceMachineActions();
51
+ const { customType, setCustomType } = useCustomTypeState();
49
52
 
50
53
  const onSelectFieldType = (widgetTypeName) => {
51
54
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
@@ -68,8 +71,16 @@ const CustomListItem = ({
68
71
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment
69
72
  const newWidget = widget.create(label);
70
73
 
71
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-argument
72
- addFieldIntoGroup(tabId, groupItem.key, id, newWidget);
74
+ const newField = TabFieldsModel.fromSM(newWidget);
75
+ const newCustomType = addGroupField({
76
+ customType,
77
+ sectionId: tabId,
78
+ groupFieldId: groupItem.key,
79
+ newField,
80
+ newFieldId: id,
81
+ });
82
+
83
+ setCustomType(newCustomType);
73
84
  };
74
85
 
75
86
  const onSaveField = ({ apiId: previousKey, newKey, value }) => {
@@ -77,8 +88,18 @@ const CustomListItem = ({
77
88
  if (ensureWidgetTypeExistence(Widgets, value.type)) {
78
89
  return;
79
90
  }
80
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-argument
81
- replaceFieldIntoGroup(tabId, groupItem.key, previousKey, newKey, value);
91
+
92
+ const newField = TabFieldsModel.fromSM(value);
93
+ const newCustomType = updateGroupField({
94
+ customType,
95
+ sectionId: tabId,
96
+ groupFieldId: groupItem.key,
97
+ previousFieldId: previousKey,
98
+ newFieldId: newKey,
99
+ newField,
100
+ });
101
+
102
+ setCustomType(newCustomType);
82
103
  };
83
104
 
84
105
  const onDragEnd = (result) => {
@@ -87,21 +108,37 @@ const CustomListItem = ({
87
108
  return;
88
109
  }
89
110
 
90
- reorderFieldIntoGroup(
91
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
92
- tabId,
93
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
94
- groupItem.key,
95
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
96
- result.source.index,
97
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
98
- result.destination.index,
99
- );
111
+ const { source, destination } = result;
112
+ if (!destination) {
113
+ return;
114
+ }
115
+
116
+ const { index: sourceIndex } = source;
117
+ const { index: destinationIndex } = destination;
118
+
119
+ const newCustomType = reorderGroupField({
120
+ customType,
121
+ sectionId: tabId,
122
+ groupFieldId: groupItem.key,
123
+ sourceIndex,
124
+ destinationIndex,
125
+ });
126
+
127
+ // When removing redux and replacing it by a simple useState, react-beautiful-dnd (that is deprecated library) was making the fields flickering on reorder.
128
+ // The problem seems to come from the react non-synchronous way to handle our state update that didn't work well with the library.
129
+ // It's a hack and since it's used on an old pure JavaScript code with a deprecated library it will be removed when updating the UI of the fields.
130
+ flushSync(() => setCustomType(newCustomType));
100
131
  };
101
132
 
102
133
  const onDeleteItem = (key) => {
103
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
104
- deleteFieldIntoGroup(tabId, groupItem.key, key);
134
+ const newCustomType = deleteGroupField({
135
+ customType,
136
+ sectionId: tabId,
137
+ groupFieldId: groupItem.key,
138
+ fieldId: key,
139
+ });
140
+
141
+ setCustomType(newCustomType);
105
142
  };
106
143
 
107
144
  const enterEditMode = (field) => {
@@ -172,6 +209,7 @@ const CustomListItem = ({
172
209
  `data.${groupItem.key}.${key}`,
173
210
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions
174
211
  draggableId: `group-${groupItem.key}-${item.key}-${index}`,
212
+ dataCy: `list-item-group-${groupItem.key}-${item.key}`,
175
213
  };
176
214
 
177
215
  const HintElement = (
package/out/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/1bbf650dfd37ce69.css" as="style"/><link rel="stylesheet" href="/_next/static/css/1bbf650dfd37ce69.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f88a66f6532a8e87.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/3vLhj_JZ10e4rwC2sTZNQ/_buildManifest.js" defer=""></script><script src="/_next/static/3vLhj_JZ10e4rwC2sTZNQ/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"3vLhj_JZ10e4rwC2sTZNQ","runtimeConfig":{"sentryEnvironment":"production"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/538ecf581b0e7c11.css" as="style"/><link rel="stylesheet" href="/_next/static/css/538ecf581b0e7c11.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-3bb7f58b43c87166.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/QLcban0JdGEoFu6NgapR9/_buildManifest.js" defer=""></script><script src="/_next/static/QLcban0JdGEoFu6NgapR9/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"QLcban0JdGEoFu6NgapR9","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -0,0 +1 @@
1
+ self.__BUILD_MANIFEST=function(s,c,a,e,t,i,f,b,n,u,d,h,l,k,j,p,g,o,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[a,j,p,"static/chunks/pages/index-64cfb8b0948ba8ef.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":[s,e,"static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-68d115a14f1423d7.js"],"/changes":[s,t,"static/chunks/8eec4907-b712959d9f984b68.js",i,"static/chunks/918-5bb55fb464e34768.js",c,b,"static/css/37153180c3b0dd66.css","static/chunks/pages/changes-1cf9e7888029f113.js"],"/custom-types":[a,j,p,"static/chunks/pages/custom-types-94b8f8dbf7727412.js"],"/custom-types/[customTypeId]":[s,n,u,d,h,e,f,i,l,g,c,a,k,o,r,"static/chunks/pages/custom-types/[customTypeId]-3f862ad6111a1fc0.js"],"/labs":["static/chunks/pages/labs-526bb7d60a1b90f4.js"],"/page-types/[pageTypeId]":[s,n,u,d,h,e,f,i,l,g,c,a,k,o,r,"static/chunks/pages/page-types/[pageTypeId]-d1ffca11c42f2603.js"],"/slices":[s,t,f,c,b,"static/css/f8eb526e10bc2441.css","static/chunks/pages/slices-7b09cb5130c63bb3.js"],"/slices/[lib]/[sliceName]/[variation]":[s,t,n,u,d,h,e,f,i,l,c,k,b,"static/css/b22c0750c14cc089.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-73dd999915509965.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[t,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-7b2711e6c51d6fac.js","static/chunks/376-0ed5822f8afcaa7c.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-897ca93c114a1435.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/59b4e022-7a3b5554b806349f.js","static/chunks/25-8fedd33ad9b6de5b.js","static/chunks/731-501990ebe6a71b32.js","static/chunks/183-4feb6bb3eddbc768.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/543-f8766685f7f451e2.js","static/chunks/50-cfc2514205b86001.js","static/chunks/286-ed90373e9a469944.js","static/chunks/f36c6662-03bb5e9d9aa0b0aa.js","static/chunks/4c744e84-e3161d754618373f.js","static/chunks/065a3ddb-9a38ca0d60f0bf2f.js","static/chunks/1cc2734a-2c5b6c0367fcde86.js","static/chunks/696-b12edad30a3617e5.js","static/chunks/318-541db69860d31138.js","static/chunks/727-15cf3f2fea9a37e5.js","static/css/be1f49e49a5aa7eb.css","static/chunks/474-5a072e6fac61f703.js","static/chunks/904-ccd8ca3368ce29fc.js","static/css/72465cc1225f28a2.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[461],{77245:function(c,t,h){h.d(t,{LhG:function(){return u}});var n=h(68281);function u(c){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 2H10c-1.103 0-2 .897-2 2v4H4c-1.103 0-2 .897-2 2v10c0 1.103.897 2 2 2h10c1.103 0 2-.897 2-2v-4h4c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2zM4 20V10h10l.002 10H4zm16-6h-4v-4c0-1.103-.897-2-2-2h-4V4h10v10z"}}]})(c)}}}]);