@pisell/materials 1.0.449 → 1.0.451
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 +2 -2
- package/build/lowcode/preview.js +150 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +28 -28
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -23
- package/es/components/collapse/index.d.ts +11 -2
- package/es/components/collapse/index.js +28 -22
- package/es/components/colorPicker/index.d.ts +4 -0
- package/es/components/colorPicker/index.js +6 -0
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceForm/formItem.js +46 -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 +75 -0
- package/es/components/dataSourceComponents/dataSourceForm/index.less +24 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +10 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.js +6 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +24 -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/serve.d.ts +147 -0
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +253 -0
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +36 -0
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +217 -0
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.less +4 -0
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +16 -0
- package/es/components/dataSourceComponents/dataSourceForm/type.js +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +36 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +188 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.d.ts +11 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +56 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.d.ts +2 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +39 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +10 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +35 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +27 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +41 -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/useTableQuery.d.ts +19 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +51 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +4 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.js +208 -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 +15 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.d.ts +7 -0
- package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +14 -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 +6 -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 +4 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.js +9 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/WithMode.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/WithMode.js +5 -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 +4 -0
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +7 -0
- package/es/components/dataSourceComponents/fields/DatePicker/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DatePicker/WithMode.js +17 -0
- package/es/components/dataSourceComponents/fields/DatePicker/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/DatePicker/index.js +4 -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/Input/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input/ReadPretty.js +5 -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 +13 -0
- package/es/components/dataSourceComponents/fields/Input/index.js +12 -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.Json/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +11 -0
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.js +5 -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 +4 -0
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.js +5 -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.TextArea/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.js +5 -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 +4 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +9 -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 +4 -0
- package/es/components/dataSourceComponents/fields/InputNumber/ReadPretty.js +7 -0
- package/es/components/dataSourceComponents/fields/InputNumber/WithMode.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/InputNumber/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/InputNumber/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/InputNumber/index.js +4 -0
- package/es/components/dataSourceComponents/fields/InputNumber/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/InputNumber/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Radio/ReadPretty.d.ts +7 -0
- package/es/components/dataSourceComponents/fields/Radio/ReadPretty.js +14 -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 +6 -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 +9 -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 +3 -0
- package/es/components/dataSourceComponents/fields/Select/index.js +4 -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 +4 -0
- package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.js +6 -0
- package/es/components/dataSourceComponents/fields/TimePicker/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/TimePicker/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/TimePicker/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/TimePicker/index.js +4 -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/index.d.ts +16 -0
- package/es/components/dataSourceComponents/fields/index.js +27 -0
- package/es/components/dataSourceComponents/hooks/useActions.d.ts +16 -0
- package/es/components/dataSourceComponents/hooks/useActions.js +302 -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/dataSourceComponents/provider/actions/ActionsProvider.js +28 -0
- package/es/components/dataSourceComponents/provider/fields/DataSourceContext.d.ts +75 -0
- package/es/components/dataSourceComponents/provider/fields/DataSourceContext.js +6 -0
- package/es/components/dataSourceComponents/provider/fields/DataSourceProvider.d.ts +8 -0
- package/es/components/dataSourceComponents/provider/fields/DataSourceProvider.js +20 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +9 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.js +8 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +82 -0
- package/es/components/form/index.d.ts +2 -8
- package/es/components/form/index.js +3 -1
- package/es/components/page/index.js +3 -2
- package/es/components/pisellAnchor/index.js +0 -1
- package/es/components/pisellStatistic/index.js +0 -1
- package/es/components/pisellUpload/index.js +0 -1
- package/es/components/pisellUploadCrop/index.js +0 -1
- package/es/components/pisellWalletCard/index.js +0 -2
- package/es/components/pisellWalletPassCard/index.js +4 -1
- package/es/components/productCard/components/Action/index.d.ts +4 -0
- package/es/components/productCard/components/{Actions → Action}/index.js +7 -6
- package/{lib/components/productCard/components/Actions → es/components/productCard/components/Action}/index.less +1 -1
- package/es/components/productCard/components/AmountFooter/index.d.ts +2 -2
- package/es/components/productCard/components/AmountFooter/index.js +13 -7
- package/es/components/productCard/components/AmountFooter/index.less +9 -0
- package/es/components/productCard/components/Header/index.d.ts +1 -1
- package/es/components/productCard/components/Header/index.js +17 -18
- package/es/components/productCard/components/Header/index.less +4 -0
- package/es/components/productCard/components/Note/index.d.ts +1 -1
- package/es/components/productCard/components/Note/index.js +11 -4
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -1
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +14 -12
- package/es/components/productCard/components/Packages/components/options/index.less +1 -0
- package/es/components/productCard/components/Packages/index.d.ts +1 -1
- package/es/components/productCard/components/Packages/index.js +14 -5
- package/es/components/productCard/components/Sales/index.d.ts +1 -1
- package/es/components/productCard/components/Sales/index.js +23 -6
- package/es/components/productCard/components/Time/components/Like/index.d.ts +2 -2
- package/es/components/productCard/components/Time/components/Like/index.js +3 -3
- package/es/components/productCard/components/Time/index.d.ts +1 -1
- package/es/components/productCard/components/Time/index.js +28 -14
- package/es/components/productCard/components/Time/index.less +10 -0
- package/es/components/productCard/hooks/useOpenNote.d.ts +3 -0
- package/es/components/productCard/hooks/useOpenNote.js +58 -0
- package/es/components/productCard/index.js +76 -33
- package/es/components/productCard/index.less +8 -3
- package/es/components/productCard/locales.d.ts +24 -0
- package/es/components/productCard/locales.js +29 -0
- package/es/components/productCard/types.d.ts +6 -0
- package/es/components/productCard/utils.js +23 -5
- package/es/components/record-view/index.js +0 -3
- package/es/components/section-footers/index.js +0 -1
- package/es/components/select/index.d.ts +1 -1
- package/es/components/select/index.js +2 -1
- package/es/components/table/utils.d.ts +5 -6
- package/es/components/table/utils.js +7 -1
- package/es/components/tabs/index.js +0 -4
- package/es/hooks/useSetRequest.d.ts +2 -0
- package/es/hooks/useSetRequest.js +8 -0
- package/es/index.d.ts +13 -0
- package/es/index.js +16 -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/collapse/index.d.ts +11 -2
- package/lib/components/collapse/index.js +27 -21
- package/lib/components/colorPicker/index.d.ts +4 -0
- package/lib/components/{productCard/components/Holder → colorPicker}/index.js +9 -11
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +59 -0
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.d.ts +20 -0
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.js +80 -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 +103 -0
- package/lib/components/dataSourceComponents/dataSourceForm/index.less +24 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +10 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.js +35 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +54 -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/serve.d.ts +147 -0
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +141 -0
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +36 -0
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +157 -0
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.less +4 -0
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +16 -0
- package/lib/components/dataSourceComponents/dataSourceForm/type.js +17 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +36 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +177 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.d.ts +11 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +85 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.d.ts +2 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +55 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +10 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +45 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +27 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +62 -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/useTableQuery.d.ts +19 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +56 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +193 -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 +15 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.d.ts +7 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +47 -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 +40 -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 +4 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.js +40 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/WithMode.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/WithMode.js +39 -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 +4 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +41 -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 +38 -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/Input/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input/ReadPretty.js +39 -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 +13 -0
- package/lib/components/dataSourceComponents/fields/Input/index.js +46 -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.Json/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +45 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.js +39 -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 +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.js +39 -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.TextArea/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.js +39 -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 +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +41 -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 +4 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/ReadPretty.js +40 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/WithMode.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/WithMode.js +42 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/type.js +17 -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 +40 -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 +3 -0
- package/lib/components/dataSourceComponents/fields/Select/index.js +38 -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 +4 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.js +40 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/index.js +38 -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/index.d.ts +16 -0
- package/lib/components/dataSourceComponents/fields/index.js +64 -0
- package/lib/components/dataSourceComponents/hooks/useActions.d.ts +16 -0
- package/lib/components/dataSourceComponents/hooks/useActions.js +184 -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/fields/DataSourceContext.d.ts +75 -0
- package/lib/components/dataSourceComponents/provider/fields/DataSourceContext.js +35 -0
- package/lib/components/dataSourceComponents/provider/fields/DataSourceProvider.d.ts +8 -0
- package/lib/components/dataSourceComponents/provider/fields/DataSourceProvider.js +46 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +9 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.js +39 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +104 -0
- package/lib/components/form/index.d.ts +2 -8
- package/lib/components/form/index.js +3 -2
- package/lib/components/page/index.js +7 -3
- package/lib/components/pisellAnchor/index.js +0 -5
- package/lib/components/pisellStatistic/index.js +0 -5
- package/lib/components/pisellUpload/index.js +0 -5
- package/lib/components/pisellUploadCrop/index.js +0 -5
- package/lib/components/pisellWalletCard/index.js +0 -10
- package/lib/components/pisellWalletPassCard/index.js +3 -0
- package/lib/components/productCard/components/Action/index.d.ts +4 -0
- package/lib/components/productCard/components/{Actions → Action}/index.js +11 -10
- package/{es/components/productCard/components/Actions → lib/components/productCard/components/Action}/index.less +1 -1
- package/lib/components/productCard/components/AmountFooter/index.d.ts +2 -2
- package/lib/components/productCard/components/AmountFooter/index.js +8 -8
- package/lib/components/productCard/components/AmountFooter/index.less +9 -0
- package/lib/components/productCard/components/Header/index.d.ts +1 -1
- package/lib/components/productCard/components/Header/index.js +8 -8
- package/lib/components/productCard/components/Header/index.less +4 -0
- package/lib/components/productCard/components/Note/index.d.ts +1 -1
- package/lib/components/productCard/components/Note/index.js +14 -2
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -1
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +7 -3
- package/lib/components/productCard/components/Packages/components/options/index.less +1 -0
- package/lib/components/productCard/components/Packages/index.d.ts +1 -1
- package/lib/components/productCard/components/Packages/index.js +7 -3
- package/lib/components/productCard/components/Sales/index.d.ts +1 -1
- package/lib/components/productCard/components/Sales/index.js +13 -3
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +2 -2
- package/lib/components/productCard/components/Time/components/Like/index.js +3 -3
- package/lib/components/productCard/components/Time/index.d.ts +1 -1
- package/lib/components/productCard/components/Time/index.js +17 -10
- package/lib/components/productCard/components/Time/index.less +10 -0
- package/lib/components/productCard/hooks/useOpenNote.d.ts +3 -0
- package/lib/components/productCard/hooks/useOpenNote.js +79 -0
- package/lib/components/productCard/index.js +96 -43
- package/lib/components/productCard/index.less +8 -3
- package/lib/components/productCard/locales.d.ts +24 -0
- package/lib/components/productCard/locales.js +47 -0
- package/lib/components/productCard/types.d.ts +6 -0
- package/lib/components/productCard/utils.js +18 -3
- package/lib/components/record-view/index.js +0 -15
- package/lib/components/section-footers/index.js +0 -5
- package/lib/components/select/index.d.ts +1 -1
- package/lib/components/select/index.js +2 -1
- package/lib/components/table/utils.d.ts +5 -6
- package/lib/components/table/utils.js +7 -1
- package/lib/components/tabs/index.js +0 -20
- package/lib/hooks/useSetRequest.d.ts +2 -0
- package/lib/hooks/useSetRequest.js +42 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.js +39 -0
- 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 +430 -0
- package/lowcode/color-picker/__screenshots__/input-1.png +0 -0
- package/lowcode/color-picker/meta.ts +298 -0
- package/lowcode/color-picker/snippets.ts +9 -0
- package/lowcode/data-source-form/__screenshots__/form-1.png +0 -0
- package/lowcode/data-source-form/constants.ts +39 -0
- package/lowcode/data-source-form/meta.ts +797 -0
- package/lowcode/data-source-form/snippets.ts +130 -0
- package/lowcode/data-source-form/utils.ts +343 -0
- package/lowcode/data-source-table/__screenshots__/table-1.png +0 -0
- package/lowcode/data-source-table/meta.ts +2697 -0
- package/lowcode/data-source-table/snippets.ts +84 -0
- package/lowcode/data-source-table/utils.tsx +140 -0
- package/lowcode/form/meta.ts +118 -22
- package/lowcode/form/snippets.ts +2 -481
- package/lowcode/form-group/meta.ts +346 -0
- package/lowcode/form-group/snippets.ts +16 -0
- package/lowcode/form-item-checkbox/meta.ts +88 -0
- package/lowcode/form-item-checkbox/snippets.ts +35 -0
- package/lowcode/form-item-checkbox.group/__screenshots__/checkbox-group-1.png +0 -0
- package/lowcode/form-item-checkbox.group/meta.ts +159 -0
- package/lowcode/form-item-color-picker/__screenshots__/input-1.png +0 -0
- package/lowcode/form-item-color-picker/meta.ts +301 -0
- package/lowcode/form-item-color-picker/snippets.ts +9 -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 +290 -0
- package/lowcode/form-item-date-picker/snippets.ts +50 -0
- package/lowcode/form-item-input/__screenshots__/input-1.png +0 -0
- package/lowcode/form-item-input/meta.ts +227 -0
- package/lowcode/form-item-input/snippets.ts +12 -0
- package/lowcode/form-item-input-number/__screenshots__/input-number-1.png +0 -0
- package/lowcode/form-item-input-number/meta.ts +228 -0
- package/lowcode/form-item-input-number/snippets.ts +12 -0
- package/lowcode/form-item-input.json/meta.ts +213 -0
- package/lowcode/form-item-input.json/snippets.ts +16 -0
- package/lowcode/form-item-input.password/__screenshots__/input-password-1.png +0 -0
- package/lowcode/form-item-input.password/meta.ts +198 -0
- package/lowcode/form-item-input.password/snippets.ts +12 -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 +213 -0
- package/lowcode/form-item-input.text-area/snippets.ts +16 -0
- package/lowcode/form-item-input.url/meta.ts +213 -0
- package/lowcode/form-item-input.url/snippets.ts +15 -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 +36 -0
- package/lowcode/form-item-radio.group/__screenshots__/radio-group-1.png +0 -0
- package/lowcode/form-item-radio.group/meta.ts +221 -0
- package/lowcode/form-item-select/__screenshots__/select-1.png +0 -0
- package/lowcode/form-item-select/meta.ts +463 -0
- package/lowcode/form-item-select/snippets.ts +28 -0
- package/lowcode/form-item-time-picker/__screenshots__/time-picker-1.png +0 -0
- package/lowcode/form-item-time-picker/meta.ts +235 -0
- package/lowcode/form-item-time-picker/snippets.ts +10 -0
- package/lowcode/form.item/meta.ts +104 -25
- package/lowcode/pisell-text.amount/meta.ts +1 -1
- package/lowcode/product-card/snippets.ts +10 -2
- package/lowcode/submit-button/meta.ts +1002 -0
- package/lowcode/submit-button/snippets.ts +15 -0
- package/lowcode/timeline/meta.ts +1 -2
- package/package.json +2 -2
- package/es/components/productCard/components/Actions/index.d.ts +0 -4
- package/es/components/productCard/components/Holder/index.d.ts +0 -4
- package/es/components/productCard/components/Holder/index.js +0 -11
- package/es/components/productCard/components/Holder/index.less +0 -11
- package/lib/components/productCard/components/Actions/index.d.ts +0 -4
- package/lib/components/productCard/components/Holder/index.d.ts +0 -4
- package/lib/components/productCard/components/Holder/index.less +0 -11
|
@@ -0,0 +1,208 @@
|
|
|
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
|
+
var _excluded = ["columns", "dataSource", "detailContent", "editContent", "showDetailButton", "showEditButton", "showDeleteButton", "showAddButton", "addContent", "__designMode"];
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
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; }
|
|
5
|
+
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); } }
|
|
6
|
+
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); }); }; }
|
|
7
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
+
import React, { useEffect, useMemo } from 'react';
|
|
10
|
+
import { useRequest } from 'ahooks';
|
|
11
|
+
import { Drawer, Button, Space } from 'antd';
|
|
12
|
+
import Table from "../../table";
|
|
13
|
+
import TableSettingProvider from "./provider/tableSetting/TableSettingProvider";
|
|
14
|
+
import DataSourceProvider from "../provider/fields/DataSourceProvider";
|
|
15
|
+
import useVariables from "../hooks/useVariables";
|
|
16
|
+
import useColumns from "./hooks/useColumns";
|
|
17
|
+
import usePagination from "./hooks/usePagination";
|
|
18
|
+
import useActions from "../hooks/useActions";
|
|
19
|
+
import ActionsProvider from "../provider/actions/ActionsProvider";
|
|
20
|
+
import useDrawerState from "./hooks/useDrawerState";
|
|
21
|
+
import useDesignMode from "./hooks/useDesignMode";
|
|
22
|
+
import useTableQuery from "./hooks/useTableQuery";
|
|
23
|
+
import useSetRequest from "../../../hooks/useSetRequest";
|
|
24
|
+
var DRAWER_TITLES = {
|
|
25
|
+
detail: '详情',
|
|
26
|
+
edit: '编辑',
|
|
27
|
+
add: '添加'
|
|
28
|
+
};
|
|
29
|
+
var DataSourceTable = function DataSourceTable(props) {
|
|
30
|
+
var propsColumns = props.columns,
|
|
31
|
+
dataSource = props.dataSource,
|
|
32
|
+
detailContent = props.detailContent,
|
|
33
|
+
editContent = props.editContent,
|
|
34
|
+
showDetailButton = props.showDetailButton,
|
|
35
|
+
showEditButton = props.showEditButton,
|
|
36
|
+
showDeleteButton = props.showDeleteButton,
|
|
37
|
+
showAddButton = props.showAddButton,
|
|
38
|
+
addContent = props.addContent,
|
|
39
|
+
__designMode = props.__designMode,
|
|
40
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
41
|
+
useSetRequest();
|
|
42
|
+
var _useVariables = useVariables(),
|
|
43
|
+
registerVariable = _useVariables.registerVariable;
|
|
44
|
+
var _useDrawerState = useDrawerState(),
|
|
45
|
+
drawerVisible = _useDrawerState.drawerVisible,
|
|
46
|
+
setDrawerVisible = _useDrawerState.setDrawerVisible,
|
|
47
|
+
drawerType = _useDrawerState.drawerType,
|
|
48
|
+
openDrawer = _useDrawerState.openDrawer,
|
|
49
|
+
closeDrawer = _useDrawerState.closeDrawer;
|
|
50
|
+
var _useTableQuery = useTableQuery(),
|
|
51
|
+
queryPageConfig = _useTableQuery.queryPageConfig,
|
|
52
|
+
handleValuesChange = _useTableQuery.handleValuesChange,
|
|
53
|
+
refreshData = _useTableQuery.refreshData;
|
|
54
|
+
var _useActions = useActions({
|
|
55
|
+
dataSource: dataSource
|
|
56
|
+
}),
|
|
57
|
+
list = _useActions.list,
|
|
58
|
+
destroy = _useActions.destroy;
|
|
59
|
+
var _useRequest = useRequest(list, {
|
|
60
|
+
manual: true
|
|
61
|
+
}),
|
|
62
|
+
data = _useRequest.data,
|
|
63
|
+
loading = _useRequest.loading,
|
|
64
|
+
run = _useRequest.run,
|
|
65
|
+
mutate = _useRequest.mutate;
|
|
66
|
+
|
|
67
|
+
// 设计模式下对抽屉的显隐处理
|
|
68
|
+
useDesignMode(props, {
|
|
69
|
+
registerVariable: registerVariable,
|
|
70
|
+
openDrawer: openDrawer,
|
|
71
|
+
closeDrawer: closeDrawer,
|
|
72
|
+
data: data
|
|
73
|
+
});
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
if (dataSource) {
|
|
76
|
+
run(queryPageConfig);
|
|
77
|
+
} else {
|
|
78
|
+
mutate([]);
|
|
79
|
+
}
|
|
80
|
+
}, [dataSource, run, queryPageConfig]);
|
|
81
|
+
|
|
82
|
+
// 打开抽屉
|
|
83
|
+
var handleOpenDrawer = function handleOpenDrawer(record, type) {
|
|
84
|
+
openDrawer(type);
|
|
85
|
+
registerVariable === null || registerVariable === void 0 ? void 0 : registerVariable({
|
|
86
|
+
currentRecord: record
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// 关闭抽屉
|
|
91
|
+
var handleCloseDrawer = function handleCloseDrawer() {
|
|
92
|
+
closeDrawer();
|
|
93
|
+
registerVariable === null || registerVariable === void 0 ? void 0 : registerVariable({
|
|
94
|
+
currentRecord: null
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// 删除记录
|
|
99
|
+
var handleDelete = /*#__PURE__*/function () {
|
|
100
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(record) {
|
|
101
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
102
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
103
|
+
case 0:
|
|
104
|
+
registerVariable === null || registerVariable === void 0 ? void 0 : registerVariable({
|
|
105
|
+
currentRecord: record
|
|
106
|
+
});
|
|
107
|
+
setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
108
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
109
|
+
while (1) switch (_context.prev = _context.next) {
|
|
110
|
+
case 0:
|
|
111
|
+
_context.next = 2;
|
|
112
|
+
return destroy(record.id);
|
|
113
|
+
case 2:
|
|
114
|
+
refreshData();
|
|
115
|
+
case 3:
|
|
116
|
+
case "end":
|
|
117
|
+
return _context.stop();
|
|
118
|
+
}
|
|
119
|
+
}, _callee);
|
|
120
|
+
})));
|
|
121
|
+
case 2:
|
|
122
|
+
case "end":
|
|
123
|
+
return _context2.stop();
|
|
124
|
+
}
|
|
125
|
+
}, _callee2);
|
|
126
|
+
}));
|
|
127
|
+
return function handleDelete(_x) {
|
|
128
|
+
return _ref.apply(this, arguments);
|
|
129
|
+
};
|
|
130
|
+
}();
|
|
131
|
+
|
|
132
|
+
// 操作列
|
|
133
|
+
var actionsColumns = useMemo(function () {
|
|
134
|
+
return [{
|
|
135
|
+
title: '操作',
|
|
136
|
+
key: 'actions',
|
|
137
|
+
showDetailButton: showDetailButton,
|
|
138
|
+
showEditButton: showEditButton,
|
|
139
|
+
showDeleteButton: showDeleteButton,
|
|
140
|
+
render: function render(_, record) {
|
|
141
|
+
return /*#__PURE__*/React.createElement(Space, null, showDetailButton && /*#__PURE__*/React.createElement(Button, {
|
|
142
|
+
onClick: function onClick() {
|
|
143
|
+
return handleOpenDrawer(record, 'detail');
|
|
144
|
+
},
|
|
145
|
+
type: "link"
|
|
146
|
+
}, "\u8BE6\u60C5"), showEditButton && /*#__PURE__*/React.createElement(Button, {
|
|
147
|
+
onClick: function onClick() {
|
|
148
|
+
return handleOpenDrawer(record, 'edit');
|
|
149
|
+
},
|
|
150
|
+
type: "link"
|
|
151
|
+
}, "\u7F16\u8F91"), showDeleteButton && /*#__PURE__*/React.createElement(Button, {
|
|
152
|
+
onClick: function onClick() {
|
|
153
|
+
return handleDelete(record);
|
|
154
|
+
},
|
|
155
|
+
type: "link",
|
|
156
|
+
danger: true
|
|
157
|
+
}, "\u5220\u9664"));
|
|
158
|
+
}
|
|
159
|
+
}];
|
|
160
|
+
}, [showDetailButton, showEditButton, showDeleteButton]);
|
|
161
|
+
var columns = useColumns({
|
|
162
|
+
columns: propsColumns,
|
|
163
|
+
fields: dataSource === null || dataSource === void 0 ? void 0 : dataSource.fields,
|
|
164
|
+
// 操作列
|
|
165
|
+
actionsColumns: actionsColumns
|
|
166
|
+
});
|
|
167
|
+
var pagination = usePagination({
|
|
168
|
+
data: data
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
// 获取抽屉内容
|
|
172
|
+
var getDrawerContent = function getDrawerContent(type) {
|
|
173
|
+
var contentMap = {
|
|
174
|
+
detail: detailContent,
|
|
175
|
+
edit: editContent,
|
|
176
|
+
add: addContent
|
|
177
|
+
};
|
|
178
|
+
return contentMap[type];
|
|
179
|
+
};
|
|
180
|
+
return /*#__PURE__*/React.createElement(TableSettingProvider, null, /*#__PURE__*/React.createElement(DataSourceProvider, {
|
|
181
|
+
dataSource: dataSource
|
|
182
|
+
}, showAddButton && /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
style: {
|
|
184
|
+
marginBottom: 16
|
|
185
|
+
}
|
|
186
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
187
|
+
type: "primary",
|
|
188
|
+
onClick: function onClick() {
|
|
189
|
+
return handleOpenDrawer(null, 'add');
|
|
190
|
+
}
|
|
191
|
+
}, "\u6DFB\u52A0")), /*#__PURE__*/React.createElement(Table, _extends({}, others, {
|
|
192
|
+
columns: columns,
|
|
193
|
+
dataSource: (data === null || data === void 0 ? void 0 : data.data) || [],
|
|
194
|
+
loading: loading,
|
|
195
|
+
onValuesChange: handleValuesChange,
|
|
196
|
+
pagination: pagination
|
|
197
|
+
})), /*#__PURE__*/React.createElement(ActionsProvider, {
|
|
198
|
+
visible: drawerVisible,
|
|
199
|
+
setVisible: setDrawerVisible,
|
|
200
|
+
refreshTableData: refreshData
|
|
201
|
+
}, /*#__PURE__*/React.createElement(Drawer, {
|
|
202
|
+
title: DRAWER_TITLES[drawerType],
|
|
203
|
+
open: drawerVisible,
|
|
204
|
+
onClose: handleCloseDrawer,
|
|
205
|
+
destroyOnClose: true
|
|
206
|
+
}, getDrawerContent(drawerType)))));
|
|
207
|
+
};
|
|
208
|
+
export default DataSourceTable;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableSettingContextType } from './TableSettingContext';
|
|
3
|
+
/**
|
|
4
|
+
* @title: 表单设置Provider
|
|
5
|
+
* @description: 提供表单设置信息
|
|
6
|
+
*/
|
|
7
|
+
declare const TableSettingProvider: React.FC<TableSettingContextType>;
|
|
8
|
+
export default TableSettingProvider;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TableSettingContext from "./TableSettingContext";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title: 表单设置Provider
|
|
6
|
+
* @description: 提供表单设置信息
|
|
7
|
+
*/
|
|
8
|
+
var TableSettingProvider = function TableSettingProvider(props) {
|
|
9
|
+
var children = props.children,
|
|
10
|
+
dataSource = props.dataSource;
|
|
11
|
+
var value = React.useMemo(function () {
|
|
12
|
+
return {
|
|
13
|
+
dataSource: dataSource
|
|
14
|
+
};
|
|
15
|
+
}, [dataSource]);
|
|
16
|
+
return /*#__PURE__*/React.createElement(TableSettingContext.Provider, {
|
|
17
|
+
value: value
|
|
18
|
+
}, children);
|
|
19
|
+
};
|
|
20
|
+
export default TableSettingProvider;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ColumnType } from "antd/es/table";
|
|
3
|
+
import { DataSourceType } from "../provider/fields/DataSourceContext";
|
|
4
|
+
export interface DataSourceTableProps {
|
|
5
|
+
dataSource: DataSourceType;
|
|
6
|
+
columns: ColumnType<any>[];
|
|
7
|
+
showDetailButton?: boolean;
|
|
8
|
+
showEditButton?: boolean;
|
|
9
|
+
showDeleteButton?: boolean;
|
|
10
|
+
showAddButton?: boolean;
|
|
11
|
+
detailContent?: React.ReactNode;
|
|
12
|
+
editContent?: React.ReactNode;
|
|
13
|
+
addContent?: React.ReactNode;
|
|
14
|
+
__designMode: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CheckboxProps, CheckboxGroupProps } from './type';
|
|
3
|
+
declare type CheckboxReadPrettyType = React.FC<CheckboxProps> & {
|
|
4
|
+
Group: React.FC<CheckboxGroupProps>;
|
|
5
|
+
};
|
|
6
|
+
declare const CheckboxReadPretty: CheckboxReadPrettyType;
|
|
7
|
+
export default CheckboxReadPretty;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import useValueMap from "../../hooks/useValueMap";
|
|
2
|
+
import { renderValueWithMap } from "../../dataSourceForm/utils";
|
|
3
|
+
var CheckboxReadPretty = function CheckboxReadPretty(props) {
|
|
4
|
+
var value = props.value;
|
|
5
|
+
return renderValueWithMap(value);
|
|
6
|
+
};
|
|
7
|
+
var CheckboxGroupReadPretty = function CheckboxGroupReadPretty(props) {
|
|
8
|
+
var value = props.value,
|
|
9
|
+
options = props.options;
|
|
10
|
+
var valueMap = useValueMap(options || []);
|
|
11
|
+
return renderValueWithMap(value, valueMap);
|
|
12
|
+
};
|
|
13
|
+
CheckboxReadPretty.Group = CheckboxGroupReadPretty;
|
|
14
|
+
export default CheckboxReadPretty;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type CheckboxComponent = React.FC & {
|
|
3
|
+
Group: typeof CheckboxGroupWithMode;
|
|
4
|
+
};
|
|
5
|
+
declare const CheckboxWithMode: CheckboxComponent;
|
|
6
|
+
declare const CheckboxGroupWithMode: import("react").FC<import("./type").CheckboxGroupProps & import("../../dataSourceForm/utils").WithModeProps>;
|
|
7
|
+
export default CheckboxWithMode;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { withMode } from "../../dataSourceForm/utils";
|
|
2
|
+
import AntCheckbox from "../../../checkbox";
|
|
3
|
+
import ReadPretty from "./ReadPretty";
|
|
4
|
+
var CheckboxWithMode = withMode(AntCheckbox, ReadPretty);
|
|
5
|
+
var CheckboxGroupWithMode = withMode(AntCheckbox.Group, ReadPretty.Group);
|
|
6
|
+
CheckboxWithMode.Group = CheckboxGroupWithMode;
|
|
7
|
+
export default CheckboxWithMode;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import CheckboxWithMode from "./WithMode";
|
|
2
|
+
import { withFormItem } from "../../dataSourceForm/utils";
|
|
3
|
+
var Checkbox = withFormItem(CheckboxWithMode);
|
|
4
|
+
var CheckboxGroupWithFormItem = withFormItem(CheckboxWithMode.Group);
|
|
5
|
+
Checkbox.Group = CheckboxGroupWithFormItem;
|
|
6
|
+
export default Checkbox;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CheckboxProps as AntCheckboxProps } from 'antd';
|
|
2
|
+
import { CheckboxGroupProps as AntCheckboxGroupProps } from 'antd/es/checkbox';
|
|
3
|
+
import { ModeType } from "../../dataSourceForm/type";
|
|
4
|
+
export interface CheckboxProps extends AntCheckboxProps {
|
|
5
|
+
renderMode: ModeType;
|
|
6
|
+
}
|
|
7
|
+
export interface CheckboxGroupProps extends AntCheckboxGroupProps {
|
|
8
|
+
renderMode: ModeType;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ColorPicker } from 'antd';
|
|
4
|
+
var ColorPickerReadPretty = function ColorPickerReadPretty(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(ColorPicker, _extends({}, props, {
|
|
6
|
+
open: false
|
|
7
|
+
}));
|
|
8
|
+
};
|
|
9
|
+
export default ColorPickerReadPretty;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
var DatePickerReadPretty = function DatePickerReadPretty(props) {
|
|
4
|
+
var value = props.value;
|
|
5
|
+
return /*#__PURE__*/React.createElement("span", null, value ? dayjs(value).format('YYYY-MM-DD HH:mm:ss') : '');
|
|
6
|
+
};
|
|
7
|
+
export default DatePickerReadPretty;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _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; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
import { DatePicker as AntDatePicker } from 'antd';
|
|
8
|
+
import dayjs from 'dayjs';
|
|
9
|
+
import { isString } from '@pisell/utils';
|
|
10
|
+
import ReadPretty from "./ReadPretty";
|
|
11
|
+
import { withMode } from "../../dataSourceForm/utils";
|
|
12
|
+
var DatePickerWithMode = withMode(AntDatePicker, ReadPretty, function (props) {
|
|
13
|
+
return _objectSpread(_objectSpread({}, props), {}, {
|
|
14
|
+
value: isString(props.value) ? dayjs(props.value) : props.value
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
export default DatePickerWithMode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import JSON from '../Input.Json';
|
|
3
|
+
import Password from '../Input.Password';
|
|
4
|
+
import TextArea from '../Input.TextArea';
|
|
5
|
+
import Url from '../Input.Url';
|
|
6
|
+
declare type InputComponent = React.FC & {
|
|
7
|
+
JSON: typeof JSON;
|
|
8
|
+
Password: typeof Password;
|
|
9
|
+
TextArea: typeof TextArea;
|
|
10
|
+
URL: typeof Url;
|
|
11
|
+
};
|
|
12
|
+
declare const Input: InputComponent;
|
|
13
|
+
export default Input;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import JSON from "../Input.Json";
|
|
2
|
+
import Password from "../Input.Password";
|
|
3
|
+
import TextArea from "../Input.TextArea";
|
|
4
|
+
import Url from "../Input.Url";
|
|
5
|
+
import InputWithMode from "./WithMode";
|
|
6
|
+
import { withFormItem } from "../../dataSourceForm/utils";
|
|
7
|
+
var Input = withFormItem(InputWithMode);
|
|
8
|
+
Input.JSON = JSON;
|
|
9
|
+
Input.Password = Password;
|
|
10
|
+
Input.TextArea = TextArea;
|
|
11
|
+
Input.URL = Url;
|
|
12
|
+
export default Input;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { isString, isPlainObject } from '@pisell/utils';
|
|
3
|
+
var JsonReadPretty = function JsonReadPretty(props) {
|
|
4
|
+
if (isString(props.value)) {
|
|
5
|
+
return /*#__PURE__*/React.createElement("span", null, props.value);
|
|
6
|
+
} else if (isPlainObject(props.value)) {
|
|
7
|
+
return /*#__PURE__*/React.createElement("span", null, JSON.stringify(props.value, null, 2));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
export default JsonReadPretty;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const JsonWithMode: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../../dataSourceForm/utils").WithModeProps>;
|
|
3
|
+
export default JsonWithMode;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const Json: React.FC<import("antd/es/input").TextAreaProps & React.RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
|
|
3
|
+
export default Json;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|