@spscommerce/ds-react 5.20.2 → 5.20.3-ie
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 +29 -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 +141 -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 +26 -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 +164 -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 +50 -0
- package/dist/out-tsc/form/SpsForm.examples.js +67 -0
- package/dist/out-tsc/form/SpsForm.examples.js.map +1 -0
- package/dist/out-tsc/form/SpsForm.js +52 -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/useCustomValidator.d.ts +7 -0
- package/dist/out-tsc/form/hooks/useCustomValidator.js +60 -0
- package/dist/out-tsc/form/hooks/useCustomValidator.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 +83 -0
- package/dist/out-tsc/form/hooks/useSpsForm.js +736 -0
- package/dist/out-tsc/form/hooks/useSpsForm.js.map +1 -0
- package/dist/out-tsc/form/index.d.ts +16 -0
- package/dist/out-tsc/form/index.js +17 -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 +10 -0
- package/dist/out-tsc/form/validation/types.js +21 -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 +27 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.examples.d.ts +3 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.examples.js +425 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.examples.js.map +1 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbar.js +175 -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/SpsListToolbarSortBy.d.ts +21 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSortBy.js +35 -0
- package/dist/out-tsc/list-toolbar/SpsListToolbarSortBy.js.map +1 -0
- package/dist/out-tsc/list-toolbar/index.d.ts +5 -0
- package/dist/out-tsc/list-toolbar/index.js +6 -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 +38 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.examples.d.ts +2 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.examples.js +42 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.examples.js.map +1 -0
- package/dist/out-tsc/multi-select/SpsMultiSelect.js +245 -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 +418 -0
- package/dist/out-tsc/option-list/SpsOptionList.js.map +1 -0
- package/dist/out-tsc/option-list/SpsOptionListProps.d.ts +81 -0
- package/dist/out-tsc/option-list/SpsOptionListProps.js +53 -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 +171 -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 +37 -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/SpsSearchResultsBarV2.d.ts +14 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBarV2.js +68 -0
- package/dist/out-tsc/search-results-bar/SpsSearchResultsBarV2.js.map +1 -0
- package/dist/out-tsc/search-results-bar/index.d.ts +3 -0
- package/dist/out-tsc/search-results-bar/index.js +4 -0
- package/dist/out-tsc/search-results-bar/index.js.map +1 -0
- package/dist/out-tsc/select/SpsSelect.d.ts +39 -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 +207 -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 +22 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.examples.d.ts +28 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.examples.js +82 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.examples.js.map +1 -0
- package/dist/out-tsc/stepped-progress-bar/SpsSteppedProgressBar.js +58 -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 +89 -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 +292 -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 +56 -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 +35028 -8718
- package/lib/index.d.ts +1 -3
- package/lib/index.es.js +28310 -32198
- package/lib/zero-state/SpsMicroZeroState.d.ts +0 -1
- package/lib/zero-state/SpsZeroState.d.ts +1 -2
- package/package.json +13 -21
- 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,211 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
|
+
};
|
|
37
|
+
var __values = (this && this.__values) || function(o) {
|
|
38
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
39
|
+
if (m) return m.call(o);
|
|
40
|
+
if (o && typeof o.length === "number") return {
|
|
41
|
+
next: function () {
|
|
42
|
+
if (o && i >= o.length) o = void 0;
|
|
43
|
+
return { value: o && o[i++], done: !o };
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
47
|
+
};
|
|
48
|
+
import { SpsValidators } from "../validation/SpsValidators";
|
|
49
|
+
import { getMember } from "./SpsControlSet.interface";
|
|
50
|
+
export function formArray(members, config) {
|
|
51
|
+
if (members === void 0) { members = []; }
|
|
52
|
+
if (config === void 0) { config = {}; }
|
|
53
|
+
return __assign(__assign({ validators: [] }, config), { _type: "Array", members: __spreadArray([], __read(members), false), errors: null, invalid: false, isValid: function () {
|
|
54
|
+
var t = this;
|
|
55
|
+
return !t.invalid && t.members.every(function (member) { return member.isValid(); });
|
|
56
|
+
}, isRequired: function () {
|
|
57
|
+
var t = this;
|
|
58
|
+
return t.validators && t.validators.indexOf(SpsValidators.required) > -1;
|
|
59
|
+
}, hasError: function (errorKey) {
|
|
60
|
+
var t = this;
|
|
61
|
+
return t.errors && Object.prototype.hasOwnProperty.call(t.errors, errorKey);
|
|
62
|
+
}, length: members.length, setInitValue: function (newValue) {
|
|
63
|
+
var e_1, _a;
|
|
64
|
+
try {
|
|
65
|
+
for (var _b = __values(this.members.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
66
|
+
var _d = __read(_c.value, 2), i = _d[0], member = _d[1];
|
|
67
|
+
member.setInitValue(newValue[i]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
71
|
+
finally {
|
|
72
|
+
try {
|
|
73
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
74
|
+
}
|
|
75
|
+
finally { if (e_1) throw e_1.error; }
|
|
76
|
+
}
|
|
77
|
+
return this;
|
|
78
|
+
}, getValue: function () {
|
|
79
|
+
return this.members.map(function (member) { return member.getValue(); });
|
|
80
|
+
}, setValue: function (newValue) {
|
|
81
|
+
var e_2, _a;
|
|
82
|
+
if (newValue === void 0) { newValue = []; }
|
|
83
|
+
try {
|
|
84
|
+
for (var _b = __values(this.members.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
85
|
+
var _d = __read(_c.value, 2), i = _d[0], member = _d[1];
|
|
86
|
+
member.setValue(newValue[i]);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
90
|
+
finally {
|
|
91
|
+
try {
|
|
92
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
93
|
+
}
|
|
94
|
+
finally { if (e_2) throw e_2.error; }
|
|
95
|
+
}
|
|
96
|
+
return this;
|
|
97
|
+
}, update: function () {
|
|
98
|
+
return this;
|
|
99
|
+
}, isFocused: function () {
|
|
100
|
+
return this.members.some(function (member) { return member.isFocused(); });
|
|
101
|
+
}, focus: function () {
|
|
102
|
+
var t = this;
|
|
103
|
+
if (t.members.length) {
|
|
104
|
+
t.members[0].focus();
|
|
105
|
+
}
|
|
106
|
+
return this;
|
|
107
|
+
}, blur: function () {
|
|
108
|
+
var e_3, _a;
|
|
109
|
+
try {
|
|
110
|
+
for (var _b = __values(this.members), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
111
|
+
var member = _c.value;
|
|
112
|
+
member.blur();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
116
|
+
finally {
|
|
117
|
+
try {
|
|
118
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
119
|
+
}
|
|
120
|
+
finally { if (e_3) throw e_3.error; }
|
|
121
|
+
}
|
|
122
|
+
return this;
|
|
123
|
+
}, isPristine: function () {
|
|
124
|
+
return this.members.every(function (member) { return member.isPristine(); });
|
|
125
|
+
}, markAsPristine: function () {
|
|
126
|
+
var e_4, _a;
|
|
127
|
+
try {
|
|
128
|
+
for (var _b = __values(this.members), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
129
|
+
var member = _c.value;
|
|
130
|
+
member.markAsPristine();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
134
|
+
finally {
|
|
135
|
+
try {
|
|
136
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
137
|
+
}
|
|
138
|
+
finally { if (e_4) throw e_4.error; }
|
|
139
|
+
}
|
|
140
|
+
return this;
|
|
141
|
+
}, markAsDirty: function () {
|
|
142
|
+
var e_5, _a;
|
|
143
|
+
try {
|
|
144
|
+
for (var _b = __values(this.members), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
145
|
+
var member = _c.value;
|
|
146
|
+
member.markAsDirty();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
150
|
+
finally {
|
|
151
|
+
try {
|
|
152
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
153
|
+
}
|
|
154
|
+
finally { if (e_5) throw e_5.error; }
|
|
155
|
+
}
|
|
156
|
+
return this;
|
|
157
|
+
}, reset: function (value) {
|
|
158
|
+
var e_6, _a;
|
|
159
|
+
var t = this;
|
|
160
|
+
t.members = __spreadArray([], __read(members), false);
|
|
161
|
+
t.length = members.length;
|
|
162
|
+
try {
|
|
163
|
+
for (var _b = __values(t.members.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
164
|
+
var _d = __read(_c.value, 2), i = _d[0], member = _d[1];
|
|
165
|
+
if (value && i < value.length) {
|
|
166
|
+
member.reset(value[i]);
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
member.reset();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
174
|
+
finally {
|
|
175
|
+
try {
|
|
176
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
177
|
+
}
|
|
178
|
+
finally { if (e_6) throw e_6.error; }
|
|
179
|
+
}
|
|
180
|
+
t.update();
|
|
181
|
+
return this;
|
|
182
|
+
}, get: function (path) {
|
|
183
|
+
return getMember(this, path);
|
|
184
|
+
}, at: function (index) {
|
|
185
|
+
return this.members[index];
|
|
186
|
+
}, push: function (control) {
|
|
187
|
+
var t = this;
|
|
188
|
+
t.members.push(control);
|
|
189
|
+
t.length = t.members.length;
|
|
190
|
+
t.update();
|
|
191
|
+
return this;
|
|
192
|
+
}, insert: function (index, control) {
|
|
193
|
+
var t = this;
|
|
194
|
+
t.members.splice(index, null, control);
|
|
195
|
+
t.length = t.members.length;
|
|
196
|
+
t.update();
|
|
197
|
+
return this;
|
|
198
|
+
}, removeAt: function (index) {
|
|
199
|
+
var t = this;
|
|
200
|
+
t.members.splice(index, 1);
|
|
201
|
+
t.length = t.members.length;
|
|
202
|
+
t.update();
|
|
203
|
+
return this;
|
|
204
|
+
}, setControl: function (index, control) {
|
|
205
|
+
var t = this;
|
|
206
|
+
t.members[index] = control;
|
|
207
|
+
t.update();
|
|
208
|
+
return this;
|
|
209
|
+
} });
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=formArray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formArray.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C,GACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SpsAbstractControl, SpsAbstractControlConfig } from "./SpsAbstractControl.interface";
|
|
2
|
+
export interface SpsFormControl<T> extends SpsAbstractControl<T> {
|
|
3
|
+
id: string;
|
|
4
|
+
value: T;
|
|
5
|
+
focused: boolean;
|
|
6
|
+
pristine: boolean;
|
|
7
|
+
isRequired: () => boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function formControl<T>(initValue?: T, config?: SpsAbstractControlConfig<T>): SpsFormControl<T>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import nanoid from "nanoid";
|
|
13
|
+
import { SpsValidators } from "../validation/SpsValidators";
|
|
14
|
+
export function formControl(initValue, config) {
|
|
15
|
+
if (config === void 0) { config = {}; }
|
|
16
|
+
return __assign(__assign({ validators: [], id: nanoid() }, config), { _type: "Control", initValue: initValue, setInitValue: function (newValue) {
|
|
17
|
+
this.value = newValue;
|
|
18
|
+
this.initValue = newValue;
|
|
19
|
+
return this;
|
|
20
|
+
}, value: initValue, getValue: function () {
|
|
21
|
+
return this.value;
|
|
22
|
+
}, setValue: function (newValue) {
|
|
23
|
+
this.value = newValue;
|
|
24
|
+
this.update();
|
|
25
|
+
return this;
|
|
26
|
+
}, errors: null, invalid: false, isValid: function () {
|
|
27
|
+
return !this.invalid;
|
|
28
|
+
}, hasError: function (errorKey) {
|
|
29
|
+
return this.errors && Object.prototype.hasOwnProperty.call(this.errors, errorKey);
|
|
30
|
+
}, focused: false, isFocused: function () {
|
|
31
|
+
return this.focused;
|
|
32
|
+
}, pristine: true, isPristine: function () {
|
|
33
|
+
return this.pristine;
|
|
34
|
+
}, isRequired: function () {
|
|
35
|
+
return this.validators && this.validators.indexOf(SpsValidators.required) > -1;
|
|
36
|
+
}, update: function () {
|
|
37
|
+
return this;
|
|
38
|
+
}, focus: function () {
|
|
39
|
+
this.focused = true;
|
|
40
|
+
this.update();
|
|
41
|
+
if (this.onFocus) {
|
|
42
|
+
this.onFocus();
|
|
43
|
+
}
|
|
44
|
+
return this;
|
|
45
|
+
}, blur: function () {
|
|
46
|
+
this.focused = false;
|
|
47
|
+
this.update();
|
|
48
|
+
if (this.onBlur) {
|
|
49
|
+
this.onBlur();
|
|
50
|
+
}
|
|
51
|
+
return this;
|
|
52
|
+
}, markAsPristine: function () {
|
|
53
|
+
this.pristine = true;
|
|
54
|
+
this.update();
|
|
55
|
+
return this;
|
|
56
|
+
}, markAsDirty: function () {
|
|
57
|
+
this.pristine = false;
|
|
58
|
+
this.update();
|
|
59
|
+
return this;
|
|
60
|
+
}, reset: function (value) {
|
|
61
|
+
if (value === void 0) { value = this.initValue; }
|
|
62
|
+
this.value = value;
|
|
63
|
+
this.pristine = true;
|
|
64
|
+
this.update();
|
|
65
|
+
return this;
|
|
66
|
+
} });
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=formControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formControl.js","sourceRoot":"","sources":["../../../../src/form/hooks/formControl.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAW5D,MAAM,UAAU,WAAW,CACzB,SAAa,EACb,MAAwC;IAAxC,uBAAA,EAAA,WAAwC;IAExC,OAAO,oBACL,UAAU,EAAE,EAAE,EACd,EAAE,EAAE,MAAM,EAAE,IACT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aAChB;YACD,OAAO,IAAI,CAAC;QACd,CAAC,EACD,IAAI,EAAJ;YACE,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,CAAC,MAAM,EAAE,CAAC;aACf;YACD,OAAO,IAAI,CAAC;QACd,CAAC,EACD,cAAc,EAAd;YACE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACrB,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,OAAO,IAAI,CAAC;QACd,CAAC,EACD,WAAW,EAAX;YACE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,OAAO,IAAI,CAAC;QACd,CAAC,EACD,KAAK,EAAL,UAAM,KAAsB;YAAtB,sBAAA,EAAA,QAAQ,IAAI,CAAC,SAAS;YAC1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACrB,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,OAAO,IAAI,CAAC;QACd,CAAC,GACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SpsAbstractControl, SpsAbstractControlConfig } from "./SpsAbstractControl.interface";
|
|
2
|
+
import type { SpsControlSet } from "./SpsControlSet.interface";
|
|
3
|
+
export interface SpsFormGroup extends SpsControlSet {
|
|
4
|
+
members: Record<string, SpsAbstractControl<any>>;
|
|
5
|
+
addControl: (name: string, control: SpsAbstractControl<any>) => any;
|
|
6
|
+
removeControl: (name: string) => any;
|
|
7
|
+
setControl: (name: string, control: SpsAbstractControl<any>) => any;
|
|
8
|
+
contains: (name: string) => boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function formGroup(members?: Record<string, SpsAbstractControl<any>>, config?: SpsAbstractControlConfig<any>): SpsFormGroup;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __values = (this && this.__values) || function(o) {
|
|
13
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
14
|
+
if (m) return m.call(o);
|
|
15
|
+
if (o && typeof o.length === "number") return {
|
|
16
|
+
next: function () {
|
|
17
|
+
if (o && i >= o.length) o = void 0;
|
|
18
|
+
return { value: o && o[i++], done: !o };
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
22
|
+
};
|
|
23
|
+
import { getMember } from "./SpsControlSet.interface";
|
|
24
|
+
export function formGroup(members, config) {
|
|
25
|
+
if (members === void 0) { members = {}; }
|
|
26
|
+
if (config === void 0) { config = {}; }
|
|
27
|
+
return __assign(__assign({ validators: [] }, config), { _type: "Group", members: __assign({}, members), errors: null, invalid: false, isValid: function () {
|
|
28
|
+
var _this = this;
|
|
29
|
+
return !this.invalid
|
|
30
|
+
&& Object.keys(this.members).every(function (key) { return _this.members[key].isValid(); });
|
|
31
|
+
}, hasError: function (errorKey) {
|
|
32
|
+
return this.errors && Object.prototype.hasOwnProperty.call(this.errors, errorKey);
|
|
33
|
+
}, setInitValue: function (newValue) {
|
|
34
|
+
var e_1, _a;
|
|
35
|
+
if (newValue === void 0) { newValue = {}; }
|
|
36
|
+
try {
|
|
37
|
+
for (var _b = __values(Object.keys(this.members)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
38
|
+
var key = _c.value;
|
|
39
|
+
this.members[key].setInitValue(newValue[key]);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
43
|
+
finally {
|
|
44
|
+
try {
|
|
45
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
46
|
+
}
|
|
47
|
+
finally { if (e_1) throw e_1.error; }
|
|
48
|
+
}
|
|
49
|
+
return this;
|
|
50
|
+
}, getValue: function () {
|
|
51
|
+
var _this = this;
|
|
52
|
+
return Object.keys(this.members)
|
|
53
|
+
.reduce(function (partial, key) {
|
|
54
|
+
var _a;
|
|
55
|
+
return Object.assign(partial, (_a = {},
|
|
56
|
+
_a[key] = _this.members[key].getValue(),
|
|
57
|
+
_a));
|
|
58
|
+
}, {});
|
|
59
|
+
}, setValue: function (newValue) {
|
|
60
|
+
var e_2, _a;
|
|
61
|
+
if (newValue === void 0) { newValue = {}; }
|
|
62
|
+
try {
|
|
63
|
+
for (var _b = __values(Object.keys(this.members)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
64
|
+
var key = _c.value;
|
|
65
|
+
this.members[key].setValue(newValue[key]);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
69
|
+
finally {
|
|
70
|
+
try {
|
|
71
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
72
|
+
}
|
|
73
|
+
finally { if (e_2) throw e_2.error; }
|
|
74
|
+
}
|
|
75
|
+
return this;
|
|
76
|
+
}, update: function () {
|
|
77
|
+
return this;
|
|
78
|
+
}, isFocused: function () {
|
|
79
|
+
var _this = this;
|
|
80
|
+
return Object.keys(this.members).some(function (key) { return _this.members[key].isFocused(); });
|
|
81
|
+
}, focus: function () {
|
|
82
|
+
var keys = Object.keys(this.members);
|
|
83
|
+
if (keys.length) {
|
|
84
|
+
this.members[keys[0]].focus();
|
|
85
|
+
}
|
|
86
|
+
return this;
|
|
87
|
+
}, blur: function () {
|
|
88
|
+
var e_3, _a;
|
|
89
|
+
try {
|
|
90
|
+
for (var _b = __values(Object.keys(this.members)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
91
|
+
var key = _c.value;
|
|
92
|
+
this.members[key].blur();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
96
|
+
finally {
|
|
97
|
+
try {
|
|
98
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
99
|
+
}
|
|
100
|
+
finally { if (e_3) throw e_3.error; }
|
|
101
|
+
}
|
|
102
|
+
return this;
|
|
103
|
+
}, isPristine: function () {
|
|
104
|
+
var _this = this;
|
|
105
|
+
return Object.keys(this.members).every(function (key) { return _this.members[key].isPristine(); });
|
|
106
|
+
}, markAsPristine: function () {
|
|
107
|
+
var e_4, _a;
|
|
108
|
+
try {
|
|
109
|
+
for (var _b = __values(Object.keys(this.members)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
110
|
+
var key = _c.value;
|
|
111
|
+
this.members[key].markAsPristine();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
115
|
+
finally {
|
|
116
|
+
try {
|
|
117
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
118
|
+
}
|
|
119
|
+
finally { if (e_4) throw e_4.error; }
|
|
120
|
+
}
|
|
121
|
+
return this;
|
|
122
|
+
}, markAsDirty: function () {
|
|
123
|
+
var e_5, _a;
|
|
124
|
+
try {
|
|
125
|
+
for (var _b = __values(Object.keys(this.members)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
126
|
+
var key = _c.value;
|
|
127
|
+
this.members[key].markAsDirty();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
131
|
+
finally {
|
|
132
|
+
try {
|
|
133
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
134
|
+
}
|
|
135
|
+
finally { if (e_5) throw e_5.error; }
|
|
136
|
+
}
|
|
137
|
+
return this;
|
|
138
|
+
}, reset: function (value) {
|
|
139
|
+
var e_6, _a;
|
|
140
|
+
this.members = __assign({}, members);
|
|
141
|
+
try {
|
|
142
|
+
for (var _b = __values(Object.keys(this.members)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
143
|
+
var key = _c.value;
|
|
144
|
+
if (value && Object.prototype.hasOwnProperty.call(value, key)) {
|
|
145
|
+
this.members[key].reset(value[key]);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
this.members[key].reset();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
153
|
+
finally {
|
|
154
|
+
try {
|
|
155
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
156
|
+
}
|
|
157
|
+
finally { if (e_6) throw e_6.error; }
|
|
158
|
+
}
|
|
159
|
+
this.update();
|
|
160
|
+
return this;
|
|
161
|
+
}, get: function (path) {
|
|
162
|
+
return getMember(this, path);
|
|
163
|
+
}, addControl: function (name, control) {
|
|
164
|
+
if (this.contains(name)) {
|
|
165
|
+
throw new Error("Form group already contains a control called \"" + name + "\".");
|
|
166
|
+
}
|
|
167
|
+
this.members[name] = control;
|
|
168
|
+
this.update();
|
|
169
|
+
return this;
|
|
170
|
+
}, removeControl: function (name) {
|
|
171
|
+
delete this.members[name];
|
|
172
|
+
this.update();
|
|
173
|
+
return this;
|
|
174
|
+
}, setControl: function (name, control) {
|
|
175
|
+
this.members[name] = control;
|
|
176
|
+
this.update();
|
|
177
|
+
return this;
|
|
178
|
+
}, contains: function (name) {
|
|
179
|
+
return Object.keys(this.members).indexOf(name) > -1;
|
|
180
|
+
} });
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=formGroup.js.map
|
|
@@ -0,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enum ValidationMode {
|
|
3
|
+
ON_CHANGE = 0,
|
|
4
|
+
ON_BLUR = 1,
|
|
5
|
+
ON_SUBMIT = 2
|
|
6
|
+
}
|
|
7
|
+
export declare function useCustomValidator<T>(validator: SpsValidator<T>, validatorConfig?: Record<string, ValidationMode>, dependencies?: any[]): SpsValidator<T>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __values = (this && this.__values) || function(o) {
|
|
2
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
3
|
+
if (m) return m.call(o);
|
|
4
|
+
if (o && typeof o.length === "number") return {
|
|
5
|
+
next: function () {
|
|
6
|
+
if (o && i >= o.length) o = void 0;
|
|
7
|
+
return { value: o && o[i++], done: !o };
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
11
|
+
};
|
|
12
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import * as React from "react";
|
|
29
|
+
import { addOnChangeErrorKey, addOnSubmitErrorKey } from "../validation/types";
|
|
30
|
+
export var ValidationMode;
|
|
31
|
+
(function (ValidationMode) {
|
|
32
|
+
ValidationMode[ValidationMode["ON_CHANGE"] = 0] = "ON_CHANGE";
|
|
33
|
+
ValidationMode[ValidationMode["ON_BLUR"] = 1] = "ON_BLUR";
|
|
34
|
+
ValidationMode[ValidationMode["ON_SUBMIT"] = 2] = "ON_SUBMIT";
|
|
35
|
+
})(ValidationMode || (ValidationMode = {}));
|
|
36
|
+
export function useCustomValidator(validator, validatorConfig, dependencies) {
|
|
37
|
+
var e_1, _a;
|
|
38
|
+
if (validatorConfig === void 0) { validatorConfig = {}; }
|
|
39
|
+
if (dependencies === void 0) { dependencies = []; }
|
|
40
|
+
try {
|
|
41
|
+
for (var _b = __values(Object.entries(validatorConfig)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
42
|
+
var _d = __read(_c.value, 2), key = _d[0], validateOption = _d[1];
|
|
43
|
+
if (validateOption === ValidationMode.ON_CHANGE) {
|
|
44
|
+
addOnChangeErrorKey(key);
|
|
45
|
+
}
|
|
46
|
+
else if (validateOption === ValidationMode.ON_SUBMIT) {
|
|
47
|
+
addOnSubmitErrorKey(key);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
52
|
+
finally {
|
|
53
|
+
try {
|
|
54
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
55
|
+
}
|
|
56
|
+
finally { if (e_1) throw e_1.error; }
|
|
57
|
+
}
|
|
58
|
+
return React.useCallback(validator, dependencies);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=useCustomValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCustomValidator.js","sourceRoot":"","sources":["../../../../src/form/hooks/useCustomValidator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,6DAAS,CAAA;IACT,yDAAO,CAAA;IACP,6DAAS,CAAA;AACX,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,MAAM,UAAU,kBAAkB,CAChC,SAA0B,EAC1B,eAAoD,EACpD,YAAwB;;IADxB,gCAAA,EAAA,oBAAoD;IACpD,6BAAA,EAAA,iBAAwB;;QAExB,KAAoC,IAAA,KAAA,SAAA,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA,gBAAA,4BAAE;YAA1D,IAAA,KAAA,mBAAqB,EAApB,GAAG,QAAA,EAAE,cAAc,QAAA;YAC7B,IAAI,cAAc,KAAK,cAAc,CAAC,SAAS,EAAE;gBAC/C,mBAAmB,CAAC,GAAG,CAAC,CAAC;aAC1B;iBAAM,IAAI,cAAc,KAAK,cAAc,CAAC,SAAS,EAAE;gBACtD,mBAAmB,CAAC,GAAG,CAAC,CAAC;aAC1B;SACF;;;;;;;;;IAED,OAAO,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AACpD,CAAC"}
|