impaktapps-ui-builder 1.0.174 → 1.0.180
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 +746 -80
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +11 -11
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildAreaGraph.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildGroupButton.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildMetricCard.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildPopover.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.d.ts +22 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +50 -4
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/metricCard.d.ts +17 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.d.ts +19 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +3 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildAreaGraph.ts +66 -0
- package/src/impaktapps-ui-builder/builder/build/buildArray.ts +10 -6
- package/src/impaktapps-ui-builder/builder/build/buildCamera.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +19 -7
- package/src/impaktapps-ui-builder/builder/build/buildDate.ts +26 -22
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +42 -49
- package/src/impaktapps-ui-builder/builder/build/buildGroupButton.ts +24 -0
- package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildImage.ts +6 -3
- package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildMetricCard.tsx +37 -0
- package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.ts +44 -0
- package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +16 -0
- package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +1 -0
- package/src/impaktapps-ui-builder/builder/build/buildPopover.ts +40 -0
- package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.ts +72 -0
- package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +0 -3
- package/src/impaktapps-ui-builder/builder/build/buildText.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +33 -0
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +7 -3
- package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +2 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +172 -16
- package/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.ts +17 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +37 -4
- package/src/impaktapps-ui-builder/builder/build/uischema/metricCard.ts +13 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +5 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +3 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +80 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +17 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +2 -3
- package/src/impaktapps-ui-builder/builder/services/component.ts +143 -108
- package/src/impaktapps-ui-builder/runtime/services/service.ts +26 -4
|
@@ -7,6 +7,7 @@ export const ComponentSchema: any = {
|
|
|
7
7
|
{ title: "Masked Aadhar Card", const: "AadharcardText" },
|
|
8
8
|
{ title: "Array", const: "Array" },
|
|
9
9
|
{ title: "Button", const: "Button" },
|
|
10
|
+
{ title: "ButtonGroup", const: "ButtonGroup" },
|
|
10
11
|
{ title: "Data Card", const: "card" },
|
|
11
12
|
{ title: "Check Box", const: "CheckBox" },
|
|
12
13
|
{ title: "Camera", const: "Camera" },
|
|
@@ -25,8 +26,10 @@ export const ComponentSchema: any = {
|
|
|
25
26
|
{ title: "Label", const: "Box" },
|
|
26
27
|
{ title: "Leaderboard", const: "LeaderBoard" },
|
|
27
28
|
{ title: "Multi-Select Dropdown", const: "MultipleSelect" },
|
|
29
|
+
{ title: "OTP_Input", const: "OTP_Input" },
|
|
28
30
|
{ title: "Pan Card Masked", const: "PanCardText" },
|
|
29
31
|
{ title: "Pop Up", const: "PopUp" },
|
|
32
|
+
{ title: "Pop Over", const: "PopOver" },
|
|
30
33
|
{ title: "Progress Bar", const: "ProgressBar" },
|
|
31
34
|
{ title: "Progress Bar Card", const: "ProgressBarCard" },
|
|
32
35
|
{ title: "Dropdown", const: "Select" },
|
|
@@ -36,6 +39,7 @@ export const ComponentSchema: any = {
|
|
|
36
39
|
{ title: "Radio", const: "Radio" },
|
|
37
40
|
{ title: "Rank", const: "Rank" },
|
|
38
41
|
{ title: "Rank Card", const: "RankCard" },
|
|
42
|
+
{ title: "Metric Card", const: "MetricCard" },
|
|
39
43
|
{ title: "Runner Boy", const: "RunnerBoyProgressBar" },
|
|
40
44
|
{ title: "Table", const: "Table" },
|
|
41
45
|
{ title: "Tabs", const: "TabSection" },
|
|
@@ -45,6 +49,7 @@ export const ComponentSchema: any = {
|
|
|
45
49
|
{ title: "Upload", const: "UploadFile" },
|
|
46
50
|
{ title: "Tree ", const: "TreeMap" },
|
|
47
51
|
{ title: "Thought of the day", const: "Thought" },
|
|
52
|
+
{ title: "PDF", const: "PdfViewer" }
|
|
48
53
|
],
|
|
49
54
|
},
|
|
50
55
|
elementType: {
|
|
@@ -98,7 +103,35 @@ export const ComponentSchema: any = {
|
|
|
98
103
|
{ title: "Standard", const: "standard" },
|
|
99
104
|
],
|
|
100
105
|
},
|
|
101
|
-
|
|
106
|
+
positionVertical: {
|
|
107
|
+
oneOf: [
|
|
108
|
+
{ title: "Top", const: "top" },
|
|
109
|
+
{ title: "Center", const: "center" },
|
|
110
|
+
{ title: "Bottom", const: "bottom" }
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
positionHorizontal: {
|
|
114
|
+
oneOf: [
|
|
115
|
+
{ title: "Left", const: "left" },
|
|
116
|
+
{ title: "Center", const: "center" },
|
|
117
|
+
{ title: "Right", const: "right" }
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
contentVertical: {
|
|
121
|
+
oneOf: [
|
|
122
|
+
{ title: "Top", const: "top" },
|
|
123
|
+
{ title: "Center", const: "center" },
|
|
124
|
+
{ title: "Bottom", const: "bottom" }
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
contentHorizontal: {
|
|
128
|
+
oneOf: [
|
|
129
|
+
{ title: "Left", const: "left" },
|
|
130
|
+
{ title: "Center", const: "center" },
|
|
131
|
+
{ title: "Right", const: "right" }
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
toolTipPosition: {
|
|
102
135
|
oneOf: [
|
|
103
136
|
{ title: "Top", const: "top" },
|
|
104
137
|
{ title: "Left", const: "left" },
|
|
@@ -106,6 +139,12 @@ export const ComponentSchema: any = {
|
|
|
106
139
|
{ title: "Bottom", const: "bottom" }
|
|
107
140
|
],
|
|
108
141
|
},
|
|
142
|
+
growthRate: {
|
|
143
|
+
oneOf: [
|
|
144
|
+
{ title: "Positive", const: "positive" },
|
|
145
|
+
{ title: "Negative", const: "negative" }
|
|
146
|
+
],
|
|
147
|
+
},
|
|
109
148
|
orientation: {
|
|
110
149
|
oneOf: [
|
|
111
150
|
{ title: "Horizontal", const: "horizontal" },
|
|
@@ -140,6 +179,21 @@ export const ComponentSchema: any = {
|
|
|
140
179
|
{ title: "Spacious", const: "spacious" },
|
|
141
180
|
],
|
|
142
181
|
},
|
|
182
|
+
xAxisFormatType: {
|
|
183
|
+
type: "string",
|
|
184
|
+
oneOf: [
|
|
185
|
+
{ title: "Date and Month", const: "Date and Month" },
|
|
186
|
+
{ title: "Month and Year", const: "Month and Year" }
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
xAxisType: {
|
|
190
|
+
type: "string",
|
|
191
|
+
oneOf: [
|
|
192
|
+
{ title: "Date", const: "date" },
|
|
193
|
+
{ title: "String", const: "string" },
|
|
194
|
+
{ title: "Number", const: "number" }
|
|
195
|
+
],
|
|
196
|
+
},
|
|
143
197
|
layout: {
|
|
144
198
|
type: "array",
|
|
145
199
|
items: {
|
|
@@ -290,6 +344,9 @@ export const ComponentSchema: any = {
|
|
|
290
344
|
items: {
|
|
291
345
|
type: "object",
|
|
292
346
|
properties: {
|
|
347
|
+
key: {
|
|
348
|
+
type: "string",
|
|
349
|
+
},
|
|
293
350
|
label: {
|
|
294
351
|
type: "string",
|
|
295
352
|
},
|
|
@@ -301,12 +358,26 @@ export const ComponentSchema: any = {
|
|
|
301
358
|
items: {
|
|
302
359
|
type: "object",
|
|
303
360
|
properties: {
|
|
361
|
+
key: {
|
|
362
|
+
type: "string",
|
|
363
|
+
},
|
|
304
364
|
label: {
|
|
305
365
|
type: "string",
|
|
306
366
|
},
|
|
307
367
|
},
|
|
308
368
|
},
|
|
309
369
|
},
|
|
370
|
+
tabIcons: {
|
|
371
|
+
type: "array",
|
|
372
|
+
items: {
|
|
373
|
+
type: "object",
|
|
374
|
+
properties: {
|
|
375
|
+
url: {
|
|
376
|
+
type: "string",
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
},
|
|
310
381
|
InputFormatingAndMasking: {
|
|
311
382
|
type: "array",
|
|
312
383
|
items: {
|
|
@@ -369,6 +440,8 @@ export const ComponentSchema: any = {
|
|
|
369
440
|
title: "Stack Horizontal Bar Graph",
|
|
370
441
|
const: "HorizontalStackBarGraph",
|
|
371
442
|
},
|
|
443
|
+
{ title: "Area Graph", const: "AreaGraph" },
|
|
444
|
+
{ title: "StackBar And Line Graph", const: "StackBarLineGraph" },
|
|
372
445
|
],
|
|
373
446
|
},
|
|
374
447
|
iconName: {
|
|
@@ -404,6 +477,7 @@ export const ComponentSchema: any = {
|
|
|
404
477
|
{ title: "Drafts Icon", const: "DraftsIcon" },
|
|
405
478
|
{ title: "Perm Phone Msg Icon", const: "PermPhoneMsgIcon" },
|
|
406
479
|
{ title: "Paste Icon", const: "PasteIcon" },
|
|
480
|
+
{ title: "Calendar", const: "Calendar" },
|
|
407
481
|
{ title: "Prev Icon", const: "PrevIcon" },
|
|
408
482
|
{ title: "Verified Icon", const: "VerifiedIcon" },
|
|
409
483
|
{ title: "Table Add Icon", const: "TableAddIcon" },
|
|
@@ -421,6 +495,11 @@ export const ComponentSchema: any = {
|
|
|
421
495
|
{ title: "Detail Icon", const: "DetailIcon" },
|
|
422
496
|
{ title: "Report View Icon", const: "ReportViewIcon" },
|
|
423
497
|
{ title: "Payout", const: "Payout" },
|
|
498
|
+
{ title: "Info Outlined", const: "InfoOutlinedIcon" },
|
|
499
|
+
{ title: "Territory Add", const: "TerritoryAdd" },
|
|
500
|
+
{ title: "Territory Edit", const: "TerritoryEdit" },
|
|
501
|
+
{ title: "Territory Delete", const: "TerritoryDelete" },
|
|
502
|
+
{ title: "Git Compare", const: "GitCompare" },
|
|
424
503
|
],
|
|
425
504
|
},
|
|
426
505
|
color: {
|
|
@@ -49,6 +49,23 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
49
49
|
required: true,
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: "Control",
|
|
55
|
+
scope: "#/properties/pageIconUrl",
|
|
56
|
+
|
|
57
|
+
options: {
|
|
58
|
+
widget: "InputField",
|
|
59
|
+
},
|
|
60
|
+
config: {
|
|
61
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
62
|
+
main: {
|
|
63
|
+
label: "Page Icon URL",
|
|
64
|
+
options: [],
|
|
65
|
+
color: "secondary",
|
|
66
|
+
required: true,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
52
69
|
},
|
|
53
70
|
{
|
|
54
71
|
type: "Control",
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { title } from "process";
|
|
2
|
-
|
|
3
1
|
export const EventSchema = {
|
|
4
2
|
type: "object",
|
|
5
3
|
properties: {
|
|
@@ -55,8 +53,9 @@ export const EventSchema = {
|
|
|
55
53
|
{ title: "Row Movement", const: "onRowMovement" },
|
|
56
54
|
{ title: "Download", const: "onDownload" },
|
|
57
55
|
{ title: "Fail", const: "Fail" },
|
|
56
|
+
{ title: "onClose", const: "onClose" },
|
|
58
57
|
{ title: "Key Down", const: "onKeyDown" },
|
|
59
|
-
|
|
58
|
+
{ title: "Set Style", const: "setStyle" },
|
|
60
59
|
|
|
61
60
|
]
|
|
62
61
|
},
|
|
@@ -12,43 +12,47 @@ import { getFormdataFromSessionStorage, validateAndShowErrors, okHandler, saveFo
|
|
|
12
12
|
const sectionLabels = {
|
|
13
13
|
Select: ["Core", "Properties", "Value", "Events", "Style", "Validation"],
|
|
14
14
|
MultipleSelect: ["Core", "Properties", "Value", "Events", "Style", "Validation"],
|
|
15
|
-
Table: ["Core", "Components", "Properties", "Events", "Style",
|
|
16
|
-
LeaderBoard: ["Core", "Components", "Properties", "Events", "Style",
|
|
17
|
-
WrapperSection: ["Core", "Components", "Properties", "Style",
|
|
18
|
-
HorizontalLayout: ["Core", "Components", "Properties", "Style",
|
|
19
|
-
TabSection: ["Core", "Components", "Properties", "Style", "Validation"],
|
|
15
|
+
Table: ["Core", "Components", "Properties", "Events", "Style",],
|
|
16
|
+
LeaderBoard: ["Core", "Components", "Properties", "Events", "Style",],
|
|
17
|
+
WrapperSection: ["Core", "Components", "Properties", "Style",],
|
|
18
|
+
HorizontalLayout: ["Core", "Components", "Properties", "Style",],
|
|
19
|
+
TabSection: ["Core", "Components", "TabTitles", "Properties", "Style", "Validation"],
|
|
20
20
|
SpeedoMeter: ["Core", "Properties", "Events", "Style",],
|
|
21
21
|
card: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
22
22
|
UploadFile: ["Core", "Events", "Style", "Validation"],
|
|
23
23
|
Graph: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
24
24
|
DownloadFile: ["Core", "Events", "Style", "Validation"],
|
|
25
|
-
Box: ["Core", "Properties"
|
|
25
|
+
Box: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
26
26
|
Properties: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
27
27
|
ProgressBarCard: ["Core", "Properties", "Events", "Style"],
|
|
28
|
-
ProgressBar:["Core", "Properties", "Events", "Style",
|
|
29
|
-
RankCard: ["Core", "Properties", "Events", "Style",
|
|
28
|
+
ProgressBar: ["Core", "Properties", "Events", "Style",],
|
|
29
|
+
RankCard: ["Core", "Properties", "Events", "Style",],
|
|
30
|
+
MetricCard: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
30
31
|
Slider: ["Core", "Components", "Events", "Style", "Validation"],
|
|
31
32
|
Timer: ["Core", "Events", "Style",],
|
|
32
|
-
Rank: ["Core", "Events", "Style",
|
|
33
|
+
Rank: ["Core", "Events", "Style",],
|
|
33
34
|
Button: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
34
|
-
|
|
35
|
+
ButtonGroup: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
|
|
36
|
+
Array: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
|
|
35
37
|
Radio: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
36
38
|
Text: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
37
39
|
TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
38
|
-
PopUp: ["Core", "Components", "Properties", "Style"],
|
|
40
|
+
PopUp: ["Core", "Components", "Properties", "Events", "Style"],
|
|
41
|
+
PopOver: ["Core", "Components", "Properties", "Style"],
|
|
42
|
+
PdfViewer: ["Core", "Properties", "Style"],
|
|
39
43
|
Stepper: ["Core", "Components", "Properties", "Events", "Style"],
|
|
40
44
|
DataGrid: ["Core", "Components", "Properties", "Events", "Style"],
|
|
41
45
|
InputSlider: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
42
46
|
TreeMap: ["Core", "Components", "Properties", "Events", "Style"],
|
|
43
47
|
ColumnGroup: ["Core", "Components"],
|
|
44
|
-
Thought: ["Core", "Properties", "Events", "Style",
|
|
48
|
+
Thought: ["Core", "Properties", "Events", "Style",],
|
|
45
49
|
Date: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
46
50
|
DateTime: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
47
|
-
Image: ["Core", "Properties","Style"],
|
|
48
|
-
FileInput: ["Core","Properties","Events", "Style", "Validation"],
|
|
49
|
-
Camera:["Core","Properties","Events", "Style", "Validation"],
|
|
51
|
+
Image: ["Core", "Properties", "Events", "Style"],
|
|
52
|
+
FileInput: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
53
|
+
Camera: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
54
|
+
OTP_Input: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
50
55
|
}
|
|
51
|
-
|
|
52
56
|
export function refreshPage(type: string, store: any) {
|
|
53
57
|
const UiSchema = _.cloneDeep(componentBasicUiSchema(store.theme.myTheme))
|
|
54
58
|
const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
@@ -59,6 +63,7 @@ export function refreshPage(type: string, store: any) {
|
|
|
59
63
|
Style: StyleSection,
|
|
60
64
|
Events: EventSection(store.theme.myTheme),
|
|
61
65
|
Components: TableSection(store.theme.myTheme),
|
|
66
|
+
TabTitles: TableSection(store.theme.myTheme, "tabLabelElements"),
|
|
62
67
|
Properties: buildPropertiesSection(type),
|
|
63
68
|
Validation: ValidationSection
|
|
64
69
|
}
|
|
@@ -70,12 +75,12 @@ export function refreshPage(type: string, store: any) {
|
|
|
70
75
|
// Get Widget Type of parent
|
|
71
76
|
const path = store.searchParams?.get("path");
|
|
72
77
|
const lastDotIndex = path.lastIndexOf('.')
|
|
73
|
-
const parentPath = path.slice(0,lastDotIndex)
|
|
78
|
+
const parentPath = path.slice(0, lastDotIndex)
|
|
74
79
|
|
|
75
80
|
const parentObj = _.get(currentConfig, parentPath)
|
|
76
81
|
|
|
77
|
-
if(parentObj?.type === "Table" || parentObj?.type === "ColumnGroup"){
|
|
78
|
-
UiSchema.elements[0].elements[0].elements[4] =
|
|
82
|
+
if (parentObj?.type === "Table" || parentObj?.type === "ColumnGroup") {
|
|
83
|
+
UiSchema.elements[0].elements[0].elements[4] =
|
|
79
84
|
{
|
|
80
85
|
type: "Control",
|
|
81
86
|
scope: "#/properties/columnFormat",
|
|
@@ -90,7 +95,7 @@ export function refreshPage(type: string, store: any) {
|
|
|
90
95
|
},
|
|
91
96
|
},
|
|
92
97
|
};
|
|
93
|
-
UiSchema.elements[0].elements[0].elements[6] =
|
|
98
|
+
UiSchema.elements[0].elements[0].elements[6] =
|
|
94
99
|
{
|
|
95
100
|
type: "Control",
|
|
96
101
|
scope: "#/properties/filteringOptions",
|
|
@@ -105,7 +110,7 @@ export function refreshPage(type: string, store: any) {
|
|
|
105
110
|
},
|
|
106
111
|
},
|
|
107
112
|
};
|
|
108
|
-
UiSchema.elements[0].elements[0].elements[5] =
|
|
113
|
+
UiSchema.elements[0].elements[0].elements[5] =
|
|
109
114
|
{
|
|
110
115
|
type: "Control",
|
|
111
116
|
scope: "#/properties/enableFilter",
|
|
@@ -120,49 +125,49 @@ export function refreshPage(type: string, store: any) {
|
|
|
120
125
|
},
|
|
121
126
|
},
|
|
122
127
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
config: {
|
|
131
|
-
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
132
|
-
main: {
|
|
133
|
-
label: "Enable Sorting",
|
|
134
|
-
options: ["Yes", "No"],
|
|
128
|
+
UiSchema.elements[0].elements[0].elements[7] =
|
|
129
|
+
{
|
|
130
|
+
type: "Control",
|
|
131
|
+
scope: "#/properties/enableSorting",
|
|
132
|
+
options: {
|
|
133
|
+
widget: "RadioInputField",
|
|
135
134
|
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
config: {
|
|
143
|
-
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
144
|
-
main: {
|
|
145
|
-
label: "Column Key",
|
|
135
|
+
config: {
|
|
136
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
137
|
+
main: {
|
|
138
|
+
label: "Enable Sorting",
|
|
139
|
+
options: ["Yes", "No"],
|
|
140
|
+
},
|
|
146
141
|
},
|
|
147
142
|
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
161
|
-
main: {
|
|
162
|
-
label: "Element Type",
|
|
143
|
+
UiSchema.elements[0].elements[0].elements[8] =
|
|
144
|
+
{
|
|
145
|
+
type: "Control",
|
|
146
|
+
scope: "#/properties/columnKey",
|
|
147
|
+
config: {
|
|
148
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
149
|
+
main: {
|
|
150
|
+
label: "Column Key",
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
options: {
|
|
154
|
+
widget: "InputField",
|
|
163
155
|
},
|
|
164
156
|
},
|
|
165
|
-
|
|
157
|
+
UiSchema.elements[0].elements[0].elements[9] =
|
|
158
|
+
{
|
|
159
|
+
type: "Control",
|
|
160
|
+
scope: "#/properties/elementType",
|
|
161
|
+
options: {
|
|
162
|
+
widget: "SelectInputField",
|
|
163
|
+
},
|
|
164
|
+
config: {
|
|
165
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
166
|
+
main: {
|
|
167
|
+
label: "Element Type",
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
}
|
|
166
171
|
UiSchema.elements[0].elements[0].elements[10] = {
|
|
167
172
|
type: "Control",
|
|
168
173
|
scope: "#/properties/dateFormat",
|
|
@@ -187,8 +192,8 @@ export function refreshPage(type: string, store: any) {
|
|
|
187
192
|
},
|
|
188
193
|
}
|
|
189
194
|
}
|
|
190
|
-
if(parentObj?.type === "LeaderBoard"){
|
|
191
|
-
UiSchema.elements[0].elements[0].elements[4] =
|
|
195
|
+
if (parentObj?.type === "LeaderBoard") {
|
|
196
|
+
UiSchema.elements[0].elements[0].elements[4] =
|
|
192
197
|
{
|
|
193
198
|
type: "Control",
|
|
194
199
|
scope: "#/properties/columnFormat",
|
|
@@ -204,7 +209,7 @@ export function refreshPage(type: string, store: any) {
|
|
|
204
209
|
};
|
|
205
210
|
}
|
|
206
211
|
|
|
207
|
-
if (sessionStorage.getItem("copiedConfig")
|
|
212
|
+
if (sessionStorage.getItem("copiedConfig")) {
|
|
208
213
|
this.ElementPathSetter(UiSchema);
|
|
209
214
|
}
|
|
210
215
|
store.setUiSchema(UiSchema);
|
|
@@ -230,33 +235,33 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
230
235
|
if (sessionStorage.getItem("copiedConfig")) {
|
|
231
236
|
schema.properties.RemoveItemButton.disabled = false;
|
|
232
237
|
}
|
|
233
|
-
|
|
238
|
+
|
|
234
239
|
const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
235
240
|
const path = store.searchParams?.get("path");
|
|
236
241
|
const id = store.searchParams?.get("id")
|
|
237
242
|
|
|
238
|
-
let pathArray = [{label: config.name ?? "NewPage", path: `/PageMaster${id ? `?id=${id}` : ''}`}];
|
|
243
|
+
let pathArray = [{ label: config.name ?? "NewPage", path: `/PageMaster${id ? `?id=${id}` : ''}` }];
|
|
239
244
|
|
|
240
245
|
if (path) {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
const pathArrayAll = path.split(".");
|
|
247
|
+
const arr: any = []
|
|
248
|
+
pathArrayAll.map((e: string, i: number) => {
|
|
249
|
+
if (i === 0) {
|
|
250
|
+
arr.push(e)
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
arr.push(`${arr[i - 1]}.${e}`)
|
|
254
|
+
})
|
|
250
255
|
|
|
251
256
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
arr.map((e) => {
|
|
258
|
+
const data = _.get(config, e)
|
|
259
|
+
pathArray.push({
|
|
260
|
+
label: data?.name || data?.eventType || "NewComponent",
|
|
261
|
+
path: `/Component?path=${e}${id ? `&id=${id}` : ''}`
|
|
262
|
+
});
|
|
263
|
+
})
|
|
264
|
+
}
|
|
260
265
|
|
|
261
266
|
schema.properties.pageName.path = pathArray
|
|
262
267
|
return schema;
|
|
@@ -273,14 +278,18 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
273
278
|
},
|
|
274
279
|
editComponents: function () {
|
|
275
280
|
|
|
276
|
-
if (validateAndShowErrors(store)) return;
|
|
281
|
+
if (validateAndShowErrors(store)) return;
|
|
277
282
|
const rowId = dynamicData.path.split(".")[1];
|
|
278
283
|
const path = store.searchParams?.get("path");
|
|
279
284
|
const id = store.searchParams?.get("id");
|
|
280
285
|
saveFormdataInSessionStorage(store.ctx.core.data, path)
|
|
281
286
|
if (path) {
|
|
282
|
-
|
|
283
|
-
|
|
287
|
+
let finalPath = `${path}`;
|
|
288
|
+
if (dynamicData?.path?.startsWith("tabLabel")) {
|
|
289
|
+
finalPath = `${finalPath}.tabLabelElements[${rowId}]`
|
|
290
|
+
} else {
|
|
291
|
+
finalPath = `${finalPath}.elements[${rowId}]`
|
|
292
|
+
}
|
|
284
293
|
store.searchParams.set("path", finalPath)
|
|
285
294
|
store.setSearchParams(store.searchParams)
|
|
286
295
|
this.setPage()
|
|
@@ -291,7 +300,12 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
291
300
|
deleteComponents: function (shouldUpdateDialog: boolean = true) {
|
|
292
301
|
const path = store.searchParams?.get("path");
|
|
293
302
|
const rowId = sessionStorage.getItem('rowId');
|
|
294
|
-
|
|
303
|
+
const isTabLabelElements = sessionStorage.getItem('isTabLabelElements') === "true";
|
|
304
|
+
if (isTabLabelElements) {
|
|
305
|
+
store.formData.tabLabelElements.splice(rowId, 1);
|
|
306
|
+
} else {
|
|
307
|
+
store.formData.elements.splice(rowId, 1);
|
|
308
|
+
}
|
|
295
309
|
const response = saveFormdataInSessionStorage(store.ctx.core.data, path)
|
|
296
310
|
const data = path ? _.get(response, path) : response;
|
|
297
311
|
store.setFormdata(data);
|
|
@@ -299,6 +313,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
299
313
|
store.updateDialog("popUpComponentSection");
|
|
300
314
|
}
|
|
301
315
|
sessionStorage.removeItem('rowId');
|
|
316
|
+
sessionStorage.removeItem('isTabLabelElements');
|
|
302
317
|
},
|
|
303
318
|
deleteEvent: function (shouldUpdateDialog: boolean = true) {
|
|
304
319
|
const path = store.searchParams?.get("path");
|
|
@@ -313,20 +328,28 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
313
328
|
},
|
|
314
329
|
widgetAddClickHandler: function () {
|
|
315
330
|
|
|
316
|
-
if (validateAndShowErrors(store)) return;
|
|
331
|
+
if (validateAndShowErrors(store)) return;
|
|
317
332
|
if (!Array.isArray(store.formData.elements)) {
|
|
318
333
|
store.formData.elements = []
|
|
319
334
|
}
|
|
335
|
+
if (!Array.isArray(store.formData.tabLabelElements)) {
|
|
336
|
+
store.formData.tabLabelElements = []
|
|
337
|
+
}
|
|
320
338
|
const path = store.searchParams?.get("path");
|
|
321
339
|
saveFormdataInSessionStorage(store.ctx.core.data, path)
|
|
322
|
-
|
|
340
|
+
let finalPath = `${path}`;
|
|
341
|
+
if (dynamicData.path.startsWith("tabLabel")) {
|
|
342
|
+
finalPath = `${finalPath}.tabLabelElements[${store.formData.tabLabelElements.length}]`
|
|
343
|
+
} else {
|
|
344
|
+
finalPath = `${finalPath}.elements[${store.formData.elements.length}]`
|
|
345
|
+
}
|
|
323
346
|
store.searchParams.set("path", finalPath)
|
|
324
347
|
store.setSearchParams(store.searchParams)
|
|
325
348
|
this.setPage()
|
|
326
349
|
|
|
327
350
|
},
|
|
328
351
|
eventEditHandler: function () {
|
|
329
|
-
if (validateAndShowErrors(store)) return;
|
|
352
|
+
if (validateAndShowErrors(store)) return;
|
|
330
353
|
const rowId = dynamicData.path.split(".")[1];
|
|
331
354
|
const path = store.searchParams?.get("path");
|
|
332
355
|
const id = store.searchParams?.get("id");
|
|
@@ -335,7 +358,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
335
358
|
store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
|
|
336
359
|
},
|
|
337
360
|
eventAddHandler: function () {
|
|
338
|
-
if (validateAndShowErrors(store)) return;
|
|
361
|
+
if (validateAndShowErrors(store)) return;
|
|
339
362
|
const path = store.searchParams?.get("path");
|
|
340
363
|
const id = store.searchParams?.get("id");
|
|
341
364
|
if (!Array.isArray(store.formData.events)) {
|
|
@@ -351,6 +374,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
351
374
|
deletePopUpComponent: function () {
|
|
352
375
|
const rowId = dynamicData.path.split(".")[1];
|
|
353
376
|
sessionStorage.setItem('rowId', rowId);
|
|
377
|
+
sessionStorage.setItem('isTabLabelElements', dynamicData.path.startsWith("tabLabel") ? "true" : "false");
|
|
354
378
|
store.updateDialog("popUpComponentSection");
|
|
355
379
|
},
|
|
356
380
|
deletePopUpEvent: function () {
|
|
@@ -373,8 +397,8 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
373
397
|
const copiedElementPath = this.elementPathHandler(parentPathOfCopiedComponent, rowId, elementType);
|
|
374
398
|
const copiedFormData = getFormdataFromSessionStorage(copiedElementPath);
|
|
375
399
|
|
|
376
|
-
this.ElementPathSetter(uiSchema,copiedFormData);
|
|
377
|
-
sessionStorage.setItem('copiedConfig',JSON.stringify(copiedFormData));
|
|
400
|
+
this.ElementPathSetter(uiSchema, copiedFormData);
|
|
401
|
+
sessionStorage.setItem('copiedConfig', JSON.stringify(copiedFormData));
|
|
378
402
|
store.setNotify({
|
|
379
403
|
SuccessMessage: `${elementType} Copied Successfully`,
|
|
380
404
|
Success: true,
|
|
@@ -397,9 +421,17 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
397
421
|
if (!Array.isArray(store.formData.events)) {
|
|
398
422
|
store.formData.events = []
|
|
399
423
|
}
|
|
424
|
+
if (!Array.isArray(store.formData.tabLabelElements)) {
|
|
425
|
+
store.formData.tabLabelElements = []
|
|
426
|
+
}
|
|
400
427
|
saveFormdataInSessionStorage(store.ctx.core.data, pastedElementParentPath);
|
|
401
428
|
const formData = getFormdataFromSessionStorage(pastedElementParentPath);
|
|
402
|
-
const
|
|
429
|
+
const currentLength = {
|
|
430
|
+
"TabsComponent": formData.tabLabelElements.length,
|
|
431
|
+
"Component": formData.elements.length,
|
|
432
|
+
"Events": formData.events.length
|
|
433
|
+
};
|
|
434
|
+
const insertElementIndex = currentLength[elementType] || 0;
|
|
403
435
|
const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
|
|
404
436
|
|
|
405
437
|
const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
@@ -413,7 +445,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
413
445
|
Fail: true,
|
|
414
446
|
});
|
|
415
447
|
}
|
|
416
|
-
else if(copiedConfig.name && elementType === "Events"){
|
|
448
|
+
else if (copiedConfig.name && elementType === "Events") {
|
|
417
449
|
store.setNotify({
|
|
418
450
|
FailMessage: notificationMessages.Component,
|
|
419
451
|
Fail: true,
|
|
@@ -436,34 +468,37 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
436
468
|
elementPathHandler: function (parentPath: string, rowId: any, elementType: string) {
|
|
437
469
|
if (elementType === "Component") {
|
|
438
470
|
return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
471
|
+
}
|
|
472
|
+
if(elementType === "TabsComponent"){
|
|
473
|
+
return `${parentPath}.tabLabelElements[${rowId}]`
|
|
439
474
|
}
|
|
440
475
|
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
441
476
|
},
|
|
442
477
|
ElementPathSetter: function (uiSchema: any, copiedFormData?: any) {
|
|
443
478
|
const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
444
|
-
if(uiSchema?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons){
|
|
445
|
-
uiSchema.elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage
|
|
479
|
+
if (uiSchema?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons) {
|
|
480
|
+
uiSchema.elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
|
|
446
481
|
}
|
|
447
|
-
else if(uiSchema?.elements?.[0]?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons){
|
|
448
|
-
uiSchema.elements[0].elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage
|
|
482
|
+
else if (uiSchema?.elements?.[0]?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons) {
|
|
483
|
+
uiSchema.elements[0].elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
|
|
449
484
|
}
|
|
450
485
|
|
|
451
|
-
|
|
452
|
-
if(uiSchema?.elements?.[1]?.elements?.[1]?.config?.main?.headerIcons){
|
|
453
|
-
uiSchema.elements[1].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage
|
|
486
|
+
|
|
487
|
+
if (uiSchema?.elements?.[1]?.elements?.[1]?.config?.main?.headerIcons) {
|
|
488
|
+
uiSchema.elements[1].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Event: ${formData.eventType}`;
|
|
454
489
|
}
|
|
455
|
-
else if(uiSchema?.elements?.[0]?.elements?.[1]?.config?.main?.headerIcons){
|
|
456
|
-
uiSchema.elements[0].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage
|
|
490
|
+
else if (uiSchema?.elements?.[0]?.elements?.[1]?.config?.main?.headerIcons) {
|
|
491
|
+
uiSchema.elements[0].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.eventType}`;
|
|
457
492
|
}
|
|
458
493
|
},
|
|
459
494
|
|
|
460
|
-
|
|
461
|
-
onNavigatePopupYes: function() {
|
|
462
|
-
try{
|
|
495
|
+
|
|
496
|
+
onNavigatePopupYes: function () {
|
|
497
|
+
try {
|
|
463
498
|
store.navigate(sessionStorage.getItem("pendingNavigatePath"))
|
|
464
499
|
store.updateDialog(`pageNamepopup`)
|
|
465
500
|
}
|
|
466
|
-
catch(e){
|
|
501
|
+
catch (e) {
|
|
467
502
|
store.updateDialog(`pageNamepopup`)
|
|
468
503
|
store.setNotify({
|
|
469
504
|
FailMessage: "Couldn't navigate page",
|
|
@@ -471,8 +506,8 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
471
506
|
})
|
|
472
507
|
}
|
|
473
508
|
},
|
|
474
|
-
onNavigatePopupNo: function() {
|
|
475
|
-
|
|
509
|
+
onNavigatePopupNo: function () {
|
|
510
|
+
store.updateDialog(`pageNamepopup`)
|
|
476
511
|
}
|
|
477
512
|
}
|
|
478
513
|
};
|