@ebscn/ui 0.0.10 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.css +143 -0
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.d.ts +11 -0
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.js +139 -0
- package/cjs/components/alphabet-keyboard/index.d.ts +4 -0
- package/cjs/components/alphabet-keyboard/index.js +9 -0
- package/cjs/components/button/button.css +152 -0
- package/cjs/components/button/button.d.ts +40 -0
- package/cjs/components/button/button.js +215 -0
- package/cjs/components/button/index.d.ts +4 -0
- package/cjs/components/button/index.js +9 -0
- package/cjs/components/card/card.css +37 -0
- package/cjs/components/card/card.d.ts +17 -0
- package/cjs/components/card/card.js +40 -0
- package/cjs/components/card/index.d.ts +4 -0
- package/cjs/components/card/index.js +10 -0
- package/cjs/components/checkbox/checkbox.css +92 -0
- package/cjs/components/checkbox/checkbox.d.ts +44 -0
- package/cjs/components/checkbox/checkbox.js +106 -0
- package/cjs/components/checkbox/group-context.d.ts +8 -0
- package/cjs/components/checkbox/group-context.js +8 -0
- package/cjs/components/checkbox/group.d.ts +10 -0
- package/cjs/components/checkbox/group.js +48 -0
- package/cjs/components/checkbox/index.d.ts +26 -0
- package/cjs/components/checkbox/index.js +14 -0
- package/cjs/components/checkbox/native-input.d.ts +10 -0
- package/cjs/components/checkbox/native-input.js +38 -0
- package/cjs/components/grid/grid.css +15 -0
- package/cjs/components/grid/grid.d.ts +15 -0
- package/cjs/components/grid/grid.js +45 -0
- package/cjs/components/grid/index.d.ts +7 -0
- package/cjs/components/grid/index.js +12 -0
- package/cjs/components/icons/check-icon.d.ts +4 -0
- package/cjs/components/icons/check-icon.js +30 -0
- package/cjs/components/icons/check-only-icon.d.ts +4 -0
- package/cjs/components/icons/check-only-icon.js +21 -0
- package/cjs/components/icons/clear-icon.d.ts +4 -0
- package/cjs/components/icons/clear-icon.js +41 -0
- package/cjs/components/icons/indeterminate-icon.d.ts +4 -0
- package/cjs/components/icons/indeterminate-icon.js +29 -0
- package/cjs/components/icons/index.d.ts +8 -0
- package/cjs/components/icons/index.js +62 -0
- package/cjs/components/icons/loading-icon.d.ts +4 -0
- package/cjs/components/icons/loading-icon.js +89 -0
- package/cjs/components/icons/search-icon.d.ts +4 -0
- package/cjs/components/icons/search-icon.js +43 -0
- package/cjs/components/icons/spin-icon.d.ts +4 -0
- package/cjs/components/icons/spin-icon.js +32 -0
- package/cjs/components/icons/uncheck-icon.d.ts +4 -0
- package/cjs/components/icons/uncheck-icon.js +26 -0
- package/cjs/components/imageViewer/imageViewer.d.ts +4 -0
- package/cjs/components/imageViewer/imageViewer.js +35 -0
- package/cjs/components/imageViewer/index.js +9 -0
- package/cjs/components/marketTag/index.d.ts +4 -0
- package/cjs/components/marketTag/index.js +9 -0
- package/cjs/components/marketTag/marketTag.css +14 -0
- package/cjs/components/marketTag/marketTag.d.ts +11 -0
- package/cjs/components/marketTag/marketTag.js +27 -0
- package/cjs/components/number-keyboard/index.d.ts +4 -0
- package/cjs/components/number-keyboard/index.js +9 -0
- package/cjs/components/number-keyboard/number-keyboard.css +77 -0
- package/cjs/components/number-keyboard/number-keyboard.d.ts +13 -0
- package/cjs/components/number-keyboard/number-keyboard.js +93 -0
- package/cjs/components/pdfLink/index.d.ts +3 -0
- package/cjs/components/pdfLink/index.js +10 -0
- package/cjs/components/pdfLink/pdfLink.css +11 -0
- package/cjs/components/pdfLink/pdfLink.d.ts +8 -0
- package/cjs/components/pdfLink/pdfLink.js +102 -0
- package/cjs/components/protocol/index.d.ts +3 -0
- package/cjs/components/protocol/index.js +10 -0
- package/cjs/components/protocol/protocol.css +46 -0
- package/cjs/components/protocol/protocol.d.ts +15 -0
- package/cjs/components/protocol/protocol.js +120 -0
- package/cjs/components/radio/group-context.d.ts +8 -0
- package/cjs/components/radio/group-context.js +8 -0
- package/cjs/components/radio/group.d.ts +10 -0
- package/cjs/components/radio/group.js +43 -0
- package/cjs/components/radio/index.d.ts +8 -0
- package/cjs/components/radio/index.js +13 -0
- package/cjs/components/radio/radio.css +92 -0
- package/cjs/components/radio/radio.d.ts +19 -0
- package/cjs/components/radio/radio.js +92 -0
- package/cjs/components/search/index.d.ts +3 -0
- package/cjs/components/search/index.js +10 -0
- package/cjs/components/search/search.css +53 -0
- package/cjs/components/search/search.d.ts +15 -0
- package/cjs/components/search/search.js +110 -0
- package/cjs/components/stock-count-keyboard/index.d.ts +4 -0
- package/cjs/components/stock-count-keyboard/index.js +9 -0
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.css +74 -0
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.d.ts +9 -0
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.js +82 -0
- package/cjs/components/stock-keyboard/index.d.ts +4 -0
- package/cjs/components/stock-keyboard/index.js +9 -0
- package/cjs/components/stock-keyboard/stock-keyboard.css +111 -0
- package/cjs/components/stock-keyboard/stock-keyboard.d.ts +12 -0
- package/cjs/components/stock-keyboard/stock-keyboard.js +107 -0
- package/cjs/components/switch/index.d.ts +4 -0
- package/cjs/components/switch/index.js +10 -0
- package/cjs/components/switch/switch.css +104 -0
- package/cjs/components/switch/switch.d.ts +16 -0
- package/cjs/components/switch/switch.js +213 -0
- package/cjs/components/toastLoading/index.d.ts +4 -0
- package/cjs/components/toastLoading/index.js +9 -0
- package/cjs/components/toastLoading/toastLoading.css +27 -0
- package/cjs/components/toastLoading/toastLoading.d.ts +7 -0
- package/cjs/components/toastLoading/toastLoading.js +35 -0
- package/cjs/global/global.css +289 -0
- package/cjs/global/index.d.ts +1 -0
- package/cjs/global/index.js +11 -0
- package/cjs/global/theme-dark.css +18 -0
- package/cjs/global/theme-default.css +48 -0
- package/cjs/index.d.ts +18 -0
- package/cjs/index.js +149 -0
- package/cjs/utils/attach-properties-to-component.d.ts +1 -0
- package/cjs/utils/attach-properties-to-component.js +15 -0
- package/cjs/utils/bound.d.ts +1 -0
- package/cjs/utils/bound.js +16 -0
- package/cjs/utils/can-use-dom.d.ts +1 -0
- package/cjs/utils/can-use-dom.js +7 -0
- package/cjs/utils/convert-px.d.ts +1 -0
- package/cjs/utils/convert-px.js +33 -0
- package/cjs/utils/create-icon-component.d.ts +2 -0
- package/cjs/utils/create-icon-component.js +12 -0
- package/cjs/utils/dev-log.d.ts +3 -0
- package/cjs/utils/dev-log.js +45 -0
- package/cjs/utils/generate-int-array.d.ts +1 -0
- package/cjs/utils/generate-int-array.js +13 -0
- package/cjs/utils/get-container.d.ts +2 -0
- package/cjs/utils/get-container.js +10 -0
- package/cjs/utils/get-scroll-parent.d.ts +3 -0
- package/cjs/utils/get-scroll-parent.js +30 -0
- package/cjs/utils/is-dev.d.ts +1 -0
- package/cjs/utils/is-dev.js +7 -0
- package/cjs/utils/is-node-with-content.d.ts +4 -0
- package/cjs/utils/is-node-with-content.js +9 -0
- package/cjs/utils/matrix.d.ts +10 -0
- package/cjs/utils/matrix.js +47 -0
- package/cjs/utils/measure-css-length.d.ts +1 -0
- package/cjs/utils/measure-css-length.js +29 -0
- package/cjs/utils/merge-locale.d.ts +1 -0
- package/cjs/utils/merge-locale.js +21 -0
- package/cjs/utils/native-props.d.ts +8 -0
- package/cjs/utils/native-props.js +38 -0
- package/cjs/utils/nearest.d.ts +1 -0
- package/cjs/utils/nearest.js +11 -0
- package/cjs/utils/noop.d.ts +1 -0
- package/cjs/utils/noop.js +8 -0
- package/cjs/utils/reduce-and-restore-motion.d.ts +4 -0
- package/cjs/utils/reduce-and-restore-motion.js +44 -0
- package/cjs/utils/render-imperatively.d.ts +13 -0
- package/cjs/utils/render-imperatively.js +207 -0
- package/cjs/utils/render-to-body.d.ts +2 -0
- package/cjs/utils/render-to-body.js +19 -0
- package/cjs/utils/render-to-container.d.ts +3 -0
- package/cjs/utils/render-to-container.js +16 -0
- package/cjs/utils/render.d.ts +9 -0
- package/cjs/utils/render.js +196 -0
- package/cjs/utils/replace-message.d.ts +1 -0
- package/cjs/utils/replace-message.js +13 -0
- package/cjs/utils/rubberband.d.ts +2 -0
- package/cjs/utils/rubberband.js +20 -0
- package/cjs/utils/should-render.d.ts +10 -0
- package/cjs/utils/should-render.js +20 -0
- package/cjs/utils/shuffle.d.ts +6 -0
- package/cjs/utils/shuffle.js +29 -0
- package/cjs/utils/sleep.d.ts +1 -0
- package/cjs/utils/sleep.js +12 -0
- package/cjs/utils/supports-passive.d.ts +1 -0
- package/cjs/utils/supports-passive.js +19 -0
- package/cjs/utils/to-css-length.d.ts +1 -0
- package/cjs/utils/to-css-length.js +9 -0
- package/cjs/utils/traverse-react-node.d.ts +2 -0
- package/cjs/utils/traverse-react-node.js +23 -0
- package/cjs/utils/tree.d.ts +1 -0
- package/cjs/utils/tree.js +24 -0
- package/cjs/utils/undefined-fallback.d.ts +3 -0
- package/cjs/utils/undefined-fallback.js +17 -0
- package/cjs/utils/use-drag-and-pinch.d.ts +1 -0
- package/cjs/utils/use-drag-and-pinch.js +8 -0
- package/cjs/utils/use-initialized.d.ts +1 -0
- package/cjs/utils/use-initialized.js +14 -0
- package/cjs/utils/use-inner-visible.d.ts +1 -0
- package/cjs/utils/use-inner-visible.js +17 -0
- package/cjs/utils/use-isomorphic-update-layout-effect.d.ts +2 -0
- package/cjs/utils/use-isomorphic-update-layout-effect.js +8 -0
- package/cjs/utils/use-lock-scroll.d.ts +2 -0
- package/cjs/utils/use-lock-scroll.js +84 -0
- package/cjs/utils/use-mutation-effect.d.ts +2 -0
- package/cjs/utils/use-mutation-effect.js +21 -0
- package/cjs/utils/use-props-value.d.ts +8 -0
- package/cjs/utils/use-props-value.js +30 -0
- package/cjs/utils/use-ref-state.d.ts +2 -0
- package/cjs/utils/use-ref-state.js +17 -0
- package/cjs/utils/use-resize-effect.d.ts +2 -0
- package/cjs/utils/use-resize-effect.js +29 -0
- package/cjs/utils/use-tab-list-scroll.d.ts +5 -0
- package/cjs/utils/use-tab-list-scroll.js +67 -0
- package/cjs/utils/use-touch.d.ts +17 -0
- package/cjs/utils/use-touch.js +69 -0
- package/cjs/utils/validate.d.ts +8 -0
- package/cjs/utils/validate.js +39 -0
- package/cjs/utils/with-cache.d.ts +1 -0
- package/cjs/utils/with-cache.js +15 -0
- package/cjs/utils/with-default-props.d.ts +2 -0
- package/cjs/utils/with-default-props.js +32 -0
- package/cjs/utils/with-func-props.d.ts +5 -0
- package/cjs/utils/with-func-props.js +38 -0
- package/cjs/utils/with-stop-propagation.d.ts +4 -0
- package/cjs/utils/with-stop-propagation.js +37 -0
- package/es/components/alphabet-keyboard/alphabet-keyboard.css +143 -0
- package/es/components/alphabet-keyboard/alphabet-keyboard.d.ts +11 -0
- package/es/components/alphabet-keyboard/alphabet-keyboard.js +132 -0
- package/es/components/alphabet-keyboard/index.d.ts +4 -0
- package/es/components/alphabet-keyboard/index.js +3 -0
- package/es/components/button/button.css +152 -0
- package/es/components/button/button.d.ts +40 -0
- package/es/components/button/button.js +206 -0
- package/es/components/button/index.d.ts +4 -0
- package/es/components/button/index.js +3 -0
- package/es/components/card/card.css +37 -0
- package/es/components/card/card.d.ts +17 -0
- package/es/components/card/card.js +33 -0
- package/es/components/card/index.d.ts +4 -0
- package/es/components/card/index.js +3 -0
- package/es/components/checkbox/checkbox.css +92 -0
- package/es/components/checkbox/checkbox.d.ts +44 -0
- package/es/components/checkbox/checkbox.js +97 -0
- package/es/components/checkbox/group-context.d.ts +8 -0
- package/es/components/checkbox/group-context.js +2 -0
- package/es/components/checkbox/group.d.ts +10 -0
- package/es/components/checkbox/group.js +40 -0
- package/es/components/checkbox/index.d.ts +26 -0
- package/es/components/checkbox/index.js +7 -0
- package/es/components/checkbox/native-input.d.ts +10 -0
- package/es/components/checkbox/native-input.js +29 -0
- package/es/components/grid/grid.css +15 -0
- package/es/components/grid/grid.d.ts +15 -0
- package/es/components/grid/grid.js +36 -0
- package/es/components/grid/index.d.ts +7 -0
- package/es/components/grid/index.js +6 -0
- package/es/components/icons/check-icon.d.ts +4 -0
- package/es/components/icons/check-icon.js +22 -0
- package/es/components/icons/check-only-icon.d.ts +4 -0
- package/es/components/icons/check-only-icon.js +13 -0
- package/es/components/icons/clear-icon.d.ts +4 -0
- package/es/components/icons/clear-icon.js +33 -0
- package/es/components/icons/indeterminate-icon.d.ts +4 -0
- package/es/components/icons/indeterminate-icon.js +21 -0
- package/es/components/icons/index.d.ts +8 -0
- package/es/components/icons/index.js +8 -0
- package/es/components/icons/loading-icon.d.ts +4 -0
- package/es/components/icons/loading-icon.js +81 -0
- package/es/components/icons/search-icon.d.ts +4 -0
- package/es/components/icons/search-icon.js +35 -0
- package/es/components/icons/spin-icon.d.ts +4 -0
- package/es/components/icons/spin-icon.js +24 -0
- package/es/components/icons/uncheck-icon.d.ts +4 -0
- package/es/components/icons/uncheck-icon.js +18 -0
- package/es/components/imageViewer/imageViewer.d.ts +4 -0
- package/es/components/imageViewer/imageViewer.js +28 -0
- package/es/components/imageViewer/index.d.ts +7 -0
- package/es/components/imageViewer/index.js +2 -0
- package/es/components/marketTag/index.d.ts +4 -0
- package/es/components/marketTag/index.js +3 -0
- package/es/components/marketTag/marketTag.css +14 -0
- package/es/components/marketTag/marketTag.d.ts +11 -0
- package/es/components/marketTag/marketTag.js +19 -0
- package/es/components/number-keyboard/index.d.ts +4 -0
- package/es/components/number-keyboard/index.js +3 -0
- package/es/components/number-keyboard/number-keyboard.css +77 -0
- package/es/components/number-keyboard/number-keyboard.d.ts +13 -0
- package/es/components/number-keyboard/number-keyboard.js +85 -0
- package/es/components/pdfLink/index.d.ts +3 -0
- package/es/components/pdfLink/index.js +3 -0
- package/es/components/pdfLink/pdfLink.css +11 -0
- package/es/components/pdfLink/pdfLink.d.ts +8 -0
- package/es/components/pdfLink/pdfLink.js +94 -0
- package/es/components/protocol/index.d.ts +3 -0
- package/es/components/protocol/index.js +3 -0
- package/es/components/protocol/protocol.css +46 -0
- package/es/components/protocol/protocol.d.ts +15 -0
- package/es/components/protocol/protocol.js +112 -0
- package/es/components/radio/group-context.d.ts +8 -0
- package/es/components/radio/group-context.js +2 -0
- package/es/components/radio/group.d.ts +10 -0
- package/es/components/radio/group.js +35 -0
- package/es/components/radio/index.d.ts +8 -0
- package/es/components/radio/index.js +7 -0
- package/es/components/radio/radio.css +92 -0
- package/es/components/radio/radio.d.ts +19 -0
- package/es/components/radio/radio.js +82 -0
- package/es/components/search/index.d.ts +3 -0
- package/es/components/search/index.js +3 -0
- package/es/components/search/search.css +53 -0
- package/es/components/search/search.d.ts +15 -0
- package/es/components/search/search.js +102 -0
- package/es/components/stock-count-keyboard/index.d.ts +4 -0
- package/es/components/stock-count-keyboard/index.js +3 -0
- package/es/components/stock-count-keyboard/stock-count-keyboard.css +74 -0
- package/es/components/stock-count-keyboard/stock-count-keyboard.d.ts +9 -0
- package/es/components/stock-count-keyboard/stock-count-keyboard.js +74 -0
- package/es/components/stock-keyboard/index.d.ts +4 -0
- package/es/components/stock-keyboard/index.js +3 -0
- package/es/components/stock-keyboard/stock-keyboard.css +111 -0
- package/es/components/stock-keyboard/stock-keyboard.d.ts +12 -0
- package/es/components/stock-keyboard/stock-keyboard.js +99 -0
- package/es/components/switch/index.d.ts +4 -0
- package/es/components/switch/index.js +3 -0
- package/es/components/switch/switch.css +104 -0
- package/es/components/switch/switch.d.ts +16 -0
- package/es/components/switch/switch.js +204 -0
- package/es/components/toastLoading/index.d.ts +4 -0
- package/es/components/toastLoading/index.js +3 -0
- package/es/components/toastLoading/toastLoading.css +27 -0
- package/es/components/toastLoading/toastLoading.d.ts +7 -0
- package/es/components/toastLoading/toastLoading.js +27 -0
- package/es/global/global.css +289 -0
- package/es/global/index.d.ts +1 -0
- package/es/global/index.js +9 -0
- package/es/global/theme-dark.css +18 -0
- package/es/global/theme-default.css +48 -0
- package/es/index.d.ts +18 -0
- package/es/index.js +18 -0
- package/es/utils/attach-properties-to-component.d.ts +1 -0
- package/es/utils/attach-properties-to-component.js +9 -0
- package/es/utils/bound.d.ts +1 -0
- package/es/utils/bound.js +10 -0
- package/es/utils/can-use-dom.d.ts +1 -0
- package/es/utils/can-use-dom.js +1 -0
- package/es/utils/convert-px.d.ts +1 -0
- package/es/utils/convert-px.js +27 -0
- package/es/utils/create-icon-component.d.ts +2 -0
- package/es/utils/create-icon-component.js +6 -0
- package/es/utils/dev-log.d.ts +3 -0
- package/es/utils/dev-log.js +37 -0
- package/es/utils/generate-int-array.d.ts +1 -0
- package/es/utils/generate-int-array.js +7 -0
- package/es/utils/get-container.d.ts +2 -0
- package/es/utils/get-container.js +4 -0
- package/es/utils/get-scroll-parent.d.ts +3 -0
- package/es/utils/get-scroll-parent.js +24 -0
- package/es/utils/is-dev.d.ts +1 -0
- package/es/utils/is-dev.js +1 -0
- package/es/utils/is-node-with-content.d.ts +4 -0
- package/es/utils/is-node-with-content.js +3 -0
- package/es/utils/matrix.d.ts +10 -0
- package/es/utils/matrix.js +32 -0
- package/es/utils/measure-css-length.d.ts +1 -0
- package/es/utils/measure-css-length.js +23 -0
- package/es/utils/merge-locale.d.ts +1 -0
- package/es/utils/merge-locale.js +15 -0
- package/es/utils/native-props.d.ts +8 -0
- package/es/utils/native-props.js +31 -0
- package/es/utils/nearest.d.ts +1 -0
- package/es/utils/nearest.js +5 -0
- package/es/utils/noop.d.ts +1 -0
- package/es/utils/noop.js +1 -0
- package/es/utils/reduce-and-restore-motion.d.ts +4 -0
- package/es/utils/reduce-and-restore-motion.js +35 -0
- package/es/utils/render-imperatively.d.ts +13 -0
- package/es/utils/render-imperatively.js +199 -0
- package/es/utils/render-to-body.d.ts +2 -0
- package/es/utils/render-to-body.js +13 -0
- package/es/utils/render-to-container.d.ts +3 -0
- package/es/utils/render-to-container.js +10 -0
- package/es/utils/render.d.ts +9 -0
- package/es/utils/render.js +187 -0
- package/es/utils/replace-message.d.ts +1 -0
- package/es/utils/replace-message.js +7 -0
- package/es/utils/rubberband.d.ts +2 -0
- package/es/utils/rubberband.js +13 -0
- package/es/utils/should-render.d.ts +10 -0
- package/es/utils/should-render.js +12 -0
- package/es/utils/shuffle.d.ts +6 -0
- package/es/utils/shuffle.js +23 -0
- package/es/utils/sleep.d.ts +1 -0
- package/es/utils/sleep.js +5 -0
- package/es/utils/supports-passive.d.ts +1 -0
- package/es/utils/supports-passive.js +13 -0
- package/es/utils/to-css-length.d.ts +1 -0
- package/es/utils/to-css-length.js +3 -0
- package/es/utils/traverse-react-node.d.ts +2 -0
- package/es/utils/traverse-react-node.js +16 -0
- package/es/utils/tree.d.ts +1 -0
- package/es/utils/tree.js +18 -0
- package/es/utils/undefined-fallback.d.ts +3 -0
- package/es/utils/undefined-fallback.js +11 -0
- package/es/utils/use-drag-and-pinch.d.ts +1 -0
- package/es/utils/use-drag-and-pinch.js +2 -0
- package/es/utils/use-initialized.d.ts +1 -0
- package/es/utils/use-initialized.js +8 -0
- package/es/utils/use-inner-visible.d.ts +1 -0
- package/es/utils/use-inner-visible.js +11 -0
- package/es/utils/use-isomorphic-update-layout-effect.d.ts +2 -0
- package/es/utils/use-isomorphic-update-layout-effect.js +2 -0
- package/es/utils/use-lock-scroll.d.ts +2 -0
- package/es/utils/use-lock-scroll.js +78 -0
- package/es/utils/use-mutation-effect.d.ts +2 -0
- package/es/utils/use-mutation-effect.js +15 -0
- package/es/utils/use-props-value.d.ts +8 -0
- package/es/utils/use-props-value.js +24 -0
- package/es/utils/use-ref-state.d.ts +2 -0
- package/es/utils/use-ref-state.js +11 -0
- package/es/utils/use-resize-effect.d.ts +2 -0
- package/es/utils/use-resize-effect.js +23 -0
- package/es/utils/use-tab-list-scroll.d.ts +5 -0
- package/es/utils/use-tab-list-scroll.js +60 -0
- package/es/utils/use-touch.d.ts +17 -0
- package/es/utils/use-touch.js +63 -0
- package/es/utils/validate.d.ts +8 -0
- package/es/utils/validate.js +26 -0
- package/es/utils/with-cache.d.ts +1 -0
- package/es/utils/with-cache.js +9 -0
- package/es/utils/with-default-props.d.ts +2 -0
- package/es/utils/with-default-props.js +25 -0
- package/es/utils/with-func-props.d.ts +5 -0
- package/es/utils/with-func-props.js +32 -0
- package/es/utils/with-stop-propagation.d.ts +4 -0
- package/es/utils/with-stop-propagation.js +30 -0
- package/package.json +48 -20
- package/__vendor/__vendor.js +0 -1
- package/handRead/handRead.d.ts +0 -6
- package/handRead/handRead.js +0 -302
- package/handRead/index.d.ts +0 -25
- package/handRead/index.js +0 -11
- package/imageViewer/imageViewer.d.ts +0 -3
- package/imageViewer/imageViewer.js +0 -28
- package/imageViewer/index.js +0 -8
- package/index.d.ts +0 -6
- package/index.js +0 -14
- package/keyboard/index.d.ts +0 -13
- package/keyboard/index.js +0 -7
- package/keyboard/keyboard.d.ts +0 -2
- package/keyboard/keyboard.js +0 -87
- package/style.css +0 -1
- package/utils/isEqual.d.ts +0 -5
- /package/{imageViewer → cjs/components/imageViewer}/index.d.ts +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _nativeProps = require("../../utils/native-props");
|
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
+
var UncheckIcon = (0, _react.memo)(function (props) {
|
|
12
|
+
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("svg", {
|
|
13
|
+
width: "1em",
|
|
14
|
+
height: "1em",
|
|
15
|
+
viewBox: "0 0 48 48"
|
|
16
|
+
}, _react.default.createElement("g", {
|
|
17
|
+
fill: "none"
|
|
18
|
+
}, _react.default.createElement("g", {
|
|
19
|
+
transform: "translate(4.000000, 4.000000)"
|
|
20
|
+
}, _react.default.createElement("path", {
|
|
21
|
+
d: "M20,1.5 C25.100196,1.5 29.724834,3.57544581 33.0746665,6.92512482 C36.4244591,10.2747639 38.5,14.8991338 38.5,19.9990835 C38.5,25.0995017 36.4246362,29.7246098 33.0746617,33.0747379 C29.7251005,36.4244526 25.1007203,38.5 20,38.5 C14.8997226,38.5 10.2750185,36.4244845 6.9251796,33.0744921 C3.57545757,29.7246166 1.5,25.0998375 1.5,19.9990835 C1.5,14.8985814 3.57535642,10.274347 6.9249385,6.92491838 C10.2748077,3.5752027 14.8996147,1.5 20,1.5 Z",
|
|
22
|
+
stroke: "currentColor",
|
|
23
|
+
strokeWidth: "3"
|
|
24
|
+
})))));
|
|
25
|
+
});
|
|
26
|
+
var _default = exports.default = UncheckIcon;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = ImageViewer;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactPhotoView = require("react-photo-view");
|
|
9
|
+
require("react-photo-view/dist/react-photo-view.css");
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
function ImageViewer(props) {
|
|
13
|
+
var images = props.images,
|
|
14
|
+
currentIndex = props.currentIndex;
|
|
15
|
+
var _a = (0, _react.useState)(currentIndex ? currentIndex - 1 : 0),
|
|
16
|
+
photoIndex = _a[0],
|
|
17
|
+
setPhotoIndex = _a[1];
|
|
18
|
+
function onClose(e) {
|
|
19
|
+
props.onClose && props.onClose(e);
|
|
20
|
+
}
|
|
21
|
+
return _react.default.createElement(_reactPhotoView.PhotoSlider, {
|
|
22
|
+
images: images.map(function (item, index) {
|
|
23
|
+
return {
|
|
24
|
+
src: item,
|
|
25
|
+
key: item + index
|
|
26
|
+
};
|
|
27
|
+
}),
|
|
28
|
+
visible: true,
|
|
29
|
+
index: photoIndex,
|
|
30
|
+
onIndexChange: setPhotoIndex,
|
|
31
|
+
onClose: function (e) {
|
|
32
|
+
return onClose(e);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _imageViewer = _interopRequireDefault(require("./imageViewer"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
var _default = exports.default = _imageViewer.default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.ebscn-marketTag {
|
|
2
|
+
padding: 0 1px;
|
|
3
|
+
font-size: var(--ebscn-font-size-2);
|
|
4
|
+
line-height: 13px;
|
|
5
|
+
height: 13px;
|
|
6
|
+
font-weight: normal;
|
|
7
|
+
display: inline-block;
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
border-radius: 2px;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
.ebscn-marketTag:not(:last-child) {
|
|
13
|
+
margin-right: 4px;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { NativeProps } from '../../utils/native-props';
|
|
4
|
+
export type MarketTagProps = {
|
|
5
|
+
color?: string;
|
|
6
|
+
fillColor?: string;
|
|
7
|
+
onClick?: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
round?: boolean;
|
|
10
|
+
} & NativeProps;
|
|
11
|
+
export declare const MarketTag: FC<MarketTagProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MarketTag = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _nativeProps = require("../../utils/native-props");
|
|
9
|
+
var _withDefaultProps = require("../../utils/with-default-props");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
var classPrefix = "ebscn-marketTag";
|
|
12
|
+
var defaultProps = {
|
|
13
|
+
color: 'var(--ebscn-color-primary, #e84225)',
|
|
14
|
+
fillColor: '#fcece9'
|
|
15
|
+
};
|
|
16
|
+
var MarketTag = function (p) {
|
|
17
|
+
var props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
18
|
+
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("span", {
|
|
19
|
+
style: {
|
|
20
|
+
color: props.color,
|
|
21
|
+
backgroundColor: props.fillColor
|
|
22
|
+
},
|
|
23
|
+
onClick: props.onClick,
|
|
24
|
+
className: classPrefix
|
|
25
|
+
}, props.children));
|
|
26
|
+
};
|
|
27
|
+
exports.MarketTag = MarketTag;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("./number-keyboard.css");
|
|
8
|
+
var _numberKeyboard2 = require("./number-keyboard");
|
|
9
|
+
var _default = exports.default = _numberKeyboard2.NumberKeyboard;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.ebscn-number-keyboard {
|
|
2
|
+
display: none;
|
|
3
|
+
position: fixed;
|
|
4
|
+
bottom: 0;
|
|
5
|
+
transform: translateY(101%);
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 216px;
|
|
10
|
+
padding: 0 0 0 0;
|
|
11
|
+
transition: all 0.5s;
|
|
12
|
+
align-content: flex-start;
|
|
13
|
+
}
|
|
14
|
+
.ebscn-number-keyboard :last-child {
|
|
15
|
+
background: var(--ebscn-color-primary);
|
|
16
|
+
color: var(--ebscn-color-background);
|
|
17
|
+
}
|
|
18
|
+
.ebscn-number-keyboard-key {
|
|
19
|
+
width: 25%;
|
|
20
|
+
height: 54px;
|
|
21
|
+
line-height: 54px;
|
|
22
|
+
text-align: center;
|
|
23
|
+
font-size: 24px;
|
|
24
|
+
font-weight: Regular;
|
|
25
|
+
color: var(--ebscn-color-text-dark-solid);
|
|
26
|
+
font-weight: 300;
|
|
27
|
+
box-shadow: 0 0 0 1px #cccccc;
|
|
28
|
+
background: var(--ebscn-color-background);
|
|
29
|
+
}
|
|
30
|
+
.ebscn-number-keyboard-key:active {
|
|
31
|
+
width: 25%;
|
|
32
|
+
height: 54px;
|
|
33
|
+
line-height: 54px;
|
|
34
|
+
text-align: center;
|
|
35
|
+
font-size: 24px;
|
|
36
|
+
color: var(--ebscn-color-text-dark-solid);
|
|
37
|
+
font-weight: 300;
|
|
38
|
+
box-shadow: 0 0 0 1px #cccccc;
|
|
39
|
+
background: var(--ebscn-color-border);
|
|
40
|
+
}
|
|
41
|
+
.ebscn-number-keyboard-option {
|
|
42
|
+
font-size: var(--ebscn-font-size-11);
|
|
43
|
+
background: #e1e3e8;
|
|
44
|
+
}
|
|
45
|
+
.ebscn-number-keyboard-option:active {
|
|
46
|
+
font-size: var(--ebscn-font-size-11);
|
|
47
|
+
background: #CACBD0;
|
|
48
|
+
}
|
|
49
|
+
.ebscn-number-keyboard-delete {
|
|
50
|
+
background: url(./images/delete.png) #e1e3e8 no-repeat center;
|
|
51
|
+
background-size: 24px 24px;
|
|
52
|
+
}
|
|
53
|
+
.ebscn-number-keyboard-delete:active {
|
|
54
|
+
background: url(./images/delete.png) #CACBD0 no-repeat center;
|
|
55
|
+
background-size: 24px 24px;
|
|
56
|
+
}
|
|
57
|
+
.ebscn-number-keyboard-confirmKey {
|
|
58
|
+
background-color: var(--ebscn-color-primary);
|
|
59
|
+
width: 25%;
|
|
60
|
+
height: 54px;
|
|
61
|
+
line-height: 54px;
|
|
62
|
+
text-align: center;
|
|
63
|
+
font-size: var(--ebscn-font-size-11);
|
|
64
|
+
color: var(--ebscn-color-text-dark-solid);
|
|
65
|
+
font-weight: 300;
|
|
66
|
+
box-shadow: 0 0 0 1px #cccccc;
|
|
67
|
+
}
|
|
68
|
+
.ebscn-number-keyboard-confirmKey:active {
|
|
69
|
+
background-color: #D03B21;
|
|
70
|
+
color: var(--ebscn-color-background);
|
|
71
|
+
}
|
|
72
|
+
@supports (bottom: env(safe-area-inset-bottom)) or (constant(safe-area-inset-bottom)) {
|
|
73
|
+
.keyboard {
|
|
74
|
+
height: calc(216px + env(safe-area-inset-bottom));
|
|
75
|
+
height: calc(216px + constant(safe-area-inset-bottom));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { NativeProps } from '../../utils/native-props';
|
|
3
|
+
export type NumberKeyboardProps = {
|
|
4
|
+
types?: 'fullKeyboard' | 'numberKeyboard' | 'numberKeyboardWithDot';
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
onInput: Function;
|
|
7
|
+
onChangeKeyBoard: Function;
|
|
8
|
+
onDelete: Function;
|
|
9
|
+
onClose: Function;
|
|
10
|
+
onClean: Function;
|
|
11
|
+
onConfirm: Function;
|
|
12
|
+
} & NativeProps;
|
|
13
|
+
export declare function NumberKeyboard(p: NumberKeyboardProps): JSX.Element;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NumberKeyboard = NumberKeyboard;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _nativeProps = require("../../utils/native-props");
|
|
10
|
+
var _withDefaultProps = require("../../utils/with-default-props");
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
var classPrefix = 'ebscn-number-keyboard';
|
|
15
|
+
var defaultProps = {
|
|
16
|
+
types: 'numberKeyboard',
|
|
17
|
+
visible: false
|
|
18
|
+
};
|
|
19
|
+
function NumberKeyboard(p) {
|
|
20
|
+
var keyboardRef = (0, _react.useRef)(null);
|
|
21
|
+
var props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
22
|
+
var visible = props.visible,
|
|
23
|
+
onInput = props.onInput,
|
|
24
|
+
onDelete = props.onDelete,
|
|
25
|
+
onChangeKeyBoard = props.onChangeKeyBoard,
|
|
26
|
+
onClose = props.onClose,
|
|
27
|
+
onClean = props.onClean,
|
|
28
|
+
onConfirm = props.onConfirm,
|
|
29
|
+
types = props.types;
|
|
30
|
+
var keys = types == 'numberKeyboard' ? [1, 2, 3, 'X', 4, 5, 6, '清除', 7, 8, 9, '隐藏', '', 0, '', '确定'] : types == 'fullKeyboard' ? [1, 2, 3, 'X', 4, 5, 6, '清除', 7, 8, 9, '隐藏', 'ABC', 0, '.', '确定'] : [1, 2, 3, 'X', 4, 5, 6, '清除', 7, 8, 9, '隐藏', '', 0, '.', '确定'];
|
|
31
|
+
var hideTimer = (0, _react.useRef)(null);
|
|
32
|
+
var appearTimer = (0, _react.useRef)(null);
|
|
33
|
+
var lastVisible = (0, _react.useRef)(null);
|
|
34
|
+
var keyFlag = (0, _react.useRef)(0);
|
|
35
|
+
(0, _react.useEffect)(function () {
|
|
36
|
+
if (!visible) {
|
|
37
|
+
if (lastVisible.current) {
|
|
38
|
+
// 键盘已实例化,调用隐藏即可
|
|
39
|
+
hideKeyBoard();
|
|
40
|
+
}
|
|
41
|
+
// 未实例化,为初始化,不需处理
|
|
42
|
+
} else {
|
|
43
|
+
showKeyBoard();
|
|
44
|
+
lastVisible.current = visible; // 记录当前键盘状态
|
|
45
|
+
}
|
|
46
|
+
}, [visible]);
|
|
47
|
+
function hideKeyBoard() {
|
|
48
|
+
keyboardRef.current.style.transform = 'translateY(100%)';
|
|
49
|
+
if (appearTimer.current) clearTimeout(appearTimer.current);
|
|
50
|
+
if (!hideTimer.current) {
|
|
51
|
+
hideTimer.current = setTimeout(function () {
|
|
52
|
+
keyboardRef.current.style.display = 'none';
|
|
53
|
+
}, 500);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function showKeyBoard() {
|
|
57
|
+
keyboardRef.current.style.display = '';
|
|
58
|
+
if (hideTimer.current) clearTimeout(hideTimer.current);
|
|
59
|
+
appearTimer.current = setTimeout(function () {
|
|
60
|
+
keyboardRef.current.style.transform = 'translateY(0)';
|
|
61
|
+
}, 20);
|
|
62
|
+
}
|
|
63
|
+
function onKeyPress(key) {
|
|
64
|
+
switch (key) {
|
|
65
|
+
case 'X':
|
|
66
|
+
return onDelete === null || onDelete === void 0 ? void 0 : onDelete();
|
|
67
|
+
case '清除':
|
|
68
|
+
return onClean === null || onClean === void 0 ? void 0 : onClean();
|
|
69
|
+
case '隐藏':
|
|
70
|
+
return onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
71
|
+
case '确定':
|
|
72
|
+
return onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
73
|
+
case 'ABC':
|
|
74
|
+
return onChangeKeyBoard === null || onChangeKeyBoard === void 0 ? void 0 : onChangeKeyBoard();
|
|
75
|
+
default:
|
|
76
|
+
return onInput === null || onInput === void 0 ? void 0 : onInput(key);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
80
|
+
ref: keyboardRef,
|
|
81
|
+
className: "".concat(classPrefix)
|
|
82
|
+
}, keys.map(function (item, index) {
|
|
83
|
+
return _react.default.createElement("div", {
|
|
84
|
+
key: item || index,
|
|
85
|
+
className: (0, _classnames.default)(item !== '确定' ? "".concat(classPrefix, "-key") : "".concat(classPrefix, "-confirmKey"), typeof item !== 'number' && item.length && item !== '.' && item !== '确定' ? "".concat(classPrefix, "-option") : item == '确定' ? "".concat(classPrefix, "-confirmKey") : "".concat(classPrefix, "-number-key"), item === 'X' && "".concat(classPrefix, "-delete")),
|
|
86
|
+
onClick: function () {
|
|
87
|
+
if (visible) {
|
|
88
|
+
onKeyPress(item);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}, item !== 'X' ? item : '');
|
|
92
|
+
})));
|
|
93
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _pdfLink = _interopRequireDefault(require("./pdfLink"));
|
|
8
|
+
require("./pdfLink.css");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var _default = exports.default = _pdfLink.default;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _ui = require("@ebscn/ui");
|
|
8
|
+
var _antdMobile = require("antd-mobile");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
13
|
+
__assign = Object.assign || function (t) {
|
|
14
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
15
|
+
s = arguments[i];
|
|
16
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
17
|
+
}
|
|
18
|
+
return t;
|
|
19
|
+
};
|
|
20
|
+
return __assign.apply(this, arguments);
|
|
21
|
+
};
|
|
22
|
+
var id = 'pdflink';
|
|
23
|
+
var PdfLink = function (props) {
|
|
24
|
+
var _a;
|
|
25
|
+
var pdfh5 = (0, _react.useRef)(null);
|
|
26
|
+
var _b = (0, _react.useState)(false),
|
|
27
|
+
visible = _b[0],
|
|
28
|
+
setVisible = _b[1];
|
|
29
|
+
var _c = (0, _react.useState)(false),
|
|
30
|
+
loading = _c[0],
|
|
31
|
+
setLoading = _c[1];
|
|
32
|
+
var setHeightTimer = (0, _react.useRef)(true);
|
|
33
|
+
var options = (_a = props.options) !== null && _a !== void 0 ? _a : {};
|
|
34
|
+
function showPdf() {
|
|
35
|
+
if (pdfh5.current) {
|
|
36
|
+
pdfh5.current.destroy();
|
|
37
|
+
}
|
|
38
|
+
setLoading(true);
|
|
39
|
+
import('pdfh5').then(function (Pdfh5) {
|
|
40
|
+
pdfh5.current = new Pdfh5.default("#".concat(id), __assign({
|
|
41
|
+
pdfurl: props.url,
|
|
42
|
+
pageNum: false,
|
|
43
|
+
zoomEnable: false,
|
|
44
|
+
maxZoom: 1.3
|
|
45
|
+
}, options));
|
|
46
|
+
pdfh5.current.on('complete', function () {
|
|
47
|
+
pdfh5.current.zoomEnable(true); // 允许缩放
|
|
48
|
+
setLoading(false);
|
|
49
|
+
});
|
|
50
|
+
pdfh5.current.on('zoom', function () {
|
|
51
|
+
if (setHeightTimer.current) {
|
|
52
|
+
clearTimeout(setHeightTimer.current);
|
|
53
|
+
setHeightTimer.current = setTimeout(function () {}, 16);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
(0, _react.useEffect)(function () {
|
|
59
|
+
if (visible) {
|
|
60
|
+
showPdf();
|
|
61
|
+
}
|
|
62
|
+
return function () {
|
|
63
|
+
if (pdfh5.current) {
|
|
64
|
+
pdfh5.current.destroy();
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}, [visible]);
|
|
68
|
+
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("a", {
|
|
69
|
+
onClick: function () {
|
|
70
|
+
return setVisible(true);
|
|
71
|
+
},
|
|
72
|
+
className: "ebscn-pdf-link"
|
|
73
|
+
}, props.children), _react.default.createElement(_antdMobile.Popup, {
|
|
74
|
+
visible: visible,
|
|
75
|
+
position: "bottom",
|
|
76
|
+
onMaskClick: function () {
|
|
77
|
+
return setVisible(false);
|
|
78
|
+
},
|
|
79
|
+
bodyStyle: {
|
|
80
|
+
height: '90vh'
|
|
81
|
+
}
|
|
82
|
+
}, _react.default.createElement("div", null, _react.default.createElement(_ui.Button, {
|
|
83
|
+
style: {
|
|
84
|
+
fontSize: '14px'
|
|
85
|
+
},
|
|
86
|
+
size: "mini",
|
|
87
|
+
color: "#333",
|
|
88
|
+
fill: "outline",
|
|
89
|
+
onClick: function () {
|
|
90
|
+
return setVisible(false);
|
|
91
|
+
},
|
|
92
|
+
disabled: loading
|
|
93
|
+
}, '<')), _react.default.createElement("div", null, _react.default.createElement("div", {
|
|
94
|
+
style: {
|
|
95
|
+
visibility: loading ? 'visible' : 'hidden'
|
|
96
|
+
}
|
|
97
|
+
}, "Loading...."), visible && _react.default.createElement("div", {
|
|
98
|
+
className: "ebscn-pdf-link-popup",
|
|
99
|
+
id: id
|
|
100
|
+
}))));
|
|
101
|
+
};
|
|
102
|
+
var _default = exports.default = PdfLink;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _protocol = _interopRequireDefault(require("./protocol"));
|
|
8
|
+
require("./protocol.css");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var _default = exports.default = _protocol.default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.ebscn-protocol {
|
|
2
|
+
overflow-y: auto;
|
|
3
|
+
margin: 10px 0;
|
|
4
|
+
}
|
|
5
|
+
.ebscn-protocol .ebscn-protocol-item {
|
|
6
|
+
display: flex;
|
|
7
|
+
margin-bottom: 10px;
|
|
8
|
+
}
|
|
9
|
+
.ebscn-protocol .ebscn-protocol-item:last-of-type {
|
|
10
|
+
margin-bottom: 0;
|
|
11
|
+
}
|
|
12
|
+
.ebscn-protocol .ebscn-protocol-item .ebscn-protocol-item-checkbox {
|
|
13
|
+
flex: 24px 0 0;
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
.ebscn-protocol .ebscn-protocol-item .ebscn-protocol-item-checkbox .ebscn-checkbox {
|
|
17
|
+
height: 18px;
|
|
18
|
+
}
|
|
19
|
+
.ebscn-protocol .ebscn-protocol-item .ebscn-protocol-item-checkbox .ebscn-checkbox::after {
|
|
20
|
+
position: absolute;
|
|
21
|
+
content: ' ';
|
|
22
|
+
width: 54px;
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
top: 0;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
left: -16px;
|
|
27
|
+
}
|
|
28
|
+
.ebscn-protocol .ebscn-protocol-item-text {
|
|
29
|
+
flex: 1;
|
|
30
|
+
color: var(--ebscn-color-text-secondary);
|
|
31
|
+
font-size: 12px;
|
|
32
|
+
line-height: 18px;
|
|
33
|
+
}
|
|
34
|
+
.ebscn-protocol.ebscn-protocol-scroll {
|
|
35
|
+
margin: 20px 0;
|
|
36
|
+
}
|
|
37
|
+
.ebscn-protocol-fixed-button {
|
|
38
|
+
position: fixed;
|
|
39
|
+
margin: 0 16px;
|
|
40
|
+
left: 0;
|
|
41
|
+
width: calc(100vw - 32px);
|
|
42
|
+
bottom: 20px;
|
|
43
|
+
}
|
|
44
|
+
.ebscn-protocol-top-button {
|
|
45
|
+
margin: 20px 0 ;
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
type Placement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
3
|
+
interface Props {
|
|
4
|
+
children?: string | ReactNode[] | ReactNode;
|
|
5
|
+
buttonTop?: boolean;
|
|
6
|
+
scrollHeight?: string;
|
|
7
|
+
onConfirm?: () => void;
|
|
8
|
+
onAllCheck?: () => void;
|
|
9
|
+
hideButton?: boolean;
|
|
10
|
+
popoverContent?: string;
|
|
11
|
+
popoverPlacement?: Placement;
|
|
12
|
+
popoverTimeout?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const Protocol: FC<Props>;
|
|
15
|
+
export default Protocol;
|