@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,54 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.tsx
|
|
30
|
+
var FormSettingProvider_exports = {};
|
|
31
|
+
__export(FormSettingProvider_exports, {
|
|
32
|
+
default: () => FormSettingProvider_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(FormSettingProvider_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_FormSettingContext = __toESM(require("./FormSettingContext"));
|
|
37
|
+
var FormSettingProvider = (props) => {
|
|
38
|
+
const { children, mode, groupInfoPosition, currentValue } = props;
|
|
39
|
+
const value = import_react.default.useMemo(() => {
|
|
40
|
+
return {
|
|
41
|
+
mode,
|
|
42
|
+
groupInfoPosition,
|
|
43
|
+
currentValue
|
|
44
|
+
};
|
|
45
|
+
}, [mode, groupInfoPosition, currentValue]);
|
|
46
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
47
|
+
import_FormSettingContext.default.Provider,
|
|
48
|
+
{
|
|
49
|
+
value
|
|
50
|
+
},
|
|
51
|
+
children
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
var FormSettingProvider_default = FormSettingProvider;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/dataSourceComponents/dataSourceForm/provider/hooks/useFormSetting.ts
|
|
30
|
+
var useFormSetting_exports = {};
|
|
31
|
+
__export(useFormSetting_exports, {
|
|
32
|
+
default: () => useFormSetting_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(useFormSetting_exports);
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_FormSettingContext = __toESM(require("../formSetting/FormSettingContext"));
|
|
37
|
+
var useFormSetting = () => {
|
|
38
|
+
const config = (0, import_react.useContext)(import_FormSettingContext.default);
|
|
39
|
+
return config;
|
|
40
|
+
};
|
|
41
|
+
var useFormSetting_default = useFormSetting;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
export interface DataSourceType {
|
|
2
|
+
key: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
status: string;
|
|
5
|
+
type: string;
|
|
6
|
+
isDBInstance: boolean;
|
|
7
|
+
collections: Collection[];
|
|
8
|
+
}
|
|
9
|
+
export declare type ActionsItem = {
|
|
10
|
+
method: string;
|
|
11
|
+
path: string;
|
|
12
|
+
params: {
|
|
13
|
+
name: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
16
|
+
headers: {
|
|
17
|
+
name: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[];
|
|
20
|
+
body: Record<string, any>;
|
|
21
|
+
};
|
|
22
|
+
export interface Collection {
|
|
23
|
+
name: string;
|
|
24
|
+
title: string;
|
|
25
|
+
tableName: string;
|
|
26
|
+
timestamps: boolean;
|
|
27
|
+
autoGenId: boolean;
|
|
28
|
+
filterTargetKey: string;
|
|
29
|
+
fields: Field[];
|
|
30
|
+
introspected: boolean;
|
|
31
|
+
unavailableActions: any[];
|
|
32
|
+
actions: {
|
|
33
|
+
get: ActionsItem;
|
|
34
|
+
update: ActionsItem;
|
|
35
|
+
create: ActionsItem;
|
|
36
|
+
delete: ActionsItem;
|
|
37
|
+
list: ActionsItem;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface Field {
|
|
41
|
+
name: string;
|
|
42
|
+
type: string;
|
|
43
|
+
allowNull: boolean;
|
|
44
|
+
primaryKey: boolean;
|
|
45
|
+
unique: boolean;
|
|
46
|
+
autoIncrement: boolean;
|
|
47
|
+
description?: (null | string)[];
|
|
48
|
+
possibleTypes?: string[];
|
|
49
|
+
rawType: string;
|
|
50
|
+
interface: string;
|
|
51
|
+
uiSchema: UiSchema;
|
|
52
|
+
key?: string;
|
|
53
|
+
collectionName?: string;
|
|
54
|
+
collectionKey?: any;
|
|
55
|
+
dataSourceKey?: string;
|
|
56
|
+
defaultValue?: any;
|
|
57
|
+
}
|
|
58
|
+
interface UiSchema {
|
|
59
|
+
type?: string;
|
|
60
|
+
'x-component': string;
|
|
61
|
+
'x-component-props'?: Xcomponentprops;
|
|
62
|
+
'x-validator'?: string;
|
|
63
|
+
title: string;
|
|
64
|
+
default?: any;
|
|
65
|
+
enum?: any[];
|
|
66
|
+
}
|
|
67
|
+
interface Xcomponentprops {
|
|
68
|
+
style?: Style;
|
|
69
|
+
autoSize?: AutoSize;
|
|
70
|
+
stringMode?: boolean;
|
|
71
|
+
step?: string;
|
|
72
|
+
dateFormat?: string;
|
|
73
|
+
showTime?: boolean;
|
|
74
|
+
}
|
|
75
|
+
interface AutoSize {
|
|
76
|
+
minRows: number;
|
|
77
|
+
}
|
|
78
|
+
interface Style {
|
|
79
|
+
width: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 获取nocobase自定义数据源
|
|
83
|
+
*/
|
|
84
|
+
export declare const getNocobaseDataSource: () => Promise<DataSourceType[]>;
|
|
85
|
+
/**
|
|
86
|
+
* 获取nocobase主数据源
|
|
87
|
+
*/
|
|
88
|
+
export declare const getNocobaseMainDataSource: () => Promise<any>;
|
|
89
|
+
/**
|
|
90
|
+
* 获取nocobase数据源设置
|
|
91
|
+
*/
|
|
92
|
+
export declare const getNocobaseDataSourceOptions: () => Promise<any>;
|
|
93
|
+
/**
|
|
94
|
+
* 创建nocobase数据
|
|
95
|
+
*/
|
|
96
|
+
export declare const createNocobaseData: (params: {
|
|
97
|
+
key: string;
|
|
98
|
+
data: any;
|
|
99
|
+
headers?: any;
|
|
100
|
+
}) => Promise<any>;
|
|
101
|
+
/**
|
|
102
|
+
* nocobase get数据
|
|
103
|
+
*/
|
|
104
|
+
export declare const getNocobaseData: (params: {
|
|
105
|
+
key: string;
|
|
106
|
+
id: string;
|
|
107
|
+
}) => Promise<any>;
|
|
108
|
+
/**
|
|
109
|
+
* 自定义api接口
|
|
110
|
+
*/
|
|
111
|
+
export declare const customApi: (url: string, data: Record<string, any>, options: {
|
|
112
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
113
|
+
baseUrl?: string | undefined;
|
|
114
|
+
headers?: {
|
|
115
|
+
name: string;
|
|
116
|
+
value: any;
|
|
117
|
+
}[] | undefined;
|
|
118
|
+
params?: {
|
|
119
|
+
name: string;
|
|
120
|
+
value: any;
|
|
121
|
+
}[] | undefined;
|
|
122
|
+
body?: Record<string, any> | undefined;
|
|
123
|
+
}) => Promise<any>;
|
|
124
|
+
/**
|
|
125
|
+
* 更新nocobase数据
|
|
126
|
+
*/
|
|
127
|
+
export declare const updateNocobaseData: (params: {
|
|
128
|
+
key: string;
|
|
129
|
+
id: string;
|
|
130
|
+
data: any;
|
|
131
|
+
}) => Promise<any>;
|
|
132
|
+
/**
|
|
133
|
+
* 获取nocobase数据列表
|
|
134
|
+
*/
|
|
135
|
+
export declare const getNocobaseDataList: (allParams: {
|
|
136
|
+
key: string;
|
|
137
|
+
params: {
|
|
138
|
+
page: number;
|
|
139
|
+
pageSize: number;
|
|
140
|
+
};
|
|
141
|
+
headers?: any;
|
|
142
|
+
}) => Promise<any>;
|
|
143
|
+
/**
|
|
144
|
+
* 删除nocobase数据
|
|
145
|
+
*/
|
|
146
|
+
export declare const deleteNocobaseData: (key: string, id: string, headers?: any) => Promise<any>;
|
|
147
|
+
export {};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/dataSourceComponents/dataSourceForm/serve.ts
|
|
20
|
+
var serve_exports = {};
|
|
21
|
+
__export(serve_exports, {
|
|
22
|
+
createNocobaseData: () => createNocobaseData,
|
|
23
|
+
customApi: () => customApi,
|
|
24
|
+
deleteNocobaseData: () => deleteNocobaseData,
|
|
25
|
+
getNocobaseData: () => getNocobaseData,
|
|
26
|
+
getNocobaseDataList: () => getNocobaseDataList,
|
|
27
|
+
getNocobaseDataSource: () => getNocobaseDataSource,
|
|
28
|
+
getNocobaseDataSourceOptions: () => getNocobaseDataSourceOptions,
|
|
29
|
+
getNocobaseMainDataSource: () => getNocobaseMainDataSource,
|
|
30
|
+
updateNocobaseData: () => updateNocobaseData
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(serve_exports);
|
|
33
|
+
var import_utils = require("../../table/utils");
|
|
34
|
+
var getNocobaseDataSource = async () => {
|
|
35
|
+
return import_utils.request.getRequest().post(
|
|
36
|
+
"/dataSources:listEnabled?paginate=false&appends%5B%5D=collections",
|
|
37
|
+
{},
|
|
38
|
+
{
|
|
39
|
+
isNocobase: true
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
var getNocobaseMainDataSource = async () => {
|
|
44
|
+
return import_utils.request.getRequest().post(
|
|
45
|
+
"/collections:list?paginate=false&appends%5B%5D=fields&sort%5B%5D=sort&filter=%7B%7D",
|
|
46
|
+
{},
|
|
47
|
+
{
|
|
48
|
+
isNocobase: true
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
var getNocobaseDataSourceOptions = async () => {
|
|
53
|
+
return import_utils.request.getRequest().post(
|
|
54
|
+
"/dataSources:list?appends=collections",
|
|
55
|
+
{},
|
|
56
|
+
{
|
|
57
|
+
isNocobase: true
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
var createNocobaseData = async (params) => {
|
|
62
|
+
const { key, data, headers } = params;
|
|
63
|
+
return import_utils.request.getRequest().post(`/${key}:create`, data, {
|
|
64
|
+
isNocobase: true,
|
|
65
|
+
headers
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
var getNocobaseData = async (params) => {
|
|
69
|
+
const { key, id } = params;
|
|
70
|
+
return import_utils.request.getRequest().get(
|
|
71
|
+
`/${key}:get?filterByTk=${id}`,
|
|
72
|
+
{},
|
|
73
|
+
{
|
|
74
|
+
isNocobase: true
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
var methodMap = {
|
|
79
|
+
GET: "get",
|
|
80
|
+
POST: "post",
|
|
81
|
+
PUT: "put",
|
|
82
|
+
DELETE: "remove"
|
|
83
|
+
};
|
|
84
|
+
var formatHeaders = (headers) => {
|
|
85
|
+
return headers == null ? void 0 : headers.reduce((acc, curr) => {
|
|
86
|
+
acc[curr.name] = curr.value;
|
|
87
|
+
return acc;
|
|
88
|
+
}, {});
|
|
89
|
+
};
|
|
90
|
+
var formatQueryString = (params = []) => params.map(
|
|
91
|
+
({ name, value }) => `${encodeURIComponent(name)}=${encodeURIComponent(value)}`
|
|
92
|
+
).join("&");
|
|
93
|
+
var formatRequestUrl = (url, baseUrl, queryString) => {
|
|
94
|
+
const baseRequestUrl = baseUrl ? `${baseUrl}${url}` : url;
|
|
95
|
+
return queryString ? `${baseRequestUrl}${baseRequestUrl.includes("?") ? "&" : "?"}${queryString}` : baseRequestUrl;
|
|
96
|
+
};
|
|
97
|
+
var customApi = async (url, data, options) => {
|
|
98
|
+
const { method, baseUrl, headers = [], params = [], body = {} } = options;
|
|
99
|
+
const requestHeaders = formatHeaders(headers);
|
|
100
|
+
const queryString = formatQueryString(params);
|
|
101
|
+
const requestUrl = formatRequestUrl(url, baseUrl, queryString);
|
|
102
|
+
const requestData = method === "GET" ? data : { ...body, ...data };
|
|
103
|
+
const requestMethod = methodMap[method];
|
|
104
|
+
return import_utils.request.getRequest()[requestMethod](requestUrl, requestData, { headers: requestHeaders, isCustomApi: true });
|
|
105
|
+
};
|
|
106
|
+
var updateNocobaseData = async (params) => {
|
|
107
|
+
const { key, id, data } = params;
|
|
108
|
+
return import_utils.request.getRequest().post(`/${key}:update?filterByTk=${id}`, data, {
|
|
109
|
+
isNocobase: true
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
var getNocobaseDataList = async (allParams) => {
|
|
113
|
+
const { key, params, headers } = allParams;
|
|
114
|
+
return import_utils.request.getRequest().get(`/${key}:list`, params, {
|
|
115
|
+
isNocobase: true,
|
|
116
|
+
fullResult: true,
|
|
117
|
+
headers
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
var deleteNocobaseData = async (key, id, headers) => {
|
|
121
|
+
return import_utils.request.getRequest().post(
|
|
122
|
+
`/${key}:destroy?filterByTk=${id}`,
|
|
123
|
+
{},
|
|
124
|
+
{
|
|
125
|
+
isNocobase: true,
|
|
126
|
+
headers
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
};
|
|
130
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
131
|
+
0 && (module.exports = {
|
|
132
|
+
createNocobaseData,
|
|
133
|
+
customApi,
|
|
134
|
+
deleteNocobaseData,
|
|
135
|
+
getNocobaseData,
|
|
136
|
+
getNocobaseDataList,
|
|
137
|
+
getNocobaseDataSource,
|
|
138
|
+
getNocobaseDataSourceOptions,
|
|
139
|
+
getNocobaseMainDataSource,
|
|
140
|
+
updateNocobaseData
|
|
141
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface SubmitButtonProps extends ButtonProps {
|
|
5
|
+
status: 'normal' | 'disabled' | 'hidden';
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
confirmConfig?: {
|
|
8
|
+
enable: boolean;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
icon: React.ReactNode;
|
|
12
|
+
okText: string;
|
|
13
|
+
cancelText: string;
|
|
14
|
+
};
|
|
15
|
+
toastConfig?: {
|
|
16
|
+
enable: boolean;
|
|
17
|
+
icon: React.ReactNode;
|
|
18
|
+
title: string;
|
|
19
|
+
};
|
|
20
|
+
refreshData?: boolean;
|
|
21
|
+
afterSubmitType?: 'none' | 'close' | 'showModal' | 'showNotification';
|
|
22
|
+
afterSubmitModalConfig?: {
|
|
23
|
+
title: string;
|
|
24
|
+
content: string;
|
|
25
|
+
okText: string;
|
|
26
|
+
};
|
|
27
|
+
afterSubmitNotificationConfig?: {
|
|
28
|
+
title: string;
|
|
29
|
+
content: string;
|
|
30
|
+
icon: React.ReactNode;
|
|
31
|
+
duration: number;
|
|
32
|
+
placement: 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
declare const SubmitButton: (props: SubmitButtonProps) => React.JSX.Element | null;
|
|
36
|
+
export default SubmitButton;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/dataSourceComponents/dataSourceForm/submitButton/index.tsx
|
|
30
|
+
var submitButton_exports = {};
|
|
31
|
+
__export(submitButton_exports, {
|
|
32
|
+
default: () => submitButton_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(submitButton_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_pisellToast = __toESM(require("../../../pisellToast"));
|
|
38
|
+
var import_pisellModal = __toESM(require("../../../pisellModal"));
|
|
39
|
+
var import_formItem = __toESM(require("../formItem"));
|
|
40
|
+
var import_useFormSetting = __toESM(require("../provider/hooks/useFormSetting"));
|
|
41
|
+
var import_useActions = __toESM(require("../../hooks/useActions"));
|
|
42
|
+
var import_useCtxActions = __toESM(require("../../hooks/useCtxActions"));
|
|
43
|
+
var import_index = require("./index.less");
|
|
44
|
+
var SubmitButton = (props) => {
|
|
45
|
+
const {
|
|
46
|
+
children,
|
|
47
|
+
status,
|
|
48
|
+
type,
|
|
49
|
+
confirmConfig,
|
|
50
|
+
toastConfig,
|
|
51
|
+
refreshData,
|
|
52
|
+
afterSubmitType,
|
|
53
|
+
afterSubmitModalConfig,
|
|
54
|
+
afterSubmitNotificationConfig
|
|
55
|
+
} = props;
|
|
56
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
57
|
+
const [api, contextHolder] = import_antd.notification.useNotification();
|
|
58
|
+
const form = import_antd.Form.useFormInstance();
|
|
59
|
+
const { mode } = (0, import_useFormSetting.default)();
|
|
60
|
+
const { setVisible, refreshTableData } = (0, import_useCtxActions.default)();
|
|
61
|
+
const { create, update } = (0, import_useActions.default)();
|
|
62
|
+
const isDisabled = status === "disabled";
|
|
63
|
+
const onSubmit = async (values) => {
|
|
64
|
+
try {
|
|
65
|
+
setLoading(true);
|
|
66
|
+
if (mode === "edit") {
|
|
67
|
+
await update(values);
|
|
68
|
+
} else if (mode === "add") {
|
|
69
|
+
const res = await create(values);
|
|
70
|
+
form == null ? void 0 : form.resetFields();
|
|
71
|
+
}
|
|
72
|
+
} catch (error) {
|
|
73
|
+
(0, import_pisellToast.default)({
|
|
74
|
+
content: `操作失败:${error.message}`
|
|
75
|
+
});
|
|
76
|
+
} finally {
|
|
77
|
+
setLoading(false);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const afterSubmitFuncMap = {
|
|
81
|
+
close: () => {
|
|
82
|
+
form.resetFields();
|
|
83
|
+
setVisible == null ? void 0 : setVisible(false);
|
|
84
|
+
},
|
|
85
|
+
showModal: () => {
|
|
86
|
+
import_pisellModal.default.success({
|
|
87
|
+
title: afterSubmitModalConfig == null ? void 0 : afterSubmitModalConfig.title,
|
|
88
|
+
content: afterSubmitModalConfig == null ? void 0 : afterSubmitModalConfig.content,
|
|
89
|
+
okText: afterSubmitModalConfig == null ? void 0 : afterSubmitModalConfig.okText
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
showNotification: () => {
|
|
93
|
+
api.open({
|
|
94
|
+
message: afterSubmitNotificationConfig == null ? void 0 : afterSubmitNotificationConfig.title,
|
|
95
|
+
description: afterSubmitNotificationConfig == null ? void 0 : afterSubmitNotificationConfig.content,
|
|
96
|
+
duration: afterSubmitNotificationConfig == null ? void 0 : afterSubmitNotificationConfig.duration,
|
|
97
|
+
placement: afterSubmitNotificationConfig == null ? void 0 : afterSubmitNotificationConfig.placement
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const validateFields = () => {
|
|
102
|
+
return form.validateFields();
|
|
103
|
+
};
|
|
104
|
+
const handleValideFieldsSubmit = async () => {
|
|
105
|
+
try {
|
|
106
|
+
await validateFields();
|
|
107
|
+
const values = form.getFieldsValue(true);
|
|
108
|
+
console.log(values, "values");
|
|
109
|
+
await onSubmit(values);
|
|
110
|
+
if (refreshData) {
|
|
111
|
+
refreshTableData == null ? void 0 : refreshTableData();
|
|
112
|
+
}
|
|
113
|
+
if (toastConfig == null ? void 0 : toastConfig.enable) {
|
|
114
|
+
(0, import_pisellToast.default)({
|
|
115
|
+
content: toastConfig.title
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
if (afterSubmitType) {
|
|
119
|
+
const afterSubmitFunc = afterSubmitFuncMap[afterSubmitType];
|
|
120
|
+
if (afterSubmitFunc) {
|
|
121
|
+
afterSubmitFunc();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
} catch (error) {
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
const onSubmitClick = async () => {
|
|
128
|
+
await validateFields();
|
|
129
|
+
if (confirmConfig == null ? void 0 : confirmConfig.enable) {
|
|
130
|
+
return import_pisellModal.default.confirm({
|
|
131
|
+
title: confirmConfig.title,
|
|
132
|
+
content: confirmConfig.content,
|
|
133
|
+
okText: confirmConfig.okText,
|
|
134
|
+
cancelText: confirmConfig.cancelText,
|
|
135
|
+
onOk: () => {
|
|
136
|
+
handleValideFieldsSubmit();
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
handleValideFieldsSubmit();
|
|
141
|
+
};
|
|
142
|
+
if (status === "hidden" || mode === "view") {
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
return /* @__PURE__ */ import_react.default.createElement(import_formItem.default, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-data-source-form-submit-button-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
|
|
146
|
+
import_antd.Button,
|
|
147
|
+
{
|
|
148
|
+
type,
|
|
149
|
+
size: "large",
|
|
150
|
+
loading,
|
|
151
|
+
onClick: onSubmitClick,
|
|
152
|
+
disabled: isDisabled
|
|
153
|
+
},
|
|
154
|
+
children
|
|
155
|
+
), contextHolder));
|
|
156
|
+
};
|
|
157
|
+
var submitButton_default = SubmitButton;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DataSourceType } from "../provider/fields/DataSourceContext";
|
|
3
|
+
export declare type ModeType = 'edit' | 'add' | 'view' | 'disabled' | 'hidden';
|
|
4
|
+
export interface DataSourceFormProps {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
dataSource: DataSourceType;
|
|
8
|
+
showTitle: boolean;
|
|
9
|
+
showDescription: boolean;
|
|
10
|
+
groupInfoPosition: 'top' | 'side';
|
|
11
|
+
variables: any[];
|
|
12
|
+
mode?: ModeType;
|
|
13
|
+
currentValue?: 'server' | 'local';
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/components/dataSourceComponents/dataSourceForm/type.ts
|
|
16
|
+
var type_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(type_exports);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ModeType } from './type';
|
|
3
|
+
export interface WithModeProps {
|
|
4
|
+
renderMode?: ModeType;
|
|
5
|
+
value?: any;
|
|
6
|
+
onChange?: (value: any) => void;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @title: 增加renderMode属性
|
|
11
|
+
* @description: 基于renderMode属性控制渲染模式
|
|
12
|
+
* @return: *
|
|
13
|
+
* @Author: shengjie.zuo
|
|
14
|
+
* @Date: 2024-11-23 17:13:18
|
|
15
|
+
*/
|
|
16
|
+
export declare const withMode: <P extends object>(FieldComponent: React.ComponentType<P>, ReadPrettyComponent?: React.ComponentType<P & {
|
|
17
|
+
renderMode: ModeType;
|
|
18
|
+
}> | undefined, transformProps?: ((props: P, renderMode: ModeType) => P) | undefined) => React.FC<P & WithModeProps>;
|
|
19
|
+
export interface WithFormItemProps {
|
|
20
|
+
name: string;
|
|
21
|
+
label?: string;
|
|
22
|
+
mode?: ModeType;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}
|
|
25
|
+
export declare const formItemNameReplace: (name: string) => string;
|
|
26
|
+
export declare const formItemNameReverse: (name: string) => string;
|
|
27
|
+
/**
|
|
28
|
+
* @title: 追加formItem层
|
|
29
|
+
* @description:
|
|
30
|
+
* @return: *
|
|
31
|
+
* @Author: shengjie.zuo
|
|
32
|
+
* @Date: 2024-11-23 17:14:25
|
|
33
|
+
*/
|
|
34
|
+
export declare const withFormItem: <P extends object>(WrappedComponent: React.ComponentType<P>) => React.FC<P & WithFormItemProps>;
|
|
35
|
+
export declare const getNestedValue: (obj: Record<string, any>, path: string) => Record<string, any>;
|
|
36
|
+
export declare const renderValueWithMap: (value: any, valueMap?: Record<string, string>) => React.JSX.Element | null;
|