impaktapps-ui-builder 0.0.101-alpha.71 → 0.0.101-alpha.73
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 +26 -14
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +5 -5
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildText.ts +21 -18
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -2
- package/src/impaktapps-ui-builder/builder/services/event.ts +4 -4
- package/src/impaktapps-ui-builder/runtime/services/events.ts +8 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +5 -4
package/package.json
CHANGED
|
@@ -2,22 +2,25 @@ import _ from "lodash";
|
|
|
2
2
|
import TextInputField from "./uischema/textInputField";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
|
-
export const buildTextField = (config:any,componentScope:string) =>{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
inputField.
|
|
22
|
-
|
|
5
|
+
export const buildTextField = (config: any, componentScope: string) => {
|
|
6
|
+
const inputField: any = _.cloneDeep(TextInputField);
|
|
7
|
+
inputField.config.main.label = config.label;
|
|
8
|
+
if (config.style) {
|
|
9
|
+
inputField.config.style = JSON.parse(config.style)
|
|
10
|
+
}
|
|
11
|
+
if (config.multiline) {
|
|
12
|
+
inputField.config.main.multiline = config.multiline === "YES" ? true : false;
|
|
13
|
+
}
|
|
14
|
+
if (config.InputFormatingAndMasking) {
|
|
15
|
+
inputField.config.main.formatStrArray = config.InputFormatingAndMasking.map(e => e.formatElement);
|
|
16
|
+
}
|
|
17
|
+
if (config.placeholder) {
|
|
18
|
+
inputField.config.main.placeholder = config.placeholder;
|
|
19
|
+
}
|
|
20
|
+
if (config.layout) {
|
|
21
|
+
inputField.config.layout = createLayoutFormat(config.layout)
|
|
22
|
+
}
|
|
23
|
+
inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
24
|
+
inputField.scope = componentScope;
|
|
25
|
+
return inputField;
|
|
23
26
|
}
|
|
@@ -322,7 +322,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
322
322
|
case "Text":
|
|
323
323
|
uiSchema.elements = [
|
|
324
324
|
getInputField("placeholder", "Placeholder"),
|
|
325
|
-
|
|
325
|
+
getRadioInputField("multiline", "Multiline", ["YES", "NO"]),
|
|
326
326
|
emptyBox("TextEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 }),
|
|
327
327
|
getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element")
|
|
328
328
|
]
|
|
@@ -158,7 +158,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
158
158
|
const path = store.searchParams?.get("path");
|
|
159
159
|
const id = store.searchParams?.get("id")
|
|
160
160
|
|
|
161
|
-
let pathArray = [{label: config.name, path: `/PageMaster?id=${id}`}];
|
|
161
|
+
let pathArray = [{label: config.name, path: `/PageMaster${id ? `?id=${id}` : ''}`}];
|
|
162
162
|
|
|
163
163
|
if (path) {
|
|
164
164
|
const pathArrayAll = path.split(".");
|
|
@@ -176,7 +176,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
176
176
|
const data = _.get(config, e)
|
|
177
177
|
pathArray.push({
|
|
178
178
|
label: data?.name || data?.eventType || "NewComponent",
|
|
179
|
-
path: `/Component?path=${e}
|
|
179
|
+
path: `/Component?path=${e}${id ? `&id=${id}` : ''}`
|
|
180
180
|
});
|
|
181
181
|
})
|
|
182
182
|
}
|
|
@@ -131,7 +131,7 @@ export default (
|
|
|
131
131
|
const path = store.searchParams?.get("path");
|
|
132
132
|
const id = store.searchParams?.get("id");
|
|
133
133
|
|
|
134
|
-
let pathArray = [{label: config.name, path: `/PageMaster?id=${id}`}];
|
|
134
|
+
let pathArray = [{label: config.name, path: `/PageMaster${id ? `?id=${id}` : ''}`}];
|
|
135
135
|
|
|
136
136
|
if (path) {
|
|
137
137
|
const pathArrayAll = path.split(".");
|
|
@@ -148,7 +148,7 @@ export default (
|
|
|
148
148
|
const data = _.get(config, e);
|
|
149
149
|
pathArray.push({
|
|
150
150
|
label: data?.name || data?.eventType || "NewComponent",
|
|
151
|
-
path: data?.eventType ? `/ComponentEvents?path=${e}
|
|
151
|
+
path: data?.eventType ? `/ComponentEvents?path=${e}${id ? `&id=${id}` : ''}` : `/Component?path=${e}${id ? `&id=${id}` : ''}`,
|
|
152
152
|
});
|
|
153
153
|
});
|
|
154
154
|
}
|
|
@@ -173,7 +173,7 @@ export default (
|
|
|
173
173
|
const path = store.searchParams?.get("path");
|
|
174
174
|
const id = store.searchParams?.get("id");
|
|
175
175
|
|
|
176
|
-
let pathArray = [{label: config.name, path: `/PageMaster?id=${id}`}];
|
|
176
|
+
let pathArray = [{label: config.name, path: `/PageMaster${id ? `?id=${id}` : ''}`}];
|
|
177
177
|
|
|
178
178
|
if (path) {
|
|
179
179
|
const pathArrayAll = path.split(".");
|
|
@@ -190,7 +190,7 @@ export default (
|
|
|
190
190
|
const data = _.get(config, e);
|
|
191
191
|
pathArray.push({
|
|
192
192
|
label: data?.name || data?.eventType || "NewComponent",
|
|
193
|
-
path: data?.eventType ? `/ComponentEvents?path=${e}
|
|
193
|
+
path: data?.eventType ? `/ComponentEvents?path=${e}${id ? `&id=${id}` : ''}` : `/Component?path=${e}${id ? `&id=${id}` : ''}`,
|
|
194
194
|
});
|
|
195
195
|
});
|
|
196
196
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _
|
|
1
|
+
import _ from "lodash";
|
|
2
2
|
import { handlersProps } from "./interface";
|
|
3
3
|
export const executeEvents = (params: handlersProps) => {
|
|
4
4
|
let nextEvent = [];
|
|
@@ -186,6 +186,13 @@ function mergeFormdata(handlerResponse: any, componentName: string, eventConfig:
|
|
|
186
186
|
store.setFormdata((pre: any) => { return { ...pre, ...handlerResponse?.data } })
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
+
else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
|
|
190
|
+
if (handlerResponse && handlerResponse?.data) {
|
|
191
|
+
formDataHolder[componentName] = handlerResponse.data?.data
|
|
192
|
+
formDataHolder[`${componentName}_RowCount`] = handlerResponse.data?.meta?.totalRowCount
|
|
193
|
+
store.setFormdata((pre) => { return { ...pre, ...formDataHolder } });
|
|
194
|
+
}
|
|
195
|
+
}
|
|
189
196
|
else {
|
|
190
197
|
if (handlerResponse) {
|
|
191
198
|
formDataHolder[componentName] = handlerResponse.data
|
|
@@ -294,7 +294,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
294
294
|
fontSize: "12px",
|
|
295
295
|
cursor: "pointer",
|
|
296
296
|
marginLeft: "2px",
|
|
297
|
-
|
|
297
|
+
|
|
298
298
|
top: 3,
|
|
299
299
|
right: "12px",
|
|
300
300
|
position: "absolute",
|
|
@@ -319,12 +319,12 @@ export default (funcParams: funcParamsProps) => {
|
|
|
319
319
|
await executeRefreshHandler({
|
|
320
320
|
config: {}, componentName: "",
|
|
321
321
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
322
|
-
serviceHolder: this, eventGroups, formDataHolder
|
|
322
|
+
serviceHolder: this, eventGroups, formDataHolder: {}
|
|
323
323
|
})
|
|
324
324
|
funcParams.store.setSchema(
|
|
325
325
|
(pre: any) => {
|
|
326
326
|
return {
|
|
327
|
-
...schema
|
|
327
|
+
...schema, ...pre, properties:
|
|
328
328
|
{ ...schema.properties, ...pre.properties, }
|
|
329
329
|
}
|
|
330
330
|
}
|
|
@@ -336,7 +336,8 @@ export default (funcParams: funcParamsProps) => {
|
|
|
336
336
|
if (eventGroups.onCellRenderer) {
|
|
337
337
|
let finalResponse = {};
|
|
338
338
|
const path = funcParams.dynamicData?.tableButtonPath || funcParams?.dynamicData?.path?.split(".")[0];
|
|
339
|
-
|
|
339
|
+
|
|
340
|
+
for (const eventConfig of eventGroups?.onCellRenderer?.[path]) {
|
|
340
341
|
executeEventsParameters.store.functionParameters = cellParams
|
|
341
342
|
finalResponse = executeEvents({
|
|
342
343
|
...executeEventsParameters,
|