impaktapps-ui-builder 1.0.111 → 1.0.113
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 +169 -133
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +10 -10
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildUiSchema.d.ts +1 -2
- package/dist/src/impaktapps-ui-builder/lib/index.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/downloadFile.d.ts +2 -5
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +3 -4
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildCard.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +12 -12
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +115 -63
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +11 -6
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +14 -7
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -3
- package/src/impaktapps-ui-builder/builder/services/component.ts +1 -1
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +14 -14
- package/src/impaktapps-ui-builder/lib/index.ts +9 -10
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +18 -33
- package/src/impaktapps-ui-builder/runtime/services/events.ts +10 -10
- package/src/impaktapps-ui-builder/runtime/services/service.ts +28 -41
|
@@ -3,8 +3,7 @@ export declare let schema: {
|
|
|
3
3
|
properties: {};
|
|
4
4
|
required: any[];
|
|
5
5
|
};
|
|
6
|
-
export declare
|
|
7
|
-
export declare const buildSchema: (config: any) => {
|
|
6
|
+
export declare const buildSchema: (config: any, tableName?: string, isArrayType?: boolean) => {
|
|
8
7
|
type: string;
|
|
9
8
|
properties: {};
|
|
10
9
|
required: any[];
|
|
@@ -7,4 +7,3 @@ export { default as buildConfig } from "../builder/build/buildConfig";
|
|
|
7
7
|
export { default as buildUiSchema } from "../builder/build/buildUiSchema";
|
|
8
8
|
export { buildSchema } from "../builder/build/buildUiSchema";
|
|
9
9
|
export { default as clearFromSessionStorage } from "../builder/services/utils";
|
|
10
|
-
export { downloadFile, downloadFileFromUrl } from "../runtime/services/downloadFile";
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
}): void;
|
|
5
|
-
export declare const downloadFileFromUrl: (response: any, service: any) => void;
|
|
1
|
+
export declare const downloadFile: (obj: any) => void;
|
|
2
|
+
export declare const doDownload: (response: any, service: any) => void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { downloadFile } from "./downloadFile";
|
|
2
1
|
interface funcParamsProps {
|
|
3
2
|
store: any;
|
|
4
3
|
dynamicData: any;
|
|
@@ -12,7 +11,7 @@ export declare const extractEvents: (eventConfig: any) => any;
|
|
|
12
11
|
declare const _default: (funcParams: funcParamsProps) => {
|
|
13
12
|
setPage: () => Promise<void>;
|
|
14
13
|
onCellRenderer: (cellParams: any) => {};
|
|
15
|
-
onClick: () =>
|
|
14
|
+
onClick: () => void;
|
|
16
15
|
onKeyDown: () => void;
|
|
17
16
|
onFileDelete: () => Promise<void>;
|
|
18
17
|
onMount: () => void;
|
|
@@ -28,7 +27,7 @@ declare const _default: (funcParams: funcParamsProps) => {
|
|
|
28
27
|
onNext: (functionParameters: any) => Promise<void>;
|
|
29
28
|
onReset: (functionParameters: any) => Promise<void>;
|
|
30
29
|
callHandler: (eventType: string, functionParameters?: any) => Promise<void>;
|
|
31
|
-
downloadFile:
|
|
32
|
-
|
|
30
|
+
downloadFile: (obj: any) => void;
|
|
31
|
+
download: (response: any, service: any) => void;
|
|
33
32
|
};
|
|
34
33
|
export default _default;
|
package/package.json
CHANGED
|
@@ -7,9 +7,9 @@ export const buildCard = (config,componentScope,store) =>{
|
|
|
7
7
|
if (config.style) {
|
|
8
8
|
card.config.wrapperStyle = JSON.parse(config.style)
|
|
9
9
|
}
|
|
10
|
-
card.elements[0].elements[0].elements[0].elements[1].scope = `#/properties/${config.name}/properties/value
|
|
11
|
-
card.elements[1].scope = `#/properties/${config.name}/properties/url
|
|
12
|
-
card.elements[0].elements[0].elements[1].scope = `#/properties/${config.name}/properties/description
|
|
10
|
+
card.elements[0].elements[0].elements[0].elements[1].scope = `#/properties/${config.name}/properties/value`
|
|
11
|
+
card.elements[1].scope = `#/properties/${config.name}/properties/url`
|
|
12
|
+
card.elements[0].elements[0].elements[1].scope = `#/properties/${config.name}/properties/description`
|
|
13
13
|
if(config.layout){
|
|
14
14
|
card.config.layout = createLayoutFormat(config.layout)
|
|
15
15
|
}
|
|
@@ -10,9 +10,6 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
10
10
|
if (config.lazyLoading) {
|
|
11
11
|
table.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
12
12
|
}
|
|
13
|
-
if (config.defaultColumnSize) {
|
|
14
|
-
table.config.main.defaultColumnSize = config.defaultColumnSize
|
|
15
|
-
}
|
|
16
13
|
if (config.enableRowMovement) {
|
|
17
14
|
table.config.main.enableRowMovement = config.enableRowMovement === "YES" ? true : false;
|
|
18
15
|
}
|
|
@@ -44,28 +41,28 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
44
41
|
if (config.downloadAllData) {
|
|
45
42
|
table.config.main.downloadAllData = config.downloadAllData === "YES" ? true : false
|
|
46
43
|
}
|
|
47
|
-
if
|
|
44
|
+
if(config.disableGlobalSearch){
|
|
48
45
|
table.config.main.disableGlobalSearch = config.disableGlobalSearch === "YES" ? true : false
|
|
49
46
|
}
|
|
50
|
-
if
|
|
47
|
+
if(config.disableColumnFilter){
|
|
51
48
|
table.config.main.disableColumnFilter = config.disableColumnFilter === "YES" ? true : false
|
|
52
49
|
}
|
|
53
|
-
if
|
|
50
|
+
if(config.disableSorting){
|
|
54
51
|
table.config.main.disableSorting = config.disableSorting === "YES" ? true : false
|
|
55
52
|
}
|
|
56
|
-
if
|
|
53
|
+
if(config.disableEditColumn){
|
|
57
54
|
table.config.main.disableEditColumn = config.disableEditColumn === "YES" ? true : false
|
|
58
55
|
}
|
|
59
|
-
if
|
|
56
|
+
if(config.disableFullScreenToggle){
|
|
60
57
|
table.config.main.disableFullScreenToggle = config.disableFullScreenToggle === "YES" ? true : false
|
|
61
58
|
}
|
|
62
|
-
if
|
|
59
|
+
if(config.disableDensityToggle){
|
|
63
60
|
table.config.main.disableDensityToggle = config.disableDensityToggle === "YES" ? true : false
|
|
64
61
|
}
|
|
65
|
-
if
|
|
62
|
+
if(config.disableDownloadFile){
|
|
66
63
|
table.config.main.disableDownloadFile = config.disableDownloadFile === "YES" ? true : false
|
|
67
64
|
}
|
|
68
|
-
if
|
|
65
|
+
if(config.disablePagination){
|
|
69
66
|
table.config.main.disablePagination = config.disablePagination === "YES" ? true : false
|
|
70
67
|
}
|
|
71
68
|
if (config.Table_Download_Keys_Name) {
|
|
@@ -74,8 +71,11 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
74
71
|
if (config.selectKey) {
|
|
75
72
|
table.config.main.selectKey = config.selectKey
|
|
76
73
|
}
|
|
77
|
-
if
|
|
74
|
+
if(config.maxPageSize){
|
|
78
75
|
table.config.main.maxPageSize = config.maxPageSize
|
|
79
76
|
}
|
|
77
|
+
if(config.initialDensity){
|
|
78
|
+
table.config.main.initialDensity = config.initialDensity
|
|
79
|
+
}
|
|
80
80
|
return table;
|
|
81
81
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _ from "lodash";
|
|
2
|
+
import emptyBox from "./uischema/emptyBox";
|
|
3
|
+
import cardSlider from "./uischema/cardSlider";
|
|
2
4
|
import { buildLeaderBoard } from "./buildLeaderboard";
|
|
3
5
|
import { buildProgressBarCard } from "./buildProgressBarCard";
|
|
4
6
|
import { buildProgressBar } from "./buildProgressBar";
|
|
@@ -45,77 +47,127 @@ export let schema = {
|
|
|
45
47
|
properties: {},
|
|
46
48
|
required: []
|
|
47
49
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
//MultipleSelect
|
|
51
|
+
function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean) {
|
|
52
|
+
if (arrayHolderName) {
|
|
53
|
+
if (schema.properties?.[tableName]?.items?.properties) {
|
|
54
|
+
if (!schema.properties?.[tableName]?.items?.properties?.[configObj.name]) {
|
|
55
|
+
schema.properties[tableName].items.properties[configObj.name] = {};
|
|
56
|
+
if (configObj.type === "Select" && configObj.value?.length > 0) {
|
|
57
|
+
schema.properties[tableName].items.properties[configObj.name] = {
|
|
58
|
+
oneOf: configObj.value.map((e) => {
|
|
59
|
+
return { const: e.value, title: e.label }
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else if (configObj.type === "MultipleSelect" && configObj.value?.length > 0) {
|
|
64
|
+
schema.properties[tableName].items.properties[configObj.name] = {
|
|
65
|
+
items: {
|
|
66
|
+
oneOf: configObj.value.map((e) => {
|
|
67
|
+
return { const: e.value, title: e.label }
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
} else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && configObj.value?.length > 0) {
|
|
75
|
+
if (configObj.type === "Select") {
|
|
76
|
+
schema.properties[configObj.name] = {
|
|
77
|
+
oneOf: configObj.value.map((e) => {
|
|
78
|
+
return { const: e.value, title: e.label }
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else if (configObj.type === "MultipleSelect") {
|
|
83
|
+
schema.properties[configObj.name] = {
|
|
60
84
|
items: {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
}
|
|
85
|
+
oneOf: configObj.value.map((e) => {
|
|
86
|
+
return { const: e.value, title: e.label }
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (configObj.validation) {
|
|
93
|
+
configObj.validation.forEach((rule: any) => {
|
|
94
|
+
if (tableName) {
|
|
95
|
+
if (schema.properties?.[tableName]?.items?.properties) {
|
|
96
|
+
if (!schema.properties?.[tableName]?.items?.properties?.[configObj.name]) {
|
|
97
|
+
schema.properties[tableName].items.properties[configObj.name] = {};
|
|
98
|
+
if (configObj.type === "Select" || configObj.value?.length > 0) {
|
|
99
|
+
schema.properties[tableName].items.properties[configObj.name] = {
|
|
100
|
+
oneOf: configObj.value.map((e) => {
|
|
101
|
+
return { const: e.value, title: e.label }
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else if (configObj.type === "MultipleSelect" || configObj.value?.length > 0) {
|
|
106
|
+
schema.properties[tableName].items.properties[configObj.name] = {
|
|
107
|
+
items: {
|
|
108
|
+
oneOf: configObj.value.map((e) => {
|
|
109
|
+
return { const: e.value, title: e.label }
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (rule.validationType === "required") {
|
|
116
|
+
schema.properties?.[tableName]?.items?.required.push(configObj.name)
|
|
117
|
+
} else {
|
|
118
|
+
schema.properties[tableName].items.properties[configObj.name]["type"] = "string"
|
|
119
|
+
schema.properties[tableName].items.properties[configObj.name][rule.validationType] =
|
|
120
|
+
isNaN(rule.validationValue) ?
|
|
121
|
+
rule.validationValue : Number(rule.validationValue)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
if (!schema.properties[configObj.name]) {
|
|
127
|
+
schema.properties[configObj.name] = {};
|
|
128
|
+
}
|
|
129
|
+
if (rule.validationType === "required") {
|
|
130
|
+
schema.required.push(configObj.name)
|
|
131
|
+
} else {
|
|
132
|
+
schema.properties[configObj.name]["type"] = "string"
|
|
133
|
+
schema.properties[configObj.name][rule.validationType] =
|
|
134
|
+
isNaN(rule.validationValue) ?
|
|
135
|
+
rule.validationValue : Number(rule.validationValue)
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
66
140
|
|
|
67
|
-
const arrayItemSchema = parentSchema.properties[config.name].items;
|
|
68
141
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
config.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
142
|
+
}
|
|
143
|
+
export const buildSchema = (config: any, tableName?: string, isArrayType?: boolean) => {
|
|
144
|
+
buildRule(config, tableName, isArrayType);
|
|
145
|
+
if (config?.elements) {
|
|
146
|
+
if ( config.type == "Array") {
|
|
147
|
+
if (!schema.properties[config.name]) {
|
|
148
|
+
schema.properties[config.name] = {
|
|
149
|
+
type: "array",
|
|
150
|
+
items: {
|
|
151
|
+
type: "object",
|
|
152
|
+
properties: {},
|
|
153
|
+
required: []
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
config.elements.map((e, elemInd) => {
|
|
158
|
+
buildSchema(e, config.name, config.type === "Array" ? true : false)
|
|
159
|
+
})
|
|
78
160
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
config.validation?.forEach((v: any) => {
|
|
84
|
-
if (v.validationType === "required") {
|
|
85
|
-
parentSchema.required ??= [];
|
|
86
|
-
parentSchema.required.push(config.name);
|
|
87
|
-
} else if (v.validationType === "readOnly") {
|
|
88
|
-
fieldSchema.type = "string";
|
|
89
|
-
fieldSchema.disabled = true;
|
|
90
|
-
} else {
|
|
91
|
-
fieldSchema.type = "string";
|
|
92
|
-
fieldSchema[v.validationType] = isNaN(v.validationValue)
|
|
93
|
-
? v.validationValue
|
|
94
|
-
: Number(v.validationValue);
|
|
161
|
+
else {
|
|
162
|
+
config.elements.map((e, elemInd) => {
|
|
163
|
+
buildSchema(e)
|
|
164
|
+
})
|
|
95
165
|
}
|
|
96
|
-
});
|
|
97
|
-
if (config.type === "Select" && config.value?.length) {
|
|
98
|
-
fieldSchema.oneOf = config.value.map((v: any) => ({
|
|
99
|
-
const: v.value,
|
|
100
|
-
title: v.label,
|
|
101
|
-
}));
|
|
102
166
|
}
|
|
103
|
-
if (config.type === "MultipleSelect" && config.value?.length) {
|
|
104
|
-
fieldSchema.type = "array";
|
|
105
|
-
fieldSchema.items = {
|
|
106
|
-
oneOf: config.value.map((v: any) => ({
|
|
107
|
-
const: v.value,
|
|
108
|
-
title: v.label,
|
|
109
|
-
})),
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export const buildSchema = (config) => {
|
|
115
|
-
buildSchemaFromConfig(config, schema)
|
|
116
167
|
return schema;
|
|
117
168
|
}
|
|
118
169
|
|
|
170
|
+
|
|
119
171
|
const buildUiSchema = (config: any, store?: any) => {
|
|
120
172
|
let elements: any = {};
|
|
121
173
|
const componentScope = `#/properties/${config.name}`;
|
|
@@ -335,7 +387,7 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
335
387
|
}
|
|
336
388
|
if (cellElem.elementType == "tableHeader") {
|
|
337
389
|
const headerElem = buildUiSchema(cellElem, store);
|
|
338
|
-
tableHeaderElements.push({
|
|
390
|
+
tableHeaderElements.push({widget:headerElem});
|
|
339
391
|
return false;
|
|
340
392
|
}
|
|
341
393
|
const tableElem = {
|
|
@@ -327,7 +327,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
327
327
|
emptyBox("PopUpEmpty", { xs: 6, sm: 6, md: 0, lg: 0 })
|
|
328
328
|
]
|
|
329
329
|
break;
|
|
330
|
-
case "Text":
|
|
330
|
+
case "Text":
|
|
331
331
|
uiSchema.elements = [
|
|
332
332
|
getInputField("placeholder", "Placeholder"),
|
|
333
333
|
getRadioInputField("multiline", "Multiline", ["YES", "NO"]),
|
|
@@ -477,7 +477,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
477
477
|
getRadioInputField("disableDensityToggle", "Disable Density Toggle", ["YES", "NO"]),
|
|
478
478
|
getRadioInputField("disableDownloadFile", "Disable Download File", ["YES", "NO"]),
|
|
479
479
|
getRadioInputField("disablePagination", "Disable Pagination", ["YES", "NO"]),
|
|
480
|
-
getInputField("selectKey", "Selection Key")
|
|
480
|
+
getInputField("selectKey", "Selection Key"),
|
|
481
481
|
getMultiSelectField("filteringOptions", "Filtering Options"),
|
|
482
482
|
getSelectField("maxPageSize", "Max Page Size", [
|
|
483
483
|
{ label: "10", value: 10 },
|
|
@@ -487,6 +487,11 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
487
487
|
{ label: "100", value: 100 },
|
|
488
488
|
{ label: "500", value: 500 }
|
|
489
489
|
]),
|
|
490
|
+
getSelectField("initialDensity", "Initial Toggle Density", [
|
|
491
|
+
{ label: "Compact", value: "compact" },
|
|
492
|
+
{ label: "Comfortable", value: "comfortable" },
|
|
493
|
+
{ label: "Spacious", value: "spacious" }
|
|
494
|
+
]),
|
|
490
495
|
buildWrapper("Tree Table Properties", [
|
|
491
496
|
getRadioInputField("enableRowMovement", "Row Rearrangement", ["YES", "NO"]),
|
|
492
497
|
getRadioInputField("enableExpanding", "Row Expanding", ["YES", "NO"]),
|
|
@@ -494,7 +499,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
494
499
|
getRadioInputField("paginateExpandedRows", "Multi Page Expansion", ["YES", "NO"]),
|
|
495
500
|
getRadioInputField("treeStructure", "Flat Tree Structure", ["YES", "NO"]),
|
|
496
501
|
getRadioInputField("filterFromLeafRows", "Filter from tree rows", ["YES", "NO"]),
|
|
497
|
-
|
|
502
|
+
emptyBox("LazyLoadingTableEmpty2"), emptyBox("LazyLoadingTableEmpty3")
|
|
498
503
|
]),
|
|
499
504
|
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
500
505
|
sizeHolder,
|
|
@@ -532,7 +537,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
532
537
|
emptyBox("MultipleSelectEmpty2")
|
|
533
538
|
]
|
|
534
539
|
break;
|
|
535
|
-
case "Date":
|
|
540
|
+
case "Date":
|
|
536
541
|
uiSchema.elements = [
|
|
537
542
|
getSelectField("variant", "Variant", [
|
|
538
543
|
{ label: "Outlined", value: "outlined" },
|
|
@@ -542,7 +547,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
542
547
|
emptyBox("DateEmpty1", { xs: 6, sm: 6, md: 8, lg: 9 }),
|
|
543
548
|
]
|
|
544
549
|
break;
|
|
545
|
-
case "DateTime":
|
|
550
|
+
case "DateTime":
|
|
546
551
|
uiSchema.elements = [
|
|
547
552
|
getSelectField("variant", "Variant", [
|
|
548
553
|
{ label: "Outlined", value: "outlined" },
|
|
@@ -569,7 +574,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
569
574
|
getRadioInputField("variant", "Variant", ["Outlined", "Standard"]),
|
|
570
575
|
getRadioInputField("disableUpload", "Disable Upload", ["YES", "NO"]),
|
|
571
576
|
getRadioInputField("disableDelete", "Disable Delete", ["YES", "NO"]),
|
|
572
|
-
getRadioInputField("disableDownload", "Disable Download", ["YES", "NO"])
|
|
577
|
+
getRadioInputField("disableDownload", "Disable Download", ["YES", "NO"])
|
|
573
578
|
]
|
|
574
579
|
break;
|
|
575
580
|
}
|
|
@@ -58,15 +58,15 @@ export const ComponentSchema: any = {
|
|
|
58
58
|
{ title: "Date Column", const: "date" },
|
|
59
59
|
{ title: "DateTime Column", const: "dateTime" },
|
|
60
60
|
{ title: "Amount Column", const: "amount" },
|
|
61
|
-
{ title: "Center Column", const: "action"
|
|
61
|
+
{ title: "Center Column", const: "action"}
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
64
|
variant: {
|
|
65
65
|
oneOf: [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
{ title: "Outlined", const: "outlined" },
|
|
67
|
+
{ title: "Filled", const: "filled" },
|
|
68
|
+
{ title: "Standard", const: "standard" },
|
|
69
|
+
]
|
|
70
70
|
},
|
|
71
71
|
orientation: {
|
|
72
72
|
oneOf: [
|
|
@@ -83,7 +83,7 @@ export const ComponentSchema: any = {
|
|
|
83
83
|
{ title: "Put", const: "put" },
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
|
-
maxPageSize:
|
|
86
|
+
maxPageSize:{
|
|
87
87
|
type: "number",
|
|
88
88
|
oneOf: [
|
|
89
89
|
{ title: "10", const: 10 },
|
|
@@ -94,6 +94,14 @@ export const ComponentSchema: any = {
|
|
|
94
94
|
{ title: "500", const: 500 }
|
|
95
95
|
]
|
|
96
96
|
},
|
|
97
|
+
initialDensity:{
|
|
98
|
+
type: "string",
|
|
99
|
+
oneOf: [
|
|
100
|
+
{ title: "Compact", const: "compact" },
|
|
101
|
+
{ title: "Comfortable", const: "comfortable" },
|
|
102
|
+
{ title: "Spacious", const: "spacious" }
|
|
103
|
+
]
|
|
104
|
+
},
|
|
97
105
|
layout: {
|
|
98
106
|
type: "array",
|
|
99
107
|
items: {
|
|
@@ -297,7 +305,6 @@ export const ComponentSchema: any = {
|
|
|
297
305
|
{ const: "minLength", title: "Minimum Length" },
|
|
298
306
|
{ const: "maxLength", title: "Maximum Length" },
|
|
299
307
|
{ const: "pattern", title: "Pattern" },
|
|
300
|
-
{ const: "readOnly", title: "Read Only" },
|
|
301
308
|
]
|
|
302
309
|
},
|
|
303
310
|
validationValue: {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { title } from "process";
|
|
2
|
-
|
|
3
1
|
export const EventSchema = {
|
|
4
2
|
type: "object",
|
|
5
3
|
properties: {
|
|
@@ -74,7 +72,7 @@ export const EventSchema = {
|
|
|
74
72
|
oneOf: [
|
|
75
73
|
{ title: "RankProvider", const: "RankProvider" },
|
|
76
74
|
{ title: "Download File", const: "downloadFile" },
|
|
77
|
-
{ title: "
|
|
75
|
+
{ title: "Download", const: "download" },
|
|
78
76
|
]
|
|
79
77
|
},
|
|
80
78
|
body: {
|
|
@@ -30,7 +30,7 @@ const sectionLabels = {
|
|
|
30
30
|
Timer: ["Core", "Events", "Style", "Validation"],
|
|
31
31
|
Rank: ["Core", "Events", "Style", "Validation"],
|
|
32
32
|
Button: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
33
|
-
Array: ["Core", "Components", "Properties","
|
|
33
|
+
Array: ["Core", "Components", "Properties","Validation"],
|
|
34
34
|
Radio: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
35
35
|
Text: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
36
36
|
TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
@@ -31,18 +31,18 @@ export default (funcParams: funcParamsProps) => {
|
|
|
31
31
|
return formData;
|
|
32
32
|
}
|
|
33
33
|
saveFormdataInSessionStorage(config)
|
|
34
|
-
return
|
|
34
|
+
return config
|
|
35
35
|
},
|
|
36
36
|
getUiSchema: function () {
|
|
37
37
|
const UiSchema = _.cloneDeep(PageMasterUiSchema(store.theme.myTheme));
|
|
38
|
-
if (sessionStorage.getItem("copiedConfig")) {
|
|
38
|
+
if (sessionStorage.getItem("copiedConfig") ) {
|
|
39
39
|
Component(store, dynamicData, submitHandler, service).ElementPathSetter(UiSchema)
|
|
40
40
|
}
|
|
41
41
|
return UiSchema;
|
|
42
42
|
},
|
|
43
43
|
getSchema: () => {
|
|
44
44
|
const schema = _.cloneDeep(PageMasterSchema);
|
|
45
|
-
if (sessionStorage.getItem("copiedConfig")) {
|
|
45
|
+
if (sessionStorage.getItem("copiedConfig") ) {
|
|
46
46
|
schema.properties.RemoveItemButton.disabled = false;
|
|
47
47
|
}
|
|
48
48
|
return schema;
|
|
@@ -70,8 +70,8 @@ export default (funcParams: funcParamsProps) => {
|
|
|
70
70
|
},
|
|
71
71
|
saveHandler: async () => await saveHandler(store, service, submitHandler),
|
|
72
72
|
Edit_Components: Component(store, dynamicData, submitHandler, service).editComponents,
|
|
73
|
-
|
|
74
|
-
Delete_Components: async function
|
|
73
|
+
|
|
74
|
+
Delete_Components: async function() {
|
|
75
75
|
await Component(store, dynamicData, submitHandler, service).deleteComponents(false);
|
|
76
76
|
store.updateDialog("popUpPageMasterComponent");
|
|
77
77
|
},
|
|
@@ -99,25 +99,25 @@ export default (funcParams: funcParamsProps) => {
|
|
|
99
99
|
store.updateDialog("popUpPageMasterEvent");
|
|
100
100
|
sessionStorage.removeItem('rowId');
|
|
101
101
|
},
|
|
102
|
-
deletePopUpComponent: function
|
|
102
|
+
deletePopUpComponent: function(){
|
|
103
103
|
const rowId = dynamicData.path.split(".")[1];
|
|
104
|
-
sessionStorage.setItem('rowId',
|
|
104
|
+
sessionStorage.setItem('rowId',rowId);
|
|
105
105
|
store.updateDialog("popUpPageMasterComponent");
|
|
106
106
|
},
|
|
107
|
-
deletePopUpEvent: function
|
|
107
|
+
deletePopUpEvent: function(){
|
|
108
108
|
const rowId = dynamicData.path.split(".")[1];
|
|
109
|
-
sessionStorage.setItem('rowId',
|
|
109
|
+
sessionStorage.setItem('rowId',rowId);
|
|
110
110
|
store.updateDialog("popUpPageMasterEvent");
|
|
111
111
|
},
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
copyPasteElement:
|
|
115
|
-
Component(store, dynamicData, submitHandler, service).copyPasteElement(store,
|
|
114
|
+
copyPasteElement: function(){
|
|
115
|
+
Component(store, dynamicData, submitHandler, service).copyPasteElement(store,this.setPage.bind(this));
|
|
116
116
|
},
|
|
117
|
-
|
|
118
|
-
RemoveItemButton: function
|
|
117
|
+
|
|
118
|
+
RemoveItemButton: function(){
|
|
119
119
|
Component(store, dynamicData, submitHandler, service).RemoveItemButton(store)
|
|
120
120
|
},
|
|
121
|
-
|
|
121
|
+
|
|
122
122
|
}
|
|
123
123
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export { schema
|
|
7
|
-
export {
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export {
|
|
11
|
-
export { downloadFile, downloadFileFromUrl } from "../runtime/services/downloadFile"
|
|
2
|
+
export {default as pageMaster} from "../builder/services/pageMaster"
|
|
3
|
+
export {default as pageMasterEvents} from "../builder/services/event"
|
|
4
|
+
export {default as pageMasterComponents} from "../builder/services/component"
|
|
5
|
+
export {default as pageService} from "../runtime/services/service"
|
|
6
|
+
export { schema} from "../builder/build/buildUiSchema"
|
|
7
|
+
export {default as buildConfig} from "../builder/build/buildConfig"
|
|
8
|
+
export {default as buildUiSchema} from "../builder/build/buildUiSchema"
|
|
9
|
+
export {buildSchema} from "../builder/build/buildUiSchema"
|
|
10
|
+
export {default as clearFromSessionStorage} from "../builder/services/utils"
|
|
@@ -1,47 +1,32 @@
|
|
|
1
|
-
export
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
jpeg: "image/jpeg",
|
|
15
|
-
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
16
|
-
csv: "text/csv",
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const blob = new Blob([bytes], {
|
|
20
|
-
type: mimeMap[extension!] || "application/octet-stream",
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const url = URL.createObjectURL(blob);
|
|
24
|
-
const a = document.createElement("a");
|
|
25
|
-
a.href = url;
|
|
26
|
-
a.download = name;
|
|
27
|
-
a.click();
|
|
1
|
+
export const downloadFile = (obj: any) => {
|
|
2
|
+
const typeArr = obj.name.split(".");
|
|
3
|
+
const data = obj.data;
|
|
4
|
+
const finalData = window.atob(data);
|
|
5
|
+
let file;
|
|
6
|
+
file = new File([finalData], typeArr[typeArr.length - 1]);
|
|
7
|
+
|
|
8
|
+
const url = URL.createObjectURL(file);
|
|
9
|
+
const link = document.createElement("a");
|
|
10
|
+
link.href = typeArr[typeArr.length - 1] === 'pdf' ? 'data:application/octet-stream;base64,' + data : url;
|
|
11
|
+
link.download = `${obj.name}`;
|
|
12
|
+
document.body.appendChild(link);
|
|
13
|
+
link.click();
|
|
28
14
|
|
|
29
15
|
URL.revokeObjectURL(url);
|
|
30
|
-
|
|
16
|
+
document.body.removeChild(link);
|
|
17
|
+
};
|
|
31
18
|
|
|
32
|
-
export const
|
|
19
|
+
export const doDownload = (response: any, service) => {
|
|
33
20
|
let url = `${service.defaults.baseURL}/${response.path}`;
|
|
34
21
|
if (response?.params) {
|
|
35
22
|
const keysArray = Object.keys(response?.params);
|
|
36
23
|
keysArray.map((e, i) => {
|
|
37
|
-
url = url + `${i === 0
|
|
24
|
+
url = url + `${i === 0?"?":"&"}${e}=${response?.params[e]}`
|
|
38
25
|
})
|
|
39
|
-
}
|
|
26
|
+
}
|
|
40
27
|
const link = document.createElement('a');
|
|
41
28
|
link.href = url;
|
|
42
29
|
document.body.appendChild(link);
|
|
43
30
|
link.click();
|
|
44
31
|
link.parentNode.removeChild(link);
|
|
45
32
|
};
|
|
46
|
-
|
|
47
|
-
|