@sheinx/hooks 3.0.0-rc.2 → 3.0.0-rc.5
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/cjs/common/type.d.ts +15 -15
- package/cjs/common/type.d.ts.map +1 -1
- package/cjs/common/use-click-away/index.d.ts +2 -2
- package/cjs/common/use-click-away/index.d.ts.map +1 -1
- package/cjs/common/use-click-away/index.js +2 -3
- package/cjs/common/use-default-value/index.js +2 -2
- package/cjs/common/use-default-value/use-default-value.js +9 -5
- package/cjs/common/use-drag-mock/index.js +2 -2
- package/cjs/common/use-drag-mock/use-drag-mock.js +11 -8
- package/cjs/common/use-drag-mock/use-drag-move.js +15 -11
- package/cjs/common/use-drag-mock/use-drag-resize.js +9 -5
- package/cjs/common/use-filter/index.js +2 -2
- package/cjs/common/use-filter/use-filter.js +17 -13
- package/cjs/common/use-fork-ref/index.js +5 -10
- package/cjs/common/use-func-change/index.js +2 -2
- package/cjs/common/use-func-change/use-func-change.d.ts +1 -1
- package/cjs/common/use-func-change/use-func-change.js +2 -3
- package/cjs/common/use-input-able/index.js +2 -2
- package/cjs/common/use-input-able/use-Input-able.js +8 -4
- package/cjs/common/use-input-able/use-Input-able.type.d.ts +1 -1
- package/cjs/common/use-input-able/use-Input-able.type.d.ts.map +1 -1
- package/cjs/common/use-key-event/index.js +6 -8
- package/cjs/common/use-latest-obj/index.js +1 -3
- package/cjs/common/use-list-select/index.js +2 -2
- package/cjs/common/use-list-select/use-list-select-multiple.js +20 -29
- package/cjs/common/use-list-select/use-list-select-single.js +9 -11
- package/cjs/common/use-list-select/use-list-select.js +10 -12
- package/cjs/common/use-pagination-list/index.js +17 -15
- package/cjs/common/use-persist-fn/index.js +1 -2
- package/cjs/common/use-position-style/get-position-style.js +10 -7
- package/cjs/common/use-position-style/index.d.ts +3 -3
- package/cjs/common/use-position-style/index.d.ts.map +1 -1
- package/cjs/common/use-position-style/index.js +16 -22
- package/cjs/common/use-previous/index.js +1 -2
- package/cjs/common/use-render/index.js +8 -5
- package/cjs/common/use-resize/index.js +11 -9
- package/cjs/common/use-safe-state/index.js +8 -5
- package/cjs/common/use-style/index.js +0 -2
- package/cjs/common/use-toggle/index.d.ts +1 -1
- package/cjs/common/use-toggle/index.d.ts.map +1 -1
- package/cjs/common/use-toggle/index.js +7 -3
- package/cjs/common/use-transform/index.js +2 -2
- package/cjs/common/use-transform/use-transform.js +13 -11
- package/cjs/common/use-unmounted-ref/index.js +1 -2
- package/cjs/components/use-button/index.js +2 -2
- package/cjs/components/use-button/use-button.d.ts +3 -3
- package/cjs/components/use-button/use-button.js +12 -13
- package/cjs/components/use-button/use-button.type.d.ts +3 -3
- package/cjs/components/use-button/use-button.type.d.ts.map +1 -1
- package/cjs/components/use-carousel/index.js +2 -2
- package/cjs/components/use-carousel/use-carousel.d.ts +1 -1
- package/cjs/components/use-carousel/use-carousel.d.ts.map +1 -1
- package/cjs/components/use-carousel/use-carousel.js +9 -5
- package/cjs/components/use-cascader/index.js +2 -2
- package/cjs/components/use-cascader/use-cascader.js +2 -3
- package/cjs/components/use-check/index.js +2 -2
- package/cjs/components/use-check/use-check.d.ts +3 -3
- package/cjs/components/use-check/use-check.js +24 -17
- package/cjs/components/use-collapse/index.js +2 -2
- package/cjs/components/use-collapse/use-collapse-item.d.ts +4 -4
- package/cjs/components/use-collapse/use-collapse-item.js +7 -10
- package/cjs/components/use-collapse/use-collapse-item.type.d.ts +1 -1
- package/cjs/components/use-collapse/use-collapse-item.type.d.ts.map +1 -1
- package/cjs/components/use-collapse/use-collapse.js +14 -13
- package/cjs/components/use-datepicker/index.js +2 -2
- package/cjs/components/use-datepicker/use-date.js +13 -11
- package/cjs/components/use-datepicker/use-datepicker-format.js +26 -21
- package/cjs/components/use-datepicker/use-datepicker-format.type.d.ts +4 -4
- package/cjs/components/use-datepicker/use-datepicker-format.type.d.ts.map +1 -1
- package/cjs/components/use-datepicker/use-datepicker-range.js +10 -7
- package/cjs/components/use-datepicker/use-datepicker-range.type.d.ts +1 -1
- package/cjs/components/use-datepicker/use-datepicker-range.type.d.ts.map +1 -1
- package/cjs/components/use-datepicker/use-month.js +13 -11
- package/cjs/components/use-datepicker/use-quarter.js +13 -12
- package/cjs/components/use-datepicker/use-time.js +3 -8
- package/cjs/components/use-datepicker/use-year.js +13 -11
- package/cjs/components/use-datepicker/util.d.ts +3 -3
- package/cjs/components/use-datepicker/util.d.ts.map +1 -1
- package/cjs/components/use-datepicker/util.js +13 -20
- package/cjs/components/use-descriptions/index.js +2 -2
- package/cjs/components/use-descriptions/use-descriptions.js +14 -11
- package/cjs/components/use-form/Provider.js +6 -10
- package/cjs/components/use-form/form-bind-context.js +6 -11
- package/cjs/components/use-form/form-config-context.js +6 -11
- package/cjs/components/use-form/form-func-context.js +6 -11
- package/cjs/components/use-form/index.js +2 -3
- package/cjs/components/use-form/use-form-control/index.js +2 -2
- package/cjs/components/use-form/use-form-control/use-form-control.js +23 -23
- package/cjs/components/use-form/use-form-fieldset/fieldset-context.js +10 -19
- package/cjs/components/use-form/use-form-fieldset/index.js +2 -2
- package/cjs/components/use-form/use-form-fieldset/use-form-fieldset.js +3 -5
- package/cjs/components/use-form/use-form-flow/index.js +2 -2
- package/cjs/components/use-form/use-form-flow/use-form-datum.js +1 -2
- package/cjs/components/use-form/use-form-flow/use-form-flow.js +2 -3
- package/cjs/components/use-form/use-form-item/form-item-context.js +5 -9
- package/cjs/components/use-form/use-form-item/index.js +2 -2
- package/cjs/components/use-form/use-form-item/use-form-item.js +12 -13
- package/cjs/components/use-form/use-form.d.ts +2 -2
- package/cjs/components/use-form/use-form.js +28 -37
- package/cjs/components/use-form/use-form.type.d.ts +4 -4
- package/cjs/components/use-form/use-form.type.d.ts.map +1 -1
- package/cjs/components/use-image/index.js +2 -2
- package/cjs/components/use-image/use-image-gallery.d.ts +4 -4
- package/cjs/components/use-image/use-image-gallery.d.ts.map +1 -1
- package/cjs/components/use-image/use-image-gallery.js +18 -15
- package/cjs/components/use-image/use-image-gallery.type.d.ts +1 -1
- package/cjs/components/use-image/use-image-gallery.type.d.ts.map +1 -1
- package/cjs/components/use-image/use-image-group.d.ts +2 -2
- package/cjs/components/use-image/use-image-group.d.ts.map +1 -1
- package/cjs/components/use-image/use-image-group.js +9 -12
- package/cjs/components/use-image/use-image-magnify.js +13 -13
- package/cjs/components/use-image/use-image.d.ts +3 -3
- package/cjs/components/use-image/use-image.d.ts.map +1 -1
- package/cjs/components/use-image/use-image.js +17 -23
- package/cjs/components/use-image/use-image.type.d.ts +4 -4
- package/cjs/components/use-image/use-image.type.d.ts.map +1 -1
- package/cjs/components/use-input/index.js +2 -2
- package/cjs/components/use-input/use-input-format.d.ts +1 -1
- package/cjs/components/use-input/use-input-format.js +13 -15
- package/cjs/components/use-input/use-input-format.type.d.ts +1 -1
- package/cjs/components/use-input/use-input-format.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-number.d.ts +1 -1
- package/cjs/components/use-input/use-input-number.js +15 -16
- package/cjs/components/use-input/use-input-number.type.d.ts +1 -1
- package/cjs/components/use-input/use-input-number.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-password.js +11 -9
- package/cjs/components/use-input/use-input-password.type.d.ts +1 -1
- package/cjs/components/use-input/use-input-password.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input.d.ts +3 -3
- package/cjs/components/use-input/use-input.js +30 -29
- package/cjs/components/use-input/use-input.type.d.ts +5 -5
- package/cjs/components/use-input/use-input.type.d.ts.map +1 -1
- package/cjs/components/use-menu/index.js +2 -2
- package/cjs/components/use-menu/use-menu-item.d.ts +1 -1
- package/cjs/components/use-menu/use-menu-item.d.ts.map +1 -1
- package/cjs/components/use-menu/use-menu-item.js +11 -12
- package/cjs/components/use-menu/use-menu.js +2 -8
- package/cjs/components/use-menu/use-menu.type.d.ts +1 -1
- package/cjs/components/use-menu/use-menu.type.d.ts.map +1 -1
- package/cjs/components/use-pagination/index.js +2 -2
- package/cjs/components/use-pagination/use-pagination.d.ts +1 -1
- package/cjs/components/use-pagination/use-pagination.js +16 -13
- package/cjs/components/use-popup/index.js +2 -2
- package/cjs/components/use-popup/popup-context.js +1 -2
- package/cjs/components/use-popup/use-popup.js +14 -11
- package/cjs/components/use-popup/use-popup.type.d.ts +1 -1
- package/cjs/components/use-popup/use-popup.type.d.ts.map +1 -1
- package/cjs/components/use-select/index.js +2 -2
- package/cjs/components/use-select/use-select-group.js +13 -10
- package/cjs/components/use-select/use-select.js +1 -2
- package/cjs/components/use-select/use-select.type.d.ts +1 -1
- package/cjs/components/use-select/use-select.type.d.ts.map +1 -1
- package/cjs/components/use-slider/index.js +2 -2
- package/cjs/components/use-slider/use-slider.js +15 -10
- package/cjs/components/use-table/index.js +2 -2
- package/cjs/components/use-table/use-table-columns.d.ts +1 -1
- package/cjs/components/use-table/use-table-columns.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-columns.js +4 -8
- package/cjs/components/use-table/use-table-expand.js +19 -20
- package/cjs/components/use-table/use-table-group.js +1 -7
- package/cjs/components/use-table/use-table-layout.js +34 -34
- package/cjs/components/use-table/use-table-row.js +8 -9
- package/cjs/components/use-table/use-table-sort.d.ts +1 -1
- package/cjs/components/use-table/use-table-sort.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-sort.js +21 -22
- package/cjs/components/use-table/use-table-tree.js +19 -26
- package/cjs/components/use-table/use-table-virtual.js +17 -13
- package/cjs/components/use-table/use-table.type.d.ts +4 -4
- package/cjs/components/use-table/use-table.type.d.ts.map +1 -1
- package/cjs/components/use-tabs/context.js +7 -13
- package/cjs/components/use-tabs/index.js +2 -2
- package/cjs/components/use-tabs/use-tabs.js +9 -6
- package/cjs/components/use-tabs/use-tabs.type.d.ts +1 -1
- package/cjs/components/use-tabs/use-tabs.type.d.ts.map +1 -1
- package/cjs/components/use-textarea/index.js +2 -2
- package/cjs/components/use-textarea/use-textarea-format.js +5 -7
- package/cjs/components/use-textarea/use-textarea-format.type.d.ts +1 -1
- package/cjs/components/use-textarea/use-textarea-format.type.d.ts.map +1 -1
- package/cjs/components/use-textarea/use-textarea.d.ts +2 -2
- package/cjs/components/use-textarea/use-textarea.js +23 -18
- package/cjs/components/use-textarea/use-textarea.type.d.ts +3 -3
- package/cjs/components/use-textarea/use-textarea.type.d.ts.map +1 -1
- package/cjs/components/use-transfer/index.js +2 -2
- package/cjs/components/use-transfer/use-transfer.js +20 -19
- package/cjs/components/use-transfer/use-transfer.type.d.ts +1 -1
- package/cjs/components/use-transfer/use-transfer.type.d.ts.map +1 -1
- package/cjs/components/use-tree/index.js +2 -2
- package/cjs/components/use-tree/use-tree-node.js +11 -7
- package/cjs/components/use-tree/use-tree-node.type.d.ts +2 -2
- package/cjs/components/use-tree/use-tree-node.type.d.ts.map +1 -1
- package/cjs/components/use-tree/use-tree.js +11 -16
- package/cjs/components/use-tree/use-tree.type.d.ts +3 -3
- package/cjs/components/use-tree/use-tree.type.d.ts.map +1 -1
- package/cjs/components/use-treeselect/index.js +2 -2
- package/cjs/components/use-treeselect/use-tiled.js +13 -9
- package/cjs/components/use-treeselect/use-tiled.type.d.ts +1 -1
- package/cjs/components/use-treeselect/use-tiled.type.d.ts.map +1 -1
- package/cjs/components/use-treeselect/use-treeselect.js +1 -2
- package/cjs/components/use-upload/index.js +2 -2
- package/cjs/components/use-upload/use-upload.js +36 -34
- package/cjs/components/use-upload/xhr.js +0 -1
- package/cjs/components/use-validate/index.js +2 -2
- package/cjs/components/use-validate/use-validate.js +9 -5
- package/cjs/index.js +4 -9
- package/cjs/utils/accept.d.ts +1 -1
- package/cjs/utils/accept.d.ts.map +1 -1
- package/cjs/utils/accept.js +0 -4
- package/cjs/utils/array.js +2 -4
- package/cjs/utils/attribute.js +3 -5
- package/cjs/utils/clone.js +11 -20
- package/cjs/utils/document.js +2 -4
- package/cjs/utils/dom/element.js +11 -11
- package/cjs/utils/dom/index.js +2 -3
- package/cjs/utils/dom/responsiveObserve.js +10 -15
- package/cjs/utils/dom/responsiveObserve.type.d.ts +4 -4
- package/cjs/utils/dom/responsiveObserve.type.d.ts.map +1 -1
- package/cjs/utils/dom/scroll-behavior.js +2 -3
- package/cjs/utils/extract-event-handlers.js +0 -6
- package/cjs/utils/func.js +3 -5
- package/cjs/utils/immer.d.ts +1 -8
- package/cjs/utils/immer.d.ts.map +1 -1
- package/cjs/utils/immer.js +11 -8
- package/cjs/utils/index.js +2 -3
- package/cjs/utils/is.d.ts +1 -1
- package/cjs/utils/is.d.ts.map +1 -1
- package/cjs/utils/is.js +30 -55
- package/cjs/utils/lazyload.d.ts +1 -1
- package/cjs/utils/lazyload.d.ts.map +1 -1
- package/cjs/utils/lazyload.js +0 -1
- package/cjs/utils/number.js +0 -7
- package/cjs/utils/object.d.ts +4 -4
- package/cjs/utils/object.d.ts.map +1 -1
- package/cjs/utils/object.js +18 -37
- package/cjs/utils/position.js +4 -3
- package/cjs/utils/react-render.d.ts +1 -1
- package/cjs/utils/react-render.d.ts.map +1 -1
- package/cjs/utils/react-render.js +17 -24
- package/cjs/utils/render.d.ts +1 -1
- package/cjs/utils/render.d.ts.map +1 -1
- package/cjs/utils/render.js +3 -5
- package/cjs/utils/rule/index.js +2 -2
- package/cjs/utils/rule/length.d.ts +1 -1
- package/cjs/utils/rule/length.js +9 -11
- package/cjs/utils/rule/regexp.d.ts +1 -1
- package/cjs/utils/rule/regexp.js +4 -9
- package/cjs/utils/rule/required.d.ts +1 -1
- package/cjs/utils/rule/required.js +3 -5
- package/cjs/utils/rule/rule.js +4 -9
- package/cjs/utils/rule/rule.type.d.ts +8 -8
- package/cjs/utils/rule/rule.type.d.ts.map +1 -1
- package/cjs/utils/rule/type.d.ts +1 -1
- package/cjs/utils/rule/type.js +3 -5
- package/cjs/utils/shallow-equal.js +4 -9
- package/cjs/utils/string.js +0 -7
- package/cjs/utils/style-unit.js +0 -2
- package/cjs/utils/tree.d.ts +1 -1
- package/cjs/utils/tree.d.ts.map +1 -1
- package/cjs/utils/tree.js +19 -21
- package/cjs/utils/uid.js +0 -11
- package/cjs/utils/validate/error.js +22 -18
- package/cjs/utils/validate/get-rule.js +1 -4
- package/cjs/utils/validate/index.d.ts +1 -1
- package/cjs/utils/validate/index.d.ts.map +1 -1
- package/cjs/utils/validate/index.js +13 -13
- package/cjs/utils/validate/isJson.js +2 -5
- package/cjs/utils/validate/nullable.js +2 -3
- package/cjs/utils/validate/type.d.ts +1 -1
- package/cjs/utils/validate/type.d.ts.map +1 -1
- package/cjs/utils/validate/type.js +4 -9
- package/esm/common/type.d.ts +15 -15
- package/esm/common/type.d.ts.map +1 -1
- package/esm/common/type.js +1 -5
- package/esm/common/use-click-away/index.d.ts +2 -2
- package/esm/common/use-click-away/index.d.ts.map +1 -1
- package/esm/common/use-click-away/index.js +8 -17
- package/esm/common/use-default-value/index.js +2 -26
- package/esm/common/use-default-value/use-default-value.js +16 -19
- package/esm/common/use-default-value/use-previous.js +4 -10
- package/esm/common/use-drag-mock/index.js +3 -33
- package/esm/common/use-drag-mock/use-drag-mock.js +17 -20
- package/esm/common/use-drag-mock/use-drag-move.js +25 -28
- package/esm/common/use-drag-mock/use-drag-resize.js +19 -22
- package/esm/common/use-filter/index.js +1 -19
- package/esm/common/use-filter/use-filter.js +34 -36
- package/esm/common/use-filter/use-filter.type.js +1 -5
- package/esm/common/use-fork-ref/index.js +5 -20
- package/esm/common/use-fork-ref/setRef.js +1 -7
- package/esm/common/use-func-change/index.js +1 -19
- package/esm/common/use-func-change/use-func-change.d.ts +1 -1
- package/esm/common/use-func-change/use-func-change.js +8 -16
- package/esm/common/use-input-able/index.js +1 -19
- package/esm/common/use-input-able/use-Input-able.js +25 -28
- package/esm/common/use-input-able/use-Input-able.type.d.ts +1 -1
- package/esm/common/use-input-able/use-Input-able.type.d.ts.map +1 -1
- package/esm/common/use-input-able/use-Input-able.type.js +1 -5
- package/esm/common/use-key-event/index.js +7 -15
- package/esm/common/use-latest-obj/index.js +4 -12
- package/esm/common/use-list-select/index.js +3 -33
- package/esm/common/use-list-select/use-list-select-multiple.js +35 -54
- package/esm/common/use-list-select/use-list-select-single.js +17 -26
- package/esm/common/use-list-select/use-list-select.js +16 -25
- package/esm/common/use-list-select/use-list.type.js +1 -5
- package/esm/common/use-pagination-list/index.js +22 -26
- package/esm/common/use-persist-fn/index.js +5 -11
- package/esm/common/use-position-style/get-position-style.js +10 -13
- package/esm/common/use-position-style/index.d.ts +3 -3
- package/esm/common/use-position-style/index.d.ts.map +1 -1
- package/esm/common/use-position-style/index.js +25 -41
- package/esm/common/use-previous/index.js +5 -13
- package/esm/common/use-render/index.js +15 -19
- package/esm/common/use-resize/index.js +17 -21
- package/esm/common/use-safe-state/index.js +15 -19
- package/esm/common/use-style/index.js +3 -11
- package/esm/common/use-toggle/index.d.ts +1 -1
- package/esm/common/use-toggle/index.d.ts.map +1 -1
- package/esm/common/use-toggle/index.js +12 -14
- package/esm/common/use-transform/index.js +1 -19
- package/esm/common/use-transform/use-transform.js +23 -27
- package/esm/common/use-transform/use-transform.type.js +1 -5
- package/esm/common/use-unmounted-ref/index.js +5 -13
- package/esm/components/use-button/index.js +1 -19
- package/esm/components/use-button/use-button-group.type.js +1 -5
- package/esm/components/use-button/use-button.d.ts +3 -3
- package/esm/components/use-button/use-button.js +17 -24
- package/esm/components/use-button/use-button.type.d.ts +3 -3
- package/esm/components/use-button/use-button.type.d.ts.map +1 -1
- package/esm/components/use-button/use-button.type.js +1 -5
- package/esm/components/use-carousel/index.js +1 -19
- package/esm/components/use-carousel/use-carousel.d.ts +1 -1
- package/esm/components/use-carousel/use-carousel.d.ts.map +1 -1
- package/esm/components/use-carousel/use-carousel.js +21 -24
- package/esm/components/use-cascader/index.js +1 -19
- package/esm/components/use-cascader/use-cascader.js +5 -13
- package/esm/components/use-cascader/use-cascader.type.js +1 -5
- package/esm/components/use-check/index.js +1 -19
- package/esm/components/use-check/use-check.d.ts +3 -3
- package/esm/components/use-check/use-check.js +32 -31
- package/esm/components/use-check/use-check.type.js +1 -5
- package/esm/components/use-collapse/index.js +2 -26
- package/esm/components/use-collapse/use-collapse-item.d.ts +4 -4
- package/esm/components/use-collapse/use-collapse-item.js +9 -18
- package/esm/components/use-collapse/use-collapse-item.type.d.ts +1 -1
- package/esm/components/use-collapse/use-collapse-item.type.d.ts.map +1 -1
- package/esm/components/use-collapse/use-collapse-item.type.js +1 -5
- package/esm/components/use-collapse/use-collapse.js +17 -22
- package/esm/components/use-collapse/use-collapse.type.js +1 -5
- package/esm/components/use-datepicker/index.js +8 -62
- package/esm/components/use-datepicker/use-date.js +53 -57
- package/esm/components/use-datepicker/use-date.type.js +1 -5
- package/esm/components/use-datepicker/use-datepicker-format.js +54 -56
- package/esm/components/use-datepicker/use-datepicker-format.type.d.ts +4 -4
- package/esm/components/use-datepicker/use-datepicker-format.type.d.ts.map +1 -1
- package/esm/components/use-datepicker/use-datepicker-format.type.js +1 -5
- package/esm/components/use-datepicker/use-datepicker-range.js +43 -47
- package/esm/components/use-datepicker/use-datepicker-range.type.d.ts +1 -1
- package/esm/components/use-datepicker/use-datepicker-range.type.d.ts.map +1 -1
- package/esm/components/use-datepicker/use-datepicker-range.type.js +1 -5
- package/esm/components/use-datepicker/use-month.js +37 -41
- package/esm/components/use-datepicker/use-month.type.js +1 -5
- package/esm/components/use-datepicker/use-quarter.js +36 -41
- package/esm/components/use-datepicker/use-quarter.type.js +1 -5
- package/esm/components/use-datepicker/use-time.js +23 -35
- package/esm/components/use-datepicker/use-time.type.js +1 -5
- package/esm/components/use-datepicker/use-year.js +37 -41
- package/esm/components/use-datepicker/use-year.type.js +1 -5
- package/esm/components/use-datepicker/util.d.ts +3 -3
- package/esm/components/use-datepicker/util.d.ts.map +1 -1
- package/esm/components/use-datepicker/util.js +67 -80
- package/esm/components/use-descriptions/index.js +1 -19
- package/esm/components/use-descriptions/use-descriptions.js +24 -27
- package/esm/components/use-descriptions/use-descriptions.type.js +1 -5
- package/esm/components/use-form/Provider.js +12 -26
- package/esm/components/use-form/form-bind-context.js +4 -17
- package/esm/components/use-form/form-config-context.js +4 -17
- package/esm/components/use-form/form-func-context.js +4 -17
- package/esm/components/use-form/index.js +7 -87
- package/esm/components/use-form/use-form-control/index.js +1 -19
- package/esm/components/use-form/use-form-control/use-form-control.js +57 -66
- package/esm/components/use-form/use-form-control/use-form-control.type.js +1 -5
- package/esm/components/use-form/use-form-fieldset/fieldset-context.js +13 -29
- package/esm/components/use-form/use-form-fieldset/index.js +2 -26
- package/esm/components/use-form/use-form-fieldset/use-form-fieldset.js +6 -15
- package/esm/components/use-form/use-form-fieldset/use-form-fieldset.type.js +1 -5
- package/esm/components/use-form/use-form-flow/index.js +2 -26
- package/esm/components/use-form/use-form-flow/use-form-datum.js +4 -11
- package/esm/components/use-form/use-form-flow/use-form-flow.js +9 -17
- package/esm/components/use-form/use-form-flow/use-form-flow.type.js +1 -5
- package/esm/components/use-form/use-form-item/form-item-context.js +3 -15
- package/esm/components/use-form/use-form-item/index.js +1 -19
- package/esm/components/use-form/use-form-item/use-form-item.js +21 -32
- package/esm/components/use-form/use-form.d.ts +2 -2
- package/esm/components/use-form/use-form.js +65 -83
- package/esm/components/use-form/use-form.type.d.ts +4 -4
- package/esm/components/use-form/use-form.type.d.ts.map +1 -1
- package/esm/components/use-form/use-form.type.js +1 -5
- package/esm/components/use-image/index.js +4 -40
- package/esm/components/use-image/use-image-gallery.d.ts +4 -4
- package/esm/components/use-image/use-image-gallery.d.ts.map +1 -1
- package/esm/components/use-image/use-image-gallery.js +34 -37
- package/esm/components/use-image/use-image-gallery.type.d.ts +1 -1
- package/esm/components/use-image/use-image-gallery.type.d.ts.map +1 -1
- package/esm/components/use-image/use-image-gallery.type.js +1 -5
- package/esm/components/use-image/use-image-group.d.ts +2 -2
- package/esm/components/use-image/use-image-group.d.ts.map +1 -1
- package/esm/components/use-image/use-image-group.js +15 -24
- package/esm/components/use-image/use-image-group.type.js +1 -5
- package/esm/components/use-image/use-image-magnify.js +17 -26
- package/esm/components/use-image/use-image-magnify.type.js +1 -5
- package/esm/components/use-image/use-image.d.ts +3 -3
- package/esm/components/use-image/use-image.d.ts.map +1 -1
- package/esm/components/use-image/use-image.js +28 -41
- package/esm/components/use-image/use-image.type.d.ts +4 -4
- package/esm/components/use-image/use-image.type.d.ts.map +1 -1
- package/esm/components/use-image/use-image.type.js +1 -5
- package/esm/components/use-input/index.js +4 -40
- package/esm/components/use-input/use-input-format.d.ts +1 -1
- package/esm/components/use-input/use-input-format.js +18 -27
- package/esm/components/use-input/use-input-format.type.d.ts +1 -1
- package/esm/components/use-input/use-input-format.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input-format.type.js +1 -5
- package/esm/components/use-input/use-input-number.d.ts +1 -1
- package/esm/components/use-input/use-input-number.js +23 -31
- package/esm/components/use-input/use-input-number.type.d.ts +1 -1
- package/esm/components/use-input/use-input-number.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input-number.type.js +1 -5
- package/esm/components/use-input/use-input-password.js +16 -21
- package/esm/components/use-input/use-input-password.type.d.ts +1 -1
- package/esm/components/use-input/use-input-password.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input-password.type.js +1 -5
- package/esm/components/use-input/use-input.d.ts +3 -3
- package/esm/components/use-input/use-input.js +34 -42
- package/esm/components/use-input/use-input.type.d.ts +5 -5
- package/esm/components/use-input/use-input.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input.type.js +1 -5
- package/esm/components/use-menu/index.js +2 -20
- package/esm/components/use-menu/use-menu-item.d.ts +1 -1
- package/esm/components/use-menu/use-menu-item.d.ts.map +1 -1
- package/esm/components/use-menu/use-menu-item.js +23 -31
- package/esm/components/use-menu/use-menu.js +15 -28
- package/esm/components/use-menu/use-menu.type.d.ts +1 -1
- package/esm/components/use-menu/use-menu.type.d.ts.map +1 -1
- package/esm/components/use-menu/use-menu.type.js +1 -5
- package/esm/components/use-pagination/index.js +1 -19
- package/esm/components/use-pagination/use-pagination.d.ts +1 -1
- package/esm/components/use-pagination/use-pagination.js +22 -25
- package/esm/components/use-pagination/use-pagination.type.js +1 -5
- package/esm/components/use-popup/index.js +1 -19
- package/esm/components/use-popup/popup-context.js +3 -9
- package/esm/components/use-popup/use-popup.js +35 -39
- package/esm/components/use-popup/use-popup.type.d.ts +1 -1
- package/esm/components/use-popup/use-popup.type.d.ts.map +1 -1
- package/esm/components/use-popup/use-popup.type.js +1 -5
- package/esm/components/use-select/index.js +2 -26
- package/esm/components/use-select/use-select-group.js +19 -22
- package/esm/components/use-select/use-select-group.type.js +1 -5
- package/esm/components/use-select/use-select.js +5 -12
- package/esm/components/use-select/use-select.type.d.ts +1 -1
- package/esm/components/use-select/use-select.type.d.ts.map +1 -1
- package/esm/components/use-select/use-select.type.js +1 -5
- package/esm/components/use-slider/index.js +1 -19
- package/esm/components/use-slider/use-slider.js +30 -32
- package/esm/components/use-slider/use-slider.type.js +1 -5
- package/esm/components/use-table/index.js +8 -68
- package/esm/components/use-table/use-table-columns.d.ts +1 -1
- package/esm/components/use-table/use-table-columns.d.ts.map +1 -1
- package/esm/components/use-table/use-table-columns.js +9 -20
- package/esm/components/use-table/use-table-expand.js +24 -35
- package/esm/components/use-table/use-table-group.js +5 -17
- package/esm/components/use-table/use-table-layout.js +66 -75
- package/esm/components/use-table/use-table-row.js +18 -25
- package/esm/components/use-table/use-table-sort.d.ts +1 -1
- package/esm/components/use-table/use-table-sort.d.ts.map +1 -1
- package/esm/components/use-table/use-table-sort.js +34 -41
- package/esm/components/use-table/use-table-tree.js +36 -49
- package/esm/components/use-table/use-table-virtual.js +34 -36
- package/esm/components/use-table/use-table.type.d.ts +4 -4
- package/esm/components/use-table/use-table.type.d.ts.map +1 -1
- package/esm/components/use-table/use-table.type.js +1 -5
- package/esm/components/use-tabs/context.js +7 -21
- package/esm/components/use-tabs/context.type.js +1 -5
- package/esm/components/use-tabs/index.js +2 -26
- package/esm/components/use-tabs/use-tabs.js +13 -16
- package/esm/components/use-tabs/use-tabs.type.d.ts +1 -1
- package/esm/components/use-tabs/use-tabs.type.d.ts.map +1 -1
- package/esm/components/use-tabs/use-tabs.type.js +1 -5
- package/esm/components/use-textarea/index.js +2 -26
- package/esm/components/use-textarea/use-textarea-format.js +6 -15
- package/esm/components/use-textarea/use-textarea-format.type.d.ts +1 -1
- package/esm/components/use-textarea/use-textarea-format.type.d.ts.map +1 -1
- package/esm/components/use-textarea/use-textarea-format.type.js +1 -5
- package/esm/components/use-textarea/use-textarea.d.ts +2 -2
- package/esm/components/use-textarea/use-textarea.js +31 -32
- package/esm/components/use-textarea/use-textarea.type.d.ts +3 -3
- package/esm/components/use-textarea/use-textarea.type.d.ts.map +1 -1
- package/esm/components/use-textarea/use-textarea.type.js +1 -5
- package/esm/components/use-transfer/index.js +1 -19
- package/esm/components/use-transfer/use-transfer.js +33 -38
- package/esm/components/use-transfer/use-transfer.type.d.ts +1 -1
- package/esm/components/use-transfer/use-transfer.type.d.ts.map +1 -1
- package/esm/components/use-transfer/use-transfer.type.js +1 -5
- package/esm/components/use-tree/index.js +2 -26
- package/esm/components/use-tree/use-tree-node.js +17 -20
- package/esm/components/use-tree/use-tree-node.type.d.ts +2 -2
- package/esm/components/use-tree/use-tree-node.type.d.ts.map +1 -1
- package/esm/components/use-tree/use-tree-node.type.js +1 -5
- package/esm/components/use-tree/use-tree.js +25 -37
- package/esm/components/use-tree/use-tree.type.d.ts +3 -3
- package/esm/components/use-tree/use-tree.type.d.ts.map +1 -1
- package/esm/components/use-tree/use-tree.type.js +1 -5
- package/esm/components/use-treeselect/index.js +2 -26
- package/esm/components/use-treeselect/use-tiled.js +22 -24
- package/esm/components/use-treeselect/use-tiled.type.d.ts +1 -1
- package/esm/components/use-treeselect/use-tiled.type.d.ts.map +1 -1
- package/esm/components/use-treeselect/use-tiled.type.js +1 -5
- package/esm/components/use-treeselect/use-treeselect.js +3 -10
- package/esm/components/use-treeselect/use-treeselect.type.js +1 -5
- package/esm/components/use-upload/index.js +1 -19
- package/esm/components/use-upload/use-upload.js +57 -62
- package/esm/components/use-upload/use-upload.type.js +1 -5
- package/esm/components/use-upload/xhr.js +1 -8
- package/esm/components/use-validate/index.js +1 -19
- package/esm/components/use-validate/use-validate.js +16 -19
- package/esm/components/use-validate/use-validate.type.js +1 -5
- package/esm/index.js +48 -547
- package/esm/utils/accept.d.ts +1 -1
- package/esm/utils/accept.d.ts.map +1 -1
- package/esm/utils/accept.js +1 -11
- package/esm/utils/array.js +2 -10
- package/esm/utils/attribute.js +3 -11
- package/esm/utils/clone.js +19 -34
- package/esm/utils/document.js +11 -20
- package/esm/utils/dom/element.js +23 -33
- package/esm/utils/dom/index.js +5 -69
- package/esm/utils/dom/normalize-wheel.js +1 -7
- package/esm/utils/dom/normalize-wheel.type.js +1 -5
- package/esm/utils/dom/ready.js +3 -9
- package/esm/utils/dom/responsiveObserve.js +10 -21
- package/esm/utils/dom/responsiveObserve.type.d.ts +4 -4
- package/esm/utils/dom/responsiveObserve.type.d.ts.map +1 -1
- package/esm/utils/dom/responsiveObserve.type.js +1 -5
- package/esm/utils/dom/scroll-behavior.js +2 -9
- package/esm/utils/extract-event-handlers.js +1 -13
- package/esm/utils/func.js +3 -11
- package/esm/utils/immer.d.ts +1 -8
- package/esm/utils/immer.d.ts.map +1 -1
- package/esm/utils/immer.js +12 -20
- package/esm/utils/index.js +22 -269
- package/esm/utils/is.d.ts +1 -1
- package/esm/utils/is.d.ts.map +1 -1
- package/esm/utils/is.js +33 -69
- package/esm/utils/lazyload.d.ts +1 -1
- package/esm/utils/lazyload.d.ts.map +1 -1
- package/esm/utils/lazyload.js +6 -15
- package/esm/utils/number.js +6 -24
- package/esm/utils/object.d.ts +4 -4
- package/esm/utils/object.d.ts.map +1 -1
- package/esm/utils/object.js +30 -59
- package/esm/utils/position.js +8 -13
- package/esm/utils/react-render.d.ts +1 -1
- package/esm/utils/react-render.d.ts.map +1 -1
- package/esm/utils/react-render.js +16 -31
- package/esm/utils/render.d.ts +1 -1
- package/esm/utils/render.d.ts.map +1 -1
- package/esm/utils/render.js +4 -13
- package/esm/utils/rule/index.js +1 -19
- package/esm/utils/rule/length.d.ts +1 -1
- package/esm/utils/rule/length.js +11 -19
- package/esm/utils/rule/regexp.d.ts +1 -1
- package/esm/utils/rule/regexp.js +7 -18
- package/esm/utils/rule/required.d.ts +1 -1
- package/esm/utils/rule/required.js +6 -14
- package/esm/utils/rule/rule.js +20 -33
- package/esm/utils/rule/rule.type.d.ts +8 -8
- package/esm/utils/rule/rule.type.d.ts.map +1 -1
- package/esm/utils/rule/rule.type.js +1 -5
- package/esm/utils/rule/type.d.ts +1 -1
- package/esm/utils/rule/type.js +6 -14
- package/esm/utils/shallow-equal.js +7 -21
- package/esm/utils/string.js +2 -16
- package/esm/utils/style-unit.js +3 -11
- package/esm/utils/tree.d.ts +1 -1
- package/esm/utils/tree.d.ts.map +1 -1
- package/esm/utils/tree.js +24 -32
- package/esm/utils/uid.js +2 -20
- package/esm/utils/validate/error.js +23 -26
- package/esm/utils/validate/get-rule.js +16 -26
- package/esm/utils/validate/index.d.ts +1 -1
- package/esm/utils/validate/index.d.ts.map +1 -1
- package/esm/utils/validate/index.js +20 -40
- package/esm/utils/validate/isJson.js +3 -12
- package/esm/utils/validate/nullable.js +2 -9
- package/esm/utils/validate/type.d.ts +1 -1
- package/esm/utils/validate/type.d.ts.map +1 -1
- package/esm/utils/validate/type.js +8 -19
- package/package.json +3 -2
@@ -1,19 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
var
|
9
|
-
var
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
require("core-js/modules/es.string.includes.js");
|
14
|
-
require("core-js/modules/es.array.filter.js");
|
15
|
-
var _react = require("react");
|
16
|
-
var _is = require("../../utils/is");
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
11
|
+
import { useState } from 'react';
|
12
|
+
import { isFunc } from "../../utils/is";
|
17
13
|
var getCurrentActive = function getCurrentActive(active, accordion) {
|
18
14
|
// @ts-ignore
|
19
15
|
var res = [].concat(active);
|
@@ -25,8 +21,8 @@ var useCollapse = function useCollapse(props) {
|
|
25
21
|
active = props.active,
|
26
22
|
accordion = props.accordion,
|
27
23
|
onChange = props.onChange;
|
28
|
-
var _useState =
|
29
|
-
_useState2 = (
|
24
|
+
var _useState = useState(getCurrentActive(defaultActive, accordion) || []),
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
30
26
|
currentActive = _useState2[0],
|
31
27
|
setCurrentActive = _useState2[1];
|
32
28
|
var getCurrentValue = function getCurrentValue() {
|
@@ -38,14 +34,13 @@ var useCollapse = function useCollapse(props) {
|
|
38
34
|
var isActive = currentActive.includes(newActive);
|
39
35
|
var newCurrentActive = isActive ? currentActive.filter(function (item) {
|
40
36
|
return item !== newActive;
|
41
|
-
}) : accordion ? [newActive] : [].concat((
|
37
|
+
}) : accordion ? [newActive] : [].concat(_toConsumableArray(currentActive), [newActive]);
|
42
38
|
if (active === undefined) setCurrentActive(newCurrentActive);
|
43
|
-
if (
|
39
|
+
if (isFunc(onChange)) onChange === null || onChange === void 0 || onChange(newActive, newCurrentActive, event);
|
44
40
|
};
|
45
41
|
return {
|
46
42
|
active: getCurrentValue(),
|
47
43
|
onChange: handleChange
|
48
44
|
};
|
49
45
|
};
|
50
|
-
|
51
|
-
exports.default = _default;
|
46
|
+
export default useCollapse;
|
@@ -1,63 +1,9 @@
|
|
1
|
-
"use strict";
|
2
1
|
"use client";
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
return _util.default;
|
12
|
-
}
|
13
|
-
});
|
14
|
-
Object.defineProperty(exports, "useDatePick", {
|
15
|
-
enumerable: true,
|
16
|
-
get: function get() {
|
17
|
-
return _useDate.default;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
Object.defineProperty(exports, "useDatePickerFormat", {
|
21
|
-
enumerable: true,
|
22
|
-
get: function get() {
|
23
|
-
return _useDatepickerFormat.default;
|
24
|
-
}
|
25
|
-
});
|
26
|
-
Object.defineProperty(exports, "useDatePickerRange", {
|
27
|
-
enumerable: true,
|
28
|
-
get: function get() {
|
29
|
-
return _useDatepickerRange.default;
|
30
|
-
}
|
31
|
-
});
|
32
|
-
Object.defineProperty(exports, "useMonthPick", {
|
33
|
-
enumerable: true,
|
34
|
-
get: function get() {
|
35
|
-
return _useMonth.default;
|
36
|
-
}
|
37
|
-
});
|
38
|
-
Object.defineProperty(exports, "useQuarterPick", {
|
39
|
-
enumerable: true,
|
40
|
-
get: function get() {
|
41
|
-
return _useQuarter.default;
|
42
|
-
}
|
43
|
-
});
|
44
|
-
Object.defineProperty(exports, "useTimePick", {
|
45
|
-
enumerable: true,
|
46
|
-
get: function get() {
|
47
|
-
return _useTime.default;
|
48
|
-
}
|
49
|
-
});
|
50
|
-
Object.defineProperty(exports, "useYearPick", {
|
51
|
-
enumerable: true,
|
52
|
-
get: function get() {
|
53
|
-
return _useYear.default;
|
54
|
-
}
|
55
|
-
});
|
56
|
-
var _useDatepickerFormat = _interopRequireDefault(require("./use-datepicker-format"));
|
57
|
-
var _util = _interopRequireDefault(require("./util"));
|
58
|
-
var _useDate = _interopRequireDefault(require("./use-date"));
|
59
|
-
var _useYear = _interopRequireDefault(require("./use-year"));
|
60
|
-
var _useMonth = _interopRequireDefault(require("./use-month"));
|
61
|
-
var _useQuarter = _interopRequireDefault(require("./use-quarter"));
|
62
|
-
var _useTime = _interopRequireDefault(require("./use-time"));
|
63
|
-
var _useDatepickerRange = _interopRequireDefault(require("./use-datepicker-range"));
|
2
|
+
export { default as useDatePickerFormat } from "./use-datepicker-format";
|
3
|
+
export { default as dateUtil } from "./util";
|
4
|
+
export { default as useDatePick } from "./use-date";
|
5
|
+
export { default as useYearPick } from "./use-year";
|
6
|
+
export { default as useMonthPick } from "./use-month";
|
7
|
+
export { default as useQuarterPick } from "./use-quarter";
|
8
|
+
export { default as useTimePick } from "./use-time";
|
9
|
+
export { default as useDatePickerRange } from "./use-datepicker-range";
|
@@ -1,25 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
var
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
var _util = _interopRequireDefault(require("./util"));
|
13
|
-
var _useLatestObj = _interopRequireDefault(require("../../common/use-latest-obj"));
|
14
|
-
var _usePersistFn = _interopRequireDefault(require("../../common/use-persist-fn"));
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
+
import { useRef, useState } from 'react';
|
8
|
+
import utils from "./util";
|
9
|
+
import useLatestObj from "../../common/use-latest-obj";
|
10
|
+
import dateUtil from "./util";
|
11
|
+
import usePersistFn from "../../common/use-persist-fn";
|
15
12
|
var useDate = function useDate(props) {
|
16
13
|
var options = props.options,
|
17
14
|
type = props.type;
|
18
|
-
var _useState =
|
19
|
-
_useState2 = (
|
15
|
+
var _useState = useState(props.defaultCurrent || new Date()),
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
20
17
|
currentState = _useState2[0],
|
21
18
|
setCurrentState = _useState2[1];
|
22
|
-
var _useRef =
|
19
|
+
var _useRef = useRef({
|
23
20
|
cachedMonth: undefined,
|
24
21
|
cachedDays: []
|
25
22
|
}),
|
@@ -29,44 +26,44 @@ var useDate = function useDate(props) {
|
|
29
26
|
var _props$onCurrentChang2;
|
30
27
|
if (props.current !== undefined) {
|
31
28
|
var _props$onCurrentChang;
|
32
|
-
(_props$onCurrentChang = props.onCurrentChange) === null || _props$onCurrentChang === void 0
|
29
|
+
(_props$onCurrentChang = props.onCurrentChange) === null || _props$onCurrentChang === void 0 || _props$onCurrentChang.call(props, date);
|
33
30
|
} else {
|
34
31
|
setCurrentState(date);
|
35
32
|
}
|
36
|
-
(_props$onCurrentChang2 = props.onCurrentChange) === null || _props$onCurrentChang2 === void 0
|
33
|
+
(_props$onCurrentChang2 = props.onCurrentChange) === null || _props$onCurrentChang2 === void 0 || _props$onCurrentChang2.call(props, date);
|
37
34
|
};
|
38
35
|
var isToday = function isToday(date) {
|
39
|
-
var today =
|
40
|
-
return
|
36
|
+
var today = utils.newDate(undefined, options);
|
37
|
+
return utils.isSameDay(date, today, options);
|
41
38
|
};
|
42
39
|
var getDays = function getDays() {
|
43
40
|
if (!current) return context.cachedDays;
|
44
|
-
var date =
|
45
|
-
if (context.cachedMonth &&
|
41
|
+
var date = utils.clearHMS(current, options);
|
42
|
+
if (context.cachedMonth && utils.isSameMonth(context.cachedMonth, date, options) && context.cachedDays.length) {
|
46
43
|
return context.cachedDays;
|
47
44
|
}
|
48
|
-
context.cachedDays =
|
45
|
+
context.cachedDays = utils.getDaysOfMonth(date, options);
|
49
46
|
context.cachedMonth = date;
|
50
47
|
return context.cachedDays;
|
51
48
|
};
|
52
|
-
var handleNextYear = (
|
53
|
-
var date =
|
49
|
+
var handleNextYear = usePersistFn(function () {
|
50
|
+
var date = utils.addYears(current, 1, options);
|
54
51
|
setCurrent(date);
|
55
52
|
});
|
56
|
-
var handlePrevYear = (
|
57
|
-
var date =
|
53
|
+
var handlePrevYear = usePersistFn(function () {
|
54
|
+
var date = utils.addYears(current, -1, options);
|
58
55
|
setCurrent(date);
|
59
56
|
});
|
60
|
-
var handleNextMonth = (
|
61
|
-
var date =
|
57
|
+
var handleNextMonth = usePersistFn(function () {
|
58
|
+
var date = utils.addMonths(current, 1, options);
|
62
59
|
setCurrent(date);
|
63
60
|
});
|
64
|
-
var handlePrevMonth = (
|
65
|
-
var date =
|
61
|
+
var handlePrevMonth = usePersistFn(function () {
|
62
|
+
var date = utils.addMonths(current, -1, options);
|
66
63
|
setCurrent(date);
|
67
64
|
});
|
68
65
|
var isCurrentMonth = function isCurrentMonth(date) {
|
69
|
-
return
|
66
|
+
return utils.isSameMonth(date, current, options);
|
70
67
|
};
|
71
68
|
var isDisabled = function isDisabled(date) {
|
72
69
|
var min = props.min,
|
@@ -75,9 +72,9 @@ var useDate = function useDate(props) {
|
|
75
72
|
var isDis = disabled && typeof disabled === 'function' ? disabled(date) : false;
|
76
73
|
if (type === 'week') {
|
77
74
|
// 选择周
|
78
|
-
if (min &&
|
79
|
-
if (max &&
|
80
|
-
} else if (min &&
|
75
|
+
if (min && utils.compareWeek(date, min, 0, options) < 0) isDis = true;
|
76
|
+
if (max && utils.compareWeek(date, max, 0, options) > 0) isDis = true;
|
77
|
+
} else if (min && utils.compareDay(date, min, 0, options) < 0 || max && utils.compareDay(date, max, 0, options) > 0) {
|
81
78
|
isDis = true;
|
82
79
|
}
|
83
80
|
return isDis;
|
@@ -85,34 +82,34 @@ var useDate = function useDate(props) {
|
|
85
82
|
var isActive = function isActive(date) {
|
86
83
|
if (!props.value) return false;
|
87
84
|
if (type === 'week') {
|
88
|
-
return
|
85
|
+
return utils.isSameWeek(date, props.value, options);
|
89
86
|
}
|
90
|
-
return
|
87
|
+
return utils.isSameDay(date, props.value, options);
|
91
88
|
};
|
92
89
|
var getDayStr = function getDayStr(date) {
|
93
|
-
return
|
90
|
+
return utils.getDateInfo(date, 'date', options);
|
94
91
|
};
|
95
92
|
var getWeekStr = function getWeekStr(date) {
|
96
|
-
return
|
93
|
+
return utils.getDateInfo(date, 'week', options);
|
97
94
|
};
|
98
95
|
var getDateWithTime = function getDateWithTime(date) {
|
99
96
|
var min = props.min,
|
100
97
|
max = props.max;
|
101
|
-
var timeDate = props.value || props.defaultTime &&
|
102
|
-
var newDate =
|
98
|
+
var timeDate = props.value || props.defaultTime && utils.cloneTime(date, props.defaultTime, utils.TIME_FORMAT, options);
|
99
|
+
var newDate = utils.toDate(date);
|
103
100
|
if (timeDate) {
|
104
|
-
newDate =
|
101
|
+
newDate = utils.setTime(newDate, timeDate, options);
|
105
102
|
}
|
106
103
|
// only can select day with the same day of min/max
|
107
|
-
if (min &&
|
108
|
-
if (max &&
|
104
|
+
if (min && utils.compareAsc(newDate, min) < 0) newDate = utils.setTime(newDate, min, options);
|
105
|
+
if (max && utils.compareAsc(newDate, max) > 0) newDate = utils.setTime(newDate, max, options);
|
109
106
|
return newDate;
|
110
107
|
};
|
111
108
|
var handleDayClick = function handleDayClick(date) {
|
112
109
|
var _props$onChange;
|
113
110
|
if (isDisabled(date)) return;
|
114
111
|
var newDate = getDateWithTime(date);
|
115
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0
|
112
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate);
|
116
113
|
setCurrent(newDate);
|
117
114
|
};
|
118
115
|
var getTimeStr = function getTimeStr() {
|
@@ -127,31 +124,31 @@ var useDate = function useDate(props) {
|
|
127
124
|
// eslint-disable-next-line
|
128
125
|
if (match) format = match[0];
|
129
126
|
}
|
130
|
-
return
|
127
|
+
return dateUtil.format(props.value, format, options);
|
131
128
|
};
|
132
129
|
var isInRange = function isInRange(date) {
|
133
130
|
var _ref = props.rangeDate || [],
|
134
|
-
_ref2 = (
|
131
|
+
_ref2 = _slicedToArray(_ref, 2),
|
135
132
|
start = _ref2[0],
|
136
133
|
end = _ref2[1];
|
137
134
|
if (!start || !end) return false;
|
138
135
|
if (type === 'week') {
|
139
136
|
if (start) {
|
140
|
-
start =
|
137
|
+
start = dateUtil.changeDate(start, 'weekday', 0, options);
|
141
138
|
}
|
142
139
|
if (end) {
|
143
|
-
end =
|
140
|
+
end = dateUtil.changeDate(end, 'weekday', 6, options);
|
144
141
|
}
|
145
142
|
}
|
146
|
-
var compareStart =
|
147
|
-
var compareEnd =
|
143
|
+
var compareStart = dateUtil.compareDay(date, start, 0, options);
|
144
|
+
var compareEnd = dateUtil.compareDay(date, end, 0, options);
|
148
145
|
if (compareStart === 0 && compareEnd === 0) return 'start-end';
|
149
146
|
if (compareStart === 0) return 'start';
|
150
147
|
if (compareEnd === 0) return 'end';
|
151
148
|
if (compareStart > 0 && compareEnd < 0) return 'in';
|
152
149
|
return false;
|
153
150
|
};
|
154
|
-
var func = (
|
151
|
+
var func = useLatestObj({
|
155
152
|
handleNextYear: handleNextYear,
|
156
153
|
handleNextMonth: handleNextMonth,
|
157
154
|
handlePrevYear: handlePrevYear,
|
@@ -168,8 +165,8 @@ var useDate = function useDate(props) {
|
|
168
165
|
getTimeStr: getTimeStr,
|
169
166
|
getDateWithTime: getDateWithTime
|
170
167
|
});
|
171
|
-
var currentYear =
|
172
|
-
var currentMonth =
|
168
|
+
var currentYear = utils.getDateInfo(current, 'year', options);
|
169
|
+
var currentMonth = utils.getDateInfo(current, 'month', options) + 1;
|
173
170
|
return {
|
174
171
|
current: current,
|
175
172
|
currentYear: currentYear,
|
@@ -177,5 +174,4 @@ var useDate = function useDate(props) {
|
|
177
174
|
func: func
|
178
175
|
};
|
179
176
|
};
|
180
|
-
|
181
|
-
exports.default = _default;
|
177
|
+
export default useDate;
|
@@ -1,24 +1,23 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
var
|
9
|
-
var
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
var _useLatestObj = _interopRequireDefault(require("../../common/use-latest-obj"));
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
11
|
+
import { useEffect, useRef, useState } from 'react';
|
12
|
+
import dateUtil from "./util";
|
13
|
+
import shallowEqual from "../../utils/shallow-equal";
|
14
|
+
import { usePersistFn } from "../../common/use-persist-fn";
|
15
|
+
import useLatestObj from "../../common/use-latest-obj";
|
17
16
|
var convertValueToDateArr = function convertValueToDateArr(value, format, options) {
|
18
17
|
var valueArr = Array.isArray(value) ? value : [value];
|
19
18
|
return valueArr.map(function (item) {
|
20
19
|
if (!item) return undefined;
|
21
|
-
return
|
20
|
+
return dateUtil.toDateWithFormat(item, format, undefined, options);
|
22
21
|
});
|
23
22
|
};
|
24
23
|
var getFormat = function getFormat(format, type) {
|
@@ -74,8 +73,8 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
74
73
|
disabled = props.disabled,
|
75
74
|
clearable = props.clearable;
|
76
75
|
var format = getFormat(props.format, type);
|
77
|
-
var _useState =
|
78
|
-
_useState2 = (
|
76
|
+
var _useState = useState(false),
|
77
|
+
_useState2 = _slicedToArray(_useState, 2),
|
79
78
|
control = _useState2[0],
|
80
79
|
setControl = _useState2[1];
|
81
80
|
var disabledStatus = undefined;
|
@@ -90,50 +89,50 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
90
89
|
if (range && !arr[1]) arr[1] = arr[0] || currentArr[1] || new Date();
|
91
90
|
return arr;
|
92
91
|
};
|
93
|
-
var _useState3 =
|
94
|
-
_useState4 = (
|
92
|
+
var _useState3 = useState(getDefaultMode(type)),
|
93
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
95
94
|
mode = _useState4[0],
|
96
95
|
setMode = _useState4[1];
|
97
|
-
var _useState5 =
|
98
|
-
_useState6 = (
|
96
|
+
var _useState5 = useState(getCurrentArr()),
|
97
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
99
98
|
currentArr = _useState6[0],
|
100
99
|
setCurrentArr = _useState6[1];
|
101
|
-
var _useState7 =
|
102
|
-
_useState8 = (
|
100
|
+
var _useState7 = useState([]),
|
101
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
103
102
|
targetArr = _useState8[0],
|
104
103
|
setTargetArr = _useState8[1];
|
105
|
-
var _useState9 =
|
104
|
+
var _useState9 = useState({
|
106
105
|
type: undefined,
|
107
106
|
quick: undefined
|
108
107
|
}),
|
109
|
-
_useState10 = (
|
108
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
110
109
|
params = _useState10[0],
|
111
110
|
setParams = _useState10[1];
|
112
|
-
var _useRef =
|
111
|
+
var _useRef = useRef({
|
113
112
|
cachedDateArr: convertValueToDateArr(value, format, options),
|
114
113
|
modeDisabledStart: {},
|
115
114
|
modeDisabledEnd: {}
|
116
115
|
}),
|
117
116
|
context = _useRef.current;
|
118
117
|
// 当edit 为true时,stateDate 否则返回 props date
|
119
|
-
var _useState11 =
|
120
|
-
_useState12 = (
|
118
|
+
var _useState11 = useState(context.cachedDateArr),
|
119
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
121
120
|
stateDate = _useState12[0],
|
122
121
|
setStateDate = _useState12[1];
|
123
|
-
var _useState13 =
|
124
|
-
_useState14 = (
|
122
|
+
var _useState13 = useState(false),
|
123
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
125
124
|
edit = _useState14[0],
|
126
125
|
setEdit = _useState14[1];
|
127
126
|
|
128
127
|
// 收集所有的disabled
|
129
|
-
var registerModeDisabled =
|
128
|
+
var registerModeDisabled = usePersistFn(function (position, mode, fn) {
|
130
129
|
if (position === 'end') {
|
131
130
|
context.modeDisabledEnd[mode] = fn;
|
132
131
|
} else {
|
133
132
|
context.modeDisabledStart[mode] = fn;
|
134
133
|
}
|
135
134
|
});
|
136
|
-
var setCurrentArrWithParams =
|
135
|
+
var setCurrentArrWithParams = usePersistFn(function (arg, type, quick) {
|
137
136
|
setCurrentArr(arg);
|
138
137
|
setParams({
|
139
138
|
type: type,
|
@@ -153,7 +152,7 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
153
152
|
var getFormatValueArr = function getFormatValueArr(dateArr, fmt) {
|
154
153
|
return dateArr.map(function (item) {
|
155
154
|
if (!item) return props.clearWithUndefined ? undefined : '';
|
156
|
-
return
|
155
|
+
return dateUtil.format(item, fmt || format, options);
|
157
156
|
});
|
158
157
|
};
|
159
158
|
var getResultValueArr = function getResultValueArr(dateArr) {
|
@@ -163,7 +162,7 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
163
162
|
} else {
|
164
163
|
return dateArr.map(function (item) {
|
165
164
|
if (!item) return '';
|
166
|
-
return
|
165
|
+
return dateUtil.format(item, format, options) || '';
|
167
166
|
});
|
168
167
|
}
|
169
168
|
}
|
@@ -179,8 +178,8 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
179
178
|
}
|
180
179
|
var formatValue = getFormatValueArr(dateArr);
|
181
180
|
var v = range ? formatValue : formatValue[0];
|
182
|
-
if (!(
|
183
|
-
onChange === null || onChange === void 0
|
181
|
+
if (!shallowEqual(v, value)) {
|
182
|
+
onChange === null || onChange === void 0 || onChange(v);
|
184
183
|
}
|
185
184
|
};
|
186
185
|
var getDateArr = function getDateArr() {
|
@@ -200,12 +199,12 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
200
199
|
if (range && (!stateDate[0] || !stateDate[1]) && !props.allowSingle) {
|
201
200
|
return;
|
202
201
|
}
|
203
|
-
if (!(
|
202
|
+
if (!shallowEqual(v, value)) {
|
204
203
|
var quick = params.quick;
|
205
|
-
onChange === null || onChange === void 0
|
204
|
+
onChange === null || onChange === void 0 || onChange(v, quick);
|
206
205
|
}
|
207
206
|
};
|
208
|
-
var handleClear =
|
207
|
+
var handleClear = usePersistFn(function (e) {
|
209
208
|
var _props$onClear;
|
210
209
|
if (!clearable) return;
|
211
210
|
e.stopPropagation();
|
@@ -234,48 +233,48 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
234
233
|
}
|
235
234
|
}
|
236
235
|
}
|
237
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0
|
236
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, v);
|
238
237
|
}
|
239
|
-
(_props$onClear = props.onClear) === null || _props$onClear === void 0
|
238
|
+
(_props$onClear = props.onClear) === null || _props$onClear === void 0 || _props$onClear.call(props);
|
240
239
|
});
|
241
|
-
var handleInputChange =
|
240
|
+
var handleInputChange = usePersistFn(function (str, index) {
|
242
241
|
// 比较 日期字符串是否符合format格式, 如果符合返回 true 否则返回 false
|
243
|
-
var isValid =
|
242
|
+
var isValid = dateUtil.isValidString(str, format);
|
244
243
|
if (!isValid) return;
|
245
|
-
var date =
|
244
|
+
var date = dateUtil.toDateWithFormat(str, format, undefined, options);
|
246
245
|
if (date && isDisabledDate(date, index === 1 ? 'end' : 'start')) return;
|
247
246
|
setStateDate(function (prev) {
|
248
|
-
var arr = (
|
247
|
+
var arr = _toConsumableArray(prev);
|
249
248
|
arr[index] = date;
|
250
249
|
return arr;
|
251
250
|
});
|
252
251
|
setCurrentArr(function (prev) {
|
253
|
-
var arr = (
|
252
|
+
var arr = _toConsumableArray(prev);
|
254
253
|
arr[index] = date;
|
255
254
|
return arr;
|
256
255
|
});
|
257
256
|
});
|
258
|
-
|
257
|
+
useEffect(function () {
|
259
258
|
handlePropsValueChange(value);
|
260
259
|
}, [value]);
|
261
|
-
|
260
|
+
useEffect(function () {
|
262
261
|
setControl(!edit);
|
263
262
|
}, [edit]);
|
264
|
-
|
263
|
+
useEffect(function () {
|
265
264
|
var _props$onPickerChange;
|
266
265
|
var type = params.type,
|
267
266
|
quick = params.quick;
|
268
267
|
if (!type) return;
|
269
268
|
var pickerValue = getFormatValueArr(currentArr);
|
270
|
-
(_props$onPickerChange = props.onPickerChange) === null || _props$onPickerChange === void 0
|
269
|
+
(_props$onPickerChange = props.onPickerChange) === null || _props$onPickerChange === void 0 || _props$onPickerChange.call(props, range ? pickerValue : pickerValue[0], quick, type);
|
271
270
|
}, [params]);
|
272
271
|
var dateArr = getDateArr();
|
273
272
|
var resultArr = getResultValueArr(dateArr);
|
274
273
|
var targetResultArr = getResultValueArr(targetArr);
|
275
274
|
var isEmpty = dateArr.reduce(function (prev, cur) {
|
276
|
-
return prev &&
|
275
|
+
return prev && dateUtil.isInvalid(cur);
|
277
276
|
}, true);
|
278
|
-
var func = (
|
277
|
+
var func = useLatestObj({
|
279
278
|
setMode: setMode,
|
280
279
|
setDateArr: setStateDate,
|
281
280
|
// 编辑模式下只会修改内部状态
|
@@ -301,5 +300,4 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
301
300
|
func: func
|
302
301
|
};
|
303
302
|
};
|
304
|
-
|
305
|
-
exports.default = _default;
|
303
|
+
export default useDatePickerFormat;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
export
|
2
|
-
export
|
3
|
-
export
|
4
|
-
export
|
1
|
+
export type DateTimeType = Date | number | string | undefined;
|
2
|
+
export type DatePickerValueType = DateTimeType | DateTimeType[];
|
3
|
+
export type DatePickerAreaType = 'year' | 'month' | 'week' | 'day' | 'time' | 'quick' | 'quarter';
|
4
|
+
export type DatePickerModeType = 'year' | 'month' | 'quarter' | 'time' | 'day';
|
5
5
|
export interface UseDatePickerFormatProps<Value extends DatePickerValueType> {
|
6
6
|
type: 'date' | 'datetime' | 'month' | 'time' | 'week' | 'year' | 'quarter';
|
7
7
|
format: string | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-datepicker-format.type.d.ts","sourceRoot":"","sources":["use-datepicker-format.type.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"use-datepicker-format.type.d.ts","sourceRoot":"","sources":["use-datepicker-format.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,YAAY,EAAE,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAClG,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC;AAC/E,MAAM,WAAW,wBAAwB,CAAC,KAAK,SAAS,mBAAmB;IACzE,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3E,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IAC5D,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,SAAS,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC/F,OAAO,EACH;QACE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GACD,SAAS,CAAC;IACd,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,kBAAkB,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAClC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,cAAc,EAAE,mBAAmB,CAAC;IACpC,cAAc,EACV,CAAC,CACC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,EACnC,IAAI,EAAE,kBAAkB,KACrB,IAAI,CAAC,GACV,SAAS,CAAC;IACd,QAAQ,EACJ,OAAO,GACP,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,GACvF,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,GAC1C,SAAS,CAAC;CACf"}
|