@pisell/materials 2.2.13 → 2.2.14
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/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +4 -4
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +29 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +22 -20
- package/es/components/button/index.d.ts +4 -3
- package/es/components/button/index.js +14 -3
- package/es/components/iconfont/index.d.ts +2 -1
- package/es/components/iconfont/index.js +1 -1
- package/es/components/page/index.css +0 -0
- package/es/components/page/index.d.ts +2 -2
- package/es/components/page/index.js +226 -186
- package/es/components/pisell-config-provider/context.d.ts +20 -0
- package/es/components/pisell-config-provider/context.js +36 -0
- package/es/components/pisell-config-provider/hooks/usePisellConfig.d.ts +5 -0
- package/es/components/pisell-config-provider/hooks/usePisellConfig.js +11 -0
- package/es/components/pisell-config-provider/index.d.ts +12 -0
- package/es/components/pisell-config-provider/index.js +36 -0
- package/es/components/pisellAlert/index.d.ts +22 -0
- package/es/components/pisellAlert/index.js +73 -0
- package/es/components/pisellAlert/index.less +149 -0
- package/es/components/pisellCard/index.d.ts +12 -0
- package/es/components/pisellCard/index.js +16 -0
- package/es/components/pisellCard/index.less +9 -0
- package/es/components/pisellCardList/index.d.ts +43 -0
- package/es/components/pisellCardList/index.js +72 -0
- package/es/components/pisellCardList/index.less +75 -0
- package/es/components/pisellCheckboxGroup/index.d.ts +34 -0
- package/es/components/pisellCheckboxGroup/index.js +173 -0
- package/es/components/pisellCheckboxGroup/index.less +36 -0
- package/es/components/pisellCheckboxGroup/mock.d.ts +4 -0
- package/es/components/pisellCheckboxGroup/mock.js +16 -0
- package/es/components/pisellContainer/components/Portal/index.d.ts +10 -0
- package/es/components/pisellContainer/components/Portal/index.js +7 -0
- package/es/components/pisellContainer/containers.d.ts +1 -0
- package/es/components/pisellContainer/containers.js +8 -0
- package/es/components/pisellContainer/index.d.ts +22 -0
- package/es/components/pisellContainer/index.js +19 -0
- package/es/components/pisellCountdown/index.d.ts +24 -0
- package/es/components/pisellCountdown/index.js +44 -0
- package/es/components/pisellCountdown/utils.d.ts +7 -0
- package/es/components/pisellCountdown/utils.js +50 -0
- package/es/components/pisellDatePicker/datePickerCpt.d.ts +22 -0
- package/es/components/pisellDatePicker/datePickerCpt.js +191 -0
- package/es/components/pisellDatePicker/detePickerCpt.less +22 -0
- package/es/components/pisellDatePicker/index.d.ts +3 -0
- package/es/components/pisellDatePicker/index.js +17 -0
- package/es/components/pisellEmpty/index.d.ts +16 -0
- package/es/components/pisellEmpty/index.js +38 -0
- package/es/components/pisellEmpty/index.less +34 -0
- package/es/components/pisellInformationEntry/Input/index.d.ts +8 -0
- package/es/components/pisellInformationEntry/Input/index.js +50 -0
- package/es/components/pisellInformationEntry/Input/index.less +14 -0
- package/es/components/pisellInformationEntry/Scan/index.d.ts +8 -0
- package/es/components/pisellInformationEntry/Scan/index.js +25 -0
- package/es/components/pisellInformationEntry/Scan/index.less +8 -0
- package/es/components/pisellInformationEntry/constants.d.ts +3 -0
- package/es/components/pisellInformationEntry/constants.js +21 -0
- package/es/components/pisellInformationEntry/index.d.ts +31 -0
- package/es/components/pisellInformationEntry/index.js +188 -0
- package/es/components/pisellInformationEntry/index.less +40 -0
- package/es/components/pisellInformationEntry/utils.d.ts +4 -0
- package/es/components/pisellInformationEntry/utils.js +38 -0
- package/es/components/pisellInput/components/BankCard/cardPng/AMEX.png +0 -0
- package/es/components/pisellInput/components/BankCard/cardPng/Discover.png +0 -0
- package/es/components/pisellInput/components/BankCard/cardPng/JCB.png +0 -0
- package/es/components/pisellInput/components/BankCard/cardPng/MasterCard.png +0 -0
- package/es/components/pisellInput/components/BankCard/cardPng/UnionPay.png +0 -0
- package/es/components/pisellInput/components/BankCard/cardPng/VISA.png +0 -0
- package/es/components/pisellInput/components/BankCard/index.d.ts +11 -0
- package/es/components/pisellInput/components/BankCard/index.js +82 -0
- package/es/components/pisellInput/components/BankCard/index.less +4 -0
- package/es/components/pisellInput/components/BankCard/utils.d.ts +11 -0
- package/es/components/pisellInput/components/BankCard/utils.js +65 -0
- package/es/components/pisellInput/components/Copy/index.d.ts +11 -0
- package/es/components/pisellInput/components/Copy/index.js +53 -0
- package/es/components/pisellInput/components/SecurityCode/card.png +0 -0
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +12 -0
- package/es/components/pisellInput/components/SecurityCode/index.js +46 -0
- package/es/components/pisellInput/components/SecurityCode/index.less +4 -0
- package/es/components/pisellInput/index.d.ts +13 -0
- package/es/components/pisellInput/index.js +15 -0
- package/es/components/pisellLoading/index.d.ts +18 -0
- package/es/components/pisellLoading/index.js +45 -0
- package/es/components/pisellLoading/index.less +35 -0
- package/es/components/pisellMessage/index.d.ts +4 -0
- package/es/components/pisellMessage/index.js +5 -0
- package/es/components/pisellModal/components/Information/index.d.ts +21 -0
- package/es/components/pisellModal/components/Information/index.js +25 -0
- package/es/components/pisellModal/components/Information/index.less +16 -0
- package/es/components/pisellModal/components/IpadModal/index.d.ts +6 -0
- package/es/components/pisellModal/components/IpadModal/index.js +6 -0
- package/es/components/pisellModal/components/MobileModal/index.d.ts +9 -0
- package/es/components/pisellModal/components/MobileModal/index.js +27 -0
- package/es/components/pisellModal/components/MobileModal/index.less +60 -0
- package/es/components/pisellModal/components/PcModal/index.d.ts +30 -0
- package/es/components/pisellModal/components/PcModal/index.js +129 -0
- package/es/components/pisellModal/components/PcModal/index.less +105 -0
- package/es/components/pisellModal/components/functions/index.d.ts +12 -0
- package/es/components/pisellModal/components/functions/index.js +44 -0
- package/es/components/pisellModal/components/functions/index.less +25 -0
- package/es/components/pisellModal/components/index.d.ts +10 -0
- package/es/components/pisellModal/components/index.js +9 -0
- package/es/components/pisellModal/constants.d.ts +6 -0
- package/es/components/pisellModal/constants.js +6 -0
- package/es/components/pisellModal/index.d.ts +43 -0
- package/es/components/pisellModal/index.js +30 -0
- package/es/components/pisellRow/index.d.ts +22 -0
- package/es/components/pisellRow/index.js +67 -0
- package/es/components/pisellRow/index.less +13 -0
- package/es/components/pisellScan/index.d.ts +21 -0
- package/es/components/pisellScan/index.js +80 -0
- package/es/components/pisellScan/index.less +12 -0
- package/es/components/pisellText/components/Amount/index.d.ts +18 -0
- package/es/components/pisellText/components/Amount/index.js +25 -0
- package/es/components/pisellText/index.d.ts +8 -0
- package/es/components/pisellText/index.js +7 -0
- package/es/components/pisellToast/index.d.ts +16 -0
- package/es/components/pisellToast/index.js +32 -0
- package/es/components/pisellToast/index.less +26 -0
- package/es/components/pisellTooltip/index.d.ts +10 -0
- package/es/components/pisellTooltip/index.js +15 -0
- package/es/components/pisellTooltip/index.less +5 -0
- package/es/components/pisellWalletPassCard/bg.jpeg +0 -0
- package/es/components/pisellWalletPassCard/index.d.ts +54 -0
- package/es/components/pisellWalletPassCard/index.js +93 -0
- package/es/components/pisellWalletPassCard/index.less +100 -0
- package/es/hooks/useCssVariables.d.ts +8 -0
- package/es/hooks/useCssVariables.js +21 -0
- package/es/index.d.ts +23 -0
- package/es/index.js +26 -1
- package/es/locales/en-US.d.ts +9 -0
- package/es/locales/en-US.js +13 -1
- package/es/locales/index.js +3 -1
- package/es/locales/zh-CN.d.ts +9 -0
- package/es/locales/zh-CN.js +13 -1
- package/es/locales/zh-TW.d.ts +9 -0
- package/es/locales/zh-TW.js +13 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +15 -1
- package/es/utils/locale.js +2 -1
- package/lib/components/button/index.d.ts +4 -3
- package/lib/components/button/index.js +13 -9
- package/lib/components/iconfont/index.d.ts +2 -1
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/page/index.css +0 -0
- package/lib/components/page/index.d.ts +2 -2
- package/lib/components/page/index.js +201 -161
- package/lib/components/pisell-config-provider/context.d.ts +20 -0
- package/lib/components/pisell-config-provider/context.js +49 -0
- package/lib/components/pisell-config-provider/hooks/usePisellConfig.d.ts +5 -0
- package/lib/components/pisell-config-provider/hooks/usePisellConfig.js +31 -0
- package/lib/components/pisell-config-provider/index.d.ts +12 -0
- package/lib/components/pisell-config-provider/index.js +69 -0
- package/lib/components/pisellAlert/index.d.ts +22 -0
- package/lib/components/pisellAlert/index.js +95 -0
- package/lib/components/pisellAlert/index.less +149 -0
- package/lib/components/pisellCard/index.d.ts +12 -0
- package/lib/components/pisellCard/index.js +48 -0
- package/lib/components/pisellCard/index.less +9 -0
- package/lib/components/pisellCardList/index.d.ts +43 -0
- package/lib/components/pisellCardList/index.js +108 -0
- package/lib/components/pisellCardList/index.less +75 -0
- package/lib/components/pisellCheckboxGroup/index.d.ts +34 -0
- package/lib/components/pisellCheckboxGroup/index.js +150 -0
- package/lib/components/pisellCheckboxGroup/index.less +36 -0
- package/lib/components/pisellCheckboxGroup/mock.d.ts +4 -0
- package/lib/components/pisellCheckboxGroup/mock.js +35 -0
- package/lib/components/pisellContainer/components/Portal/index.d.ts +10 -0
- package/lib/components/pisellContainer/components/Portal/index.js +40 -0
- package/lib/components/pisellContainer/containers.d.ts +1 -0
- package/lib/components/pisellContainer/containers.js +46 -0
- package/lib/components/pisellContainer/index.d.ts +22 -0
- package/lib/components/pisellContainer/index.js +49 -0
- package/lib/components/pisellCountdown/index.d.ts +24 -0
- package/lib/components/pisellCountdown/index.js +63 -0
- package/lib/components/pisellCountdown/utils.d.ts +7 -0
- package/lib/components/pisellCountdown/utils.js +60 -0
- package/lib/components/pisellDatePicker/datePickerCpt.d.ts +22 -0
- package/lib/components/pisellDatePicker/datePickerCpt.js +157 -0
- package/lib/components/pisellDatePicker/detePickerCpt.less +22 -0
- package/lib/components/pisellDatePicker/index.d.ts +3 -0
- package/lib/components/pisellDatePicker/index.js +48 -0
- package/lib/components/pisellEmpty/index.d.ts +16 -0
- package/lib/components/pisellEmpty/index.js +61 -0
- package/lib/components/pisellEmpty/index.less +34 -0
- package/lib/components/pisellInformationEntry/Input/index.d.ts +8 -0
- package/lib/components/pisellInformationEntry/Input/index.js +56 -0
- package/lib/components/pisellInformationEntry/Input/index.less +14 -0
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +8 -0
- package/lib/components/pisellInformationEntry/Scan/index.js +64 -0
- package/lib/components/pisellInformationEntry/Scan/index.less +8 -0
- package/lib/components/pisellInformationEntry/constants.d.ts +3 -0
- package/lib/components/pisellInformationEntry/constants.js +49 -0
- package/lib/components/pisellInformationEntry/index.d.ts +31 -0
- package/lib/components/pisellInformationEntry/index.js +162 -0
- package/lib/components/pisellInformationEntry/index.less +40 -0
- package/lib/components/pisellInformationEntry/utils.d.ts +4 -0
- package/lib/components/pisellInformationEntry/utils.js +40 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/AMEX.png +0 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/Discover.png +0 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/JCB.png +0 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/MasterCard.png +0 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/UnionPay.png +0 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/VISA.png +0 -0
- package/lib/components/pisellInput/components/BankCard/index.d.ts +11 -0
- package/lib/components/pisellInput/components/BankCard/index.js +98 -0
- package/lib/components/pisellInput/components/BankCard/index.less +4 -0
- package/lib/components/pisellInput/components/BankCard/utils.d.ts +11 -0
- package/lib/components/pisellInput/components/BankCard/utils.js +103 -0
- package/lib/components/pisellInput/components/Copy/index.d.ts +11 -0
- package/lib/components/pisellInput/components/Copy/index.js +61 -0
- package/lib/components/pisellInput/components/SecurityCode/card.png +0 -0
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +12 -0
- package/lib/components/pisellInput/components/SecurityCode/index.js +74 -0
- package/lib/components/pisellInput/components/SecurityCode/index.less +4 -0
- package/lib/components/pisellInput/index.d.ts +13 -0
- package/lib/components/pisellInput/index.js +46 -0
- package/lib/components/pisellLoading/index.d.ts +18 -0
- package/lib/components/pisellLoading/index.js +69 -0
- package/lib/components/pisellLoading/index.less +35 -0
- package/lib/components/pisellMessage/index.d.ts +4 -0
- package/lib/components/pisellMessage/index.js +34 -0
- package/lib/components/pisellModal/components/Information/index.d.ts +21 -0
- package/lib/components/pisellModal/components/Information/index.js +54 -0
- package/lib/components/pisellModal/components/Information/index.less +16 -0
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +6 -0
- package/lib/components/pisellModal/components/IpadModal/index.js +40 -0
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +9 -0
- package/lib/components/pisellModal/components/MobileModal/index.js +67 -0
- package/lib/components/pisellModal/components/MobileModal/index.less +60 -0
- package/lib/components/pisellModal/components/PcModal/index.d.ts +30 -0
- package/lib/components/pisellModal/components/PcModal/index.js +143 -0
- package/lib/components/pisellModal/components/PcModal/index.less +105 -0
- package/lib/components/pisellModal/components/functions/index.d.ts +12 -0
- package/lib/components/pisellModal/components/functions/index.js +90 -0
- package/lib/components/pisellModal/components/functions/index.less +25 -0
- package/lib/components/pisellModal/components/index.d.ts +10 -0
- package/lib/components/pisellModal/components/index.js +52 -0
- package/lib/components/pisellModal/constants.d.ts +6 -0
- package/lib/components/pisellModal/constants.js +33 -0
- package/lib/components/pisellModal/index.d.ts +43 -0
- package/lib/components/pisellModal/index.js +63 -0
- package/lib/components/pisellRow/index.d.ts +22 -0
- package/lib/components/pisellRow/index.js +82 -0
- package/lib/components/pisellRow/index.less +13 -0
- package/lib/components/pisellScan/index.d.ts +21 -0
- package/lib/components/pisellScan/index.js +100 -0
- package/lib/components/pisellScan/index.less +12 -0
- package/lib/components/pisellText/components/Amount/index.d.ts +18 -0
- package/lib/components/pisellText/components/Amount/index.js +64 -0
- package/lib/components/pisellText/index.d.ts +8 -0
- package/lib/components/pisellText/index.js +41 -0
- package/lib/components/pisellToast/index.d.ts +16 -0
- package/lib/components/pisellToast/index.js +59 -0
- package/lib/components/pisellToast/index.less +26 -0
- package/lib/components/pisellTooltip/index.d.ts +10 -0
- package/lib/components/pisellTooltip/index.js +53 -0
- package/lib/components/pisellTooltip/index.less +5 -0
- package/lib/components/pisellWalletPassCard/bg.jpeg +0 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +54 -0
- package/lib/components/pisellWalletPassCard/index.js +101 -0
- package/lib/components/pisellWalletPassCard/index.less +100 -0
- package/lib/hooks/useCssVariables.d.ts +8 -0
- package/lib/hooks/useCssVariables.js +36 -0
- package/lib/index.d.ts +23 -0
- package/lib/index.js +71 -0
- package/lib/locales/en-US.d.ts +9 -0
- package/lib/locales/en-US.js +13 -1
- package/lib/locales/index.js +3 -1
- package/lib/locales/zh-CN.d.ts +9 -0
- package/lib/locales/zh-CN.js +13 -1
- package/lib/locales/zh-TW.d.ts +9 -0
- package/lib/locales/zh-TW.js +13 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +16 -0
- package/lib/utils/locale.js +2 -1
- package/lowcode/_utils/transform-meta.ts +31 -10
- package/lowcode/button/__screenshots__/pisell-modal-information.png +0 -0
- package/lowcode/button/meta.ts +30 -0
- package/lowcode/button/snippets.ts +28 -0
- package/lowcode/information-modal/meta.ts +1931 -0
- package/lowcode/modal/meta.ts +1 -1
- package/lowcode/page/meta.ts +8 -1
- package/lowcode/pisell-alert/meta.ts +117 -0
- package/lowcode/pisell-alert/snippets.ts +50 -0
- package/lowcode/pisell-card/__screenshots__/card-1.png +0 -0
- package/lowcode/pisell-card/meta.ts +100 -0
- package/lowcode/pisell-card/snippets.ts +10 -0
- package/lowcode/pisell-card-list/meta.ts +145 -0
- package/lowcode/pisell-card-list/snippets.ts +9 -0
- package/lowcode/pisell-checkbox-group/meta.ts +112 -0
- package/lowcode/pisell-checkbox-group/snippets.ts +13 -0
- package/lowcode/pisell-container/meta.ts +71 -0
- package/lowcode/pisell-container/snippets.ts +14 -0
- package/lowcode/pisell-countdown/meta.ts +71 -0
- package/lowcode/pisell-countdown/snippets.ts +12 -0
- package/lowcode/pisell-date-picker/meta.ts +76 -0
- package/lowcode/pisell-date-picker/snippets.ts +9 -0
- package/lowcode/pisell-empty/__screenshots__/empty-1.png +0 -0
- package/lowcode/pisell-empty/meta.ts +85 -0
- package/lowcode/pisell-empty/snippets.ts +10 -0
- package/lowcode/pisell-information-entry/meta.ts +131 -0
- package/lowcode/pisell-information-entry/snippets.ts +17 -0
- package/lowcode/pisell-input/__screenshots__/input-1.png +0 -0
- package/lowcode/pisell-input/meta.ts +193 -0
- package/lowcode/pisell-input/snippets.ts +11 -0
- package/lowcode/pisell-input.bank-card-input/__screenshots__/pisell-input.bank-card-input.png +0 -0
- package/lowcode/pisell-input.bank-card-input/meta.ts +62 -0
- package/lowcode/pisell-input.bank-card-input/snippets.ts +11 -0
- package/lowcode/pisell-input.copy/meta.ts +73 -0
- package/lowcode/pisell-input.copy/snippets.ts +10 -0
- package/lowcode/pisell-input.security-code/__screenshots__/pisell-input.security-code.png +0 -0
- package/lowcode/pisell-input.security-code/meta.ts +92 -0
- package/lowcode/pisell-input.security-code/snippets.ts +11 -0
- package/lowcode/pisell-loading/meta.ts +98 -0
- package/lowcode/pisell-loading/snippets.ts +11 -0
- package/lowcode/pisell-modal/__screenshots__/modal-1.png +0 -0
- package/lowcode/pisell-modal/__screenshots__/modal-2.png +0 -0
- package/lowcode/pisell-modal/meta.ts +200 -0
- package/lowcode/pisell-modal/snippets.ts +38 -0
- package/lowcode/pisell-modal.information/__screenshots__/pisell-modal.information.png +0 -0
- package/lowcode/pisell-modal.information/meta.ts +116 -0
- package/lowcode/pisell-modal.information/snippets.ts +17 -0
- package/lowcode/pisell-row/meta.ts +127 -0
- package/lowcode/pisell-row/snippets.ts +24 -0
- package/lowcode/pisell-scan/meta.ts +53 -0
- package/lowcode/pisell-scan/snippets.ts +13 -0
- package/lowcode/pisell-text/meta.ts +8117 -0
- package/lowcode/pisell-text.amount/meta.ts +61 -0
- package/lowcode/pisell-text.amount/snippets.ts +15 -0
- package/lowcode/pisell-tooltip/__screenshots__/tooltip-1.jpg +0 -0
- package/lowcode/pisell-tooltip/meta.ts +306 -0
- package/lowcode/pisell-tooltip/snippets.ts +12 -0
- package/lowcode/pisell-wallet-pass-card/meta.ts +189 -0
- package/lowcode/pisell-wallet-pass-card/snippets.ts +20 -0
- package/package.json +4 -3
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellDatePicker/datePickerCpt.tsx
|
|
30
|
+
var datePickerCpt_exports = {};
|
|
31
|
+
__export(datePickerCpt_exports, {
|
|
32
|
+
default: () => datePickerCpt_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(datePickerCpt_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_detePickerCpt = require("./detePickerCpt.less");
|
|
38
|
+
var isValidDate = (dateString, format) => {
|
|
39
|
+
const date = window.dayjs(dateString, format, true);
|
|
40
|
+
return date.isValid();
|
|
41
|
+
};
|
|
42
|
+
var DatePickerInput = (props) => {
|
|
43
|
+
const { format, value, onChange, onDateChange, ...others } = props;
|
|
44
|
+
const eventChange = (val) => {
|
|
45
|
+
onChange == null ? void 0 : onChange({ target: { value: val } });
|
|
46
|
+
if (isValidDate(val, format)) {
|
|
47
|
+
onDateChange == null ? void 0 : onDateChange(
|
|
48
|
+
window.dayjs(val, format),
|
|
49
|
+
window.dayjs(val, format).format(format)
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const handleChange = (e) => {
|
|
54
|
+
let inputValue = e.target.value;
|
|
55
|
+
if (!/^[\d/]*$/.test(inputValue)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
let parts = format.split(/[^a-zA-Z]/);
|
|
59
|
+
let separators = format.match(/[^a-zA-Z]+/g) || [];
|
|
60
|
+
if (inputValue.length < value.length) {
|
|
61
|
+
eventChange == null ? void 0 : eventChange(inputValue);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
let cursor = 0;
|
|
65
|
+
let result = "";
|
|
66
|
+
let lastIndex = 0;
|
|
67
|
+
for (let i = 0; i < parts.length; i++) {
|
|
68
|
+
const part = parts[i];
|
|
69
|
+
if (!part)
|
|
70
|
+
continue;
|
|
71
|
+
const separator = separators[i] || "";
|
|
72
|
+
const expectedLength = part.length;
|
|
73
|
+
lastIndex = lastIndex + part.length + separator.length;
|
|
74
|
+
let start = cursor;
|
|
75
|
+
if (i > 0) {
|
|
76
|
+
start += separators.slice(0, i).join("").length;
|
|
77
|
+
}
|
|
78
|
+
let end = start + expectedLength;
|
|
79
|
+
let userPart = inputValue.slice(start, end);
|
|
80
|
+
if (userPart.length > 0) {
|
|
81
|
+
result += separators[i - 1] || "";
|
|
82
|
+
}
|
|
83
|
+
if (userPart.length === 0 && result.slice(result.length - 1) !== inputValue.slice(result.length - 1)) {
|
|
84
|
+
userPart = inputValue.slice(result.length - 1);
|
|
85
|
+
}
|
|
86
|
+
if (part.includes("Y")) {
|
|
87
|
+
result += userPart;
|
|
88
|
+
} else {
|
|
89
|
+
if (userPart.length === 1 && ["M", "D", "H", "m", "s"].includes(part[0])) {
|
|
90
|
+
if ("M" === part[0] && userPart > 1) {
|
|
91
|
+
userPart = "0" + userPart;
|
|
92
|
+
}
|
|
93
|
+
if ("D" === part[0] && userPart > 3) {
|
|
94
|
+
userPart = "0" + userPart;
|
|
95
|
+
}
|
|
96
|
+
if ("H" === part[0] && userPart > 2) {
|
|
97
|
+
userPart = "0" + userPart;
|
|
98
|
+
}
|
|
99
|
+
if ("m" === part[0] && userPart > 7) {
|
|
100
|
+
userPart = "0" + userPart;
|
|
101
|
+
}
|
|
102
|
+
if ("s" === part[0] && userPart > 7) {
|
|
103
|
+
userPart = "0" + userPart;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
result += userPart;
|
|
107
|
+
}
|
|
108
|
+
if (userPart.length === expectedLength && !inputValue.slice(lastIndex - 1).startsWith(separator)) {
|
|
109
|
+
result += separator;
|
|
110
|
+
}
|
|
111
|
+
cursor += userPart.length;
|
|
112
|
+
}
|
|
113
|
+
eventChange == null ? void 0 : eventChange(result);
|
|
114
|
+
};
|
|
115
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Input, { ...others, type: "tel", value, onChange: handleChange });
|
|
116
|
+
};
|
|
117
|
+
var DatePickerCpt = (props) => {
|
|
118
|
+
const { format, type, onChange, size, picker } = props;
|
|
119
|
+
const propsObj = (0, import_react.useMemo)(() => {
|
|
120
|
+
if (picker && picker !== "date") {
|
|
121
|
+
return {
|
|
122
|
+
inputRender: void 0
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
if (type === "input") {
|
|
126
|
+
return {
|
|
127
|
+
popupClassName: "pisell-date-picker-type-input",
|
|
128
|
+
suffixIcon: null,
|
|
129
|
+
placeholder: format || ""
|
|
130
|
+
};
|
|
131
|
+
} else if (type === "select") {
|
|
132
|
+
return {
|
|
133
|
+
inputReadOnly: true
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return {};
|
|
137
|
+
}, [type, picker, format]);
|
|
138
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
139
|
+
import_antd.DatePicker,
|
|
140
|
+
{
|
|
141
|
+
...props,
|
|
142
|
+
className: "pisell-date-picker",
|
|
143
|
+
inputRender: (props2) => {
|
|
144
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
145
|
+
DatePickerInput,
|
|
146
|
+
{
|
|
147
|
+
...props2,
|
|
148
|
+
onDateChange: onChange,
|
|
149
|
+
format
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
},
|
|
153
|
+
...propsObj
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
var datePickerCpt_default = DatePickerCpt;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.pisell-date-picker-type-input {
|
|
2
|
+
display: none;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.pisell-date-picker {
|
|
6
|
+
padding: 11px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.pisell-lowcode-picker{
|
|
10
|
+
border-radius: 10px;
|
|
11
|
+
.pisell-lowcode-picker-input>input {
|
|
12
|
+
line-height: 1.5;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
border: none;
|
|
15
|
+
box-shadow: none!important;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pisell-lowcode-picker .pisell-lowcode-picker-input>input::placeholder {
|
|
20
|
+
color: #D0D5DD !important;
|
|
21
|
+
font-size: 16px !important;
|
|
22
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellDatePicker/index.tsx
|
|
30
|
+
var pisellDatePicker_exports = {};
|
|
31
|
+
__export(pisellDatePicker_exports, {
|
|
32
|
+
default: () => pisellDatePicker_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellDatePicker_exports);
|
|
35
|
+
var import_datePickerCpt = __toESM(require("./datePickerCpt"));
|
|
36
|
+
var import_hoc = require("../../utils/hoc");
|
|
37
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
38
|
+
var import_localeData = __toESM(require("dayjs/plugin/localeData"));
|
|
39
|
+
var import_weekday = __toESM(require("dayjs/plugin/weekday"));
|
|
40
|
+
import_dayjs.default.extend(import_weekday.default);
|
|
41
|
+
import_dayjs.default.extend(import_localeData.default);
|
|
42
|
+
var PisellDatePicker = (0, import_hoc.withMomentProps)(import_datePickerCpt.default, [
|
|
43
|
+
"defaultPickerValue",
|
|
44
|
+
"defaultValue",
|
|
45
|
+
"showTime.defaultValue",
|
|
46
|
+
"value"
|
|
47
|
+
]);
|
|
48
|
+
var pisellDatePicker_default = PisellDatePicker;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EmptyProps } from 'antd';
|
|
3
|
+
import { PisellContextType } from "../pisell-config-provider/context";
|
|
4
|
+
import './index.less';
|
|
5
|
+
export interface PisellEmptyProps extends EmptyProps {
|
|
6
|
+
/** 平台 */
|
|
7
|
+
platform?: PisellContextType['platform'];
|
|
8
|
+
/** 额外内容描述 */
|
|
9
|
+
extraDescription?: React.ReactNode;
|
|
10
|
+
/** 额外内容描述 */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** 自定义底部额外操作区域 */
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
declare const PisellEmpty: (props: PisellEmptyProps) => React.JSX.Element;
|
|
16
|
+
export default PisellEmpty;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellEmpty/index.tsx
|
|
30
|
+
var pisellEmpty_exports = {};
|
|
31
|
+
__export(pisellEmpty_exports, {
|
|
32
|
+
default: () => pisellEmpty_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellEmpty_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_Inbox01 = __toESM(require("@pisell/icon/es/Inbox01"));
|
|
39
|
+
var import_locales = require("../../locales");
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var PisellEmpty = (props) => {
|
|
42
|
+
const {
|
|
43
|
+
description = (0, import_locales.getText)("pisell-empty-description-no-data"),
|
|
44
|
+
extraDescription,
|
|
45
|
+
icon,
|
|
46
|
+
footer,
|
|
47
|
+
className,
|
|
48
|
+
...others
|
|
49
|
+
} = props;
|
|
50
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
51
|
+
import_antd.Empty,
|
|
52
|
+
{
|
|
53
|
+
...others,
|
|
54
|
+
className: (0, import_classnames.default)("pisell-empty-wrap", className),
|
|
55
|
+
image: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-empty-icon-wrap" }, icon || /* @__PURE__ */ import_react.default.createElement(import_Inbox01.default, { style: { color: "#667085" } })),
|
|
56
|
+
description: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-empty-wrap-description-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-empty-wrap-description" }, description), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-empty-wrap-extra-description" }, extraDescription))
|
|
57
|
+
},
|
|
58
|
+
footer
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
var pisellEmpty_default = PisellEmpty;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.pisell-empty-wrap {
|
|
2
|
+
margin: 50px auto;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: center;
|
|
6
|
+
.pisell-lowcode-empty-image {
|
|
7
|
+
height: auto;
|
|
8
|
+
margin-bottom: 0;
|
|
9
|
+
}
|
|
10
|
+
.pisell-empty-icon-wrap {
|
|
11
|
+
.anticon {
|
|
12
|
+
font-size: 44px !important;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.pisell-empty-wrap-description-wrap {
|
|
16
|
+
max-width: 300px;
|
|
17
|
+
.pisell-empty-wrap-description {
|
|
18
|
+
color: var(--Gray-500, #667085);
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
line-height: 20px; /* 142.857% */
|
|
23
|
+
margin: 12px 0;
|
|
24
|
+
}
|
|
25
|
+
.pisell-empty-wrap-extra-description {
|
|
26
|
+
color: var(--Gray-500, #667085);
|
|
27
|
+
text-align: center;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
font-style: normal;
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
line-height: 20px; /* 142.857% */
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellEntryInputProps {
|
|
4
|
+
onChange: (val: string) => void;
|
|
5
|
+
searchDescribe?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const PisellEntryInput: (props: PisellEntryInputProps) => React.JSX.Element;
|
|
8
|
+
export default PisellEntryInput;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellInformationEntry/Input/index.tsx
|
|
30
|
+
var Input_exports = {};
|
|
31
|
+
__export(Input_exports, {
|
|
32
|
+
default: () => Input_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Input_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_pisellInput = __toESM(require("../../pisellInput"));
|
|
37
|
+
var import_button = __toESM(require("../../button"));
|
|
38
|
+
var import_iconfont = __toESM(require("../../iconfont"));
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var import_locales = require("../../../locales");
|
|
41
|
+
var PisellEntryInput = (props) => {
|
|
42
|
+
const { onChange, searchDescribe } = props;
|
|
43
|
+
const [value, setValue] = (0, import_react.useState)("");
|
|
44
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-entry-input-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-entry-input-line" }, /* @__PURE__ */ import_react.default.createElement(
|
|
45
|
+
import_pisellInput.default,
|
|
46
|
+
{
|
|
47
|
+
autoFocus: true,
|
|
48
|
+
value,
|
|
49
|
+
onChange: (e) => setValue(e.target.value),
|
|
50
|
+
style: { flex: 1 },
|
|
51
|
+
prefix: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { style: { color: "#667085" }, type: "pisell2-search-lg" }),
|
|
52
|
+
allowClear: true
|
|
53
|
+
}
|
|
54
|
+
), /* @__PURE__ */ import_react.default.createElement(import_button.default, { size: "large", onClick: () => onChange(value), disabled: !value }, (0, import_locales.getText)("pisell-information-entry-input-search"))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-entry-input-describe" }, searchDescribe));
|
|
55
|
+
};
|
|
56
|
+
var Input_default = PisellEntryInput;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.pisell-entry-input-wrap {
|
|
2
|
+
.pisell-entry-input-line {
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 10px;
|
|
5
|
+
}
|
|
6
|
+
.pisell-entry-input-describe {
|
|
7
|
+
color: var(--Gray-600, #475467);
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-weight: 400;
|
|
11
|
+
line-height: 20px; /* 142.857% */
|
|
12
|
+
margin-top: 8px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellInformationEntry/Scan/index.tsx
|
|
30
|
+
var Scan_exports = {};
|
|
31
|
+
__export(Scan_exports, {
|
|
32
|
+
default: () => Scan_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Scan_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_pisellScan = __toESM(require("../../pisellScan"));
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var import_locales = require("../../../locales");
|
|
39
|
+
var Scan = (props) => {
|
|
40
|
+
const { onChange, onCancel } = props;
|
|
41
|
+
const scanRef = (0, import_react.useRef)(null);
|
|
42
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
43
|
+
import_pisellScan.default,
|
|
44
|
+
{
|
|
45
|
+
width: "100%",
|
|
46
|
+
height: "200px",
|
|
47
|
+
borderRadius: "12px",
|
|
48
|
+
onChange,
|
|
49
|
+
ref: scanRef
|
|
50
|
+
},
|
|
51
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-scan-custom-action" }, /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
onClick: () => {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
(_b = (_a = scanRef.current) == null ? void 0 : _a.codeReader) == null ? void 0 : _b.reset();
|
|
57
|
+
onCancel();
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
(0, import_locales.getText)("pisell-information-entry-scan-exit")
|
|
61
|
+
))
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
var Scan_default = Scan;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellInformationEntry/constants.ts
|
|
20
|
+
var constants_exports = {};
|
|
21
|
+
__export(constants_exports, {
|
|
22
|
+
entryModeTextIcon: () => entryModeTextIcon,
|
|
23
|
+
passiveModeType: () => passiveModeType
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(constants_exports);
|
|
26
|
+
var entryModeTextIcon = {
|
|
27
|
+
scanCode: {
|
|
28
|
+
icon: "pisell2-a-qr-code-02",
|
|
29
|
+
text: "Scan Bar/QR codes"
|
|
30
|
+
},
|
|
31
|
+
input: {
|
|
32
|
+
icon: "pisell2-a-keyboard-011",
|
|
33
|
+
text: "Enter coupon codes"
|
|
34
|
+
},
|
|
35
|
+
scanner: {
|
|
36
|
+
icon: "pisell2-a-Scanner1",
|
|
37
|
+
text: "Scanner ready"
|
|
38
|
+
},
|
|
39
|
+
nfc: {
|
|
40
|
+
icon: "pisell2-a-NFC2",
|
|
41
|
+
text: "NFC ready"
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var passiveModeType = ["scanner", "nfc"];
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
entryModeTextIcon,
|
|
48
|
+
passiveModeType
|
|
49
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export declare type EntryModeType = {
|
|
5
|
+
/**
|
|
6
|
+
* 录入模式名称
|
|
7
|
+
* scanCode: 扫码录入
|
|
8
|
+
* input: 手动录入
|
|
9
|
+
* scanner: 扫码枪录入
|
|
10
|
+
* nfc: NFC录入
|
|
11
|
+
*/
|
|
12
|
+
type: 'scanCode' | 'input' | 'scanner' | 'nfc';
|
|
13
|
+
/**
|
|
14
|
+
* 录入模式文案 没有使用默认文案
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
};
|
|
18
|
+
export interface PisellInformationEntryProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'onChange'> {
|
|
19
|
+
/** 平台 */
|
|
20
|
+
platform?: PisellContextType['platform'];
|
|
21
|
+
/** 录入模式 */
|
|
22
|
+
entryModes: EntryModeType[];
|
|
23
|
+
/** 标题文案 */
|
|
24
|
+
title?: React.ReactNode;
|
|
25
|
+
/** 搜索框描述文案 */
|
|
26
|
+
searchDescribe?: React.ReactNode;
|
|
27
|
+
/** 录入信息值改变 */
|
|
28
|
+
onChange?: (val: string) => void;
|
|
29
|
+
}
|
|
30
|
+
declare const PisellInformationEntry: (props: PisellInformationEntryProps) => React.JSX.Element;
|
|
31
|
+
export default PisellInformationEntry;
|