@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,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface VariablesContextType {
|
|
3
|
+
variables?: Record<string, any>;
|
|
4
|
+
registerVariable?: (value: Record<string, any>) => void;
|
|
5
|
+
parseVariable?: (str: string, localVariables: Record<string, any>) => any;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const VariablesContext: import("react").Context<VariablesContextType>;
|
|
9
|
+
export default VariablesContext;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
var initialContext = {
|
|
3
|
+
variables: {},
|
|
4
|
+
registerVariable: function registerVariable() {},
|
|
5
|
+
parseVariable: function parseVariable() {}
|
|
6
|
+
};
|
|
7
|
+
export var VariablesContext = /*#__PURE__*/createContext(initialContext);
|
|
8
|
+
export default VariablesContext;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React, { useMemo, useRef, useEffect } from 'react';
|
|
2
|
+
import { isArr, isString, isUndefined } from '@pisell/utils';
|
|
3
|
+
import VariablesContext from "./VariablesContext";
|
|
4
|
+
import { getNestedValue } from "../../dataSourceForm/utils";
|
|
5
|
+
import { mergeWith } from "../../../../utils";
|
|
6
|
+
import { useMemoizedFn } from 'ahooks';
|
|
7
|
+
|
|
8
|
+
// 默认合并逻辑 数组直接覆盖
|
|
9
|
+
var defaultCustomizer = function defaultCustomizer(objValue, srcValue) {
|
|
10
|
+
if (isArr(srcValue)) {
|
|
11
|
+
return srcValue;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
var VARIABLE_PATTERN = /{{([^}]+)}}/g;
|
|
15
|
+
var isVariableKey = function isVariableKey(key) {
|
|
16
|
+
var reg = /{{([^}]+)}}/;
|
|
17
|
+
return reg.test(key);
|
|
18
|
+
};
|
|
19
|
+
var getVariableKey = function getVariableKey(str) {
|
|
20
|
+
var reg = /{{([^}]+)}}/;
|
|
21
|
+
var match = str.match(reg);
|
|
22
|
+
return match === null || match === void 0 ? void 0 : match[1];
|
|
23
|
+
};
|
|
24
|
+
var VariablesProvider = function VariablesProvider(props) {
|
|
25
|
+
var children = props.children,
|
|
26
|
+
variables = props.variables;
|
|
27
|
+
|
|
28
|
+
// 变量存储
|
|
29
|
+
var variablesRef = useRef({});
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
if (variables) {
|
|
32
|
+
variablesRef.current = variables;
|
|
33
|
+
}
|
|
34
|
+
}, [variables]);
|
|
35
|
+
|
|
36
|
+
// 注册变量
|
|
37
|
+
var registerVariable = useMemoizedFn(function (value) {
|
|
38
|
+
variablesRef.current = mergeWith(variablesRef.current, value, defaultCustomizer);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// 解析变量
|
|
42
|
+
var parseVariable = useMemoizedFn(function (str) {
|
|
43
|
+
var _str$match;
|
|
44
|
+
var localVariables = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
45
|
+
if (!isString(str)) {
|
|
46
|
+
return str;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 如果整个字符串就是一个变量模式,直接返回变量值
|
|
50
|
+
if (((_str$match = str.match(VARIABLE_PATTERN)) === null || _str$match === void 0 ? void 0 : _str$match[0]) === str) {
|
|
51
|
+
var key = getVariableKey(str);
|
|
52
|
+
if (!key) return str;
|
|
53
|
+
var localValue = getNestedValue(localVariables, key);
|
|
54
|
+
if (!isUndefined(localValue)) {
|
|
55
|
+
return localValue;
|
|
56
|
+
}
|
|
57
|
+
var globalValue = getNestedValue(variablesRef.current, key);
|
|
58
|
+
return isUndefined(globalValue) ? str : globalValue;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// 否则替换字符串中的所有变量
|
|
62
|
+
return str.replace(VARIABLE_PATTERN, function (match, key) {
|
|
63
|
+
var localValue = getNestedValue(localVariables, key);
|
|
64
|
+
if (!isUndefined(localValue)) {
|
|
65
|
+
return localValue;
|
|
66
|
+
}
|
|
67
|
+
var globalValue = getNestedValue(variablesRef.current, key);
|
|
68
|
+
return isUndefined(globalValue) ? match : globalValue;
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
var value = useMemo(function () {
|
|
72
|
+
return {
|
|
73
|
+
variables: variablesRef.current,
|
|
74
|
+
registerVariable: registerVariable,
|
|
75
|
+
parseVariable: parseVariable
|
|
76
|
+
};
|
|
77
|
+
}, [registerVariable, parseVariable]);
|
|
78
|
+
return /*#__PURE__*/React.createElement(VariablesContext.Provider, {
|
|
79
|
+
value: value
|
|
80
|
+
}, children);
|
|
81
|
+
};
|
|
82
|
+
export default VariablesProvider;
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
formRef: React.RefObject<any>;
|
|
4
|
-
componentDidUpdate(prevProps: any): void;
|
|
5
|
-
componentDidMount(): void;
|
|
6
|
-
render(): React.JSX.Element;
|
|
7
|
-
}
|
|
8
|
-
export default Form;
|
|
1
|
+
declare const _default: any;
|
|
2
|
+
export default _default;
|
|
@@ -20,6 +20,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
20
20
|
import React, { Component, createRef } from 'react';
|
|
21
21
|
import { Form as OriginalForm } from 'antd';
|
|
22
22
|
import { withSingleFunctionChild } from "../../utils/hoc";
|
|
23
|
+
import { isArr } from '@pisell/utils';
|
|
23
24
|
var Form = /*#__PURE__*/function (_Component) {
|
|
24
25
|
_inherits(Form, _Component);
|
|
25
26
|
var _super = _createSuper(Form);
|
|
@@ -87,12 +88,13 @@ var Form = /*#__PURE__*/function (_Component) {
|
|
|
87
88
|
}(Component);
|
|
88
89
|
Form.Item = function (props) {
|
|
89
90
|
var name = props.name,
|
|
91
|
+
propsRules = props.rules,
|
|
90
92
|
requiredobj = props.requiredobj,
|
|
91
93
|
typeobj = props.typeobj,
|
|
92
94
|
patternobj = props.patternobj,
|
|
93
95
|
lenobj = props.lenobj,
|
|
94
96
|
_validator = props.validator;
|
|
95
|
-
var rules = [];
|
|
97
|
+
var rules = isArr(propsRules) ? propsRules : [];
|
|
96
98
|
if (requiredobj && requiredobj.required) {
|
|
97
99
|
rules.push(requiredobj);
|
|
98
100
|
}
|
|
@@ -11,6 +11,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
11
11
|
import React, { useMemo } from 'react';
|
|
12
12
|
import ConfigProvider from "../config-provider";
|
|
13
13
|
import { AdapterDayjs } from '@pisell/date-picker/es/AdapterDayjs';
|
|
14
|
+
import VariablesProvider from "../dataSourceComponents/provider/variables/VariablesProvider";
|
|
14
15
|
import { LocalizationProvider, createTheme, ThemeProvider, LocaleProvider } from '@pisell/date-picker';
|
|
15
16
|
import { App } from 'antd';
|
|
16
17
|
import enUS from 'antd/locale/en_US';
|
|
@@ -250,11 +251,11 @@ var Page = function Page(props) {
|
|
|
250
251
|
}
|
|
251
252
|
}, /*#__PURE__*/React.createElement(PisellConfigProvider, {
|
|
252
253
|
locale: locale
|
|
253
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
254
|
+
}, /*#__PURE__*/React.createElement(VariablesProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
254
255
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
255
256
|
'--theme-color': themeColor || '#7F56D9'
|
|
256
257
|
}),
|
|
257
258
|
className: className
|
|
258
|
-
}, children)))))));
|
|
259
|
+
}, children))))))));
|
|
259
260
|
};
|
|
260
261
|
export default Page;
|
|
@@ -17,7 +17,6 @@ import "./index.less";
|
|
|
17
17
|
* @constructor
|
|
18
18
|
*/
|
|
19
19
|
var PisellAnchor = function PisellAnchor(props) {
|
|
20
|
-
console.log('%c [ props ]-21', 'font-size:13px; background:pink; color:#bf2c9f;', props);
|
|
21
20
|
var _useState = useState(true),
|
|
22
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23
22
|
leftDisabled = _useState2[0],
|
|
@@ -3,7 +3,6 @@ import { Statistic } from 'antd';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import "./index.less";
|
|
5
5
|
var pisellStatistic = function pisellStatistic(props) {
|
|
6
|
-
console.log('%c [ props ]-6', 'font-size:13px; background:pink; color:#bf2c9f;', props);
|
|
7
6
|
useEffect(function () {
|
|
8
7
|
document.body.id = 'body';
|
|
9
8
|
}, []);
|
|
@@ -13,7 +13,6 @@ var PisellUpload = function PisellUpload(props) {
|
|
|
13
13
|
text1 = props.text1,
|
|
14
14
|
text2 = props.text2,
|
|
15
15
|
uploadType = props.uploadType;
|
|
16
|
-
console.log('%c [ props ]-13', 'font-size:13px; background:pink; color:#bf2c9f;', props);
|
|
17
16
|
useEffect(function () {
|
|
18
17
|
document.body.id = 'body';
|
|
19
18
|
}, []);
|
|
@@ -12,7 +12,6 @@ import React, { useState } from 'react';
|
|
|
12
12
|
import { Upload } from 'antd';
|
|
13
13
|
import ImgCrop from 'antd-img-crop';
|
|
14
14
|
var pisellUploadCrop = function pisellUploadCrop(props) {
|
|
15
|
-
console.log('%c [ props ]-12', 'font-size:13px; background:pink; color:#bf2c9f;', props);
|
|
16
15
|
var cropShape = props.cropShape; // 裁剪形状
|
|
17
16
|
var _useState = useState([]),
|
|
18
17
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -16,7 +16,6 @@ import classNames from 'classnames';
|
|
|
16
16
|
var walletNumber = '123871283618273687123'; //钱包号
|
|
17
17
|
var PisellWalletCard = function PisellWalletCard(props) {
|
|
18
18
|
var _context$appHelper;
|
|
19
|
-
console.log('%c [ props ]-12', 'font-size:13px; background:pink; color:#bf2c9f;', props);
|
|
20
19
|
var mode = props.mode,
|
|
21
20
|
cardStyle = props.cardStyle,
|
|
22
21
|
codeType = props.codeType,
|
|
@@ -32,7 +31,6 @@ var PisellWalletCard = function PisellWalletCard(props) {
|
|
|
32
31
|
coupon = props.coupon,
|
|
33
32
|
vouCher = props.vouCher,
|
|
34
33
|
discountCard = props.discountCard; // 裁剪形状
|
|
35
|
-
console.log('%c [ props ]-43', 'font-size:13px; background:pink; color:#bf2c9f;', props);
|
|
36
34
|
var context = useEngineContext();
|
|
37
35
|
var _useState = useState(false),
|
|
38
36
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import QRCode from "../qrcode";
|
|
4
4
|
import Iconfont from "../iconfont";
|
|
@@ -48,6 +48,9 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
|
|
|
48
48
|
_props$showDiscount = props.showDiscount,
|
|
49
49
|
showDiscount = _props$showDiscount === void 0 ? false : _props$showDiscount,
|
|
50
50
|
discount = props.discount;
|
|
51
|
+
useEffect(function () {
|
|
52
|
+
document.body.id = 'body';
|
|
53
|
+
}, []);
|
|
51
54
|
return /*#__PURE__*/React.createElement("div", {
|
|
52
55
|
className: classNames('pisell-wallet-pass-card', {
|
|
53
56
|
'pisell-card-disabled': disabled,
|
|
@@ -3,9 +3,10 @@ import classNames from 'classnames';
|
|
|
3
3
|
import { Button } from 'antd';
|
|
4
4
|
import "./index.less";
|
|
5
5
|
var prefix = 'pisell-lowcode-';
|
|
6
|
-
var
|
|
7
|
-
var item = _ref.item
|
|
8
|
-
|
|
6
|
+
var Action = function Action(_ref) {
|
|
7
|
+
var item = _ref.item,
|
|
8
|
+
onAction = _ref.onAction;
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
9
10
|
className: classNames("".concat(prefix, "product-actions"))
|
|
10
11
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
11
12
|
className: classNames("".concat(prefix, "product-actions-item")),
|
|
@@ -13,8 +14,8 @@ var Actions = function Actions(_ref) {
|
|
|
13
14
|
onClick: function onClick(e) {
|
|
14
15
|
e.preventDefault();
|
|
15
16
|
e.stopPropagation();
|
|
16
|
-
|
|
17
|
+
onAction();
|
|
17
18
|
}
|
|
18
|
-
}, item.
|
|
19
|
+
}, item._actionText));
|
|
19
20
|
};
|
|
20
|
-
export default
|
|
21
|
+
export default Action;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
|
-
declare const Footer: ({ item,
|
|
3
|
+
declare const Footer: ({ item, hideDivider, type }: any) => React.JSX.Element;
|
|
4
4
|
export default Footer;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { _formatAmount } from "../Packages/utils";
|
|
4
4
|
import Divider from "../Divider";
|
|
5
5
|
import "./index.less";
|
|
6
|
+
import { locales } from '@pisell/utils';
|
|
6
7
|
var prefix = 'pisell-lowcode-';
|
|
7
8
|
var Footer = function Footer(_ref) {
|
|
9
|
+
var _item$_extend, _item$_extend2;
|
|
8
10
|
var item = _ref.item,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
hideDivider = _ref.hideDivider,
|
|
12
|
+
type = _ref.type;
|
|
11
13
|
/**
|
|
12
14
|
* @title: 折扣
|
|
13
15
|
* @description:
|
|
@@ -21,12 +23,16 @@ var Footer = function Footer(_ref) {
|
|
|
21
23
|
if (!(item !== null && item !== void 0 && item.hasOwnProperty('origin_total'))) return false;
|
|
22
24
|
return Number(item === null || item === void 0 ? void 0 : item.total) != Number(item === null || item === void 0 ? void 0 : item.origin_total);
|
|
23
25
|
}, [item]);
|
|
24
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !hideDivider ? /*#__PURE__*/React.createElement(Divider,
|
|
26
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !hideDivider ? /*#__PURE__*/React.createElement(Divider, {
|
|
27
|
+
type: type !== 'total' ? 'inside' : ''
|
|
28
|
+
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
25
29
|
className: classNames("".concat(prefix, "packages-product-footer"), hideDivider && "".concat(prefix, "packages-product-hide-divider-footer"))
|
|
26
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, _formatAmount(item === null || item === void 0 ? void 0 : item.total,
|
|
30
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, _formatAmount(item === null || item === void 0 ? void 0 : item.total, item === null || item === void 0 ? void 0 : item.symbol)), /*#__PURE__*/React.createElement("span", null, "\xD7".concat(item === null || item === void 0 ? void 0 : item.num)), /*#__PURE__*/React.createElement("span", {
|
|
27
31
|
className: "".concat(prefix, "packages-product-footer-total")
|
|
28
|
-
}, "".concat(
|
|
32
|
+
}, "".concat(item === null || item === void 0 ? void 0 : item.symbol, " ").concat(_formatAmount((item === null || item === void 0 ? void 0 : item.total) * (item === null || item === void 0 ? void 0 : item.num))))), isDiscount ? /*#__PURE__*/React.createElement("div", {
|
|
29
33
|
className: "".concat(prefix, "packages-product-footer-discount")
|
|
30
|
-
}, /*#__PURE__*/React.createElement("span", null, _formatAmount(item === null || item === void 0 ? void 0 : item.origin_total,
|
|
34
|
+
}, /*#__PURE__*/React.createElement("span", null, _formatAmount(item === null || item === void 0 ? void 0 : item.origin_total, item === null || item === void 0 ? void 0 : item.symbol)), /*#__PURE__*/React.createElement("span", null, _formatAmount((item === null || item === void 0 ? void 0 : item.origin_total) * (item === null || item === void 0 ? void 0 : item.num), item === null || item === void 0 ? void 0 : item.symbol, 2))) : null), isDiscount && (_item$_extend = item._extend) !== null && _item$_extend !== void 0 && _item$_extend.discount_reason && type === 'total' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: "".concat(prefix, "product-item-discount-reason")
|
|
36
|
+
}, /*#__PURE__*/React.createElement("span", null, "".concat(locales.getText('pisell2.product.card.discount.reason'), ": ").concat((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.discount_reason)))) : null);
|
|
31
37
|
};
|
|
32
38
|
export default Footer;
|
|
@@ -27,4 +27,13 @@
|
|
|
27
27
|
&-packages-product-hide-divider-footer {
|
|
28
28
|
margin-top: 8px;
|
|
29
29
|
}
|
|
30
|
+
|
|
31
|
+
&-product-item-discount-reason {
|
|
32
|
+
color: var(--gray-500, #667085);
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
font-style: normal;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
line-height: 20px;
|
|
37
|
+
white-space: break-spaces;
|
|
38
|
+
}
|
|
30
39
|
}
|
|
@@ -8,10 +8,9 @@ import "./index.less";
|
|
|
8
8
|
var prefix = 'pisell-lowcode-';
|
|
9
9
|
var Header = function Header(_ref) {
|
|
10
10
|
var isShowDelete = _ref.isShowDelete,
|
|
11
|
-
|
|
12
|
-
showImage = _ref.showImage
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
item = _ref.item,
|
|
12
|
+
showImage = _ref.showImage,
|
|
13
|
+
onDelete = _ref.onDelete;
|
|
15
14
|
/**
|
|
16
15
|
* @title: 是否显示价格
|
|
17
16
|
* @description:
|
|
@@ -21,9 +20,9 @@ var Header = function Header(_ref) {
|
|
|
21
20
|
* @Date: 2024-11-23 16:13
|
|
22
21
|
*/
|
|
23
22
|
var showPrice = useMemo(function () {
|
|
24
|
-
var
|
|
25
|
-
return (
|
|
26
|
-
}, [
|
|
23
|
+
var _item$bundle, _item$options;
|
|
24
|
+
return (item === null || item === void 0 ? void 0 : (_item$bundle = item.bundle) === null || _item$bundle === void 0 ? void 0 : _item$bundle.length) > 0 || (item === null || item === void 0 ? void 0 : (_item$options = item.options) === null || _item$options === void 0 ? void 0 : _item$options.length) > 0;
|
|
25
|
+
}, [item === null || item === void 0 ? void 0 : item.bundle, item === null || item === void 0 ? void 0 : item.options]);
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
28
|
* @title: 样式是否居中
|
|
@@ -34,16 +33,16 @@ var Header = function Header(_ref) {
|
|
|
34
33
|
* @Date: 2024-11-23 17:37
|
|
35
34
|
*/
|
|
36
35
|
var headerCenterStyle = useMemo(function () {
|
|
37
|
-
var
|
|
38
|
-
return (
|
|
39
|
-
}, [
|
|
36
|
+
var _item$options2;
|
|
37
|
+
return (item === null || item === void 0 ? void 0 : (_item$options2 = item.options) === null || _item$options2 === void 0 ? void 0 : _item$options2.length) > 0 || (item === null || item === void 0 ? void 0 : item.product_option_string);
|
|
38
|
+
}, [item === null || item === void 0 ? void 0 : item.options, item === null || item === void 0 ? void 0 : item.product_option_string]);
|
|
40
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
40
|
className: classNames("".concat(prefix, "product-header"), headerCenterStyle && "".concat(prefix, "product-options-header"))
|
|
42
41
|
}, isShowDelete ? /*#__PURE__*/React.createElement("div", {
|
|
43
42
|
className: "".concat(prefix, "product-delete"),
|
|
44
43
|
onClick: function onClick(e) {
|
|
45
44
|
e.stopPropagation();
|
|
46
|
-
|
|
45
|
+
onDelete();
|
|
47
46
|
}
|
|
48
47
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
49
48
|
type: "text",
|
|
@@ -51,19 +50,19 @@ var Header = function Header(_ref) {
|
|
|
51
50
|
type: "pisell2-trash-01"
|
|
52
51
|
})
|
|
53
52
|
})) : null, showImage ? /*#__PURE__*/React.createElement("img", {
|
|
54
|
-
src: image.ali(
|
|
53
|
+
src: image.ali(item.cover, 64),
|
|
55
54
|
className: "".concat(prefix, "product-header-cover")
|
|
56
|
-
}) : null,
|
|
55
|
+
}) : null, item !== null && item !== void 0 && item.id ? /*#__PURE__*/React.createElement("div", {
|
|
57
56
|
className: "".concat(prefix, "product-right-wrap")
|
|
58
57
|
}, /*#__PURE__*/React.createElement("div", {
|
|
59
58
|
className: "".concat(prefix, "product-title")
|
|
60
|
-
}, /*#__PURE__*/React.createElement("span", null,
|
|
59
|
+
}, /*#__PURE__*/React.createElement("span", null, item === null || item === void 0 ? void 0 : item.title), showPrice ? /*#__PURE__*/React.createElement("span", {
|
|
61
60
|
className: "".concat(prefix, "product-title-price")
|
|
62
|
-
}, formatAmount(
|
|
61
|
+
}, formatAmount(item === null || item === void 0 ? void 0 : item.price, 2, item === null || item === void 0 ? void 0 : item.symbol)) : null), item !== null && item !== void 0 && item.product_option_string ? /*#__PURE__*/React.createElement("span", {
|
|
63
62
|
className: "".concat(prefix, "product-title-variant")
|
|
64
|
-
},
|
|
65
|
-
options:
|
|
66
|
-
amountSymbol:
|
|
63
|
+
}, item === null || item === void 0 ? void 0 : item.product_option_string) : null, /*#__PURE__*/React.createElement(Options, {
|
|
64
|
+
options: item === null || item === void 0 ? void 0 : item.options,
|
|
65
|
+
amountSymbol: item === null || item === void 0 ? void 0 : item.symbol
|
|
67
66
|
})) : null);
|
|
68
67
|
};
|
|
69
68
|
export default Header;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
7
7
|
gap: 8px;
|
|
8
|
+
padding-right: 24px;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
&-product-options-header {
|
|
@@ -17,6 +18,9 @@
|
|
|
17
18
|
top: 0;
|
|
18
19
|
right: 0;
|
|
19
20
|
cursor: pointer;
|
|
21
|
+
.pisell-lowcode-btn {
|
|
22
|
+
padding: 0;
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
&-product-header-cover {
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
+
import { locales } from '@pisell/utils';
|
|
3
4
|
import Divider from "../Divider";
|
|
4
5
|
import "./index.less";
|
|
5
6
|
var prefix = 'pisell-lowcode-';
|
|
6
7
|
var Note = function Note(_ref) {
|
|
7
8
|
var item = _ref.item,
|
|
8
|
-
type = _ref.type
|
|
9
|
+
type = _ref.type,
|
|
10
|
+
openNote = _ref.openNote;
|
|
9
11
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
|
|
10
12
|
type: type
|
|
11
13
|
}), /*#__PURE__*/React.createElement("div", {
|
|
12
14
|
className: classNames("".concat(prefix, "product-note-wrap"))
|
|
13
|
-
}, item !== null && item !== void 0 && item.note ? /*#__PURE__*/React.createElement("div", null, "
|
|
14
|
-
className: "".concat(prefix, "product-note-btn")
|
|
15
|
-
|
|
15
|
+
}, item !== null && item !== void 0 && item.note ? /*#__PURE__*/React.createElement("div", null, locales.getText('pisell2.product.card.discount.note'), ": ", item.note) : null, /*#__PURE__*/React.createElement("span", {
|
|
16
|
+
className: "".concat(prefix, "product-note-btn"),
|
|
17
|
+
onClick: function onClick(e) {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
e.stopPropagation();
|
|
20
|
+
openNote();
|
|
21
|
+
}
|
|
22
|
+
}, item !== null && item !== void 0 && item.note ? locales.getText('pisell2.product.card.discount.edit.note') : locales.getText('pisell2.product.card.discount.add.note'))));
|
|
16
23
|
};
|
|
17
24
|
export default Note;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const renderBundles: (item: any,
|
|
2
|
+
export declare const renderBundles: (item: any, hidePrice?: boolean, isShowPackageNote?: boolean) => React.JSX.Element;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Footer from "../../../AmountFooter";
|
|
3
3
|
import Note from "../../../Note";
|
|
4
|
+
import useEngineContext from "../../../../../../hooks/useEngineContext";
|
|
4
5
|
import { _formatAmount } from "../../utils";
|
|
5
6
|
import Options from "../options";
|
|
6
7
|
var prefix = 'pisell-lowcode-';
|
|
7
|
-
export var renderBundles = function renderBundles(item,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export var renderBundles = function renderBundles(item, hidePrice, isShowPackageNote) {
|
|
9
|
+
var _context$appHelper, _context$appHelper$ut;
|
|
10
|
+
var translationOriginal = function translationOriginal(text) {
|
|
11
|
+
return '';
|
|
12
|
+
};
|
|
13
|
+
var context = useEngineContext();
|
|
14
|
+
translationOriginal = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.translationOriginal;
|
|
12
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
13
16
|
key: item.id,
|
|
14
17
|
className: "".concat(prefix, "packages-product-bundle-item")
|
|
@@ -16,15 +19,14 @@ export var renderBundles = function renderBundles(item, amountSymbol, hidePrice,
|
|
|
16
19
|
className: "".concat(prefix, "packages-product-bundle-info")
|
|
17
20
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18
21
|
className: "".concat(prefix, "packages-product-bundle-info-title")
|
|
19
|
-
}, (item === null || item === void 0 ? void 0 : item.title)
|
|
22
|
+
}, translationOriginal(item === null || item === void 0 ? void 0 : item.title)), !hidePrice ? /*#__PURE__*/React.createElement("div", {
|
|
20
23
|
className: "".concat(prefix, "packages-product-bundle-info-num")
|
|
21
|
-
}, _formatAmount(item === null || item === void 0 ? void 0 : item.price,
|
|
22
|
-
options:
|
|
23
|
-
amountSymbol:
|
|
24
|
+
}, _formatAmount(item === null || item === void 0 ? void 0 : item.price, item === null || item === void 0 ? void 0 : item.symbol)) : null), /*#__PURE__*/React.createElement(Options, {
|
|
25
|
+
options: item === null || item === void 0 ? void 0 : item.option,
|
|
26
|
+
amountSymbol: item === null || item === void 0 ? void 0 : item.symbol
|
|
24
27
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
25
|
-
item: item
|
|
26
|
-
|
|
27
|
-
}), isShowNote ? /*#__PURE__*/React.createElement(Note, {
|
|
28
|
+
item: item
|
|
29
|
+
}), isShowPackageNote ? /*#__PURE__*/React.createElement(Note, {
|
|
28
30
|
item: item,
|
|
29
31
|
type: "inside"
|
|
30
32
|
}) : null);
|
|
@@ -1,3 +1,9 @@
|
|
|
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); }
|
|
1
7
|
import React from 'react';
|
|
2
8
|
import Divider from "../Divider";
|
|
3
9
|
import CollapsibleList from "./components/collapsibleList";
|
|
@@ -5,17 +11,20 @@ import { renderBundles } from "./components/collapsibleList/utils";
|
|
|
5
11
|
import "./index.less";
|
|
6
12
|
var prefix = 'pisell-lowcode-';
|
|
7
13
|
var Packages = function Packages(_ref) {
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var bundle = (
|
|
14
|
+
var item = _ref.item,
|
|
15
|
+
isShowPackageNote = _ref.isShowPackageNote;
|
|
16
|
+
var bundle = (item === null || item === void 0 ? void 0 : item.bundle) || [];
|
|
11
17
|
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", {
|
|
12
18
|
className: "".concat(prefix, "product-packages-wrap")
|
|
13
19
|
}, /*#__PURE__*/React.createElement("div", {
|
|
14
20
|
className: "".concat(prefix, "product-packages-title")
|
|
15
21
|
}, "Items in package"), /*#__PURE__*/React.createElement(CollapsibleList, {
|
|
16
22
|
list: bundle || [],
|
|
17
|
-
renderItem: function renderItem(
|
|
18
|
-
return renderBundles(
|
|
23
|
+
renderItem: function renderItem(items) {
|
|
24
|
+
return renderBundles(_objectSpread(_objectSpread({}, items), {}, {
|
|
25
|
+
symbol: item === null || item === void 0 ? void 0 : item.symbol,
|
|
26
|
+
total: items === null || items === void 0 ? void 0 : items.price
|
|
27
|
+
}), false, isShowPackageNote);
|
|
19
28
|
}
|
|
20
29
|
}))) : null;
|
|
21
30
|
};
|