impaktapps-ui-builder 1.0.312 → 1.0.389
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 +91 -125
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +11 -18
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.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/services/component.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +1 -7
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +20 -0
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +1 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +30 -16
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +10 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +2 -3
- package/src/impaktapps-ui-builder/builder/services/component.ts +7 -34
- package/src/impaktapps-ui-builder/builder/services/event.ts +2 -8
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +1 -7
- package/src/impaktapps-ui-builder/builder/services/utils.ts +6 -79
- package/src/impaktapps-ui-builder/runtime/services/service.ts +4 -1
|
@@ -6280,7 +6280,8 @@ const ComponentSchema = {
|
|
|
6280
6280
|
{ title: "Timer", const: "Timer" },
|
|
6281
6281
|
{ title: "Upload", const: "UploadFile" },
|
|
6282
6282
|
{ title: "Tree ", const: "TreeMap" },
|
|
6283
|
-
{ title: "Thought of the day", const: "Thought" }
|
|
6283
|
+
{ title: "Thought of the day", const: "Thought" },
|
|
6284
|
+
{ title: "PDF", const: "PdfViewer" }
|
|
6284
6285
|
]
|
|
6285
6286
|
},
|
|
6286
6287
|
elementType: {
|
|
@@ -6362,6 +6363,15 @@ const ComponentSchema = {
|
|
|
6362
6363
|
{ title: "Right", const: "right" }
|
|
6363
6364
|
]
|
|
6364
6365
|
},
|
|
6366
|
+
maxWidth: {
|
|
6367
|
+
oneOf: [
|
|
6368
|
+
{ title: "Extra Small", const: "xs" },
|
|
6369
|
+
{ title: "Small", const: "sm" },
|
|
6370
|
+
{ title: "Medium", const: "md" },
|
|
6371
|
+
{ title: "Large", const: "lg" },
|
|
6372
|
+
{ title: "Extra Large", const: "xl" }
|
|
6373
|
+
]
|
|
6374
|
+
},
|
|
6365
6375
|
toolTipPosition: {
|
|
6366
6376
|
oneOf: [
|
|
6367
6377
|
{ title: "Top", const: "top" },
|
|
@@ -7815,7 +7825,7 @@ const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
|
7815
7825
|
]
|
|
7816
7826
|
};
|
|
7817
7827
|
};
|
|
7818
|
-
const getArrayControlMultiField = (parentScope,
|
|
7828
|
+
const getArrayControlMultiField = (parentScope, firstFieldScope, secondFieldScope, firstFieldLabel, secondFieldLabel) => {
|
|
7819
7829
|
return {
|
|
7820
7830
|
type: "Control",
|
|
7821
7831
|
scope: `#/properties/${parentScope}`,
|
|
@@ -7824,9 +7834,7 @@ const getArrayControlMultiField = (parentScope, heading, firstFieldScope, second
|
|
|
7824
7834
|
},
|
|
7825
7835
|
config: {
|
|
7826
7836
|
layout: 12,
|
|
7827
|
-
main: {
|
|
7828
|
-
label: heading
|
|
7829
|
-
},
|
|
7837
|
+
main: {},
|
|
7830
7838
|
style: {
|
|
7831
7839
|
marginLeft: "-24px",
|
|
7832
7840
|
marginBottom: "24px !important",
|
|
@@ -8060,7 +8068,7 @@ const buildPropertiesSection = function(type) {
|
|
|
8060
8068
|
getRadioInputField("fullScreen", "FullScreen", ["YES", "NO"]),
|
|
8061
8069
|
getRadioInputField("fullWidth", "FullWidth", ["YES", "NO"]),
|
|
8062
8070
|
getInputField("maxWidth", "Max. Width"),
|
|
8063
|
-
emptyBox$1("PopUpEmpty", { xs:
|
|
8071
|
+
emptyBox$1("PopUpEmpty", { xs: 6, sm: 6, md: 0, lg: 0 })
|
|
8064
8072
|
];
|
|
8065
8073
|
break;
|
|
8066
8074
|
case "PopOver":
|
|
@@ -8108,7 +8116,7 @@ const buildPropertiesSection = function(type) {
|
|
|
8108
8116
|
uiSchema.elements = [
|
|
8109
8117
|
getInputField("rank", "Rank"),
|
|
8110
8118
|
getInputField("height", "Height"),
|
|
8111
|
-
emptyBox$1("RankCardEmpty1", { xs:
|
|
8119
|
+
emptyBox$1("RankCardEmpty1", { xs: 0, sm: 0, md: 4, lg: 4 })
|
|
8112
8120
|
];
|
|
8113
8121
|
break;
|
|
8114
8122
|
case "LeaderBoard":
|
|
@@ -8138,7 +8146,6 @@ const buildPropertiesSection = function(type) {
|
|
|
8138
8146
|
getInputField("bottomLabel_3", "Third BottomLabel"),
|
|
8139
8147
|
getInputField("size", "Size"),
|
|
8140
8148
|
getRadioInputField("variant", "Variant", ["circular", "horizontal"]),
|
|
8141
|
-
emptyBox$1("ProgressBarCardEmpty", { xs: 6, sm: 0, md: 8, lg: 6 }),
|
|
8142
8149
|
getArrayControl("pieArcColors", "color", "Color")
|
|
8143
8150
|
];
|
|
8144
8151
|
break;
|
|
@@ -8177,7 +8184,7 @@ const buildPropertiesSection = function(type) {
|
|
|
8177
8184
|
getRadioInputField("multiSelect", "Enable multiSelect", ["YES", "No"]),
|
|
8178
8185
|
getInputField("size", "Size"),
|
|
8179
8186
|
getSelectField("color", "Color"),
|
|
8180
|
-
emptyBox$1("ButtonEmpty1", { xs: 6, sm:
|
|
8187
|
+
emptyBox$1("ButtonEmpty1", { xs: 6, sm: 6, md: 8, lg: 9 })
|
|
8181
8188
|
];
|
|
8182
8189
|
break;
|
|
8183
8190
|
case "Box":
|
|
@@ -8207,8 +8214,8 @@ const buildPropertiesSection = function(type) {
|
|
|
8207
8214
|
getInputField("yAxisTickCount", "Y Axis TickCount"),
|
|
8208
8215
|
getSelectField("xAxisFormatType", "X Axis Format Type"),
|
|
8209
8216
|
emptyBox$1("GraphEmpty1", { xs: 0, sm: 0, md: 4, lg: 6 }),
|
|
8210
|
-
getArrayControlMultiField("legendLabels", "
|
|
8211
|
-
getArrayControlMultiField("pieArcColors", "
|
|
8217
|
+
getArrayControlMultiField("legendLabels", "key", "value", "Key", "Label"),
|
|
8218
|
+
getArrayControlMultiField("pieArcColors", "key", "value", "Key", "Color")
|
|
8212
8219
|
];
|
|
8213
8220
|
break;
|
|
8214
8221
|
case "WrapperSection":
|
|
@@ -8228,7 +8235,7 @@ const buildPropertiesSection = function(type) {
|
|
|
8228
8235
|
getRadioInputField("verticalOrientation", "Vertical Orientation", ["YES", "NO"]),
|
|
8229
8236
|
getRadioInputField("lazyLoad", "Lazy Load", ["YES", "NO"]),
|
|
8230
8237
|
emptyBox$1("TabEmpty"),
|
|
8231
|
-
getArrayControlMultiField("sectionLabels", "
|
|
8238
|
+
getArrayControlMultiField("sectionLabels", "label", "icon", "Label", "Icon")
|
|
8232
8239
|
];
|
|
8233
8240
|
break;
|
|
8234
8241
|
case "Table":
|
|
@@ -8257,7 +8264,8 @@ const buildPropertiesSection = function(type) {
|
|
|
8257
8264
|
getRadioInputField("treeStructure", "Flat Tree Structure", ["YES", "NO"]),
|
|
8258
8265
|
getRadioInputField("filterFromLeafRows", "Filter from tree rows", ["YES", "NO"]),
|
|
8259
8266
|
getInputField("defaultColumnSize", "Default Column Size"),
|
|
8260
|
-
|
|
8267
|
+
,
|
|
8268
|
+
emptyBox$1("LazyLoadingTableEmpty3")
|
|
8261
8269
|
]),
|
|
8262
8270
|
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
8263
8271
|
sizeHolder,
|
|
@@ -8291,12 +8299,22 @@ const buildPropertiesSection = function(type) {
|
|
|
8291
8299
|
getSelectField("toolTipPosition", "Tooltip Position")
|
|
8292
8300
|
];
|
|
8293
8301
|
break;
|
|
8302
|
+
case "PdfViewer":
|
|
8303
|
+
uiSchema.elements = [
|
|
8304
|
+
getInputField("title", "title"),
|
|
8305
|
+
getRadioInputField("fullScreen", "FullScreen", ["YES", "NO"]),
|
|
8306
|
+
getRadioInputField("fullWidth", "FullWidth", ["YES", "NO"]),
|
|
8307
|
+
getSelectField("maxWidth", "Max Width"),
|
|
8308
|
+
getInputField("scale", "Zoom"),
|
|
8309
|
+
emptyBox$1("PdfViewer", { xs: 6, sm: 6, md: 8, lg: 9 })
|
|
8310
|
+
];
|
|
8311
|
+
break;
|
|
8294
8312
|
case "Date":
|
|
8295
8313
|
uiSchema.elements = [
|
|
8296
8314
|
getSelectField("variant", "Variant"),
|
|
8297
8315
|
getInputField("toolTip", "Tooltip"),
|
|
8298
8316
|
getSelectField("toolTipPosition", "Tooltip Position"),
|
|
8299
|
-
emptyBox$1("
|
|
8317
|
+
emptyBox$1("imageEmpty", { xs: 0, sm: 0, md: 4, lg: 6 })
|
|
8300
8318
|
];
|
|
8301
8319
|
break;
|
|
8302
8320
|
case "DateTime":
|
|
@@ -8304,7 +8322,7 @@ const buildPropertiesSection = function(type) {
|
|
|
8304
8322
|
getSelectField("variant", "Variant"),
|
|
8305
8323
|
getInputField("toolTip", "Tooltip"),
|
|
8306
8324
|
getSelectField("toolTipPosition", "Tooltip Position"),
|
|
8307
|
-
emptyBox$1("
|
|
8325
|
+
emptyBox$1("imageEmpty", { xs: 0, sm: 0, md: 4, lg: 6 })
|
|
8308
8326
|
];
|
|
8309
8327
|
break;
|
|
8310
8328
|
case "Thought":
|
|
@@ -8334,7 +8352,7 @@ const buildPropertiesSection = function(type) {
|
|
|
8334
8352
|
getInputField("noFileAvailableMessage", "No Found Message"),
|
|
8335
8353
|
getRadioInputField("useLabel", "Use Button", ["YES", "NO"]),
|
|
8336
8354
|
getRadioInputField("externalUpload", "External Upload", ["YES", "NO"]),
|
|
8337
|
-
emptyBox$1("
|
|
8355
|
+
emptyBox$1("imageEmpty", { xs: 0, sm: 0, md: 4, lg: 6 })
|
|
8338
8356
|
];
|
|
8339
8357
|
break;
|
|
8340
8358
|
case "Camera":
|
|
@@ -8785,75 +8803,12 @@ const getFormdataFromSessionStorage = (path) => {
|
|
|
8785
8803
|
}
|
|
8786
8804
|
return returnValue || pageFormdata;
|
|
8787
8805
|
};
|
|
8788
|
-
const collectScopeNames = (config2, scopeMap = {}) => {
|
|
8789
|
-
if (!config2 || typeof config2 !== "object")
|
|
8790
|
-
return scopeMap;
|
|
8791
|
-
if (Array.isArray(config2)) {
|
|
8792
|
-
config2.forEach((item) => collectScopeNames(item, scopeMap));
|
|
8793
|
-
return scopeMap;
|
|
8794
|
-
}
|
|
8795
|
-
if (config2.name) {
|
|
8796
|
-
scopeMap[config2.name] = true;
|
|
8797
|
-
}
|
|
8798
|
-
if (Array.isArray(config2.elements)) {
|
|
8799
|
-
collectScopeNames(config2.elements, scopeMap);
|
|
8800
|
-
}
|
|
8801
|
-
return scopeMap;
|
|
8802
|
-
};
|
|
8803
|
-
const initialiseScopeKey = () => {
|
|
8804
|
-
const config2 = sessionStorage.getItem("pageFormdata") ? JSON.parse(sessionStorage.getItem("pageFormdata")) : void 0;
|
|
8805
|
-
const names = config2 ? collectScopeNames(config2) : {};
|
|
8806
|
-
sessionStorage.setItem("scopeKey", JSON.stringify(names));
|
|
8807
|
-
};
|
|
8808
|
-
const getScopeKey = () => {
|
|
8809
|
-
const raw = sessionStorage.getItem("scopeKey");
|
|
8810
|
-
return raw ? JSON.parse(raw) : {};
|
|
8811
|
-
};
|
|
8812
|
-
const addToScopeKey = (name) => {
|
|
8813
|
-
if (!name)
|
|
8814
|
-
return;
|
|
8815
|
-
const scopeKey = getScopeKey();
|
|
8816
|
-
scopeKey[name] = true;
|
|
8817
|
-
sessionStorage.setItem("scopeKey", JSON.stringify(scopeKey));
|
|
8818
|
-
};
|
|
8819
|
-
const doesScopeNameExist = (name) => {
|
|
8820
|
-
if (!name)
|
|
8821
|
-
return false;
|
|
8822
|
-
const scopeKey = getScopeKey();
|
|
8823
|
-
return !!scopeKey[name];
|
|
8824
|
-
};
|
|
8825
|
-
const findDuplicateScopeNames = (config2) => {
|
|
8826
|
-
const scopeNameCount = {};
|
|
8827
|
-
const traverse = (currentNode) => {
|
|
8828
|
-
if (!currentNode || typeof currentNode !== "object")
|
|
8829
|
-
return;
|
|
8830
|
-
if (Array.isArray(currentNode)) {
|
|
8831
|
-
currentNode.forEach(traverse);
|
|
8832
|
-
return;
|
|
8833
|
-
}
|
|
8834
|
-
if (currentNode.name) {
|
|
8835
|
-
scopeNameCount[currentNode.name] = (scopeNameCount[currentNode.name] || 0) + 1;
|
|
8836
|
-
}
|
|
8837
|
-
if (Array.isArray(currentNode.elements))
|
|
8838
|
-
traverse(currentNode.elements);
|
|
8839
|
-
};
|
|
8840
|
-
traverse(config2);
|
|
8841
|
-
return Object.keys(scopeNameCount).filter((name) => scopeNameCount[name] > 1);
|
|
8842
|
-
};
|
|
8843
8806
|
async function saveHandler(store2, service2, submitHandler) {
|
|
8844
|
-
var _a;
|
|
8845
|
-
|
|
8807
|
+
var _a, _b;
|
|
8808
|
+
(_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
8809
|
+
const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
|
|
8846
8810
|
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8847
8811
|
const config2 = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
8848
|
-
const duplicates = findDuplicateScopeNames(config2);
|
|
8849
|
-
if (duplicates.length > 0) {
|
|
8850
|
-
store2.setValidation("ValidateAndShow");
|
|
8851
|
-
store2.setNotify({
|
|
8852
|
-
Fail: true,
|
|
8853
|
-
FailMessage: `Duplicate names found: ${duplicates.join(", ")}`
|
|
8854
|
-
});
|
|
8855
|
-
return;
|
|
8856
|
-
}
|
|
8857
8812
|
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
8858
8813
|
try {
|
|
8859
8814
|
const saveReturn = await submitHandler(store2, service2, config2);
|
|
@@ -8868,7 +8823,6 @@ async function saveHandler(store2, service2, submitHandler) {
|
|
|
8868
8823
|
const navigateHandler = (store2, isSubmitted, pageName, errorMessage) => {
|
|
8869
8824
|
if (isSubmitted) {
|
|
8870
8825
|
sessionStorage.removeItem("pageFormdata");
|
|
8871
|
-
sessionStorage.removeItem("scopeKey");
|
|
8872
8826
|
store2.navigate(pageName || -1);
|
|
8873
8827
|
store2.setNotify({
|
|
8874
8828
|
SuccessMessage: "Submit Successfully",
|
|
@@ -8887,7 +8841,6 @@ function okHandler(store2) {
|
|
|
8887
8841
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8888
8842
|
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
8889
8843
|
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8890
|
-
addToScopeKey(store2.ctx.core.data.name);
|
|
8891
8844
|
store2.navigate(-1);
|
|
8892
8845
|
store2.setNotify({
|
|
8893
8846
|
SuccessMessage: "Save Successfully",
|
|
@@ -8929,8 +8882,9 @@ const sectionLabels = {
|
|
|
8929
8882
|
Radio: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8930
8883
|
Text: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8931
8884
|
TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8932
|
-
PopUp: ["Core", "Components", "Properties", "Style"],
|
|
8885
|
+
PopUp: ["Core", "Components", "Properties", "Events", "Style"],
|
|
8933
8886
|
PopOver: ["Core", "Components", "Properties", "Style"],
|
|
8887
|
+
PdfViewer: ["Core", "Components", "Properties", "Style"],
|
|
8934
8888
|
Stepper: ["Core", "Components", "Properties", "Events", "Style"],
|
|
8935
8889
|
DataGrid: ["Core", "Components", "Properties", "Events", "Style"],
|
|
8936
8890
|
InputSlider: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
@@ -8944,7 +8898,7 @@ const sectionLabels = {
|
|
|
8944
8898
|
Camera: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8945
8899
|
OTP_Input: ["Core", "Properties", "Events", "Style", "Validation"]
|
|
8946
8900
|
};
|
|
8947
|
-
function refreshPage(type, store2
|
|
8901
|
+
function refreshPage(type, store2) {
|
|
8948
8902
|
var _a, _b;
|
|
8949
8903
|
const UiSchema = _.cloneDeep(componentBasicUiSchema(store2.theme.myTheme));
|
|
8950
8904
|
const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
@@ -8959,9 +8913,6 @@ function refreshPage(type, store2, formdata) {
|
|
|
8959
8913
|
Validation: ValidationSection
|
|
8960
8914
|
};
|
|
8961
8915
|
const elements = (_a = sectionLabels[type]) == null ? void 0 : _a.map((e) => sectionUiSchema[e]);
|
|
8962
|
-
if (!(formdata == null ? void 0 : formdata.style)) {
|
|
8963
|
-
store2.setFormdata((prev) => ({ ...prev, style: "{\n}" }));
|
|
8964
|
-
}
|
|
8965
8916
|
UiSchema.elements[0].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Events", "Validation"];
|
|
8966
8917
|
UiSchema.elements[0].elements = elements || [CoreSection, StyleSection, EventSection(store2.theme.myTheme), ValidationSection];
|
|
8967
8918
|
}
|
|
@@ -9092,15 +9043,6 @@ function refreshPage(type, store2, formdata) {
|
|
|
9092
9043
|
}
|
|
9093
9044
|
store2.setUiSchema(UiSchema);
|
|
9094
9045
|
}
|
|
9095
|
-
const debouncedScopeNameValidator = _.debounce((store2, newName) => {
|
|
9096
|
-
if (doesScopeNameExist(newName)) {
|
|
9097
|
-
store2.setValidation("ValidateAndShow");
|
|
9098
|
-
store2.setNotify({
|
|
9099
|
-
Fail: true,
|
|
9100
|
-
FailMessage: `Name "${newName}" already exists. Please use a unique name.`
|
|
9101
|
-
});
|
|
9102
|
-
}
|
|
9103
|
-
}, 400);
|
|
9104
9046
|
var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
9105
9047
|
return {
|
|
9106
9048
|
setPage: async function() {
|
|
@@ -9108,7 +9050,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9108
9050
|
store2.setFormdata(formdata);
|
|
9109
9051
|
const schema2 = this.getSchema();
|
|
9110
9052
|
store2.setSchema(schema2);
|
|
9111
|
-
this.refreshPage(formdata == null ? void 0 : formdata.type, store2
|
|
9053
|
+
this.refreshPage(formdata == null ? void 0 : formdata.type, store2);
|
|
9112
9054
|
},
|
|
9113
9055
|
refreshPage,
|
|
9114
9056
|
getFormdata: function() {
|
|
@@ -9147,18 +9089,13 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9147
9089
|
schema2.properties.pageName.path = pathArray;
|
|
9148
9090
|
return schema2;
|
|
9149
9091
|
},
|
|
9150
|
-
okHandler: () =>
|
|
9151
|
-
okHandler(store2);
|
|
9152
|
-
},
|
|
9092
|
+
okHandler: () => okHandler(store2),
|
|
9153
9093
|
saveHandler: async () => await saveHandler(store2, service2, submitHandler),
|
|
9154
9094
|
onChange: function() {
|
|
9155
|
-
var _a, _b, _c, _d
|
|
9095
|
+
var _a, _b, _c, _d;
|
|
9156
9096
|
if (((_a = store2 == null ? void 0 : store2.formData) == null ? void 0 : _a.type) !== ((_b = store2 == null ? void 0 : store2.newData) == null ? void 0 : _b.type) && ((_c = store2 == null ? void 0 : store2.newData) == null ? void 0 : _c.type) !== void 0) {
|
|
9157
9097
|
this.refreshPage((_d = store2 == null ? void 0 : store2.newData) == null ? void 0 : _d.type, store2);
|
|
9158
9098
|
}
|
|
9159
|
-
if (((_e = store2 == null ? void 0 : store2.formData) == null ? void 0 : _e.name) !== ((_f = store2 == null ? void 0 : store2.newData) == null ? void 0 : _f.name) && ((_g = store2 == null ? void 0 : store2.newData) == null ? void 0 : _g.name) !== void 0) {
|
|
9160
|
-
debouncedScopeNameValidator(store2, store2.newData.name);
|
|
9161
|
-
}
|
|
9162
9099
|
},
|
|
9163
9100
|
editComponents: function() {
|
|
9164
9101
|
var _a, _b, _c;
|
|
@@ -9168,7 +9105,6 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9168
9105
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
9169
9106
|
const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
9170
9107
|
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
9171
|
-
addToScopeKey(store2.ctx.core.data.name);
|
|
9172
9108
|
if (path) {
|
|
9173
9109
|
const path2 = (_c = store2.searchParams) == null ? void 0 : _c.get("path");
|
|
9174
9110
|
const finalPath = `${path2}.elements[${rowId}]`;
|
|
@@ -9213,7 +9149,6 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9213
9149
|
}
|
|
9214
9150
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
9215
9151
|
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
9216
|
-
addToScopeKey(store2.ctx.core.data.name);
|
|
9217
9152
|
const finalPath = `${path}.elements[${store2.formData.elements.length}]`;
|
|
9218
9153
|
store2.searchParams.set("path", finalPath);
|
|
9219
9154
|
store2.setSearchParams(store2.searchParams);
|
|
@@ -9375,7 +9310,6 @@ var pageMaster = (funcParams) => {
|
|
|
9375
9310
|
const schema2 = await this.getSchema();
|
|
9376
9311
|
store2.setSchema(schema2);
|
|
9377
9312
|
store2.setUiSchema(uiSchema);
|
|
9378
|
-
initialiseScopeKey();
|
|
9379
9313
|
},
|
|
9380
9314
|
getFormdata: async function() {
|
|
9381
9315
|
var _a;
|
|
@@ -9404,7 +9338,6 @@ var pageMaster = (funcParams) => {
|
|
|
9404
9338
|
},
|
|
9405
9339
|
backHandler: () => {
|
|
9406
9340
|
sessionStorage.removeItem("pageFormdata");
|
|
9407
|
-
sessionStorage.removeItem("scopeKey");
|
|
9408
9341
|
store2.navigate("/PageMasterRecords");
|
|
9409
9342
|
},
|
|
9410
9343
|
onAddClickHandler: function() {
|
|
@@ -9416,7 +9349,6 @@ var pageMaster = (funcParams) => {
|
|
|
9416
9349
|
store2.formData.elements = [];
|
|
9417
9350
|
}
|
|
9418
9351
|
const response = saveFormdataInSessionStorage(store2.ctx.core.data);
|
|
9419
|
-
addToScopeKey(store2.ctx.core.data.name);
|
|
9420
9352
|
if (id) {
|
|
9421
9353
|
store2.navigate(
|
|
9422
9354
|
`/Component?path=${`elements[${response == null ? void 0 : response.elements.length}]`}&id=${id}`
|
|
@@ -9442,7 +9374,6 @@ var pageMaster = (funcParams) => {
|
|
|
9442
9374
|
store2.formData.events = [];
|
|
9443
9375
|
}
|
|
9444
9376
|
saveFormdataInSessionStorage(store2.ctx.core.data);
|
|
9445
|
-
addToScopeKey(store2.ctx.core.data.name);
|
|
9446
9377
|
const finalPath = `events[${store2.formData.events.length}]`;
|
|
9447
9378
|
store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
|
|
9448
9379
|
},
|
|
@@ -9453,7 +9384,6 @@ var pageMaster = (funcParams) => {
|
|
|
9453
9384
|
const rowId = dynamicData2.path.split(".")[1];
|
|
9454
9385
|
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
9455
9386
|
saveFormdataInSessionStorage(store2.ctx.core.data);
|
|
9456
|
-
addToScopeKey(store2.ctx.core.data.name);
|
|
9457
9387
|
const finalPath = `events[${rowId}]`;
|
|
9458
9388
|
store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
|
|
9459
9389
|
},
|
|
@@ -9538,6 +9468,7 @@ const EventSchema = {
|
|
|
9538
9468
|
{ title: "Row Movement", const: "onRowMovement" },
|
|
9539
9469
|
{ title: "Download", const: "onDownload" },
|
|
9540
9470
|
{ title: "Fail", const: "Fail" },
|
|
9471
|
+
{ title: "onClose", const: "onClose" },
|
|
9541
9472
|
{ title: "Key Down", const: "onKeyDown" },
|
|
9542
9473
|
{ title: "Set Style", const: "setStyle" }
|
|
9543
9474
|
]
|
|
@@ -10269,9 +10200,9 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10269
10200
|
const schema2 = await this.getSchema();
|
|
10270
10201
|
console.log("SettingSchema>>", schema2);
|
|
10271
10202
|
store2.setSchema(schema2);
|
|
10272
|
-
this.refreshPage(formdata.Handler, store2
|
|
10203
|
+
this.refreshPage(formdata.Handler, store2);
|
|
10273
10204
|
},
|
|
10274
|
-
refreshPage: (handlerType, store22
|
|
10205
|
+
refreshPage: (handlerType, store22) => {
|
|
10275
10206
|
var _a, _b, _c;
|
|
10276
10207
|
const uiSchema = _.cloneDeep(EventUiSchema(store22.theme.myTheme));
|
|
10277
10208
|
const schema2 = _.cloneDeep(EventSchema);
|
|
@@ -10299,9 +10230,6 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10299
10230
|
"Write Custom Code",
|
|
10300
10231
|
false
|
|
10301
10232
|
);
|
|
10302
|
-
if (!(formdata == null ? void 0 : formdata.eventCode)) {
|
|
10303
|
-
store22.setFormdata((prev) => ({ ...prev, eventCode: "async (store, dynamicData, user, parentEventOutput, service, componentName) => {\n\n\n}" }));
|
|
10304
|
-
}
|
|
10305
10233
|
schema2.required = ["eventType", "Handler", "eventCode"];
|
|
10306
10234
|
} else if (handlerType === "api") {
|
|
10307
10235
|
uiSchema.elements[0].elements[0].elements[2] = emptyBox$1("emptyBox", {
|
|
@@ -10311,9 +10239,6 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10311
10239
|
lg: 6
|
|
10312
10240
|
});
|
|
10313
10241
|
uiSchema.elements[0].elements[0].elements[3] = APISection;
|
|
10314
|
-
if (!(formdata == null ? void 0 : formdata.apiBody)) {
|
|
10315
|
-
store22.setFormdata((prev) => ({ ...prev, apiBody: "(store, dynamicData, user, body, service) => {\n\n\n}" }));
|
|
10316
|
-
}
|
|
10317
10242
|
schema2.required = ["eventType", "Handler", "method", "path"];
|
|
10318
10243
|
} else if (handlerType === "inBuiltFunction") {
|
|
10319
10244
|
uiSchema.elements[0].elements[0].elements[2] = getSelectField(
|
|
@@ -10932,13 +10857,13 @@ var service = (funcParams) => {
|
|
|
10932
10857
|
});
|
|
10933
10858
|
},
|
|
10934
10859
|
getStyle: () => {
|
|
10935
|
-
var _a, _b, _c, _d
|
|
10860
|
+
var _a, _b, _c, _d;
|
|
10936
10861
|
const cloneEventGroup = _.cloneDeep(eventGroups);
|
|
10937
10862
|
if (cloneEventGroup.setStyle) {
|
|
10938
10863
|
let finalResponse = {};
|
|
10939
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || ((
|
|
10940
|
-
if ((
|
|
10941
|
-
for (const eventConfig of (
|
|
10864
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || ((_b = funcParams == null ? void 0 : funcParams.dynamicData.path) == null ? void 0 : _b.split(".").pop());
|
|
10865
|
+
if ((_c = cloneEventGroup == null ? void 0 : cloneEventGroup.setStyle) == null ? void 0 : _c[path]) {
|
|
10866
|
+
for (const eventConfig of (_d = cloneEventGroup == null ? void 0 : cloneEventGroup.setStyle) == null ? void 0 : _d[path]) {
|
|
10942
10867
|
finalResponse = executeEvents({
|
|
10943
10868
|
...executeEventsParameters,
|
|
10944
10869
|
config: eventConfig,
|
|
@@ -10979,6 +10904,9 @@ var service = (funcParams) => {
|
|
|
10979
10904
|
onFileDelete: async function() {
|
|
10980
10905
|
this.callHandler("onFileDelete");
|
|
10981
10906
|
},
|
|
10907
|
+
onClose: function() {
|
|
10908
|
+
this.callHandler("onClose");
|
|
10909
|
+
},
|
|
10982
10910
|
onMount: function() {
|
|
10983
10911
|
this.callHandler("onMount");
|
|
10984
10912
|
},
|
|
@@ -12818,6 +12746,7 @@ const PopUP = {
|
|
|
12818
12746
|
},
|
|
12819
12747
|
main: {
|
|
12820
12748
|
label: "PopUp",
|
|
12749
|
+
onClose: "onClose",
|
|
12821
12750
|
fullScreen: false,
|
|
12822
12751
|
fullWidth: false,
|
|
12823
12752
|
maxWidth: false,
|
|
@@ -13276,6 +13205,40 @@ const buildOTP_Input = (config2, componentScope2) => {
|
|
|
13276
13205
|
OTP.config.main.length = +config2.length;
|
|
13277
13206
|
return OTP;
|
|
13278
13207
|
};
|
|
13208
|
+
var pdfViewer = {
|
|
13209
|
+
type: "Control",
|
|
13210
|
+
scope: "#/properties/pdfviewer",
|
|
13211
|
+
options: {
|
|
13212
|
+
widget: "PdfViewer"
|
|
13213
|
+
},
|
|
13214
|
+
config: {
|
|
13215
|
+
layout: {
|
|
13216
|
+
xs: 12,
|
|
13217
|
+
sm: 12,
|
|
13218
|
+
md: 12,
|
|
13219
|
+
lg: 12
|
|
13220
|
+
},
|
|
13221
|
+
main: {
|
|
13222
|
+
title: "PDF"
|
|
13223
|
+
}
|
|
13224
|
+
}
|
|
13225
|
+
};
|
|
13226
|
+
const buildPdfViewer = (config2, componentScope2) => {
|
|
13227
|
+
const PdfViewer = _.cloneDeep(pdfViewer);
|
|
13228
|
+
PdfViewer.scope = componentScope2;
|
|
13229
|
+
PdfViewer.config.main.title = config2.label;
|
|
13230
|
+
PdfViewer.config.main.fullScreen = config2.fullScreen === "YES" ? true : false;
|
|
13231
|
+
PdfViewer.config.main.fullWidth = config2.fullWidth === "YES" ? true : false;
|
|
13232
|
+
PdfViewer.config.main.maxWidth = config2.maxWidth || false;
|
|
13233
|
+
PdfViewer.config.main.scale = config2.scale;
|
|
13234
|
+
if (config2.layout) {
|
|
13235
|
+
PdfViewer.config.layout = createLayoutFormat(config2.layout);
|
|
13236
|
+
}
|
|
13237
|
+
if (config2.style) {
|
|
13238
|
+
PdfViewer.config.style = JSON.parse(config2.style);
|
|
13239
|
+
}
|
|
13240
|
+
return PdfViewer;
|
|
13241
|
+
};
|
|
13279
13242
|
let schema = {
|
|
13280
13243
|
type: "object",
|
|
13281
13244
|
properties: {},
|
|
@@ -13506,6 +13469,9 @@ const buildUiSchema = (config2, store2) => {
|
|
|
13506
13469
|
case "Camera":
|
|
13507
13470
|
elements = buildCamera(config2, componentScope2);
|
|
13508
13471
|
break;
|
|
13472
|
+
case "PdfViewer":
|
|
13473
|
+
elements = buildPdfViewer(config2, componentScope2);
|
|
13474
|
+
break;
|
|
13509
13475
|
default:
|
|
13510
13476
|
schema = {
|
|
13511
13477
|
type: "object",
|