impaktapps-ui-builder 0.0.101-alpha.217 → 0.0.101-alpha.219
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/impaktapps-ui-builder.es.js +19 -16
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +5 -5
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +22 -27
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +1 -60
- package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +0 -52
- package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +0 -50
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +19 -21
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +1 -175
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +0 -81
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +0 -58
- package/src/impaktapps-ui-builder/builder/services/component.ts +24 -24
- package/src/impaktapps-ui-builder/runtime/services/service.ts +0 -107
|
@@ -235,67 +235,9 @@ export const EventUiSchema: any = (theme) => {
|
|
|
235
235
|
},
|
|
236
236
|
},
|
|
237
237
|
]
|
|
238
|
-
// }]
|
|
239
238
|
}
|
|
240
239
|
],
|
|
241
240
|
},
|
|
242
|
-
// {
|
|
243
|
-
// type: "HorizontalLayout",
|
|
244
|
-
// config: {
|
|
245
|
-
// layout:{xs:12,sm: 6}
|
|
246
|
-
// },
|
|
247
|
-
// elements: [
|
|
248
|
-
// {
|
|
249
|
-
// type: "Control",
|
|
250
|
-
// scope: "#/properties/RemoveItemButton",
|
|
251
|
-
// options: {
|
|
252
|
-
// widget: "IconButton",
|
|
253
|
-
// },
|
|
254
|
-
// config: {
|
|
255
|
-
// layout: { xs: 1, sm: 1 },
|
|
256
|
-
// main: {
|
|
257
|
-
// onClick: "RemoveItemButton",
|
|
258
|
-
// size: "large",
|
|
259
|
-
// icon: "RejectIcon",
|
|
260
|
-
// styleDefault: true,
|
|
261
|
-
// },
|
|
262
|
-
// style:{
|
|
263
|
-
// marginLeft: "-10px"
|
|
264
|
-
// }
|
|
265
|
-
// },
|
|
266
|
-
// },
|
|
267
|
-
// {
|
|
268
|
-
// type: "Control",
|
|
269
|
-
// scope: "#/properties/copiedElementDetails",
|
|
270
|
-
|
|
271
|
-
// options: {
|
|
272
|
-
// widget: "Box",
|
|
273
|
-
// },
|
|
274
|
-
// config: {
|
|
275
|
-
// layout: { xs: 6, sm: 6 },
|
|
276
|
-
// main: {
|
|
277
|
-
// heading: "No element copied",
|
|
278
|
-
// },
|
|
279
|
-
// style: {
|
|
280
|
-
// color: "#535557",
|
|
281
|
-
// marginLeft: "-10px",
|
|
282
|
-
// fontSize: "12px",
|
|
283
|
-
// marginTop: "4px"
|
|
284
|
-
// },
|
|
285
|
-
// },
|
|
286
|
-
// },
|
|
287
|
-
// {
|
|
288
|
-
// type: "Control",
|
|
289
|
-
// scope: "#/properties/EmptyBox",
|
|
290
|
-
// options: {
|
|
291
|
-
// widget: "EmptyBox",
|
|
292
|
-
// },
|
|
293
|
-
// config: {
|
|
294
|
-
// layout: { xs: 1, sm: 5 },
|
|
295
|
-
// },
|
|
296
|
-
// },
|
|
297
|
-
// ]
|
|
298
|
-
// },
|
|
299
241
|
{
|
|
300
242
|
type: "WrapperLayout",
|
|
301
243
|
config: {
|
|
@@ -42,7 +42,7 @@ const sectionLabels = {
|
|
|
42
42
|
Thought: ["Core", "Properties", "Events", "Style", "Validation"]
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export function refreshPage
|
|
45
|
+
export function refreshPage(type: string, store: any) {
|
|
46
46
|
const UiSchema = _.cloneDeep(componentBasicUiSchema(store.theme.myTheme))
|
|
47
47
|
const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
48
48
|
if (type) {
|
|
@@ -164,7 +164,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
164
164
|
},
|
|
165
165
|
getSchema: function () {
|
|
166
166
|
const schema = _.cloneDeep(ComponentSchema);
|
|
167
|
-
if (sessionStorage.getItem("copiedConfig")
|
|
167
|
+
if (sessionStorage.getItem("copiedConfig")) {
|
|
168
168
|
schema.properties.RemoveItemButton.disabled = false;
|
|
169
169
|
}
|
|
170
170
|
|
|
@@ -281,22 +281,22 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
281
281
|
},
|
|
282
282
|
deletePopUpComponent: function () {
|
|
283
283
|
const rowId = dynamicData.path.split(".")[1];
|
|
284
|
-
sessionStorage.setItem('rowId',rowId);
|
|
284
|
+
sessionStorage.setItem('rowId', rowId);
|
|
285
285
|
store.updateDialog("popUpComponentSection");
|
|
286
286
|
},
|
|
287
287
|
deletePopUpEvent: function () {
|
|
288
288
|
const rowId = dynamicData.path.split(".")[1];
|
|
289
|
-
sessionStorage.setItem('rowId',rowId);
|
|
289
|
+
sessionStorage.setItem('rowId', rowId);
|
|
290
290
|
store.updateDialog("popUpEventSection");
|
|
291
291
|
},
|
|
292
292
|
|
|
293
|
-
copyPasteElement: function(paramStore: any, setPage: any = this.setPage.bind(this)
|
|
293
|
+
copyPasteElement: function (paramStore: any, setPage: any = this.setPage.bind(this)) {
|
|
294
294
|
const [actionType, elementType] = dynamicData.path.split('.').pop()?.split('_');
|
|
295
295
|
actionType === "Copy" ? this.CopyElement(paramStore, elementType) : this.PasteElement(setPage, elementType);
|
|
296
296
|
},
|
|
297
|
-
CopyElement: function(paramStore: any = store, elementType: string){
|
|
298
|
-
const schema = cloneDeep(paramStore.schema
|
|
299
|
-
const uiSchema = cloneDeep(paramStore.uiSchema
|
|
297
|
+
CopyElement: function (paramStore: any = store, elementType: string) {
|
|
298
|
+
const schema = cloneDeep(paramStore.schema);
|
|
299
|
+
const uiSchema = cloneDeep(paramStore.uiSchema);
|
|
300
300
|
schema.properties.RemoveItemButton.disabled = false;
|
|
301
301
|
|
|
302
302
|
const rowId = dynamicData.path.split(".")[1];
|
|
@@ -312,9 +312,9 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
312
312
|
})
|
|
313
313
|
store.setSchema(schema);
|
|
314
314
|
store.setUiSchema(uiSchema);
|
|
315
|
-
},
|
|
316
|
-
PasteElement: function(
|
|
317
|
-
if (!sessionStorage.getItem("copiedConfig")
|
|
315
|
+
},
|
|
316
|
+
PasteElement: function (setPage: any, elementType: string) {
|
|
317
|
+
if (!sessionStorage.getItem("copiedConfig")) {
|
|
318
318
|
store.setNotify({
|
|
319
319
|
FailMessage: "No item has been copied.",
|
|
320
320
|
Fail: true,
|
|
@@ -322,15 +322,15 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
324
|
const pastedElementParentPath = store.searchParams?.get("path");
|
|
325
|
-
if (!Array.isArray(store.formData.elements)
|
|
325
|
+
if (!Array.isArray(store.formData.elements)) {
|
|
326
326
|
store.formData.elements = []
|
|
327
327
|
}
|
|
328
328
|
if (!Array.isArray(store.formData.events)) {
|
|
329
329
|
store.formData.events = []
|
|
330
330
|
}
|
|
331
331
|
saveFormdataInSessionStorage(store.ctx.core.data, pastedElementParentPath);
|
|
332
|
-
const formData =
|
|
333
|
-
const insertElementIndex =
|
|
332
|
+
const formData = getFormdataFromSessionStorage(pastedElementParentPath);
|
|
333
|
+
const insertElementIndex = elementType === "Component" ? formData.elements.length : formData.events.length;
|
|
334
334
|
const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
|
|
335
335
|
|
|
336
336
|
const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
@@ -338,7 +338,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
338
338
|
Events: " The Events cannot be integrated into the component section.",
|
|
339
339
|
Component: "The component cannot be integrated into the Events section."
|
|
340
340
|
};
|
|
341
|
-
if(copiedConfig.Handler && elementType === "Component"){
|
|
341
|
+
if (copiedConfig.Handler && elementType === "Component") {
|
|
342
342
|
store.setNotify({
|
|
343
343
|
FailMessage: notificationMessages.Events,
|
|
344
344
|
Fail: true,
|
|
@@ -350,13 +350,13 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
350
350
|
Fail: true,
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
else{
|
|
353
|
+
else {
|
|
354
354
|
saveFormdataInSessionStorage(copiedConfig, pastedElementPath);
|
|
355
355
|
setPage();
|
|
356
356
|
}
|
|
357
|
-
},
|
|
358
|
-
RemoveItemButton: function(paramStore: any = store){
|
|
359
|
-
const schema = cloneDeep(paramStore.schema
|
|
357
|
+
},
|
|
358
|
+
RemoveItemButton: function (paramStore: any = store) {
|
|
359
|
+
const schema = cloneDeep(paramStore.schema);
|
|
360
360
|
const uiSchema = cloneDeep(paramStore.uiSchema);
|
|
361
361
|
schema.properties.RemoveItemButton.disabled = true;
|
|
362
362
|
uiSchema.elements[2].elements[1].config.main.heading = `No element copied`;
|
|
@@ -364,13 +364,13 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
364
364
|
store.setSchema(schema);
|
|
365
365
|
store.setUiSchema(uiSchema);
|
|
366
366
|
},
|
|
367
|
-
elementPathHandler: function(parentPath: string, rowId: any, elementType: string){
|
|
368
|
-
if(elementType === "Component"){
|
|
369
|
-
|
|
367
|
+
elementPathHandler: function (parentPath: string, rowId: any, elementType: string) {
|
|
368
|
+
if (elementType === "Component") {
|
|
369
|
+
return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
370
370
|
}
|
|
371
|
-
return parentPath ? `${parentPath}.events[${rowId}]`
|
|
371
|
+
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
372
372
|
},
|
|
373
|
-
ElementPathSetter: function(uiSchema: any,copiedFormData?: any){
|
|
373
|
+
ElementPathSetter: function (uiSchema: any, copiedFormData?: any) {
|
|
374
374
|
const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
375
375
|
if(uiSchema?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons){
|
|
376
376
|
uiSchema.elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
|
|
@@ -96,112 +96,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
96
96
|
window.dispatchEvent(event)
|
|
97
97
|
const theme = funcParams?.store?.theme?.myTheme;
|
|
98
98
|
uiSchema.elements.push(
|
|
99
|
-
|
|
100
|
-
// {
|
|
101
|
-
// type: "HorizontalLayout",
|
|
102
|
-
// config: {
|
|
103
|
-
// main: {
|
|
104
|
-
// direction: "row",
|
|
105
|
-
// },
|
|
106
|
-
// style: {
|
|
107
|
-
// flexDirection: "row",
|
|
108
|
-
// position: "absolute",
|
|
109
|
-
// bottom: 0,
|
|
110
|
-
// height: "fit-content",
|
|
111
|
-
// overflow: "hidden",
|
|
112
|
-
// zIndex: 1000,
|
|
113
|
-
// width: "inherit",
|
|
114
|
-
// },
|
|
115
|
-
// },
|
|
116
|
-
// elements: [
|
|
117
|
-
// {
|
|
118
|
-
// type: "Control",
|
|
119
|
-
// scope: "#/properties/FooterText",
|
|
120
|
-
// options: {
|
|
121
|
-
// widget: "Box",
|
|
122
|
-
// },
|
|
123
|
-
// config: {
|
|
124
|
-
// main: {
|
|
125
|
-
// heading: "Copywriter@ACT21.IO",
|
|
126
|
-
// },
|
|
127
|
-
// style: {
|
|
128
|
-
// color: theme?.palette?.text?.disabled || "#AFAFAF",
|
|
129
|
-
// fontSize: "12px",
|
|
130
|
-
// textAlign: "center",
|
|
131
|
-
// lineHeight: 2,
|
|
132
|
-
// width: "fit-content",
|
|
133
|
-
// left: "50%",
|
|
134
|
-
// position: "relative",
|
|
135
|
-
// margin: 0,
|
|
136
|
-
// flexGrow: 1,
|
|
137
|
-
// height: 0,
|
|
138
|
-
// transform: "translate(-50%, 0%)",
|
|
139
|
-
// },
|
|
140
|
-
// },
|
|
141
|
-
// },
|
|
142
|
-
// {
|
|
143
|
-
// type: "Control",
|
|
144
|
-
// scope: "#/properties/FooterBackIcon",
|
|
145
|
-
// options: {
|
|
146
|
-
// widget: "Box",
|
|
147
|
-
// },
|
|
148
|
-
// config: {
|
|
149
|
-
// main: {
|
|
150
|
-
// iconName: "PrevIcon",
|
|
151
|
-
// onClick: "backHandler",
|
|
152
|
-
// width: "fit-content",
|
|
153
|
-
// },
|
|
154
|
-
// style: {
|
|
155
|
-
// fill: theme?.palette?.primary?.main,
|
|
156
|
-
// width: 20,
|
|
157
|
-
// height: 0,
|
|
158
|
-
// // margin: 0,
|
|
159
|
-
// top: 0,
|
|
160
|
-
// right: { xs: "12px", sm: "84px" },
|
|
161
|
-
// position: "absolute",
|
|
162
|
-
// fontSize: "12px",
|
|
163
|
-
// cursor: "pointer",
|
|
164
|
-
// ":hover": {
|
|
165
|
-
// fill: theme?.palette?.primary?.dark,
|
|
166
|
-
// },
|
|
167
|
-
// marginRight: "13px",
|
|
168
|
-
// },
|
|
169
|
-
// },
|
|
170
|
-
// },
|
|
171
|
-
// {
|
|
172
|
-
// type: "Control",
|
|
173
|
-
// scope: "#/properties/FooterBackHandlerText",
|
|
174
|
-
// options: {
|
|
175
|
-
// widget: "Box",
|
|
176
|
-
// },
|
|
177
|
-
// config: {
|
|
178
|
-
// main: {
|
|
179
|
-
// heading: "Previous Page",
|
|
180
|
-
// onClick: "backHandler",
|
|
181
|
-
// },
|
|
182
|
-
// style: {
|
|
183
|
-
// display: { xs: "none", sm: "flex" },
|
|
184
|
-
// textAlign: "left",
|
|
185
|
-
// lineHeight: 1,
|
|
186
|
-
// height: 0,
|
|
187
|
-
// width: "fit-content",
|
|
188
|
-
// color: theme?.palette?.primary?.main,
|
|
189
|
-
// fontSize: "14px",
|
|
190
|
-
// cursor: "pointer",
|
|
191
|
-
// marginLeft: "2px",
|
|
192
|
-
|
|
193
|
-
// top: 3,
|
|
194
|
-
// right: "12px",
|
|
195
|
-
// position: "absolute",
|
|
196
|
-
// ":hover": {
|
|
197
|
-
// color: theme?.palette?.primary?.dark,
|
|
198
|
-
// },
|
|
199
|
-
// marginRight: "4px",
|
|
200
|
-
// },
|
|
201
|
-
// },
|
|
202
|
-
// },
|
|
203
|
-
// ],
|
|
204
|
-
// }
|
|
205
99
|
{
|
|
206
100
|
type: "HorizontalLayout",
|
|
207
101
|
config: {
|
|
@@ -260,7 +154,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
260
154
|
fill: theme?.palette?.primary?.main,
|
|
261
155
|
width: 20,
|
|
262
156
|
height: 0,
|
|
263
|
-
// margin: 0,
|
|
264
157
|
top: 0,
|
|
265
158
|
right: { xs: "12px", sm: "84px" },
|
|
266
159
|
position: "absolute",
|