tntd 2.8.0-beta.3 → 3.0.0-beta
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/alert/alert.js +70 -0
- package/es/alert/alert.js.map +1 -0
- package/es/alert/alert.less +128 -0
- package/es/alert/index.js +1 -1
- package/es/alert/index.js.map +1 -1
- package/es/alert/style/index.less +1 -0
- package/es/button/button.js +30 -3
- package/es/button/button.js.map +1 -1
- package/es/button/button.less +72 -0
- package/es/button/index.js +1 -0
- package/es/button/index.js.map +1 -1
- package/es/checkbox/check.png +0 -0
- package/es/checkbox/checkbox.js +48 -0
- package/es/checkbox/checkbox.js.map +1 -0
- package/es/checkbox/checkbox.less +69 -0
- package/es/checkbox/index.js +3 -7
- package/es/checkbox/index.js.map +1 -1
- package/es/color-picker/index.less +4 -1
- package/es/date-picker/DatePicker.js +101 -0
- package/es/date-picker/DatePicker.js.map +1 -0
- package/es/date-picker/index.js +6 -12
- package/es/date-picker/index.js.map +1 -1
- package/es/date-picker/index.less +294 -0
- package/es/date-picker/style/RangePicker.less +3 -3
- package/es/descriptions/descriptions.js +64 -21
- package/es/descriptions/descriptions.js.map +1 -1
- package/es/descriptions/descriptions.less +57 -60
- package/es/descriptions/index.js +2 -2
- package/es/descriptions/index.js.map +1 -1
- package/es/drawer/drawer.js +98 -13
- package/es/drawer/drawer.js.map +1 -1
- package/es/drawer/index.js +1 -1
- package/es/drawer/index.js.map +1 -1
- package/es/drawer/index.less +154 -0
- package/es/drawer/style/drawer.less +18 -3
- package/es/drawer/style/index.js +2 -1
- package/es/drawer/style/index.js.map +1 -1
- package/es/form/form.js +3 -0
- package/es/form/form.js.map +1 -1
- package/es/form/form.less +36 -0
- package/es/icon/index.js +2 -0
- package/es/icon/index.js.map +1 -1
- package/es/icon/style/style.less +4 -0
- package/es/input/index.js +1 -1
- package/es/input/index.js.map +1 -1
- package/es/input/input.js +21 -30
- package/es/input/input.js.map +1 -1
- package/es/input/input.less +123 -20
- package/es/input-number/index.js +4 -5
- package/es/input-number/index.js.map +1 -1
- package/es/input-number/inputNumber.js +29 -0
- package/es/input-number/inputNumber.js.map +1 -0
- package/es/input-number/inputNumber.less +12 -0
- package/es/locale/en_US.js +12 -1
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +12 -1
- package/es/locale/zh_CN.js.map +1 -1
- package/es/message/message.less +2 -1
- package/es/modal/index.js +2 -3
- package/es/modal/index.js.map +1 -1
- package/es/modal/index.less +36 -0
- package/es/modal/modal.js +104 -17
- package/es/modal/modal.js.map +1 -1
- package/es/modal/style/index.js +2 -1
- package/es/modal/style/index.js.map +1 -1
- package/es/notification/assets/index.js +2 -0
- package/es/notification/assets/index.js.map +1 -0
- package/es/notification/assets/svg-error-tip.js +145 -0
- package/es/notification/assets/svg-error-tip.js.map +1 -0
- package/es/notification/assets/svg-success-tip.js +162 -0
- package/es/notification/assets/svg-success-tip.js.map +1 -0
- package/es/notification/index.js +1 -1
- package/es/notification/index.js.map +1 -1
- package/es/notification/notification.js +80 -0
- package/es/notification/notification.js.map +1 -0
- package/es/notification/notification.less +59 -0
- package/es/notification/style/index.less +2 -0
- package/es/popconfirm/index.js +2 -2
- package/es/popconfirm/index.js.map +1 -1
- package/es/popconfirm/index.less +26 -0
- package/es/popconfirm/popconfirm.js +40 -0
- package/es/popconfirm/popconfirm.js.map +1 -0
- package/es/popconfirm/style/index.js +2 -1
- package/es/popconfirm/style/index.js.map +1 -1
- package/es/popover/index.js +2 -2
- package/es/popover/index.js.map +1 -1
- package/es/popover/index.less +51 -0
- package/es/popover/popover.js +33 -0
- package/es/popover/popover.js.map +1 -0
- package/es/popover/style/index.js +1 -0
- package/es/popover/style/index.js.map +1 -1
- package/es/preview-text/index.js.map +1 -1
- package/es/progress/index.js +2 -2
- package/es/progress/index.js.map +1 -1
- package/es/progress/progress.js +132 -0
- package/es/progress/progress.js.map +1 -0
- package/es/progress/progress.less +82 -0
- package/es/query-form/Field/Composition/FieldPopover.js +284 -0
- package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
- package/es/query-form/Field/Composition/FieldPopover.less +35 -0
- package/es/query-form/Field/Composition/Select.js +108 -0
- package/es/query-form/Field/Composition/Select.js.map +1 -0
- package/es/query-form/Field/Composition/index.js +282 -0
- package/es/query-form/Field/Composition/index.js.map +1 -0
- package/es/query-form/Field/Composition/index.less +106 -0
- package/es/query-form/Field/Composition/utils.js +19 -0
- package/es/query-form/Field/Composition/utils.js.map +1 -0
- package/es/query-form/index.js +109 -125
- package/es/query-form/index.js.map +1 -1
- package/es/query-form/index.less +12 -9
- package/es/query-list-scene/index.less +4 -4
- package/es/radio/index.js +3 -5
- package/es/radio/index.js.map +1 -1
- package/es/radio/radio.js +57 -0
- package/es/radio/radio.js.map +1 -0
- package/es/radio/radio.less +43 -0
- package/es/segmented/index.less +126 -112
- package/es/select/index.js +1 -1
- package/es/select/index.js.map +1 -1
- package/es/select/select.js +5 -6
- package/es/select/select.js.map +1 -1
- package/es/select/select.less +83 -9
- package/es/steps/assets/background_left.svg +12 -0
- package/es/steps/assets/background_right.svg +12 -0
- package/es/steps/assets/horizontal_line.svg +3 -0
- package/es/steps/assets/vertical_line.svg +3 -0
- package/es/steps/index.js +9 -2
- package/es/steps/index.js.map +1 -1
- package/es/steps/stepStyle/icon.less +51 -0
- package/es/steps/stepStyle/index.less +173 -8
- package/es/steps/stepStyle/nav.less +51 -259
- package/es/steps/stepStyle/progress-dot.less +10 -0
- package/es/steps/stepStyle/variables.less +8 -0
- package/es/steps/stepStyle/vertical.less +41 -0
- package/es/steps/steps.js +53 -27
- package/es/steps/steps.js.map +1 -1
- package/es/steps/style/index.js +8 -0
- package/es/steps/style/index.js.map +1 -1
- package/es/style/themes/default.less +3 -2
- package/es/switch/index.less +46 -0
- package/es/switch/style/index.js +2 -1
- package/es/switch/style/index.js.map +1 -1
- package/es/switch/switch.js +40 -2
- package/es/switch/switch.js.map +1 -1
- package/es/table/style/index.less +51 -7
- package/es/table/style/size.less +5 -5
- package/es/table/table.js +37 -6
- package/es/table/table.js.map +1 -1
- package/es/table/table.less +33 -5
- package/es/tabs/index.js +1 -0
- package/es/tabs/index.js.map +1 -1
- package/es/tabs/style/index.js.map +1 -1
- package/es/tabs/style/index.less +1 -0
- package/es/tabs/tabs.js +22 -4
- package/es/tabs/tabs.js.map +1 -1
- package/es/tabs/tabs.less +114 -0
- package/es/tag/color.less +43 -0
- package/es/tag/index.js +11 -2
- package/es/tag/index.js.map +1 -1
- package/es/tag/tag.js +171 -0
- package/es/tag/tag.js.map +1 -0
- package/es/tag/tag.less +192 -0
- package/es/time-picker/TimePicker.js +36 -0
- package/es/time-picker/TimePicker.js.map +1 -0
- package/es/time-picker/index.js +2 -2
- package/es/time-picker/index.js.map +1 -1
- package/es/time-picker/index.less +38 -0
- package/es/tntd-action/Action.js +66 -0
- package/es/tntd-action/Action.js.map +1 -0
- package/es/tntd-action/index.js +64 -6
- package/es/tntd-action/index.js.map +1 -1
- package/es/tntd-action/index.less +36 -0
- package/es/tntd-cascader/AntdCascader/index.less +28 -27
- package/es/tooltip/index.js +2 -2
- package/es/tooltip/index.js.map +1 -1
- package/es/tooltip/index.less +24 -0
- package/es/tooltip/style/index.js +2 -1
- package/es/tooltip/style/index.js.map +1 -1
- package/es/tooltip/tooltip.js +32 -0
- package/es/tooltip/tooltip.js.map +1 -0
- package/es/utils/lang.js +8 -2
- package/es/utils/lang.js.map +1 -1
- package/lib/alert/alert.d.ts +12 -0
- package/lib/alert/alert.d.ts.map +1 -0
- package/lib/alert/alert.js +92 -0
- package/lib/alert/alert.js.map +1 -0
- package/lib/alert/alert.less +128 -0
- package/lib/alert/index.d.ts +1 -1
- package/lib/alert/index.d.ts.map +1 -1
- package/lib/alert/index.js +7 -8
- package/lib/alert/index.js.map +1 -1
- package/lib/alert/style/index.less +1 -0
- package/lib/button/button.d.ts +9 -4
- package/lib/button/button.d.ts.map +1 -1
- package/lib/button/button.js +27 -3
- package/lib/button/button.js.map +1 -1
- package/lib/button/button.less +72 -0
- package/lib/button/index.d.ts +1 -0
- package/lib/button/index.d.ts.map +1 -1
- package/lib/button/index.js +6 -5
- package/lib/button/index.js.map +1 -1
- package/lib/checkbox/check.png +0 -0
- package/lib/checkbox/checkbox.d.ts +16 -0
- package/lib/checkbox/checkbox.d.ts.map +1 -0
- package/lib/checkbox/checkbox.js +65 -0
- package/lib/checkbox/checkbox.js.map +1 -0
- package/lib/checkbox/checkbox.less +69 -0
- package/lib/checkbox/index.d.ts +3 -3
- package/lib/checkbox/index.d.ts.map +1 -1
- package/lib/checkbox/index.js +2 -17
- package/lib/checkbox/index.js.map +1 -1
- package/lib/color-picker/index.less +4 -1
- package/lib/date-picker/DatePicker.d.ts +21 -0
- package/lib/date-picker/DatePicker.d.ts.map +1 -0
- package/lib/date-picker/DatePicker.js +128 -0
- package/lib/date-picker/DatePicker.js.map +1 -0
- package/lib/date-picker/index.d.ts +2 -6
- package/lib/date-picker/index.d.ts.map +1 -1
- package/lib/date-picker/index.js +6 -37
- package/lib/date-picker/index.js.map +1 -1
- package/lib/date-picker/index.less +294 -0
- package/lib/date-picker/style/RangePicker.less +3 -3
- package/lib/descriptions/descriptions.d.ts +11 -6
- package/lib/descriptions/descriptions.d.ts.map +1 -1
- package/lib/descriptions/descriptions.js +68 -26
- package/lib/descriptions/descriptions.js.map +1 -1
- package/lib/descriptions/descriptions.less +57 -60
- package/lib/descriptions/index.d.ts +1 -1
- package/lib/descriptions/index.d.ts.map +1 -1
- package/lib/descriptions/index.js +7 -7
- package/lib/descriptions/index.js.map +1 -1
- package/lib/drawer/drawer.d.ts +22 -2
- package/lib/drawer/drawer.d.ts.map +1 -1
- package/lib/drawer/drawer.js +104 -13
- package/lib/drawer/drawer.js.map +1 -1
- package/lib/drawer/index.d.ts +1 -1
- package/lib/drawer/index.d.ts.map +1 -1
- package/lib/drawer/index.js +5 -5
- package/lib/drawer/index.js.map +1 -1
- package/lib/drawer/index.less +154 -0
- package/lib/drawer/style/drawer.less +18 -3
- package/lib/drawer/style/index.d.ts +1 -0
- package/lib/drawer/style/index.d.ts.map +1 -1
- package/lib/drawer/style/index.js +2 -1
- package/lib/drawer/style/index.js.map +1 -1
- package/lib/form/form.d.ts +1 -0
- package/lib/form/form.d.ts.map +1 -1
- package/lib/form/form.js +4 -0
- package/lib/form/form.js.map +1 -1
- package/lib/form/form.less +36 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.d.ts.map +1 -1
- package/lib/icon/index.js +2 -1
- package/lib/icon/index.js.map +1 -1
- package/lib/icon/style/style.less +4 -0
- package/lib/input/index.d.ts +1 -1
- package/lib/input/index.d.ts.map +1 -1
- package/lib/input/index.js +7 -7
- package/lib/input/index.js.map +1 -1
- package/lib/input/input.d.ts +5 -5
- package/lib/input/input.d.ts.map +1 -1
- package/lib/input/input.js +11 -20
- package/lib/input/input.js.map +1 -1
- package/lib/input/input.less +123 -20
- package/lib/input-number/index.d.ts +4 -8
- package/lib/input-number/index.d.ts.map +1 -1
- package/lib/input-number/index.js +3 -5
- package/lib/input-number/index.js.map +1 -1
- package/lib/input-number/inputNumber.d.ts +10 -0
- package/lib/input-number/inputNumber.d.ts.map +1 -0
- package/lib/input-number/inputNumber.js +48 -0
- package/lib/input-number/inputNumber.js.map +1 -0
- package/lib/input-number/inputNumber.less +12 -0
- package/lib/locale/default.d.ts +11 -0
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/en_US.d.ts +11 -0
- package/lib/locale/en_US.d.ts.map +1 -1
- package/lib/locale/en_US.js +12 -1
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/zh_CN.d.ts +11 -0
- package/lib/locale/zh_CN.d.ts.map +1 -1
- package/lib/locale/zh_CN.js +12 -1
- package/lib/locale/zh_CN.js.map +1 -1
- package/lib/message/message.less +2 -1
- package/lib/modal/index.d.ts +0 -1
- package/lib/modal/index.d.ts.map +1 -1
- package/lib/modal/index.js +2 -3
- package/lib/modal/index.js.map +1 -1
- package/lib/modal/index.less +36 -0
- package/lib/modal/modal.d.ts.map +1 -1
- package/lib/modal/modal.js +91 -16
- package/lib/modal/modal.js.map +1 -1
- package/lib/modal/style/index.d.ts +1 -0
- package/lib/modal/style/index.d.ts.map +1 -1
- package/lib/modal/style/index.js +2 -1
- package/lib/modal/style/index.js.map +1 -1
- package/lib/notification/assets/index.d.ts +3 -0
- package/lib/notification/assets/index.d.ts.map +1 -0
- package/lib/notification/assets/index.js +20 -0
- package/lib/notification/assets/index.js.map +1 -0
- package/lib/notification/assets/svg-error-tip.d.ts +4 -0
- package/lib/notification/assets/svg-error-tip.d.ts.map +1 -0
- package/lib/notification/assets/svg-error-tip.js +154 -0
- package/lib/notification/assets/svg-error-tip.js.map +1 -0
- package/lib/notification/assets/svg-success-tip.d.ts +4 -0
- package/lib/notification/assets/svg-success-tip.d.ts.map +1 -0
- package/lib/notification/assets/svg-success-tip.js +171 -0
- package/lib/notification/assets/svg-success-tip.js.map +1 -0
- package/lib/notification/index.d.ts +1 -1
- package/lib/notification/index.d.ts.map +1 -1
- package/lib/notification/index.js +7 -8
- package/lib/notification/index.js.map +1 -1
- package/lib/notification/notification.d.ts +9 -0
- package/lib/notification/notification.d.ts.map +1 -0
- package/lib/notification/notification.js +105 -0
- package/lib/notification/notification.js.map +1 -0
- package/lib/notification/notification.less +59 -0
- package/lib/notification/style/index.less +2 -0
- package/lib/popconfirm/index.d.ts +2 -2
- package/lib/popconfirm/index.d.ts.map +1 -1
- package/lib/popconfirm/index.js +1 -1
- package/lib/popconfirm/index.js.map +1 -1
- package/lib/popconfirm/index.less +26 -0
- package/lib/popconfirm/popconfirm.d.ts +6 -0
- package/lib/popconfirm/popconfirm.d.ts.map +1 -0
- package/lib/popconfirm/popconfirm.js +58 -0
- package/lib/popconfirm/popconfirm.js.map +1 -0
- package/lib/popconfirm/style/index.d.ts +1 -0
- package/lib/popconfirm/style/index.d.ts.map +1 -1
- package/lib/popconfirm/style/index.js +2 -1
- package/lib/popconfirm/style/index.js.map +1 -1
- package/lib/popover/index.d.ts +2 -2
- package/lib/popover/index.d.ts.map +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/popover/index.js.map +1 -1
- package/lib/popover/index.less +51 -0
- package/lib/popover/popover.d.ts +13 -0
- package/lib/popover/popover.d.ts.map +1 -0
- package/lib/popover/popover.js +53 -0
- package/lib/popover/popover.js.map +1 -0
- package/lib/popover/style/index.d.ts +1 -0
- package/lib/popover/style/index.d.ts.map +1 -1
- package/lib/popover/style/index.js +2 -1
- package/lib/popover/style/index.js.map +1 -1
- package/lib/preview-text/index.d.ts +1 -1
- package/lib/preview-text/index.d.ts.map +1 -1
- package/lib/preview-text/index.js.map +1 -1
- package/lib/progress/index.d.ts +2 -2
- package/lib/progress/index.d.ts.map +1 -1
- package/lib/progress/index.js +1 -1
- package/lib/progress/index.js.map +1 -1
- package/lib/progress/progress.d.ts +12 -0
- package/lib/progress/progress.d.ts.map +1 -0
- package/lib/progress/progress.js +148 -0
- package/lib/progress/progress.js.map +1 -0
- package/lib/progress/progress.less +82 -0
- package/lib/query-form/Field/Composition/FieldPopover.d.ts +17 -0
- package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/FieldPopover.js +319 -0
- package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
- package/lib/query-form/Field/Composition/FieldPopover.less +35 -0
- package/lib/query-form/Field/Composition/Select.d.ts +4 -0
- package/lib/query-form/Field/Composition/Select.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/Select.js +132 -0
- package/lib/query-form/Field/Composition/Select.js.map +1 -0
- package/lib/query-form/Field/Composition/index.d.ts +14 -0
- package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/index.js +337 -0
- package/lib/query-form/Field/Composition/index.js.map +1 -0
- package/lib/query-form/Field/Composition/index.less +106 -0
- package/lib/query-form/Field/Composition/utils.d.ts +6 -0
- package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/utils.js +27 -0
- package/lib/query-form/Field/Composition/utils.js.map +1 -0
- package/lib/query-form/index.d.ts +4 -7
- package/lib/query-form/index.d.ts.map +1 -1
- package/lib/query-form/index.js +137 -149
- package/lib/query-form/index.js.map +1 -1
- package/lib/query-form/index.less +12 -9
- package/lib/query-list-scene/index.less +4 -4
- package/lib/radio/index.d.ts +3 -2
- package/lib/radio/index.d.ts.map +1 -1
- package/lib/radio/index.js +2 -5
- package/lib/radio/index.js.map +1 -1
- package/lib/radio/radio.d.ts +17 -0
- package/lib/radio/radio.d.ts.map +1 -0
- package/lib/radio/radio.js +75 -0
- package/lib/radio/radio.js.map +1 -0
- package/lib/radio/radio.less +43 -0
- package/lib/segmented/index.d.ts +1 -1
- package/lib/segmented/index.less +126 -112
- package/lib/select/index.d.ts +1 -1
- package/lib/select/index.d.ts.map +1 -1
- package/lib/select/index.js +6 -6
- package/lib/select/index.js.map +1 -1
- package/lib/select/select.d.ts +1 -1
- package/lib/select/select.d.ts.map +1 -1
- package/lib/select/select.js +3 -4
- package/lib/select/select.js.map +1 -1
- package/lib/select/select.less +83 -9
- package/lib/steps/assets/background_left.svg +12 -0
- package/lib/steps/assets/background_right.svg +12 -0
- package/lib/steps/assets/horizontal_line.svg +3 -0
- package/lib/steps/assets/vertical_line.svg +3 -0
- package/lib/steps/index.d.ts +1 -2
- package/lib/steps/index.d.ts.map +1 -1
- package/lib/steps/index.js +9 -2
- package/lib/steps/index.js.map +1 -1
- package/lib/steps/stepStyle/icon.less +51 -0
- package/lib/steps/stepStyle/index.less +173 -8
- package/lib/steps/stepStyle/nav.less +51 -259
- package/lib/steps/stepStyle/progress-dot.less +10 -0
- package/lib/steps/stepStyle/variables.less +8 -0
- package/lib/steps/stepStyle/vertical.less +41 -0
- package/lib/steps/steps.d.ts +10 -2
- package/lib/steps/steps.d.ts.map +1 -1
- package/lib/steps/steps.js +50 -22
- package/lib/steps/steps.js.map +1 -1
- package/lib/steps/style/index.d.ts.map +1 -1
- package/lib/steps/style/index.js.map +1 -1
- package/lib/style/themes/default.less +3 -2
- package/lib/svg-components/illustration-403.d.ts +1 -1
- package/lib/svg-components/illustration-404.d.ts +1 -1
- package/lib/svg-components/illustration-500.d.ts +1 -1
- package/lib/svg-components/illustration-empty.d.ts +1 -1
- package/lib/svg-components/illustration-failure.d.ts +1 -1
- package/lib/svg-components/illustration-no-access.d.ts +1 -1
- package/lib/svg-components/illustration-no-chart.d.ts +1 -1
- package/lib/svg-components/illustration-no-result.d.ts +1 -1
- package/lib/svg-components/illustration-offline.d.ts +1 -1
- package/lib/svg-components/illustration-success.d.ts +1 -1
- package/lib/switch/index.less +46 -0
- package/lib/switch/style/index.d.ts +1 -0
- package/lib/switch/style/index.d.ts.map +1 -1
- package/lib/switch/style/index.js +2 -1
- package/lib/switch/style/index.js.map +1 -1
- package/lib/switch/switch.d.ts +8 -0
- package/lib/switch/switch.d.ts.map +1 -1
- package/lib/switch/switch.js +40 -5
- package/lib/switch/switch.js.map +1 -1
- package/lib/table/assets/image-loading-background.d.ts +1 -1
- package/lib/table/assets/image-loading.d.ts +1 -1
- package/lib/table/style/index.less +51 -7
- package/lib/table/style/size.less +5 -5
- package/lib/table/table.d.ts +2 -1
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +35 -4
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.less +33 -5
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/index.d.ts.map +1 -1
- package/lib/tabs/index.js +6 -5
- package/lib/tabs/index.js.map +1 -1
- package/lib/tabs/style/index.js.map +1 -1
- package/lib/tabs/style/index.less +1 -0
- package/lib/tabs/tabs.d.ts +3 -2
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +24 -3
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tabs/tabs.less +114 -0
- package/lib/tag/color.less +43 -0
- package/lib/tag/index.d.ts +3 -2
- package/lib/tag/index.d.ts.map +1 -1
- package/lib/tag/index.js +15 -9
- package/lib/tag/index.js.map +1 -1
- package/lib/tag/tag.d.ts +41 -0
- package/lib/tag/tag.d.ts.map +1 -0
- package/lib/tag/tag.js +183 -0
- package/lib/tag/tag.js.map +1 -0
- package/lib/tag/tag.less +192 -0
- package/lib/time-picker/TimePicker.d.ts +9 -0
- package/lib/time-picker/TimePicker.d.ts.map +1 -0
- package/lib/time-picker/TimePicker.js +55 -0
- package/lib/time-picker/TimePicker.js.map +1 -0
- package/lib/time-picker/index.d.ts +7 -6
- package/lib/time-picker/index.d.ts.map +1 -1
- package/lib/time-picker/index.js +4 -17
- package/lib/time-picker/index.js.map +1 -1
- package/lib/time-picker/index.less +38 -0
- package/lib/tntd-action/Action.d.ts +6 -0
- package/lib/tntd-action/Action.d.ts.map +1 -0
- package/lib/tntd-action/Action.js +86 -0
- package/lib/tntd-action/Action.js.map +1 -0
- package/lib/tntd-action/index.d.ts +4 -2
- package/lib/tntd-action/index.d.ts.map +1 -1
- package/lib/tntd-action/index.js +76 -5
- package/lib/tntd-action/index.js.map +1 -1
- package/lib/tntd-action/index.less +36 -0
- package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
- package/lib/tntd-cascader/AntdCascader/index.less +28 -27
- package/lib/tntd-rc-select/_util/PurePanel.d.ts +1 -1
- package/lib/tooltip/index.d.ts +2 -2
- package/lib/tooltip/index.d.ts.map +1 -1
- package/lib/tooltip/index.js +2 -2
- package/lib/tooltip/index.js.map +1 -1
- package/lib/tooltip/index.less +24 -0
- package/lib/tooltip/style/index.d.ts +1 -0
- package/lib/tooltip/style/index.d.ts.map +1 -1
- package/lib/tooltip/style/index.js +2 -1
- package/lib/tooltip/style/index.js.map +1 -1
- package/lib/tooltip/tooltip.d.ts +8 -0
- package/lib/tooltip/tooltip.d.ts.map +1 -0
- package/lib/tooltip/tooltip.js +51 -0
- package/lib/tooltip/tooltip.js.map +1 -0
- package/lib/utils/lang.d.ts.map +1 -1
- package/lib/utils/lang.js +8 -2
- package/lib/utils/lang.js.map +1 -1
- package/package.json +3 -2
- package/themes/common/index.less +29 -27
- package/themes/default/colors.less +1 -1
- package/themes/default/lessVars2.x.less +2 -1
- package/themes/default/lessVars3.x.less +1 -0
- package/themes/default/variables.less +60 -36
- package/es/checkbox/checkbox-group.js +0 -5
- package/es/checkbox/checkbox-group.js.map +0 -1
- package/es/drawer/drawer.less +0 -20
- package/es/modal/modal.less +0 -18
- package/es/radio/radio-group.js +0 -5
- package/es/radio/radio-group.js.map +0 -1
- package/es/steps/stepStyle/small.less +0 -5
- package/lib/checkbox/checkbox-group.d.ts +0 -8
- package/lib/checkbox/checkbox-group.d.ts.map +0 -1
- package/lib/checkbox/checkbox-group.js +0 -12
- package/lib/checkbox/checkbox-group.js.map +0 -1
- package/lib/drawer/drawer.less +0 -20
- package/lib/modal/modal.less +0 -18
- package/lib/radio/radio-group.d.ts +0 -8
- package/lib/radio/radio-group.d.ts.map +0 -1
- package/lib/radio/radio-group.js +0 -12
- package/lib/radio/radio-group.js.map +0 -1
- package/lib/steps/stepStyle/small.less +0 -5
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
@import '../../../style/themes/index';
|
|
2
|
+
@import '../../../style/mixins/index';
|
|
3
|
+
@import '../../../input/style/mixin';
|
|
4
|
+
|
|
5
|
+
.tnt-queryform-composition-input {
|
|
6
|
+
// width: 100%;
|
|
7
|
+
margin-right: @padding-md;
|
|
8
|
+
max-height: 162px;
|
|
9
|
+
overflow-x: hidden;
|
|
10
|
+
cursor: text;
|
|
11
|
+
padding: 0 @padding-xl;
|
|
12
|
+
position: relative;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
background-color: @select-background;
|
|
15
|
+
border: @border-width-base @border-style-base @select-border-color;
|
|
16
|
+
border-top-width: calc(@border-width-base + 0.02px);
|
|
17
|
+
border-radius: @border-radius-base;
|
|
18
|
+
outline: none;
|
|
19
|
+
transition: all 0.3s @ease-in-out;
|
|
20
|
+
user-select: none;
|
|
21
|
+
|
|
22
|
+
&-prefix {
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: @padding-sm;
|
|
25
|
+
top: 50%;
|
|
26
|
+
transform: translateY(-50%);
|
|
27
|
+
i.anticon {
|
|
28
|
+
color: tint(@bg-color-spotilight, 50%);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-width {
|
|
33
|
+
height: 0;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
width: auto;
|
|
36
|
+
position: absolute;
|
|
37
|
+
max-width: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&-items {
|
|
41
|
+
float: left;
|
|
42
|
+
padding: 0;
|
|
43
|
+
list-style: none;
|
|
44
|
+
margin: 0;
|
|
45
|
+
width: 100%;
|
|
46
|
+
&-item {
|
|
47
|
+
padding: 3px 0;
|
|
48
|
+
}
|
|
49
|
+
li {
|
|
50
|
+
float: left;
|
|
51
|
+
line-height: 1;
|
|
52
|
+
}
|
|
53
|
+
&-input {
|
|
54
|
+
.inputClass {
|
|
55
|
+
background: none;
|
|
56
|
+
border: none;
|
|
57
|
+
outline: none;
|
|
58
|
+
box-shadow: none !important;
|
|
59
|
+
width: 150px;
|
|
60
|
+
height: 26px;
|
|
61
|
+
line-height: 26px;
|
|
62
|
+
padding: 0;
|
|
63
|
+
textarea {
|
|
64
|
+
padding: 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
.inputClass-with-placeholder {
|
|
68
|
+
min-width: 398px !important;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
&-clear {
|
|
74
|
+
position: absolute;
|
|
75
|
+
right: @margin-sm;
|
|
76
|
+
top: 50%;
|
|
77
|
+
transform: translateY(-50%);
|
|
78
|
+
display: none;
|
|
79
|
+
i.anticon {
|
|
80
|
+
color: tint(@bg-color-spotilight, 50%);
|
|
81
|
+
}
|
|
82
|
+
&:hover {
|
|
83
|
+
.anticon {
|
|
84
|
+
color: @text-color-secondary !important;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
&:hover {
|
|
89
|
+
border-color: @blue-6;
|
|
90
|
+
outline: 0;
|
|
91
|
+
.tnt-queryform-composition-input-clear {
|
|
92
|
+
display: block;
|
|
93
|
+
}
|
|
94
|
+
// box-shadow: 0 0 0 2px rgb(18 107 251 / 20%);
|
|
95
|
+
}
|
|
96
|
+
&:focus, &:active {
|
|
97
|
+
border-color: @blue-5;
|
|
98
|
+
outline: 0;
|
|
99
|
+
// box-shadow: 0 0 0 2px rgb(18 107 251 / 20%);
|
|
100
|
+
}
|
|
101
|
+
.ant-tag {
|
|
102
|
+
padding: 0 @padding-xs;
|
|
103
|
+
border: none;
|
|
104
|
+
background: @fill-color-tertiary;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/query-form/Field/Composition/utils.js"],"names":[],"mappings":"AAAA,kEAGC;AAED;;;QAkBC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getLabelFromOptions = getLabelFromOptions;
|
|
7
|
+
exports.highlightSubstring = highlightSubstring;
|
|
8
|
+
function highlightSubstring(str, substring) {
|
|
9
|
+
var highlighted = "<span class=\"tnt-highlight\">".concat(substring, "</span>");
|
|
10
|
+
return str.replace(new RegExp(substring, 'g'), highlighted);
|
|
11
|
+
}
|
|
12
|
+
function getLabelFromOptions(key, options) {
|
|
13
|
+
var fieldNames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
14
|
+
label: 'label',
|
|
15
|
+
value: 'value'
|
|
16
|
+
};
|
|
17
|
+
var labelValue = key;
|
|
18
|
+
if (options) {
|
|
19
|
+
var target = options === null || options === void 0 ? void 0 : options.find(function (item) {
|
|
20
|
+
var valueKey = fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value;
|
|
21
|
+
var itemValue = item instanceof Object ? item[valueKey] : item;
|
|
22
|
+
return itemValue === key;
|
|
23
|
+
});
|
|
24
|
+
labelValue = target instanceof Object ? target === null || target === void 0 ? void 0 : target[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label] : target;
|
|
25
|
+
}
|
|
26
|
+
return labelValue;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/query-form/Field/Composition/utils.js"],"names":[],"mappings":";;;AAAA,SAAgB,kBAAkB,CAAC,GAAG,EAAE,SAAS;IAC/C,MAAM,WAAW,GAAG,+BAA+B,SAAS,SAAS,CAAA;IACrE,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,WAAW,CAAC,CAAA;AAC7D,CAAC;AAHD,gDAGC;AAED,SAAgB,mBAAmB,CACjC,GAAG,EACH,OAAO,EACP,UAAU,GAAG;IACX,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACf;IAED,IAAI,UAAU,GAAG,GAAG,CAAA;IACpB,IAAI,OAAO,EAAE;QACX,MAAM,MAAM,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YACpC,MAAM,QAAQ,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAA;YAClC,MAAM,SAAS,GAAG,IAAI,YAAY,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;YAChE,OAAO,SAAS,KAAK,GAAG,CAAA;QAC1B,CAAC,CAAC,CAAA;QACF,UAAU,GAAG,MAAM,YAAY,MAAM,CAAC,CAAC,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;KAC7E;IACD,OAAO,UAAU,CAAA;AACnB,CAAC;AAlBD,kDAkBC","sourcesContent":["export function highlightSubstring(str, substring) {\n const highlighted = `<span class=\"tnt-highlight\">${substring}</span>`\n return str.replace(new RegExp(substring, 'g'), highlighted)\n}\n\nexport function getLabelFromOptions(\n key,\n options,\n fieldNames = {\n label: 'label',\n value: 'value',\n }\n) {\n let labelValue = key\n if (options) {\n const target = options?.find((item) => {\n const valueKey = fieldNames?.value\n const itemValue = item instanceof Object ? item[valueKey] : item\n return itemValue === key\n })\n labelValue = target instanceof Object ? target?.[fieldNames?.label] : target\n }\n return labelValue\n}\n"]}
|
|
@@ -2,13 +2,11 @@ export default QueryForm;
|
|
|
2
2
|
declare class QueryForm extends React.PureComponent<any, any, any> {
|
|
3
3
|
constructor(props: any);
|
|
4
4
|
state: {
|
|
5
|
-
|
|
6
|
-
expanded: boolean;
|
|
7
|
-
drawerVisible: boolean;
|
|
8
|
-
drawerFieldsValueCount: number;
|
|
5
|
+
actionWidth: number;
|
|
9
6
|
};
|
|
10
7
|
fieldsRef: React.RefObject<any>;
|
|
11
8
|
formBoxRef: React.RefObject<any>;
|
|
9
|
+
actionRef: React.RefObject<any>;
|
|
12
10
|
form: any;
|
|
13
11
|
render(): React.JSX.Element;
|
|
14
12
|
getText(key: any): any;
|
|
@@ -18,14 +16,13 @@ declare class QueryForm extends React.PureComponent<any, any, any> {
|
|
|
18
16
|
search: (params: any) => void;
|
|
19
17
|
onSearch: () => void;
|
|
20
18
|
onReset: () => void;
|
|
21
|
-
onToggleExpand: () => void;
|
|
22
|
-
onShowDrawer: () => void;
|
|
23
19
|
onFieldChange: (name: any, value: any, ...rest: any[]) => void;
|
|
24
|
-
|
|
20
|
+
onCompositionFieldChange: (value: any, deleteKeys: any, ...rest: any[]) => void;
|
|
25
21
|
addResizeListener: () => (() => void) | undefined;
|
|
26
22
|
componentDidMount(): void;
|
|
27
23
|
removeResizeListener: (() => void) | undefined;
|
|
28
24
|
componentWillUnmount(): void;
|
|
25
|
+
renderFields(children: any, initialValues: any, showFieldCount: any, actionWidth: any): React.JSX.Element;
|
|
29
26
|
}
|
|
30
27
|
declare namespace QueryForm {
|
|
31
28
|
export { Field };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/query-form/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/query-form/index.js"],"names":[],"mappings":";AAgBA;IACE,wBAaC;IAVC;;MAEC;IACD,gCAA4B;IAC5B,iCAA6B;IAC7B,gCAA4B;IAE5B,UAAmC;IAKrC,4BA6CC;IAED,uBAEC;IAED,iCAoBC;IAED,0BA4BC;IAED,2DASM;IAEN,8BAKC;IAED,qBAEC;IAED,oBAKC;IAED,+DAYC;IACD,gFAuBC;IAED,kDAcC;IAED,0BAoBC;IAFG,+CAAoD;IAIxD,6BAKC;IAED,0GAkDC;CACF"}
|
package/lib/query-form/index.js
CHANGED
|
@@ -6,17 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _debounce2 = _interopRequireDefault(require("lodash/debounce"));
|
|
9
|
-
var
|
|
9
|
+
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _createActions = _interopRequireDefault(require("./createActions"));
|
|
12
12
|
var _Field = _interopRequireDefault(require("./Field"));
|
|
13
|
+
var _Composition = _interopRequireDefault(require("./Field/Composition"));
|
|
13
14
|
var _useForm = _interopRequireDefault(require("./useForm"));
|
|
14
|
-
var _badge = _interopRequireDefault(require("../badge"));
|
|
15
15
|
var _button = _interopRequireDefault(require("../button"));
|
|
16
|
-
var _drawer = _interopRequireDefault(require("../drawer"));
|
|
17
16
|
var _form = _interopRequireDefault(require("../form"));
|
|
18
17
|
var _prevLocale = require("../prev-locale");
|
|
19
|
-
var _tntdIcon = _interopRequireDefault(require("../tntd-icon"));
|
|
20
18
|
require("./index.less");
|
|
21
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -45,14 +43,14 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
45
43
|
configurable: true,
|
|
46
44
|
writable: true,
|
|
47
45
|
value: (0, _debounce2["default"])(function () {
|
|
48
|
-
|
|
49
|
-
if (current) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
46
|
+
// const { current } = this.fieldsRef
|
|
47
|
+
// if (current) {
|
|
48
|
+
// setTimeout(() => {
|
|
49
|
+
// this.setState({
|
|
50
|
+
// showMore: this.isFieldsWidthOverflow(),
|
|
51
|
+
// })
|
|
52
|
+
// }, 25)
|
|
53
|
+
// }
|
|
56
54
|
}, 50)
|
|
57
55
|
});
|
|
58
56
|
Object.defineProperty(_this, "search", {
|
|
@@ -81,32 +79,9 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
81
79
|
initialValues = _this$props.initialValues,
|
|
82
80
|
onReset = _this$props.onReset;
|
|
83
81
|
_this.form.setValues(Object.assign({}, initialValues));
|
|
84
|
-
_this.updateDrawerFieldsValueCount();
|
|
85
82
|
onReset === null || onReset === void 0 ? void 0 : onReset(initialValues);
|
|
86
83
|
}
|
|
87
84
|
});
|
|
88
|
-
Object.defineProperty(_this, "onToggleExpand", {
|
|
89
|
-
enumerable: true,
|
|
90
|
-
configurable: true,
|
|
91
|
-
writable: true,
|
|
92
|
-
value: function value() {
|
|
93
|
-
var _a, _b;
|
|
94
|
-
_this.setState({
|
|
95
|
-
expanded: !_this.state.expanded
|
|
96
|
-
});
|
|
97
|
-
(_b = (_a = _this.props).onToggleExpand) === null || _b === void 0 ? void 0 : _b.call(_a, !_this.state.expanded);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
Object.defineProperty(_this, "onShowDrawer", {
|
|
101
|
-
enumerable: true,
|
|
102
|
-
configurable: true,
|
|
103
|
-
writable: true,
|
|
104
|
-
value: function value() {
|
|
105
|
-
_this.setState({
|
|
106
|
-
drawerVisible: true
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
85
|
Object.defineProperty(_this, "onFieldChange", {
|
|
111
86
|
enumerable: true,
|
|
112
87
|
configurable: true,
|
|
@@ -125,31 +100,39 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
125
100
|
rest[_key - 2] = arguments[_key];
|
|
126
101
|
}
|
|
127
102
|
onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));
|
|
128
|
-
_this.updateDrawerFieldsValueCount(newValues);
|
|
129
103
|
}
|
|
130
104
|
});
|
|
131
|
-
Object.defineProperty(_this, "
|
|
105
|
+
Object.defineProperty(_this, "onCompositionFieldChange", {
|
|
132
106
|
enumerable: true,
|
|
133
107
|
configurable: true,
|
|
134
108
|
writable: true,
|
|
135
|
-
value: function value() {
|
|
109
|
+
value: function value(_value2, deleteKeys) {
|
|
110
|
+
for (var _len2 = arguments.length, rest = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
111
|
+
rest[_key2 - 2] = arguments[_key2];
|
|
112
|
+
}
|
|
113
|
+
var _a;
|
|
136
114
|
var values = _this.form.getValues();
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
var _a;
|
|
143
|
-
if (index >= showFieldCount && (values === null || values === void 0 ? void 0 : values[(_a = cur === null || cur === void 0 ? void 0 : cur.props) === null || _a === void 0 ? void 0 : _a.name])) {
|
|
144
|
-
acc++;
|
|
115
|
+
var newValues = Object.assign(Object.assign({}, values), _value2);
|
|
116
|
+
if (deleteKeys === null || deleteKeys === void 0 ? void 0 : deleteKeys.length) {
|
|
117
|
+
deleteKeys === null || deleteKeys === void 0 ? void 0 : deleteKeys.forEach(function (key) {
|
|
118
|
+
if (values === null || values === void 0 ? void 0 : values[key]) {
|
|
119
|
+
delete newValues[key];
|
|
145
120
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
_this.form.setData('values', newValues);
|
|
124
|
+
var onChange = _this.props.onChange;
|
|
125
|
+
if (onChange) {
|
|
126
|
+
(_a = Object.keys(values)) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {
|
|
127
|
+
if (JSON.stringify(_value2[key]) !== JSON.stringify(values[key] || '')) {
|
|
128
|
+
var changedInfo = {
|
|
129
|
+
name: key,
|
|
130
|
+
value: _value2[key],
|
|
131
|
+
preValue: values === null || values === void 0 ? void 0 : values[key]
|
|
132
|
+
};
|
|
133
|
+
onChange.apply(void 0, [newValues, changedInfo].concat(rest));
|
|
134
|
+
}
|
|
135
|
+
});
|
|
153
136
|
}
|
|
154
137
|
}
|
|
155
138
|
});
|
|
@@ -179,16 +162,13 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
179
162
|
initialValues = props.initialValues,
|
|
180
163
|
_props$showExpand = props.showExpand,
|
|
181
164
|
showExpand = _props$showExpand === void 0 ? true : _props$showExpand,
|
|
182
|
-
renderActions = props.renderActions
|
|
183
|
-
defaultExpanded = props.defaultExpanded;
|
|
165
|
+
renderActions = props.renderActions;
|
|
184
166
|
_this.state = {
|
|
185
|
-
|
|
186
|
-
expanded: defaultExpanded || !showExpand || renderActions ? true : false,
|
|
187
|
-
drawerVisible: false,
|
|
188
|
-
drawerFieldsValueCount: 0
|
|
167
|
+
actionWidth: 0
|
|
189
168
|
};
|
|
190
169
|
_this.fieldsRef = (0, _react.createRef)();
|
|
191
170
|
_this.formBoxRef = (0, _react.createRef)();
|
|
171
|
+
_this.actionRef = (0, _react.createRef)();
|
|
192
172
|
_this.form = form || (0, _createActions["default"])();
|
|
193
173
|
_this.form.setData('initialValues', initialValues);
|
|
194
174
|
_this.form.setData('values', Object.assign({}, initialValues));
|
|
@@ -199,99 +179,54 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
199
179
|
key: "render",
|
|
200
180
|
value: function render() {
|
|
201
181
|
var _this2 = this;
|
|
202
|
-
var _this$
|
|
203
|
-
children = _this$
|
|
204
|
-
_this$
|
|
205
|
-
className = _this$
|
|
206
|
-
_this$
|
|
207
|
-
initialValues = _this$
|
|
208
|
-
renderActions = _this$
|
|
209
|
-
_this$
|
|
210
|
-
showSearch = _this$
|
|
211
|
-
_this$
|
|
212
|
-
showReset = _this$
|
|
213
|
-
|
|
214
|
-
_this$
|
|
215
|
-
|
|
216
|
-
|
|
182
|
+
var _this$props2 = this.props,
|
|
183
|
+
children = _this$props2.children,
|
|
184
|
+
_this$props2$classNam = _this$props2.className,
|
|
185
|
+
className = _this$props2$classNam === void 0 ? '' : _this$props2$classNam,
|
|
186
|
+
_this$props2$initialV = _this$props2.initialValues,
|
|
187
|
+
initialValues = _this$props2$initialV === void 0 ? {} : _this$props2$initialV,
|
|
188
|
+
renderActions = _this$props2.renderActions,
|
|
189
|
+
_this$props2$showSear = _this$props2.showSearch,
|
|
190
|
+
showSearch = _this$props2$showSear === void 0 ? true : _this$props2$showSear,
|
|
191
|
+
_this$props2$showRese = _this$props2.showReset,
|
|
192
|
+
showReset = _this$props2$showRese === void 0 ? true : _this$props2$showRese,
|
|
193
|
+
_this$props2$showFiel = _this$props2.showFieldCount,
|
|
194
|
+
showFieldCount = _this$props2$showFiel === void 0 ? 3 : _this$props2$showFiel,
|
|
195
|
+
_this$props2$drawerPr = _this$props2.drawerProps,
|
|
196
|
+
drawerProps = _this$props2$drawerPr === void 0 ? {} : _this$props2$drawerPr,
|
|
197
|
+
size = _this$props2.size;
|
|
217
198
|
var extraActions = this.props.extraActions;
|
|
218
|
-
var
|
|
219
|
-
expanded = _this$state.expanded,
|
|
220
|
-
showMore = _this$state.showMore,
|
|
221
|
-
drawerVisible = _this$state.drawerVisible,
|
|
222
|
-
drawerFieldsValueCount = _this$state.drawerFieldsValueCount;
|
|
199
|
+
var actionWidth = this.state.actionWidth;
|
|
223
200
|
var renderFormActions = renderActions || function () {
|
|
224
|
-
return _react["default"].createElement(_react["default"].Fragment, null,
|
|
225
|
-
count: drawerFieldsValueCount
|
|
226
|
-
}, _react["default"].createElement(_button["default"], {
|
|
227
|
-
onClick: _this2.onShowDrawer
|
|
228
|
-
}, _react["default"].createElement(_tntdIcon["default"], {
|
|
229
|
-
type: "filter"
|
|
230
|
-
}), _this2.getText('moreFiltering'))), showSearch && _react["default"].createElement(_button["default"], {
|
|
201
|
+
return _react["default"].createElement(_react["default"].Fragment, null, showSearch && _react["default"].createElement(_button["default"], {
|
|
231
202
|
type: "primary",
|
|
232
203
|
onClick: _this2.onSearch
|
|
233
204
|
}, _this2.getText('search')), showReset && _react["default"].createElement(_button["default"], {
|
|
234
205
|
onClick: _this2.onReset
|
|
235
|
-
}, _this2.getText('reset')),
|
|
236
|
-
className: "expand-link",
|
|
237
|
-
type: "link",
|
|
238
|
-
onClick: _this2.onToggleExpand
|
|
239
|
-
}, _this2.getText(expanded ? 'collapse' : 'expand')), _react["default"].Children.map(children, function (child) {
|
|
206
|
+
}, _this2.getText('reset')), _react["default"].Children.map(children, function (child) {
|
|
240
207
|
var _a;
|
|
241
208
|
return child && ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.align) === 'right' && _react["default"].cloneElement(child);
|
|
242
209
|
}));
|
|
243
210
|
};
|
|
244
211
|
return _react["default"].createElement("div", {
|
|
245
212
|
ref: this.formBoxRef,
|
|
246
|
-
className: (0,
|
|
213
|
+
className: (0, _classnames2["default"])(clsPrefix, _defineProperty({}, className, className))
|
|
247
214
|
}, _react["default"].createElement(_form["default"], {
|
|
248
215
|
layout: "inline",
|
|
249
|
-
className: (0,
|
|
250
|
-
expanded:
|
|
251
|
-
showMore: showMore
|
|
216
|
+
className: (0, _classnames2["default"])({
|
|
217
|
+
expanded: true
|
|
252
218
|
})
|
|
253
219
|
}, _react["default"].createElement("div", {
|
|
254
|
-
ref: this.fieldsRef
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
onChange: _this2.onFieldChange
|
|
261
|
-
});
|
|
262
|
-
})), _react["default"].createElement("div", {
|
|
220
|
+
ref: this.fieldsRef,
|
|
221
|
+
style: {
|
|
222
|
+
width: '100%'
|
|
223
|
+
}
|
|
224
|
+
}, this.renderFields(children, initialValues, showFieldCount, actionWidth)), _react["default"].createElement("div", {
|
|
225
|
+
ref: this.actionRef,
|
|
263
226
|
className: "".concat(clsPrefix, "-actions")
|
|
264
|
-
}, renderFormActions()
|
|
265
|
-
title: this.getText('moreFiltering'),
|
|
266
|
-
visible: drawerVisible,
|
|
267
|
-
onClose: function onClose() {
|
|
268
|
-
return _this2.setState({
|
|
269
|
-
drawerVisible: false
|
|
270
|
-
});
|
|
271
|
-
},
|
|
272
|
-
width: 300,
|
|
273
|
-
size: size,
|
|
274
|
-
getContainer: false
|
|
275
|
-
}, drawerProps, {
|
|
276
|
-
className: (0, _classnames3["default"])("".concat(clsPrefix, "-drawer"), _defineProperty({
|
|
277
|
-
'large-size': size === 'large'
|
|
278
|
-
}, className, className))
|
|
279
|
-
}), _react["default"].Children.map(children, function (child, index) {
|
|
280
|
-
return child && index >= showFieldCount && _react["default"].cloneElement(child, {
|
|
281
|
-
form: _this2.form,
|
|
282
|
-
isFieldInDrawer: true,
|
|
283
|
-
initialValue: initialValues === null || initialValues === void 0 ? void 0 : initialValues[child.props.name],
|
|
284
|
-
onChange: _this2.onFieldChange,
|
|
285
|
-
onSearch: _this2.onSearch
|
|
286
|
-
});
|
|
287
|
-
}), _react["default"].createElement(_button["default"], {
|
|
288
|
-
type: "primary",
|
|
289
|
-
onClick: this.onSearch
|
|
290
|
-
}, this.getText('search')), _react["default"].createElement(_button["default"], {
|
|
291
|
-
onClick: this.onReset
|
|
292
|
-
}, this.getText('reset')))), extraActions && _react["default"].createElement("div", {
|
|
227
|
+
}, renderFormActions(), extraActions && _react["default"].createElement("div", {
|
|
293
228
|
className: "".concat(clsPrefix, "-extra")
|
|
294
|
-
}, extraActions));
|
|
229
|
+
}, extraActions))));
|
|
295
230
|
}
|
|
296
231
|
}, {
|
|
297
232
|
key: "getText",
|
|
@@ -350,10 +285,16 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
350
285
|
key: "componentDidMount",
|
|
351
286
|
value: function componentDidMount() {
|
|
352
287
|
var current = this.fieldsRef.current;
|
|
353
|
-
var _this$
|
|
354
|
-
showFieldCount = _this$
|
|
355
|
-
_this$
|
|
356
|
-
showExpand = _this$
|
|
288
|
+
var _this$props3 = this.props,
|
|
289
|
+
showFieldCount = _this$props3.showFieldCount,
|
|
290
|
+
_this$props3$showExpa = _this$props3.showExpand,
|
|
291
|
+
showExpand = _this$props3$showExpa === void 0 ? true : _this$props3$showExpa;
|
|
292
|
+
// 获取节点宽度
|
|
293
|
+
var width = this.actionRef.current.offsetWidth;
|
|
294
|
+
// 更新state
|
|
295
|
+
this.setState({
|
|
296
|
+
actionWidth: width
|
|
297
|
+
});
|
|
357
298
|
this.updateFieldHeight();
|
|
358
299
|
this.form.on('search', this.search);
|
|
359
300
|
// 未设置第一行显示数量且禁止了展开操作 或 自定义了操作区域,则不需要处理展开计算逻辑
|
|
@@ -362,16 +303,7 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
362
303
|
return;
|
|
363
304
|
}
|
|
364
305
|
if (!showFieldCount) {
|
|
365
|
-
if (current && this.isFieldsWidthOverflow()) {
|
|
366
|
-
this.setState({
|
|
367
|
-
showMore: true
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
306
|
this.removeResizeListener = this.addResizeListener();
|
|
371
|
-
} else {
|
|
372
|
-
this.updateDrawerFieldsValueCount();
|
|
373
|
-
this.form.on('setValues', this.updateDrawerFieldsValueCount);
|
|
374
|
-
this.form.on('setValue', this.updateDrawerFieldsValueCount);
|
|
375
307
|
}
|
|
376
308
|
}
|
|
377
309
|
}, {
|
|
@@ -379,10 +311,66 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
379
311
|
value: function componentWillUnmount() {
|
|
380
312
|
var _a;
|
|
381
313
|
(_a = this.removeResizeListener) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
382
|
-
this.form.off('setValues', this.updateDrawerFieldsValueCount)
|
|
383
|
-
this.form.off('setValue', this.updateDrawerFieldsValueCount)
|
|
314
|
+
// this.form.off('setValues', this.updateDrawerFieldsValueCount)
|
|
315
|
+
// this.form.off('setValue', this.updateDrawerFieldsValueCount)
|
|
384
316
|
this.form.off('search', this.search);
|
|
385
317
|
}
|
|
318
|
+
}, {
|
|
319
|
+
key: "renderFields",
|
|
320
|
+
value: function renderFields(children, initialValues, showFieldCount, actionWidth) {
|
|
321
|
+
var _this3 = this;
|
|
322
|
+
var rest = [];
|
|
323
|
+
var size = _react["default"].Children.count(children);
|
|
324
|
+
var fields = null;
|
|
325
|
+
if (size <= showFieldCount) {
|
|
326
|
+
// 过滤器不超过3个
|
|
327
|
+
fields = _react["default"].Children.map(children, function (child, index) {
|
|
328
|
+
var _a, _b;
|
|
329
|
+
if (child && ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.align) !== 'right') {
|
|
330
|
+
return _react["default"].cloneElement(child, {
|
|
331
|
+
form: _this3.form,
|
|
332
|
+
initialValue: initialValues === null || initialValues === void 0 ? void 0 : initialValues[(_b = child.props) === null || _b === void 0 ? void 0 : _b.name],
|
|
333
|
+
onChange: _this3.onFieldChange
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return;
|
|
337
|
+
});
|
|
338
|
+
} else {
|
|
339
|
+
fields = _react["default"].Children.map(children, function (child, index) {
|
|
340
|
+
var _a, _b;
|
|
341
|
+
if (child && ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.align) !== 'right') {
|
|
342
|
+
var _ref = child === null || child === void 0 ? void 0 : child.props,
|
|
343
|
+
_ref$isGroup = _ref.isGroup,
|
|
344
|
+
isGroup = _ref$isGroup === void 0 ? true : _ref$isGroup;
|
|
345
|
+
if (!isGroup) {
|
|
346
|
+
return _react["default"].cloneElement(child, {
|
|
347
|
+
form: _this3.form,
|
|
348
|
+
initialValue: initialValues === null || initialValues === void 0 ? void 0 : initialValues[(_b = child.props) === null || _b === void 0 ? void 0 : _b.name],
|
|
349
|
+
onChange: _this3.onFieldChange
|
|
350
|
+
});
|
|
351
|
+
} else {
|
|
352
|
+
rest.push(child);
|
|
353
|
+
console.log('child', index, child);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return;
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
return _react["default"].createElement("div", {
|
|
360
|
+
style: {
|
|
361
|
+
marginRight: actionWidth
|
|
362
|
+
}
|
|
363
|
+
}, fields, !!(rest === null || rest === void 0 ? void 0 : rest.length) && _react["default"].createElement(_Composition["default"], {
|
|
364
|
+
clsPrefix: clsPrefix,
|
|
365
|
+
data: rest,
|
|
366
|
+
initialValues: initialValues,
|
|
367
|
+
onChange: this.onCompositionFieldChange,
|
|
368
|
+
form: this.form,
|
|
369
|
+
style: {
|
|
370
|
+
marginRight: (fields === null || fields === void 0 ? void 0 : fields.length) > 0 ? 10 - actionWidth : 10
|
|
371
|
+
}
|
|
372
|
+
}));
|
|
373
|
+
}
|
|
386
374
|
}]);
|
|
387
375
|
}(_react["default"].PureComponent);
|
|
388
376
|
QueryForm.Field = _Field["default"];
|