impaktapps-ui-builder 1.0.124 → 1.0.125-testL.2
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 +57 -13
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +6 -6
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +11 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +5 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +8 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +16 -0
- package/src/impaktapps-ui-builder/runtime/services/service.ts +20 -13
package/package.json
CHANGED
|
@@ -77,5 +77,8 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
77
77
|
if (config.maxPageSize) {
|
|
78
78
|
table.config.main.maxPageSize = config.maxPageSize
|
|
79
79
|
}
|
|
80
|
+
if(config.initialDensity){
|
|
81
|
+
table.config.main.initialDensity = config.initialDensity
|
|
82
|
+
}
|
|
80
83
|
return table;
|
|
81
84
|
};
|
|
@@ -274,7 +274,17 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
274
274
|
|
|
275
275
|
if (config?.elements) {
|
|
276
276
|
if (config?.type === "LeaderBoard") {
|
|
277
|
-
|
|
277
|
+
const rowElements = []
|
|
278
|
+
config.elements.filter((cellElem, elemInd) => {
|
|
279
|
+
const commonProperties = {
|
|
280
|
+
accessorKey: cellElem.name,
|
|
281
|
+
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
282
|
+
header: cellElem.label || cellElem.name,
|
|
283
|
+
columnKey: cellElem.columnKey
|
|
284
|
+
}
|
|
285
|
+
rowElements.push({ ...commonProperties })
|
|
286
|
+
})
|
|
287
|
+
elements.elements = rowElements;
|
|
278
288
|
}
|
|
279
289
|
else if (config.type == "ColumnGroup") {
|
|
280
290
|
const sizeMap = {}
|
|
@@ -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"]),
|
|
@@ -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: {
|
|
@@ -163,6 +163,22 @@ export function refreshPage(type: string, store: any) {
|
|
|
163
163
|
},
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
+
if(parentObj?.type === "LeaderBoard"){
|
|
167
|
+
UiSchema.elements[0].elements[0].elements[4] =
|
|
168
|
+
{
|
|
169
|
+
type: "Control",
|
|
170
|
+
scope: "#/properties/columnFormat",
|
|
171
|
+
options: {
|
|
172
|
+
widget: "SelectInputField",
|
|
173
|
+
},
|
|
174
|
+
config: {
|
|
175
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
176
|
+
main: {
|
|
177
|
+
label: "Column Format",
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
}
|
|
166
182
|
|
|
167
183
|
if (sessionStorage.getItem("copiedConfig") ) {
|
|
168
184
|
this.ElementPathSetter(UiSchema);
|
|
@@ -196,11 +196,11 @@ export default (funcParams: funcParamsProps) => {
|
|
|
196
196
|
...executeEventsParameters,
|
|
197
197
|
config: eventConfig,
|
|
198
198
|
componentName,
|
|
199
|
-
formDataHolder
|
|
199
|
+
formDataHolder
|
|
200
200
|
})
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
if (eventConfig.Handler === "refresh") {
|
|
202
|
+
funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
|
|
203
|
+
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
}))
|
|
@@ -252,16 +252,23 @@ export default (funcParams: funcParamsProps) => {
|
|
|
252
252
|
callHandler: function (eventType: string, functionParameters?: any) {
|
|
253
253
|
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[funcParams.dynamicData.path.split(".").length - 1];
|
|
254
254
|
if (eventGroups?.[eventType]?.[path] !== undefined) {
|
|
255
|
-
(eventGroups?.[eventType]?.[path].map(
|
|
255
|
+
(eventGroups?.[eventType]?.[path].map((eventConfig) => {
|
|
256
256
|
executeEventsParameters.store.functionParameters = functionParameters
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
257
|
+
if (eventConfig.Handler === "refresh") {
|
|
258
|
+
executeEvents({
|
|
259
|
+
...executeEventsParameters,
|
|
260
|
+
config: eventConfig,
|
|
261
|
+
componentName: path,
|
|
262
|
+
formDataHolder: formDataHolder
|
|
263
|
+
}).then((res) => {
|
|
264
|
+
funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
|
|
265
|
+
});
|
|
266
|
+
} else {
|
|
267
|
+
executeEvents({
|
|
268
|
+
...executeEventsParameters,
|
|
269
|
+
config: eventConfig,
|
|
270
|
+
componentName: path
|
|
271
|
+
})
|
|
265
272
|
}
|
|
266
273
|
}))
|
|
267
274
|
}
|