@zealicsolutions/web-ui 0.4.52 → 0.4.54

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/dist/cjs/index.js +4 -4
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/src/atoms/Tab/Tab.d.ts +1 -1
  4. package/dist/cjs/src/atoms/Tab/Tab.stories.d.ts +1 -1
  5. package/dist/cjs/src/containers/MoleculeItem.d.ts +5 -0
  6. package/dist/cjs/src/containers/OrganismItem.d.ts +2 -0
  7. package/dist/cjs/src/containers/mock-data.d.ts +457 -0
  8. package/dist/cjs/src/containers/types/types.d.ts +1 -0
  9. package/dist/cjs/src/contexts/OrganismContext/OrganismContext.d.ts +3 -0
  10. package/dist/cjs/src/contexts/OrganismContext/OrganismContextProvider.d.ts +3 -1
  11. package/dist/cjs/src/molecules/MenuItems/MenuItem.d.ts +20 -0
  12. package/dist/cjs/src/molecules/MenuItems/MenuItems.d.ts +7 -7
  13. package/dist/cjs/src/molecules/MenuItems/MenuItems.stories.d.ts +1 -1
  14. package/dist/cjs/src/molecules/MenuNavigation/MenuNavigation.d.ts +3 -1
  15. package/dist/cjs/src/molecules/MenuNavigation/MenuNavigation.stories.d.ts +1 -1
  16. package/dist/cjs/src/molecules/TabGroup/TabGroup.d.ts +1 -1
  17. package/dist/cjs/src/molecules/TabGroup/styles.d.ts +1 -1
  18. package/dist/esm/index.js +4 -4
  19. package/dist/esm/index.js.map +1 -1
  20. package/dist/esm/src/atoms/Tab/Tab.d.ts +1 -1
  21. package/dist/esm/src/atoms/Tab/Tab.stories.d.ts +1 -1
  22. package/dist/esm/src/containers/MoleculeItem.d.ts +5 -0
  23. package/dist/esm/src/containers/OrganismItem.d.ts +2 -0
  24. package/dist/esm/src/containers/mock-data.d.ts +457 -0
  25. package/dist/esm/src/containers/types/types.d.ts +1 -0
  26. package/dist/esm/src/contexts/OrganismContext/OrganismContext.d.ts +3 -0
  27. package/dist/esm/src/contexts/OrganismContext/OrganismContextProvider.d.ts +3 -1
  28. package/dist/esm/src/molecules/MenuItems/MenuItem.d.ts +20 -0
  29. package/dist/esm/src/molecules/MenuItems/MenuItems.d.ts +7 -7
  30. package/dist/esm/src/molecules/MenuItems/MenuItems.stories.d.ts +1 -1
  31. package/dist/esm/src/molecules/MenuNavigation/MenuNavigation.d.ts +3 -1
  32. package/dist/esm/src/molecules/MenuNavigation/MenuNavigation.stories.d.ts +1 -1
  33. package/dist/esm/src/molecules/TabGroup/TabGroup.d.ts +1 -1
  34. package/dist/esm/src/molecules/TabGroup/styles.d.ts +1 -1
  35. package/dist/index.d.ts +30 -10
  36. package/package.json +1 -1
@@ -39,7 +39,7 @@ export declare const Tab: <T, K>(props: {
39
39
  vertical: boolean;
40
40
  isActive: boolean;
41
41
  onClick: (key: T) => void;
42
- options: MenuItem<K>[];
42
+ options: MenuItem<K_1>[];
43
43
  onOptionClick: (optionKey: K) => void;
44
44
  tabTheme: TabTheme;
45
45
  divider: boolean;
@@ -11,7 +11,7 @@ declare const _default: {
11
11
  vertical: boolean;
12
12
  isActive: boolean;
13
13
  onClick: (key: T) => void;
14
- options: import("../..").MenuItem<K>[];
14
+ options: MenuItem<K_1>[];
15
15
  onOptionClick: (optionKey: K) => void;
16
16
  tabTheme: import("atoms").TabTheme;
17
17
  divider: boolean;
@@ -1,6 +1,11 @@
1
1
  import { Molecule } from 'containers';
2
2
  import { TabGroupProps } from 'molecules';
3
+ import { ThemeColors } from 'theme';
3
4
  export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id, formData, setFormData, isMobile, metadata, }: Molecule & {
4
5
  tabsProps?: Pick<TabGroupProps<string, string>, "tabs" | "activeTabKey" | "onTabChange"> | undefined;
5
6
  isMobile?: boolean | undefined;
6
7
  }) => JSX.Element | null;
8
+ export declare const ConfigurationWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
9
+ $color?: ThemeColors | undefined;
10
+ $selected?: boolean | undefined;
11
+ }, never>;
@@ -8,5 +8,7 @@ export declare type OrganismItemProps = {
8
8
  formData?: AnyObject;
9
9
  setFormData?: Dispatch<SetStateAction<AnyObject>>;
10
10
  isMobile?: boolean;
11
+ isConfigurationMode?: boolean;
12
+ onConfigurationItemHandler?: (itemPath: string) => void;
11
13
  };
12
14
  export declare const OrganismItem: ({ item, tabsProps, formData, setFormData, isMobile, }: OrganismItemProps) => JSX.Element | null;
@@ -11,6 +11,463 @@ export declare const rowRepeaterContainerSingle: ContainerComponentProps;
11
11
  export declare const columnRepeaterContainer: ContainerComponentProps;
12
12
  export declare const outlinedColumnContainer: ContainerComponentProps;
13
13
  export declare const headerContainer: ContainerComponentProps;
14
+ export declare const headerWithTabs2: ContainerComponentProps;
15
+ export declare const threeColumnOrganismBody: {
16
+ type: string;
17
+ config: {
18
+ wide: {
19
+ containerProps: {
20
+ gap: string;
21
+ position: string;
22
+ alignItems: string;
23
+ paddingTop: string;
24
+ paddingLeft: string;
25
+ paddingRight: string;
26
+ paddingBottom: string;
27
+ };
28
+ containerStyle: {
29
+ width: string;
30
+ position: string;
31
+ 'flex-direction': string;
32
+ backgroundColor: string;
33
+ 'justify-content': string;
34
+ 'border-top-left-radius': string;
35
+ 'border-top-right-radius': string;
36
+ 'border-bottom-left-radius': string;
37
+ 'border-bottom-right-radius': string;
38
+ };
39
+ };
40
+ compact: {
41
+ containerProps: {
42
+ gap: string;
43
+ position: string;
44
+ paddingTop: string;
45
+ paddingLeft: string;
46
+ paddingRight: string;
47
+ paddingBottom: string;
48
+ };
49
+ containerStyle: {
50
+ width: string;
51
+ position: string;
52
+ 'flex-direction': string;
53
+ backgroundColor: string;
54
+ 'justify-content': string;
55
+ 'border-top-left-radius': string;
56
+ 'border-top-right-radius': string;
57
+ 'border-bottom-left-radius': string;
58
+ 'border-bottom-right-radius': string;
59
+ };
60
+ };
61
+ };
62
+ instance: string;
63
+ metadata: {
64
+ group: string[];
65
+ };
66
+ containerLibraryId: string;
67
+ id: string;
68
+ items: {
69
+ type: string;
70
+ config: {
71
+ wide: {
72
+ containerProps: {
73
+ gap: string;
74
+ alignItems: string;
75
+ };
76
+ containerStyle: {
77
+ width: string;
78
+ flexDirection: string;
79
+ backgroundColor: string;
80
+ };
81
+ };
82
+ compact: {
83
+ containerProps: {
84
+ gap: string;
85
+ alignItems: string;
86
+ };
87
+ containerStyle: {
88
+ width: string;
89
+ flexDirection: string;
90
+ backgroundColor: string;
91
+ };
92
+ };
93
+ };
94
+ instance: string;
95
+ metadata: {
96
+ group: string[];
97
+ };
98
+ ordering: number;
99
+ containerLibraryId: string;
100
+ organismLibraryContainerId: string;
101
+ items: ({
102
+ type: string;
103
+ config: {
104
+ props: {
105
+ textColor: string;
106
+ textAlign?: undefined;
107
+ };
108
+ wide?: undefined;
109
+ compact?: undefined;
110
+ };
111
+ instance: string;
112
+ metadata: {
113
+ group: string[];
114
+ };
115
+ ordering: number;
116
+ attributes: {
117
+ text: {
118
+ id: string;
119
+ text: string;
120
+ required: boolean;
121
+ isRichText: boolean;
122
+ attributeType: string;
123
+ showRichTextToolbar: boolean;
124
+ };
125
+ color: {
126
+ id: string;
127
+ color: string;
128
+ required: boolean;
129
+ attributeType: string;
130
+ };
131
+ seoStyle: {
132
+ id: string;
133
+ value: string;
134
+ options: {
135
+ id: string;
136
+ label: string;
137
+ value: string;
138
+ config: {
139
+ dataModelFieldType: string;
140
+ };
141
+ }[];
142
+ required: boolean;
143
+ attributeType: string;
144
+ };
145
+ fontVariant: {
146
+ id: string;
147
+ value: string;
148
+ options: {
149
+ id: string;
150
+ label: string;
151
+ value: string;
152
+ config: {
153
+ dataModelFieldType: string;
154
+ };
155
+ }[];
156
+ attributeType: string;
157
+ };
158
+ };
159
+ moleculeLibraryId: string;
160
+ organismLibraryMoleculeId: string;
161
+ children: never[];
162
+ idForFrontend: string;
163
+ id: string;
164
+ containerLibraryId?: undefined;
165
+ organismLibraryContainerId?: undefined;
166
+ items?: undefined;
167
+ } | {
168
+ type: string;
169
+ config: {
170
+ wide: {
171
+ containerProps: {
172
+ gap: string;
173
+ alignItems: string;
174
+ verticalPadding: string;
175
+ horizontalPadding: string;
176
+ };
177
+ containerStyle: {
178
+ width: string;
179
+ justifyContent: string;
180
+ backgroundColor: string;
181
+ };
182
+ };
183
+ compact: {
184
+ containerProps: {
185
+ gap: string;
186
+ verticalPadding: string;
187
+ horizontalPadding: string;
188
+ };
189
+ containerStyle: {
190
+ width: string;
191
+ flexDirection: string;
192
+ backgroundColor: string;
193
+ };
194
+ };
195
+ props?: undefined;
196
+ };
197
+ instance: string;
198
+ metadata: {
199
+ group: string[];
200
+ };
201
+ ordering: number;
202
+ containerLibraryId: string;
203
+ organismLibraryContainerId: string;
204
+ items: {
205
+ type: string;
206
+ config: {
207
+ wide: {
208
+ containerProps: {
209
+ gap: string;
210
+ position: string;
211
+ alignItems: string;
212
+ paddingTop: string;
213
+ paddingLeft: string;
214
+ paddingRight: string;
215
+ paddingBottom: string;
216
+ };
217
+ containerStyle: {
218
+ width: string;
219
+ position: string;
220
+ 'flex-direction': string;
221
+ justifyContent: string;
222
+ backgroundColor: string;
223
+ 'justify-content': string;
224
+ 'border-top-left-radius': string;
225
+ 'border-top-right-radius': string;
226
+ 'border-bottom-left-radius': string;
227
+ 'border-bottom-right-radius': string;
228
+ };
229
+ };
230
+ compact: {
231
+ containerProps: {
232
+ gap: string;
233
+ position: string;
234
+ alignItems: string;
235
+ paddingTop: string;
236
+ paddingLeft: string;
237
+ paddingRight: string;
238
+ paddingBottom: string;
239
+ };
240
+ containerStyle: {
241
+ width: string;
242
+ position: string;
243
+ 'flex-direction': string;
244
+ backgroundColor: string;
245
+ 'justify-content': string;
246
+ 'border-top-left-radius': string;
247
+ 'border-top-right-radius': string;
248
+ 'border-bottom-left-radius': string;
249
+ 'border-bottom-right-radius': string;
250
+ };
251
+ };
252
+ };
253
+ instance: string;
254
+ metadata: {
255
+ group: string[];
256
+ };
257
+ ordering: number;
258
+ containerLibraryId: string;
259
+ organismLibraryContainerId: string;
260
+ items: ({
261
+ type: string;
262
+ config: {
263
+ props: {
264
+ styles: {
265
+ width: string;
266
+ display: string;
267
+ 'max-height': string;
268
+ };
269
+ textAlign?: undefined;
270
+ textColor?: undefined;
271
+ };
272
+ };
273
+ instance: string;
274
+ metadata: {
275
+ group: string[];
276
+ };
277
+ ordering: number;
278
+ attributes: {
279
+ link: {
280
+ id: string;
281
+ attributeType: string;
282
+ externalLink: string;
283
+ internalLink: string;
284
+ name: string;
285
+ type: string;
286
+ required: boolean;
287
+ };
288
+ image: {
289
+ id: string;
290
+ imageFile: {
291
+ type: string;
292
+ fileType: string;
293
+ id: string;
294
+ name: string;
295
+ url: string;
296
+ description: string;
297
+ originalName: string;
298
+ size: number;
299
+ status: string;
300
+ updatedAt: string;
301
+ isDefault: boolean;
302
+ tags: never[];
303
+ brandId: string;
304
+ uploadedAt: string;
305
+ };
306
+ attributeType: string;
307
+ imageSource: string;
308
+ };
309
+ altText: {
310
+ id: string;
311
+ text: string;
312
+ required: boolean;
313
+ isRichText: boolean;
314
+ attributeType: string;
315
+ showRichTextToolbar: boolean;
316
+ };
317
+ text?: undefined;
318
+ color?: undefined;
319
+ seoStyle?: undefined;
320
+ fontVariant?: undefined;
321
+ };
322
+ moleculeLibraryId: string;
323
+ organismLibraryMoleculeId: string;
324
+ children: never[];
325
+ idForFrontend: string;
326
+ id: string;
327
+ } | {
328
+ type: string;
329
+ config: {
330
+ props: {
331
+ textAlign: string;
332
+ textColor: string;
333
+ styles?: undefined;
334
+ };
335
+ };
336
+ instance: string;
337
+ metadata: {
338
+ group: string[];
339
+ };
340
+ ordering: number;
341
+ attributes: {
342
+ text: {
343
+ id: string;
344
+ text: string;
345
+ required: boolean;
346
+ isRichText: boolean;
347
+ attributeType: string;
348
+ showRichTextToolbar: boolean;
349
+ };
350
+ color: {
351
+ id: string;
352
+ color: string;
353
+ required: boolean;
354
+ attributeType: string;
355
+ };
356
+ seoStyle: {
357
+ id: string;
358
+ value: string;
359
+ options: {
360
+ id: string;
361
+ label: string;
362
+ value: string;
363
+ config: {
364
+ dataModelFieldType: string;
365
+ };
366
+ }[];
367
+ required: boolean;
368
+ attributeType: string;
369
+ };
370
+ fontVariant: {
371
+ id: string;
372
+ value: string;
373
+ options: {
374
+ id: string;
375
+ label: string;
376
+ value: string;
377
+ config: {
378
+ dataModelFieldType: string;
379
+ };
380
+ }[];
381
+ attributeType: string;
382
+ };
383
+ link?: undefined;
384
+ image?: undefined;
385
+ altText?: undefined;
386
+ };
387
+ moleculeLibraryId: string;
388
+ organismLibraryMoleculeId: string;
389
+ children: never[];
390
+ idForFrontend: string;
391
+ id: string;
392
+ })[];
393
+ id: string;
394
+ }[];
395
+ id: string;
396
+ attributes?: undefined;
397
+ moleculeLibraryId?: undefined;
398
+ organismLibraryMoleculeId?: undefined;
399
+ children?: undefined;
400
+ idForFrontend?: undefined;
401
+ } | {
402
+ type: string;
403
+ config: {
404
+ props: {
405
+ textAlign: string;
406
+ textColor: string;
407
+ };
408
+ wide?: undefined;
409
+ compact?: undefined;
410
+ };
411
+ instance: string;
412
+ metadata: {
413
+ group: string[];
414
+ };
415
+ ordering: number;
416
+ attributes: {
417
+ text: {
418
+ id: string;
419
+ text: string;
420
+ required: boolean;
421
+ isRichText: boolean;
422
+ attributeType: string;
423
+ showRichTextToolbar: boolean;
424
+ };
425
+ color: {
426
+ id: string;
427
+ color: string;
428
+ required: boolean;
429
+ attributeType: string;
430
+ };
431
+ seoStyle: {
432
+ id: string;
433
+ value: string;
434
+ options: {
435
+ id: string;
436
+ label: string;
437
+ value: string;
438
+ config: {
439
+ dataModelFieldType: string;
440
+ };
441
+ }[];
442
+ required: boolean;
443
+ attributeType: string;
444
+ };
445
+ fontVariant: {
446
+ id: string;
447
+ value: string;
448
+ options: {
449
+ id: string;
450
+ label: string;
451
+ value: string;
452
+ config: {
453
+ dataModelFieldType: string;
454
+ };
455
+ }[];
456
+ attributeType: string;
457
+ };
458
+ };
459
+ moleculeLibraryId: string;
460
+ organismLibraryMoleculeId: string;
461
+ children: never[];
462
+ idForFrontend: string;
463
+ id: string;
464
+ containerLibraryId?: undefined;
465
+ organismLibraryContainerId?: undefined;
466
+ items?: undefined;
467
+ })[];
468
+ id: string;
469
+ }[];
470
+ };
14
471
  export declare const headerContainerWithTabs: ContainerComponentProps;
15
472
  export declare const DataField: ContainerComponentProps;
16
473
  export declare const LogInPermanentPage: ContainerComponentProps;
@@ -34,6 +34,7 @@ export declare type MetadataType = AnyObject & Partial<{
34
34
  notEditable: boolean;
35
35
  hasOwnButton: boolean;
36
36
  stateListenerId: string;
37
+ configurationPath: string;
37
38
  }>;
38
39
  export declare type SliderProps = {
39
40
  autoplay?: boolean;
@@ -23,8 +23,11 @@ export declare type OrganismContextType = {
23
23
  validations?: PasswordRuleValidation[];
24
24
  editable?: boolean;
25
25
  isFormInEditMode?: boolean;
26
+ isConfigurationMode?: boolean;
26
27
  organismMetadata?: {
27
28
  stateListenerId?: string;
28
29
  } & AnyObject;
30
+ onConfigurationItemClicked: (itemPath?: string) => void;
31
+ selectedConfigurationItemPath?: string;
29
32
  };
30
33
  export declare const OrganismContext: import("react").Context<OrganismContextType>;
@@ -13,5 +13,7 @@ export declare type FormStepContextProviderProps = PropsWithChildren<Partial<{
13
13
  editable: boolean;
14
14
  isFormInEditMode?: boolean;
15
15
  organismMetadata?: AnyObject;
16
+ isConfigurationMode?: boolean;
17
+ onConfigurationItemHandler?: (itemPath?: string) => void;
16
18
  }>>;
17
- export declare const OrganismContextProvider: ({ initItems, children, submitHandler, formId, validations, editable, isFormInEditMode, organismMetadata, }: FormStepContextProviderProps) => JSX.Element;
19
+ export declare const OrganismContextProvider: ({ initItems, children, submitHandler, formId, validations, editable, isFormInEditMode, organismMetadata, isConfigurationMode, onConfigurationItemHandler, }: FormStepContextProviderProps) => JSX.Element;
@@ -0,0 +1,20 @@
1
+ export declare type MenuItemType<T> = {
2
+ id: T;
3
+ title: string;
4
+ active?: boolean;
5
+ onClick: (id: T) => void;
6
+ options?: MenuItemType<T>[];
7
+ divider?: boolean;
8
+ disabled?: boolean;
9
+ itemColor?: string;
10
+ activeItemColor?: string;
11
+ };
12
+ export declare type MenuItemProps<T> = {
13
+ item: MenuItemType<T>;
14
+ activeKey?: T;
15
+ itemColor?: string;
16
+ menuTheme?: 'light' | 'dark';
17
+ activeItemColor?: string;
18
+ parentHandleClick?: (id: T) => void;
19
+ };
20
+ export declare const MenuItem: <T extends string | number>({ item, activeKey, menuTheme, itemColor, activeItemColor, parentHandleClick, }: MenuItemProps<T>) => JSX.Element;
@@ -1,11 +1,11 @@
1
- export declare type MenuItem<T> = {
2
- id: T;
3
- title: string;
4
- onClick?: (id: T) => void;
5
- };
1
+ import { MenuItemType } from './MenuItem';
6
2
  export declare type MenuItemsProps<T> = {
7
3
  title?: string;
4
+ options?: MenuItemType<T>[];
5
+ activeKey?: T;
6
+ itemColor?: string;
7
+ menuTheme?: 'light' | 'dark';
8
8
  onItemPress?: (id: T) => void;
9
- options?: MenuItem<T>[];
9
+ activeItemColor?: string;
10
10
  };
11
- export declare const MenuItems: <T extends string | number>({ title, onItemPress, options, }: MenuItemsProps<T>) => JSX.Element;
11
+ export declare const MenuItems: <T extends string | number>({ title, options, activeKey, itemColor, menuTheme, onItemPress, activeItemColor, }: MenuItemsProps<T>) => JSX.Element;
@@ -2,7 +2,7 @@ import type { ComponentStory } from '@storybook/react';
2
2
  import { MenuItems as MenuItemsComponent } from './MenuItems';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: <T extends string | number>({ title, onItemPress, options, }: import("./MenuItems").MenuItemsProps<T>) => JSX.Element;
5
+ component: <T extends string | number>({ title, options, activeKey, itemColor, menuTheme, onItemPress, activeItemColor, }: import("./MenuItems").MenuItemsProps<T>) => JSX.Element;
6
6
  };
7
7
  export default _default;
8
8
  export declare const MenuItems: ComponentStory<typeof MenuItemsComponent>;
@@ -1,8 +1,10 @@
1
+ import { IconNames } from 'atoms';
1
2
  import { MenuItemsProps } from '../MenuItems/MenuItems';
2
3
  export declare type MenuNavigationProps<T> = {
3
4
  menuConfig: MenuItemsProps<T>;
5
+ customIconType?: IconNames;
4
6
  };
5
- export declare const MenuNavigation: <T extends string | number>({ menuConfig, }: MenuNavigationProps<T>) => JSX.Element;
7
+ export declare const MenuNavigation: <T extends string | number>({ menuConfig, customIconType, }: MenuNavigationProps<T>) => JSX.Element;
6
8
  export declare const CaretIconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
7
9
  isOpen: boolean;
8
10
  }, never>;
@@ -3,7 +3,7 @@ import { MenuNavigation as MenuNavigationComponent } from 'molecules/MenuNavigat
3
3
  import 'rc-dropdown/assets/index.css';
4
4
  declare const _default: {
5
5
  title: string;
6
- component: <T extends string | number>({ menuConfig, }: import("molecules/MenuNavigation/MenuNavigation").MenuNavigationProps<T>) => JSX.Element;
6
+ component: <T extends string | number>({ menuConfig, customIconType, }: import("molecules/MenuNavigation/MenuNavigation").MenuNavigationProps<T>) => JSX.Element;
7
7
  };
8
8
  export default _default;
9
9
  export declare const MenuNavigation: ComponentStory<typeof MenuNavigationComponent>;
@@ -1,6 +1,6 @@
1
1
  import { TabProps, TabTheme } from 'atoms';
2
2
  import { FontSizesTypes, SizesTypes, ThemeColors } from 'theme/types';
3
- import { StylesType } from 'typescript';
3
+ import type { StylesType } from 'typescript';
4
4
  export declare type TabType<T = string, K = string> = Pick<TabProps<T, K>, 'text' | 'tabKey' | 'disabled' | 'options' | 'divider'>;
5
5
  export declare type AdditionalTabContainerProps = {
6
6
  containerStyle?: StylesType;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { TabTheme } from 'atoms/Tab/Tab';
3
3
  import { SizesTypes, ThemeColors } from 'theme/types';
4
- import { OverrideStyles, StyledTransientProps } from 'typescript';
4
+ import type { OverrideStyles, StyledTransientProps } from 'typescript';
5
5
  export declare const TabsWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledTransientProps<{
6
6
  spacing: SizesTypes;
7
7
  vertical: boolean;