@type-dom/ui 0.0.2 → 0.0.3
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/README.md +40 -6
- package/package.json +7 -1
- package/src/aria.d.ts +17 -0
- package/src/aria.js +20 -0
- package/src/{basic → components/basic}/index.d.ts +12 -0
- package/src/components/basic/index.js +48 -0
- package/src/{basic → components/basic}/td-button/td-button.class.d.ts +7 -5
- package/src/components/basic/td-button/td-button.class.js +179 -0
- package/src/{basic → components/basic}/td-button/td-button.interface.d.ts +21 -21
- package/src/{basic → components/basic}/td-button/td-button.style.d.ts +2 -1
- package/src/{basic → components/basic}/td-button/td-button.style.js +34 -30
- package/src/components/basic/td-button-group/td-button-group.class.d.ts +11 -0
- package/src/components/basic/td-button-group/td-button-group.class.js +105 -0
- package/src/components/basic/td-button-group/td-button-group.interface.d.ts +16 -0
- package/src/components/basic/td-container/td-aside/td-aside.class.d.ts +6 -0
- package/src/{basic → components/basic}/td-container/td-aside/td-aside.class.js +4 -4
- package/src/components/basic/td-container/td-aside/td-aside.interface.d.ts +7 -0
- package/src/components/basic/td-container/td-container.class.d.ts +11 -0
- package/src/{basic → components/basic}/td-container/td-container.class.js +4 -4
- package/src/components/basic/td-container/td-container.interface.d.ts +15 -0
- package/src/components/basic/td-container/td-footer/td-footer.class.d.ts +8 -0
- package/src/components/basic/td-container/td-footer/td-footer.class.js +24 -0
- package/src/components/basic/td-container/td-footer/td-footer.interface.d.ts +8 -0
- package/src/components/basic/td-container/td-header/td-header.class.d.ts +9 -0
- package/src/components/basic/td-container/td-header/td-header.class.js +25 -0
- package/src/components/basic/td-container/td-header/td-header.interface.d.ts +8 -0
- package/src/{basic → components/basic}/td-container/td-main/td-main.class.d.ts +2 -2
- package/src/{basic → components/basic}/td-container/td-main/td-main.class.js +5 -8
- package/src/components/basic/td-container/td-main/td-main.interface.d.ts +7 -0
- package/src/{basic → components/basic}/td-icon/td-icon.class.d.ts +7 -3
- package/src/{basic → components/basic}/td-icon/td-icon.class.js +37 -11
- package/src/components/basic/td-icon/td-icon.interface.d.ts +13 -0
- package/src/{basic → components/basic}/td-icon/td-icon.style.d.ts +1 -0
- package/src/{basic → components/basic}/td-icon/td-icon.style.js +4 -3
- package/src/components/basic/td-layout/td-col/td-col.class.d.ts +13 -0
- package/src/components/basic/td-layout/td-col/td-col.class.js +128 -0
- package/src/components/basic/td-layout/td-col/td-col.interface.d.ts +46 -0
- package/src/components/basic/td-layout/td-row/td-row.class.d.ts +10 -0
- package/src/components/basic/td-layout/td-row/td-row.class.js +101 -0
- package/src/components/basic/td-layout/td-row/td-row.interface.d.ts +18 -0
- package/src/components/basic/td-layout/td-row/td-row.interface.js +12 -0
- package/src/components/basic/td-layout/td-row/td-row.style.d.ts +1 -0
- package/src/components/basic/td-layout/td-row/td-row.style.js +8 -0
- package/src/components/basic/td-link/td-link.class.d.ts +11 -0
- package/src/components/basic/td-link/td-link.class.js +105 -0
- package/src/components/basic/td-link/td-link.interface.d.ts +33 -0
- package/src/components/basic/td-link/td-link.style.d.ts +5 -0
- package/src/components/basic/td-link/td-link.style.js +45 -0
- package/src/components/basic/td-scrollbar/bar/bar.class.d.ts +8 -0
- package/src/components/basic/td-scrollbar/bar/bar.class.js +31 -0
- package/src/components/basic/td-scrollbar/bar/bar.interface.d.ts +8 -0
- package/src/components/basic/td-scrollbar/td-scrollbar.class.d.ts +9 -0
- package/src/components/basic/td-scrollbar/td-scrollbar.class.js +51 -0
- package/src/components/basic/td-scrollbar/td-scrollbar.interface.d.ts +63 -0
- package/src/components/basic/td-scrollbar/td-scrollbar.interface.js +5 -0
- package/src/components/basic/td-scrollbar/thumb/thumb.class.d.ts +7 -0
- package/src/components/basic/td-scrollbar/thumb/thumb.class.js +45 -0
- package/src/components/basic/td-scrollbar/thumb/thumb.interface.d.ts +11 -0
- package/src/components/basic/td-space/td-space.class.d.ts +12 -0
- package/src/components/basic/td-space/td-space.class.js +92 -0
- package/src/components/basic/td-space/td-space.const.d.ts +3 -0
- package/src/components/basic/td-space/td-space.const.js +8 -0
- package/src/components/basic/td-space/td-space.interface.d.ts +39 -0
- package/src/components/basic/td-text/td-text.class.d.ts +10 -0
- package/src/components/basic/td-text/td-text.class.js +47 -0
- package/src/components/basic/td-text/td-text.interface.d.ts +21 -0
- package/src/components/basic/td-text/td-text.style.d.ts +6 -0
- package/src/components/basic/td-text/td-text.style.js +59 -0
- package/src/{feedback/dialog/dialog.d.ts → components/feedback/dialog/dialog.class.d.ts} +2 -3
- package/src/{feedback/dialog/dialog.js → components/feedback/dialog/dialog.class.js} +9 -2
- package/src/components/feedback/dialog/dialog.interface.d.ts +5 -0
- package/src/{feedback → components/feedback}/index.d.ts +1 -1
- package/src/{feedback → components/feedback}/index.js +2 -2
- package/src/{feedback → components/feedback}/message-box/message-box.d.ts +2 -3
- package/src/components/feedback/message-box/message-box.interface.d.ts +4 -0
- package/src/{feedback → components/feedback}/message-box/message-box.js +11 -2
- package/src/{feedback → components/feedback}/overlay/container/body/body.js +7 -9
- package/src/{feedback → components/feedback}/overlay/container/container.js +12 -14
- package/src/{feedback → components/feedback}/overlay/container/footer/cancel-button/cancel-button.js +2 -2
- package/src/{feedback → components/feedback}/overlay/container/footer/confirm-button/confirm-button.js +9 -11
- package/src/{feedback → components/feedback}/overlay/container/footer/footer.js +4 -4
- package/src/{feedback → components/feedback}/overlay/container/header/close-button/close-button.js +15 -17
- package/src/{feedback → components/feedback}/overlay/container/header/header.js +2 -2
- package/src/{feedback → components/feedback}/overlay/container/header/title/title.d.ts +1 -1
- package/src/{feedback → components/feedback}/overlay/container/header/title/title.js +9 -11
- package/src/{feedback → components/feedback}/overlay/overlay.abstract.d.ts +0 -3
- package/src/{feedback → components/feedback}/overlay/overlay.abstract.js +5 -11
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.d.ts +8 -0
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.js +81 -0
- package/src/components/feedback/td-focus-trap/td-focus-trap.interface.d.ts +10 -0
- package/src/components/feedback/td-focus-trap/tokens.d.ts +7 -0
- package/src/components/feedback/td-focus-trap/tokens.js +23 -0
- package/src/components/feedback/td-focus-trap/utils.d.ts +25 -0
- package/src/components/feedback/td-focus-trap/utils.js +153 -0
- package/src/components/feedback/td-popper/arrow/arrow.class.d.ts +6 -0
- package/src/components/feedback/td-popper/arrow/arrow.class.js +32 -0
- package/src/components/feedback/td-popper/arrow/arrow.interface.d.ts +11 -0
- package/src/components/feedback/td-popper/arrow/arrow.interface.js +2 -0
- package/src/components/feedback/td-popper/content/content.class.d.ts +7 -0
- package/src/components/feedback/td-popper/content/content.class.js +25 -0
- package/src/components/feedback/td-popper/content/content.interface.d.ts +37 -0
- package/src/components/feedback/td-popper/content/content.interface.js +2 -0
- package/src/components/feedback/td-popper/td-popper.class.d.ts +6 -0
- package/src/components/feedback/td-popper/td-popper.class.js +12 -0
- package/src/components/feedback/td-popper/td-popper.interface.d.ts +12 -0
- package/src/components/feedback/td-popper/td-popper.interface.js +13 -0
- package/src/components/feedback/td-popper/trigger/trigger.class.d.ts +6 -0
- package/src/components/feedback/td-popper/trigger/trigger.class.js +11 -0
- package/src/components/feedback/td-popper/trigger/trigger.interface.d.ts +8 -0
- package/src/components/feedback/td-popper/trigger/trigger.interface.js +2 -0
- package/src/components/feedback/td-tooltip/content/content.class.d.ts +6 -0
- package/src/components/feedback/td-tooltip/content/content.class.js +12 -0
- package/src/components/feedback/td-tooltip/content/content.interface.d.ts +42 -0
- package/src/components/feedback/td-tooltip/content/content.interface.js +2 -0
- package/src/components/feedback/td-tooltip/td-tooltip.class.d.ts +8 -0
- package/src/components/feedback/td-tooltip/td-tooltip.class.js +30 -0
- package/src/components/feedback/td-tooltip/td-tooltip.interface.d.ts +10 -0
- package/src/components/feedback/td-tooltip/td-tooltip.interface.js +2 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.class.d.ts +6 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.class.js +12 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.interface.d.ts +16 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.interface.js +2 -0
- package/src/{form → components/form}/checkbox-group/checkbox-group.class.d.ts +2 -3
- package/src/{form → components/form}/checkbox-group/checkbox-group.class.js +2 -2
- package/src/components/form/checkbox-group/checkbox-group.interface.js +2 -0
- package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.class.d.ts +2 -2
- package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.class.js +7 -7
- package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.interface.d.ts +0 -5
- package/src/components/form/checkbox-group/checkbox-option/checkbox-option.interface.js +2 -0
- package/src/components/form/field-item/cascade/field-cascade.abstract.d.ts +22 -0
- package/src/{form → components/form}/field-item/cascade/field-cascade.abstract.js +38 -42
- package/src/components/form/field-item/field-item.abstract.d.ts +10 -0
- package/src/{form → components/form}/field-item/field-item.abstract.js +5 -10
- package/src/components/form/field-item/field-item.interface.d.ts +5 -0
- package/src/components/form/field-item/field-item.interface.js +2 -0
- package/src/{form → components/form}/field-item/field-item.style.d.ts +1 -1
- package/src/{form → components/form}/field-item/field-item.style.js +2 -2
- package/src/{form → components/form}/field-item/input/field-input.abstract.js +6 -8
- package/src/components/form/field-item/options/field-options.abstract.d.ts +21 -0
- package/src/{form → components/form}/field-item/options/field-options.abstract.js +55 -55
- package/src/{form → components/form}/field-item/radio/field-radio.abstract.d.ts +6 -7
- package/src/{form → components/form}/field-item/radio/field-radio.abstract.js +10 -10
- package/src/{form → components/form}/field-item/select/field-select.abstract.js +7 -9
- package/src/{form → components/form}/field-item/span/field-span.abstract.d.ts +1 -1
- package/src/components/form/field-item/span/field-span.abstract.js +52 -0
- package/src/{form → components/form}/field-item/textarea/field-textarea.abstract.js +8 -8
- package/src/components/form/field-select/field-select.class.d.ts +12 -0
- package/src/{basic/td-select/td-select.class.js → components/form/field-select/field-select.class.js} +7 -7
- package/src/{basic/td-select/td-select.interface.d.ts → components/form/field-select/field-select.interface.d.ts} +2 -2
- package/src/components/form/field-select/field-select.interface.js +2 -0
- package/src/{basic/td-select → components/form/field-select}/option/option.class.d.ts +3 -5
- package/src/{basic/td-select → components/form/field-select}/option/option.class.js +3 -5
- package/src/components/form/field-select/option/option.interface.js +2 -0
- package/src/components/form/index.d.ts +26 -0
- package/src/{form → components/form}/index.js +17 -1
- package/src/{form → components/form}/radio-group/radio-group.class.d.ts +5 -6
- package/src/{form → components/form}/radio-group/radio-group.class.js +11 -4
- package/src/components/form/radio-group/radio-group.interface.d.ts +11 -0
- package/src/components/form/radio-group/radio-group.interface.js +2 -0
- package/src/{form → components/form}/radio-group/radio-option/radio-option.class.d.ts +5 -4
- package/src/components/form/radio-group/radio-option/radio-option.class.js +46 -0
- package/src/components/form/radio-group/radio-option/radio-option.interface.d.ts +10 -0
- package/src/components/form/radio-group/radio-option/radio-option.interface.js +2 -0
- package/src/{form → components/form}/select/select.class.d.ts +4 -5
- package/src/{form → components/form}/select/select.class.js +5 -5
- package/src/components/form/select/select.interface.d.ts +4 -0
- package/src/components/form/select/select.interface.js +2 -0
- package/src/components/form/td-checkbox/td-checkbox.class.d.ts +7 -0
- package/src/components/form/td-checkbox/td-checkbox.class.js +104 -0
- package/src/components/form/td-checkbox/td-checkbox.interface.d.ts +78 -0
- package/src/components/form/td-checkbox/td-checkbox.interface.js +2 -0
- package/src/components/form/td-checkbox/td-checkbox.style.d.ts +14 -0
- package/src/components/form/td-checkbox/td-checkbox.style.js +18 -0
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.d.ts +7 -0
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.js +15 -0
- package/src/components/form/td-checkbox-button/td-checkbox-button.interface.d.ts +6 -0
- package/src/components/form/td-checkbox-button/td-checkbox-button.interface.js +2 -0
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.d.ts +7 -0
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.js +20 -0
- package/src/components/form/td-checkbox-group/td-checkbox-group.interface.d.ts +50 -0
- package/src/components/form/td-checkbox-group/td-checkbox-group.interface.js +2 -0
- package/src/components/form/td-form/td-form.class.d.ts +22 -0
- package/src/components/form/td-form/td-form.class.js +52 -0
- package/src/components/form/td-form/td-form.interface.d.ts +92 -0
- package/src/components/form/td-form/td-form.interface.js +2 -0
- package/src/components/form/td-form/td-form.style.d.ts +4 -0
- package/src/components/form/td-form/td-form.style.js +8 -0
- package/src/components/form/td-form-item/td-form-item.class.d.ts +17 -0
- package/src/components/form/td-form-item/td-form-item.class.js +145 -0
- package/src/components/form/td-form-item/td-form-item.interface.d.ts +57 -0
- package/src/components/form/td-form-item/td-form-item.interface.js +9 -0
- package/src/components/form/td-form-item/td-form-item.style.d.ts +29 -0
- package/src/components/form/td-form-item/td-form-item.style.js +34 -0
- package/src/components/form/td-input/td-input-field.class.d.ts +7 -0
- package/src/{form/td-input/td-input.class.js → components/form/td-input/td-input-field.class.js} +8 -8
- package/src/{form/td-input/td-input.interface.d.ts → components/form/td-input/td-input-field.interface.d.ts} +3 -3
- package/src/components/form/td-input/td-input-field.interface.js +2 -0
- package/src/components/form/td-input/td-input.class.d.ts +21 -0
- package/src/components/form/td-input/td-input.class.js +177 -0
- package/src/components/form/td-input/td-input.interface.d.ts +133 -0
- package/src/components/form/td-input/td-input.interface.js +2 -0
- package/src/components/form/td-input/td-input.style.d.ts +53 -0
- package/src/components/form/td-input/td-input.style.js +66 -0
- package/src/components/form/td-input/widget/prefix.d.ts +10 -0
- package/src/components/form/td-input/widget/prefix.js +63 -0
- package/src/components/form/td-input/widget/suffix.d.ts +13 -0
- package/src/components/form/td-input/widget/suffix.js +120 -0
- package/src/components/form/td-input/widget/td-input-wrapper.class.d.ts +33 -0
- package/src/components/form/td-input/widget/td-input-wrapper.class.js +286 -0
- package/src/components/form/td-input/widget/td-input-wrapper.interface.d.ts +4 -0
- package/src/components/form/td-input/widget/td-input-wrapper.interface.js +2 -0
- package/src/components/form/td-input/widget/td-textarea-wrapper.d.ts +13 -0
- package/src/components/form/td-input/widget/td-textarea-wrapper.js +123 -0
- package/src/components/form/td-input/widget/utils.d.ts +6 -0
- package/src/components/form/td-input/widget/utils.js +81 -0
- package/src/components/form/td-radio/td-radio.class.d.ts +17 -0
- package/src/components/form/td-radio/td-radio.class.js +232 -0
- package/src/components/form/td-radio/td-radio.interface.d.ts +38 -0
- package/src/components/form/td-radio/td-radio.interface.js +2 -0
- package/src/components/form/td-radio-button/td-radio-button.class.d.ts +15 -0
- package/src/components/form/td-radio-button/td-radio-button.class.js +195 -0
- package/src/components/form/td-radio-button/td-radio-button.interface.d.ts +34 -0
- package/src/components/form/td-radio-button/td-radio-button.interface.js +2 -0
- package/src/components/form/td-radio-button/td-radio-button.style.d.ts +1 -0
- package/src/components/form/td-radio-button/td-radio-button.style.js +9 -0
- package/src/components/form/td-radio-group/td-radio-group.class.d.ts +16 -0
- package/src/components/form/td-radio-group/td-radio-group.class.js +105 -0
- package/src/components/form/td-radio-group/td-radio-group.interface.d.ts +47 -0
- package/src/components/form/td-radio-group/td-radio-group.interface.js +2 -0
- package/src/components/form/td-select/dropdown/dropdown.class.d.ts +9 -0
- package/src/components/form/td-select/dropdown/dropdown.class.js +48 -0
- package/src/components/form/td-select/dropdown/dropdown.interface.d.ts +9 -0
- package/src/components/form/td-select/dropdown/dropdown.interface.js +2 -0
- package/src/components/form/td-select/option/option.class.d.ts +6 -0
- package/src/components/form/td-select/option/option.class.js +36 -0
- package/src/components/form/td-select/option/option.interface.d.ts +20 -0
- package/src/components/form/td-select/option/option.interface.js +2 -0
- package/src/components/form/td-select/option-group/option-group.class.d.ts +6 -0
- package/src/components/form/td-select/option-group/option-group.class.js +50 -0
- package/src/components/form/td-select/option-group/option-group.interface.d.ts +14 -0
- package/src/components/form/td-select/option-group/option-group.interface.js +2 -0
- package/src/components/form/td-select/td-select.class.d.ts +6 -0
- package/src/components/form/td-select/td-select.class.js +32 -0
- package/src/components/form/td-select/td-select.interface.d.ts +172 -0
- package/src/components/form/td-select/td-select.interface.js +2 -0
- package/src/components/form/td-select/td-select.style.d.ts +53 -0
- package/src/components/form/td-select/td-select.style.js +76 -0
- package/src/components/form/td-switch/td-switch.class.d.ts +20 -0
- package/src/components/form/td-switch/td-switch.class.js +225 -0
- package/src/components/form/td-switch/td-switch.interface.d.ts +97 -0
- package/src/components/form/td-switch/td-switch.interface.js +2 -0
- package/src/components/form/td-switch/td-switch.style.d.ts +47 -0
- package/src/components/form/td-switch/td-switch.style.js +57 -0
- package/src/components/form/td-switch/widget/td-switch-core.d.ts +17 -0
- package/src/components/form/td-switch/widget/td-switch-core.js +212 -0
- package/src/components/form/td-switch/widget/td-switch-left.d.ts +7 -0
- package/src/components/form/td-switch/widget/td-switch-left.js +26 -0
- package/src/components/form/td-switch/widget/td-switch-right.d.ts +7 -0
- package/src/components/form/td-switch/widget/td-switch-right.js +25 -0
- package/src/components/navigation/index.d.ts +2 -0
- package/src/components/navigation/index.js +5 -0
- package/src/components/navigation/td-menu/td-menu.class.d.ts +7 -0
- package/src/components/navigation/td-menu/td-menu.class.js +42 -0
- package/src/components/navigation/td-menu/td-menu.interface.d.ts +23 -0
- package/src/components/navigation/td-menu/td-menu.interface.js +2 -0
- package/src/{others → components/others}/collapsible-box/collapsible-box.js +10 -11
- package/src/{others → components/others}/collapsible-box/contents/contents.js +9 -11
- package/src/{others → components/others}/collapsible-box/heading/expand-heading.js +28 -26
- package/src/{others → components/others}/index.d.ts +2 -0
- package/src/{others → components/others}/index.js +3 -1
- package/src/components/others/td-divider/td-divider.class.d.ts +6 -0
- package/src/components/others/td-divider/td-divider.class.js +80 -0
- package/src/components/others/td-divider/td-divider.interface.d.ts +18 -0
- package/src/components/others/td-divider/td-divider.interface.js +2 -0
- package/src/index.d.ts +6 -4
- package/src/index.js +7 -5
- package/src/styles/color-scheme.js +12 -12
- package/src/styles/index.d.ts +1 -0
- package/src/styles/index.js +4 -0
- package/src/styles/size.d.ts +7 -0
- package/src/styles/size.js +9 -0
- package/src/styles/var.d.ts +28 -10
- package/src/styles/var.js +59 -28
- package/src/ui/ui.abstract.d.ts +8 -0
- package/src/ui/ui.abstract.js +22 -0
- package/src/ui/ui.interface.d.ts +8 -0
- package/src/ui/ui.interface.js +2 -0
- package/src/basic/index.js +0 -19
- package/src/basic/td-button/td-button.class.js +0 -149
- package/src/basic/td-container/td-aside/td-aside.class.d.ts +0 -6
- package/src/basic/td-container/td-aside/td-aside.interface.d.ts +0 -8
- package/src/basic/td-container/td-container.class.d.ts +0 -10
- package/src/basic/td-container/td-container.interface.d.ts +0 -14
- package/src/basic/td-container/td-footer/td-footer.class.d.ts +0 -6
- package/src/basic/td-container/td-footer/td-footer.class.js +0 -30
- package/src/basic/td-container/td-footer/td-footer.interface.d.ts +0 -11
- package/src/basic/td-container/td-header/td-header.class.d.ts +0 -9
- package/src/basic/td-container/td-header/td-header.class.js +0 -23
- package/src/basic/td-container/td-header/td-header.interface.d.ts +0 -10
- package/src/basic/td-container/td-main/td-main.interface.d.ts +0 -7
- package/src/basic/td-icon/td-icon.interface.d.ts +0 -12
- package/src/basic/td-select/td-select.class.d.ts +0 -14
- package/src/form/field-item/cascade/field-cascade.abstract.d.ts +0 -22
- package/src/form/field-item/field-item.abstract.d.ts +0 -11
- package/src/form/field-item/field-item.interface.d.ts +0 -12
- package/src/form/field-item/options/field-options.abstract.d.ts +0 -22
- package/src/form/field-item/span/field-span.abstract.js +0 -54
- package/src/form/index.d.ts +0 -11
- package/src/form/input-number/td-input-number.class.d.ts +0 -9
- package/src/form/input-number/td-input-number.class.js +0 -55
- package/src/form/input-number/td-input-number.interface.d.ts +0 -9
- package/src/form/radio-group/radio-group.interface.d.ts +0 -6
- package/src/form/radio-group/radio-option/radio-option.class.js +0 -33
- package/src/form/radio-group/radio-option/radio-option.interface.d.ts +0 -5
- package/src/form/select/select.interface.d.ts +0 -10
- package/src/form/td-input/td-input.class.d.ts +0 -9
- /package/src/{basic/td-container/td-aside/td-aside.interface.js → components/basic/td-button/td-button.interface.js} +0 -0
- /package/src/{basic/td-button/td-button.interface.js → components/basic/td-button-group/td-button-group.interface.js} +0 -0
- /package/src/{basic/td-container/td-container.interface.js → components/basic/td-container/td-aside/td-aside.interface.js} +0 -0
- /package/src/{basic → components/basic}/td-container/td-container.d.ts +0 -0
- /package/src/{basic/td-container/td-footer/td-footer.interface.js → components/basic/td-container/td-container.interface.js} +0 -0
- /package/src/{basic → components/basic}/td-container/td-container.js +0 -0
- /package/src/{basic/td-container/td-header/td-header.interface.js → components/basic/td-container/td-footer/td-footer.interface.js} +0 -0
- /package/src/{basic/td-container/td-main/td-main.interface.js → components/basic/td-container/td-header/td-header.interface.js} +0 -0
- /package/src/{basic/td-icon/td-icon.interface.js → components/basic/td-container/td-main/td-main.interface.js} +0 -0
- /package/src/{basic/td-select/option/option.interface.js → components/basic/td-icon/td-icon.interface.js} +0 -0
- /package/src/{basic/td-select/td-select.interface.js → components/basic/td-layout/td-col/td-col.interface.js} +0 -0
- /package/src/{form/checkbox-group/checkbox-group.interface.js → components/basic/td-link/td-link.interface.js} +0 -0
- /package/src/{form/checkbox-group/checkbox-option/checkbox-option.interface.js → components/basic/td-scrollbar/bar/bar.interface.js} +0 -0
- /package/src/{form/field-item/field-item.interface.js → components/basic/td-scrollbar/thumb/thumb.interface.js} +0 -0
- /package/src/{form/input-number/td-input-number.interface.js → components/basic/td-space/td-space.interface.js} +0 -0
- /package/src/{form/radio-group/radio-group.interface.js → components/basic/td-text/td-text.interface.js} +0 -0
- /package/src/{data → components/data}/index.d.ts +0 -0
- /package/src/{data → components/data}/index.js +0 -0
- /package/src/{form/radio-group/radio-option/radio-option.interface.js → components/feedback/dialog/dialog.interface.js} +0 -0
- /package/src/{form/select/select.interface.js → components/feedback/message-box/message-box.interface.js} +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/body/body.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/container.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/footer/cancel-button/cancel-button.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/footer/confirm-button/confirm-button.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/footer/footer.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/header/close-button/close-button.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/header/header.d.ts +0 -0
- /package/src/{form/td-input/td-input.interface.js → components/feedback/td-focus-trap/td-focus-trap.interface.js} +0 -0
- /package/src/{form → components/form}/checkbox-group/checkbox-group.interface.d.ts +0 -0
- /package/src/{form → components/form}/field-item/input/field-input.abstract.d.ts +0 -0
- /package/src/{form → components/form}/field-item/select/field-select.abstract.d.ts +0 -0
- /package/src/{form → components/form}/field-item/textarea/field-textarea.abstract.d.ts +0 -0
- /package/src/{basic/td-select → components/form/field-select}/option/option.interface.d.ts +0 -0
- /package/src/{navigation/index.d.ts → components/navigation/td-menu/td-menu.style.d.ts} +0 -0
- /package/src/{navigation/index.js → components/navigation/td-menu/td-menu.style.js} +0 -0
- /package/src/{others → components/others}/collapsible-box/collapsible-box.d.ts +0 -0
- /package/src/{others → components/others}/collapsible-box/contents/contents.d.ts +0 -0
- /package/src/{others → components/others}/collapsible-box/heading/expand-heading.d.ts +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IUI } from '../../../../ui/ui.interface';
|
|
2
|
+
import { ITdPopperContentConfig } from '../../td-popper/content/content.interface';
|
|
3
|
+
export interface ITdTooltipContent extends IUI {
|
|
4
|
+
className: 'TdTooltipContent';
|
|
5
|
+
}
|
|
6
|
+
export interface ITdTooltipContentConfig extends ITdPopperContentConfig {
|
|
7
|
+
/**
|
|
8
|
+
* @description which element the tooltip CONTENT appends to
|
|
9
|
+
*/
|
|
10
|
+
appendTo?: string | HTMLElement;
|
|
11
|
+
/**
|
|
12
|
+
* @description display content, can be overridden by `slot#content`
|
|
13
|
+
*/
|
|
14
|
+
content?: string;
|
|
15
|
+
/**
|
|
16
|
+
* @description whether `content` is treated as HTML string
|
|
17
|
+
*/
|
|
18
|
+
rawContent?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @description when tooltip inactive and `persistent` is `false` , popconfirm will be destroyed
|
|
21
|
+
*/
|
|
22
|
+
persistent?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @description same as `aria-label`
|
|
25
|
+
*/
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
/**
|
|
28
|
+
* @description visibility of Tooltip
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* @description animation name
|
|
32
|
+
*/
|
|
33
|
+
transition?: string;
|
|
34
|
+
/**
|
|
35
|
+
* @description whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets
|
|
36
|
+
*/
|
|
37
|
+
teleported?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @description whether Tooltip is disabled
|
|
40
|
+
*/
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
2
|
+
import { ITdTooltip, ITdTooltipConfig } from './td-tooltip.interface';
|
|
3
|
+
export declare class TdTooltip extends UI implements ITdTooltip {
|
|
4
|
+
className: 'TdTooltip';
|
|
5
|
+
private trigger;
|
|
6
|
+
private content;
|
|
7
|
+
constructor(config?: ITdTooltipConfig);
|
|
8
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdTooltip = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
|
+
const td_popper_class_1 = require("../td-popper/td-popper.class");
|
|
6
|
+
const trigger_class_1 = require("./trigger/trigger.class");
|
|
7
|
+
const content_class_1 = require("./content/content.class");
|
|
8
|
+
const framework_1 = require("@type-dom/framework");
|
|
9
|
+
const arrow_class_1 = require("../td-popper/arrow/arrow.class");
|
|
10
|
+
class TdTooltip extends ui_abstract_1.UI {
|
|
11
|
+
constructor(config) {
|
|
12
|
+
super();
|
|
13
|
+
this.className = 'TdTooltip';
|
|
14
|
+
this.trigger = new trigger_class_1.TdTooltipTrigger();
|
|
15
|
+
this.content = new content_class_1.TdTooltipContent({
|
|
16
|
+
childNodes: [
|
|
17
|
+
new framework_1.Span(),
|
|
18
|
+
new arrow_class_1.TdPopperArrow()
|
|
19
|
+
]
|
|
20
|
+
});
|
|
21
|
+
this.addChild(new td_popper_class_1.TdPopper({
|
|
22
|
+
childNodes: [
|
|
23
|
+
this.trigger,
|
|
24
|
+
this.content
|
|
25
|
+
]
|
|
26
|
+
}));
|
|
27
|
+
this.setConfig(config);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.TdTooltip = TdTooltip;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
export interface ITdTooltip extends IUI {
|
|
3
|
+
className: 'TdTooltip';
|
|
4
|
+
}
|
|
5
|
+
export interface ITdTooltipConfig extends IUIConfig {
|
|
6
|
+
/**
|
|
7
|
+
* @description whether the tooltip content has an arrow
|
|
8
|
+
*/
|
|
9
|
+
showArrow?: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdTooltipTrigger = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
5
|
+
class TdTooltipTrigger extends ui_abstract_1.UI {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super();
|
|
8
|
+
this.className = 'TdTooltipTrigger';
|
|
9
|
+
this.setConfig(config);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.TdTooltipTrigger = TdTooltipTrigger;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IUI } from '../../../../ui/ui.interface';
|
|
2
|
+
import { ITdPopperTriggerConfig } from '../../td-popper/trigger/trigger.interface';
|
|
3
|
+
export interface ITdTooltipTrigger extends IUI {
|
|
4
|
+
className: 'TdTooltipTrigger';
|
|
5
|
+
}
|
|
6
|
+
export type TooltipTriggerType = 'hover' | 'focus' | 'click' | 'contextmenu';
|
|
7
|
+
export interface ITdTooltipTriggerConfig extends ITdPopperTriggerConfig {
|
|
8
|
+
/**
|
|
9
|
+
* @description whether Tooltip is disabled
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* @description How should the tooltip be triggered (to show)
|
|
14
|
+
*/
|
|
15
|
+
trigger?: TooltipTriggerType;
|
|
16
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { TypeDiv, TypeHtml } from '@type-dom/framework';
|
|
1
|
+
import { IOptionConfig, TypeDiv, TypeHtml } from '@type-dom/framework';
|
|
2
2
|
import { CheckboxOption } from './checkbox-option/checkbox-option.class';
|
|
3
3
|
import { ICheckboxGroup } from './checkbox-group.interface';
|
|
4
|
-
import { IOption } from './checkbox-option/checkbox-option.interface';
|
|
5
4
|
export declare class CheckboxGroup extends TypeDiv implements ICheckboxGroup {
|
|
6
5
|
className: 'CheckboxGroup';
|
|
7
6
|
parent?: TypeHtml;
|
|
8
7
|
childNodes: CheckboxOption[];
|
|
9
8
|
value: (string | number | boolean)[];
|
|
10
9
|
constructor();
|
|
11
|
-
setOptions(options:
|
|
10
|
+
setOptions(options: IOptionConfig[]): void;
|
|
12
11
|
setValue(value: string | number | boolean): void;
|
|
13
12
|
}
|
|
@@ -26,7 +26,7 @@ class CheckboxGroup extends framework_1.TypeDiv {
|
|
|
26
26
|
if (opt.checked) {
|
|
27
27
|
this.value.push(opt.value);
|
|
28
28
|
}
|
|
29
|
-
optObj.
|
|
29
|
+
optObj.textNode.setText(opt.label);
|
|
30
30
|
this.addChild(optObj);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -39,7 +39,7 @@ class CheckboxGroup extends framework_1.TypeDiv {
|
|
|
39
39
|
this.childNodes.forEach(optObj => {
|
|
40
40
|
if (this.value.indexOf(String(optObj.input.attrObj.value)) !== -1) {
|
|
41
41
|
optObj.input.setAttrObj({
|
|
42
|
-
checked: true
|
|
42
|
+
checked: true
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
else {
|
package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.class.d.ts
RENAMED
|
@@ -3,10 +3,10 @@ import { CheckboxGroup } from '../checkbox-group.class';
|
|
|
3
3
|
import { ICheckboxOption } from './checkbox-option.interface';
|
|
4
4
|
export declare class CheckboxOption extends TypeSpan implements ICheckboxOption {
|
|
5
5
|
className: 'CheckboxOption';
|
|
6
|
+
input: Input;
|
|
6
7
|
parent?: CheckboxGroup;
|
|
7
8
|
childNodes: [Input, TextNode];
|
|
8
|
-
|
|
9
|
-
text: TextNode;
|
|
9
|
+
textNode: TextNode;
|
|
10
10
|
constructor();
|
|
11
11
|
initEvents(): void;
|
|
12
12
|
}
|
package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.class.js
RENAMED
|
@@ -9,26 +9,26 @@ class CheckboxOption extends framework_1.TypeSpan {
|
|
|
9
9
|
this.className = 'CheckboxOption';
|
|
10
10
|
this.input = new framework_1.Input({ parent: this });
|
|
11
11
|
this.input.addAttrObj({
|
|
12
|
-
type: 'checkbox'
|
|
13
|
-
// name:
|
|
12
|
+
type: 'checkbox'
|
|
13
|
+
// name: optionSetting.name,
|
|
14
14
|
// label: opt.label,
|
|
15
15
|
// value: opt.value,
|
|
16
16
|
// checked: opt.checked || false
|
|
17
17
|
});
|
|
18
|
-
this.
|
|
19
|
-
this.childNodes = [this.input, this.
|
|
18
|
+
this.textNode = new framework_1.TextNode();
|
|
19
|
+
this.childNodes = [this.input, this.textNode];
|
|
20
20
|
}
|
|
21
21
|
initEvents() {
|
|
22
|
-
this.
|
|
22
|
+
this.subscriptions.push((0, rxjs_1.fromEvent)(this.input.dom, 'click').subscribe(() => {
|
|
23
23
|
var _a, _b, _c;
|
|
24
24
|
console.log('this.input.dom click . ');
|
|
25
25
|
console.log('this.input.dom.value is ', this.input.dom.value);
|
|
26
|
-
const flag = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.value.findIndex(item => item === this.input.dom.value);
|
|
26
|
+
const flag = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.value.findIndex((item) => item === this.input.dom.value);
|
|
27
27
|
if (this.input.dom.checked) {
|
|
28
28
|
if (flag === -1) {
|
|
29
29
|
(_b = this.parent) === null || _b === void 0 ? void 0 : _b.value.push(this.input.dom.value);
|
|
30
30
|
this.input.setAttrObj({
|
|
31
|
-
checked: true
|
|
31
|
+
checked: true
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Div, Label, Button, IOptionSetting } from '@type-dom/framework';
|
|
2
|
+
import { FieldSelect } from '../../../form/field-select/field-select.class';
|
|
3
|
+
import { FieldItem } from '../field-item.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* 两级联动,
|
|
6
|
+
* 目前只有 字段名称属性项用到。 控件属性栏 control-field 字段属性栏 field-name
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class PropertyCascade extends FieldItem {
|
|
9
|
+
childNodes: [Label, Div, Button];
|
|
10
|
+
cascadeDiv: Div;
|
|
11
|
+
firstStageSelectObj: FieldSelect;
|
|
12
|
+
secondStageSelectObj: FieldSelect;
|
|
13
|
+
cascadeConfig?: IOptionSetting;
|
|
14
|
+
settings?: IOptionSetting;
|
|
15
|
+
abstract reset(value?: string): void;
|
|
16
|
+
protected constructor(labelText?: string);
|
|
17
|
+
get fieldSetting(): IOptionSetting | undefined;
|
|
18
|
+
set fieldSetting(value: IOptionSetting | undefined);
|
|
19
|
+
resetCascadeConfigResultValue(value: string | number | boolean): void;
|
|
20
|
+
resetCascadeConfig(optionSetting: IOptionSetting): void;
|
|
21
|
+
initEvents(): void;
|
|
22
|
+
}
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PropertyCascade = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const framework_1 = require("@type-dom/framework");
|
|
6
|
+
const field_select_class_1 = require("../../../form/field-select/field-select.class");
|
|
6
7
|
const field_item_abstract_1 = require("../field-item.abstract");
|
|
7
8
|
const field_item_style_1 = require("../field-item.style");
|
|
8
|
-
const td_select_class_1 = require("../../../basic/td-select/td-select.class");
|
|
9
9
|
/**
|
|
10
10
|
* 两级联动,
|
|
11
11
|
* 目前只有 字段名称属性项用到。 控件属性栏 control-field 字段属性栏 field-name
|
|
@@ -14,7 +14,7 @@ class PropertyCascade extends field_item_abstract_1.FieldItem {
|
|
|
14
14
|
constructor(labelText = '二级级联') {
|
|
15
15
|
super(labelText);
|
|
16
16
|
this.addAttrName('cascade-property');
|
|
17
|
-
this.cascadeDiv = new framework_1.
|
|
17
|
+
this.cascadeDiv = new framework_1.Div();
|
|
18
18
|
this.cascadeDiv.addAttrName('cascade');
|
|
19
19
|
this.cascadeDiv.addStyleObj({
|
|
20
20
|
height: '100%',
|
|
@@ -31,10 +31,10 @@ class PropertyCascade extends field_item_abstract_1.FieldItem {
|
|
|
31
31
|
outline: '0',
|
|
32
32
|
// -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
|
|
33
33
|
transition: 'border-color .2s cubic-bezier(.645,.045,.355,1)',
|
|
34
|
-
width: 'calc(100% - 100px)'
|
|
34
|
+
width: 'calc(100% - 100px)'
|
|
35
35
|
});
|
|
36
36
|
// 单独的方法实现
|
|
37
|
-
this.firstStageSelectObj = new
|
|
37
|
+
this.firstStageSelectObj = new field_select_class_1.FieldSelect();
|
|
38
38
|
this.firstStageSelectObj.addAttrName('first-stage-select');
|
|
39
39
|
this.firstStageSelectObj.setStyleObj(Object.assign({}, field_item_style_1.itemContentStyle, {
|
|
40
40
|
width: '100%',
|
|
@@ -42,27 +42,26 @@ class PropertyCascade extends field_item_abstract_1.FieldItem {
|
|
|
42
42
|
// borderRadius: '4px 0 0 4px',
|
|
43
43
|
// borderRight: 'none',
|
|
44
44
|
}));
|
|
45
|
-
this.secondStageSelectObj = new
|
|
45
|
+
this.secondStageSelectObj = new field_select_class_1.FieldSelect();
|
|
46
46
|
this.secondStageSelectObj.addAttrName('second-stage-select');
|
|
47
47
|
this.secondStageSelectObj.setStyleObj(Object.assign({}, field_item_style_1.itemContentStyle, {
|
|
48
|
-
width: '100%'
|
|
48
|
+
width: '100%'
|
|
49
49
|
}));
|
|
50
50
|
this.cascadeDiv.childNodes = [this.firstStageSelectObj, this.secondStageSelectObj];
|
|
51
51
|
this.childNodes = [this.label, this.cascadeDiv, this.button];
|
|
52
52
|
}
|
|
53
|
-
get
|
|
53
|
+
get fieldSetting() {
|
|
54
54
|
var _a;
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
resultValue: configJson.resultValue,
|
|
55
|
+
const fieldSetting = (_a = this.settings) === null || _a === void 0 ? void 0 : _a.fieldSetting;
|
|
56
|
+
if (fieldSetting) {
|
|
57
|
+
const optionSetting = {
|
|
58
|
+
name: fieldSetting.name,
|
|
59
|
+
resultValue: fieldSetting.resultValue,
|
|
61
60
|
options: []
|
|
62
61
|
};
|
|
63
|
-
if (
|
|
62
|
+
if (fieldSetting.options[0].options === undefined) { // 如果只有一级,应该是老数据,要重新组装
|
|
64
63
|
const values = [];
|
|
65
|
-
|
|
64
|
+
fieldSetting.options.forEach((opt) => {
|
|
66
65
|
if (opt.value.indexOf('.') === -1) {
|
|
67
66
|
// 错误的测试数据,业务数据不会有这个问题。
|
|
68
67
|
throw Error('字段名称不是二级组装的 。 ');
|
|
@@ -71,86 +70,83 @@ class PropertyCascade extends field_item_abstract_1.FieldItem {
|
|
|
71
70
|
const tableLabel = opt.label.split('.')[0];
|
|
72
71
|
values.push(JSON.stringify({
|
|
73
72
|
label: tableLabel,
|
|
74
|
-
value: tableValue
|
|
73
|
+
value: tableValue
|
|
75
74
|
}));
|
|
76
75
|
});
|
|
77
76
|
// todo 如何去重
|
|
78
77
|
const firstStageValues = Array.from(new Set(values));
|
|
79
78
|
firstStageValues.forEach((value) => {
|
|
80
|
-
|
|
79
|
+
optionSetting.options.push(Object.assign({}, JSON.parse(value), { options: [] }));
|
|
81
80
|
});
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
fieldSetting.options.forEach((opt2) => {
|
|
82
|
+
optionSetting.options.forEach(opt1 => {
|
|
84
83
|
var _a;
|
|
85
84
|
if (String(opt1.value) === String(opt2.value.split('.')[0])) {
|
|
86
85
|
(_a = opt1.options) === null || _a === void 0 ? void 0 : _a.push(opt2);
|
|
87
86
|
}
|
|
88
87
|
});
|
|
89
88
|
});
|
|
90
|
-
// this.
|
|
91
|
-
return
|
|
89
|
+
// this.fieldSetting = optionSetting;
|
|
90
|
+
return optionSetting;
|
|
92
91
|
}
|
|
93
92
|
else {
|
|
94
|
-
return
|
|
93
|
+
return fieldSetting;
|
|
95
94
|
}
|
|
96
95
|
}
|
|
97
96
|
return undefined;
|
|
98
97
|
}
|
|
99
|
-
set
|
|
98
|
+
set fieldSetting(value) {
|
|
100
99
|
// TypeFormDesigner.webDocument.setAttribute('field-config', JSON.stringify(value));
|
|
101
|
-
if (this.
|
|
100
|
+
if (this.settings === undefined) {
|
|
102
101
|
if (value !== undefined) {
|
|
103
|
-
this.
|
|
104
|
-
fieldConfig: JSON.stringify(value),
|
|
105
|
-
};
|
|
102
|
+
this.setSetting('fieldSetting', value);
|
|
106
103
|
}
|
|
107
104
|
}
|
|
108
105
|
else {
|
|
109
106
|
if (value === undefined) {
|
|
110
|
-
delete this.
|
|
107
|
+
delete this.settings.fieldSetting;
|
|
111
108
|
}
|
|
112
109
|
else {
|
|
113
|
-
this.
|
|
110
|
+
this.setSetting('fieldSetting', value);
|
|
114
111
|
}
|
|
115
112
|
}
|
|
116
113
|
}
|
|
117
114
|
resetCascadeConfigResultValue(value) {
|
|
118
|
-
// AppRoot.selectedControl?.propObj.attrObj.optionConfig''
|
|
119
115
|
// this.cascadeConfig = Object.assign(this.cascadeConfig, { resultValue: value });
|
|
120
116
|
if (this.cascadeConfig) {
|
|
121
117
|
this.cascadeConfig.resultValue = value;
|
|
122
118
|
}
|
|
123
119
|
}
|
|
124
120
|
// todo vue项目中返回的是选中的项目。只有一层,没有两层。
|
|
125
|
-
resetCascadeConfig(
|
|
126
|
-
console.log('
|
|
121
|
+
resetCascadeConfig(optionSetting) {
|
|
122
|
+
console.log('optionSetting is ', optionSetting);
|
|
127
123
|
// this.cascadeDiv.clearChildNodes();
|
|
128
124
|
// this.cascadeDiv.clearChildDom();
|
|
129
|
-
this.cascadeConfig =
|
|
130
|
-
if (
|
|
131
|
-
this.firstStageSelectObj.resetOptions(
|
|
125
|
+
this.cascadeConfig = optionSetting;
|
|
126
|
+
if (optionSetting.resultValue === 0) { // 如果第1级还没有选择
|
|
127
|
+
this.firstStageSelectObj.resetOptions(optionSetting.options, optionSetting.resultValue);
|
|
132
128
|
// todo 第2级,应该没有可选项。
|
|
133
129
|
this.secondStageSelectObj.resetOptions([], 0);
|
|
134
130
|
return;
|
|
135
131
|
}
|
|
136
132
|
// todo config.options设置
|
|
137
|
-
if (String(
|
|
138
|
-
const firstStageValue = String(
|
|
139
|
-
this.firstStageSelectObj.resetOptions(
|
|
140
|
-
// const firstStageValue =
|
|
141
|
-
const selectedOption =
|
|
133
|
+
if (String(optionSetting.resultValue).indexOf('.') !== -1) {
|
|
134
|
+
const firstStageValue = String(optionSetting.resultValue).split('.')[0];
|
|
135
|
+
this.firstStageSelectObj.resetOptions(optionSetting.options, firstStageValue);
|
|
136
|
+
// const firstStageValue = optionSetting.resultValue.split('.')[0];
|
|
137
|
+
const selectedOption = optionSetting.options.find(opt => opt.value === firstStageValue);
|
|
142
138
|
if (!(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.options)) {
|
|
143
139
|
// throw Error('选项有问题'); // 会阻塞修改单元格的控件类型
|
|
144
140
|
this.secondStageSelectObj.resetOptions([], 0);
|
|
145
141
|
console.error('选项有问题');
|
|
146
142
|
return;
|
|
147
143
|
}
|
|
148
|
-
this.secondStageSelectObj.resetOptions(selectedOption.options,
|
|
144
|
+
this.secondStageSelectObj.resetOptions(selectedOption.options, optionSetting.resultValue);
|
|
149
145
|
// this.secondStageSelectObj.setSelectedValue(secondStageValue);
|
|
150
146
|
}
|
|
151
147
|
}
|
|
152
148
|
initEvents() {
|
|
153
|
-
this.
|
|
149
|
+
this.subscriptions.push((0, rxjs_1.fromEvent)(this.firstStageSelectObj.dom, 'change').subscribe(() => {
|
|
154
150
|
var _a, _b;
|
|
155
151
|
console.log('this.firstStageSelectObj.dom change . ');
|
|
156
152
|
console.log('this.firstStageSelectObj.dom.value is ', this.firstStageSelectObj.dom.value);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Div, Input, Label, Span, Textarea, TypeComponent, Button } from '@type-dom/framework';
|
|
2
|
+
import { Select } from '../select/select.class';
|
|
3
|
+
import { IFieldItem } from './field-item.interface';
|
|
4
|
+
export declare abstract class FieldItem extends TypeComponent implements IFieldItem {
|
|
5
|
+
abstract childNodes: [Label, ...(Span | Input | Textarea | Select | Div)[], Button];
|
|
6
|
+
label: Label;
|
|
7
|
+
button: Button;
|
|
8
|
+
protected constructor(labelText: string);
|
|
9
|
+
setLabelTitle(text: string): void;
|
|
10
|
+
}
|
|
@@ -5,15 +5,15 @@ const framework_1 = require("@type-dom/framework");
|
|
|
5
5
|
const field_item_style_1 = require("./field-item.style");
|
|
6
6
|
class FieldItem extends framework_1.TypeComponent {
|
|
7
7
|
constructor(labelText) {
|
|
8
|
-
super(
|
|
9
|
-
this.
|
|
8
|
+
super();
|
|
9
|
+
this.styleObj = {
|
|
10
10
|
// border: '1px solid #1890ff',
|
|
11
11
|
// background: '#f3f9ff',
|
|
12
|
-
display:
|
|
12
|
+
display: framework_1.StyleDisplay.flex,
|
|
13
13
|
flexDirection: 'row',
|
|
14
14
|
padding: '10px 0',
|
|
15
15
|
// marginBottom: '10px!important',
|
|
16
|
-
fontSize: '14px'
|
|
16
|
+
fontSize: '14px'
|
|
17
17
|
};
|
|
18
18
|
this.label = new framework_1.Label({ parent: this });
|
|
19
19
|
this.label.textNode.setText(labelText);
|
|
@@ -27,16 +27,11 @@ class FieldItem extends framework_1.TypeComponent {
|
|
|
27
27
|
borderStyle: 'solid',
|
|
28
28
|
borderLeft: 'none',
|
|
29
29
|
borderColor: '#dcdfe6',
|
|
30
|
-
display: 'none'
|
|
30
|
+
display: 'none'
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
setLabelTitle(text) {
|
|
34
34
|
this.label.childNodes[0].nodeValue = text;
|
|
35
35
|
}
|
|
36
|
-
show() {
|
|
37
|
-
this.setStyleObj({
|
|
38
|
-
display: framework_1.StyleDisplay.flex,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
36
|
}
|
|
42
37
|
exports.FieldItem = FieldItem;
|
|
@@ -13,7 +13,7 @@ exports.labelStyle = {
|
|
|
13
13
|
paddingRight: '2px',
|
|
14
14
|
// padding: '0 12px 0 0',
|
|
15
15
|
// '-webkit-box-sizing': 'border-box',
|
|
16
|
-
boxSizing: 'border-box'
|
|
16
|
+
boxSizing: 'border-box'
|
|
17
17
|
};
|
|
18
18
|
exports.itemContentStyle = {
|
|
19
19
|
height: '28px',
|
|
@@ -35,5 +35,5 @@ exports.itemContentStyle = {
|
|
|
35
35
|
margin: '0',
|
|
36
36
|
// -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
|
|
37
37
|
transition: 'border-color .2s cubic-bezier(.645,.045,.355,1)',
|
|
38
|
-
width: 'calc(100% - ' + exports.labelStyle.width + ')'
|
|
38
|
+
width: 'calc(100% - ' + exports.labelStyle.width + ')'
|
|
39
39
|
};
|
|
@@ -9,16 +9,14 @@ class FieldInput extends field_item_abstract_1.FieldItem {
|
|
|
9
9
|
constructor(labelText = '控件名称', placeholder = '请输入') {
|
|
10
10
|
super(labelText);
|
|
11
11
|
this.content = new framework_1.Input({ parent: this });
|
|
12
|
-
this.content.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
placeholder: placeholder,
|
|
17
|
-
}
|
|
12
|
+
this.content.styleObj = Object.assign({}, field_item_style_1.itemContentStyle);
|
|
13
|
+
this.content.attrObj = {
|
|
14
|
+
type: 'text',
|
|
15
|
+
placeholder: placeholder
|
|
18
16
|
};
|
|
19
17
|
if (this.mode === 'read') {
|
|
20
18
|
this.content.addAttrObj({
|
|
21
|
-
disabled: true
|
|
19
|
+
disabled: true
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
22
|
// this.button.addStyleObj({
|
|
@@ -42,7 +40,7 @@ class FieldInput extends field_item_abstract_1.FieldItem {
|
|
|
42
40
|
this.content.dom.value = String(value);
|
|
43
41
|
}
|
|
44
42
|
initEvents() {
|
|
45
|
-
this.
|
|
43
|
+
this.subscriptions.push((0, rxjs_1.fromEvent)(this.content.dom, 'input').subscribe(() => {
|
|
46
44
|
// console.log('this.input input, event is ', evt);
|
|
47
45
|
// console.log('this.input.dom.value is ', this.input.dom.value);
|
|
48
46
|
this.reset(this.content.dom.value);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Button, Div, Label, IOptionSetting, IOptionSet } from '@type-dom/framework';
|
|
3
|
+
import { FieldItem } from '../field-item.abstract';
|
|
4
|
+
export declare abstract class PropertyOptions extends FieldItem {
|
|
5
|
+
childNodes: [Label, Div, Button];
|
|
6
|
+
selectConfigDiv: Div;
|
|
7
|
+
private readonly firstDiv;
|
|
8
|
+
selectDiv: Div;
|
|
9
|
+
private readonly selectObj;
|
|
10
|
+
optionsContent: Div;
|
|
11
|
+
protected btn: Button;
|
|
12
|
+
private readonly dotsSvg;
|
|
13
|
+
optionsConfigObservable: Observable<Event>;
|
|
14
|
+
protected constructor(labelText?: string);
|
|
15
|
+
get optionSetting(): IOptionSetting | undefined;
|
|
16
|
+
set optionSetting(optConfig: IOptionSetting | undefined);
|
|
17
|
+
resetOptionSettingResultValue(value: string | number | boolean): void;
|
|
18
|
+
resetConfig(optionSetting: IOptionSetting): void;
|
|
19
|
+
resetOptions(options: IOptionSet[]): void;
|
|
20
|
+
initEvents(): void;
|
|
21
|
+
}
|