@ng-matero/extensions 12.5.3 → 13.0.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/README.md +2 -16
- package/_all-color.scss +1 -1
- package/_all-theme.scss +2 -0
- package/_index.scss +3 -1
- package/_theming.scss +3 -1
- package/alert/_alert-theme.scss +2 -2
- package/alert/alert.component.d.ts +3 -0
- package/alert/alert.module.d.ts +6 -0
- package/alert/mtxAlert.d.ts +1 -0
- package/alert/package.json +5 -6
- package/button/button-loading.directive.d.ts +3 -0
- package/button/button.module.d.ts +8 -0
- package/button/mtxButton.d.ts +1 -0
- package/button/package.json +5 -6
- package/checkbox-group/checkbox-group.component.d.ts +3 -0
- package/checkbox-group/checkbox-group.module.d.ts +9 -0
- package/checkbox-group/mtxCheckboxGroup.d.ts +1 -0
- package/checkbox-group/package.json +5 -6
- package/colorpicker/_colorpicker-theme.import.scss +2 -0
- package/colorpicker/_colorpicker-theme.scss +43 -0
- package/colorpicker/colorpicker-animations.d.ts +8 -0
- package/colorpicker/colorpicker-content.scss +4 -0
- package/colorpicker/colorpicker-input.d.ts +92 -0
- package/colorpicker/colorpicker-module.d.ts +15 -0
- package/colorpicker/colorpicker-toggle.d.ts +38 -0
- package/colorpicker/colorpicker-toggle.scss +23 -0
- package/colorpicker/colorpicker.d.ts +131 -0
- package/{extensions.d.ts → colorpicker/mtxColorpicker.d.ts} +1 -0
- package/colorpicker/package.json +10 -0
- package/colorpicker/public-api.d.ts +5 -0
- package/column-resize/column-resize-directives/column-resize-flex.d.ts +3 -0
- package/column-resize/column-resize-directives/column-resize.d.ts +3 -0
- package/column-resize/column-resize-module.d.ts +6 -7
- package/column-resize/column-resize-notifier.d.ts +5 -7
- package/column-resize/column-resize.d.ts +3 -0
- package/column-resize/column-size-store.d.ts +3 -7
- package/column-resize/event-dispatcher.d.ts +3 -0
- package/column-resize/mtxColumnResize.d.ts +1 -0
- package/column-resize/overlay-handle.d.ts +3 -0
- package/column-resize/package.json +5 -6
- package/column-resize/resizable.d.ts +3 -0
- package/column-resize/resize-strategy.d.ts +7 -0
- package/core/datetime/datetime.module.d.ts +8 -0
- package/core/datetime/native-datetime-adapter.d.ts +3 -0
- package/core/density/private/_compatibility.scss +74 -0
- package/core/mtxCore.d.ts +1 -0
- package/core/package.json +5 -6
- package/{pipes/public-api.d.ts → core/pipes/index.d.ts} +0 -0
- package/core/pipes/pipes.module.d.ts +8 -0
- package/{pipes → core/pipes}/to-observable.pipe.d.ts +3 -0
- package/core/public-api.d.ts +1 -0
- package/core/style/_elevation.scss +197 -0
- package/core/style/_private.scss +41 -0
- package/core/style/_variables.scss +44 -0
- package/core/style/_vendor-prefixes.scss +60 -0
- package/core/theming/_palette.scss +746 -0
- package/core/theming/_theming.scss +430 -0
- package/core/typography/_typography-utils.scss +101 -0
- package/core/typography/_typography.scss +273 -0
- package/datetimepicker/_datetimepicker-theme.scss +17 -5
- package/datetimepicker/calendar-body.d.ts +3 -0
- package/datetimepicker/calendar-body.scss +5 -4
- package/datetimepicker/calendar.d.ts +6 -11
- package/datetimepicker/clock.d.ts +13 -9
- package/datetimepicker/datetimepicker-animations.d.ts +7 -5
- package/datetimepicker/datetimepicker-input.d.ts +7 -2
- package/datetimepicker/datetimepicker-module.d.ts +20 -0
- package/datetimepicker/datetimepicker-toggle.d.ts +20 -2
- package/datetimepicker/datetimepicker-toggle.scss +23 -0
- package/datetimepicker/datetimepicker-types.d.ts +1 -0
- package/datetimepicker/datetimepicker.d.ts +73 -25
- package/datetimepicker/month-view.d.ts +7 -4
- package/datetimepicker/mtxDatetimepicker.d.ts +1 -2
- package/datetimepicker/multi-year-view.d.ts +7 -4
- package/datetimepicker/package.json +5 -6
- package/datetimepicker/public-api.d.ts +4 -1
- package/datetimepicker/year-view.d.ts +7 -4
- package/dialog/{dialog.config.d.ts → dialog-config.d.ts} +0 -0
- package/dialog/dialog.component.d.ts +4 -1
- package/dialog/dialog.d.ts +4 -1
- package/dialog/dialog.module.d.ts +10 -0
- package/dialog/mtxDialog.d.ts +1 -0
- package/dialog/package.json +5 -6
- package/dialog/public-api.d.ts +2 -2
- package/esm2020/alert/alert.component.mjs +52 -0
- package/esm2020/alert/alert.module.mjs +18 -0
- package/{esm2015/alert/mtxAlert.js → esm2020/alert/mtxAlert.mjs} +0 -0
- package/{esm2015/alert/public-api.js → esm2020/alert/public-api.mjs} +0 -0
- package/esm2020/button/button-loading.directive.mjs +79 -0
- package/esm2020/button/button.module.mjs +20 -0
- package/{esm2015/button/mtxButton.js → esm2020/button/mtxButton.mjs} +0 -0
- package/{esm2015/button/public-api.js → esm2020/button/public-api.mjs} +0 -0
- package/esm2020/checkbox-group/checkbox-group.component.mjs +234 -0
- package/{esm2015/checkbox-group/checkbox-group.interface.js → esm2020/checkbox-group/checkbox-group.interface.mjs} +0 -0
- package/esm2020/checkbox-group/checkbox-group.module.mjs +21 -0
- package/{esm2015/checkbox-group/mtxCheckboxGroup.js → esm2020/checkbox-group/mtxCheckboxGroup.mjs} +0 -0
- package/{esm2015/checkbox-group/public-api.js → esm2020/checkbox-group/public-api.mjs} +0 -0
- package/esm2020/colorpicker/colorpicker-animations.mjs +16 -0
- package/esm2020/colorpicker/colorpicker-input.mjs +228 -0
- package/esm2020/colorpicker/colorpicker-module.mjs +65 -0
- package/esm2020/colorpicker/colorpicker-toggle.mjs +90 -0
- package/esm2020/colorpicker/colorpicker.mjs +363 -0
- package/esm2020/colorpicker/mtxColorpicker.mjs +5 -0
- package/esm2020/colorpicker/public-api.mjs +6 -0
- package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +45 -0
- package/esm2020/column-resize/column-resize-directives/column-resize.mjs +45 -0
- package/{esm2015/column-resize/column-resize-directives/constants.js → esm2020/column-resize/column-resize-directives/constants.mjs} +0 -0
- package/esm2020/column-resize/column-resize-module.mjs +28 -0
- package/esm2020/column-resize/column-resize-notifier.mjs +47 -0
- package/esm2020/column-resize/column-resize.mjs +82 -0
- package/esm2020/column-resize/column-size-store.mjs +20 -0
- package/esm2020/column-resize/event-dispatcher.mjs +67 -0
- package/{esm2015/column-resize/mtxColumnResize.js → esm2020/column-resize/mtxColumnResize.mjs} +0 -0
- package/esm2020/column-resize/overlay-handle.mjs +146 -0
- package/{esm2015/column-resize/polyfill.js → esm2020/column-resize/polyfill.mjs} +0 -0
- package/{esm2015/column-resize/public-api.js → esm2020/column-resize/public-api.mjs} +0 -0
- package/esm2020/column-resize/resizable.mjs +199 -0
- package/{esm2015/column-resize/resize-ref.js → esm2020/column-resize/resize-ref.mjs} +0 -0
- package/esm2020/column-resize/resize-strategy.mjs +232 -0
- package/{esm2015/column-resize/selectors.js → esm2020/column-resize/selectors.mjs} +0 -0
- package/{esm2015/core/datetime/datetime-adapter.js → esm2020/core/datetime/datetime-adapter.mjs} +0 -0
- package/{esm2015/core/datetime/datetime-formats.js → esm2020/core/datetime/datetime-formats.mjs} +0 -0
- package/esm2020/core/datetime/datetime.module.mjs +42 -0
- package/{esm2015/core/datetime/index.js → esm2020/core/datetime/index.mjs} +0 -0
- package/esm2020/core/datetime/native-datetime-adapter.mjs +138 -0
- package/{esm2015/core/datetime/native-datetime-formats.js → esm2020/core/datetime/native-datetime-formats.mjs} +0 -0
- package/{esm2015/core/mtxCore.js → esm2020/core/mtxCore.mjs} +0 -0
- package/esm2020/core/pipes/index.mjs +3 -0
- package/esm2020/core/pipes/pipes.module.mjs +18 -0
- package/esm2020/core/pipes/to-observable.pipe.mjs +15 -0
- package/{esm2015/core/public-api.js → esm2020/core/public-api.mjs} +2 -1
- package/esm2020/datetimepicker/calendar-body.mjs +78 -0
- package/esm2020/datetimepicker/calendar.mjs +618 -0
- package/esm2020/datetimepicker/clock.mjs +277 -0
- package/esm2020/datetimepicker/datetimepicker-animations.mjs +44 -0
- package/{esm2015/datetimepicker/datetimepicker-errors.js → esm2020/datetimepicker/datetimepicker-errors.mjs} +0 -0
- package/{esm2015/datetimepicker/datetimepicker-filtertype.js → esm2020/datetimepicker/datetimepicker-filtertype.mjs} +0 -0
- package/esm2020/datetimepicker/datetimepicker-input.mjs +344 -0
- package/esm2020/datetimepicker/datetimepicker-module.mjs +75 -0
- package/esm2020/datetimepicker/datetimepicker-toggle.mjs +94 -0
- package/esm2020/datetimepicker/datetimepicker-types.mjs +2 -0
- package/esm2020/datetimepicker/datetimepicker.mjs +492 -0
- package/esm2020/datetimepicker/month-view.mjs +148 -0
- package/esm2020/datetimepicker/mtxDatetimepicker.mjs +5 -0
- package/esm2020/datetimepicker/multi-year-view.mjs +214 -0
- package/esm2020/datetimepicker/public-api.mjs +14 -0
- package/esm2020/datetimepicker/year-view.mjs +138 -0
- package/{esm2015/dialog/dialog.config.js → esm2020/dialog/dialog-config.mjs} +1 -1
- package/esm2020/dialog/dialog.component.mjs +33 -0
- package/esm2020/dialog/dialog.mjs +74 -0
- package/esm2020/dialog/dialog.module.mjs +24 -0
- package/{esm2015/dialog/mtxDialog.js → esm2020/dialog/mtxDialog.mjs} +0 -0
- package/esm2020/dialog/public-api.mjs +5 -0
- package/esm2020/form-group/form-group.component.mjs +37 -0
- package/esm2020/form-group/form-group.module.mjs +18 -0
- package/{esm2015/form-group/mtxFormGroup.js → esm2020/form-group/mtxFormGroup.mjs} +0 -0
- package/{esm2015/form-group/public-api.js → esm2020/form-group/public-api.mjs} +0 -0
- package/esm2020/grid/cell.component.mjs +108 -0
- package/esm2020/grid/column-menu.component.mjs +95 -0
- package/esm2020/grid/column-resize/column-resize-directives/column-resize-flex.mjs +37 -0
- package/esm2020/grid/column-resize/column-resize-directives/column-resize.mjs +37 -0
- package/{esm2015/grid/column-resize/column-resize-directives/common.js → esm2020/grid/column-resize/column-resize-directives/common.mjs} +0 -0
- package/esm2020/grid/column-resize/column-resize-module.mjs +42 -0
- package/esm2020/grid/column-resize/overlay-handle.mjs +60 -0
- package/{esm2015/grid/column-resize/resizable-directives/common.js → esm2020/grid/column-resize/resizable-directives/common.mjs} +0 -0
- package/esm2020/grid/column-resize/resizable-directives/resizable.mjs +62 -0
- package/esm2020/grid/column-resize/resize-strategy.mjs +42 -0
- package/esm2020/grid/expansion-toggle.directive.mjs +64 -0
- package/esm2020/grid/grid.component.mjs +556 -0
- package/{esm2015/grid/grid.interface.js → esm2020/grid/grid.interface.mjs} +0 -0
- package/esm2020/grid/grid.module.mjs +117 -0
- package/esm2020/grid/grid.service.mjs +44 -0
- package/{esm2015/grid/mtxGrid.js → esm2020/grid/mtxGrid.mjs} +0 -0
- package/esm2020/grid/public-api.mjs +16 -0
- package/esm2020/loader/loader.component.mjs +63 -0
- package/esm2020/loader/loader.module.mjs +20 -0
- package/{esm2015/loader/mtxLoader.js → esm2020/loader/mtxLoader.mjs} +0 -0
- package/{esm2015/loader/public-api.js → esm2020/loader/public-api.mjs} +0 -0
- package/esm2020/ng-matero-extensions.mjs +5 -0
- package/{esm2015/popover/mtxPopover.js → esm2020/popover/mtxPopover.mjs} +0 -0
- package/{esm2015/popover/popover-animations.js → esm2020/popover/popover-animations.mjs} +0 -0
- package/{esm2015/popover/popover-errors.js → esm2020/popover/popover-errors.mjs} +0 -0
- package/{esm2015/popover/popover-interfaces.js → esm2020/popover/popover-interfaces.mjs} +0 -0
- package/esm2020/popover/popover-module.mjs +22 -0
- package/esm2020/popover/popover-target.mjs +17 -0
- package/esm2020/popover/popover-trigger.mjs +441 -0
- package/{esm2015/popover/popover-types.js → esm2020/popover/popover-types.mjs} +0 -0
- package/esm2020/popover/popover.mjs +334 -0
- package/{esm2015/popover/public-api.js → esm2020/popover/public-api.mjs} +0 -0
- package/{esm2015/progress/mtxProgress.js → esm2020/progress/mtxProgress.mjs} +0 -0
- package/esm2020/progress/progress.component.mjs +55 -0
- package/esm2020/progress/progress.module.mjs +18 -0
- package/{esm2015/progress/public-api.js → esm2020/progress/public-api.mjs} +0 -0
- package/esm2020/public-api.mjs +5 -0
- package/{esm2015/select/mtxSelect.js → esm2020/select/mtxSelect.mjs} +0 -0
- package/{esm2015/select/option.component.js → esm2020/select/option.component.mjs} +18 -26
- package/{esm2015/select/public-api.js → esm2020/select/public-api.mjs} +0 -0
- package/esm2020/select/select.component.mjs +458 -0
- package/esm2020/select/select.module.mjs +74 -0
- package/esm2020/select/templates.directive.mjs +124 -0
- package/{esm2015/slider/mtxSlider.js → esm2020/slider/mtxSlider.mjs} +0 -0
- package/{esm2015/slider/public-api.js → esm2020/slider/public-api.mjs} +0 -0
- package/esm2020/slider/slider-module.mjs +19 -0
- package/esm2020/slider/slider.mjs +1115 -0
- package/{esm2015/split/interface.js → esm2020/split/interface.mjs} +0 -0
- package/{esm2015/split/mtxSplit.js → esm2020/split/mtxSplit.mjs} +0 -0
- package/{esm2015/split/public-api.js → esm2020/split/public-api.mjs} +0 -0
- package/esm2020/split/split-pane.directive.mjs +149 -0
- package/esm2020/split/split.component.mjs +619 -0
- package/esm2020/split/split.module.mjs +19 -0
- package/esm2020/split/utils.mjs +222 -0
- package/{esm2015/text3d/mtxText3d.js → esm2020/text3d/mtxText3d.mjs} +0 -0
- package/{esm2015/text3d/public-api.js → esm2020/text3d/public-api.mjs} +0 -0
- package/esm2020/text3d/text3d.component.mjs +45 -0
- package/esm2020/text3d/text3d.module.mjs +18 -0
- package/{esm2015/tooltip/mtxTooltip.js → esm2020/tooltip/mtxTooltip.mjs} +0 -0
- package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
- package/{esm2015/tooltip/tooltip-animations.js → esm2020/tooltip/tooltip-animations.mjs} +0 -0
- package/esm2020/tooltip/tooltip-module.mjs +23 -0
- package/esm2020/tooltip/tooltip.mjs +674 -0
- package/fesm2015/mtxAlert.mjs +74 -0
- package/fesm2015/mtxAlert.mjs.map +1 -0
- package/fesm2015/mtxButton.mjs +102 -0
- package/fesm2015/mtxButton.mjs.map +1 -0
- package/fesm2015/mtxCheckboxGroup.mjs +257 -0
- package/fesm2015/mtxCheckboxGroup.mjs.map +1 -0
- package/fesm2015/mtxColorpicker.mjs +754 -0
- package/fesm2015/mtxColorpicker.mjs.map +1 -0
- package/fesm2015/{mtxColumnResize.js → mtxColumnResize.mjs} +108 -145
- package/fesm2015/mtxColumnResize.mjs.map +1 -0
- package/fesm2015/mtxCore.mjs +362 -0
- package/fesm2015/mtxCore.mjs.map +1 -0
- package/fesm2015/mtxDatetimepicker.mjs +2474 -0
- package/fesm2015/mtxDatetimepicker.mjs.map +1 -0
- package/fesm2015/mtxDialog.mjs +128 -0
- package/fesm2015/mtxDialog.mjs.map +1 -0
- package/fesm2015/mtxFormGroup.mjs +59 -0
- package/fesm2015/mtxFormGroup.mjs.map +1 -0
- package/fesm2015/mtxGrid.mjs +1271 -0
- package/fesm2015/mtxGrid.mjs.map +1 -0
- package/fesm2015/mtxLoader.mjs +87 -0
- package/fesm2015/mtxLoader.mjs.map +1 -0
- package/fesm2015/mtxPopover.mjs +865 -0
- package/fesm2015/mtxPopover.mjs.map +1 -0
- package/fesm2015/mtxProgress.mjs +77 -0
- package/fesm2015/mtxProgress.mjs.map +1 -0
- package/fesm2015/mtxSelect.mjs +712 -0
- package/fesm2015/mtxSelect.mjs.map +1 -0
- package/fesm2015/mtxSlider.mjs +1139 -0
- package/fesm2015/mtxSlider.mjs.map +1 -0
- package/fesm2015/{mtxSplit.js → mtxSplit.mjs} +85 -98
- package/fesm2015/mtxSplit.mjs.map +1 -0
- package/fesm2015/mtxText3d.mjs +67 -0
- package/fesm2015/mtxText3d.mjs.map +1 -0
- package/fesm2015/{mtxTooltip.js → mtxTooltip.mjs} +85 -86
- package/fesm2015/mtxTooltip.mjs.map +1 -0
- package/fesm2015/ng-matero-extensions.mjs +9 -0
- package/fesm2015/ng-matero-extensions.mjs.map +1 -0
- package/fesm2020/mtxAlert.mjs +74 -0
- package/fesm2020/mtxAlert.mjs.map +1 -0
- package/fesm2020/mtxButton.mjs +102 -0
- package/fesm2020/mtxButton.mjs.map +1 -0
- package/fesm2020/mtxCheckboxGroup.mjs +257 -0
- package/fesm2020/mtxCheckboxGroup.mjs.map +1 -0
- package/fesm2020/mtxColorpicker.mjs +750 -0
- package/fesm2020/mtxColorpicker.mjs.map +1 -0
- package/fesm2020/mtxColumnResize.mjs +953 -0
- package/fesm2020/mtxColumnResize.mjs.map +1 -0
- package/{fesm2015/mtxCore.js → fesm2020/mtxCore.mjs} +75 -42
- package/fesm2020/mtxCore.mjs.map +1 -0
- package/fesm2020/mtxDatetimepicker.mjs +2462 -0
- package/fesm2020/mtxDatetimepicker.mjs.map +1 -0
- package/fesm2020/mtxDialog.mjs +129 -0
- package/fesm2020/mtxDialog.mjs.map +1 -0
- package/fesm2020/mtxFormGroup.mjs +59 -0
- package/fesm2020/mtxFormGroup.mjs.map +1 -0
- package/fesm2020/mtxGrid.mjs +1259 -0
- package/fesm2020/mtxGrid.mjs.map +1 -0
- package/fesm2020/mtxLoader.mjs +87 -0
- package/fesm2020/mtxLoader.mjs.map +1 -0
- package/{fesm2015/mtxPopover.js → fesm2020/mtxPopover.mjs} +120 -111
- package/fesm2020/mtxPopover.mjs.map +1 -0
- package/fesm2020/mtxProgress.mjs +77 -0
- package/fesm2020/mtxProgress.mjs.map +1 -0
- package/fesm2020/mtxSelect.mjs +709 -0
- package/fesm2020/mtxSelect.mjs.map +1 -0
- package/{fesm2015/mtxSlider.js → fesm2020/mtxSlider.mjs} +97 -94
- package/fesm2020/mtxSlider.mjs.map +1 -0
- package/fesm2020/mtxSplit.mjs +1007 -0
- package/fesm2020/mtxSplit.mjs.map +1 -0
- package/fesm2020/mtxText3d.mjs +67 -0
- package/fesm2020/mtxText3d.mjs.map +1 -0
- package/fesm2020/mtxTooltip.mjs +718 -0
- package/fesm2020/mtxTooltip.mjs.map +1 -0
- package/fesm2020/ng-matero-extensions.mjs +9 -0
- package/fesm2020/ng-matero-extensions.mjs.map +1 -0
- package/form-group/_form-group-theme.scss +1 -1
- package/form-group/form-group.component.d.ts +5 -4
- package/form-group/form-group.module.d.ts +6 -0
- package/form-group/mtxFormGroup.d.ts +1 -0
- package/form-group/package.json +5 -6
- package/grid/_grid-theme.scss +1 -1
- package/grid/cell.component.d.ts +3 -0
- package/grid/column-menu.component.d.ts +3 -0
- package/grid/column-menu.component.scss +1 -1
- package/grid/column-resize/_column-resize.scss +3 -3
- package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +3 -0
- package/grid/column-resize/column-resize-directives/column-resize.d.ts +3 -0
- package/grid/column-resize/column-resize-module.d.ts +12 -7
- package/grid/column-resize/overlay-handle.d.ts +3 -0
- package/grid/column-resize/resizable-directives/resizable.d.ts +3 -0
- package/grid/column-resize/resize-strategy.d.ts +3 -0
- package/grid/expansion-toggle.directive.d.ts +3 -0
- package/grid/grid.component.d.ts +20 -1
- package/grid/grid.module.d.ts +26 -0
- package/grid/grid.service.d.ts +3 -0
- package/grid/mtxGrid.d.ts +1 -0
- package/grid/package.json +5 -6
- package/grid/public-api.d.ts +0 -1
- package/loader/_loader-theme.scss +1 -1
- package/loader/loader.component.d.ts +7 -1
- package/loader/loader.module.d.ts +8 -0
- package/loader/mtxLoader.d.ts +1 -0
- package/loader/package.json +5 -6
- package/{color-picker/mtxColorPicker.d.ts → ng-matero-extensions.d.ts} +1 -0
- package/package.json +178 -15
- package/popover/_popover-theme.scss +1 -1
- package/popover/mtxPopover.d.ts +1 -0
- package/popover/package.json +5 -6
- package/popover/popover-module.d.ts +10 -0
- package/popover/popover-target.d.ts +3 -0
- package/popover/popover-trigger.d.ts +3 -0
- package/popover/popover.d.ts +3 -0
- package/progress/_progress-theme.scss +2 -2
- package/progress/mtxProgress.d.ts +1 -0
- package/progress/package.json +5 -6
- package/progress/progress.component.d.ts +3 -0
- package/progress/progress.module.d.ts +6 -0
- package/public-api.d.ts +2 -19
- package/select/_select-theme.scss +1 -1
- package/select/mtxSelect.d.ts +1 -0
- package/select/option.component.d.ts +3 -0
- package/select/package.json +5 -6
- package/select/select.component.d.ts +3 -0
- package/select/select.component.scss +1 -1
- package/select/select.module.d.ts +10 -0
- package/select/templates.directive.d.ts +23 -0
- package/slider/_slider-theme.scss +4 -4
- package/slider/mtxSlider.d.ts +1 -0
- package/slider/package.json +5 -6
- package/slider/slider-module.d.ts +7 -0
- package/slider/slider.d.ts +4 -1
- package/slider/slider.scss +7 -7
- package/split/_split-theme.scss +10 -3
- package/split/mtxSplit.d.ts +1 -0
- package/split/package.json +5 -6
- package/split/split-pane.directive.d.ts +3 -0
- package/split/split.component.d.ts +12 -1
- package/split/split.module.d.ts +7 -0
- package/text3d/_text3d-theme.scss +2 -2
- package/text3d/mtxText3d.d.ts +1 -0
- package/text3d/package.json +5 -6
- package/text3d/text3d.component.d.ts +3 -1
- package/text3d/text3d.module.d.ts +6 -0
- package/tooltip/_tooltip-theme.scss +3 -3
- package/tooltip/mtxTooltip.d.ts +1 -0
- package/tooltip/package.json +5 -6
- package/tooltip/tooltip-module.d.ts +10 -0
- package/tooltip/tooltip.d.ts +5 -0
- package/tooltip/tooltip.scss +1 -1
- package/alert/mtxAlert.metadata.json +0 -1
- package/bundles/extensions.umd.js +0 -164
- package/bundles/extensions.umd.js.map +0 -1
- package/bundles/mtxAlert.umd.js +0 -101
- package/bundles/mtxAlert.umd.js.map +0 -1
- package/bundles/mtxButton.umd.js +0 -119
- package/bundles/mtxButton.umd.js.map +0 -1
- package/bundles/mtxCheckboxGroup.umd.js +0 -284
- package/bundles/mtxCheckboxGroup.umd.js.map +0 -1
- package/bundles/mtxColorPicker.umd.js +0 -337
- package/bundles/mtxColorPicker.umd.js.map +0 -1
- package/bundles/mtxColumnResize.umd.js +0 -1339
- package/bundles/mtxColumnResize.umd.js.map +0 -1
- package/bundles/mtxCore.umd.js +0 -670
- package/bundles/mtxCore.umd.js.map +0 -1
- package/bundles/mtxDatetimepicker.umd.js +0 -2590
- package/bundles/mtxDatetimepicker.umd.js.map +0 -1
- package/bundles/mtxDialog.umd.js +0 -160
- package/bundles/mtxDialog.umd.js.map +0 -1
- package/bundles/mtxFormGroup.umd.js +0 -80
- package/bundles/mtxFormGroup.umd.js.map +0 -1
- package/bundles/mtxGrid.umd.js +0 -1581
- package/bundles/mtxGrid.umd.js.map +0 -1
- package/bundles/mtxLoader.umd.js +0 -104
- package/bundles/mtxLoader.umd.js.map +0 -1
- package/bundles/mtxPipes.umd.js +0 -44
- package/bundles/mtxPipes.umd.js.map +0 -1
- package/bundles/mtxPopover.umd.js +0 -1260
- package/bundles/mtxPopover.umd.js.map +0 -1
- package/bundles/mtxProgress.umd.js +0 -92
- package/bundles/mtxProgress.umd.js.map +0 -1
- package/bundles/mtxSelect.umd.js +0 -1097
- package/bundles/mtxSelect.umd.js.map +0 -1
- package/bundles/mtxSlider.umd.js +0 -1551
- package/bundles/mtxSlider.umd.js.map +0 -1
- package/bundles/mtxSplit.umd.js +0 -1432
- package/bundles/mtxSplit.umd.js.map +0 -1
- package/bundles/mtxText3d.umd.js +0 -92
- package/bundles/mtxText3d.umd.js.map +0 -1
- package/bundles/mtxTooltip.umd.js +0 -1081
- package/bundles/mtxTooltip.umd.js.map +0 -1
- package/button/mtxButton.metadata.json +0 -1
- package/checkbox-group/mtxCheckboxGroup.metadata.json +0 -1
- package/color-picker/color-picker.component.d.ts +0 -120
- package/color-picker/color-picker.module.d.ts +0 -2
- package/color-picker/mtxColorPicker.metadata.json +0 -1
- package/color-picker/package.json +0 -11
- package/color-picker/public-api.d.ts +0 -2
- package/column-resize/mtxColumnResize.metadata.json +0 -1
- package/core/mtxCore.metadata.json +0 -1
- package/datetimepicker/datetimepicker.module.d.ts +0 -2
- package/datetimepicker/mtxDatetimepicker.metadata.json +0 -1
- package/dialog/mtxDialog.metadata.json +0 -1
- package/esm2015/alert/alert.component.js +0 -63
- package/esm2015/alert/alert.module.js +0 -14
- package/esm2015/button/button-loading.directive.js +0 -89
- package/esm2015/button/button.module.js +0 -16
- package/esm2015/checkbox-group/checkbox-group.component.js +0 -235
- package/esm2015/checkbox-group/checkbox-group.module.js +0 -17
- package/esm2015/color-picker/color-picker.component.js +0 -268
- package/esm2015/color-picker/color-picker.module.js +0 -26
- package/esm2015/color-picker/mtxColorPicker.js +0 -5
- package/esm2015/color-picker/public-api.js +0 -3
- package/esm2015/column-resize/column-resize-directives/column-resize-flex.js +0 -54
- package/esm2015/column-resize/column-resize-directives/column-resize.js +0 -54
- package/esm2015/column-resize/column-resize-module.js +0 -24
- package/esm2015/column-resize/column-resize-notifier.js +0 -54
- package/esm2015/column-resize/column-resize.js +0 -80
- package/esm2015/column-resize/column-size-store.js +0 -18
- package/esm2015/column-resize/event-dispatcher.js +0 -75
- package/esm2015/column-resize/overlay-handle.js +0 -144
- package/esm2015/column-resize/resizable.js +0 -197
- package/esm2015/column-resize/resize-strategy.js +0 -245
- package/esm2015/core/datetime/datetime.module.js +0 -32
- package/esm2015/core/datetime/native-datetime-adapter.js +0 -144
- package/esm2015/datetimepicker/calendar-body.js +0 -75
- package/esm2015/datetimepicker/calendar.js +0 -629
- package/esm2015/datetimepicker/clock.js +0 -283
- package/esm2015/datetimepicker/datetimepicker-animations.js +0 -30
- package/esm2015/datetimepicker/datetimepicker-input.js +0 -333
- package/esm2015/datetimepicker/datetimepicker-toggle.js +0 -81
- package/esm2015/datetimepicker/datetimepicker.js +0 -411
- package/esm2015/datetimepicker/datetimepicker.module.js +0 -49
- package/esm2015/datetimepicker/month-view.js +0 -149
- package/esm2015/datetimepicker/mtxDatetimepicker.js +0 -7
- package/esm2015/datetimepicker/multi-year-view.js +0 -214
- package/esm2015/datetimepicker/public-api.js +0 -11
- package/esm2015/datetimepicker/year-view.js +0 -140
- package/esm2015/dialog/dialog.component.js +0 -40
- package/esm2015/dialog/dialog.js +0 -81
- package/esm2015/dialog/dialog.module.js +0 -21
- package/esm2015/dialog/public-api.js +0 -5
- package/esm2015/extensions-experimental.module.js +0 -13
- package/esm2015/extensions.js +0 -5
- package/esm2015/extensions.module.js +0 -40
- package/esm2015/form-group/form-group.component.js +0 -47
- package/esm2015/form-group/form-group.module.js +0 -14
- package/esm2015/grid/cell-selection.directive.js +0 -62
- package/esm2015/grid/cell.component.js +0 -115
- package/esm2015/grid/column-menu.component.js +0 -72
- package/esm2015/grid/column-resize/column-resize-directives/column-resize-flex.js +0 -47
- package/esm2015/grid/column-resize/column-resize-directives/column-resize.js +0 -47
- package/esm2015/grid/column-resize/column-resize-module.js +0 -36
- package/esm2015/grid/column-resize/overlay-handle.js +0 -68
- package/esm2015/grid/column-resize/resizable-directives/resizable.js +0 -75
- package/esm2015/grid/column-resize/resize-strategy.js +0 -45
- package/esm2015/grid/expansion-toggle.directive.js +0 -62
- package/esm2015/grid/grid.component.js +0 -418
- package/esm2015/grid/grid.module.js +0 -69
- package/esm2015/grid/grid.service.js +0 -50
- package/esm2015/grid/public-api.js +0 -17
- package/esm2015/loader/loader.component.js +0 -66
- package/esm2015/loader/loader.module.js +0 -16
- package/esm2015/pipes/mtxPipes.js +0 -5
- package/esm2015/pipes/pipes.module.js +0 -14
- package/esm2015/pipes/public-api.js +0 -3
- package/esm2015/pipes/to-observable.pipe.js +0 -12
- package/esm2015/popover/popover-module.js +0 -18
- package/esm2015/popover/popover-target.js +0 -24
- package/esm2015/popover/popover-trigger.js +0 -434
- package/esm2015/popover/popover.js +0 -326
- package/esm2015/progress/progress.component.js +0 -54
- package/esm2015/progress/progress.module.js +0 -14
- package/esm2015/public-api.js +0 -23
- package/esm2015/select/select.component.js +0 -380
- package/esm2015/select/select.module.js +0 -46
- package/esm2015/select/templates.directive.js +0 -211
- package/esm2015/slider/slider-module.js +0 -15
- package/esm2015/slider/slider.js +0 -1115
- package/esm2015/split/split-pane.directive.js +0 -156
- package/esm2015/split/split.component.js +0 -622
- package/esm2015/split/split.module.js +0 -15
- package/esm2015/split/utils.js +0 -227
- package/esm2015/text3d/text3d.component.js +0 -53
- package/esm2015/text3d/text3d.module.js +0 -14
- package/esm2015/tooltip/tooltip-module.js +0 -20
- package/esm2015/tooltip/tooltip.js +0 -681
- package/extensions-experimental.module.d.ts +0 -2
- package/extensions.metadata.json +0 -1
- package/extensions.module.d.ts +0 -2
- package/fesm2015/extensions.js +0 -80
- package/fesm2015/extensions.js.map +0 -1
- package/fesm2015/mtxAlert.js +0 -82
- package/fesm2015/mtxAlert.js.map +0 -1
- package/fesm2015/mtxButton.js +0 -108
- package/fesm2015/mtxButton.js.map +0 -1
- package/fesm2015/mtxCheckboxGroup.js +0 -255
- package/fesm2015/mtxCheckboxGroup.js.map +0 -1
- package/fesm2015/mtxColorPicker.js +0 -295
- package/fesm2015/mtxColorPicker.js.map +0 -1
- package/fesm2015/mtxColumnResize.js.map +0 -1
- package/fesm2015/mtxCore.js.map +0 -1
- package/fesm2015/mtxDatetimepicker.js +0 -2355
- package/fesm2015/mtxDatetimepicker.js.map +0 -1
- package/fesm2015/mtxDialog.js +0 -141
- package/fesm2015/mtxDialog.js.map +0 -1
- package/fesm2015/mtxFormGroup.js +0 -66
- package/fesm2015/mtxFormGroup.js.map +0 -1
- package/fesm2015/mtxGrid.js +0 -1186
- package/fesm2015/mtxGrid.js.map +0 -1
- package/fesm2015/mtxLoader.js +0 -87
- package/fesm2015/mtxLoader.js.map +0 -1
- package/fesm2015/mtxPipes.js +0 -31
- package/fesm2015/mtxPipes.js.map +0 -1
- package/fesm2015/mtxPopover.js.map +0 -1
- package/fesm2015/mtxProgress.js +0 -73
- package/fesm2015/mtxProgress.js.map +0 -1
- package/fesm2015/mtxSelect.js +0 -700
- package/fesm2015/mtxSelect.js.map +0 -1
- package/fesm2015/mtxSlider.js.map +0 -1
- package/fesm2015/mtxSplit.js.map +0 -1
- package/fesm2015/mtxText3d.js +0 -72
- package/fesm2015/mtxText3d.js.map +0 -1
- package/fesm2015/mtxTooltip.js.map +0 -1
- package/form-group/mtxFormGroup.metadata.json +0 -1
- package/grid/cell-selection.directive.d.ts +0 -17
- package/grid/mtxGrid.metadata.json +0 -1
- package/loader/mtxLoader.metadata.json +0 -1
- package/pipes/mtxPipes.d.ts +0 -4
- package/pipes/mtxPipes.metadata.json +0 -1
- package/pipes/package.json +0 -11
- package/pipes/pipes.module.d.ts +0 -2
- package/popover/mtxPopover.metadata.json +0 -1
- package/progress/mtxProgress.metadata.json +0 -1
- package/select/mtxSelect.metadata.json +0 -1
- package/slider/mtxSlider.metadata.json +0 -1
- package/split/mtxSplit.metadata.json +0 -1
- package/text3d/mtxText3d.metadata.json +0 -1
- package/tooltip/mtxTooltip.metadata.json +0 -1
package/bundles/mtxSplit.umd.js
DELETED
|
@@ -1,1432 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rxjs'), require('rxjs/operators')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@ng-matero/extensions/split', ['exports', '@angular/core', '@angular/common', 'rxjs', 'rxjs/operators'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["ng-matero"] = global["ng-matero"] || {}, global["ng-matero"].extensions = global["ng-matero"].extensions || {}, global["ng-matero"].extensions.split = {}), global.ng.core, global.ng.common, global.rxjs, global.rxjs.operators));
|
|
5
|
-
})(this, (function (exports, core, common, rxjs, operators) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function getPointFromEvent(event) {
|
|
8
|
-
// TouchEvent
|
|
9
|
-
if (event.changedTouches !== undefined &&
|
|
10
|
-
event.changedTouches.length > 0) {
|
|
11
|
-
return {
|
|
12
|
-
x: event.changedTouches[0].clientX,
|
|
13
|
-
y: event.changedTouches[0].clientY,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
// MouseEvent
|
|
17
|
-
// eslint-disable-next-line brace-style
|
|
18
|
-
else if (event.clientX !== undefined &&
|
|
19
|
-
event.clientY !== undefined) {
|
|
20
|
-
return {
|
|
21
|
-
x: event.clientX,
|
|
22
|
-
y: event.clientY,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
function getElementPixelSize(elRef, direction) {
|
|
28
|
-
var rect = elRef.nativeElement.getBoundingClientRect();
|
|
29
|
-
return direction === 'horizontal' ? rect.width : rect.height;
|
|
30
|
-
}
|
|
31
|
-
function getInputBoolean(v) {
|
|
32
|
-
return typeof v === 'boolean' ? v : v === 'false' ? false : true;
|
|
33
|
-
}
|
|
34
|
-
function getInputPositiveNumber(v, defaultValue) {
|
|
35
|
-
if (v === null || v === undefined) {
|
|
36
|
-
return defaultValue;
|
|
37
|
-
}
|
|
38
|
-
v = Number(v);
|
|
39
|
-
return !isNaN(v) && v >= 0 ? v : defaultValue;
|
|
40
|
-
}
|
|
41
|
-
function isUserSizesValid(unit, sizes) {
|
|
42
|
-
// All sizes have to be not null and total should be 100
|
|
43
|
-
if (unit === 'percent') {
|
|
44
|
-
var total = sizes.reduce(function (_total, s) { return (s !== null ? _total + s : _total); }, 0);
|
|
45
|
-
return sizes.every(function (s) { return s !== null; }) && total && total > 99.9 && total < 100.1;
|
|
46
|
-
}
|
|
47
|
-
// A size at null is mandatory but only one.
|
|
48
|
-
if (unit === 'pixel') {
|
|
49
|
-
return sizes.filter(function (s) { return s === null; }).length === 1;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function getAreaMinSize(a) {
|
|
53
|
-
if (a.size === null) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
if (a.component.lockSize === true) {
|
|
57
|
-
return a.size;
|
|
58
|
-
}
|
|
59
|
-
if (a.component.minSize === null) {
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
if (a.component.minSize > a.size) {
|
|
63
|
-
return a.size;
|
|
64
|
-
}
|
|
65
|
-
return a.component.minSize;
|
|
66
|
-
}
|
|
67
|
-
function getAreaMaxSize(a) {
|
|
68
|
-
if (a.size === null) {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
if (a.component.lockSize === true) {
|
|
72
|
-
return a.size;
|
|
73
|
-
}
|
|
74
|
-
if (a.component.maxSize === null) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
if (a.component.maxSize < a.size) {
|
|
78
|
-
return a.size;
|
|
79
|
-
}
|
|
80
|
-
return a.component.maxSize;
|
|
81
|
-
}
|
|
82
|
-
function getGutterSideAbsorptionCapacity(unit, sideAreas, pixels, allAreasSizePixel) {
|
|
83
|
-
return sideAreas.reduce(function (acc, area) {
|
|
84
|
-
var res = getAreaAbsorptionCapacity(unit, area, acc.remain, allAreasSizePixel);
|
|
85
|
-
acc.list.push(res);
|
|
86
|
-
acc.remain = res && res.pixelRemain;
|
|
87
|
-
return acc;
|
|
88
|
-
}, { remain: pixels, list: [] });
|
|
89
|
-
}
|
|
90
|
-
function getAreaAbsorptionCapacity(unit, areaSnapshot, pixels, allAreasSizePixel) {
|
|
91
|
-
// No pain no gain
|
|
92
|
-
if (pixels === 0) {
|
|
93
|
-
return {
|
|
94
|
-
areaSnapshot: areaSnapshot,
|
|
95
|
-
pixelAbsorb: 0,
|
|
96
|
-
percentAfterAbsorption: areaSnapshot.sizePercentAtStart,
|
|
97
|
-
pixelRemain: 0,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
// Area start at zero and need to be reduced, not possible
|
|
101
|
-
if (areaSnapshot.sizePixelAtStart === 0 && pixels < 0) {
|
|
102
|
-
return {
|
|
103
|
-
areaSnapshot: areaSnapshot,
|
|
104
|
-
pixelAbsorb: 0,
|
|
105
|
-
percentAfterAbsorption: 0,
|
|
106
|
-
pixelRemain: pixels,
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
if (unit === 'percent') {
|
|
110
|
-
return getAreaAbsorptionCapacityPercent(areaSnapshot, pixels, allAreasSizePixel);
|
|
111
|
-
}
|
|
112
|
-
if (unit === 'pixel') {
|
|
113
|
-
return getAreaAbsorptionCapacityPixel(areaSnapshot, pixels, allAreasSizePixel);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function getAreaAbsorptionCapacityPercent(areaSnapshot, pixels, allAreasSizePixel) {
|
|
117
|
-
var tempPixelSize = areaSnapshot.sizePixelAtStart + pixels;
|
|
118
|
-
var tempPercentSize = (tempPixelSize / allAreasSizePixel) * 100;
|
|
119
|
-
// ENLARGE AREA
|
|
120
|
-
if (pixels > 0) {
|
|
121
|
-
// If maxSize & newSize bigger than it > absorb to max and return remaining pixels
|
|
122
|
-
if (areaSnapshot.area.maxSize !== null && tempPercentSize > areaSnapshot.area.maxSize) {
|
|
123
|
-
// Use area.area.maxSize as newPercentSize and return calculate pixels remaining
|
|
124
|
-
var maxSizePixel = (areaSnapshot.area.maxSize / 100) * allAreasSizePixel;
|
|
125
|
-
return {
|
|
126
|
-
areaSnapshot: areaSnapshot,
|
|
127
|
-
pixelAbsorb: maxSizePixel,
|
|
128
|
-
percentAfterAbsorption: areaSnapshot.area.maxSize,
|
|
129
|
-
pixelRemain: areaSnapshot.sizePixelAtStart + pixels - maxSizePixel,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
areaSnapshot: areaSnapshot,
|
|
134
|
-
pixelAbsorb: pixels,
|
|
135
|
-
percentAfterAbsorption: tempPercentSize > 100 ? 100 : tempPercentSize,
|
|
136
|
-
pixelRemain: 0,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
// REDUCE AREA
|
|
140
|
-
// eslint-disable-next-line brace-style
|
|
141
|
-
else if (pixels < 0) {
|
|
142
|
-
// If minSize & newSize smaller than it > absorb to min and return remaining pixels
|
|
143
|
-
if (areaSnapshot.area.minSize !== null && tempPercentSize < areaSnapshot.area.minSize) {
|
|
144
|
-
// Use area.area.minSize as newPercentSize and return calculate pixels remaining
|
|
145
|
-
var minSizePixel = (areaSnapshot.area.minSize / 100) * allAreasSizePixel;
|
|
146
|
-
return {
|
|
147
|
-
areaSnapshot: areaSnapshot,
|
|
148
|
-
pixelAbsorb: minSizePixel,
|
|
149
|
-
percentAfterAbsorption: areaSnapshot.area.minSize,
|
|
150
|
-
pixelRemain: areaSnapshot.sizePixelAtStart + pixels - minSizePixel,
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
// If reduced under zero > return remaining pixels
|
|
154
|
-
// eslint-disable-next-line brace-style
|
|
155
|
-
else if (tempPercentSize < 0) {
|
|
156
|
-
// Use 0 as newPercentSize and return calculate pixels remaining
|
|
157
|
-
return {
|
|
158
|
-
areaSnapshot: areaSnapshot,
|
|
159
|
-
pixelAbsorb: -areaSnapshot.sizePixelAtStart,
|
|
160
|
-
percentAfterAbsorption: 0,
|
|
161
|
-
pixelRemain: pixels + areaSnapshot.sizePixelAtStart,
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
return {
|
|
165
|
-
areaSnapshot: areaSnapshot,
|
|
166
|
-
pixelAbsorb: pixels,
|
|
167
|
-
percentAfterAbsorption: tempPercentSize,
|
|
168
|
-
pixelRemain: 0,
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
function getAreaAbsorptionCapacityPixel(areaSnapshot, pixels, containerSizePixel) {
|
|
173
|
-
var tempPixelSize = areaSnapshot.sizePixelAtStart + pixels;
|
|
174
|
-
// ENLARGE AREA
|
|
175
|
-
if (pixels > 0) {
|
|
176
|
-
// If maxSize & newSize bigger than it > absorb to max and return remaining pixels
|
|
177
|
-
if (areaSnapshot.area.maxSize !== null && tempPixelSize > areaSnapshot.area.maxSize) {
|
|
178
|
-
return {
|
|
179
|
-
areaSnapshot: areaSnapshot,
|
|
180
|
-
pixelAbsorb: areaSnapshot.area.maxSize - areaSnapshot.sizePixelAtStart,
|
|
181
|
-
percentAfterAbsorption: -1,
|
|
182
|
-
pixelRemain: tempPixelSize - areaSnapshot.area.maxSize,
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
return {
|
|
186
|
-
areaSnapshot: areaSnapshot,
|
|
187
|
-
pixelAbsorb: pixels,
|
|
188
|
-
percentAfterAbsorption: -1,
|
|
189
|
-
pixelRemain: 0,
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
// REDUCE AREA
|
|
193
|
-
// eslint-disable-next-line brace-style
|
|
194
|
-
else if (pixels < 0) {
|
|
195
|
-
// If minSize & newSize smaller than it > absorb to min and return remaining pixels
|
|
196
|
-
if (areaSnapshot.area.minSize !== null && tempPixelSize < areaSnapshot.area.minSize) {
|
|
197
|
-
return {
|
|
198
|
-
areaSnapshot: areaSnapshot,
|
|
199
|
-
pixelAbsorb: areaSnapshot.area.minSize + pixels - tempPixelSize,
|
|
200
|
-
percentAfterAbsorption: -1,
|
|
201
|
-
pixelRemain: tempPixelSize - areaSnapshot.area.minSize,
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
// If reduced under zero > return remaining pixels
|
|
205
|
-
// eslint-disable-next-line brace-style
|
|
206
|
-
else if (tempPixelSize < 0) {
|
|
207
|
-
return {
|
|
208
|
-
areaSnapshot: areaSnapshot,
|
|
209
|
-
pixelAbsorb: -areaSnapshot.sizePixelAtStart,
|
|
210
|
-
percentAfterAbsorption: -1,
|
|
211
|
-
pixelRemain: pixels + areaSnapshot.sizePixelAtStart,
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
return {
|
|
215
|
-
areaSnapshot: areaSnapshot,
|
|
216
|
-
pixelAbsorb: pixels,
|
|
217
|
-
percentAfterAbsorption: -1,
|
|
218
|
-
pixelRemain: 0,
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
function updateAreaSize(unit, item) {
|
|
223
|
-
if (unit === 'percent') {
|
|
224
|
-
item.areaSnapshot.area.size = item.percentAfterAbsorption;
|
|
225
|
-
}
|
|
226
|
-
else if (unit === 'pixel') {
|
|
227
|
-
// Update size except for the wildcard size area
|
|
228
|
-
if (item.areaSnapshot.area.size !== null) {
|
|
229
|
-
item.areaSnapshot.area.size = item.areaSnapshot.sizePixelAtStart + item.pixelAbsorb;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/*! *****************************************************************************
|
|
235
|
-
Copyright (c) Microsoft Corporation.
|
|
236
|
-
|
|
237
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
238
|
-
purpose with or without fee is hereby granted.
|
|
239
|
-
|
|
240
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
241
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
242
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
243
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
244
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
245
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
246
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
247
|
-
***************************************************************************** */
|
|
248
|
-
/* global Reflect, Promise */
|
|
249
|
-
var extendStatics = function (d, b) {
|
|
250
|
-
extendStatics = Object.setPrototypeOf ||
|
|
251
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
252
|
-
function (d, b) { for (var p in b)
|
|
253
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
254
|
-
d[p] = b[p]; };
|
|
255
|
-
return extendStatics(d, b);
|
|
256
|
-
};
|
|
257
|
-
function __extends(d, b) {
|
|
258
|
-
if (typeof b !== "function" && b !== null)
|
|
259
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
260
|
-
extendStatics(d, b);
|
|
261
|
-
function __() { this.constructor = d; }
|
|
262
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
263
|
-
}
|
|
264
|
-
var __assign = function () {
|
|
265
|
-
__assign = Object.assign || function __assign(t) {
|
|
266
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
267
|
-
s = arguments[i];
|
|
268
|
-
for (var p in s)
|
|
269
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
270
|
-
t[p] = s[p];
|
|
271
|
-
}
|
|
272
|
-
return t;
|
|
273
|
-
};
|
|
274
|
-
return __assign.apply(this, arguments);
|
|
275
|
-
};
|
|
276
|
-
function __rest(s, e) {
|
|
277
|
-
var t = {};
|
|
278
|
-
for (var p in s)
|
|
279
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
280
|
-
t[p] = s[p];
|
|
281
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
282
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
283
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
284
|
-
t[p[i]] = s[p[i]];
|
|
285
|
-
}
|
|
286
|
-
return t;
|
|
287
|
-
}
|
|
288
|
-
function __decorate(decorators, target, key, desc) {
|
|
289
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
290
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
291
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
292
|
-
else
|
|
293
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
294
|
-
if (d = decorators[i])
|
|
295
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
296
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
297
|
-
}
|
|
298
|
-
function __param(paramIndex, decorator) {
|
|
299
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
300
|
-
}
|
|
301
|
-
function __metadata(metadataKey, metadataValue) {
|
|
302
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
303
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
304
|
-
}
|
|
305
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
306
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
307
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
308
|
-
function fulfilled(value) { try {
|
|
309
|
-
step(generator.next(value));
|
|
310
|
-
}
|
|
311
|
-
catch (e) {
|
|
312
|
-
reject(e);
|
|
313
|
-
} }
|
|
314
|
-
function rejected(value) { try {
|
|
315
|
-
step(generator["throw"](value));
|
|
316
|
-
}
|
|
317
|
-
catch (e) {
|
|
318
|
-
reject(e);
|
|
319
|
-
} }
|
|
320
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
321
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
function __generator(thisArg, body) {
|
|
325
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
326
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
327
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
328
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
329
|
-
function step(op) {
|
|
330
|
-
if (f)
|
|
331
|
-
throw new TypeError("Generator is already executing.");
|
|
332
|
-
while (_)
|
|
333
|
-
try {
|
|
334
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
335
|
-
return t;
|
|
336
|
-
if (y = 0, t)
|
|
337
|
-
op = [op[0] & 2, t.value];
|
|
338
|
-
switch (op[0]) {
|
|
339
|
-
case 0:
|
|
340
|
-
case 1:
|
|
341
|
-
t = op;
|
|
342
|
-
break;
|
|
343
|
-
case 4:
|
|
344
|
-
_.label++;
|
|
345
|
-
return { value: op[1], done: false };
|
|
346
|
-
case 5:
|
|
347
|
-
_.label++;
|
|
348
|
-
y = op[1];
|
|
349
|
-
op = [0];
|
|
350
|
-
continue;
|
|
351
|
-
case 7:
|
|
352
|
-
op = _.ops.pop();
|
|
353
|
-
_.trys.pop();
|
|
354
|
-
continue;
|
|
355
|
-
default:
|
|
356
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
357
|
-
_ = 0;
|
|
358
|
-
continue;
|
|
359
|
-
}
|
|
360
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
361
|
-
_.label = op[1];
|
|
362
|
-
break;
|
|
363
|
-
}
|
|
364
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
365
|
-
_.label = t[1];
|
|
366
|
-
t = op;
|
|
367
|
-
break;
|
|
368
|
-
}
|
|
369
|
-
if (t && _.label < t[2]) {
|
|
370
|
-
_.label = t[2];
|
|
371
|
-
_.ops.push(op);
|
|
372
|
-
break;
|
|
373
|
-
}
|
|
374
|
-
if (t[2])
|
|
375
|
-
_.ops.pop();
|
|
376
|
-
_.trys.pop();
|
|
377
|
-
continue;
|
|
378
|
-
}
|
|
379
|
-
op = body.call(thisArg, _);
|
|
380
|
-
}
|
|
381
|
-
catch (e) {
|
|
382
|
-
op = [6, e];
|
|
383
|
-
y = 0;
|
|
384
|
-
}
|
|
385
|
-
finally {
|
|
386
|
-
f = t = 0;
|
|
387
|
-
}
|
|
388
|
-
if (op[0] & 5)
|
|
389
|
-
throw op[1];
|
|
390
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
394
|
-
if (k2 === undefined)
|
|
395
|
-
k2 = k;
|
|
396
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
397
|
-
}) : (function (o, m, k, k2) {
|
|
398
|
-
if (k2 === undefined)
|
|
399
|
-
k2 = k;
|
|
400
|
-
o[k2] = m[k];
|
|
401
|
-
});
|
|
402
|
-
function __exportStar(m, o) {
|
|
403
|
-
for (var p in m)
|
|
404
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
405
|
-
__createBinding(o, m, p);
|
|
406
|
-
}
|
|
407
|
-
function __values(o) {
|
|
408
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
409
|
-
if (m)
|
|
410
|
-
return m.call(o);
|
|
411
|
-
if (o && typeof o.length === "number")
|
|
412
|
-
return {
|
|
413
|
-
next: function () {
|
|
414
|
-
if (o && i >= o.length)
|
|
415
|
-
o = void 0;
|
|
416
|
-
return { value: o && o[i++], done: !o };
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
420
|
-
}
|
|
421
|
-
function __read(o, n) {
|
|
422
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
423
|
-
if (!m)
|
|
424
|
-
return o;
|
|
425
|
-
var i = m.call(o), r, ar = [], e;
|
|
426
|
-
try {
|
|
427
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
428
|
-
ar.push(r.value);
|
|
429
|
-
}
|
|
430
|
-
catch (error) {
|
|
431
|
-
e = { error: error };
|
|
432
|
-
}
|
|
433
|
-
finally {
|
|
434
|
-
try {
|
|
435
|
-
if (r && !r.done && (m = i["return"]))
|
|
436
|
-
m.call(i);
|
|
437
|
-
}
|
|
438
|
-
finally {
|
|
439
|
-
if (e)
|
|
440
|
-
throw e.error;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
return ar;
|
|
444
|
-
}
|
|
445
|
-
/** @deprecated */
|
|
446
|
-
function __spread() {
|
|
447
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
448
|
-
ar = ar.concat(__read(arguments[i]));
|
|
449
|
-
return ar;
|
|
450
|
-
}
|
|
451
|
-
/** @deprecated */
|
|
452
|
-
function __spreadArrays() {
|
|
453
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
454
|
-
s += arguments[i].length;
|
|
455
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
456
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
457
|
-
r[k] = a[j];
|
|
458
|
-
return r;
|
|
459
|
-
}
|
|
460
|
-
function __spreadArray(to, from, pack) {
|
|
461
|
-
if (pack || arguments.length === 2)
|
|
462
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
463
|
-
if (ar || !(i in from)) {
|
|
464
|
-
if (!ar)
|
|
465
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
466
|
-
ar[i] = from[i];
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
return to.concat(ar || from);
|
|
470
|
-
}
|
|
471
|
-
function __await(v) {
|
|
472
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
473
|
-
}
|
|
474
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
475
|
-
if (!Symbol.asyncIterator)
|
|
476
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
477
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
478
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
479
|
-
function verb(n) { if (g[n])
|
|
480
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
481
|
-
function resume(n, v) { try {
|
|
482
|
-
step(g[n](v));
|
|
483
|
-
}
|
|
484
|
-
catch (e) {
|
|
485
|
-
settle(q[0][3], e);
|
|
486
|
-
} }
|
|
487
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
488
|
-
function fulfill(value) { resume("next", value); }
|
|
489
|
-
function reject(value) { resume("throw", value); }
|
|
490
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
491
|
-
resume(q[0][0], q[0][1]); }
|
|
492
|
-
}
|
|
493
|
-
function __asyncDelegator(o) {
|
|
494
|
-
var i, p;
|
|
495
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
496
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
497
|
-
}
|
|
498
|
-
function __asyncValues(o) {
|
|
499
|
-
if (!Symbol.asyncIterator)
|
|
500
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
501
|
-
var m = o[Symbol.asyncIterator], i;
|
|
502
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
503
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
504
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
505
|
-
}
|
|
506
|
-
function __makeTemplateObject(cooked, raw) {
|
|
507
|
-
if (Object.defineProperty) {
|
|
508
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
509
|
-
}
|
|
510
|
-
else {
|
|
511
|
-
cooked.raw = raw;
|
|
512
|
-
}
|
|
513
|
-
return cooked;
|
|
514
|
-
}
|
|
515
|
-
;
|
|
516
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
517
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
518
|
-
}) : function (o, v) {
|
|
519
|
-
o["default"] = v;
|
|
520
|
-
};
|
|
521
|
-
function __importStar(mod) {
|
|
522
|
-
if (mod && mod.__esModule)
|
|
523
|
-
return mod;
|
|
524
|
-
var result = {};
|
|
525
|
-
if (mod != null)
|
|
526
|
-
for (var k in mod)
|
|
527
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
528
|
-
__createBinding(result, mod, k);
|
|
529
|
-
__setModuleDefault(result, mod);
|
|
530
|
-
return result;
|
|
531
|
-
}
|
|
532
|
-
function __importDefault(mod) {
|
|
533
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
534
|
-
}
|
|
535
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
536
|
-
if (kind === "a" && !f)
|
|
537
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
538
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
539
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
540
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
541
|
-
}
|
|
542
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
543
|
-
if (kind === "m")
|
|
544
|
-
throw new TypeError("Private method is not writable");
|
|
545
|
-
if (kind === "a" && !f)
|
|
546
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
547
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
548
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
549
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* mtx-split
|
|
554
|
-
*
|
|
555
|
-
*
|
|
556
|
-
* PERCENT MODE ([unit]="'percent'")
|
|
557
|
-
* ___________________________________________________________________________________________
|
|
558
|
-
* | A [g1] B [g2] C [g3] D [g4] E |
|
|
559
|
-
* |-------------------------------------------------------------------------------------------|
|
|
560
|
-
* | 20 30 20 15 15 | <-- [size]="x"
|
|
561
|
-
* | 10px 10px 10px 10px | <-- [gutterSize]="10"
|
|
562
|
-
* |calc(20% - 8px) calc(30% - 12px) calc(20% - 8px) calc(15% - 6px) calc(15% - 6px)| <-- CSS flex-basis property (with flex-grow&shrink at 0)
|
|
563
|
-
* | 152px 228px 152px 114px 114px | <-- el.getBoundingClientRect().width
|
|
564
|
-
* |___________________________________________________________________________________________|
|
|
565
|
-
* 800px <-- el.getBoundingClientRect().width
|
|
566
|
-
* flex-basis = calc( { area.size }% - { area.size/100 * nbGutter*gutterSize }px );
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
* PIXEL MODE ([unit]="'pixel'")
|
|
570
|
-
* ___________________________________________________________________________________________
|
|
571
|
-
* | A [g1] B [g2] C [g3] D [g4] E |
|
|
572
|
-
* |-------------------------------------------------------------------------------------------|
|
|
573
|
-
* | 100 250 * 150 100 | <-- [size]="y"
|
|
574
|
-
* | 10px 10px 10px 10px | <-- [gutterSize]="10"
|
|
575
|
-
* | 0 0 100px 0 0 250px 1 1 auto 0 0 150px 0 0 100px | <-- CSS flex property (flex-grow/flex-shrink/flex-basis)
|
|
576
|
-
* | 100px 250px 200px 150px 100px | <-- el.getBoundingClientRect().width
|
|
577
|
-
* |___________________________________________________________________________________________|
|
|
578
|
-
* 800px <-- el.getBoundingClientRect().width
|
|
579
|
-
*
|
|
580
|
-
*/
|
|
581
|
-
var MtxSplitComponent = /** @class */ (function () {
|
|
582
|
-
function MtxSplitComponent(ngZone, elRef, cdRef, renderer) {
|
|
583
|
-
this.ngZone = ngZone;
|
|
584
|
-
this.elRef = elRef;
|
|
585
|
-
this.cdRef = cdRef;
|
|
586
|
-
this.renderer = renderer;
|
|
587
|
-
this._direction = 'horizontal';
|
|
588
|
-
////
|
|
589
|
-
this._unit = 'percent';
|
|
590
|
-
////
|
|
591
|
-
this._gutterSize = 4;
|
|
592
|
-
////
|
|
593
|
-
this._gutterStep = 1;
|
|
594
|
-
////
|
|
595
|
-
this._restrictMove = false;
|
|
596
|
-
////
|
|
597
|
-
this._useTransition = false;
|
|
598
|
-
////
|
|
599
|
-
this._disabled = false;
|
|
600
|
-
////
|
|
601
|
-
this._dir = 'ltr';
|
|
602
|
-
////
|
|
603
|
-
this._gutterDblClickDuration = 0;
|
|
604
|
-
////
|
|
605
|
-
this.dragStart = new core.EventEmitter(false);
|
|
606
|
-
this.dragEnd = new core.EventEmitter(false);
|
|
607
|
-
this.gutterClick = new core.EventEmitter(false);
|
|
608
|
-
this.gutterDblClick = new core.EventEmitter(false);
|
|
609
|
-
this.dragProgressSubject = new rxjs.Subject();
|
|
610
|
-
this.dragProgress$ = this.dragProgressSubject.asObservable();
|
|
611
|
-
////
|
|
612
|
-
this.isDragging = false;
|
|
613
|
-
this.dragListeners = [];
|
|
614
|
-
this.snapshot = null;
|
|
615
|
-
this.startPoint = null;
|
|
616
|
-
this.endPoint = null;
|
|
617
|
-
this.displayedAreas = [];
|
|
618
|
-
this.hidedAreas = [];
|
|
619
|
-
this._clickTimeout = null;
|
|
620
|
-
// To force adding default class, could be override by user @Input() or not
|
|
621
|
-
this.direction = this._direction;
|
|
622
|
-
}
|
|
623
|
-
Object.defineProperty(MtxSplitComponent.prototype, "direction", {
|
|
624
|
-
get: function () {
|
|
625
|
-
return this._direction;
|
|
626
|
-
},
|
|
627
|
-
set: function (v) {
|
|
628
|
-
this._direction = v === 'vertical' ? 'vertical' : 'horizontal';
|
|
629
|
-
this.renderer.addClass(this.elRef.nativeElement, "mtx-split-" + this._direction);
|
|
630
|
-
this.renderer.removeClass(this.elRef.nativeElement, "mtx-split-" + (this._direction === 'vertical' ? 'horizontal' : 'vertical'));
|
|
631
|
-
this.build(false, false);
|
|
632
|
-
},
|
|
633
|
-
enumerable: false,
|
|
634
|
-
configurable: true
|
|
635
|
-
});
|
|
636
|
-
Object.defineProperty(MtxSplitComponent.prototype, "unit", {
|
|
637
|
-
get: function () {
|
|
638
|
-
return this._unit;
|
|
639
|
-
},
|
|
640
|
-
set: function (v) {
|
|
641
|
-
this._unit = v === 'pixel' ? 'pixel' : 'percent';
|
|
642
|
-
this.renderer.addClass(this.elRef.nativeElement, "mtx-split-" + this._unit);
|
|
643
|
-
this.renderer.removeClass(this.elRef.nativeElement, "mtx-split-" + (this._unit === 'pixel' ? 'percent' : 'pixel'));
|
|
644
|
-
this.build(false, true);
|
|
645
|
-
},
|
|
646
|
-
enumerable: false,
|
|
647
|
-
configurable: true
|
|
648
|
-
});
|
|
649
|
-
Object.defineProperty(MtxSplitComponent.prototype, "gutterSize", {
|
|
650
|
-
get: function () {
|
|
651
|
-
return this._gutterSize;
|
|
652
|
-
},
|
|
653
|
-
set: function (v) {
|
|
654
|
-
this._gutterSize = getInputPositiveNumber(v, 11);
|
|
655
|
-
this.build(false, false);
|
|
656
|
-
},
|
|
657
|
-
enumerable: false,
|
|
658
|
-
configurable: true
|
|
659
|
-
});
|
|
660
|
-
Object.defineProperty(MtxSplitComponent.prototype, "gutterStep", {
|
|
661
|
-
get: function () {
|
|
662
|
-
return this._gutterStep;
|
|
663
|
-
},
|
|
664
|
-
set: function (v) {
|
|
665
|
-
this._gutterStep = getInputPositiveNumber(v, 1);
|
|
666
|
-
},
|
|
667
|
-
enumerable: false,
|
|
668
|
-
configurable: true
|
|
669
|
-
});
|
|
670
|
-
Object.defineProperty(MtxSplitComponent.prototype, "restrictMove", {
|
|
671
|
-
get: function () {
|
|
672
|
-
return this._restrictMove;
|
|
673
|
-
},
|
|
674
|
-
set: function (v) {
|
|
675
|
-
this._restrictMove = getInputBoolean(v);
|
|
676
|
-
},
|
|
677
|
-
enumerable: false,
|
|
678
|
-
configurable: true
|
|
679
|
-
});
|
|
680
|
-
Object.defineProperty(MtxSplitComponent.prototype, "useTransition", {
|
|
681
|
-
get: function () {
|
|
682
|
-
return this._useTransition;
|
|
683
|
-
},
|
|
684
|
-
set: function (v) {
|
|
685
|
-
this._useTransition = getInputBoolean(v);
|
|
686
|
-
if (this._useTransition) {
|
|
687
|
-
this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-transition');
|
|
688
|
-
}
|
|
689
|
-
else {
|
|
690
|
-
this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-transition');
|
|
691
|
-
}
|
|
692
|
-
},
|
|
693
|
-
enumerable: false,
|
|
694
|
-
configurable: true
|
|
695
|
-
});
|
|
696
|
-
Object.defineProperty(MtxSplitComponent.prototype, "disabled", {
|
|
697
|
-
get: function () {
|
|
698
|
-
return this._disabled;
|
|
699
|
-
},
|
|
700
|
-
set: function (v) {
|
|
701
|
-
this._disabled = getInputBoolean(v);
|
|
702
|
-
if (this._disabled) {
|
|
703
|
-
this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-disabled');
|
|
704
|
-
}
|
|
705
|
-
else {
|
|
706
|
-
this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-disabled');
|
|
707
|
-
}
|
|
708
|
-
},
|
|
709
|
-
enumerable: false,
|
|
710
|
-
configurable: true
|
|
711
|
-
});
|
|
712
|
-
Object.defineProperty(MtxSplitComponent.prototype, "dir", {
|
|
713
|
-
get: function () {
|
|
714
|
-
return this._dir;
|
|
715
|
-
},
|
|
716
|
-
set: function (v) {
|
|
717
|
-
this._dir = v === 'rtl' ? 'rtl' : 'ltr';
|
|
718
|
-
this.renderer.setAttribute(this.elRef.nativeElement, 'dir', this._dir);
|
|
719
|
-
},
|
|
720
|
-
enumerable: false,
|
|
721
|
-
configurable: true
|
|
722
|
-
});
|
|
723
|
-
Object.defineProperty(MtxSplitComponent.prototype, "gutterDblClickDuration", {
|
|
724
|
-
get: function () {
|
|
725
|
-
return this._gutterDblClickDuration;
|
|
726
|
-
},
|
|
727
|
-
set: function (v) {
|
|
728
|
-
this._gutterDblClickDuration = getInputPositiveNumber(v, 0);
|
|
729
|
-
},
|
|
730
|
-
enumerable: false,
|
|
731
|
-
configurable: true
|
|
732
|
-
});
|
|
733
|
-
Object.defineProperty(MtxSplitComponent.prototype, "transitionEnd", {
|
|
734
|
-
get: function () {
|
|
735
|
-
var _this = this;
|
|
736
|
-
return new rxjs.Observable(function (subscriber) { return (_this.transitionEndSubscriber = subscriber); }).pipe(operators.debounceTime(20));
|
|
737
|
-
},
|
|
738
|
-
enumerable: false,
|
|
739
|
-
configurable: true
|
|
740
|
-
});
|
|
741
|
-
MtxSplitComponent.prototype.ngAfterViewInit = function () {
|
|
742
|
-
var _this = this;
|
|
743
|
-
this.ngZone.runOutsideAngular(function () {
|
|
744
|
-
// To avoid transition at first rendering
|
|
745
|
-
setTimeout(function () { return _this.renderer.addClass(_this.elRef.nativeElement, 'mtx-split-init'); });
|
|
746
|
-
});
|
|
747
|
-
};
|
|
748
|
-
MtxSplitComponent.prototype.getNbGutters = function () {
|
|
749
|
-
return this.displayedAreas.length === 0 ? 0 : this.displayedAreas.length - 1;
|
|
750
|
-
};
|
|
751
|
-
MtxSplitComponent.prototype.addArea = function (component) {
|
|
752
|
-
var newArea = {
|
|
753
|
-
component: component,
|
|
754
|
-
order: 0,
|
|
755
|
-
size: 0,
|
|
756
|
-
minSize: null,
|
|
757
|
-
maxSize: null,
|
|
758
|
-
};
|
|
759
|
-
if (component.visible === true) {
|
|
760
|
-
this.displayedAreas.push(newArea);
|
|
761
|
-
this.build(true, true);
|
|
762
|
-
}
|
|
763
|
-
else {
|
|
764
|
-
this.hidedAreas.push(newArea);
|
|
765
|
-
}
|
|
766
|
-
};
|
|
767
|
-
MtxSplitComponent.prototype.removeArea = function (component) {
|
|
768
|
-
if (this.displayedAreas.some(function (a) { return a.component === component; })) {
|
|
769
|
-
var area = this.displayedAreas.find(function (a) { return a.component === component; });
|
|
770
|
-
this.displayedAreas.splice(this.displayedAreas.indexOf(area), 1);
|
|
771
|
-
this.build(true, true);
|
|
772
|
-
}
|
|
773
|
-
else if (this.hidedAreas.some(function (a) { return a.component === component; })) {
|
|
774
|
-
var area = this.hidedAreas.find(function (a) { return a.component === component; });
|
|
775
|
-
this.hidedAreas.splice(this.hidedAreas.indexOf(area), 1);
|
|
776
|
-
}
|
|
777
|
-
};
|
|
778
|
-
MtxSplitComponent.prototype.updateArea = function (component, resetOrders, resetSizes) {
|
|
779
|
-
if (component.visible === true) {
|
|
780
|
-
this.build(resetOrders, resetSizes);
|
|
781
|
-
}
|
|
782
|
-
};
|
|
783
|
-
MtxSplitComponent.prototype.showArea = function (component) {
|
|
784
|
-
var _a;
|
|
785
|
-
var area = this.hidedAreas.find(function (a) { return a.component === component; });
|
|
786
|
-
if (area === undefined) {
|
|
787
|
-
return;
|
|
788
|
-
}
|
|
789
|
-
var areas = this.hidedAreas.splice(this.hidedAreas.indexOf(area), 1);
|
|
790
|
-
(_a = this.displayedAreas).push.apply(_a, __spreadArray([], __read(areas)));
|
|
791
|
-
this.build(true, true);
|
|
792
|
-
};
|
|
793
|
-
MtxSplitComponent.prototype.hideArea = function (comp) {
|
|
794
|
-
var _a;
|
|
795
|
-
var area = this.displayedAreas.find(function (a) { return a.component === comp; });
|
|
796
|
-
if (area === undefined) {
|
|
797
|
-
return;
|
|
798
|
-
}
|
|
799
|
-
var areas = this.displayedAreas.splice(this.displayedAreas.indexOf(area), 1);
|
|
800
|
-
areas.forEach(function (_area) {
|
|
801
|
-
_area.order = 0;
|
|
802
|
-
_area.size = 0;
|
|
803
|
-
});
|
|
804
|
-
(_a = this.hidedAreas).push.apply(_a, __spreadArray([], __read(areas)));
|
|
805
|
-
this.build(true, true);
|
|
806
|
-
};
|
|
807
|
-
MtxSplitComponent.prototype.getVisibleAreaSizes = function () {
|
|
808
|
-
return this.displayedAreas.map(function (a) { return (a.size === null ? '*' : a.size); });
|
|
809
|
-
};
|
|
810
|
-
MtxSplitComponent.prototype.setVisibleAreaSizes = function (sizes) {
|
|
811
|
-
if (sizes.length !== this.displayedAreas.length) {
|
|
812
|
-
return false;
|
|
813
|
-
}
|
|
814
|
-
var formatedSizes = sizes.map(function (s) { return getInputPositiveNumber(s, null); });
|
|
815
|
-
var isValid = isUserSizesValid(this.unit, formatedSizes);
|
|
816
|
-
if (isValid === false) {
|
|
817
|
-
return false;
|
|
818
|
-
}
|
|
819
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
820
|
-
// @ts-ignore
|
|
821
|
-
this.displayedAreas.forEach(function (area, i) { return (area.component._size = formatedSizes[i]); });
|
|
822
|
-
this.build(false, true);
|
|
823
|
-
return true;
|
|
824
|
-
};
|
|
825
|
-
MtxSplitComponent.prototype.build = function (resetOrders, resetSizes) {
|
|
826
|
-
this.stopDragging();
|
|
827
|
-
// ¤ AREAS ORDER
|
|
828
|
-
if (resetOrders === true) {
|
|
829
|
-
// If user provided 'order' for each area, use it to sort them.
|
|
830
|
-
if (this.displayedAreas.every(function (a) { return a.component.order !== null; })) {
|
|
831
|
-
this.displayedAreas.sort(function (a, b) { return (a.component.order - b.component.order); });
|
|
832
|
-
}
|
|
833
|
-
// Then set real order with multiples of 2, numbers between will be used by gutters.
|
|
834
|
-
this.displayedAreas.forEach(function (area, i) {
|
|
835
|
-
area.order = i * 2;
|
|
836
|
-
area.component.setStyleOrder(area.order);
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
// ¤ AREAS SIZE
|
|
840
|
-
if (resetSizes === true) {
|
|
841
|
-
var useUserSizes_1 = isUserSizesValid(this.unit, this.displayedAreas.map(function (a) { return a.component.size; }));
|
|
842
|
-
switch (this.unit) {
|
|
843
|
-
case 'percent': {
|
|
844
|
-
var defaultSize_1 = 100 / this.displayedAreas.length;
|
|
845
|
-
this.displayedAreas.forEach(function (area) {
|
|
846
|
-
area.size = useUserSizes_1 ? area.component.size : defaultSize_1;
|
|
847
|
-
area.minSize = getAreaMinSize(area);
|
|
848
|
-
area.maxSize = getAreaMaxSize(area);
|
|
849
|
-
});
|
|
850
|
-
break;
|
|
851
|
-
}
|
|
852
|
-
case 'pixel': {
|
|
853
|
-
if (useUserSizes_1) {
|
|
854
|
-
this.displayedAreas.forEach(function (area) {
|
|
855
|
-
area.size = area.component.size;
|
|
856
|
-
area.minSize = getAreaMinSize(area);
|
|
857
|
-
area.maxSize = getAreaMaxSize(area);
|
|
858
|
-
});
|
|
859
|
-
}
|
|
860
|
-
else {
|
|
861
|
-
var wildcardSizeAreas = this.displayedAreas.filter(function (a) { return a.component.size === null; });
|
|
862
|
-
// No wildcard area > Need to select one arbitrarily > first
|
|
863
|
-
if (wildcardSizeAreas.length === 0 && this.displayedAreas.length > 0) {
|
|
864
|
-
this.displayedAreas.forEach(function (area, i) {
|
|
865
|
-
area.size = i === 0 ? null : area.component.size;
|
|
866
|
-
area.minSize = i === 0 ? null : getAreaMinSize(area);
|
|
867
|
-
area.maxSize = i === 0 ? null : getAreaMaxSize(area);
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
// More than one wildcard area > Need to keep only one arbitrarly > first
|
|
871
|
-
// eslint-disable-next-line brace-style
|
|
872
|
-
else if (wildcardSizeAreas.length > 1) {
|
|
873
|
-
var alreadyGotOne_1 = false;
|
|
874
|
-
this.displayedAreas.forEach(function (area) {
|
|
875
|
-
if (area.component.size === null) {
|
|
876
|
-
if (alreadyGotOne_1 === false) {
|
|
877
|
-
area.size = null;
|
|
878
|
-
area.minSize = null;
|
|
879
|
-
area.maxSize = null;
|
|
880
|
-
alreadyGotOne_1 = true;
|
|
881
|
-
}
|
|
882
|
-
else {
|
|
883
|
-
area.size = 100;
|
|
884
|
-
area.minSize = null;
|
|
885
|
-
area.maxSize = null;
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
else {
|
|
889
|
-
area.size = area.component.size;
|
|
890
|
-
area.minSize = getAreaMinSize(area);
|
|
891
|
-
area.maxSize = getAreaMaxSize(area);
|
|
892
|
-
}
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
break;
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
this.refreshStyleSizes();
|
|
901
|
-
this.cdRef.markForCheck();
|
|
902
|
-
};
|
|
903
|
-
MtxSplitComponent.prototype.refreshStyleSizes = function () {
|
|
904
|
-
var _this = this;
|
|
905
|
-
///////////////////////////////////////////
|
|
906
|
-
// PERCENT MODE
|
|
907
|
-
if (this.unit === 'percent') {
|
|
908
|
-
// Only one area > flex-basis 100%
|
|
909
|
-
if (this.displayedAreas.length === 1) {
|
|
910
|
-
this.displayedAreas[0].component.setStyleFlex(0, 0, "100%", false, false);
|
|
911
|
-
}
|
|
912
|
-
// Multiple areas > use each percent basis
|
|
913
|
-
// eslint-disable-next-line brace-style
|
|
914
|
-
else {
|
|
915
|
-
var sumGutterSize_1 = this.getNbGutters() * this.gutterSize;
|
|
916
|
-
this.displayedAreas.forEach(function (area) {
|
|
917
|
-
area.component.setStyleFlex(0, 0, "calc( " + area.size + "% - " + (area.size / 100) * sumGutterSize_1 + "px )", area.minSize !== null && area.minSize === area.size ? true : false, area.maxSize !== null && area.maxSize === area.size ? true : false);
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
///////////////////////////////////////////
|
|
922
|
-
// PIXEL MODE
|
|
923
|
-
// eslint-disable-next-line brace-style
|
|
924
|
-
else if (this.unit === 'pixel') {
|
|
925
|
-
this.displayedAreas.forEach(function (area) {
|
|
926
|
-
// Area with wildcard size
|
|
927
|
-
if (area.size === null) {
|
|
928
|
-
if (_this.displayedAreas.length === 1) {
|
|
929
|
-
area.component.setStyleFlex(1, 1, "100%", false, false);
|
|
930
|
-
}
|
|
931
|
-
else {
|
|
932
|
-
area.component.setStyleFlex(1, 1, "auto", false, false);
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
// Area with pixel size
|
|
936
|
-
// eslint-disable-next-line brace-style
|
|
937
|
-
else {
|
|
938
|
-
// Only one area > flex-basis 100%
|
|
939
|
-
if (_this.displayedAreas.length === 1) {
|
|
940
|
-
area.component.setStyleFlex(0, 0, "100%", false, false);
|
|
941
|
-
}
|
|
942
|
-
// Multiple areas > use each pixel basis
|
|
943
|
-
// eslint-disable-next-line brace-style
|
|
944
|
-
else {
|
|
945
|
-
area.component.setStyleFlex(0, 0, area.size + "px", area.minSize !== null && area.minSize === area.size ? true : false, area.maxSize !== null && area.maxSize === area.size ? true : false);
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
};
|
|
951
|
-
MtxSplitComponent.prototype.clickGutter = function (event, gutterNum) {
|
|
952
|
-
var _this = this;
|
|
953
|
-
var tempPoint = getPointFromEvent(event);
|
|
954
|
-
// Be sure mouseup/touchend happened at same point as mousedown/touchstart to trigger click/dblclick
|
|
955
|
-
if (this.startPoint && this.startPoint.x === tempPoint.x && this.startPoint.y === tempPoint.y) {
|
|
956
|
-
// If timeout in progress and new click > clearTimeout & dblClickEvent
|
|
957
|
-
if (this._clickTimeout !== null) {
|
|
958
|
-
window.clearTimeout(this._clickTimeout);
|
|
959
|
-
this._clickTimeout = null;
|
|
960
|
-
this.notify('dblclick', gutterNum);
|
|
961
|
-
this.stopDragging();
|
|
962
|
-
}
|
|
963
|
-
// Else start timeout to call clickEvent at end
|
|
964
|
-
// eslint-disable-next-line brace-style
|
|
965
|
-
else {
|
|
966
|
-
this._clickTimeout = window.setTimeout(function () {
|
|
967
|
-
_this._clickTimeout = null;
|
|
968
|
-
_this.notify('click', gutterNum);
|
|
969
|
-
_this.stopDragging();
|
|
970
|
-
}, this.gutterDblClickDuration);
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
};
|
|
974
|
-
MtxSplitComponent.prototype.startDragging = function (event, gutterOrder, gutterNum) {
|
|
975
|
-
var _this = this;
|
|
976
|
-
event.preventDefault();
|
|
977
|
-
event.stopPropagation();
|
|
978
|
-
this.startPoint = getPointFromEvent(event);
|
|
979
|
-
if (this.startPoint === null || this.disabled === true) {
|
|
980
|
-
return;
|
|
981
|
-
}
|
|
982
|
-
this.snapshot = {
|
|
983
|
-
gutterNum: gutterNum,
|
|
984
|
-
lastSteppedOffset: 0,
|
|
985
|
-
allAreasSizePixel: getElementPixelSize(this.elRef, this.direction) - this.getNbGutters() * this.gutterSize,
|
|
986
|
-
allInvolvedAreasSizePercent: 100,
|
|
987
|
-
areasBeforeGutter: [],
|
|
988
|
-
areasAfterGutter: [],
|
|
989
|
-
};
|
|
990
|
-
this.displayedAreas.forEach(function (area) {
|
|
991
|
-
var areaSnapshot = {
|
|
992
|
-
area: area,
|
|
993
|
-
sizePixelAtStart: getElementPixelSize(area.component.elRef, _this.direction),
|
|
994
|
-
sizePercentAtStart: (_this.unit === 'percent' ? area.size : -1), // If pixel mode, anyway, will not be used.
|
|
995
|
-
};
|
|
996
|
-
if (area.order < gutterOrder) {
|
|
997
|
-
if (_this.restrictMove === true) {
|
|
998
|
-
_this.snapshot.areasBeforeGutter = [areaSnapshot];
|
|
999
|
-
}
|
|
1000
|
-
else {
|
|
1001
|
-
_this.snapshot.areasBeforeGutter.unshift(areaSnapshot);
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
else if (area.order > gutterOrder) {
|
|
1005
|
-
if (_this.restrictMove === true) {
|
|
1006
|
-
if (_this.snapshot.areasAfterGutter.length === 0) {
|
|
1007
|
-
_this.snapshot.areasAfterGutter = [areaSnapshot];
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
else {
|
|
1011
|
-
_this.snapshot.areasAfterGutter.push(areaSnapshot);
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
});
|
|
1015
|
-
this.snapshot.allInvolvedAreasSizePercent = __spreadArray(__spreadArray([], __read(this.snapshot.areasBeforeGutter)), __read(this.snapshot.areasAfterGutter)).reduce(function (t, a) { return t + a.sizePercentAtStart; }, 0);
|
|
1016
|
-
if (this.snapshot.areasBeforeGutter.length === 0 ||
|
|
1017
|
-
this.snapshot.areasAfterGutter.length === 0) {
|
|
1018
|
-
return;
|
|
1019
|
-
}
|
|
1020
|
-
this.dragListeners.push(this.renderer.listen('document', 'mouseup', this.stopDragging.bind(this)));
|
|
1021
|
-
this.dragListeners.push(this.renderer.listen('document', 'touchend', this.stopDragging.bind(this)));
|
|
1022
|
-
this.dragListeners.push(this.renderer.listen('document', 'touchcancel', this.stopDragging.bind(this)));
|
|
1023
|
-
this.ngZone.runOutsideAngular(function () {
|
|
1024
|
-
_this.dragListeners.push(_this.renderer.listen('document', 'mousemove', _this.dragEvent.bind(_this)));
|
|
1025
|
-
_this.dragListeners.push(_this.renderer.listen('document', 'touchmove', _this.dragEvent.bind(_this)));
|
|
1026
|
-
});
|
|
1027
|
-
this.displayedAreas.forEach(function (area) { return area.component.lockEvents(); });
|
|
1028
|
-
this.isDragging = true;
|
|
1029
|
-
this.renderer.addClass(this.elRef.nativeElement, 'mtx-dragging');
|
|
1030
|
-
this.renderer.addClass(this.gutterEls.toArray()[this.snapshot.gutterNum - 1].nativeElement, 'mtx-dragged');
|
|
1031
|
-
this.notify('start', this.snapshot.gutterNum);
|
|
1032
|
-
};
|
|
1033
|
-
MtxSplitComponent.prototype.dragEvent = function (event) {
|
|
1034
|
-
var _this = this;
|
|
1035
|
-
event.preventDefault();
|
|
1036
|
-
event.stopPropagation();
|
|
1037
|
-
if (this._clickTimeout !== null) {
|
|
1038
|
-
window.clearTimeout(this._clickTimeout);
|
|
1039
|
-
this._clickTimeout = null;
|
|
1040
|
-
}
|
|
1041
|
-
if (this.isDragging === false) {
|
|
1042
|
-
return;
|
|
1043
|
-
}
|
|
1044
|
-
this.endPoint = getPointFromEvent(event);
|
|
1045
|
-
if (this.endPoint === null) {
|
|
1046
|
-
return;
|
|
1047
|
-
}
|
|
1048
|
-
// Calculate steppedOffset
|
|
1049
|
-
var offset = this.direction === 'horizontal'
|
|
1050
|
-
? this.startPoint.x - this.endPoint.x
|
|
1051
|
-
: this.startPoint.y - this.endPoint.y;
|
|
1052
|
-
if (this.dir === 'rtl') {
|
|
1053
|
-
offset = -offset;
|
|
1054
|
-
}
|
|
1055
|
-
var steppedOffset = Math.round(offset / this.gutterStep) * this.gutterStep;
|
|
1056
|
-
if (steppedOffset === this.snapshot.lastSteppedOffset) {
|
|
1057
|
-
return;
|
|
1058
|
-
}
|
|
1059
|
-
this.snapshot.lastSteppedOffset = steppedOffset;
|
|
1060
|
-
// Need to know if each gutter side areas could reacts to steppedOffset
|
|
1061
|
-
var areasBefore = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasBeforeGutter, -steppedOffset, this.snapshot.allAreasSizePixel);
|
|
1062
|
-
var areasAfter = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasAfterGutter, steppedOffset, this.snapshot.allAreasSizePixel);
|
|
1063
|
-
// Each gutter side areas can't absorb all offset
|
|
1064
|
-
if (areasBefore.remain !== 0 && areasAfter.remain !== 0) {
|
|
1065
|
-
if (Math.abs(areasBefore.remain) === Math.abs(areasAfter.remain)) {
|
|
1066
|
-
/** */
|
|
1067
|
-
}
|
|
1068
|
-
else if (Math.abs(areasBefore.remain) > Math.abs(areasAfter.remain)) {
|
|
1069
|
-
areasAfter = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasAfterGutter, steppedOffset + areasBefore.remain, this.snapshot.allAreasSizePixel);
|
|
1070
|
-
}
|
|
1071
|
-
else {
|
|
1072
|
-
areasBefore = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasBeforeGutter, -(steppedOffset - areasAfter.remain), this.snapshot.allAreasSizePixel);
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
// Areas before gutter can't absorbs all offset > need to recalculate sizes for areas after gutter.
|
|
1076
|
-
// eslint-disable-next-line brace-style
|
|
1077
|
-
else if (areasBefore.remain !== 0) {
|
|
1078
|
-
areasAfter = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasAfterGutter, steppedOffset + areasBefore.remain, this.snapshot.allAreasSizePixel);
|
|
1079
|
-
}
|
|
1080
|
-
// Areas after gutter can't absorbs all offset > need to recalculate sizes for areas before gutter.
|
|
1081
|
-
// eslint-disable-next-line brace-style
|
|
1082
|
-
else if (areasAfter.remain !== 0) {
|
|
1083
|
-
areasBefore = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasBeforeGutter, -(steppedOffset - areasAfter.remain), this.snapshot.allAreasSizePixel);
|
|
1084
|
-
}
|
|
1085
|
-
if (this.unit === 'percent') {
|
|
1086
|
-
// Hack because of browser messing up with sizes using calc(X% - Ypx) -> el.getBoundingClientRect()
|
|
1087
|
-
// If not there, playing with gutters makes total going down to 99.99875% then 99.99286%, 99.98986%,..
|
|
1088
|
-
var all = __spreadArray(__spreadArray([], __read(areasBefore.list)), __read(areasAfter.list));
|
|
1089
|
-
var areaToReset_1 = all.find(function (a) { return a.percentAfterAbsorption !== 0 &&
|
|
1090
|
-
a.percentAfterAbsorption !== a.areaSnapshot.area.minSize &&
|
|
1091
|
-
a.percentAfterAbsorption !== a.areaSnapshot.area.maxSize; });
|
|
1092
|
-
if (areaToReset_1) {
|
|
1093
|
-
areaToReset_1.percentAfterAbsorption =
|
|
1094
|
-
this.snapshot.allInvolvedAreasSizePercent -
|
|
1095
|
-
all
|
|
1096
|
-
.filter(function (a) { return a !== areaToReset_1; })
|
|
1097
|
-
.reduce(function (total, a) { return total + a.percentAfterAbsorption; }, 0);
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
// Now we know areas could absorb steppedOffset, time to really update sizes
|
|
1101
|
-
areasBefore.list.forEach(function (item) { return updateAreaSize(_this.unit, item); });
|
|
1102
|
-
areasAfter.list.forEach(function (item) { return updateAreaSize(_this.unit, item); });
|
|
1103
|
-
this.refreshStyleSizes();
|
|
1104
|
-
this.notify('progress', this.snapshot.gutterNum);
|
|
1105
|
-
};
|
|
1106
|
-
MtxSplitComponent.prototype.stopDragging = function (event) {
|
|
1107
|
-
var _this = this;
|
|
1108
|
-
if (event) {
|
|
1109
|
-
event.preventDefault();
|
|
1110
|
-
event.stopPropagation();
|
|
1111
|
-
}
|
|
1112
|
-
if (this.isDragging === false) {
|
|
1113
|
-
return;
|
|
1114
|
-
}
|
|
1115
|
-
this.displayedAreas.forEach(function (area) { return area.component.unlockEvents(); });
|
|
1116
|
-
while (this.dragListeners.length > 0) {
|
|
1117
|
-
var fct = this.dragListeners.pop();
|
|
1118
|
-
if (fct) {
|
|
1119
|
-
fct();
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
// Warning: Have to be before "notify('end')"
|
|
1123
|
-
// because "notify('end')"" can be linked to "[size]='x'" > "build()" > "stopDragging()"
|
|
1124
|
-
this.isDragging = false;
|
|
1125
|
-
// If moved from starting point, notify end
|
|
1126
|
-
if (this.endPoint &&
|
|
1127
|
-
(this.startPoint.x !== this.endPoint.x ||
|
|
1128
|
-
this.startPoint.y !== this.endPoint.y)) {
|
|
1129
|
-
this.notify('end', this.snapshot.gutterNum);
|
|
1130
|
-
}
|
|
1131
|
-
this.renderer.removeClass(this.elRef.nativeElement, 'mtx-dragging');
|
|
1132
|
-
this.renderer.removeClass(this.gutterEls.toArray()[this.snapshot.gutterNum - 1].nativeElement, 'mtx-dragged');
|
|
1133
|
-
this.snapshot = null;
|
|
1134
|
-
// Needed to let (click)="clickGutter(...)" event run and verify if mouse moved or not
|
|
1135
|
-
this.ngZone.runOutsideAngular(function () {
|
|
1136
|
-
setTimeout(function () {
|
|
1137
|
-
_this.startPoint = null;
|
|
1138
|
-
_this.endPoint = null;
|
|
1139
|
-
});
|
|
1140
|
-
});
|
|
1141
|
-
};
|
|
1142
|
-
MtxSplitComponent.prototype.notify = function (type, gutterNum) {
|
|
1143
|
-
var _this = this;
|
|
1144
|
-
var sizes = this.getVisibleAreaSizes();
|
|
1145
|
-
if (type === 'start') {
|
|
1146
|
-
this.dragStart.emit({ gutterNum: gutterNum, sizes: sizes });
|
|
1147
|
-
}
|
|
1148
|
-
else if (type === 'end') {
|
|
1149
|
-
this.dragEnd.emit({ gutterNum: gutterNum, sizes: sizes });
|
|
1150
|
-
}
|
|
1151
|
-
else if (type === 'click') {
|
|
1152
|
-
this.gutterClick.emit({ gutterNum: gutterNum, sizes: sizes });
|
|
1153
|
-
}
|
|
1154
|
-
else if (type === 'dblclick') {
|
|
1155
|
-
this.gutterDblClick.emit({ gutterNum: gutterNum, sizes: sizes });
|
|
1156
|
-
}
|
|
1157
|
-
else if (type === 'transitionEnd') {
|
|
1158
|
-
if (this.transitionEndSubscriber) {
|
|
1159
|
-
this.ngZone.run(function () { return _this.transitionEndSubscriber.next(sizes); });
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
else if (type === 'progress') {
|
|
1163
|
-
// Stay outside zone to allow users do what they want about change detection mechanism.
|
|
1164
|
-
this.dragProgressSubject.next({ gutterNum: gutterNum, sizes: sizes });
|
|
1165
|
-
}
|
|
1166
|
-
};
|
|
1167
|
-
MtxSplitComponent.prototype.ngOnDestroy = function () {
|
|
1168
|
-
this.stopDragging();
|
|
1169
|
-
};
|
|
1170
|
-
return MtxSplitComponent;
|
|
1171
|
-
}());
|
|
1172
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1173
|
-
MtxSplitComponent.decorators = [
|
|
1174
|
-
{ type: core.Component, args: [{
|
|
1175
|
-
selector: 'mtx-split',
|
|
1176
|
-
exportAs: 'mtxSplit',
|
|
1177
|
-
host: {
|
|
1178
|
-
class: 'mtx-split',
|
|
1179
|
-
},
|
|
1180
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
1181
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1182
|
-
template: "<ng-content></ng-content>\r\n<ng-template ngFor [ngForOf]=\"displayedAreas\" let-index=\"index\" let-last=\"last\">\r\n <div #gutterEls class=\"mtx-split-gutter\"\r\n *ngIf=\"last === false\"\r\n [style.flex-basis.px]=\"gutterSize\"\r\n [style.order]=\"index * 2 + 1\"\r\n (mousedown)=\"startDragging($event, index * 2 + 1, index + 1)\"\r\n (touchstart)=\"startDragging($event, index * 2 + 1, index + 1)\"\r\n (mouseup)=\"clickGutter($event, index + 1)\"\r\n (touchend)=\"clickGutter($event, index + 1)\">\r\n <div class=\"mtx-split-gutter-handle\"></div>\r\n </div>\r\n</ng-template>\r\n",
|
|
1183
|
-
styles: [".mtx-split{display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:stretch;overflow:hidden;width:100%;height:100%}.mtx-split>.mtx-split-gutter{position:relative;display:flex;flex-grow:0;flex-shrink:0;align-items:center;justify-content:center}.mtx-split>.mtx-split-gutter>.mtx-split-gutter-handle{position:absolute;opacity:0}.mtx-split>.mtx-split-pane{flex-grow:0;flex-shrink:0;overflow-x:hidden;overflow-y:auto}.mtx-split>.mtx-split-pane.mtx-split-pane-hidden{flex:0 1 0!important;overflow-x:hidden;overflow-y:hidden}.mtx-split.mtx-split-horizontal{flex-direction:row}.mtx-split.mtx-split-horizontal>.mtx-split-gutter{flex-direction:row;height:100%;cursor:col-resize}.mtx-split.mtx-split-horizontal>.mtx-split-gutter>.mtx-split-gutter-handle{width:8px;height:100%;left:-2px;right:2px}.mtx-split.mtx-split-horizontal>.mtx-split-pane{height:100%}.mtx-split.mtx-split-vertical{flex-direction:column}.mtx-split.mtx-split-vertical>.mtx-split-gutter{flex-direction:column;width:100%;cursor:row-resize}.mtx-split.mtx-split-vertical>.mtx-split-gutter>.mtx-split-gutter-handle{width:100%;height:8px;top:-2px;bottom:2px}.mtx-split.mtx-split-vertical>.mtx-split-pane{width:100%}.mtx-split.mtx-split-vertical>.mtx-split-pane.mtx-split-pane-hidden{max-width:0}.mtx-split.mtx-split-disabled>.mtx-split-gutter{cursor:default}.mtx-split.mtx-split-disabled>.mtx-split-gutter .mtx-split-gutter-handle{background-image:none}.mtx-split.mtx-split-transition.mtx-split-init:not(.mtx-dragging)>.mtx-split-gutter,.mtx-split.mtx-split-transition.mtx-split-init:not(.mtx-dragging)>.mtx-split-pane{transition:flex-basis .3s}\n"]
|
|
1184
|
-
},] }
|
|
1185
|
-
];
|
|
1186
|
-
/**
|
|
1187
|
-
* @type {function(): !Array<(null|{
|
|
1188
|
-
* type: ?,
|
|
1189
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1190
|
-
* })>}
|
|
1191
|
-
* @nocollapse
|
|
1192
|
-
*/
|
|
1193
|
-
MtxSplitComponent.ctorParameters = function () { return [
|
|
1194
|
-
{ type: core.NgZone },
|
|
1195
|
-
{ type: core.ElementRef },
|
|
1196
|
-
{ type: core.ChangeDetectorRef },
|
|
1197
|
-
{ type: core.Renderer2 }
|
|
1198
|
-
]; };
|
|
1199
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
1200
|
-
MtxSplitComponent.propDecorators = {
|
|
1201
|
-
direction: [{ type: core.Input }],
|
|
1202
|
-
unit: [{ type: core.Input }],
|
|
1203
|
-
gutterSize: [{ type: core.Input }],
|
|
1204
|
-
gutterStep: [{ type: core.Input }],
|
|
1205
|
-
restrictMove: [{ type: core.Input }],
|
|
1206
|
-
useTransition: [{ type: core.Input }],
|
|
1207
|
-
disabled: [{ type: core.Input }],
|
|
1208
|
-
dir: [{ type: core.Input }],
|
|
1209
|
-
gutterDblClickDuration: [{ type: core.Input }],
|
|
1210
|
-
dragStart: [{ type: core.Output }],
|
|
1211
|
-
dragEnd: [{ type: core.Output }],
|
|
1212
|
-
gutterClick: [{ type: core.Output }],
|
|
1213
|
-
gutterDblClick: [{ type: core.Output }],
|
|
1214
|
-
transitionEnd: [{ type: core.Output }],
|
|
1215
|
-
gutterEls: [{ type: core.ViewChildren, args: ['gutterEls',] }]
|
|
1216
|
-
};
|
|
1217
|
-
|
|
1218
|
-
var MtxSplitPaneDirective = /** @class */ (function () {
|
|
1219
|
-
function MtxSplitPaneDirective(ngZone, elRef, renderer, split) {
|
|
1220
|
-
this.ngZone = ngZone;
|
|
1221
|
-
this.elRef = elRef;
|
|
1222
|
-
this.renderer = renderer;
|
|
1223
|
-
this.split = split;
|
|
1224
|
-
this._order = null;
|
|
1225
|
-
////
|
|
1226
|
-
this._size = null;
|
|
1227
|
-
////
|
|
1228
|
-
this._minSize = null;
|
|
1229
|
-
////
|
|
1230
|
-
this._maxSize = null;
|
|
1231
|
-
////
|
|
1232
|
-
this._lockSize = false;
|
|
1233
|
-
////
|
|
1234
|
-
this._visible = true;
|
|
1235
|
-
this.lockListeners = [];
|
|
1236
|
-
this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-pane');
|
|
1237
|
-
}
|
|
1238
|
-
Object.defineProperty(MtxSplitPaneDirective.prototype, "order", {
|
|
1239
|
-
get: function () {
|
|
1240
|
-
return this._order;
|
|
1241
|
-
},
|
|
1242
|
-
set: function (v) {
|
|
1243
|
-
this._order = getInputPositiveNumber(v, null);
|
|
1244
|
-
this.split.updateArea(this, true, false);
|
|
1245
|
-
},
|
|
1246
|
-
enumerable: false,
|
|
1247
|
-
configurable: true
|
|
1248
|
-
});
|
|
1249
|
-
Object.defineProperty(MtxSplitPaneDirective.prototype, "size", {
|
|
1250
|
-
get: function () {
|
|
1251
|
-
return this._size;
|
|
1252
|
-
},
|
|
1253
|
-
set: function (v) {
|
|
1254
|
-
this._size = getInputPositiveNumber(v, null);
|
|
1255
|
-
this.split.updateArea(this, false, true);
|
|
1256
|
-
},
|
|
1257
|
-
enumerable: false,
|
|
1258
|
-
configurable: true
|
|
1259
|
-
});
|
|
1260
|
-
Object.defineProperty(MtxSplitPaneDirective.prototype, "minSize", {
|
|
1261
|
-
get: function () {
|
|
1262
|
-
return this._minSize;
|
|
1263
|
-
},
|
|
1264
|
-
set: function (v) {
|
|
1265
|
-
this._minSize = getInputPositiveNumber(v, null);
|
|
1266
|
-
this.split.updateArea(this, false, true);
|
|
1267
|
-
},
|
|
1268
|
-
enumerable: false,
|
|
1269
|
-
configurable: true
|
|
1270
|
-
});
|
|
1271
|
-
Object.defineProperty(MtxSplitPaneDirective.prototype, "maxSize", {
|
|
1272
|
-
get: function () {
|
|
1273
|
-
return this._maxSize;
|
|
1274
|
-
},
|
|
1275
|
-
set: function (v) {
|
|
1276
|
-
this._maxSize = getInputPositiveNumber(v, null);
|
|
1277
|
-
this.split.updateArea(this, false, true);
|
|
1278
|
-
},
|
|
1279
|
-
enumerable: false,
|
|
1280
|
-
configurable: true
|
|
1281
|
-
});
|
|
1282
|
-
Object.defineProperty(MtxSplitPaneDirective.prototype, "lockSize", {
|
|
1283
|
-
get: function () {
|
|
1284
|
-
return this._lockSize;
|
|
1285
|
-
},
|
|
1286
|
-
set: function (v) {
|
|
1287
|
-
this._lockSize = getInputBoolean(v);
|
|
1288
|
-
this.split.updateArea(this, false, true);
|
|
1289
|
-
},
|
|
1290
|
-
enumerable: false,
|
|
1291
|
-
configurable: true
|
|
1292
|
-
});
|
|
1293
|
-
Object.defineProperty(MtxSplitPaneDirective.prototype, "visible", {
|
|
1294
|
-
get: function () {
|
|
1295
|
-
return this._visible;
|
|
1296
|
-
},
|
|
1297
|
-
set: function (v) {
|
|
1298
|
-
this._visible = getInputBoolean(v);
|
|
1299
|
-
if (this._visible) {
|
|
1300
|
-
this.split.showArea(this);
|
|
1301
|
-
this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-pane-hidden');
|
|
1302
|
-
}
|
|
1303
|
-
else {
|
|
1304
|
-
this.split.hideArea(this);
|
|
1305
|
-
this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-pane-hidden');
|
|
1306
|
-
}
|
|
1307
|
-
},
|
|
1308
|
-
enumerable: false,
|
|
1309
|
-
configurable: true
|
|
1310
|
-
});
|
|
1311
|
-
MtxSplitPaneDirective.prototype.ngOnInit = function () {
|
|
1312
|
-
var _this = this;
|
|
1313
|
-
this.split.addArea(this);
|
|
1314
|
-
this.ngZone.runOutsideAngular(function () {
|
|
1315
|
-
_this.transitionListener = _this.renderer.listen(_this.elRef.nativeElement, 'transitionend', function (event) {
|
|
1316
|
-
// Limit only flex-basis transition to trigger the event
|
|
1317
|
-
if (event.propertyName === 'flex-basis') {
|
|
1318
|
-
_this.split.notify('transitionEnd', -1);
|
|
1319
|
-
}
|
|
1320
|
-
});
|
|
1321
|
-
});
|
|
1322
|
-
};
|
|
1323
|
-
MtxSplitPaneDirective.prototype.setStyleOrder = function (value) {
|
|
1324
|
-
this.renderer.setStyle(this.elRef.nativeElement, 'order', value);
|
|
1325
|
-
};
|
|
1326
|
-
MtxSplitPaneDirective.prototype.setStyleFlex = function (grow, shrink, basis, isMin, isMax) {
|
|
1327
|
-
// Need 3 separated properties to work on IE11 (https://github.com/angular/flex-layout/issues/323)
|
|
1328
|
-
this.renderer.setStyle(this.elRef.nativeElement, 'flex-grow', grow);
|
|
1329
|
-
this.renderer.setStyle(this.elRef.nativeElement, 'flex-shrink', shrink);
|
|
1330
|
-
this.renderer.setStyle(this.elRef.nativeElement, 'flex-basis', basis);
|
|
1331
|
-
if (isMin === true) {
|
|
1332
|
-
this.renderer.addClass(this.elRef.nativeElement, 'mtx-min');
|
|
1333
|
-
}
|
|
1334
|
-
else {
|
|
1335
|
-
this.renderer.removeClass(this.elRef.nativeElement, 'mtx-min');
|
|
1336
|
-
}
|
|
1337
|
-
if (isMax === true) {
|
|
1338
|
-
this.renderer.addClass(this.elRef.nativeElement, 'mtx-max');
|
|
1339
|
-
}
|
|
1340
|
-
else {
|
|
1341
|
-
this.renderer.removeClass(this.elRef.nativeElement, 'mtx-max');
|
|
1342
|
-
}
|
|
1343
|
-
};
|
|
1344
|
-
MtxSplitPaneDirective.prototype.lockEvents = function () {
|
|
1345
|
-
var _this = this;
|
|
1346
|
-
this.ngZone.runOutsideAngular(function () {
|
|
1347
|
-
_this.lockListeners.push(_this.renderer.listen(_this.elRef.nativeElement, 'selectstart', function (e) { return false; }));
|
|
1348
|
-
_this.lockListeners.push(_this.renderer.listen(_this.elRef.nativeElement, 'dragstart', function (e) { return false; }));
|
|
1349
|
-
});
|
|
1350
|
-
};
|
|
1351
|
-
MtxSplitPaneDirective.prototype.unlockEvents = function () {
|
|
1352
|
-
while (this.lockListeners.length > 0) {
|
|
1353
|
-
var fct = this.lockListeners.pop();
|
|
1354
|
-
if (fct) {
|
|
1355
|
-
fct();
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
};
|
|
1359
|
-
MtxSplitPaneDirective.prototype.ngOnDestroy = function () {
|
|
1360
|
-
this.unlockEvents();
|
|
1361
|
-
if (this.transitionListener) {
|
|
1362
|
-
this.transitionListener();
|
|
1363
|
-
}
|
|
1364
|
-
this.split.removeArea(this);
|
|
1365
|
-
};
|
|
1366
|
-
return MtxSplitPaneDirective;
|
|
1367
|
-
}());
|
|
1368
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1369
|
-
MtxSplitPaneDirective.decorators = [
|
|
1370
|
-
{ type: core.Directive, args: [{
|
|
1371
|
-
selector: 'mtx-split-pane, [mtx-split-pane]',
|
|
1372
|
-
exportAs: 'mtxSplitPane',
|
|
1373
|
-
},] }
|
|
1374
|
-
];
|
|
1375
|
-
/**
|
|
1376
|
-
* @type {function(): !Array<(null|{
|
|
1377
|
-
* type: ?,
|
|
1378
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1379
|
-
* })>}
|
|
1380
|
-
* @nocollapse
|
|
1381
|
-
*/
|
|
1382
|
-
MtxSplitPaneDirective.ctorParameters = function () { return [
|
|
1383
|
-
{ type: core.NgZone },
|
|
1384
|
-
{ type: core.ElementRef },
|
|
1385
|
-
{ type: core.Renderer2 },
|
|
1386
|
-
{ type: MtxSplitComponent }
|
|
1387
|
-
]; };
|
|
1388
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
1389
|
-
MtxSplitPaneDirective.propDecorators = {
|
|
1390
|
-
order: [{ type: core.Input }],
|
|
1391
|
-
size: [{ type: core.Input }],
|
|
1392
|
-
minSize: [{ type: core.Input }],
|
|
1393
|
-
maxSize: [{ type: core.Input }],
|
|
1394
|
-
lockSize: [{ type: core.Input }],
|
|
1395
|
-
visible: [{ type: core.Input }]
|
|
1396
|
-
};
|
|
1397
|
-
|
|
1398
|
-
var MtxSplitModule = /** @class */ (function () {
|
|
1399
|
-
function MtxSplitModule() {
|
|
1400
|
-
}
|
|
1401
|
-
return MtxSplitModule;
|
|
1402
|
-
}());
|
|
1403
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1404
|
-
MtxSplitModule.decorators = [
|
|
1405
|
-
{ type: core.NgModule, args: [{
|
|
1406
|
-
imports: [common.CommonModule],
|
|
1407
|
-
declarations: [MtxSplitComponent, MtxSplitPaneDirective],
|
|
1408
|
-
exports: [MtxSplitComponent, MtxSplitPaneDirective],
|
|
1409
|
-
},] }
|
|
1410
|
-
];
|
|
1411
|
-
|
|
1412
|
-
/**
|
|
1413
|
-
* Generated bundle index. Do not edit.
|
|
1414
|
-
*/
|
|
1415
|
-
|
|
1416
|
-
exports.MtxSplitComponent = MtxSplitComponent;
|
|
1417
|
-
exports.MtxSplitModule = MtxSplitModule;
|
|
1418
|
-
exports.MtxSplitPaneDirective = MtxSplitPaneDirective;
|
|
1419
|
-
exports.getAreaMaxSize = getAreaMaxSize;
|
|
1420
|
-
exports.getAreaMinSize = getAreaMinSize;
|
|
1421
|
-
exports.getElementPixelSize = getElementPixelSize;
|
|
1422
|
-
exports.getGutterSideAbsorptionCapacity = getGutterSideAbsorptionCapacity;
|
|
1423
|
-
exports.getInputBoolean = getInputBoolean;
|
|
1424
|
-
exports.getInputPositiveNumber = getInputPositiveNumber;
|
|
1425
|
-
exports.getPointFromEvent = getPointFromEvent;
|
|
1426
|
-
exports.isUserSizesValid = isUserSizesValid;
|
|
1427
|
-
exports.updateAreaSize = updateAreaSize;
|
|
1428
|
-
|
|
1429
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1430
|
-
|
|
1431
|
-
}));
|
|
1432
|
-
//# sourceMappingURL=mtxSplit.umd.js.map
|