@dnb/eufemia 10.64.0 → 10.65.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 +51 -0
- package/cjs/components/date-picker/DatePicker.js +2 -6
- package/cjs/components/date-picker/DatePicker.js.map +1 -1
- package/cjs/components/date-picker/DatePickerInput.js +2 -2
- package/cjs/components/date-picker/DatePickerInput.js.map +1 -1
- package/cjs/components/input-masked/MultiInputMask.d.ts +2 -1
- package/cjs/components/input-masked/MultiInputMask.js.map +1 -1
- package/cjs/components/logo/style/themes/dnb-logo-theme-sbanken.css +1 -1
- package/cjs/components/logo/style/themes/dnb-logo-theme-sbanken.min.css +1 -1
- package/cjs/components/logo/style/themes/dnb-logo-theme-sbanken.scss +1 -1
- package/cjs/components/radio/RadioGroup.d.ts +1 -1
- package/cjs/components/skeleton/style/themes/dnb-skeleton-theme-sbanken.css +4 -7
- package/cjs/components/skeleton/style/themes/dnb-skeleton-theme-sbanken.min.css +1 -0
- package/cjs/components/skeleton/style/themes/dnb-skeleton-theme-sbanken.scss +5 -7
- package/cjs/components/skeleton/style/themes/dnb-skeleton-theme-ui.css +4 -7
- package/cjs/components/skeleton/style/themes/dnb-skeleton-theme-ui.min.css +1 -0
- package/cjs/components/skeleton/style/themes/dnb-skeleton-theme-ui.scss +5 -7
- package/cjs/components/toggle-button/ToggleButtonGroup.d.ts +2 -0
- package/cjs/components/toggle-button/ToggleButtonGroup.js +5 -1
- package/cjs/components/toggle-button/ToggleButtonGroup.js.map +1 -1
- package/cjs/extensions/forms/Field/Address/AddressDocs.js +7 -7
- package/cjs/extensions/forms/Field/Address/AddressDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/ArraySelection/ArraySelection.d.ts +8 -1
- package/cjs/extensions/forms/Field/ArraySelection/ArraySelection.js +9 -2
- package/cjs/extensions/forms/Field/ArraySelection/ArraySelection.js.map +1 -1
- package/cjs/extensions/forms/Field/ArraySelection/ArraySelectionDocs.js +5 -0
- package/cjs/extensions/forms/Field/ArraySelection/ArraySelectionDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/BankAccountNumber/BankAccountNumber.d.ts +2 -2
- package/cjs/extensions/forms/Field/BankAccountNumber/BankAccountNumber.js.map +1 -1
- package/cjs/extensions/forms/Field/Boolean/Boolean.d.ts +1 -0
- package/cjs/extensions/forms/Field/Boolean/Boolean.js.map +1 -1
- package/cjs/extensions/forms/Field/Boolean/BooleanDocs.js +3 -1
- package/cjs/extensions/forms/Field/Boolean/BooleanDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Date/Date.d.ts +5 -4
- package/cjs/extensions/forms/Field/Date/Date.js +123 -11
- package/cjs/extensions/forms/Field/Date/Date.js.map +1 -1
- package/cjs/extensions/forms/Field/Date/DateDocs.js +13 -4
- package/cjs/extensions/forms/Field/Date/DateDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Email/EmailDocs.js +7 -7
- package/cjs/extensions/forms/Field/Email/EmailDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Expiry/Expiry.d.ts +7 -1
- package/cjs/extensions/forms/Field/Expiry/Expiry.js +2 -0
- package/cjs/extensions/forms/Field/Expiry/Expiry.js.map +1 -1
- package/cjs/extensions/forms/Field/Expiry/ExpiryDocs.d.ts +2 -0
- package/cjs/extensions/forms/Field/Expiry/ExpiryDocs.js +19 -0
- package/cjs/extensions/forms/Field/Expiry/ExpiryDocs.js.map +1 -0
- package/cjs/extensions/forms/Field/Name/NameDocs.js +7 -1
- package/cjs/extensions/forms/Field/Name/NameDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/NationalIdentityNumber/NationalIdentityNumber.d.ts +2 -2
- package/cjs/extensions/forms/Field/NationalIdentityNumber/NationalIdentityNumber.js.map +1 -1
- package/cjs/extensions/forms/Field/Number/NumberDocs.js +8 -1
- package/cjs/extensions/forms/Field/Number/NumberDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/OrganizationNumber/OrganizationNumber.d.ts +2 -2
- package/cjs/extensions/forms/Field/OrganizationNumber/OrganizationNumber.js.map +1 -1
- package/cjs/extensions/forms/Field/Password/PasswordDocs.js +2 -2
- package/cjs/extensions/forms/Field/Password/PasswordDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumber.d.ts +1 -1
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumber.js +5 -2
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumber.js.map +1 -1
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js +2 -0
- package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.d.ts +1 -1
- package/cjs/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js +6 -2
- package/cjs/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js.map +1 -1
- package/cjs/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js +3 -1
- package/cjs/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/SelectCountry/SelectCountry.d.ts +5 -0
- package/cjs/extensions/forms/Field/SelectCountry/SelectCountry.js +2 -0
- package/cjs/extensions/forms/Field/SelectCountry/SelectCountry.js.map +1 -1
- package/cjs/extensions/forms/Field/SelectCountry/SelectCountryDocs.js +10 -1
- package/cjs/extensions/forms/Field/SelectCountry/SelectCountryDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Selection/Selection.d.ts +9 -0
- package/cjs/extensions/forms/Field/Selection/Selection.js +20 -13
- package/cjs/extensions/forms/Field/Selection/Selection.js.map +1 -1
- package/cjs/extensions/forms/Field/Selection/SelectionDocs.js +5 -0
- package/cjs/extensions/forms/Field/Selection/SelectionDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/String/StringDocs.js +8 -1
- package/cjs/extensions/forms/Field/String/StringDocs.js.map +1 -1
- package/cjs/extensions/forms/Field/Toggle/Toggle.d.ts +3 -0
- package/cjs/extensions/forms/Field/Toggle/Toggle.js +6 -1
- package/cjs/extensions/forms/Field/Toggle/Toggle.js.map +1 -1
- package/cjs/extensions/forms/Field/Toggle/ToggleDocs.js +5 -0
- package/cjs/extensions/forms/Field/Toggle/ToggleDocs.js.map +1 -1
- package/cjs/extensions/forms/Form/Visibility/Visibility.d.ts +1 -1
- package/cjs/extensions/forms/Form/Visibility/Visibility.js.map +1 -1
- package/cjs/extensions/forms/Form/Visibility/VisibilityDocs.js +1 -1
- package/cjs/extensions/forms/Form/Visibility/VisibilityDocs.js.map +1 -1
- package/cjs/extensions/forms/Value/Date/Date.d.ts +3 -2
- package/cjs/extensions/forms/Value/Date/Date.js.map +1 -1
- package/cjs/extensions/forms/Wizard/Container/WizardContainer.js +20 -8
- package/cjs/extensions/forms/Wizard/Container/WizardContainer.js.map +1 -1
- package/cjs/extensions/forms/Wizard/Context/WizardContext.d.ts +1 -0
- package/cjs/extensions/forms/Wizard/Context/WizardContext.js.map +1 -1
- package/cjs/extensions/forms/Wizard/Step/Step.d.ts +16 -1
- package/cjs/extensions/forms/Wizard/Step/Step.js +32 -10
- package/cjs/extensions/forms/Wizard/Step/Step.js.map +1 -1
- package/cjs/extensions/forms/Wizard/Step/StepDocs.js +18 -3
- package/cjs/extensions/forms/Wizard/Step/StepDocs.js.map +1 -1
- package/cjs/extensions/forms/constants/locales/en-GB.d.ts +6 -0
- package/cjs/extensions/forms/constants/locales/en-GB.js +7 -1
- package/cjs/extensions/forms/constants/locales/en-GB.js.map +1 -1
- package/cjs/extensions/forms/constants/locales/en-US.d.ts +6 -0
- package/cjs/extensions/forms/constants/locales/index.d.ts +12 -0
- package/cjs/extensions/forms/constants/locales/nb-NO.d.ts +6 -0
- package/cjs/extensions/forms/constants/locales/nb-NO.js +7 -1
- package/cjs/extensions/forms/constants/locales/nb-NO.js.map +1 -1
- package/cjs/extensions/forms/types.d.ts +1 -0
- package/cjs/extensions/forms/types.js.map +1 -1
- package/cjs/fragments/drawer-list/DrawerList.d.ts +6 -1
- 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/style/core/scopes.scss +1 -1
- package/cjs/style/dnb-ui-basis.css +1 -1
- package/cjs/style/dnb-ui-basis.min.css +1 -1
- package/cjs/style/dnb-ui-body.css +1 -1
- package/cjs/style/dnb-ui-body.min.css +1 -1
- package/cjs/style/dnb-ui-core.css +1 -1
- package/cjs/style/dnb-ui-core.min.css +1 -1
- package/cjs/style/themes/theme-eiendom/eiendom-theme-basis.css +0 -2
- package/cjs/style/themes/theme-eiendom/eiendom-theme-basis.min.css +1 -1
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.css +5 -7
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
- package/cjs/style/themes/theme-sbanken/globals.scss +0 -4
- package/cjs/style/themes/theme-sbanken/sbanken-theme-basis.css +0 -2
- package/cjs/style/themes/theme-sbanken/sbanken-theme-basis.min.css +1 -1
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.css +6 -8
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.min.css +2 -2
- package/cjs/style/themes/theme-ui/globals.scss +0 -4
- package/cjs/style/themes/theme-ui/ui-theme-basis.css +0 -2
- package/cjs/style/themes/theme-ui/ui-theme-basis.min.css +1 -1
- package/cjs/style/themes/theme-ui/ui-theme-components.css +5 -7
- package/cjs/style/themes/theme-ui/ui-theme-components.min.css +1 -1
- package/components/date-picker/DatePicker.js +2 -6
- package/components/date-picker/DatePicker.js.map +1 -1
- package/components/date-picker/DatePickerInput.js +2 -2
- package/components/date-picker/DatePickerInput.js.map +1 -1
- package/components/input-masked/MultiInputMask.d.ts +2 -1
- package/components/input-masked/MultiInputMask.js.map +1 -1
- package/components/logo/style/themes/dnb-logo-theme-sbanken.css +1 -1
- package/components/logo/style/themes/dnb-logo-theme-sbanken.min.css +1 -1
- package/components/logo/style/themes/dnb-logo-theme-sbanken.scss +1 -1
- package/components/radio/RadioGroup.d.ts +1 -1
- package/components/skeleton/style/themes/dnb-skeleton-theme-sbanken.css +4 -7
- package/components/skeleton/style/themes/dnb-skeleton-theme-sbanken.min.css +1 -0
- package/components/skeleton/style/themes/dnb-skeleton-theme-sbanken.scss +5 -7
- package/components/skeleton/style/themes/dnb-skeleton-theme-ui.css +4 -7
- package/components/skeleton/style/themes/dnb-skeleton-theme-ui.min.css +1 -0
- package/components/skeleton/style/themes/dnb-skeleton-theme-ui.scss +5 -7
- package/components/toggle-button/ToggleButtonGroup.d.ts +2 -0
- package/components/toggle-button/ToggleButtonGroup.js +5 -1
- package/components/toggle-button/ToggleButtonGroup.js.map +1 -1
- package/es/components/date-picker/DatePicker.js +2 -6
- package/es/components/date-picker/DatePicker.js.map +1 -1
- package/es/components/date-picker/DatePickerInput.js +2 -2
- package/es/components/date-picker/DatePickerInput.js.map +1 -1
- package/es/components/input-masked/MultiInputMask.d.ts +2 -1
- package/es/components/input-masked/MultiInputMask.js.map +1 -1
- package/es/components/logo/style/themes/dnb-logo-theme-sbanken.css +1 -1
- package/es/components/logo/style/themes/dnb-logo-theme-sbanken.min.css +1 -1
- package/es/components/logo/style/themes/dnb-logo-theme-sbanken.scss +1 -1
- package/es/components/radio/RadioGroup.d.ts +1 -1
- package/es/components/skeleton/style/themes/dnb-skeleton-theme-sbanken.css +4 -7
- package/es/components/skeleton/style/themes/dnb-skeleton-theme-sbanken.min.css +1 -0
- package/es/components/skeleton/style/themes/dnb-skeleton-theme-sbanken.scss +5 -7
- package/es/components/skeleton/style/themes/dnb-skeleton-theme-ui.css +4 -7
- package/es/components/skeleton/style/themes/dnb-skeleton-theme-ui.min.css +1 -0
- package/es/components/skeleton/style/themes/dnb-skeleton-theme-ui.scss +5 -7
- package/es/components/toggle-button/ToggleButtonGroup.d.ts +2 -0
- package/es/components/toggle-button/ToggleButtonGroup.js +5 -1
- package/es/components/toggle-button/ToggleButtonGroup.js.map +1 -1
- package/es/extensions/forms/Field/Address/AddressDocs.js +5 -7
- package/es/extensions/forms/Field/Address/AddressDocs.js.map +1 -1
- package/es/extensions/forms/Field/ArraySelection/ArraySelection.d.ts +8 -1
- package/es/extensions/forms/Field/ArraySelection/ArraySelection.js +9 -2
- package/es/extensions/forms/Field/ArraySelection/ArraySelection.js.map +1 -1
- package/es/extensions/forms/Field/ArraySelection/ArraySelectionDocs.js +5 -0
- package/es/extensions/forms/Field/ArraySelection/ArraySelectionDocs.js.map +1 -1
- package/es/extensions/forms/Field/BankAccountNumber/BankAccountNumber.d.ts +2 -2
- package/es/extensions/forms/Field/BankAccountNumber/BankAccountNumber.js.map +1 -1
- package/es/extensions/forms/Field/Boolean/Boolean.d.ts +1 -0
- package/es/extensions/forms/Field/Boolean/Boolean.js.map +1 -1
- package/es/extensions/forms/Field/Boolean/BooleanDocs.js +3 -1
- package/es/extensions/forms/Field/Boolean/BooleanDocs.js.map +1 -1
- package/es/extensions/forms/Field/Date/Date.d.ts +5 -4
- package/es/extensions/forms/Field/Date/Date.js +124 -12
- package/es/extensions/forms/Field/Date/Date.js.map +1 -1
- package/es/extensions/forms/Field/Date/DateDocs.js +13 -4
- package/es/extensions/forms/Field/Date/DateDocs.js.map +1 -1
- package/es/extensions/forms/Field/Email/EmailDocs.js +5 -7
- package/es/extensions/forms/Field/Email/EmailDocs.js.map +1 -1
- package/es/extensions/forms/Field/Expiry/Expiry.d.ts +7 -1
- package/es/extensions/forms/Field/Expiry/Expiry.js +2 -0
- package/es/extensions/forms/Field/Expiry/Expiry.js.map +1 -1
- package/es/extensions/forms/Field/Expiry/ExpiryDocs.d.ts +2 -0
- package/es/extensions/forms/Field/Expiry/ExpiryDocs.js +10 -0
- package/es/extensions/forms/Field/Expiry/ExpiryDocs.js.map +1 -0
- package/es/extensions/forms/Field/Name/NameDocs.js +6 -1
- package/es/extensions/forms/Field/Name/NameDocs.js.map +1 -1
- package/es/extensions/forms/Field/NationalIdentityNumber/NationalIdentityNumber.d.ts +2 -2
- package/es/extensions/forms/Field/NationalIdentityNumber/NationalIdentityNumber.js.map +1 -1
- package/es/extensions/forms/Field/Number/NumberDocs.js +6 -1
- package/es/extensions/forms/Field/Number/NumberDocs.js.map +1 -1
- package/es/extensions/forms/Field/OrganizationNumber/OrganizationNumber.d.ts +2 -2
- package/es/extensions/forms/Field/OrganizationNumber/OrganizationNumber.js.map +1 -1
- package/es/extensions/forms/Field/Password/PasswordDocs.js +2 -2
- package/es/extensions/forms/Field/Password/PasswordDocs.js.map +1 -1
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumber.d.ts +1 -1
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumber.js +5 -2
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumber.js.map +1 -1
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js +2 -0
- package/es/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js.map +1 -1
- package/es/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.d.ts +1 -1
- package/es/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js +6 -2
- package/es/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js.map +1 -1
- package/es/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js +3 -1
- package/es/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js.map +1 -1
- package/es/extensions/forms/Field/SelectCountry/SelectCountry.d.ts +5 -0
- package/es/extensions/forms/Field/SelectCountry/SelectCountry.js +2 -0
- package/es/extensions/forms/Field/SelectCountry/SelectCountry.js.map +1 -1
- package/es/extensions/forms/Field/SelectCountry/SelectCountryDocs.js +8 -1
- package/es/extensions/forms/Field/SelectCountry/SelectCountryDocs.js.map +1 -1
- package/es/extensions/forms/Field/Selection/Selection.d.ts +9 -0
- package/es/extensions/forms/Field/Selection/Selection.js +18 -11
- package/es/extensions/forms/Field/Selection/Selection.js.map +1 -1
- package/es/extensions/forms/Field/Selection/SelectionDocs.js +5 -0
- package/es/extensions/forms/Field/Selection/SelectionDocs.js.map +1 -1
- package/es/extensions/forms/Field/String/StringDocs.js +6 -1
- package/es/extensions/forms/Field/String/StringDocs.js.map +1 -1
- package/es/extensions/forms/Field/Toggle/Toggle.d.ts +3 -0
- package/es/extensions/forms/Field/Toggle/Toggle.js +6 -1
- package/es/extensions/forms/Field/Toggle/Toggle.js.map +1 -1
- package/es/extensions/forms/Field/Toggle/ToggleDocs.js +5 -0
- package/es/extensions/forms/Field/Toggle/ToggleDocs.js.map +1 -1
- package/es/extensions/forms/Form/Visibility/Visibility.d.ts +1 -1
- package/es/extensions/forms/Form/Visibility/Visibility.js.map +1 -1
- package/es/extensions/forms/Form/Visibility/VisibilityDocs.js +1 -1
- package/es/extensions/forms/Form/Visibility/VisibilityDocs.js.map +1 -1
- package/es/extensions/forms/Value/Date/Date.d.ts +3 -2
- package/es/extensions/forms/Value/Date/Date.js.map +1 -1
- package/es/extensions/forms/Wizard/Container/WizardContainer.js +20 -8
- package/es/extensions/forms/Wizard/Container/WizardContainer.js.map +1 -1
- package/es/extensions/forms/Wizard/Context/WizardContext.d.ts +1 -0
- package/es/extensions/forms/Wizard/Context/WizardContext.js.map +1 -1
- package/es/extensions/forms/Wizard/Step/Step.d.ts +16 -1
- package/es/extensions/forms/Wizard/Step/Step.js +29 -10
- package/es/extensions/forms/Wizard/Step/Step.js.map +1 -1
- package/es/extensions/forms/Wizard/Step/StepDocs.js +18 -3
- package/es/extensions/forms/Wizard/Step/StepDocs.js.map +1 -1
- package/es/extensions/forms/constants/locales/en-GB.d.ts +6 -0
- package/es/extensions/forms/constants/locales/en-GB.js +7 -1
- package/es/extensions/forms/constants/locales/en-GB.js.map +1 -1
- package/es/extensions/forms/constants/locales/en-US.d.ts +6 -0
- package/es/extensions/forms/constants/locales/index.d.ts +12 -0
- package/es/extensions/forms/constants/locales/nb-NO.d.ts +6 -0
- package/es/extensions/forms/constants/locales/nb-NO.js +7 -1
- package/es/extensions/forms/constants/locales/nb-NO.js.map +1 -1
- package/es/extensions/forms/types.d.ts +1 -0
- package/es/extensions/forms/types.js.map +1 -1
- package/es/fragments/drawer-list/DrawerList.d.ts +6 -1
- 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/style/core/scopes.scss +1 -1
- package/es/style/dnb-ui-basis.css +1 -1
- package/es/style/dnb-ui-basis.min.css +1 -1
- package/es/style/dnb-ui-body.css +1 -1
- package/es/style/dnb-ui-body.min.css +1 -1
- package/es/style/dnb-ui-core.css +1 -1
- package/es/style/dnb-ui-core.min.css +1 -1
- package/es/style/themes/theme-eiendom/eiendom-theme-basis.css +0 -2
- package/es/style/themes/theme-eiendom/eiendom-theme-basis.min.css +1 -1
- package/es/style/themes/theme-eiendom/eiendom-theme-components.css +5 -7
- package/es/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
- package/es/style/themes/theme-sbanken/globals.scss +0 -4
- package/es/style/themes/theme-sbanken/sbanken-theme-basis.css +0 -2
- package/es/style/themes/theme-sbanken/sbanken-theme-basis.min.css +1 -1
- package/es/style/themes/theme-sbanken/sbanken-theme-components.css +6 -8
- package/es/style/themes/theme-sbanken/sbanken-theme-components.min.css +2 -2
- package/es/style/themes/theme-ui/globals.scss +0 -4
- package/es/style/themes/theme-ui/ui-theme-basis.css +0 -2
- package/es/style/themes/theme-ui/ui-theme-basis.min.css +1 -1
- package/es/style/themes/theme-ui/ui-theme-components.css +5 -7
- package/es/style/themes/theme-ui/ui-theme-components.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/Field/Address/AddressDocs.js +5 -7
- package/extensions/forms/Field/Address/AddressDocs.js.map +1 -1
- package/extensions/forms/Field/ArraySelection/ArraySelection.d.ts +8 -1
- package/extensions/forms/Field/ArraySelection/ArraySelection.js +9 -2
- package/extensions/forms/Field/ArraySelection/ArraySelection.js.map +1 -1
- package/extensions/forms/Field/ArraySelection/ArraySelectionDocs.js +5 -0
- package/extensions/forms/Field/ArraySelection/ArraySelectionDocs.js.map +1 -1
- package/extensions/forms/Field/BankAccountNumber/BankAccountNumber.d.ts +2 -2
- package/extensions/forms/Field/BankAccountNumber/BankAccountNumber.js.map +1 -1
- package/extensions/forms/Field/Boolean/Boolean.d.ts +1 -0
- package/extensions/forms/Field/Boolean/Boolean.js.map +1 -1
- package/extensions/forms/Field/Boolean/BooleanDocs.js +3 -1
- package/extensions/forms/Field/Boolean/BooleanDocs.js.map +1 -1
- package/extensions/forms/Field/Date/Date.d.ts +5 -4
- package/extensions/forms/Field/Date/Date.js +124 -12
- package/extensions/forms/Field/Date/Date.js.map +1 -1
- package/extensions/forms/Field/Date/DateDocs.js +13 -4
- package/extensions/forms/Field/Date/DateDocs.js.map +1 -1
- package/extensions/forms/Field/Email/EmailDocs.js +5 -7
- package/extensions/forms/Field/Email/EmailDocs.js.map +1 -1
- package/extensions/forms/Field/Expiry/Expiry.d.ts +7 -1
- package/extensions/forms/Field/Expiry/Expiry.js +2 -0
- package/extensions/forms/Field/Expiry/Expiry.js.map +1 -1
- package/extensions/forms/Field/Expiry/ExpiryDocs.d.ts +2 -0
- package/extensions/forms/Field/Expiry/ExpiryDocs.js +10 -0
- package/extensions/forms/Field/Expiry/ExpiryDocs.js.map +1 -0
- package/extensions/forms/Field/Name/NameDocs.js +6 -1
- package/extensions/forms/Field/Name/NameDocs.js.map +1 -1
- package/extensions/forms/Field/NationalIdentityNumber/NationalIdentityNumber.d.ts +2 -2
- package/extensions/forms/Field/NationalIdentityNumber/NationalIdentityNumber.js.map +1 -1
- package/extensions/forms/Field/Number/NumberDocs.js +6 -1
- package/extensions/forms/Field/Number/NumberDocs.js.map +1 -1
- package/extensions/forms/Field/OrganizationNumber/OrganizationNumber.d.ts +2 -2
- package/extensions/forms/Field/OrganizationNumber/OrganizationNumber.js.map +1 -1
- package/extensions/forms/Field/Password/PasswordDocs.js +2 -2
- package/extensions/forms/Field/Password/PasswordDocs.js.map +1 -1
- package/extensions/forms/Field/PhoneNumber/PhoneNumber.d.ts +1 -1
- package/extensions/forms/Field/PhoneNumber/PhoneNumber.js +5 -2
- package/extensions/forms/Field/PhoneNumber/PhoneNumber.js.map +1 -1
- package/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js +2 -0
- package/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js.map +1 -1
- package/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.d.ts +1 -1
- package/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js +6 -2
- package/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js.map +1 -1
- package/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js +3 -1
- package/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js.map +1 -1
- package/extensions/forms/Field/SelectCountry/SelectCountry.d.ts +5 -0
- package/extensions/forms/Field/SelectCountry/SelectCountry.js +2 -0
- package/extensions/forms/Field/SelectCountry/SelectCountry.js.map +1 -1
- package/extensions/forms/Field/SelectCountry/SelectCountryDocs.js +8 -1
- package/extensions/forms/Field/SelectCountry/SelectCountryDocs.js.map +1 -1
- package/extensions/forms/Field/Selection/Selection.d.ts +9 -0
- package/extensions/forms/Field/Selection/Selection.js +20 -13
- package/extensions/forms/Field/Selection/Selection.js.map +1 -1
- package/extensions/forms/Field/Selection/SelectionDocs.js +5 -0
- package/extensions/forms/Field/Selection/SelectionDocs.js.map +1 -1
- package/extensions/forms/Field/String/StringDocs.js +6 -1
- package/extensions/forms/Field/String/StringDocs.js.map +1 -1
- package/extensions/forms/Field/Toggle/Toggle.d.ts +3 -0
- package/extensions/forms/Field/Toggle/Toggle.js +6 -1
- package/extensions/forms/Field/Toggle/Toggle.js.map +1 -1
- package/extensions/forms/Field/Toggle/ToggleDocs.js +5 -0
- package/extensions/forms/Field/Toggle/ToggleDocs.js.map +1 -1
- package/extensions/forms/Form/Visibility/Visibility.d.ts +1 -1
- package/extensions/forms/Form/Visibility/Visibility.js.map +1 -1
- package/extensions/forms/Form/Visibility/VisibilityDocs.js +1 -1
- package/extensions/forms/Form/Visibility/VisibilityDocs.js.map +1 -1
- package/extensions/forms/Value/Date/Date.d.ts +3 -2
- package/extensions/forms/Value/Date/Date.js.map +1 -1
- package/extensions/forms/Wizard/Container/WizardContainer.js +20 -8
- package/extensions/forms/Wizard/Container/WizardContainer.js.map +1 -1
- package/extensions/forms/Wizard/Context/WizardContext.d.ts +1 -0
- package/extensions/forms/Wizard/Context/WizardContext.js.map +1 -1
- package/extensions/forms/Wizard/Step/Step.d.ts +16 -1
- package/extensions/forms/Wizard/Step/Step.js +29 -10
- package/extensions/forms/Wizard/Step/Step.js.map +1 -1
- package/extensions/forms/Wizard/Step/StepDocs.js +18 -3
- package/extensions/forms/Wizard/Step/StepDocs.js.map +1 -1
- package/extensions/forms/constants/locales/en-GB.d.ts +6 -0
- package/extensions/forms/constants/locales/en-GB.js +7 -1
- package/extensions/forms/constants/locales/en-GB.js.map +1 -1
- package/extensions/forms/constants/locales/en-US.d.ts +6 -0
- package/extensions/forms/constants/locales/index.d.ts +12 -0
- package/extensions/forms/constants/locales/nb-NO.d.ts +6 -0
- package/extensions/forms/constants/locales/nb-NO.js +7 -1
- package/extensions/forms/constants/locales/nb-NO.js.map +1 -1
- package/extensions/forms/types.d.ts +1 -0
- package/extensions/forms/types.js.map +1 -1
- package/fragments/drawer-list/DrawerList.d.ts +6 -1
- 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/style/core/scopes.scss +1 -1
- package/style/dnb-ui-basis.css +1 -1
- package/style/dnb-ui-basis.min.css +1 -1
- package/style/dnb-ui-body.css +1 -1
- package/style/dnb-ui-body.min.css +1 -1
- package/style/dnb-ui-core.css +1 -1
- package/style/dnb-ui-core.min.css +1 -1
- package/style/themes/theme-eiendom/eiendom-theme-basis.css +0 -2
- package/style/themes/theme-eiendom/eiendom-theme-basis.min.css +1 -1
- package/style/themes/theme-eiendom/eiendom-theme-components.css +5 -7
- package/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
- package/style/themes/theme-sbanken/globals.scss +0 -4
- package/style/themes/theme-sbanken/sbanken-theme-basis.css +0 -2
- package/style/themes/theme-sbanken/sbanken-theme-basis.min.css +1 -1
- package/style/themes/theme-sbanken/sbanken-theme-components.css +6 -8
- package/style/themes/theme-sbanken/sbanken-theme-components.min.css +2 -2
- package/style/themes/theme-ui/globals.scss +0 -4
- package/style/themes/theme-ui/ui-theme-basis.css +0 -2
- package/style/themes/theme-ui/ui-theme-basis.min.css +1 -1
- package/style/themes/theme-ui/ui-theme-components.css +5 -7
- package/style/themes/theme-ui/ui-theme-components.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleDocs.js","names":["ToggleProperties","valueOn","doc","type","status","valueOff","textOn","textOff","variant"],"sources":["../../../../../../src/extensions/forms/Field/Toggle/ToggleDocs.tsx"],"sourcesContent":["import { PropertiesTableProps } from '../../../../shared/types'\n\nexport const ToggleProperties: PropertiesTableProps = {\n valueOn: {\n doc: 'Source data value when the toggle is in the \"on-state\" (varies based on UI variant).',\n type: ['string', 'number', 'boolean'],\n status: 'required',\n },\n valueOff: {\n doc: 'Source data value when the toggle is in the \"off-state\".',\n type: ['string', 'number', 'boolean'],\n status: 'required',\n },\n textOn: {\n doc: 'Text to show in the UI when in the \"on-state\".',\n type: 'string',\n status: 'optional',\n },\n textOff: {\n doc: 'Text to show in the UI when in the \"off-state\".',\n type: 'string',\n status: 'optional',\n },\n variant: {\n doc: 'Choice of input feature. Can be: `checkbox`, `button`, `checkbox-button` or `buttons`.',\n type: 'string',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAsC,GAAG;EACpDC,OAAO,EAAE;IACPC,GAAG,EAAE,sFAAsF;IAC3FC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC;IACrCC,MAAM,EAAE;EACV,CAAC;EACDC,QAAQ,EAAE;IACRH,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC;IACrCC,MAAM,EAAE;EACV,CAAC;EACDE,MAAM,EAAE;IACNJ,GAAG,EAAE,gDAAgD;IACrDC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,OAAO,EAAE;IACPL,GAAG,EAAE,iDAAiD;IACtDC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDI,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"ToggleDocs.js","names":["ToggleProperties","valueOn","doc","type","status","valueOff","textOn","textOff","size","variant"],"sources":["../../../../../../src/extensions/forms/Field/Toggle/ToggleDocs.tsx"],"sourcesContent":["import { PropertiesTableProps } from '../../../../shared/types'\n\nexport const ToggleProperties: PropertiesTableProps = {\n valueOn: {\n doc: 'Source data value when the toggle is in the \"on-state\" (varies based on UI variant).',\n type: ['string', 'number', 'boolean'],\n status: 'required',\n },\n valueOff: {\n doc: 'Source data value when the toggle is in the \"off-state\".',\n type: ['string', 'number', 'boolean'],\n status: 'required',\n },\n textOn: {\n doc: 'Text to show in the UI when in the \"on-state\".',\n type: 'string',\n status: 'optional',\n },\n textOff: {\n doc: 'Text to show in the UI when in the \"off-state\".',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'The sizes you can choose is small (1.5rem), default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size=\"2\" then it will be forwarded as the input element attribute. Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).',\n type: 'string',\n status: 'optional',\n },\n variant: {\n doc: 'Choice of input feature. Can be: `checkbox`, `button`, `checkbox-button` or `buttons`.',\n type: 'string',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAsC,GAAG;EACpDC,OAAO,EAAE;IACPC,GAAG,EAAE,sFAAsF;IAC3FC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC;IACrCC,MAAM,EAAE;EACV,CAAC;EACDC,QAAQ,EAAE;IACRH,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC;IACrCC,MAAM,EAAE;EACV,CAAC;EACDE,MAAM,EAAE;IACNJ,GAAG,EAAE,gDAAgD;IACrDC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,OAAO,EAAE;IACPL,GAAG,EAAE,iDAAiD;IACtDC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDI,IAAI,EAAE;IACJN,GAAG,EAAE,oWAAoW;IACzWC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDK,OAAO,EAAE;IACPP,GAAG,EAAE,wFAAwF;IAC7FC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV;AACF,CAAC"}
|
|
@@ -56,7 +56,7 @@ export type Props = {
|
|
|
56
56
|
pathTrue?: Path;
|
|
57
57
|
/** Given data context path must be false to show children */
|
|
58
58
|
pathFalse?: Path;
|
|
59
|
-
/** Provide a `path` or `itemPath` and a `hasValue` method that returns a boolean or the
|
|
59
|
+
/** Provide a `path` or `itemPath` and a `hasValue` method that returns a boolean or the expected value in order to show children. The first parameter is the value of the path. */
|
|
60
60
|
visibleWhen?: VisibleWhen;
|
|
61
61
|
/** Same as `visibleWhen`, but with inverted logic. */
|
|
62
62
|
visibleWhenNot?: VisibleWhen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Visibility.js","names":["React","useCallback","useContext","warn","useMountEffect","useMounted","HeightAnimation","FieldProvider","useVisibility","VisibilityContext","SummaryListContext","Visibility","props","visible","pathDefined","pathUndefined","pathTruthy","pathFalsy","pathTrue","pathFalse","pathValue","whenValue","visibleWhen","visibleWhenNot","inferData","filterData","onVisible","onAnimationEnd","animate","keepInDOM","compensateForGap","fieldPropsWhenHidden","withinIterate","children","rest","_objectWithoutProperties","_excluded","check","open","content","createElement","Provider","value","isVisible","mountedRef","onOpen","state","current","summaryListContext","providerProps","isNested","_extends","Boolean","className","hidden","Fragment","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Form/Visibility/Visibility.tsx"],"sourcesContent":["import React, { AriaAttributes, useCallback, useContext } from 'react'\n\nimport { warn } from '../../../../shared/helpers'\nimport useMountEffect from '../../../../shared/helpers/useMountEffect'\nimport useMounted from '../../../../shared/helpers/useMounted'\nimport HeightAnimation, {\n HeightAnimationAllProps,\n} from '../../../../components/HeightAnimation'\nimport FieldProvider from '../../Field/Provider'\nimport useVisibility from './useVisibility'\nimport VisibilityContext from './VisibilityContext'\nimport SummaryListContext from '../../Value/SummaryList/SummaryListContext'\n\nimport type { Path, UseFieldProps } from '../../types'\nimport type { DataAttributes } from '../../hooks/useFieldProps'\nimport { FilterData } from '../../DataContext'\n\nexport type VisibleWhen =\n | {\n path: Path\n hasValue: unknown | ((value: unknown) => boolean)\n }\n | {\n itemPath: Path\n hasValue: unknown | ((value: unknown) => boolean)\n }\n | {\n path: Path\n isValid: boolean\n /**\n * @deprecated – Replaced with validateContinuously, continuousValidation can be removed in v11.\n */\n continuousValidation?: boolean\n validateContinuously?: boolean\n }\n | {\n itemPath: Path\n isValid: boolean\n /**\n * @deprecated – Replaced with validateContinuously, continuousValidation can be removed in v11.\n */\n continuousValidation?: boolean\n validateContinuously?: boolean\n }\n\n /**\n * @deprecated Will be removed in v11!\n */\n | {\n path: Path\n /** @deprecated Use `hasValue` instead */\n withValue: (value: unknown) => boolean\n }\n /**\n * @deprecated Will be removed in v11!\n */\n | {\n itemPath: Path\n /** @deprecated Use `hasValue` instead */\n withValue: (value: unknown) => boolean\n }\n\nexport type Props = {\n visible?: boolean\n /** Given data context path must be defined to show children */\n pathDefined?: Path\n /** Given data context path must be undefined to show children */\n pathUndefined?: Path\n /** Given data context path must be truthy to show children */\n pathTruthy?: Path\n /** Given data context path must be falsy to show children */\n pathFalsy?: Path\n /** Given data context path must be true to show children */\n pathTrue?: Path\n /** Given data context path must be false to show children */\n pathFalse?: Path\n /** Provide a `path` or `itemPath` and a `hasValue` method that returns a boolean or the
|
|
1
|
+
{"version":3,"file":"Visibility.js","names":["React","useCallback","useContext","warn","useMountEffect","useMounted","HeightAnimation","FieldProvider","useVisibility","VisibilityContext","SummaryListContext","Visibility","props","visible","pathDefined","pathUndefined","pathTruthy","pathFalsy","pathTrue","pathFalse","pathValue","whenValue","visibleWhen","visibleWhenNot","inferData","filterData","onVisible","onAnimationEnd","animate","keepInDOM","compensateForGap","fieldPropsWhenHidden","withinIterate","children","rest","_objectWithoutProperties","_excluded","check","open","content","createElement","Provider","value","isVisible","mountedRef","onOpen","state","current","summaryListContext","providerProps","isNested","_extends","Boolean","className","hidden","Fragment","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Form/Visibility/Visibility.tsx"],"sourcesContent":["import React, { AriaAttributes, useCallback, useContext } from 'react'\n\nimport { warn } from '../../../../shared/helpers'\nimport useMountEffect from '../../../../shared/helpers/useMountEffect'\nimport useMounted from '../../../../shared/helpers/useMounted'\nimport HeightAnimation, {\n HeightAnimationAllProps,\n} from '../../../../components/HeightAnimation'\nimport FieldProvider from '../../Field/Provider'\nimport useVisibility from './useVisibility'\nimport VisibilityContext from './VisibilityContext'\nimport SummaryListContext from '../../Value/SummaryList/SummaryListContext'\n\nimport type { Path, UseFieldProps } from '../../types'\nimport type { DataAttributes } from '../../hooks/useFieldProps'\nimport { FilterData } from '../../DataContext'\n\nexport type VisibleWhen =\n | {\n path: Path\n hasValue: unknown | ((value: unknown) => boolean)\n }\n | {\n itemPath: Path\n hasValue: unknown | ((value: unknown) => boolean)\n }\n | {\n path: Path\n isValid: boolean\n /**\n * @deprecated – Replaced with validateContinuously, continuousValidation can be removed in v11.\n */\n continuousValidation?: boolean\n validateContinuously?: boolean\n }\n | {\n itemPath: Path\n isValid: boolean\n /**\n * @deprecated – Replaced with validateContinuously, continuousValidation can be removed in v11.\n */\n continuousValidation?: boolean\n validateContinuously?: boolean\n }\n\n /**\n * @deprecated Will be removed in v11!\n */\n | {\n path: Path\n /** @deprecated Use `hasValue` instead */\n withValue: (value: unknown) => boolean\n }\n /**\n * @deprecated Will be removed in v11!\n */\n | {\n itemPath: Path\n /** @deprecated Use `hasValue` instead */\n withValue: (value: unknown) => boolean\n }\n\nexport type Props = {\n visible?: boolean\n /** Given data context path must be defined to show children */\n pathDefined?: Path\n /** Given data context path must be undefined to show children */\n pathUndefined?: Path\n /** Given data context path must be truthy to show children */\n pathTruthy?: Path\n /** Given data context path must be falsy to show children */\n pathFalsy?: Path\n /** Given data context path must be true to show children */\n pathTrue?: Path\n /** Given data context path must be false to show children */\n pathFalse?: Path\n /** Provide a `path` or `itemPath` and a `hasValue` method that returns a boolean or the expected value in order to show children. The first parameter is the value of the path. */\n visibleWhen?: VisibleWhen\n /** Same as `visibleWhen`, but with inverted logic. */\n visibleWhenNot?: VisibleWhen\n /** Infer visibility calling given derivative function with the whole data set. Should return true/false for visibility. */\n inferData?: (data: unknown) => boolean\n /** Filter data based on provided criteria. The first parameter is the path, the second is the value, and the third is the props, and the fourth is the internal. Return false to filter out the data. */\n filterData?: FilterData\n /** Animate the visibility change */\n animate?: boolean\n /** Keep the content in the DOM, even if it's not visible */\n keepInDOM?: boolean\n /** Callback for when the content gets visible. */\n onVisible?: HeightAnimationAllProps['onOpen']\n /** Callback for when animation has ended */\n onAnimationEnd?: HeightAnimationAllProps['onAnimationEnd']\n /** To compensate for CSS gap between the rows, so animation does not jump during the animation. Provide a CSS unit or `auto`. Defaults to `null`. */\n compensateForGap?: HeightAnimationAllProps['compensateForGap']\n /** When visibility is hidden, and `keepInDOM` is true, pass these props to the children */\n fieldPropsWhenHidden?: UseFieldProps & DataAttributes & AriaAttributes\n element?: HeightAnimationAllProps['element']\n children: React.ReactNode\n\n /** For internal use only. Used by \"Iterate.Visibility\" */\n withinIterate?: boolean\n\n /** @deprecated Use `visibleWhen` instead */\n pathValue?: string\n /** @deprecated Use `visibleWhen` instead */\n whenValue?: unknown\n}\n\nfunction Visibility(props: Props) {\n const {\n visible,\n pathDefined,\n pathUndefined,\n pathTruthy,\n pathFalsy,\n pathTrue,\n pathFalse,\n pathValue,\n whenValue,\n visibleWhen,\n visibleWhenNot,\n inferData,\n filterData,\n onVisible,\n onAnimationEnd,\n animate,\n keepInDOM,\n compensateForGap,\n fieldPropsWhenHidden,\n withinIterate,\n children,\n ...rest\n } = props\n\n useMountEffect(() => {\n if (fieldPropsWhenHidden && !keepInDOM) {\n warn('Using \"fieldPropsWhenHidden\" requires \"keepInDOM\" to be true.')\n }\n })\n\n const { check } = useVisibility({\n visible,\n withinIterate,\n pathDefined,\n pathUndefined,\n pathTruthy,\n pathFalsy,\n pathTrue,\n pathFalse,\n pathValue,\n whenValue,\n visibleWhen,\n visibleWhenNot,\n inferData,\n filterData,\n })\n const open = check()\n const content = (\n <VisibilityContext.Provider\n value={{\n isVisible: open,\n props,\n }}\n >\n {children}\n </VisibilityContext.Provider>\n )\n const mountedRef = useMounted()\n\n const onOpen: HeightAnimationAllProps['onOpen'] = useCallback(\n (state) => {\n if (mountedRef.current) {\n onVisible?.(state)\n }\n },\n [mountedRef, onVisible]\n )\n\n const summaryListContext = useContext(SummaryListContext)\n const providerProps = !open ? fieldPropsWhenHidden : null\n\n if (\n (animate || keepInDOM) &&\n summaryListContext &&\n !summaryListContext.isNested\n ) {\n // Handle the animation inside the SummaryList\n return <FieldProvider {...providerProps}>{content}</FieldProvider>\n }\n\n if (animate) {\n return (\n <HeightAnimation\n open={open}\n onAnimationEnd={onAnimationEnd}\n onOpen={onOpen}\n keepInDOM={Boolean(keepInDOM)}\n className=\"dnb-forms-visibility\"\n compensateForGap={compensateForGap}\n {...rest}\n >\n <FieldProvider {...providerProps}>{content}</FieldProvider>\n </HeightAnimation>\n )\n }\n\n if (mountedRef.current) {\n onVisible?.(open)\n }\n\n if (keepInDOM) {\n return (\n <span className=\"dnb-forms-visibility\" hidden={!open}>\n <FieldProvider {...providerProps}>{content}</FieldProvider>\n </span>\n )\n }\n\n return <>{open ? content : null}</>\n}\n\nVisibility._supportsSpacingProps = 'children'\nexport default Visibility\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAoBC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAEtE,SAASC,IAAI,QAAQ,4BAA4B;AACjD,OAAOC,cAAc,MAAM,2CAA2C;AACtE,OAAOC,UAAU,MAAM,uCAAuC;AAC9D,OAAOC,eAAe,MAEf,wCAAwC;AAC/C,OAAOC,aAAa,MAAM,sBAAsB;AAChD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,OAAOC,kBAAkB,MAAM,4CAA4C;AAiG3E,SAASC,UAAUA,CAACC,KAAY,EAAE;EAChC,MAAM;MACJC,OAAO;MACPC,WAAW;MACXC,aAAa;MACbC,UAAU;MACVC,SAAS;MACTC,QAAQ;MACRC,SAAS;MACTC,SAAS;MACTC,SAAS;MACTC,WAAW;MACXC,cAAc;MACdC,SAAS;MACTC,UAAU;MACVC,SAAS;MACTC,cAAc;MACdC,OAAO;MACPC,SAAS;MACTC,gBAAgB;MAChBC,oBAAoB;MACpBC,aAAa;MACbC;IAEF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O,EAAE;IACX,OACE5B,KAAA,CAAAwC,aAAA,CAAClC,eAAe,EAAA6C,QAAA;MACdb,IAAI,EAAEA,IAAK;MACXX,cAAc,EAAEA,cAAe;MAC/BkB,MAAM,EAAEA,MAAO;MACfhB,SAAS,EAAEuB,OAAO,CAACvB,SAAS,CAAE;MAC9BwB,SAAS,EAAC,sBAAsB;MAChCvB,gBAAgB,EAAEA;IAAiB,GAC/BI,IAAI,GAERlC,KAAA,CAAAwC,aAAA,CAACjC,aAAa,EAAK0C,aAAa,EAAGV,OAAuB,CAC3C,CAAC;EAEtB;EAEA,IAAIK,UAAU,CAACG,OAAO,EAAE;IACtBrB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAGY,IAAI,CAAC;EACnB;EAEA,IAAIT,SAAS,EAAE;IACb,OACE7B,KAAA,CAAAwC,aAAA;MAAMa,SAAS,EAAC,sBAAsB;MAACC,MAAM,EAAE,CAAChB;IAAK,GACnDtC,KAAA,CAAAwC,aAAA,CAACjC,aAAa,EAAK0C,aAAa,EAAGV,OAAuB,CACtD,CAAC;EAEX;EAEA,OAAOvC,KAAA,CAAAwC,aAAA,CAAAxC,KAAA,CAAAuD,QAAA,QAAGjB,IAAI,GAAGC,OAAO,GAAG,IAAO,CAAC;AACrC;AAEA5B,UAAU,CAAC6C,qBAAqB,GAAG,UAAU;AAC7C,eAAe7C,UAAU"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HeightAnimationEvents } from '../../../../components/height-animation/HeightAnimationDocs';
|
|
2
2
|
export const VisibilityProperties = {
|
|
3
3
|
visibleWhen: {
|
|
4
|
-
doc: 'Provide a `path` or `itemPath` and a `hasValue` method that returns a boolean or the
|
|
4
|
+
doc: 'Provide a `path` or `itemPath` and a `hasValue` method that returns a boolean or the expected value in order to show children. The first parameter is the value of the path. You can also use `isValid` instead of `hasValue` to only show the children when the field has no errors and has lost focus (blurred). You can change that behavior by using the `validateContinuously` property.',
|
|
5
5
|
type: 'object',
|
|
6
6
|
status: 'optional'
|
|
7
7
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisibilityDocs.js","names":["HeightAnimationEvents","VisibilityProperties","visibleWhen","doc","type","status","visibleWhenNot","pathDefined","pathUndefined","pathTruthy","pathFalsy","pathTrue","pathFalse","inferData","visible","animate","keepInDOM","compensateForGap","filterData","fieldPropsWhenHidden","element","children","VisibilityEvents","onVisible","onOpen","onAnimationEnd"],"sources":["../../../../../../src/extensions/forms/Form/Visibility/VisibilityDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../../../shared/types'\nimport { HeightAnimationEvents } from '../../../../components/height-animation/HeightAnimationDocs'\n\nexport const VisibilityProperties: PropertiesTableProps = {\n visibleWhen: {\n doc: 'Provide a `path` or `itemPath` and a `hasValue` method that returns a boolean or the
|
|
1
|
+
{"version":3,"file":"VisibilityDocs.js","names":["HeightAnimationEvents","VisibilityProperties","visibleWhen","doc","type","status","visibleWhenNot","pathDefined","pathUndefined","pathTruthy","pathFalsy","pathTrue","pathFalse","inferData","visible","animate","keepInDOM","compensateForGap","filterData","fieldPropsWhenHidden","element","children","VisibilityEvents","onVisible","onOpen","onAnimationEnd"],"sources":["../../../../../../src/extensions/forms/Form/Visibility/VisibilityDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../../../shared/types'\nimport { HeightAnimationEvents } from '../../../../components/height-animation/HeightAnimationDocs'\n\nexport const VisibilityProperties: PropertiesTableProps = {\n visibleWhen: {\n doc: 'Provide a `path` or `itemPath` and a `hasValue` method that returns a boolean or the expected value in order to show children. The first parameter is the value of the path. You can also use `isValid` instead of `hasValue` to only show the children when the field has no errors and has lost focus (blurred). You can change that behavior by using the `validateContinuously` property.',\n type: 'object',\n status: 'optional',\n },\n visibleWhenNot: {\n doc: 'Same as `visibleWhen`, but with inverted logic.',\n type: 'object',\n status: 'optional',\n },\n pathDefined: {\n doc: 'Given data context path must be defined to show children.',\n type: 'string',\n status: 'optional',\n },\n pathUndefined: {\n doc: 'Given data context path must be undefined to show children.',\n type: 'string',\n status: 'optional',\n },\n pathTruthy: {\n doc: 'Given data context path must be truthy to show children.',\n type: 'string',\n status: 'optional',\n },\n pathFalsy: {\n doc: 'Given data context path must be falsy to show children.',\n type: 'string',\n status: 'optional',\n },\n pathTrue: {\n doc: 'Given data context path must be true to show children.',\n type: 'string',\n status: 'optional',\n },\n pathFalse: {\n doc: 'Given data context path must be false to show children.',\n type: 'string',\n status: 'optional',\n },\n inferData: {\n doc: 'Will be called to decide by external logic, and show/hide contents based on the return value.',\n type: 'function',\n status: 'optional',\n },\n visible: {\n doc: 'Control visibility directly using the `visible` prop. When used alongside other conditions, the `visible` prop takes precedence.',\n type: 'boolean',\n status: 'optional',\n },\n animate: {\n doc: 'Define if the content should animate during show/hide.',\n type: 'boolean',\n status: 'optional',\n },\n keepInDOM: {\n doc: \"Keep the content in the DOM, even if it's not visible. Can be used to let fields run validation.\",\n type: 'boolean',\n status: 'optional',\n },\n compensateForGap: {\n doc: 'To compensate for CSS gap between the rows, so animation does not jump during the animation. Provide a CSS unit or `auto`. Defaults to `null`.',\n type: 'string',\n status: 'optional',\n },\n filterData: {\n doc: 'Filter data based on provided criteria. More info about `filterData` can be found in the [Getting Started](/uilib/extensions/forms/getting-started/#filter-data) documentation.',\n type: ['object', 'function'],\n status: 'optional',\n },\n fieldPropsWhenHidden: {\n doc: 'When visibility is hidden, and `keepInDOM` is true, pass these props to the children.',\n type: 'various',\n status: 'optional',\n },\n element: {\n doc: 'Define the type of element. Defaults to `div`. Only for when `animate` is true.',\n type: 'string or React.Element',\n status: 'optional',\n },\n children: {\n doc: 'Contents.',\n type: 'React.Node',\n status: 'required',\n },\n}\n\nexport const VisibilityEvents: PropertiesTableProps = {\n onVisible: {\n doc: 'Callback for when the content gets visible. Returns a boolean as the first parameter.',\n type: HeightAnimationEvents.onOpen.type,\n status: 'optional',\n },\n onAnimationEnd: HeightAnimationEvents.onAnimationEnd,\n}\n"],"mappings":"AACA,SAASA,q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AS;IACfC,MAAM,EAAE;EACV,CAAC;EACDY,gBAAgB,EAAE;IAChBd,GAAG,EAAE,gJAAgJ;IACrJC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDa,UAAU,EAAE;IACVf,GAAG,EAAE,iLAAiL;IACtLC,IAAI,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC5BC,MAAM,EAAE;EACV,CAAC;EACDc,oBAAoB,EAAE;IACpBhB,GAAG,EAAE,uFAAuF;IAC5FC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDe,OAAO,EAAE;IACPjB,GAAG,EAAE,iFAAiF;IACtFC,IAAI,EAAE,yBAAyB;IAC/BC,MAAM,EAAE;EACV,CAAC;EACDgB,QAAQ,EAAE;IACRlB,GAAG,EAAE,WAAW;IAChBC,IAAI,EAAE,YAAY;IAClBC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMiB,gBAAsC,GAAG;EACpDC,SAAS,EAAE;IACTpB,GAAG,EAAE,uFAAuF;IAC5FC,IAAI,EAAEJ,qBAAqB,CAACwB,MAAM,CAACpB,IAAI;IACvCC,MAAM,EAAE;EACV,CAAC;EACDoB,cAAc,EAAEzB,qBAAqB,CAACyB;AACxC,CAAC"}
|
|
@@ -8,9 +8,10 @@ declare function DateComponent(props: Props): import("react/jsx-runtime").JSX.El
|
|
|
8
8
|
declare namespace DateComponent {
|
|
9
9
|
var _supportsSpacingProps: boolean;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type FormatDateOptions = {
|
|
12
12
|
locale?: string;
|
|
13
13
|
variant?: Props['variant'];
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
|
+
export declare function formatDate(value: string, { locale, variant }?: FormatDateOptions): string;
|
|
15
16
|
export declare function getOptions(variant: Props['variant']): Intl.DateTimeFormatOptions;
|
|
16
17
|
export default DateComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Date.js","names":["React","useCallback","useContext","parseISO","LOCALE","StringValue","useTranslation","SharedContext","DateComponent","props","_props$locale","_props$variant","_props$label","translations","Date","locale","contextLocale","variant","toInput","value","undefined","formatDate","stringProps","_objectSpread","label","createElement","isRange","test","options","getOptions","startValue","endValue","split","startDate","endDate","isNaN","valueOf","Intl","DateTimeFormat","formatRange","toLocaleString","date","format","day","month","year","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Value/Date/Date.tsx"],"sourcesContent":["import React, { useCallback, useContext } from 'react'\nimport { parseISO } from 'date-fns'\nimport { LOCALE } from '../../../../shared/defaults'\nimport StringValue, { Props as StringValueProps } from '../String'\nimport useTranslation from '../../hooks/useTranslation'\nimport SharedContext, { AnyLocale } from '../../../../shared/Context'\n\nexport type Props = StringValueProps & {\n variant?: 'long' | 'short' | 'numeric'\n locale?: AnyLocale\n}\n\nfunction DateComponent(props: Props) {\n const translations = useTranslation().Date\n const { locale: contextLocale } = useContext(SharedContext)\n const locale = props.locale ?? contextLocale\n const variant = props.variant ?? 'long'\n\n const toInput = useCallback(\n (value: string) => {\n if (!value) {\n return undefined\n }\n\n return formatDate(value, { locale, variant })\n },\n [locale, variant]\n )\n\n const stringProps: Props = {\n ...props,\n label: props.label ?? translations.label,\n toInput,\n }\n return <StringValue {...stringProps} />\n}\n\nexport function formatDate(\n value: string,\n {
|
|
1
|
+
{"version":3,"file":"Date.js","names":["React","useCallback","useContext","parseISO","LOCALE","StringValue","useTranslation","SharedContext","DateComponent","props","_props$locale","_props$variant","_props$label","translations","Date","locale","contextLocale","variant","toInput","value","undefined","formatDate","stringProps","_objectSpread","label","createElement","isRange","test","options","getOptions","startValue","endValue","split","startDate","endDate","isNaN","valueOf","Intl","DateTimeFormat","formatRange","toLocaleString","date","format","day","month","year","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Value/Date/Date.tsx"],"sourcesContent":["import React, { useCallback, useContext } from 'react'\nimport { parseISO } from 'date-fns'\nimport { LOCALE } from '../../../../shared/defaults'\nimport StringValue, { Props as StringValueProps } from '../String'\nimport useTranslation from '../../hooks/useTranslation'\nimport SharedContext, { AnyLocale } from '../../../../shared/Context'\n\nexport type Props = StringValueProps & {\n variant?: 'long' | 'short' | 'numeric'\n locale?: AnyLocale\n}\n\nfunction DateComponent(props: Props) {\n const translations = useTranslation().Date\n const { locale: contextLocale } = useContext(SharedContext)\n const locale = props.locale ?? contextLocale\n const variant = props.variant ?? 'long'\n\n const toInput = useCallback(\n (value: string) => {\n if (!value) {\n return undefined\n }\n\n return formatDate(value, { locale, variant })\n },\n [locale, variant]\n )\n\n const stringProps: Props = {\n ...props,\n label: props.label ?? translations.label,\n toInput,\n }\n return <StringValue {...stringProps} />\n}\n\nexport type FormatDateOptions = {\n locale?: string\n variant?: Props['variant']\n}\n\nexport function formatDate(\n value: string,\n { locale = LOCALE, variant = 'numeric' }: FormatDateOptions = {}\n) {\n // Either of the range dates can be null\n const isRange =\n /^(\\d{4}-\\d{2}-\\d{2}|null|undefined)\\|(\\d{4}-\\d{2}-\\d{2}|null|undefined)$/.test(\n value\n )\n const options = getOptions(variant)\n\n if (isRange) {\n const [startValue, endValue] = value.split('|')\n\n const startDate = parseISO(startValue)\n const endDate = parseISO(endValue)\n\n // Stop if either date is invalid\n if (isNaN(startDate.valueOf()) || isNaN(endDate.valueOf())) {\n return undefined\n }\n\n return typeof Intl !== 'undefined'\n ? new Intl.DateTimeFormat(locale, options).formatRange(\n startDate,\n endDate\n )\n : `${startDate.toLocaleString(\n locale,\n options\n )}|${endDate.toLocaleString(locale, options)}`\n }\n\n const date = parseISO(value)\n\n return typeof Intl !== 'undefined'\n ? new Intl.DateTimeFormat(locale, options).format(date)\n : date.toLocaleString(locale, options)\n}\n\nexport function getOptions(\n variant: Props['variant']\n): Intl.DateTimeFormatOptions {\n if (variant === 'numeric') {\n return {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n } as const\n }\n\n return {\n day: 'numeric',\n month: variant,\n year: 'numeric',\n } as const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AAS;MACdC,KAAK,EAAE,SAAS;MAChBC,IAAI,EAAE;IACR,CAAC;EACH;EAEA,OAAO;IACLF,GAAG,EAAE,SAAS;IACdC,KAAK,EAAE3B,OAAO;IACd4B,IAAI,EAAE;EACR,CAAC;AACH;AAEArC,aAAa,CAACsC,qBAAqB,GAAG,IAAI;AAC1C,eAAetC,aAAa"}
|
|
@@ -13,7 +13,7 @@ import { Space, StepIndicator } from '../../../../components';
|
|
|
13
13
|
import { convertJsxToString, warn } from '../../../../shared/component-helper';
|
|
14
14
|
import { isAsync } from '../../../../shared/helpers/isAsync';
|
|
15
15
|
import useId from '../../../../shared/helpers/useId';
|
|
16
|
-
import Step from '../Step';
|
|
16
|
+
import Step, { handleDeprecatedProps as handleDeprecatedStepProps } from '../Step';
|
|
17
17
|
import WizardContext from '../Context/WizardContext';
|
|
18
18
|
import DataContext, { defaultContextState } from '../../DataContext/Context';
|
|
19
19
|
import Handler from '../../Form/Handler/Handler';
|
|
@@ -282,8 +282,12 @@ function DisplaySteps({
|
|
|
282
282
|
bottom: true,
|
|
283
283
|
current_step: activeIndexRef.current,
|
|
284
284
|
data: Object.values(stepsRef.current).map(({
|
|
285
|
-
title
|
|
286
|
-
|
|
285
|
+
title,
|
|
286
|
+
inactive
|
|
287
|
+
}) => ({
|
|
288
|
+
title,
|
|
289
|
+
inactive
|
|
290
|
+
})),
|
|
287
291
|
mode: mode,
|
|
288
292
|
no_animation: noAnimation,
|
|
289
293
|
on_change: handleChange,
|
|
@@ -315,19 +319,27 @@ function IterateOverSteps({
|
|
|
315
319
|
}
|
|
316
320
|
}
|
|
317
321
|
if (((_child2 = child) === null || _child2 === void 0 ? void 0 : _child2.type) === Step) {
|
|
318
|
-
|
|
322
|
+
const {
|
|
323
|
+
title,
|
|
324
|
+
inactive,
|
|
325
|
+
include,
|
|
326
|
+
includeWhen,
|
|
327
|
+
id
|
|
328
|
+
} = handleDeprecatedStepProps(child.props);
|
|
329
|
+
if (include === false) {
|
|
319
330
|
return null;
|
|
320
331
|
}
|
|
321
|
-
if (
|
|
322
|
-
visibleWhen:
|
|
332
|
+
if (includeWhen && !check({
|
|
333
|
+
visibleWhen: includeWhen
|
|
323
334
|
})) {
|
|
324
335
|
return null;
|
|
325
336
|
}
|
|
326
337
|
incrementIndex++;
|
|
327
338
|
const index = incrementIndex;
|
|
328
339
|
stepsRef.current[index] = {
|
|
329
|
-
id
|
|
330
|
-
title:
|
|
340
|
+
id,
|
|
341
|
+
title: title !== undefined ? convertJsxToString(title) : 'Title missing',
|
|
342
|
+
inactive
|
|
331
343
|
};
|
|
332
344
|
const key = `${index}-${activeIndexRef.current}`;
|
|
333
345
|
const clone = props => React.cloneElement(child, props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardContainer.js","names":["React","useContext","useCallback","useRef","useReducer","useMemo","ReactDOM","classnames","Space","StepIndicator","convertJsxToString","warn","isAsync","useId","Step","WizardContext","DataContext","defaultContextState","Handler","createReferenceKey","useSharedState","useHandleLayoutEffect","useStepAnimation","useVisibility","useLayoutEffect","window","useEffect","WizardContainer","props","_dataContext$setHandl","className","id","idProp","mode","initialActiveIndex","omitScrollManagement","omitFocusManagement","onStepChange","children","noAnimation","prerenderFieldProps","variant","sidebarId","rest","_objectWithoutProperties","_excluded","dataContext","hasContext","setFormState","handleSubmitCall","setShowAllErrors","showAllErrors","setSubmitState","forceUpdate","activeIndexRef","totalStepsRef","NaN","errorOnStepRef","elementRef","stepElementRef","preventNextStepRef","stepsRef","tmpStepsRef","updateTitlesRef","prerenderFieldPropsRef","sharedStateRef","current","undefined","preventNavigation","shouldPrevent","getStepChangeOptions","index","_stepsRef$current$ind","previousIndex","options","previousStep","_stepsRef$current$pre","previousId","Object","assign","callOnStepChange","setFocus","scrollToTop","isInteractionRef","executeLayoutAnimationRef","handleLayoutEffect","handleStepChange","skipErrorCheck","skipStepChangeCall","skipStepChangeCallBeforeMounted","skipStepChangeCallFromHook","skipFieldValidation","enableAsyncBehavior","onSubmit","_sharedStateRef$curre","_sharedStateRef$curre2","_sharedStateRef$curre3","data","call","result","Boolean","Error","setActiveIndex","_objectSpread","handlePrevious","handleNext","handleChange","current_step","setFormError","error","handleSubmit","preventSubmit","setHandleSubmit","check","activeIndex","providerValue","extend","_updateTitlesRef$curr","stepsLengthDidChange","count","keys","length","tmpCount","_executeLayoutAnimati","createElement","_extends","Provider","value","innerRef","DisplaySteps","IterateOverSteps","PrerenderFieldPropsOfOtherSteps","sidebar_id","Sidebar","bottom","values","map","title","no_animation","on_change","incrementIndex","childrenArray","Children","child","isValidElement","_child","_child2","step","type","_step","apply","active","activeWhen","visibleWhen","key","clone","cloneElement","document","hasRenderedRef","WizardPortal","PrerenderFieldPropsProvider","hidden","Fn","i","createPortal","body","setFieldInternals","updateDataValue","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Wizard/Container/WizardContainer.tsx"],"sourcesContent":["import React, {\n useContext,\n useCallback,\n useRef,\n useReducer,\n useMemo,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport classnames from 'classnames'\nimport { Space, StepIndicator } from '../../../../components'\nimport {\n convertJsxToString,\n warn,\n} from '../../../../shared/component-helper'\nimport { isAsync } from '../../../../shared/helpers/isAsync'\nimport useId from '../../../../shared/helpers/useId'\nimport Step, { Props as StepProps } from '../Step'\nimport WizardContext, {\n OnStepChange,\n OnStepChangeOptions,\n OnStepsChangeMode,\n SetActiveIndexOptions,\n StepIndex,\n Steps,\n WizardContextState,\n} from '../Context/WizardContext'\nimport DataContext, {\n defaultContextState,\n} from '../../DataContext/Context'\nimport Handler from '../../Form/Handler/Handler'\nimport {\n SharedStateReturn,\n createReferenceKey,\n useSharedState,\n} from '../../../../shared/helpers/useSharedState'\nimport useHandleLayoutEffect from './useHandleLayoutEffect'\nimport useStepAnimation from './useStepAnimation'\nimport { ComponentProps } from '../../types'\nimport useVisibility from '../../Form/Visibility/useVisibility'\n\n// SSR warning fix: https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\nconst useLayoutEffect =\n typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect\n\nexport type Props = ComponentProps & {\n id?: string\n\n /**\n * The mode of the wizard.\n */\n mode?: 'static' | 'strict' | 'loose'\n\n /**\n * If set to `true`, the wizard will not scroll to the first step when the user clicks on the next button.\n */\n omitScrollManagement?: boolean\n\n /**\n * If set to `true`, the wizard will not focus on the next step when the user clicks on the next button.\n */\n omitFocusManagement?: boolean\n\n /**\n * The index of the first step to be rendered.\n */\n initialActiveIndex?: StepIndex\n\n /**\n * The callback function that will be called when the user clicks on the next button.\n */\n onStepChange?: OnStepChange\n\n /**\n * The sidebar variant.\n */\n variant?: 'sidebar' | 'drawer'\n sidebarId?: string\n\n /**\n * If set to `true`, the wizard will not animate the steps.\n */\n noAnimation?: boolean\n\n /**\n * If set to `true`, the wizard pre-render all steps so the props of each field is available in the data context.\n * Defaults to `true`.\n */\n prerenderFieldProps?: boolean\n\n /**\n * The children of the wizard container.\n */\n children: React.ReactNode\n\n /**\n * @deprecated Is enabled by default. You can disable it with \"omitScrollManagement\"\n */\n scrollTopOnStepChange?: boolean\n}\n\nfunction WizardContainer(props: Props) {\n const {\n className,\n id: idProp,\n mode = 'strict',\n initialActiveIndex = 0,\n omitScrollManagement,\n omitFocusManagement,\n onStepChange,\n children,\n noAnimation = true,\n prerenderFieldProps = true,\n variant = 'sidebar',\n sidebarId,\n ...rest\n } = props\n\n const dataContext = useContext(DataContext)\n const {\n hasContext,\n setFormState,\n handleSubmitCall,\n setShowAllErrors,\n showAllErrors,\n setSubmitState,\n } = dataContext\n\n const id = useId(idProp)\n const [, forceUpdate] = useReducer(() => ({}), {})\n const activeIndexRef = useRef<StepIndex>(initialActiveIndex)\n const totalStepsRef = useRef<number>(NaN)\n const errorOnStepRef = useRef<Record<StepIndex, boolean | number>>({})\n const elementRef = useRef<HTMLElement>()\n const stepElementRef = useRef<HTMLElement>()\n const preventNextStepRef = useRef(false)\n const stepsRef = useRef<Steps>({})\n const tmpStepsRef = useRef<Steps>({})\n const updateTitlesRef = useRef<() => void>()\n const prerenderFieldPropsRef = useRef<\n Record<string, () => React.ReactElement>\n >({})\n\n // - Handle shared state\n const sharedStateRef =\n useRef<\n SharedStateReturn<\n WizardContextState & { onStepChange?: OnStepChange }\n >\n >()\n sharedStateRef.current = useSharedState<WizardContextState>(\n hasContext && id ? createReferenceKey(id, 'wizard') : undefined\n )\n\n // Store the current state of showAllErrors\n errorOnStepRef.current[activeIndexRef.current] = showAllErrors\n\n const preventNavigation = useCallback((shouldPrevent = true) => {\n preventNextStepRef.current = shouldPrevent\n }, [])\n\n const getStepChangeOptions: (index: StepIndex) => OnStepChangeOptions =\n useCallback(\n (index) => {\n const previousIndex = activeIndexRef.current\n const options = {\n preventNavigation,\n previousStep: { index: previousIndex },\n }\n\n const id = stepsRef.current[index]?.id\n if (id) {\n const previousId = stepsRef.current[previousIndex]?.id\n Object.assign(options, { id })\n Object.assign(options.previousStep, { id: previousId })\n }\n\n return options\n },\n [preventNavigation]\n )\n\n const callOnStepChange = useCallback(\n async (index: StepIndex, mode: OnStepsChangeMode) => {\n if (isAsync(onStepChange)) {\n return await onStepChange(index, mode, getStepChangeOptions(index))\n }\n\n return onStepChange?.(index, mode, getStepChangeOptions(index))\n },\n [getStepChangeOptions, onStepChange]\n )\n\n const { setFocus, scrollToTop, isInteractionRef } =\n useHandleLayoutEffect({ elementRef, stepElementRef })\n\n const executeLayoutAnimationRef = useRef<() => void>()\n useStepAnimation({\n activeIndexRef,\n stepElementRef,\n executeLayoutAnimationRef,\n })\n\n const handleLayoutEffect = useCallback(() => {\n if (!omitFocusManagement) {\n setFocus()\n }\n if (!omitScrollManagement) {\n scrollToTop()\n }\n }, [omitScrollManagement, omitFocusManagement, setFocus, scrollToTop])\n\n const handleStepChange = useCallback(\n ({\n index,\n skipErrorCheck,\n skipStepChangeCall,\n skipStepChangeCallBeforeMounted,\n skipStepChangeCallFromHook,\n mode,\n }: {\n index: StepIndex\n mode: OnStepsChangeMode\n } & SetActiveIndexOptions) => {\n handleSubmitCall({\n skipErrorCheck,\n skipFieldValidation: skipErrorCheck,\n enableAsyncBehavior: isAsync(onStepChange),\n onSubmit: async () => {\n if (!skipStepChangeCallFromHook) {\n sharedStateRef.current?.data?.onStepChange?.(\n index,\n mode,\n getStepChangeOptions(index)\n )\n }\n\n let result = undefined\n\n if (\n !skipStepChangeCall &&\n !(skipStepChangeCallBeforeMounted && !isInteractionRef.current)\n ) {\n result = await callOnStepChange(index, mode)\n }\n\n // Hide async indicator\n setFormState('abort')\n\n if (!skipErrorCheck) {\n // Set the showAllErrors to the step we got to\n setShowAllErrors(Boolean(errorOnStepRef.current[index]))\n }\n\n if (!preventNextStepRef.current && !(result instanceof Error)) {\n handleLayoutEffect()\n\n activeIndexRef.current = index\n forceUpdate()\n }\n\n preventNextStepRef.current = false\n\n return result\n },\n })\n },\n [\n callOnStepChange,\n getStepChangeOptions,\n handleLayoutEffect,\n handleSubmitCall,\n isInteractionRef,\n onStepChange,\n setFormState,\n setShowAllErrors,\n ]\n )\n\n const setActiveIndex = useCallback(\n (index: StepIndex, options?: SetActiveIndexOptions) => {\n if (index === activeIndexRef.current) {\n return\n }\n\n const mode = index > activeIndexRef.current ? 'next' : 'previous'\n\n handleStepChange({\n index,\n skipErrorCheck: mode === 'previous',\n mode,\n ...options,\n })\n },\n [handleStepChange]\n )\n\n const handlePrevious = useCallback(() => {\n setActiveIndex(activeIndexRef.current - 1)\n }, [setActiveIndex])\n\n const handleNext = useCallback(() => {\n setActiveIndex(activeIndexRef.current + 1)\n }, [setActiveIndex])\n\n const handleChange = useCallback(\n ({ current_step }) => {\n setActiveIndex(current_step, { skipErrorCheck: true })\n },\n [setActiveIndex]\n )\n\n const setFormError = useCallback(\n (error: Error) => {\n setSubmitState?.({ error })\n },\n [setSubmitState]\n )\n\n const handleSubmit = useCallback(\n ({ preventSubmit }) => {\n if (activeIndexRef.current + 1 < totalStepsRef.current) {\n handleNext()\n preventSubmit()\n }\n },\n [handleNext]\n )\n dataContext.setHandleSubmit?.(handleSubmit)\n\n const { check } = useVisibility()\n\n const activeIndex = activeIndexRef.current\n const providerValue = useMemo<WizardContextState>(() => {\n return {\n id,\n activeIndex,\n stepElementRef,\n stepsRef,\n updateTitlesRef,\n activeIndexRef,\n totalStepsRef,\n prerenderFieldProps,\n prerenderFieldPropsRef,\n check,\n setActiveIndex,\n handlePrevious,\n handleNext,\n setFormError,\n }\n }, [\n activeIndex,\n handleNext,\n handlePrevious,\n id,\n prerenderFieldProps,\n check,\n setActiveIndex,\n setFormError,\n ])\n\n // - Handle shared state\n useLayoutEffect(() => {\n if (id && hasContext) {\n sharedStateRef.current.extend(providerValue)\n }\n }, [hasContext, id, providerValue])\n\n useLayoutEffect(() => {\n updateTitlesRef.current?.()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [stepsRef.current])\n\n const stepsLengthDidChange = useCallback(() => {\n const count = Object.keys(stepsRef.current).length\n const tmpCount = Object.keys(tmpStepsRef.current).length\n return count !== 0 && tmpCount !== 0 && count !== tmpCount\n }, [])\n\n // - Call onStepChange when step gets replaced or added (e.g. via activeWhen)\n useLayoutEffect(() => {\n if (stepsLengthDidChange()) {\n callOnStepChange(activeIndexRef.current, 'stepListModified')\n executeLayoutAnimationRef.current?.()\n }\n tmpStepsRef.current = stepsRef.current\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [stepsRef.current, callOnStepChange, stepsLengthDidChange])\n\n if (!hasContext) {\n warn('You may wrap Wizard.Container in Form.Handler')\n return (\n <Handler>\n <WizardContainer {...props} id={id} />\n </Handler>\n )\n }\n\n return (\n <WizardContext.Provider value={providerValue}>\n <Space\n className={classnames(\n 'dnb-forms-wizard-layout',\n `dnb-forms-wizard-layout--${variant}`,\n className\n )}\n innerRef={elementRef}\n {...rest}\n >\n <DisplaySteps\n mode={mode}\n variant={variant}\n noAnimation={noAnimation}\n handleChange={handleChange}\n sidebarId={sidebarId}\n />\n\n <div className=\"dnb-forms-wizard-layout__contents\">\n <IterateOverSteps>{children}</IterateOverSteps>\n </div>\n </Space>\n\n {prerenderFieldProps && (\n <PrerenderFieldPropsOfOtherSteps\n prerenderFieldPropsRef={prerenderFieldPropsRef}\n />\n )}\n </WizardContext.Provider>\n )\n}\n\nfunction DisplaySteps({\n mode,\n variant,\n noAnimation,\n handleChange,\n sidebarId,\n}) {\n const [, forceUpdate] = useReducer(() => ({}), {})\n const { id, activeIndexRef, stepsRef, updateTitlesRef } =\n useContext(WizardContext) || {}\n updateTitlesRef.current = () => {\n forceUpdate()\n }\n\n const sidebar_id =\n variant === 'drawer' && !sidebarId ? undefined : sidebarId ?? id\n\n return (\n <aside className=\"dnb-forms-wizard-layout__indicator\">\n <StepIndicator.Sidebar sidebar_id={sidebar_id} />\n <StepIndicator\n bottom\n current_step={activeIndexRef.current}\n data={Object.values(stepsRef.current).map(({ title }) => title)}\n mode={mode}\n no_animation={noAnimation}\n on_change={handleChange}\n sidebar_id={sidebar_id}\n />\n </aside>\n )\n}\n\nfunction IterateOverSteps({ children }) {\n const {\n check,\n stepsRef,\n activeIndexRef,\n totalStepsRef,\n prerenderFieldProps,\n prerenderFieldPropsRef,\n } = useContext(WizardContext)\n\n stepsRef.current = {}\n let incrementIndex = -1\n\n const childrenArray = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n let step = child\n\n if (child?.type !== Step && typeof child.type === 'function') {\n step = child.type.apply(child.type, [\n child.props,\n ]) as React.ReactElement\n\n if (step?.type === Step) {\n child = step\n }\n }\n\n if (child?.type === Step) {\n if (child.props.active === false) {\n return null\n }\n\n if (\n child.props.activeWhen &&\n !check({ visibleWhen: child.props.activeWhen })\n ) {\n return null\n }\n\n incrementIndex++\n const index = incrementIndex\n\n stepsRef.current[index] = {\n id: child.props.id,\n title:\n child.props.title !== undefined\n ? convertJsxToString(child.props.title)\n : 'Title missing',\n }\n const key = `${index}-${activeIndexRef.current}`\n const clone = (props) =>\n React.cloneElement(child as React.ReactElement<StepProps>, props)\n\n if (\n prerenderFieldProps &&\n typeof document !== 'undefined' &&\n index !== activeIndexRef.current &&\n typeof prerenderFieldPropsRef.current['step-' + index] ===\n 'undefined'\n ) {\n prerenderFieldPropsRef.current['step-' + index] = () =>\n clone({\n key,\n index,\n prerenderFieldProps: true,\n })\n }\n\n return clone({\n key,\n index,\n })\n }\n }\n\n return child\n })\n\n // Ensure we never have a higher index than the available children\n // else we get a white screen\n if (childrenArray?.length === 0) {\n activeIndexRef.current = 0\n } else if (childrenArray?.length < activeIndexRef.current + 1) {\n activeIndexRef.current = childrenArray.length - 1\n }\n\n totalStepsRef.current = childrenArray?.length\n\n return childrenArray\n}\n\nfunction PrerenderFieldPropsOfOtherSteps({\n prerenderFieldPropsRef,\n}: {\n prerenderFieldPropsRef: WizardContextState['prerenderFieldPropsRef']\n}) {\n const hasRenderedRef = useRef(true)\n if (!hasRenderedRef.current) {\n return null\n }\n hasRenderedRef.current = false\n\n return (\n <WizardPortal>\n <PrerenderFieldPropsProvider>\n <iframe title=\"Wizard Prerender\" hidden>\n {Object.values(prerenderFieldPropsRef.current).map((Fn, i) => (\n <Fn key={i} />\n ))}\n </iframe>\n </PrerenderFieldPropsProvider>\n </WizardPortal>\n )\n}\n\nfunction WizardPortal({ children }) {\n if (typeof document !== 'undefined') {\n return ReactDOM.createPortal(children, document.body)\n }\n}\n\nfunction PrerenderFieldPropsProvider({ children }) {\n const { data, setFieldInternals, updateDataValue } =\n useContext(DataContext)\n\n return (\n <DataContext.Provider\n value={{\n ...defaultContextState,\n\n // Only update the props and the data value\n data,\n setFieldInternals,\n updateDataValue,\n prerenderFieldProps: true,\n hasContext: true,\n }}\n >\n <WizardContext.Provider value={{ prerenderFieldProps: true }}>\n {children}\n </WizardContext.Provider>\n </DataContext.Provider>\n )\n}\n\nWizardContainer._supportsSpacingProps = true\n\nexport default WizardContainer\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IACVC,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,UAAU,E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,KAAK,EAAC,kBAAkB;IAACwB,MAAM;EAAA,GACpCnF,MAAM,CAACyD,MAAM,CAACvE,sBAAsB,CAACE,OAAO,CAAC,CAACsE,GAAG,CAAC,CAAC0B,EAAE,EAAEC,CAAC,KACvDnK,KAAA,CAAA4H,aAAA,CAACsC,EAAE;IAACR,GAAG,EAAES;EAAE,CAAE,CACd,CACK,CACmB,CACjB,CAAC;AAEnB;AAEA,SAASJ,YAAYA,CAAC;EAAEzH;AAAS,CAAC,EAAE;EAClC,IAAI,OAAOuH,QAAQ,KAAK,WAAW,EAAE;IACnC,OAAOvJ,QAAQ,CAAC8J,YAAY,CAAC9H,QAAQ,EAAEuH,QAAQ,CAACQ,IAAI,CAAC;EACvD;AACF;AAEA,SAASL,2BAA2BA,CAAC;EAAE1H;AAAS,CAAC,EAAE;EACjD,MAAM;IAAE2D,IAAI;IAAEqE,iBAAiB;IAAEC;EAAgB,CAAC,GAChDtK,UAAU,CAACe,WAAW,CAAC;EAEzB,OACEhB,KAAA,CAAA4H,aAAA,CAAC5G,WAAW,CAAC8G,QAAQ;IACnBC,KAAK,EAAAxB,aAAA,CAAAA,aAAA,KACAtF,mBAAmB;MAGtBgF,IAAI;MACJqE,iBAAiB;MACjBC,eAAe;MACf/H,mBAAmB,EAAE,IAAI;MACzBO,UAAU,EAAE;IAAI;EAChB,GAEF/C,KAAA,CAAA4H,aAAA,CAAC7G,aAAa,CAAC+G,QAAQ;IAACC,KAAK,EAAE;MAAEvF,mBAAmB,EAAE;IAAK;EAAE,GAC1DF,QACqB,CACJ,CAAC;AAE3B;AAEAX,eAAe,CAAC6I,qBAAqB,GAAG,IAAI;AAE5C,eAAe7I,eAAe"}
|
|
1
|
+
{"version":3,"file":"WizardContainer.js","names":["React","useContext","useCallback","useRef","useReducer","useMemo","ReactDOM","classnames","Space","StepIndicator","convertJsxToString","warn","isAsync","useId","Step","handleDeprecatedProps","handleDeprecatedStepProps","WizardContext","DataContext","defaultContextState","Handler","createReferenceKey","useSharedState","useHandleLayoutEffect","useStepAnimation","useVisibility","useLayoutEffect","window","useEffect","WizardContainer","props","_dataContext$setHandl","className","id","idProp","mode","initialActiveIndex","omitScrollManagement","omitFocusManagement","onStepChange","children","noAnimation","prerenderFieldProps","variant","sidebarId","rest","_objectWithoutProperties","_excluded","dataContext","hasContext","setFormState","handleSubmitCall","setShowAllErrors","showAllErrors","setSubmitState","forceUpdate","activeIndexRef","totalStepsRef","NaN","errorOnStepRef","elementRef","stepElementRef","preventNextStepRef","stepsRef","tmpStepsRef","updateTitlesRef","prerenderFieldPropsRef","sharedStateRef","current","undefined","preventNavigation","shouldPrevent","getStepChangeOptions","index","_stepsRef$current$ind","previousIndex","options","previousStep","_stepsRef$current$pre","previousId","Object","assign","callOnStepChange","setFocus","scrollToTop","isInteractionRef","executeLayoutAnimationRef","handleLayoutEffect","handleStepChange","skipErrorCheck","skipStepChangeCall","skipStepChangeCallBeforeMounted","skipStepChangeCallFromHook","skipFieldValidation","enableAsyncBehavior","onSubmit","_sharedStateRef$curre","_sharedStateRef$curre2","_sharedStateRef$curre3","data","call","result","Boolean","Error","setActiveIndex","_objectSpread","handlePrevious","handleNext","handleChange","current_step","setFormError","error","handleSubmit","preventSubmit","setHandleSubmit","check","activeIndex","providerValue","extend","_updateTitlesRef$curr","stepsLengthDidChange","count","keys","length","tmpCount","_executeLayoutAnimati","createElement","_extends","Provider","value","innerRef","DisplaySteps","IterateOverSteps","PrerenderFieldPropsOfOtherSteps","sidebar_id","Sidebar","bottom","values","map","title","inactive","no_animation","on_change","incrementIndex","childrenArray","Children","child","isValidElement","_child","_child2","step","type","_step","apply","include","includeWhen","visibleWhen","key","clone","cloneElement","document","hasRenderedRef","WizardPortal","PrerenderFieldPropsProvider","hidden","Fn","i","createPortal","body","setFieldInternals","updateDataValue","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Wizard/Container/WizardContainer.tsx"],"sourcesContent":["import React, {\n useContext,\n useCallback,\n useRef,\n useReducer,\n useMemo,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport classnames from 'classnames'\nimport { Space, StepIndicator } from '../../../../components'\nimport {\n convertJsxToString,\n warn,\n} from '../../../../shared/component-helper'\nimport { isAsync } from '../../../../shared/helpers/isAsync'\nimport useId from '../../../../shared/helpers/useId'\nimport Step, {\n Props as StepProps,\n handleDeprecatedProps as handleDeprecatedStepProps,\n} from '../Step'\nimport WizardContext, {\n OnStepChange,\n OnStepChangeOptions,\n OnStepsChangeMode,\n SetActiveIndexOptions,\n StepIndex,\n Steps,\n WizardContextState,\n} from '../Context/WizardContext'\nimport DataContext, {\n defaultContextState,\n} from '../../DataContext/Context'\nimport Handler from '../../Form/Handler/Handler'\nimport {\n SharedStateReturn,\n createReferenceKey,\n useSharedState,\n} from '../../../../shared/helpers/useSharedState'\nimport useHandleLayoutEffect from './useHandleLayoutEffect'\nimport useStepAnimation from './useStepAnimation'\nimport { ComponentProps } from '../../types'\nimport useVisibility from '../../Form/Visibility/useVisibility'\n\n// SSR warning fix: https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\nconst useLayoutEffect =\n typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect\n\nexport type Props = ComponentProps & {\n id?: string\n\n /**\n * The mode of the wizard.\n */\n mode?: 'static' | 'strict' | 'loose'\n\n /**\n * If set to `true`, the wizard will not scroll to the first step when the user clicks on the next button.\n */\n omitScrollManagement?: boolean\n\n /**\n * If set to `true`, the wizard will not focus on the next step when the user clicks on the next button.\n */\n omitFocusManagement?: boolean\n\n /**\n * The index of the first step to be rendered.\n */\n initialActiveIndex?: StepIndex\n\n /**\n * The callback function that will be called when the user clicks on the next button.\n */\n onStepChange?: OnStepChange\n\n /**\n * The sidebar variant.\n */\n variant?: 'sidebar' | 'drawer'\n sidebarId?: string\n\n /**\n * If set to `true`, the wizard will not animate the steps.\n */\n noAnimation?: boolean\n\n /**\n * If set to `true`, the wizard pre-render all steps so the props of each field is available in the data context.\n * Defaults to `true`.\n */\n prerenderFieldProps?: boolean\n\n /**\n * The children of the wizard container.\n */\n children: React.ReactNode\n\n /**\n * @deprecated Is enabled by default. You can disable it with \"omitScrollManagement\"\n */\n scrollTopOnStepChange?: boolean\n}\n\nfunction WizardContainer(props: Props) {\n const {\n className,\n id: idProp,\n mode = 'strict',\n initialActiveIndex = 0,\n omitScrollManagement,\n omitFocusManagement,\n onStepChange,\n children,\n noAnimation = true,\n prerenderFieldProps = true,\n variant = 'sidebar',\n sidebarId,\n ...rest\n } = props\n\n const dataContext = useContext(DataContext)\n const {\n hasContext,\n setFormState,\n handleSubmitCall,\n setShowAllErrors,\n showAllErrors,\n setSubmitState,\n } = dataContext\n\n const id = useId(idProp)\n const [, forceUpdate] = useReducer(() => ({}), {})\n const activeIndexRef = useRef<StepIndex>(initialActiveIndex)\n const totalStepsRef = useRef<number>(NaN)\n const errorOnStepRef = useRef<Record<StepIndex, boolean | number>>({})\n const elementRef = useRef<HTMLElement>()\n const stepElementRef = useRef<HTMLElement>()\n const preventNextStepRef = useRef(false)\n const stepsRef = useRef<Steps>({})\n const tmpStepsRef = useRef<Steps>({})\n const updateTitlesRef = useRef<() => void>()\n const prerenderFieldPropsRef = useRef<\n Record<string, () => React.ReactElement>\n >({})\n\n // - Handle shared state\n const sharedStateRef =\n useRef<\n SharedStateReturn<\n WizardContextState & { onStepChange?: OnStepChange }\n >\n >()\n sharedStateRef.current = useSharedState<WizardContextState>(\n hasContext && id ? createReferenceKey(id, 'wizard') : undefined\n )\n\n // Store the current state of showAllErrors\n errorOnStepRef.current[activeIndexRef.current] = showAllErrors\n\n const preventNavigation = useCallback((shouldPrevent = true) => {\n preventNextStepRef.current = shouldPrevent\n }, [])\n\n const getStepChangeOptions: (index: StepIndex) => OnStepChangeOptions =\n useCallback(\n (index) => {\n const previousIndex = activeIndexRef.current\n const options = {\n preventNavigation,\n previousStep: { index: previousIndex },\n }\n\n const id = stepsRef.current[index]?.id\n if (id) {\n const previousId = stepsRef.current[previousIndex]?.id\n Object.assign(options, { id })\n Object.assign(options.previousStep, { id: previousId })\n }\n\n return options\n },\n [preventNavigation]\n )\n\n const callOnStepChange = useCallback(\n async (index: StepIndex, mode: OnStepsChangeMode) => {\n if (isAsync(onStepChange)) {\n return await onStepChange(index, mode, getStepChangeOptions(index))\n }\n\n return onStepChange?.(index, mode, getStepChangeOptions(index))\n },\n [getStepChangeOptions, onStepChange]\n )\n\n const { setFocus, scrollToTop, isInteractionRef } =\n useHandleLayoutEffect({ elementRef, stepElementRef })\n\n const executeLayoutAnimationRef = useRef<() => void>()\n useStepAnimation({\n activeIndexRef,\n stepElementRef,\n executeLayoutAnimationRef,\n })\n\n const handleLayoutEffect = useCallback(() => {\n if (!omitFocusManagement) {\n setFocus()\n }\n if (!omitScrollManagement) {\n scrollToTop()\n }\n }, [omitScrollManagement, omitFocusManagement, setFocus, scrollToTop])\n\n const handleStepChange = useCallback(\n ({\n index,\n skipErrorCheck,\n skipStepChangeCall,\n skipStepChangeCallBeforeMounted,\n skipStepChangeCallFromHook,\n mode,\n }: {\n index: StepIndex\n mode: OnStepsChangeMode\n } & SetActiveIndexOptions) => {\n handleSubmitCall({\n skipErrorCheck,\n skipFieldValidation: skipErrorCheck,\n enableAsyncBehavior: isAsync(onStepChange),\n onSubmit: async () => {\n if (!skipStepChangeCallFromHook) {\n sharedStateRef.current?.data?.onStepChange?.(\n index,\n mode,\n getStepChangeOptions(index)\n )\n }\n\n let result = undefined\n\n if (\n !skipStepChangeCall &&\n !(skipStepChangeCallBeforeMounted && !isInteractionRef.current)\n ) {\n result = await callOnStepChange(index, mode)\n }\n\n // Hide async indicator\n setFormState('abort')\n\n if (!skipErrorCheck) {\n // Set the showAllErrors to the step we got to\n setShowAllErrors(Boolean(errorOnStepRef.current[index]))\n }\n\n if (!preventNextStepRef.current && !(result instanceof Error)) {\n handleLayoutEffect()\n\n activeIndexRef.current = index\n forceUpdate()\n }\n\n preventNextStepRef.current = false\n\n return result\n },\n })\n },\n [\n callOnStepChange,\n getStepChangeOptions,\n handleLayoutEffect,\n handleSubmitCall,\n isInteractionRef,\n onStepChange,\n setFormState,\n setShowAllErrors,\n ]\n )\n\n const setActiveIndex = useCallback(\n (index: StepIndex, options?: SetActiveIndexOptions) => {\n if (index === activeIndexRef.current) {\n return\n }\n\n const mode = index > activeIndexRef.current ? 'next' : 'previous'\n\n handleStepChange({\n index,\n skipErrorCheck: mode === 'previous',\n mode,\n ...options,\n })\n },\n [handleStepChange]\n )\n\n const handlePrevious = useCallback(() => {\n setActiveIndex(activeIndexRef.current - 1)\n }, [setActiveIndex])\n\n const handleNext = useCallback(() => {\n setActiveIndex(activeIndexRef.current + 1)\n }, [setActiveIndex])\n\n const handleChange = useCallback(\n ({ current_step }) => {\n setActiveIndex(current_step, { skipErrorCheck: true })\n },\n [setActiveIndex]\n )\n\n const setFormError = useCallback(\n (error: Error) => {\n setSubmitState?.({ error })\n },\n [setSubmitState]\n )\n\n const handleSubmit = useCallback(\n ({ preventSubmit }) => {\n if (activeIndexRef.current + 1 < totalStepsRef.current) {\n handleNext()\n preventSubmit()\n }\n },\n [handleNext]\n )\n dataContext.setHandleSubmit?.(handleSubmit)\n\n const { check } = useVisibility()\n\n const activeIndex = activeIndexRef.current\n const providerValue = useMemo<WizardContextState>(() => {\n return {\n id,\n activeIndex,\n stepElementRef,\n stepsRef,\n updateTitlesRef,\n activeIndexRef,\n totalStepsRef,\n prerenderFieldProps,\n prerenderFieldPropsRef,\n check,\n setActiveIndex,\n handlePrevious,\n handleNext,\n setFormError,\n }\n }, [\n activeIndex,\n handleNext,\n handlePrevious,\n id,\n prerenderFieldProps,\n check,\n setActiveIndex,\n setFormError,\n ])\n\n // - Handle shared state\n useLayoutEffect(() => {\n if (id && hasContext) {\n sharedStateRef.current.extend(providerValue)\n }\n }, [hasContext, id, providerValue])\n\n useLayoutEffect(() => {\n updateTitlesRef.current?.()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [stepsRef.current])\n\n const stepsLengthDidChange = useCallback(() => {\n const count = Object.keys(stepsRef.current).length\n const tmpCount = Object.keys(tmpStepsRef.current).length\n return count !== 0 && tmpCount !== 0 && count !== tmpCount\n }, [])\n\n // - Call onStepChange when step gets replaced or added (e.g. via includeWhen)\n useLayoutEffect(() => {\n if (stepsLengthDidChange()) {\n callOnStepChange(activeIndexRef.current, 'stepListModified')\n executeLayoutAnimationRef.current?.()\n }\n tmpStepsRef.current = stepsRef.current\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [stepsRef.current, callOnStepChange, stepsLengthDidChange])\n\n if (!hasContext) {\n warn('You may wrap Wizard.Container in Form.Handler')\n return (\n <Handler>\n <WizardContainer {...props} id={id} />\n </Handler>\n )\n }\n\n return (\n <WizardContext.Provider value={providerValue}>\n <Space\n className={classnames(\n 'dnb-forms-wizard-layout',\n `dnb-forms-wizard-layout--${variant}`,\n className\n )}\n innerRef={elementRef}\n {...rest}\n >\n <DisplaySteps\n mode={mode}\n variant={variant}\n noAnimation={noAnimation}\n handleChange={handleChange}\n sidebarId={sidebarId}\n />\n\n <div className=\"dnb-forms-wizard-layout__contents\">\n <IterateOverSteps>{children}</IterateOverSteps>\n </div>\n </Space>\n\n {prerenderFieldProps && (\n <PrerenderFieldPropsOfOtherSteps\n prerenderFieldPropsRef={prerenderFieldPropsRef}\n />\n )}\n </WizardContext.Provider>\n )\n}\n\nfunction DisplaySteps({\n mode,\n variant,\n noAnimation,\n handleChange,\n sidebarId,\n}) {\n const [, forceUpdate] = useReducer(() => ({}), {})\n const { id, activeIndexRef, stepsRef, updateTitlesRef } =\n useContext(WizardContext) || {}\n updateTitlesRef.current = () => {\n forceUpdate()\n }\n\n const sidebar_id =\n variant === 'drawer' && !sidebarId ? undefined : sidebarId ?? id\n\n return (\n <aside className=\"dnb-forms-wizard-layout__indicator\">\n <StepIndicator.Sidebar sidebar_id={sidebar_id} />\n <StepIndicator\n bottom\n current_step={activeIndexRef.current}\n data={Object.values(stepsRef.current).map(\n ({ title, inactive }) => ({ title, inactive })\n )}\n mode={mode}\n no_animation={noAnimation}\n on_change={handleChange}\n sidebar_id={sidebar_id}\n />\n </aside>\n )\n}\n\nfunction IterateOverSteps({ children }) {\n const {\n check,\n stepsRef,\n activeIndexRef,\n totalStepsRef,\n prerenderFieldProps,\n prerenderFieldPropsRef,\n } = useContext(WizardContext)\n\n stepsRef.current = {}\n let incrementIndex = -1\n\n const childrenArray = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n let step = child\n\n if (child?.type !== Step && typeof child.type === 'function') {\n step = child.type.apply(child.type, [\n child.props,\n ]) as React.ReactElement\n\n if (step?.type === Step) {\n child = step\n }\n }\n\n if (child?.type === Step) {\n const { title, inactive, include, includeWhen, id } =\n handleDeprecatedStepProps(child.props)\n\n if (include === false) {\n return null\n }\n\n if (\n includeWhen &&\n !check({\n visibleWhen: includeWhen,\n })\n ) {\n return null\n }\n\n incrementIndex++\n const index = incrementIndex\n\n stepsRef.current[index] = {\n id,\n title:\n title !== undefined\n ? convertJsxToString(title)\n : 'Title missing',\n inactive,\n }\n const key = `${index}-${activeIndexRef.current}`\n const clone = (props) =>\n React.cloneElement(child as React.ReactElement<StepProps>, props)\n\n if (\n prerenderFieldProps &&\n typeof document !== 'undefined' &&\n index !== activeIndexRef.current &&\n typeof prerenderFieldPropsRef.current['step-' + index] ===\n 'undefined'\n ) {\n prerenderFieldPropsRef.current['step-' + index] = () =>\n clone({\n key,\n index,\n prerenderFieldProps: true,\n })\n }\n\n return clone({\n key,\n index,\n })\n }\n }\n\n return child\n })\n\n // Ensure we never have a higher index than the available children\n // else we get a white screen\n if (childrenArray?.length === 0) {\n activeIndexRef.current = 0\n } else if (childrenArray?.length < activeIndexRef.current + 1) {\n activeIndexRef.current = childrenArray.length - 1\n }\n\n totalStepsRef.current = childrenArray?.length\n\n return childrenArray\n}\n\nfunction PrerenderFieldPropsOfOtherSteps({\n prerenderFieldPropsRef,\n}: {\n prerenderFieldPropsRef: WizardContextState['prerenderFieldPropsRef']\n}) {\n const hasRenderedRef = useRef(true)\n if (!hasRenderedRef.current) {\n return null\n }\n hasRenderedRef.current = false\n\n return (\n <WizardPortal>\n <PrerenderFieldPropsProvider>\n <iframe title=\"Wizard Prerender\" hidden>\n {Object.values(prerenderFieldPropsRef.current).map((Fn, i) => (\n <Fn key={i} />\n ))}\n </iframe>\n </PrerenderFieldPropsProvider>\n </WizardPortal>\n )\n}\n\nfunction WizardPortal({ children }) {\n if (typeof document !== 'undefined') {\n return ReactDOM.createPortal(children, document.body)\n }\n}\n\nfunction PrerenderFieldPropsProvider({ children }) {\n const { data, setFieldInternals, updateDataValue } =\n useContext(DataContext)\n\n return (\n <DataContext.Provider\n value={{\n ...defaultContextState,\n\n // Only update the props and the data value\n data,\n setFieldInternals,\n updateDataValue,\n prerenderFieldProps: true,\n hasContext: true,\n }}\n >\n <WizardContext.Provider value={{ prerenderFieldProps: true }}>\n {children}\n </WizardContext.Provider>\n </DataContext.Provider>\n )\n}\n\nWizardContainer._supportsSpacingProps = true\n\nexport default WizardContainer\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IACVC,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,UAAU,EACVC,OAAO,QACF,OAAO;AACd,OAAOC,QAAQ,MAAM,WAAW;AAChC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,KAAK,EAAEC,aAAa,QAAQ,wBAAwB;AAC7D,SACEC,kBAAkB,EAClBC,IAAI,QACC,qCAAqC;AAC5C,SAASC,OAAO,QAAQ,oCAAoC;AAC5D,OAAOC,KAAK,MAAM,kCAAkC;AACpD,OAAOC,IAAI,IAETC,qBAAqB,IAAIC,yBAAyB,QAC7C,SAAS;AAChB,OAAOC,aAAa,MAQb,0BAA0B;AACjC,OAAOC,WAAW,IAChBC,mBAAmB,QACd,2BAA2B;AAClC,OAAOC,OAAO,MAAM,4BAA4B;AAChD,SAEEC,kBAAkB,EAClBC,cAAc,QACT,2CAA2C;AAClD,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,O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EAAE3H;AAAS,CAAC,EAAE;EACjD,MAAM;IAAE2D,IAAI;IAAEsE,iBAAiB;IAAEC;EAAgB,CAAC,GAChDzK,UAAU,CAACiB,WAAW,CAAC;EAEzB,OACElB,KAAA,CAAA8H,aAAA,CAAC5G,WAAW,CAAC8G,QAAQ;IACnBC,KAAK,EAAAxB,aAAA,CAAAA,aAAA,KACAtF,mBAAmB;MAGtBgF,IAAI;MACJsE,iBAAiB;MACjBC,eAAe;MACfhI,mBAAmB,EAAE,IAAI;MACzBO,UAAU,EAAE;IAAI;EAChB,GAEFjD,KAAA,CAAA8H,aAAA,CAAC7G,aAAa,CAAC+G,QAAQ;IAACC,KAAK,EAAE;MAAEvF,mBAAmB,EAAE;IAAK;EAAE,GAC1DF,QACqB,CACJ,CAAC;AAE3B;AAEAX,eAAe,CAAC8I,qBAAqB,GAAG,IAAI;AAE5C,eAAe9I,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardContext.js","names":["React","WizardContext","createContext","undefined"],"sources":["../../../../../../src/extensions/forms/Wizard/Context/WizardContext.ts"],"sourcesContent":["import React from 'react'\nimport { EventReturnWithStateObject } from '../../types'\nimport { VisibleWhen } from '../../Form/Visibility'\n\nexport type OnStepsChangeMode = 'previous' | 'next' | 'stepListModified'\nexport type OnStepChangeOptions = {\n preventNavigation: (shouldPrevent?: boolean) => void\n id?: string\n previousStep: {\n index: StepIndex\n id?: string\n }\n}\nexport type OnStepChange = (\n index: StepIndex,\n mode: OnStepsChangeMode,\n options: OnStepChangeOptions\n) =>\n | EventReturnWithStateObject\n | void\n | Promise<EventReturnWithStateObject | void>\n\nexport type StepIndex = number\nexport type Steps = Record
|
|
1
|
+
{"version":3,"file":"WizardContext.js","names":["React","WizardContext","createContext","undefined"],"sources":["../../../../../../src/extensions/forms/Wizard/Context/WizardContext.ts"],"sourcesContent":["import React from 'react'\nimport { EventReturnWithStateObject } from '../../types'\nimport { VisibleWhen } from '../../Form/Visibility'\n\nexport type OnStepsChangeMode = 'previous' | 'next' | 'stepListModified'\nexport type OnStepChangeOptions = {\n preventNavigation: (shouldPrevent?: boolean) => void\n id?: string\n previousStep: {\n index: StepIndex\n id?: string\n }\n}\nexport type OnStepChange = (\n index: StepIndex,\n mode: OnStepsChangeMode,\n options: OnStepChangeOptions\n) =>\n | EventReturnWithStateObject\n | void\n | Promise<EventReturnWithStateObject | void>\n\nexport type StepIndex = number\nexport type Steps = Record<\n string,\n { title: string; id: string; inactive?: boolean }\n>\nexport type SetActiveIndexOptions = {\n skipStepChangeCall?: boolean\n skipStepChangeCallBeforeMounted?: boolean\n skipStepChangeCallFromHook?: boolean\n skipErrorCheck?: boolean\n}\nexport interface WizardContextState {\n id?: string\n totalSteps?: number\n activeIndex?: StepIndex\n stepElementRef?: React.MutableRefObject<HTMLElement>\n stepsRef?: React.MutableRefObject<Steps>\n updateTitlesRef?: React.MutableRefObject<() => void>\n activeIndexRef?: React.MutableRefObject<StepIndex>\n totalStepsRef?: React.MutableRefObject<number>\n prerenderFieldPropsRef?: React.MutableRefObject<\n Record<string, () => React.ReactElement>\n >\n prerenderFieldProps?: boolean\n handlePrevious?: () => void\n handleNext?: () => void\n setActiveIndex?: (\n index: StepIndex,\n {\n skipStepChangeCall,\n skipStepChangeCallBeforeMounted,\n skipStepChangeCallFromHook,\n }?: SetActiveIndexOptions\n ) => void\n setFormError?: (error: Error) => void\n check?: ({ visibleWhen }: { visibleWhen: VisibleWhen }) => boolean\n}\n\nconst WizardContext = React.createContext<WizardContextState | undefined>(\n undefined\n)\n\nexport default WizardContext\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AA4DzB,MAAMC,aAAa,GAAGD,KAAK,CAACE,aAAa,CACvCC,SACF,CAAC;AAED,eAAeF,aAAa"}
|
|
@@ -7,6 +7,10 @@ export type Props = ComponentProps & FlexContainerProps & {
|
|
|
7
7
|
* A title that will be displayed in the indicator.
|
|
8
8
|
*/
|
|
9
9
|
title?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Will treat the step as non-navigable if set to `true`.
|
|
12
|
+
*/
|
|
13
|
+
inactive?: boolean;
|
|
10
14
|
/**
|
|
11
15
|
* To determine if the step should be rendered.
|
|
12
16
|
* Used internally by the WizardContainer.
|
|
@@ -18,18 +22,29 @@ export type Props = ComponentProps & FlexContainerProps & {
|
|
|
18
22
|
required?: boolean;
|
|
19
23
|
/**
|
|
20
24
|
* If set to `false`, the step will not be rendered.
|
|
25
|
+
* @deprecated use `include` instead
|
|
21
26
|
*/
|
|
22
27
|
active?: boolean;
|
|
23
28
|
/**
|
|
24
|
-
* Provide a `path` and a `hasValue` property with the
|
|
29
|
+
* Provide a `path` and a `hasValue` property with the expected value in order to enable the step. You can alternatively provide a `hasValue` function that returns a boolean. The first parameter is the value of the path.
|
|
30
|
+
* @deprecated use `includeWhen` instead
|
|
25
31
|
*/
|
|
26
32
|
activeWhen?: VisibleWhen;
|
|
33
|
+
/**
|
|
34
|
+
* If set to `false`, the step will not be rendered.
|
|
35
|
+
*/
|
|
36
|
+
include?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Provide a `path` and a `hasValue` property with the expected value in order to enable the step. You can alternatively provide a `hasValue` function that returns a boolean. The first parameter is the value of the path.
|
|
39
|
+
*/
|
|
40
|
+
includeWhen?: VisibleWhen;
|
|
27
41
|
/**
|
|
28
42
|
* If set to `true`, the step will always be rendered.
|
|
29
43
|
* For internal use only.
|
|
30
44
|
*/
|
|
31
45
|
prerenderFieldProps?: boolean;
|
|
32
46
|
};
|
|
47
|
+
export declare function handleDeprecatedProps({ active, activeWhen, include, includeWhen, ...rest }: Props): Omit<Props, 'active' | 'activeWhen'>;
|
|
33
48
|
declare function Step(props: Props): JSX.Element;
|
|
34
49
|
declare namespace Step {
|
|
35
50
|
var _supportsSpacingProps: boolean;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
const _excluded = ["
|
|
6
|
+
const _excluded = ["active", "activeWhen", "include", "includeWhen"],
|
|
7
|
+
_excluded2 = ["className", "title", "inactive", "index", "include", "includeWhen", "required", "prerenderFieldProps", "children"];
|
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
10
|
import React, { useContext, useMemo, useRef } from 'react';
|
|
7
11
|
import classnames from 'classnames';
|
|
8
12
|
import WizardContext from '../Context/WizardContext';
|
|
@@ -10,18 +14,33 @@ import Flex from '../../../../components/flex/Flex';
|
|
|
10
14
|
import { convertJsxToString } from '../../../../shared/component-helper';
|
|
11
15
|
import FieldProvider from '../../Field/Provider';
|
|
12
16
|
const useLayoutEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
|
|
17
|
+
export function handleDeprecatedProps(_ref) {
|
|
18
|
+
let {
|
|
19
|
+
active,
|
|
20
|
+
activeWhen,
|
|
21
|
+
include,
|
|
22
|
+
includeWhen
|
|
23
|
+
} = _ref,
|
|
24
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
return _objectSpread({
|
|
26
|
+
include: include !== null && include !== void 0 ? include : active,
|
|
27
|
+
includeWhen: includeWhen !== null && includeWhen !== void 0 ? includeWhen : activeWhen
|
|
28
|
+
}, rest);
|
|
29
|
+
}
|
|
13
30
|
function Step(props) {
|
|
14
|
-
const
|
|
31
|
+
const _handleDeprecatedProp = handleDeprecatedProps(props),
|
|
32
|
+
{
|
|
15
33
|
className,
|
|
16
34
|
title,
|
|
35
|
+
inactive,
|
|
17
36
|
index,
|
|
18
|
-
|
|
19
|
-
|
|
37
|
+
include = true,
|
|
38
|
+
includeWhen,
|
|
20
39
|
required,
|
|
21
40
|
prerenderFieldProps,
|
|
22
41
|
children
|
|
23
|
-
} =
|
|
24
|
-
restProps = _objectWithoutProperties(
|
|
42
|
+
} = _handleDeprecatedProp,
|
|
43
|
+
restProps = _objectWithoutProperties(_handleDeprecatedProp, _excluded2);
|
|
25
44
|
const {
|
|
26
45
|
check,
|
|
27
46
|
activeIndex,
|
|
@@ -29,8 +48,8 @@ function Step(props) {
|
|
|
29
48
|
stepElementRef
|
|
30
49
|
} = useContext(WizardContext) || {};
|
|
31
50
|
const ariaLabel = useMemo(() => {
|
|
32
|
-
var
|
|
33
|
-
return (
|
|
51
|
+
var _ref2, _stepsRef$current, _stepsRef$current$ind, _stepsRef$current2;
|
|
52
|
+
return (_ref2 = !prerenderFieldProps && ((stepsRef === null || stepsRef === void 0 ? void 0 : (_stepsRef$current = stepsRef.current) === null || _stepsRef$current === void 0 ? void 0 : (_stepsRef$current$ind = _stepsRef$current[index]) === null || _stepsRef$current$ind === void 0 ? void 0 : _stepsRef$current$ind.title) || (stepsRef === null || stepsRef === void 0 ? void 0 : (_stepsRef$current2 = stepsRef.current) === null || _stepsRef$current2 === void 0 ? void 0 : _stepsRef$current2[index]))) !== null && _ref2 !== void 0 ? _ref2 : convertJsxToString(title);
|
|
34
53
|
}, [index, prerenderFieldProps, title, stepsRef]);
|
|
35
54
|
const currentElementRef = useRef();
|
|
36
55
|
useLayoutEffect(() => {
|
|
@@ -46,8 +65,8 @@ function Step(props) {
|
|
|
46
65
|
if (prerenderFieldProps) {
|
|
47
66
|
return children;
|
|
48
67
|
}
|
|
49
|
-
if (activeIndex !== index ||
|
|
50
|
-
visibleWhen:
|
|
68
|
+
if (activeIndex !== index || include === false || includeWhen && !check({
|
|
69
|
+
visibleWhen: includeWhen
|
|
51
70
|
})) {
|
|
52
71
|
return React.createElement(React.Fragment, null);
|
|
53
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.js","names":["React","useContext","useMemo","useRef","classnames","WizardContext","Flex","convertJsxToString","FieldProvider","useLayoutEffect","window","useEffect","Step","props","
|
|
1
|
+
{"version":3,"file":"Step.js","names":["React","useContext","useMemo","useRef","classnames","WizardContext","Flex","convertJsxToString","FieldProvider","useLayoutEffect","window","useEffect","handleDeprecatedProps","_ref","active","activeWhen","include","includeWhen","rest","_objectWithoutProperties","_excluded","_objectSpread","Step","props","_handleDeprecatedProp","className","title","inactive","index","required","prerenderFieldProps","children","restProps","_excluded2","check","activeIndex","stepsRef","stepElementRef","ariaLabel","_ref2","_stepsRef$current","_stepsRef$current$ind","_stepsRef$current2","current","currentElementRef","visibleWhen","createElement","Fragment","fieldProps","undefined","Stack","_extends","element","innerRef","tabIndex","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Wizard/Step/Step.tsx"],"sourcesContent":["import React, { useContext, useMemo, useRef } from 'react'\nimport classnames from 'classnames'\nimport { ComponentProps } from '../../types'\nimport { Props as FlexContainerProps } from '../../../../components/flex/Container'\nimport WizardContext from '../Context/WizardContext'\nimport Flex from '../../../../components/flex/Flex'\nimport { convertJsxToString } from '../../../../shared/component-helper'\nimport FieldProvider from '../../Field/Provider'\nimport type { VisibleWhen } from '../../Form/Visibility'\n\n// SSR warning fix: https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\nconst useLayoutEffect =\n typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect\n\nexport type Props = ComponentProps &\n FlexContainerProps & {\n /**\n * A title that will be displayed in the indicator.\n */\n title?: React.ReactNode\n /**\n * Will treat the step as non-navigable if set to `true`.\n */\n inactive?: boolean\n\n /**\n * To determine if the step should be rendered.\n * Used internally by the WizardContainer.\n */\n index?: number\n\n /**\n * Will make all the fields inside the step to be required.\n */\n required?: boolean\n\n /**\n * If set to `false`, the step will not be rendered.\n * @deprecated use `include` instead\n */\n active?: boolean\n\n /**\n * Provide a `path` and a `hasValue` property with the expected value in order to enable the step. You can alternatively provide a `hasValue` function that returns a boolean. The first parameter is the value of the path.\n * @deprecated use `includeWhen` instead\n */\n activeWhen?: VisibleWhen\n\n /**\n * If set to `false`, the step will not be rendered.\n */\n\n include?: boolean\n /**\n * Provide a `path` and a `hasValue` property with the expected value in order to enable the step. You can alternatively provide a `hasValue` function that returns a boolean. The first parameter is the value of the path.\n */\n includeWhen?: VisibleWhen\n\n /**\n * If set to `true`, the step will always be rendered.\n * For internal use only.\n */\n prerenderFieldProps?: boolean\n }\n\nexport function handleDeprecatedProps({\n active,\n activeWhen,\n include,\n includeWhen,\n ...rest\n}: Props): Omit<Props, 'active' | 'activeWhen'> {\n return {\n include: include ?? active,\n includeWhen: includeWhen ?? activeWhen,\n ...rest,\n }\n}\nfunction Step(props: Props): JSX.Element {\n const {\n className,\n title,\n inactive,\n index,\n include = true,\n includeWhen,\n required,\n prerenderFieldProps,\n children,\n ...restProps\n } = handleDeprecatedProps(props)\n const { check, activeIndex, stepsRef, stepElementRef } =\n useContext(WizardContext) || {}\n\n const ariaLabel = useMemo(() => {\n return (\n (!prerenderFieldProps &&\n (stepsRef?.current?.[index]?.title ||\n stepsRef?.current?.[index])) ??\n convertJsxToString(title)\n )\n }, [index, prerenderFieldProps, title, stepsRef])\n\n const currentElementRef = useRef<HTMLElement>()\n useLayoutEffect(() => {\n if (!prerenderFieldProps && typeof stepElementRef !== 'undefined') {\n if (currentElementRef.current) {\n stepElementRef.current = currentElementRef.current\n }\n return () => {\n stepElementRef.current = null\n }\n }\n }, [prerenderFieldProps, stepElementRef])\n\n if (prerenderFieldProps) {\n return children as JSX.Element\n }\n\n if (\n activeIndex !== index ||\n include === false ||\n (includeWhen && !check({ visibleWhen: includeWhen }))\n ) {\n // Another step is active\n return <></>\n }\n\n const fieldProps =\n typeof required === 'boolean' ? { required } : undefined\n\n return (\n <Flex.Stack\n className={classnames('dnb-forms-step', className)}\n element=\"section\"\n aria-label={ariaLabel}\n innerRef={currentElementRef}\n tabIndex={-1}\n {...restProps}\n >\n {fieldProps ? (\n <FieldProvider {...fieldProps}>{children}</FieldProvider>\n ) : (\n children\n )}\n </Flex.Stack>\n )\n}\n\nStep._supportsSpacingProps = true\nexport default Step\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAC1D,OAAOC,UAAU,MAAM,YAAY;AAGnC,OAAOC,aAAa,MAAM,0BAA0B;AACpD,OAAOC,IAAI,MAAM,kCAAkC;AACnD,SAASC,kBAAkB,QAAQ,qCAAqC;AACxE,OAAOC,aAAa,MAAM,sBAAsB;AAIhD,MAAMC,eAAe,GACnB,OAAOC,MAAM,KAAK,WAAW,GAAGV,KAAK,CAACW,SAAS,GAAGX,KAAK,CAACS,eAAe;AAqDzE,OAAO,SAASG,qBAAqBA,CAAAC,IAAA,EAMW;EAAA,IANV;MACpCC,MAAM;MACNC,UAAU;MACVC,OAAO;MACPC;IAEK,CAAC,GAAAJ,IAAA;IADHK,IAAI,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EAEP,OAAAC,aAAA;IACEL,OAAO,EAAEA,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAIF,MAAM;IAC1BG,WAAW,EAAEA,WAAW,aAAXA,WAAW,cAAXA,WAAW,GAAIF;EAAU,GACnCG,IAAI;AAEX;AACA,SAASI,IAAIA,CAACC,KAAY,EAAe;EACvC,MAAAC,qBAAA,GAWIZ,qBAAqB,CAACW,KAAK,CAAC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