impaktapps-ui-builder 1.0.261 → 1.0.271

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.
@@ -1,535 +0,0 @@
1
- export default function InfoCard(theme: any): {
2
- type: string;
3
- config: {
4
- main: {};
5
- style: {
6
- wrapperStyle: {
7
- position: string;
8
- top: string;
9
- transform: string;
10
- marginBottom: number;
11
- borderRadius: string;
12
- fontFamily: string;
13
- };
14
- componentsBoxStyle: {
15
- flexDirection: string;
16
- overflow: string;
17
- flexWrap: string;
18
- width: string;
19
- background: any;
20
- borderRadius: string;
21
- border: string;
22
- padding: string;
23
- height: string;
24
- minHeight: string;
25
- position: string;
26
- gap: string;
27
- transition: string;
28
- "&:hover": {
29
- boxShadow: string;
30
- transform: string;
31
- };
32
- };
33
- };
34
- layout: {
35
- xs: number;
36
- sm: number;
37
- md: number;
38
- lg: number;
39
- };
40
- };
41
- elements: ({
42
- type: string;
43
- scope: string;
44
- config: {
45
- main: {
46
- heading: string;
47
- url?: undefined;
48
- rowSpacing?: undefined;
49
- columnSpacingSpacing?: undefined;
50
- spacing?: undefined;
51
- gap?: undefined;
52
- };
53
- style: {
54
- color: string;
55
- fontSize: string;
56
- fontWeight: number;
57
- fontFamily: string;
58
- letterSpacing: string;
59
- background: string;
60
- borderRadius: string;
61
- padding: string;
62
- display: string;
63
- alignItems: string;
64
- width: string;
65
- alignSelf: string;
66
- position: string;
67
- top: string;
68
- left: string;
69
- whiteSpace: string;
70
- containerStyle?: undefined;
71
- imageStyle?: undefined;
72
- height?: undefined;
73
- margin?: undefined;
74
- componentsBoxStyle?: undefined;
75
- lineHeight?: undefined;
76
- marginBottom?: undefined;
77
- maxWidth?: undefined;
78
- overflowX?: undefined;
79
- scrollbarWidth?: undefined;
80
- "&::-webkit-scrollbar"?: undefined;
81
- };
82
- layout?: undefined;
83
- };
84
- options: {
85
- widget: string;
86
- };
87
- elements?: undefined;
88
- } | {
89
- type: string;
90
- scope: string;
91
- config: {
92
- main: {
93
- url: string;
94
- heading?: undefined;
95
- rowSpacing?: undefined;
96
- columnSpacingSpacing?: undefined;
97
- spacing?: undefined;
98
- gap?: undefined;
99
- };
100
- style: {
101
- containerStyle: {
102
- position: string;
103
- top: string;
104
- right: string;
105
- display: string;
106
- justifyContent: string;
107
- alignItems: string;
108
- };
109
- imageStyle: {
110
- width: string;
111
- height: string;
112
- };
113
- color?: undefined;
114
- fontSize?: undefined;
115
- fontWeight?: undefined;
116
- fontFamily?: undefined;
117
- letterSpacing?: undefined;
118
- background?: undefined;
119
- borderRadius?: undefined;
120
- padding?: undefined;
121
- display?: undefined;
122
- alignItems?: undefined;
123
- width?: undefined;
124
- alignSelf?: undefined;
125
- position?: undefined;
126
- top?: undefined;
127
- left?: undefined;
128
- whiteSpace?: undefined;
129
- height?: undefined;
130
- margin?: undefined;
131
- componentsBoxStyle?: undefined;
132
- lineHeight?: undefined;
133
- marginBottom?: undefined;
134
- maxWidth?: undefined;
135
- overflowX?: undefined;
136
- scrollbarWidth?: undefined;
137
- "&::-webkit-scrollbar"?: undefined;
138
- };
139
- layout?: undefined;
140
- };
141
- options: {
142
- widget: string;
143
- };
144
- elements?: undefined;
145
- } | {
146
- type: string;
147
- scope: string;
148
- config: {
149
- main: {
150
- heading: string;
151
- url?: undefined;
152
- rowSpacing?: undefined;
153
- columnSpacingSpacing?: undefined;
154
- spacing?: undefined;
155
- gap?: undefined;
156
- };
157
- style: {
158
- display: string;
159
- height: string;
160
- width: string;
161
- background: string;
162
- padding: string;
163
- margin: string;
164
- color?: undefined;
165
- fontSize?: undefined;
166
- fontWeight?: undefined;
167
- fontFamily?: undefined;
168
- letterSpacing?: undefined;
169
- borderRadius?: undefined;
170
- alignItems?: undefined;
171
- alignSelf?: undefined;
172
- position?: undefined;
173
- top?: undefined;
174
- left?: undefined;
175
- whiteSpace?: undefined;
176
- containerStyle?: undefined;
177
- imageStyle?: undefined;
178
- componentsBoxStyle?: undefined;
179
- lineHeight?: undefined;
180
- marginBottom?: undefined;
181
- maxWidth?: undefined;
182
- overflowX?: undefined;
183
- scrollbarWidth?: undefined;
184
- "&::-webkit-scrollbar"?: undefined;
185
- };
186
- layout?: undefined;
187
- };
188
- options: {
189
- widget: string;
190
- };
191
- elements?: undefined;
192
- } | {
193
- type: string;
194
- config: {
195
- main: {
196
- rowSpacing: number;
197
- columnSpacingSpacing: number;
198
- spacing: number;
199
- gap: number;
200
- heading?: undefined;
201
- url?: undefined;
202
- };
203
- style: {
204
- componentsBoxStyle: {
205
- flexDirection: string;
206
- alignItems: string;
207
- flexWrap: string;
208
- gap: string;
209
- padding: string;
210
- marginTop: string;
211
- margin: string;
212
- marginBottom: string;
213
- background: string;
214
- boxShadow: string;
215
- width: string;
216
- minHeight: string;
217
- };
218
- color?: undefined;
219
- fontSize?: undefined;
220
- fontWeight?: undefined;
221
- fontFamily?: undefined;
222
- letterSpacing?: undefined;
223
- background?: undefined;
224
- borderRadius?: undefined;
225
- padding?: undefined;
226
- display?: undefined;
227
- alignItems?: undefined;
228
- width?: undefined;
229
- alignSelf?: undefined;
230
- position?: undefined;
231
- top?: undefined;
232
- left?: undefined;
233
- whiteSpace?: undefined;
234
- containerStyle?: undefined;
235
- imageStyle?: undefined;
236
- height?: undefined;
237
- margin?: undefined;
238
- lineHeight?: undefined;
239
- marginBottom?: undefined;
240
- maxWidth?: undefined;
241
- overflowX?: undefined;
242
- scrollbarWidth?: undefined;
243
- "&::-webkit-scrollbar"?: undefined;
244
- };
245
- layout: {
246
- xs: number;
247
- sm: number;
248
- md: number;
249
- lg: number;
250
- };
251
- };
252
- elements: ({
253
- type: string;
254
- scope: string;
255
- config: {
256
- layout: string;
257
- main: {
258
- heading: string;
259
- };
260
- style: {
261
- color: any;
262
- fontSize: string;
263
- fontWeight: number;
264
- fontFamily: string;
265
- letterSpacing: string;
266
- background: string;
267
- padding: string;
268
- margin: string;
269
- width: string;
270
- flexShrink: number;
271
- display: string;
272
- alignItems: string;
273
- lineHeight: string;
274
- paddingBottom: string;
275
- };
276
- };
277
- options: {
278
- widget: string;
279
- };
280
- } | {
281
- type: string;
282
- scope: string;
283
- config: {
284
- layout: string;
285
- main: {
286
- heading: string;
287
- };
288
- style: {
289
- color: any;
290
- fontSize: string;
291
- fontWeight: number;
292
- fontFamily: string;
293
- letterSpacing: string;
294
- background: string;
295
- padding: string;
296
- margin: string;
297
- width: string;
298
- display: string;
299
- alignItems: string;
300
- lineHeight: string;
301
- flexShrink?: undefined;
302
- paddingBottom?: undefined;
303
- };
304
- };
305
- options: {
306
- widget: string;
307
- };
308
- })[];
309
- scope?: undefined;
310
- options?: undefined;
311
- } | {
312
- type: string;
313
- scope: string;
314
- config: {
315
- main: {
316
- heading: string;
317
- url?: undefined;
318
- rowSpacing?: undefined;
319
- columnSpacingSpacing?: undefined;
320
- spacing?: undefined;
321
- gap?: undefined;
322
- };
323
- style: {
324
- color: string;
325
- fontSize: {
326
- xs: string;
327
- md: string;
328
- };
329
- fontWeight: number;
330
- fontFamily: string;
331
- lineHeight: string;
332
- margin: string;
333
- marginBottom: string;
334
- padding: string;
335
- background: string;
336
- display: string;
337
- maxWidth: string;
338
- whiteSpace: string;
339
- overflowX: string;
340
- scrollbarWidth: string;
341
- "&::-webkit-scrollbar": {
342
- display: string;
343
- };
344
- letterSpacing?: undefined;
345
- borderRadius?: undefined;
346
- alignItems?: undefined;
347
- width?: undefined;
348
- alignSelf?: undefined;
349
- position?: undefined;
350
- top?: undefined;
351
- left?: undefined;
352
- containerStyle?: undefined;
353
- imageStyle?: undefined;
354
- height?: undefined;
355
- componentsBoxStyle?: undefined;
356
- };
357
- layout?: undefined;
358
- };
359
- options: {
360
- widget: string;
361
- };
362
- elements?: undefined;
363
- } | {
364
- type: string;
365
- config: {
366
- main: {
367
- rowSpacing: number;
368
- columnSpacingSpacing: number;
369
- spacing: number;
370
- gap: number;
371
- heading?: undefined;
372
- url?: undefined;
373
- };
374
- style: {
375
- componentsBoxStyle: {
376
- flexDirection: string;
377
- alignItems: string;
378
- flexWrap: string;
379
- gap: string;
380
- padding: string;
381
- margin: string;
382
- marginBottom: string;
383
- background: string;
384
- boxShadow: string;
385
- width: string;
386
- minHeight: string;
387
- marginTop?: undefined;
388
- };
389
- color?: undefined;
390
- fontSize?: undefined;
391
- fontWeight?: undefined;
392
- fontFamily?: undefined;
393
- letterSpacing?: undefined;
394
- background?: undefined;
395
- borderRadius?: undefined;
396
- padding?: undefined;
397
- display?: undefined;
398
- alignItems?: undefined;
399
- width?: undefined;
400
- alignSelf?: undefined;
401
- position?: undefined;
402
- top?: undefined;
403
- left?: undefined;
404
- whiteSpace?: undefined;
405
- containerStyle?: undefined;
406
- imageStyle?: undefined;
407
- height?: undefined;
408
- margin?: undefined;
409
- lineHeight?: undefined;
410
- marginBottom?: undefined;
411
- maxWidth?: undefined;
412
- overflowX?: undefined;
413
- scrollbarWidth?: undefined;
414
- "&::-webkit-scrollbar"?: undefined;
415
- };
416
- layout: {
417
- xs: number;
418
- sm: number;
419
- md: number;
420
- lg: number;
421
- };
422
- };
423
- elements: ({
424
- type: string;
425
- scope: string;
426
- config: {
427
- layout: string;
428
- main: {
429
- heading: string;
430
- };
431
- style: {
432
- color: any;
433
- fontSize: string;
434
- fontWeight: number;
435
- fontFamily: string;
436
- letterSpacing: string;
437
- background: string;
438
- padding: string;
439
- margin: string;
440
- width: string;
441
- flexShrink: number;
442
- display: string;
443
- alignItems: string;
444
- lineHeight: string;
445
- paddingBottom: string;
446
- };
447
- };
448
- options: {
449
- widget: string;
450
- };
451
- } | {
452
- type: string;
453
- scope: string;
454
- config: {
455
- layout: string;
456
- main: {
457
- heading: string;
458
- };
459
- style: {
460
- color: any;
461
- fontSize: string;
462
- fontWeight: number;
463
- fontFamily: string;
464
- letterSpacing: string;
465
- background: string;
466
- padding: string;
467
- margin: string;
468
- width: string;
469
- display: string;
470
- alignItems: string;
471
- lineHeight: string;
472
- flexShrink?: undefined;
473
- paddingBottom?: undefined;
474
- };
475
- };
476
- options: {
477
- widget: string;
478
- };
479
- })[];
480
- scope?: undefined;
481
- options?: undefined;
482
- } | {
483
- type: string;
484
- scope: string;
485
- config: {
486
- main: {
487
- heading: string;
488
- url?: undefined;
489
- rowSpacing?: undefined;
490
- columnSpacingSpacing?: undefined;
491
- spacing?: undefined;
492
- gap?: undefined;
493
- };
494
- style: {
495
- color: string;
496
- fontSize: {
497
- xs: string;
498
- md: string;
499
- };
500
- fontWeight: number;
501
- fontFamily: string;
502
- lineHeight: string;
503
- margin: string;
504
- padding: string;
505
- background: string;
506
- display: string;
507
- maxWidth: string;
508
- whiteSpace: string;
509
- overflowX: string;
510
- scrollbarWidth: string;
511
- "&::-webkit-scrollbar": {
512
- display: string;
513
- };
514
- letterSpacing?: undefined;
515
- borderRadius?: undefined;
516
- alignItems?: undefined;
517
- width?: undefined;
518
- alignSelf?: undefined;
519
- position?: undefined;
520
- top?: undefined;
521
- left?: undefined;
522
- containerStyle?: undefined;
523
- imageStyle?: undefined;
524
- height?: undefined;
525
- componentsBoxStyle?: undefined;
526
- marginBottom?: undefined;
527
- };
528
- layout?: undefined;
529
- };
530
- options: {
531
- widget: string;
532
- };
533
- elements?: undefined;
534
- })[];
535
- };
@@ -1,105 +0,0 @@
1
- import InfoCard from "./uischema/infoCard";
2
- import _ from "lodash";
3
- import { createLayoutFormat } from "./buildConfig";
4
-
5
- export const buildInfoCard = (config, componentScope, store) => {
6
- const card = _.cloneDeep(InfoCard(store.theme.myTheme));
7
- card.elements[0].scope = `#/properties/${config.name}/properties/title`;
8
- card.elements[1].scope = `#/properties/${config.name}/properties/url`;
9
-
10
- card.elements[3].elements[1].scope = `#/properties/${config.name}/properties/labelOne`;
11
- card.elements[4].scope = `#/properties/${config.name}/properties/valueOne`;
12
- card.elements[5].elements[1].scope = `#/properties/${config.name}/properties/labelTwo`;
13
- card.elements[6].scope = `#/properties/${config.name}/properties/valueTwo`;
14
-
15
- if (config.title) {
16
- card.elements[0].config.main.heading = config.title;
17
- }
18
- if (config.url) {
19
- card.elements[1].config.main.url = config.url;
20
- }
21
- if (config.labelOne) {
22
- card.elements[3].elements[1].config.main.heading = config.labelOne;
23
- }
24
- if (config.valueOne) {
25
- card.elements[4].config.main.heading = config.valueOne;
26
- }
27
- if (config.labelTwo) {
28
- card.elements[5].elements[1].config.main.heading = config.labelTwo;
29
- }
30
- if (config.valueTwo) {
31
- card.elements[6].config.main.heading = config.valueTwo;
32
- }
33
- if (config.primaryTextColor) {
34
- card.elements[4].config.style.color = config.primaryTextColor;
35
- card.elements[6].config.style.color = config.primaryTextColor;
36
- }
37
- if (config.secondaryTextColor) {
38
- card.elements[0].config.style.color = config.secondaryTextColor;
39
- card.elements[3].elements[0].config.style.color = config.secondaryTextColor;
40
- card.elements[3].elements[1].config.style.color = config.secondaryTextColor;
41
- card.elements[5].elements[0].config.style.color = config.secondaryTextColor;
42
- card.elements[5].elements[1].config.style.color = config.secondaryTextColor;
43
- }
44
- if (config.chipBackgroundColor) {
45
- card.elements[0].config.style.background = config.chipBackgroundColor;
46
- }
47
-
48
- if (config.style) {
49
- const styleObj = JSON.parse(config.style);
50
- if (styleObj.wrapperStyle) {
51
- card.config.style.wrapperStyle = {
52
- ...card.config.style.wrapperStyle,
53
- ...styleObj.wrapperStyle,
54
- };
55
- }
56
- if (styleObj.componentsBoxStyle) {
57
- card.config.style.componentsBoxStyle = {
58
- ...card.config.style.componentsBoxStyle,
59
- ...styleObj.componentsBoxStyle,
60
- };
61
- }
62
- if (styleObj.headingStyle) {
63
- card.elements[0].config.style = {
64
- ...card.elements[0].config.style,
65
- ...styleObj.headingStyle,
66
- };
67
- }
68
-
69
- if (styleObj.labelStyle) {
70
- const labelStyle = styleObj.labelStyle;
71
- card.elements[3].elements[0].config.style = {
72
- ...card.elements[3].elements[0].config.style,
73
- ...labelStyle,
74
- };
75
- card.elements[3].elements[1].config.style = {
76
- ...card.elements[3].elements[1].config.style,
77
- ...labelStyle,
78
- };
79
- card.elements[5].elements[0].config.style = {
80
- ...card.elements[5].elements[0].config.style,
81
- ...labelStyle,
82
- };
83
- card.elements[5].elements[1].config.style = {
84
- ...card.elements[5].elements[1].config.style,
85
- ...labelStyle,
86
- };
87
- }
88
-
89
- if (styleObj.valueStyle) {
90
- card.elements[4].config.style = {
91
- ...card.elements[4].config.style,
92
- ...styleObj.valueStyle,
93
- };
94
- card.elements[6].config.style = {
95
- ...card.elements[6].config.style,
96
- ...styleObj.valueStyle,
97
- };
98
- }
99
- }
100
- if (config.layout) {
101
- card.config.layout = createLayoutFormat(config.layout);
102
- }
103
-
104
- return card;
105
- };