@hw-component/form 0.0.4 → 0.0.5-beta-v2
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/es/CheckboxGroup/CheckBox/index.d.ts +2 -5
- package/es/CheckboxGroup/CheckBox/index.js +16 -10
- package/es/CheckboxGroup/hooks.d.ts +1 -1
- package/es/CheckboxGroup/hooks.js +37 -39
- package/es/CheckboxGroup/index.d.ts +2 -3
- package/es/CheckboxGroup/index.js +72 -27
- package/es/CheckboxGroup/modal.d.ts +13 -0
- package/es/DialogForm/DrawerForm/Footer.d.ts +7 -0
- package/es/DialogForm/DrawerForm/Footer.js +27 -0
- package/es/DialogForm/DrawerForm/Title.d.ts +3 -0
- package/es/DialogForm/DrawerForm/Title.js +21 -0
- package/es/DialogForm/DrawerForm/index.d.ts +3 -0
- package/es/DialogForm/DrawerForm/index.js +138 -0
- package/es/DialogForm/ModalForm.d.ts +3 -0
- package/es/DialogForm/ModalForm.js +119 -0
- package/es/DialogForm/hooks.d.ts +16 -0
- package/es/DialogForm/hooks.js +149 -0
- package/es/DialogForm/modal.d.ts +33 -0
- package/es/Form/Context/FormConfigProvider.d.ts +5 -0
- package/es/Form/Context/FormConfigProvider.js +49 -0
- package/es/Form/Context/index.d.ts +5 -0
- package/es/Form/Context/index.js +11 -0
- package/es/Form/FormItem/BasicItem.d.ts +4 -0
- package/es/Form/FormItem/BasicItem.js +93 -0
- package/es/Form/FormItem/Helper.d.ts +7 -0
- package/es/Form/FormItem/Helper.js +26 -0
- package/es/Form/FormItem/RegularFormItem.d.ts +3 -0
- package/es/Form/FormItem/RegularFormItem.js +25 -0
- package/es/Form/FormItem/UpFormItem.d.ts +3 -0
- package/es/Form/FormItem/UpFormItem.js +43 -0
- package/es/Form/FormItem/hooks.d.ts +8 -0
- package/es/Form/FormItem/hooks.js +38 -0
- package/es/Form/FormItem/index.d.ts +3 -0
- package/es/Form/FormItem/index.js +22 -0
- package/es/Form/HFormConnect.d.ts +5 -0
- package/es/Form/HFormConnect.js +69 -0
- package/es/Form/InitSet.d.ts +2 -0
- package/es/Form/InitSet.js +16 -0
- package/es/Form/Label.d.ts +10 -0
- package/es/Form/Label.js +49 -0
- package/es/Form/config.d.ts +29 -0
- package/es/Form/config.js +45 -0
- package/es/Form/hooks/index.d.ts +16 -0
- package/es/Form/hooks/index.js +158 -0
- package/es/Form/hooks/useDefaultRender.d.ts +3 -0
- package/es/Form/hooks/useDefaultRender.js +49 -0
- package/es/Form/hooks/useHForm.d.ts +3 -0
- package/es/Form/hooks/useHForm.js +194 -0
- package/es/Form/hooks/useInitConfigData.d.ts +8 -0
- package/es/Form/hooks/useInitConfigData.js +172 -0
- package/es/Form/index.d.ts +3 -0
- package/es/Form/index.js +103 -0
- package/es/Form/modal.d.ts +123 -0
- package/es/Input/ButtonInput.d.ts +2 -2
- package/es/Input/ButtonInput.js +38 -23
- package/es/Input/ColorInput/Picker.d.ts +3 -0
- package/es/Input/ColorInput/Picker.js +22 -0
- package/es/Input/ColorInput/data.d.ts +1 -0
- package/es/Input/ColorInput/data.js +5 -0
- package/es/Input/ColorInput/index.d.ts +3 -0
- package/es/Input/ColorInput/index.js +93 -0
- package/es/Input/InputNumber.d.ts +0 -1
- package/es/Input/InputNumber.js +19 -9
- package/es/Input/SelectInput.d.ts +2 -1
- package/es/Input/SelectInput.js +54 -25
- package/es/Input/defaultConfig.js +2 -2
- package/es/Input/index.d.ts +0 -1
- package/es/Input/index.js +20 -9
- package/es/Input/modal.d.ts +30 -0
- package/es/PageHandler/ErrorComponent.d.ts +3 -0
- package/es/PageHandler/ErrorComponent.js +38 -0
- package/es/PageHandler/LoadingComponent.d.ts +2 -0
- package/es/PageHandler/LoadingComponent.js +19 -0
- package/es/PageHandler/index.d.ts +4 -0
- package/es/PageHandler/index.js +26 -0
- package/es/PageHandler/modal.d.ts +6 -0
- package/es/RadioGroup/index.d.ts +2 -3
- package/es/RadioGroup/index.js +30 -15
- package/es/Select/components/AllSelect.d.ts +3 -4
- package/es/Select/components/AllSelect.js +36 -20
- package/es/Select/components/CheckBoxOption.js +8 -6
- package/es/Select/components/DropdownComponent.js +18 -13
- package/es/Select/components/NoFindItem.d.ts +0 -1
- package/es/Select/components/NoFindItem.js +7 -6
- package/es/Select/components/NotFoundContent.d.ts +0 -1
- package/es/Select/components/NotFoundContent.js +25 -22
- package/es/Select/defaultConfig.d.ts +0 -1
- package/es/Select/defaultConfig.js +9 -9
- package/es/Select/hooks/changeHooks.js +31 -28
- package/es/Select/hooks/norHooks.d.ts +10 -3
- package/es/Select/hooks/norHooks.js +59 -21
- package/es/Select/index.d.ts +2 -3
- package/es/Select/index.js +68 -39
- package/es/Select/modal.d.ts +9 -1
- package/es/Select/utils.js +18 -18
- package/es/Submit/index.d.ts +9 -0
- package/es/Submit/index.js +55 -0
- package/es/Switch/index.d.ts +4 -3
- package/es/Switch/index.js +39 -20
- package/es/TDPicker/RangePicker.d.ts +8 -0
- package/es/TDPicker/RangePicker.js +126 -0
- package/es/TDPicker/TimePicker.d.ts +3 -0
- package/es/TDPicker/TimePicker.js +45 -0
- package/es/TDPicker/hooks.d.ts +33 -0
- package/es/TDPicker/hooks.js +133 -0
- package/es/TDPicker/index.d.ts +4 -0
- package/es/TDPicker/index.js +48 -0
- package/es/TDPicker/modal.d.ts +35 -0
- package/es/TextArea/index.d.ts +3 -0
- package/es/TextArea/index.js +31 -0
- package/es/Upload/Btn.d.ts +3 -0
- package/es/Upload/Btn.js +36 -0
- package/es/Upload/MediaTypeEle/TypeEle.d.ts +9 -0
- package/es/Upload/MediaTypeEle/TypeEle.js +42 -0
- package/es/Upload/MediaTypeEle/index.d.ts +3 -0
- package/es/Upload/MediaTypeEle/index.js +37 -0
- package/es/Upload/Preview/index.d.ts +5 -0
- package/es/Upload/Preview/index.js +22 -0
- package/es/Upload/UrlUpload/index.d.ts +3 -0
- package/es/Upload/UrlUpload/index.js +138 -0
- package/es/Upload/enums.d.ts +5 -0
- package/es/Upload/enums.js +10 -0
- package/es/Upload/hooks/change.d.ts +3 -0
- package/es/Upload/hooks/change.js +109 -0
- package/es/Upload/hooks/customRequest.d.ts +3 -0
- package/es/Upload/hooks/customRequest.js +132 -0
- package/es/Upload/hooks/propsMaker.d.ts +2 -0
- package/es/Upload/hooks/propsMaker.js +37 -0
- package/es/Upload/index.d.ts +3 -0
- package/es/Upload/index.js +146 -0
- package/es/Upload/modal.d.ts +30 -0
- package/es/Upload/util.d.ts +5 -0
- package/es/Upload/util.js +36 -0
- package/es/config.d.ts +2 -14
- package/es/config.js +57 -10
- package/{lib/hooks/useChangeOptions.d.ts → es/hooks/index.d.ts} +3 -0
- package/es/hooks/index.js +71 -0
- package/es/index.css +42 -1
- package/es/index.d.ts +26 -11
- package/es/index.js +33 -13
- package/es/modal.d.ts +16 -0
- package/lib/CheckboxGroup/CheckBox/index.d.ts +2 -5
- package/lib/CheckboxGroup/CheckBox/index.js +13 -7
- package/lib/CheckboxGroup/hooks.d.ts +1 -1
- package/lib/CheckboxGroup/hooks.js +35 -37
- package/lib/CheckboxGroup/index.d.ts +2 -3
- package/lib/CheckboxGroup/index.js +70 -25
- package/lib/CheckboxGroup/modal.d.ts +13 -0
- package/lib/DialogForm/DrawerForm/Footer.d.ts +7 -0
- package/lib/DialogForm/DrawerForm/Footer.js +30 -0
- package/lib/DialogForm/DrawerForm/Title.d.ts +3 -0
- package/lib/DialogForm/DrawerForm/Title.js +24 -0
- package/lib/DialogForm/DrawerForm/index.d.ts +3 -0
- package/lib/DialogForm/DrawerForm/index.js +141 -0
- package/lib/DialogForm/ModalForm.d.ts +3 -0
- package/lib/DialogForm/ModalForm.js +122 -0
- package/lib/DialogForm/hooks.d.ts +16 -0
- package/lib/DialogForm/hooks.js +153 -0
- package/lib/DialogForm/modal.d.ts +33 -0
- package/lib/Form/Context/FormConfigProvider.d.ts +5 -0
- package/lib/Form/Context/FormConfigProvider.js +53 -0
- package/lib/Form/Context/index.d.ts +5 -0
- package/lib/Form/Context/index.js +14 -0
- package/lib/Form/FormItem/BasicItem.d.ts +4 -0
- package/lib/Form/FormItem/BasicItem.js +96 -0
- package/lib/Form/FormItem/Helper.d.ts +7 -0
- package/lib/Form/FormItem/Helper.js +29 -0
- package/lib/Form/FormItem/RegularFormItem.d.ts +3 -0
- package/lib/Form/FormItem/RegularFormItem.js +28 -0
- package/lib/Form/FormItem/UpFormItem.d.ts +3 -0
- package/lib/Form/FormItem/UpFormItem.js +46 -0
- package/lib/Form/FormItem/hooks.d.ts +8 -0
- package/lib/Form/FormItem/hooks.js +41 -0
- package/lib/Form/FormItem/index.d.ts +3 -0
- package/lib/Form/FormItem/index.js +25 -0
- package/lib/Form/HFormConnect.d.ts +5 -0
- package/lib/Form/HFormConnect.js +72 -0
- package/lib/Form/InitSet.d.ts +2 -0
- package/lib/Form/InitSet.js +19 -0
- package/lib/Form/Label.d.ts +10 -0
- package/lib/Form/Label.js +52 -0
- package/lib/Form/config.d.ts +29 -0
- package/lib/Form/config.js +49 -0
- package/lib/Form/hooks/index.d.ts +16 -0
- package/lib/Form/hooks/index.js +162 -0
- package/lib/Form/hooks/useDefaultRender.d.ts +3 -0
- package/lib/Form/hooks/useDefaultRender.js +50 -0
- package/lib/Form/hooks/useHForm.d.ts +3 -0
- package/lib/Form/hooks/useHForm.js +197 -0
- package/lib/Form/hooks/useInitConfigData.d.ts +8 -0
- package/lib/Form/hooks/useInitConfigData.js +175 -0
- package/lib/Form/index.d.ts +3 -0
- package/lib/Form/index.js +106 -0
- package/lib/Form/modal.d.ts +123 -0
- package/lib/Input/ButtonInput.d.ts +2 -2
- package/lib/Input/ButtonInput.js +36 -21
- package/lib/Input/ColorInput/Picker.d.ts +3 -0
- package/lib/Input/ColorInput/Picker.js +25 -0
- package/lib/Input/ColorInput/data.d.ts +1 -0
- package/lib/Input/ColorInput/data.js +6 -0
- package/lib/Input/ColorInput/index.d.ts +3 -0
- package/lib/Input/ColorInput/index.js +96 -0
- package/lib/Input/InputNumber.d.ts +0 -1
- package/lib/Input/InputNumber.js +16 -6
- package/lib/Input/SelectInput.d.ts +2 -1
- package/lib/Input/SelectInput.js +53 -23
- package/lib/Input/index.d.ts +0 -1
- package/lib/Input/index.js +18 -7
- package/lib/Input/modal.d.ts +30 -0
- package/lib/PageHandler/ErrorComponent.d.ts +3 -0
- package/lib/PageHandler/ErrorComponent.js +41 -0
- package/lib/PageHandler/LoadingComponent.d.ts +2 -0
- package/lib/PageHandler/LoadingComponent.js +22 -0
- package/lib/PageHandler/index.d.ts +4 -0
- package/lib/PageHandler/index.js +29 -0
- package/lib/PageHandler/modal.d.ts +6 -0
- package/lib/RadioGroup/index.d.ts +2 -3
- package/lib/RadioGroup/index.js +28 -13
- package/lib/Select/components/AllSelect.d.ts +3 -4
- package/lib/Select/components/AllSelect.js +34 -18
- package/lib/Select/components/CheckBoxOption.js +6 -4
- package/lib/Select/components/DropdownComponent.js +16 -11
- package/lib/Select/components/NoFindItem.d.ts +0 -1
- package/lib/Select/components/NoFindItem.js +5 -4
- package/lib/Select/components/NotFoundContent.d.ts +0 -1
- package/lib/Select/components/NotFoundContent.js +23 -20
- package/lib/Select/defaultConfig.d.ts +0 -1
- package/lib/Select/defaultConfig.js +7 -7
- package/lib/Select/hooks/changeHooks.js +29 -26
- package/lib/Select/hooks/norHooks.d.ts +10 -3
- package/lib/Select/hooks/norHooks.js +56 -18
- package/lib/Select/index.d.ts +2 -3
- package/lib/Select/index.js +65 -36
- package/lib/Select/modal.d.ts +9 -1
- package/lib/Select/utils.js +16 -16
- package/lib/Submit/index.d.ts +9 -0
- package/lib/Submit/index.js +58 -0
- package/lib/Switch/index.d.ts +4 -3
- package/lib/Switch/index.js +36 -17
- package/lib/TDPicker/RangePicker.d.ts +8 -0
- package/lib/TDPicker/RangePicker.js +129 -0
- package/lib/TDPicker/TimePicker.d.ts +3 -0
- package/lib/TDPicker/TimePicker.js +48 -0
- package/lib/TDPicker/hooks.d.ts +33 -0
- package/lib/TDPicker/hooks.js +140 -0
- package/lib/TDPicker/index.d.ts +4 -0
- package/lib/TDPicker/index.js +51 -0
- package/lib/TDPicker/modal.d.ts +35 -0
- package/lib/TextArea/index.d.ts +3 -0
- package/lib/TextArea/index.js +34 -0
- package/lib/Upload/Btn.d.ts +3 -0
- package/lib/Upload/Btn.js +39 -0
- package/lib/Upload/MediaTypeEle/TypeEle.d.ts +9 -0
- package/lib/Upload/MediaTypeEle/TypeEle.js +45 -0
- package/lib/Upload/MediaTypeEle/index.d.ts +3 -0
- package/lib/Upload/MediaTypeEle/index.js +40 -0
- package/lib/Upload/Preview/index.d.ts +5 -0
- package/lib/Upload/Preview/index.js +25 -0
- package/lib/Upload/UrlUpload/index.d.ts +3 -0
- package/lib/Upload/UrlUpload/index.js +141 -0
- package/lib/Upload/enums.d.ts +5 -0
- package/lib/Upload/enums.js +9 -0
- package/lib/Upload/hooks/change.d.ts +3 -0
- package/lib/Upload/hooks/change.js +110 -0
- package/lib/Upload/hooks/customRequest.d.ts +3 -0
- package/lib/Upload/hooks/customRequest.js +133 -0
- package/lib/Upload/hooks/propsMaker.d.ts +2 -0
- package/lib/Upload/hooks/propsMaker.js +38 -0
- package/lib/Upload/index.d.ts +3 -0
- package/lib/Upload/index.js +149 -0
- package/lib/Upload/modal.d.ts +30 -0
- package/lib/Upload/util.d.ts +5 -0
- package/lib/Upload/util.js +40 -0
- package/lib/config.d.ts +2 -14
- package/lib/config.js +55 -8
- package/{es/hooks/useChangeOptions.d.ts → lib/hooks/index.d.ts} +3 -0
- package/lib/hooks/index.js +74 -0
- package/lib/index.css +42 -1
- package/lib/index.d.ts +26 -11
- package/lib/index.js +52 -23
- package/lib/modal.d.ts +16 -0
- package/package.json +10 -6
- package/scripts/rollup.config.js +15 -4
- package/scripts/webpack.config.js +5 -8
- package/src/Layout.tsx +4 -4
- package/src/components/CheckboxGroup/CheckBox/index.tsx +7 -7
- package/src/components/CheckboxGroup/hooks.ts +12 -13
- package/src/components/CheckboxGroup/index.tsx +40 -7
- package/src/components/CheckboxGroup/{modal.d.ts → modal.ts} +4 -1
- package/src/components/DialogForm/DrawerForm/Footer.tsx +20 -0
- package/src/components/DialogForm/DrawerForm/Title.tsx +12 -0
- package/src/components/DialogForm/DrawerForm/index.tsx +95 -0
- package/src/components/DialogForm/ModalForm.tsx +77 -0
- package/src/components/DialogForm/hooks.ts +109 -0
- package/src/components/DialogForm/modal.ts +36 -0
- package/src/components/Form/Context/FormConfigProvider.tsx +38 -0
- package/src/components/Form/Context/index.tsx +14 -0
- package/src/components/Form/FormItem/BasicItem.tsx +76 -0
- package/src/components/Form/FormItem/Helper.tsx +25 -0
- package/src/components/Form/FormItem/RegularFormItem.tsx +7 -0
- package/src/components/Form/FormItem/UpFormItem.tsx +20 -0
- package/src/components/Form/FormItem/hooks.tsx +40 -0
- package/src/components/Form/FormItem/index.tsx +8 -0
- package/src/components/Form/HFormConnect.tsx +67 -0
- package/src/components/Form/InitSet.tsx +10 -0
- package/src/components/Form/Label.tsx +50 -0
- package/src/components/Form/config.ts +43 -0
- package/src/components/Form/hooks/index.ts +115 -0
- package/src/components/Form/hooks/useDefaultRender.tsx +42 -0
- package/src/components/Form/hooks/useHForm.ts +164 -0
- package/src/components/Form/hooks/useInitConfigData.tsx +194 -0
- package/src/components/Form/index.less +22 -0
- package/src/components/Form/index.tsx +85 -0
- package/src/components/Form/modal.ts +179 -0
- package/src/components/Input/ButtonInput.tsx +11 -5
- package/src/components/Input/ColorInput/Picker.tsx +18 -0
- package/src/components/Input/ColorInput/data.ts +102 -0
- package/src/components/Input/ColorInput/index.less +10 -0
- package/src/components/Input/ColorInput/index.tsx +48 -0
- package/src/components/Input/SelectInput.tsx +33 -3
- package/src/components/Input/modal.ts +36 -0
- package/src/components/PageHandler/ErrorComponent.tsx +20 -0
- package/src/components/PageHandler/LoadingComponent.tsx +9 -0
- package/src/components/PageHandler/index.tsx +14 -0
- package/src/components/PageHandler/modal.ts +6 -0
- package/src/components/RadioGroup/index.tsx +8 -4
- package/src/components/Select/components/AllSelect.tsx +28 -17
- package/src/components/Select/components/DropdownComponent.tsx +1 -0
- package/src/components/Select/components/NotFoundContent.tsx +1 -1
- package/src/components/Select/hooks/changeHooks.tsx +6 -2
- package/src/components/Select/hooks/norHooks.ts +33 -6
- package/src/components/Select/index.less +20 -4
- package/src/components/Select/index.tsx +25 -11
- package/src/components/Select/modal.ts +17 -8
- package/src/components/Submit/index.tsx +46 -0
- package/src/components/Switch/index.tsx +14 -9
- package/src/components/TDPicker/RangePicker.tsx +109 -0
- package/src/components/TDPicker/TimePicker.tsx +25 -0
- package/src/components/TDPicker/hooks.ts +150 -0
- package/src/components/TDPicker/index.tsx +28 -0
- package/src/components/TDPicker/modal.ts +46 -0
- package/src/components/TextArea/index.tsx +8 -0
- package/src/components/Upload/Btn.tsx +24 -0
- package/src/components/Upload/MediaTypeEle/TypeEle.tsx +26 -0
- package/src/components/Upload/MediaTypeEle/index.tsx +34 -0
- package/src/components/Upload/Preview/index.tsx +14 -0
- package/src/components/Upload/UrlUpload/index.tsx +91 -0
- package/src/components/Upload/enums.ts +5 -0
- package/src/components/Upload/hooks/change.ts +79 -0
- package/src/components/Upload/hooks/customRequest.ts +87 -0
- package/src/components/Upload/hooks/propsMaker.ts +20 -0
- package/src/components/Upload/index.tsx +119 -0
- package/src/components/Upload/modal.ts +33 -0
- package/src/components/Upload/util.ts +27 -0
- package/src/components/config.ts +35 -8
- package/src/components/hooks/index.ts +53 -0
- package/src/components/index.tsx +30 -11
- package/src/components/modal.ts +20 -0
- package/src/components/styles/index.less +3 -0
- package/src/components/styles/local.less +1 -1
- package/src/components/typings.d.ts +0 -5
- package/src/pages/Checkbox/index.tsx +4 -5
- package/src/pages/DatePicker/index.tsx +20 -2
- package/src/pages/DrawerForm/index.tsx +127 -0
- package/src/pages/Form/index.tsx +203 -0
- package/src/pages/Input/index.tsx +2 -0
- package/src/pages/ModalForm/index.tsx +147 -0
- package/src/pages/Select/index.tsx +6 -3
- package/src/pages/Switch/index.tsx +1 -1
- package/src/pages/Upload/index.tsx +14 -0
- package/src/routes.tsx +24 -0
- package/tsconfig.json +1 -1
- package/es/DatePicker/RangePicker.d.ts +0 -4
- package/es/DatePicker/RangePicker.js +0 -23
- package/es/DatePicker/index.d.ts +0 -4
- package/es/DatePicker/index.js +0 -39
- package/es/TimePicker/index.d.ts +0 -2
- package/es/hooks/useChangeOptions.js +0 -25
- package/es/hooks/useClassName.d.ts +0 -1
- package/es/hooks/useClassName.js +0 -15
- package/lib/DatePicker/RangePicker.d.ts +0 -4
- package/lib/DatePicker/RangePicker.js +0 -26
- package/lib/DatePicker/index.d.ts +0 -4
- package/lib/DatePicker/index.js +0 -42
- package/lib/TimePicker/index.d.ts +0 -2
- package/lib/hooks/useChangeOptions.js +0 -26
- package/lib/hooks/useClassName.d.ts +0 -1
- package/lib/hooks/useClassName.js +0 -16
- package/src/components/DatePicker/RangePicker.tsx +0 -19
- package/src/components/DatePicker/index.tsx +0 -38
- package/src/components/DatePicker/modal.d.ts +0 -17
- package/src/components/Input/modal.d.ts +0 -26
- package/src/components/TimePicker/index.tsx +0 -1
- package/src/components/hooks/useChangeOptions.ts +0 -22
- package/src/components/hooks/useClassName.ts +0 -9
package/es/Input/ButtonInput.js
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
// welcome to
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import 'core-js/modules/es6.object.keys.js';
|
|
3
|
+
import 'core-js/modules/es6.symbol.js';
|
|
4
|
+
import 'core-js/modules/es6.array.filter.js';
|
|
5
|
+
import 'core-js/modules/es6.object.get-own-property-descriptor.js';
|
|
6
|
+
import 'core-js/modules/es6.array.for-each.js';
|
|
7
|
+
import 'core-js/modules/es7.object.get-own-property-descriptors.js';
|
|
8
|
+
import 'core-js/modules/es6.object.define-properties.js';
|
|
9
|
+
import 'core-js/modules/es6.object.define-property.js';
|
|
10
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
11
|
+
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
12
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
13
|
+
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
14
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
15
|
import { Input, Button } from 'antd';
|
|
7
|
-
import React from 'react';
|
|
8
16
|
import { useRequest } from 'ahooks';
|
|
9
17
|
|
|
10
18
|
var _excluded = ["buttonProps", "value", "onChange", "children", "request"],
|
|
11
19
|
_excluded2 = ["onClick", "type"];
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
12
22
|
var Index = function Index(_ref) {
|
|
13
23
|
var _ref$buttonProps = _ref.buttonProps,
|
|
14
24
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
@@ -29,10 +39,10 @@ var Index = function Index(_ref) {
|
|
|
29
39
|
run = _useRequest.run,
|
|
30
40
|
loading = _useRequest.loading;
|
|
31
41
|
var change = function change(e) {
|
|
32
|
-
onChange === null || onChange === void 0
|
|
42
|
+
onChange === null || onChange === void 0 || onChange(e.target.value);
|
|
33
43
|
};
|
|
34
44
|
var click = /*#__PURE__*/function () {
|
|
35
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(
|
|
45
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
36
46
|
var result;
|
|
37
47
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
38
48
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -47,34 +57,39 @@ var Index = function Index(_ref) {
|
|
|
47
57
|
case 4:
|
|
48
58
|
result = _context.sent;
|
|
49
59
|
case 5:
|
|
50
|
-
onClick === null || onClick === void 0
|
|
60
|
+
onClick === null || onClick === void 0 || onClick(result, onChange);
|
|
51
61
|
case 6:
|
|
52
62
|
case "end":
|
|
53
63
|
return _context.stop();
|
|
54
64
|
}
|
|
55
65
|
}, _callee);
|
|
56
66
|
}));
|
|
57
|
-
return function click(
|
|
67
|
+
return function click() {
|
|
58
68
|
return _ref2.apply(this, arguments);
|
|
59
69
|
};
|
|
60
70
|
}();
|
|
61
|
-
return
|
|
71
|
+
return jsxs(Input.Group, {
|
|
62
72
|
compact: true,
|
|
63
73
|
style: {
|
|
64
74
|
display: "flex"
|
|
65
|
-
}
|
|
66
|
-
}, /*#__PURE__*/React.createElement(Input, _extends({}, props, {
|
|
67
|
-
style: {
|
|
68
|
-
flex: 1
|
|
69
75
|
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
children: [jsx(Input, _objectSpread(_objectSpread({}, props), {}, {
|
|
77
|
+
style: {
|
|
78
|
+
flex: 1
|
|
79
|
+
},
|
|
80
|
+
value: value,
|
|
81
|
+
onChange: change
|
|
82
|
+
})), jsx(Button, _objectSpread(_objectSpread({}, oProps), {}, {
|
|
83
|
+
type: type,
|
|
84
|
+
onClick: click,
|
|
85
|
+
loading: loading,
|
|
86
|
+
style: {
|
|
87
|
+
marginLeft: 4
|
|
88
|
+
},
|
|
89
|
+
children: children
|
|
90
|
+
}))]
|
|
91
|
+
});
|
|
77
92
|
};
|
|
78
93
|
|
|
79
94
|
export { Index as default };
|
|
80
|
-
// powered by
|
|
95
|
+
// powered by hdj
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { SketchPicker } from 'react-color';
|
|
4
|
+
import { presetColors } from './data.js';
|
|
5
|
+
import { useClassName } from '../../hooks/index.js';
|
|
6
|
+
|
|
7
|
+
var Picker = (function (_ref) {
|
|
8
|
+
var value = _ref.value,
|
|
9
|
+
onChange = _ref.onChange;
|
|
10
|
+
var classname = useClassName("hw-color-input-picker");
|
|
11
|
+
return jsx(SketchPicker, {
|
|
12
|
+
width: "250px",
|
|
13
|
+
styles: {},
|
|
14
|
+
presetColors: presetColors,
|
|
15
|
+
color: value,
|
|
16
|
+
onChangeComplete: onChange,
|
|
17
|
+
className: classname
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export { Picker as default };
|
|
22
|
+
// powered by hdj
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const presetColors: string[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
var presetColors = ["#fff1f0", "#ffccc7", "#ffa39e", "#ff7875", "#ff4d4f", "#f5222d", "#cf1322", "#a8071a", "#820014", "#5c0011", "#fff7e6", "#ffe7ba", "#ffd591", "#ffc069", "#ffa940", "#fa8c16", "#d46b08", "#ad4e00", "#873800", "#612500", "#feffe6", "#ffffb8", "#fffb8f", "#fff566", "#ffec3d", "#fadb14", "#d4b106", "#ad8b00", "#876800", "#614700", "#f6ffed", "#d9f7be", "#b7eb8f", "#95de64", "#73d13d", "#52c41a", "#389e0d", "#237804", "#135200", "#092b00", "#e6fffb", "#b5f5ec", "#87e8de", "#5cdbd3", "#36cfc9", "#13c2c2", "#08979c", "#006d75", "#00474f", "#002329", "#e6f7ff", "#bae7ff", "#91d5ff", "#69c0ff", "#40a9ff", "#1890ff", "#096dd9", "#0050b3", "#003a8c", "#002766", "#f0f5ff", "#d6e4ff", "#adc6ff", "#85a5ff", "#597ef7", "#2f54eb", "#1d39c4", "#10239e", "#061178", "#030852", "#f9f0ff", "#efdbff", "#d3adf7", "#b37feb", "#9254de", "#722ed1", "#531dab", "#391085", "#22075e", "#120338", "#fff0f6", "#ffd6e7", "#ffadd2", "#ff85c0", "#f759ab", "#eb2f96", "#c41d7f", "#9e1068", "#780650", "#520339", "#ffffff", "#fafafa", "#f5f5f5", "#f0f0f0", "#d9d9d9", "#bfbfbf", "#8c8c8c", "#595959", "#434343", "#262626"];
|
|
3
|
+
|
|
4
|
+
export { presetColors };
|
|
5
|
+
// powered by hdj
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import 'core-js/modules/es6.regexp.constructor.js';
|
|
3
|
+
import 'core-js/modules/es6.weak-map.js';
|
|
4
|
+
import 'core-js/modules/es6.string.iterator.js';
|
|
5
|
+
import 'core-js/modules/es6.object.to-string.js';
|
|
6
|
+
import 'core-js/modules/es6.array.iterator.js';
|
|
7
|
+
import 'core-js/modules/web.dom.iterable.js';
|
|
8
|
+
import 'core-js/modules/es6.array.reduce.js';
|
|
9
|
+
import 'core-js/modules/es6.object.keys.js';
|
|
10
|
+
import 'core-js/modules/es6.object.create.js';
|
|
11
|
+
import 'core-js/modules/es6.symbol.js';
|
|
12
|
+
import 'core-js/modules/es6.regexp.replace.js';
|
|
13
|
+
import 'core-js/modules/es6.array.is-array.js';
|
|
14
|
+
import 'core-js/modules/es6.array.slice.js';
|
|
15
|
+
import 'core-js/modules/es6.array.filter.js';
|
|
16
|
+
import 'core-js/modules/es6.object.get-own-property-descriptor.js';
|
|
17
|
+
import 'core-js/modules/es6.array.for-each.js';
|
|
18
|
+
import 'core-js/modules/es7.object.get-own-property-descriptors.js';
|
|
19
|
+
import 'core-js/modules/es6.object.define-properties.js';
|
|
20
|
+
import 'core-js/modules/es6.object.define-property.js';
|
|
21
|
+
import _typeof from '@babel/runtime/helpers/typeof';
|
|
22
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
23
|
+
import _inherits from '@babel/runtime/helpers/inherits';
|
|
24
|
+
import _setPrototypeOf from '@babel/runtime/helpers/setPrototypeOf';
|
|
25
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
26
|
+
import 'core-js/modules/es6.string.starts-with.js';
|
|
27
|
+
import 'core-js/modules/es6.regexp.match.js';
|
|
28
|
+
import 'core-js/modules/es6.regexp.split.js';
|
|
29
|
+
import 'core-js/modules/es6.number.constructor.js';
|
|
30
|
+
import { jsx } from 'react/jsx-runtime';
|
|
31
|
+
import { Input, Popover } from 'antd';
|
|
32
|
+
import Picker from './Picker.js';
|
|
33
|
+
import { useMemo } from 'react';
|
|
34
|
+
import { useClassName } from '../../hooks/index.js';
|
|
35
|
+
|
|
36
|
+
var _excluded = ["value", "onChange"];
|
|
37
|
+
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; }
|
|
38
|
+
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; }
|
|
39
|
+
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, void 0, groups); }; var _super = RegExp.prototype, _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype); } function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { var i = g[name]; if ("number" == typeof i) groups[name] = result[i];else { for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) k++; groups[name] = result[i[k]]; } return groups; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) { result.groups = buildGroups(result, this); var indices = result.indices; indices && (indices.groups = buildGroups(indices, this)); } return result; }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if ("string" == typeof substitution) { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { var group = groups[name]; return "$" + (Array.isArray(group) ? group.join("$") : group); })); } if ("function" == typeof substitution) { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; return "object" != _typeof(args[args.length - 1]) && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args); }); } return _super[Symbol.replace].call(this, str, substitution); }, _wrapRegExp.apply(this, arguments); }
|
|
40
|
+
var ColorInput = (function (_ref) {
|
|
41
|
+
var value = _ref.value,
|
|
42
|
+
onChange = _ref.onChange,
|
|
43
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
44
|
+
var classname = useClassName("hw-color-box");
|
|
45
|
+
var pickerValue = useMemo(function () {
|
|
46
|
+
if (typeof value === "string") {
|
|
47
|
+
var _result$groups;
|
|
48
|
+
if (value.startsWith("#")) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
var rgbaRegular = /*#__PURE__*/_wrapRegExp(/(?<=(rgba\())(.*?)(?=(\)))/, {
|
|
52
|
+
rgba: 2
|
|
53
|
+
});
|
|
54
|
+
var result = value.match(rgbaRegular);
|
|
55
|
+
if (result !== null && result !== void 0 && (_result$groups = result.groups) !== null && _result$groups !== void 0 && _result$groups.rgba) {
|
|
56
|
+
var rgbas = result.groups.rgba.split(",");
|
|
57
|
+
return {
|
|
58
|
+
r: Number(rgbas[0]),
|
|
59
|
+
g: Number(rgbas[1]),
|
|
60
|
+
b: Number(rgbas[2]),
|
|
61
|
+
a: Number(rgbas[3])
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return "";
|
|
66
|
+
}, [value]);
|
|
67
|
+
var colorChange = function colorChange(val) {
|
|
68
|
+
var rgb = val.rgb;
|
|
69
|
+
var text = "rgba(".concat(rgb.r, ",").concat(rgb.g, ",").concat(rgb.b, ",").concat(rgb.a, ")");
|
|
70
|
+
onChange === null || onChange === void 0 || onChange(text);
|
|
71
|
+
};
|
|
72
|
+
return jsx(Input, _objectSpread(_objectSpread({}, props), {}, {
|
|
73
|
+
value: value,
|
|
74
|
+
onChange: onChange,
|
|
75
|
+
suffix: jsx(Popover, {
|
|
76
|
+
trigger: "click",
|
|
77
|
+
content: jsx(Picker, {
|
|
78
|
+
value: pickerValue,
|
|
79
|
+
onChange: colorChange
|
|
80
|
+
}),
|
|
81
|
+
placement: "topLeft",
|
|
82
|
+
children: jsx("div", {
|
|
83
|
+
style: {
|
|
84
|
+
backgroundColor: value
|
|
85
|
+
},
|
|
86
|
+
className: classname
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
}));
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export { ColorInput as default };
|
|
93
|
+
// powered by hdj
|
package/es/Input/InputNumber.js
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
// welcome to
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import 'core-js/modules/es6.object.keys.js';
|
|
3
|
+
import 'core-js/modules/es6.symbol.js';
|
|
4
|
+
import 'core-js/modules/es6.array.filter.js';
|
|
5
|
+
import 'core-js/modules/es6.object.get-own-property-descriptor.js';
|
|
6
|
+
import 'core-js/modules/es6.array.for-each.js';
|
|
7
|
+
import 'core-js/modules/es7.object.get-own-property-descriptors.js';
|
|
8
|
+
import 'core-js/modules/es6.object.define-properties.js';
|
|
9
|
+
import 'core-js/modules/es6.object.define-property.js';
|
|
10
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
11
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
12
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
|
+
import { InputNumber } from 'antd';
|
|
6
14
|
|
|
7
15
|
var _excluded = ["style"];
|
|
8
|
-
var
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
var HInputNumber = (function (_ref) {
|
|
9
19
|
var _ref$style = _ref.style,
|
|
10
20
|
style = _ref$style === void 0 ? {
|
|
11
21
|
width: "100%"
|
|
12
22
|
} : _ref$style,
|
|
13
23
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
return
|
|
24
|
+
return jsx(InputNumber, _objectSpread({
|
|
15
25
|
style: style
|
|
16
26
|
}, props));
|
|
17
27
|
});
|
|
18
28
|
|
|
19
|
-
export {
|
|
20
|
-
// powered by
|
|
29
|
+
export { HInputNumber as default };
|
|
30
|
+
// powered by hdj
|
|
@@ -4,5 +4,6 @@ export declare enum SelectInputType {
|
|
|
4
4
|
input = 0,
|
|
5
5
|
select = 1
|
|
6
6
|
}
|
|
7
|
-
declare const
|
|
7
|
+
export declare const Index: ({ selectProps, value, onChange, valueName, addFormat, addDispatchListener, ...props }: HSelectInputProps) => JSX.Element;
|
|
8
|
+
declare const _default: import("react").ForwardRefExoticComponent<import("../Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
|
|
8
9
|
export default _default;
|
package/es/Input/SelectInput.js
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
// welcome to
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import 'core-js/modules/es6.object.keys.js';
|
|
3
|
+
import 'core-js/modules/es6.symbol.js';
|
|
4
|
+
import 'core-js/modules/es6.array.filter.js';
|
|
5
|
+
import 'core-js/modules/es6.object.get-own-property-descriptor.js';
|
|
6
|
+
import 'core-js/modules/es7.object.get-own-property-descriptors.js';
|
|
7
|
+
import 'core-js/modules/es6.object.define-properties.js';
|
|
8
|
+
import 'core-js/modules/es6.object.define-property.js';
|
|
9
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
10
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
11
|
+
import 'core-js/modules/es6.function.name.js';
|
|
12
|
+
import 'core-js/modules/es6.array.for-each.js';
|
|
13
|
+
import 'core-js/modules/es7.object.values.js';
|
|
14
|
+
import { jsx } from 'react/jsx-runtime';
|
|
14
15
|
import { Input } from 'antd';
|
|
15
16
|
import HSelect from '../Select/index.js';
|
|
16
17
|
import { defaultValueName, defaultSelectStyle } from './defaultConfig.js';
|
|
18
|
+
import HFormConnect from '../Form/HFormConnect.js';
|
|
17
19
|
|
|
18
|
-
var _excluded = ["selectProps", "value", "onChange", "valueName"],
|
|
19
|
-
_excluded2 = ["style"];
|
|
20
|
-
function ownKeys(object, enumerableOnly) { var keys =
|
|
21
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
20
|
+
var _excluded = ["selectProps", "value", "onChange", "valueName", "addFormat", "addDispatchListener"],
|
|
21
|
+
_excluded2 = ["style", "placeholder"];
|
|
22
|
+
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; }
|
|
23
|
+
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; }
|
|
22
24
|
var SelectInputType;
|
|
23
25
|
(function (SelectInputType) {
|
|
24
26
|
SelectInputType[SelectInputType["input"] = 0] = "input";
|
|
25
27
|
SelectInputType[SelectInputType["select"] = 1] = "select";
|
|
26
28
|
})(SelectInputType || (SelectInputType = {}));
|
|
27
|
-
var
|
|
29
|
+
var Index = function Index(_ref) {
|
|
28
30
|
var _ref$selectProps = _ref.selectProps,
|
|
29
31
|
selectProps = _ref$selectProps === void 0 ? {} : _ref$selectProps,
|
|
30
32
|
_ref$value = _ref.value,
|
|
@@ -32,7 +34,9 @@ var SelectInput = (function (_ref) {
|
|
|
32
34
|
onChange = _ref.onChange,
|
|
33
35
|
_ref$valueName = _ref.valueName,
|
|
34
36
|
valueName = _ref$valueName === void 0 ? defaultValueName : _ref$valueName,
|
|
35
|
-
|
|
37
|
+
addFormat = _ref.addFormat;
|
|
38
|
+
_ref.addDispatchListener;
|
|
39
|
+
var props = _objectWithoutProperties(_ref, _excluded);
|
|
36
40
|
var _valueName$input = valueName.input,
|
|
37
41
|
input = _valueName$input === void 0 ? "" : _valueName$input,
|
|
38
42
|
_valueName$select = valueName.select,
|
|
@@ -41,27 +45,52 @@ var SelectInput = (function (_ref) {
|
|
|
41
45
|
selectVal = value[select];
|
|
42
46
|
var _selectProps$style = selectProps.style,
|
|
43
47
|
style = _selectProps$style === void 0 ? defaultSelectStyle : _selectProps$style,
|
|
48
|
+
_selectProps$placehol = selectProps.placeholder,
|
|
49
|
+
placeholder = _selectProps$placehol === void 0 ? "请选择" : _selectProps$placehol,
|
|
44
50
|
sProps = _objectWithoutProperties(selectProps, _excluded2);
|
|
45
51
|
var change = function change(val, key) {
|
|
46
52
|
var newVal = _objectSpread({}, value);
|
|
47
53
|
newVal[key] = val;
|
|
48
54
|
var type = key === input ? SelectInputType.input : SelectInputType.select;
|
|
49
|
-
onChange === null || onChange === void 0
|
|
55
|
+
onChange === null || onChange === void 0 || onChange(newVal, type);
|
|
50
56
|
};
|
|
51
|
-
|
|
57
|
+
addFormat === null || addFormat === void 0 || addFormat({
|
|
58
|
+
"float": {
|
|
59
|
+
inputValue: function inputValue(item, initValue) {
|
|
60
|
+
var _item$name = item.name,
|
|
61
|
+
name = _item$name === void 0 ? "" : _item$name;
|
|
62
|
+
var resultObj = {};
|
|
63
|
+
Object.values(valueName).forEach(function (key) {
|
|
64
|
+
resultObj[key] = initValue[key];
|
|
65
|
+
});
|
|
66
|
+
return _defineProperty({}, name, resultObj);
|
|
67
|
+
},
|
|
68
|
+
outputValue: function outputValue(item, _outputValue) {
|
|
69
|
+
var _item$name2 = item.name,
|
|
70
|
+
name = _item$name2 === void 0 ? "" : _item$name2;
|
|
71
|
+
var _outputValue$name = _outputValue[name],
|
|
72
|
+
itemVal = _outputValue$name === void 0 ? {} : _outputValue$name;
|
|
73
|
+
var newItemVal = _defineProperty({}, itemVal[select], itemVal[input]);
|
|
74
|
+
return _objectSpread({}, newItemVal);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return jsx(Input, _objectSpread({
|
|
52
79
|
value: inputVal,
|
|
53
80
|
onChange: function onChange(e) {
|
|
54
81
|
change(e.target.value, input);
|
|
55
82
|
},
|
|
56
|
-
addonBefore:
|
|
83
|
+
addonBefore: jsx(HSelect, _objectSpread(_objectSpread({}, sProps), {}, {
|
|
57
84
|
style: style,
|
|
85
|
+
placeholder: placeholder,
|
|
58
86
|
value: selectVal,
|
|
59
87
|
onChange: function onChange(val) {
|
|
60
88
|
change(val, select);
|
|
61
89
|
}
|
|
62
90
|
}))
|
|
63
91
|
}, props));
|
|
64
|
-
}
|
|
92
|
+
};
|
|
93
|
+
var HSelectInput = HFormConnect(Index);
|
|
65
94
|
|
|
66
|
-
export { SelectInputType,
|
|
67
|
-
// powered by
|
|
95
|
+
export { Index, SelectInputType, HSelectInput as default };
|
|
96
|
+
// powered by hdj
|
package/es/Input/index.d.ts
CHANGED
package/es/Input/index.js
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
// welcome to
|
|
2
|
-
import
|
|
3
|
-
import _objectDestructuringEmpty from '@babel/runtime
|
|
4
|
-
import
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
+
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
4
|
+
import 'core-js/modules/es6.object.assign.js';
|
|
5
|
+
import 'core-js/modules/es6.object.keys.js';
|
|
6
|
+
import 'core-js/modules/es6.symbol.js';
|
|
7
|
+
import 'core-js/modules/es6.array.filter.js';
|
|
8
|
+
import 'core-js/modules/es6.object.get-own-property-descriptor.js';
|
|
9
|
+
import 'core-js/modules/es6.array.for-each.js';
|
|
10
|
+
import 'core-js/modules/es7.object.get-own-property-descriptors.js';
|
|
11
|
+
import 'core-js/modules/es6.object.define-properties.js';
|
|
12
|
+
import 'core-js/modules/es6.object.define-property.js';
|
|
13
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
14
|
import { Input } from 'antd';
|
|
6
15
|
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
var HInput = (function (_ref) {
|
|
19
|
+
var props = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
20
|
+
return jsx(Input, _objectSpread({}, props));
|
|
10
21
|
});
|
|
11
22
|
|
|
12
|
-
export {
|
|
13
|
-
// powered by
|
|
23
|
+
export { HInput as default };
|
|
24
|
+
// powered by hdj
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ButtonProps, InputProps } from "antd";
|
|
2
|
+
import type { HSelectProps } from "../Select/modal";
|
|
3
|
+
import type { SelectInputType } from "./SelectInput";
|
|
4
|
+
import type { PromiseFnResult } from "../modal";
|
|
5
|
+
import type { addFormatItemModal } from "../Form/modal";
|
|
6
|
+
import type { AddDispatchListenerFn } from "../Form/modal";
|
|
7
|
+
export interface HInputProps<V = any> extends Omit<InputProps, "onChange" | "value"> {
|
|
8
|
+
onChange?: (value: V) => void;
|
|
9
|
+
value?: V;
|
|
10
|
+
}
|
|
11
|
+
interface ValueNameModal {
|
|
12
|
+
input?: string;
|
|
13
|
+
select?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface HSelectInputProps extends Omit<HInputProps, "value" | "onChange"> {
|
|
16
|
+
selectProps?: HSelectProps;
|
|
17
|
+
value?: Record<string, any>;
|
|
18
|
+
onChange?: (value: Record<string, any>, type: SelectInputType) => void;
|
|
19
|
+
valueName?: ValueNameModal;
|
|
20
|
+
addFormat?: (config: Record<string, addFormatItemModal>) => void;
|
|
21
|
+
addDispatchListener?: AddDispatchListenerFn;
|
|
22
|
+
}
|
|
23
|
+
export interface HButtonProps extends Omit<ButtonProps, "onClick"> {
|
|
24
|
+
onClick: (value: string | readonly string[] | number | undefined, onChange?: (val: any) => void) => void;
|
|
25
|
+
}
|
|
26
|
+
export interface HButtonInputProps extends HInputProps {
|
|
27
|
+
buttonProps?: HButtonProps;
|
|
28
|
+
request?: PromiseFnResult;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { Typography, Row, Space, Button } from 'antd';
|
|
4
|
+
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
5
|
+
|
|
6
|
+
var Text = Typography.Text;
|
|
7
|
+
var ErrorComponent = (function (_ref) {
|
|
8
|
+
var error = _ref.error,
|
|
9
|
+
reload = _ref.reload;
|
|
10
|
+
return jsx(Row, {
|
|
11
|
+
justify: "center",
|
|
12
|
+
align: "middle",
|
|
13
|
+
style: {
|
|
14
|
+
height: 125
|
|
15
|
+
},
|
|
16
|
+
children: jsxs(Space, {
|
|
17
|
+
align: "center",
|
|
18
|
+
direction: "vertical",
|
|
19
|
+
children: [jsx(Text, {
|
|
20
|
+
type: "danger",
|
|
21
|
+
children: jsx(ExclamationCircleOutlined, {
|
|
22
|
+
size: 24
|
|
23
|
+
})
|
|
24
|
+
}), jsx(Text, {
|
|
25
|
+
type: "danger",
|
|
26
|
+
children: error === null || error === void 0 ? void 0 : error.message
|
|
27
|
+
}), jsx(Button, {
|
|
28
|
+
type: "primary",
|
|
29
|
+
size: "small",
|
|
30
|
+
onClick: reload,
|
|
31
|
+
children: "\u91CD\u65B0\u52A0\u8F7D"
|
|
32
|
+
})]
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export { ErrorComponent as default };
|
|
38
|
+
// powered by hdj
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Row, Spin } from 'antd';
|
|
4
|
+
|
|
5
|
+
var Loading = (function () {
|
|
6
|
+
return jsx(Row, {
|
|
7
|
+
justify: "center",
|
|
8
|
+
align: "middle",
|
|
9
|
+
style: {
|
|
10
|
+
height: 125
|
|
11
|
+
},
|
|
12
|
+
children: jsx(Spin, {
|
|
13
|
+
size: "large"
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export { Loading as default };
|
|
19
|
+
// powered by hdj
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import Loading from './LoadingComponent.js';
|
|
4
|
+
import ErrorComponent from './ErrorComponent.js';
|
|
5
|
+
|
|
6
|
+
var Index = function Index(_ref) {
|
|
7
|
+
var error = _ref.error,
|
|
8
|
+
data = _ref.data,
|
|
9
|
+
reload = _ref.reload,
|
|
10
|
+
children = _ref.children;
|
|
11
|
+
if (error) {
|
|
12
|
+
return jsx(ErrorComponent, {
|
|
13
|
+
error: error,
|
|
14
|
+
reload: reload
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
if (data) {
|
|
18
|
+
return jsx(Fragment, {
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return jsx(Loading, {});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { Index as default };
|
|
26
|
+
// powered by hdj
|
package/es/RadioGroup/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { SelectProps, RadioGroupProps } from "antd/es";
|
|
3
|
-
interface
|
|
2
|
+
export interface HRadioGroupProps extends Omit<RadioGroupProps, "onChange" | "options"> {
|
|
4
3
|
onChange?: (value: any) => void;
|
|
5
4
|
fieldNames?: SelectProps["fieldNames"];
|
|
6
5
|
options?: (Record<string, any> | string | number)[];
|
|
7
6
|
}
|
|
8
|
-
declare const _default: ({ value, options, onChange, fieldNames, ...props }:
|
|
7
|
+
declare const _default: ({ value, options, onChange, fieldNames: propsFieldNames, ...props }: HRadioGroupProps) => JSX.Element;
|
|
9
8
|
export default _default;
|