@pisell/materials 3.0.62 → 6.0.2
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 +19 -2
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +26 -26
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -23
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/browserSelect/index.d.ts +21 -0
- package/es/components/browserSelect/index.js +58 -0
- package/es/components/browserSelect/index.less +64 -0
- package/es/components/checkbox/index.js +4 -4
- package/es/components/colorPicker/index.d.ts +4 -0
- package/es/components/colorPicker/index.js +6 -0
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +67 -0
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceForm/formItem.js +58 -0
- package/es/components/dataSourceComponents/dataSourceForm/group/index.d.ts +20 -0
- package/es/components/dataSourceComponents/dataSourceForm/group/index.js +65 -0
- package/es/components/dataSourceComponents/dataSourceForm/group/index.less +42 -0
- package/es/components/dataSourceComponents/dataSourceForm/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceForm/index.js +25 -0
- package/es/components/dataSourceComponents/dataSourceForm/index.less +24 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +11 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.js +7 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +26 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/hooks/useFormSetting.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/hooks/useFormSetting.js +11 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/hooks/useJsonPrefixPath.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/hooks/useJsonPrefixPath.js +7 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperContext.d.ts +6 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperContext.js +6 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +42 -0
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +148 -0
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +254 -0
- package/es/components/dataSourceComponents/dataSourceForm/style.less +23 -0
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +38 -0
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +228 -0
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.less +4 -0
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +18 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +50 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +360 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +4 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +4 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +15 -0
- package/es/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
- package/es/components/dataSourceComponents/dataSourceShow/utils.js +82 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +4 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +104 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +27 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +169 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.less +4 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +145 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.d.ts +11 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +58 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +6 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +17 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.d.ts +2 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +49 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +39 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +100 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +44 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +173 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/usePagination.d.ts +16 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/usePagination.js +14 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +78 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +261 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +80 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.js +13 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.less +5 -0
- package/es/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingContext.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingContext.js +4 -0
- package/es/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingProvider.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingProvider.js +20 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +64 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.js +1 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +23 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +4 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.js +23 -0
- package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.d.ts +8 -0
- package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +24 -0
- package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +7 -0
- package/es/components/dataSourceComponents/fields/Checkbox/WithMode.js +7 -0
- package/es/components/dataSourceComponents/fields/Checkbox/index.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Checkbox/index.js +18 -0
- package/es/components/dataSourceComponents/fields/Checkbox/type.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/Checkbox/type.js +1 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.js +11 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/WithMode.js +23 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/index.js +4 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/type.js +1 -0
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +14 -0
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/DatePicker/WithMode.d.ts +4 -0
- package/es/components/{productCard/components/MultiDay/utils.js → dataSourceComponents/fields/DatePicker/WithMode.js} +9 -46
- package/es/components/dataSourceComponents/fields/DatePicker/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/DatePicker/index.js +10 -0
- package/es/components/dataSourceComponents/fields/DatePicker/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/DatePicker/type.js +1 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +14 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.js +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input/ReadPretty.js +13 -0
- package/es/components/dataSourceComponents/fields/Input/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Input/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/Input/index.d.ts +18 -0
- package/es/components/dataSourceComponents/fields/Input/index.js +16 -0
- package/es/components/dataSourceComponents/fields/Input/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +13 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/WithMode.js +17 -0
- package/es/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Email/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +14 -0
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.less +3 -0
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.js +45 -0
- package/es/components/dataSourceComponents/fields/Input.Json/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Json/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Json/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Json/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.js +23 -0
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Input.Password/WithMode.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Password/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Password/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Password/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Password/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Password/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +28 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +11 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +132 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +59 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.js +13 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/WithMode.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +16 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Input.Url/WithMode.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Url/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Url/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Url/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Url/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Url/type.js +1 -0
- package/es/components/dataSourceComponents/fields/InputNumber/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/InputNumber/ReadPretty.js +33 -0
- package/es/components/dataSourceComponents/fields/InputNumber/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/InputNumber/WithMode.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/InputNumber/WithMode.js +36 -0
- package/es/components/dataSourceComponents/fields/InputNumber/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/InputNumber/index.js +11 -0
- package/es/components/dataSourceComponents/fields/InputNumber/type.d.ts +7 -0
- package/es/components/dataSourceComponents/fields/InputNumber/type.js +1 -0
- package/es/components/dataSourceComponents/fields/InputNumber/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/InputNumber/utils.js +41 -0
- package/es/components/dataSourceComponents/fields/Radio/ReadPretty.d.ts +7 -0
- package/es/components/dataSourceComponents/fields/Radio/ReadPretty.js +15 -0
- package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +7 -0
- package/es/components/dataSourceComponents/fields/Radio/WithMode.js +7 -0
- package/es/components/dataSourceComponents/fields/Radio/index.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Radio/index.js +14 -0
- package/es/components/dataSourceComponents/fields/Radio/type.d.ts +8 -0
- package/es/components/dataSourceComponents/fields/Radio/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Select/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Select/ReadPretty.js +10 -0
- package/es/components/dataSourceComponents/fields/Select/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Select/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +10 -0
- package/es/components/dataSourceComponents/fields/Select/index.js +12 -0
- package/es/components/dataSourceComponents/fields/Select/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Select/type.js +1 -0
- package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.js +13 -0
- package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/TimePicker/WithMode.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/TimePicker/WithMode.js +109 -0
- package/es/components/dataSourceComponents/fields/TimePicker/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/TimePicker/index.js +10 -0
- package/es/components/dataSourceComponents/fields/TimePicker/style.less +86 -0
- package/es/components/dataSourceComponents/fields/TimePicker/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/TimePicker/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.js +111 -0
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.js +13 -0
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Translation/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Translation/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/Translation/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Translation/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Translation/index.less +58 -0
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +15 -0
- package/es/components/dataSourceComponents/fields/Translation/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +542 -0
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.js +44 -0
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Upload/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Upload/WithMode.js +45 -0
- package/es/components/dataSourceComponents/fields/Upload/constants.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/Upload/constants.js +9 -0
- package/es/components/dataSourceComponents/fields/Upload/fallback.png +0 -0
- package/es/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Upload/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Upload/index.less +82 -0
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +17 -0
- package/es/components/dataSourceComponents/fields/Upload/serve.js +115 -0
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +27 -0
- package/es/components/dataSourceComponents/fields/Upload/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Upload/types.d.ts +48 -0
- package/es/components/dataSourceComponents/fields/Upload/types.js +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +16 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.js +262 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +68 -0
- package/es/components/dataSourceComponents/fields/index.js +38 -0
- package/es/components/dataSourceComponents/fields/type.d.ts +18 -0
- package/es/components/dataSourceComponents/fields/type.js +1 -0
- package/es/components/dataSourceComponents/fields/utils.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/utils.js +111 -0
- package/es/components/dataSourceComponents/hooks/useActions.d.ts +17 -0
- package/es/components/dataSourceComponents/hooks/useActions.js +356 -0
- package/es/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
- package/es/components/dataSourceComponents/hooks/useComponentId.js +9 -0
- package/es/components/dataSourceComponents/hooks/useCtxActions.d.ts +8 -0
- package/es/components/dataSourceComponents/hooks/useCtxActions.js +14 -0
- package/es/components/dataSourceComponents/hooks/useDataSource.d.ts +5 -0
- package/es/components/dataSourceComponents/hooks/useDataSource.js +11 -0
- package/es/components/dataSourceComponents/hooks/useParseActionsVariable.d.ts +6 -0
- package/es/components/dataSourceComponents/hooks/useParseActionsVariable.js +61 -0
- package/es/components/dataSourceComponents/hooks/useValueMap.d.ts +8 -0
- package/es/components/dataSourceComponents/hooks/useValueMap.js +22 -0
- package/es/components/dataSourceComponents/hooks/useVariables.d.ts +2 -0
- package/es/components/dataSourceComponents/hooks/useVariables.js +6 -0
- package/es/components/dataSourceComponents/provider/actions/ActionsContext.d.ts +6 -0
- package/es/components/dataSourceComponents/provider/actions/ActionsContext.js +3 -0
- package/es/components/dataSourceComponents/provider/actions/ActionsProvider.d.ts +9 -0
- package/es/components/{productCard/components/Sales/index.js → dataSourceComponents/provider/actions/ActionsProvider.js} +19 -30
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +104 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.js +11 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +8 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +79 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +12 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.js +10 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +103 -0
- package/es/components/dataSourceComponents/provider/variables/utils.d.ts +12 -0
- package/es/components/dataSourceComponents/provider/variables/utils.js +28 -0
- package/es/components/dataSourceComponents/utils/index.d.ts +0 -0
- package/es/components/dataSourceComponents/utils/index.js +0 -0
- package/es/components/date-picker/constants.d.ts +39 -0
- package/es/components/date-picker/constants.js +76 -0
- package/es/components/date-picker/datePickerCpt.d.ts +9 -0
- package/es/components/date-picker/datePickerCpt.js +374 -0
- package/es/components/date-picker/hooks/useMediaQuery.d.ts +2 -0
- package/es/components/date-picker/hooks/useMediaQuery.js +28 -0
- package/es/components/date-picker/index.less +1880 -0
- package/es/components/filter/components/Dropdown/index.d.ts +1 -0
- package/es/components/filter/components/Dropdown/index.js +6 -2
- package/es/components/filter/components/FilterButton/index.js +5 -3
- package/es/components/filter/components/FilterButton/types.d.ts +2 -0
- package/es/components/form/index.d.ts +2 -8
- package/es/components/form/index.js +3 -1
- package/es/components/iconfont/index.js +1 -1
- package/es/components/page/index.js +5 -2
- package/es/components/pisellUpload/index.d.ts +11 -0
- package/es/components/pisellUpload/index.js +33 -0
- package/es/components/pisellUpload/index.less +15 -0
- package/es/components/radio/index.js +4 -4
- package/es/components/select/index.d.ts +8 -3
- package/es/components/select/index.js +82 -17
- package/es/components/select/index.less +19 -0
- package/es/components/sort/index.js +1 -1
- package/es/components/table/Actions/index.js +16 -7
- package/es/components/table/Gallery/index.d.ts +3 -3
- package/es/components/table/Gallery/index.js +28 -10
- package/es/components/table/Gallery/index.less +1 -0
- package/es/components/table/Header/index.d.ts +10 -3
- package/es/components/table/Header/index.js +37 -11
- package/es/components/table/Header/index.less +10 -2
- package/es/components/table/Table/index.js +17 -6
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/Table/utils.js +4 -0
- package/es/components/table/Tabs/index.d.ts +14 -0
- package/es/components/{productCard/components/Packages → table/Tabs}/index.js +35 -23
- package/es/components/table/hooks/useTransDataSource.js +0 -1
- package/es/components/table/hooks/useTriggerValuesChange.js +3 -0
- package/es/components/table/index.js +21 -4
- package/es/components/table/model.d.ts +1 -0
- package/es/components/table/model.js +7 -1
- package/es/components/table/types.d.ts +14 -2
- package/es/components/table/utils.d.ts +5 -6
- package/es/components/table/utils.js +7 -1
- package/es/components/typography/index.d.ts +2 -2
- package/es/components/typography/index.js +4 -3
- package/es/hooks/useSetRequest.d.ts +2 -0
- package/es/hooks/useSetRequest.js +8 -0
- package/es/hooks/useTranslationOriginal.d.ts +2 -0
- package/es/hooks/useTranslationOriginal.js +10 -0
- package/es/index.d.ts +22 -3
- package/es/index.js +24 -6
- package/es/locales/en-US.d.ts +48 -0
- package/es/locales/en-US.js +71 -1
- package/es/locales/zh-CN.d.ts +48 -0
- package/es/locales/zh-CN.js +70 -1
- package/es/locales/zh-TW.d.ts +48 -0
- package/es/locales/zh-TW.js +71 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +2 -1
- package/es/utils/mergeWith.d.ts +1 -0
- package/es/utils/mergeWith.js +31 -0
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/browserSelect/index.d.ts +21 -0
- package/lib/components/{productCard/components/Note → browserSelect}/index.js +30 -21
- package/lib/components/browserSelect/index.less +64 -0
- package/lib/components/checkbox/index.js +4 -4
- package/lib/components/colorPicker/index.d.ts +4 -0
- package/lib/components/colorPicker/index.js +40 -0
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +97 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +63 -0
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.d.ts +20 -0
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.js +87 -0
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.less +42 -0
- package/lib/components/dataSourceComponents/dataSourceForm/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceForm/index.js +55 -0
- package/lib/components/dataSourceComponents/dataSourceForm/index.less +24 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +11 -0
- package/lib/components/{productCard/status.js → dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.js} +13 -46
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +55 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/hooks/useFormSetting.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/hooks/useFormSetting.js +41 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/hooks/useJsonPrefixPath.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/hooks/useJsonPrefixPath.js +41 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperContext.d.ts +6 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperContext.js +30 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +52 -0
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +148 -0
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +142 -0
- package/lib/components/dataSourceComponents/dataSourceForm/style.less +23 -0
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +38 -0
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +165 -0
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.less +4 -0
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +18 -0
- package/lib/components/dataSourceComponents/dataSourceForm/type.js +17 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +50 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +364 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +38 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +38 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +44 -0
- package/lib/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
- package/lib/components/dataSourceComponents/dataSourceShow/utils.js +95 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +137 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +27 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +182 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.less +4 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +188 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.d.ts +11 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +90 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +6 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +50 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.d.ts +2 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +60 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +39 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +107 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +44 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +173 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/usePagination.d.ts +16 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/usePagination.js +37 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +78 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +254 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +83 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +43 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.less +5 -0
- package/lib/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingContext.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingContext.js +33 -0
- package/lib/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingProvider.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingProvider.js +52 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +64 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.js +17 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +51 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.js +61 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.d.ts +8 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +59 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.less +0 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +7 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.js +41 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/index.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/index.js +46 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/type.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +5 -0
- package/lib/components/{productCard/components/Divider/index.js → dataSourceComponents/fields/ColorPicker/ReadPretty.js} +13 -15
- package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.less +0 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/WithMode.js +65 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
- package/lib/components/{productCard/components/Time/components/Like/index.js → dataSourceComponents/fields/DatePicker/ReadPretty.js} +16 -29
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/WithMode.js +50 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/index.js +44 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +51 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +42 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.js +39 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input/ReadPretty.js +50 -0
- package/lib/components/dataSourceComponents/fields/Input/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Input/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input/index.d.ts +18 -0
- package/lib/components/dataSourceComponents/fields/Input/index.js +50 -0
- package/lib/components/dataSourceComponents/fields/Input/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +50 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.js +57 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +5 -0
- package/lib/components/{productCard/components/Packages/index.js → dataSourceComponents/fields/Input.Json/ReadPretty.js} +14 -24
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.less +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.js +67 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.js +50 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/WithMode.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +58 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +11 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +143 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +55 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.js +50 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/WithMode.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +5 -0
- package/lib/components/{productCard/components/Action/index.js → dataSourceComponents/fields/Input.Url/ReadPretty.js} +19 -21
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/WithMode.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/ReadPretty.js +66 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/WithMode.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/WithMode.js +73 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/index.js +45 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/type.d.ts +7 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/utils.js +63 -0
- package/lib/components/dataSourceComponents/fields/Radio/ReadPretty.d.ts +7 -0
- package/lib/components/dataSourceComponents/fields/Radio/ReadPretty.js +47 -0
- package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +7 -0
- package/lib/components/dataSourceComponents/fields/Radio/WithMode.js +41 -0
- package/lib/components/dataSourceComponents/fields/Radio/index.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Radio/index.js +42 -0
- package/lib/components/dataSourceComponents/fields/Radio/type.d.ts +8 -0
- package/lib/components/dataSourceComponents/fields/Radio/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Select/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Select/ReadPretty.js +42 -0
- package/lib/components/dataSourceComponents/fields/Select/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Select/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +10 -0
- package/lib/components/dataSourceComponents/fields/Select/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/Select/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Select/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.js +50 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.js +137 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/index.js +44 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/style.less +86 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.js +115 -0
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.js +50 -0
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Translation/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Translation/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Translation/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Translation/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Translation/index.less +58 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +15 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +485 -0
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.js +77 -0
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Upload/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Upload/WithMode.js +79 -0
- package/lib/components/dataSourceComponents/fields/Upload/constants.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/Upload/constants.js +47 -0
- package/lib/components/dataSourceComponents/fields/Upload/fallback.png +0 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.less +82 -0
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +17 -0
- package/lib/components/dataSourceComponents/fields/Upload/serve.js +96 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +27 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Upload/types.d.ts +48 -0
- package/lib/components/{productCard → dataSourceComponents/fields/Upload}/types.js +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +16 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.js +253 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +68 -0
- package/lib/components/dataSourceComponents/fields/index.js +75 -0
- package/lib/components/dataSourceComponents/fields/type.d.ts +18 -0
- package/lib/components/dataSourceComponents/fields/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/utils.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/utils.js +134 -0
- package/lib/components/dataSourceComponents/hooks/useActions.d.ts +17 -0
- package/lib/components/dataSourceComponents/hooks/useActions.js +216 -0
- package/lib/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
- package/lib/components/dataSourceComponents/hooks/useComponentId.js +32 -0
- package/lib/components/dataSourceComponents/hooks/useCtxActions.d.ts +8 -0
- package/lib/components/dataSourceComponents/hooks/useCtxActions.js +41 -0
- package/lib/components/dataSourceComponents/hooks/useDataSource.d.ts +5 -0
- package/lib/components/dataSourceComponents/hooks/useDataSource.js +41 -0
- package/lib/components/dataSourceComponents/hooks/useParseActionsVariable.d.ts +6 -0
- package/lib/components/dataSourceComponents/hooks/useParseActionsVariable.js +73 -0
- package/lib/components/dataSourceComponents/hooks/useValueMap.d.ts +8 -0
- package/lib/components/dataSourceComponents/hooks/useValueMap.js +39 -0
- package/lib/components/dataSourceComponents/hooks/useVariables.d.ts +2 -0
- package/lib/components/dataSourceComponents/hooks/useVariables.js +40 -0
- package/lib/components/dataSourceComponents/provider/actions/ActionsContext.d.ts +6 -0
- package/lib/components/dataSourceComponents/provider/actions/ActionsContext.js +27 -0
- package/lib/components/dataSourceComponents/provider/actions/ActionsProvider.d.ts +9 -0
- package/lib/components/dataSourceComponents/provider/actions/ActionsProvider.js +46 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +104 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.js +40 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +8 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +108 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +12 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.js +43 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +134 -0
- package/lib/components/dataSourceComponents/provider/variables/utils.d.ts +12 -0
- package/lib/components/{productCard/components/Packages → dataSourceComponents/provider/variables}/utils.js +34 -17
- package/lib/components/dataSourceComponents/utils/index.d.ts +0 -0
- package/lib/components/dataSourceComponents/utils/index.js +0 -0
- package/lib/components/date-picker/constants.d.ts +39 -0
- package/lib/components/date-picker/constants.js +78 -0
- package/lib/components/date-picker/datePickerCpt.d.ts +9 -0
- package/lib/components/date-picker/datePickerCpt.js +406 -0
- package/lib/components/date-picker/hooks/useMediaQuery.d.ts +2 -0
- package/lib/components/date-picker/hooks/useMediaQuery.js +43 -0
- package/lib/components/date-picker/index.less +1880 -0
- package/lib/components/filter/components/Dropdown/index.d.ts +1 -0
- package/lib/components/filter/components/Dropdown/index.js +6 -2
- package/lib/components/filter/components/FilterButton/index.js +5 -3
- package/lib/components/filter/components/FilterButton/types.d.ts +2 -0
- package/lib/components/form/index.d.ts +2 -8
- package/lib/components/form/index.js +3 -2
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/page/index.js +9 -3
- package/lib/components/pisellUpload/index.d.ts +11 -0
- package/lib/components/pisellUpload/index.js +51 -0
- package/lib/components/pisellUpload/index.less +15 -0
- package/lib/components/radio/index.js +4 -4
- package/lib/components/select/index.d.ts +8 -3
- package/lib/components/select/index.js +90 -14
- package/lib/components/select/index.less +19 -0
- package/lib/components/sort/index.js +1 -1
- package/lib/components/table/Actions/index.js +18 -9
- package/lib/components/table/Gallery/index.d.ts +3 -3
- package/lib/components/table/Gallery/index.js +17 -0
- package/lib/components/table/Gallery/index.less +1 -0
- package/lib/components/table/Header/index.d.ts +10 -3
- package/lib/components/table/Header/index.js +29 -4
- package/lib/components/table/Header/index.less +10 -2
- package/lib/components/table/Table/index.js +17 -6
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/Table/utils.js +4 -0
- package/lib/components/table/Tabs/index.d.ts +14 -0
- package/lib/components/table/Tabs/index.js +71 -0
- package/lib/components/table/hooks/useTransDataSource.js +0 -1
- package/lib/components/table/hooks/useTriggerValuesChange.js +3 -0
- package/lib/components/table/index.js +22 -3
- package/lib/components/table/model.d.ts +1 -0
- package/lib/components/table/model.js +5 -1
- package/lib/components/table/types.d.ts +14 -2
- package/lib/components/table/utils.d.ts +5 -6
- package/lib/components/table/utils.js +7 -1
- package/lib/components/typography/index.d.ts +2 -2
- package/lib/components/typography/index.js +4 -3
- package/lib/hooks/useSetRequest.d.ts +2 -0
- package/lib/hooks/useSetRequest.js +42 -0
- package/lib/hooks/useTranslationOriginal.d.ts +2 -0
- package/lib/hooks/useTranslationOriginal.js +42 -0
- package/lib/index.d.ts +22 -3
- package/lib/index.js +95 -38
- package/lib/locales/en-US.d.ts +48 -0
- package/lib/locales/en-US.js +55 -1
- package/lib/locales/zh-CN.d.ts +48 -0
- package/lib/locales/zh-CN.js +54 -1
- package/lib/locales/zh-TW.d.ts +48 -0
- package/lib/locales/zh-TW.js +55 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +4 -1
- package/lib/utils/mergeWith.d.ts +1 -0
- package/lib/utils/mergeWith.js +56 -0
- package/lowcode/_utils/defaultSchema.ts +1480 -0
- package/lowcode/_utils/type.ts +5 -0
- package/lowcode/_utils/utils.ts +10 -0
- package/lowcode/button/meta.ts +2 -3
- package/lowcode/checkbox/meta.ts +1 -1
- package/lowcode/checkbox/snippets.ts +2 -2
- package/lowcode/checkbox.group/meta.ts +1 -1
- package/lowcode/collapse/meta.ts +1 -85
- package/lowcode/color-picker/__screenshots__/input-1.png +0 -0
- package/lowcode/color-picker/meta.ts +298 -0
- package/lowcode/color-picker/snippets.ts +10 -0
- package/lowcode/data-source-form/__screenshots__/add.png +0 -0
- package/lowcode/data-source-form/__screenshots__/detail.png +0 -0
- package/lowcode/data-source-form/__screenshots__/form-1.png +0 -0
- package/lowcode/data-source-form/constants.ts +96 -0
- package/lowcode/data-source-form/meta.ts +784 -0
- package/lowcode/data-source-form/snippets.ts +138 -0
- package/lowcode/data-source-form/utils.ts +546 -0
- package/lowcode/data-source-image/meta.ts +74 -0
- package/lowcode/data-source-image/snippets.ts +14 -0
- package/lowcode/data-source-qrcode/meta.ts +158 -0
- package/lowcode/data-source-qrcode/snippets.ts +20 -0
- package/lowcode/data-source-table/__screenshots__/table-1.png +0 -0
- package/lowcode/data-source-table/meta.ts +5050 -0
- package/lowcode/data-source-table/snippets.ts +90 -0
- package/lowcode/data-source-table/utils.tsx +484 -0
- package/lowcode/data-source-typography/meta.ts +54 -0
- package/lowcode/data-source-typography.text/meta.ts +212 -0
- package/lowcode/data-source-typography.text/snippets.ts +12 -0
- package/lowcode/data-source-wrapper/meta.ts +243 -0
- package/lowcode/data-source-wrapper/snippets.ts +11 -0
- package/lowcode/data-source-wrapper/utils.ts +45 -0
- package/lowcode/date-picker.old-range-picker/meta.ts +1 -1
- package/lowcode/date-picker.range-picker/meta.ts +0 -20
- package/lowcode/form/meta.ts +24 -22
- package/lowcode/form/snippets.ts +2 -481
- package/lowcode/form-group/__screenshots__/group.png +0 -0
- package/lowcode/form-group/meta.ts +345 -0
- package/lowcode/form-group/snippets.ts +18 -0
- package/lowcode/form-item-checkbox/meta.ts +108 -0
- package/lowcode/form-item-checkbox/snippets.ts +41 -0
- package/lowcode/form-item-checkbox.group/__screenshots__/checkbox-group-1.png +0 -0
- package/lowcode/form-item-checkbox.group/meta.ts +184 -0
- package/lowcode/form-item-color-picker/__screenshots__/input-1.png +0 -0
- package/lowcode/form-item-color-picker/meta.ts +314 -0
- package/lowcode/form-item-color-picker/snippets.ts +11 -0
- package/lowcode/form-item-date-picker/__screenshots__/date-picker-1.png +0 -0
- package/lowcode/form-item-date-picker/__screenshots__/date-picker-2.png +0 -0
- package/lowcode/form-item-date-picker/__screenshots__/date-picker-3.png +0 -0
- package/lowcode/form-item-date-picker/__screenshots__/date-picker-4.png +0 -0
- package/lowcode/form-item-date-picker/__screenshots__/date-picker-5.png +0 -0
- package/lowcode/form-item-date-picker/meta.ts +435 -0
- package/lowcode/form-item-date-picker/snippets.ts +53 -0
- package/lowcode/form-item-input/__screenshots__/input-1.png +0 -0
- package/lowcode/form-item-input/meta.ts +249 -0
- package/lowcode/form-item-input/snippets.ts +14 -0
- package/lowcode/form-item-input-number/__screenshots__/input-number-1.png +0 -0
- package/lowcode/form-item-input-number/meta.ts +411 -0
- package/lowcode/form-item-input-number/snippets.ts +27 -0
- package/lowcode/form-item-input.email/__screenshots__/email.png +0 -0
- package/lowcode/form-item-input.email/meta.ts +284 -0
- package/lowcode/form-item-input.email/snippets.ts +37 -0
- package/lowcode/form-item-input.json/meta.ts +213 -0
- package/lowcode/form-item-input.json/snippets.ts +31 -0
- package/lowcode/form-item-input.password/__screenshots__/input-password-1.png +0 -0
- package/lowcode/form-item-input.password/meta.ts +230 -0
- package/lowcode/form-item-input.password/snippets.ts +14 -0
- package/lowcode/form-item-input.phone/__screenshots__/phone.png +0 -0
- package/lowcode/form-item-input.phone/meta.ts +311 -0
- package/lowcode/form-item-input.phone/snippets.ts +18 -0
- package/lowcode/form-item-input.text-area/__screenshots__/input-text-area-1.png +0 -0
- package/lowcode/form-item-input.text-area/meta.ts +422 -0
- package/lowcode/form-item-input.text-area/snippets.ts +14 -0
- package/lowcode/form-item-input.url/__screenshots__/URL.png +0 -0
- package/lowcode/form-item-input.url/meta.ts +284 -0
- package/lowcode/form-item-input.url/snippets.ts +17 -0
- package/lowcode/form-item-radio/__screenshots__/radio-1.png +0 -0
- package/lowcode/form-item-radio/meta.ts +72 -0
- package/lowcode/form-item-radio/snippets.ts +40 -0
- package/lowcode/form-item-radio.group/__screenshots__/radio-group-1.png +0 -0
- package/lowcode/form-item-radio.group/meta.ts +239 -0
- package/lowcode/form-item-select/__screenshots__/select-1.png +0 -0
- package/lowcode/form-item-select/meta.ts +538 -0
- package/lowcode/form-item-select/snippets.ts +59 -0
- package/lowcode/form-item-time-picker/__screenshots__/time-picker-1.png +0 -0
- package/lowcode/form-item-time-picker/meta.ts +304 -0
- package/lowcode/form-item-time-picker/snippets.ts +13 -0
- package/lowcode/form-item-translation/meta.ts +249 -0
- package/lowcode/form-item-translation/snippets.ts +13 -0
- package/lowcode/form-item-upload/__screenshots__/upload.png +0 -0
- package/lowcode/form-item-upload/meta.ts +432 -0
- package/lowcode/form-item-upload/snippets.ts +12 -0
- package/lowcode/form-item-upload/utils.ts +230 -0
- package/lowcode/form.item/meta.ts +104 -25
- package/lowcode/input.text-area/meta.ts +1 -1
- package/lowcode/input.text-area/snippets.ts +1 -5
- package/lowcode/json-wrapper/meta.ts +65 -0
- package/lowcode/json-wrapper/snippets.ts +16 -0
- package/lowcode/pisell-adjust-price/meta.ts +1 -1
- package/lowcode/pisell-card/meta.ts +1 -1
- package/lowcode/pisell-countdown/snippets.ts +1 -1
- package/lowcode/pisell-empty/meta.ts +1 -1
- package/lowcode/pisell-loading/snippets.ts +1 -1
- package/lowcode/pisell-scan/snippets.ts +1 -1
- package/lowcode/pisell-text.amount/meta.ts +1 -1
- package/lowcode/pisell-tooltip/snippets.ts +1 -1
- package/lowcode/pisell-upload/__screenshots__/upload-1.png +0 -0
- package/lowcode/pisell-upload/meta.ts +508 -0
- package/lowcode/pisell-upload/snippets.ts +20 -0
- package/lowcode/pisell-wallet-pass-card/meta.ts +1 -1
- package/lowcode/segmented/meta.ts +1 -1
- package/lowcode/select/meta.ts +17 -0
- package/lowcode/select/snippets.ts +1 -0
- package/lowcode/sort/meta.ts +1 -1
- package/lowcode/submit-button/meta.ts +1079 -0
- package/lowcode/submit-button/snippets.ts +22 -0
- package/lowcode/table/snippets.ts +6 -0
- package/lowcode/test/meta.ts +1 -2
- package/package.json +6 -4
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
- package/es/components/cardPro/index.d.ts +0 -4
- package/es/components/cardPro/index.js +0 -69
- package/es/components/cardPro/index.less +0 -55
- package/es/components/collapse/index.d.ts +0 -15
- package/es/components/collapse/index.js +0 -103
- package/es/components/productCard/components/Action/index.d.ts +0 -4
- package/es/components/productCard/components/Action/index.js +0 -21
- package/es/components/productCard/components/Action/index.less +0 -14
- package/es/components/productCard/components/AmountFooter/index.d.ts +0 -4
- package/es/components/productCard/components/AmountFooter/index.js +0 -58
- package/es/components/productCard/components/AmountFooter/index.less +0 -50
- package/es/components/productCard/components/Divider/index.d.ts +0 -4
- package/es/components/productCard/components/Divider/index.js +0 -11
- package/es/components/productCard/components/Divider/index.less +0 -13
- package/es/components/productCard/components/Header/index.d.ts +0 -4
- package/es/components/productCard/components/Header/index.js +0 -78
- package/es/components/productCard/components/Header/index.less +0 -64
- package/es/components/productCard/components/MultiDay/index.d.ts +0 -4
- package/es/components/productCard/components/MultiDay/index.js +0 -79
- package/es/components/productCard/components/MultiDay/index.less +0 -34
- package/es/components/productCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/components/Note/index.d.ts +0 -4
- package/es/components/productCard/components/Note/index.js +0 -25
- package/es/components/productCard/components/Note/index.less +0 -20
- package/es/components/productCard/components/Packages/components/collapsibleList/index.d.ts +0 -10
- package/es/components/productCard/components/Packages/components/collapsibleList/index.js +0 -96
- package/es/components/productCard/components/Packages/components/collapsibleList/index.less +0 -53
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -2
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +0 -39
- package/es/components/productCard/components/Packages/components/options/index.d.ts +0 -4
- package/es/components/productCard/components/Packages/components/options/index.js +0 -23
- package/es/components/productCard/components/Packages/components/options/index.less +0 -29
- package/es/components/productCard/components/Packages/index.d.ts +0 -4
- package/es/components/productCard/components/Packages/index.less +0 -17
- package/es/components/productCard/components/Packages/utils.d.ts +0 -20
- package/es/components/productCard/components/Packages/utils.js +0 -40
- package/es/components/productCard/components/Sales/index.d.ts +0 -4
- package/es/components/productCard/components/Sales/index.less +0 -18
- package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -9
- package/es/components/productCard/components/Time/components/Like/index.js +0 -26
- package/es/components/productCard/components/Time/components/Like/index.less +0 -6
- package/es/components/productCard/components/Time/components/Like/like-heart.png +0 -0
- package/es/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
- package/es/components/productCard/components/Time/index.d.ts +0 -4
- package/es/components/productCard/components/Time/index.js +0 -46
- package/es/components/productCard/components/Time/index.less +0 -35
- package/es/components/productCard/hooks/useOpenNote.d.ts +0 -3
- package/es/components/productCard/hooks/useOpenNote.js +0 -66
- package/es/components/productCard/index.d.ts +0 -5
- package/es/components/productCard/index.js +0 -145
- package/es/components/productCard/index.less +0 -54
- package/es/components/productCard/locales.d.ts +0 -42
- package/es/components/productCard/locales.js +0 -47
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/status.js +0 -65
- package/es/components/productCard/types.d.ts +0 -76
- package/es/components/productCard/utils.d.ts +0 -31
- package/es/components/productCard/utils.js +0 -72
- package/lib/components/cardPro/index.d.ts +0 -4
- package/lib/components/cardPro/index.js +0 -101
- package/lib/components/cardPro/index.less +0 -55
- package/lib/components/collapse/index.d.ts +0 -15
- package/lib/components/collapse/index.js +0 -109
- package/lib/components/productCard/components/Action/index.d.ts +0 -4
- package/lib/components/productCard/components/Action/index.less +0 -14
- package/lib/components/productCard/components/AmountFooter/index.d.ts +0 -4
- package/lib/components/productCard/components/AmountFooter/index.js +0 -85
- package/lib/components/productCard/components/AmountFooter/index.less +0 -50
- package/lib/components/productCard/components/Divider/index.d.ts +0 -4
- package/lib/components/productCard/components/Divider/index.less +0 -13
- package/lib/components/productCard/components/Header/index.d.ts +0 -4
- package/lib/components/productCard/components/Header/index.js +0 -90
- package/lib/components/productCard/components/Header/index.less +0 -64
- package/lib/components/productCard/components/MultiDay/index.d.ts +0 -4
- package/lib/components/productCard/components/MultiDay/index.js +0 -72
- package/lib/components/productCard/components/MultiDay/index.less +0 -34
- package/lib/components/productCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/components/MultiDay/utils.js +0 -77
- package/lib/components/productCard/components/Note/index.d.ts +0 -4
- package/lib/components/productCard/components/Note/index.less +0 -20
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.d.ts +0 -10
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.js +0 -93
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.less +0 -53
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -2
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +0 -53
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +0 -4
- package/lib/components/productCard/components/Packages/components/options/index.js +0 -73
- package/lib/components/productCard/components/Packages/components/options/index.less +0 -29
- package/lib/components/productCard/components/Packages/index.d.ts +0 -4
- package/lib/components/productCard/components/Packages/index.less +0 -17
- package/lib/components/productCard/components/Packages/utils.d.ts +0 -20
- package/lib/components/productCard/components/Sales/index.d.ts +0 -4
- package/lib/components/productCard/components/Sales/index.js +0 -60
- package/lib/components/productCard/components/Sales/index.less +0 -18
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -9
- package/lib/components/productCard/components/Time/components/Like/index.less +0 -6
- package/lib/components/productCard/components/Time/components/Like/like-heart.png +0 -0
- package/lib/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
- package/lib/components/productCard/components/Time/index.d.ts +0 -4
- package/lib/components/productCard/components/Time/index.js +0 -67
- package/lib/components/productCard/components/Time/index.less +0 -35
- package/lib/components/productCard/hooks/useOpenNote.d.ts +0 -3
- package/lib/components/productCard/hooks/useOpenNote.js +0 -84
- package/lib/components/productCard/index.d.ts +0 -5
- package/lib/components/productCard/index.js +0 -172
- package/lib/components/productCard/index.less +0 -54
- package/lib/components/productCard/locales.d.ts +0 -42
- package/lib/components/productCard/locales.js +0 -65
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -76
- package/lib/components/productCard/utils.d.ts +0 -31
- package/lib/components/productCard/utils.js +0 -85
- package/lowcode/card-pro/meta.ts +0 -338
- package/lowcode/card-pro/snippe.ts +0 -39
- package/lowcode/product-card/meta.ts +0 -92
- package/lowcode/product-card/snippets.ts +0 -23
- /package/es/components/{productCard/types.js → dataSourceComponents/dataSourceForm/type.js} +0 -0
- /package/es/components/{collapse/index.less → dataSourceComponents/fields/Checkbox/ReadPretty.less} +0 -0
- /package/{lib/components/collapse/index.less → es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.less} +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Field } from '../../provider/dataSource/DataSourceContext';
|
|
2
|
+
export declare type ListResult = {
|
|
3
|
+
data: any[];
|
|
4
|
+
count: number;
|
|
5
|
+
page: number;
|
|
6
|
+
pageSize: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type UseFormatParams = {
|
|
9
|
+
dataSourceKey: string;
|
|
10
|
+
fields: Field[];
|
|
11
|
+
};
|
|
12
|
+
export declare type FormatListResultParams = {
|
|
13
|
+
list: any[];
|
|
14
|
+
count: number;
|
|
15
|
+
page: number;
|
|
16
|
+
size: number;
|
|
17
|
+
} | {
|
|
18
|
+
data: any[];
|
|
19
|
+
meta: {
|
|
20
|
+
count: number;
|
|
21
|
+
page: number;
|
|
22
|
+
pageSize: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare type FilterValue = {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
28
|
+
export declare type FilterOperator = '$includes' | '$dateAfter' | '$dateBefore' | '$eq' | '$in' | '$isTruly' | '$and';
|
|
29
|
+
export declare type SimpleFilterValue = {
|
|
30
|
+
[key in Exclude<FilterOperator, '$and'>]?: any;
|
|
31
|
+
};
|
|
32
|
+
export declare type AndFilterValue = {
|
|
33
|
+
$and: FilterCondition[];
|
|
34
|
+
};
|
|
35
|
+
export declare type FilterConditionValue = SimpleFilterValue | AndFilterValue;
|
|
36
|
+
export declare type FilterCondition = {
|
|
37
|
+
[key: string]: FilterConditionValue;
|
|
38
|
+
} | AndFilterValue;
|
|
39
|
+
declare const useFormat: ({ dataSourceKey, fields }: UseFormatParams) => {
|
|
40
|
+
formatListResult: (res: FormatListResultParams) => ListResult;
|
|
41
|
+
formatListParams: (params: any) => any;
|
|
42
|
+
formatCreateUpdateParams: (params: any) => any;
|
|
43
|
+
};
|
|
44
|
+
export default useFormat;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
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(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
9
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
|
+
import { useMemoizedFn } from 'ahooks';
|
|
14
|
+
import { formFieldFilterFuncMap } from "../../fields/utils";
|
|
15
|
+
import { isArr, isString } from '@pisell/utils';
|
|
16
|
+
import dayjs from 'dayjs';
|
|
17
|
+
// 转换过滤条件
|
|
18
|
+
var formatFilter = function formatFilter(filterValue, fields) {
|
|
19
|
+
var conditions = [];
|
|
20
|
+
if (!filterValue || !(fields !== null && fields !== void 0 && fields.length)) {
|
|
21
|
+
return JSON.stringify({});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 处理关键字搜索
|
|
25
|
+
if (filterValue._keywords) {
|
|
26
|
+
var keywordFields = fields.filter(function (item) {
|
|
27
|
+
return ['string', 'number', 'text'].includes(item.type);
|
|
28
|
+
}).map(function (item) {
|
|
29
|
+
return _defineProperty({}, item.name, {
|
|
30
|
+
$includes: filterValue._keywords
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
if (keywordFields.length > 0) {
|
|
34
|
+
conditions.push({
|
|
35
|
+
$or: keywordFields
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
var fieldsMap = fields.reduce(function (acc, field) {
|
|
40
|
+
if (field.name) {
|
|
41
|
+
acc[field.name] = field;
|
|
42
|
+
}
|
|
43
|
+
return acc;
|
|
44
|
+
}, {});
|
|
45
|
+
|
|
46
|
+
// 处理其他过滤条件
|
|
47
|
+
var normalConditions = [];
|
|
48
|
+
Object.entries(filterValue).forEach(function (_ref2) {
|
|
49
|
+
var _field$uiSchema;
|
|
50
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
51
|
+
key = _ref3[0],
|
|
52
|
+
value = _ref3[1];
|
|
53
|
+
if (key === '_keywords' || value === undefined || value === null || value === '' || isArr(value) && value.length === 0) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
var field = fieldsMap[key];
|
|
57
|
+
if (!(field !== null && field !== void 0 && (_field$uiSchema = field.uiSchema) !== null && _field$uiSchema !== void 0 && _field$uiSchema['x-component'])) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
var filterFunc = formFieldFilterFuncMap[field.uiSchema['x-component']];
|
|
61
|
+
if (!filterFunc) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
var condition = filterFunc(value, field);
|
|
65
|
+
if (condition) {
|
|
66
|
+
normalConditions.push(_defineProperty({}, key, condition));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
if (normalConditions.length > 0) {
|
|
70
|
+
conditions.push({
|
|
71
|
+
$and: normalConditions
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
var filterCondition = conditions.length ? {
|
|
75
|
+
$and: conditions
|
|
76
|
+
} : {};
|
|
77
|
+
return JSON.stringify(filterCondition);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// 转换排序条件
|
|
81
|
+
var formatSort = function formatSort(sortValue) {
|
|
82
|
+
if (!sortValue) return undefined;
|
|
83
|
+
var _sortValue$split = sortValue.split(':'),
|
|
84
|
+
_sortValue$split2 = _slicedToArray(_sortValue$split, 2),
|
|
85
|
+
field = _sortValue$split2[0],
|
|
86
|
+
order = _sortValue$split2[1];
|
|
87
|
+
var prefix = order === 'desc' ? '-' : '';
|
|
88
|
+
return ["".concat(prefix).concat(field)];
|
|
89
|
+
};
|
|
90
|
+
var formatCreateUpdateParamsUtils = function formatCreateUpdateParamsUtils(params, fields) {
|
|
91
|
+
if (!params || !(fields !== null && fields !== void 0 && fields.length)) {
|
|
92
|
+
return params;
|
|
93
|
+
}
|
|
94
|
+
var formattedParams = _objectSpread({}, params);
|
|
95
|
+
fields.forEach(function (field) {
|
|
96
|
+
var _field$uiSchema2;
|
|
97
|
+
var fieldName = field.name;
|
|
98
|
+
var value = params[fieldName];
|
|
99
|
+
if (((_field$uiSchema2 = field.uiSchema) === null || _field$uiSchema2 === void 0 ? void 0 : _field$uiSchema2['x-component']) === 'TimePicker' && value) {
|
|
100
|
+
// 处理dayjs对象
|
|
101
|
+
if (dayjs.isDayjs(value)) {
|
|
102
|
+
formattedParams[fieldName] = value.format('HH:mm:ss');
|
|
103
|
+
} else if (isString(value)) {
|
|
104
|
+
var _timeArr$, _timeArr$2, _timeArr$3;
|
|
105
|
+
var timeArr = value.split(':');
|
|
106
|
+
var hours = ((_timeArr$ = timeArr[0]) === null || _timeArr$ === void 0 ? void 0 : _timeArr$.padStart(2, '0')) || '00';
|
|
107
|
+
var minutes = ((_timeArr$2 = timeArr[1]) === null || _timeArr$2 === void 0 ? void 0 : _timeArr$2.padStart(2, '0')) || '00';
|
|
108
|
+
var seconds = ((_timeArr$3 = timeArr[2]) === null || _timeArr$3 === void 0 ? void 0 : _timeArr$3.padStart(2, '0')) || '00';
|
|
109
|
+
formattedParams[fieldName] = "".concat(hours, ":").concat(minutes, ":").concat(seconds);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
return formattedParams;
|
|
114
|
+
};
|
|
115
|
+
var customApiFormatFilter = function customApiFormatFilter(filter) {
|
|
116
|
+
return _objectSpread({}, filter);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// 数据格式化
|
|
120
|
+
var useFormat = function useFormat(_ref4) {
|
|
121
|
+
var dataSourceKey = _ref4.dataSourceKey,
|
|
122
|
+
fields = _ref4.fields;
|
|
123
|
+
// list接口请求 结果格式化
|
|
124
|
+
var formatListResult = useMemoizedFn(function (res) {
|
|
125
|
+
if (dataSourceKey === 'pisell2-api' && 'list' in res) {
|
|
126
|
+
return {
|
|
127
|
+
data: res.list,
|
|
128
|
+
count: res.count,
|
|
129
|
+
page: res.page,
|
|
130
|
+
pageSize: res.size
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
if ('meta' in res) {
|
|
134
|
+
return {
|
|
135
|
+
data: res.data,
|
|
136
|
+
count: res.meta.count,
|
|
137
|
+
page: res.meta.page,
|
|
138
|
+
pageSize: res.meta.pageSize
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
return res;
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// list接口请求 参数格式化
|
|
145
|
+
var formatListParams = useMemoizedFn(function (params) {
|
|
146
|
+
// 如果dataSourceKey为空 则为标准数据源
|
|
147
|
+
if (!dataSourceKey) {
|
|
148
|
+
return _objectSpread(_objectSpread({}, params), {}, {
|
|
149
|
+
filter: formatFilter(params.filter, fields),
|
|
150
|
+
sort: formatSort(params.sort)
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
if (dataSourceKey === 'pisell2-api') {
|
|
154
|
+
return _objectSpread({
|
|
155
|
+
page: (params === null || params === void 0 ? void 0 : params.page) || 1,
|
|
156
|
+
size: (params === null || params === void 0 ? void 0 : params.pageSize) || 10
|
|
157
|
+
}, customApiFormatFilter(params.filter || {}));
|
|
158
|
+
}
|
|
159
|
+
return params;
|
|
160
|
+
});
|
|
161
|
+
var formatCreateUpdateParams = useMemoizedFn(function (params) {
|
|
162
|
+
if (!dataSourceKey) {
|
|
163
|
+
return formatCreateUpdateParamsUtils(params, fields);
|
|
164
|
+
}
|
|
165
|
+
return params;
|
|
166
|
+
});
|
|
167
|
+
return {
|
|
168
|
+
formatListResult: formatListResult,
|
|
169
|
+
formatListParams: formatListParams,
|
|
170
|
+
formatCreateUpdateParams: formatCreateUpdateParams
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
export default useFormat;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare type UsePaginationProps = {
|
|
2
|
+
data: {
|
|
3
|
+
count: number;
|
|
4
|
+
page: number;
|
|
5
|
+
pageSize: number;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare const usePagination: ({ data }: UsePaginationProps) => {
|
|
10
|
+
total: number;
|
|
11
|
+
current: number;
|
|
12
|
+
pageSize: number;
|
|
13
|
+
size: string;
|
|
14
|
+
showSizeChanger: boolean;
|
|
15
|
+
};
|
|
16
|
+
export default usePagination;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
var usePagination = function usePagination(_ref) {
|
|
3
|
+
var data = _ref.data;
|
|
4
|
+
return useMemo(function () {
|
|
5
|
+
return {
|
|
6
|
+
total: data === null || data === void 0 ? void 0 : data.count,
|
|
7
|
+
current: data === null || data === void 0 ? void 0 : data.page,
|
|
8
|
+
pageSize: data === null || data === void 0 ? void 0 : data.pageSize,
|
|
9
|
+
size: 'large',
|
|
10
|
+
showSizeChanger: (data === null || data === void 0 ? void 0 : data.count) > 50
|
|
11
|
+
};
|
|
12
|
+
}, [data]);
|
|
13
|
+
};
|
|
14
|
+
export default usePagination;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DataSourceTableProps } from '../type';
|
|
3
|
+
import { OperationItem } from '../type';
|
|
4
|
+
interface UseTablePropsProps {
|
|
5
|
+
data: any;
|
|
6
|
+
originProps: DataSourceTableProps;
|
|
7
|
+
openDrawer: (type: OperationItem) => void;
|
|
8
|
+
closeDrawer: () => void;
|
|
9
|
+
refreshData: () => void;
|
|
10
|
+
handleFilterChange: (changedFields: any, allFields: any) => void;
|
|
11
|
+
tableRef: any;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 处理table的props
|
|
15
|
+
* 转换title
|
|
16
|
+
* @param props
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
20
|
+
title: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
21
|
+
pagination: {
|
|
22
|
+
total: number;
|
|
23
|
+
current: number;
|
|
24
|
+
pageSize: number;
|
|
25
|
+
size: string;
|
|
26
|
+
showSizeChanger: boolean;
|
|
27
|
+
};
|
|
28
|
+
columns: import("./useColumns").Column[];
|
|
29
|
+
subTitle: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
30
|
+
buttons: any[] | null;
|
|
31
|
+
filter: React.JSX.Element | null;
|
|
32
|
+
onRow: (record: any) => any;
|
|
33
|
+
titleButtons?: {
|
|
34
|
+
show: boolean;
|
|
35
|
+
maxCount: number;
|
|
36
|
+
items: OperationItem[];
|
|
37
|
+
} | undefined;
|
|
38
|
+
operation?: {
|
|
39
|
+
show: boolean;
|
|
40
|
+
title: string;
|
|
41
|
+
width: number;
|
|
42
|
+
align: "center" | "left" | "right";
|
|
43
|
+
fixed: false | "left" | "right";
|
|
44
|
+
type: "button" | "link";
|
|
45
|
+
items: OperationItem[];
|
|
46
|
+
} | undefined;
|
|
47
|
+
operationContent?: {
|
|
48
|
+
[key: string]: React.ReactNode;
|
|
49
|
+
} | undefined;
|
|
50
|
+
dataSource: import("../../provider/dataSource/DataSourceContext").DataSourceType;
|
|
51
|
+
search?: {
|
|
52
|
+
show: boolean;
|
|
53
|
+
placeholder: string;
|
|
54
|
+
} | undefined;
|
|
55
|
+
__designMode: string;
|
|
56
|
+
componentId: string;
|
|
57
|
+
clickToDetail?: {
|
|
58
|
+
show: boolean;
|
|
59
|
+
useCustomAction: boolean;
|
|
60
|
+
actionType: string;
|
|
61
|
+
openMode: "modal" | "drawer";
|
|
62
|
+
openContentSize: "small" | "large" | "middle";
|
|
63
|
+
openTitle: string;
|
|
64
|
+
key: string;
|
|
65
|
+
} | undefined;
|
|
66
|
+
filterBy?: Record<string, any> | undefined;
|
|
67
|
+
sortBy: string;
|
|
68
|
+
tabs?: {
|
|
69
|
+
show: boolean;
|
|
70
|
+
type: string;
|
|
71
|
+
items: {
|
|
72
|
+
name: string;
|
|
73
|
+
filterBy: Record<string, any>;
|
|
74
|
+
sortBy: string;
|
|
75
|
+
}[];
|
|
76
|
+
} | undefined;
|
|
77
|
+
};
|
|
78
|
+
export default useTableProps;
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
9
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
10
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
11
|
+
import React, { useMemo, useEffect } from 'react';
|
|
12
|
+
import { Button, Space } from 'antd';
|
|
13
|
+
import { isString } from '@pisell/utils';
|
|
14
|
+
import { useMemoizedFn } from 'ahooks';
|
|
15
|
+
import Filter from "../filter";
|
|
16
|
+
import usePagination from "./usePagination";
|
|
17
|
+
import useColumns from "./useColumns";
|
|
18
|
+
import useVariables from "../../hooks/useVariables";
|
|
19
|
+
import useComponentId from "../../hooks/useComponentId";
|
|
20
|
+
import useDataSource from "../../hooks/useDataSource";
|
|
21
|
+
import PisellToast from "../../../pisellToast";
|
|
22
|
+
import { getText } from "../../../../locales";
|
|
23
|
+
import PisellModal from "../../../pisellModal";
|
|
24
|
+
/**
|
|
25
|
+
* 处理table的props
|
|
26
|
+
* 转换title
|
|
27
|
+
* @param props
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
var useTableProps = function useTableProps(props) {
|
|
31
|
+
var _originProps$dataSour;
|
|
32
|
+
var originProps = props.originProps,
|
|
33
|
+
openDrawer = props.openDrawer,
|
|
34
|
+
closeDrawer = props.closeDrawer,
|
|
35
|
+
refreshData = props.refreshData,
|
|
36
|
+
handleFilterChange = props.handleFilterChange,
|
|
37
|
+
tableRef = props.tableRef;
|
|
38
|
+
var propsTitle = originProps.title,
|
|
39
|
+
propsSubTitle = originProps.subTitle,
|
|
40
|
+
titleButtons = originProps.titleButtons,
|
|
41
|
+
operation = originProps.operation,
|
|
42
|
+
propsFilter = originProps.filter,
|
|
43
|
+
search = originProps.search,
|
|
44
|
+
clickToDetail = originProps.clickToDetail,
|
|
45
|
+
propsOnRow = originProps.onRow,
|
|
46
|
+
filterBy = originProps.filterBy;
|
|
47
|
+
var _ref = operation || {},
|
|
48
|
+
items = _ref.items,
|
|
49
|
+
show = _ref.show,
|
|
50
|
+
operationTitle = _ref.title,
|
|
51
|
+
width = _ref.width,
|
|
52
|
+
align = _ref.align,
|
|
53
|
+
fixed = _ref.fixed,
|
|
54
|
+
type = _ref.type;
|
|
55
|
+
var componentId = useComponentId(originProps);
|
|
56
|
+
var _useDataSource = useDataSource(),
|
|
57
|
+
list = _useDataSource.list,
|
|
58
|
+
destroy = _useDataSource.destroy;
|
|
59
|
+
var data = list.data;
|
|
60
|
+
var pagination = usePagination({
|
|
61
|
+
data: data
|
|
62
|
+
});
|
|
63
|
+
useEffect(function () {
|
|
64
|
+
if (tableRef !== null && tableRef !== void 0 && tableRef.current) {
|
|
65
|
+
tableRef.current.formInstance.setFieldValue('pagination', {
|
|
66
|
+
page: (pagination === null || pagination === void 0 ? void 0 : pagination.current) || 1,
|
|
67
|
+
size: (pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) || 10
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}, [pagination]);
|
|
71
|
+
var _useVariables = useVariables(),
|
|
72
|
+
registerValueVariable = _useVariables.registerValueVariable;
|
|
73
|
+
|
|
74
|
+
// 表格标题 如果是字符串则包裹className 否则直接返回
|
|
75
|
+
var title = useMemo(function () {
|
|
76
|
+
if (isString(propsTitle)) {
|
|
77
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
78
|
+
className: "data-source-table-title"
|
|
79
|
+
}, propsTitle);
|
|
80
|
+
}
|
|
81
|
+
return propsTitle;
|
|
82
|
+
}, [propsTitle]);
|
|
83
|
+
|
|
84
|
+
// 表格副标题 如果是字符串则包裹className 否则直接返回
|
|
85
|
+
var subTitle = useMemo(function () {
|
|
86
|
+
if (isString(propsSubTitle)) {
|
|
87
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
88
|
+
className: "data-source-table-sub-title"
|
|
89
|
+
}, propsSubTitle);
|
|
90
|
+
}
|
|
91
|
+
return propsSubTitle;
|
|
92
|
+
}, [propsSubTitle]);
|
|
93
|
+
|
|
94
|
+
// 打开抽屉
|
|
95
|
+
var handleOpenDrawer = useMemoizedFn(function (record, item) {
|
|
96
|
+
registerValueVariable === null || registerValueVariable === void 0 ? void 0 : registerValueVariable(componentId, {
|
|
97
|
+
currentRecord: record
|
|
98
|
+
});
|
|
99
|
+
openDrawer(item);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// 删除记录
|
|
103
|
+
var handleDelete = useMemoizedFn( /*#__PURE__*/function () {
|
|
104
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(record) {
|
|
105
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
106
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
107
|
+
case 0:
|
|
108
|
+
try {
|
|
109
|
+
registerValueVariable === null || registerValueVariable === void 0 ? void 0 : registerValueVariable(componentId, {
|
|
110
|
+
currentRecord: record
|
|
111
|
+
});
|
|
112
|
+
setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
113
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
114
|
+
while (1) switch (_context.prev = _context.next) {
|
|
115
|
+
case 0:
|
|
116
|
+
destroy === null || destroy === void 0 ? void 0 : destroy.runAsync(record.id).then(function () {
|
|
117
|
+
refreshData();
|
|
118
|
+
PisellToast({
|
|
119
|
+
content: getText('pisell-action-delete-success')
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
case 1:
|
|
123
|
+
case "end":
|
|
124
|
+
return _context.stop();
|
|
125
|
+
}
|
|
126
|
+
}, _callee);
|
|
127
|
+
})));
|
|
128
|
+
} catch (error) {
|
|
129
|
+
console.error(error);
|
|
130
|
+
PisellToast({
|
|
131
|
+
content: getText('pisell-action-delete-failed')
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
case 1:
|
|
135
|
+
case "end":
|
|
136
|
+
return _context2.stop();
|
|
137
|
+
}
|
|
138
|
+
}, _callee2);
|
|
139
|
+
}));
|
|
140
|
+
return function (_x) {
|
|
141
|
+
return _ref2.apply(this, arguments);
|
|
142
|
+
};
|
|
143
|
+
}());
|
|
144
|
+
|
|
145
|
+
// 操作列
|
|
146
|
+
var actionsColumns = useMemo(function () {
|
|
147
|
+
if (!show) {
|
|
148
|
+
return [];
|
|
149
|
+
}
|
|
150
|
+
return [{
|
|
151
|
+
title: operationTitle,
|
|
152
|
+
key: 'actions',
|
|
153
|
+
align: align,
|
|
154
|
+
width: width,
|
|
155
|
+
fixed: fixed,
|
|
156
|
+
items: items,
|
|
157
|
+
type: type,
|
|
158
|
+
render: function render(_, record) {
|
|
159
|
+
return /*#__PURE__*/React.createElement(Space, null, items === null || items === void 0 ? void 0 : items.map(function (item) {
|
|
160
|
+
var label = item.label,
|
|
161
|
+
actionType = item.actionType;
|
|
162
|
+
var handleClick = function handleClick() {
|
|
163
|
+
if (actionType === 'delete') {
|
|
164
|
+
PisellModal.confirm({
|
|
165
|
+
title: getText('pisell-delete-confirm-title'),
|
|
166
|
+
content: getText('pisell-delete-confirm-content'),
|
|
167
|
+
okText: getText('pisell-delete-confirm-ok'),
|
|
168
|
+
cancelText: getText('pisell-delete-confirm-cancel'),
|
|
169
|
+
onOk: function onOk() {
|
|
170
|
+
handleDelete(record);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
return;
|
|
174
|
+
} else {
|
|
175
|
+
handleOpenDrawer(record, item);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
179
|
+
onClick: handleClick,
|
|
180
|
+
type: type === 'link' ? 'link' : 'default',
|
|
181
|
+
style: type === 'link' ? {
|
|
182
|
+
padding: '0'
|
|
183
|
+
} : {}
|
|
184
|
+
}, label);
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
}];
|
|
188
|
+
}, [operationTitle, show, width, align, fixed, type, items]);
|
|
189
|
+
var columns = useColumns({
|
|
190
|
+
columns: originProps.columns,
|
|
191
|
+
fields: (_originProps$dataSour = originProps.dataSource) === null || _originProps$dataSour === void 0 ? void 0 : _originProps$dataSour.fields,
|
|
192
|
+
// 操作列
|
|
193
|
+
actionsColumns: actionsColumns
|
|
194
|
+
});
|
|
195
|
+
var buttons = useMemo(function () {
|
|
196
|
+
var _titleButtons$items;
|
|
197
|
+
if (!(titleButtons !== null && titleButtons !== void 0 && titleButtons.show)) {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
return titleButtons === null || titleButtons === void 0 ? void 0 : (_titleButtons$items = titleButtons.items) === null || _titleButtons$items === void 0 ? void 0 : _titleButtons$items.map(function (button) {
|
|
201
|
+
var actionType = button.actionType,
|
|
202
|
+
buttonProps = button.buttonProps;
|
|
203
|
+
return _objectSpread(_objectSpread(_objectSpread({}, button), buttonProps), {}, {
|
|
204
|
+
onClick: function onClick() {
|
|
205
|
+
if (actionType === 'add') {
|
|
206
|
+
handleOpenDrawer(null, button);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
}, [titleButtons]);
|
|
212
|
+
var filter = useMemo(function () {
|
|
213
|
+
if (!(propsFilter !== null && propsFilter !== void 0 && propsFilter.show) && !(search !== null && search !== void 0 && search.show)) {
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
return /*#__PURE__*/React.createElement(Filter, _extends({}, propsFilter, {
|
|
217
|
+
componentId: componentId,
|
|
218
|
+
search: search,
|
|
219
|
+
handleValuesChange: handleFilterChange,
|
|
220
|
+
filterBy: filterBy
|
|
221
|
+
}));
|
|
222
|
+
}, [propsFilter, search]);
|
|
223
|
+
var onRow = useMemoizedFn(function (record) {
|
|
224
|
+
if (!(clickToDetail !== null && clickToDetail !== void 0 && clickToDetail.show)) {
|
|
225
|
+
return propsOnRow;
|
|
226
|
+
}
|
|
227
|
+
return _objectSpread(_objectSpread({}, propsOnRow), {}, {
|
|
228
|
+
onClick: function onClick(event) {
|
|
229
|
+
var _propsOnRow$onClick;
|
|
230
|
+
var detail;
|
|
231
|
+
if (clickToDetail !== null && clickToDetail !== void 0 && clickToDetail.useCustomAction) {
|
|
232
|
+
detail = {
|
|
233
|
+
openMode: clickToDetail === null || clickToDetail === void 0 ? void 0 : clickToDetail.openMode,
|
|
234
|
+
openContentSize: clickToDetail === null || clickToDetail === void 0 ? void 0 : clickToDetail.openContentSize,
|
|
235
|
+
openTitle: clickToDetail === null || clickToDetail === void 0 ? void 0 : clickToDetail.openTitle,
|
|
236
|
+
actionType: clickToDetail === null || clickToDetail === void 0 ? void 0 : clickToDetail.actionType,
|
|
237
|
+
key: clickToDetail === null || clickToDetail === void 0 ? void 0 : clickToDetail.actionType
|
|
238
|
+
};
|
|
239
|
+
} else {
|
|
240
|
+
detail = items === null || items === void 0 ? void 0 : items.find(function (item) {
|
|
241
|
+
return item.key === (clickToDetail === null || clickToDetail === void 0 ? void 0 : clickToDetail.key);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
if (detail) {
|
|
245
|
+
handleOpenDrawer(record, detail);
|
|
246
|
+
}
|
|
247
|
+
propsOnRow === null || propsOnRow === void 0 ? void 0 : (_propsOnRow$onClick = propsOnRow.onClick) === null || _propsOnRow$onClick === void 0 ? void 0 : _propsOnRow$onClick.call(propsOnRow, record, event);
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
return _objectSpread(_objectSpread({}, originProps), {}, {
|
|
252
|
+
title: title,
|
|
253
|
+
pagination: pagination,
|
|
254
|
+
columns: columns,
|
|
255
|
+
subTitle: subTitle,
|
|
256
|
+
buttons: buttons,
|
|
257
|
+
filter: filter,
|
|
258
|
+
onRow: onRow
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
export default useTableProps;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DataSourceTableProps } from '../type';
|
|
3
|
+
declare type Params = {
|
|
4
|
+
pagination?: {
|
|
5
|
+
page: number;
|
|
6
|
+
size: number;
|
|
7
|
+
};
|
|
8
|
+
order_by?: string;
|
|
9
|
+
tabs?: {
|
|
10
|
+
name: string;
|
|
11
|
+
filterBy: Record<string, any>;
|
|
12
|
+
sortBy: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare const useTableQuery: (props: DataSourceTableProps) => {
|
|
16
|
+
queryPageConfig: {
|
|
17
|
+
page: number;
|
|
18
|
+
pageSize: number;
|
|
19
|
+
filter: Record<string, any>;
|
|
20
|
+
sort: string;
|
|
21
|
+
};
|
|
22
|
+
setQueryPageConfig: import("react").Dispatch<import("react").SetStateAction<{
|
|
23
|
+
page: number;
|
|
24
|
+
pageSize: number;
|
|
25
|
+
filter: Record<string, any>;
|
|
26
|
+
sort: string;
|
|
27
|
+
}>>;
|
|
28
|
+
handleValuesChange: (params: Params, allParams: Params) => void;
|
|
29
|
+
refreshData: () => void;
|
|
30
|
+
handleFilterChange: (changedFields: any, allFields: any) => void;
|
|
31
|
+
};
|
|
32
|
+
export default useTableQuery;
|