@dnb/eufemia 10.21.0 → 10.22.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/CHANGELOG.md +27 -0
- package/cjs/components/aria-live/useAriaLive.d.ts +1 -1
- package/cjs/components/breadcrumb/Breadcrumb.d.ts +2 -2
- package/cjs/components/breadcrumb/Breadcrumb.js +3 -3
- package/cjs/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/cjs/components/breadcrumb/style/dnb-breadcrumb.css +7 -2
- package/cjs/components/breadcrumb/style/dnb-breadcrumb.min.css +1 -1
- package/cjs/components/breadcrumb/style/dnb-breadcrumb.scss +10 -2
- package/cjs/components/button/Button.js +2 -2
- package/cjs/components/button/Button.js.map +1 -1
- package/cjs/components/button/style/themes/dnb-button-theme-sbanken.css +23 -11
- package/cjs/components/button/style/themes/dnb-button-theme-sbanken.min.css +3 -3
- package/cjs/components/button/style/themes/dnb-button-theme-sbanken.scss +30 -14
- package/cjs/components/card/style/dnb-card.css +11 -2
- package/cjs/components/card/style/dnb-card.min.css +1 -1
- package/cjs/components/card/style/dnb-card.scss +12 -2
- package/cjs/components/form-label/style/dnb-form-label.css +4 -1
- package/cjs/components/form-label/style/dnb-form-label.min.css +1 -1
- package/cjs/components/form-label/style/dnb-form-label.scss +5 -2
- package/cjs/components/global-status/GlobalStatus.d.ts +1 -1
- package/cjs/components/global-status/GlobalStatusProvider.d.ts +1 -1
- package/cjs/components/height-animation/HeightAnimationInstance.d.ts +5 -6
- package/cjs/components/height-animation/HeightAnimationInstance.js +12 -12
- package/cjs/components/height-animation/HeightAnimationInstance.js.map +1 -1
- package/cjs/components/height-animation/useHeightAnimation.js +11 -10
- package/cjs/components/height-animation/useHeightAnimation.js.map +1 -1
- package/cjs/components/input/Input.d.ts +1 -1
- package/cjs/components/pagination/InfinityScroller.d.ts +1 -1
- package/cjs/components/progress-indicator/ProgressIndicator.js +5 -7
- package/cjs/components/progress-indicator/ProgressIndicator.js.map +1 -1
- package/cjs/components/progress-indicator/ProgressIndicatorCircular.js +1 -1
- package/cjs/components/progress-indicator/ProgressIndicatorCircular.js.map +1 -1
- package/cjs/components/progress-indicator/ProgressIndicatorLinear.js +4 -4
- package/cjs/components/progress-indicator/ProgressIndicatorLinear.js.map +1 -1
- package/cjs/components/progress-indicator/style/dnb-progress-indicator.css +5 -2
- package/cjs/components/progress-indicator/style/dnb-progress-indicator.min.css +1 -1
- package/cjs/components/progress-indicator/style/dnb-progress-indicator.scss +5 -2
- package/cjs/components/space/SpacingHelper.d.ts +5 -5
- package/cjs/components/table/Table.js +2 -2
- package/cjs/components/table/Table.js.map +1 -1
- package/cjs/components/table/TableAccordion.js +40 -57
- package/cjs/components/table/TableAccordion.js.map +1 -1
- package/cjs/components/table/TableAccordionTd.d.ts +9 -0
- package/cjs/components/table/{TableAccordionContent.js → TableAccordionTd.js} +16 -54
- package/cjs/components/table/TableAccordionTd.js.map +1 -0
- package/cjs/components/table/TableAccordionTr.d.ts +13 -0
- package/cjs/components/table/TableAccordionTr.js +61 -0
- package/cjs/components/table/TableAccordionTr.js.map +1 -0
- package/cjs/components/table/TableContext.d.ts +2 -2
- package/cjs/components/table/TableContext.js +4 -3
- package/cjs/components/table/TableContext.js.map +1 -1
- package/cjs/components/table/TableTd.d.ts +2 -2
- package/cjs/components/table/TableTd.js +2 -2
- package/cjs/components/table/TableTd.js.map +1 -1
- package/cjs/components/table/TableTr.d.ts +6 -1
- package/cjs/components/table/TableTr.js +10 -5
- package/cjs/components/table/TableTr.js.map +1 -1
- package/cjs/components/table/style/dnb-table.css +84 -64
- package/cjs/components/table/style/dnb-table.min.css +1 -1
- package/cjs/components/table/style/dnb-table.scss +1 -1
- package/cjs/components/table/style/table-accordion.scss +62 -44
- package/cjs/components/table/style/table-td.scss +1 -1
- package/cjs/components/table/style/themes/dnb-table-theme-sbanken.css +10 -0
- package/cjs/components/table/style/themes/dnb-table-theme-sbanken.min.css +3 -1
- package/cjs/components/table/style/themes/dnb-table-theme-sbanken.scss +14 -0
- package/cjs/components/table/useTableAnimationHandler.d.ts +20 -0
- package/cjs/components/table/useTableAnimationHandler.js +73 -0
- package/cjs/components/table/useTableAnimationHandler.js.map +1 -0
- package/cjs/elements/blockquote/style/themes/dnb-blockquote-theme-sbanken.scss +1 -0
- package/cjs/extensions/forms/DataContext/Context.d.ts +1 -3
- package/cjs/extensions/forms/DataContext/Context.js.map +1 -1
- package/cjs/extensions/forms/DataContext/Provider/Provider.d.ts +1 -2
- package/cjs/extensions/forms/DataContext/Provider/Provider.js +1 -5
- package/cjs/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
- package/cjs/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
- package/cjs/extensions/forms/FieldBlock/FieldBlockContext.d.ts +1 -2
- package/cjs/extensions/forms/FieldBlock/FieldBlockContext.js.map +1 -1
- package/cjs/extensions/forms/FieldBlock/style/dnb-field-block.css +2 -2
- package/cjs/extensions/forms/FieldBlock/style/dnb-field-block.min.css +1 -1
- package/cjs/extensions/forms/FieldBlock/style/dnb-field-block.scss +2 -0
- package/cjs/extensions/forms/Form/ButtonRow/style/dnb-form-button-row.css +6 -0
- package/cjs/extensions/forms/Form/ButtonRow/style/dnb-form-button-row.min.css +1 -1
- package/cjs/extensions/forms/Form/ButtonRow/style/dnb-form-button-row.scss +10 -2
- package/cjs/extensions/forms/Form/data-context/useData.d.ts +1 -1
- package/cjs/extensions/forms/Form/data-context/useData.js +1 -17
- package/cjs/extensions/forms/Form/data-context/useData.js.map +1 -1
- package/cjs/extensions/forms/Form/data-context/useError.d.ts +2 -1
- package/cjs/extensions/forms/Form/data-context/useError.js +4 -2
- package/cjs/extensions/forms/Form/data-context/useError.js.map +1 -1
- package/cjs/extensions/forms/Value/Number/Number.d.ts +2 -2
- package/cjs/extensions/forms/Value/Number/Number.js +1 -1
- package/cjs/extensions/forms/Value/Number/Number.js.map +1 -1
- package/cjs/extensions/forms/hooks/useDataValue.d.ts +4 -12
- package/cjs/extensions/forms/hooks/useDataValue.js +3 -3
- package/cjs/extensions/forms/hooks/useDataValue.js.map +1 -1
- package/cjs/extensions/forms/hooks/useMounted.d.ts +2 -0
- package/cjs/extensions/forms/hooks/useMounted.js +19 -0
- package/cjs/extensions/forms/hooks/useMounted.js.map +1 -0
- package/cjs/extensions/forms/style/dnb-forms.css +8 -2
- package/cjs/extensions/forms/style/dnb-forms.min.css +1 -1
- package/cjs/extensions/forms/types.d.ts +2 -0
- package/cjs/extensions/forms/types.js.map +1 -1
- package/cjs/extensions/payment-card/utils/CardDesigns.d.ts +96 -96
- package/cjs/fragments/drawer-list/DrawerListHelpers.d.ts +52 -52
- package/cjs/shared/Eufemia.d.ts +1 -1
- package/cjs/shared/Eufemia.js +2 -2
- package/cjs/shared/Eufemia.js.map +1 -1
- package/cjs/shared/Theme.d.ts +7 -1
- package/cjs/shared/Theme.js +20 -7
- package/cjs/shared/Theme.js.map +1 -1
- package/cjs/shared/helpers/debounce.d.ts +37 -0
- package/cjs/shared/helpers/debounce.js +92 -0
- package/cjs/shared/helpers/debounce.js.map +1 -0
- package/cjs/shared/helpers/useSharedState.d.ts +1 -0
- package/cjs/shared/helpers/useSharedState.js +52 -20
- package/cjs/shared/helpers/useSharedState.js.map +1 -1
- package/cjs/shared/helpers/withCamelCaseProps.d.ts +7 -0
- package/cjs/shared/helpers/withCamelCaseProps.js.map +1 -1
- package/cjs/shared/helpers.d.ts +1 -25
- package/cjs/shared/helpers.js +15 -37
- package/cjs/shared/helpers.js.map +1 -1
- package/cjs/shared/useTheme.d.ts +1 -0
- package/cjs/style/dnb-ui-components.css +119 -73
- package/cjs/style/dnb-ui-components.min.css +3 -3
- package/cjs/style/dnb-ui-extensions.css +8 -2
- package/cjs/style/dnb-ui-extensions.min.css +1 -1
- package/cjs/style/dnb-ui-forms.css +8 -2
- package/cjs/style/dnb-ui-forms.min.css +1 -1
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.css +127 -75
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.min.css +3 -3
- package/cjs/style/themes/theme-eiendom/eiendom-theme-extensions.css +8 -2
- package/cjs/style/themes/theme-eiendom/eiendom-theme-extensions.min.css +1 -1
- package/cjs/style/themes/theme-eiendom/eiendom-theme-forms.css +8 -2
- package/cjs/style/themes/theme-eiendom/eiendom-theme-forms.min.css +1 -1
- package/cjs/style/themes/theme-sbanken/sbanken-theme-basis.css +1 -0
- package/cjs/style/themes/theme-sbanken/sbanken-theme-basis.min.css +1 -1
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.css +160 -86
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.min.css +8 -6
- package/cjs/style/themes/theme-sbanken/sbanken-theme-elements.css +1 -0
- package/cjs/style/themes/theme-sbanken/sbanken-theme-elements.min.css +1 -1
- package/cjs/style/themes/theme-sbanken/sbanken-theme-extensions.css +8 -2
- package/cjs/style/themes/theme-sbanken/sbanken-theme-extensions.min.css +1 -1
- package/cjs/style/themes/theme-sbanken/sbanken-theme-forms.css +8 -2
- package/cjs/style/themes/theme-sbanken/sbanken-theme-forms.min.css +1 -1
- package/cjs/style/themes/theme-ui/prism/dnb-prism-theme.d.ts +3 -3
- package/cjs/style/themes/theme-ui/ui-theme-components.css +127 -75
- package/cjs/style/themes/theme-ui/ui-theme-components.min.css +3 -3
- package/cjs/style/themes/theme-ui/ui-theme-extensions.css +8 -2
- package/cjs/style/themes/theme-ui/ui-theme-extensions.min.css +1 -1
- package/cjs/style/themes/theme-ui/ui-theme-forms.css +8 -2
- package/cjs/style/themes/theme-ui/ui-theme-forms.min.css +1 -1
- package/components/aria-live/useAriaLive.d.ts +1 -1
- package/components/breadcrumb/Breadcrumb.d.ts +2 -2
- package/components/breadcrumb/Breadcrumb.js +3 -3
- package/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/components/breadcrumb/style/dnb-breadcrumb.css +7 -2
- package/components/breadcrumb/style/dnb-breadcrumb.min.css +1 -1
- package/components/breadcrumb/style/dnb-breadcrumb.scss +10 -2
- package/components/button/Button.js +2 -2
- package/components/button/Button.js.map +1 -1
- package/components/button/style/themes/dnb-button-theme-sbanken.css +23 -11
- package/components/button/style/themes/dnb-button-theme-sbanken.min.css +3 -3
- package/components/button/style/themes/dnb-button-theme-sbanken.scss +30 -14
- package/components/card/style/dnb-card.css +11 -2
- package/components/card/style/dnb-card.min.css +1 -1
- package/components/card/style/dnb-card.scss +12 -2
- package/components/form-label/style/dnb-form-label.css +4 -1
- package/components/form-label/style/dnb-form-label.min.css +1 -1
- package/components/form-label/style/dnb-form-label.scss +5 -2
- package/components/global-status/GlobalStatus.d.ts +1 -1
- package/components/global-status/GlobalStatusProvider.d.ts +1 -1
- package/components/height-animation/HeightAnimationInstance.d.ts +5 -6
- package/components/height-animation/HeightAnimationInstance.js +12 -12
- package/components/height-animation/HeightAnimationInstance.js.map +1 -1
- package/components/height-animation/useHeightAnimation.js +11 -10
- package/components/height-animation/useHeightAnimation.js.map +1 -1
- package/components/input/Input.d.ts +1 -1
- package/components/pagination/InfinityScroller.d.ts +1 -1
- package/components/progress-indicator/ProgressIndicator.js +5 -7
- package/components/progress-indicator/ProgressIndicator.js.map +1 -1
- package/components/progress-indicator/ProgressIndicatorCircular.js +1 -1
- package/components/progress-indicator/ProgressIndicatorCircular.js.map +1 -1
- package/components/progress-indicator/ProgressIndicatorLinear.js +4 -4
- package/components/progress-indicator/ProgressIndicatorLinear.js.map +1 -1
- package/components/progress-indicator/style/dnb-progress-indicator.css +5 -2
- package/components/progress-indicator/style/dnb-progress-indicator.min.css +1 -1
- package/components/progress-indicator/style/dnb-progress-indicator.scss +5 -2
- package/components/space/SpacingHelper.d.ts +5 -5
- package/components/table/Table.js +1 -1
- package/components/table/Table.js.map +1 -1
- package/components/table/TableAccordion.js +38 -53
- package/components/table/TableAccordion.js.map +1 -1
- package/components/table/TableAccordionTd.d.ts +9 -0
- package/{es/components/table/TableAccordionContent.js → components/table/TableAccordionTd.js} +14 -48
- package/components/table/TableAccordionTd.js.map +1 -0
- package/components/table/TableAccordionTr.d.ts +13 -0
- package/components/table/TableAccordionTr.js +51 -0
- package/components/table/TableAccordionTr.js.map +1 -0
- package/components/table/TableContext.d.ts +2 -2
- package/components/table/TableContext.js +2 -2
- package/components/table/TableContext.js.map +1 -1
- package/components/table/TableTd.d.ts +2 -2
- package/components/table/TableTd.js +2 -2
- package/components/table/TableTd.js.map +1 -1
- package/components/table/TableTr.d.ts +6 -1
- package/components/table/TableTr.js +9 -4
- package/components/table/TableTr.js.map +1 -1
- package/components/table/style/dnb-table.css +84 -64
- package/components/table/style/dnb-table.min.css +1 -1
- package/components/table/style/dnb-table.scss +1 -1
- package/components/table/style/table-accordion.scss +62 -44
- package/components/table/style/table-td.scss +1 -1
- package/components/table/style/themes/dnb-table-theme-sbanken.css +10 -0
- package/components/table/style/themes/dnb-table-theme-sbanken.min.css +3 -1
- package/components/table/style/themes/dnb-table-theme-sbanken.scss +14 -0
- package/components/table/useTableAnimationHandler.d.ts +20 -0
- package/components/table/useTableAnimationHandler.js +63 -0
- package/components/table/useTableAnimationHandler.js.map +1 -0
- package/elements/blockquote/style/themes/dnb-blockquote-theme-sbanken.scss +1 -0
- package/es/components/aria-live/useAriaLive.d.ts +1 -1
- package/es/components/breadcrumb/Breadcrumb.d.ts +2 -2
- package/es/components/breadcrumb/Breadcrumb.js +3 -3
- package/es/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/es/components/breadcrumb/style/dnb-breadcrumb.css +7 -2
- package/es/components/breadcrumb/style/dnb-breadcrumb.min.css +1 -1
- package/es/components/breadcrumb/style/dnb-breadcrumb.scss +10 -2
- package/es/components/button/Button.js +2 -2
- package/es/components/button/Button.js.map +1 -1
- package/es/components/button/style/themes/dnb-button-theme-sbanken.css +23 -11
- package/es/components/button/style/themes/dnb-button-theme-sbanken.min.css +3 -3
- package/es/components/button/style/themes/dnb-button-theme-sbanken.scss +30 -14
- package/es/components/card/style/dnb-card.css +11 -2
- package/es/components/card/style/dnb-card.min.css +1 -1
- package/es/components/card/style/dnb-card.scss +12 -2
- package/es/components/form-label/style/dnb-form-label.css +4 -1
- package/es/components/form-label/style/dnb-form-label.min.css +1 -1
- package/es/components/form-label/style/dnb-form-label.scss +5 -2
- package/es/components/global-status/GlobalStatus.d.ts +1 -1
- package/es/components/global-status/GlobalStatusProvider.d.ts +1 -1
- package/es/components/height-animation/HeightAnimationInstance.d.ts +5 -6
- package/es/components/height-animation/HeightAnimationInstance.js +12 -12
- package/es/components/height-animation/HeightAnimationInstance.js.map +1 -1
- package/es/components/height-animation/useHeightAnimation.js +11 -10
- package/es/components/height-animation/useHeightAnimation.js.map +1 -1
- package/es/components/input/Input.d.ts +1 -1
- package/es/components/pagination/InfinityScroller.d.ts +1 -1
- package/es/components/progress-indicator/ProgressIndicator.js +5 -7
- package/es/components/progress-indicator/ProgressIndicator.js.map +1 -1
- package/es/components/progress-indicator/ProgressIndicatorCircular.js +1 -1
- package/es/components/progress-indicator/ProgressIndicatorCircular.js.map +1 -1
- package/es/components/progress-indicator/ProgressIndicatorLinear.js +4 -4
- package/es/components/progress-indicator/ProgressIndicatorLinear.js.map +1 -1
- package/es/components/progress-indicator/style/dnb-progress-indicator.css +5 -2
- package/es/components/progress-indicator/style/dnb-progress-indicator.min.css +1 -1
- package/es/components/progress-indicator/style/dnb-progress-indicator.scss +5 -2
- package/es/components/space/SpacingHelper.d.ts +5 -5
- package/es/components/table/Table.js +1 -1
- package/es/components/table/Table.js.map +1 -1
- package/es/components/table/TableAccordion.js +38 -53
- package/es/components/table/TableAccordion.js.map +1 -1
- package/es/components/table/TableAccordionTd.d.ts +9 -0
- package/{components/table/TableAccordionContent.js → es/components/table/TableAccordionTd.js} +14 -49
- package/es/components/table/TableAccordionTd.js.map +1 -0
- package/es/components/table/TableAccordionTr.d.ts +13 -0
- package/es/components/table/TableAccordionTr.js +51 -0
- package/es/components/table/TableAccordionTr.js.map +1 -0
- package/es/components/table/TableContext.d.ts +2 -2
- package/es/components/table/TableContext.js +2 -2
- package/es/components/table/TableContext.js.map +1 -1
- package/es/components/table/TableTd.d.ts +2 -2
- package/es/components/table/TableTd.js +2 -2
- package/es/components/table/TableTd.js.map +1 -1
- package/es/components/table/TableTr.d.ts +6 -1
- package/es/components/table/TableTr.js +9 -4
- package/es/components/table/TableTr.js.map +1 -1
- package/es/components/table/style/dnb-table.css +84 -64
- package/es/components/table/style/dnb-table.min.css +1 -1
- package/es/components/table/style/dnb-table.scss +1 -1
- package/es/components/table/style/table-accordion.scss +62 -44
- package/es/components/table/style/table-td.scss +1 -1
- package/es/components/table/style/themes/dnb-table-theme-sbanken.css +10 -0
- package/es/components/table/style/themes/dnb-table-theme-sbanken.min.css +3 -1
- package/es/components/table/style/themes/dnb-table-theme-sbanken.scss +14 -0
- package/es/components/table/useTableAnimationHandler.d.ts +20 -0
- package/es/components/table/useTableAnimationHandler.js +62 -0
- package/es/components/table/useTableAnimationHandler.js.map +1 -0
- package/es/elements/blockquote/style/themes/dnb-blockquote-theme-sbanken.scss +1 -0
- package/es/extensions/forms/DataContext/Context.d.ts +1 -3
- package/es/extensions/forms/DataContext/Context.js.map +1 -1
- package/es/extensions/forms/DataContext/Provider/Provider.d.ts +1 -2
- package/es/extensions/forms/DataContext/Provider/Provider.js +1 -5
- package/es/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
- package/es/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
- package/es/extensions/forms/FieldBlock/FieldBlockContext.d.ts +1 -2
- package/es/extensions/forms/FieldBlock/FieldBlockContext.js.map +1 -1
- package/es/extensions/forms/FieldBlock/style/dnb-field-block.css +2 -2
- package/es/extensions/forms/FieldBlock/style/dnb-field-block.min.css +1 -1
- package/es/extensions/forms/FieldBlock/style/dnb-field-block.scss +2 -0
- package/es/extensions/forms/Form/ButtonRow/style/dnb-form-button-row.css +6 -0
- package/es/extensions/forms/Form/ButtonRow/style/dnb-form-button-row.min.css +1 -1
- package/es/extensions/forms/Form/ButtonRow/style/dnb-form-button-row.scss +10 -2
- package/es/extensions/forms/Form/data-context/useData.d.ts +1 -1
- package/es/extensions/forms/Form/data-context/useData.js +2 -18
- package/es/extensions/forms/Form/data-context/useData.js.map +1 -1
- package/es/extensions/forms/Form/data-context/useError.d.ts +2 -1
- package/es/extensions/forms/Form/data-context/useError.js +4 -2
- package/es/extensions/forms/Form/data-context/useError.js.map +1 -1
- package/es/extensions/forms/Value/Number/Number.d.ts +2 -2
- package/es/extensions/forms/Value/Number/Number.js +1 -1
- package/es/extensions/forms/Value/Number/Number.js.map +1 -1
- package/es/extensions/forms/hooks/useDataValue.d.ts +4 -12
- package/es/extensions/forms/hooks/useDataValue.js +5 -5
- package/es/extensions/forms/hooks/useDataValue.js.map +1 -1
- package/es/extensions/forms/hooks/useMounted.d.ts +2 -0
- package/es/extensions/forms/hooks/useMounted.js +14 -0
- package/es/extensions/forms/hooks/useMounted.js.map +1 -0
- package/es/extensions/forms/style/dnb-forms.css +8 -2
- package/es/extensions/forms/style/dnb-forms.min.css +1 -1
- package/es/extensions/forms/types.d.ts +2 -0
- package/es/extensions/forms/types.js.map +1 -1
- package/es/extensions/payment-card/utils/CardDesigns.d.ts +96 -96
- package/es/fragments/drawer-list/DrawerListHelpers.d.ts +52 -52
- package/es/shared/Eufemia.d.ts +1 -1
- package/es/shared/Eufemia.js +2 -2
- package/es/shared/Eufemia.js.map +1 -1
- package/es/shared/Theme.d.ts +7 -1
- package/es/shared/Theme.js +20 -7
- package/es/shared/Theme.js.map +1 -1
- package/es/shared/helpers/debounce.d.ts +37 -0
- package/es/shared/helpers/debounce.js +76 -0
- package/es/shared/helpers/debounce.js.map +1 -0
- package/es/shared/helpers/useSharedState.d.ts +1 -0
- package/es/shared/helpers/useSharedState.js +49 -20
- package/es/shared/helpers/useSharedState.js.map +1 -1
- package/es/shared/helpers/withCamelCaseProps.d.ts +7 -0
- package/es/shared/helpers/withCamelCaseProps.js.map +1 -1
- package/es/shared/helpers.d.ts +1 -25
- package/es/shared/helpers.js +1 -29
- package/es/shared/helpers.js.map +1 -1
- package/es/shared/useTheme.d.ts +1 -0
- package/es/style/dnb-ui-components.css +119 -73
- package/es/style/dnb-ui-components.min.css +3 -3
- package/es/style/dnb-ui-extensions.css +8 -2
- package/es/style/dnb-ui-extensions.min.css +1 -1
- package/es/style/dnb-ui-forms.css +8 -2
- package/es/style/dnb-ui-forms.min.css +1 -1
- package/es/style/themes/theme-eiendom/eiendom-theme-components.css +127 -75
- package/es/style/themes/theme-eiendom/eiendom-theme-components.min.css +3 -3
- package/es/style/themes/theme-eiendom/eiendom-theme-extensions.css +8 -2
- package/es/style/themes/theme-eiendom/eiendom-theme-extensions.min.css +1 -1
- package/es/style/themes/theme-eiendom/eiendom-theme-forms.css +8 -2
- package/es/style/themes/theme-eiendom/eiendom-theme-forms.min.css +1 -1
- package/es/style/themes/theme-sbanken/sbanken-theme-basis.css +1 -0
- package/es/style/themes/theme-sbanken/sbanken-theme-basis.min.css +1 -1
- package/es/style/themes/theme-sbanken/sbanken-theme-components.css +160 -86
- package/es/style/themes/theme-sbanken/sbanken-theme-components.min.css +8 -6
- package/es/style/themes/theme-sbanken/sbanken-theme-elements.css +1 -0
- package/es/style/themes/theme-sbanken/sbanken-theme-elements.min.css +1 -1
- package/es/style/themes/theme-sbanken/sbanken-theme-extensions.css +8 -2
- package/es/style/themes/theme-sbanken/sbanken-theme-extensions.min.css +1 -1
- package/es/style/themes/theme-sbanken/sbanken-theme-forms.css +8 -2
- package/es/style/themes/theme-sbanken/sbanken-theme-forms.min.css +1 -1
- package/es/style/themes/theme-ui/prism/dnb-prism-theme.d.ts +3 -3
- package/es/style/themes/theme-ui/ui-theme-components.css +127 -75
- package/es/style/themes/theme-ui/ui-theme-components.min.css +3 -3
- package/es/style/themes/theme-ui/ui-theme-extensions.css +8 -2
- package/es/style/themes/theme-ui/ui-theme-extensions.min.css +1 -1
- package/es/style/themes/theme-ui/ui-theme-forms.css +8 -2
- package/es/style/themes/theme-ui/ui-theme-forms.min.css +1 -1
- package/esm/dnb-ui-basis.min.mjs +1 -1
- package/esm/dnb-ui-components.min.mjs +1 -1
- package/esm/dnb-ui-elements.min.mjs +1 -1
- package/esm/dnb-ui-extensions.min.mjs +3 -3
- package/esm/dnb-ui-lib.min.mjs +1 -1
- package/extensions/forms/DataContext/Context.d.ts +1 -3
- package/extensions/forms/DataContext/Context.js.map +1 -1
- package/extensions/forms/DataContext/Provider/Provider.d.ts +1 -2
- package/extensions/forms/DataContext/Provider/Provider.js +1 -5
- package/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
- package/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
- package/extensions/forms/FieldBlock/FieldBlockContext.d.ts +1 -2
- package/extensions/forms/FieldBlock/FieldBlockContext.js.map +1 -1
- package/extensions/forms/FieldBlock/style/dnb-field-block.css +2 -2
- package/extensions/forms/FieldBlock/style/dnb-field-block.min.css +1 -1
- package/extensions/forms/FieldBlock/style/dnb-field-block.scss +2 -0
- package/extensions/forms/Form/ButtonRow/style/dnb-form-button-row.css +6 -0
- package/extensions/forms/Form/ButtonRow/style/dnb-form-button-row.min.css +1 -1
- package/extensions/forms/Form/ButtonRow/style/dnb-form-button-row.scss +10 -2
- package/extensions/forms/Form/data-context/useData.d.ts +1 -1
- package/extensions/forms/Form/data-context/useData.js +2 -18
- package/extensions/forms/Form/data-context/useData.js.map +1 -1
- package/extensions/forms/Form/data-context/useError.d.ts +2 -1
- package/extensions/forms/Form/data-context/useError.js +4 -2
- package/extensions/forms/Form/data-context/useError.js.map +1 -1
- package/extensions/forms/Value/Number/Number.d.ts +2 -2
- package/extensions/forms/Value/Number/Number.js +1 -1
- package/extensions/forms/Value/Number/Number.js.map +1 -1
- package/extensions/forms/hooks/useDataValue.d.ts +4 -12
- package/extensions/forms/hooks/useDataValue.js +5 -5
- package/extensions/forms/hooks/useDataValue.js.map +1 -1
- package/extensions/forms/hooks/useMounted.d.ts +2 -0
- package/extensions/forms/hooks/useMounted.js +14 -0
- package/extensions/forms/hooks/useMounted.js.map +1 -0
- package/extensions/forms/style/dnb-forms.css +8 -2
- package/extensions/forms/style/dnb-forms.min.css +1 -1
- package/extensions/forms/types.d.ts +2 -0
- package/extensions/forms/types.js.map +1 -1
- package/extensions/payment-card/utils/CardDesigns.d.ts +96 -96
- package/fragments/drawer-list/DrawerListHelpers.d.ts +52 -52
- package/package.json +1 -1
- package/shared/Eufemia.d.ts +1 -1
- package/shared/Eufemia.js +2 -2
- package/shared/Eufemia.js.map +1 -1
- package/shared/Theme.d.ts +7 -1
- package/shared/Theme.js +20 -7
- package/shared/Theme.js.map +1 -1
- package/shared/helpers/debounce.d.ts +37 -0
- package/shared/helpers/debounce.js +83 -0
- package/shared/helpers/debounce.js.map +1 -0
- package/shared/helpers/useSharedState.d.ts +1 -0
- package/shared/helpers/useSharedState.js +49 -20
- package/shared/helpers/useSharedState.js.map +1 -1
- package/shared/helpers/withCamelCaseProps.d.ts +7 -0
- package/shared/helpers/withCamelCaseProps.js.map +1 -1
- package/shared/helpers.d.ts +1 -25
- package/shared/helpers.js +3 -36
- package/shared/helpers.js.map +1 -1
- package/shared/useTheme.d.ts +1 -0
- package/style/dnb-ui-components.css +119 -73
- package/style/dnb-ui-components.min.css +3 -3
- package/style/dnb-ui-extensions.css +8 -2
- package/style/dnb-ui-extensions.min.css +1 -1
- package/style/dnb-ui-forms.css +8 -2
- package/style/dnb-ui-forms.min.css +1 -1
- package/style/themes/theme-eiendom/eiendom-theme-components.css +127 -75
- package/style/themes/theme-eiendom/eiendom-theme-components.min.css +3 -3
- package/style/themes/theme-eiendom/eiendom-theme-extensions.css +8 -2
- package/style/themes/theme-eiendom/eiendom-theme-extensions.min.css +1 -1
- package/style/themes/theme-eiendom/eiendom-theme-forms.css +8 -2
- package/style/themes/theme-eiendom/eiendom-theme-forms.min.css +1 -1
- package/style/themes/theme-sbanken/sbanken-theme-basis.css +1 -0
- package/style/themes/theme-sbanken/sbanken-theme-basis.min.css +1 -1
- package/style/themes/theme-sbanken/sbanken-theme-components.css +160 -86
- package/style/themes/theme-sbanken/sbanken-theme-components.min.css +8 -6
- package/style/themes/theme-sbanken/sbanken-theme-elements.css +1 -0
- package/style/themes/theme-sbanken/sbanken-theme-elements.min.css +1 -1
- package/style/themes/theme-sbanken/sbanken-theme-extensions.css +8 -2
- package/style/themes/theme-sbanken/sbanken-theme-extensions.min.css +1 -1
- package/style/themes/theme-sbanken/sbanken-theme-forms.css +8 -2
- package/style/themes/theme-sbanken/sbanken-theme-forms.min.css +1 -1
- package/style/themes/theme-ui/prism/dnb-prism-theme.d.ts +3 -3
- package/style/themes/theme-ui/ui-theme-components.css +127 -75
- package/style/themes/theme-ui/ui-theme-components.min.css +3 -3
- package/style/themes/theme-ui/ui-theme-extensions.css +8 -2
- package/style/themes/theme-ui/ui-theme-extensions.min.css +1 -1
- package/style/themes/theme-ui/ui-theme-forms.css +8 -2
- package/style/themes/theme-ui/ui-theme-forms.min.css +1 -1
- package/umd/dnb-ui-basis.min.js +1 -1
- package/umd/dnb-ui-components.min.js +1 -1
- package/umd/dnb-ui-elements.min.js +1 -1
- package/umd/dnb-ui-extensions.min.js +3 -3
- package/umd/dnb-ui-lib.min.js +1 -1
- package/cjs/components/table/TableAccordionContent.d.ts +0 -18
- package/cjs/components/table/TableAccordionContent.js.map +0 -1
- package/components/table/TableAccordionContent.d.ts +0 -18
- package/components/table/TableAccordionContent.js.map +0 -1
- package/es/components/table/TableAccordionContent.d.ts +0 -18
- package/es/components/table/TableAccordionContent.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Number.js","names":["_react","_interopRequireDefault","require","_classnames","_ValueBlock","_useDataValue2","_interopRequireWildcard","_utils","_NumberFormat","_withCamelCaseProps","_excluded","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","NumberValue","props","_useDataValue","useDataValue","className","label","placeholder","inline","showEmpty","rest","numberFormatProps","convertCamelCaseProps","
|
|
1
|
+
{"version":3,"file":"Number.js","names":["_react","_interopRequireDefault","require","_classnames","_ValueBlock","_useDataValue2","_interopRequireWildcard","_utils","_NumberFormat","_withCamelCaseProps","_excluded","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","NumberValue","props","_useDataValue","useDataValue","className","label","placeholder","inline","showEmpty","rest","numberFormatProps","convertCamelCaseProps","omitDataValueProps","omitSpacingProps","createElement","classnames","pickSpacingProps","value","_supportsSpacingProps","_default","exports"],"sources":["../../../../../../src/extensions/forms/Value/Number/Number.tsx"],"sourcesContent":["import React from 'react'\nimport classnames from 'classnames'\nimport ValueBlock from '../../ValueBlock'\nimport useDataValue, { omitDataValueProps } from '../../hooks/useDataValue'\nimport { ValueProps } from '../../types'\nimport {\n omitSpacingProps,\n pickSpacingProps,\n} from '../../../../components/flex/utils'\nimport NumberFormat, {\n NumberFormatProps,\n} from '../../../../components/NumberFormat'\nimport {\n IncludeCamelCase,\n convertCamelCaseProps,\n} from '../../../../shared/helpers/withCamelCaseProps'\n\nexport type Props = ValueProps<number> &\n IncludeCamelCase<NumberFormatProps>\n\nfunction NumberValue(props: Props) {\n const { className, label, placeholder, inline, showEmpty, ...rest } =\n useDataValue(props)\n\n const numberFormatProps = convertCamelCaseProps(\n omitDataValueProps(omitSpacingProps(rest))\n )\n\n return (\n <ValueBlock\n className={classnames('dnb-forms-value-number', className)}\n label={label}\n showEmpty={showEmpty}\n placeholder={placeholder}\n inline={inline}\n {...pickSpacingProps(rest)}\n >\n {rest.value && <NumberFormat {...numberFormatProps} />}\n </ValueBlock>\n )\n}\n\nNumberValue._supportsSpacingProps = true\nexport default NumberValue\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,cAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAIA,IAAAM,aAAA,GAAAP,sBAAA,CAAAC,OAAA;AAGA,IAAAO,mBAAA,GAAAP,OAAA;AAGsD,MAAAQ,SAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAN,wBAAAU,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAA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X,IAAAS,uBAAgB,EAACP,IAAI,CAAC,GAEzBA,IAAI,CAACQ,KAAK,IAAIpE,MAAA,CAAAkB,OAAA,CAAA+C,aAAA,CAACzD,aAAA,CAAAU,OAAY,EAAK2C,iBAAoB,CAC3C,CAAC;AAEjB;AAEAV,WAAW,CAACkB,qBAAqB,GAAG,IAAI;AAAA,IAAAC,QAAA,GACzBnB,WAAW;AAAAoB,OAAA,CAAArD,OAAA,GAAAoD,QAAA"}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import { AriaAttributes } from 'react';
|
|
2
2
|
import { FieldProps } from '../types';
|
|
3
3
|
import { ContextState } from '../DataContext';
|
|
4
|
-
export default function useDataValue<Value = unknown, Props extends FieldProps<Value> = FieldProps<Value>>(props: Props): Props & ReturnAdditional<Value>;
|
|
4
|
+
export default function useDataValue<Value = unknown, Props extends FieldProps<Value> = FieldProps<Value>>(props: Props): Props & FieldProps<Value> & ReturnAdditional<Value>;
|
|
5
5
|
interface ReturnAdditional<Value> {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
6
|
value: Value;
|
|
9
|
-
error: FieldProps<unknown>['error'];
|
|
10
|
-
warning: FieldProps<unknown>['warning'];
|
|
11
|
-
info: FieldProps<unknown>['info'];
|
|
12
|
-
autoComplete: HTMLInputElement['autocomplete'];
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
hasError: boolean;
|
|
15
7
|
isChanged: boolean;
|
|
16
|
-
dataContext: ContextState;
|
|
17
8
|
ariaAttributes: AriaAttributes;
|
|
9
|
+
dataContext: ContextState;
|
|
18
10
|
setHasFocus: (hasFocus: boolean, valueOverride?: unknown) => void;
|
|
19
11
|
handleFocus: () => void;
|
|
20
12
|
handleBlur: () => void;
|
|
21
|
-
handleChange: FieldProps<
|
|
13
|
+
handleChange: FieldProps<Value>['onChange'];
|
|
22
14
|
updateValue: (value: Value) => void;
|
|
23
15
|
forceUpdate: () => void;
|
|
24
16
|
}
|
|
25
|
-
export declare function omitDataValueProps<
|
|
17
|
+
export declare function omitDataValueProps<Props extends FieldProps<unknown> & ReturnAdditional<unknown>>(props: Props): Omit<Props, "error" | "info" | "autoComplete" | "name" | "hasError" | "warning" | "forceUpdate" | "isChanged" | "handleChange" | "ariaAttributes" | "dataContext" | "setHasFocus" | "handleFocus" | "handleBlur" | "updateValue">;
|
|
26
18
|
export {};
|
|
@@ -424,9 +424,9 @@ function useDataValue(props) {
|
|
|
424
424
|
warning: !inFieldBlock ? warning : undefined,
|
|
425
425
|
error: !inFieldBlock ? error : undefined,
|
|
426
426
|
hasError,
|
|
427
|
-
isChanged: changedRef.current,
|
|
428
|
-
autoComplete: (_props$autoComplete = props.autoComplete) !== null && _props$autoComplete !== void 0 ? _props$autoComplete : dataContext.autoComplete === true ? 'on' : 'off',
|
|
429
427
|
disabled,
|
|
428
|
+
autoComplete: (_props$autoComplete = props.autoComplete) !== null && _props$autoComplete !== void 0 ? _props$autoComplete : dataContext.autoComplete === true ? 'on' : 'off',
|
|
429
|
+
isChanged: changedRef.current,
|
|
430
430
|
ariaAttributes,
|
|
431
431
|
dataContext,
|
|
432
432
|
setHasFocus,
|
|
@@ -456,6 +456,6 @@ function omitDataValueProps(props) {
|
|
|
456
456
|
forceUpdate
|
|
457
457
|
} = props,
|
|
458
458
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
459
|
-
return
|
|
459
|
+
return restProps;
|
|
460
460
|
}
|
|
461
461
|
//# sourceMappingURL=useDataValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDataValue.js","names":["_react","require","_jsonPointer","_interopRequireDefault","_utils","_ajv","_types","_DataContext","_componentHelper","_Context","_FieldBlockContext","_IterateElementContext","_useMountEffect","_useUnmountEffect","_useUpdateEffect","_useProcessManager","_useId","_excluded","obj","__esModule","default","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","key","i","Object","getOwnPropertySymbols","sourceSymbolKeys","length","indexOf","prototype","propertyIsEnumerable","call","sourceKeys","keys","ownKeys","object","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","useDataValue","props","_props$disabled","_dataContext$ajvInsta","_this","_ref3","_props$path","_props$autoComplete","path","itemPath","emptyValue","required","info","warning","error","errorProp","errorMessages","onFocus","onBlur","onChange","onBlurValidator","validator","schema","validateInitially","validateUnchanged","continuousValidation","toInput","fromInput","toEvent","transformValue","fromExternal","validateRequired","_ref","disabled","readOnly","forceUpdate","useReducer","startProcess","useProcessManager","id","useId","dataContext","useContext","Context","fieldBlockContext","FieldBlockContext","iterateElementContext","IterateElementContext","sharedContext","SharedContext","tr","translation","Forms","transformers","useRef","handlePathChange","dataContextHandlePathChange","updateDataValue","dataContextUpdateDataValue","validateData","dataContextValidateData","setValueWithError","dataContextSetValueWithError","setProps","dataContextSetProps","errors","dataContextErrors","contextErrorMessages","dataContextError","inFieldBlock","Boolean","setFieldState","setFieldBlockState","showFieldError","showFieldBlockError","inIterate","index","iterateElementIndex","iterateElementValue","handleChange","handleIterateElementChange","substring","Error","identifier","useMemo","externalValue","current","pointer","has","get","data","valueRef","changedRef","hasFocusRef","showErrorInitially","localErrorRef","contextErrorRef","showErrorRef","validatorRef","useUpdateEffect","schemaValidatorRef","ajvInstance","compile","showError","useCallback","hideError","errorMessagesRef","fieldErrorRequired","prepareError","FormError","_error$messageValues","message","validationRule","_errorMessagesRef$cur","fieldMessage","messageWithValues","entries","messageValues","reduce","_ref2","replace","stateId","persistErrorState","errorArg","errorChanged","type","state","showInitially","clearErrorState","validateValue","isProcessActive","requiredError","isChanged","ajvErrorsToOneFormError","_validatorRef$current","_dataContext$ajvInsta2","useEffect","showAllErrors","hasValue","existingValue","handleError","setHasFocus","hasFocus","valueOverride","Promise","resolve","then","updateValue","newValue","argFromInput","additionalArgs","currentValue","iterateValuePath","handleFocus","handleBlur","useMountEffect","handleMountField","useUnmountEffect","handleUnMountField","show","mountedFieldsRef","hasError","hasErrorProp","ariaAttributes","acc","cur","startsWith","_fieldBlockContext$fi","stateIds","fieldStateIdsRef","combineDescribedBy","name","autoComplete","omitDataValueProps","restProps","freeze"],"sources":["../../../../../src/extensions/forms/hooks/useDataValue.ts"],"sourcesContent":["import {\n useRef,\n useEffect,\n useContext,\n useCallback,\n useMemo,\n useReducer,\n AriaAttributes,\n} from 'react'\nimport pointer from 'json-pointer'\nimport { ValidateFunction } from 'ajv/dist/2020'\nimport { errorChanged } from '../utils'\nimport { ajvErrorsToOneFormError } from '../utils/ajv'\nimport { FormError, FieldProps, AdditionalEventArgs } from '../types'\nimport { Context, ContextState } from '../DataContext'\nimport { combineDescribedBy } from '../../../shared/component-helper'\nimport SharedContext from '../../../shared/Context'\nimport FieldBlockContext from '../FieldBlock/FieldBlockContext'\nimport IterateElementContext from '../Iterate/IterateElementContext'\nimport useMountEffect from './useMountEffect'\nimport useUnmountEffect from './useUnmountEffect'\nimport useUpdateEffect from './useUpdateEffect'\nimport useProcessManager from './useProcessManager'\nimport useId from './useId'\n\nexport default function useDataValue<\n Value = unknown,\n Props extends FieldProps<Value> = FieldProps<Value>,\n>(props: Props): Props & ReturnAdditional<Value> {\n const {\n path,\n itemPath,\n emptyValue,\n required,\n info,\n warning,\n error: errorProp,\n errorMessages,\n onFocus,\n onBlur,\n onChange,\n onBlurValidator,\n validator,\n schema,\n validateInitially,\n validateUnchanged,\n continuousValidation,\n toInput = (value: Value) => value,\n fromInput = (value: Value) => value,\n toEvent = (value: Value) => value,\n transformValue = (value: Value) => value,\n fromExternal = (value: Value) => value,\n validateRequired = (value: Value, { emptyValue, required, error }) => {\n const res =\n required &&\n (value === emptyValue ||\n (typeof emptyValue === 'undefined' && value === ''))\n ? error\n : undefined\n return res\n },\n } = props\n\n const disabled = props.disabled ?? props.readOnly\n\n const [, forceUpdate] = useReducer(() => ({}), {})\n const { startProcess } = useProcessManager()\n const id = useId(props.id)\n const dataContext = useContext(Context)\n const fieldBlockContext = useContext(FieldBlockContext)\n const iterateElementContext = useContext(IterateElementContext)\n const sharedContext = useContext(SharedContext)\n const tr = sharedContext?.translation.Forms\n\n const transformers = useRef({\n toInput,\n fromInput,\n toEvent,\n fromExternal,\n transformValue,\n validateRequired,\n })\n\n const {\n handlePathChange: dataContextHandlePathChange,\n updateDataValue: dataContextUpdateDataValue,\n validateData: dataContextValidateData,\n setValueWithError: dataContextSetValueWithError,\n setProps: dataContextSetProps,\n errors: dataContextErrors,\n contextErrorMessages,\n } = dataContext ?? {}\n\n const dataContextError = path ? dataContextErrors?.[path] : undefined\n const inFieldBlock = Boolean(fieldBlockContext)\n const {\n setFieldState: setFieldBlockState,\n showFieldError: showFieldBlockError,\n } = fieldBlockContext ?? {}\n const inIterate = Boolean(iterateElementContext)\n const {\n index: iterateElementIndex,\n value: iterateElementValue,\n handleChange: handleIterateElementChange,\n } = iterateElementContext ?? {}\n\n if (path && path.substring(0, 1) !== '/') {\n throw new Error(\n 'Invalid path. Data value path JSON Pointers must be from root (starting with a /).'\n )\n }\n if (itemPath && itemPath.substring(0, 1) !== '/') {\n throw new Error(\n 'Invalid itemPath. Item pathJSON Pointers must be from root of iterate element (starting with a /).'\n )\n }\n if (itemPath && !iterateElementContext) {\n throw new Error(\n 'itemPath cannot be used when not inside an iterate element context. Wrap the component in an Iterate.Loop.'\n )\n }\n\n const identifier = useMemo(() => {\n // Identifier is used is registries of multiple fields, like in the DataContext keeping track of errors\n return path ?? id\n }, [path, id])\n\n const externalValue = useMemo(() => {\n if (props.value !== undefined) {\n // Value-prop sent directly to the field has highest priority, overriding any surrounding source\n return transformers.current.fromExternal(props.value)\n }\n\n if (inIterate && itemPath) {\n // This field is inside an iterate, and has a pointer from the base of the element being iterated\n if (itemPath === '/') {\n return iterateElementValue\n }\n\n return pointer.has(iterateElementValue, itemPath)\n ? pointer.get(iterateElementValue, itemPath)\n : undefined\n }\n\n if (dataContext.data && path) {\n // There is a surrounding data context and a path for where in the source to find the data\n if (path === '/') {\n return dataContext.data\n }\n\n return pointer.has(dataContext.data, path)\n ? pointer.get(dataContext.data, path)\n : undefined\n }\n return undefined\n }, [\n props.value,\n inIterate,\n itemPath,\n dataContext.data,\n path,\n iterateElementValue,\n ])\n\n // Many variables are kept in refs to avoid triggering unnecessary update loops because updates using\n // useEffect depend on them (like the external `value`)\n\n // Hold an internal copy of the input value in case the input component is used uncontrolled,\n // and to handle errors in Eufemia on components that does not take updated callback functions into account.\n const valueRef = useRef<Value>(externalValue)\n const changedRef = useRef<boolean>(false)\n const hasFocusRef = useRef<boolean>(false)\n\n // Error handling\n // - Should errors received through validation be shown initially. Assume that providing a direct prop to\n // the component means it is supposed to be shown initially.\n const showErrorInitially = validateInitially || errorProp\n // - Local errors are errors based on validation instructions received by\n const localErrorRef = useRef<Error | FormError | undefined>()\n // - Context errors are from outer contexts, like validation for this field as part of the whole data set\n const contextErrorRef = useRef<Error | FormError | undefined>(\n dataContextError\n )\n\n // Put props into the surrounding data context\n dataContextSetProps?.(identifier, props)\n\n const showErrorRef = useRef<boolean>(Boolean(showErrorInitially))\n const validatorRef = useRef(validator)\n useUpdateEffect(() => {\n validatorRef.current = validator\n }, [validator])\n\n const schemaValidatorRef = useRef<ValidateFunction>(\n schema ? dataContext.ajvInstance?.compile(schema) : undefined\n )\n\n const showError = useCallback(() => {\n showErrorRef.current = true\n showFieldBlockError?.(identifier, true)\n }, [showFieldBlockError, identifier])\n\n const hideError = useCallback(() => {\n showErrorRef.current = false\n showFieldBlockError?.(identifier, false)\n }, [showFieldBlockError, identifier])\n\n const errorMessagesRef = useRef(null)\n errorMessagesRef.current = useMemo(() => {\n return {\n required: tr.fieldErrorRequired,\n ...errorMessages,\n }\n }, [errorMessages, tr.fieldErrorRequired])\n\n /**\n * Prepare error from validation logic with correct error messages based on props\n */\n const prepareError = useCallback(\n (error: Error | FormError | undefined): FormError | undefined => {\n if (error === undefined) {\n return\n }\n\n if (error instanceof FormError) {\n let message = error.message\n\n const { validationRule } = error\n if (typeof validationRule === 'string') {\n const fieldMessage = errorMessagesRef.current?.[validationRule]\n if (fieldMessage) {\n message = fieldMessage\n }\n }\n\n const messageWithValues = Object.entries(\n error.messageValues ?? {}\n ).reduce((message, [key, value]) => {\n return message.replace(`{${key}}`, value)\n }, message)\n\n return new FormError(messageWithValues)\n }\n\n return error\n },\n []\n )\n\n /**\n * Based on validation, update error state, locally and relevant surrounding contexts\n */\n const stateId = useId()\n const persistErrorState = useCallback(\n (errorArg: FormError | undefined) => {\n const error = prepareError(errorArg)\n\n if (!errorChanged(error, localErrorRef.current)) {\n // In case different triggers lead to validation with no changes in the result (like still no error, or the same error),\n // avoid unnecessary re-renders by letting the old error object stay in the state and skip re-rendering.\n return\n }\n\n localErrorRef.current = error\n\n // Tell the data context about the error, so it can stop the user from submitting the form until the error has been fixed\n dataContextSetValueWithError?.(identifier, Boolean(error))\n\n setFieldBlockState?.({\n stateId,\n identifier,\n type: 'error',\n state: error,\n showInitially: Boolean(inFieldBlock && validateInitially),\n })\n\n forceUpdate()\n },\n [\n stateId,\n prepareError,\n dataContextSetValueWithError,\n identifier,\n setFieldBlockState,\n inFieldBlock,\n validateInitially,\n ]\n )\n\n const clearErrorState = useCallback(\n () => persistErrorState(undefined),\n [persistErrorState]\n )\n\n /**\n * Validate the current state value by provided validator instructions\n */\n const validateValue = useCallback(async () => {\n const isProcessActive = startProcess()\n\n if (disabled) {\n if (isProcessActive()) {\n clearErrorState()\n }\n hideError()\n return\n }\n\n try {\n // Validate required\n const requiredError = transformers.current.validateRequired(\n valueRef.current,\n {\n emptyValue,\n required,\n isChanged: changedRef.current,\n error: new FormError('The value is required', {\n validationRule: 'required',\n }),\n }\n )\n if (requiredError instanceof Error) {\n throw requiredError\n }\n\n // Validate by provided JSON Schema for this value\n if (\n schemaValidatorRef.current &&\n valueRef.current !== undefined &&\n !schemaValidatorRef.current(valueRef.current)\n ) {\n const error = ajvErrorsToOneFormError(\n schemaValidatorRef.current.errors\n )\n throw error\n }\n\n // Validate by provided derivative validator\n if (validatorRef.current) {\n const res = await validatorRef.current?.(valueRef.current, {\n ...contextErrorMessages,\n ...errorMessagesRef.current,\n })\n if (res instanceof Error) {\n throw res\n }\n }\n\n if (isProcessActive()) {\n clearErrorState()\n }\n } catch (error: unknown) {\n if (isProcessActive()) {\n persistErrorState(error as Error)\n }\n }\n }, [\n startProcess,\n disabled,\n hideError,\n clearErrorState,\n emptyValue,\n required,\n contextErrorMessages,\n persistErrorState,\n ])\n\n useUpdateEffect(() => {\n schemaValidatorRef.current = schema\n ? dataContext.ajvInstance?.compile(schema)\n : undefined\n validateValue()\n }, [schema, validateValue])\n\n useUpdateEffect(() => {\n // Error or removed error for this field from the surrounding data context (by path)\n valueRef.current = externalValue\n validateValue()\n forceUpdate()\n }, [externalValue, validateValue])\n\n useEffect(() => {\n const error = prepareError(dataContextError)\n if (errorChanged(error, contextErrorRef.current)) {\n contextErrorRef.current = error\n forceUpdate()\n }\n }, [dataContextError, prepareError])\n\n useEffect(() => {\n if (dataContext.showAllErrors) {\n // If showError on a surrounding data context was changed and set to true, it is because the user clicked next, submit or\n // something else that should lead to showing the user all errors.\n showError()\n forceUpdate()\n }\n }, [dataContext.showAllErrors, showError])\n\n useEffect(() => {\n if (path) {\n const hasValue = pointer.has(dataContext.data, path)\n const existingValue = hasValue\n ? pointer.get(dataContext.data, path)\n : undefined\n\n if (\n !hasValue ||\n (props.value !== existingValue &&\n // Prevents an infinite loop by skipping the update if the value hasn't changed\n valueRef.current !== existingValue)\n ) {\n // Update the data context when a pointer not exists,\n // but was given initially.\n dataContextUpdateDataValue?.(path, props.value, { disabled })\n dataContextValidateData?.()\n }\n }\n }, [\n dataContext.data,\n dataContextUpdateDataValue,\n dataContextValidateData,\n disabled,\n path,\n props.value,\n ])\n\n const handleError = useCallback(() => {\n if (\n continuousValidation ||\n (continuousValidation !== false && !hasFocusRef.current)\n ) {\n // When there is a change to the value without there having been any focus callback beforehand, it is likely\n // to believe that the blur callback will not be called either, which would trigger the display of the error.\n // The error is therefore displayed immediately (unless instructed not to with continuousValidation set to false).\n showError()\n } else {\n // When changing the value, hide errors to avoid annoying the user before they are finished filling in that value\n hideError()\n }\n }, [continuousValidation, hideError, showError])\n\n const setHasFocus = useCallback(\n (hasFocus: boolean, valueOverride?: Value) => {\n if (hasFocus) {\n // Field was put in focus (like when clicking in a text field or opening a dropdown menu)\n hasFocusRef.current = true\n const value = transformers.current.toEvent(\n valueOverride ?? valueRef.current,\n 'onFocus'\n )\n onFocus?.(value)\n } else {\n // Field was removed from focus (like when tabbing out of a text field or closing a dropdown menu)\n hasFocusRef.current = false\n const value = transformers.current.toEvent(\n valueOverride ?? valueRef.current,\n 'onBlur'\n )\n onBlur?.(value)\n\n if (!changedRef.current && !validateUnchanged) {\n // Avoid showing errors when blurring without having changed the value, so tabbing through several\n // fields does not make errors pop up all over the place\n return\n }\n\n // External blur validators makes it possible to validate values but not on every character change in case of\n // expensive validation calling external services etc.\n if (typeof onBlurValidator === 'function') {\n // Since the validator can return either a synchronous result or an asynchronous\n const value = transformers.current.toEvent(\n valueOverride ?? valueRef.current,\n 'onBlurValidator'\n )\n Promise.resolve(onBlurValidator(value)).then(persistErrorState)\n }\n\n // Since the user left the field, show error (if any)\n showError()\n forceUpdate()\n }\n },\n [\n onBlur,\n onBlurValidator,\n onFocus,\n persistErrorState,\n showError,\n validateUnchanged,\n ]\n )\n\n const updateValue = useCallback(\n (newValue: Value) => {\n if (newValue === valueRef.current) {\n // Avoid triggering a change if the value was not actually changed. This may be caused by rendering components\n // calling onChange even if the actual value did not change.\n return\n }\n\n valueRef.current = newValue\n\n // Always validate the value immediately when it is changed\n validateValue()\n\n handleError()\n\n if (path) {\n dataContextHandlePathChange?.(path, newValue)\n }\n\n forceUpdate()\n },\n [dataContextHandlePathChange, handleError, path, validateValue]\n )\n\n const handleChange = useCallback(\n (\n argFromInput: Value,\n additionalArgs: AdditionalEventArgs = undefined\n ) => {\n const currentValue = valueRef.current\n let newValue = transformers.current.fromInput(argFromInput)\n\n if (newValue === currentValue) {\n // Avoid triggering a change if the value was not actually changed. This may be caused by rendering components\n // calling onChange even if the actual value did not change.\n return\n }\n\n newValue = transformers.current.transformValue(\n newValue,\n currentValue\n )\n\n updateValue(newValue)\n\n changedRef.current = true\n\n const value = transformers.current.toEvent(newValue, 'onChange')\n onChange?.apply(\n this,\n typeof additionalArgs !== 'undefined'\n ? [value, additionalArgs]\n : [value]\n )\n\n if (itemPath) {\n const iterateValuePath = `/${iterateElementIndex}${\n itemPath && itemPath !== '/' ? itemPath : ''\n }`\n handleIterateElementChange?.(iterateValuePath, newValue)\n }\n },\n [\n updateValue,\n onChange,\n itemPath,\n iterateElementIndex,\n handleIterateElementChange,\n ]\n )\n\n const handleFocus = useCallback(() => setHasFocus(true), [setHasFocus])\n const handleBlur = useCallback(() => setHasFocus(false), [setHasFocus])\n\n useMountEffect(() => {\n dataContext?.handleMountField(identifier)\n\n validateValue()\n })\n useUnmountEffect(() => {\n dataContext?.handleUnMountField(identifier)\n })\n\n // Set the error in the field block context if this field is inside a field block\n useMountEffect(() => {\n if (inFieldBlock) {\n if (errorProp) {\n setFieldBlockState?.({\n identifier,\n type: 'error',\n state: errorProp,\n showInitially: true,\n show: true,\n })\n }\n if (warning) {\n setFieldBlockState?.({\n identifier,\n type: 'warning',\n state: warning,\n showInitially: true,\n show: true,\n })\n }\n if (info) {\n setFieldBlockState?.({\n identifier,\n type: 'info',\n state: info,\n showInitially: true,\n show: true,\n })\n }\n\n return () => {\n // Unmount procedure\n if (fieldBlockContext.mountedFieldsRef) {\n fieldBlockContext.mountedFieldsRef.current[identifier] = true\n }\n }\n }\n })\n\n const error = showErrorRef.current\n ? errorProp ?? localErrorRef.current ?? contextErrorRef.current\n : undefined\n\n const hasError =\n Boolean(error) || (inFieldBlock && fieldBlockContext.hasErrorProp)\n\n // - Handle ariaAttributes\n const ariaAttributes = useMemo(() => {\n return Object.keys(props).reduce<AriaAttributes>((acc, cur) => {\n if (!cur.startsWith('aria-')) {\n return acc\n }\n acc[cur] = props[cur]\n return acc\n }, {})\n }, [props])\n if (error) {\n ariaAttributes['aria-invalid'] = error ? 'true' : 'false'\n }\n if (required) {\n ariaAttributes['aria-required'] = required ? 'true' : 'false'\n }\n if (inFieldBlock) {\n // Mount the field in the field block context\n if (fieldBlockContext.mountedFieldsRef) {\n fieldBlockContext.mountedFieldsRef.current[identifier] = true\n }\n\n // Check if there are any state IDs to be added to the aria-describedby attribute\n const stateIds = fieldBlockContext.fieldStateIdsRef?.current\n\n if (stateIds) {\n ariaAttributes['aria-describedby'] = combineDescribedBy(\n props,\n [\n error && stateIds.error,\n warning && stateIds.warning,\n info && stateIds.info,\n ].filter(Boolean)\n )\n }\n } else {\n ariaAttributes['aria-describedby'] = combineDescribedBy(\n props,\n [\n (error || errorProp) && `${id}-form-status--error`,\n warning && `${id}-form-status--warning`,\n info && `${id}-form-status--info`,\n ].filter(Boolean)\n )\n }\n\n return {\n ...props,\n id,\n name: props.name || props.path?.replace('/', '') || id,\n value: transformers.current.toInput(valueRef.current),\n info: !inFieldBlock ? info : undefined,\n warning: !inFieldBlock ? warning : undefined,\n error: !inFieldBlock ? error : undefined,\n hasError,\n isChanged: changedRef.current,\n autoComplete:\n props.autoComplete ??\n (dataContext.autoComplete === true ? 'on' : 'off'),\n disabled,\n ariaAttributes,\n dataContext,\n setHasFocus,\n handleFocus,\n handleBlur,\n handleChange,\n updateValue,\n forceUpdate,\n }\n}\n\ninterface ReturnAdditional<Value> {\n id: string\n name: string\n value: Value\n error: FieldProps<unknown>['error']\n warning: FieldProps<unknown>['warning']\n info: FieldProps<unknown>['info']\n autoComplete: HTMLInputElement['autocomplete']\n disabled: boolean\n hasError: boolean\n isChanged: boolean\n dataContext: ContextState\n ariaAttributes: AriaAttributes\n setHasFocus: (hasFocus: boolean, valueOverride?: unknown) => void\n handleFocus: () => void\n handleBlur: () => void\n handleChange: FieldProps<unknown>['onChange']\n updateValue: (value: Value) => void\n forceUpdate: () => void\n}\n\nexport function omitDataValueProps<\n OmittedProps extends ReturnAdditional<unknown>,\n>(props: OmittedProps) {\n // Do not include typical HTML attributes\n const {\n name, // eslint-disable-line\n error, // eslint-disable-line\n warning, // eslint-disable-line\n info, // eslint-disable-line\n hasError, // eslint-disable-line\n isChanged, // eslint-disable-line\n autoComplete, // eslint-disable-line\n ariaAttributes, // eslint-disable-line\n dataContext, // eslint-disable-line\n setHasFocus, // eslint-disable-line\n handleFocus, // eslint-disable-line\n handleBlur, // eslint-disable-line\n handleChange, // eslint-disable-line\n updateValue, // eslint-disable-line\n forceUpdate, // eslint-disable-line\n ...restProps\n } = props\n return Object.freeze(restProps) as Omit<\n OmittedProps,\n keyof ReturnAdditional<unknown>\n >\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,kBAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,sBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,eAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,iBAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,gBAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,kBAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,MAAA,GAAAb,sBAAA,CAAAF,OAAA;AAA2B,MAAAgB,SAAA;AAAA,SAAAd,uBAAAe,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC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mD,KAAK,EAAAvD,SAAA;EACT,OAAOW,MAAM,CAAC0N,MAAM,CAACD,SAAS,CAAC;AAIjC"}
|
|
1
|
+
{"version":3,"file":"useDataValue.js","names":["_react","require","_jsonPointer","_interopRequireDefault","_utils","_ajv","_types","_DataContext","_componentHelper","_Context","_FieldBlockContext","_IterateElementContext","_useMountEffect","_useUnmountEffect","_useUpdateEffect","_useProcessManager","_useId","_excluded","obj","__esModule","default","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","key","i","Object","getOwnPropertySymbols","sourceSymbolKeys","length","indexOf","prototype","propertyIsEnumerable","call","sourceKeys","keys","ownKeys","object","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","useDataValue","props","_props$disabled","_dataContext$ajvInsta","_this","_ref3","_props$path","_props$autoComplete","path","itemPath","emptyValue","required","info","warning","error","errorProp","errorMessages","onFocus","onBlur","onChange","onBlurValidator","validator","schema","validateInitially","validateUnchanged","continuousValidation","toInput","fromInput","toEvent","transformValue","fromExternal","validateRequired","_ref","disabled","readOnly","forceUpdate","useReducer","startProcess","useProcessManager","id","useId","dataContext","useContext","DataContext","fieldBlockContext","FieldBlockContext","iterateElementContext","IterateElementContext","sharedContext","SharedContext","tr","translation","Forms","transformers","useRef","handlePathChange","dataContextHandlePathChange","updateDataValue","dataContextUpdateDataValue","validateData","dataContextValidateData","setValueWithError","dataContextSetValueWithError","setProps","dataContextSetProps","errors","dataContextErrors","contextErrorMessages","dataContextError","inFieldBlock","Boolean","setFieldState","setFieldBlockState","showFieldError","showFieldBlockError","inIterate","index","iterateElementIndex","iterateElementValue","handleChange","handleIterateElementChange","substring","Error","identifier","useMemo","externalValue","current","pointer","has","get","data","valueRef","changedRef","hasFocusRef","showErrorInitially","localErrorRef","contextErrorRef","showErrorRef","validatorRef","useUpdateEffect","schemaValidatorRef","ajvInstance","compile","showError","useCallback","hideError","errorMessagesRef","fieldErrorRequired","prepareError","FormError","_error$messageValues","message","validationRule","_errorMessagesRef$cur","fieldMessage","messageWithValues","entries","messageValues","reduce","_ref2","replace","stateId","persistErrorState","errorArg","errorChanged","type","state","showInitially","clearErrorState","validateValue","isProcessActive","requiredError","isChanged","ajvErrorsToOneFormError","_validatorRef$current","_dataContext$ajvInsta2","useEffect","showAllErrors","hasValue","existingValue","handleError","setHasFocus","hasFocus","valueOverride","Promise","resolve","then","updateValue","newValue","argFromInput","additionalArgs","currentValue","iterateValuePath","handleFocus","handleBlur","useMountEffect","handleMountField","useUnmountEffect","handleUnMountField","show","mountedFieldsRef","hasError","hasErrorProp","ariaAttributes","acc","cur","startsWith","_fieldBlockContext$fi","stateIds","fieldStateIdsRef","combineDescribedBy","name","autoComplete","omitDataValueProps","restProps"],"sources":["../../../../../src/extensions/forms/hooks/useDataValue.ts"],"sourcesContent":["import {\n useRef,\n useEffect,\n useContext,\n useCallback,\n useMemo,\n useReducer,\n AriaAttributes,\n} from 'react'\nimport pointer from 'json-pointer'\nimport { ValidateFunction } from 'ajv/dist/2020'\nimport { errorChanged } from '../utils'\nimport { ajvErrorsToOneFormError } from '../utils/ajv'\nimport { FormError, FieldProps, AdditionalEventArgs } from '../types'\nimport { Context as DataContext, ContextState } from '../DataContext'\nimport { combineDescribedBy } from '../../../shared/component-helper'\nimport SharedContext from '../../../shared/Context'\nimport FieldBlockContext from '../FieldBlock/FieldBlockContext'\nimport IterateElementContext from '../Iterate/IterateElementContext'\nimport useMountEffect from './useMountEffect'\nimport useUnmountEffect from './useUnmountEffect'\nimport useUpdateEffect from './useUpdateEffect'\nimport useProcessManager from './useProcessManager'\nimport useId from './useId'\n\nexport default function useDataValue<\n Value = unknown,\n Props extends FieldProps<Value> = FieldProps<Value>,\n>(props: Props): Props & FieldProps<Value> & ReturnAdditional<Value> {\n const {\n path,\n itemPath,\n emptyValue,\n required,\n info,\n warning,\n error: errorProp,\n errorMessages,\n onFocus,\n onBlur,\n onChange,\n onBlurValidator,\n validator,\n schema,\n validateInitially,\n validateUnchanged,\n continuousValidation,\n toInput = (value: Value) => value,\n fromInput = (value: Value) => value,\n toEvent = (value: Value) => value,\n transformValue = (value: Value) => value,\n fromExternal = (value: Value) => value,\n validateRequired = (value: Value, { emptyValue, required, error }) => {\n const res =\n required &&\n (value === emptyValue ||\n (typeof emptyValue === 'undefined' && value === ''))\n ? error\n : undefined\n return res\n },\n } = props\n\n const disabled = props.disabled ?? props.readOnly\n\n const [, forceUpdate] = useReducer(() => ({}), {})\n const { startProcess } = useProcessManager()\n const id = useId(props.id)\n const dataContext = useContext(DataContext)\n const fieldBlockContext = useContext(FieldBlockContext)\n const iterateElementContext = useContext(IterateElementContext)\n const sharedContext = useContext(SharedContext)\n const tr = sharedContext?.translation.Forms\n\n const transformers = useRef({\n toInput,\n fromInput,\n toEvent,\n fromExternal,\n transformValue,\n validateRequired,\n })\n\n const {\n handlePathChange: dataContextHandlePathChange,\n updateDataValue: dataContextUpdateDataValue,\n validateData: dataContextValidateData,\n setValueWithError: dataContextSetValueWithError,\n setProps: dataContextSetProps,\n errors: dataContextErrors,\n contextErrorMessages,\n } = dataContext ?? {}\n\n const dataContextError = path ? dataContextErrors?.[path] : undefined\n const inFieldBlock = Boolean(fieldBlockContext)\n const {\n setFieldState: setFieldBlockState,\n showFieldError: showFieldBlockError,\n } = fieldBlockContext ?? {}\n const inIterate = Boolean(iterateElementContext)\n const {\n index: iterateElementIndex,\n value: iterateElementValue,\n handleChange: handleIterateElementChange,\n } = iterateElementContext ?? {}\n\n if (path && path.substring(0, 1) !== '/') {\n throw new Error(\n 'Invalid path. Data value path JSON Pointers must be from root (starting with a /).'\n )\n }\n if (itemPath && itemPath.substring(0, 1) !== '/') {\n throw new Error(\n 'Invalid itemPath. Item pathJSON Pointers must be from root of iterate element (starting with a /).'\n )\n }\n if (itemPath && !iterateElementContext) {\n throw new Error(\n 'itemPath cannot be used when not inside an iterate element context. Wrap the component in an Iterate.Loop.'\n )\n }\n\n const identifier = useMemo(() => {\n // Identifier is used is registries of multiple fields, like in the DataContext keeping track of errors\n return path ?? id\n }, [path, id])\n\n const externalValue = useMemo(() => {\n if (props.value !== undefined) {\n // Value-prop sent directly to the field has highest priority, overriding any surrounding source\n return transformers.current.fromExternal(props.value)\n }\n\n if (inIterate && itemPath) {\n // This field is inside an iterate, and has a pointer from the base of the element being iterated\n if (itemPath === '/') {\n return iterateElementValue\n }\n\n return pointer.has(iterateElementValue, itemPath)\n ? pointer.get(iterateElementValue, itemPath)\n : undefined\n }\n\n if (dataContext.data && path) {\n // There is a surrounding data context and a path for where in the source to find the data\n if (path === '/') {\n return dataContext.data\n }\n\n return pointer.has(dataContext.data, path)\n ? pointer.get(dataContext.data, path)\n : undefined\n }\n return undefined\n }, [\n props.value,\n inIterate,\n itemPath,\n dataContext.data,\n path,\n iterateElementValue,\n ])\n\n // Many variables are kept in refs to avoid triggering unnecessary update loops because updates using\n // useEffect depend on them (like the external `value`)\n\n // Hold an internal copy of the input value in case the input component is used uncontrolled,\n // and to handle errors in Eufemia on components that does not take updated callback functions into account.\n const valueRef = useRef<Value>(externalValue)\n const changedRef = useRef<boolean>(false)\n const hasFocusRef = useRef<boolean>(false)\n\n // Error handling\n // - Should errors received through validation be shown initially. Assume that providing a direct prop to\n // the component means it is supposed to be shown initially.\n const showErrorInitially = validateInitially || errorProp\n // - Local errors are errors based on validation instructions received by\n const localErrorRef = useRef<Error | FormError | undefined>()\n // - Context errors are from outer contexts, like validation for this field as part of the whole data set\n const contextErrorRef = useRef<Error | FormError | undefined>(\n dataContextError\n )\n\n // Put props into the surrounding data context\n dataContextSetProps?.(identifier, props)\n\n const showErrorRef = useRef<boolean>(Boolean(showErrorInitially))\n const validatorRef = useRef(validator)\n useUpdateEffect(() => {\n validatorRef.current = validator\n }, [validator])\n\n const schemaValidatorRef = useRef<ValidateFunction>(\n schema ? dataContext.ajvInstance?.compile(schema) : undefined\n )\n\n const showError = useCallback(() => {\n showErrorRef.current = true\n showFieldBlockError?.(identifier, true)\n }, [showFieldBlockError, identifier])\n\n const hideError = useCallback(() => {\n showErrorRef.current = false\n showFieldBlockError?.(identifier, false)\n }, [showFieldBlockError, identifier])\n\n const errorMessagesRef = useRef(null)\n errorMessagesRef.current = useMemo(() => {\n return {\n required: tr.fieldErrorRequired,\n ...errorMessages,\n }\n }, [errorMessages, tr.fieldErrorRequired])\n\n /**\n * Prepare error from validation logic with correct error messages based on props\n */\n const prepareError = useCallback(\n (error: Error | FormError | undefined): FormError | undefined => {\n if (error === undefined) {\n return\n }\n\n if (error instanceof FormError) {\n let message = error.message\n\n const { validationRule } = error\n if (typeof validationRule === 'string') {\n const fieldMessage = errorMessagesRef.current?.[validationRule]\n if (fieldMessage) {\n message = fieldMessage\n }\n }\n\n const messageWithValues = Object.entries(\n error.messageValues ?? {}\n ).reduce((message, [key, value]) => {\n return message.replace(`{${key}}`, value)\n }, message)\n\n return new FormError(messageWithValues)\n }\n\n return error\n },\n []\n )\n\n /**\n * Based on validation, update error state, locally and relevant surrounding contexts\n */\n const stateId = useId()\n const persistErrorState = useCallback(\n (errorArg: FormError | undefined) => {\n const error = prepareError(errorArg)\n\n if (!errorChanged(error, localErrorRef.current)) {\n // In case different triggers lead to validation with no changes in the result (like still no error, or the same error),\n // avoid unnecessary re-renders by letting the old error object stay in the state and skip re-rendering.\n return\n }\n\n localErrorRef.current = error\n\n // Tell the data context about the error, so it can stop the user from submitting the form until the error has been fixed\n dataContextSetValueWithError?.(identifier, Boolean(error))\n\n setFieldBlockState?.({\n stateId,\n identifier,\n type: 'error',\n state: error,\n showInitially: Boolean(inFieldBlock && validateInitially),\n })\n\n forceUpdate()\n },\n [\n stateId,\n prepareError,\n dataContextSetValueWithError,\n identifier,\n setFieldBlockState,\n inFieldBlock,\n validateInitially,\n ]\n )\n\n const clearErrorState = useCallback(\n () => persistErrorState(undefined),\n [persistErrorState]\n )\n\n /**\n * Validate the current state value by provided validator instructions\n */\n const validateValue = useCallback(async () => {\n const isProcessActive = startProcess()\n\n if (disabled) {\n if (isProcessActive()) {\n clearErrorState()\n }\n hideError()\n return\n }\n\n try {\n // Validate required\n const requiredError = transformers.current.validateRequired(\n valueRef.current,\n {\n emptyValue,\n required,\n isChanged: changedRef.current,\n error: new FormError('The value is required', {\n validationRule: 'required',\n }),\n }\n )\n if (requiredError instanceof Error) {\n throw requiredError\n }\n\n // Validate by provided JSON Schema for this value\n if (\n schemaValidatorRef.current &&\n valueRef.current !== undefined &&\n !schemaValidatorRef.current(valueRef.current)\n ) {\n const error = ajvErrorsToOneFormError(\n schemaValidatorRef.current.errors\n )\n throw error\n }\n\n // Validate by provided derivative validator\n if (validatorRef.current) {\n const res = await validatorRef.current?.(valueRef.current, {\n ...contextErrorMessages,\n ...errorMessagesRef.current,\n })\n if (res instanceof Error) {\n throw res\n }\n }\n\n if (isProcessActive()) {\n clearErrorState()\n }\n } catch (error: unknown) {\n if (isProcessActive()) {\n persistErrorState(error as Error)\n }\n }\n }, [\n startProcess,\n disabled,\n hideError,\n clearErrorState,\n emptyValue,\n required,\n contextErrorMessages,\n persistErrorState,\n ])\n\n useUpdateEffect(() => {\n schemaValidatorRef.current = schema\n ? dataContext.ajvInstance?.compile(schema)\n : undefined\n validateValue()\n }, [schema, validateValue])\n\n useUpdateEffect(() => {\n // Error or removed error for this field from the surrounding data context (by path)\n valueRef.current = externalValue\n validateValue()\n forceUpdate()\n }, [externalValue, validateValue])\n\n useEffect(() => {\n const error = prepareError(dataContextError)\n if (errorChanged(error, contextErrorRef.current)) {\n contextErrorRef.current = error\n forceUpdate()\n }\n }, [dataContextError, prepareError])\n\n useEffect(() => {\n if (dataContext.showAllErrors) {\n // If showError on a surrounding data context was changed and set to true, it is because the user clicked next, submit or\n // something else that should lead to showing the user all errors.\n showError()\n forceUpdate()\n }\n }, [dataContext.showAllErrors, showError])\n\n useEffect(() => {\n if (path) {\n const hasValue = pointer.has(dataContext.data, path)\n const existingValue = hasValue\n ? pointer.get(dataContext.data, path)\n : undefined\n\n if (\n !hasValue ||\n (props.value !== existingValue &&\n // Prevents an infinite loop by skipping the update if the value hasn't changed\n valueRef.current !== existingValue)\n ) {\n // Update the data context when a pointer not exists,\n // but was given initially.\n dataContextUpdateDataValue?.(path, props.value, { disabled })\n dataContextValidateData?.()\n }\n }\n }, [\n dataContext.data,\n dataContextUpdateDataValue,\n dataContextValidateData,\n disabled,\n path,\n props.value,\n ])\n\n const handleError = useCallback(() => {\n if (\n continuousValidation ||\n (continuousValidation !== false && !hasFocusRef.current)\n ) {\n // When there is a change to the value without there having been any focus callback beforehand, it is likely\n // to believe that the blur callback will not be called either, which would trigger the display of the error.\n // The error is therefore displayed immediately (unless instructed not to with continuousValidation set to false).\n showError()\n } else {\n // When changing the value, hide errors to avoid annoying the user before they are finished filling in that value\n hideError()\n }\n }, [continuousValidation, hideError, showError])\n\n const setHasFocus = useCallback(\n (hasFocus: boolean, valueOverride?: Value) => {\n if (hasFocus) {\n // Field was put in focus (like when clicking in a text field or opening a dropdown menu)\n hasFocusRef.current = true\n const value = transformers.current.toEvent(\n valueOverride ?? valueRef.current,\n 'onFocus'\n )\n onFocus?.(value)\n } else {\n // Field was removed from focus (like when tabbing out of a text field or closing a dropdown menu)\n hasFocusRef.current = false\n const value = transformers.current.toEvent(\n valueOverride ?? valueRef.current,\n 'onBlur'\n )\n onBlur?.(value)\n\n if (!changedRef.current && !validateUnchanged) {\n // Avoid showing errors when blurring without having changed the value, so tabbing through several\n // fields does not make errors pop up all over the place\n return\n }\n\n // External blur validators makes it possible to validate values but not on every character change in case of\n // expensive validation calling external services etc.\n if (typeof onBlurValidator === 'function') {\n // Since the validator can return either a synchronous result or an asynchronous\n const value = transformers.current.toEvent(\n valueOverride ?? valueRef.current,\n 'onBlurValidator'\n )\n Promise.resolve(onBlurValidator(value)).then(persistErrorState)\n }\n\n // Since the user left the field, show error (if any)\n showError()\n forceUpdate()\n }\n },\n [\n onBlur,\n onBlurValidator,\n onFocus,\n persistErrorState,\n showError,\n validateUnchanged,\n ]\n )\n\n const updateValue = useCallback(\n (newValue: Value) => {\n if (newValue === valueRef.current) {\n // Avoid triggering a change if the value was not actually changed. This may be caused by rendering components\n // calling onChange even if the actual value did not change.\n return\n }\n\n valueRef.current = newValue\n\n // Always validate the value immediately when it is changed\n validateValue()\n\n handleError()\n\n if (path) {\n dataContextHandlePathChange?.(path, newValue)\n }\n\n forceUpdate()\n },\n [dataContextHandlePathChange, handleError, path, validateValue]\n )\n\n const handleChange = useCallback(\n (\n argFromInput: Value,\n additionalArgs: AdditionalEventArgs = undefined\n ) => {\n const currentValue = valueRef.current\n let newValue = transformers.current.fromInput(argFromInput)\n\n if (newValue === currentValue) {\n // Avoid triggering a change if the value was not actually changed. This may be caused by rendering components\n // calling onChange even if the actual value did not change.\n return\n }\n\n newValue = transformers.current.transformValue(\n newValue,\n currentValue\n )\n\n updateValue(newValue)\n\n changedRef.current = true\n\n const value = transformers.current.toEvent(newValue, 'onChange')\n onChange?.apply(\n this,\n typeof additionalArgs !== 'undefined'\n ? [value, additionalArgs]\n : [value]\n )\n\n if (itemPath) {\n const iterateValuePath = `/${iterateElementIndex}${\n itemPath && itemPath !== '/' ? itemPath : ''\n }`\n handleIterateElementChange?.(iterateValuePath, newValue)\n }\n },\n [\n updateValue,\n onChange,\n itemPath,\n iterateElementIndex,\n handleIterateElementChange,\n ]\n )\n\n const handleFocus = useCallback(() => setHasFocus(true), [setHasFocus])\n const handleBlur = useCallback(() => setHasFocus(false), [setHasFocus])\n\n useMountEffect(() => {\n dataContext?.handleMountField(identifier)\n\n validateValue()\n })\n useUnmountEffect(() => {\n dataContext?.handleUnMountField(identifier)\n })\n\n // Set the error in the field block context if this field is inside a field block\n useMountEffect(() => {\n if (inFieldBlock) {\n if (errorProp) {\n setFieldBlockState?.({\n identifier,\n type: 'error',\n state: errorProp,\n showInitially: true,\n show: true,\n })\n }\n if (warning) {\n setFieldBlockState?.({\n identifier,\n type: 'warning',\n state: warning,\n showInitially: true,\n show: true,\n })\n }\n if (info) {\n setFieldBlockState?.({\n identifier,\n type: 'info',\n state: info,\n showInitially: true,\n show: true,\n })\n }\n\n return () => {\n // Unmount procedure\n if (fieldBlockContext.mountedFieldsRef) {\n fieldBlockContext.mountedFieldsRef.current[identifier] = true\n }\n }\n }\n })\n\n const error = showErrorRef.current\n ? errorProp ?? localErrorRef.current ?? contextErrorRef.current\n : undefined\n\n const hasError =\n Boolean(error) || (inFieldBlock && fieldBlockContext.hasErrorProp)\n\n // - Handle ariaAttributes\n const ariaAttributes = useMemo(() => {\n return Object.keys(props).reduce<AriaAttributes>((acc, cur) => {\n if (!cur.startsWith('aria-')) {\n return acc\n }\n acc[cur] = props[cur]\n return acc\n }, {})\n }, [props])\n if (error) {\n ariaAttributes['aria-invalid'] = error ? 'true' : 'false'\n }\n if (required) {\n ariaAttributes['aria-required'] = required ? 'true' : 'false'\n }\n if (inFieldBlock) {\n // Mount the field in the field block context\n if (fieldBlockContext.mountedFieldsRef) {\n fieldBlockContext.mountedFieldsRef.current[identifier] = true\n }\n\n // Check if there are any state IDs to be added to the aria-describedby attribute\n const stateIds = fieldBlockContext.fieldStateIdsRef?.current\n\n if (stateIds) {\n ariaAttributes['aria-describedby'] = combineDescribedBy(\n props,\n [\n error && stateIds.error,\n warning && stateIds.warning,\n info && stateIds.info,\n ].filter(Boolean)\n )\n }\n } else {\n ariaAttributes['aria-describedby'] = combineDescribedBy(\n props,\n [\n (error || errorProp) && `${id}-form-status--error`,\n warning && `${id}-form-status--warning`,\n info && `${id}-form-status--info`,\n ].filter(Boolean)\n )\n }\n\n return {\n ...props,\n id,\n name: props.name || props.path?.replace('/', '') || id,\n value: transformers.current.toInput(valueRef.current),\n info: !inFieldBlock ? info : undefined,\n warning: !inFieldBlock ? warning : undefined,\n error: !inFieldBlock ? error : undefined,\n hasError,\n disabled,\n autoComplete:\n props.autoComplete ??\n (dataContext.autoComplete === true ? 'on' : 'off'),\n\n // Return additional hook related props (ReturnAdditional)\n isChanged: changedRef.current,\n ariaAttributes,\n dataContext,\n setHasFocus,\n handleFocus,\n handleBlur,\n handleChange,\n updateValue,\n forceUpdate,\n }\n}\n\ninterface ReturnAdditional<Value> {\n value: Value\n isChanged: boolean\n ariaAttributes: AriaAttributes\n dataContext: ContextState\n setHasFocus: (hasFocus: boolean, valueOverride?: unknown) => void\n handleFocus: () => void\n handleBlur: () => void\n handleChange: FieldProps<Value>['onChange']\n updateValue: (value: Value) => void\n forceUpdate: () => void\n}\n\nexport function omitDataValueProps<\n Props extends FieldProps<unknown> & ReturnAdditional<unknown>,\n>(props: Props) {\n // Do not include typical HTML attributes\n const {\n name, // eslint-disable-line\n error, // eslint-disable-line\n warning, // eslint-disable-line\n info, // eslint-disable-line\n hasError, // eslint-disable-line\n isChanged, // eslint-disable-line\n autoComplete, // eslint-disable-line\n ariaAttributes, // eslint-disable-line\n dataContext, // eslint-disable-line\n setHasFocus, // eslint-disable-line\n handleFocus, // eslint-disable-line\n handleBlur, // eslint-disable-line\n handleChange, // eslint-disable-line\n updateValue, // eslint-disable-line\n forceUpdate, // eslint-disable-line\n ...restProps\n } = props\n\n return restProps\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,kBAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,sBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,eAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,i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AM;MACJ0K,IAAI;MACJ7J,KAAK;MACLD,OAAO;MACPD,IAAI;MACJqJ,QAAQ;MACR7B,SAAS;MACTwC,YAAY;MACZT,cAAc;MACd1H,WAAW;MACXoG,WAAW;MACXY,WAAW;MACXC,UAAU;MACV3E,YAAY;MACZoE,WAAW;MACXhH;IAEF,CAAC,GAAGlC,KAAK;IADJ6K,SAAS,GAAAhO,wBAAA,CACVmD,KAAK,EAAAvD,SAAA;EAET,OAAOoO,SAAS;AAClB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = useMounted;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
function useMounted() {
|
|
10
|
+
const mounted = (0, _react.useRef)(false);
|
|
11
|
+
(0, _react.useEffect)(() => {
|
|
12
|
+
mounted.current = true;
|
|
13
|
+
return () => {
|
|
14
|
+
mounted.current = false;
|
|
15
|
+
};
|
|
16
|
+
}, []);
|
|
17
|
+
return mounted;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=useMounted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMounted.js","names":["_react","require","useMounted","mounted","useRef","useEffect","current"],"sources":["../../../../../src/extensions/forms/hooks/useMounted.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nexport default function useMounted() {\n const mounted = useRef(false)\n\n useEffect(() => {\n mounted.current = true\n return () => {\n mounted.current = false\n }\n }, [])\n\n return mounted\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEe,SAASC,UAAUA,CAAA,EAAG;EACnC,MAAMC,OAAO,GAAG,IAAAC,aAAM,EAAC,KAAK,CAAC;EAE7B,IAAAC,gBAAS,EAAC,MAAM;IACdF,OAAO,CAACG,OAAO,GAAG,IAAI;IACtB,OAAO,MAAM;MACXH,OAAO,CAACG,OAAO,GAAG,KAAK;IACzB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOH,OAAO;AAChB"}
|
|
@@ -304,10 +304,10 @@ fieldset.dnb-forms-field-block:not([class*=space__left]) {
|
|
|
304
304
|
display: grid;
|
|
305
305
|
}
|
|
306
306
|
@media screen and (max-width: 40em) {
|
|
307
|
-
.dnb-forms-field-block__grid {
|
|
307
|
+
.dnb-forms-field-block--layout-vertical .dnb-forms-field-block__grid {
|
|
308
308
|
flex-wrap: wrap;
|
|
309
309
|
}
|
|
310
|
-
.dnb-forms-field-block__grid > .dnb-form-label {
|
|
310
|
+
.dnb-forms-field-block--layout-vertical .dnb-forms-field-block__grid > .dnb-form-label {
|
|
311
311
|
margin-bottom: 0.5rem;
|
|
312
312
|
margin-top: 0.5rem;
|
|
313
313
|
}
|
|
@@ -405,6 +405,12 @@ fieldset.dnb-forms-field-block:not([class*=space__left]) {
|
|
|
405
405
|
-moz-column-gap: var(--spacing-small);
|
|
406
406
|
column-gap: var(--spacing-small);
|
|
407
407
|
}
|
|
408
|
+
.dnb-card + .dnb-forms-button-row:not([class*=space__top]) {
|
|
409
|
+
margin-top: var(--spacing-small);
|
|
410
|
+
}
|
|
411
|
+
.dnb-card + .dnb-forms-button-row:not([class*=space__top]) .dnb-button[class*=space__top] {
|
|
412
|
+
margin-top: 0;
|
|
413
|
+
}
|
|
408
414
|
@media screen and (min-width: 40em) {
|
|
409
415
|
.dnb-card + .dnb-forms-button-row:not([class*=space__left]) {
|
|
410
416
|
margin-left: var(--spacing-medium);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.dnb-forms-field-array-selection--layout-vertical .dnb-forms-field-array-selection__options{display:flex;flex-flow:column;row-gap:var(--spacing-x-small)}.dnb-forms-field-array-selection--layout-horizontal .dnb-forms-field-array-selection__options{-moz-column-gap:var(--spacing-small);column-gap:var(--spacing-small);display:flex;flex-flow:row wrap;row-gap:var(--spacing-x-small)}@media screen and (min-width:40em){.dnb-forms-field-array-selection .dnb-forms-field-block--layout-horizontal .dnb-form-label{line-height:2.5rem;margin-bottom:0}}.dnb-forms-field-expiry .dnb-multi-input-mask{width:var(--forms-field-width--small)}.dnb-forms-field-expiry .dnb-multi-input-mask .dnb-input__shell{justify-content:center}.dnb-forms-field-number{--number-control-button-border-color:#000;--number-control-button-border-color--hover:#a9a9a9;--number-control-button-border-color--focus:#a9a9a9;--number-control-button-border-width--focus:0.125rem;--number-control-button-background-color--hover:grey;--number-control-button-color--hover:#000;--number-control-button-background-color--active:#000;--number-control-button-color--active:#d3d3d3;--number-control-button--error:red;--number-control-button--error-contrast:#fff;--number-control-button-width--small:2rem;--number-control-button-width--medium:2.5rem;--number-control-button-width--large:3rem;--forms-field-block--number-control-buttons-width--small:calc(var(--number-control-button-width--small)*2);--forms-field-block--number-control-buttons-width--medium:calc(var(--number-control-button-width--medium)*2);--forms-field-block--number-control-buttons-width--large:calc(var(--number-control-button-width--large)*2)}.dnb-forms-field-number__contents{display:flex}.dnb-forms-field-number__contents--has-controls{--border-color:var(--number-control-button-border-color);--border-width:0.0625rem;border-color:transparent;border-radius:.25rem;box-shadow:0 0 0 var(--border-width) var(--border-color)}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls:hover:not([disabled]){--border-color:var(--number-control-button-border-color);--border-width:0.125rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}html[data-whatinput=keyboard] .dnb-forms-field-number__contents--has-controls:focus-within{--border-color:var(--number-control-button-border-color--focus);--border-width:var(--number-control-button-border-width--focus);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-forms-field-number__contents--has-controls .dnb-input__input{align-items:center}.dnb-forms-field-number__contents--has-controls .dnb-input__shell{border-radius:0;box-shadow:none}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-input__shell:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-input__shell:hover:not([disabled]){box-shadow:none}.dnb-forms-field-number__contents--has-controls .dnb-input:not([data-input-state=disabled]):not(:active)[data-input-state=focus] .dnb-input__shell{box-shadow:none;outline:initial}html[data-whatinput=""] .dnb-forms-field-number__contents--has-controls .dnb-input:not([data-input-state=disabled]):not(:active)[data-input-state=focus] .dnb-input__shell{box-shadow:none}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-after:hover[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-before:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-after:hover:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-before:hover:not([disabled]){background-color:var(--number-control-button-background-color--hover);color:var(--number-control-button-color--hover)}.dnb-forms-field-number__contents--has-controls .dnb-button--control-after:active[disabled],.dnb-forms-field-number__contents--has-controls .dnb-button--control-before:active[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-after:active[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-before:active[disabled]{cursor:not-allowed}.dnb-forms-field-number__contents--has-controls .dnb-button--control-after:active:not([disabled]),.dnb-forms-field-number__contents--has-controls .dnb-button--control-before:active:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-after:active:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-before:active:not([disabled]){background-color:var(--number-control-button-background-color--active);color:var(--number-control-button-color--active)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error{--border-color:var(--number-control-button--error);--border-width:0.125rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error:hover:not([disabled]){--border-color:var(--number-control-button--error);--border-width:0.125rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-input__status--error:not([data-input-state=disabled]):not(:hover):not(:active) .dnb-input__shell{box-shadow:none}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after,.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before{color:var(--number-control-button--error)}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:hover[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:hover:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:hover:not([disabled]){background-color:var(--number-control-button--error-contrast);color:var(--number-control-button--error)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:active[disabled],.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:active[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:active[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:active[disabled]{cursor:not-allowed}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:active:not([disabled]),.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:active:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:active:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:active:not([disabled]){background-color:var(--number-control-button--error);color:var(--number-control-button--error-contrast)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after[disabled],.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before[disabled]{color:var(--number-control-button--error-contrast)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled{--border-color:var(--color-black-55);--border-width:0.0625rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled:hover:not([disabled]){--border-color:var(--color-black-55);--border-width:0.0625rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled .dnb-input[data-input-state=disabled] .dnb-input__shell{box-shadow:none}.dnb-input[data-input-state=disabled] .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled{--border-color:var(--color-black-55);--border-width:0.0625rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled .dnb-button--control-after[disabled],.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled .dnb-button--control-before[disabled]{background-color:var(--color-black-3);color:var(--color-black-20)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-small{width:calc(var(--forms-field-width--small) + var(--forms-field-block--number-control-buttons-width--small))}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-small .dnb-button--control-after,.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-small .dnb-button--control-before{width:var(--number-control-button-width--small)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-medium{width:calc(var(--forms-field-width--medium) + var(--forms-field-block--number-control-buttons-width--medium))}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-medium .dnb-button--control-after,.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-medium .dnb-button--control-before{width:var(--number-control-button-width--medium)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-large{width:calc(var(--forms-field-width--large) + var(--forms-field-block--number-control-buttons-width--large))}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-large .dnb-button--control-after,.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-large .dnb-button--control-before{width:var(--number-control-button-width--large)}.dnb-forms-field-password .dnb-input__status--error .dnb-input__submit-button__button{color:var(--color-fire-red)}.dnb-forms-field-password .dnb-input__status--error .dnb-input__submit-button__button:hover{color:var(--color-white)}.dnb-forms-field-phone-number__country-code,.dnb-forms-field-phone-number__country-code .dnb-autocomplete__shell{width:calc(var(--forms-field-width--medium) - 2rem)}.dnb-forms-field-phone-number__number{flex:1}.dnb-forms-field-phone-number .dnb-form-label{max-width:14ch}.dnb-forms-field-postal-code-and-city__postal-code{flex:0 5rem}.dnb-forms-field-postal-code-and-city__city{flex:1}.dnb-forms-field-selection__variant--dropdown .dnb-forms-field-block--layout-horizontal .dnb-form-label{align-self:center}.dnb-forms-field-selection__options-layout--horizontal .dnb-forms-field-block--layout-horizontal .dnb-form-label,.dnb-forms-field-selection__variant--dropdown .dnb-forms-field-block--layout-horizontal .dnb-form-label{margin-bottom:0}.dnb-forms-field-selection__variant--button .dnb-forms-field-block--layout-horizontal .dnb-form-label{line-height:2.5rem}:root{--forms-field-width--small:5rem;--forms-field-width--medium:11rem;--forms-field-width--large:21rem}@media screen and (max-width:15em){.dnb-forms-field-number .dnb-input__shell,.dnb-forms-field-string .dnb-input__shell{width:90%}}fieldset.dnb-forms-field-block{border:none;padding:0}fieldset.dnb-forms-field-block:not([class*=space__top]){margin-top:0}fieldset.dnb-forms-field-block:not([class*=space__right]){margin-right:0}fieldset.dnb-forms-field-block:not([class*=space__bottom]){margin-bottom:0}fieldset.dnb-forms-field-block:not([class*=space__left]){margin-left:0}.dnb-forms-field-block{width:100%}.dnb-forms-field-block__grid{display:grid}@media screen and (max-width:40em){.dnb-forms-field-block__grid{flex-wrap:wrap}.dnb-forms-field-block__grid>.dnb-form-label{margin-bottom:.5rem;margin-top:.5rem}}.dnb-forms-field-block--layout-vertical{grid-template-areas:"label" "contents" "status";grid-template-columns:auto}.dnb-forms-field-block--layout-horizontal{grid-template-areas:"label contents" "status status";grid-template-columns:fit-content(100%) auto}.dnb-forms-field-block--width-stretch{flex-grow:1}@media screen and (min-width:25em){.dnb-forms-field-block--width-small{width:var(--forms-field-width--small)}.dnb-forms-field-block--width-medium{width:var(--forms-field-width--medium)}.dnb-forms-field-block--width-large{width:var(--forms-field-width--large)}}.dnb-forms-field-block__label{align-items:center;display:flex;flex-flow:row;grid-area:label;justify-content:space-between}.dnb-forms-field-block__label-description{margin-left:.3em}.dnb-forms-field-block__status{grid-area:status}.dnb-forms-field-block__status .dnb-form-status__shell{margin-top:.5rem}@media screen and (max-width:15em){.dnb-forms-field-block__status{width:90%}}.dnb-forms-field-block__contents{grid-area:contents;width:100%}.dnb-forms-field-block__contents--width-stretch{width:100%}@media screen and (min-width:25em){.dnb-forms-field-block__contents--width-small{width:var(--forms-field-width--small)}.dnb-forms-field-block__contents--width-medium{width:var(--forms-field-width--medium)}.dnb-forms-field-block__contents--width-large{width:var(--forms-field-width--large)}}.dnb-forms-field-block__contents__composition--vertical{display:flex;flex-flow:column;row-gap:var(--spacing-small)}.dnb-forms-field-block__contents__composition--horizontal{-moz-column-gap:var(--spacing-small);column-gap:var(--spacing-small);display:flex;flex-flow:row}@media screen and (min-width:25em){.dnb-forms-field-block__contents__composition--horizontal{align-items:flex-end}}@media screen and (max-width:25em){.dnb-forms-field-block__contents__composition--horizontal{flex-flow:column;row-gap:var(--spacing-x-small)}}.dnb-forms-button-row{-moz-column-gap:var(--spacing-small);column-gap:var(--spacing-small);display:flex;flex-flow:row}@media screen and (min-width:40em){.dnb-card+.dnb-forms-button-row:not([class*=space__left]){margin-left:var(--spacing-medium)}}.dnb-spacing .dnb-form-main-heading.dnb-h--large:not([class*=space__]){margin:0}@media screen and (min-width:40em){.dnb-form-main-heading:has(+.dnb-flex-stack>.dnb-card,+.dnb-card):not([class*=space__left]){margin-left:var(--spacing-medium)}}.dnb-form-main-heading:has(+.dnb-flex-stack>.dnb-card,+.dnb-card):not([class*=space__bottom]){margin-bottom:var(--spacing-small)}.dnb-spacing .dnb-form-sub-heading.dnb-h--medium:not([class*=space__]){margin:0}.dnb-form-sub-heading:has(+.dnb-flex-stack>.dnb-card,+.dnb-card):not([class*=space__bottom]){margin-bottom:var(--spacing-small)}.dnb-forms-steps-layout{-moz-column-gap:var(--spacing-medium);column-gap:var(--spacing-medium);display:flex;flex-flow:row wrap}.dnb-forms-steps-layout--drawer{align-items:stretch;flex-direction:column;justify-content:stretch}.dnb-forms-steps-layout__sidebar{flex:0;margin-bottom:2rem}.dnb-forms-steps-layout__contents{flex:1 0 25rem}.dnb-forms-steps-layout__contents .dnb-card{--border-color:var(--color-pistachio)}@media screen and (max-width:60em){.dnb-forms-steps-layout{align-items:stretch;flex-direction:column;justify-content:stretch}.dnb-forms-steps-layout__contents{flex-basis:auto}}.dnb-forms-steps-layout .dnb-step-indicator__sidebar{margin-right:0}.dnb-forms-value-block{display:block;font-size:var(--font-size-basis)}.dnb-forms-value-block--inline{display:inline-block;font-size:inherit;margin-left:var(--spacing-xx-small);margin-right:var(--spacing-xx-small)}.dnb-forms-value-block__label{font-weight:var(--font-weight-medium)}.dnb-forms-value-block__placeholder{color:rgba(0,0,0,.5)}.dnb-forms-test-element{border:1px dashed grey;border-radius:.5rem;color:#909090;padding:.5rem 1rem}
|
|
1
|
+
.dnb-forms-field-array-selection--layout-vertical .dnb-forms-field-array-selection__options{display:flex;flex-flow:column;row-gap:var(--spacing-x-small)}.dnb-forms-field-array-selection--layout-horizontal .dnb-forms-field-array-selection__options{-moz-column-gap:var(--spacing-small);column-gap:var(--spacing-small);display:flex;flex-flow:row wrap;row-gap:var(--spacing-x-small)}@media screen and (min-width:40em){.dnb-forms-field-array-selection .dnb-forms-field-block--layout-horizontal .dnb-form-label{line-height:2.5rem;margin-bottom:0}}.dnb-forms-field-expiry .dnb-multi-input-mask{width:var(--forms-field-width--small)}.dnb-forms-field-expiry .dnb-multi-input-mask .dnb-input__shell{justify-content:center}.dnb-forms-field-number{--number-control-button-border-color:#000;--number-control-button-border-color--hover:#a9a9a9;--number-control-button-border-color--focus:#a9a9a9;--number-control-button-border-width--focus:0.125rem;--number-control-button-background-color--hover:grey;--number-control-button-color--hover:#000;--number-control-button-background-color--active:#000;--number-control-button-color--active:#d3d3d3;--number-control-button--error:red;--number-control-button--error-contrast:#fff;--number-control-button-width--small:2rem;--number-control-button-width--medium:2.5rem;--number-control-button-width--large:3rem;--forms-field-block--number-control-buttons-width--small:calc(var(--number-control-button-width--small)*2);--forms-field-block--number-control-buttons-width--medium:calc(var(--number-control-button-width--medium)*2);--forms-field-block--number-control-buttons-width--large:calc(var(--number-control-button-width--large)*2)}.dnb-forms-field-number__contents{display:flex}.dnb-forms-field-number__contents--has-controls{--border-color:var(--number-control-button-border-color);--border-width:0.0625rem;border-color:transparent;border-radius:.25rem;box-shadow:0 0 0 var(--border-width) var(--border-color)}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls:hover:not([disabled]){--border-color:var(--number-control-button-border-color);--border-width:0.125rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}html[data-whatinput=keyboard] .dnb-forms-field-number__contents--has-controls:focus-within{--border-color:var(--number-control-button-border-color--focus);--border-width:var(--number-control-button-border-width--focus);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-forms-field-number__contents--has-controls .dnb-input__input{align-items:center}.dnb-forms-field-number__contents--has-controls .dnb-input__shell{border-radius:0;box-shadow:none}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-input__shell:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-input__shell:hover:not([disabled]){box-shadow:none}.dnb-forms-field-number__contents--has-controls .dnb-input:not([data-input-state=disabled]):not(:active)[data-input-state=focus] .dnb-input__shell{box-shadow:none;outline:initial}html[data-whatinput=""] .dnb-forms-field-number__contents--has-controls .dnb-input:not([data-input-state=disabled]):not(:active)[data-input-state=focus] .dnb-input__shell{box-shadow:none}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-after:hover[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-before:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-after:hover:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-before:hover:not([disabled]){background-color:var(--number-control-button-background-color--hover);color:var(--number-control-button-color--hover)}.dnb-forms-field-number__contents--has-controls .dnb-button--control-after:active[disabled],.dnb-forms-field-number__contents--has-controls .dnb-button--control-before:active[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-after:active[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-before:active[disabled]{cursor:not-allowed}.dnb-forms-field-number__contents--has-controls .dnb-button--control-after:active:not([disabled]),.dnb-forms-field-number__contents--has-controls .dnb-button--control-before:active:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-after:active:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls .dnb-button--control-before:active:not([disabled]){background-color:var(--number-control-button-background-color--active);color:var(--number-control-button-color--active)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error{--border-color:var(--number-control-button--error);--border-width:0.125rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error:hover:not([disabled]){--border-color:var(--number-control-button--error);--border-width:0.125rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-input__status--error:not([data-input-state=disabled]):not(:hover):not(:active) .dnb-input__shell{box-shadow:none}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after,.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before{color:var(--number-control-button--error)}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:hover[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:hover:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:hover:not([disabled]){background-color:var(--number-control-button--error-contrast);color:var(--number-control-button--error)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:active[disabled],.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:active[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:active[disabled],html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:active[disabled]{cursor:not-allowed}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:active:not([disabled]),.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:active:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after:active:not([disabled]),html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before:active:not([disabled]){background-color:var(--number-control-button--error);color:var(--number-control-button--error-contrast)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-after[disabled],.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--has-error .dnb-button--control-before[disabled]{color:var(--number-control-button--error-contrast)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled{--border-color:var(--color-black-55);--border-width:0.0625rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled:hover:not([disabled]){--border-color:var(--color-black-55);--border-width:0.0625rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled .dnb-input[data-input-state=disabled] .dnb-input__shell{box-shadow:none}.dnb-input[data-input-state=disabled] .dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled{--border-color:var(--color-black-55);--border-width:0.0625rem;border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled .dnb-button--control-after[disabled],.dnb-forms-field-number__contents--has-controls.dnb-forms-field-number__contents--is-disabled .dnb-button--control-before[disabled]{background-color:var(--color-black-3);color:var(--color-black-20)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-small{width:calc(var(--forms-field-width--small) + var(--forms-field-block--number-control-buttons-width--small))}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-small .dnb-button--control-after,.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-small .dnb-button--control-before{width:var(--number-control-button-width--small)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-medium{width:calc(var(--forms-field-width--medium) + var(--forms-field-block--number-control-buttons-width--medium))}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-medium .dnb-button--control-after,.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-medium .dnb-button--control-before{width:var(--number-control-button-width--medium)}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-large{width:calc(var(--forms-field-width--large) + var(--forms-field-block--number-control-buttons-width--large))}.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-large .dnb-button--control-after,.dnb-forms-field-number__contents--has-controls.dnb-forms-field-block__contents--width-large .dnb-button--control-before{width:var(--number-control-button-width--large)}.dnb-forms-field-password .dnb-input__status--error .dnb-input__submit-button__button{color:var(--color-fire-red)}.dnb-forms-field-password .dnb-input__status--error .dnb-input__submit-button__button:hover{color:var(--color-white)}.dnb-forms-field-phone-number__country-code,.dnb-forms-field-phone-number__country-code .dnb-autocomplete__shell{width:calc(var(--forms-field-width--medium) - 2rem)}.dnb-forms-field-phone-number__number{flex:1}.dnb-forms-field-phone-number .dnb-form-label{max-width:14ch}.dnb-forms-field-postal-code-and-city__postal-code{flex:0 5rem}.dnb-forms-field-postal-code-and-city__city{flex:1}.dnb-forms-field-selection__variant--dropdown .dnb-forms-field-block--layout-horizontal .dnb-form-label{align-self:center}.dnb-forms-field-selection__options-layout--horizontal .dnb-forms-field-block--layout-horizontal .dnb-form-label,.dnb-forms-field-selection__variant--dropdown .dnb-forms-field-block--layout-horizontal .dnb-form-label{margin-bottom:0}.dnb-forms-field-selection__variant--button .dnb-forms-field-block--layout-horizontal .dnb-form-label{line-height:2.5rem}:root{--forms-field-width--small:5rem;--forms-field-width--medium:11rem;--forms-field-width--large:21rem}@media screen and (max-width:15em){.dnb-forms-field-number .dnb-input__shell,.dnb-forms-field-string .dnb-input__shell{width:90%}}fieldset.dnb-forms-field-block{border:none;padding:0}fieldset.dnb-forms-field-block:not([class*=space__top]){margin-top:0}fieldset.dnb-forms-field-block:not([class*=space__right]){margin-right:0}fieldset.dnb-forms-field-block:not([class*=space__bottom]){margin-bottom:0}fieldset.dnb-forms-field-block:not([class*=space__left]){margin-left:0}.dnb-forms-field-block{width:100%}.dnb-forms-field-block__grid{display:grid}@media screen and (max-width:40em){.dnb-forms-field-block--layout-vertical .dnb-forms-field-block__grid{flex-wrap:wrap}.dnb-forms-field-block--layout-vertical .dnb-forms-field-block__grid>.dnb-form-label{margin-bottom:.5rem;margin-top:.5rem}}.dnb-forms-field-block--layout-vertical{grid-template-areas:"label" "contents" "status";grid-template-columns:auto}.dnb-forms-field-block--layout-horizontal{grid-template-areas:"label contents" "status status";grid-template-columns:fit-content(100%) auto}.dnb-forms-field-block--width-stretch{flex-grow:1}@media screen and (min-width:25em){.dnb-forms-field-block--width-small{width:var(--forms-field-width--small)}.dnb-forms-field-block--width-medium{width:var(--forms-field-width--medium)}.dnb-forms-field-block--width-large{width:var(--forms-field-width--large)}}.dnb-forms-field-block__label{align-items:center;display:flex;flex-flow:row;grid-area:label;justify-content:space-between}.dnb-forms-field-block__label-description{margin-left:.3em}.dnb-forms-field-block__status{grid-area:status}.dnb-forms-field-block__status .dnb-form-status__shell{margin-top:.5rem}@media screen and (max-width:15em){.dnb-forms-field-block__status{width:90%}}.dnb-forms-field-block__contents{grid-area:contents;width:100%}.dnb-forms-field-block__contents--width-stretch{width:100%}@media screen and (min-width:25em){.dnb-forms-field-block__contents--width-small{width:var(--forms-field-width--small)}.dnb-forms-field-block__contents--width-medium{width:var(--forms-field-width--medium)}.dnb-forms-field-block__contents--width-large{width:var(--forms-field-width--large)}}.dnb-forms-field-block__contents__composition--vertical{display:flex;flex-flow:column;row-gap:var(--spacing-small)}.dnb-forms-field-block__contents__composition--horizontal{-moz-column-gap:var(--spacing-small);column-gap:var(--spacing-small);display:flex;flex-flow:row}@media screen and (min-width:25em){.dnb-forms-field-block__contents__composition--horizontal{align-items:flex-end}}@media screen and (max-width:25em){.dnb-forms-field-block__contents__composition--horizontal{flex-flow:column;row-gap:var(--spacing-x-small)}}.dnb-forms-button-row{-moz-column-gap:var(--spacing-small);column-gap:var(--spacing-small);display:flex;flex-flow:row}.dnb-card+.dnb-forms-button-row:not([class*=space__top]){margin-top:var(--spacing-small)}.dnb-card+.dnb-forms-button-row:not([class*=space__top]) .dnb-button[class*=space__top]{margin-top:0}@media screen and (min-width:40em){.dnb-card+.dnb-forms-button-row:not([class*=space__left]){margin-left:var(--spacing-medium)}}.dnb-spacing .dnb-form-main-heading.dnb-h--large:not([class*=space__]){margin:0}@media screen and (min-width:40em){.dnb-form-main-heading:has(+.dnb-flex-stack>.dnb-card,+.dnb-card):not([class*=space__left]){margin-left:var(--spacing-medium)}}.dnb-form-main-heading:has(+.dnb-flex-stack>.dnb-card,+.dnb-card):not([class*=space__bottom]){margin-bottom:var(--spacing-small)}.dnb-spacing .dnb-form-sub-heading.dnb-h--medium:not([class*=space__]){margin:0}.dnb-form-sub-heading:has(+.dnb-flex-stack>.dnb-card,+.dnb-card):not([class*=space__bottom]){margin-bottom:var(--spacing-small)}.dnb-forms-steps-layout{-moz-column-gap:var(--spacing-medium);column-gap:var(--spacing-medium);display:flex;flex-flow:row wrap}.dnb-forms-steps-layout--drawer{align-items:stretch;flex-direction:column;justify-content:stretch}.dnb-forms-steps-layout__sidebar{flex:0;margin-bottom:2rem}.dnb-forms-steps-layout__contents{flex:1 0 25rem}.dnb-forms-steps-layout__contents .dnb-card{--border-color:var(--color-pistachio)}@media screen and (max-width:60em){.dnb-forms-steps-layout{align-items:stretch;flex-direction:column;justify-content:stretch}.dnb-forms-steps-layout__contents{flex-basis:auto}}.dnb-forms-steps-layout .dnb-step-indicator__sidebar{margin-right:0}.dnb-forms-value-block{display:block;font-size:var(--font-size-basis)}.dnb-forms-value-block--inline{display:inline-block;font-size:inherit;margin-left:var(--spacing-xx-small);margin-right:var(--spacing-xx-small)}.dnb-forms-value-block__label{font-weight:var(--font-weight-medium)}.dnb-forms-value-block__placeholder{color:rgba(0,0,0,.5)}.dnb-forms-test-element{border:1px dashed grey;border-radius:.5rem;color:#909090;padding:.5rem 1rem}
|
|
@@ -137,3 +137,5 @@ export interface ValueProps<Value> extends DataValueReadComponentProps<Value> {
|
|
|
137
137
|
/** Prepare value for display (regardless of source like props or data context) */
|
|
138
138
|
prepare?: (external: Value | undefined) => string;
|
|
139
139
|
}
|
|
140
|
+
export type Path = string;
|
|
141
|
+
export type Identifier = string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["FormError","Error","constructor","message","options","_defineProperty","validationRule","messageValues","exports","dataValueReadProps","pickDataValueReadProps","props","Object","fromEntries","entries","filter","_ref","key","includes","omitDataValueReadProps","_ref2","dataValueWriteProps","pickDataValueWriteProps","_ref3","omitDataValueWriteProps","_ref4","pickDataValueReadWriteProps","_ref5","omitDataValueReadWriteProps","_ref6"],"sources":["../../../../src/extensions/forms/types.ts"],"sourcesContent":["import type { SpacingProps } from '../../components/space/types'\nimport type { JSONSchema7 } from 'json-schema'\nimport type { JSONSchemaType } from 'ajv/dist/2020'\nimport { AriaAttributes } from 'react'\n\nexport type * from 'json-schema'\nexport type JSONSchema = JSONSchema7\nexport type AllJSONSchemaVersions = JSONSchema7 | JSONSchemaType<unknown>\nexport { JSONSchemaType }\n\ntype ValidationRule = string | string[]\ntype MessageValues = Record<string, string>\n\ninterface IFormErrorOptions {\n validationRule?: ValidationRule\n messageValues?: MessageValues\n}\n\n/**\n * Standard error object for Eufemia Forms, extending the built-in error with additional information for data handling\n */\nexport class FormError extends Error {\n /**\n * What validation rule did the error occur based on? (i.e: minLength, required or maximum)\n */\n validationRule?: ValidationRule\n\n /**\n * Replacement values relevant for this error.\n * @example { minLength: 3 } to be able to replace values in a message like \"Minimum {minLength} characters\"\n */\n messageValues?: MessageValues\n\n constructor(message: string, options?: IFormErrorOptions) {\n super(message)\n\n if (options) {\n this.validationRule = options.validationRule\n this.messageValues = options.messageValues\n }\n }\n}\n\n/**\n * Accept any key, so custom message keys can be used\n */\nexport type CustomErrorMessages = Record<string, string>\n\n/**\n * Accept any key, so custom message keys can be used\n * including the path to the field the message is for\n */\nexport type CustomErrorMessagesWithPaths =\n | CustomErrorMessages\n | {\n // eslint-disable-next-line no-unused-vars\n [K in `/${string}`]?: CustomErrorMessages\n }\n\nexport interface DefaultErrorMessages {\n required?: string\n pattern?: string\n}\n\nexport interface DataValueReadProps<Value = unknown> {\n /** JSON Pointer for where the data for this field is located in the source dataset */\n path?: string\n /** JSON Pointer for where the data for this field is located in the source iterate loop element */\n itemPath?: string\n value?: Value\n}\n\nconst dataValueReadProps = ['path', 'itemPath', 'value']\n\nexport function pickDataValueReadProps<Props extends DataValueReadProps>(\n props: Props\n): DataValueReadProps {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(([key]) =>\n dataValueReadProps.includes(key)\n )\n )\n}\n\nexport function omitDataValueReadProps<Props extends DataValueReadProps>(\n props: Props\n): Omit<DataValueReadProps, keyof DataValueReadProps> {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(\n ([key]) => !dataValueReadProps.includes(key)\n )\n )\n}\n\nexport interface DataValueWriteProps<\n Value = unknown,\n EmptyValue = undefined | string,\n> {\n emptyValue?: EmptyValue\n onFocus?: (value: Value | EmptyValue) => void\n onBlur?: (value: Value | EmptyValue) => void\n onChange?: (\n value: Value | EmptyValue,\n additionalArgs?: AdditionalEventArgs\n ) => void\n}\n\nconst dataValueWriteProps = ['emptyValue', 'onFocus', 'onBlur', 'onChange']\n\nexport function pickDataValueWriteProps<Props extends DataValueWriteProps>(\n props: Props\n): DataValueWriteProps {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(([key]) =>\n dataValueWriteProps.includes(key)\n )\n )\n}\n\nexport function omitDataValueWriteProps<Props extends DataValueWriteProps>(\n props: Props\n): Omit<DataValueWriteProps, keyof DataValueWriteProps> {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(\n ([key]) => !dataValueWriteProps.includes(key)\n )\n )\n}\n\nexport type DataValueReadWriteProps<\n Value = unknown,\n EmptyValue = undefined | string,\n> = DataValueReadProps<Value> & DataValueWriteProps<Value, EmptyValue>\n\nexport function pickDataValueReadWriteProps<\n Props extends DataValueReadWriteProps,\n>(props: Props): DataValueReadWriteProps {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(\n ([key]) =>\n dataValueReadProps.includes(key) ||\n dataValueWriteProps.includes(key)\n )\n )\n}\n\nexport function omitDataValueReadWriteProps<\n Props extends DataValueReadWriteProps,\n>(\n props: Props\n): Omit<DataValueReadWriteProps, keyof DataValueReadWriteProps> {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(\n ([key]) =>\n !dataValueReadProps.includes(key) &&\n !dataValueWriteProps.includes(key)\n )\n )\n}\n\nexport type ComponentProps = SpacingProps & {\n className?: string\n}\n\nexport type AdditionalEventArgs = Record<string, unknown>\n\nexport type DataValueReadComponentProps<Value = unknown> = ComponentProps &\n DataValueReadProps<Value>\n\nexport type DataValueReadWriteComponentProps<\n Value = unknown,\n EmptyValue = undefined | string,\n> = ComponentProps &\n DataValueReadProps<Value> &\n DataValueWriteProps<Value, EmptyValue>\n\nexport interface FieldProps<\n Value = unknown,\n EmptyValue = undefined | string,\n ErrorMessages extends DefaultErrorMessages = DefaultErrorMessages,\n> extends DataValueReadWriteComponentProps<Value, EmptyValue>,\n AriaAttributes {\n /** ID added to the actual field component, and linked to the label via for-attribute */\n id?: string\n name?: string\n layout?: 'horizontal' | 'vertical'\n /** Main label text */\n label?: React.ReactNode\n /** A more discreet text displayed beside the label */\n labelDescription?: React.ReactNode\n /** Text showing in place of the value if no value is given */\n placeholder?: string\n autoComplete?:\n | HTMLInputElement['autocomplete']\n | HTMLTextAreaElement['autocomplete']\n info?: React.ReactNode\n warning?: React.ReactNode\n error?: Error | FormError\n hasError?: boolean\n disabled?: boolean\n readOnly?: boolean\n capitalize?: boolean\n trim?: boolean\n // Validation\n required?: boolean\n schema?: AllJSONSchemaVersions\n validator?: (\n value: Value | EmptyValue,\n errorMessages?: ErrorMessages\n ) => Error | undefined | Promise<Error | undefined>\n onBlurValidator?: (\n value: Value | EmptyValue\n ) => Error | undefined | Promise<Error | undefined>\n /**\n * Should error messages based on validation be shown initially (from given value-prop or source data)\n * before the user interacts with the field?\n * @default false\n */\n validateInitially?: boolean\n /**\n * Should error messages be shown when touching (like focusing a field and blurring) without having changed\n * the value? So the user did not introduce a new error, but it was invalid based on validation initially.\n */\n validateUnchanged?: boolean\n /** Should validation be done while writing, not just when blurring the field? */\n continuousValidation?: boolean\n errorMessages?: ErrorMessages\n // Derivatives\n toInput?: (external: Value | unknown) => Value | unknown\n fromInput?: (external: Value | unknown) => Value\n toEvent?: (\n internal: Value,\n type: 'onChange' | 'onFocus' | 'onBlur' | 'onBlurValidator'\n ) => Value\n fromExternal?: (external: Value) => Value\n transformValue?: (value: Value, currentValue?: Value) => Value\n validateRequired?: (\n internal: Value,\n {\n emptyValue,\n required,\n isChanged,\n error,\n }: {\n emptyValue: EmptyValue\n required: boolean\n isChanged: boolean\n error: FormError | undefined\n }\n ) => FormError | undefined\n}\n\nexport interface FieldHelpProps {\n help?: {\n title?: string\n content?: string\n }\n}\n\nexport interface ValueProps<Value>\n extends DataValueReadComponentProps<Value> {\n label?: string\n /** Field label to show above the data value. */\n showEmpty?: boolean\n /** Text showing in place of the value if no value is given. */\n placeholder?: string\n /** JSON Pointer for where the data for this field is located in the source iterate loop element */\n itemPath?: string\n /** For showing the value inline (not as a block element) */\n inline?: boolean\n // Derivatives\n /** Prepare value for display (regardless of source like props or data context) */\n prepare?: (external: Value | undefined) => string\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqBO,MAAMA,SAAS,SAASC,KAAK,CAAC;EAYnCC,WAAWA,CAACC,OAAe,EAAEC,OAA2B,EAAE;IACxD,KAAK,CAACD,OAAO,CAAC;IAAAE,eAAA;IAAAA,eAAA;IAEd,IAAID,OAAO,EAAE;MACX,IAAI,CAACE,cAAc,GAAGF,OAAO,CAACE,cAAc;MAC5C,IAAI,CAACC,aAAa,GAAGH,OAAO,CAACG,aAAa;IAC5C;EACF;AACF;AAACC,OAAA,CAAAR,SAAA,GAAAA,SAAA;AA+BD,MAAMS,kBAAkB,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC;AAEjD,SAASC,sBAAsBA,CACpCC,KAAY,EACQ;EACpB,OAAOC,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACH,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,CAAC,CAAC,CAAC,CAACI,MAAM,CAACC,IAAA;IAAA,IAAC,CAACC,GAAG,CAAC,GAAAD,IAAA;IAAA,OACvCP,kBAAkB,CAACS,QAAQ,CAACD,GAAG,CAAC;EAAA,CAClC,CACF,CAAC;AACH;AAEO,SAASE,sBAAsBA,CACpCR,KAAY,EACwC;EACpD,OAAOC,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACH,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,CAAC,CAAC,CAAC,CA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2BA,CAGzCjB,KAAY,EACkD;EAC9D,OAAOC,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACH,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,CAAC,CAAC,CAAC,CAACI,MAAM,CAChCc,KAAA;IAAA,IAAC,CAACZ,GAAG,CAAC,GAAAY,KAAA;IAAA,OACJ,CAACpB,kBAAkB,CAACS,QAAQ,CAACD,GAAG,CAAC,IACjC,CAACI,mBAAmB,CAACH,QAAQ,CAACD,GAAG,CAAC;EAAA,CACtC,CACF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["FormError","Error","constructor","message","options","_defineProperty","validationRule","messageValues","exports","dataValueReadProps","pickDataValueReadProps","props","Object","fromEntries","entries","filter","_ref","key","includes","omitDataValueReadProps","_ref2","dataValueWriteProps","pickDataValueWriteProps","_ref3","omitDataValueWriteProps","_ref4","pickDataValueReadWriteProps","_ref5","omitDataValueReadWriteProps","_ref6"],"sources":["../../../../src/extensions/forms/types.ts"],"sourcesContent":["import type { SpacingProps } from '../../components/space/types'\nimport type { JSONSchema7 } from 'json-schema'\nimport type { JSONSchemaType } from 'ajv/dist/2020'\nimport { AriaAttributes } from 'react'\n\nexport type * from 'json-schema'\nexport type JSONSchema = JSONSchema7\nexport type AllJSONSchemaVersions = JSONSchema7 | JSONSchemaType<unknown>\nexport { JSONSchemaType }\n\ntype ValidationRule = string | string[]\ntype MessageValues = Record<string, string>\n\ninterface IFormErrorOptions {\n validationRule?: ValidationRule\n messageValues?: MessageValues\n}\n\n/**\n * Standard error object for Eufemia Forms, extending the built-in error with additional information for data handling\n */\nexport class FormError extends Error {\n /**\n * What validation rule did the error occur based on? (i.e: minLength, required or maximum)\n */\n validationRule?: ValidationRule\n\n /**\n * Replacement values relevant for this error.\n * @example { minLength: 3 } to be able to replace values in a message like \"Minimum {minLength} characters\"\n */\n messageValues?: MessageValues\n\n constructor(message: string, options?: IFormErrorOptions) {\n super(message)\n\n if (options) {\n this.validationRule = options.validationRule\n this.messageValues = options.messageValues\n }\n }\n}\n\n/**\n * Accept any key, so custom message keys can be used\n */\nexport type CustomErrorMessages = Record<string, string>\n\n/**\n * Accept any key, so custom message keys can be used\n * including the path to the field the message is for\n */\nexport type CustomErrorMessagesWithPaths =\n | CustomErrorMessages\n | {\n // eslint-disable-next-line no-unused-vars\n [K in `/${string}`]?: CustomErrorMessages\n }\n\nexport interface DefaultErrorMessages {\n required?: string\n pattern?: string\n}\n\nexport interface DataValueReadProps<Value = unknown> {\n /** JSON Pointer for where the data for this field is located in the source dataset */\n path?: string\n /** JSON Pointer for where the data for this field is located in the source iterate loop element */\n itemPath?: string\n value?: Value\n}\n\nconst dataValueReadProps = ['path', 'itemPath', 'value']\n\nexport function pickDataValueReadProps<Props extends DataValueReadProps>(\n props: Props\n): DataValueReadProps {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(([key]) =>\n dataValueReadProps.includes(key)\n )\n )\n}\n\nexport function omitDataValueReadProps<Props extends DataValueReadProps>(\n props: Props\n): Omit<DataValueReadProps, keyof DataValueReadProps> {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(\n ([key]) => !dataValueReadProps.includes(key)\n )\n )\n}\n\nexport interface DataValueWriteProps<\n Value = unknown,\n EmptyValue = undefined | string,\n> {\n emptyValue?: EmptyValue\n onFocus?: (value: Value | EmptyValue) => void\n onBlur?: (value: Value | EmptyValue) => void\n onChange?: (\n value: Value | EmptyValue,\n additionalArgs?: AdditionalEventArgs\n ) => void\n}\n\nconst dataValueWriteProps = ['emptyValue', 'onFocus', 'onBlur', 'onChange']\n\nexport function pickDataValueWriteProps<Props extends DataValueWriteProps>(\n props: Props\n): DataValueWriteProps {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(([key]) =>\n dataValueWriteProps.includes(key)\n )\n )\n}\n\nexport function omitDataValueWriteProps<Props extends DataValueWriteProps>(\n props: Props\n): Omit<DataValueWriteProps, keyof DataValueWriteProps> {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(\n ([key]) => !dataValueWriteProps.includes(key)\n )\n )\n}\n\nexport type DataValueReadWriteProps<\n Value = unknown,\n EmptyValue = undefined | string,\n> = DataValueReadProps<Value> & DataValueWriteProps<Value, EmptyValue>\n\nexport function pickDataValueReadWriteProps<\n Props extends DataValueReadWriteProps,\n>(props: Props): DataValueReadWriteProps {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(\n ([key]) =>\n dataValueReadProps.includes(key) ||\n dataValueWriteProps.includes(key)\n )\n )\n}\n\nexport function omitDataValueReadWriteProps<\n Props extends DataValueReadWriteProps,\n>(\n props: Props\n): Omit<DataValueReadWriteProps, keyof DataValueReadWriteProps> {\n return Object.fromEntries(\n Object.entries(props ?? {}).filter(\n ([key]) =>\n !dataValueReadProps.includes(key) &&\n !dataValueWriteProps.includes(key)\n )\n )\n}\n\nexport type ComponentProps = SpacingProps & {\n className?: string\n}\n\nexport type AdditionalEventArgs = Record<string, unknown>\n\nexport type DataValueReadComponentProps<Value = unknown> = ComponentProps &\n DataValueReadProps<Value>\n\nexport type DataValueReadWriteComponentProps<\n Value = unknown,\n EmptyValue = undefined | string,\n> = ComponentProps &\n DataValueReadProps<Value> &\n DataValueWriteProps<Value, EmptyValue>\n\nexport interface FieldProps<\n Value = unknown,\n EmptyValue = undefined | string,\n ErrorMessages extends DefaultErrorMessages = DefaultErrorMessages,\n> extends DataValueReadWriteComponentProps<Value, EmptyValue>,\n AriaAttributes {\n /** ID added to the actual field component, and linked to the label via for-attribute */\n id?: string\n name?: string\n layout?: 'horizontal' | 'vertical'\n /** Main label text */\n label?: React.ReactNode\n /** A more discreet text displayed beside the label */\n labelDescription?: React.ReactNode\n /** Text showing in place of the value if no value is given */\n placeholder?: string\n autoComplete?:\n | HTMLInputElement['autocomplete']\n | HTMLTextAreaElement['autocomplete']\n info?: React.ReactNode\n warning?: React.ReactNode\n error?: Error | FormError\n hasError?: boolean\n disabled?: boolean\n readOnly?: boolean\n capitalize?: boolean\n trim?: boolean\n // Validation\n required?: boolean\n schema?: AllJSONSchemaVersions\n validator?: (\n value: Value | EmptyValue,\n errorMessages?: ErrorMessages\n ) => Error | undefined | Promise<Error | undefined>\n onBlurValidator?: (\n value: Value | EmptyValue\n ) => Error | undefined | Promise<Error | undefined>\n /**\n * Should error messages based on validation be shown initially (from given value-prop or source data)\n * before the user interacts with the field?\n * @default false\n */\n validateInitially?: boolean\n /**\n * Should error messages be shown when touching (like focusing a field and blurring) without having changed\n * the value? So the user did not introduce a new error, but it was invalid based on validation initially.\n */\n validateUnchanged?: boolean\n /** Should validation be done while writing, not just when blurring the field? */\n continuousValidation?: boolean\n errorMessages?: ErrorMessages\n // Derivatives\n toInput?: (external: Value | unknown) => Value | unknown\n fromInput?: (external: Value | unknown) => Value\n toEvent?: (\n internal: Value,\n type: 'onChange' | 'onFocus' | 'onBlur' | 'onBlurValidator'\n ) => Value\n fromExternal?: (external: Value) => Value\n transformValue?: (value: Value, currentValue?: Value) => Value\n validateRequired?: (\n internal: Value,\n {\n emptyValue,\n required,\n isChanged,\n error,\n }: {\n emptyValue: EmptyValue\n required: boolean\n isChanged: boolean\n error: FormError | undefined\n }\n ) => FormError | undefined\n}\n\nexport interface FieldHelpProps {\n help?: {\n title?: string\n content?: string\n }\n}\n\nexport interface ValueProps<Value>\n extends DataValueReadComponentProps<Value> {\n label?: string\n /** Field label to show above the data value. */\n showEmpty?: boolean\n /** Text showing in place of the value if no value is given. */\n placeholder?: string\n /** JSON Pointer for where the data for this field is located in the source iterate loop element */\n itemPath?: string\n /** For showing the value inline (not as a block element) */\n inline?: boolean\n // Derivatives\n /** Prepare value for display (regardless of source like props or data context) */\n prepare?: (external: Value | undefined) => string\n}\n\nexport type Path = string\nexport type Identifier = string\n"],"mappings":";;;;;;;;;;;;;;;AAqBO,MAAMA,SAAS,SAASC,KAAK,CAAC;EAYnCC,WAAWA,CAACC,OAAe,EAAEC,OAA2B,EAAE;IACxD,KAAK,CAACD,OAAO,CAAC;IAAAE,eA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