@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,262 @@
|
|
|
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 _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; }
|
|
3
|
+
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); } }
|
|
4
|
+
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); }); }; }
|
|
5
|
+
import { isPlainObject, isString } from '@pisell/utils';
|
|
6
|
+
import { getText } from "../../../../locales";
|
|
7
|
+
import { SUPPORTED_LANGUAGES, MEDIA_TYPES, IMAGE_QUALITY, IMAGE_TYPE, DEFAULT_UID } from "./constants";
|
|
8
|
+
export var generateUid = function generateUid() {
|
|
9
|
+
return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
10
|
+
};
|
|
11
|
+
export var getSuffix = function getSuffix(name) {
|
|
12
|
+
return name.split('.').pop() || '';
|
|
13
|
+
};
|
|
14
|
+
export var getPointSuffix = function getPointSuffix(name) {
|
|
15
|
+
return ".".concat(getSuffix(name));
|
|
16
|
+
};
|
|
17
|
+
export var getFileType = function getFileType(name) {
|
|
18
|
+
return getPointSuffix(getSuffix(name));
|
|
19
|
+
};
|
|
20
|
+
export var getFileName = function getFileName(url) {
|
|
21
|
+
var parts = url.split('/');
|
|
22
|
+
return parts[parts.length - 1] || '';
|
|
23
|
+
};
|
|
24
|
+
export var checkFileCount = function checkFileCount(_ref) {
|
|
25
|
+
var multiple = _ref.multiple,
|
|
26
|
+
minCount = _ref.minCount,
|
|
27
|
+
maxCount = _ref.maxCount,
|
|
28
|
+
valueLength = _ref.valueLength;
|
|
29
|
+
if (!multiple) return {
|
|
30
|
+
success: true
|
|
31
|
+
};
|
|
32
|
+
if (minCount === maxCount && valueLength !== minCount) {
|
|
33
|
+
return {
|
|
34
|
+
success: false,
|
|
35
|
+
message: getText('pisell-upload-count-error')(minCount)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (minCount !== maxCount && (valueLength < minCount || valueLength > maxCount)) {
|
|
39
|
+
return {
|
|
40
|
+
success: false,
|
|
41
|
+
message: getText('pisell-upload-count-error')("".concat(minCount, "-").concat(maxCount))
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
success: true
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// Media handling
|
|
50
|
+
var createVideoMetadata = /*#__PURE__*/function () {
|
|
51
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
52
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
53
|
+
while (1) switch (_context.prev = _context.next) {
|
|
54
|
+
case 0:
|
|
55
|
+
return _context.abrupt("return", new Promise(function (resolve) {
|
|
56
|
+
var video = document.createElement('video');
|
|
57
|
+
var canvas = document.createElement('canvas');
|
|
58
|
+
video.preload = 'metadata';
|
|
59
|
+
var hasMetadata = false;
|
|
60
|
+
var hasSeeked = false;
|
|
61
|
+
var tryResolve = function tryResolve() {
|
|
62
|
+
if (!hasMetadata || !hasSeeked) return;
|
|
63
|
+
canvas.width = video.videoWidth;
|
|
64
|
+
canvas.height = video.videoHeight;
|
|
65
|
+
var ctx = canvas.getContext('2d');
|
|
66
|
+
ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
|
|
67
|
+
canvas.toBlob(function (blob) {
|
|
68
|
+
var metadata = {
|
|
69
|
+
width: video.videoWidth,
|
|
70
|
+
height: video.videoHeight,
|
|
71
|
+
duration: video.duration,
|
|
72
|
+
bitrate: file.size / video.duration
|
|
73
|
+
};
|
|
74
|
+
if (blob) {
|
|
75
|
+
metadata.cover = new File([blob], "".concat(file.name, "-cover.jpg"), {
|
|
76
|
+
type: IMAGE_TYPE
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
URL.revokeObjectURL(video.src);
|
|
80
|
+
resolve(metadata);
|
|
81
|
+
}, IMAGE_TYPE, IMAGE_QUALITY);
|
|
82
|
+
};
|
|
83
|
+
video.onloadedmetadata = function () {
|
|
84
|
+
hasMetadata = true;
|
|
85
|
+
tryResolve();
|
|
86
|
+
};
|
|
87
|
+
video.onseeked = function () {
|
|
88
|
+
hasSeeked = true;
|
|
89
|
+
tryResolve();
|
|
90
|
+
};
|
|
91
|
+
video.src = URL.createObjectURL(file);
|
|
92
|
+
}));
|
|
93
|
+
case 1:
|
|
94
|
+
case "end":
|
|
95
|
+
return _context.stop();
|
|
96
|
+
}
|
|
97
|
+
}, _callee);
|
|
98
|
+
}));
|
|
99
|
+
return function createVideoMetadata(_x) {
|
|
100
|
+
return _ref2.apply(this, arguments);
|
|
101
|
+
};
|
|
102
|
+
}();
|
|
103
|
+
var createAudioMetadata = /*#__PURE__*/function () {
|
|
104
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(file) {
|
|
105
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
106
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
107
|
+
case 0:
|
|
108
|
+
return _context2.abrupt("return", new Promise(function (resolve) {
|
|
109
|
+
var audio = document.createElement('audio');
|
|
110
|
+
audio.preload = 'metadata';
|
|
111
|
+
audio.src = URL.createObjectURL(file);
|
|
112
|
+
audio.onloadedmetadata = function () {
|
|
113
|
+
URL.revokeObjectURL(audio.src);
|
|
114
|
+
resolve({
|
|
115
|
+
duration: audio.duration,
|
|
116
|
+
bitrate: file.size / audio.duration
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
}));
|
|
120
|
+
case 1:
|
|
121
|
+
case "end":
|
|
122
|
+
return _context2.stop();
|
|
123
|
+
}
|
|
124
|
+
}, _callee2);
|
|
125
|
+
}));
|
|
126
|
+
return function createAudioMetadata(_x2) {
|
|
127
|
+
return _ref3.apply(this, arguments);
|
|
128
|
+
};
|
|
129
|
+
}();
|
|
130
|
+
export var getMediaMetadata = /*#__PURE__*/function () {
|
|
131
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(file) {
|
|
132
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
133
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
134
|
+
case 0:
|
|
135
|
+
if (!file.type.startsWith(MEDIA_TYPES.VIDEO)) {
|
|
136
|
+
_context3.next = 2;
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
return _context3.abrupt("return", createVideoMetadata(file));
|
|
140
|
+
case 2:
|
|
141
|
+
if (!file.type.startsWith(MEDIA_TYPES.AUDIO)) {
|
|
142
|
+
_context3.next = 4;
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
return _context3.abrupt("return", createAudioMetadata(file));
|
|
146
|
+
case 4:
|
|
147
|
+
return _context3.abrupt("return", null);
|
|
148
|
+
case 5:
|
|
149
|
+
case "end":
|
|
150
|
+
return _context3.stop();
|
|
151
|
+
}
|
|
152
|
+
}, _callee3);
|
|
153
|
+
}));
|
|
154
|
+
return function getMediaMetadata(_x3) {
|
|
155
|
+
return _ref4.apply(this, arguments);
|
|
156
|
+
};
|
|
157
|
+
}();
|
|
158
|
+
export var genFileListByString = function genFileListByString(value) {
|
|
159
|
+
if (!value) return [];
|
|
160
|
+
return [{
|
|
161
|
+
uid: generateUid(),
|
|
162
|
+
name: getFileName(value),
|
|
163
|
+
status: 'done',
|
|
164
|
+
url: value
|
|
165
|
+
}];
|
|
166
|
+
};
|
|
167
|
+
export var createMultilingualData = function createMultilingualData(value) {
|
|
168
|
+
return SUPPORTED_LANGUAGES.reduce(function (acc, lang) {
|
|
169
|
+
acc[lang] = value;
|
|
170
|
+
return acc;
|
|
171
|
+
}, {});
|
|
172
|
+
};
|
|
173
|
+
export var createMultilingualFileList = function createMultilingualFileList(value) {
|
|
174
|
+
return SUPPORTED_LANGUAGES.reduce(function (acc, lang) {
|
|
175
|
+
acc[lang] = genFileListByString(value);
|
|
176
|
+
return acc;
|
|
177
|
+
}, {});
|
|
178
|
+
};
|
|
179
|
+
var handleMultilingualSingleFile = function handleMultilingualSingleFile(value) {
|
|
180
|
+
var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
181
|
+
return {
|
|
182
|
+
uid: "-".concat(index),
|
|
183
|
+
name: getFileName(value),
|
|
184
|
+
status: 'done',
|
|
185
|
+
url: value,
|
|
186
|
+
multilingualFileList: createMultilingualFileList(value),
|
|
187
|
+
multilingual: createMultilingualData(value)
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
var handleMultilingualObject = function handleMultilingualObject(value) {
|
|
191
|
+
var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
192
|
+
var defaultUrl = value.original || value.en || value['zh-CN'] || value['zh-HK'];
|
|
193
|
+
return {
|
|
194
|
+
uid: "-".concat(index),
|
|
195
|
+
name: getFileName(defaultUrl),
|
|
196
|
+
status: 'done',
|
|
197
|
+
url: defaultUrl,
|
|
198
|
+
multilingual: value,
|
|
199
|
+
multilingualFileList: SUPPORTED_LANGUAGES.reduce(function (acc, lang) {
|
|
200
|
+
acc[lang] = genFileListByString(value[lang]);
|
|
201
|
+
return acc;
|
|
202
|
+
}, {})
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
export var getDefaultFileList = function getDefaultFileList(value, options) {
|
|
206
|
+
if (!value) return [];
|
|
207
|
+
if (Object.values(value).filter(function (item) {
|
|
208
|
+
return !!item;
|
|
209
|
+
}).length === 0) return [];
|
|
210
|
+
var enableMultilingual = options.enableMultilingual,
|
|
211
|
+
multiple = options.multiple;
|
|
212
|
+
if (enableMultilingual) {
|
|
213
|
+
if (isString(value)) {
|
|
214
|
+
return [handleMultilingualSingleFile(value)];
|
|
215
|
+
}
|
|
216
|
+
if (Array.isArray(value)) {
|
|
217
|
+
return value.map(function (item, index) {
|
|
218
|
+
if (isString(item)) {
|
|
219
|
+
return handleMultilingualSingleFile(item, index);
|
|
220
|
+
}
|
|
221
|
+
if (isPlainObject(item)) {
|
|
222
|
+
return handleMultilingualObject(item, index);
|
|
223
|
+
}
|
|
224
|
+
return [];
|
|
225
|
+
}).flat();
|
|
226
|
+
}
|
|
227
|
+
if (isPlainObject(value)) {
|
|
228
|
+
return [handleMultilingualObject(value)];
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if (multiple && Array.isArray(value)) {
|
|
232
|
+
return value.map(function (url, index) {
|
|
233
|
+
return {
|
|
234
|
+
uid: "-".concat(index),
|
|
235
|
+
name: getFileName(url),
|
|
236
|
+
status: 'done',
|
|
237
|
+
url: url
|
|
238
|
+
};
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
if (isString(value)) {
|
|
242
|
+
return [{
|
|
243
|
+
uid: DEFAULT_UID,
|
|
244
|
+
name: getFileName(value),
|
|
245
|
+
status: 'done',
|
|
246
|
+
url: value
|
|
247
|
+
}];
|
|
248
|
+
}
|
|
249
|
+
return [];
|
|
250
|
+
};
|
|
251
|
+
export var getFileMetadataParams = function getFileMetadataParams(file) {
|
|
252
|
+
if (!file.metadata) return {};
|
|
253
|
+
var metadataParams = {};
|
|
254
|
+
var metadataKeys = ['width', 'height', 'duration', 'bitrate'];
|
|
255
|
+
metadataKeys.forEach(function (key) {
|
|
256
|
+
var _file$metadata;
|
|
257
|
+
if (((_file$metadata = file.metadata) === null || _file$metadata === void 0 ? void 0 : _file$metadata[key]) !== undefined) {
|
|
258
|
+
metadataParams["metadata[".concat(key, "]")] = file.metadata[key];
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
return metadataParams;
|
|
262
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const formFieldMap: {
|
|
3
|
+
FormItemCheckbox: import("react").FC<{}> & {
|
|
4
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
5
|
+
} & {
|
|
6
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
7
|
+
};
|
|
8
|
+
FormItemColorPicker: import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
9
|
+
FormItemDatePicker: import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
10
|
+
FormItemInput: import("react").FC<import("./Input/type").InputProps> & {
|
|
11
|
+
JSON: import("react").FC<any>;
|
|
12
|
+
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
13
|
+
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
14
|
+
URL: import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
15
|
+
Email: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
16
|
+
Phone: import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
17
|
+
};
|
|
18
|
+
FormItemRadio: import("react").FC<{}> & {
|
|
19
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
20
|
+
} & {
|
|
21
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
22
|
+
};
|
|
23
|
+
FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
24
|
+
options?: any;
|
|
25
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
26
|
+
labelField: string;
|
|
27
|
+
valueField: string;
|
|
28
|
+
} & {
|
|
29
|
+
dataSource?: any;
|
|
30
|
+
}) => import("react").JSX.Element;
|
|
31
|
+
FormItemInputNumber: import("react").FC<any>;
|
|
32
|
+
FormItemPercent: import("react").FC<any>;
|
|
33
|
+
FormItemTimePicker: import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
34
|
+
'FormItemInput.JSON': import("react").FC<any>;
|
|
35
|
+
'FormItemInput.Phone': import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
36
|
+
'FormItemInput.Email': import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
37
|
+
'FormItemInput.URL': import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
38
|
+
'FormItemInput.Password': import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
39
|
+
'FormItemRadio.Group': import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
40
|
+
'FormItemCheckbox.Group': import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
41
|
+
FormItemDateRangePicker: import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
42
|
+
FormItemUpload: import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
43
|
+
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
44
|
+
};
|
|
45
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<any> | (import("react").FC<{}> & {
|
|
46
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
47
|
+
} & {
|
|
48
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
49
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
50
|
+
JSON: import("react").FC<any>;
|
|
51
|
+
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
52
|
+
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
53
|
+
URL: import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
54
|
+
Email: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
55
|
+
Phone: import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
56
|
+
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
57
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
58
|
+
} & {
|
|
59
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
60
|
+
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
61
|
+
options?: any;
|
|
62
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
63
|
+
labelField: string;
|
|
64
|
+
valueField: string;
|
|
65
|
+
} & {
|
|
66
|
+
dataSource?: any;
|
|
67
|
+
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
68
|
+
export { getFieldComponent, formFieldMap };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Checkbox from "./Checkbox";
|
|
2
|
+
import ColorPicker from "./ColorPicker";
|
|
3
|
+
import DatePicker from "./DatePicker";
|
|
4
|
+
import Input from "./Input";
|
|
5
|
+
import Radio from "./Radio";
|
|
6
|
+
import Select from "./Select";
|
|
7
|
+
import InputNumber from "./InputNumber";
|
|
8
|
+
import TimePicker from "./TimePicker";
|
|
9
|
+
import DateRangePicker from "./DateRangePicker";
|
|
10
|
+
import Upload from "./Upload";
|
|
11
|
+
import Translation from "./Translation";
|
|
12
|
+
|
|
13
|
+
// 表单字段组件映射 增加时需要同步更新 utils 中的 formFieldFilterFuncMap
|
|
14
|
+
var formFieldMap = {
|
|
15
|
+
FormItemCheckbox: Checkbox,
|
|
16
|
+
FormItemColorPicker: ColorPicker,
|
|
17
|
+
FormItemDatePicker: DatePicker,
|
|
18
|
+
FormItemInput: Input,
|
|
19
|
+
FormItemRadio: Radio,
|
|
20
|
+
FormItemSelect: Select,
|
|
21
|
+
FormItemInputNumber: InputNumber,
|
|
22
|
+
FormItemPercent: InputNumber,
|
|
23
|
+
FormItemTimePicker: TimePicker,
|
|
24
|
+
'FormItemInput.JSON': Input.JSON,
|
|
25
|
+
'FormItemInput.Phone': Input.Phone,
|
|
26
|
+
'FormItemInput.Email': Input.Email,
|
|
27
|
+
'FormItemInput.URL': Input.URL,
|
|
28
|
+
'FormItemInput.Password': Input.Password,
|
|
29
|
+
'FormItemRadio.Group': Radio.Group,
|
|
30
|
+
'FormItemCheckbox.Group': Checkbox.Group,
|
|
31
|
+
FormItemDateRangePicker: DateRangePicker,
|
|
32
|
+
FormItemUpload: Upload,
|
|
33
|
+
FormItemTranslation: Translation
|
|
34
|
+
};
|
|
35
|
+
var getFieldComponent = function getFieldComponent(fieldComponent) {
|
|
36
|
+
return formFieldMap[fieldComponent];
|
|
37
|
+
};
|
|
38
|
+
export { getFieldComponent, formFieldMap };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Field } from '../provider/dataSource/DataSourceContext';
|
|
2
|
+
import { formFieldMap } from './index';
|
|
3
|
+
export declare type FormFieldComponentType = keyof typeof formFieldMap;
|
|
4
|
+
export declare type FilterFunctionReturnType = {
|
|
5
|
+
$eq?: any;
|
|
6
|
+
$includes?: string;
|
|
7
|
+
$in?: (string | number)[];
|
|
8
|
+
$anyOf?: (string | number)[];
|
|
9
|
+
$isTruly?: boolean;
|
|
10
|
+
$dateAfter?: string;
|
|
11
|
+
$dateBefore?: string;
|
|
12
|
+
$and?: Array<{
|
|
13
|
+
$dateAfter?: string;
|
|
14
|
+
$dateBefore?: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
export declare type FilterFunction = (value: any, field: Field) => FilterFunctionReturnType | null;
|
|
18
|
+
export declare type FormFieldFilterFuncMapType = Record<FormFieldComponentType, FilterFunction>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,111 @@
|
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
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."); }
|
|
4
|
+
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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
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); }
|
|
11
|
+
import { isString } from '@pisell/utils';
|
|
12
|
+
var formFieldFilterFuncMap = {
|
|
13
|
+
Checkbox: function Checkbox(value) {
|
|
14
|
+
var key = value ? '$isTruly' : '$isFalsy';
|
|
15
|
+
return _defineProperty({}, key, true);
|
|
16
|
+
},
|
|
17
|
+
ColorPicker: function ColorPicker(value) {
|
|
18
|
+
return {
|
|
19
|
+
$eq: value
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
DatePicker: function DatePicker(value) {
|
|
23
|
+
var _value = _slicedToArray(value, 2),
|
|
24
|
+
start = _value[0],
|
|
25
|
+
end = _value[1];
|
|
26
|
+
if (!start || !end) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
var startDate = isString(start) ? start : start.format('YYYY-MM-DD HH:mm:ss');
|
|
30
|
+
var endDate = isString(end) ? end : end.format('YYYY-MM-DD HH:mm:ss');
|
|
31
|
+
return {
|
|
32
|
+
$and: [{
|
|
33
|
+
$dateAfter: startDate
|
|
34
|
+
}, {
|
|
35
|
+
$dateBefore: endDate
|
|
36
|
+
}]
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
Input: function Input(value) {
|
|
40
|
+
return {
|
|
41
|
+
$includes: value
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
Radio: function Radio(value) {
|
|
45
|
+
return {
|
|
46
|
+
$eq: value
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
Select: function Select(value, field) {
|
|
50
|
+
var key = field.type === 'string' ? '$in' : '$anyOf';
|
|
51
|
+
var formatValue = Array.isArray(value) ? value : [value];
|
|
52
|
+
return _defineProperty({}, key, formatValue);
|
|
53
|
+
},
|
|
54
|
+
Percent: function Percent(value) {
|
|
55
|
+
return {
|
|
56
|
+
$eq: value
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
InputNumber: function InputNumber(value) {
|
|
60
|
+
return {
|
|
61
|
+
$eq: value
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
TimePicker: function TimePicker(value) {
|
|
65
|
+
return {
|
|
66
|
+
$eq: value
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
'Input.JSON': function InputJSON(value) {
|
|
70
|
+
return {
|
|
71
|
+
$includes: value
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
'Input.URL': function InputURL(value) {
|
|
75
|
+
return {
|
|
76
|
+
$includes: value
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
'Input.Password': function InputPassword(value) {
|
|
80
|
+
return {
|
|
81
|
+
$includes: value
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
DateRangePicker: function DateRangePicker(value) {
|
|
85
|
+
var _value2 = _slicedToArray(value, 2),
|
|
86
|
+
start = _value2[0],
|
|
87
|
+
end = _value2[1];
|
|
88
|
+
var startDate = isString(start) ? start : start.format('YYYY-MM-DD HH:mm:ss');
|
|
89
|
+
var endDate = isString(end) ? end : end.format('YYYY-MM-DD HH:mm:ss');
|
|
90
|
+
return {
|
|
91
|
+
$and: [{
|
|
92
|
+
$dateAfter: startDate
|
|
93
|
+
}, {
|
|
94
|
+
$dateBefore: endDate
|
|
95
|
+
}]
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
'Radio.Group': function RadioGroup(value) {
|
|
99
|
+
var formatValue = Array.isArray(value) ? value : [value];
|
|
100
|
+
return {
|
|
101
|
+
$in: formatValue
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
'Checkbox.Group': function CheckboxGroup(value) {
|
|
105
|
+
var formatValue = Array.isArray(value) ? value : [value];
|
|
106
|
+
return {
|
|
107
|
+
$anyOf: formatValue
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
export { formFieldFilterFuncMap };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
2
|
+
export interface UseActionsParams {
|
|
3
|
+
dataSource?: DataSourceType;
|
|
4
|
+
currentValue?: 'server' | 'local';
|
|
5
|
+
__designMode?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const useActions: ({ dataSource: propsDataSource, currentValue: propsCurrentValue, __designMode, }?: UseActionsParams) => {
|
|
8
|
+
create: (values: Record<string, any>) => Promise<any>;
|
|
9
|
+
get: () => Promise<any>;
|
|
10
|
+
update: (values: Record<string, any>) => Promise<any>;
|
|
11
|
+
list: (params: {
|
|
12
|
+
page: number;
|
|
13
|
+
pageSize: number;
|
|
14
|
+
}) => Promise<any>;
|
|
15
|
+
destroy: (id: string) => Promise<any>;
|
|
16
|
+
};
|
|
17
|
+
export default useActions;
|