@pisell/materials 2.2.114 → 2.2.115
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 +3 -3
- package/build/lowcode/preview.js +144 -165
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +31 -40
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +36 -45
- package/es/components/batch-editor/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +9 -9
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/filter/index.d.ts +0 -1
- package/es/components/page/index.d.ts +1 -0
- package/es/components/pisellText/components/Editable/index.js +130 -0
- package/es/components/pisellText/components/Editable/index.less +40 -0
- package/es/components/pisellText/index.js +2 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/select/index.js +4 -2
- package/es/components/sortableList/index.js +2 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -1
- package/es/components/table/Actions/component/ExportImport/index.js +55 -27
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- 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/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/serve.js +8 -0
- package/es/components/tabs/index.js +9 -0
- package/es/components/walletCard/index.js +51 -40
- package/es/locales/en-US.js +2 -2
- package/es/locales/zh-CN.js +1 -1
- package/es/locales/zh-TW.js +1 -1
- package/es/typings.d.ts +7 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/batch-editor/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +9 -9
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/filter/index.d.ts +0 -1
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/pisellText/components/Editable/index.js +139 -0
- package/lib/components/pisellText/components/Editable/index.less +40 -0
- package/lib/components/pisellText/index.js +2 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/select/index.js +7 -2
- package/lib/components/sortableList/index.js +2 -2
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +7 -1
- package/lib/components/table/Actions/component/ExportImport/index.js +37 -25
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- 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/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/serve.js +8 -0
- package/lib/components/tabs/index.js +5 -0
- package/lib/components/walletCard/index.js +47 -29
- package/lib/locales/en-US.js +2 -2
- package/lib/locales/zh-CN.js +1 -1
- package/lib/locales/zh-TW.js +1 -1
- package/lib/typings.d.ts +7 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/pisell-text.editable/meta.ts +115 -0
- package/lowcode/pisell-text.editable/snippets.ts +15 -0
- package/lowcode/sortable-list/meta.ts +1 -1
- package/lowcode/wallet-card/meta.ts +23 -3
- package/package.json +11 -11
- package/es/components/appVersionControl/index.d.ts +0 -4
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/es/components/auto-resize-text/index.d.ts +0 -6
- package/es/components/cardPro/index.d.ts +0 -3
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +0 -8
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -28
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -100
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -33
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -17
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +0 -16
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +0 -5
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +0 -5
- package/es/components/dataSourceComponents/fields/Upload/index.d.ts +0 -3
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +0 -38
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -5
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/filter/types.d.ts +0 -46
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/keyboard/index.d.ts +0 -22
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/context.d.ts +0 -22
- package/es/components/pisell-config-provider/index.d.ts +0 -13
- package/es/components/pisellAdjustPrice/index.d.ts +0 -4
- package/es/components/pisellAdjustPrice/status.d.ts +0 -32
- package/es/components/pisellAdjustPrice/type.d.ts +0 -22
- package/es/components/pisellCamera/index.d.ts +0 -4
- package/es/components/pisellCardList/index.d.ts +0 -103
- package/es/components/pisellCheckboxGroup/index.d.ts +0 -40
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellText/components/Amount/index.d.ts +0 -20
- package/es/components/pisellText/index.d.ts +0 -8
- package/es/components/pisellToast/index.d.ts +0 -17
- package/es/components/pisellToast/squareToast/index.d.ts +0 -15
- package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/es/components/pisellWalletPassCard/index.d.ts +0 -136
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/es/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/es/components/productCard/components/Action/index.d.ts +0 -3
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/es/components/productCard/components/Header/index.d.ts +0 -3
- package/es/components/productCard/components/Sales/index.d.ts +0 -3
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -18
- package/es/components/productCard/components/Time/index.d.ts +0 -3
- package/es/components/productCard/locales.d.ts +0 -84
- package/es/components/select/index.d.ts +0 -9
- package/es/components/sortableList/index.d.ts +0 -11
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +0 -7
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/es/components/table/Actions/index.d.ts +0 -17
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
- package/es/components/table/Gallery/index.d.ts +0 -5
- package/es/components/table/Table/AddFieldModal/index.d.ts +0 -4
- package/es/components/table/Table/index.d.ts +0 -4
- package/es/components/table/Table/utils.d.ts +0 -161
- package/es/components/table/hooks/useTableSetting.d.ts +0 -21
- package/es/components/table/hooks/useTransDataSource.d.ts +0 -11
- package/es/components/table/index.d.ts +0 -4
- package/es/components/table/serve.d.ts +0 -13
- package/es/components/table/types.d.ts +0 -268
- package/es/components/tabs/index.d.ts +0 -16
- package/es/components/translation/index.d.ts +0 -14
- package/es/components/versionModal/index.d.ts +0 -23
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -5
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -25
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/index.d.ts +0 -5
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/es/components/virtual-keyboard/index.d.ts +0 -25
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
- package/es/components/virtualInput/index.d.ts +0 -24
- package/es/components/walletCard/index.d.ts +0 -71
- package/es/index.d.ts +0 -144
- package/es/locales/en-US.d.ts +0 -307
- package/es/locales/zh-CN.d.ts +0 -302
- package/es/locales/zh-TW.d.ts +0 -302
- package/lib/components/appVersionControl/index.d.ts +0 -4
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/lib/components/auto-resize-text/index.d.ts +0 -6
- package/lib/components/cardPro/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +0 -8
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -28
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -100
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -33
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -17
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +0 -16
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +0 -5
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +0 -5
- package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +0 -38
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -5
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/filter/types.d.ts +0 -46
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/keyboard/index.d.ts +0 -22
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/context.d.ts +0 -22
- package/lib/components/pisell-config-provider/index.d.ts +0 -13
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -4
- package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
- package/lib/components/pisellCamera/index.d.ts +0 -4
- package/lib/components/pisellCardList/index.d.ts +0 -103
- package/lib/components/pisellCheckboxGroup/index.d.ts +0 -40
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellText/components/Amount/index.d.ts +0 -20
- package/lib/components/pisellText/index.d.ts +0 -8
- package/lib/components/pisellToast/index.d.ts +0 -17
- package/lib/components/pisellToast/squareToast/index.d.ts +0 -15
- package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/lib/components/pisellWalletPassCard/index.d.ts +0 -136
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/lib/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/lib/components/productCard/components/Action/index.d.ts +0 -3
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/lib/components/productCard/components/Header/index.d.ts +0 -3
- package/lib/components/productCard/components/Sales/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -18
- package/lib/components/productCard/components/Time/index.d.ts +0 -3
- package/lib/components/productCard/locales.d.ts +0 -84
- package/lib/components/select/index.d.ts +0 -9
- package/lib/components/sortableList/index.d.ts +0 -11
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +0 -7
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/lib/components/table/Actions/index.d.ts +0 -17
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
- package/lib/components/table/Gallery/index.d.ts +0 -5
- package/lib/components/table/Table/AddFieldModal/index.d.ts +0 -4
- package/lib/components/table/Table/index.d.ts +0 -4
- package/lib/components/table/Table/utils.d.ts +0 -161
- package/lib/components/table/hooks/useTableSetting.d.ts +0 -21
- package/lib/components/table/hooks/useTransDataSource.d.ts +0 -11
- package/lib/components/table/index.d.ts +0 -4
- package/lib/components/table/serve.d.ts +0 -13
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/tabs/index.d.ts +0 -16
- package/lib/components/translation/index.d.ts +0 -14
- package/lib/components/versionModal/index.d.ts +0 -23
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -5
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -25
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/index.d.ts +0 -5
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/lib/components/virtual-keyboard/index.d.ts +0 -25
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
- package/lib/components/virtualInput/index.d.ts +0 -24
- package/lib/components/walletCard/index.d.ts +0 -71
- package/lib/index.d.ts +0 -144
- package/lib/locales/en-US.d.ts +0 -307
- package/lib/locales/zh-CN.d.ts +0 -302
- package/lib/locales/zh-TW.d.ts +0 -302
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -19,7 +19,7 @@ declare const formFieldMap: {
|
|
|
19
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
20
|
onChange: (value: string) => void;
|
|
21
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
23
23
|
customDomain?: string | undefined;
|
|
24
24
|
value?: string | undefined;
|
|
25
25
|
tenantId: string;
|
|
@@ -59,11 +59,7 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<
|
|
63
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
-
} & {
|
|
65
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
|
|
67
63
|
JSON: import("react").FC<any>;
|
|
68
64
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
69
65
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -76,14 +72,18 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
76
72
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
77
73
|
onChange: (value: string) => void;
|
|
78
74
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
79
|
-
rootDomain: "custom" | "
|
|
75
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
80
76
|
customDomain?: string | undefined;
|
|
81
77
|
value?: string | undefined;
|
|
82
78
|
tenantId: string;
|
|
83
79
|
name?: string | undefined;
|
|
84
80
|
fieldKey?: string | undefined;
|
|
85
81
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
86
|
-
}) | (import("react").FC<{}> & {
|
|
82
|
+
}) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
83
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
84
|
+
} & {
|
|
85
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
86
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
87
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
88
|
} & {
|
|
89
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -95,7 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
95
95
|
extraParams?: Record<string, any> | undefined;
|
|
96
96
|
} & {
|
|
97
97
|
dataSource?: any;
|
|
98
|
-
}) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./
|
|
98
|
+
}) => JSX.Element) | import("react").FC<any> | 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
99
|
onChange: (value: string) => void;
|
|
100
100
|
} & 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
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
var _excluded = ["value", "children", "editable", "onChange", "className", "size"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
9
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
|
+
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; }
|
|
12
|
+
import React, { useState, useMemo } from 'react';
|
|
13
|
+
import { Input } from 'antd';
|
|
14
|
+
import Icon from "../../../icon";
|
|
15
|
+
import { locales } from '@pisell/utils';
|
|
16
|
+
import classNames from 'classnames';
|
|
17
|
+
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
18
|
+
import Translation from "../../../translation";
|
|
19
|
+
import "./index.less";
|
|
20
|
+
var Editable = function Editable(props) {
|
|
21
|
+
var value = props.value,
|
|
22
|
+
children = props.children,
|
|
23
|
+
_props$editable = props.editable,
|
|
24
|
+
editable = _props$editable === void 0 ? false : _props$editable,
|
|
25
|
+
onChange = props.onChange,
|
|
26
|
+
className = props.className,
|
|
27
|
+
_props$size = props.size,
|
|
28
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
29
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
30
|
+
var context = useEngineContext();
|
|
31
|
+
var _useState = useState(false),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
isEditing = _useState2[0],
|
|
34
|
+
setIsEditing = _useState2[1];
|
|
35
|
+
// 解析编辑配置
|
|
36
|
+
var editableConfig = useMemo(function () {
|
|
37
|
+
if (typeof editable === 'boolean') {
|
|
38
|
+
return editable ? {} : null;
|
|
39
|
+
}
|
|
40
|
+
return editable || null;
|
|
41
|
+
}, [editable]);
|
|
42
|
+
var currentLocale = useMemo(function () {
|
|
43
|
+
var _context$appHelper$ut;
|
|
44
|
+
var locale = (_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale');
|
|
45
|
+
return locales.formatLocale(locale);
|
|
46
|
+
}, []);
|
|
47
|
+
var displayValue = useMemo(function () {
|
|
48
|
+
if (typeof children === 'string') return children;
|
|
49
|
+
if (typeof value === 'string') {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
if (value && _typeof(value) === 'object') {
|
|
53
|
+
return value[currentLocale] || '';
|
|
54
|
+
}
|
|
55
|
+
return '';
|
|
56
|
+
}, [value, currentLocale, children]);
|
|
57
|
+
|
|
58
|
+
// 判断是否为多语言对象
|
|
59
|
+
var isMultiLanguage = useMemo(function () {
|
|
60
|
+
return !!value && _typeof(value) === 'object';
|
|
61
|
+
}, [value]);
|
|
62
|
+
|
|
63
|
+
// 编辑功能
|
|
64
|
+
var handleEdit = function handleEdit() {
|
|
65
|
+
if (editableConfig !== null && editableConfig !== void 0 && editableConfig.disabled) return;
|
|
66
|
+
setIsEditing(true);
|
|
67
|
+
};
|
|
68
|
+
var handleInputChange = function handleInputChange(newValue) {
|
|
69
|
+
if (!onChange) return;
|
|
70
|
+
onChange(newValue);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// 编辑模式渲染
|
|
74
|
+
if (isEditing && editableConfig) {
|
|
75
|
+
// 如果是多语言对象,使用 Translation 组件
|
|
76
|
+
if (isMultiLanguage) {
|
|
77
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
className: classNames('pisell-text-editable-editing', className)
|
|
79
|
+
}, /*#__PURE__*/React.createElement(Translation, {
|
|
80
|
+
value: value,
|
|
81
|
+
onChange: handleInputChange,
|
|
82
|
+
onPressEnter: function onPressEnter() {
|
|
83
|
+
return setIsEditing(false);
|
|
84
|
+
}
|
|
85
|
+
// onBlur={() => setIsEditing(false)}
|
|
86
|
+
,
|
|
87
|
+
maxLength: editableConfig.maxLength,
|
|
88
|
+
size: size,
|
|
89
|
+
autoFocus: true
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// 普通字符串,使用 Input 组件
|
|
94
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
95
|
+
value: displayValue,
|
|
96
|
+
onChange: function onChange(e) {
|
|
97
|
+
return handleInputChange(e.target.value);
|
|
98
|
+
},
|
|
99
|
+
onPressEnter: function onPressEnter() {
|
|
100
|
+
return setIsEditing(false);
|
|
101
|
+
}
|
|
102
|
+
// onBlur={() => setIsEditing(false)}
|
|
103
|
+
,
|
|
104
|
+
maxLength: editableConfig.maxLength,
|
|
105
|
+
size: size,
|
|
106
|
+
autoFocus: true,
|
|
107
|
+
className: classNames('pisell-text-editable-input', className),
|
|
108
|
+
style: others.style
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// 正常显示模式
|
|
113
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
114
|
+
className: classNames('pisell-text-editable', className, {
|
|
115
|
+
'pisell-text-editable-enabled': editableConfig && !editableConfig.disabled
|
|
116
|
+
})
|
|
117
|
+
}, others), displayValue, editableConfig && !editableConfig.disabled && !isEditing && /*#__PURE__*/React.createElement("span", {
|
|
118
|
+
className: "pisell-text-editable-edit-icon",
|
|
119
|
+
onClick: function onClick(e) {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
e.stopPropagation();
|
|
122
|
+
handleEdit();
|
|
123
|
+
},
|
|
124
|
+
title: "\u70B9\u51FB\u7F16\u8F91"
|
|
125
|
+
}, editableConfig.icon || /*#__PURE__*/React.createElement(Icon, {
|
|
126
|
+
type: "pisell2-edit-05",
|
|
127
|
+
size: 16
|
|
128
|
+
})));
|
|
129
|
+
};
|
|
130
|
+
export default Editable;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.pisell-text-editable {
|
|
2
|
+
position: relative;
|
|
3
|
+
|
|
4
|
+
&-enabled {
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&-edit-icon {
|
|
9
|
+
margin-left: 4px;
|
|
10
|
+
color: rgba(0, 0, 0, 0.45);
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
opacity: 1;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
pointer-events: auto;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
color: #1890ff;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 确保内部的图标不会阻止点击事件
|
|
22
|
+
* {
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-input {
|
|
28
|
+
min-width: 100px;
|
|
29
|
+
|
|
30
|
+
&.ant-input {
|
|
31
|
+
border: 1px solid #1890ff;
|
|
32
|
+
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-editing {
|
|
37
|
+
display: inline-block;
|
|
38
|
+
width: 100%;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Amount from "./components/Amount";
|
|
3
|
+
import Editable from "./components/Editable";
|
|
3
4
|
var PisellText = function PisellText(props) {
|
|
4
5
|
return /*#__PURE__*/React.createElement("span", props);
|
|
5
6
|
};
|
|
6
7
|
PisellText.Amount = Amount;
|
|
8
|
+
PisellText.Editable = Editable;
|
|
7
9
|
export default PisellText;
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -23,6 +23,7 @@ var SelectBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
23
23
|
options = props.options,
|
|
24
24
|
propsDropdownRender = props.dropdownRender,
|
|
25
25
|
showSearch = props.showSearch,
|
|
26
|
+
onSearch = props.onSearch,
|
|
26
27
|
styleType = props.styleType,
|
|
27
28
|
_props$optionFilterPr = props.optionFilterProp,
|
|
28
29
|
optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,
|
|
@@ -87,7 +88,8 @@ var SelectBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
87
88
|
placeholder: getText('select-dropdown-render-search'),
|
|
88
89
|
value: searchValue,
|
|
89
90
|
onChange: function onChange(e) {
|
|
90
|
-
|
|
91
|
+
onSearch === null || onSearch === void 0 || onSearch(e.target.value);
|
|
92
|
+
setSearchValue(e.target.value);
|
|
91
93
|
},
|
|
92
94
|
bordered: false,
|
|
93
95
|
allowClear: true,
|
|
@@ -105,7 +107,7 @@ var SelectBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
105
107
|
onChange: onSelectAllChange,
|
|
106
108
|
checked: checkboxChecked
|
|
107
109
|
}, getText('select-dropdown-render-select-all')))));
|
|
108
|
-
}, [isShowDropdown, isShowSelectAll, checkboxChecked, propsDropdownRender, searchValue, showSearch]);
|
|
110
|
+
}, [isShowDropdown, isShowSelectAll, checkboxChecked, propsDropdownRender, searchValue, showSearch, onSearch]);
|
|
109
111
|
if (styleType === 'system') {
|
|
110
112
|
return /*#__PURE__*/React.createElement(BrowserSelect, props);
|
|
111
113
|
}
|
|
@@ -18,13 +18,14 @@ var SortableList = function SortableList(props) {
|
|
|
18
18
|
activationConstraint: activationConstraint
|
|
19
19
|
}, function (params) {
|
|
20
20
|
var item = params.item,
|
|
21
|
+
index = params.index,
|
|
21
22
|
p = params.props,
|
|
22
23
|
attributes = params.attributes,
|
|
23
24
|
listeners = params.listeners,
|
|
24
25
|
style = params.style;
|
|
25
26
|
return /*#__PURE__*/React.createElement("div", _extends({}, p, attributes, listeners, {
|
|
26
27
|
style: style
|
|
27
|
-
}), renderItem === null || renderItem === void 0 ? void 0 : renderItem(item));
|
|
28
|
+
}), renderItem === null || renderItem === void 0 ? void 0 : renderItem(item, index));
|
|
28
29
|
});
|
|
29
30
|
};
|
|
30
31
|
export default SortableList;
|
package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js
CHANGED
|
@@ -12,6 +12,12 @@ import { getText } from "../../../../../../../locales/index";
|
|
|
12
12
|
import { exportData } from "../../../../../serve";
|
|
13
13
|
import { defaultOptions } from "../../../../../status";
|
|
14
14
|
import { getFileDateName } from "../../utils/file";
|
|
15
|
+
var exportImportTypeMap = {
|
|
16
|
+
'current-page': 'page',
|
|
17
|
+
'all-records': 'all',
|
|
18
|
+
'selected-records': 'select'
|
|
19
|
+
};
|
|
20
|
+
|
|
15
21
|
// 导出接口
|
|
16
22
|
var _batchExport = /*#__PURE__*/function () {
|
|
17
23
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
@@ -52,7 +58,8 @@ export var batchExport = function batchExport(exportParams, exportImport) {
|
|
|
52
58
|
apiUrl = exportImport.apiUrl,
|
|
53
59
|
otherParams = exportImport.otherParams;
|
|
54
60
|
var _name = getFileDateName();
|
|
55
|
-
|
|
61
|
+
// 拆分导入导出参数
|
|
62
|
+
var params = otherParams !== null && otherParams !== void 0 && otherParams.export ? _objectSpread({}, otherParams === null || otherParams === void 0 ? void 0 : otherParams.export) : _objectSpread({}, otherParams);
|
|
56
63
|
params.url = apiUrl === null || apiUrl === void 0 ? void 0 : apiUrl.export;
|
|
57
64
|
console.log("exportParams", exportParams);
|
|
58
65
|
var type = (exportParams === null || exportParams === void 0 ? void 0 : exportParams.type) || defaultOptions.exportType;
|
|
@@ -93,5 +100,6 @@ export var batchExport = function batchExport(exportParams, exportImport) {
|
|
|
93
100
|
params === null || params === void 0 || delete params.payment_status;
|
|
94
101
|
params === null || params === void 0 || delete params.status;
|
|
95
102
|
}
|
|
103
|
+
params.export_select = exportImportTypeMap[type];
|
|
96
104
|
return _batchExport(params);
|
|
97
105
|
};
|
|
@@ -56,6 +56,10 @@ var ExportImport = function ExportImport(_ref) {
|
|
|
56
56
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
57
57
|
errorStatus = _useState10[0],
|
|
58
58
|
setErrorStatus = _useState10[1];
|
|
59
|
+
var _useState11 = useState(false),
|
|
60
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
61
|
+
loading = _useState12[0],
|
|
62
|
+
setLoading = _useState12[1];
|
|
59
63
|
var _useSharedState = useSharedState(Context),
|
|
60
64
|
state = _useSharedState.state;
|
|
61
65
|
var originResultDataSource = state.originResultDataSource,
|
|
@@ -148,9 +152,11 @@ var ExportImport = function ExportImport(_ref) {
|
|
|
148
152
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
149
153
|
while (1) switch (_context.prev = _context.next) {
|
|
150
154
|
case 0:
|
|
151
|
-
apiUrl = exportImport.apiUrl, otherParams = exportImport.otherParams;
|
|
155
|
+
apiUrl = exportImport.apiUrl, otherParams = exportImport.otherParams;
|
|
156
|
+
setLoading(true);
|
|
157
|
+
_context.prev = 2;
|
|
152
158
|
if (!(value === defaultOptions.exportValue)) {
|
|
153
|
-
_context.next =
|
|
159
|
+
_context.next = 11;
|
|
154
160
|
break;
|
|
155
161
|
}
|
|
156
162
|
_params = {
|
|
@@ -158,41 +164,62 @@ var ExportImport = function ExportImport(_ref) {
|
|
|
158
164
|
originDataSource: originResultDataSource,
|
|
159
165
|
currentDataSource: currentDataSource
|
|
160
166
|
};
|
|
161
|
-
_context.next =
|
|
167
|
+
_context.next = 7;
|
|
162
168
|
return batchExport(_params, exportImport);
|
|
163
|
-
case
|
|
169
|
+
case 7:
|
|
164
170
|
result = _context.sent;
|
|
165
171
|
if (result) {
|
|
166
172
|
onCancel();
|
|
167
173
|
}
|
|
168
|
-
_context.next =
|
|
174
|
+
_context.next = 24;
|
|
169
175
|
break;
|
|
170
|
-
case
|
|
171
|
-
if (value === defaultOptions.importValue) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
176
|
+
case 11:
|
|
177
|
+
if (!(value === defaultOptions.importValue)) {
|
|
178
|
+
_context.next = 24;
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
formData = new FormData();
|
|
182
|
+
formData.append('file', file);
|
|
183
|
+
formId = otherParams === null || otherParams === void 0 ? void 0 : otherParams.form_id;
|
|
184
|
+
formCode = otherParams === null || otherParams === void 0 ? void 0 : otherParams.code;
|
|
185
|
+
if (formId) {
|
|
186
|
+
formData.append('form_id', formId);
|
|
187
|
+
}
|
|
188
|
+
if (formCode) {
|
|
189
|
+
formData.append('code', formCode);
|
|
190
|
+
}
|
|
191
|
+
formData.append('url', (apiUrl === null || apiUrl === void 0 ? void 0 : apiUrl.import) || '');
|
|
192
|
+
if (otherParams.import) {
|
|
193
|
+
Object.entries(otherParams.import).forEach(function (_ref5) {
|
|
194
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
195
|
+
key = _ref6[0],
|
|
196
|
+
value = _ref6[1];
|
|
197
|
+
formData.append(key, value);
|
|
198
|
+
});
|
|
190
199
|
}
|
|
191
|
-
|
|
200
|
+
if (!formData) {
|
|
201
|
+
_context.next = 24;
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
message.loading({
|
|
205
|
+
content: 'Loading...',
|
|
206
|
+
key: value
|
|
207
|
+
});
|
|
208
|
+
_context.next = 24;
|
|
209
|
+
return _batchImport.run(formData);
|
|
210
|
+
case 24:
|
|
211
|
+
_context.next = 28;
|
|
212
|
+
break;
|
|
213
|
+
case 26:
|
|
214
|
+
_context.prev = 26;
|
|
215
|
+
_context.t0 = _context["catch"](2);
|
|
216
|
+
case 28:
|
|
217
|
+
setLoading(false);
|
|
218
|
+
case 29:
|
|
192
219
|
case "end":
|
|
193
220
|
return _context.stop();
|
|
194
221
|
}
|
|
195
|
-
}, _callee);
|
|
222
|
+
}, _callee, null, [[2, 26]]);
|
|
196
223
|
}));
|
|
197
224
|
return function onOk() {
|
|
198
225
|
return _ref4.apply(this, arguments);
|
|
@@ -227,6 +254,7 @@ var ExportImport = function ExportImport(_ref) {
|
|
|
227
254
|
onOk: onOk,
|
|
228
255
|
cancelText: getText('table-action-export-import-cancel'),
|
|
229
256
|
okButtonProps: {
|
|
257
|
+
loading: loading,
|
|
230
258
|
disabled: value === defaultOptions.importValue && (!file || !!errorStatus)
|
|
231
259
|
}
|
|
232
260
|
}, /*#__PURE__*/React.createElement(Content, {
|
|
@@ -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;
|
|
@@ -26,6 +26,14 @@ var defaultUrl = {
|
|
|
26
26
|
* @Date: 2024-09-05 12:01
|
|
27
27
|
*/
|
|
28
28
|
var formatApiParams = function formatApiParams(params, type) {
|
|
29
|
+
if (params instanceof FormData) {
|
|
30
|
+
var url = params.get('url');
|
|
31
|
+
params.delete('url');
|
|
32
|
+
return {
|
|
33
|
+
url: url || (defaultUrl === null || defaultUrl === void 0 ? void 0 : defaultUrl[type]),
|
|
34
|
+
params: params
|
|
35
|
+
};
|
|
36
|
+
}
|
|
29
37
|
var _url = (params === null || params === void 0 ? void 0 : params.url) || (defaultUrl === null || defaultUrl === void 0 ? void 0 : defaultUrl[type]);
|
|
30
38
|
var _params = _objectSpread({}, params);
|
|
31
39
|
delete _params.url;
|
|
@@ -100,6 +100,15 @@ var Tabs = /*#__PURE__*/function (_Component) {
|
|
|
100
100
|
value: function componentDidMount() {
|
|
101
101
|
document.body.id = 'body'; // 解决 antd tabs 样式问题
|
|
102
102
|
}
|
|
103
|
+
}, {
|
|
104
|
+
key: "componentDidUpdate",
|
|
105
|
+
value: function componentDidUpdate(prevProps) {
|
|
106
|
+
if (prevProps.activeKey !== this.props.activeKey) {
|
|
107
|
+
this.setState({
|
|
108
|
+
activeKey: this.props.activeKey
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
103
112
|
}, {
|
|
104
113
|
key: "render",
|
|
105
114
|
value: function render() {
|