impaktapps-ui-builder 1.0.61 → 1.0.63-alpha.1

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.
@@ -0,0 +1 @@
1
+ export declare const buildHorizontalLayout: (config: any, componentScope: any) => any;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ type: string;
3
+ config: {
4
+ layout: number;
5
+ main: {
6
+ rowSpacing: number;
7
+ divider: boolean;
8
+ };
9
+ defaultStyle: boolean;
10
+ };
11
+ elements: any[];
12
+ };
13
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.61",
3
+ "version": "1.0.63-alpha.1",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -10,6 +10,9 @@ export const buildDate = (config:any,componentScope:string)=> {
10
10
  if(config.layout){
11
11
  dateInputField.config.layout = createLayoutFormat(config.layout)
12
12
  }
13
+ if (config.variant) {
14
+ dateInputField.config.main.variant = config.variant;
15
+ }
13
16
  return dateInputField;
14
17
  }
15
18
  export const buildDateTime = (config:any,componentScope:string)=>{
@@ -20,5 +23,8 @@ export const buildDateTime = (config:any,componentScope:string)=>{
20
23
  if(config.layout){
21
24
  dateTimeInputField.config.layout = createLayoutFormat(config.layout)
22
25
  }
26
+ if (config.variant) {
27
+ dateTimeInputField.config.main.variant = config.variant;
28
+ }
23
29
  return dateTimeInputField;
24
30
  }
@@ -0,0 +1,21 @@
1
+ import { createLayoutFormat } from "./buildConfig";
2
+ import horizontalLayout from "./uischema/horizontalLayout";
3
+ import _ from "lodash";
4
+
5
+ export const buildHorizontalLayout = (config, componentScope) => {
6
+ const horizontal: any = _.cloneDeep(horizontalLayout);
7
+ horizontal.scope = componentScope;
8
+ // horizontal.config.main.label = config.label;
9
+ // horizontal.config.main.divider = config.divider === "YES" ? true : false;
10
+ // horizontal.config.main.isAccordion = config.isAccordion === "No" ? false : true;
11
+ // if(config.defaultStyle){
12
+ // horizontal.config.defaultStyle = config.defaultStyle ==="YES" ? true : false;
13
+ // }
14
+ // if (config.style) {
15
+ // wrapper.config.style = JSON.parse(config.style)
16
+ // }
17
+ if (config.layout) {
18
+ horizontal.config.layout = createLayoutFormat(config.layout, config.type)
19
+ }
20
+ return horizontal;
21
+ }
@@ -37,7 +37,7 @@ export const buildPopUp = (config,componentScope) =>{
37
37
  popup.config.layout = createLayoutFormat(config.layout, config.type)
38
38
  }
39
39
  if (config.style) {
40
- PopUP.config.style = JSON.parse(config.style)
40
+ popup.config.style = JSON.parse(config.style)
41
41
  }
42
42
  return popup;
43
43
  }
@@ -40,6 +40,7 @@ import { buildDataGrid } from "./buildDataGrid";
40
40
  import { buildInputSlider } from "./buildInputSlider";
41
41
  import { buildTreeMap } from "./buildTreeMap";
42
42
  import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
43
+ import { buildHorizontalLayout } from "./buildHorizontalLayout";
43
44
  export let schema = {
44
45
  type: "object",
45
46
  properties: {},
@@ -206,6 +207,9 @@ const buildUiSchema = (config: any, store?: any) => {
206
207
  case "WrapperSection":
207
208
  elements = buildWrapperSection(config, componentScope);
208
209
  break;
210
+ case "HorizontalLayout":
211
+ elements = buildHorizontalLayout(config, componentScope);
212
+ break;
209
213
  case "Text":
210
214
  elements = buildTextField(config, componentScope);
211
215
  break;
@@ -514,6 +514,26 @@ export const buildPropertiesSection = function (type: String) {
514
514
  emptyBox("MultipleSelectEmpty2")
515
515
  ]
516
516
  break;
517
+ case "Date":
518
+ uiSchema.elements = [
519
+ getSelectField("variant", "Variant", [
520
+ { label: "Outlined", value: "outlined" },
521
+ { label: "Filled", value: "filled" },
522
+ { label: "Standard", value: "standard" },
523
+ ]),
524
+ emptyBox("DateEmpty1", { xs: 6, sm: 6, md: 8, lg: 9 }),
525
+ ]
526
+ break;
527
+ case "DateTime":
528
+ uiSchema.elements = [
529
+ getSelectField("variant", "Variant", [
530
+ { label: "Outlined", value: "outlined" },
531
+ { label: "Filled", value: "filled" },
532
+ { label: "Standard", value: "standard" },
533
+ ]),
534
+ emptyBox("DateTimeEmpty1", { xs: 6, sm: 6, md: 8, lg: 9 }),
535
+ ]
536
+ break;
517
537
  case "Thought":
518
538
  uiSchema.elements = [
519
539
  getTextArea("thought", "Today's thought", false),
@@ -0,0 +1,11 @@
1
+ export default {
2
+ type: "HorizontalLayout",
3
+ config: {
4
+ layout: 12,
5
+ main: {
6
+ rowSpacing: 3,
7
+ divider: false,
8
+ },
9
+ defaultStyle: true,
10
+ },
11
+ elements: []}
@@ -10,6 +10,7 @@ export const ComponentSchema: any = {
10
10
  { title: "Data Card", const: "card" },
11
11
  { title: "Check Box", const: "CheckBox" },
12
12
  { title: "Container", const: "WrapperSection" },
13
+ { title: "Tab Container", const: "HorizontalLayout" },
13
14
  { title: "Data Grid", const: "DataGrid" },
14
15
  { title: "Date", const: "Date" },
15
16
  { title: "Time Stamp", const: "DateTime" },
@@ -50,11 +50,26 @@ 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
+ },
53
68
  {
54
69
  type: "Control",
55
70
  scope: "#/properties/EmptyBox",
56
71
  config: {
57
- layout: { xs: 0, sm: 0, md: 4, lg: 6 },
72
+ layout: { xs: 0, sm: 6, md: 0, lg: 3 },
58
73
  },
59
74
  options: {
60
75
  widget: "EmptyBox",
@@ -39,7 +39,9 @@ const sectionLabels = {
39
39
  InputSlider: ["Core", "Properties", "Events", "Style", "Validation"],
40
40
  TreeMap: ["Core", "Components", "Properties", "Events", "Style"],
41
41
  ColumnGroup: ["Core", "Components"],
42
- Thought: ["Core", "Properties", "Events", "Style", "Validation"]
42
+ Thought: ["Core", "Properties", "Events", "Style", "Validation"],
43
+ Date: ["Core", "Properties", "Events", "Style", "Validation"],
44
+ DateTime: ["Core", "Properties", "Events", "Style", "Validation"]
43
45
  }
44
46
 
45
47
  export function refreshPage(type: string, store: any) {
@@ -80,116 +80,10 @@ export default (funcParams: funcParamsProps) => {
80
80
  const config = pageData?.config;
81
81
  const uiSchema = pageData?.uiSchema;
82
82
  const event = new CustomEvent('pageNameChanged', {
83
- detail: { pageName: config.label, hasBackIcon: true }
83
+ detail: { pageName: config.label, hasBackIcon: config.hasBackIcon === "NO" ? false : true }
84
84
  });
85
85
  window.dispatchEvent(event)
86
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
- );
193
87
  const schema = pageData?.schema ?? { type: "object", properties: {} };
194
88
  eventGroups = extractEvents(config);
195
89
  executeEventsParameters = {