@soxa-ui/plugins 0.0.0-stage → 0.3.0-beta.1
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/LICENSE +21 -0
- package/README.md +125 -2
- package/dist/base/base.class.d.ts +54 -0
- package/dist/base/base.class.js +69 -0
- package/dist/base/bundle.class.d.ts +25 -0
- package/dist/base/bundle.class.js +68 -0
- package/dist/base/index.d.ts +3 -0
- package/dist/base/types.d.ts +147 -0
- package/dist/custom/accordion/header.d.ts +19 -0
- package/dist/custom/accordion/header.js +38 -0
- package/dist/custom/accordion/index.d.ts +2 -0
- package/dist/custom/accordion/item-ids/index.d.ts +1 -0
- package/dist/custom/accordion/item-ids/item-ids.plugin.d.ts +24 -0
- package/dist/custom/accordion/item-ids/item-ids.plugin.js +44 -0
- package/dist/custom/action/action.plugin.d.ts +178 -0
- package/dist/custom/action/action.plugin.js +339 -0
- package/dist/custom/action/index.d.ts +2 -0
- package/dist/custom/action/types.d.ts +65 -0
- package/dist/custom/calendar/ids/ids.plugin.d.ts +25 -0
- package/dist/custom/calendar/ids/ids.plugin.js +44 -0
- package/dist/custom/calendar/ids/index.d.ts +1 -0
- package/dist/custom/calendar/index.d.ts +5 -0
- package/dist/custom/calendar/keyboard/index.d.ts +2 -0
- package/dist/custom/calendar/keyboard/keyboard.plugin.d.ts +114 -0
- package/dist/custom/calendar/keyboard/keyboard.plugin.js +249 -0
- package/dist/custom/calendar/keyboard/types.d.ts +16 -0
- package/dist/custom/calendar/names/index.d.ts +1 -0
- package/dist/custom/calendar/names/names.plugin.d.ts +24 -0
- package/dist/custom/calendar/names/names.plugin.js +45 -0
- package/dist/custom/calendar/parts.d.ts +58 -0
- package/dist/custom/calendar/parts.js +119 -0
- package/dist/custom/calendar/pointer/index.d.ts +2 -0
- package/dist/custom/calendar/pointer/pointer.plugin.d.ts +58 -0
- package/dist/custom/calendar/pointer/pointer.plugin.js +144 -0
- package/dist/custom/calendar/pointer/types.d.ts +6 -0
- package/dist/custom/calendar/stop.d.ts +20 -0
- package/dist/custom/calendar/stop.js +32 -0
- package/dist/custom/calendar/types.d.ts +16 -0
- package/dist/custom/clearable/index.d.ts +1 -0
- package/dist/custom/clearable/names/index.d.ts +1 -0
- package/dist/custom/clearable/names/names.plugin.d.ts +24 -0
- package/dist/custom/clearable/names/names.plugin.js +29 -0
- package/dist/custom/collection/bundles.plugin.d.ts +55 -0
- package/dist/custom/collection/bundles.plugin.js +100 -0
- package/dist/custom/collection/collection-bundles-access.plugin.d.ts +29 -0
- package/dist/custom/collection/collection-bundles-access.plugin.js +44 -0
- package/dist/custom/collection/collection-elements.plugin.d.ts +55 -0
- package/dist/custom/collection/collection-elements.plugin.js +100 -0
- package/dist/custom/collection/index.d.ts +4 -0
- package/dist/custom/collection/leaving-focus.d.ts +119 -0
- package/dist/custom/collection/leaving-focus.js +164 -0
- package/dist/custom/collection/reachable.d.ts +14 -0
- package/dist/custom/collection/reachable.js +18 -0
- package/dist/custom/collection/types.d.ts +14 -0
- package/dist/custom/component-view/aria.plugin.d.ts +102 -0
- package/dist/custom/component-view/aria.plugin.js +190 -0
- package/dist/custom/component-view/index.d.ts +2 -0
- package/dist/custom/component-view/types.d.ts +62 -0
- package/dist/custom/date-input/clipboard/clipboard.plugin.d.ts +41 -0
- package/dist/custom/date-input/clipboard/clipboard.plugin.js +98 -0
- package/dist/custom/date-input/clipboard/index.d.ts +2 -0
- package/dist/custom/date-input/clipboard/types.d.ts +6 -0
- package/dist/custom/date-input/ids/ids.plugin.d.ts +21 -0
- package/dist/custom/date-input/ids/ids.plugin.js +28 -0
- package/dist/custom/date-input/ids/index.d.ts +1 -0
- package/dist/custom/date-input/index.d.ts +6 -0
- package/dist/custom/date-input/keyboard/index.d.ts +2 -0
- package/dist/custom/date-input/keyboard/keyboard.plugin.d.ts +54 -0
- package/dist/custom/date-input/keyboard/keyboard.plugin.js +154 -0
- package/dist/custom/date-input/keyboard/types.d.ts +9 -0
- package/dist/custom/date-input/parts.d.ts +49 -0
- package/dist/custom/date-input/parts.js +127 -0
- package/dist/custom/date-input/pointer/index.d.ts +2 -0
- package/dist/custom/date-input/pointer/pointer.plugin.d.ts +51 -0
- package/dist/custom/date-input/pointer/pointer.plugin.js +141 -0
- package/dist/custom/date-input/pointer/types.d.ts +6 -0
- package/dist/custom/date-input/touch/index.d.ts +2 -0
- package/dist/custom/date-input/touch/touch.plugin.d.ts +100 -0
- package/dist/custom/date-input/touch/touch.plugin.js +276 -0
- package/dist/custom/date-input/touch/types.d.ts +6 -0
- package/dist/custom/date-input/types.d.ts +6 -0
- package/dist/custom/date-picker/field.d.ts +20 -0
- package/dist/custom/date-picker/field.js +27 -0
- package/dist/custom/date-picker/focus/focus.plugin.d.ts +56 -0
- package/dist/custom/date-picker/focus/focus.plugin.js +81 -0
- package/dist/custom/date-picker/focus/index.d.ts +2 -0
- package/dist/custom/date-picker/focus/types.d.ts +3 -0
- package/dist/custom/date-picker/ids/ids.plugin.d.ts +19 -0
- package/dist/custom/date-picker/ids/ids.plugin.js +28 -0
- package/dist/custom/date-picker/ids/index.d.ts +1 -0
- package/dist/custom/date-picker/index.d.ts +5 -0
- package/dist/custom/date-picker/names/index.d.ts +2 -0
- package/dist/custom/date-picker/names/names.plugin.d.ts +33 -0
- package/dist/custom/date-picker/names/names.plugin.js +80 -0
- package/dist/custom/date-picker/names/types.d.ts +12 -0
- package/dist/custom/date-picker/trigger/index.d.ts +2 -0
- package/dist/custom/date-picker/trigger/trigger.plugin.d.ts +37 -0
- package/dist/custom/date-picker/trigger/trigger.plugin.js +69 -0
- package/dist/custom/date-picker/trigger/types.d.ts +3 -0
- package/dist/custom/dialog/ids/ids.plugin.d.ts +15 -0
- package/dist/custom/dialog/ids/ids.plugin.js +28 -0
- package/dist/custom/dialog/ids/index.d.ts +1 -0
- package/dist/custom/dialog/index.d.ts +3 -0
- package/dist/custom/dialog/layout/index.d.ts +3 -0
- package/dist/custom/dialog/layout/layout.plugin.d.ts +42 -0
- package/dist/custom/dialog/layout/layout.plugin.js +78 -0
- package/dist/custom/dialog/layout/offset-event.d.ts +35 -0
- package/dist/custom/dialog/layout/offset-event.js +44 -0
- package/dist/custom/dialog/layout/types.d.ts +12 -0
- package/dist/custom/dialog/names/index.d.ts +1 -0
- package/dist/custom/dialog/names/names.plugin.d.ts +13 -0
- package/dist/custom/dialog/names/names.plugin.js +17 -0
- package/dist/custom/dismiss/dismiss.plugin.d.ts +174 -0
- package/dist/custom/dismiss/dismiss.plugin.js +287 -0
- package/dist/custom/dismiss/index.d.ts +2 -0
- package/dist/custom/dismiss/types.d.ts +59 -0
- package/dist/custom/drag-and-drop/drag.plugin.d.ts +87 -0
- package/dist/custom/drag-and-drop/drag.plugin.js +310 -0
- package/dist/custom/drag-and-drop/index.d.ts +2 -0
- package/dist/custom/drag-and-drop/types.d.ts +13 -0
- package/dist/custom/drawer/index.d.ts +1 -0
- package/dist/custom/drawer/layout/index.d.ts +2 -0
- package/dist/custom/drawer/layout/layout.plugin.d.ts +17 -0
- package/dist/custom/drawer/layout/layout.plugin.js +22 -0
- package/dist/custom/drawer/layout/types.d.ts +3 -0
- package/dist/custom/element/element.plugin.d.ts +35 -0
- package/dist/custom/element/element.plugin.js +58 -0
- package/dist/custom/element/index.d.ts +2 -0
- package/dist/custom/element/types.d.ts +18 -0
- package/dist/custom/field/ids/ids.plugin.d.ts +64 -0
- package/dist/custom/field/ids/ids.plugin.js +126 -0
- package/dist/custom/field/ids/index.d.ts +2 -0
- package/dist/custom/field/ids/types.d.ts +28 -0
- package/dist/custom/field/index.d.ts +1 -0
- package/dist/custom/frame/anchor/anchor.plugin.d.ts +483 -0
- package/dist/custom/frame/anchor/anchor.plugin.js +820 -0
- package/dist/custom/frame/anchor/index.d.ts +2 -0
- package/dist/custom/frame/anchor/types.d.ts +83 -0
- package/dist/custom/frame/index.d.ts +2 -0
- package/dist/custom/frame/layout/index.d.ts +2 -0
- package/dist/custom/frame/layout/layout.plugin.d.ts +24 -0
- package/dist/custom/frame/layout/layout.plugin.js +65 -0
- package/dist/custom/frame/layout/types.d.ts +5 -0
- package/dist/custom/icon/index.d.ts +2 -0
- package/dist/custom/icon/layout.plugin.d.ts +21 -0
- package/dist/custom/icon/layout.plugin.js +51 -0
- package/dist/custom/icon/types.d.ts +5 -0
- package/dist/custom/id/id.plugin.d.ts +32 -0
- package/dist/custom/id/id.plugin.js +42 -0
- package/dist/custom/id/index.d.ts +2 -0
- package/dist/custom/id/types.d.ts +6 -0
- package/dist/custom/index.d.ts +42 -0
- package/dist/custom/input/field.d.ts +16 -0
- package/dist/custom/input/field.js +27 -0
- package/dist/custom/input/index.d.ts +3 -0
- package/dist/custom/input/input.plugin.d.ts +12 -0
- package/dist/custom/input/input.plugin.js +46 -0
- package/dist/custom/input/types.d.ts +2 -0
- package/dist/custom/input-bool/index.d.ts +2 -0
- package/dist/custom/input-bool/input-bool.plugin.d.ts +30 -0
- package/dist/custom/input-bool/input-bool.plugin.js +77 -0
- package/dist/custom/input-bool/types.d.ts +5 -0
- package/dist/custom/input-control/index.d.ts +2 -0
- package/dist/custom/input-control/input-control.plugin.d.ts +12 -0
- package/dist/custom/input-control/input-control.plugin.js +40 -0
- package/dist/custom/input-control/types.d.ts +2 -0
- package/dist/custom/item-group/ids/ids.plugin.d.ts +19 -0
- package/dist/custom/item-group/ids/ids.plugin.js +32 -0
- package/dist/custom/item-group/ids/index.d.ts +1 -0
- package/dist/custom/item-group/index.d.ts +1 -0
- package/dist/custom/label/index.d.ts +1 -0
- package/dist/custom/label/nested-warn/index.d.ts +1 -0
- package/dist/custom/label/nested-warn/nested-warn.plugin.d.ts +21 -0
- package/dist/custom/label/nested-warn/nested-warn.plugin.js +41 -0
- package/dist/custom/list/height/height.plugin.d.ts +129 -0
- package/dist/custom/list/height/height.plugin.js +272 -0
- package/dist/custom/list/height/index.d.ts +2 -0
- package/dist/custom/list/height/types.d.ts +10 -0
- package/dist/custom/list/index.d.ts +7 -0
- package/dist/custom/list/item/index.d.ts +2 -0
- package/dist/custom/list/item/item.plugin.d.ts +25 -0
- package/dist/custom/list/item/item.plugin.js +46 -0
- package/dist/custom/list/item/types.d.ts +5 -0
- package/dist/custom/list/keyboard/index.d.ts +2 -0
- package/dist/custom/list/keyboard/keyboard.plugin.d.ts +133 -0
- package/dist/custom/list/keyboard/keyboard.plugin.js +199 -0
- package/dist/custom/list/keyboard/types.d.ts +3 -0
- package/dist/custom/list/navigation/index.d.ts +2 -0
- package/dist/custom/list/navigation/navigation.plugin.d.ts +262 -0
- package/dist/custom/list/navigation/navigation.plugin.js +402 -0
- package/dist/custom/list/navigation/types.d.ts +25 -0
- package/dist/custom/list/newly-selected.d.ts +17 -0
- package/dist/custom/list/newly-selected.js +22 -0
- package/dist/custom/list/option-ids/index.d.ts +1 -0
- package/dist/custom/list/option-ids/option-ids.plugin.d.ts +29 -0
- package/dist/custom/list/option-ids/option-ids.plugin.js +43 -0
- package/dist/custom/list/row.d.ts +50 -0
- package/dist/custom/list/row.js +99 -0
- package/dist/custom/list/scroll/index.d.ts +2 -0
- package/dist/custom/list/scroll/scroll.plugin.d.ts +132 -0
- package/dist/custom/list/scroll/scroll.plugin.js +286 -0
- package/dist/custom/list/scroll/types.d.ts +21 -0
- package/dist/custom/list/typeahead.d.ts +53 -0
- package/dist/custom/list/typeahead.js +58 -0
- package/dist/custom/menu/focus/focus.plugin.d.ts +61 -0
- package/dist/custom/menu/focus/focus.plugin.js +105 -0
- package/dist/custom/menu/focus/index.d.ts +2 -0
- package/dist/custom/menu/focus/types.d.ts +2 -0
- package/dist/custom/menu/hover/hover.plugin.d.ts +99 -0
- package/dist/custom/menu/hover/hover.plugin.js +235 -0
- package/dist/custom/menu/hover/index.d.ts +2 -0
- package/dist/custom/menu/hover/types.d.ts +2 -0
- package/dist/custom/menu/ids/ids.plugin.d.ts +29 -0
- package/dist/custom/menu/ids/ids.plugin.js +46 -0
- package/dist/custom/menu/ids/index.d.ts +1 -0
- package/dist/custom/menu/index.d.ts +11 -0
- package/dist/custom/menu/keyboard/index.d.ts +2 -0
- package/dist/custom/menu/keyboard/keyboard.plugin.d.ts +41 -0
- package/dist/custom/menu/keyboard/keyboard.plugin.js +68 -0
- package/dist/custom/menu/keyboard/types.d.ts +2 -0
- package/dist/custom/menu/navigation/index.d.ts +2 -0
- package/dist/custom/menu/navigation/navigation.plugin.d.ts +116 -0
- package/dist/custom/menu/navigation/navigation.plugin.js +222 -0
- package/dist/custom/menu/navigation/types.d.ts +2 -0
- package/dist/custom/menu/nested-layer.d.ts +13 -0
- package/dist/custom/menu/nested-layer.js +20 -0
- package/dist/custom/menu/pointer/index.d.ts +2 -0
- package/dist/custom/menu/pointer/pointer.plugin.d.ts +45 -0
- package/dist/custom/menu/pointer/pointer.plugin.js +95 -0
- package/dist/custom/menu/pointer/strategies/context.strategy.d.ts +70 -0
- package/dist/custom/menu/pointer/strategies/context.strategy.js +170 -0
- package/dist/custom/menu/pointer/strategies/index.d.ts +3 -0
- package/dist/custom/menu/pointer/strategies/press.strategy.d.ts +23 -0
- package/dist/custom/menu/pointer/strategies/press.strategy.js +33 -0
- package/dist/custom/menu/pointer/strategies/types.d.ts +49 -0
- package/dist/custom/menu/pointer/types.d.ts +2 -0
- package/dist/custom/menu/popover-item-focus/focus.plugin.d.ts +54 -0
- package/dist/custom/menu/popover-item-focus/focus.plugin.js +70 -0
- package/dist/custom/menu/popover-item-focus/index.d.ts +2 -0
- package/dist/custom/menu/popover-item-focus/types.d.ts +10 -0
- package/dist/custom/menu/popover-item-keyboard/index.d.ts +2 -0
- package/dist/custom/menu/popover-item-keyboard/keyboard.plugin.d.ts +43 -0
- package/dist/custom/menu/popover-item-keyboard/keyboard.plugin.js +79 -0
- package/dist/custom/menu/popover-item-keyboard/types.d.ts +2 -0
- package/dist/custom/menu/popup-ids/ids.plugin.d.ts +27 -0
- package/dist/custom/menu/popup-ids/ids.plugin.js +47 -0
- package/dist/custom/menu/popup-ids/index.d.ts +1 -0
- package/dist/custom/menu/submenu-focus/focus.plugin.d.ts +53 -0
- package/dist/custom/menu/submenu-focus/focus.plugin.js +84 -0
- package/dist/custom/menu/submenu-focus/index.d.ts +2 -0
- package/dist/custom/menu/submenu-focus/types.d.ts +10 -0
- package/dist/custom/menu/submenu-keyboard/index.d.ts +2 -0
- package/dist/custom/menu/submenu-keyboard/keyboard.plugin.d.ts +43 -0
- package/dist/custom/menu/submenu-keyboard/keyboard.plugin.js +74 -0
- package/dist/custom/menu/submenu-keyboard/types.d.ts +2 -0
- package/dist/custom/number-input/index.d.ts +5 -0
- package/dist/custom/number-input/keyboard/index.d.ts +2 -0
- package/dist/custom/number-input/keyboard/keyboard.plugin.d.ts +36 -0
- package/dist/custom/number-input/keyboard/keyboard.plugin.js +80 -0
- package/dist/custom/number-input/keyboard/types.d.ts +3 -0
- package/dist/custom/number-input/names/index.d.ts +1 -0
- package/dist/custom/number-input/names/names.plugin.d.ts +17 -0
- package/dist/custom/number-input/names/names.plugin.js +24 -0
- package/dist/custom/number-input/parts.d.ts +21 -0
- package/dist/custom/number-input/parts.js +39 -0
- package/dist/custom/number-input/stepper/index.d.ts +2 -0
- package/dist/custom/number-input/stepper/stepper.plugin.d.ts +59 -0
- package/dist/custom/number-input/stepper/stepper.plugin.js +166 -0
- package/dist/custom/number-input/stepper/types.d.ts +19 -0
- package/dist/custom/number-input/touch/index.d.ts +2 -0
- package/dist/custom/number-input/touch/touch.plugin.d.ts +25 -0
- package/dist/custom/number-input/touch/touch.plugin.js +53 -0
- package/dist/custom/number-input/touch/types.d.ts +3 -0
- package/dist/custom/number-input/types.d.ts +8 -0
- package/dist/custom/number-input/typing/index.d.ts +2 -0
- package/dist/custom/number-input/typing/types.d.ts +6 -0
- package/dist/custom/number-input/typing/typing.plugin.d.ts +47 -0
- package/dist/custom/number-input/typing/typing.plugin.js +149 -0
- package/dist/custom/overlay/focus/focus.plugin.d.ts +150 -0
- package/dist/custom/overlay/focus/focus.plugin.js +242 -0
- package/dist/custom/overlay/focus/index.d.ts +1 -0
- package/dist/custom/overlay/hide-outside/hide-outside.plugin.d.ts +84 -0
- package/dist/custom/overlay/hide-outside/hide-outside.plugin.js +187 -0
- package/dist/custom/overlay/hide-outside/index.d.ts +2 -0
- package/dist/custom/overlay/hide-outside/marks.d.ts +19 -0
- package/dist/custom/overlay/hide-outside/marks.js +43 -0
- package/dist/custom/overlay/hide-outside/types.d.ts +17 -0
- package/dist/custom/overlay/index.d.ts +9 -0
- package/dist/custom/overlay/modal-focus/index.d.ts +1 -0
- package/dist/custom/overlay/modal-focus/modal-focus.plugin.d.ts +72 -0
- package/dist/custom/overlay/modal-focus/modal-focus.plugin.js +109 -0
- package/dist/custom/overlay/modal-ids/index.d.ts +1 -0
- package/dist/custom/overlay/modal-ids/modal-ids.plugin.d.ts +21 -0
- package/dist/custom/overlay/modal-ids/modal-ids.plugin.js +30 -0
- package/dist/custom/overlay/modal-layout/index.d.ts +2 -0
- package/dist/custom/overlay/modal-layout/modal-layout.plugin.d.ts +66 -0
- package/dist/custom/overlay/modal-layout/modal-layout.plugin.js +119 -0
- package/dist/custom/overlay/modal-layout/types.d.ts +13 -0
- package/dist/custom/overlay/modal-names/index.d.ts +1 -0
- package/dist/custom/overlay/modal-names/modal-names.plugin.d.ts +14 -0
- package/dist/custom/overlay/modal-names/modal-names.plugin.js +17 -0
- package/dist/custom/overlay/open-state.d.ts +12 -0
- package/dist/custom/overlay/open-state.js +42 -0
- package/dist/custom/overlay/scroll-lock/index.d.ts +2 -0
- package/dist/custom/overlay/scroll-lock/lock.d.ts +17 -0
- package/dist/custom/overlay/scroll-lock/lock.js +83 -0
- package/dist/custom/overlay/scroll-lock/scroll-lock.plugin.d.ts +78 -0
- package/dist/custom/overlay/scroll-lock/scroll-lock.plugin.js +134 -0
- package/dist/custom/overlay/scroll-lock/types.d.ts +17 -0
- package/dist/custom/overlay/swipe/index.d.ts +2 -0
- package/dist/custom/overlay/swipe/swipe.plugin.d.ts +150 -0
- package/dist/custom/overlay/swipe/swipe.plugin.js +432 -0
- package/dist/custom/overlay/swipe/types.d.ts +62 -0
- package/dist/custom/overlay/types.d.ts +40 -0
- package/dist/custom/pagination/current.d.ts +24 -0
- package/dist/custom/pagination/current.js +34 -0
- package/dist/custom/pagination/focus/focus.plugin.d.ts +57 -0
- package/dist/custom/pagination/focus/focus.plugin.js +106 -0
- package/dist/custom/pagination/focus/index.d.ts +2 -0
- package/dist/custom/pagination/focus/types.d.ts +8 -0
- package/dist/custom/pagination/index.d.ts +3 -0
- package/dist/custom/pagination/names/index.d.ts +1 -0
- package/dist/custom/pagination/names/names.plugin.d.ts +15 -0
- package/dist/custom/pagination/names/names.plugin.js +19 -0
- package/dist/custom/popover/focus/focus.plugin.d.ts +69 -0
- package/dist/custom/popover/focus/focus.plugin.js +107 -0
- package/dist/custom/popover/focus/index.d.ts +2 -0
- package/dist/custom/popover/focus/types.d.ts +2 -0
- package/dist/custom/popover/ids/ids.plugin.d.ts +18 -0
- package/dist/custom/popover/ids/ids.plugin.js +27 -0
- package/dist/custom/popover/ids/index.d.ts +1 -0
- package/dist/custom/popover/index.d.ts +4 -0
- package/dist/custom/popover/names/index.d.ts +1 -0
- package/dist/custom/popover/names/names.plugin.d.ts +7 -0
- package/dist/custom/popover/names/names.plugin.js +10 -0
- package/dist/custom/popover/pointer/index.d.ts +2 -0
- package/dist/custom/popover/pointer/pointer.plugin.d.ts +35 -0
- package/dist/custom/popover/pointer/pointer.plugin.js +65 -0
- package/dist/custom/popover/pointer/types.d.ts +2 -0
- package/dist/custom/radio-group/checked/checked.plugin.d.ts +45 -0
- package/dist/custom/radio-group/checked/checked.plugin.js +81 -0
- package/dist/custom/radio-group/checked/index.d.ts +1 -0
- package/dist/custom/radio-group/index.d.ts +3 -0
- package/dist/custom/radio-group/name/index.d.ts +1 -0
- package/dist/custom/radio-group/name/name.plugin.d.ts +21 -0
- package/dist/custom/radio-group/name/name.plugin.js +39 -0
- package/dist/custom/radio-group/stop.d.ts +17 -0
- package/dist/custom/radio-group/stop.js +30 -0
- package/dist/custom/rating/hover/hover.plugin.d.ts +36 -0
- package/dist/custom/rating/hover/hover.plugin.js +71 -0
- package/dist/custom/rating/hover/index.d.ts +2 -0
- package/dist/custom/rating/hover/types.d.ts +7 -0
- package/dist/custom/rating/index.d.ts +3 -0
- package/dist/custom/rating/names/index.d.ts +1 -0
- package/dist/custom/rating/names/names.plugin.d.ts +25 -0
- package/dist/custom/rating/names/names.plugin.js +45 -0
- package/dist/custom/rating/validity/index.d.ts +2 -0
- package/dist/custom/rating/validity/types.d.ts +7 -0
- package/dist/custom/rating/validity/validity.plugin.d.ts +48 -0
- package/dist/custom/rating/validity/validity.plugin.js +91 -0
- package/dist/custom/ready/index.d.ts +1 -0
- package/dist/custom/ready/ready.plugin.d.ts +14 -0
- package/dist/custom/ready/ready.plugin.js +28 -0
- package/dist/custom/scroller/index.d.ts +2 -0
- package/dist/custom/scroller/names/index.d.ts +1 -0
- package/dist/custom/scroller/names/names.plugin.d.ts +11 -0
- package/dist/custom/scroller/names/names.plugin.js +15 -0
- package/dist/custom/scroller/viewport/edges.d.ts +34 -0
- package/dist/custom/scroller/viewport/edges.js +29 -0
- package/dist/custom/scroller/viewport/focus.d.ts +39 -0
- package/dist/custom/scroller/viewport/focus.js +61 -0
- package/dist/custom/scroller/viewport/index.d.ts +6 -0
- package/dist/custom/scroller/viewport/stop.d.ts +24 -0
- package/dist/custom/scroller/viewport/stop.js +34 -0
- package/dist/custom/scroller/viewport/types.d.ts +31 -0
- package/dist/custom/scroller/viewport/viewport.plugin.d.ts +163 -0
- package/dist/custom/scroller/viewport/viewport.plugin.js +352 -0
- package/dist/custom/select/backspace/backspace.plugin.d.ts +50 -0
- package/dist/custom/select/backspace/backspace.plugin.js +125 -0
- package/dist/custom/select/backspace/index.d.ts +2 -0
- package/dist/custom/select/backspace/types.d.ts +2 -0
- package/dist/custom/select/editable/editable.plugin.d.ts +193 -0
- package/dist/custom/select/editable/editable.plugin.js +347 -0
- package/dist/custom/select/editable/index.d.ts +2 -0
- package/dist/custom/select/editable/types.d.ts +6 -0
- package/dist/custom/select/ids/ids.plugin.d.ts +22 -0
- package/dist/custom/select/ids/ids.plugin.js +31 -0
- package/dist/custom/select/ids/index.d.ts +1 -0
- package/dist/custom/select/index.d.ts +5 -0
- package/dist/custom/select/keyboard/index.d.ts +2 -0
- package/dist/custom/select/keyboard/keyboard.plugin.d.ts +125 -0
- package/dist/custom/select/keyboard/keyboard.plugin.js +205 -0
- package/dist/custom/select/keyboard/strategies/base.strategy.d.ts +37 -0
- package/dist/custom/select/keyboard/strategies/base.strategy.js +81 -0
- package/dist/custom/select/keyboard/strategies/editable.strategy.d.ts +16 -0
- package/dist/custom/select/keyboard/strategies/editable.strategy.js +20 -0
- package/dist/custom/select/keyboard/strategies/index.d.ts +4 -0
- package/dist/custom/select/keyboard/strategies/select-only.strategy.d.ts +13 -0
- package/dist/custom/select/keyboard/strategies/select-only.strategy.js +59 -0
- package/dist/custom/select/keyboard/strategies/types.d.ts +29 -0
- package/dist/custom/select/keyboard/types.d.ts +18 -0
- package/dist/custom/select/pointer/index.d.ts +2 -0
- package/dist/custom/select/pointer/pointer.plugin.d.ts +59 -0
- package/dist/custom/select/pointer/pointer.plugin.js +104 -0
- package/dist/custom/select/pointer/types.d.ts +2 -0
- package/dist/custom/skeleton/index.d.ts +2 -0
- package/dist/custom/skeleton/layout.plugin.d.ts +18 -0
- package/dist/custom/skeleton/layout.plugin.js +47 -0
- package/dist/custom/skeleton/types.d.ts +5 -0
- package/dist/custom/slide/direction.d.ts +30 -0
- package/dist/custom/slide/direction.js +75 -0
- package/dist/custom/slide/index.d.ts +4 -0
- package/dist/custom/slide/keyboard/index.d.ts +2 -0
- package/dist/custom/slide/keyboard/keyboard.plugin.d.ts +46 -0
- package/dist/custom/slide/keyboard/keyboard.plugin.js +106 -0
- package/dist/custom/slide/keyboard/types.d.ts +6 -0
- package/dist/custom/slide/parts.d.ts +7 -0
- package/dist/custom/slide/parts.js +26 -0
- package/dist/custom/slide/pointer/index.d.ts +2 -0
- package/dist/custom/slide/pointer/pointer.plugin.d.ts +100 -0
- package/dist/custom/slide/pointer/pointer.plugin.js +268 -0
- package/dist/custom/slide/pointer/strategies/base.strategy.d.ts +16 -0
- package/dist/custom/slide/pointer/strategies/base.strategy.js +23 -0
- package/dist/custom/slide/pointer/strategies/hold.strategy.d.ts +28 -0
- package/dist/custom/slide/pointer/strategies/hold.strategy.js +48 -0
- package/dist/custom/slide/pointer/strategies/index.d.ts +7 -0
- package/dist/custom/slide/pointer/strategies/magnet.strategy.d.ts +11 -0
- package/dist/custom/slide/pointer/strategies/magnet.strategy.js +17 -0
- package/dist/custom/slide/pointer/strategies/none.strategy.d.ts +7 -0
- package/dist/custom/slide/pointer/strategies/none.strategy.js +9 -0
- package/dist/custom/slide/pointer/strategies/plateau.strategy.d.ts +24 -0
- package/dist/custom/slide/pointer/strategies/plateau.strategy.js +81 -0
- package/dist/custom/slide/pointer/strategies/points.d.ts +16 -0
- package/dist/custom/slide/pointer/strategies/points.js +32 -0
- package/dist/custom/slide/pointer/strategies/settle.strategy.d.ts +11 -0
- package/dist/custom/slide/pointer/strategies/settle.strategy.js +17 -0
- package/dist/custom/slide/pointer/strategies/types.d.ts +57 -0
- package/dist/custom/slide/pointer/types.d.ts +46 -0
- package/dist/custom/slide/types.d.ts +14 -0
- package/dist/custom/table/column-ids/column-ids.plugin.d.ts +26 -0
- package/dist/custom/table/column-ids/column-ids.plugin.js +36 -0
- package/dist/custom/table/column-ids/index.d.ts +1 -0
- package/dist/custom/table/column-names/column-names.plugin.d.ts +18 -0
- package/dist/custom/table/column-names/column-names.plugin.js +24 -0
- package/dist/custom/table/column-names/index.d.ts +1 -0
- package/dist/custom/table/column-reorder/column-reorder.plugin.d.ts +169 -0
- package/dist/custom/table/column-reorder/column-reorder.plugin.js +465 -0
- package/dist/custom/table/column-reorder/index.d.ts +2 -0
- package/dist/custom/table/column-reorder/types.d.ts +81 -0
- package/dist/custom/table/column-resize/column-resize.plugin.d.ts +96 -0
- package/dist/custom/table/column-resize/column-resize.plugin.js +271 -0
- package/dist/custom/table/column-resize/index.d.ts +2 -0
- package/dist/custom/table/column-resize/types.d.ts +38 -0
- package/dist/custom/table/grid/grid.plugin.d.ts +119 -0
- package/dist/custom/table/grid/grid.plugin.js +356 -0
- package/dist/custom/table/grid/index.d.ts +2 -0
- package/dist/custom/table/grid/types.d.ts +22 -0
- package/dist/custom/table/index.d.ts +8 -0
- package/dist/custom/table/layout/index.d.ts +2 -0
- package/dist/custom/table/layout/layout.plugin.d.ts +52 -0
- package/dist/custom/table/layout/layout.plugin.js +122 -0
- package/dist/custom/table/layout/types.d.ts +7 -0
- package/dist/custom/table/names/index.d.ts +2 -0
- package/dist/custom/table/names/names.plugin.d.ts +18 -0
- package/dist/custom/table/names/names.plugin.js +31 -0
- package/dist/custom/table/names/types.d.ts +6 -0
- package/dist/custom/table/row-ids/index.d.ts +1 -0
- package/dist/custom/table/row-ids/row-ids.plugin.d.ts +21 -0
- package/dist/custom/table/row-ids/row-ids.plugin.js +28 -0
- package/dist/custom/tabs/active-tab/active-tab.plugin.d.ts +42 -0
- package/dist/custom/tabs/active-tab/active-tab.plugin.js +103 -0
- package/dist/custom/tabs/active-tab/index.d.ts +2 -0
- package/dist/custom/tabs/active-tab/types.d.ts +17 -0
- package/dist/custom/tabs/content-warn/content-warn.plugin.d.ts +21 -0
- package/dist/custom/tabs/content-warn/content-warn.plugin.js +41 -0
- package/dist/custom/tabs/content-warn/index.d.ts +1 -0
- package/dist/custom/tabs/index.d.ts +7 -0
- package/dist/custom/tabs/item-ids/index.d.ts +1 -0
- package/dist/custom/tabs/item-ids/item-ids.plugin.d.ts +60 -0
- package/dist/custom/tabs/item-ids/item-ids.plugin.js +94 -0
- package/dist/custom/tabs/item-names/index.d.ts +1 -0
- package/dist/custom/tabs/item-names/item-names.plugin.d.ts +17 -0
- package/dist/custom/tabs/item-names/item-names.plugin.js +23 -0
- package/dist/custom/tabs/keyboard/index.d.ts +2 -0
- package/dist/custom/tabs/keyboard/keyboard.plugin.d.ts +105 -0
- package/dist/custom/tabs/keyboard/keyboard.plugin.js +206 -0
- package/dist/custom/tabs/keyboard/types.d.ts +6 -0
- package/dist/custom/tabs/layout/index.d.ts +2 -0
- package/dist/custom/tabs/layout/layout.plugin.d.ts +37 -0
- package/dist/custom/tabs/layout/layout.plugin.js +81 -0
- package/dist/custom/tabs/layout/types.d.ts +4 -0
- package/dist/custom/tabs/parts.d.ts +15 -0
- package/dist/custom/tabs/parts.js +21 -0
- package/dist/custom/tabs/tab.d.ts +29 -0
- package/dist/custom/tabs/tab.js +44 -0
- package/dist/custom/tags/index.d.ts +4 -0
- package/dist/custom/tags/item-names/index.d.ts +1 -0
- package/dist/custom/tags/item-names/item-names.plugin.d.ts +12 -0
- package/dist/custom/tags/item-names/item-names.plugin.js +18 -0
- package/dist/custom/tags/keyboard/index.d.ts +2 -0
- package/dist/custom/tags/keyboard/keyboard.plugin.d.ts +133 -0
- package/dist/custom/tags/keyboard/keyboard.plugin.js +253 -0
- package/dist/custom/tags/keyboard/types.d.ts +6 -0
- package/dist/custom/tags/scroll/index.d.ts +2 -0
- package/dist/custom/tags/scroll/scroll.plugin.d.ts +68 -0
- package/dist/custom/tags/scroll/scroll.plugin.js +120 -0
- package/dist/custom/tags/scroll/types.d.ts +6 -0
- package/dist/custom/tags/tag.d.ts +41 -0
- package/dist/custom/tags/tag.js +66 -0
- package/dist/custom/textarea/autoresize/autoresize.plugin.d.ts +70 -0
- package/dist/custom/textarea/autoresize/autoresize.plugin.js +176 -0
- package/dist/custom/textarea/autoresize/index.d.ts +2 -0
- package/dist/custom/textarea/autoresize/types.d.ts +6 -0
- package/dist/custom/textarea/ids/ids.plugin.d.ts +26 -0
- package/dist/custom/textarea/ids/ids.plugin.js +44 -0
- package/dist/custom/textarea/ids/index.d.ts +1 -0
- package/dist/custom/textarea/index.d.ts +3 -0
- package/dist/custom/textarea/names/index.d.ts +2 -0
- package/dist/custom/textarea/names/names.plugin.d.ts +33 -0
- package/dist/custom/textarea/names/names.plugin.js +65 -0
- package/dist/custom/textarea/names/types.d.ts +8 -0
- package/dist/custom/toasts/cascade/cascade.plugin.d.ts +81 -0
- package/dist/custom/toasts/cascade/cascade.plugin.js +214 -0
- package/dist/custom/toasts/cascade/index.d.ts +2 -0
- package/dist/custom/toasts/cascade/types.d.ts +15 -0
- package/dist/custom/toasts/index.d.ts +7 -0
- package/dist/custom/toasts/item-names/index.d.ts +1 -0
- package/dist/custom/toasts/item-names/item-names.plugin.d.ts +12 -0
- package/dist/custom/toasts/item-names/item-names.plugin.js +18 -0
- package/dist/custom/toasts/keyboard/index.d.ts +2 -0
- package/dist/custom/toasts/keyboard/keyboard.plugin.d.ts +57 -0
- package/dist/custom/toasts/keyboard/keyboard.plugin.js +136 -0
- package/dist/custom/toasts/keyboard/types.d.ts +6 -0
- package/dist/custom/toasts/layout/index.d.ts +2 -0
- package/dist/custom/toasts/layout/layout.plugin.d.ts +23 -0
- package/dist/custom/toasts/layout/layout.plugin.js +39 -0
- package/dist/custom/toasts/layout/types.d.ts +5 -0
- package/dist/custom/toasts/names/index.d.ts +1 -0
- package/dist/custom/toasts/names/names.plugin.d.ts +10 -0
- package/dist/custom/toasts/names/names.plugin.js +13 -0
- package/dist/custom/toasts/removal/index.d.ts +2 -0
- package/dist/custom/toasts/removal/removal.plugin.d.ts +35 -0
- package/dist/custom/toasts/removal/removal.plugin.js +69 -0
- package/dist/custom/toasts/removal/types.d.ts +6 -0
- package/dist/custom/toasts/timer/index.d.ts +2 -0
- package/dist/custom/toasts/timer/timer.plugin.d.ts +71 -0
- package/dist/custom/toasts/timer/timer.plugin.js +213 -0
- package/dist/custom/toasts/timer/types.d.ts +15 -0
- package/dist/custom/tooltip/ids/ids.plugin.d.ts +22 -0
- package/dist/custom/tooltip/ids/ids.plugin.js +42 -0
- package/dist/custom/tooltip/ids/index.d.ts +1 -0
- package/dist/custom/tooltip/index.d.ts +2 -0
- package/dist/custom/tooltip/trigger/document-state.d.ts +42 -0
- package/dist/custom/tooltip/trigger/document-state.js +50 -0
- package/dist/custom/tooltip/trigger/index.d.ts +2 -0
- package/dist/custom/tooltip/trigger/trigger.plugin.d.ts +133 -0
- package/dist/custom/tooltip/trigger/trigger.plugin.js +271 -0
- package/dist/custom/tooltip/trigger/types.d.ts +20 -0
- package/dist/custom/virtual/index.d.ts +2 -0
- package/dist/custom/virtual/types.d.ts +6 -0
- package/dist/custom/virtual/virtual.plugin.d.ts +126 -0
- package/dist/custom/virtual/virtual.plugin.js +311 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +149 -0
- package/dist/locale/index.d.ts +6 -0
- package/dist/locale/locale.d.ts +38 -0
- package/dist/locale/locale.js +93 -0
- package/dist/locale/locale.plugin.d.ts +26 -0
- package/dist/locale/locale.plugin.js +35 -0
- package/dist/locale/locales/ar.d.ts +5 -0
- package/dist/locale/locales/ar.js +59 -0
- package/dist/locale/locales/en.d.ts +7 -0
- package/dist/locale/locales/en.js +61 -0
- package/dist/locale/locales/es.d.ts +2 -0
- package/dist/locale/locales/es.js +56 -0
- package/dist/locale/locales/fr.d.ts +2 -0
- package/dist/locale/locales/fr.js +56 -0
- package/dist/locale/locales/index.d.ts +6 -0
- package/dist/locale/locales/ru.d.ts +2 -0
- package/dist/locale/locales/ru.js +56 -0
- package/dist/locale/locales/zh.d.ts +2 -0
- package/dist/locale/locales/zh.js +56 -0
- package/dist/locale/names.plugin.d.ts +32 -0
- package/dist/locale/names.plugin.js +39 -0
- package/dist/locale/source.class.d.ts +22 -0
- package/dist/locale/source.class.js +32 -0
- package/dist/locale/types.d.ts +197 -0
- package/dist/motion/index.d.ts +2 -0
- package/dist/motion/motion.d.ts +28 -0
- package/dist/motion/motion.js +67 -0
- package/dist/motion/types.d.ts +14 -0
- package/dist/utils/afterTransitions.d.ts +49 -0
- package/dist/utils/afterTransitions.js +79 -0
- package/dist/utils/focusFirst.d.ts +13 -0
- package/dist/utils/focusFirst.js +24 -0
- package/dist/utils/graceArea.d.ts +21 -0
- package/dist/utils/graceArea.js +66 -0
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/isAboveLayer.d.ts +14 -0
- package/dist/utils/isAboveLayer.js +24 -0
- package/dist/utils/isAppleTouch.d.ts +10 -0
- package/dist/utils/isAppleTouch.js +17 -0
- package/dist/utils/isFocusableElement.d.ts +8 -0
- package/dist/utils/isFocusableElement.js +13 -0
- package/dist/utils/isMeasurableElement.d.ts +11 -0
- package/dist/utils/isMeasurableElement.js +16 -0
- package/dist/utils/isPrintableKey.d.ts +7 -0
- package/dist/utils/isPrintableKey.js +12 -0
- package/dist/utils/layerOf.d.ts +12 -0
- package/dist/utils/layerOf.js +21 -0
- package/dist/utils/nearestShift.d.ts +19 -0
- package/dist/utils/nearestShift.js +58 -0
- package/dist/utils/positionOrigin.d.ts +34 -0
- package/dist/utils/positionOrigin.js +71 -0
- package/dist/utils/scrollParent.d.ts +12 -0
- package/dist/utils/scrollParent.js +23 -0
- package/dist/utils/scrollWindow.d.ts +27 -0
- package/dist/utils/scrollWindow.js +50 -0
- package/dist/utils/tabStops.d.ts +44 -0
- package/dist/utils/tabStops.js +102 -0
- package/dist/utils/tabStopsAfter.d.ts +10 -0
- package/dist/utils/tabStopsAfter.js +16 -0
- package/dist/utils/tabStopsBefore.d.ts +11 -0
- package/dist/utils/tabStopsBefore.js +17 -0
- package/dist/utils/toCssValue.d.ts +8 -0
- package/dist/utils/toCssValue.js +17 -0
- package/dist/utils/trapTab.d.ts +16 -0
- package/dist/utils/trapTab.js +36 -0
- package/dist/utils/types.d.ts +64 -0
- package/package.json +43 -4
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Доля в пределах хода: за краем — край. Указатель за краем дорожки ведёт
|
|
3
|
+
* ручку за край хода (`fractionAt` долю не прижимает), но стоит она на краю.
|
|
4
|
+
*/
|
|
5
|
+
export declare function withinTravel(fraction: number): number;
|
|
6
|
+
/**
|
|
7
|
+
* Ближайшая к `target` точка не дальше `radius`; поровну от двух — меньшая.
|
|
8
|
+
* Такой нет — `undefined`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function nearestPoint(points: readonly number[], target: number, radius: number): number | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Первая точка на пути ручки от `from` к `to` — пройденная или достигнутая.
|
|
13
|
+
* Точка, от которой путь начался, не в счёт: ручка с неё уходит. Пути нет
|
|
14
|
+
* или точек на нём нет — `undefined`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function crossedPoint(points: readonly number[], from: number, to: number): number | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region src/custom/slide/pointer/strategies/points.ts
|
|
2
|
+
/**
|
|
3
|
+
* Доля в пределах хода: за краем — край. Указатель за краем дорожки ведёт
|
|
4
|
+
* ручку за край хода (`fractionAt` долю не прижимает), но стоит она на краю.
|
|
5
|
+
*/
|
|
6
|
+
function withinTravel(fraction) {
|
|
7
|
+
return Math.min(1, Math.max(0, fraction));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Ближайшая к `target` точка не дальше `radius`; поровну от двух — меньшая.
|
|
11
|
+
* Такой нет — `undefined`.
|
|
12
|
+
*/
|
|
13
|
+
function nearestPoint(points, target, radius) {
|
|
14
|
+
let nearest;
|
|
15
|
+
for (const point of points) {
|
|
16
|
+
const distance = Math.abs(point - target);
|
|
17
|
+
if (distance > radius) continue;
|
|
18
|
+
if (nearest === void 0 || distance < Math.abs(nearest - target)) nearest = point;
|
|
19
|
+
}
|
|
20
|
+
return nearest;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Первая точка на пути ручки от `from` к `to` — пройденная или достигнутая.
|
|
24
|
+
* Точка, от которой путь начался, не в счёт: ручка с неё уходит. Пути нет
|
|
25
|
+
* или точек на нём нет — `undefined`.
|
|
26
|
+
*/
|
|
27
|
+
function crossedPoint(points, from, to) {
|
|
28
|
+
if (to > from) return points.find((point) => point > from && point <= to);
|
|
29
|
+
return points.filter((point) => point < from && point >= to).at(-1);
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { crossedPoint, nearestPoint, withinTravel };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TSlideSnapStrategy } from './base.strategy';
|
|
2
|
+
/**
|
|
3
|
+
* TSettleSnapStrategy — доводка (`settle`): пока тянут, ручка идёт за
|
|
4
|
+
* указателем; отпустили в радиусе метки — ручка доезжает до неё.
|
|
5
|
+
*
|
|
6
|
+
* Доводит уже не жест: владелец снимает перетаскивание и ставит ручку на
|
|
7
|
+
* метку (`ISlidable.settle`), и тема довозит её своим переходом.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TSettleSnapStrategy extends TSlideSnapStrategy {
|
|
10
|
+
release(target: number): number | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TSlideSnapStrategy } from "./base.strategy.js";
|
|
2
|
+
import { nearestPoint } from "./points.js";
|
|
3
|
+
//#region src/custom/slide/pointer/strategies/settle.strategy.ts
|
|
4
|
+
/**
|
|
5
|
+
* TSettleSnapStrategy — доводка (`settle`): пока тянут, ручка идёт за
|
|
6
|
+
* указателем; отпустили в радиусе метки — ручка доезжает до неё.
|
|
7
|
+
*
|
|
8
|
+
* Доводит уже не жест: владелец снимает перетаскивание и ставит ручку на
|
|
9
|
+
* метку (`ISlidable.settle`), и тема довозит её своим переходом.
|
|
10
|
+
*/
|
|
11
|
+
var TSettleSnapStrategy = class extends TSlideSnapStrategy {
|
|
12
|
+
release(target) {
|
|
13
|
+
return nearestPoint(this._points, target, this._radius);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { TSettleSnapStrategy };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Что стратегия щелчка знает о жесте. Всё — доли хода ручки в направлении
|
|
3
|
+
* роста, как у владельца (`ISlidable`): 0 — у `min`, 1 — у `max`.
|
|
4
|
+
*/
|
|
5
|
+
export type TSlideSnapContext = {
|
|
6
|
+
/** Точки щелчка — доли меток по возрастанию, без повторов */
|
|
7
|
+
readonly points: readonly number[];
|
|
8
|
+
/** Радиус щелчка — доля хода: радиус в px на длину дорожки */
|
|
9
|
+
readonly radius: number;
|
|
10
|
+
/**
|
|
11
|
+
* Где ручка в начале жеста: у захвата — где она стоит, у нажатия мимо
|
|
12
|
+
* ручек — точка нажатия
|
|
13
|
+
*/
|
|
14
|
+
readonly anchor: number;
|
|
15
|
+
/** Сколько мс ручка стоит на пересечённой метке — у задержки (`hold`) */
|
|
16
|
+
readonly holdDelay: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Стратегия щелчка — одна на режим (`TSlideSnap`) и новая на каждый жест:
|
|
20
|
+
* у плато и задержки есть память жеста.
|
|
21
|
+
*
|
|
22
|
+
* Стратегия видит ручку, а не указатель. На входе — куда встала бы ручка без
|
|
23
|
+
* щелчка: указатель со смещением захвата. На выходе — куда ей встать. Не
|
|
24
|
+
* вмешалась — отдаёт вход как есть.
|
|
25
|
+
*/
|
|
26
|
+
export interface ISlideSnapStrategy {
|
|
27
|
+
/**
|
|
28
|
+
* Когда стратегии снова нужна ручка, хотя указатель стоит на месте, — конец
|
|
29
|
+
* стоянки на метке, мс по часам `performance.now()`. Ждать нечего —
|
|
30
|
+
* `undefined`
|
|
31
|
+
*/
|
|
32
|
+
readonly wakeAt: number | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Куда встать ручке. `target` — где она была бы без щелчка, `now` — время,
|
|
35
|
+
* мс по часам `performance.now()`
|
|
36
|
+
*/
|
|
37
|
+
follow(target: number, now: number): number;
|
|
38
|
+
/**
|
|
39
|
+
* Ручку отпустили там, где без щелчка она стояла бы в `target`: куда её
|
|
40
|
+
* довести. Оставить, где отпустили, — `undefined`
|
|
41
|
+
*/
|
|
42
|
+
release(target: number): number | undefined;
|
|
43
|
+
}
|
|
44
|
+
/** Конструктор стратегии: плагин заводит по нему стратегию на каждый жест. */
|
|
45
|
+
export type TSlideSnapStrategyCtor = new (context: TSlideSnapContext) => ISlideSnapStrategy;
|
|
46
|
+
/**
|
|
47
|
+
* Узел ломаной плато: где ручка была бы без щелчка → где она встаёт. Между
|
|
48
|
+
* узлами — прямая, на плато у двух соседних узлов одно и то же «встаёт».
|
|
49
|
+
*/
|
|
50
|
+
export type TPlateauKnot = readonly [target: number, placed: number];
|
|
51
|
+
/** Стоянка ручки на метке — у задержки. */
|
|
52
|
+
export type THoldStop = {
|
|
53
|
+
/** Метка, на которой стоит ручка */
|
|
54
|
+
readonly point: number;
|
|
55
|
+
/** До какого времени, мс по часам `performance.now()` */
|
|
56
|
+
readonly until: number;
|
|
57
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { TPluginEvents } from '../../../base';
|
|
2
|
+
import type { TSlideDirection } from '../types';
|
|
3
|
+
import type { ISlideSnapStrategy } from './strategies';
|
|
4
|
+
/**
|
|
5
|
+
* Своих событий у плагина нет: результат жеста виден через владельца —
|
|
6
|
+
* значение, `dragging` и `commit` сообщает он. Второй путь к тем же фактам
|
|
7
|
+
* через события плагина разошёлся бы с первым.
|
|
8
|
+
*/
|
|
9
|
+
export type TSlidePointerPluginEvents = TPluginEvents;
|
|
10
|
+
export interface ISlidePointerPluginOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Сколько мс ручка стоит на пересечённой метке в режиме щелчка `hold`,
|
|
13
|
+
* прежде чем догнать указатель. По умолчанию — 250: столько хватает, чтобы
|
|
14
|
+
* заметить остановку и отпустить ручку на метке, а тянуть дальше ещё не
|
|
15
|
+
* мешает.
|
|
16
|
+
*/
|
|
17
|
+
holdDelay?: number;
|
|
18
|
+
}
|
|
19
|
+
/** Жест, который ведёт плагин: от нажатия до отпускания. */
|
|
20
|
+
export type TSlidePointerGesture = {
|
|
21
|
+
/** `pointerId` указателя жеста: чужие указатели его не двигают */
|
|
22
|
+
pointer: number;
|
|
23
|
+
/** Дорожка: по её коробке указатель переводится в долю хода */
|
|
24
|
+
track: Element;
|
|
25
|
+
/** Направление роста — на весь жест, вычислено при нажатии */
|
|
26
|
+
direction: TSlideDirection;
|
|
27
|
+
/** Стратегия щелчка — по режиму владельца на момент нажатия */
|
|
28
|
+
snap: ISlideSnapStrategy;
|
|
29
|
+
/** Доля указателя при нажатии */
|
|
30
|
+
origin: number;
|
|
31
|
+
/**
|
|
32
|
+
* Доля ручки при нажатии: у захвата — где она стоит, у нажатия мимо ручек —
|
|
33
|
+
* точка нажатия. Без щелчка ручка сдвигается на столько же, на сколько
|
|
34
|
+
* указатель от `origin`
|
|
35
|
+
*/
|
|
36
|
+
anchor: number;
|
|
37
|
+
/** Последняя доля указателя */
|
|
38
|
+
at: number;
|
|
39
|
+
/**
|
|
40
|
+
* Куда плагин поставил ручку последним шагом. Щелчок отдал ту же долю —
|
|
41
|
+
* ядру сообщать нечего
|
|
42
|
+
*/
|
|
43
|
+
placed: number;
|
|
44
|
+
};
|
|
45
|
+
/** Начало жеста — то, что известно до того, как владелец его принял. */
|
|
46
|
+
export type TSlidePointerStart = Pick<TSlidePointerGesture, 'pointer' | 'track' | 'direction' | 'origin'>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Откуда растёт значение — сторона хода, у которой `min`.
|
|
3
|
+
*
|
|
4
|
+
* Одно понятие на указатель и клавиатуру (`SlideDirection` у Radix): ось,
|
|
5
|
+
* вычисленное направление письма и `inverted` сводятся в него один раз, и
|
|
6
|
+
* дальше плагины о них не спрашивают. По нему указатель переводит точку в
|
|
7
|
+
* долю хода, а клавиатура решает, какая стрелка ведёт к `min`.
|
|
8
|
+
*/
|
|
9
|
+
export type TSlideDirection = 'from-left' | 'from-right' | 'from-bottom' | 'from-top';
|
|
10
|
+
/** Точка указателя в координатах окна — то, что есть у `PointerEvent`. */
|
|
11
|
+
export type TSlidePoint = {
|
|
12
|
+
clientX: number;
|
|
13
|
+
clientY: number;
|
|
14
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TBasePlugin } from '../../../base';
|
|
2
|
+
import type { IPluginContext } from '../../../base';
|
|
3
|
+
/**
|
|
4
|
+
* TTableColumnIdsPlugin — имя заголовка колонки и её ручки в документе.
|
|
5
|
+
*
|
|
6
|
+
* Своё имя у заголовка браузер собрал бы из всего содержимого ячейки, а в ней
|
|
7
|
+
* стоят поле ручки ширины (`input type="range"`) и кнопка сортировки:
|
|
8
|
+
* значение встроенного контрола входит в имя (accname 1.2), и заголовок
|
|
9
|
+
* звался бы «Имя 150», а имя кнопки дописало бы к нему «Sort by Имя».
|
|
10
|
+
* Поэтому заголовок назван подписью явно — ссылкой на неё, — и той же
|
|
11
|
+
* ссылкой назван ползунок ручки: имя у обоих — ровно подпись колонки, без
|
|
12
|
+
* строк библиотеки.
|
|
13
|
+
*
|
|
14
|
+
* Всё — в наборах колонки: `id` — в `textAria` (он стоит на подписи), ссылка —
|
|
15
|
+
* в `aria` (на заголовке) и в `resizerAria` (на поле ручки). Формула одна,
|
|
16
|
+
* здесь.
|
|
17
|
+
*
|
|
18
|
+
* `id` — от монтирования заголовка (`createId`), а не от экземпляра: он нужен
|
|
19
|
+
* только документу, и на сервере и в браузере обязан совпасть. Колонку таблица
|
|
20
|
+
* рисует с готовым экземпляром (`ctrl`), и его конструктор адаптер не зовёт, а
|
|
21
|
+
* монтирование у неё своё. Пишется при установке, синхронно, — имя есть уже в
|
|
22
|
+
* первой (и серверной) отрисовке.
|
|
23
|
+
*/
|
|
24
|
+
export declare class TTableColumnIdsPlugin extends TBasePlugin {
|
|
25
|
+
install(ctx: IPluginContext): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { TBasePlugin } from "../../../base/base.class.js";
|
|
2
|
+
//#region src/custom/table/column-ids/column-ids.plugin.ts
|
|
3
|
+
/**
|
|
4
|
+
* TTableColumnIdsPlugin — имя заголовка колонки и её ручки в документе.
|
|
5
|
+
*
|
|
6
|
+
* Своё имя у заголовка браузер собрал бы из всего содержимого ячейки, а в ней
|
|
7
|
+
* стоят поле ручки ширины (`input type="range"`) и кнопка сортировки:
|
|
8
|
+
* значение встроенного контрола входит в имя (accname 1.2), и заголовок
|
|
9
|
+
* звался бы «Имя 150», а имя кнопки дописало бы к нему «Sort by Имя».
|
|
10
|
+
* Поэтому заголовок назван подписью явно — ссылкой на неё, — и той же
|
|
11
|
+
* ссылкой назван ползунок ручки: имя у обоих — ровно подпись колонки, без
|
|
12
|
+
* строк библиотеки.
|
|
13
|
+
*
|
|
14
|
+
* Всё — в наборах колонки: `id` — в `textAria` (он стоит на подписи), ссылка —
|
|
15
|
+
* в `aria` (на заголовке) и в `resizerAria` (на поле ручки). Формула одна,
|
|
16
|
+
* здесь.
|
|
17
|
+
*
|
|
18
|
+
* `id` — от монтирования заголовка (`createId`), а не от экземпляра: он нужен
|
|
19
|
+
* только документу, и на сервере и в браузере обязан совпасть. Колонку таблица
|
|
20
|
+
* рисует с готовым экземпляром (`ctrl`), и его конструктор адаптер не зовёт, а
|
|
21
|
+
* монтирование у неё своё. Пишется при установке, синхронно, — имя есть уже в
|
|
22
|
+
* первой (и серверной) отрисовке.
|
|
23
|
+
*/
|
|
24
|
+
var TTableColumnIdsPlugin = class extends TBasePlugin {
|
|
25
|
+
install(ctx) {
|
|
26
|
+
super.install(ctx);
|
|
27
|
+
const column = ctx.getInstance();
|
|
28
|
+
if (!column) return;
|
|
29
|
+
const textId = ctx.createId("text");
|
|
30
|
+
column.textAria.add("id", textId);
|
|
31
|
+
column.aria.add("aria-labelledby", textId);
|
|
32
|
+
column.resizerAria.add("aria-labelledby", textId);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { TTableColumnIdsPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './column-ids.plugin';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ITableColumn } from '@soxa-ui/core';
|
|
2
|
+
import { TNamesPlugin } from '../../../locale/names.plugin';
|
|
3
|
+
import type { TTranslations } from '../../../locale/types';
|
|
4
|
+
/**
|
|
5
|
+
* TTableColumnNamesPlugin — имя кнопки сортировки в заголовке колонки от
|
|
6
|
+
* локали: в `sortAria`, вместе с подписью колонки, как у крестика тега
|
|
7
|
+
* (`TTagsItemNamesPlugin`).
|
|
8
|
+
*
|
|
9
|
+
* Текста у кнопки нет — в ней одна стрелка, — а подпись колонки стоит рядом,
|
|
10
|
+
* вне кнопки: заголовок назван подписью (`TTableColumnIdsPlugin`), и имя
|
|
11
|
+
* кнопки в имя заголовка не входит. Ссылкой на подпись кнопку не называют:
|
|
12
|
+
* своя кнопка потребителя в слоте заголовка с тем же текстом дала бы два
|
|
13
|
+
* одинаковых имени.
|
|
14
|
+
*/
|
|
15
|
+
export declare class TTableColumnNamesPlugin extends TNamesPlugin<ITableColumn> {
|
|
16
|
+
protected _name(owner: ITableColumn, translations: TTranslations): void;
|
|
17
|
+
protected _watch(owner: ITableColumn, name: () => void): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { formatName } from "../../../locale/locale.js";
|
|
2
|
+
import { TNamesPlugin } from "../../../locale/names.plugin.js";
|
|
3
|
+
//#region src/custom/table/column-names/column-names.plugin.ts
|
|
4
|
+
/**
|
|
5
|
+
* TTableColumnNamesPlugin — имя кнопки сортировки в заголовке колонки от
|
|
6
|
+
* локали: в `sortAria`, вместе с подписью колонки, как у крестика тега
|
|
7
|
+
* (`TTagsItemNamesPlugin`).
|
|
8
|
+
*
|
|
9
|
+
* Текста у кнопки нет — в ней одна стрелка, — а подпись колонки стоит рядом,
|
|
10
|
+
* вне кнопки: заголовок назван подписью (`TTableColumnIdsPlugin`), и имя
|
|
11
|
+
* кнопки в имя заголовка не входит. Ссылкой на подпись кнопку не называют:
|
|
12
|
+
* своя кнопка потребителя в слоте заголовка с тем же текстом дала бы два
|
|
13
|
+
* одинаковых имени.
|
|
14
|
+
*/
|
|
15
|
+
var TTableColumnNamesPlugin = class extends TNamesPlugin {
|
|
16
|
+
_name(owner, translations) {
|
|
17
|
+
owner.sortAria.add("aria-label", formatName(translations.table.sort, owner.text));
|
|
18
|
+
}
|
|
19
|
+
_watch(owner, name) {
|
|
20
|
+
this._listenTo(owner.events, "change:text", name);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { TTableColumnNamesPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './column-names.plugin';
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { ITable } from '@soxa-ui/core';
|
|
2
|
+
import { TBasePlugin } from '../../../base';
|
|
3
|
+
import type { IPluginContext } from '../../../base';
|
|
4
|
+
import type { TTableColumnReorderPluginEvents } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* TTableColumnReorderPlugin — перестановка колонок пользователем: заголовок
|
|
7
|
+
* тащат указателем или сдвигают Ctrl+Shift+←/→.
|
|
8
|
+
*
|
|
9
|
+
* Операции над DOM — здесь, место колонки — у расширения `columns` коллекции
|
|
10
|
+
* строк: плагин переводит указатель и клавиши в его команды (`dragStart`,
|
|
11
|
+
* `dragOver`, `dragDrop`, `dragEnd`, `dragCancel`, `moveColumn`). Какую
|
|
12
|
+
* колонку можно взять, куда она встанет, какие метки получат колонки и что
|
|
13
|
+
* сообщить приложению, решает расширение. Движок плагин узнаёт от реестра
|
|
14
|
+
* bundles (`engine:bound`).
|
|
15
|
+
*
|
|
16
|
+
* **Заголовки** плагин находит в шапке своей таблицы — прямыми детьми, по
|
|
17
|
+
* классам владельца и колонки: заголовков таблица рисует по одному на
|
|
18
|
+
* показанную колонку и в её порядке, поэтому место заголовка в строке шапки —
|
|
19
|
+
* место колонки среди показанных. Колонку выбора и шапки вложенных таблиц
|
|
20
|
+
* поиск не видит.
|
|
21
|
+
*
|
|
22
|
+
* **Указатель** — на корне: нажатие на заголовке колонки, которую можно
|
|
23
|
+
* взять, становится жестом, когда указатель ушёл по строке дальше порога, —
|
|
24
|
+
* до этого оно остаётся нажатием, и кнопка сортировки сортирует. Нажатие,
|
|
25
|
+
* которое уже взяли (ручка ширины гасит своё), не наше. Жест захватывает
|
|
26
|
+
* указатель на корне: протяжка за таблицей и отпускание где угодно приходят
|
|
27
|
+
* сюда, а `click` отпускания до кнопки сортировки не доходит. Касание, в
|
|
28
|
+
* отличие от мыши, браузер с нажатия сам захватывает за узлом заголовка под
|
|
29
|
+
* пальцем, и начало жеста, перенося захват на корень, этот узел захвата
|
|
30
|
+
* лишает: его `lostpointercapture` всплывает до корня. Отнятым указатель
|
|
31
|
+
* считается, только когда захват потерял сам корень.
|
|
32
|
+
*
|
|
33
|
+
* Взяв колонку, плагин снимает коробки заголовков — относительно корня, один
|
|
34
|
+
* раз — и направление строки, а потом пишет ширину взятого
|
|
35
|
+
* (`--so-table-column-shift`) туда, где её читает тема: в `head` — шапке, в
|
|
36
|
+
* `column` — корню. На неё тема сдвигает соседей, которым расширение
|
|
37
|
+
* поставило `data-shift`. Место, куда колонка встанет, плагин считает по
|
|
38
|
+
* серединам остальных заголовков из снимка, а не из документа: сдвинутые
|
|
39
|
+
* соседи не двигают пороги, и место не прыгает, а прокрутку посреди жеста
|
|
40
|
+
* учитывает коробка корня. Взятый заголовок идёт за указателем — переменная
|
|
41
|
+
* сдвига на нём.
|
|
42
|
+
*
|
|
43
|
+
* В обработчике указателя — сначала чтения, потом записи: снимок,
|
|
44
|
+
* направление и место считаются, пока стиль и раскладка те, что в кадре.
|
|
45
|
+
* Чтение после записи заставило бы браузер пересчитать стиль синхронно,
|
|
46
|
+
* прямо в обработчике, а в кадре — ещё раз. Направление строки — из снимка:
|
|
47
|
+
* стиль на шагах жеста плагин не читает.
|
|
48
|
+
*
|
|
49
|
+
* **Шапка стоит** — таблица в `none` (`dragPreview` расширения на старте
|
|
50
|
+
* жеста): ширину взятого плагин не пишет никуда, а отпускание переставляет
|
|
51
|
+
* колонку сразу, `dragEnd` (отмена — `dragCancel`), без приземления — как
|
|
52
|
+
* до живого жеста. Остальное то же: снимок, место, заголовок за указателем.
|
|
53
|
+
*
|
|
54
|
+
* **Отпустили** — колонка не переставляется сразу: расширение замораживает
|
|
55
|
+
* место (`dragDrop`, `data-landing`), а кадром позже, когда метка уже в
|
|
56
|
+
* разметке, заголовок получает сдвиг до места, где встанет, и тема довозит
|
|
57
|
+
* его переходом. Доиграл переход заголовка — `dragEnd`: перестановка и снятие
|
|
58
|
+
* меток одной операцией, и переменные сняты тут же. К этому времени заголовки
|
|
59
|
+
* и ячейки стоят там, где их поставит новая раскладка, а переходы тема
|
|
60
|
+
* выключает вместе с жестом, — ничего не отъезжает. Без движения переходов
|
|
61
|
+
* нет, и колонка встаёт через кадр. Отнятый указатель (`pointercancel` или
|
|
62
|
+
* захват, потерянный корнем) и Escape — то же приземление на своё место и
|
|
63
|
+
* `dragCancel`. Сколько ждать, решает тема — плагин режима движения не читает.
|
|
64
|
+
*
|
|
65
|
+
* Нажатие и Ctrl+Shift+←/→, пришедшие, пока заголовок приземляется,
|
|
66
|
+
* доводят приземление сразу: следующее действие видит модель и шапку в одном
|
|
67
|
+
* порядке. Заголовок под ними плагин находит до доводки — после неё модель
|
|
68
|
+
* уже в новом порядке, а шапка ещё нет.
|
|
69
|
+
*
|
|
70
|
+
* **Клавиши** — Ctrl+Shift+←/→ на заголовке под фокусом (на кнопке
|
|
71
|
+
* сортировки и поле ручки, а в Grid — на самой ячейке): шаг к началу или к
|
|
72
|
+
* концу строки по вычисленному направлению письма, в RTL ← — к концу.
|
|
73
|
+
* Таблица перерисовывает шапку, и узел под фокусом браузер при переносе мог
|
|
74
|
+
* потерять — плагин возвращает ему фокус кадром позже.
|
|
75
|
+
*/
|
|
76
|
+
export declare class TTableColumnReorderPlugin extends TBasePlugin<ITable, TTableColumnReorderPluginEvents> {
|
|
77
|
+
private _owner;
|
|
78
|
+
private _root;
|
|
79
|
+
private _engine;
|
|
80
|
+
private _press;
|
|
81
|
+
private _landing;
|
|
82
|
+
private _frame;
|
|
83
|
+
install(ctx: IPluginContext): void;
|
|
84
|
+
destroy(): void;
|
|
85
|
+
private _attach;
|
|
86
|
+
private _detach;
|
|
87
|
+
/** Показанные колонки — по ним разложены заголовки шапки. */
|
|
88
|
+
private get _shown();
|
|
89
|
+
/** Шапка своей таблицы — прямой ребёнок корня: у вложенной таблицы своя. */
|
|
90
|
+
private _head;
|
|
91
|
+
/**
|
|
92
|
+
* Заголовки шапки своей таблицы — по одному на показанную колонку, в её
|
|
93
|
+
* порядке. Шапка ещё не дорисовала смену колонок — заголовков нет: место
|
|
94
|
+
* в строке не совпало бы с местом колонки.
|
|
95
|
+
*/
|
|
96
|
+
private _headers;
|
|
97
|
+
/** Заголовок, в котором лежит цель события, и его колонка. */
|
|
98
|
+
private _hit;
|
|
99
|
+
/** Коробки заголовков по строке — относительно корня: снимок на старте жеста. */
|
|
100
|
+
private _boxes;
|
|
101
|
+
/**
|
|
102
|
+
* Место среди показанных, куда встанет взятая колонка, — сколько остальных
|
|
103
|
+
* заголовков серединой стоят раньше указателя по строке. Середины — из
|
|
104
|
+
* снимка на старте жеста, от нынешнего края корня: заголовки, которые тема
|
|
105
|
+
* сдвинула, порогов не двигают. Свой заголовок не в счёт: он идёт за
|
|
106
|
+
* указателем. Направление строки — тоже из снимка: стиль здесь не читается.
|
|
107
|
+
*/
|
|
108
|
+
private _placeAt;
|
|
109
|
+
private readonly _onPointerDown;
|
|
110
|
+
private readonly _onPointerMove;
|
|
111
|
+
/**
|
|
112
|
+
* Колонку взяли. Сначала чтения — коробки заголовков (до сдвига взятого),
|
|
113
|
+
* направление строки и место под указателем, — потом записи: жест у
|
|
114
|
+
* расширения и ширина взятого там, где её читает тема (`_shiftHolder`).
|
|
115
|
+
* Шапка стоит (`still`, таблица в `none`) — ширины нет: соседям сдвигаться
|
|
116
|
+
* не на что. Заголовков нет или колонку не дали взять — жеста нет.
|
|
117
|
+
*/
|
|
118
|
+
private _takeGesture;
|
|
119
|
+
/**
|
|
120
|
+
* Узел для ширины взятого — там, где её читает тема: в `head` — шапка, в
|
|
121
|
+
* `column` — корень, от которого её наследует и тело. На корне большой
|
|
122
|
+
* таблицы запись пересчитала бы стиль каждой ячейке тела, а в `head` тело
|
|
123
|
+
* стоит. В `none` соседям сдвигаться не на что — узла нет.
|
|
124
|
+
*/
|
|
125
|
+
private _shiftHolder;
|
|
126
|
+
private readonly _onPointerUp;
|
|
127
|
+
/** Браузер отнял указатель — колонка возвращается на место. */
|
|
128
|
+
private readonly _onPointerCancel;
|
|
129
|
+
/**
|
|
130
|
+
* Захват потерял корень — указатель у него отняли, и жест кончен, как от
|
|
131
|
+
* `pointercancel`. Узел под пальцем теряет захват и посреди жеста: касание
|
|
132
|
+
* браузер сам захватывает за ним, а начало жеста переносит захват на
|
|
133
|
+
* корень. Это событие всплывает до корня, но жест не кончает — указатель
|
|
134
|
+
* по-прежнему у корня.
|
|
135
|
+
*/
|
|
136
|
+
private readonly _onLostCapture;
|
|
137
|
+
/** Escape посреди жеста — отмена. Слушается на документе: фокус бывает вне таблицы. */
|
|
138
|
+
private readonly _onEscape;
|
|
139
|
+
/**
|
|
140
|
+
* Закончить нажатие: отпустили — заголовок приземляется на место, куда
|
|
141
|
+
* колонку принесли, отмена — на своё, и соседи возвращаются. Коллекцию
|
|
142
|
+
* переставит конец приземления.
|
|
143
|
+
*/
|
|
144
|
+
private _release;
|
|
145
|
+
/**
|
|
146
|
+
* Заголовок — на место: кадром позже, когда `data-landing` уже в разметке
|
|
147
|
+
* и тема ведёт его переходом, — так же сдвиг отпущенной панели снимает
|
|
148
|
+
* `TSwipePlugin`. Конец — когда заголовок доиграл свои переходы.
|
|
149
|
+
*/
|
|
150
|
+
private _land;
|
|
151
|
+
/** Заголовок встал: колонка — на место, метки и переменные сняты. */
|
|
152
|
+
private _landed;
|
|
153
|
+
/** Довести приземление сразу — без кадра и без ожидания переходов. */
|
|
154
|
+
private _finishLanding;
|
|
155
|
+
/**
|
|
156
|
+
* Корень ушёл: жест и приземление — прочь без перестановки, ожидания и
|
|
157
|
+
* кадры сняты.
|
|
158
|
+
*/
|
|
159
|
+
private _abort;
|
|
160
|
+
/** Снять сдвиги жеста: у взятого заголовка и ширину взятого — с узла, которому её записали. */
|
|
161
|
+
private _clearVariables;
|
|
162
|
+
private readonly _onKeyDown;
|
|
163
|
+
/**
|
|
164
|
+
* Фокус — тому же узлу после перерисовки шапки: переставленный заголовок
|
|
165
|
+
* браузер переносит в документе, и узел под фокусом при этом его теряет.
|
|
166
|
+
*/
|
|
167
|
+
private _keepFocus;
|
|
168
|
+
private _cancelFrame;
|
|
169
|
+
}
|