@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
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ButtonProps as OriginalButtonProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps as OriginalButtonProps } from 'antd';
|
|
3
3
|
export interface ButtonProps extends OriginalButtonProps {
|
|
4
|
-
__designMode?:
|
|
4
|
+
__designMode?: 'design' | undefined;
|
|
5
5
|
href?: string;
|
|
6
|
+
rightIcon?: React.ReactNode;
|
|
6
7
|
}
|
|
7
8
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<any>>;
|
|
8
9
|
export default Button;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import React, { forwardRef } from
|
|
3
|
-
import { Button as OriginalButton } from
|
|
2
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
3
|
+
import { Button as OriginalButton } from 'antd';
|
|
4
4
|
var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
5
5
|
var _props$href;
|
|
6
6
|
var innerProps = {};
|
|
@@ -8,8 +8,19 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
8
8
|
// 解决低代码编辑器中按钮设置 href 属性造成按钮点击重定向问题
|
|
9
9
|
innerProps.href = undefined;
|
|
10
10
|
}
|
|
11
|
+
var _children = useMemo(function () {
|
|
12
|
+
if (props.rightIcon) {
|
|
13
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
14
|
+
style: {
|
|
15
|
+
marginRight: 8
|
|
16
|
+
}
|
|
17
|
+
}, " ", props.children), props.rightIcon);
|
|
18
|
+
}
|
|
19
|
+
return props.children;
|
|
20
|
+
}, [props.children, props.rightIcon]);
|
|
11
21
|
return /*#__PURE__*/React.createElement(OriginalButton, _extends({}, props, innerProps, {
|
|
12
|
-
ref: ref
|
|
22
|
+
ref: ref,
|
|
23
|
+
children: _children
|
|
13
24
|
}));
|
|
14
25
|
});
|
|
15
26
|
export default Button;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
interface IconFontProps extends
|
|
3
|
+
interface IconFontProps extends IconComponentProps {
|
|
3
4
|
type: string;
|
|
4
5
|
}
|
|
5
6
|
declare const IconFont: React.FC<IconFontProps>;
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
var MyIcon = createFromIconfontCN({
|
|
5
|
-
scriptUrl: 'https://at.alicdn.com/t/c/
|
|
5
|
+
scriptUrl: 'https://at.alicdn.com/t/c/font_4075221_cy8sszjz7t7.js' // 在 iconfont.cn 上生成
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
var IconFont = function IconFont(props) {
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ConfigProviderProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConfigProviderProps } from '../config-provider';
|
|
3
3
|
interface PageProps extends ConfigProviderProps {
|
|
4
4
|
}
|
|
5
5
|
declare const Page: (props: PageProps) => React.JSX.Element;
|
|
@@ -1,218 +1,258 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1
2
|
var _excluded = ["children", "style", "locale"];
|
|
2
|
-
var _theme$token;
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
5
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
-
import React from
|
|
11
|
+
import React, { useMemo } from 'react';
|
|
7
12
|
import ConfigProvider from "../config-provider";
|
|
8
|
-
import { AdapterDayjs } from
|
|
9
|
-
import { LocalizationProvider, createTheme, ThemeProvider, LocaleProvider } from
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
13
|
+
import { AdapterDayjs } from '@pisell/date-picker/es/AdapterDayjs';
|
|
14
|
+
import { LocalizationProvider, createTheme, ThemeProvider, LocaleProvider } from '@pisell/date-picker';
|
|
15
|
+
import { App } from 'antd';
|
|
16
|
+
import enUS from 'antd/locale/en_US';
|
|
17
|
+
import zhCN from 'antd/locale/zh_CN';
|
|
18
|
+
import zhTW from 'antd/locale/zh_TW';
|
|
19
|
+
import zhHK from 'antd/locale/zh_HK';
|
|
20
|
+
import PisellConfigProvider from "../pisell-config-provider";
|
|
21
|
+
import useEngineContext from "../../hooks/useEngineContext";
|
|
14
22
|
var localMap = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
'zh-TW': zhTW,
|
|
24
|
+
'zh-CN': zhCN,
|
|
25
|
+
'zh-HK': zhHK,
|
|
26
|
+
'en-US': enUS,
|
|
19
27
|
en: enUS
|
|
20
28
|
};
|
|
21
|
-
var theme = {
|
|
22
|
-
components: {
|
|
23
|
-
Table: {
|
|
24
|
-
colorFillContent: "#EAECF0",
|
|
25
|
-
colorFillSecondary: "#F2F4F7",
|
|
26
|
-
colorBorderSecondary: "#EAECF0",
|
|
27
|
-
colorFillAlter: "#F9FAFB",
|
|
28
|
-
controlItemBgHover: "#F9FAFB",
|
|
29
|
-
colorTextHeading: "#475467",
|
|
30
|
-
colorTextDescription: "#667085",
|
|
31
|
-
colorText: "#101828",
|
|
32
|
-
controlHeight: 32,
|
|
33
|
-
padding: 24,
|
|
34
|
-
margin: 16
|
|
35
|
-
},
|
|
36
|
-
Button: {
|
|
37
|
-
borderRadiusSM: 6,
|
|
38
|
-
borderRadiusLG: 9,
|
|
39
|
-
borderRadius: 8,
|
|
40
|
-
controlHeight: 36,
|
|
41
|
-
colorBgContainerDisabled: "#F2F4F7",
|
|
42
|
-
colorBgTextHover: "#F9FAFB",
|
|
43
|
-
colorBorder: "#D0D5DD",
|
|
44
|
-
colorError: "#D92D20",
|
|
45
|
-
colorErrorActive: "#D92D20",
|
|
46
|
-
colorErrorHover: "#B42318",
|
|
47
|
-
colorErrorBg: "#FEF3F2",
|
|
48
|
-
colorErrorBorderHover: "#FDA29B",
|
|
49
|
-
colorErrorOutline: "rgba(217, 45, 32, 0.06)",
|
|
50
|
-
colorLink: "#175CD3",
|
|
51
|
-
colorLinkActive: "#194185",
|
|
52
|
-
colorLinkHover: "#1849A9",
|
|
53
|
-
colorPrimaryActive: "#7f56d9",
|
|
54
|
-
colorPrimaryBorder: "#E9D7FE",
|
|
55
|
-
colorText: "#344054",
|
|
56
|
-
colorTextDisabled: "#D0D5DD",
|
|
57
|
-
colorTextLightSolid: "#fff",
|
|
58
|
-
colorBgTextActive: "#D0D5DD",
|
|
59
|
-
controlOutline: "rgba(127, 86, 217, 0.04)",
|
|
60
|
-
controlTmpOutline: "#F9FAFB",
|
|
61
|
-
paddingContentHorizontal: 14,
|
|
62
|
-
marginXS: 8
|
|
63
|
-
},
|
|
64
|
-
Divider: {
|
|
65
|
-
colorSplit: "#EAECF0"
|
|
66
|
-
},
|
|
67
|
-
Breadcrumb: {
|
|
68
|
-
itemColor: "#475467",
|
|
69
|
-
colorTextDescription: "#475467",
|
|
70
|
-
lastItemColor: "#6941C6",
|
|
71
|
-
separatorMargin: 12,
|
|
72
|
-
separatorColor: "#D0D5DD",
|
|
73
|
-
linkHoverColor: "#1D2939",
|
|
74
|
-
linkColor: "#475467",
|
|
75
|
-
colorBgTextHover: "#F9FAFB",
|
|
76
|
-
paddingXXS: 8
|
|
77
|
-
},
|
|
78
|
-
Dropdown: {
|
|
79
|
-
borderRadiusLG: 8,
|
|
80
|
-
// "boxShadowPopoverArrow": "2px 2px 5px rgba(0, 0, 0, 0.05)",
|
|
81
|
-
controlHeight: 42,
|
|
82
|
-
fontSize: 14
|
|
83
|
-
},
|
|
84
|
-
DatePicker: {
|
|
85
|
-
borderRadius: 8,
|
|
86
|
-
colorTextPlaceholder: "#667085",
|
|
87
|
-
colorIcon: "#667085",
|
|
88
|
-
colorTextQuaternary: "#D0D5DD",
|
|
89
|
-
colorBgContainerDisabled: "#F9FAFB",
|
|
90
|
-
colorTextDisabled: "#98A2B3"
|
|
91
|
-
},
|
|
92
|
-
Input: {
|
|
93
|
-
fontSizeIcon: 16
|
|
94
|
-
// "lineHeight": 1
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
Select: {
|
|
98
|
-
fontSizeIcon: 16
|
|
99
|
-
// "lineHeight": 1
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
token: {
|
|
104
|
-
colorPrimary: "#7F56D9",
|
|
105
|
-
colorPrimaryBg: "#F9F5FF",
|
|
106
|
-
colorPrimaryBgHover: "#F4EBFF",
|
|
107
|
-
colorPrimaryBorder: "#E9D7FE",
|
|
108
|
-
colorPrimaryBorderHover: "#D6BBFB",
|
|
109
|
-
colorPrimaryHover: "#6941C6",
|
|
110
|
-
colorPrimaryActive: "#53389E",
|
|
111
|
-
colorPrimaryTextHover: "#53389E",
|
|
112
|
-
colorPrimaryText: "#6941C6",
|
|
113
|
-
colorPrimaryTextActive: "#42307D",
|
|
114
|
-
colorSuccess: "#079455",
|
|
115
|
-
colorSuccessBg: "#ECFDF3",
|
|
116
|
-
colorSuccessBgHover: "#DCFAE6",
|
|
117
|
-
colorSuccessBorder: "#ABEFC6",
|
|
118
|
-
colorSuccessBorderHover: "#75E0A7",
|
|
119
|
-
colorSuccessHover: "#067647",
|
|
120
|
-
colorSuccessText: "#067647",
|
|
121
|
-
colorSuccessActive: "#085D3A",
|
|
122
|
-
colorSuccessTextHover: "#085D3A",
|
|
123
|
-
colorSuccessTextActive: "#074D31",
|
|
124
|
-
colorWarning: "#dc6803",
|
|
125
|
-
colorWarningBg: "#FFFAEB",
|
|
126
|
-
colorWarningBgHover: "#FEF0C7",
|
|
127
|
-
colorWarningBorder: "#FEDF89",
|
|
128
|
-
colorWarningBorderHover: "#FEC84B",
|
|
129
|
-
colorWarningHover: "#B54708",
|
|
130
|
-
colorWarningText: "#B54708",
|
|
131
|
-
colorWarningActive: "#93370D",
|
|
132
|
-
colorWarningTextHover: "#93370D",
|
|
133
|
-
colorWarningTextActive: "#7A2E0E",
|
|
134
|
-
colorError: "#d92d20",
|
|
135
|
-
colorErrorBg: "#FEF3F2",
|
|
136
|
-
colorErrorBgHover: "#FEE4E2",
|
|
137
|
-
colorErrorBorder: "#FECDCA",
|
|
138
|
-
colorErrorBorderHover: "#FDA29B",
|
|
139
|
-
colorErrorHover: "#B42318",
|
|
140
|
-
colorErrorText: "#B42318",
|
|
141
|
-
colorErrorActive: "#912018",
|
|
142
|
-
colorErrorTextHover: "#912018",
|
|
143
|
-
colorErrorTextActive: "#7A271A",
|
|
144
|
-
colorInfo: "#1570ef",
|
|
145
|
-
colorInfoBg: "#EFF8FF",
|
|
146
|
-
colorInfoBgHover: "#D1E9FF",
|
|
147
|
-
colorInfoBorder: "#B2DDFF",
|
|
148
|
-
colorInfoBorderHover: "#84CAFF",
|
|
149
|
-
colorInfoHover: "#175CD3",
|
|
150
|
-
colorInfoText: "#175CD3",
|
|
151
|
-
colorInfoActive: "#1849A9",
|
|
152
|
-
colorInfoTextHover: "#1849A9",
|
|
153
|
-
colorInfoTextActive: "#194185",
|
|
154
|
-
colorText: "#101828",
|
|
155
|
-
colorTextSecondary: "#475467",
|
|
156
|
-
colorTextTertiary: "#667085",
|
|
157
|
-
colorTextQuaternary: "#D0D5DD",
|
|
158
|
-
colorBorder: "#D0D5DD",
|
|
159
|
-
colorBorderSecondary: "#EAECF0",
|
|
160
|
-
colorFill: "#D0D5DD",
|
|
161
|
-
colorFillSecondary: "#EAECF0",
|
|
162
|
-
colorFillTertiary: "#F2F4F7",
|
|
163
|
-
colorFillQuaternary: "#F9FAFB",
|
|
164
|
-
colorBgLayout: "#F2F4F7",
|
|
165
|
-
colorBgSpotlight: "#101828",
|
|
166
|
-
colorBgMask: "rgba(0, 0, 0, 0.5)",
|
|
167
|
-
wireframe: false,
|
|
168
|
-
borderRadius: 8
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
var datePickerTheme = createTheme({
|
|
172
|
-
palette: {
|
|
173
|
-
primary: {
|
|
174
|
-
main: ((_theme$token = theme.token) === null || _theme$token === void 0 ? void 0 : _theme$token.colorPrimary) || "#7F56D9"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
29
|
var localeDateMap = {
|
|
179
|
-
|
|
180
|
-
adapterLocale:
|
|
30
|
+
'en-US': {
|
|
31
|
+
adapterLocale: 'en'
|
|
181
32
|
},
|
|
182
33
|
en: {
|
|
183
|
-
adapterLocale:
|
|
34
|
+
adapterLocale: 'en'
|
|
184
35
|
},
|
|
185
|
-
|
|
186
|
-
adapterLocale:
|
|
36
|
+
'zh-TW': {
|
|
37
|
+
adapterLocale: 'zh-tw'
|
|
187
38
|
},
|
|
188
|
-
|
|
189
|
-
adapterLocale:
|
|
39
|
+
'zh-HK': {
|
|
40
|
+
adapterLocale: 'zh-tw'
|
|
190
41
|
},
|
|
191
|
-
|
|
192
|
-
adapterLocale:
|
|
42
|
+
'zh-CN': {
|
|
43
|
+
adapterLocale: 'zh-cn'
|
|
193
44
|
}
|
|
194
45
|
};
|
|
195
46
|
var Page = function Page(props) {
|
|
196
|
-
var _localeDateMap;
|
|
47
|
+
var _context$appHelper, _context$engine, _context$engine$props, _localeDateMap;
|
|
197
48
|
var children = props.children,
|
|
198
49
|
style = props.style,
|
|
199
|
-
|
|
50
|
+
propsLocale = props.locale,
|
|
200
51
|
others = _objectWithoutProperties(props, _excluded);
|
|
52
|
+
var context = useEngineContext();
|
|
53
|
+
var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.constants) || {},
|
|
54
|
+
platform = _ref.platform,
|
|
55
|
+
themeColor = _ref.themeColor;
|
|
56
|
+
var locale = propsLocale || (context === null || context === void 0 ? void 0 : (_context$engine = context.engine) === null || _context$engine === void 0 ? void 0 : (_context$engine$props = _context$engine.props) === null || _context$engine$props === void 0 ? void 0 : _context$engine$props.locale) || 'en';
|
|
57
|
+
var theme = useMemo(function () {
|
|
58
|
+
if (props !== null && props !== void 0 && props.theme) {
|
|
59
|
+
var _props$theme, _props$theme$token;
|
|
60
|
+
return _objectSpread(_objectSpread({}, props.theme), {}, {
|
|
61
|
+
token: _objectSpread(_objectSpread({}, props.theme.token), {}, {
|
|
62
|
+
// 外部透传主题时,如果没有传入colorPrimary 默认使用主项目内主题色
|
|
63
|
+
colorPrimary: (props === null || props === void 0 ? void 0 : (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : (_props$theme$token = _props$theme.token) === null || _props$theme$token === void 0 ? void 0 : _props$theme$token.colorPrimary) || themeColor || '#7F56D9'
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
components: {
|
|
69
|
+
Table: {
|
|
70
|
+
colorFillContent: '#EAECF0',
|
|
71
|
+
colorFillSecondary: '#F2F4F7',
|
|
72
|
+
colorBorderSecondary: '#EAECF0',
|
|
73
|
+
colorFillAlter: '#F9FAFB',
|
|
74
|
+
controlItemBgHover: '#F9FAFB',
|
|
75
|
+
colorTextHeading: '#475467',
|
|
76
|
+
colorTextDescription: '#667085',
|
|
77
|
+
colorText: '#101828',
|
|
78
|
+
controlHeight: 32,
|
|
79
|
+
padding: 24,
|
|
80
|
+
margin: 16
|
|
81
|
+
},
|
|
82
|
+
Message: {
|
|
83
|
+
contentBg: '#101828'
|
|
84
|
+
},
|
|
85
|
+
Button: {
|
|
86
|
+
borderRadiusSM: 6,
|
|
87
|
+
borderRadiusLG: 9,
|
|
88
|
+
borderRadius: 8,
|
|
89
|
+
controlHeight: 36,
|
|
90
|
+
colorBgContainerDisabled: '#F2F4F7',
|
|
91
|
+
colorBgTextHover: '#F9FAFB',
|
|
92
|
+
colorBorder: '#D0D5DD',
|
|
93
|
+
colorError: '#D92D20',
|
|
94
|
+
colorErrorActive: '#D92D20',
|
|
95
|
+
colorErrorHover: '#B42318',
|
|
96
|
+
colorErrorBg: '#FEF3F2',
|
|
97
|
+
colorErrorBorderHover: '#FDA29B',
|
|
98
|
+
colorErrorOutline: 'rgba(217, 45, 32, 0.06)',
|
|
99
|
+
colorLink: '#175CD3',
|
|
100
|
+
colorLinkActive: '#194185',
|
|
101
|
+
colorLinkHover: '#1849A9',
|
|
102
|
+
// colorPrimaryActive: '#7f56d9',
|
|
103
|
+
// colorPrimaryBorder: '#E9D7FE',
|
|
104
|
+
colorText: '#344054',
|
|
105
|
+
colorTextDisabled: '#D0D5DD',
|
|
106
|
+
colorTextLightSolid: '#fff',
|
|
107
|
+
colorBgTextActive: '#D0D5DD',
|
|
108
|
+
controlOutline: 'rgba(127, 86, 217, 0.04)',
|
|
109
|
+
controlTmpOutline: '#F9FAFB',
|
|
110
|
+
paddingContentHorizontal: 14,
|
|
111
|
+
marginXS: 8
|
|
112
|
+
},
|
|
113
|
+
Divider: {
|
|
114
|
+
colorSplit: '#EAECF0'
|
|
115
|
+
},
|
|
116
|
+
Breadcrumb: {
|
|
117
|
+
itemColor: '#475467',
|
|
118
|
+
colorTextDescription: '#475467',
|
|
119
|
+
// lastItemColor: '#6941C6',
|
|
120
|
+
separatorMargin: 12,
|
|
121
|
+
separatorColor: '#D0D5DD',
|
|
122
|
+
linkHoverColor: '#1D2939',
|
|
123
|
+
linkColor: '#475467',
|
|
124
|
+
colorBgTextHover: '#F9FAFB',
|
|
125
|
+
paddingXXS: 8
|
|
126
|
+
},
|
|
127
|
+
Dropdown: {
|
|
128
|
+
borderRadiusLG: 8,
|
|
129
|
+
// "boxShadowPopoverArrow": "2px 2px 5px rgba(0, 0, 0, 0.05)",
|
|
130
|
+
controlHeight: 42,
|
|
131
|
+
fontSize: 14
|
|
132
|
+
},
|
|
133
|
+
DatePicker: {
|
|
134
|
+
borderRadius: 8,
|
|
135
|
+
colorTextPlaceholder: '#667085',
|
|
136
|
+
colorIcon: '#667085',
|
|
137
|
+
colorTextQuaternary: '#D0D5DD',
|
|
138
|
+
colorBgContainerDisabled: '#F9FAFB',
|
|
139
|
+
colorTextDisabled: '#98A2B3'
|
|
140
|
+
},
|
|
141
|
+
Input: {
|
|
142
|
+
fontSizeIcon: 16,
|
|
143
|
+
addonBg: '#fff'
|
|
144
|
+
// "lineHeight": 1
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
Select: {
|
|
148
|
+
fontSizeIcon: 16
|
|
149
|
+
// "lineHeight": 1
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
token: {
|
|
154
|
+
colorPrimary: themeColor || '#7F56D9',
|
|
155
|
+
// colorPrimaryBg: '#F9F5FF',
|
|
156
|
+
// colorPrimaryBgHover: '#F4EBFF',
|
|
157
|
+
// colorPrimaryBorder: '#E9D7FE',
|
|
158
|
+
// colorPrimaryBorderHover: '#D6BBFB',
|
|
159
|
+
// colorPrimaryHover: '#6941C6',
|
|
160
|
+
// colorPrimaryActive: '#53389E',
|
|
161
|
+
// colorPrimaryTextHover: '#53389E',
|
|
162
|
+
// colorPrimaryText: '#6941C6',
|
|
163
|
+
// colorPrimaryTextActive: '#42307D',
|
|
164
|
+
colorSuccess: '#079455',
|
|
165
|
+
colorSuccessBg: '#ECFDF3',
|
|
166
|
+
colorSuccessBgHover: '#DCFAE6',
|
|
167
|
+
colorSuccessBorder: '#ABEFC6',
|
|
168
|
+
colorSuccessBorderHover: '#75E0A7',
|
|
169
|
+
colorSuccessHover: '#067647',
|
|
170
|
+
colorSuccessText: '#067647',
|
|
171
|
+
colorSuccessActive: '#085D3A',
|
|
172
|
+
colorSuccessTextHover: '#085D3A',
|
|
173
|
+
colorSuccessTextActive: '#074D31',
|
|
174
|
+
colorWarning: '#dc6803',
|
|
175
|
+
colorWarningBg: '#FFFAEB',
|
|
176
|
+
colorWarningBgHover: '#FEF0C7',
|
|
177
|
+
colorWarningBorder: '#FEDF89',
|
|
178
|
+
colorWarningBorderHover: '#FEC84B',
|
|
179
|
+
colorWarningHover: '#B54708',
|
|
180
|
+
colorWarningText: '#B54708',
|
|
181
|
+
colorWarningActive: '#93370D',
|
|
182
|
+
colorWarningTextHover: '#93370D',
|
|
183
|
+
colorWarningTextActive: '#7A2E0E',
|
|
184
|
+
colorError: '#d92d20',
|
|
185
|
+
colorErrorBg: '#FEF3F2',
|
|
186
|
+
colorErrorBgHover: '#FEE4E2',
|
|
187
|
+
colorErrorBorder: '#FECDCA',
|
|
188
|
+
colorErrorBorderHover: '#FDA29B',
|
|
189
|
+
colorErrorHover: '#B42318',
|
|
190
|
+
colorErrorText: '#B42318',
|
|
191
|
+
colorErrorActive: '#912018',
|
|
192
|
+
colorErrorTextHover: '#912018',
|
|
193
|
+
colorErrorTextActive: '#7A271A',
|
|
194
|
+
colorInfo: '#1570ef',
|
|
195
|
+
colorInfoBg: '#EFF8FF',
|
|
196
|
+
colorInfoBgHover: '#D1E9FF',
|
|
197
|
+
colorInfoBorder: '#B2DDFF',
|
|
198
|
+
colorInfoBorderHover: '#84CAFF',
|
|
199
|
+
colorInfoHover: '#175CD3',
|
|
200
|
+
colorInfoText: '#175CD3',
|
|
201
|
+
colorInfoActive: '#1849A9',
|
|
202
|
+
colorInfoTextHover: '#1849A9',
|
|
203
|
+
colorInfoTextActive: '#194185',
|
|
204
|
+
colorText: '#101828',
|
|
205
|
+
colorTextSecondary: '#475467',
|
|
206
|
+
colorTextTertiary: '#667085',
|
|
207
|
+
colorTextQuaternary: '#D0D5DD',
|
|
208
|
+
colorBorder: '#D0D5DD',
|
|
209
|
+
colorBorderSecondary: '#EAECF0',
|
|
210
|
+
colorFill: '#D0D5DD',
|
|
211
|
+
colorFillSecondary: '#EAECF0',
|
|
212
|
+
colorFillTertiary: '#F2F4F7',
|
|
213
|
+
colorFillQuaternary: '#F9FAFB',
|
|
214
|
+
colorBgLayout: '#F2F4F7',
|
|
215
|
+
colorBgSpotlight: '#101828',
|
|
216
|
+
colorBgMask: 'rgba(0, 0, 0, 0.5)',
|
|
217
|
+
wireframe: false,
|
|
218
|
+
borderRadius: 8
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}, [platform, themeColor, props === null || props === void 0 ? void 0 : props.theme]);
|
|
222
|
+
var datePickerTheme = useMemo(function () {
|
|
223
|
+
var _theme$token;
|
|
224
|
+
return createTheme({
|
|
225
|
+
palette: {
|
|
226
|
+
primary: {
|
|
227
|
+
main: ((_theme$token = theme.token) === null || _theme$token === void 0 ? void 0 : _theme$token.colorPrimary) || '#7F56D9'
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}, [platform, themeColor]);
|
|
201
232
|
return /*#__PURE__*/React.createElement(ConfigProvider, _extends({}, others, {
|
|
202
233
|
locale: localMap[locale],
|
|
203
|
-
prefixCls: props.prefixCls ||
|
|
204
|
-
theme:
|
|
205
|
-
}), /*#__PURE__*/React.createElement(
|
|
234
|
+
prefixCls: props.prefixCls || 'pisell-lowcode',
|
|
235
|
+
theme: theme
|
|
236
|
+
}), /*#__PURE__*/React.createElement(App, {
|
|
237
|
+
component: false,
|
|
238
|
+
message: {
|
|
239
|
+
maxCount: 1
|
|
240
|
+
}
|
|
241
|
+
}, /*#__PURE__*/React.createElement(LocalizationProvider, {
|
|
206
242
|
dateAdapter: AdapterDayjs,
|
|
207
|
-
adapterLocale: (localeDateMap === null || localeDateMap === void 0 ? void 0 : (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) ||
|
|
243
|
+
adapterLocale: (localeDateMap === null || localeDateMap === void 0 ? void 0 : (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) || 'en'
|
|
208
244
|
}, /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
209
245
|
theme: datePickerTheme
|
|
210
246
|
}, /*#__PURE__*/React.createElement(LocaleProvider, {
|
|
211
247
|
value: {
|
|
212
248
|
locale: locale
|
|
213
249
|
}
|
|
250
|
+
}, /*#__PURE__*/React.createElement(PisellConfigProvider, {
|
|
251
|
+
locale: locale
|
|
214
252
|
}, /*#__PURE__*/React.createElement("div", {
|
|
215
|
-
style: style
|
|
216
|
-
|
|
253
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
254
|
+
'--theme-color': themeColor || '#7F56D9'
|
|
255
|
+
})
|
|
256
|
+
}, children)))))));
|
|
217
257
|
};
|
|
218
258
|
export default Page;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PisellContextType {
|
|
3
|
+
platform: 'h5' | 'pc' | 'ipad';
|
|
4
|
+
/** 货币符号 */
|
|
5
|
+
symbol?: string;
|
|
6
|
+
/** 当前语言环境 */
|
|
7
|
+
locale?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const PisellContext: import("react").Context<PisellContextType>;
|
|
10
|
+
/**
|
|
11
|
+
* provider外获取当前全局配置
|
|
12
|
+
*/
|
|
13
|
+
declare class GlobalConfig {
|
|
14
|
+
private config;
|
|
15
|
+
constructor();
|
|
16
|
+
setConfig(config: PisellContextType): void;
|
|
17
|
+
getConfig(): PisellContextType;
|
|
18
|
+
}
|
|
19
|
+
export declare const globalConfig: GlobalConfig;
|
|
20
|
+
export default PisellContext;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
import { createContext } from 'react';
|
|
9
|
+
var initialContext = {
|
|
10
|
+
platform: 'pc'
|
|
11
|
+
};
|
|
12
|
+
export var PisellContext = /*#__PURE__*/createContext(initialContext);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* provider外获取当前全局配置
|
|
16
|
+
*/
|
|
17
|
+
var GlobalConfig = /*#__PURE__*/function () {
|
|
18
|
+
function GlobalConfig() {
|
|
19
|
+
_classCallCheck(this, GlobalConfig);
|
|
20
|
+
_defineProperty(this, "config", {});
|
|
21
|
+
}
|
|
22
|
+
_createClass(GlobalConfig, [{
|
|
23
|
+
key: "setConfig",
|
|
24
|
+
value: function setConfig(config) {
|
|
25
|
+
this.config = config;
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
key: "getConfig",
|
|
29
|
+
value: function getConfig() {
|
|
30
|
+
return this.config;
|
|
31
|
+
}
|
|
32
|
+
}]);
|
|
33
|
+
return GlobalConfig;
|
|
34
|
+
}();
|
|
35
|
+
export var globalConfig = new GlobalConfig();
|
|
36
|
+
export default PisellContext;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { PisellContext } from "../context";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 获取当前pisell全局配置
|
|
6
|
+
*/
|
|
7
|
+
var usePisellConfig = function usePisellConfig() {
|
|
8
|
+
var config = useContext(PisellContext);
|
|
9
|
+
return config;
|
|
10
|
+
};
|
|
11
|
+
export default usePisellConfig;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellContextType } from './context';
|
|
3
|
+
interface PisellConfigProviderType {
|
|
4
|
+
platform?: PisellContextType['platform'];
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** 货币符号 */
|
|
7
|
+
symbol?: string;
|
|
8
|
+
/** 当前语言环境 */
|
|
9
|
+
locale?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const PisellConfigProvider: React.FC<PisellConfigProviderType>;
|
|
12
|
+
export default PisellConfigProvider;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { App } from 'antd';
|
|
3
|
+
import PisellContext, { globalConfig } from "./context";
|
|
4
|
+
import { useResponsive } from "../../hooks";
|
|
5
|
+
import useEngineContext from "../../hooks/useEngineContext";
|
|
6
|
+
import { setMessage } from "../pisellMessage";
|
|
7
|
+
var platformMap = {
|
|
8
|
+
phone: 'h5',
|
|
9
|
+
pc: 'pc',
|
|
10
|
+
ipad: 'ipad'
|
|
11
|
+
};
|
|
12
|
+
var PisellConfigProvider = function PisellConfigProvider(props) {
|
|
13
|
+
var _context$appHelper;
|
|
14
|
+
var children = props.children,
|
|
15
|
+
propsPlatform = props.platform,
|
|
16
|
+
propsSymbol = props.symbol,
|
|
17
|
+
locale = props.locale;
|
|
18
|
+
var platform = useResponsive();
|
|
19
|
+
var context = useEngineContext();
|
|
20
|
+
var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
|
|
21
|
+
getSymbolic = _ref.getSymbolic;
|
|
22
|
+
var config = {
|
|
23
|
+
// 设置平台,如果父组件未传入,则使用响应式获取
|
|
24
|
+
platform: propsPlatform || platformMap[platform],
|
|
25
|
+
// 设置符号,优先使用父组件传入的,如果没有则从主项目获取
|
|
26
|
+
symbol: propsSymbol || (getSymbolic === null || getSymbolic === void 0 ? void 0 : getSymbolic()) || '',
|
|
27
|
+
locale: locale || 'en'
|
|
28
|
+
};
|
|
29
|
+
var staticFunction = App.useApp();
|
|
30
|
+
setMessage(staticFunction.message);
|
|
31
|
+
globalConfig.setConfig(config);
|
|
32
|
+
return /*#__PURE__*/React.createElement(PisellContext.Provider, {
|
|
33
|
+
value: config
|
|
34
|
+
}, children);
|
|
35
|
+
};
|
|
36
|
+
export default PisellConfigProvider;
|