impaktapps-ui-builder 1.0.60-alpha.3 → 1.0.60-alpha.5

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.
@@ -5,7 +5,7 @@ interface funcParamsProps {
5
5
  userValue: any;
6
6
  pageDataProvider: any;
7
7
  functionsProvider?: Record<string, any>;
8
- setExternaldata?: any;
8
+ initFormData?: any;
9
9
  }
10
10
  export declare const extractEvents: (eventConfig: any) => any;
11
11
  declare const _default: (funcParams: funcParamsProps) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.60-alpha.3",
3
+ "version": "1.0.60-alpha.5",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -50,26 +50,11 @@ export const PageMasterUiSchema: any = (theme) => {
50
50
  },
51
51
  },
52
52
  },
53
- {
54
- type: "Control",
55
- scope: "#/properties/hasBackIcon",
56
-
57
- options: {
58
- widget: "RadioInputField",
59
- },
60
- config: {
61
- layout: { xs: 12, sm: 6, md: 4, lg: 3 },
62
- main: {
63
- label: "Back Icon",
64
- options: [{label: "Yes",const: "YES"}, {label: "No",const: "NO"}],
65
- },
66
- },
67
- },
68
53
  {
69
54
  type: "Control",
70
55
  scope: "#/properties/EmptyBox",
71
56
  config: {
72
- layout: { xs: 0, sm: 6, md: 0, lg: 3 },
57
+ layout: { xs: 0, sm: 0, md: 4, lg: 6 },
73
58
  },
74
59
  options: {
75
60
  widget: "EmptyBox",
@@ -20,7 +20,7 @@ interface funcParamsProps {
20
20
  userValue: any,
21
21
  pageDataProvider: any,
22
22
  functionsProvider?: Record<string, any>,
23
- setExternaldata?: any
23
+ initFormData?: any
24
24
  }
25
25
  let pageData: any = false;
26
26
  export const extractEvents = (eventConfig: any) => {
@@ -72,21 +72,124 @@ export default (funcParams: funcParamsProps) => {
72
72
  return {
73
73
  setPage: async function () {
74
74
  funcParams.store.setAdditionalErrors([]);
75
- funcParams.store.setFormdata({});
75
+ funcParams.store.setFormdata(funcParams?.initFormData() || {});
76
76
  funcParams.store.setSchema({ type: "object", properties: {} });
77
77
  funcParams.store.newData = {};
78
78
  eventGroups = {};
79
79
  pageData = await funcParams.pageDataProvider();
80
80
  const config = pageData?.config;
81
-
82
- funcParams?.setExternaldata();
83
-
84
81
  const uiSchema = pageData?.uiSchema;
85
82
  const event = new CustomEvent('pageNameChanged', {
86
- detail: { pageName: config.label, hasBackIcon: config.hasBackIcon === "NO" ? false : true }
83
+ detail: { pageName: config.label, hasBackIcon: true }
87
84
  });
88
85
  window.dispatchEvent(event)
89
86
  const theme = funcParams?.store?.theme?.myTheme;
87
+ uiSchema.elements.push(
88
+ {
89
+ type: "HorizontalLayout",
90
+ config: {
91
+ main: {
92
+ direction: "row",
93
+ },
94
+ style: {
95
+ flexDirection: "row",
96
+ position: "absolute",
97
+ bottom: 0,
98
+ height: "fit-content",
99
+ overflow: "hidden",
100
+ zIndex: 1000,
101
+ width: "inherit",
102
+ },
103
+ },
104
+ elements: [
105
+ {
106
+ type: "Control",
107
+ scope: "#/properties/FooterText",
108
+ options: {
109
+ widget: "Box",
110
+ },
111
+ config: {
112
+ main: {
113
+ heading: "Copywriter@ACT21.IO",
114
+ },
115
+ style: {
116
+ color: theme?.palette?.text?.disabled || "#AFAFAF",
117
+ fontSize: "11px",
118
+ textAlign: "center",
119
+ lineHeight: 2,
120
+ width: "fit-content",
121
+ left: "50%",
122
+ position: "relative",
123
+ margin: 0,
124
+ flexGrow: 1,
125
+ height: 0,
126
+ transform: "translate(-50%, 0%)",
127
+ },
128
+ },
129
+ },
130
+ {
131
+ type: "Control",
132
+ scope: "#/properties/FooterBackIcon",
133
+ options: {
134
+ widget: "Box",
135
+ },
136
+ config: {
137
+ main: {
138
+ iconName: "PrevIcon",
139
+ onClick: "backHandler",
140
+ width: "fit-content",
141
+ },
142
+ style: {
143
+ fill: theme?.palette?.primary?.main,
144
+ width: 20,
145
+ height: 0,
146
+ top: 0,
147
+ right: { xs: "12px", sm: "84px" },
148
+ position: "absolute",
149
+ fontSize: "12px",
150
+ cursor: "pointer",
151
+ ":hover": {
152
+ fill: theme?.palette?.primary?.dark,
153
+ },
154
+ marginRight: "20px",
155
+ },
156
+ },
157
+ },
158
+ {
159
+ type: "Control",
160
+ scope: "#/properties/FooterBackHandlerText",
161
+ options: {
162
+ widget: "Box",
163
+ },
164
+ config: {
165
+ main: {
166
+ heading: "Previous Page",
167
+ onClick: "backHandler",
168
+ },
169
+ style: {
170
+ display: { xs: "none", sm: "flex" },
171
+ textAlign: "left",
172
+ lineHeight: 1,
173
+ height: 0,
174
+ width: "fit-content",
175
+ color: theme?.palette?.primary?.main,
176
+ fontSize: "12px",
177
+ cursor: "pointer",
178
+ marginLeft: "2px",
179
+
180
+ top: 3,
181
+ right: "12px",
182
+ position: "absolute",
183
+ ":hover": {
184
+ color: theme?.palette?.primary?.dark,
185
+ },
186
+ marginRight: "4px",
187
+ },
188
+ },
189
+ },
190
+ ],
191
+ }
192
+ );
90
193
  const schema = pageData?.schema ?? { type: "object", properties: {} };
91
194
  eventGroups = extractEvents(config);
92
195
  executeEventsParameters = {