dso-toolkit 39.0.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/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-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/header/header.js +21 -2
- 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-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 +15 -164
- 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/viewer-grid.stories.js +2 -2
- package/dist/library/@dso-toolkit/core/custom-elements/index.d.ts +6 -0
- package/dist/library/@dso-toolkit/core/custom-elements/index.js +54 -11
- 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/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-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-list.example-template.d.ts +2 -0
- package/dist/library/@dso-toolkit/core/types/components.d.ts +22 -1
- 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/preview/form--header-in-legend.html +567 -0
- package/dist/library/components/preview/form.html +278 -0
- package/dist/library/components/render/form--header-in-legend.html +551 -0
- package/dist/library/components/render/form.html +557 -0
- package/dist/library/styles/dso.css +508 -224
- 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/styles/dso.css +508 -224
- package/hydrate/index.js +61 -7
- 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/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 +6 -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/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/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/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/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 +6 -0
- package/libs/@dso-toolkit/sources/src/components/form/form.stories.ts +104 -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-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 -2
- 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.stories.ts +6 -4
- package/libs/@dso-toolkit/sources/src/index.ts +6 -0
- package/package.json +2 -2
- package/reference/render/form--header-in-legend.html +156 -0
- package/src/styles/components/_form.scss +0 -114
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/example-pages/viewer-grid-document-item.example-template.js +0 -56
- 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/example-pages/viewer-grid-document-item.example-template.d.ts +0 -1
- 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
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
.dso-tile-grid {
|
|
2
2
|
@include tile-grid_root();
|
|
3
3
|
}
|
|
4
|
+
|
|
5
|
+
dso-responsive-element.dso-tile-grid {
|
|
6
|
+
&[small] {
|
|
7
|
+
grid-template-columns: repeat(2, 1fr);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&[medium] {
|
|
11
|
+
grid-template-columns: repeat(4, 1fr);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&[large] {
|
|
15
|
+
grid-template-columns: repeat(5, 1fr);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
@import "components/conclusion/conclusion";
|
|
30
30
|
@import "components/context/context";
|
|
31
31
|
@import "components/description/description";
|
|
32
|
+
@import "components/document-header/document-header";
|
|
33
|
+
@import "components/document-list/document-list";
|
|
32
34
|
@import "components/dropdown-menu/dropdown-menu";
|
|
33
35
|
@import "components/footnotes/footnotes";
|
|
34
36
|
@import "components/form-control/form-control";
|
|
@@ -4,6 +4,7 @@ import { Accordion, AccordionSection } from './accordion.models';
|
|
|
4
4
|
|
|
5
5
|
export interface AccordionArgs {
|
|
6
6
|
variant?: 'compact' | 'conclusion';
|
|
7
|
+
handleType: 'anchor' | 'button';
|
|
7
8
|
sections: AccordionSection[];
|
|
8
9
|
reverseAlign?: boolean;
|
|
9
10
|
}
|
|
@@ -20,6 +21,12 @@ export const accordionArgTypes: ArgTypes<AccordionArgs> = {
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
},
|
|
24
|
+
handleType: {
|
|
25
|
+
options: ['anchor', 'button'],
|
|
26
|
+
control: {
|
|
27
|
+
type: 'select'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
23
30
|
sections: {
|
|
24
31
|
control: {
|
|
25
32
|
disable: true
|
|
@@ -35,6 +42,7 @@ export const accordionArgTypes: ArgTypes<AccordionArgs> = {
|
|
|
35
42
|
export function accordionArgsMapper(a: AccordionArgs): Accordion {
|
|
36
43
|
return {
|
|
37
44
|
variant: a.variant,
|
|
45
|
+
handleType: a.handleType,
|
|
38
46
|
sections: a.sections,
|
|
39
47
|
reverseAlign: a.reverseAlign
|
|
40
48
|
};
|
|
@@ -2,6 +2,7 @@ import { AttachmentsCounter, Icon } from '../..';
|
|
|
2
2
|
|
|
3
3
|
export interface Accordion {
|
|
4
4
|
variant?: string;
|
|
5
|
+
handleType: 'anchor' | 'button';
|
|
5
6
|
sections: AccordionSection[];
|
|
6
7
|
reverseAlign?: boolean;
|
|
7
8
|
}
|
|
@@ -9,7 +10,6 @@ export interface Accordion {
|
|
|
9
10
|
export interface AccordionSection {
|
|
10
11
|
state?: 'success' | 'info' | 'warning' | 'danger';
|
|
11
12
|
open?: boolean;
|
|
12
|
-
handleType: 'anchor' | 'button';
|
|
13
13
|
title: string;
|
|
14
14
|
status?: string;
|
|
15
15
|
attachmentsCounter?: AttachmentsCounter;
|
|
@@ -32,28 +32,25 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
32
32
|
template,
|
|
33
33
|
{
|
|
34
34
|
args: componentArgs<AccordionArgs>({
|
|
35
|
+
handleType: 'anchor',
|
|
35
36
|
sections: [
|
|
36
37
|
{
|
|
37
38
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
38
39
|
header: 'h2',
|
|
39
|
-
handleType: 'anchor'
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
title: 'Voor hoeveel locaties kan ik de Vergunningcheck doen?',
|
|
43
43
|
header: 'h2',
|
|
44
|
-
handleType: 'anchor'
|
|
45
44
|
},
|
|
46
45
|
{
|
|
47
46
|
title: 'Hoe lang duurt de Vergunningcheck?',
|
|
48
47
|
header: 'h2',
|
|
49
|
-
handleType: 'anchor',
|
|
50
48
|
children: `De Vergunningcheck duurt ongeveer vijf minuten per gekozen werkzaamheid. Het is wel belangrijk dat u alle benodigde informatie bij de hand heeft.`,
|
|
51
49
|
open: true
|
|
52
50
|
},
|
|
53
51
|
{
|
|
54
52
|
title: 'Wat kan ik met de uitkomst van de Vergunningcheck?',
|
|
55
53
|
header: 'h2',
|
|
56
|
-
handleType: 'anchor'
|
|
57
54
|
}
|
|
58
55
|
]
|
|
59
56
|
})
|
|
@@ -65,22 +62,20 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
65
62
|
template,
|
|
66
63
|
{
|
|
67
64
|
args: componentArgs<AccordionArgs>({
|
|
65
|
+
handleType: 'anchor',
|
|
68
66
|
sections: [
|
|
69
67
|
{
|
|
70
68
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
71
69
|
header: 'h2',
|
|
72
|
-
handleType: 'anchor',
|
|
73
70
|
open: true,
|
|
74
71
|
subsections: [
|
|
75
72
|
{
|
|
76
73
|
title: 'Voor hoeveel locaties kan ik de Vergunningcheck doen?',
|
|
77
74
|
header: 'h3',
|
|
78
|
-
handleType: 'anchor'
|
|
79
75
|
},
|
|
80
76
|
{
|
|
81
77
|
title: 'Hoe lang duurt de Vergunningcheck?',
|
|
82
78
|
header: 'h3',
|
|
83
|
-
handleType: 'anchor',
|
|
84
79
|
open: true,
|
|
85
80
|
children: `De Vergunningcheck duurt ongeveer vijf minuten per gekozen werkzaamheid. Het is wel belangrijk dat u alle benodigde informatie bij de hand heeft.`
|
|
86
81
|
}
|
|
@@ -89,7 +84,6 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
89
84
|
{
|
|
90
85
|
title: 'Wat kan ik met de uitkomst van de Vergunningcheck?',
|
|
91
86
|
header: 'h2',
|
|
92
|
-
handleType: 'anchor'
|
|
93
87
|
}
|
|
94
88
|
]
|
|
95
89
|
})
|
|
@@ -101,11 +95,11 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
101
95
|
template,
|
|
102
96
|
{
|
|
103
97
|
args: componentArgs<AccordionArgs>({
|
|
98
|
+
handleType: 'anchor',
|
|
104
99
|
sections: [
|
|
105
100
|
{
|
|
106
101
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
107
102
|
header: 'h2',
|
|
108
|
-
handleType: 'anchor',
|
|
109
103
|
open: true,
|
|
110
104
|
children: `<p>Nee, de Vergunningcheck is niet verplicht. Het is een hulpmiddel waarmee u kunt zien of u een vergunning nodig heeft of melding moet doen.</p>
|
|
111
105
|
<p>Wel kunt u meteen na de check een aanvraag of melding starten. Een aantal gegevens uit de Vergunningcheck wordt dan meegenomen in de aanvraag of melding.</p>`,
|
|
@@ -114,7 +108,6 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
114
108
|
{
|
|
115
109
|
title: 'Voor hoeveel locaties kan ik de Vergunningcheck doen?',
|
|
116
110
|
header: 'h2',
|
|
117
|
-
handleType: 'anchor',
|
|
118
111
|
open: true,
|
|
119
112
|
children: `De Vergunningcheck is bedoeld voor één locatie tegelijk. Wilt u dezelfde werkzaamheid op meerdere locaties doen? Dan is het verstandig om voor al deze locaties apart de Vergunningcheck te doen..`
|
|
120
113
|
}
|
|
@@ -128,11 +121,11 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
128
121
|
template,
|
|
129
122
|
{
|
|
130
123
|
args: componentArgs<AccordionArgs>({
|
|
124
|
+
handleType: 'anchor',
|
|
131
125
|
sections: [
|
|
132
126
|
{
|
|
133
127
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
134
128
|
header: 'h2',
|
|
135
|
-
handleType: 'anchor',
|
|
136
129
|
icon: {
|
|
137
130
|
icon: 'user-line'
|
|
138
131
|
}
|
|
@@ -140,7 +133,6 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
140
133
|
{
|
|
141
134
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
142
135
|
header: 'h2',
|
|
143
|
-
handleType: 'anchor',
|
|
144
136
|
icon: {
|
|
145
137
|
icon: 'user-line'
|
|
146
138
|
},
|
|
@@ -149,14 +141,12 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
149
141
|
{
|
|
150
142
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
151
143
|
header: 'h2',
|
|
152
|
-
handleType: 'anchor',
|
|
153
144
|
state: 'danger',
|
|
154
145
|
status: '5 van 8 beantwoord'
|
|
155
146
|
},
|
|
156
147
|
{
|
|
157
148
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
158
149
|
header: 'h2',
|
|
159
|
-
handleType: 'anchor',
|
|
160
150
|
state: 'danger',
|
|
161
151
|
status: '5 van 8 beantwoord',
|
|
162
152
|
open: true
|
|
@@ -164,7 +154,6 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
164
154
|
{
|
|
165
155
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
166
156
|
header: 'h2',
|
|
167
|
-
handleType: 'anchor',
|
|
168
157
|
attachmentsCounter: {
|
|
169
158
|
count: 2
|
|
170
159
|
}
|
|
@@ -172,7 +161,6 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
172
161
|
{
|
|
173
162
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
174
163
|
header: 'h2',
|
|
175
|
-
handleType: 'anchor',
|
|
176
164
|
attachmentsCounter: {
|
|
177
165
|
count: 2
|
|
178
166
|
},
|
|
@@ -189,11 +177,11 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
189
177
|
{
|
|
190
178
|
args: componentArgs<AccordionArgs>({
|
|
191
179
|
reverseAlign: true,
|
|
180
|
+
handleType: 'anchor',
|
|
192
181
|
sections: [
|
|
193
182
|
{
|
|
194
183
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
195
184
|
header: 'h2',
|
|
196
|
-
handleType: 'anchor',
|
|
197
185
|
icon: {
|
|
198
186
|
icon: 'user-line'
|
|
199
187
|
}
|
|
@@ -201,7 +189,6 @@ export function storiesOfAccordion<TemplateFnReturnType>(
|
|
|
201
189
|
{
|
|
202
190
|
title: 'Is het verplicht om de Vergunningcheck te doen?',
|
|
203
191
|
header: 'h2',
|
|
204
|
-
handleType: 'anchor',
|
|
205
192
|
icon: {
|
|
206
193
|
icon: 'user-line'
|
|
207
194
|
},
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HandlerFunction } from '@storybook/addon-actions';
|
|
2
|
+
import { DefinitionList } from '../definition-list/definition-list.models';
|
|
3
|
+
import { DocumentHeader } from './document-header.models';
|
|
4
|
+
|
|
5
|
+
export interface DocumentHeaderArgs {
|
|
6
|
+
title: string;
|
|
7
|
+
owner: string;
|
|
8
|
+
type: string;
|
|
9
|
+
featureAction: HandlerFunction;
|
|
10
|
+
featuresOpen: boolean;
|
|
11
|
+
statusContentOpen: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function documentHeaderMapper<TemplateFnReturnType>(
|
|
15
|
+
a: DocumentHeaderArgs,
|
|
16
|
+
status: TemplateFnReturnType,
|
|
17
|
+
features: DefinitionList<TemplateFnReturnType>,
|
|
18
|
+
statusContent: TemplateFnReturnType
|
|
19
|
+
): DocumentHeader<TemplateFnReturnType> {
|
|
20
|
+
return {
|
|
21
|
+
title: a.title,
|
|
22
|
+
owner: a.owner,
|
|
23
|
+
status,
|
|
24
|
+
type: a.type,
|
|
25
|
+
features,
|
|
26
|
+
featureAction: a.featureAction,
|
|
27
|
+
featuresOpen: a.featuresOpen,
|
|
28
|
+
statusContent,
|
|
29
|
+
statusContentOpen: a.statusContentOpen
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DefinitionList } from '../definition-list/definition-list.models';
|
|
2
|
+
|
|
3
|
+
export interface DocumentHeader<TemplateFnReturnType> {
|
|
4
|
+
title: string;
|
|
5
|
+
type: string;
|
|
6
|
+
owner: string;
|
|
7
|
+
features: DefinitionList<TemplateFnReturnType>;
|
|
8
|
+
featuresOpen?: boolean;
|
|
9
|
+
featureAction?: (e: MouseEvent) => void;
|
|
10
|
+
status: TemplateFnReturnType;
|
|
11
|
+
statusContentOpen?: boolean;
|
|
12
|
+
statusContent?: TemplateFnReturnType;
|
|
13
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { HandlerFunction } from '@storybook/addon-actions';
|
|
2
|
+
import { Args } from '@storybook/addons';
|
|
3
|
+
|
|
4
|
+
import { noControl, StorybookParameters } from '../../stories-helpers';
|
|
5
|
+
import { DefinitionList } from '../definition-list/definition-list.models';
|
|
6
|
+
|
|
7
|
+
import { DocumentHeaderArgs, documentHeaderMapper } from './document-header.args';
|
|
8
|
+
import { DocumentHeader } from './document-header.models';
|
|
9
|
+
|
|
10
|
+
export interface DocumentHeaderParameters<TemplateFnReturnType> {
|
|
11
|
+
documentHeaderTemplate: (documentHeaderProperties: DocumentHeader<TemplateFnReturnType>) => TemplateFnReturnType;
|
|
12
|
+
status: (documentHeaderFeatureOpen: boolean, documentHeaderFeatureAction: HandlerFunction) => TemplateFnReturnType;
|
|
13
|
+
features: DefinitionList<TemplateFnReturnType>;
|
|
14
|
+
statusContent: TemplateFnReturnType;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function storiesOfDocumentHeader<TemplateFnReturnType>(
|
|
18
|
+
{
|
|
19
|
+
module: mainModule,
|
|
20
|
+
storiesOf,
|
|
21
|
+
readme
|
|
22
|
+
}: StorybookParameters,
|
|
23
|
+
{
|
|
24
|
+
documentHeaderTemplate,
|
|
25
|
+
status,
|
|
26
|
+
features,
|
|
27
|
+
statusContent
|
|
28
|
+
}: DocumentHeaderParameters<TemplateFnReturnType>
|
|
29
|
+
) {
|
|
30
|
+
const stories = storiesOf('Document Header', mainModule)
|
|
31
|
+
.addParameters({
|
|
32
|
+
docs: {
|
|
33
|
+
page: readme,
|
|
34
|
+
},
|
|
35
|
+
args: {
|
|
36
|
+
...noControl
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
stories.add(
|
|
41
|
+
'Document Header',
|
|
42
|
+
(a: Args) => {
|
|
43
|
+
const args = a as DocumentHeaderArgs;
|
|
44
|
+
|
|
45
|
+
return documentHeaderTemplate(documentHeaderMapper(args, status(args.featuresOpen, args.featureAction), features, statusContent));
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { documentListContent } from './document-list.content';
|
|
2
|
+
import { DocumentList, DocumentListItemStatusDemoContent } from './document-list.models';
|
|
3
|
+
|
|
4
|
+
export function documentListMapper<TemplateFnReturnType>(demoMapper: ({ badge, date }: DocumentListItemStatusDemoContent) => TemplateFnReturnType): DocumentList<TemplateFnReturnType> {
|
|
5
|
+
return {
|
|
6
|
+
items: documentListContent.items.map(c => ({ ...c, status: demoMapper(c.status) }))
|
|
7
|
+
};
|
|
8
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DocumentList, DocumentListItemStatusDemoContent } from './document-list.models';
|
|
2
|
+
|
|
3
|
+
export const documentListContent: DocumentList<DocumentListItemStatusDemoContent> = {
|
|
4
|
+
items: [
|
|
5
|
+
{
|
|
6
|
+
title: 'Omgevingsplan gemeente Gouda',
|
|
7
|
+
type: 'Omgevingsplan',
|
|
8
|
+
owner: 'Gemeente Gouda',
|
|
9
|
+
status: {
|
|
10
|
+
badge: {
|
|
11
|
+
status: "warning",
|
|
12
|
+
message: "Ontwerp",
|
|
13
|
+
},
|
|
14
|
+
date: 'Bekendgemaakt 01-03-2021'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: 'Omgevingsplan gemeente Gooise Meren',
|
|
19
|
+
type: 'Omgevingsplan',
|
|
20
|
+
owner: 'Gemeente Gooise Meren',
|
|
21
|
+
status: {
|
|
22
|
+
badge: {
|
|
23
|
+
status: "warning",
|
|
24
|
+
message: "Ontwerp",
|
|
25
|
+
},
|
|
26
|
+
date: 'In werking vanaf 01-10-2022'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Badge } from '../badge/badge.models';
|
|
2
|
+
|
|
3
|
+
export interface DocumentList<TemplateFnReturnType> {
|
|
4
|
+
items: DocumentListItem<TemplateFnReturnType>[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface DocumentListItem<TemplateFnReturnType> {
|
|
8
|
+
title: string;
|
|
9
|
+
type: string;
|
|
10
|
+
owner: string;
|
|
11
|
+
status: TemplateFnReturnType;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface DocumentListItemStatusDemoContent {
|
|
15
|
+
badge: Badge;
|
|
16
|
+
date: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { noControl, StorybookParameters } from '../../stories-helpers';
|
|
2
|
+
|
|
3
|
+
import { documentListMapper } from './document-list.args';
|
|
4
|
+
import { DocumentList, DocumentListItemStatusDemoContent } from './document-list.models';
|
|
5
|
+
|
|
6
|
+
export interface DocumentListParameters<TemplateFnReturnType> {
|
|
7
|
+
documentListTemplate: (documentListProperties: DocumentList<TemplateFnReturnType>) => TemplateFnReturnType;
|
|
8
|
+
statusDemoMap: (status: DocumentListItemStatusDemoContent) => TemplateFnReturnType
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function storiesOfDocumentList<TemplateFnReturnType>(
|
|
12
|
+
{
|
|
13
|
+
module: mainModule,
|
|
14
|
+
storiesOf,
|
|
15
|
+
readme
|
|
16
|
+
}: StorybookParameters,
|
|
17
|
+
{
|
|
18
|
+
documentListTemplate,
|
|
19
|
+
statusDemoMap
|
|
20
|
+
}: DocumentListParameters<TemplateFnReturnType>
|
|
21
|
+
) {
|
|
22
|
+
const stories = storiesOf('Document List', mainModule)
|
|
23
|
+
.addParameters({
|
|
24
|
+
docs: {
|
|
25
|
+
page: readme,
|
|
26
|
+
},
|
|
27
|
+
args: {
|
|
28
|
+
...noControl
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
stories.add(
|
|
33
|
+
'Document List',
|
|
34
|
+
() => documentListTemplate(documentListMapper(statusDemoMap))
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormGroupConfirmArgs } from '../form-groups/confirm/form-group-confirm.args';
|
|
2
|
+
|
|
3
|
+
export const confirmContent: Omit<FormGroupConfirmArgs, 'infoButtonHandler' | 'infoCloseHandler'> = {
|
|
4
|
+
id: 'mijn-id',
|
|
5
|
+
required: false,
|
|
6
|
+
disabled: false,
|
|
7
|
+
errorText: 'Dit moet u verplicht aanvinken',
|
|
8
|
+
selectableLabel: 'Ik ga akkoord met de voorwaarden',
|
|
9
|
+
selectableValue: 'Akkoord'
|
|
10
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FormGroupFilesArgs } from '../form-groups/files/form-group-files.args';
|
|
2
|
+
import { FormGroupFilesFile } from '../form.models';
|
|
3
|
+
|
|
4
|
+
export const filesContent: Omit<FormGroupFilesArgs, 'infoButtonHandler' | 'infoCloseHandler'> = {
|
|
5
|
+
id: 'mijn-id',
|
|
6
|
+
label: 'Files',
|
|
7
|
+
required: false,
|
|
8
|
+
disabled: false,
|
|
9
|
+
errorText: 'Voeg een document toe.',
|
|
10
|
+
warning: 'U vraagt of wij een document vertrouwelijk willen behandelen. Er zal worden beoordeeld of uw vraag terecht is. U krijgt hiervan bericht.',
|
|
11
|
+
addFileButtonVariant: 'primary'
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const files: FormGroupFilesFile[] = [
|
|
15
|
+
{
|
|
16
|
+
filename: 'Waterplan.pdf'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
filename: 'Erfgrens dispuut.docx',
|
|
20
|
+
confidential: true
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
filename: 'Havenlayout.png'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
filename: 'legger-2022-06-20-v3.zip'
|
|
27
|
+
}
|
|
28
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormGroupInputNumberArgs } from '../form-groups/input-number/form-group-input-number.args';
|
|
2
|
+
|
|
3
|
+
export const inputNumberContent: FormGroupInputNumberArgs = {
|
|
4
|
+
id: 'mijn-id',
|
|
5
|
+
label: 'input number',
|
|
6
|
+
count: 99,
|
|
7
|
+
minusButtonInactive: false,
|
|
8
|
+
plusButtonInactive: false,
|
|
9
|
+
min: 0,
|
|
10
|
+
max: 99
|
|
11
|
+
};
|
|
@@ -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
|
+
}
|