@zealicsolutions/web-ui 0.3.192 → 0.3.194
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +20 -20
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/atoms/Checkbox/Checkbox.d.ts +9 -9
- package/dist/cjs/src/atoms/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/cjs/src/atoms/RichTextViewer/RichTextViewer.d.ts +1 -1
- package/dist/cjs/src/containers/Container.d.ts +3 -2
- package/dist/cjs/src/containers/MoleculeItem.d.ts +1 -1
- package/dist/cjs/src/containers/mock-data.d.ts +1500 -256
- package/dist/cjs/src/containers/types/moleculeTypes.d.ts +34 -6
- package/dist/cjs/src/containers/types/types.d.ts +3 -2
- package/dist/cjs/src/contexts/OrganismContext/OrganismContext.d.ts +2 -4
- package/dist/cjs/src/contexts/OrganismContext/OrganismContextProvider.d.ts +4 -1
- package/dist/cjs/src/molecules/CheckboxField/CheckboxGroup.stories.d.ts +32 -0
- package/dist/cjs/src/molecules/Checklist/Checklist.d.ts +23 -0
- package/dist/cjs/src/molecules/Checklist/Checklist.stories.d.ts +8 -0
- package/dist/cjs/src/molecules/Image/Image.d.ts +2 -1
- package/dist/cjs/src/molecules/Image/Image.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/Stepper/Stepper.d.ts +2 -1
- package/dist/cjs/src/molecules/Stepper/Stepper.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/Video/Video.d.ts +2 -1
- package/dist/cjs/src/molecules/Video/Video.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/index.d.ts +1 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/atoms/Checkbox/Checkbox.d.ts +9 -9
- package/dist/esm/src/atoms/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/esm/src/atoms/RichTextViewer/RichTextViewer.d.ts +1 -1
- package/dist/esm/src/containers/Container.d.ts +3 -2
- package/dist/esm/src/containers/MoleculeItem.d.ts +1 -1
- package/dist/esm/src/containers/mock-data.d.ts +1500 -256
- package/dist/esm/src/containers/types/moleculeTypes.d.ts +34 -6
- package/dist/esm/src/containers/types/types.d.ts +3 -2
- package/dist/esm/src/contexts/OrganismContext/OrganismContext.d.ts +2 -4
- package/dist/esm/src/contexts/OrganismContext/OrganismContextProvider.d.ts +4 -1
- package/dist/esm/src/molecules/CheckboxField/CheckboxGroup.stories.d.ts +32 -0
- package/dist/esm/src/molecules/Checklist/Checklist.d.ts +23 -0
- package/dist/esm/src/molecules/Checklist/Checklist.stories.d.ts +8 -0
- package/dist/esm/src/molecules/Image/Image.d.ts +2 -1
- package/dist/esm/src/molecules/Image/Image.stories.d.ts +1 -1
- package/dist/esm/src/molecules/Stepper/Stepper.d.ts +2 -1
- package/dist/esm/src/molecules/Stepper/Stepper.stories.d.ts +1 -1
- package/dist/esm/src/molecules/Video/Video.d.ts +2 -1
- package/dist/esm/src/molecules/Video/Video.stories.d.ts +1 -1
- package/dist/esm/src/molecules/index.d.ts +1 -0
- package/dist/index.d.ts +81 -28
- package/package.json +2 -2
@@ -1,10 +1,12 @@
|
|
1
1
|
import { LinkVariant, SelectOption } from 'atoms';
|
2
|
-
import { AdditionalTabContainerProps, AvatarDropdownMenuConfigType, AvatarDropdownProps, ButtonProps, CheckboxFieldProps, ConsentType, ImageProps, InputFieldProps, LinkProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
|
2
|
+
import { AdditionalTabContainerProps, AvatarDropdownMenuConfigType, AvatarDropdownProps, ButtonProps, CheckboxFieldProps, ChecklistItem, ConsentType, ImageProps, InputFieldProps, LinkProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
|
3
3
|
import { Dispatch, SetStateAction } from 'react';
|
4
4
|
import { UseFormReturn } from 'react-hook-form';
|
5
5
|
import type { AnyObject, Nullable, StrictUnion, StylesType } from 'typescript';
|
6
|
+
import { SizesTypes } from 'theme';
|
6
7
|
import { ConditionConfig, ContainerComponentProps, MetadataType } from './types';
|
7
8
|
import { MaskConfig } from '../../atoms/Input/helpers';
|
9
|
+
import { CheckboxInternalConfigProps } from '../../atoms/Checkbox/types';
|
8
10
|
export declare type ActionTypes = 'link' | 'popup' | 'drawer' | 'download' | 'submit' | 'reset' | 'destroy';
|
9
11
|
export declare type DataModelFieldFormatCodeTypes = 'date' | 'email' | 'string' | 'integer' | 'boolean' | 'numeric' | 'zip_code' | 'phone_number';
|
10
12
|
export declare type DataModelFieldFormatValueTypes = 'any' | 'text' | 'email' | 'integer' | 'numerical' | 'us_zip_code' | 'phone_number' | 'month_year_date' | 'day_month_year_date' | 'month_day_year_date' | 'year_month_day_date';
|
@@ -126,13 +128,20 @@ export interface ProcessStepsAttributes {
|
|
126
128
|
steps: ProcessStep[];
|
127
129
|
};
|
128
130
|
}
|
129
|
-
export
|
131
|
+
export interface ChecklistAttributes {
|
132
|
+
checklist: {
|
133
|
+
attributeType: 'checklist';
|
134
|
+
items: ChecklistItem[];
|
135
|
+
};
|
136
|
+
}
|
137
|
+
export declare type MoleculeTypes = 'image' | 'text' | 'button' | 'video' | 'header_tab_group' | 'input_field' | 'select_field' | 'radio_button_field' | 'checkbox_field' | 'consent' | 'link' | 'password_setup_field' | 'account_button' | 'process_steps' | 'checklist';
|
130
138
|
export interface BaseMolecule {
|
131
139
|
id: string;
|
132
|
-
moleculeLibraryId: string;
|
133
|
-
instance: 'molecule';
|
134
140
|
type: MoleculeTypes;
|
135
|
-
|
141
|
+
instance: 'molecule';
|
142
|
+
metadata: MetadataType;
|
143
|
+
moleculeLibraryId: string;
|
144
|
+
organismLibraryMoleculeId: string;
|
136
145
|
}
|
137
146
|
export interface ImageMolecule extends BaseMolecule {
|
138
147
|
type: 'image';
|
@@ -185,6 +194,16 @@ export interface VideoMolecule extends BaseMolecule {
|
|
185
194
|
}
|
186
195
|
export interface TabGroupMolecule extends BaseMolecule {
|
187
196
|
type: 'header_tab_group';
|
197
|
+
attributes: Partial<{
|
198
|
+
tabs: {
|
199
|
+
tabKey: string;
|
200
|
+
text: string;
|
201
|
+
disabled: boolean;
|
202
|
+
divider: boolean;
|
203
|
+
}[];
|
204
|
+
activeTabKey: string;
|
205
|
+
attributeType: 'tab_group';
|
206
|
+
}>;
|
188
207
|
config: {
|
189
208
|
props: TabGroupProps;
|
190
209
|
wide: AdditionalTabContainerProps;
|
@@ -300,7 +319,16 @@ export interface ProcessStepsMoleculeType extends BaseMolecule {
|
|
300
319
|
organismMoleculeLibraryId: string;
|
301
320
|
attributes: ProcessStepsAttributes;
|
302
321
|
}
|
303
|
-
export
|
322
|
+
export interface ChecklistsMolecule extends BaseMolecule {
|
323
|
+
type: 'checklist';
|
324
|
+
config: {
|
325
|
+
props: {
|
326
|
+
gap: SizesTypes;
|
327
|
+
} & CheckboxInternalConfigProps;
|
328
|
+
};
|
329
|
+
attributes: ChecklistAttributes;
|
330
|
+
}
|
331
|
+
export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule | ConsentFieldMolecule | LinkMolecule | PasswordSetupMolecule | AccountButtonMolecule | ProcessStepsMoleculeType | ChecklistsMolecule> & Partial<{
|
304
332
|
form: UseFormReturn<any>;
|
305
333
|
formData: AnyObject;
|
306
334
|
setFormData: Dispatch<SetStateAction<AnyObject>>;
|
@@ -75,13 +75,14 @@ export declare type AdditionalContainerProps = Partial<{
|
|
75
75
|
containerStyle: CSSProperties;
|
76
76
|
containerProps: ContainerPropsType;
|
77
77
|
}>;
|
78
|
-
export declare type ContainerProps = PropsWithChildren<
|
78
|
+
export declare type ContainerProps = PropsWithChildren<{
|
79
79
|
type: ContainerType;
|
80
|
+
metadata: MetadataType;
|
81
|
+
} & Partial<{
|
80
82
|
containerTemplateType: ContainerTemplateType;
|
81
83
|
wide: AdditionalContainerProps;
|
82
84
|
compact: AdditionalContainerProps;
|
83
85
|
props: ContainerPropsType;
|
84
|
-
metadata: MetadataType;
|
85
86
|
isMobile: boolean;
|
86
87
|
}>>;
|
87
88
|
export declare type ContainerComponentProps = {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ContainerComponentProps, Molecule } from 'containers';
|
1
|
+
import { ContainerComponentProps, MetadataType, Molecule } from 'containers';
|
2
2
|
import { InputFieldTypes } from 'fieldsConfiguration';
|
3
3
|
import { PasswordRuleValidation } from 'molecules/PasswordSetup/PasswordSetup';
|
4
4
|
import { Dispatch, SetStateAction } from 'react';
|
@@ -25,9 +25,7 @@ export declare type OrganismContextType = {
|
|
25
25
|
editable?: boolean;
|
26
26
|
isFormInEditMode?: boolean;
|
27
27
|
isConfigurationMode?: boolean;
|
28
|
-
organismMetadata?:
|
29
|
-
stateListenerId?: string;
|
30
|
-
} & AnyObject;
|
28
|
+
organismMetadata?: MetadataType;
|
31
29
|
onConfigurationItemClicked: (itemInfo?: Omit<ConfigurationItem, 'organismId'>) => void;
|
32
30
|
selectedConfigurationItemId?: string;
|
33
31
|
};
|
@@ -1,11 +1,14 @@
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
2
|
-
import { ContainerComponentProps, Molecule } from 'containers';
|
2
|
+
import { ContainerComponentProps, ContainerType, MetadataType, Molecule, MoleculeTypes } from 'containers';
|
3
3
|
import type { AnyObject } from 'typescript';
|
4
4
|
import { PasswordRuleValidation } from 'molecules/PasswordSetup/PasswordSetup';
|
5
5
|
export declare type ConfigurationItem = {
|
6
6
|
entity: 'container' | 'molecule';
|
7
7
|
entityId: string;
|
8
8
|
organismId: string;
|
9
|
+
entityType: MoleculeTypes | ContainerType;
|
10
|
+
entityMetadata: MetadataType;
|
11
|
+
organismLibraryMoleculeId?: string;
|
9
12
|
};
|
10
13
|
export declare type OrganismContextProviderProps = PropsWithChildren<{
|
11
14
|
organismId: string;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import type { StoryFn } from '@storybook/react';
|
2
|
+
import { CheckboxGroup as CheckboxGroupComponent } from 'molecules';
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: ({ ref, onBlur, onChange, checkboxesProps }: Partial<{
|
6
|
+
ref: import("react-hook-form").RefCallBack;
|
7
|
+
onBlur: import("../../typescript").Callback;
|
8
|
+
onChange: (checkedIds: string[]) => void;
|
9
|
+
checkboxesProps: Partial<{
|
10
|
+
checkboxGroupWrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
11
|
+
checkboxFieldWrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
12
|
+
onChange: (id: string) => void;
|
13
|
+
disabled: boolean;
|
14
|
+
options?: import("../..").SelectOption[] | undefined;
|
15
|
+
selectedIds?: string[] | undefined;
|
16
|
+
isError?: boolean | undefined;
|
17
|
+
isEditMode?: boolean | undefined;
|
18
|
+
isRichText: boolean;
|
19
|
+
internalConfig: Partial<{
|
20
|
+
selectedCheckboxBackgroundColor: string;
|
21
|
+
selectedCheckboxIconColor: string;
|
22
|
+
buttonPadding: number;
|
23
|
+
textPadding: number;
|
24
|
+
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
25
|
+
wrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
26
|
+
buttonOptionSpacing?: import("theme").SizesTypes | undefined;
|
27
|
+
}>;
|
28
|
+
}>;
|
29
|
+
}>) => JSX.Element;
|
30
|
+
};
|
31
|
+
export default _default;
|
32
|
+
export declare const CheckboxGroup: StoryFn<typeof CheckboxGroupComponent>;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { SizesTypes } from 'theme';
|
2
|
+
import { CheckboxInternalConfigProps } from 'atoms/Checkbox/types';
|
3
|
+
import type { Nullable } from 'typescript';
|
4
|
+
export declare type ChecklistItem = {
|
5
|
+
id: string;
|
6
|
+
isChecked: boolean;
|
7
|
+
eventId: Nullable<string>;
|
8
|
+
type: 'user_interactive' | 'system_controlled';
|
9
|
+
label: {
|
10
|
+
text: string;
|
11
|
+
isRichText: boolean;
|
12
|
+
};
|
13
|
+
};
|
14
|
+
export declare type ChecklistProps = {
|
15
|
+
items: ChecklistItem[];
|
16
|
+
props: {
|
17
|
+
gap: SizesTypes;
|
18
|
+
} & CheckboxInternalConfigProps;
|
19
|
+
};
|
20
|
+
export declare const Checklist: ({ items, props: { gap, ...checkboxProps } }: ChecklistProps) => JSX.Element;
|
21
|
+
export declare const ChecklistWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
22
|
+
$gap: SizesTypes;
|
23
|
+
}, never>;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { StoryFn } from '@storybook/react';
|
2
|
+
import { Checklist as ChecklistComponent } from 'molecules';
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: ({ items, props: { gap, ...checkboxProps } }: import("molecules").ChecklistProps) => JSX.Element;
|
6
|
+
};
|
7
|
+
export default _default;
|
8
|
+
export declare const Checklist: StoryFn<typeof ChecklistComponent>;
|
@@ -15,5 +15,6 @@ export declare type ImageProps = {
|
|
15
15
|
styles: StylesType;
|
16
16
|
metadata: MetadataType;
|
17
17
|
htmlElementId: string;
|
18
|
+
isOnClickDisabled: boolean;
|
18
19
|
}>;
|
19
|
-
export declare const Image: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, htmlElementId, metadata, }: ImageProps) => JSX.Element | null;
|
20
|
+
export declare const Image: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, htmlElementId, metadata, isOnClickDisabled, }: ImageProps) => JSX.Element | null;
|
@@ -2,7 +2,7 @@ import type { StoryFn } from '@storybook/react';
|
|
2
2
|
import { Image as ImageComponent } from './Image';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, htmlElementId, metadata, }: import("./Image").ImageProps) => JSX.Element | null;
|
5
|
+
component: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, htmlElementId, metadata, isOnClickDisabled, }: import("./Image").ImageProps) => JSX.Element | null;
|
6
6
|
};
|
7
7
|
export default _default;
|
8
8
|
export declare const Image: StoryFn<typeof ImageComponent>;
|
@@ -6,5 +6,6 @@ export declare type StepperProps = {
|
|
6
6
|
htmlElementId?: string;
|
7
7
|
metadata: MetadataType;
|
8
8
|
isMobile?: boolean;
|
9
|
+
isOnClickDisabled?: boolean;
|
9
10
|
};
|
10
|
-
export declare const Stepper: ({ steps, orientation, htmlElementId, metadata, isMobile, }: StepperProps) => JSX.Element | null;
|
11
|
+
export declare const Stepper: ({ steps, orientation, htmlElementId, metadata, isMobile, isOnClickDisabled, }: StepperProps) => JSX.Element | null;
|
@@ -2,7 +2,7 @@ import { StoryFn } from '@storybook/react';
|
|
2
2
|
import { StepperProps } from './Stepper';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: ({ steps, orientation, htmlElementId, metadata, isMobile, }: StepperProps) => JSX.Element | null;
|
5
|
+
component: ({ steps, orientation, htmlElementId, metadata, isMobile, isOnClickDisabled, }: StepperProps) => JSX.Element | null;
|
6
6
|
};
|
7
7
|
export default _default;
|
8
8
|
export declare const Stepper: StoryFn<StepperProps>;
|
@@ -15,5 +15,6 @@ export declare type VideoProps = {
|
|
15
15
|
htmlElementId: string;
|
16
16
|
moleculeId: string;
|
17
17
|
isTrigger: boolean;
|
18
|
+
isOnClickDisabled: boolean;
|
18
19
|
}>;
|
19
|
-
export declare const Video: ({ style, src, width, height, template, autoplay, enableCoverImage, coverImageSrc, styles, htmlElementId, isTrigger, moleculeId, }: VideoProps) => JSX.Element | null;
|
20
|
+
export declare const Video: ({ style, src, width, height, template, autoplay, enableCoverImage, coverImageSrc, styles, htmlElementId, isTrigger, moleculeId, isOnClickDisabled, }: VideoProps) => JSX.Element | null;
|
@@ -2,7 +2,7 @@ import type { StoryFn } from '@storybook/react';
|
|
2
2
|
import { Video as VideoComponent } from './Video';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: ({ style, src, width, height, template, autoplay, enableCoverImage, coverImageSrc, styles, htmlElementId, isTrigger, moleculeId, }: import("./Video").VideoProps) => JSX.Element | null;
|
5
|
+
component: ({ style, src, width, height, template, autoplay, enableCoverImage, coverImageSrc, styles, htmlElementId, isTrigger, moleculeId, isOnClickDisabled, }: import("./Video").VideoProps) => JSX.Element | null;
|
6
6
|
};
|
7
7
|
export default _default;
|
8
8
|
export declare const Video: StoryFn<typeof VideoComponent>;
|