dso-toolkit 39.0.0 → 41.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/form-elements/group-search-bar.config.yml +2 -0
- package/components/Componenten/form-elements/group-search-bar.njk +1 -1
- package/components/Voorbeelden/10-Patronen/zoeken-in-lijst-cards.njk +5 -4
- package/dist/library/@dso-toolkit/core/cjs/dso-date-picker.cjs.entry.js +25 -10
- 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-ozon-content.cjs.entry.js +1 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-pagination.cjs.entry.js +38 -0
- 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/dso-tooltip.cjs.entry.js +40 -0
- package/dist/library/@dso-toolkit/core/cjs/loader.cjs.js +1 -1
- package/dist/library/@dso-toolkit/core/collection/collection-manifest.json +2 -0
- package/dist/library/@dso-toolkit/core/collection/components/date-picker/date-picker.js +25 -10
- 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/ozon-content/ozon-content.js +4 -1
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content.template.js +3 -3
- package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.css +68 -0
- package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.interfaces.js +1 -0
- package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.js +114 -0
- package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.stories.js +11 -0
- package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.template.js +11 -0
- 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/tooltip/tooltip.js +60 -0
- 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 +12 -0
- package/dist/library/@dso-toolkit/core/custom-elements/index.js +157 -24
- 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-0777c1c4.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-150fe323.entry.js → p-37e12c3c.entry.js} +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-3ad06d9d.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-b1dc8d76.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/{p-a8cf15cf.entry.js → p-f1026921.entry.js} +1 -1
- package/dist/library/@dso-toolkit/core/esm/dso-date-picker.entry.js +25 -10
- 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-ozon-content.entry.js +2 -2
- package/dist/library/@dso-toolkit/core/esm/dso-pagination.entry.js +34 -0
- 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/dso-tooltip.entry.js +40 -0
- package/dist/library/@dso-toolkit/core/esm/loader.js +1 -1
- package/dist/library/@dso-toolkit/core/types/components/date-picker/date-picker.d.ts +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/ozon-content/ozon-content.template.d.ts +1 -1
- package/dist/library/@dso-toolkit/core/types/components/pagination/pagination.d.ts +22 -0
- package/dist/library/@dso-toolkit/core/types/components/pagination/pagination.interfaces.d.ts +8 -0
- package/dist/library/@dso-toolkit/core/types/components/pagination/pagination.stories.d.ts +1 -0
- package/dist/library/@dso-toolkit/core/types/components/pagination/pagination.template.d.ts +2 -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/tooltip/tooltip.d.ts +6 -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 +72 -1
- package/dist/library/components/detail/form--autocomplete.html +1 -1
- package/dist/library/components/detail/form--form-horizontal.html +2 -2
- package/dist/library/components/detail/form--form-vertical.html +2 -2
- 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 +299 -3
- package/dist/library/components/detail/group-search-bar--default.html +2 -2
- package/dist/library/components/detail/group-search-bar--search-bar-allmessages.html +4 -3
- package/dist/library/components/detail/group-search-bar--search-bar-error.html +4 -3
- package/dist/library/components/detail/group-search-bar--search-bar-help.html +2 -2
- package/dist/library/components/detail/group-search-bar--search-bar-infobutton-expanded.html +2 -2
- package/dist/library/components/detail/group-search-bar--search-bar-infobutton.html +2 -2
- package/dist/library/components/detail/group-search-bar--search-bar-static-info.html +2 -2
- package/dist/library/components/detail/group-search-bar.html +12 -10
- package/dist/library/components/detail/zoeken-in-lijst-cards.html +10 -8
- package/dist/library/components/preview/form--form-horizontal.html +2 -2
- package/dist/library/components/preview/form--form-vertical.html +2 -2
- package/dist/library/components/preview/form--header-in-legend.html +567 -0
- package/dist/library/components/preview/form.html +282 -4
- package/dist/library/components/preview/group-search-bar--default.html +1 -1
- package/dist/library/components/preview/group-search-bar--search-bar-allmessages.html +2 -2
- package/dist/library/components/preview/group-search-bar--search-bar-error.html +2 -2
- package/dist/library/components/preview/group-search-bar--search-bar-help.html +1 -1
- package/dist/library/components/preview/group-search-bar--search-bar-infobutton-expanded.html +1 -1
- package/dist/library/components/preview/group-search-bar--search-bar-infobutton.html +1 -1
- package/dist/library/components/preview/group-search-bar--search-bar-static-info.html +1 -1
- package/dist/library/components/preview/group-search-bar.html +9 -9
- package/dist/library/components/preview/zoeken-in-lijst-cards.html +8 -6
- package/dist/library/components/render/form--form-horizontal.html +1 -1
- package/dist/library/components/render/form--form-vertical.html +1 -1
- package/dist/library/components/render/form--header-in-legend.html +551 -0
- package/dist/library/components/render/form.html +559 -2
- package/dist/library/components/render/group-search-bar--default.html +1 -1
- package/dist/library/components/render/group-search-bar--search-bar-allmessages.html +2 -2
- package/dist/library/components/render/group-search-bar--search-bar-error.html +2 -2
- package/dist/library/components/render/group-search-bar--search-bar-help.html +1 -1
- package/dist/library/components/render/group-search-bar--search-bar-infobutton-expanded.html +1 -1
- package/dist/library/components/render/group-search-bar--search-bar-infobutton.html +1 -1
- package/dist/library/components/render/group-search-bar--search-bar-static-info.html +1 -1
- package/dist/library/components/render/group-search-bar.html +9 -9
- package/dist/library/components/render/zoeken-in-lijst-cards.html +5 -4
- package/dist/library/dso-icons.svg +421 -387
- package/dist/library/styles/dso.css +871 -691
- 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-0777c1c4.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-150fe323.entry.js → p-37e12c3c.entry.js} +1 -1
- 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-b1dc8d76.entry.js +1 -0
- package/dist/toolkit/core/packages/core/dist/dso-toolkit/{p-a8cf15cf.entry.js → p-f1026921.entry.js} +1 -1
- package/dist/toolkit/dso-icons.svg +421 -387
- package/dist/toolkit/styles/dso.css +871 -691
- package/hydrate/index.js +173 -19
- package/libs/@dso-toolkit/css/dist/dso-icons.svg +421 -387
- 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-group.scss +22 -13
- 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/search-bar/form-group-search-bar.scss +17 -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/justify-form-groups/justify-form-groups.scss +26 -0
- package/libs/@dso-toolkit/css/src/components/pagination/pagination.scss +1 -93
- package/libs/@dso-toolkit/css/src/components/search-bar/search-bar.scss +5 -0
- package/{src/styles/components/_tabs.scss → libs/@dso-toolkit/css/src/components/tabs/tabs.scss} +69 -5
- package/libs/@dso-toolkit/css/src/components/tile-grid/tile-grid.scss +14 -0
- package/libs/@dso-toolkit/css/src/dso.scss +4 -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/search-bar.content.ts +12 -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/search-bar/form-group-search-bar.args.ts +124 -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-search-bar.model.ts +7 -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 +19 -2
- package/libs/@dso-toolkit/sources/src/components/form/models/form.model.ts +1 -1
- package/libs/@dso-toolkit/sources/src/components/justify-form-groups/justify-form-groups.args.ts +15 -0
- package/libs/@dso-toolkit/sources/src/components/justify-form-groups/justify-form-groups.content.ts +44 -0
- package/libs/@dso-toolkit/sources/src/components/justify-form-groups/justify-form-groups.models.ts +7 -0
- package/libs/@dso-toolkit/sources/src/components/justify-form-groups/justify-form-groups.stories.ts +33 -0
- package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.args.ts +16 -2
- package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.content.ts +3 -1
- package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.models.ts +2 -0
- package/libs/@dso-toolkit/sources/src/components/pagination/pagination.args.ts +16 -6
- package/libs/@dso-toolkit/sources/src/components/pagination/pagination.models.ts +13 -2
- package/libs/@dso-toolkit/sources/src/components/pagination/pagination.scss +101 -0
- package/libs/@dso-toolkit/sources/src/components/pagination/pagination.stories.ts +9 -7
- 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/search-bar/search-bar.models.ts +7 -6
- package/libs/@dso-toolkit/sources/src/components/tabs/tabs.args.ts +19 -0
- package/libs/@dso-toolkit/sources/src/components/tabs/tabs.models.ts +9 -0
- package/libs/@dso-toolkit/sources/src/components/tabs/tabs.stories.ts +86 -0
- package/libs/@dso-toolkit/sources/src/components/tile/tile.scss +6 -1
- package/libs/@dso-toolkit/sources/src/components/tooltip/tooltip.args.ts +9 -1
- package/libs/@dso-toolkit/sources/src/components/tooltip/tooltip.models.ts +3 -0
- package/libs/@dso-toolkit/sources/src/components/viewer-grid/viewer-grid.stories.ts +6 -4
- package/libs/@dso-toolkit/sources/src/components.scss +1 -0
- package/libs/@dso-toolkit/sources/src/index.ts +10 -0
- package/libs/@dso-toolkit/sources/src/styling/global/table.scss +9 -0
- package/libs/@dso-toolkit/sources/src/styling/grid/grid.scss +56 -0
- package/libs/@dso-toolkit/sources/src/styling/variables/colors.scss +3 -0
- package/libs/_bootstrap.scss +2 -2
- package/libs/bootstrap/_forms.scss +0 -1
- package/libs/bootstrap/_variables.scss +3 -7
- package/package.json +2 -2
- package/reference/render/form--form-horizontal.html +1 -1
- package/reference/render/form--form-vertical.html +1 -1
- package/reference/render/form--header-in-legend.html +156 -0
- package/reference/render/group-search-bar--default.html +1 -1
- package/reference/render/group-search-bar--search-bar-allmessages.html +2 -2
- package/reference/render/group-search-bar--search-bar-error.html +2 -2
- package/reference/render/group-search-bar--search-bar-help.html +1 -1
- package/reference/render/group-search-bar--search-bar-infobutton-expanded.html +1 -1
- package/reference/render/group-search-bar--search-bar-infobutton.html +1 -1
- package/reference/render/group-search-bar--search-bar-static-info.html +1 -1
- package/reference/render/zoeken-in-lijst-cards.html +5 -4
- package/src/styles/components/_form.scss +0 -145
- package/src/styles/dso.scss +3 -3
- package/src/styles/mixins/_bootstrap-variables.scss +0 -3
- package/src/styles/mixins/_dso-variables.scss +0 -3
- 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-7abe091d.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-7abe091d.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/libs/bootstrap/_navs.scss +0 -226
- package/libs/bootstrap/mixins/_nav-divider.scss +0 -10
- package/src/styles/components/_search-bar.scss +0 -32
- package/src/styles/components/form/_files.scss +0 -133
- package/src/styles/mixins/_grid.scss +0 -63
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { HandlerFunction } from '@storybook/addon-actions';
|
|
2
|
+
|
|
3
|
+
import { ArgTypes, noControl } from '../../../../stories-helpers';
|
|
4
|
+
|
|
5
|
+
import { SearchBar } from '../../../search-bar/search-bar.models';
|
|
6
|
+
|
|
7
|
+
import { FormGroupSearchBar } from '../../form.models';
|
|
8
|
+
|
|
9
|
+
export interface FormGroupSearchBarArgs {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
errorText?: string;
|
|
13
|
+
helpText?: string;
|
|
14
|
+
infoButtonHandler: HandlerFunction;
|
|
15
|
+
infoButtonLabel: string;
|
|
16
|
+
infoActive: boolean;
|
|
17
|
+
infoText: string;
|
|
18
|
+
infoCloseHandler: HandlerFunction;
|
|
19
|
+
infoFixed: boolean;
|
|
20
|
+
state?: 'invalid' | 'valid';
|
|
21
|
+
searchBarValue: string;
|
|
22
|
+
searchBarButtonLabel: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const formGroupSearchBarArgTypes: ArgTypes<FormGroupSearchBarArgs> = {
|
|
26
|
+
id: {
|
|
27
|
+
control: {
|
|
28
|
+
type: 'text'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
label: {
|
|
32
|
+
control: {
|
|
33
|
+
type: 'text'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
errorText: {
|
|
37
|
+
control: {
|
|
38
|
+
type: 'text'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
helpText: {
|
|
42
|
+
control: {
|
|
43
|
+
type: 'text'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
infoActive: {
|
|
47
|
+
control: {
|
|
48
|
+
type: 'boolean'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
infoButtonHandler: {
|
|
52
|
+
...noControl,
|
|
53
|
+
action: 'infoButton click'
|
|
54
|
+
},
|
|
55
|
+
infoButtonLabel: {
|
|
56
|
+
control: {
|
|
57
|
+
type: 'text'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
infoText: {
|
|
61
|
+
control: {
|
|
62
|
+
type: 'text'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
infoCloseHandler: {
|
|
66
|
+
...noControl,
|
|
67
|
+
action: 'info close click'
|
|
68
|
+
},
|
|
69
|
+
infoFixed: {
|
|
70
|
+
control: {
|
|
71
|
+
type: 'boolean'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
state: {
|
|
75
|
+
options: [undefined, 'invalid', 'valid'],
|
|
76
|
+
control: {
|
|
77
|
+
type: 'select'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
searchBarValue: {
|
|
81
|
+
control: {
|
|
82
|
+
type: 'text'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
searchBarButtonLabel: {
|
|
86
|
+
control: {
|
|
87
|
+
type: 'text'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export function formGroupSearchBarArgsMapper(a: FormGroupSearchBarArgs): FormGroupSearchBar<any>{
|
|
93
|
+
return {
|
|
94
|
+
group: 'search-bar',
|
|
95
|
+
id: a.id,
|
|
96
|
+
label: a.label,
|
|
97
|
+
errorText: a.errorText,
|
|
98
|
+
helpText: a.helpText,
|
|
99
|
+
infoButton: a.infoButtonLabel && a.infoText
|
|
100
|
+
? {
|
|
101
|
+
onClick: a.infoButtonHandler,
|
|
102
|
+
active: a.infoActive,
|
|
103
|
+
label: a.infoButtonLabel
|
|
104
|
+
}
|
|
105
|
+
: undefined,
|
|
106
|
+
info: a.infoButtonLabel && a.infoText
|
|
107
|
+
? {
|
|
108
|
+
active: a.infoActive,
|
|
109
|
+
fixed: a.infoFixed,
|
|
110
|
+
onClose: a.infoCloseHandler,
|
|
111
|
+
richContent: a.infoText
|
|
112
|
+
}
|
|
113
|
+
: undefined,
|
|
114
|
+
state: a.state,
|
|
115
|
+
searchBar: {
|
|
116
|
+
value: a.searchBarValue,
|
|
117
|
+
id: a.id,
|
|
118
|
+
buttonLabel: a.searchBarButtonLabel,
|
|
119
|
+
hideSearchButton: true,
|
|
120
|
+
icon: true,
|
|
121
|
+
clearButton: true
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
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
|
+
}
|