@spscommerce/ds-react 5.10.3 → 5.10.5-ie.2
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/dist/out-tsc/_template/SpsComponent.d.ts +15 -0
- package/dist/out-tsc/_template/SpsComponent.examples.d.ts +2 -0
- package/dist/out-tsc/_template/SpsComponent.examples.js +17 -0
- package/dist/out-tsc/_template/SpsComponent.examples.js.map +1 -0
- package/dist/out-tsc/_template/SpsComponent.js +44 -0
- package/dist/out-tsc/_template/SpsComponent.js.map +1 -0
- package/dist/out-tsc/_template/index.d.ts +2 -0
- package/dist/out-tsc/_template/index.js +3 -0
- package/dist/out-tsc/_template/index.js.map +1 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.d.ts +22 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.examples.d.ts +2 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.examples.js +43 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.examples.js.map +1 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.js +58 -0
- package/dist/out-tsc/advanced-search/SpsAdvancedSearch.js.map +1 -0
- package/dist/out-tsc/advanced-search/index.d.ts +2 -0
- package/dist/out-tsc/advanced-search/index.js +3 -0
- package/dist/out-tsc/advanced-search/index.js.map +1 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.d.ts +27 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.examples.d.ts +2 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.examples.js +37 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.examples.js.map +1 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.js +139 -0
- package/dist/out-tsc/autocomplete/SpsAutocomplete.js.map +1 -0
- package/dist/out-tsc/autocomplete/index.d.ts +2 -0
- package/dist/out-tsc/autocomplete/index.js +3 -0
- package/dist/out-tsc/autocomplete/index.js.map +1 -0
- package/dist/out-tsc/button/SpsButton.d.ts +18 -0
- package/dist/out-tsc/button/SpsButton.examples.d.ts +2 -0
- package/dist/out-tsc/button/SpsButton.examples.js +201 -0
- package/dist/out-tsc/button/SpsButton.examples.js.map +1 -0
- package/dist/out-tsc/button/SpsButton.js +67 -0
- package/dist/out-tsc/button/SpsButton.js.map +1 -0
- package/dist/out-tsc/button/SpsButtonGroup.d.ts +10 -0
- package/dist/out-tsc/button/SpsButtonGroup.js +68 -0
- package/dist/out-tsc/button/SpsButtonGroup.js.map +1 -0
- package/dist/out-tsc/button/SpsIconButtonPanel.d.ts +10 -0
- package/dist/out-tsc/button/SpsIconButtonPanel.js +61 -0
- package/dist/out-tsc/button/SpsIconButtonPanel.js.map +1 -0
- package/dist/out-tsc/button/index.d.ts +4 -0
- package/dist/out-tsc/button/index.js +5 -0
- package/dist/out-tsc/button/index.js.map +1 -0
- package/dist/out-tsc/card/SpsCard.d.ts +16 -0
- package/dist/out-tsc/card/SpsCard.examples.d.ts +2 -0
- package/dist/out-tsc/card/SpsCard.examples.js +98 -0
- package/dist/out-tsc/card/SpsCard.examples.js.map +1 -0
- package/dist/out-tsc/card/SpsCard.js +90 -0
- package/dist/out-tsc/card/SpsCard.js.map +1 -0
- package/dist/out-tsc/card/SpsCardHeader.d.ts +14 -0
- package/dist/out-tsc/card/SpsCardHeader.js +49 -0
- package/dist/out-tsc/card/SpsCardHeader.js.map +1 -0
- package/dist/out-tsc/card/SpsCardTabbedPane.d.ts +19 -0
- package/dist/out-tsc/card/SpsCardTabbedPane.js +63 -0
- package/dist/out-tsc/card/SpsCardTabbedPane.js.map +1 -0
- package/dist/out-tsc/card/index.d.ts +3 -0
- package/dist/out-tsc/card/index.js +4 -0
- package/dist/out-tsc/card/index.js.map +1 -0
- package/dist/out-tsc/card/useTab.d.ts +18 -0
- package/dist/out-tsc/card/useTab.js +110 -0
- package/dist/out-tsc/card/useTab.js.map +1 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.d.ts +21 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.examples.d.ts +2 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.examples.js +35 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.examples.js.map +1 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.js +88 -0
- package/dist/out-tsc/checkbox/SpsCheckbox.js.map +1 -0
- package/dist/out-tsc/checkbox/index.d.ts +2 -0
- package/dist/out-tsc/checkbox/index.js +3 -0
- package/dist/out-tsc/checkbox/index.js.map +1 -0
- package/dist/out-tsc/checkbox-dropdown/SpsCheckboxDropdown.d.ts +17 -0
- package/dist/out-tsc/checkbox-dropdown/SpsCheckboxDropdown.js +54 -0
- package/dist/out-tsc/checkbox-dropdown/SpsCheckboxDropdown.js.map +1 -0
- package/dist/out-tsc/checkbox-dropdown/index.d.ts +1 -0
- package/dist/out-tsc/checkbox-dropdown/index.js +2 -0
- package/dist/out-tsc/checkbox-dropdown/index.js.map +1 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.d.ts +16 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.examples.d.ts +2 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.examples.js +42 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.examples.js.map +1 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.js +74 -0
- package/dist/out-tsc/clickable-tag/SpsClickableTag.js.map +1 -0
- package/dist/out-tsc/clickable-tag/index.d.ts +2 -0
- package/dist/out-tsc/clickable-tag/index.js +3 -0
- package/dist/out-tsc/clickable-tag/index.js.map +1 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.d.ts +19 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.examples.d.ts +2 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.examples.js +18 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.examples.js.map +1 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.js +158 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooser.js.map +1 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooserColumn.d.ts +17 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooserColumn.js +61 -0
- package/dist/out-tsc/column-chooser/SpsColumnChooserColumn.js.map +1 -0
- package/dist/out-tsc/column-chooser/index.d.ts +3 -0
- package/dist/out-tsc/column-chooser/index.js +4 -0
- package/dist/out-tsc/column-chooser/index.js.map +1 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.d.ts +11 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.examples.d.ts +2 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.examples.js +20 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.examples.js.map +1 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.js +39 -0
- package/dist/out-tsc/conditional-field/SpsConditionalField.js.map +1 -0
- package/dist/out-tsc/conditional-field/index.d.ts +2 -0
- package/dist/out-tsc/conditional-field/index.js +3 -0
- package/dist/out-tsc/conditional-field/index.js.map +1 -0
- package/dist/out-tsc/content-row/SpsContentRow.d.ts +22 -0
- package/dist/out-tsc/content-row/SpsContentRow.examples.d.ts +2 -0
- package/dist/out-tsc/content-row/SpsContentRow.examples.js +51 -0
- package/dist/out-tsc/content-row/SpsContentRow.examples.js.map +1 -0
- package/dist/out-tsc/content-row/SpsContentRow.js +105 -0
- package/dist/out-tsc/content-row/SpsContentRow.js.map +1 -0
- package/dist/out-tsc/content-row/SpsContentRowCol.d.ts +15 -0
- package/dist/out-tsc/content-row/SpsContentRowCol.js +57 -0
- package/dist/out-tsc/content-row/SpsContentRowCol.js.map +1 -0
- package/dist/out-tsc/content-row/SpsContentRowExpansion.d.ts +10 -0
- package/dist/out-tsc/content-row/SpsContentRowExpansion.js +38 -0
- package/dist/out-tsc/content-row/SpsContentRowExpansion.js.map +1 -0
- package/dist/out-tsc/content-row/index.d.ts +4 -0
- package/dist/out-tsc/content-row/index.js +5 -0
- package/dist/out-tsc/content-row/index.js.map +1 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.d.ts +18 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.examples.d.ts +2 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.examples.js +20 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.examples.js.map +1 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.js +82 -0
- package/dist/out-tsc/currency-input/SpsCurrencyInput.js.map +1 -0
- package/dist/out-tsc/currency-input/index.d.ts +2 -0
- package/dist/out-tsc/currency-input/index.js +3 -0
- package/dist/out-tsc/currency-input/index.js.map +1 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.d.ts +23 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.examples.d.ts +2 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.examples.js +42 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.examples.js.map +1 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.js +635 -0
- package/dist/out-tsc/dateRangePicker/SpsDateRangePicker.js.map +1 -0
- package/dist/out-tsc/dateRangePicker/index.d.ts +2 -0
- package/dist/out-tsc/dateRangePicker/index.js +3 -0
- package/dist/out-tsc/dateRangePicker/index.js.map +1 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.d.ts +19 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.examples.d.ts +2 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.examples.js +33 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.examples.js.map +1 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.js +427 -0
- package/dist/out-tsc/datepicker/SpsDatepicker.js.map +1 -0
- package/dist/out-tsc/datepicker/index.d.ts +2 -0
- package/dist/out-tsc/datepicker/index.js +3 -0
- package/dist/out-tsc/datepicker/index.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/SpsDateRangePickerV2.d.ts +21 -0
- package/dist/out-tsc/datepicker-v2/SpsDateRangePickerV2.js +213 -0
- package/dist/out-tsc/datepicker-v2/SpsDateRangePickerV2.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerCalendar.d.ts +18 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerCalendar.js +140 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerCalendar.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerPopup.d.ts +13 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerPopup.js +65 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerPopup.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerV2.d.ts +18 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerV2.js +111 -0
- package/dist/out-tsc/datepicker-v2/SpsDatepickerV2.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/index.d.ts +4 -0
- package/dist/out-tsc/datepicker-v2/index.js +5 -0
- package/dist/out-tsc/datepicker-v2/index.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/useCalendar.d.ts +2 -0
- package/dist/out-tsc/datepicker-v2/useCalendar.js +58 -0
- package/dist/out-tsc/datepicker-v2/useCalendar.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/useMoment.d.ts +3 -0
- package/dist/out-tsc/datepicker-v2/useMoment.js +24 -0
- package/dist/out-tsc/datepicker-v2/useMoment.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/utils.d.ts +23 -0
- package/dist/out-tsc/datepicker-v2/utils.js +169 -0
- package/dist/out-tsc/datepicker-v2/utils.js.map +1 -0
- package/dist/out-tsc/datepicker-v2/validation.d.ts +10 -0
- package/dist/out-tsc/datepicker-v2/validation.js +67 -0
- package/dist/out-tsc/datepicker-v2/validation.js.map +1 -0
- package/dist/out-tsc/datetime/SpsDateTime.d.ts +26 -0
- package/dist/out-tsc/datetime/SpsDateTime.examples.d.ts +2 -0
- package/dist/out-tsc/datetime/SpsDateTime.examples.js +21 -0
- package/dist/out-tsc/datetime/SpsDateTime.examples.js.map +1 -0
- package/dist/out-tsc/datetime/SpsDateTime.js +194 -0
- package/dist/out-tsc/datetime/SpsDateTime.js.map +1 -0
- package/dist/out-tsc/datetime/index.d.ts +2 -0
- package/dist/out-tsc/datetime/index.js +3 -0
- package/dist/out-tsc/datetime/index.js.map +1 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.d.ts +14 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.examples.d.ts +2 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.examples.js +47 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.examples.js.map +1 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.js +65 -0
- package/dist/out-tsc/description-list/SpsDescriptionList.js.map +1 -0
- package/dist/out-tsc/description-list/SpsDescriptionListDefinition.d.ts +11 -0
- package/dist/out-tsc/description-list/SpsDescriptionListDefinition.js +46 -0
- package/dist/out-tsc/description-list/SpsDescriptionListDefinition.js.map +1 -0
- package/dist/out-tsc/description-list/SpsDescriptionListTerm.d.ts +18 -0
- package/dist/out-tsc/description-list/SpsDescriptionListTerm.js +92 -0
- package/dist/out-tsc/description-list/SpsDescriptionListTerm.js.map +1 -0
- package/dist/out-tsc/description-list/index.d.ts +4 -0
- package/dist/out-tsc/description-list/index.js +5 -0
- package/dist/out-tsc/description-list/index.js.map +1 -0
- package/dist/out-tsc/dropdown/SpsDropdown.d.ts +24 -0
- package/dist/out-tsc/dropdown/SpsDropdown.examples.d.ts +2 -0
- package/dist/out-tsc/dropdown/SpsDropdown.examples.js +95 -0
- package/dist/out-tsc/dropdown/SpsDropdown.examples.js.map +1 -0
- package/dist/out-tsc/dropdown/SpsDropdown.js +162 -0
- package/dist/out-tsc/dropdown/SpsDropdown.js.map +1 -0
- package/dist/out-tsc/dropdown/index.d.ts +2 -0
- package/dist/out-tsc/dropdown/index.js +3 -0
- package/dist/out-tsc/dropdown/index.js.map +1 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.d.ts +12 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.examples.d.ts +2 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.examples.js +63 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.examples.js.map +1 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.js +43 -0
- package/dist/out-tsc/feedback-block/SpsFeedbackBlock.js.map +1 -0
- package/dist/out-tsc/feedback-block/index.d.ts +2 -0
- package/dist/out-tsc/feedback-block/index.js +3 -0
- package/dist/out-tsc/feedback-block/index.js.map +1 -0
- package/dist/out-tsc/fieldset/SpsFieldset.d.ts +22 -0
- package/dist/out-tsc/fieldset/SpsFieldset.examples.d.ts +2 -0
- package/dist/out-tsc/fieldset/SpsFieldset.examples.js +54 -0
- package/dist/out-tsc/fieldset/SpsFieldset.examples.js.map +1 -0
- package/dist/out-tsc/fieldset/SpsFieldset.js +99 -0
- package/dist/out-tsc/fieldset/SpsFieldset.js.map +1 -0
- package/dist/out-tsc/fieldset/index.d.ts +2 -0
- package/dist/out-tsc/fieldset/index.js +3 -0
- package/dist/out-tsc/fieldset/index.js.map +1 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.d.ts +10 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.examples.d.ts +2 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.examples.js +31 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.examples.js.map +1 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.js +37 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanel.js.map +1 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelCap.d.ts +11 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelCap.js +48 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelCap.js.map +1 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelFilterBox.d.ts +16 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelFilterBox.js +49 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelFilterBox.js.map +1 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelSection.d.ts +16 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelSection.js +84 -0
- package/dist/out-tsc/filter-panel/SpsFilterPanelSection.js.map +1 -0
- package/dist/out-tsc/filter-panel/index.d.ts +5 -0
- package/dist/out-tsc/filter-panel/index.js +6 -0
- package/dist/out-tsc/filter-panel/index.js.map +1 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTile.d.ts +15 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTile.js +66 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTile.js.map +1 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.d.ts +10 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.examples.d.ts +2 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.examples.js +17 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.examples.js.map +1 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.js +38 -0
- package/dist/out-tsc/filter-tile-list/SpsFilterTileList.js.map +1 -0
- package/dist/out-tsc/filter-tile-list/index.d.ts +3 -0
- package/dist/out-tsc/filter-tile-list/index.js +4 -0
- package/dist/out-tsc/filter-tile-list/index.js.map +1 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.d.ts +13 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.examples.d.ts +2 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.examples.js +19 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.examples.js.map +1 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.js +80 -0
- package/dist/out-tsc/focused-task/SpsFocusedTask.js.map +1 -0
- package/dist/out-tsc/focused-task/SpsFocusedTaskActions.d.ts +10 -0
- package/dist/out-tsc/focused-task/SpsFocusedTaskActions.js +40 -0
- package/dist/out-tsc/focused-task/SpsFocusedTaskActions.js.map +1 -0
- package/dist/out-tsc/focused-task/index.d.ts +3 -0
- package/dist/out-tsc/focused-task/index.js +4 -0
- package/dist/out-tsc/focused-task/index.js.map +1 -0
- package/dist/out-tsc/form/AddRemoveFormRows.examples.d.ts +18 -0
- package/dist/out-tsc/form/AddRemoveFormRows.examples.js +25 -0
- package/dist/out-tsc/form/AddRemoveFormRows.examples.js.map +1 -0
- package/dist/out-tsc/form/SpsForm.d.ts +24 -0
- package/dist/out-tsc/form/SpsForm.examples.d.ts +41 -0
- package/dist/out-tsc/form/SpsForm.examples.js +49 -0
- package/dist/out-tsc/form/SpsForm.examples.js.map +1 -0
- package/dist/out-tsc/form/SpsForm.js +51 -0
- package/dist/out-tsc/form/SpsForm.js.map +1 -0
- package/dist/out-tsc/form/SpsFormComponentWrapper.d.ts +19 -0
- package/dist/out-tsc/form/SpsFormComponentWrapper.js +69 -0
- package/dist/out-tsc/form/SpsFormComponentWrapper.js.map +1 -0
- package/dist/out-tsc/form/hooks/SpsAbstractControl.interface.d.ts +24 -0
- package/dist/out-tsc/form/hooks/SpsAbstractControl.interface.js +2 -0
- package/dist/out-tsc/form/hooks/SpsAbstractControl.interface.js.map +1 -0
- package/dist/out-tsc/form/hooks/SpsControlSet.interface.d.ts +7 -0
- package/dist/out-tsc/form/hooks/SpsControlSet.interface.js +24 -0
- package/dist/out-tsc/form/hooks/SpsControlSet.interface.js.map +1 -0
- package/dist/out-tsc/form/hooks/formArray.d.ts +12 -0
- package/dist/out-tsc/form/hooks/formArray.js +211 -0
- package/dist/out-tsc/form/hooks/formArray.js.map +1 -0
- package/dist/out-tsc/form/hooks/formControl.d.ts +9 -0
- package/dist/out-tsc/form/hooks/formControl.js +68 -0
- package/dist/out-tsc/form/hooks/formControl.js.map +1 -0
- package/dist/out-tsc/form/hooks/formGroup.d.ts +10 -0
- package/dist/out-tsc/form/hooks/formGroup.js +182 -0
- package/dist/out-tsc/form/hooks/formGroup.js.map +1 -0
- package/dist/out-tsc/form/hooks/useForm.d.ts +2 -0
- package/dist/out-tsc/form/hooks/useForm.js +98 -0
- package/dist/out-tsc/form/hooks/useForm.js.map +1 -0
- package/dist/out-tsc/form/hooks/useFormControlId.d.ts +4 -0
- package/dist/out-tsc/form/hooks/useFormControlId.js +18 -0
- package/dist/out-tsc/form/hooks/useFormControlId.js.map +1 -0
- package/dist/out-tsc/form/hooks/useServerSideValidation.d.ts +3 -0
- package/dist/out-tsc/form/hooks/useServerSideValidation.js +37 -0
- package/dist/out-tsc/form/hooks/useServerSideValidation.js.map +1 -0
- package/dist/out-tsc/form/hooks/useSpsForm.d.ts +77 -0
- package/dist/out-tsc/form/hooks/useSpsForm.js +652 -0
- package/dist/out-tsc/form/hooks/useSpsForm.js.map +1 -0
- package/dist/out-tsc/form/index.d.ts +15 -0
- package/dist/out-tsc/form/index.js +16 -0
- package/dist/out-tsc/form/index.js.map +1 -0
- package/dist/out-tsc/form/validation/SpsValidators.d.ts +16 -0
- package/dist/out-tsc/form/validation/SpsValidators.js +84 -0
- package/dist/out-tsc/form/validation/SpsValidators.js.map +1 -0
- package/dist/out-tsc/form/validation/types.d.ts +7 -0
- package/dist/out-tsc/form/validation/types.js +4 -0
- package/dist/out-tsc/form/validation/types.js.map +1 -0
- package/dist/out-tsc/form/validation/validate.d.ts +2 -0
- package/dist/out-tsc/form/validation/validate.js +6 -0
- package/dist/out-tsc/form/validation/validate.js.map +1 -0
- package/dist/out-tsc/growler/SpsGrowler.d.ts +17 -0
- package/dist/out-tsc/growler/SpsGrowler.examples.d.ts +2 -0
- package/dist/out-tsc/growler/SpsGrowler.examples.js +122 -0
- package/dist/out-tsc/growler/SpsGrowler.examples.js.map +1 -0
- package/dist/out-tsc/growler/SpsGrowler.js +147 -0
- package/dist/out-tsc/growler/SpsGrowler.js.map +1 -0
- package/dist/out-tsc/growler/index.d.ts +3 -0
- package/dist/out-tsc/growler/index.js +4 -0
- package/dist/out-tsc/growler/index.js.map +1 -0
- package/dist/out-tsc/growler/useGrowlers.d.ts +12 -0
- package/dist/out-tsc/growler/useGrowlers.js +59 -0
- package/dist/out-tsc/growler/useGrowlers.js.map +1 -0
- package/dist/out-tsc/i18n.d.ts +3 -0
- package/dist/out-tsc/i18n.js +4 -0
- package/dist/out-tsc/i18n.js.map +1 -0
- package/dist/out-tsc/icon/SpsIcon.d.ts +13 -0
- package/dist/out-tsc/icon/SpsIcon.js +47 -0
- package/dist/out-tsc/icon/SpsIcon.js.map +1 -0
- package/dist/out-tsc/icon/index.d.ts +1 -0
- package/dist/out-tsc/icon/index.js +2 -0
- package/dist/out-tsc/icon/index.js.map +1 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.d.ts +15 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.examples.d.ts +2 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.examples.js +18 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.examples.js.map +1 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.js +113 -0
- package/dist/out-tsc/incrementor/SpsIncrementor.js.map +1 -0
- package/dist/out-tsc/incrementor/index.d.ts +2 -0
- package/dist/out-tsc/incrementor/index.js +3 -0
- package/dist/out-tsc/incrementor/index.js.map +1 -0
- package/dist/out-tsc/index.d.ts +69 -0
- package/dist/out-tsc/index.js +70 -0
- package/dist/out-tsc/index.js.map +1 -0
- package/dist/out-tsc/input-group/SpsInputGroup.d.ts +17 -0
- package/dist/out-tsc/input-group/SpsInputGroup.js +74 -0
- package/dist/out-tsc/input-group/SpsInputGroup.js.map +1 -0
- package/dist/out-tsc/input-group/index.d.ts +1 -0
- package/dist/out-tsc/input-group/index.js +2 -0
- package/dist/out-tsc/input-group/index.js.map +1 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.d.ts +18 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.examples.d.ts +2 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.examples.js +59 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.examples.js.map +1 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.js +91 -0
- package/dist/out-tsc/insight-tile/SpsInsightTile.js.map +1 -0
- package/dist/out-tsc/insight-tile/SpsInsights.d.ts +10 -0
- package/dist/out-tsc/insight-tile/SpsInsights.js +19 -0
- package/dist/out-tsc/insight-tile/SpsInsights.js.map +1 -0
- package/dist/out-tsc/insight-tile/index.d.ts +2 -0
- package/dist/out-tsc/insight-tile/index.js +3 -0
- package/dist/out-tsc/insight-tile/index.js.map +1 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.d.ts +11 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.examples.d.ts +2 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.examples.js +25 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.examples.js.map +1 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.js +40 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueList.js.map +1 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueListItem.d.ts +13 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueListItem.js +44 -0
- package/dist/out-tsc/key-value-list/SpsKeyValueListItem.js.map +1 -0
- package/dist/out-tsc/key-value-list/index.d.ts +3 -0
- package/dist/out-tsc/key-value-list/index.js +4 -0
- package/dist/out-tsc/key-value-list/index.js.map +1 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.d.ts +16 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.examples.d.ts +2 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.examples.js +33 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.examples.js.map +1 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.js +56 -0
- package/dist/out-tsc/key-value-tag/SpsKeyValueTag.js.map +1 -0
- package/dist/out-tsc/key-value-tag/index.d.ts +2 -0
- package/dist/out-tsc/key-value-tag/index.js +3 -0
- package/dist/out-tsc/key-value-tag/index.js.map +1 -0
- package/dist/out-tsc/label/SpsLabel.d.ts +20 -0
- package/dist/out-tsc/label/SpsLabel.examples.d.ts +2 -0
- package/dist/out-tsc/label/SpsLabel.examples.js +65 -0
- package/dist/out-tsc/label/SpsLabel.examples.js.map +1 -0
- package/dist/out-tsc/label/SpsLabel.js +223 -0
- package/dist/out-tsc/label/SpsLabel.js.map +1 -0
- package/dist/out-tsc/label/index.d.ts +2 -0
- package/dist/out-tsc/label/index.js +3 -0
- package/dist/out-tsc/label/index.js.map +1 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.d.ts +12 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.examples.d.ts +2 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.examples.js +61 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.examples.js.map +1 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.js +59 -0
- package/dist/out-tsc/list-action-bar/SpsListActionBar.js.map +1 -0
- package/dist/out-tsc/list-action-bar/index.d.ts +2 -0
- package/dist/out-tsc/list-action-bar/index.js +3 -0
- package/dist/out-tsc/list-action-bar/index.js.map +1 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.d.ts +25 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.examples.d.ts +3 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.examples.js +404 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.examples.js.map +1 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.js +168 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.js.map +1 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearch.d.ts +12 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearch.js +35 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearch.js.map +1 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearchInfo.d.ts +10 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearchInfo.js +25 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSearchInfo.js.map +1 -0
- package/dist/out-tsc/list-toolbar/index.d.ts +4 -0
- package/dist/out-tsc/list-toolbar/index.js +5 -0
- package/dist/out-tsc/list-toolbar/index.js.map +1 -0
- package/dist/out-tsc/manifest.d.ts +2 -0
- package/dist/out-tsc/manifest.js +462 -0
- package/dist/out-tsc/manifest.js.map +1 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.d.ts +13 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.examples.d.ts +2 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.examples.js +49 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.examples.js.map +1 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.js +44 -0
- package/dist/out-tsc/micro-block/SpsMicroBlock.js.map +1 -0
- package/dist/out-tsc/micro-block/index.d.ts +2 -0
- package/dist/out-tsc/micro-block/index.js +3 -0
- package/dist/out-tsc/micro-block/index.js.map +1 -0
- package/dist/out-tsc/modal/SpsModal.d.ts +25 -0
- package/dist/out-tsc/modal/SpsModal.examples.d.ts +2 -0
- package/dist/out-tsc/modal/SpsModal.examples.js +138 -0
- package/dist/out-tsc/modal/SpsModal.examples.js.map +1 -0
- package/dist/out-tsc/modal/SpsModal.js +193 -0
- package/dist/out-tsc/modal/SpsModal.js.map +1 -0
- package/dist/out-tsc/modal/SpsModalAction.d.ts +18 -0
- package/dist/out-tsc/modal/SpsModalAction.js +73 -0
- package/dist/out-tsc/modal/SpsModalAction.js.map +1 -0
- package/dist/out-tsc/modal/SpsModalBody.d.ts +10 -0
- package/dist/out-tsc/modal/SpsModalBody.js +41 -0
- package/dist/out-tsc/modal/SpsModalBody.js.map +1 -0
- package/dist/out-tsc/modal/SpsModalFooter.d.ts +16 -0
- package/dist/out-tsc/modal/SpsModalFooter.js +48 -0
- package/dist/out-tsc/modal/SpsModalFooter.js.map +1 -0
- package/dist/out-tsc/modal/SpsModalHeader.d.ts +11 -0
- package/dist/out-tsc/modal/SpsModalHeader.js +45 -0
- package/dist/out-tsc/modal/SpsModalHeader.js.map +1 -0
- package/dist/out-tsc/modal/SpsModalOverlay.d.ts +12 -0
- package/dist/out-tsc/modal/SpsModalOverlay.js +53 -0
- package/dist/out-tsc/modal/SpsModalOverlay.js.map +1 -0
- package/dist/out-tsc/modal/index.d.ts +2 -0
- package/dist/out-tsc/modal/index.js +5 -0
- package/dist/out-tsc/modal/index.js.map +1 -0
- package/dist/out-tsc/modal-v2/SpsModalV2.d.ts +18 -0
- package/dist/out-tsc/modal-v2/SpsModalV2.js +146 -0
- package/dist/out-tsc/modal-v2/SpsModalV2.js.map +1 -0
- package/dist/out-tsc/modal-v2/index.d.ts +1 -0
- package/dist/out-tsc/modal-v2/index.js +2 -0
- package/dist/out-tsc/modal-v2/index.js.map +1 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.d.ts +34 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.examples.d.ts +2 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.examples.js +33 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.examples.js.map +1 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.js +229 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.js.map +1 -0
- package/dist/out-tsc/multi-select/index.d.ts +2 -0
- package/dist/out-tsc/multi-select/index.js +3 -0
- package/dist/out-tsc/multi-select/index.js.map +1 -0
- package/dist/out-tsc/option-list/SpsOptionList.d.ts +3 -0
- package/dist/out-tsc/option-list/SpsOptionList.js +412 -0
- package/dist/out-tsc/option-list/SpsOptionList.js.map +1 -0
- package/dist/out-tsc/option-list/SpsOptionListProps.d.ts +75 -0
- package/dist/out-tsc/option-list/SpsOptionListProps.js +49 -0
- package/dist/out-tsc/option-list/SpsOptionListProps.js.map +1 -0
- package/dist/out-tsc/option-list/index.d.ts +1 -0
- package/dist/out-tsc/option-list/index.js +2 -0
- package/dist/out-tsc/option-list/index.js.map +1 -0
- package/dist/out-tsc/option-list/useOptionListOptions.d.ts +8 -0
- package/dist/out-tsc/option-list/useOptionListOptions.js +163 -0
- package/dist/out-tsc/option-list/useOptionListOptions.js.map +1 -0
- package/dist/out-tsc/option-list/useOptionListSearch.d.ts +13 -0
- package/dist/out-tsc/option-list/useOptionListSearch.js +74 -0
- package/dist/out-tsc/option-list/useOptionListSearch.js.map +1 -0
- package/dist/out-tsc/option-list/useSpsAction.d.ts +2 -0
- package/dist/out-tsc/option-list/useSpsAction.js +40 -0
- package/dist/out-tsc/option-list/useSpsAction.js.map +1 -0
- package/dist/out-tsc/page-title/SpsPageSubtitle.d.ts +10 -0
- package/dist/out-tsc/page-title/SpsPageSubtitle.js +38 -0
- package/dist/out-tsc/page-title/SpsPageSubtitle.js.map +1 -0
- package/dist/out-tsc/page-title/SpsPageTitle.d.ts +10 -0
- package/dist/out-tsc/page-title/SpsPageTitle.examples.d.ts +2 -0
- package/dist/out-tsc/page-title/SpsPageTitle.examples.js +41 -0
- package/dist/out-tsc/page-title/SpsPageTitle.examples.js.map +1 -0
- package/dist/out-tsc/page-title/SpsPageTitle.js +50 -0
- package/dist/out-tsc/page-title/SpsPageTitle.js.map +1 -0
- package/dist/out-tsc/page-title/index.d.ts +3 -0
- package/dist/out-tsc/page-title/index.js +4 -0
- package/dist/out-tsc/page-title/index.js.map +1 -0
- package/dist/out-tsc/pagination/SpsPageSelector.d.ts +14 -0
- package/dist/out-tsc/pagination/SpsPageSelector.js +99 -0
- package/dist/out-tsc/pagination/SpsPageSelector.js.map +1 -0
- package/dist/out-tsc/pagination/SpsPagination.d.ts +16 -0
- package/dist/out-tsc/pagination/SpsPagination.examples.d.ts +2 -0
- package/dist/out-tsc/pagination/SpsPagination.examples.js +78 -0
- package/dist/out-tsc/pagination/SpsPagination.examples.js.map +1 -0
- package/dist/out-tsc/pagination/SpsPagination.js +138 -0
- package/dist/out-tsc/pagination/SpsPagination.js.map +1 -0
- package/dist/out-tsc/pagination/index.d.ts +3 -0
- package/dist/out-tsc/pagination/index.js +4 -0
- package/dist/out-tsc/pagination/index.js.map +1 -0
- package/dist/out-tsc/product-bar/SpsProductBar.d.ts +19 -0
- package/dist/out-tsc/product-bar/SpsProductBar.examples.d.ts +2 -0
- package/dist/out-tsc/product-bar/SpsProductBar.examples.js +42 -0
- package/dist/out-tsc/product-bar/SpsProductBar.examples.js.map +1 -0
- package/dist/out-tsc/product-bar/SpsProductBar.js +90 -0
- package/dist/out-tsc/product-bar/SpsProductBar.js.map +1 -0
- package/dist/out-tsc/product-bar/SpsProductBarTab.d.ts +6 -0
- package/dist/out-tsc/product-bar/SpsProductBarTab.js +38 -0
- package/dist/out-tsc/product-bar/SpsProductBarTab.js.map +1 -0
- package/dist/out-tsc/product-bar/index.d.ts +3 -0
- package/dist/out-tsc/product-bar/index.js +4 -0
- package/dist/out-tsc/product-bar/index.js.map +1 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.d.ts +15 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.examples.d.ts +27 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.examples.js +79 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.examples.js.map +1 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.js +59 -0
- package/dist/out-tsc/progress-bar/SpsProgressBar.js.map +1 -0
- package/dist/out-tsc/progress-bar/index.d.ts +2 -0
- package/dist/out-tsc/progress-bar/index.js +3 -0
- package/dist/out-tsc/progress-bar/index.js.map +1 -0
- package/dist/out-tsc/progress-ring/SpsProgressRing.d.ts +13 -0
- package/dist/out-tsc/progress-ring/SpsProgressRing.js +37 -0
- package/dist/out-tsc/progress-ring/SpsProgressRing.js.map +1 -0
- package/dist/out-tsc/progress-ring/index.d.ts +1 -0
- package/dist/out-tsc/progress-ring/index.js +2 -0
- package/dist/out-tsc/progress-ring/index.js.map +1 -0
- package/dist/out-tsc/prop-types.d.ts +23 -0
- package/dist/out-tsc/prop-types.js +26 -0
- package/dist/out-tsc/prop-types.js.map +1 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.d.ts +23 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.examples.d.ts +2 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.examples.js +36 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.examples.js.map +1 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.js +64 -0
- package/dist/out-tsc/radio-button/SpsRadioButton.js.map +1 -0
- package/dist/out-tsc/radio-button/index.d.ts +2 -0
- package/dist/out-tsc/radio-button/index.js +3 -0
- package/dist/out-tsc/radio-button/index.js.map +1 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.d.ts +11 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.examples.d.ts +14 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.examples.js +21 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.examples.js.map +1 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.js +27 -0
- package/dist/out-tsc/scrollable-container/SpsScrollableContainer.js.map +1 -0
- package/dist/out-tsc/scrollable-container/index.d.ts +2 -0
- package/dist/out-tsc/scrollable-container/index.js +3 -0
- package/dist/out-tsc/scrollable-container/index.js.map +1 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.d.ts +13 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.examples.d.ts +2 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.examples.js +36 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.examples.js.map +1 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.js +74 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBar.js.map +1 -0
- package/dist/out-tsc/search-results-bar/index.d.ts +2 -0
- package/dist/out-tsc/search-results-bar/index.js +3 -0
- package/dist/out-tsc/search-results-bar/index.js.map +1 -0
- package/dist/out-tsc/select/SpsSelect.d.ts +37 -0
- package/dist/out-tsc/select/SpsSelect.examples.d.ts +2 -0
- package/dist/out-tsc/select/SpsSelect.examples.js +77 -0
- package/dist/out-tsc/select/SpsSelect.examples.js.map +1 -0
- package/dist/out-tsc/select/SpsSelect.js +205 -0
- package/dist/out-tsc/select/SpsSelect.js.map +1 -0
- package/dist/out-tsc/select/index.d.ts +2 -0
- package/dist/out-tsc/select/index.js +3 -0
- package/dist/out-tsc/select/index.js.map +1 -0
- package/dist/out-tsc/side-nav/SpsSideNav.d.ts +38 -0
- package/dist/out-tsc/side-nav/SpsSideNav.examples.d.ts +2 -0
- package/dist/out-tsc/side-nav/SpsSideNav.examples.js +76 -0
- package/dist/out-tsc/side-nav/SpsSideNav.examples.js.map +1 -0
- package/dist/out-tsc/side-nav/SpsSideNav.js +128 -0
- package/dist/out-tsc/side-nav/SpsSideNav.js.map +1 -0
- package/dist/out-tsc/side-nav/SpsSideNavBranch.d.ts +9 -0
- package/dist/out-tsc/side-nav/SpsSideNavBranch.js +68 -0
- package/dist/out-tsc/side-nav/SpsSideNavBranch.js.map +1 -0
- package/dist/out-tsc/side-nav/index.d.ts +2 -0
- package/dist/out-tsc/side-nav/index.js +3 -0
- package/dist/out-tsc/side-nav/index.js.map +1 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.d.ts +11 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.examples.d.ts +2 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.examples.js +16 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.examples.js.map +1 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.js +45 -0
- package/dist/out-tsc/slack-link/SpsSlackLink.js.map +1 -0
- package/dist/out-tsc/slack-link/index.d.ts +2 -0
- package/dist/out-tsc/slack-link/index.js +3 -0
- package/dist/out-tsc/slack-link/index.js.map +1 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.d.ts +13 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.examples.d.ts +2 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.examples.js +17 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.examples.js.map +1 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.js +51 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeader.js.map +1 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeaderCell.d.ts +17 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeaderCell.js +71 -0
- package/dist/out-tsc/sorting-header/SpsSortingHeaderCell.js.map +1 -0
- package/dist/out-tsc/sorting-header/index.d.ts +3 -0
- package/dist/out-tsc/sorting-header/index.js +4 -0
- package/dist/out-tsc/sorting-header/index.js.map +1 -0
- package/dist/out-tsc/spinner/SpsSpinner.d.ts +14 -0
- package/dist/out-tsc/spinner/SpsSpinner.examples.d.ts +2 -0
- package/dist/out-tsc/spinner/SpsSpinner.examples.js +22 -0
- package/dist/out-tsc/spinner/SpsSpinner.examples.js.map +1 -0
- package/dist/out-tsc/spinner/SpsSpinner.js +46 -0
- package/dist/out-tsc/spinner/SpsSpinner.js.map +1 -0
- package/dist/out-tsc/spinner/index.d.ts +2 -0
- package/dist/out-tsc/spinner/index.js +3 -0
- package/dist/out-tsc/spinner/index.js.map +1 -0
- package/dist/out-tsc/split-button/SpsSplitButton.d.ts +18 -0
- package/dist/out-tsc/split-button/SpsSplitButton.examples.d.ts +2 -0
- package/dist/out-tsc/split-button/SpsSplitButton.examples.js +39 -0
- package/dist/out-tsc/split-button/SpsSplitButton.examples.js.map +1 -0
- package/dist/out-tsc/split-button/SpsSplitButton.js +76 -0
- package/dist/out-tsc/split-button/SpsSplitButton.js.map +1 -0
- package/dist/out-tsc/split-button/index.d.ts +2 -0
- package/dist/out-tsc/split-button/index.js +3 -0
- package/dist/out-tsc/split-button/index.js.map +1 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.d.ts +25 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.examples.d.ts +24 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.examples.js +78 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.examples.js.map +1 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.js +54 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.js.map +1 -0
- package/dist/out-tsc/stepped-progress-bar/index.d.ts +2 -0
- package/dist/out-tsc/stepped-progress-bar/index.js +3 -0
- package/dist/out-tsc/stepped-progress-bar/index.js.map +1 -0
- package/dist/out-tsc/summary-list/SpsSummaryList.examples.d.ts +2 -0
- package/dist/out-tsc/summary-list/SpsSummaryList.examples.js +44 -0
- package/dist/out-tsc/summary-list/SpsSummaryList.examples.js.map +1 -0
- package/dist/out-tsc/summary-list/SpsSummaryListColumn.d.ts +14 -0
- package/dist/out-tsc/summary-list/SpsSummaryListColumn.js +43 -0
- package/dist/out-tsc/summary-list/SpsSummaryListColumn.js.map +1 -0
- package/dist/out-tsc/summary-list/SpsSummaryListExpansion.d.ts +10 -0
- package/dist/out-tsc/summary-list/SpsSummaryListExpansion.js +38 -0
- package/dist/out-tsc/summary-list/SpsSummaryListExpansion.js.map +1 -0
- package/dist/out-tsc/summary-list/SpsSummaryListRow.d.ts +13 -0
- package/dist/out-tsc/summary-list/SpsSummaryListRow.js +98 -0
- package/dist/out-tsc/summary-list/SpsSummaryListRow.js.map +1 -0
- package/dist/out-tsc/summary-list/index.d.ts +4 -0
- package/dist/out-tsc/summary-list/index.js +5 -0
- package/dist/out-tsc/summary-list/index.js.map +1 -0
- package/dist/out-tsc/table/SpsTable.d.ts +14 -0
- package/dist/out-tsc/table/SpsTable.examples.d.ts +2 -0
- package/dist/out-tsc/table/SpsTable.examples.js +138 -0
- package/dist/out-tsc/table/SpsTable.examples.js.map +1 -0
- package/dist/out-tsc/table/SpsTable.js +88 -0
- package/dist/out-tsc/table/SpsTable.js.map +1 -0
- package/dist/out-tsc/table/SpsTableBody.d.ts +11 -0
- package/dist/out-tsc/table/SpsTableBody.js +46 -0
- package/dist/out-tsc/table/SpsTableBody.js.map +1 -0
- package/dist/out-tsc/table/SpsTableCell.d.ts +15 -0
- package/dist/out-tsc/table/SpsTableCell.js +57 -0
- package/dist/out-tsc/table/SpsTableCell.js.map +1 -0
- package/dist/out-tsc/table/SpsTableHead.d.ts +15 -0
- package/dist/out-tsc/table/SpsTableHead.js +59 -0
- package/dist/out-tsc/table/SpsTableHead.js.map +1 -0
- package/dist/out-tsc/table/SpsTableHeader.d.ts +17 -0
- package/dist/out-tsc/table/SpsTableHeader.js +91 -0
- package/dist/out-tsc/table/SpsTableHeader.js.map +1 -0
- package/dist/out-tsc/table/SpsTableRow.d.ts +14 -0
- package/dist/out-tsc/table/SpsTableRow.js +59 -0
- package/dist/out-tsc/table/SpsTableRow.js.map +1 -0
- package/dist/out-tsc/table/index.d.ts +7 -0
- package/dist/out-tsc/table/index.js +8 -0
- package/dist/out-tsc/table/index.js.map +1 -0
- package/dist/out-tsc/table/usePinnedStyles.d.ts +4 -0
- package/dist/out-tsc/table/usePinnedStyles.js +192 -0
- package/dist/out-tsc/table/usePinnedStyles.js.map +1 -0
- package/dist/out-tsc/tabs/SpsTabs.d.ts +14 -0
- package/dist/out-tsc/tabs/SpsTabs.js +77 -0
- package/dist/out-tsc/tabs/SpsTabs.js.map +1 -0
- package/dist/out-tsc/tag/SpsTag.d.ts +13 -0
- package/dist/out-tsc/tag/SpsTag.examples.d.ts +2 -0
- package/dist/out-tsc/tag/SpsTag.examples.js +25 -0
- package/dist/out-tsc/tag/SpsTag.examples.js.map +1 -0
- package/dist/out-tsc/tag/SpsTag.js +47 -0
- package/dist/out-tsc/tag/SpsTag.js.map +1 -0
- package/dist/out-tsc/tag/index.d.ts +2 -0
- package/dist/out-tsc/tag/index.js +3 -0
- package/dist/out-tsc/tag/index.js.map +1 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.d.ts +36 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.examples.d.ts +2 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.examples.js +45 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.examples.js.map +1 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.js +217 -0
- package/dist/out-tsc/task-queue/SpsTaskQueue.js.map +1 -0
- package/dist/out-tsc/task-queue/index.d.ts +2 -0
- package/dist/out-tsc/task-queue/index.js +3 -0
- package/dist/out-tsc/task-queue/index.js.map +1 -0
- package/dist/out-tsc/test-util.d.ts +2 -0
- package/dist/out-tsc/test-util.js +54 -0
- package/dist/out-tsc/test-util.js.map +1 -0
- package/dist/out-tsc/text-input/SpsTextInput.d.ts +22 -0
- package/dist/out-tsc/text-input/SpsTextInput.examples.d.ts +2 -0
- package/dist/out-tsc/text-input/SpsTextInput.examples.js +45 -0
- package/dist/out-tsc/text-input/SpsTextInput.examples.js.map +1 -0
- package/dist/out-tsc/text-input/SpsTextInput.js +73 -0
- package/dist/out-tsc/text-input/SpsTextInput.js.map +1 -0
- package/dist/out-tsc/text-input/index.d.ts +2 -0
- package/dist/out-tsc/text-input/index.js +3 -0
- package/dist/out-tsc/text-input/index.js.map +1 -0
- package/dist/out-tsc/textarea/SpsTextarea.d.ts +22 -0
- package/dist/out-tsc/textarea/SpsTextarea.examples.d.ts +2 -0
- package/dist/out-tsc/textarea/SpsTextarea.examples.js +36 -0
- package/dist/out-tsc/textarea/SpsTextarea.examples.js.map +1 -0
- package/dist/out-tsc/textarea/SpsTextarea.js +71 -0
- package/dist/out-tsc/textarea/SpsTextarea.js.map +1 -0
- package/dist/out-tsc/textarea/index.d.ts +2 -0
- package/dist/out-tsc/textarea/index.js +3 -0
- package/dist/out-tsc/textarea/index.js.map +1 -0
- package/dist/out-tsc/tile-list/SpsTile.d.ts +16 -0
- package/dist/out-tsc/tile-list/SpsTile.js +60 -0
- package/dist/out-tsc/tile-list/SpsTile.js.map +1 -0
- package/dist/out-tsc/tile-list/SpsTileList.d.ts +10 -0
- package/dist/out-tsc/tile-list/SpsTileList.examples.d.ts +2 -0
- package/dist/out-tsc/tile-list/SpsTileList.examples.js +36 -0
- package/dist/out-tsc/tile-list/SpsTileList.examples.js.map +1 -0
- package/dist/out-tsc/tile-list/SpsTileList.js +38 -0
- package/dist/out-tsc/tile-list/SpsTileList.js.map +1 -0
- package/dist/out-tsc/tile-list/index.d.ts +3 -0
- package/dist/out-tsc/tile-list/index.js +4 -0
- package/dist/out-tsc/tile-list/index.js.map +1 -0
- package/dist/out-tsc/toggle/SpsToggle.d.ts +27 -0
- package/dist/out-tsc/toggle/SpsToggle.examples.d.ts +2 -0
- package/dist/out-tsc/toggle/SpsToggle.examples.js +37 -0
- package/dist/out-tsc/toggle/SpsToggle.examples.js.map +1 -0
- package/dist/out-tsc/toggle/SpsToggle.js +95 -0
- package/dist/out-tsc/toggle/SpsToggle.js.map +1 -0
- package/dist/out-tsc/toggle/index.d.ts +2 -0
- package/dist/out-tsc/toggle/index.js +3 -0
- package/dist/out-tsc/toggle/index.js.map +1 -0
- package/dist/out-tsc/tooltip/SpsTooltip.d.ts +29 -0
- package/dist/out-tsc/tooltip/SpsTooltip.examples.d.ts +2 -0
- package/dist/out-tsc/tooltip/SpsTooltip.examples.js +119 -0
- package/dist/out-tsc/tooltip/SpsTooltip.examples.js.map +1 -0
- package/dist/out-tsc/tooltip/SpsTooltip.js +285 -0
- package/dist/out-tsc/tooltip/SpsTooltip.js.map +1 -0
- package/dist/out-tsc/tooltip/SpsTooltipTitle.d.ts +13 -0
- package/dist/out-tsc/tooltip/SpsTooltipTitle.js +32 -0
- package/dist/out-tsc/tooltip/SpsTooltipTitle.js.map +1 -0
- package/dist/out-tsc/tooltip/index.d.ts +3 -0
- package/dist/out-tsc/tooltip/index.js +4 -0
- package/dist/out-tsc/tooltip/index.js.map +1 -0
- package/dist/out-tsc/utils/FauxChangeEvent.d.ts +20 -0
- package/dist/out-tsc/utils/FauxChangeEvent.js +83 -0
- package/dist/out-tsc/utils/FauxChangeEvent.js.map +1 -0
- package/dist/out-tsc/utils/contentOf.d.ts +2 -0
- package/dist/out-tsc/utils/contentOf.js +6 -0
- package/dist/out-tsc/utils/contentOf.js.map +1 -0
- package/dist/out-tsc/utils/getPosition.d.ts +11 -0
- package/dist/out-tsc/utils/getPosition.js +181 -0
- package/dist/out-tsc/utils/getPosition.js.map +1 -0
- package/dist/out-tsc/utils/getScrollParent.d.ts +1 -0
- package/dist/out-tsc/utils/getScrollParent.js +28 -0
- package/dist/out-tsc/utils/getScrollParent.js.map +1 -0
- package/dist/out-tsc/utils/index.d.ts +11 -0
- package/dist/out-tsc/utils/index.js +12 -0
- package/dist/out-tsc/utils/index.js.map +1 -0
- package/dist/out-tsc/utils/selectChildren.d.ts +5 -0
- package/dist/out-tsc/utils/selectChildren.js +72 -0
- package/dist/out-tsc/utils/selectChildren.js.map +1 -0
- package/dist/out-tsc/utils/useCheckDeprecatedProps.d.ts +2 -0
- package/dist/out-tsc/utils/useCheckDeprecatedProps.js +35 -0
- package/dist/out-tsc/utils/useCheckDeprecatedProps.js.map +1 -0
- package/dist/out-tsc/utils/useDidUpdateEffect.d.ts +2 -0
- package/dist/out-tsc/utils/useDidUpdateEffect.js +11 -0
- package/dist/out-tsc/utils/useDidUpdateEffect.js.map +1 -0
- package/dist/out-tsc/utils/useDocumentEventListener.d.ts +1 -0
- package/dist/out-tsc/utils/useDocumentEventListener.js +39 -0
- package/dist/out-tsc/utils/useDocumentEventListener.js.map +1 -0
- package/dist/out-tsc/utils/useElementId.d.ts +2 -0
- package/dist/out-tsc/utils/useElementId.js +6 -0
- package/dist/out-tsc/utils/useElementId.js.map +1 -0
- package/dist/out-tsc/utils/useInputPopup.d.ts +6 -0
- package/dist/out-tsc/utils/useInputPopup.js +52 -0
- package/dist/out-tsc/utils/useInputPopup.js.map +1 -0
- package/dist/out-tsc/utils/usePatchReducer.d.ts +2 -0
- package/dist/out-tsc/utils/usePatchReducer.js +19 -0
- package/dist/out-tsc/utils/usePatchReducer.js.map +1 -0
- package/dist/out-tsc/utils/usePortal.d.ts +6 -0
- package/dist/out-tsc/utils/usePortal.js +57 -0
- package/dist/out-tsc/utils/usePortal.js.map +1 -0
- package/dist/out-tsc/vertical-rule/SpsVerticalRule.d.ts +11 -0
- package/dist/out-tsc/vertical-rule/SpsVerticalRule.js +46 -0
- package/dist/out-tsc/vertical-rule/SpsVerticalRule.js.map +1 -0
- package/dist/out-tsc/vertical-rule/index.d.ts +1 -0
- package/dist/out-tsc/vertical-rule/index.js +2 -0
- package/dist/out-tsc/vertical-rule/index.js.map +1 -0
- package/dist/out-tsc/wizard/SpsWizard.examples.d.ts +2 -0
- package/dist/out-tsc/wizard/SpsWizard.examples.js +31 -0
- package/dist/out-tsc/wizard/SpsWizard.examples.js.map +1 -0
- package/dist/out-tsc/wizard/SpsWizardSidebar.d.ts +23 -0
- package/dist/out-tsc/wizard/SpsWizardSidebar.js +44 -0
- package/dist/out-tsc/wizard/SpsWizardSidebar.js.map +1 -0
- package/dist/out-tsc/wizard/SpsWizardSubstep.d.ts +14 -0
- package/dist/out-tsc/wizard/SpsWizardSubstep.js +37 -0
- package/dist/out-tsc/wizard/SpsWizardSubstep.js.map +1 -0
- package/dist/out-tsc/wizard/index.d.ts +3 -0
- package/dist/out-tsc/wizard/index.js +4 -0
- package/dist/out-tsc/wizard/index.js.map +1 -0
- package/dist/out-tsc/workflow/SpsWorkflow.d.ts +14 -0
- package/dist/out-tsc/workflow/SpsWorkflow.examples.d.ts +2 -0
- package/dist/out-tsc/workflow/SpsWorkflow.examples.js +25 -0
- package/dist/out-tsc/workflow/SpsWorkflow.examples.js.map +1 -0
- package/dist/out-tsc/workflow/SpsWorkflow.js +56 -0
- package/dist/out-tsc/workflow/SpsWorkflow.js.map +1 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocument.d.ts +11 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocument.js +46 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocument.js.map +1 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocumentStatus.d.ts +13 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocumentStatus.js +52 -0
- package/dist/out-tsc/workflow/SpsWorkflowDocumentStatus.js.map +1 -0
- package/dist/out-tsc/workflow/SpsWorkflowStep.d.ts +14 -0
- package/dist/out-tsc/workflow/SpsWorkflowStep.js +53 -0
- package/dist/out-tsc/workflow/SpsWorkflowStep.js.map +1 -0
- package/dist/out-tsc/workflow/index.d.ts +5 -0
- package/dist/out-tsc/workflow/index.js +6 -0
- package/dist/out-tsc/workflow/index.js.map +1 -0
- package/dist/out-tsc/zero-state/SpsMicroZeroState.d.ts +14 -0
- package/dist/out-tsc/zero-state/SpsMicroZeroState.js +46 -0
- package/dist/out-tsc/zero-state/SpsMicroZeroState.js.map +1 -0
- package/dist/out-tsc/zero-state/SpsZeroState.d.ts +13 -0
- package/dist/out-tsc/zero-state/SpsZeroState.examples.d.ts +2 -0
- package/dist/out-tsc/zero-state/SpsZeroState.examples.js +79 -0
- package/dist/out-tsc/zero-state/SpsZeroState.examples.js.map +1 -0
- package/dist/out-tsc/zero-state/SpsZeroState.js +47 -0
- package/dist/out-tsc/zero-state/SpsZeroState.js.map +1 -0
- package/dist/out-tsc/zero-state/index.d.ts +3 -0
- package/dist/out-tsc/zero-state/index.js +4 -0
- package/dist/out-tsc/zero-state/index.js.map +1 -0
- package/lib/index.cjs.js +34659 -8296
- package/lib/index.d.ts +1 -3
- package/lib/index.es.js +27969 -31456
- package/package.json +13 -19
- package/rollup.config.js +22 -0
- package/vite.config.js +1 -1
- package/lib/card-v2/SpsCardV2.d.ts +0 -2
- package/lib/card-v2/SpsCardV2Footer.d.ts +0 -2
- package/lib/card-v2/SpsCardV2Header.d.ts +0 -2
- package/lib/card-v2/SpsCardV2Title.d.ts +0 -2
- package/lib/card-v2/index.d.ts +0 -5
- package/lib/tabs-v2/SpsTab.d.ts +0 -6
- package/lib/tabs-v2/SpsTabPanel.d.ts +0 -5
- package/lib/tabs-v2/SpsTabsV2.d.ts +0 -2
- package/lib/tabs-v2/index.d.ts +0 -4
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
17
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
18
|
+
if (!m) return o;
|
|
19
|
+
var i = m.call(o), r, ar = [], e;
|
|
20
|
+
try {
|
|
21
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
22
|
+
}
|
|
23
|
+
catch (error) { e = { error: error }; }
|
|
24
|
+
finally {
|
|
25
|
+
try {
|
|
26
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
27
|
+
}
|
|
28
|
+
finally { if (e) throw e.error; }
|
|
29
|
+
}
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
33
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
34
|
+
if (ar || !(i in from)) {
|
|
35
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
36
|
+
ar[i] = from[i];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
40
|
+
};
|
|
41
|
+
var __values = (this && this.__values) || function(o) {
|
|
42
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
43
|
+
if (m) return m.call(o);
|
|
44
|
+
if (o && typeof o.length === "number") return {
|
|
45
|
+
next: function () {
|
|
46
|
+
if (o && i >= o.length) o = void 0;
|
|
47
|
+
return { value: o && o[i++], done: !o };
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
51
|
+
};
|
|
52
|
+
/* eslint-disable
|
|
53
|
+
max-classes-per-file,
|
|
54
|
+
@typescript-eslint/no-use-before-define,
|
|
55
|
+
no-param-reassign,
|
|
56
|
+
*/
|
|
57
|
+
import { diff, DiffChange, getPath, setPath, deepFreeze, } from "@spscommerce/utils";
|
|
58
|
+
import { useCallback, useEffect, useMemo, useReducer, useRef, } from "react";
|
|
59
|
+
import nanoid from "nanoid";
|
|
60
|
+
import isPlainObject from "lodash.isplainobject";
|
|
61
|
+
import { AsTypingErrorKeys, PreventativeErrorKeys } from "../validation/types";
|
|
62
|
+
import { SpsValidators } from "../validation/SpsValidators";
|
|
63
|
+
import { validate } from "../validation/validate";
|
|
64
|
+
// Base class for all form metadata structures: controls, groups, and arrays
|
|
65
|
+
var SpsFormMetaBase = /** @class */ (function () {
|
|
66
|
+
function SpsFormMetaBase(path, update) {
|
|
67
|
+
this.path = path;
|
|
68
|
+
this.update = update;
|
|
69
|
+
this.validators = [];
|
|
70
|
+
this.errors = null;
|
|
71
|
+
this.revealAllErrors = false;
|
|
72
|
+
this.preventativeErrors = [];
|
|
73
|
+
}
|
|
74
|
+
SpsFormMetaBase.prototype.setValidators = function (newValidators) {
|
|
75
|
+
this.validators = newValidators;
|
|
76
|
+
this.update(null);
|
|
77
|
+
return this;
|
|
78
|
+
};
|
|
79
|
+
SpsFormMetaBase.prototype.validate = function (newValue) {
|
|
80
|
+
if (this.validators && this.validators.length > 0) {
|
|
81
|
+
this.errors = validate(newValue, this.validators);
|
|
82
|
+
this.update(null);
|
|
83
|
+
if (this.isFocused() && this.onFocus) {
|
|
84
|
+
this.onFocus();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else if (this.errors) {
|
|
88
|
+
this.errors = null;
|
|
89
|
+
this.update(null);
|
|
90
|
+
}
|
|
91
|
+
return this;
|
|
92
|
+
};
|
|
93
|
+
SpsFormMetaBase.prototype.isValid = function () {
|
|
94
|
+
return !this.errors || this.isPristine();
|
|
95
|
+
};
|
|
96
|
+
SpsFormMetaBase.prototype.isVisibilyInvalid = function () {
|
|
97
|
+
return this.errors && (this.revealAllErrors ||
|
|
98
|
+
(!this.isPristine()
|
|
99
|
+
&& Object.keys(this.errors).some(function (key) { return AsTypingErrorKeys.has(key); })));
|
|
100
|
+
};
|
|
101
|
+
SpsFormMetaBase.prototype.hasError = function (errorKey) {
|
|
102
|
+
return this.errors && Object.prototype.hasOwnProperty.call(this.errors, errorKey);
|
|
103
|
+
};
|
|
104
|
+
SpsFormMetaBase.prototype.hasPreventativeError = function (errorKey) {
|
|
105
|
+
return this.preventativeErrors.includes(errorKey);
|
|
106
|
+
};
|
|
107
|
+
SpsFormMetaBase.prototype.hasPreventativeErrors = function () {
|
|
108
|
+
return this.preventativeErrors.length > 0;
|
|
109
|
+
};
|
|
110
|
+
SpsFormMetaBase.prototype.isRequired = function () {
|
|
111
|
+
return this.validators && this.validators.indexOf(SpsValidators.required) > -1;
|
|
112
|
+
};
|
|
113
|
+
SpsFormMetaBase.prototype.onFocus = function () { }; // eslint-disable-line class-methods-use-this
|
|
114
|
+
SpsFormMetaBase.prototype.onBlur = function () { }; // eslint-disable-line class-methods-use-this
|
|
115
|
+
return SpsFormMetaBase;
|
|
116
|
+
}());
|
|
117
|
+
export { SpsFormMetaBase };
|
|
118
|
+
// Metadata for an individual control such as a text input or checkbox
|
|
119
|
+
var SpsFormFieldMeta = /** @class */ (function (_super) {
|
|
120
|
+
__extends(SpsFormFieldMeta, _super);
|
|
121
|
+
function SpsFormFieldMeta() {
|
|
122
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
123
|
+
_this.id = nanoid();
|
|
124
|
+
_this.focused = false;
|
|
125
|
+
_this.pristine = true;
|
|
126
|
+
return _this;
|
|
127
|
+
}
|
|
128
|
+
SpsFormFieldMeta.prototype.setValue = function (newValue) {
|
|
129
|
+
this.revealAllErrors = false;
|
|
130
|
+
this.preventativeErrors = [];
|
|
131
|
+
if (this.validators && this.validators.length > 0) {
|
|
132
|
+
var errors = validate(newValue, this.validators);
|
|
133
|
+
if (errors) {
|
|
134
|
+
var currentPreventativeErrors = Object.keys(errors)
|
|
135
|
+
.filter(function (key) { return PreventativeErrorKeys.has(key); });
|
|
136
|
+
if (currentPreventativeErrors.length > 0) {
|
|
137
|
+
this.preventativeErrors = Object.keys(errors);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
this.update(this.path, newValue);
|
|
143
|
+
};
|
|
144
|
+
SpsFormFieldMeta.prototype.isPristine = function () {
|
|
145
|
+
return this.pristine;
|
|
146
|
+
};
|
|
147
|
+
SpsFormFieldMeta.prototype.markAsPristine = function () {
|
|
148
|
+
this.pristine = true;
|
|
149
|
+
this.revealAllErrors = false;
|
|
150
|
+
this.update(null);
|
|
151
|
+
return this;
|
|
152
|
+
};
|
|
153
|
+
SpsFormFieldMeta.prototype.markAsDirty = function () {
|
|
154
|
+
this.pristine = false;
|
|
155
|
+
this.update(null);
|
|
156
|
+
return this;
|
|
157
|
+
};
|
|
158
|
+
SpsFormFieldMeta.prototype.isFocused = function () {
|
|
159
|
+
return this.focused;
|
|
160
|
+
};
|
|
161
|
+
SpsFormFieldMeta.prototype.markAsFocused = function () {
|
|
162
|
+
this.focused = true;
|
|
163
|
+
this.update(null);
|
|
164
|
+
if (this.onFocus) {
|
|
165
|
+
this.onFocus();
|
|
166
|
+
}
|
|
167
|
+
return this;
|
|
168
|
+
};
|
|
169
|
+
SpsFormFieldMeta.prototype.markAsBlurred = function () {
|
|
170
|
+
this.update(this.path, null, true);
|
|
171
|
+
if (this.onBlur) {
|
|
172
|
+
this.onBlur();
|
|
173
|
+
}
|
|
174
|
+
this.preventativeErrors = [];
|
|
175
|
+
return this;
|
|
176
|
+
};
|
|
177
|
+
return SpsFormFieldMeta;
|
|
178
|
+
}(SpsFormMetaBase));
|
|
179
|
+
export { SpsFormFieldMeta };
|
|
180
|
+
/*
|
|
181
|
+
* Base class for form metadata structures that contain other form metadata
|
|
182
|
+
* structures: arrays and groups, which have "fields" that can be other
|
|
183
|
+
* form arrays or form groups, or form controls (i.e. any SpsFormMetaBase)
|
|
184
|
+
*/
|
|
185
|
+
var SpsFormSetMeta = /** @class */ (function (_super) {
|
|
186
|
+
__extends(SpsFormSetMeta, _super);
|
|
187
|
+
function SpsFormSetMeta(inferValOrPath, pathOrUpdate, updateWhenInferring) {
|
|
188
|
+
var _this = this;
|
|
189
|
+
var path = (updateWhenInferring ? pathOrUpdate : inferValOrPath);
|
|
190
|
+
var update = updateWhenInferring || pathOrUpdate;
|
|
191
|
+
_this = _super.call(this, path, update) || this;
|
|
192
|
+
if (updateWhenInferring) {
|
|
193
|
+
_this.inferMembers(inferValOrPath);
|
|
194
|
+
}
|
|
195
|
+
return _this;
|
|
196
|
+
}
|
|
197
|
+
SpsFormSetMeta.prototype.inferSpsControl = function (valueOrControl, key) {
|
|
198
|
+
return inferSpsControl(valueOrControl, __spreadArray(__spreadArray([], __read(this.path), false), [key], false), this.update);
|
|
199
|
+
};
|
|
200
|
+
SpsFormSetMeta.prototype.rollup = function (methodName) {
|
|
201
|
+
var _this = this;
|
|
202
|
+
return Object.keys(this.fields).reduce(function (acc, key) { return acc && (!_this.fields[key][methodName] || _this.fields[key][methodName]()); }, true);
|
|
203
|
+
};
|
|
204
|
+
SpsFormSetMeta.prototype.isFocused = function () {
|
|
205
|
+
return _super.prototype.isFocused.call(this) || this.rollup("isFocused");
|
|
206
|
+
};
|
|
207
|
+
SpsFormSetMeta.prototype.isValid = function () {
|
|
208
|
+
return _super.prototype.isValid.call(this) && this.rollup("isValid");
|
|
209
|
+
};
|
|
210
|
+
SpsFormSetMeta.prototype.contentsAreValid = function () {
|
|
211
|
+
/*
|
|
212
|
+
* The distinction between "isValid" and "contentsAreValid" is that a form group
|
|
213
|
+
* or form array can have a validator attached, which means the group/array in and
|
|
214
|
+
* of itself has a validation status and associated errors. That is "isValid" for
|
|
215
|
+
* a group/array, the same as for a control.
|
|
216
|
+
*/
|
|
217
|
+
return this.rollup("isValid") && this.rollup("contentsAreValid");
|
|
218
|
+
};
|
|
219
|
+
SpsFormSetMeta.prototype.isPristine = function () {
|
|
220
|
+
return _super.prototype.isPristine.call(this) && this.rollup("isPristine");
|
|
221
|
+
};
|
|
222
|
+
SpsFormSetMeta.prototype.markAsPristine = function () {
|
|
223
|
+
var e_1, _a;
|
|
224
|
+
_super.prototype.markAsPristine.call(this);
|
|
225
|
+
try {
|
|
226
|
+
for (var _b = __values(Object.keys(this.fields)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
227
|
+
var key = _c.value;
|
|
228
|
+
this.fields[key].markAsPristine();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
232
|
+
finally {
|
|
233
|
+
try {
|
|
234
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
235
|
+
}
|
|
236
|
+
finally { if (e_1) throw e_1.error; }
|
|
237
|
+
}
|
|
238
|
+
return this;
|
|
239
|
+
};
|
|
240
|
+
SpsFormSetMeta.prototype.markAsDirty = function () {
|
|
241
|
+
var e_2, _a;
|
|
242
|
+
_super.prototype.markAsDirty.call(this);
|
|
243
|
+
try {
|
|
244
|
+
for (var _b = __values(Object.keys(this.fields)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
245
|
+
var key = _c.value;
|
|
246
|
+
this.fields[key].markAsDirty();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
250
|
+
finally {
|
|
251
|
+
try {
|
|
252
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
253
|
+
}
|
|
254
|
+
finally { if (e_2) throw e_2.error; }
|
|
255
|
+
}
|
|
256
|
+
return this;
|
|
257
|
+
};
|
|
258
|
+
SpsFormSetMeta.prototype.markAsBlurred = function () {
|
|
259
|
+
var e_3, _a;
|
|
260
|
+
_super.prototype.markAsBlurred.call(this);
|
|
261
|
+
try {
|
|
262
|
+
for (var _b = __values(Object.keys(this.fields)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
263
|
+
var key = _c.value;
|
|
264
|
+
this.fields[key].markAsBlurred();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
268
|
+
finally {
|
|
269
|
+
try {
|
|
270
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
271
|
+
}
|
|
272
|
+
finally { if (e_3) throw e_3.error; }
|
|
273
|
+
}
|
|
274
|
+
return this;
|
|
275
|
+
};
|
|
276
|
+
return SpsFormSetMeta;
|
|
277
|
+
}(SpsFormFieldMeta));
|
|
278
|
+
export { SpsFormSetMeta };
|
|
279
|
+
/*
|
|
280
|
+
* Ultimately the difference between SpsFormGroupMeta and SpsFormArrayMeta is merely the type
|
|
281
|
+
* of their `fields` property: an object or an array.
|
|
282
|
+
*/
|
|
283
|
+
var SpsFormGroupMeta = /** @class */ (function (_super) {
|
|
284
|
+
__extends(SpsFormGroupMeta, _super);
|
|
285
|
+
function SpsFormGroupMeta() {
|
|
286
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
287
|
+
}
|
|
288
|
+
SpsFormGroupMeta.prototype.inferMembers = function (inferFromValue) {
|
|
289
|
+
var e_4, _a;
|
|
290
|
+
this.fields = {};
|
|
291
|
+
try {
|
|
292
|
+
for (var _b = __values(Object.keys(inferFromValue)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
293
|
+
var key = _c.value;
|
|
294
|
+
this.fields[key] = this.inferSpsControl(inferFromValue[key], key);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
298
|
+
finally {
|
|
299
|
+
try {
|
|
300
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
301
|
+
}
|
|
302
|
+
finally { if (e_4) throw e_4.error; }
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
return SpsFormGroupMeta;
|
|
306
|
+
}(SpsFormSetMeta));
|
|
307
|
+
export { SpsFormGroupMeta };
|
|
308
|
+
var SpsFormArrayMeta = /** @class */ (function (_super) {
|
|
309
|
+
__extends(SpsFormArrayMeta, _super);
|
|
310
|
+
function SpsFormArrayMeta() {
|
|
311
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
312
|
+
}
|
|
313
|
+
SpsFormArrayMeta.prototype.inferMembers = function (inferFromValue) {
|
|
314
|
+
var _this = this;
|
|
315
|
+
this.fields = (inferFromValue.map(function (item, i) { return _this.inferSpsControl(item, String(i)); }));
|
|
316
|
+
};
|
|
317
|
+
return SpsFormArrayMeta;
|
|
318
|
+
}(SpsFormSetMeta));
|
|
319
|
+
export { SpsFormArrayMeta };
|
|
320
|
+
function inferSpsControl(valueOrControl, path, update) {
|
|
321
|
+
if (valueOrControl instanceof SpsFormMetaBase) {
|
|
322
|
+
valueOrControl.path = path;
|
|
323
|
+
valueOrControl.update = update;
|
|
324
|
+
return valueOrControl;
|
|
325
|
+
}
|
|
326
|
+
if (Array.isArray(valueOrControl)) {
|
|
327
|
+
return new SpsFormArrayMeta(valueOrControl, path, update);
|
|
328
|
+
}
|
|
329
|
+
if (isPlainObject(valueOrControl)) {
|
|
330
|
+
return new SpsFormGroupMeta(valueOrControl, path, update);
|
|
331
|
+
}
|
|
332
|
+
return new SpsFormFieldMeta(path, update);
|
|
333
|
+
}
|
|
334
|
+
function getMember(obj, path) {
|
|
335
|
+
if (path.length === 0 || !obj) {
|
|
336
|
+
return obj;
|
|
337
|
+
}
|
|
338
|
+
return getMember(obj.fields[path[0]], path.slice(1, path.length));
|
|
339
|
+
}
|
|
340
|
+
function getMembers(obj, path) {
|
|
341
|
+
if (path.length === 0 || !obj) {
|
|
342
|
+
return [obj];
|
|
343
|
+
}
|
|
344
|
+
var nextPath = path[0];
|
|
345
|
+
path = path.slice(1, path.length);
|
|
346
|
+
if (nextPath === "*") {
|
|
347
|
+
var fieldsArray = Array.isArray(obj.fields)
|
|
348
|
+
? obj.fields
|
|
349
|
+
: Object.keys(obj.fields).map(function (k) { return obj.fields[k]; });
|
|
350
|
+
if (path.length === 0) {
|
|
351
|
+
return fieldsArray;
|
|
352
|
+
}
|
|
353
|
+
return fieldsArray.reduce(function (arr, member) { return __spreadArray(__spreadArray([], __read(arr), false), __read(getMembers(member, path)), false); }, []);
|
|
354
|
+
}
|
|
355
|
+
return getMembers(obj.fields[nextPath], path);
|
|
356
|
+
}
|
|
357
|
+
function validatorMapForEach(formMeta, validatorMap, fn) {
|
|
358
|
+
var e_5, _a, e_6, _b;
|
|
359
|
+
try {
|
|
360
|
+
for (var _c = __values(Object.keys(validatorMap)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
361
|
+
var path = _d.value;
|
|
362
|
+
var validators = validatorMap[path];
|
|
363
|
+
try {
|
|
364
|
+
for (var _e = (e_6 = void 0, __values(getMembers(formMeta, path.split(".")))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
365
|
+
var control = _f.value;
|
|
366
|
+
if (control && validators) {
|
|
367
|
+
fn(control, validators);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
372
|
+
finally {
|
|
373
|
+
try {
|
|
374
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
375
|
+
}
|
|
376
|
+
finally { if (e_6) throw e_6.error; }
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
381
|
+
finally {
|
|
382
|
+
try {
|
|
383
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
384
|
+
}
|
|
385
|
+
finally { if (e_5) throw e_5.error; }
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function updateValidators(value, formMeta, validatorMap, runValidators) {
|
|
389
|
+
if (runValidators === void 0) { runValidators = false; }
|
|
390
|
+
validatorMapForEach(formMeta, validatorMap, function (control, validators) {
|
|
391
|
+
control.validators = typeof validators === "function"
|
|
392
|
+
? validators(value)
|
|
393
|
+
: validators;
|
|
394
|
+
if (runValidators) {
|
|
395
|
+
control.errors = validate(getPath(value, control.path), control.validators);
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
function cloneFormValue(value, path) {
|
|
400
|
+
var next = path[0];
|
|
401
|
+
path = path.slice(1);
|
|
402
|
+
if (Array.isArray(value)) {
|
|
403
|
+
return value.map(function (x, i) { return (i === Number(next)
|
|
404
|
+
? cloneFormValue(x, path)
|
|
405
|
+
: x); });
|
|
406
|
+
}
|
|
407
|
+
if (isPlainObject(value)) {
|
|
408
|
+
return Object.keys(value)
|
|
409
|
+
.reduce(function (acc, key) {
|
|
410
|
+
var _a;
|
|
411
|
+
return Object.assign(acc, (_a = {},
|
|
412
|
+
_a[key] = key === next
|
|
413
|
+
? cloneFormValue(value[key], path)
|
|
414
|
+
: value[key],
|
|
415
|
+
_a));
|
|
416
|
+
}, {});
|
|
417
|
+
}
|
|
418
|
+
return value;
|
|
419
|
+
}
|
|
420
|
+
function checkFormObject(value) {
|
|
421
|
+
if (typeof value !== "object"
|
|
422
|
+
|| value === null
|
|
423
|
+
|| Array.isArray(value)) {
|
|
424
|
+
throw new TypeError("The initial value of useSpsForm() hook must be an object.");
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
export function useSpsForm(value, validatorMap) {
|
|
428
|
+
checkFormObject(value);
|
|
429
|
+
/*
|
|
430
|
+
* Do the work of instantiating `formMeta` the first time the hook is run and ONLY
|
|
431
|
+
* the first time. Thereafter we will keep it up to date as we go.
|
|
432
|
+
*/
|
|
433
|
+
var formMeta = useMemo(function () {
|
|
434
|
+
deepFreeze(value);
|
|
435
|
+
var controlSet = inferSpsControl(value, [], update);
|
|
436
|
+
if (validatorMap) {
|
|
437
|
+
updateValidators(value, controlSet, validatorMap, true);
|
|
438
|
+
}
|
|
439
|
+
return controlSet;
|
|
440
|
+
}, []);
|
|
441
|
+
/*
|
|
442
|
+
* Stores a timeout id, used for aggregating `updateForm` calls
|
|
443
|
+
* into a single `useReducer` dispatch per cycle
|
|
444
|
+
*/
|
|
445
|
+
var scheduledDispatch = useRef();
|
|
446
|
+
// A stable identity for `reducer` is important to avoid constant re-render thrashing
|
|
447
|
+
var reducer = useCallback(function (currentState, action) {
|
|
448
|
+
var e_7, _a, e_8, _b, e_9, _c;
|
|
449
|
+
var newValue;
|
|
450
|
+
scheduledDispatch.current = null;
|
|
451
|
+
if (action) {
|
|
452
|
+
if (action.path) {
|
|
453
|
+
if (action.markAsBlurred) {
|
|
454
|
+
var control = getMember(currentState.formMeta, action.path);
|
|
455
|
+
if (control) {
|
|
456
|
+
control.focused = false;
|
|
457
|
+
control.revealAllErrors = true;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
/*
|
|
462
|
+
* This branch is used when an SpsFormFieldMeta's value is updated by
|
|
463
|
+
* its associated component, i.e. when the user interacts with it
|
|
464
|
+
*/
|
|
465
|
+
newValue = cloneFormValue(currentState.formValue, action.path);
|
|
466
|
+
setPath(newValue, action.path, action.value);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
newValue = action.value;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
if (newValue) {
|
|
474
|
+
deepFreeze(newValue);
|
|
475
|
+
var valueDiff = diff(currentState.formValue, newValue);
|
|
476
|
+
try {
|
|
477
|
+
for (var valueDiff_1 = __values(valueDiff), valueDiff_1_1 = valueDiff_1.next(); !valueDiff_1_1.done; valueDiff_1_1 = valueDiff_1.next()) {
|
|
478
|
+
var _d = valueDiff_1_1.value, dType = _d.type, key = _d.key, parentPath = _d.parentPath, _e = __read(_d.objects, 2), oldSubValue = _e[0], newSubValue = _e[1];
|
|
479
|
+
var meta = getMember(currentState.formMeta, parentPath);
|
|
480
|
+
/*
|
|
481
|
+
* I don't expect anyone to have symbol properties on their form value;
|
|
482
|
+
* this is mainly for TypeScript to understand that `key` is a number or string
|
|
483
|
+
* within this block. And if someone does have a symbol-keyed property, I
|
|
484
|
+
* don't know what would be going on there and we'll err on the side of not
|
|
485
|
+
* touching it.
|
|
486
|
+
*/
|
|
487
|
+
if (typeof key !== "symbol" && meta) {
|
|
488
|
+
/*
|
|
489
|
+
* Update `formMeta` in sync with new fields
|
|
490
|
+
* added or fields removed within the value
|
|
491
|
+
*/
|
|
492
|
+
switch (dType) {
|
|
493
|
+
case DiffChange.ADDITION:
|
|
494
|
+
meta.fields[key] = inferSpsControl(newSubValue[key], __spreadArray(__spreadArray([], __read(parentPath), false), [key], false), update);
|
|
495
|
+
break;
|
|
496
|
+
case DiffChange.DELETION:
|
|
497
|
+
if (Array.isArray(meta.fields)) {
|
|
498
|
+
meta.fields.splice(Number(key), 1);
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
delete meta.fields[key];
|
|
502
|
+
}
|
|
503
|
+
break;
|
|
504
|
+
case DiffChange.ALTERATION:
|
|
505
|
+
if (!oldSubValue[key]
|
|
506
|
+
&& newSubValue[key]
|
|
507
|
+
&& !(meta.fields[key] instanceof SpsFormSetMeta)) {
|
|
508
|
+
var newControl = inferSpsControl(newSubValue[key], __spreadArray(__spreadArray([], __read(parentPath), false), [key], false), update);
|
|
509
|
+
if (newControl instanceof SpsFormFieldMeta
|
|
510
|
+
&& meta.fields[key] instanceof SpsFormFieldMeta) {
|
|
511
|
+
newControl.id = meta.fields[key].id;
|
|
512
|
+
newControl.focused = meta.fields[key].focused;
|
|
513
|
+
newControl.pristine = meta.fields[key].pristine;
|
|
514
|
+
}
|
|
515
|
+
meta.fields[key] = newControl;
|
|
516
|
+
}
|
|
517
|
+
break;
|
|
518
|
+
default:
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
524
|
+
finally {
|
|
525
|
+
try {
|
|
526
|
+
if (valueDiff_1_1 && !valueDiff_1_1.done && (_a = valueDiff_1.return)) _a.call(valueDiff_1);
|
|
527
|
+
}
|
|
528
|
+
finally { if (e_7) throw e_7.error; }
|
|
529
|
+
}
|
|
530
|
+
if (validatorMap) {
|
|
531
|
+
/**
|
|
532
|
+
* The changes may alter the results of dynamic validator configurations
|
|
533
|
+
* (i.e. cases where they are defined as a function that returns conditionally
|
|
534
|
+
* different lists of validators). As well, any items added during the
|
|
535
|
+
* previous step may be included in a wildcard validator config, and therefore
|
|
536
|
+
* need their validators added.
|
|
537
|
+
*/
|
|
538
|
+
updateValidators(newValue, currentState.formMeta, validatorMap);
|
|
539
|
+
var alreadyValidated_1 = new Set();
|
|
540
|
+
validatorMapForEach(currentState.formMeta, validatorMap, function (control, validators) {
|
|
541
|
+
/**
|
|
542
|
+
* For any control with dynamic validators, its list of validators might
|
|
543
|
+
* have changed. So re-run validation and keep track of these so we don't
|
|
544
|
+
* needlessly run them again in the next step.
|
|
545
|
+
*/
|
|
546
|
+
if (typeof validators === "function") {
|
|
547
|
+
control.validate(getPath(newValue, control.path));
|
|
548
|
+
alreadyValidated_1.add(control);
|
|
549
|
+
}
|
|
550
|
+
});
|
|
551
|
+
try {
|
|
552
|
+
/**
|
|
553
|
+
* Targeted validation of changes, excluding things that were already
|
|
554
|
+
* validated in the previous step
|
|
555
|
+
*/
|
|
556
|
+
for (var valueDiff_2 = __values(valueDiff), valueDiff_2_1 = valueDiff_2.next(); !valueDiff_2_1.done; valueDiff_2_1 = valueDiff_2.next()) {
|
|
557
|
+
var _f = valueDiff_2_1.value, dType = _f.type, key = _f.key, parentPath = _f.parentPath, _g = __read(_f.objects, 2), newSubValue = _g[1];
|
|
558
|
+
if (typeof key !== "symbol") {
|
|
559
|
+
/**
|
|
560
|
+
* Revalidate each group/array that contains the added,
|
|
561
|
+
* removed, or altered value
|
|
562
|
+
*/
|
|
563
|
+
var meta = currentState.formMeta;
|
|
564
|
+
var subValue = newValue;
|
|
565
|
+
if (meta) {
|
|
566
|
+
try {
|
|
567
|
+
for (var _h = (e_9 = void 0, __values(parentPath)), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
568
|
+
var pathPiece = _j.value;
|
|
569
|
+
meta = meta.fields[pathPiece];
|
|
570
|
+
subValue = subValue[pathPiece];
|
|
571
|
+
if (!alreadyValidated_1.has(meta)) {
|
|
572
|
+
meta.validate(subValue);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
577
|
+
finally {
|
|
578
|
+
try {
|
|
579
|
+
if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
|
|
580
|
+
}
|
|
581
|
+
finally { if (e_9) throw e_9.error; }
|
|
582
|
+
}
|
|
583
|
+
if (dType === DiffChange.ADDITION || dType === DiffChange.ALTERATION) {
|
|
584
|
+
// Validate the thing that was added or altered
|
|
585
|
+
var childMeta = meta.fields[key];
|
|
586
|
+
if (!alreadyValidated_1.has(childMeta)) {
|
|
587
|
+
meta.fields[key].validate(newSubValue[key]);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
595
|
+
finally {
|
|
596
|
+
try {
|
|
597
|
+
if (valueDiff_2_1 && !valueDiff_2_1.done && (_b = valueDiff_2.return)) _b.call(valueDiff_2);
|
|
598
|
+
}
|
|
599
|
+
finally { if (e_8) throw e_8.error; }
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
return {
|
|
604
|
+
formValue: newValue || currentState.formValue,
|
|
605
|
+
formMeta: currentState.formMeta,
|
|
606
|
+
updateForm: currentState.updateForm,
|
|
607
|
+
};
|
|
608
|
+
}, []);
|
|
609
|
+
var _a = __read(useReducer(reducer, { formValue: value, formMeta: formMeta, updateForm: updateForm }), 2), state = _a[0], dispatch = _a[1];
|
|
610
|
+
function update(path, newValue, markAsBlurred) {
|
|
611
|
+
if (markAsBlurred === void 0) { markAsBlurred = false; }
|
|
612
|
+
if (path) {
|
|
613
|
+
dispatch({ path: path, value: newValue, markAsBlurred: markAsBlurred });
|
|
614
|
+
}
|
|
615
|
+
else {
|
|
616
|
+
updateForm();
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
function updateForm(newValue) {
|
|
620
|
+
if (newValue) {
|
|
621
|
+
/*
|
|
622
|
+
* For multiple updateForm calls with a new value in the same cycle,
|
|
623
|
+
* use the most recent. (Or have a call with a new value supercede
|
|
624
|
+
* previous calls that did not have a new value.)
|
|
625
|
+
*/
|
|
626
|
+
if (scheduledDispatch.current) {
|
|
627
|
+
window.clearTimeout(scheduledDispatch.current);
|
|
628
|
+
}
|
|
629
|
+
var sd = window.setTimeout(dispatch, 0, { value: newValue });
|
|
630
|
+
scheduledDispatch.current = sd;
|
|
631
|
+
}
|
|
632
|
+
else if (!scheduledDispatch.current) {
|
|
633
|
+
/*
|
|
634
|
+
* All updateForm calls *without* a value are the same, so no need
|
|
635
|
+
* to do any superceding; if there's a dispatch scheduled already,
|
|
636
|
+
* then great, that's what we needed. Otherwise get one set up.
|
|
637
|
+
*/
|
|
638
|
+
var sd = window.setTimeout(dispatch, 0, {});
|
|
639
|
+
scheduledDispatch.current = sd;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Prevents scheduled updates from occurring if the hook gets unmounted
|
|
644
|
+
*/
|
|
645
|
+
useEffect(function () { return function () {
|
|
646
|
+
if (scheduledDispatch.current) {
|
|
647
|
+
window.clearTimeout(scheduledDispatch.current);
|
|
648
|
+
}
|
|
649
|
+
}; }, []);
|
|
650
|
+
return state;
|
|
651
|
+
}
|
|
652
|
+
//# sourceMappingURL=useSpsForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSpsForm.js","sourceRoot":"","sources":["../../../../src/form/hooks/useSpsForm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;EAIE;AACF,OAAO,EACL,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAC/C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GACpD,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAMlD,4EAA4E;AAC5E;IASE,yBACS,IAAU,EACV,MAAgB;QADhB,SAAI,GAAJ,IAAI,CAAM;QACV,WAAM,GAAN,MAAM,CAAU;QAVzB,eAAU,GAA2B,EAAE,CAAC;QAExC,WAAM,GAA+B,IAAI,CAAC;QAE1C,oBAAe,GAAG,KAAK,CAAC;QAExB,uBAAkB,GAAG,EAAE,CAAC;IAKrB,CAAC;IAUJ,uCAAa,GAAb,UAAc,aAAqC;QACjD,IA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