@pisell/materials 6.1.1 → 6.1.3
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 +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +42 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +47 -32
- package/es/components/TimeResourceSelector/index.d.ts +21 -0
- package/es/components/appVersionControl/index.d.ts +4 -0
- package/es/components/badge/index.d.ts +7 -0
- package/es/components/buttonGroupEdit/index.d.ts +8 -0
- package/es/components/buttonGroupPreview/index.d.ts +19 -0
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/collapse/index.d.ts +15 -0
- package/es/components/cropPhoto/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +5 -4
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/es/components/drag-sort-tree/TreeItem/index.js +2 -1
- package/es/components/drag-sort-tree/index.d.ts +4 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/login-and-register/index.js +22 -18
- package/es/components/page/index.d.ts +5 -0
- package/es/components/pisell-config-provider/index.d.ts +12 -0
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/es/components/pisellAdjustPrice/index.d.ts +1 -6
- package/es/components/pisellAdjustPrice/index.js +64 -8
- package/es/components/pisellAdjustPrice/index.less +35 -6
- package/es/components/pisellAdjustPrice/status.d.ts +32 -0
- package/es/components/pisellAdjustPrice/status.js +32 -0
- package/es/components/pisellAdjustPrice/type.d.ts +20 -0
- package/es/components/pisellAdjustPrice/type.js +1 -0
- package/es/components/pisellAnchor/index.d.ts +23 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellCard/index.d.ts +19 -0
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/es/components/pisellDropdown/index.d.ts +20 -0
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/es/components/pisellImageCarousels/index.d.ts +18 -0
- package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
- package/es/components/pisellInformationEntry/index.d.ts +33 -0
- package/es/components/pisellList01/index.d.ts +17 -0
- package/es/components/pisellQrcode/index.d.ts +10 -0
- package/es/components/pisellSectionHeaders/index.d.ts +21 -0
- package/es/components/pisellStatisticList/index.d.ts +21 -0
- package/es/components/pisellToast/index.js +3 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +61 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.js +32 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.less +32 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +11 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.js +44 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.js +55 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.js +43 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +7 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +53 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +8 -0
- package/es/components/productCard/cartSkuCard/index.js +195 -0
- package/es/components/productCard/cartSkuCard/index.less +69 -0
- package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/es/components/productCard/cartSkuCard/locales.js +30 -0
- package/es/components/productCard/components/Action/index.d.ts +3 -0
- package/es/components/productCard/components/AmountFooter/index.js +22 -6
- package/es/components/productCard/components/AmountFooter/index.less +28 -1
- package/es/components/productCard/components/Divider/index.d.ts +3 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/es/components/productCard/components/Header/index.js +4 -3
- package/es/components/productCard/components/MultiDay/index.d.ts +3 -0
- package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
- package/es/components/productCard/components/Packages/components/options/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/components/options/index.less +3 -2
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/es/components/productCard/components/Time/index.d.ts +3 -0
- package/es/components/productCard/components/Warning/index.d.ts +7 -0
- package/es/components/productCard/components/Warning/index.js +48 -0
- package/es/components/productCard/index.d.ts +3 -1
- package/es/components/productCard/index.js +10 -8
- package/es/components/productCard/locales.d.ts +84 -0
- package/es/components/productCard/locales.js +6 -3
- package/es/components/productCard/status.d.ts +32 -0
- package/es/components/productCard/status.js +3 -1
- package/es/components/productCard/types.d.ts +84 -0
- package/es/components/productCard/utils.js +8 -6
- package/es/components/section-footers/index.d.ts +9 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/es/components/table/BasicTable/index.d.ts +1 -0
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +1 -0
- package/es/components/table/hooks/useTableSetting.d.ts +22 -0
- package/es/components/table/types.d.ts +251 -0
- package/es/components/tabs/index.d.ts +16 -0
- package/es/components/translation/index.d.ts +4 -3
- package/es/components/translation/index.js +34 -32
- package/es/components/versionModal/index.d.ts +23 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +3 -20
- package/es/components/virtual-keyboard/Amount/index.js +79 -7
- package/es/components/virtual-keyboard/Amount/index.less +39 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.js +32 -0
- package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/es/components/virtual-keyboard/Amount/types.js +1 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +38 -10
- package/es/components/virtual-keyboard/Keyboard/index.js +2 -2
- package/es/components/virtual-keyboard/Number/index.d.ts +3 -11
- package/es/components/virtual-keyboard/Number/index.js +77 -7
- package/es/components/virtual-keyboard/Number/index.less +39 -0
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Number/themeConfig.js +32 -0
- package/es/components/virtual-keyboard/Number/types.d.ts +25 -0
- package/es/components/virtual-keyboard/Number/types.js +1 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.js +10 -3
- package/es/components/virtual-keyboard/index.d.ts +11 -0
- package/es/components/virtual-keyboard/index.js +88 -3
- package/es/components/virtual-keyboard/index.less +33 -1
- package/es/components/walletCard/Guest/index.d.ts +3 -0
- package/es/components/walletCard/Guide/index.d.ts +3 -0
- package/es/components/walletCard/index.d.ts +67 -0
- package/lib/components/TimeResourceSelector/index.d.ts +21 -0
- package/lib/components/appVersionControl/index.d.ts +4 -0
- package/lib/components/badge/index.d.ts +7 -0
- package/lib/components/buttonGroupEdit/index.d.ts +8 -0
- package/lib/components/buttonGroupPreview/index.d.ts +19 -0
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/collapse/index.d.ts +15 -0
- package/lib/components/cropPhoto/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +5 -4
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/lib/components/drag-sort-tree/TreeItem/index.js +2 -1
- package/lib/components/drag-sort-tree/index.d.ts +4 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/login-and-register/index.js +2 -2
- package/lib/components/page/index.d.ts +5 -0
- package/lib/components/pisell-config-provider/index.d.ts +12 -0
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/index.d.ts +1 -6
- package/lib/components/pisellAdjustPrice/index.js +119 -57
- package/lib/components/pisellAdjustPrice/index.less +35 -6
- package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
- package/lib/components/pisellAdjustPrice/status.js +60 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +20 -0
- package/lib/components/pisellAdjustPrice/type.js +17 -0
- package/lib/components/pisellAnchor/index.d.ts +23 -0
- package/lib/components/pisellAvatar/index.d.ts +19 -0
- package/lib/components/pisellCard/index.d.ts +19 -0
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/lib/components/pisellDropdown/index.d.ts +20 -0
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/lib/components/pisellImageCarousels/index.d.ts +18 -0
- package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
- package/lib/components/pisellInformationEntry/index.d.ts +33 -0
- package/lib/components/pisellList01/index.d.ts +17 -0
- package/lib/components/pisellQrcode/index.d.ts +10 -0
- package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
- package/lib/components/pisellStatisticList/index.d.ts +21 -0
- package/lib/components/pisellToast/index.js +3 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +71 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +52 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.less +32 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +11 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +76 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +65 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +7 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +67 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +8 -0
- package/lib/components/productCard/cartSkuCard/index.js +216 -0
- package/lib/components/productCard/cartSkuCard/index.less +69 -0
- package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/lib/components/productCard/cartSkuCard/locales.js +61 -0
- package/lib/components/productCard/components/Action/index.d.ts +3 -0
- package/lib/components/productCard/components/AmountFooter/index.js +16 -6
- package/lib/components/productCard/components/AmountFooter/index.less +28 -1
- package/lib/components/productCard/components/Divider/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/index.js +4 -3
- package/lib/components/productCard/components/MultiDay/index.d.ts +3 -0
- package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -2
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/components/options/index.less +3 -2
- package/lib/components/productCard/components/Sales/index.js +2 -2
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/lib/components/productCard/components/Time/index.d.ts +3 -0
- package/lib/components/productCard/components/Warning/index.d.ts +7 -0
- package/lib/components/productCard/components/Warning/index.js +68 -0
- package/lib/components/productCard/index.d.ts +3 -1
- package/lib/components/productCard/index.js +6 -11
- package/lib/components/productCard/locales.d.ts +84 -0
- package/lib/components/productCard/locales.js +6 -3
- package/lib/components/productCard/status.d.ts +32 -0
- package/lib/components/productCard/status.js +3 -1
- package/lib/components/productCard/types.d.ts +84 -0
- package/lib/components/productCard/utils.js +7 -6
- package/lib/components/section-footers/index.d.ts +9 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/lib/components/table/BasicTable/index.d.ts +1 -0
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +1 -0
- package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
- package/lib/components/table/types.d.ts +251 -0
- package/lib/components/tabs/index.d.ts +16 -0
- package/lib/components/translation/index.d.ts +4 -3
- package/lib/components/translation/index.js +1 -0
- package/lib/components/versionModal/index.d.ts +23 -0
- package/lib/components/virtual-keyboard/Amount/index.d.ts +3 -20
- package/lib/components/virtual-keyboard/Amount/index.js +72 -16
- package/lib/components/virtual-keyboard/Amount/index.less +39 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.js +60 -0
- package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/lib/components/virtual-keyboard/Amount/types.js +17 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +31 -8
- package/lib/components/virtual-keyboard/Keyboard/index.js +2 -1
- package/lib/components/virtual-keyboard/Number/index.d.ts +3 -11
- package/lib/components/virtual-keyboard/Number/index.js +65 -11
- package/lib/components/virtual-keyboard/Number/index.less +39 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.js +60 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +25 -0
- package/lib/components/virtual-keyboard/Number/types.js +17 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +34 -20
- package/lib/components/virtual-keyboard/index.d.ts +11 -0
- package/lib/components/virtual-keyboard/index.js +60 -2
- package/lib/components/virtual-keyboard/index.less +33 -1
- package/lib/components/walletCard/Guest/index.d.ts +3 -0
- package/lib/components/walletCard/Guide/index.d.ts +3 -0
- package/lib/components/walletCard/index.d.ts +67 -0
- package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
- package/lowcode/pisell-adjust-price/meta.ts +168 -0
- package/lowcode/pisell-adjust-price/snippets.ts +1 -0
- package/lowcode/pisell-number-keyboard/meta.ts +167 -0
- package/lowcode/pisell-price-keyboard/meta.ts +167 -0
- package/lowcode/virtual-keyboard/meta.ts +131 -0
- package/package.json +4 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface TimeSlot {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
time: string;
|
|
7
|
+
remainingCount: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface TimeResourceSelectorProps {
|
|
11
|
+
timeSlots?: TimeSlot[];
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
showUnavailable?: boolean;
|
|
14
|
+
defaultExpanded?: boolean;
|
|
15
|
+
defaultSelectFirst?: boolean;
|
|
16
|
+
onChange?: (values: string | string[]) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
declare const TimeResourceSelector: React.FC<TimeResourceSelectorProps>;
|
|
21
|
+
export default TimeResourceSelector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonGroupListItemProps } from './../buttonGroupPreview';
|
|
3
|
+
interface ButtonGroupEditProps {
|
|
4
|
+
buttonList: ButtonGroupListItemProps[];
|
|
5
|
+
buttonGroupList: ButtonGroupListItemProps[][];
|
|
6
|
+
}
|
|
7
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonGroupEditProps & React.RefAttributes<any>>>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MenuProps, ButtonProps } from 'antd';
|
|
3
|
+
export interface ButtonGroupListItemProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
isMore?: boolean;
|
|
6
|
+
menuData?: MenuProps['items'];
|
|
7
|
+
buttonProps?: ButtonProps;
|
|
8
|
+
}
|
|
9
|
+
interface ButtonConfigProps {
|
|
10
|
+
[id: string]: ButtonGroupListItemProps;
|
|
11
|
+
}
|
|
12
|
+
export declare type ButtonGroupListProps = ButtonGroupListItemProps[][];
|
|
13
|
+
interface ButtonGroupPreviewProps {
|
|
14
|
+
buttonConfig?: ButtonConfigProps;
|
|
15
|
+
buttonGroupList?: ButtonGroupListProps;
|
|
16
|
+
updateButtonProps?: ButtonGroupListItemProps;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonGroupPreviewProps & React.RefAttributes<any>>>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface CollapseProps {
|
|
4
|
+
panelBackground?: string;
|
|
5
|
+
panelMarginBottom?: string | 0;
|
|
6
|
+
panelBorderRadius?: string | 0;
|
|
7
|
+
items: any[];
|
|
8
|
+
showHeader?: boolean;
|
|
9
|
+
headerColor?: string | '#101828';
|
|
10
|
+
headerFontSize?: string | 14;
|
|
11
|
+
expandIcon?: any;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
declare const Collapse: React.FC<CollapseProps>;
|
|
15
|
+
export default Collapse;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Drawer } from 'antd';
|
|
2
|
+
import { OperationItem } from '../type';
|
|
3
|
+
declare const useDrawerState: (operationContent?: {
|
|
4
|
+
[key: string]: import("react").ReactNode;
|
|
5
|
+
} | undefined) => {
|
|
6
|
+
drawerVisible: boolean;
|
|
7
|
+
setDrawerVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
8
|
+
openDrawer: (item: OperationItem) => void;
|
|
9
|
+
closeDrawer: () => void;
|
|
10
|
+
drawerContent: import("react").ReactNode;
|
|
11
|
+
Container: {
|
|
12
|
+
(props: import("../../../pisellModal").PisellModalProps): JSX.Element;
|
|
13
|
+
confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
14
|
+
destroy: () => void;
|
|
15
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
16
|
+
};
|
|
17
|
+
info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
18
|
+
destroy: () => void;
|
|
19
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
20
|
+
};
|
|
21
|
+
error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
22
|
+
destroy: () => void;
|
|
23
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
24
|
+
};
|
|
25
|
+
warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
|
|
26
|
+
warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
27
|
+
destroy: () => void;
|
|
28
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
29
|
+
};
|
|
30
|
+
success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
31
|
+
destroy: () => void;
|
|
32
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
33
|
+
};
|
|
34
|
+
Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
|
|
35
|
+
} | typeof Drawer;
|
|
36
|
+
containerProps: {};
|
|
37
|
+
};
|
|
38
|
+
export default useDrawerState;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DataSourceTableProps } from '../type';
|
|
2
|
+
declare type Params = {
|
|
3
|
+
pagination?: {
|
|
4
|
+
page: number;
|
|
5
|
+
size: number;
|
|
6
|
+
};
|
|
7
|
+
order_by?: string;
|
|
8
|
+
tabs?: {
|
|
9
|
+
name: string;
|
|
10
|
+
filterBy: Record<string, any>;
|
|
11
|
+
sortBy: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare const useTableQuery: (props: DataSourceTableProps) => {
|
|
15
|
+
queryPageConfig: {
|
|
16
|
+
page: number;
|
|
17
|
+
pageSize: number;
|
|
18
|
+
filter: Record<string, any>;
|
|
19
|
+
sort: string;
|
|
20
|
+
};
|
|
21
|
+
setQueryPageConfig: import("react").Dispatch<import("react").SetStateAction<{
|
|
22
|
+
page: number;
|
|
23
|
+
pageSize: number;
|
|
24
|
+
filter: Record<string, any>;
|
|
25
|
+
sort: string;
|
|
26
|
+
}>>;
|
|
27
|
+
handleValuesChange: (params: Params, allParams: Params) => void;
|
|
28
|
+
refreshData: () => void;
|
|
29
|
+
handleFilterChange: (changedFields: any, allFields: any) => void;
|
|
30
|
+
refreshCurrentPage: () => void;
|
|
31
|
+
};
|
|
32
|
+
export default useTableQuery;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ColumnType } from 'antd/es/table';
|
|
3
|
+
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
4
|
+
export declare type OperationItem = {
|
|
5
|
+
label?: string;
|
|
6
|
+
openMode: 'modal' | 'drawer' | 'custom';
|
|
7
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
8
|
+
openTitle: string;
|
|
9
|
+
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
10
|
+
key: string;
|
|
11
|
+
buttonProps?: any;
|
|
12
|
+
onClick?: (record: any) => void;
|
|
13
|
+
};
|
|
14
|
+
export interface DataSourceTableProps {
|
|
15
|
+
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
16
|
+
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
17
|
+
titleButtons?: {
|
|
18
|
+
show: boolean;
|
|
19
|
+
maxCount: number;
|
|
20
|
+
items: OperationItem[];
|
|
21
|
+
};
|
|
22
|
+
tableButtons?: {
|
|
23
|
+
show: boolean;
|
|
24
|
+
maxCount: number;
|
|
25
|
+
items: OperationItem[];
|
|
26
|
+
};
|
|
27
|
+
buttons?: any[];
|
|
28
|
+
operation?: {
|
|
29
|
+
show: boolean;
|
|
30
|
+
title: string;
|
|
31
|
+
width: number;
|
|
32
|
+
align: 'left' | 'center' | 'right';
|
|
33
|
+
fixed: 'left' | 'right' | false;
|
|
34
|
+
type: 'link' | 'button';
|
|
35
|
+
items: OperationItem[];
|
|
36
|
+
};
|
|
37
|
+
operationContent?: {
|
|
38
|
+
[key: string]: React.ReactNode;
|
|
39
|
+
};
|
|
40
|
+
dataSource: DataSourceType;
|
|
41
|
+
columns: ColumnType<any>[];
|
|
42
|
+
filter: any;
|
|
43
|
+
search?: {
|
|
44
|
+
show: boolean;
|
|
45
|
+
placeholder: string;
|
|
46
|
+
};
|
|
47
|
+
__designMode: string;
|
|
48
|
+
componentId: string;
|
|
49
|
+
clickToDetail?: {
|
|
50
|
+
show: boolean;
|
|
51
|
+
useCustomAction: boolean;
|
|
52
|
+
actionType: string;
|
|
53
|
+
openMode: 'modal' | 'drawer';
|
|
54
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
55
|
+
openTitle: string;
|
|
56
|
+
key: string;
|
|
57
|
+
};
|
|
58
|
+
onRow?: any;
|
|
59
|
+
filterBy?: Record<string, any>;
|
|
60
|
+
sortBy: string;
|
|
61
|
+
tabs?: {
|
|
62
|
+
show: boolean;
|
|
63
|
+
type: string;
|
|
64
|
+
items: {
|
|
65
|
+
name: string;
|
|
66
|
+
filterBy: Record<string, any>;
|
|
67
|
+
sortBy: string;
|
|
68
|
+
}[];
|
|
69
|
+
};
|
|
70
|
+
onValuesChange?: (changedValues: any, values: any) => void;
|
|
71
|
+
extraParams?: {
|
|
72
|
+
list?: Record<string, any>;
|
|
73
|
+
get?: Record<string, any>;
|
|
74
|
+
update?: Record<string, any>;
|
|
75
|
+
create?: Record<string, any>;
|
|
76
|
+
destroy?: Record<string, any>;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取nocobase数据列表
|
|
3
|
+
*/
|
|
4
|
+
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
+
export interface Country {
|
|
6
|
+
id: number;
|
|
7
|
+
name: {
|
|
8
|
+
en: string;
|
|
9
|
+
"zh-CN": string;
|
|
10
|
+
"zh-HK": string;
|
|
11
|
+
original: string;
|
|
12
|
+
};
|
|
13
|
+
code: string;
|
|
14
|
+
calling_code: string;
|
|
15
|
+
currency_code: string;
|
|
16
|
+
sort: number;
|
|
17
|
+
status: string;
|
|
18
|
+
created_at: string;
|
|
19
|
+
updated_at: string;
|
|
20
|
+
prefix: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const useCountries: () => {
|
|
23
|
+
data: Country[];
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取nocobase数据列表
|
|
3
|
+
*/
|
|
4
|
+
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
+
export interface Country {
|
|
6
|
+
id: number;
|
|
7
|
+
name: {
|
|
8
|
+
en: string;
|
|
9
|
+
"zh-CN": string;
|
|
10
|
+
"zh-HK": string;
|
|
11
|
+
original: string;
|
|
12
|
+
};
|
|
13
|
+
code: string;
|
|
14
|
+
calling_code: string;
|
|
15
|
+
currency_code: string;
|
|
16
|
+
sort: number;
|
|
17
|
+
status: string;
|
|
18
|
+
created_at: string;
|
|
19
|
+
updated_at: string;
|
|
20
|
+
prefix: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const useCountries: () => {
|
|
23
|
+
data: Country[];
|
|
24
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取nocobase媒体数据列表
|
|
3
|
+
*/
|
|
4
|
+
export declare const getMediaTypeList: () => Promise<any>;
|
|
5
|
+
export interface MediaType {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
maxsize: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const useMediaConfig: (mediaConfig?: any) => {
|
|
11
|
+
data: {
|
|
12
|
+
upload_onetime_limit: any;
|
|
13
|
+
upload_maxsize: any;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const useMediaTypes: () => {
|
|
17
|
+
data: MediaType[];
|
|
18
|
+
getExtensionsByIds: (ids: number[]) => string[];
|
|
19
|
+
getMaxSizeByIds: (ids: number[]) => Record<number, number>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { UploadFile as AntdUploadFile } from 'antd/es/upload/interface';
|
|
2
|
+
import type { UploadValue, UploadChangeHandler } from './types';
|
|
3
|
+
export interface UploadFile extends AntdUploadFile {
|
|
4
|
+
metadata?: {
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
duration?: number;
|
|
8
|
+
bitrate?: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface UploadProps {
|
|
12
|
+
renderMode?: string;
|
|
13
|
+
fieldKey: string;
|
|
14
|
+
maxSize?: number;
|
|
15
|
+
minCount?: number;
|
|
16
|
+
maxCount?: number;
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
presetType?: string[];
|
|
19
|
+
presetTypeString?: string[];
|
|
20
|
+
customType?: string[];
|
|
21
|
+
enablePresetType?: boolean;
|
|
22
|
+
enableCustomType?: boolean;
|
|
23
|
+
allowPreview?: boolean;
|
|
24
|
+
value?: UploadValue;
|
|
25
|
+
typeMaxSizeMap?: Record<string, number>;
|
|
26
|
+
enableMultilingual?: boolean;
|
|
27
|
+
onChange?: UploadChangeHandler;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
mediaUploadUrl?: string;
|
|
30
|
+
getHeaders?: () => Record<string, string>;
|
|
31
|
+
mediaConfig?: {
|
|
32
|
+
data: {
|
|
33
|
+
upload_onetime_limit: number;
|
|
34
|
+
upload_maxsize: number;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const formFieldMap: {
|
|
2
3
|
FormItemCheckbox: import("react").FC<{}> & {
|
|
3
4
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -19,7 +20,7 @@ declare const formFieldMap: {
|
|
|
19
20
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
21
|
onChange: (value: string) => void;
|
|
21
22
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
23
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
23
24
|
customDomain?: string | undefined;
|
|
24
25
|
value?: string | undefined;
|
|
25
26
|
tenantId: string;
|
|
@@ -59,7 +60,7 @@ declare const formFieldMap: {
|
|
|
59
60
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
61
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
62
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
|
|
63
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<{}> & {
|
|
63
64
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
65
|
} & {
|
|
65
66
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -76,7 +77,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
76
77
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
77
78
|
onChange: (value: string) => void;
|
|
78
79
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
79
|
-
rootDomain: "custom" | "
|
|
80
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
80
81
|
customDomain?: string | undefined;
|
|
81
82
|
value?: string | undefined;
|
|
82
83
|
tenantId: string;
|
|
@@ -95,7 +96,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
95
96
|
extraParams?: Record<string, any> | undefined;
|
|
96
97
|
} & {
|
|
97
98
|
dataSource?: any;
|
|
98
|
-
}) => JSX.Element) | import("react").FC<
|
|
99
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
99
100
|
onChange: (value: string) => void;
|
|
100
101
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
102
|
export { getFieldComponent, formFieldMap };
|
|
@@ -54,7 +54,8 @@ var TreeItem = function TreeItem(props) {
|
|
|
54
54
|
transform: CSS.Transform.toString(transform && _objectSpread(_objectSpread({}, transform), {}, {
|
|
55
55
|
scaleY: 1
|
|
56
56
|
})),
|
|
57
|
-
transition: transition
|
|
57
|
+
transition: transition,
|
|
58
|
+
display: item.domHidden ? 'none' : 'block'
|
|
58
59
|
};
|
|
59
60
|
var rowKey = useMemo(function () {
|
|
60
61
|
return (childrenProps === null || childrenProps === void 0 ? void 0 : childrenProps.rowKey) || 'id';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface IconFontProps extends IconComponentProps {
|
|
4
|
+
type: string;
|
|
5
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
6
|
+
}
|
|
7
|
+
declare const IconFont: React.FC<IconFontProps>;
|
|
8
|
+
export default IconFont;
|
|
@@ -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://static.pisellcdn.com/pisell2iconfont1.
|
|
5
|
+
scriptUrl: 'https://static.pisellcdn.com/pisell2iconfont1.6.js' // 在 iconfont.cn 上生成
|
|
6
6
|
});
|
|
7
7
|
var IconFont = function IconFont(props) {
|
|
8
8
|
return /*#__PURE__*/React.createElement(MyIcon, _extends({}, props, {
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
/**
|
|
4
|
+
* loginAndRegister组件的属性接口
|
|
5
|
+
*/
|
|
6
|
+
export interface loginAndRegisterProps {
|
|
7
|
+
/** Logo相关配置 */
|
|
8
|
+
showLogo?: boolean;
|
|
9
|
+
logo?: string;
|
|
10
|
+
logoPosition?: 'left' | 'center' | 'right';
|
|
11
|
+
logoSize?: {
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
};
|
|
15
|
+
/** 标题相关配置 */
|
|
16
|
+
title?: string;
|
|
17
|
+
showTitle?: boolean;
|
|
18
|
+
titleAlign?: 'left' | 'center' | 'right';
|
|
19
|
+
/** 副标题相关配置 */
|
|
20
|
+
subtitle?: string;
|
|
21
|
+
showSubtitle?: boolean;
|
|
22
|
+
subtitleAlign?: 'left' | 'center' | 'right';
|
|
23
|
+
/** 登录方式配置 */
|
|
24
|
+
loginMethods?: ('email' | 'google' | 'facebook' | 'apple')[];
|
|
25
|
+
defaultLoginMethod?: 'email' | 'google' | 'facebook' | 'apple';
|
|
26
|
+
/** 表单配置 */
|
|
27
|
+
emailLabel?: string;
|
|
28
|
+
passwordLabel?: string;
|
|
29
|
+
emailPlaceholder?: string;
|
|
30
|
+
passwordPlaceholder?: string;
|
|
31
|
+
emailRules?: any[];
|
|
32
|
+
buttonText?: string;
|
|
33
|
+
rememberMeText?: string;
|
|
34
|
+
forgotPasswordText?: string;
|
|
35
|
+
showRememberMe?: boolean;
|
|
36
|
+
showForgotPassword?: boolean;
|
|
37
|
+
/** 社交登录配置 */
|
|
38
|
+
socialLoginTexts?: {
|
|
39
|
+
google?: string;
|
|
40
|
+
facebook?: string;
|
|
41
|
+
apple?: string;
|
|
42
|
+
};
|
|
43
|
+
/** 底部配置 */
|
|
44
|
+
showFooter?: boolean;
|
|
45
|
+
showSignUp?: boolean;
|
|
46
|
+
signUpText?: string;
|
|
47
|
+
signUpLink?: string;
|
|
48
|
+
signUpPosition?: 'left' | 'center' | 'right';
|
|
49
|
+
otherLinks?: Array<{
|
|
50
|
+
text: string;
|
|
51
|
+
url: string;
|
|
52
|
+
}>;
|
|
53
|
+
otherLinksPosition?: 'left' | 'center' | 'right';
|
|
54
|
+
/** 登录/注册切换配置 */
|
|
55
|
+
showTabs?: boolean;
|
|
56
|
+
loginTabText?: string;
|
|
57
|
+
registerTabText?: string;
|
|
58
|
+
/** 注册表单配置 */
|
|
59
|
+
registerEmailPlaceholder?: string;
|
|
60
|
+
registerPasswordPlaceholder?: string;
|
|
61
|
+
registerButtonText?: string;
|
|
62
|
+
/** 事件回调 */
|
|
63
|
+
onLogin?: (values: {
|
|
64
|
+
email: string;
|
|
65
|
+
loginMethod: string;
|
|
66
|
+
}) => void;
|
|
67
|
+
onSocialLogin?: (type: 'google' | 'facebook' | 'apple') => void;
|
|
68
|
+
onSignUp?: () => void;
|
|
69
|
+
onRegister?: (values: {
|
|
70
|
+
email: string;
|
|
71
|
+
password: string;
|
|
72
|
+
}) => void;
|
|
73
|
+
/** 新增背景图片属性 */
|
|
74
|
+
backgroundImage?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Saas登录组件
|
|
78
|
+
* @param props - 组件属性
|
|
79
|
+
* @returns React组件
|
|
80
|
+
*/
|
|
81
|
+
declare const loginAndRegister: React.FC<loginAndRegisterProps>;
|
|
82
|
+
export default loginAndRegister;
|
|
@@ -151,24 +151,26 @@ var loginAndRegister = function loginAndRegister(_ref) {
|
|
|
151
151
|
return form.validateFields();
|
|
152
152
|
case 4:
|
|
153
153
|
_values = _context.sent;
|
|
154
|
-
|
|
154
|
+
_context.next = 7;
|
|
155
|
+
return onLogin === null || onLogin === void 0 ? void 0 : onLogin(_objectSpread(_objectSpread({}, _values), {}, {
|
|
155
156
|
loginMethod: 'email'
|
|
156
157
|
}));
|
|
157
|
-
|
|
158
|
+
case 7:
|
|
159
|
+
_context.next = 12;
|
|
158
160
|
break;
|
|
159
|
-
case
|
|
160
|
-
_context.prev =
|
|
161
|
+
case 9:
|
|
162
|
+
_context.prev = 9;
|
|
161
163
|
_context.t0 = _context["catch"](0);
|
|
162
164
|
console.error('Validation failed:', _context.t0);
|
|
163
|
-
case
|
|
164
|
-
_context.prev =
|
|
165
|
+
case 12:
|
|
166
|
+
_context.prev = 12;
|
|
165
167
|
setLoading(false);
|
|
166
|
-
return _context.finish(
|
|
167
|
-
case
|
|
168
|
+
return _context.finish(12);
|
|
169
|
+
case 15:
|
|
168
170
|
case "end":
|
|
169
171
|
return _context.stop();
|
|
170
172
|
}
|
|
171
|
-
}, _callee, null, [[0,
|
|
173
|
+
}, _callee, null, [[0, 9, 12, 15]]);
|
|
172
174
|
}));
|
|
173
175
|
return function handleEmailLogin() {
|
|
174
176
|
return _ref2.apply(this, arguments);
|
|
@@ -198,22 +200,24 @@ var loginAndRegister = function loginAndRegister(_ref) {
|
|
|
198
200
|
return form.validateFields();
|
|
199
201
|
case 4:
|
|
200
202
|
_values2 = _context2.sent;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
+
_context2.next = 7;
|
|
204
|
+
return onRegister === null || onRegister === void 0 ? void 0 : onRegister(_values2);
|
|
205
|
+
case 7:
|
|
206
|
+
_context2.next = 12;
|
|
203
207
|
break;
|
|
204
|
-
case
|
|
205
|
-
_context2.prev =
|
|
208
|
+
case 9:
|
|
209
|
+
_context2.prev = 9;
|
|
206
210
|
_context2.t0 = _context2["catch"](0);
|
|
207
211
|
console.error('Validation failed:', _context2.t0);
|
|
208
|
-
case
|
|
209
|
-
_context2.prev =
|
|
212
|
+
case 12:
|
|
213
|
+
_context2.prev = 12;
|
|
210
214
|
setLoading(false);
|
|
211
|
-
return _context2.finish(
|
|
212
|
-
case
|
|
215
|
+
return _context2.finish(12);
|
|
216
|
+
case 15:
|
|
213
217
|
case "end":
|
|
214
218
|
return _context2.stop();
|
|
215
219
|
}
|
|
216
|
-
}, _callee2, null, [[0,
|
|
220
|
+
}, _callee2, null, [[0, 9, 12, 15]]);
|
|
217
221
|
}));
|
|
218
222
|
return function handleRegister() {
|
|
219
223
|
return _ref3.apply(this, arguments);
|
|
@@ -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;
|