impaktapps-ui-builder 0.0.382460 → 1.0.1-alpha.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.
- package/dist/impaktapps-ui-builder.es.js +1316 -1121
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +16 -16
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildPhoneInput.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +62 -59
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +17 -21
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +10 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +23 -32
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +26 -33
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/phoneInput.d.ts +20 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +52 -38
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/styleSection.d.ts +7 -8
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +29 -33
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +6 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +56 -36
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +6 -0
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +8 -0
- package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +6 -1
- package/src/impaktapps-ui-builder/builder/build/buildPhoneInput.ts +26 -0
- package/src/impaktapps-ui-builder/builder/build/buildText.ts +21 -18
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +42 -29
- package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +111 -96
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +113 -61
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +8 -4
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +108 -88
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +39 -17
- package/src/impaktapps-ui-builder/builder/build/uischema/phoneInput.ts +16 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +44 -44
- package/src/impaktapps-ui-builder/builder/build/uischema/styleSection.ts +9 -13
- package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +1 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +40 -18
- package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +73 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +63 -45
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +51 -44
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +232 -309
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +166 -224
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +15 -12
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +147 -205
- package/src/impaktapps-ui-builder/builder/services/component.ts +228 -57
- package/src/impaktapps-ui-builder/builder/services/event.ts +182 -66
- package/src/impaktapps-ui-builder/builder/services/utils.ts +2 -2
- package/src/impaktapps-ui-builder/runtime/services/events.ts +32 -21
- package/src/impaktapps-ui-builder/runtime/services/service.ts +18 -29
|
@@ -10,54 +10,154 @@ import { ValueTab } from "../build/uischema/valueTab";
|
|
|
10
10
|
import { ValidationSection } from "../build/uischema/validationSections";
|
|
11
11
|
import { getFormdataFromSessionStorage, okHandler, saveFormdataInSessionStorage, saveHandler } from "./utils";
|
|
12
12
|
const sectionLabels = {
|
|
13
|
-
Select: ["Core", "Properties", "Value", "
|
|
14
|
-
MultipleSelect: ["Core", "Properties", "Value", "
|
|
15
|
-
Table: ["Core", "Components", "Properties", "
|
|
16
|
-
LeaderBoard: ["Core", "Components", "Properties", "
|
|
13
|
+
Select: ["Core", "Properties", "Value", "Events", "Style", "Validation"],
|
|
14
|
+
MultipleSelect: ["Core", "Properties", "Value", "Events", "Style", "Validation"],
|
|
15
|
+
Table: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
|
|
16
|
+
LeaderBoard: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
|
|
17
17
|
WrapperSection: ["Core", "Components", "Properties", "Style", "Validation"],
|
|
18
18
|
TabSection: ["Core", "Components", "Properties", "Style", "Validation"],
|
|
19
|
-
SpeedoMeter: ["Core", "Properties", "
|
|
20
|
-
card: ["Core", "Properties", "
|
|
21
|
-
UploadFile: ["Core", "
|
|
22
|
-
Graph: ["Core", "Properties", "
|
|
23
|
-
DownloadFile: ["Core", "
|
|
24
|
-
Box: ["Core", "
|
|
25
|
-
Properties: ["Core", "Properties", "
|
|
26
|
-
ProgressBarCard: ["Core", "Properties", "
|
|
27
|
-
RankCard: ["Core", "Properties", "
|
|
28
|
-
Slider: ["Core", "Components", "
|
|
29
|
-
Timer: ["Core", "
|
|
30
|
-
Rank: ["Core", "
|
|
31
|
-
Button: ["Core", "Properties", "
|
|
19
|
+
SpeedoMeter: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
20
|
+
card: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
21
|
+
UploadFile: ["Core", "Events", "Style", "Validation"],
|
|
22
|
+
Graph: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
23
|
+
DownloadFile: ["Core", "Events", "Style", "Validation"],
|
|
24
|
+
Box: ["Core", "Events", "Style", "Validation"],
|
|
25
|
+
Properties: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
26
|
+
ProgressBarCard: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
27
|
+
RankCard: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
28
|
+
Slider: ["Core", "Components", "Events", "Style", "Validation"],
|
|
29
|
+
Timer: ["Core", "Events", "Style", "Validation"],
|
|
30
|
+
Rank: ["Core", "Events", "Style", "Validation"],
|
|
31
|
+
Button: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
32
32
|
Array: ["Core", "Components", "Validation"],
|
|
33
|
-
Radio: ["Core", "Properties", "
|
|
34
|
-
Text: ["Core", "Properties", "
|
|
35
|
-
TextArea: ["Core", "Properties", "
|
|
33
|
+
Radio: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
34
|
+
Text: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
35
|
+
TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
36
36
|
PopUp: ["Core", "Components", "Properties", "Style"],
|
|
37
|
-
Stepper: ["Core", "Components", "Properties", "
|
|
38
|
-
DataGrid: ["Core", "Components", "Properties", "
|
|
39
|
-
InputSlider: ["Core", "Properties", "
|
|
40
|
-
TreeMap: ["Core", "Components", "Properties", "
|
|
37
|
+
Stepper: ["Core", "Components", "Properties", "Events", "Style"],
|
|
38
|
+
DataGrid: ["Core", "Components", "Properties", "Events", "Style"],
|
|
39
|
+
InputSlider: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
40
|
+
TreeMap: ["Core", "Components", "Properties", "Events", "Style"],
|
|
41
41
|
ColumnGroup: ["Core", "Components"],
|
|
42
|
-
Thought: ["Core", "Properties", "
|
|
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
|
+
const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
47
48
|
if (type) {
|
|
48
49
|
const sectionUiSchema = {
|
|
49
50
|
Core: CoreSection,
|
|
50
51
|
Value: ValueTab,
|
|
51
52
|
Style: StyleSection,
|
|
52
|
-
|
|
53
|
+
Events: EventSection(store.theme.myTheme),
|
|
53
54
|
Components: TableSection(store.theme.myTheme),
|
|
54
55
|
Properties: buildPropertiesSection(type),
|
|
55
56
|
Validation: ValidationSection
|
|
56
57
|
}
|
|
57
58
|
const elements = sectionLabels[type]?.map(e => sectionUiSchema[e]);
|
|
58
|
-
UiSchema.elements[
|
|
59
|
-
UiSchema.elements[
|
|
59
|
+
UiSchema.elements[0].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Events", "Validation"];
|
|
60
|
+
UiSchema.elements[0].elements = elements || [CoreSection, StyleSection, EventSection(store.theme.myTheme), ValidationSection];
|
|
60
61
|
}
|
|
62
|
+
|
|
63
|
+
// Get Widget Type of parent
|
|
64
|
+
const path = store.searchParams?.get("path");
|
|
65
|
+
const lastDotIndex = path.lastIndexOf('.')
|
|
66
|
+
const parentPath = path.slice(0,lastDotIndex)
|
|
67
|
+
|
|
68
|
+
const parentObj = _.get(currentConfig, parentPath)
|
|
69
|
+
|
|
70
|
+
if(parentObj?.type === "Table"){
|
|
71
|
+
UiSchema.elements[0].elements[0].elements[4] =
|
|
72
|
+
{
|
|
73
|
+
type: "Control",
|
|
74
|
+
scope: "#/properties/columnFormat",
|
|
75
|
+
options: {
|
|
76
|
+
widget: "SelectInputField",
|
|
77
|
+
},
|
|
78
|
+
config: {
|
|
79
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
80
|
+
main: {
|
|
81
|
+
label: "Column Format",
|
|
82
|
+
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
UiSchema.elements[0].elements[0].elements[6] =
|
|
87
|
+
{
|
|
88
|
+
type: "Control",
|
|
89
|
+
scope: "#/properties/filteringOptions",
|
|
90
|
+
options: {
|
|
91
|
+
widget: "SelectInputField",
|
|
92
|
+
},
|
|
93
|
+
config: {
|
|
94
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
95
|
+
main: {
|
|
96
|
+
label: "Filter Mode",
|
|
97
|
+
multiple: true
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
UiSchema.elements[0].elements[0].elements[5] =
|
|
102
|
+
{
|
|
103
|
+
type: "Control",
|
|
104
|
+
scope: "#/properties/enableFilter",
|
|
105
|
+
options: {
|
|
106
|
+
widget: "RadioInputField",
|
|
107
|
+
},
|
|
108
|
+
config: {
|
|
109
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
110
|
+
main: {
|
|
111
|
+
label: "Enable Filter",
|
|
112
|
+
options: ["Yes", "No"],
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
UiSchema.elements[0].elements[0].elements[7] =
|
|
117
|
+
{
|
|
118
|
+
type: "Control",
|
|
119
|
+
scope: "#/properties/enableSorting",
|
|
120
|
+
options: {
|
|
121
|
+
widget: "RadioInputField",
|
|
122
|
+
},
|
|
123
|
+
config: {
|
|
124
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
125
|
+
main: {
|
|
126
|
+
label: "Enable Sorting",
|
|
127
|
+
options: ["Yes", "No"],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
UiSchema.elements[0].elements[0].elements[8] =
|
|
132
|
+
{
|
|
133
|
+
type: "Control",
|
|
134
|
+
scope: "#/properties/columnKey",
|
|
135
|
+
config: {
|
|
136
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
137
|
+
main: {
|
|
138
|
+
label: "Column Key",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
options: {
|
|
142
|
+
widget: "InputField",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
UiSchema.elements[0].elements[0].elements[9] =
|
|
146
|
+
{
|
|
147
|
+
type: "Control",
|
|
148
|
+
scope: "#/properties/elementType",
|
|
149
|
+
options: {
|
|
150
|
+
widget: "SelectInputField",
|
|
151
|
+
},
|
|
152
|
+
config: {
|
|
153
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
154
|
+
main: {
|
|
155
|
+
label: "Element Type",
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
61
161
|
if (sessionStorage.getItem("copiedConfig") ) {
|
|
62
162
|
this.ElementPathSetter(UiSchema);
|
|
63
163
|
}
|
|
@@ -81,13 +181,42 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
81
181
|
},
|
|
82
182
|
getSchema: function () {
|
|
83
183
|
const schema = _.cloneDeep(ComponentSchema);
|
|
84
|
-
if (sessionStorage.getItem("copiedConfig")
|
|
184
|
+
if (sessionStorage.getItem("copiedConfig")) {
|
|
85
185
|
schema.properties.RemoveItemButton.disabled = false;
|
|
86
186
|
}
|
|
187
|
+
|
|
188
|
+
const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
189
|
+
const path = store.searchParams?.get("path");
|
|
190
|
+
const id = store.searchParams?.get("id")
|
|
191
|
+
|
|
192
|
+
let pathArray = [{label: config.name ?? "NewPage", path: `/PageMaster${id ? `?id=${id}` : ''}`}];
|
|
193
|
+
|
|
194
|
+
if (path) {
|
|
195
|
+
const pathArrayAll = path.split(".");
|
|
196
|
+
const arr: any = []
|
|
197
|
+
pathArrayAll.map((e: string, i: number) => {
|
|
198
|
+
if (i === 0) {
|
|
199
|
+
arr.push(e)
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
arr.push(`${arr[i - 1]}.${e}`)
|
|
203
|
+
})
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
arr.map((e) => {
|
|
207
|
+
const data = _.get(config, e)
|
|
208
|
+
pathArray.push({
|
|
209
|
+
label: data?.name || data?.eventType || "NewComponent",
|
|
210
|
+
path: `/Component?path=${e}${id ? `&id=${id}` : ''}`
|
|
211
|
+
});
|
|
212
|
+
})
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
schema.properties.pageName.path = pathArray
|
|
87
216
|
return schema;
|
|
88
217
|
},
|
|
89
218
|
okHandler: () => okHandler(store),
|
|
90
|
-
saveHandler: async () => await saveHandler(store, service, submitHandler
|
|
219
|
+
saveHandler: async () => await saveHandler(store, service, submitHandler),
|
|
91
220
|
onChange: function () {
|
|
92
221
|
if (
|
|
93
222
|
store?.formData?.type !== store?.newData?.type &&
|
|
@@ -169,22 +298,22 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
169
298
|
},
|
|
170
299
|
deletePopUpComponent: function () {
|
|
171
300
|
const rowId = dynamicData.path.split(".")[1];
|
|
172
|
-
sessionStorage.setItem('rowId',rowId);
|
|
301
|
+
sessionStorage.setItem('rowId', rowId);
|
|
173
302
|
store.updateDialog("popUpComponentSection");
|
|
174
303
|
},
|
|
175
304
|
deletePopUpEvent: function () {
|
|
176
305
|
const rowId = dynamicData.path.split(".")[1];
|
|
177
|
-
sessionStorage.setItem('rowId',rowId);
|
|
306
|
+
sessionStorage.setItem('rowId', rowId);
|
|
178
307
|
store.updateDialog("popUpEventSection");
|
|
179
308
|
},
|
|
180
309
|
|
|
181
|
-
copyPasteElement: function(paramStore: any, setPage: any = this.setPage.bind(this)
|
|
310
|
+
copyPasteElement: function (paramStore: any, setPage: any = this.setPage.bind(this)) {
|
|
182
311
|
const [actionType, elementType] = dynamicData.path.split('.').pop()?.split('_');
|
|
183
312
|
actionType === "Copy" ? this.CopyElement(paramStore, elementType) : this.PasteElement(setPage, elementType);
|
|
184
313
|
},
|
|
185
|
-
CopyElement: function(paramStore: any = store, elementType: string){
|
|
186
|
-
const schema = cloneDeep(paramStore.schema
|
|
187
|
-
const uiSchema = cloneDeep(paramStore.uiSchema
|
|
314
|
+
CopyElement: function (paramStore: any = store, elementType: string) {
|
|
315
|
+
const schema = cloneDeep(paramStore.schema);
|
|
316
|
+
const uiSchema = cloneDeep(paramStore.uiSchema);
|
|
188
317
|
schema.properties.RemoveItemButton.disabled = false;
|
|
189
318
|
|
|
190
319
|
const rowId = dynamicData.path.split(".")[1];
|
|
@@ -194,11 +323,15 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
194
323
|
|
|
195
324
|
this.ElementPathSetter(uiSchema,copiedFormData);
|
|
196
325
|
sessionStorage.setItem('copiedConfig',JSON.stringify(copiedFormData));
|
|
326
|
+
store.setNotify({
|
|
327
|
+
SuccessMessage: `${elementType} Copied Successfully`,
|
|
328
|
+
Success: true,
|
|
329
|
+
})
|
|
197
330
|
store.setSchema(schema);
|
|
198
331
|
store.setUiSchema(uiSchema);
|
|
199
|
-
},
|
|
200
|
-
PasteElement: function(
|
|
201
|
-
if (!sessionStorage.getItem("copiedConfig")
|
|
332
|
+
},
|
|
333
|
+
PasteElement: function (setPage: any, elementType: string) {
|
|
334
|
+
if (!sessionStorage.getItem("copiedConfig")) {
|
|
202
335
|
store.setNotify({
|
|
203
336
|
FailMessage: "No item has been copied.",
|
|
204
337
|
Fail: true,
|
|
@@ -206,34 +339,41 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
206
339
|
return;
|
|
207
340
|
}
|
|
208
341
|
const pastedElementParentPath = store.searchParams?.get("path");
|
|
209
|
-
|
|
210
|
-
|
|
342
|
+
if (!Array.isArray(store.formData.elements)) {
|
|
343
|
+
store.formData.elements = []
|
|
344
|
+
}
|
|
345
|
+
if (!Array.isArray(store.formData.events)) {
|
|
346
|
+
store.formData.events = []
|
|
347
|
+
}
|
|
348
|
+
saveFormdataInSessionStorage(store.ctx.core.data, pastedElementParentPath);
|
|
349
|
+
const formData = getFormdataFromSessionStorage(pastedElementParentPath);
|
|
350
|
+
const insertElementIndex = elementType === "Component" ? formData.elements.length : formData.events.length;
|
|
211
351
|
const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
|
|
212
352
|
|
|
213
353
|
const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
214
354
|
const notificationMessages = {
|
|
215
|
-
|
|
216
|
-
Component: "The component cannot be integrated into the
|
|
355
|
+
Events: " The Events cannot be integrated into the component section.",
|
|
356
|
+
Component: "The component cannot be integrated into the Events section."
|
|
217
357
|
};
|
|
218
|
-
if(copiedConfig.Handler && elementType === "Component"){
|
|
358
|
+
if (copiedConfig.Handler && elementType === "Component") {
|
|
219
359
|
store.setNotify({
|
|
220
|
-
FailMessage: notificationMessages.
|
|
360
|
+
FailMessage: notificationMessages.Events,
|
|
221
361
|
Fail: true,
|
|
222
362
|
});
|
|
223
363
|
}
|
|
224
|
-
else if(copiedConfig.name && elementType === "
|
|
364
|
+
else if(copiedConfig.name && elementType === "Events"){
|
|
225
365
|
store.setNotify({
|
|
226
366
|
FailMessage: notificationMessages.Component,
|
|
227
367
|
Fail: true,
|
|
228
368
|
});
|
|
229
369
|
}
|
|
230
|
-
else{
|
|
370
|
+
else {
|
|
231
371
|
saveFormdataInSessionStorage(copiedConfig, pastedElementPath);
|
|
232
372
|
setPage();
|
|
233
373
|
}
|
|
234
|
-
},
|
|
235
|
-
RemoveItemButton: function(paramStore: any = store){
|
|
236
|
-
const schema = cloneDeep(paramStore.schema
|
|
374
|
+
},
|
|
375
|
+
RemoveItemButton: function (paramStore: any = store) {
|
|
376
|
+
const schema = cloneDeep(paramStore.schema);
|
|
237
377
|
const uiSchema = cloneDeep(paramStore.uiSchema);
|
|
238
378
|
schema.properties.RemoveItemButton.disabled = true;
|
|
239
379
|
uiSchema.elements[2].elements[1].config.main.heading = `No element copied`;
|
|
@@ -241,15 +381,46 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
241
381
|
store.setSchema(schema);
|
|
242
382
|
store.setUiSchema(uiSchema);
|
|
243
383
|
},
|
|
244
|
-
elementPathHandler: function(parentPath: string, rowId: any, elementType: string){
|
|
245
|
-
if(elementType === "Component"){
|
|
246
|
-
|
|
384
|
+
elementPathHandler: function (parentPath: string, rowId: any, elementType: string) {
|
|
385
|
+
if (elementType === "Component") {
|
|
386
|
+
return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
247
387
|
}
|
|
248
|
-
return parentPath ? `${parentPath}.events[${rowId}]`
|
|
388
|
+
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
249
389
|
},
|
|
250
|
-
ElementPathSetter: function(uiSchema: any,copiedFormData?: any){
|
|
390
|
+
ElementPathSetter: function (uiSchema: any, copiedFormData?: any) {
|
|
251
391
|
const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
252
|
-
uiSchema
|
|
392
|
+
if(uiSchema?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons){
|
|
393
|
+
uiSchema.elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
|
|
394
|
+
}
|
|
395
|
+
else if(uiSchema?.elements?.[0]?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons){
|
|
396
|
+
uiSchema.elements[0].elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
if(uiSchema?.elements?.[1]?.elements?.[1]?.config?.main?.headerIcons){
|
|
401
|
+
uiSchema.elements[1].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Event: ${formData.eventType}`;
|
|
402
|
+
}
|
|
403
|
+
else if(uiSchema?.elements?.[0]?.elements?.[1]?.config?.main?.headerIcons){
|
|
404
|
+
uiSchema.elements[0].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.eventType}`;
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
onNavigatePopupYes: function() {
|
|
410
|
+
try{
|
|
411
|
+
store.navigate(sessionStorage.getItem("pendingNavigatePath"))
|
|
412
|
+
store.updateDialog(`pageNamepopup`)
|
|
413
|
+
}
|
|
414
|
+
catch(e){
|
|
415
|
+
store.updateDialog(`pageNamepopup`)
|
|
416
|
+
store.setNotify({
|
|
417
|
+
FailMessage: "Couldn't navigate page",
|
|
418
|
+
Fail: true,
|
|
419
|
+
})
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
onNavigatePopupNo: function() {
|
|
423
|
+
store.updateDialog(`pageNamepopup`)
|
|
253
424
|
}
|
|
254
425
|
}
|
|
255
426
|
};
|