dso-toolkit 38.1.0 → 40.0.0
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/components/Componenten/form/form.config.yml +72 -0
- package/components/Componenten/rich-content/rich-content.njk +1 -0
- package/components/Voorbeelden/20-Toepassingen/50-Stelselcatalogus/Begrippen.njk +3 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-badge.cjs.entry.js +1 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-header.cjs.entry.js +3 -2
- package/dist/library/@dso-toolkit/core/cjs/dso-info_2.cjs.entry.js +2 -2
- package/dist/library/@dso-toolkit/core/cjs/dso-map-base-layers.cjs.entry.js +3 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-map-controls.cjs.entry.js +1 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-map-overlays.cjs.entry.js +3 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-responsive-element.cjs.entry.js +44 -0
- package/dist/library/@dso-toolkit/core/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/library/@dso-toolkit/core/cjs/loader.cjs.js +1 -1
- package/dist/library/@dso-toolkit/core/collection/collection-manifest.json +1 -0
- package/dist/library/@dso-toolkit/core/collection/components/badge/badge.css +1 -1
- package/dist/library/@dso-toolkit/core/collection/components/header/header.js +21 -2
- package/dist/library/@dso-toolkit/core/collection/components/image-overlay/image-overlay.template.js +1 -1
- package/dist/library/@dso-toolkit/core/collection/components/map-base-layers/map-base-layers.js +21 -1
- package/dist/library/@dso-toolkit/core/collection/components/map-controls/map-controls.css +1 -1
- package/dist/library/@dso-toolkit/core/collection/components/map-overlays/map-overlays.js +21 -1
- package/dist/library/@dso-toolkit/core/collection/components/responsive-element/responsive-element.css +3 -0
- package/dist/library/@dso-toolkit/core/collection/components/responsive-element/responsive-element.js +46 -0
- package/dist/library/@dso-toolkit/core/collection/components/responsive-element/responsive-element.stories.js +57 -0
- package/dist/library/@dso-toolkit/core/collection/components/responsive-element/responsive-element.template.js +8 -0
- package/dist/library/@dso-toolkit/core/collection/components/selectable/selectable.js +5 -4
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/example-pages/viewer-grid-document-header.example-template.js +22 -0
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/example-pages/viewer-grid-document-list.example-template.js +12 -0
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/example-pages/viewer-grid-filterblok.example-template.js +60 -0
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/example-pages/viewer-grid-tiles.example-template.js +17 -0
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/templates/viewer-grid.template.js +20 -0
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid.js +1 -1
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid.stories.js +21 -285
- package/dist/library/@dso-toolkit/core/custom-elements/index.d.ts +6 -0
- package/dist/library/@dso-toolkit/core/custom-elements/index.js +56 -13
- package/dist/library/@dso-toolkit/core/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-02272301.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-09b53589.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-202bd676.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-336bf5b9.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-3ad06d9d.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/{p-6ec616ee.entry.js → p-60679db4.entry.js} +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/{p-1894c7ae.entry.js → p-7796687c.entry.js} +1 -1
- package/dist/library/@dso-toolkit/core/esm/dso-badge.entry.js +1 -1
- package/dist/library/@dso-toolkit/core/esm/dso-header.entry.js +3 -2
- package/dist/library/@dso-toolkit/core/esm/dso-info_2.entry.js +2 -2
- package/dist/library/@dso-toolkit/core/esm/dso-map-base-layers.entry.js +3 -1
- package/dist/library/@dso-toolkit/core/esm/dso-map-controls.entry.js +1 -1
- package/dist/library/@dso-toolkit/core/esm/dso-map-overlays.entry.js +3 -1
- package/dist/library/@dso-toolkit/core/esm/dso-responsive-element.entry.js +40 -0
- package/dist/library/@dso-toolkit/core/esm/dso-toolkit.js +1 -1
- package/dist/library/@dso-toolkit/core/esm/loader.js +1 -1
- package/dist/library/@dso-toolkit/core/types/components/header/header.d.ts +7 -0
- package/dist/library/@dso-toolkit/core/types/components/map-base-layers/map-base-layers.d.ts +1 -0
- package/dist/library/@dso-toolkit/core/types/components/map-overlays/map-overlays.d.ts +1 -0
- package/dist/library/@dso-toolkit/core/types/components/responsive-element/responsive-element.d.ts +10 -0
- package/dist/library/@dso-toolkit/core/types/components/responsive-element/responsive-element.stories.d.ts +1 -0
- package/dist/library/@dso-toolkit/core/types/components/responsive-element/responsive-element.template.d.ts +3 -0
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/example-pages/viewer-grid-document-header.example-template.d.ts +2 -0
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/example-pages/viewer-grid-document-list.example-template.d.ts +2 -0
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/example-pages/viewer-grid-filterblok.example-template.d.ts +1 -0
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/example-pages/viewer-grid-tiles.example-template.d.ts +2 -0
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/templates/viewer-grid.template.d.ts +3 -0
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/viewer-grid.d.ts +1 -2
- package/dist/library/@dso-toolkit/core/types/components.d.ts +23 -2
- package/dist/library/components/detail/begrippen.html +9 -4
- package/dist/library/components/detail/form--autocomplete.html +1 -1
- package/dist/library/components/detail/form--form-horizontal.html +1 -1
- package/dist/library/components/detail/form--form-vertical.html +1 -1
- package/dist/library/components/detail/form--header-in-legend.html +1812 -0
- package/dist/library/components/detail/form--multi-page.html +1 -1
- package/dist/library/components/detail/form--sections.html +1 -1
- package/dist/library/components/detail/form--simple-form.html +1 -1
- package/dist/library/components/detail/form--single-page.html +1 -1
- package/dist/library/components/detail/form.html +297 -1
- package/dist/library/components/detail/rich-content.html +2 -0
- package/dist/library/components/preview/begrippen.html +3 -1
- package/dist/library/components/preview/form--header-in-legend.html +567 -0
- package/dist/library/components/preview/form.html +278 -0
- package/dist/library/components/preview/rich-content.html +2 -0
- package/dist/library/components/render/begrippen.html +3 -1
- package/dist/library/components/render/form--header-in-legend.html +551 -0
- package/dist/library/components/render/form.html +557 -0
- package/dist/library/components/render/rich-content.html +1 -0
- package/dist/library/styles/dso.css +593 -291
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-02272301.entry.js +1 -0
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-09b53589.entry.js +1 -0
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-202bd676.entry.js +1 -0
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-336bf5b9.entry.js +1 -0
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-3ad06d9d.entry.js +1 -0
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/{p-6ec616ee.entry.js → p-60679db4.entry.js} +1 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/{p-1894c7ae.entry.js → p-7796687c.entry.js} +1 -1
- package/dist/toolkit/styles/dso.css +593 -291
- package/hydrate/index.js +63 -9
- package/libs/@dso-toolkit/css/src/components/document-header/document-header.scss +122 -0
- package/libs/@dso-toolkit/css/src/components/document-list/document-list.scss +63 -0
- package/libs/@dso-toolkit/css/src/components/form/fieldset.scss +1 -0
- package/libs/@dso-toolkit/css/src/components/form/form-groups/confirm/form-group-confirm.scss +22 -0
- package/libs/@dso-toolkit/css/src/components/form/form-groups/files/form-group-files.scss +142 -0
- package/libs/@dso-toolkit/css/src/components/form/form-groups/input-number/form-group-input-number.scss +21 -0
- package/libs/@dso-toolkit/css/src/components/form/form-groups/radios/form-group-radios.scss +33 -0
- package/libs/@dso-toolkit/css/src/components/form/form-groups/select/form-group-select.scss +38 -0
- package/libs/@dso-toolkit/css/src/components/form/form-groups/static/form-group-static.scss +30 -0
- package/libs/@dso-toolkit/css/src/components/form/form-groups/textarea/form-group-textarea.scss +32 -0
- package/libs/@dso-toolkit/css/src/components/form/form.scss +7 -0
- package/libs/@dso-toolkit/css/src/components/tile-grid/tile-grid.scss +14 -0
- package/libs/@dso-toolkit/css/src/dso.scss +2 -0
- package/libs/@dso-toolkit/sources/package.json +5 -5
- package/libs/@dso-toolkit/sources/src/components/accordion/accordion.args.ts +8 -0
- package/libs/@dso-toolkit/sources/src/components/accordion/accordion.models.ts +1 -1
- package/libs/@dso-toolkit/sources/src/components/accordion/accordion.stories.ts +5 -18
- package/libs/@dso-toolkit/sources/src/components/badge/badge.scss +1 -1
- package/libs/@dso-toolkit/sources/src/components/conclusion/conclusion.scss +1 -0
- package/libs/@dso-toolkit/sources/src/components/document-header/document-header.args.ts +31 -0
- package/libs/@dso-toolkit/sources/src/components/document-header/document-header.models.ts +13 -0
- package/libs/@dso-toolkit/sources/src/components/document-header/document-header.stories.ts +48 -0
- package/libs/@dso-toolkit/sources/src/components/document-list/document-list.args.ts +8 -0
- package/libs/@dso-toolkit/sources/src/components/document-list/document-list.content.ts +30 -0
- package/libs/@dso-toolkit/sources/src/components/document-list/document-list.models.ts +17 -0
- package/libs/@dso-toolkit/sources/src/components/document-list/document-list.stories.ts +36 -0
- package/libs/@dso-toolkit/sources/src/components/form/content/confirm.content.ts +10 -0
- package/libs/@dso-toolkit/sources/src/components/form/content/files.content.ts +28 -0
- package/libs/@dso-toolkit/sources/src/components/form/content/input-number.content.ts +11 -0
- package/libs/@dso-toolkit/sources/src/components/form/content/radios.content.ts +13 -0
- package/libs/@dso-toolkit/sources/src/components/form/content/select.content.ts +66 -0
- package/libs/@dso-toolkit/sources/src/components/form/content/static.content.ts +12 -0
- package/libs/@dso-toolkit/sources/src/components/form/content/textarea.content.ts +14 -0
- package/libs/@dso-toolkit/sources/src/components/form/form-groups/confirm/form-group-confirm.args.ts +80 -0
- package/libs/@dso-toolkit/sources/src/components/form/form-groups/files/form-group-files.args.ts +76 -0
- package/libs/@dso-toolkit/sources/src/components/form/form-groups/input-number/form-group-input-number.args.ts +73 -0
- package/libs/@dso-toolkit/sources/src/components/form/form-groups/radios/form-group-radios.args.ts +138 -0
- package/libs/@dso-toolkit/sources/src/components/form/form-groups/select/form-group-select.args.ts +130 -0
- package/libs/@dso-toolkit/sources/src/components/form/form-groups/static/form-group-static.args.ts +93 -0
- package/libs/@dso-toolkit/sources/src/components/form/form-groups/textarea/form-group-textarea.args.ts +155 -0
- package/libs/@dso-toolkit/sources/src/components/form/form.args.ts +8 -0
- package/libs/@dso-toolkit/sources/src/components/form/form.models.ts +7 -0
- package/libs/@dso-toolkit/sources/src/components/form/form.stories.ts +120 -8
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group-confirm.model.ts +8 -0
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group-files.model.ts +15 -0
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group-input-number.model.ts +13 -0
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group-radios.model.ts +8 -0
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group-select.model.ts +23 -0
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group-static.model.ts +7 -0
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group-textarea.model.ts +11 -0
- package/libs/@dso-toolkit/sources/src/components/form/models/form-group.model.ts +7 -1
- package/libs/@dso-toolkit/sources/src/components/form/models/form.model.ts +1 -0
- package/libs/@dso-toolkit/sources/src/components/responsive-element/responsive-element.args.ts +8 -0
- package/libs/@dso-toolkit/sources/src/components/responsive-element/responsive-element.models.ts +3 -0
- package/libs/@dso-toolkit/sources/src/components/responsive-element/responsive-element.stories.ts +37 -0
- package/libs/@dso-toolkit/sources/src/components/tile/tile.scss +6 -1
- package/libs/@dso-toolkit/sources/src/components/viewer-grid/viewer-grid.args.ts +27 -50
- package/libs/@dso-toolkit/sources/src/components/viewer-grid/viewer-grid.models.ts +23 -47
- package/libs/@dso-toolkit/sources/src/components/viewer-grid/viewer-grid.stories.ts +69 -34
- package/libs/@dso-toolkit/sources/src/index.ts +6 -0
- package/libs/@dso-toolkit/sources/src/styling/global/body.scss +1 -0
- package/libs/@dso-toolkit/sources/src/styling/global/dl.scss +4 -5
- package/package.json +2 -2
- package/reference/render/begrippen.html +5 -3
- package/reference/render/form--header-in-legend.html +156 -0
- package/reference/render/rich-content.html +1 -0
- package/src/styles/components/_form.scss +0 -131
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid-document-header.template.js +0 -39
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid-document-list-item.template.js +0 -19
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid-filterblok.template.js +0 -28
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid.template.js +0 -31
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-746d70f9.entry.js +0 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-8bb8148f.entry.js +0 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-c32860a3.entry.js +0 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-d76c1151.entry.js +0 -1
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/viewer-grid-document-header.template.d.ts +0 -3
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/viewer-grid-document-list-item.template.d.ts +0 -3
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/viewer-grid-filterblok.template.d.ts +0 -3
- package/dist/library/@dso-toolkit/core/types/components/viewer-grid/viewer-grid.template.d.ts +0 -3
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-746d70f9.entry.js +0 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-8bb8148f.entry.js +0 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-c32860a3.entry.js +0 -1
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-d76c1151.entry.js +0 -1
- package/src/styles/components/form/_files.scss +0 -133
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FormGroupRadiosArgs } from '../form-groups/radios/form-group-radios.args';
|
|
2
|
+
|
|
3
|
+
export const radiosContent: Omit<FormGroupRadiosArgs, 'infoButtonHandler' | 'infoCloseHandler'> = {
|
|
4
|
+
id: 'mijn-id',
|
|
5
|
+
label: 'Radios',
|
|
6
|
+
required: false,
|
|
7
|
+
disabled: false,
|
|
8
|
+
infoButtonLabel: 'Toelichting bij veld',
|
|
9
|
+
infoActive: false,
|
|
10
|
+
infoText: '<div class="dso-rich-content"><p>Rich text</p></div>',
|
|
11
|
+
infoFixed: false,
|
|
12
|
+
errorText: 'Maak een keuze'
|
|
13
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { FormGroupSelectArgs } from '../form-groups/select/form-group-select.args';
|
|
2
|
+
import { SelectOption, SelectOptionGroup } from '../form.models';
|
|
3
|
+
|
|
4
|
+
export const selectContent: Omit<FormGroupSelectArgs, 'infoButtonHandler' | 'infoCloseHandler'> = {
|
|
5
|
+
metOptGroup: false,
|
|
6
|
+
id: 'mijn-id',
|
|
7
|
+
label: 'Vul "een waarde" in',
|
|
8
|
+
required: false,
|
|
9
|
+
disabled: false,
|
|
10
|
+
multiple: false,
|
|
11
|
+
infoButtonLabel: 'Toelichting bij veld',
|
|
12
|
+
infoActive: false,
|
|
13
|
+
infoText: '<div class="dso-rich-content"><p>Rich text</p></div>',
|
|
14
|
+
infoFixed: false
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const selectOptionsContent: SelectOption[] = [
|
|
18
|
+
{
|
|
19
|
+
value: 'be',
|
|
20
|
+
label: 'België'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
value: 'nl',
|
|
24
|
+
selected: true,
|
|
25
|
+
label: 'Nederland'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: 'lux',
|
|
29
|
+
label: 'Luxemburg'
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export const selectOptionGroupContent: SelectOptionGroup[] = [
|
|
34
|
+
{
|
|
35
|
+
label: 'Vlees',
|
|
36
|
+
options: [
|
|
37
|
+
{
|
|
38
|
+
value: 'worst',
|
|
39
|
+
label: 'Worst'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
value: 'salami',
|
|
43
|
+
selected: true,
|
|
44
|
+
label: 'Salami'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: 'geit',
|
|
48
|
+
label: 'Geit'
|
|
49
|
+
},
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: 'Vis',
|
|
54
|
+
disabled: true,
|
|
55
|
+
options: [
|
|
56
|
+
{
|
|
57
|
+
value: 'zalm',
|
|
58
|
+
label: 'Zalm'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
value: 'makreel',
|
|
62
|
+
label: 'Makreel'
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FormGroupStaticArgs } from '../form-groups/static/form-group-static.args';
|
|
2
|
+
|
|
3
|
+
export const staticContent: Omit<FormGroupStaticArgs, 'infoButtonHandler' | 'infoCloseHandler'> = {
|
|
4
|
+
id: 'mijn-id',
|
|
5
|
+
label: 'Kleur van object',
|
|
6
|
+
value: 'rood',
|
|
7
|
+
edit: false,
|
|
8
|
+
infoButtonLabel: 'Toelichting bij veld',
|
|
9
|
+
infoActive: false,
|
|
10
|
+
infoText: '<div class="dso-rich-content"><p>Rich text</p></div>',
|
|
11
|
+
infoFixed: false
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormGroupTextareaArgs } from '../form-groups/textarea/form-group-textarea.args';
|
|
2
|
+
|
|
3
|
+
export const textareaContent: Omit<FormGroupTextareaArgs, 'infoButtonHandler' | 'infoCloseHandler'> = {
|
|
4
|
+
id: 'mijn-id',
|
|
5
|
+
label: 'Vul "een waarde" in',
|
|
6
|
+
value: 'een waarde',
|
|
7
|
+
required: false,
|
|
8
|
+
disabled: false,
|
|
9
|
+
readonly: false,
|
|
10
|
+
infoButtonLabel: 'Toelichting bij veld',
|
|
11
|
+
infoActive: false,
|
|
12
|
+
infoText: '<div class="dso-rich-content"><p>Rich text</p></div>',
|
|
13
|
+
infoFixed: false
|
|
14
|
+
};
|
package/libs/@dso-toolkit/sources/src/components/form/form-groups/confirm/form-group-confirm.args.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { HandlerFunction } from '@storybook/addon-actions';
|
|
2
|
+
import { ArgTypes, noControl } from '../../../../stories-helpers';
|
|
3
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
4
|
+
|
|
5
|
+
import { FormGroupConfirm } from '../../form.models';
|
|
6
|
+
|
|
7
|
+
import { Selectable } from '../../../selectable/selectable.models';
|
|
8
|
+
|
|
9
|
+
export interface FormGroupConfirmArgs {
|
|
10
|
+
id: string;
|
|
11
|
+
state?: 'invalid' | 'valid';
|
|
12
|
+
required: boolean;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
errorText?: string;
|
|
15
|
+
helpText?: string;
|
|
16
|
+
selectableLabel: string;
|
|
17
|
+
selectableValue: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const formGroupConfirmArgTypes: ArgTypes<FormGroupConfirmArgs> = {
|
|
21
|
+
id: {
|
|
22
|
+
control: {
|
|
23
|
+
type: 'text'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
state: {
|
|
27
|
+
options: [undefined, 'invalid', 'valid'],
|
|
28
|
+
control: {
|
|
29
|
+
type: 'select'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
required: {
|
|
33
|
+
control: {
|
|
34
|
+
type: 'boolean'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
disabled: {
|
|
38
|
+
control: {
|
|
39
|
+
type: 'boolean'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
errorText: {
|
|
43
|
+
control: {
|
|
44
|
+
type: 'text'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
helpText: {
|
|
48
|
+
control: {
|
|
49
|
+
type: 'text'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
selectableLabel: {
|
|
53
|
+
control: {
|
|
54
|
+
type: 'text'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
selectableValue: {
|
|
58
|
+
control: {
|
|
59
|
+
type: 'text'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export function formGroupConfirmArgsMapper(a: FormGroupConfirmArgs): FormGroupConfirm<any> {
|
|
65
|
+
return {
|
|
66
|
+
group: 'confirm',
|
|
67
|
+
id: a.id,
|
|
68
|
+
required: a.required,
|
|
69
|
+
disabled: a.disabled,
|
|
70
|
+
state: a.state,
|
|
71
|
+
errorText: a.errorText,
|
|
72
|
+
helpText: a.helpText,
|
|
73
|
+
selectable: {
|
|
74
|
+
id: uuidv4(),
|
|
75
|
+
type: 'checkbox',
|
|
76
|
+
value: a.selectableValue,
|
|
77
|
+
label: a.selectableLabel
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
package/libs/@dso-toolkit/sources/src/components/form/form-groups/files/form-group-files.args.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { HandlerFunction } from '@storybook/addon-actions';
|
|
2
|
+
import { ArgTypes, noControl } from '../../../../stories-helpers';
|
|
3
|
+
|
|
4
|
+
import { files } from '../../content/files.content';
|
|
5
|
+
|
|
6
|
+
import { FormGroupFiles } from '../../form.models';
|
|
7
|
+
|
|
8
|
+
export interface FormGroupFilesArgs {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
addFileButtonVariant: 'primary' | 'secondary';
|
|
12
|
+
state?: 'invalid' | 'valid';
|
|
13
|
+
required: boolean;
|
|
14
|
+
disabled: false,
|
|
15
|
+
errorText: string,
|
|
16
|
+
warning: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const formGroupFilesArgTypes: ArgTypes<FormGroupFilesArgs> = {
|
|
20
|
+
id: {
|
|
21
|
+
control: {
|
|
22
|
+
type: 'text'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
label: {
|
|
26
|
+
control: {
|
|
27
|
+
type: 'text'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
addFileButtonVariant: {
|
|
31
|
+
options: ['primary', 'secondary'],
|
|
32
|
+
control: {
|
|
33
|
+
type: 'select'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
state: {
|
|
37
|
+
options: [undefined, 'invalid', 'valid'],
|
|
38
|
+
control: {
|
|
39
|
+
type: 'select'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
required: {
|
|
43
|
+
control: {
|
|
44
|
+
type: 'boolean'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
disabled: {
|
|
48
|
+
control: {
|
|
49
|
+
type: 'boolean'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
errorText: {
|
|
53
|
+
control: {
|
|
54
|
+
type: 'text'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
warning: {
|
|
58
|
+
control: {
|
|
59
|
+
type: 'text'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export function formGroupFilesArgsMapper(a: FormGroupFilesArgs): FormGroupFiles<any> {
|
|
65
|
+
return {
|
|
66
|
+
id: a.id,
|
|
67
|
+
label: a.label,
|
|
68
|
+
group: 'files',
|
|
69
|
+
addFileButtonVariant: a.addFileButtonVariant,
|
|
70
|
+
state: a.state,
|
|
71
|
+
disabled: a.disabled,
|
|
72
|
+
errorText: a.errorText,
|
|
73
|
+
warning: a.warning,
|
|
74
|
+
files
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { HandlerFunction } from '@storybook/addon-actions';
|
|
2
|
+
import { ArgTypes, noControl } from '../../../../stories-helpers';
|
|
3
|
+
|
|
4
|
+
import { FormGroupInputNumber } from '../../form.models';
|
|
5
|
+
|
|
6
|
+
export interface FormGroupInputNumberArgs {
|
|
7
|
+
id: string,
|
|
8
|
+
label: string,
|
|
9
|
+
state?: 'invalid' | 'valid',
|
|
10
|
+
count: number,
|
|
11
|
+
min: number,
|
|
12
|
+
max: number,
|
|
13
|
+
minusButtonInactive: boolean,
|
|
14
|
+
plusButtonInactive: boolean
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const formGroupInputNumberArgTypes: ArgTypes<FormGroupInputNumberArgs> = {
|
|
18
|
+
id: {
|
|
19
|
+
control: {
|
|
20
|
+
type: 'text'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
label: {
|
|
24
|
+
control: {
|
|
25
|
+
type: 'text'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
count: {
|
|
29
|
+
control: {
|
|
30
|
+
type: 'number'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
state: {
|
|
34
|
+
options: [undefined, 'invalid', 'valid'],
|
|
35
|
+
control: {
|
|
36
|
+
type: 'select'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
min: {
|
|
40
|
+
control: {
|
|
41
|
+
type: 'number'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
max: {
|
|
45
|
+
control: {
|
|
46
|
+
type: 'number'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
minusButtonInactive: {
|
|
50
|
+
control: {
|
|
51
|
+
type: 'boolean'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
plusButtonInactive: {
|
|
55
|
+
control: {
|
|
56
|
+
type: 'boolean'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export function formGroupInputNumberArgsMapper(a: FormGroupInputNumberArgs): FormGroupInputNumber<any> {
|
|
62
|
+
return {
|
|
63
|
+
group: 'input-number',
|
|
64
|
+
id: a.id,
|
|
65
|
+
label: a.label,
|
|
66
|
+
count: a.count,
|
|
67
|
+
state: a.state,
|
|
68
|
+
min: a.min,
|
|
69
|
+
max: a.max,
|
|
70
|
+
minusButtonInactive: a.minusButtonInactive,
|
|
71
|
+
plusButtonInactive: a.plusButtonInactive
|
|
72
|
+
};
|
|
73
|
+
}
|
package/libs/@dso-toolkit/sources/src/components/form/form-groups/radios/form-group-radios.args.ts
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { HandlerFunction } from '@storybook/addon-actions';
|
|
2
|
+
import { ArgTypes, noControl } from '../../../../stories-helpers';
|
|
3
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
4
|
+
|
|
5
|
+
import { FormGroupRadios } from '../../form.models';
|
|
6
|
+
|
|
7
|
+
import { Selectable } from '../../../selectable/selectable.models';
|
|
8
|
+
|
|
9
|
+
export interface FormGroupRadiosArgs {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
state?: 'invalid' | 'valid';
|
|
13
|
+
required: boolean;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
errorText?: string;
|
|
16
|
+
helpText?: string;
|
|
17
|
+
infoButtonHandler: HandlerFunction;
|
|
18
|
+
infoButtonLabel: string;
|
|
19
|
+
infoActive: boolean;
|
|
20
|
+
infoText: string;
|
|
21
|
+
infoCloseHandler: HandlerFunction;
|
|
22
|
+
infoFixed: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const formGroupRadiosArgTypes: ArgTypes<FormGroupRadiosArgs> = {
|
|
26
|
+
id: {
|
|
27
|
+
control: {
|
|
28
|
+
type: 'text'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
label: {
|
|
32
|
+
control: {
|
|
33
|
+
type: 'text'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
state: {
|
|
37
|
+
options: [undefined, 'invalid', 'valid'],
|
|
38
|
+
control: {
|
|
39
|
+
type: 'select'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
required: {
|
|
43
|
+
control: {
|
|
44
|
+
type: 'boolean'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
disabled: {
|
|
48
|
+
control: {
|
|
49
|
+
type: 'boolean'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
errorText: {
|
|
53
|
+
control: {
|
|
54
|
+
type: 'text'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
helpText: {
|
|
58
|
+
control: {
|
|
59
|
+
type: 'text'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
infoActive: {
|
|
63
|
+
control: {
|
|
64
|
+
type: 'boolean'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
infoButtonHandler: {
|
|
68
|
+
...noControl,
|
|
69
|
+
action: 'infoButton click'
|
|
70
|
+
},
|
|
71
|
+
infoButtonLabel: {
|
|
72
|
+
control: {
|
|
73
|
+
type: 'text'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
infoText: {
|
|
77
|
+
control: {
|
|
78
|
+
type: 'text'
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
infoCloseHandler: {
|
|
82
|
+
...noControl,
|
|
83
|
+
action: 'info close click'
|
|
84
|
+
},
|
|
85
|
+
infoFixed: {
|
|
86
|
+
control: {
|
|
87
|
+
type: 'boolean'
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export function formGroupRadiosArgsMapper(a: FormGroupRadiosArgs): FormGroupRadios<any> {
|
|
93
|
+
return {
|
|
94
|
+
group: 'radios',
|
|
95
|
+
id: a.id,
|
|
96
|
+
label: a.label,
|
|
97
|
+
required: a.required,
|
|
98
|
+
disabled: a.disabled,
|
|
99
|
+
state: a.state,
|
|
100
|
+
errorText: a.errorText,
|
|
101
|
+
helpText: a.helpText,
|
|
102
|
+
selectables: [
|
|
103
|
+
{
|
|
104
|
+
id: uuidv4(),
|
|
105
|
+
value: 'optie-1',
|
|
106
|
+
type: 'radio',
|
|
107
|
+
label: 'een'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: uuidv4(),
|
|
111
|
+
value: 'optie-2',
|
|
112
|
+
type: 'radio',
|
|
113
|
+
label: 'twee'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: uuidv4(),
|
|
117
|
+
value: 'opties-3',
|
|
118
|
+
type: 'radio',
|
|
119
|
+
label: 'drie'
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
infoButton: a.infoButtonLabel && a.infoText
|
|
123
|
+
? {
|
|
124
|
+
onClick: a.infoButtonHandler,
|
|
125
|
+
active: a.infoActive,
|
|
126
|
+
label: a.infoButtonLabel
|
|
127
|
+
}
|
|
128
|
+
: undefined,
|
|
129
|
+
info: a.infoButtonLabel && a.infoText
|
|
130
|
+
? {
|
|
131
|
+
active: a.infoActive,
|
|
132
|
+
fixed: a.infoFixed,
|
|
133
|
+
onClose: a.infoCloseHandler,
|
|
134
|
+
richContent: a.infoText
|
|
135
|
+
}
|
|
136
|
+
: undefined
|
|
137
|
+
};
|
|
138
|
+
}
|
package/libs/@dso-toolkit/sources/src/components/form/form-groups/select/form-group-select.args.ts
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { HandlerFunction } from '@storybook/addon-actions';
|
|
2
|
+
import { ArgTypes, noControl } from '../../../../stories-helpers';
|
|
3
|
+
import { selectOptionGroupContent, selectOptionsContent } from '../../content/select.content';
|
|
4
|
+
|
|
5
|
+
import { FormGroupSelect } from '../../form.models';
|
|
6
|
+
|
|
7
|
+
export interface FormGroupSelectArgs {
|
|
8
|
+
metOptGroup: boolean;
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
state?: 'invalid' | 'valid';
|
|
12
|
+
required: boolean;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
multiple: boolean;
|
|
15
|
+
errorText?: string;
|
|
16
|
+
helpText?: string;
|
|
17
|
+
infoButtonHandler: HandlerFunction;
|
|
18
|
+
infoButtonLabel: string;
|
|
19
|
+
infoActive: boolean;
|
|
20
|
+
infoText: string;
|
|
21
|
+
infoCloseHandler: HandlerFunction;
|
|
22
|
+
infoFixed: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const formGroupSelectArgTypes: ArgTypes<FormGroupSelectArgs> = {
|
|
26
|
+
metOptGroup: {
|
|
27
|
+
control: {
|
|
28
|
+
type: 'boolean'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
id: {
|
|
32
|
+
control: {
|
|
33
|
+
type: 'text'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
label: {
|
|
37
|
+
control: {
|
|
38
|
+
type: 'text'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
state: {
|
|
42
|
+
options: [undefined, 'invalid', 'valid'],
|
|
43
|
+
control: {
|
|
44
|
+
type: 'select'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
required: {
|
|
48
|
+
control: {
|
|
49
|
+
type: 'boolean'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
disabled: {
|
|
53
|
+
control: {
|
|
54
|
+
type: 'boolean'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
multiple: {
|
|
58
|
+
control: {
|
|
59
|
+
type: 'boolean'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
errorText: {
|
|
63
|
+
control: {
|
|
64
|
+
type: 'text'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
helpText: {
|
|
68
|
+
control: {
|
|
69
|
+
type: 'text'
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
infoActive: {
|
|
73
|
+
control: {
|
|
74
|
+
type: 'boolean'
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
infoButtonHandler: {
|
|
78
|
+
...noControl,
|
|
79
|
+
action: 'infoButton click'
|
|
80
|
+
},
|
|
81
|
+
infoButtonLabel: {
|
|
82
|
+
control: {
|
|
83
|
+
type: 'text'
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
infoText: {
|
|
87
|
+
control: {
|
|
88
|
+
type: 'text'
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
infoCloseHandler: {
|
|
92
|
+
...noControl,
|
|
93
|
+
action: 'info close click'
|
|
94
|
+
},
|
|
95
|
+
infoFixed: {
|
|
96
|
+
control: {
|
|
97
|
+
type: 'boolean'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export function formGroupSelectArgsMapper(a: FormGroupSelectArgs): FormGroupSelect<any>{
|
|
103
|
+
return {
|
|
104
|
+
group: 'select',
|
|
105
|
+
id: a.id,
|
|
106
|
+
label: a.label,
|
|
107
|
+
items: a.metOptGroup ? selectOptionGroupContent : selectOptionsContent,
|
|
108
|
+
required: a.required,
|
|
109
|
+
disabled: a.disabled,
|
|
110
|
+
multiple: a.multiple,
|
|
111
|
+
state: a.state,
|
|
112
|
+
errorText: a.errorText,
|
|
113
|
+
helpText: a.helpText,
|
|
114
|
+
infoButton: a.infoButtonLabel && a.infoText
|
|
115
|
+
? {
|
|
116
|
+
onClick: a.infoButtonHandler,
|
|
117
|
+
active: a.infoActive,
|
|
118
|
+
label: a.infoButtonLabel
|
|
119
|
+
}
|
|
120
|
+
: undefined,
|
|
121
|
+
info: a.infoButtonLabel && a.infoText
|
|
122
|
+
? {
|
|
123
|
+
active: a.infoActive,
|
|
124
|
+
fixed: a.infoFixed,
|
|
125
|
+
onClose: a.infoCloseHandler,
|
|
126
|
+
richContent: a.infoText
|
|
127
|
+
}
|
|
128
|
+
: undefined
|
|
129
|
+
};
|
|
130
|
+
}
|
package/libs/@dso-toolkit/sources/src/components/form/form-groups/static/form-group-static.args.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { HandlerFunction } from '@storybook/addon-actions';
|
|
2
|
+
import { ArgTypes, noControl } from '../../../../stories-helpers';
|
|
3
|
+
|
|
4
|
+
import { FormGroupStatic } from '../../form.models';
|
|
5
|
+
|
|
6
|
+
export interface FormGroupStaticArgs {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
edit: boolean;
|
|
11
|
+
infoButtonHandler: HandlerFunction;
|
|
12
|
+
infoButtonLabel: string;
|
|
13
|
+
infoActive: boolean;
|
|
14
|
+
infoText: string;
|
|
15
|
+
infoCloseHandler: HandlerFunction;
|
|
16
|
+
infoFixed: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const formGroupStaticArgTypes: ArgTypes<FormGroupStaticArgs> = {
|
|
20
|
+
id: {
|
|
21
|
+
control: {
|
|
22
|
+
type: 'text'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
label: {
|
|
26
|
+
control: {
|
|
27
|
+
type: 'text'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
value: {
|
|
31
|
+
control: {
|
|
32
|
+
type: 'text'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
edit: {
|
|
36
|
+
control: {
|
|
37
|
+
type: 'boolean'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
infoActive: {
|
|
41
|
+
control: {
|
|
42
|
+
type: 'boolean'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
infoButtonHandler: {
|
|
46
|
+
...noControl,
|
|
47
|
+
action: 'infoButton click'
|
|
48
|
+
},
|
|
49
|
+
infoButtonLabel: {
|
|
50
|
+
control: {
|
|
51
|
+
type: 'text'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
infoText: {
|
|
55
|
+
control: {
|
|
56
|
+
type: 'text'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
infoCloseHandler: {
|
|
60
|
+
...noControl,
|
|
61
|
+
action: 'info close click'
|
|
62
|
+
},
|
|
63
|
+
infoFixed: {
|
|
64
|
+
control: {
|
|
65
|
+
type: 'boolean'
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export function formGroupStaticArgsMapper(a: FormGroupStaticArgs): FormGroupStatic<any>{
|
|
71
|
+
return {
|
|
72
|
+
group: 'static',
|
|
73
|
+
id: a.id,
|
|
74
|
+
label: a.label,
|
|
75
|
+
value: a.value,
|
|
76
|
+
edit: a.edit,
|
|
77
|
+
infoButton: a.infoButtonLabel && a.infoText
|
|
78
|
+
? {
|
|
79
|
+
onClick: a.infoButtonHandler,
|
|
80
|
+
active: a.infoActive,
|
|
81
|
+
label: a.infoButtonLabel
|
|
82
|
+
}
|
|
83
|
+
: undefined,
|
|
84
|
+
info: a.infoButtonLabel && a.infoText
|
|
85
|
+
? {
|
|
86
|
+
active: a.infoActive,
|
|
87
|
+
fixed: a.infoFixed,
|
|
88
|
+
onClose: a.infoCloseHandler,
|
|
89
|
+
richContent: a.infoText
|
|
90
|
+
}
|
|
91
|
+
: undefined
|
|
92
|
+
};
|
|
93
|
+
}
|