impaktapps-ui-builder 0.0.101-alpha.347 → 0.0.101-alpha.349

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.101-alpha.347",
3
+ "version": "0.0.101-alpha.349",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -71,23 +71,6 @@ export const PageMasterUiSchema: any = (theme) => {
71
71
  },
72
72
  },
73
73
  },
74
- // {
75
- // type: "Control",
76
- // scope: "#/properties/programIdRequired",
77
-
78
- // options: {
79
- // widget: "RadioInputField",
80
- // },
81
- // config: {
82
- // layout: { xs: 12, sm: 6, md: 4, lg: 3 },
83
- // main: {
84
- // label: "Program ID Required",
85
- // // options: ["YES", "NO"],
86
- // options: [{label: "Yes",const: "YES"}, {label: "No",const: "NO"}],
87
- // // errorMessage: "Active is not marked YES or NO",
88
- // },
89
- // },
90
- // },
91
74
  {
92
75
  type: "Control",
93
76
  scope: "#/properties/EmptyBox",
@@ -89,162 +89,22 @@ export default (funcParams: funcParamsProps) => {
89
89
  }))
90
90
  }
91
91
  const config = pageData?.config;
92
- // const programId = JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")?.value || "programID";
93
- // const queryParams = new URLSearchParams(location.search);;
94
- // console.log("queryParams ",queryParams)
95
- // if(queryParams?.get("ProgramID") !== programId+"")
96
- // {
97
- // funcParams.store.setSearchParams({...queryParams, ProgramID: programId})
98
- // funcParams.store.navigate(
99
- // 0
100
- // );
101
- // }
102
- // if(programId !== "programID"){
103
- // funcParams.store.setFormdata((pre)=>({...pre,programId: programId}))
104
- // }
105
92
 
106
93
  const pathParts = funcParams.store.location.pathname.split("/");
107
94
  const programId = JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")?.value || "programID";
108
- // const programName = JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")?.label || "";
109
- if (pathParts?.[2]?.startsWith("program_")) {
110
- // if(decodeURIComponent(pathParts[2]) !== programName+""){
111
- // pathParts[2] = programName;
112
- // const newPath = pathParts.slice(0, 3).join("/");
113
- // funcParams.store.navigate(newPath);
114
- // }
95
+ if (pathParts?.[1]?.startsWith("program_")) {
115
96
  if(programId !== "programID"){
116
97
  funcParams.store.setFormdata((pre) => ({ ...pre, programId: programId }));
117
98
  }
118
99
  }
119
100
  const uiSchema = pageData?.uiSchema;
120
101
 
121
- // if (config?.programIdRequired) {
122
- // const programId =
123
- // JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")?.value ||
124
- // "programID";
125
- // const queryParams = new URLSearchParams(location.search);
126
- // console.log("queryParams ", queryParams);
127
- // if (queryParams?.get("ProgramID") !== programId + "") {
128
- // funcParams.store.setSearchParams({ ...queryParams, ProgramID: programId });
129
- // // funcParams.store.navigate(0);
130
- // }
131
- // if (programId !== "programID") {
132
- // funcParams.store.setFormdata((pre) => ({ ...pre, programId: programId }));
133
- // }
134
- // }
135
-
136
102
  const event = new CustomEvent('pageNameChanged', {
137
103
  detail: { pageName: config.label }
138
104
  });
139
105
  window.dispatchEvent(event)
140
106
  const theme = funcParams?.store?.theme?.myTheme;
141
107
  uiSchema.elements.push(
142
-
143
- // {
144
- // type: "HorizontalLayout",
145
- // config: {
146
- // main: {
147
- // direction: "row",
148
- // },
149
- // style: {
150
- // flexDirection: "row",
151
- // position: "absolute",
152
- // bottom: 0,
153
- // height: "fit-content",
154
- // overflow: "hidden",
155
- // zIndex: 1000,
156
- // width: "inherit",
157
- // },
158
- // },
159
- // elements: [
160
- // {
161
- // type: "Control",
162
- // scope: "#/properties/FooterText",
163
- // options: {
164
- // widget: "Box",
165
- // },
166
- // config: {
167
- // main: {
168
- // heading: "Copywriter@ACT21.IO",
169
- // },
170
- // style: {
171
- // color: theme?.palette?.text?.disabled || "#AFAFAF",
172
- // fontSize: "12px",
173
- // textAlign: "center",
174
- // lineHeight: 2,
175
- // width: "fit-content",
176
- // left: "50%",
177
- // position: "relative",
178
- // margin: 0,
179
- // flexGrow: 1,
180
- // height: 0,
181
- // transform: "translate(-50%, 0%)",
182
- // },
183
- // },
184
- // },
185
- // {
186
- // type: "Control",
187
- // scope: "#/properties/FooterBackIcon",
188
- // options: {
189
- // widget: "Box",
190
- // },
191
- // config: {
192
- // main: {
193
- // iconName: "PrevIcon",
194
- // onClick: "backHandler",
195
- // width: "fit-content",
196
- // },
197
- // style: {
198
- // fill: theme?.palette?.primary?.main,
199
- // width: 20,
200
- // height: 0,
201
- // // margin: 0,
202
- // top: 0,
203
- // right: { xs: "12px", sm: "84px" },
204
- // position: "absolute",
205
- // fontSize: "12px",
206
- // cursor: "pointer",
207
- // ":hover": {
208
- // fill: theme?.palette?.primary?.dark,
209
- // },
210
- // marginRight: "13px",
211
- // },
212
- // },
213
- // },
214
- // {
215
- // type: "Control",
216
- // scope: "#/properties/FooterBackHandlerText",
217
- // options: {
218
- // widget: "Box",
219
- // },
220
- // config: {
221
- // main: {
222
- // heading: "Previous Page",
223
- // onClick: "backHandler",
224
- // },
225
- // style: {
226
- // display: { xs: "none", sm: "flex" },
227
- // textAlign: "left",
228
- // lineHeight: 1,
229
- // height: 0,
230
- // width: "fit-content",
231
- // color: theme?.palette?.primary?.main,
232
- // fontSize: "14px",
233
- // cursor: "pointer",
234
- // marginLeft: "2px",
235
-
236
- // top: 3,
237
- // right: "12px",
238
- // position: "absolute",
239
- // ":hover": {
240
- // color: theme?.palette?.primary?.dark,
241
- // },
242
- // marginRight: "4px",
243
- // },
244
- // },
245
- // },
246
- // ],
247
- // }
248
108
  {
249
109
  type: "HorizontalLayout",
250
110
  config: {