@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,14 @@
|
|
|
1
|
+
interface InputItem {
|
|
2
|
+
start_date: string;
|
|
3
|
+
end_date: string;
|
|
4
|
+
total: number;
|
|
5
|
+
num: number;
|
|
6
|
+
}
|
|
7
|
+
interface OutputItem {
|
|
8
|
+
start_date: string;
|
|
9
|
+
end_date: string;
|
|
10
|
+
total: number;
|
|
11
|
+
num: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function formatDateRanges(list: InputItem[]): OutputItem[];
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const renderBundles: (item: any, hidePrice?: boolean, isShowPackageNote?: boolean) => JSX.Element;
|
|
@@ -18,6 +18,7 @@ export var renderBundles = function renderBundles(item, hidePrice, isShowPackage
|
|
|
18
18
|
id = item.id,
|
|
19
19
|
price = item.price,
|
|
20
20
|
symbol = item.symbol,
|
|
21
|
+
options = item.options,
|
|
21
22
|
option = item.option;
|
|
22
23
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
24
|
key: id,
|
|
@@ -29,7 +30,7 @@ export var renderBundles = function renderBundles(item, hidePrice, isShowPackage
|
|
|
29
30
|
}, translation(title || name)), !hidePrice ? /*#__PURE__*/React.createElement("div", {
|
|
30
31
|
className: "".concat(prefix, "packages-product-bundle-info-num")
|
|
31
32
|
}, _formatAmount(price, symbol)) : null), /*#__PURE__*/React.createElement(Options, {
|
|
32
|
-
options: option,
|
|
33
|
+
options: options || option,
|
|
33
34
|
amountSymbol: symbol
|
|
34
35
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
35
36
|
item: item
|
|
@@ -14,15 +14,16 @@
|
|
|
14
14
|
&-packages-product-bundle-option-item {
|
|
15
15
|
display: flex;
|
|
16
16
|
justify-content: space-between;
|
|
17
|
+
gap: 8px;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
&-packages-product-bundle-option-item-left {
|
|
20
21
|
display: flex;
|
|
21
|
-
gap:
|
|
22
|
+
gap: 8px;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
&-packages-product-bundle-option-item-left-amount {
|
|
25
|
-
margin-left:
|
|
26
|
+
margin-left: 0;
|
|
26
27
|
display: flex;
|
|
27
28
|
gap: 4px;
|
|
28
29
|
}
|
|
@@ -20,10 +20,10 @@ var Sales = function Sales(_ref) {
|
|
|
20
20
|
other_products = other_products.map(function (p) {
|
|
21
21
|
return _objectSpread(_objectSpread({}, p), {}, {
|
|
22
22
|
title: p === null || p === void 0 ? void 0 : p.product_title,
|
|
23
|
-
price: p === null || p === void 0 ? void 0 : p.
|
|
23
|
+
price: p === null || p === void 0 ? void 0 : p.selling_price,
|
|
24
24
|
symbol: item.symbol,
|
|
25
25
|
num: p === null || p === void 0 ? void 0 : p.product_quantity,
|
|
26
|
-
total: p === null || p === void 0 ? void 0 : p.
|
|
26
|
+
total: p === null || p === void 0 ? void 0 : p.selling_price
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
return ((_other_products = other_products) === null || _other_products === void 0 ? void 0 : _other_products.length) > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
declare const Like: ({ status, onLike, className, style, isShowChangeResource, }: {
|
|
3
|
+
style?: any;
|
|
4
|
+
status: string;
|
|
5
|
+
onLike?: any;
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
isShowChangeResource?: boolean | undefined;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export default Like;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
declare const Time: ({ item, isShowHolder, onLike, isShowChangeResource, changeResource, changeHolder, isShowChangeHolder, holderMode, onAddHolder, isShowAddHolderButton, onClearHolder, onClearResource, }: any) => JSX.Element | null;
|
|
3
|
+
export default Time;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { locales } from '@pisell/utils';
|
|
3
|
+
import { Alert } from 'antd';
|
|
4
|
+
import "../../index.less";
|
|
5
|
+
var Warning = function Warning(_ref) {
|
|
6
|
+
var errorMessage = _ref.errorMessage,
|
|
7
|
+
osWarnTips = _ref.osWarnTips;
|
|
8
|
+
/**
|
|
9
|
+
* @title: 错误提示列表
|
|
10
|
+
* @description: 错误提示列表
|
|
11
|
+
* @param {*} useMemo
|
|
12
|
+
* @return {*}
|
|
13
|
+
* @Author: WangHan
|
|
14
|
+
* @Date: 2025-07-23 10:10
|
|
15
|
+
*/
|
|
16
|
+
var errorLists = useMemo(function () {
|
|
17
|
+
if (errorMessage) {
|
|
18
|
+
// 如果errorMessage是数组,则返回数组
|
|
19
|
+
if (Array.isArray(errorMessage)) {
|
|
20
|
+
return errorMessage;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 如果errorMessage是字符串,则返回字符串
|
|
24
|
+
if (typeof errorMessage === 'string') {
|
|
25
|
+
return [errorMessage];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if ((osWarnTips === null || osWarnTips === void 0 ? void 0 : osWarnTips.length) > 0) {
|
|
29
|
+
return osWarnTips.map(function (item) {
|
|
30
|
+
return locales.getText(item);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return [];
|
|
34
|
+
}, [errorMessage, osWarnTips]);
|
|
35
|
+
if ((errorLists === null || errorLists === void 0 ? void 0 : errorLists.length) === 0) {
|
|
36
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, errorLists.map(function (item, index) {
|
|
39
|
+
return /*#__PURE__*/React.createElement(Alert, {
|
|
40
|
+
key: index,
|
|
41
|
+
message: item,
|
|
42
|
+
type: "warning",
|
|
43
|
+
showIcon: true,
|
|
44
|
+
className: "pisell-lowcode-product-card-error"
|
|
45
|
+
});
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
export default Warning;
|
|
@@ -10,7 +10,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
10
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; }
|
|
11
11
|
import React, { useMemo, useRef } from 'react';
|
|
12
12
|
import classNames from 'classnames';
|
|
13
|
-
import { Alert } from 'antd';
|
|
14
13
|
import { locales } from '@pisell/utils';
|
|
15
14
|
import CardPro from "../cardPro";
|
|
16
15
|
import Header from "./components/Header";
|
|
@@ -26,7 +25,9 @@ import UseOpenNote from "./hooks/useOpenNote";
|
|
|
26
25
|
import localeTexts from "./locales";
|
|
27
26
|
import { defaultValue } from "./status";
|
|
28
27
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
28
|
+
import Warning from "./components/Warning";
|
|
29
29
|
import "./index.less";
|
|
30
|
+
import CartSkuCard from "./cartSkuCard";
|
|
30
31
|
var ProductCard = function ProductCard(props) {
|
|
31
32
|
var _utils$storage, _dataSource$items;
|
|
32
33
|
var context = useEngineContext();
|
|
@@ -64,7 +65,9 @@ var ProductCard = function ProductCard(props) {
|
|
|
64
65
|
isShowAction = dataSource.isShowAction,
|
|
65
66
|
actionText = dataSource.actionText,
|
|
66
67
|
errorMessage = dataSource.errorMessage,
|
|
67
|
-
isNormalProduct = dataSource.isNormalProduct
|
|
68
|
+
isNormalProduct = dataSource.isNormalProduct,
|
|
69
|
+
_dataSource$osWarnTip = dataSource.osWarnTips,
|
|
70
|
+
osWarnTips = _dataSource$osWarnTip === void 0 ? [] : _dataSource$osWarnTip;
|
|
68
71
|
|
|
69
72
|
/**
|
|
70
73
|
* @title: 显示图片
|
|
@@ -159,12 +162,10 @@ var ProductCard = function ProductCard(props) {
|
|
|
159
162
|
onAction: function onAction() {
|
|
160
163
|
return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
|
|
161
164
|
}
|
|
162
|
-
}) : null,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
className: "pisell-lowcode-product-card-error"
|
|
167
|
-
}) : null), /*#__PURE__*/React.createElement(UseOpenNote, {
|
|
165
|
+
}) : null, /*#__PURE__*/React.createElement(Warning, {
|
|
166
|
+
errorMessage: errorMessage,
|
|
167
|
+
osWarnTips: osWarnTips
|
|
168
|
+
})), /*#__PURE__*/React.createElement(UseOpenNote, {
|
|
168
169
|
ref: useOpenNoteRef,
|
|
169
170
|
onNoteChange: function onNoteChange(e) {
|
|
170
171
|
onNote === null || onNote === void 0 || onNote(_objectSpread(_objectSpread({}, dataSource), {}, {
|
|
@@ -173,4 +174,5 @@ var ProductCard = function ProductCard(props) {
|
|
|
173
174
|
}
|
|
174
175
|
}))));
|
|
175
176
|
};
|
|
177
|
+
ProductCard.V2 = CartSkuCard;
|
|
176
178
|
export default ProductCard;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
4
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
5
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
6
|
+
'pisell2.product.card.discount.reason': string;
|
|
7
|
+
'pisell2.product.card.discount.note': string;
|
|
8
|
+
'pisell2.product.card.edit': string;
|
|
9
|
+
'pisell2.product.card.discount.add.note': string;
|
|
10
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
11
|
+
'pisell2.product.card.confirm': string;
|
|
12
|
+
'pisell2.product.card.cancel': string;
|
|
13
|
+
'pisell2.product.card.note.pla': string;
|
|
14
|
+
'pisell2.product.card.items.package': string;
|
|
15
|
+
'pisell2.product.card.view-all': string;
|
|
16
|
+
'pisell2.product.card.view-less': string;
|
|
17
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
18
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
19
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
20
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
21
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
22
|
+
'pisell2.product.card.sales': string;
|
|
23
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
24
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
25
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
26
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
27
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
28
|
+
};
|
|
29
|
+
'zh-CN': {
|
|
30
|
+
'pisell2.product.card.edit': string;
|
|
31
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
32
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
33
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
34
|
+
'pisell2.product.card.discount.reason': string;
|
|
35
|
+
'pisell2.product.card.discount.note': string;
|
|
36
|
+
'pisell2.product.card.discount.add.note': string;
|
|
37
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
38
|
+
'pisell2.product.card.confirm': string;
|
|
39
|
+
'pisell2.product.card.cancel': string;
|
|
40
|
+
'pisell2.product.card.note.pla': string;
|
|
41
|
+
'pisell2.product.card.items.package': string;
|
|
42
|
+
'pisell2.product.card.view-all': string;
|
|
43
|
+
'pisell2.product.card.view-less': string;
|
|
44
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
45
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
46
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
47
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
48
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
49
|
+
'pisell2.product.card.sales': string;
|
|
50
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
51
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
52
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
53
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
54
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
55
|
+
};
|
|
56
|
+
'zh-HK': {
|
|
57
|
+
'pisell2.product.card.edit': string;
|
|
58
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
59
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
60
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
61
|
+
'pisell2.product.card.discount.reason': string;
|
|
62
|
+
'pisell2.product.card.discount.note': string;
|
|
63
|
+
'pisell2.product.card.discount.add.note': string;
|
|
64
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
65
|
+
'pisell2.product.card.confirm': string;
|
|
66
|
+
'pisell2.product.card.cancel': string;
|
|
67
|
+
'pisell2.product.card.note.pla': string;
|
|
68
|
+
'pisell2.product.card.items.package': string;
|
|
69
|
+
'pisell2.product.card.view-all': string;
|
|
70
|
+
'pisell2.product.card.view-less': string;
|
|
71
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
72
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
73
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
74
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
75
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
76
|
+
'pisell2.product.card.sales': string;
|
|
77
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
78
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
79
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
80
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
81
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export default _default;
|
|
@@ -37,7 +37,8 @@ export default {
|
|
|
37
37
|
'pisell2.product.card.add.holder.modal.cancel': 'Cancel',
|
|
38
38
|
'pisell2.product.card.add.holder.modal.clear': 'Clear',
|
|
39
39
|
'pisell2.product.card.add.holder.modal.apply': 'Apply',
|
|
40
|
-
'pisell2.product.card.add.holder.modal.add': 'Add New'
|
|
40
|
+
'pisell2.product.card.add.holder.modal.add': 'Add New',
|
|
41
|
+
'pisell2.product.card.closing-soon.warning': 'The venue will close soon. Please make sure you have enough time for your visit.'
|
|
41
42
|
},
|
|
42
43
|
'zh-CN': {
|
|
43
44
|
'pisell2.product.card.edit': '编辑',
|
|
@@ -77,7 +78,8 @@ export default {
|
|
|
77
78
|
'pisell2.product.card.add.holder.modal.cancel': '取消',
|
|
78
79
|
'pisell2.product.card.add.holder.modal.clear': '清除',
|
|
79
80
|
'pisell2.product.card.add.holder.modal.apply': '应用',
|
|
80
|
-
'pisell2.product.card.add.holder.modal.add': '添加'
|
|
81
|
+
'pisell2.product.card.add.holder.modal.add': '添加',
|
|
82
|
+
'pisell2.product.card.closing-soon.warning': '当前入场时间临近营业结束,请确认是否仍要购买。'
|
|
81
83
|
},
|
|
82
84
|
'zh-HK': {
|
|
83
85
|
'pisell2.product.card.edit': '編輯',
|
|
@@ -117,6 +119,7 @@ export default {
|
|
|
117
119
|
'pisell2.product.card.add.holder.modal.cancel': '取消',
|
|
118
120
|
'pisell2.product.card.add.holder.modal.clear': '清除',
|
|
119
121
|
'pisell2.product.card.add.holder.modal.apply': '應用',
|
|
120
|
-
'pisell2.product.card.add.holder.modal.add': '添加'
|
|
122
|
+
'pisell2.product.card.add.holder.modal.add': '添加',
|
|
123
|
+
'pisell2.product.card.closing-soon.warning': '當前入場時間臨近營業結束,請確認是否仍要購買。'
|
|
121
124
|
}
|
|
122
125
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ProductCardTypes, bundleType, optionType, productType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @title: 套餐数据
|
|
4
|
+
* @description:
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: WangHan
|
|
7
|
+
* @Date: 2025-01-02 23:21
|
|
8
|
+
*/
|
|
9
|
+
export declare const defaultBundle: bundleType;
|
|
10
|
+
/**
|
|
11
|
+
* @description: 单规格
|
|
12
|
+
* @return {*}
|
|
13
|
+
* @Author: WangHan
|
|
14
|
+
* @Date: 2025-01-02 23:00
|
|
15
|
+
*/
|
|
16
|
+
export declare const defaultOption: optionType;
|
|
17
|
+
/**
|
|
18
|
+
* @title: 商品商品类型
|
|
19
|
+
* @description:
|
|
20
|
+
* @return {*}
|
|
21
|
+
* @Author: WangHan
|
|
22
|
+
* @Date: 2025-01-02 22:48
|
|
23
|
+
*/
|
|
24
|
+
export declare const defaultProduct: productType;
|
|
25
|
+
/**
|
|
26
|
+
* @title: 默认数据
|
|
27
|
+
* @description:
|
|
28
|
+
* @return {*}
|
|
29
|
+
* @Author: WangHan
|
|
30
|
+
* @Date: 2024-12-12 16:49
|
|
31
|
+
*/
|
|
32
|
+
export declare const defaultValue: ProductCardTypes;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export declare type bundleType = {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
num: number;
|
|
5
|
+
price: number;
|
|
6
|
+
total: number;
|
|
7
|
+
origin_total?: number;
|
|
8
|
+
price_type?: string;
|
|
9
|
+
options?: optionType[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @description:
|
|
13
|
+
* @return {*}
|
|
14
|
+
* @Author: WangHan
|
|
15
|
+
* @Date: 2025-01-02 23:00
|
|
16
|
+
*/
|
|
17
|
+
export declare type optionType = {
|
|
18
|
+
id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
num: number;
|
|
21
|
+
price: number;
|
|
22
|
+
total: number;
|
|
23
|
+
origin_total?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @title: 商品商品类型
|
|
27
|
+
* @description:
|
|
28
|
+
* @return {*}
|
|
29
|
+
* @Author: WangHan
|
|
30
|
+
* @Date: 2025-01-02 22:48
|
|
31
|
+
*/
|
|
32
|
+
export declare type productType = {
|
|
33
|
+
_id: string | number;
|
|
34
|
+
id: number;
|
|
35
|
+
name: string;
|
|
36
|
+
price: number;
|
|
37
|
+
total: number;
|
|
38
|
+
num: number;
|
|
39
|
+
origin_total?: number;
|
|
40
|
+
image?: string;
|
|
41
|
+
isShowNote?: boolean;
|
|
42
|
+
note?: string;
|
|
43
|
+
like_status?: string;
|
|
44
|
+
bundle?: bundleType[];
|
|
45
|
+
options?: optionType[];
|
|
46
|
+
isShowAction?: boolean;
|
|
47
|
+
actionText?: string;
|
|
48
|
+
errorMessage?: string;
|
|
49
|
+
product_option_string?: string;
|
|
50
|
+
discount_reason?: string;
|
|
51
|
+
relation_products?: any[];
|
|
52
|
+
resource_id?: string | number;
|
|
53
|
+
relation_form_name?: string;
|
|
54
|
+
holder_title?: string;
|
|
55
|
+
start_date?: string;
|
|
56
|
+
end_date?: string;
|
|
57
|
+
is_show_duration?: boolean;
|
|
58
|
+
is_show_week?: boolean;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* 排序总配置
|
|
62
|
+
*/
|
|
63
|
+
export declare type ProductCardTypes = {
|
|
64
|
+
dataSource: productType;
|
|
65
|
+
isShowImage?: boolean;
|
|
66
|
+
isShowHolder?: boolean;
|
|
67
|
+
isShowNote?: boolean;
|
|
68
|
+
isShowPackageNote?: boolean;
|
|
69
|
+
isShowDelete?: boolean;
|
|
70
|
+
disabledEdit?: boolean;
|
|
71
|
+
locale?: string;
|
|
72
|
+
symbol?: string;
|
|
73
|
+
isShowChangeHolder?: boolean;
|
|
74
|
+
isShowChangeResource?: boolean;
|
|
75
|
+
isShowChangeDate?: boolean;
|
|
76
|
+
onAction?: (val: any) => void;
|
|
77
|
+
onDelete?: (val: any) => void;
|
|
78
|
+
onNote?: (val: any) => void;
|
|
79
|
+
onLike?: (val: any) => void;
|
|
80
|
+
onCard?: (val: any) => void;
|
|
81
|
+
onChangeResource?: (val: any) => void;
|
|
82
|
+
osWarnTips?: Array<string>;
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
};
|
|
@@ -60,6 +60,8 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
|
|
|
60
60
|
var utils = context.appHelper.utils || {};
|
|
61
61
|
var locale = (item === null || item === void 0 ? void 0 : item.locale) || (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en-US';
|
|
62
62
|
var isEn = locale === 'en-US' || locale === 'en';
|
|
63
|
+
// 灵活时长, 默认按分钟计算
|
|
64
|
+
var durationType = (item === null || item === void 0 ? void 0 : item.duration_type) === 'flexible' ? 'minutes' : item === null || item === void 0 ? void 0 : item.duration_type;
|
|
63
65
|
var localeTypes = {
|
|
64
66
|
'en-US': 'en',
|
|
65
67
|
'zh-CN': 'zh-cn',
|
|
@@ -71,7 +73,7 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
|
|
|
71
73
|
var diffInDays = (item === null || item === void 0 ? void 0 : item.custom_day_count) || endDate.diff(startDate, 'day');
|
|
72
74
|
|
|
73
75
|
// 1.2时间格式, 同天显示 年月日 开始 - 结束, 不同天 年月日 开始 - 年月日 结束
|
|
74
|
-
if (
|
|
76
|
+
if (durationType) {
|
|
75
77
|
var sameDay = startDate.isSame(endDate, 'day');
|
|
76
78
|
var dateFormat = isEn ? 'DD/MM/YYYY' : 'YYYY-MM-DD';
|
|
77
79
|
var timeFormat = 'HH:mm';
|
|
@@ -98,14 +100,14 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
|
|
|
98
100
|
}
|
|
99
101
|
var startDateTime = "".concat(startDate.format('YYYY-MM-DD'), " ").concat(startTime);
|
|
100
102
|
var endDateTime = "".concat(endDate.format('YYYY-MM-DD'), " ").concat(endTime);
|
|
101
|
-
var _duration = dayjs(endDateTime).diff(dayjs(startDateTime),
|
|
103
|
+
var _duration = dayjs(endDateTime).diff(dayjs(startDateTime), durationType);
|
|
102
104
|
var durationText = '';
|
|
103
|
-
if (
|
|
105
|
+
if (durationType === 'minutes') {
|
|
104
106
|
// 转为小时+分钟
|
|
105
107
|
var hours = Math.floor(_duration / 60);
|
|
106
108
|
var minutes = _duration % 60;
|
|
107
109
|
durationText = locales.getText('pisell2.product.card.hour.minute')(hours, minutes);
|
|
108
|
-
} else if (
|
|
110
|
+
} else if (durationType === 'days') {
|
|
109
111
|
durationText = locales.getText('pisell2.product.card.day')(_duration);
|
|
110
112
|
} else {
|
|
111
113
|
durationText = "".concat(_duration);
|
|
@@ -127,7 +129,7 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
|
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
// 显示时长分钟
|
|
130
|
-
if (
|
|
132
|
+
if (durationType === 'minutes') {
|
|
131
133
|
diffInDays = endDate.diff(startDate, 'minute');
|
|
132
134
|
}
|
|
133
135
|
var date = "".concat(startDate.format(_format), " ~ ").concat(endDate.format(_format));
|
|
@@ -141,7 +143,7 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
|
|
|
141
143
|
'minutes': locales.getText('pisell2.product.card.minute')(diffInDays),
|
|
142
144
|
'event': locales.getText('pisell2.product.card.day.event')(diffInDays)
|
|
143
145
|
};
|
|
144
|
-
text = (textTypes === null || textTypes === void 0 ? void 0 : textTypes[
|
|
146
|
+
text = (textTypes === null || textTypes === void 0 ? void 0 : textTypes[durationType]) || text;
|
|
145
147
|
var duration = "".concat(diffInDays).concat(text);
|
|
146
148
|
return "".concat(date, " (").concat(duration, ")");
|
|
147
149
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface SectionFooterProps {
|
|
3
|
+
left?: React.ReactNode;
|
|
4
|
+
middle?: React.ReactNode;
|
|
5
|
+
right?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const SectionFooters: (props: SectionFooterProps) => JSX.Element;
|
|
9
|
+
export default SectionFooters;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const fieldMaps: {
|
|
2
3
|
text: {
|
|
3
4
|
field: {
|
|
@@ -197,12 +198,12 @@ export declare const fieldList: ({
|
|
|
197
198
|
field_icon: string;
|
|
198
199
|
field_name: string;
|
|
199
200
|
field_type: string;
|
|
200
|
-
default_value:
|
|
201
|
+
default_value: string;
|
|
201
202
|
} | {
|
|
202
203
|
field_icon: string;
|
|
203
204
|
field_name: string;
|
|
204
205
|
field_type: string;
|
|
205
|
-
default_value:
|
|
206
|
+
default_value: boolean;
|
|
206
207
|
} | {
|
|
207
208
|
field_icon: string;
|
|
208
209
|
field_name: string;
|
|
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
155
155
|
sort?: SortType | undefined;
|
|
156
156
|
mode: "" | "localStorage" | "remote";
|
|
157
157
|
currentViewMode: ModeType;
|
|
158
|
-
}) => ("
|
|
158
|
+
}) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
|
|
159
159
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
160
160
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
161
161
|
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FilterType } from "../../filter/types";
|
|
2
|
+
import { ColumnSettingType, DataSourceGroupType, GallerySettingType, GridViewType, ModeType, SortType, ExportImportModeType } from "../types";
|
|
3
|
+
declare type UseTableSettingProps = {
|
|
4
|
+
tableId?: string;
|
|
5
|
+
filter: FilterType;
|
|
6
|
+
columns: Record<string, any>[];
|
|
7
|
+
columnSetting?: ColumnSettingType;
|
|
8
|
+
dataSourceGroup?: DataSourceGroupType;
|
|
9
|
+
sort?: SortType;
|
|
10
|
+
view: GridViewType;
|
|
11
|
+
currentViewMode: ModeType;
|
|
12
|
+
gallery?: GallerySettingType;
|
|
13
|
+
currentSettingHash: string;
|
|
14
|
+
exportImport?: ExportImportModeType;
|
|
15
|
+
};
|
|
16
|
+
declare const useTableSetting: (params: UseTableSettingProps) => {
|
|
17
|
+
setTableSetting: (values: Record<string, any>) => void;
|
|
18
|
+
tableSetting: {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default useTableSetting;
|