impaktapps-ui-builder 0.0.102 → 0.0.104
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 +11 -7
- 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/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/runtime/services/events.ts +2 -2
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
|
}
|
|
@@ -317,7 +317,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
317
317
|
case "Text":
|
|
318
318
|
uiSchema.elements = [
|
|
319
319
|
getInputField("placeholder", "Placeholder"),
|
|
320
|
-
|
|
320
|
+
getRadioInputField("multiline", "Multiline", ["YES", "NO"]),
|
|
321
321
|
emptyBox("TextEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 }),
|
|
322
322
|
getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element")
|
|
323
323
|
]
|
|
@@ -188,8 +188,8 @@ function mergeFormdata(handlerResponse: any, componentName: string, eventConfig:
|
|
|
188
188
|
}
|
|
189
189
|
else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
|
|
190
190
|
if (handlerResponse && handlerResponse?.data) {
|
|
191
|
-
formDataHolder[componentName] = handlerResponse.data
|
|
192
|
-
formDataHolder[`${componentName}_RowCount`] = handlerResponse.data
|
|
191
|
+
formDataHolder[componentName] = handlerResponse.data?.data
|
|
192
|
+
formDataHolder[`${componentName}_RowCount`] = handlerResponse.data?.meta?.totalRowCount
|
|
193
193
|
store.setFormdata((pre) => { return { ...pre, ...formDataHolder } });
|
|
194
194
|
}
|
|
195
195
|
}
|