@ng-matero/extensions 12.5.2 → 13.0.0
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 +5 -4
- 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} +1 -1
- 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} +87 -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} +90 -88
- 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 +171 -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 +6 -3
- 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 +4 -1
- 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 +5 -5
- 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 +8 -7
- package/split/_split-theme.scss +10 -3
- package/split/interface.d.ts +1 -2
- 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 -198
- 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 -285
- 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 -1583
- 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 -1430
- 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 -1078
- 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 -236
- 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 -620
- 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 -678
- 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 -256
- 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
|
@@ -1,1260 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/overlay'), require('@angular/cdk/a11y'), require('@angular/cdk/coercion'), require('@angular/cdk/keycodes'), require('@angular/cdk/bidi'), require('@angular/animations'), require('@angular/cdk/portal'), require('rxjs'), require('rxjs/operators')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@ng-matero/extensions/popover', ['exports', '@angular/core', '@angular/common', '@angular/cdk/overlay', '@angular/cdk/a11y', '@angular/cdk/coercion', '@angular/cdk/keycodes', '@angular/cdk/bidi', '@angular/animations', '@angular/cdk/portal', '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.popover = {}), global.ng.core, global.ng.common, global.ng.cdk.overlay, global.ng.cdk.a11y, global.ng.cdk.coercion, global.ng.cdk.keycodes, global.ng.cdk.bidi, global.ng.animations, global.ng.cdk.portal, global.rxjs, global.rxjs.operators));
|
|
5
|
-
}(this, (function (exports, core, common, overlay, a11y, coercion, keycodes, bidi, animations, portal, rxjs, operators) { 'use strict';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Throws an exception for the case when popover trigger doesn't have a valid mtx-popover instance
|
|
9
|
-
*/
|
|
10
|
-
function throwMtxPopoverMissingError() {
|
|
11
|
-
throw Error("mtx-popover-trigger: must pass in an mtx-popover instance.\n\n Example:\n <mtx-popover #popover=\"mtxPopover\"></mtx-popover>\n <button [mtxPopoverTriggerFor]=\"popover\"></button>");
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Throws an exception for the case when popover's mtxPopoverPosition[0] value isn't valid.
|
|
15
|
-
* In other words, it doesn't match 'above', 'below', 'before' or 'after'.
|
|
16
|
-
*/
|
|
17
|
-
function throwMtxPopoverInvalidPositionStart() {
|
|
18
|
-
throw Error("mtxPopoverPosition[0] value must be either 'above', 'below', 'before' or 'after'.\n Example: <mtx-popover [position]=\"['below', 'after']\" #popover=\"mtxPopover\"></mtx-popover>");
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Throws an exception for the case when popover's mtxPopoverPosition[1] value isn't valid.
|
|
22
|
-
* In other words, it doesn't match 'above', 'below', 'before', 'after' or 'center'.
|
|
23
|
-
*/
|
|
24
|
-
function throwMtxPopoverInvalidPositionEnd() {
|
|
25
|
-
throw Error("mtxPopoverPosition[1] value must be either 'above', 'below', 'before', 'after' or 'center'.\n Example: <mtx-popover [position]=\"['below', 'after']\" #popover=\"mtxPopover\"></mtx-popover>");
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Below are all the animations for the md-popover component.
|
|
30
|
-
* Animation duration and timing values are based on AngularJS Material.
|
|
31
|
-
*/
|
|
32
|
-
/**
|
|
33
|
-
* This animation controls the popover panel's entry and exit from the page.
|
|
34
|
-
*
|
|
35
|
-
* When the popover panel is added to the DOM, it scales in and fades in its border.
|
|
36
|
-
*
|
|
37
|
-
* When the popover panel is removed from the DOM, it simply fades out after a brief
|
|
38
|
-
* delay to display the ripple.
|
|
39
|
-
*/
|
|
40
|
-
var transformPopover = animations.trigger('transformPopover', [
|
|
41
|
-
animations.state('enter', animations.style({
|
|
42
|
-
opacity: 1,
|
|
43
|
-
transform: "scale(1)",
|
|
44
|
-
})),
|
|
45
|
-
animations.transition('void => *', [
|
|
46
|
-
animations.style({
|
|
47
|
-
opacity: 0,
|
|
48
|
-
transform: "scale(0)",
|
|
49
|
-
}),
|
|
50
|
-
animations.animate("200ms cubic-bezier(0.25, 0.8, 0.25, 1)"),
|
|
51
|
-
]),
|
|
52
|
-
animations.transition('* => void', [animations.animate('50ms 100ms linear', animations.style({ opacity: 0 }))]),
|
|
53
|
-
]);
|
|
54
|
-
|
|
55
|
-
var MtxPopover = /** @class */ (function () {
|
|
56
|
-
function MtxPopover(_dir, _elementRef, zone) {
|
|
57
|
-
this._dir = _dir;
|
|
58
|
-
this._elementRef = _elementRef;
|
|
59
|
-
this.zone = zone;
|
|
60
|
-
this.role = 'dialog';
|
|
61
|
-
/** Settings for popover, view setters and getters for more detail */
|
|
62
|
-
this._position = ['below', 'after'];
|
|
63
|
-
this._triggerEvent = 'hover';
|
|
64
|
-
this._scrollStrategy = 'reposition';
|
|
65
|
-
this._enterDelay = 100;
|
|
66
|
-
this._leaveDelay = 100;
|
|
67
|
-
this._panelOffsetX = 0;
|
|
68
|
-
this._panelOffsetY = 0;
|
|
69
|
-
this._closeOnPanelClick = false;
|
|
70
|
-
this._closeOnBackdropClick = true;
|
|
71
|
-
this._disableAnimation = false;
|
|
72
|
-
this._focusTrapEnabled = true;
|
|
73
|
-
this._focusTrapAutoCaptureEnabled = true;
|
|
74
|
-
this._arrowOffsetX = 20;
|
|
75
|
-
this._arrowOffsetY = 20;
|
|
76
|
-
this._arrowWidth = 16;
|
|
77
|
-
this._arrowHeight = 16;
|
|
78
|
-
/** Config object to be passed into the popover's ngClass */
|
|
79
|
-
this._classList = {};
|
|
80
|
-
/** Whether popover's `targetElement` is defined */
|
|
81
|
-
this.containerPositioning = false;
|
|
82
|
-
/** Closing disabled on popover */
|
|
83
|
-
this.closeDisabled = false;
|
|
84
|
-
/** Emits the current animation state whenever it changes. */
|
|
85
|
-
this._onAnimationStateChange = new core.EventEmitter();
|
|
86
|
-
/** Event emitted when the popover is closed. */
|
|
87
|
-
this.closed = new core.EventEmitter();
|
|
88
|
-
this.setPositionClasses();
|
|
89
|
-
}
|
|
90
|
-
Object.defineProperty(MtxPopover.prototype, "position", {
|
|
91
|
-
/** Position of the popover. */
|
|
92
|
-
get: function () {
|
|
93
|
-
return this._position;
|
|
94
|
-
},
|
|
95
|
-
set: function (value) {
|
|
96
|
-
if (!['before', 'after', 'above', 'below'].includes(value[0])) {
|
|
97
|
-
throwMtxPopoverInvalidPositionStart();
|
|
98
|
-
}
|
|
99
|
-
if (!['before', 'after', 'above', 'below', 'center'].includes(value[1])) {
|
|
100
|
-
throwMtxPopoverInvalidPositionEnd();
|
|
101
|
-
}
|
|
102
|
-
this._position = value;
|
|
103
|
-
this.setPositionClasses();
|
|
104
|
-
},
|
|
105
|
-
enumerable: false,
|
|
106
|
-
configurable: true
|
|
107
|
-
});
|
|
108
|
-
Object.defineProperty(MtxPopover.prototype, "triggerEvent", {
|
|
109
|
-
/** Popover trigger event */
|
|
110
|
-
get: function () {
|
|
111
|
-
return this._triggerEvent;
|
|
112
|
-
},
|
|
113
|
-
set: function (value) {
|
|
114
|
-
this._triggerEvent = value;
|
|
115
|
-
},
|
|
116
|
-
enumerable: false,
|
|
117
|
-
configurable: true
|
|
118
|
-
});
|
|
119
|
-
Object.defineProperty(MtxPopover.prototype, "scrollStrategy", {
|
|
120
|
-
/** Popover scroll strategy */
|
|
121
|
-
get: function () {
|
|
122
|
-
return this._scrollStrategy;
|
|
123
|
-
},
|
|
124
|
-
set: function (value) {
|
|
125
|
-
this._scrollStrategy = value;
|
|
126
|
-
},
|
|
127
|
-
enumerable: false,
|
|
128
|
-
configurable: true
|
|
129
|
-
});
|
|
130
|
-
Object.defineProperty(MtxPopover.prototype, "enterDelay", {
|
|
131
|
-
/** Popover enter delay */
|
|
132
|
-
get: function () {
|
|
133
|
-
return this._enterDelay;
|
|
134
|
-
},
|
|
135
|
-
set: function (value) {
|
|
136
|
-
this._enterDelay = value;
|
|
137
|
-
},
|
|
138
|
-
enumerable: false,
|
|
139
|
-
configurable: true
|
|
140
|
-
});
|
|
141
|
-
Object.defineProperty(MtxPopover.prototype, "leaveDelay", {
|
|
142
|
-
/** Popover leave delay */
|
|
143
|
-
get: function () {
|
|
144
|
-
return this._leaveDelay;
|
|
145
|
-
},
|
|
146
|
-
set: function (value) {
|
|
147
|
-
this._leaveDelay = value;
|
|
148
|
-
},
|
|
149
|
-
enumerable: false,
|
|
150
|
-
configurable: true
|
|
151
|
-
});
|
|
152
|
-
Object.defineProperty(MtxPopover.prototype, "xOffset", {
|
|
153
|
-
/** Popover target offset x */
|
|
154
|
-
get: function () {
|
|
155
|
-
return this._panelOffsetX;
|
|
156
|
-
},
|
|
157
|
-
set: function (value) {
|
|
158
|
-
this._panelOffsetX = value;
|
|
159
|
-
},
|
|
160
|
-
enumerable: false,
|
|
161
|
-
configurable: true
|
|
162
|
-
});
|
|
163
|
-
Object.defineProperty(MtxPopover.prototype, "yOffset", {
|
|
164
|
-
/** Popover target offset y */
|
|
165
|
-
get: function () {
|
|
166
|
-
return this._panelOffsetY;
|
|
167
|
-
},
|
|
168
|
-
set: function (value) {
|
|
169
|
-
this._panelOffsetY = value;
|
|
170
|
-
},
|
|
171
|
-
enumerable: false,
|
|
172
|
-
configurable: true
|
|
173
|
-
});
|
|
174
|
-
Object.defineProperty(MtxPopover.prototype, "arrowOffsetX", {
|
|
175
|
-
/** Popover arrow offset x */
|
|
176
|
-
get: function () {
|
|
177
|
-
return this._arrowOffsetX;
|
|
178
|
-
},
|
|
179
|
-
set: function (value) {
|
|
180
|
-
this._arrowOffsetX = value;
|
|
181
|
-
},
|
|
182
|
-
enumerable: false,
|
|
183
|
-
configurable: true
|
|
184
|
-
});
|
|
185
|
-
Object.defineProperty(MtxPopover.prototype, "arrowOffsetY", {
|
|
186
|
-
/** Popover arrow offset y */
|
|
187
|
-
get: function () {
|
|
188
|
-
return this._arrowOffsetY;
|
|
189
|
-
},
|
|
190
|
-
set: function (value) {
|
|
191
|
-
this._arrowOffsetY = value;
|
|
192
|
-
},
|
|
193
|
-
enumerable: false,
|
|
194
|
-
configurable: true
|
|
195
|
-
});
|
|
196
|
-
Object.defineProperty(MtxPopover.prototype, "arrowWidth", {
|
|
197
|
-
/** Popover arrow width */
|
|
198
|
-
get: function () {
|
|
199
|
-
return this._arrowWidth;
|
|
200
|
-
},
|
|
201
|
-
set: function (value) {
|
|
202
|
-
this._arrowWidth = value;
|
|
203
|
-
},
|
|
204
|
-
enumerable: false,
|
|
205
|
-
configurable: true
|
|
206
|
-
});
|
|
207
|
-
Object.defineProperty(MtxPopover.prototype, "arrowHeight", {
|
|
208
|
-
/** Popover arrow height */
|
|
209
|
-
get: function () {
|
|
210
|
-
return this._arrowHeight;
|
|
211
|
-
},
|
|
212
|
-
set: function (value) {
|
|
213
|
-
this._arrowHeight = value;
|
|
214
|
-
},
|
|
215
|
-
enumerable: false,
|
|
216
|
-
configurable: true
|
|
217
|
-
});
|
|
218
|
-
Object.defineProperty(MtxPopover.prototype, "closeOnPanelClick", {
|
|
219
|
-
/** Popover close on container click */
|
|
220
|
-
get: function () {
|
|
221
|
-
return this._closeOnPanelClick;
|
|
222
|
-
},
|
|
223
|
-
set: function (value) {
|
|
224
|
-
this._closeOnPanelClick = coercion.coerceBooleanProperty(value);
|
|
225
|
-
},
|
|
226
|
-
enumerable: false,
|
|
227
|
-
configurable: true
|
|
228
|
-
});
|
|
229
|
-
Object.defineProperty(MtxPopover.prototype, "closeOnBackdropClick", {
|
|
230
|
-
/** Popover close on backdrop click */
|
|
231
|
-
get: function () {
|
|
232
|
-
return this._closeOnBackdropClick;
|
|
233
|
-
},
|
|
234
|
-
set: function (value) {
|
|
235
|
-
this._closeOnBackdropClick = coercion.coerceBooleanProperty(value);
|
|
236
|
-
},
|
|
237
|
-
enumerable: false,
|
|
238
|
-
configurable: true
|
|
239
|
-
});
|
|
240
|
-
Object.defineProperty(MtxPopover.prototype, "disableAnimation", {
|
|
241
|
-
/** Disable animations of popover and all child elements */
|
|
242
|
-
get: function () {
|
|
243
|
-
return this._disableAnimation;
|
|
244
|
-
},
|
|
245
|
-
set: function (value) {
|
|
246
|
-
this._disableAnimation = coercion.coerceBooleanProperty(value);
|
|
247
|
-
},
|
|
248
|
-
enumerable: false,
|
|
249
|
-
configurable: true
|
|
250
|
-
});
|
|
251
|
-
Object.defineProperty(MtxPopover.prototype, "focusTrapEnabled", {
|
|
252
|
-
/** Popover focus trap using cdkTrapFocus */
|
|
253
|
-
get: function () {
|
|
254
|
-
return this._focusTrapEnabled;
|
|
255
|
-
},
|
|
256
|
-
set: function (value) {
|
|
257
|
-
this._focusTrapEnabled = coercion.coerceBooleanProperty(value);
|
|
258
|
-
},
|
|
259
|
-
enumerable: false,
|
|
260
|
-
configurable: true
|
|
261
|
-
});
|
|
262
|
-
Object.defineProperty(MtxPopover.prototype, "focusTrapAutoCaptureEnabled", {
|
|
263
|
-
/** Popover focus trap auto capture using cdkTrapFocusAutoCapture */
|
|
264
|
-
get: function () {
|
|
265
|
-
return this._focusTrapAutoCaptureEnabled;
|
|
266
|
-
},
|
|
267
|
-
set: function (value) {
|
|
268
|
-
this._focusTrapAutoCaptureEnabled = coercion.coerceBooleanProperty(value);
|
|
269
|
-
},
|
|
270
|
-
enumerable: false,
|
|
271
|
-
configurable: true
|
|
272
|
-
});
|
|
273
|
-
Object.defineProperty(MtxPopover.prototype, "panelClass", {
|
|
274
|
-
/**
|
|
275
|
-
* This method takes classes set on the host md-popover element and applies them on the
|
|
276
|
-
* popover template that displays in the overlay container. Otherwise, it's difficult
|
|
277
|
-
* to style the containing popover from outside the component.
|
|
278
|
-
* @param classes list of class names
|
|
279
|
-
*/
|
|
280
|
-
set: function (classes) {
|
|
281
|
-
if (classes && classes.length) {
|
|
282
|
-
this._classList = classes.split(' ').reduce(function (obj, className) {
|
|
283
|
-
obj[className] = true;
|
|
284
|
-
return obj;
|
|
285
|
-
}, {});
|
|
286
|
-
this._elementRef.nativeElement.className = '';
|
|
287
|
-
this.setPositionClasses();
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
enumerable: false,
|
|
291
|
-
configurable: true
|
|
292
|
-
});
|
|
293
|
-
Object.defineProperty(MtxPopover.prototype, "classList", {
|
|
294
|
-
/**
|
|
295
|
-
* This method takes classes set on the host md-popover element and applies them on the
|
|
296
|
-
* popover template that displays in the overlay container. Otherwise, it's difficult
|
|
297
|
-
* to style the containing popover from outside the component.
|
|
298
|
-
* @deprecated Use `panelClass` instead.
|
|
299
|
-
* @breaking-change 8.0.0
|
|
300
|
-
*/
|
|
301
|
-
get: function () {
|
|
302
|
-
return this.panelClass;
|
|
303
|
-
},
|
|
304
|
-
set: function (classes) {
|
|
305
|
-
this.panelClass = classes;
|
|
306
|
-
},
|
|
307
|
-
enumerable: false,
|
|
308
|
-
configurable: true
|
|
309
|
-
});
|
|
310
|
-
MtxPopover.prototype.ngOnDestroy = function () {
|
|
311
|
-
this._emitCloseEvent();
|
|
312
|
-
this.closed.complete();
|
|
313
|
-
};
|
|
314
|
-
/** Handle a keyboard event from the popover, delegating to the appropriate action. */
|
|
315
|
-
MtxPopover.prototype._handleKeydown = function (event) {
|
|
316
|
-
switch (event.keyCode) {
|
|
317
|
-
case keycodes.ESCAPE:
|
|
318
|
-
this._emitCloseEvent();
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
/**
|
|
323
|
-
* This emits a close event to which the trigger is subscribed. When emitted, the
|
|
324
|
-
* trigger will close the popover.
|
|
325
|
-
*/
|
|
326
|
-
MtxPopover.prototype._emitCloseEvent = function () {
|
|
327
|
-
this.closed.emit();
|
|
328
|
-
};
|
|
329
|
-
/** Close popover on click if closeOnPanelClick is true */
|
|
330
|
-
MtxPopover.prototype.onClick = function () {
|
|
331
|
-
if (this.closeOnPanelClick) {
|
|
332
|
-
this._emitCloseEvent();
|
|
333
|
-
}
|
|
334
|
-
};
|
|
335
|
-
/**
|
|
336
|
-
* TODO: Refactor when @angular/cdk includes feature I mentioned on github see link below.
|
|
337
|
-
* https://github.com/angular/material2/pull/5493#issuecomment-313085323
|
|
338
|
-
*/
|
|
339
|
-
/** Disables close of popover when leaving trigger element and mouse over the popover */
|
|
340
|
-
MtxPopover.prototype.onMouseOver = function () {
|
|
341
|
-
if (this.triggerEvent === 'hover') {
|
|
342
|
-
this.closeDisabled = true;
|
|
343
|
-
}
|
|
344
|
-
};
|
|
345
|
-
/** Enables close of popover when mouse leaving popover element */
|
|
346
|
-
MtxPopover.prototype.onMouseLeave = function () {
|
|
347
|
-
if (this.triggerEvent === 'hover') {
|
|
348
|
-
this.closeDisabled = false;
|
|
349
|
-
this._emitCloseEvent();
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
// TODO: Refactor how styles are set and updated on the component, use best practices.
|
|
353
|
-
// TODO: If arrow left and right positioning is requested, see if flex direction can be used to work with order.
|
|
354
|
-
/** Sets the current styles for the popover to allow for dynamically changing settings */
|
|
355
|
-
MtxPopover.prototype.setCurrentStyles = function (pos) {
|
|
356
|
-
if (pos === void 0) { pos = this.position; }
|
|
357
|
-
var left = pos[1] === 'after'
|
|
358
|
-
? this.arrowOffsetX - this.arrowWidth / 2 + "px"
|
|
359
|
-
: pos[1] === 'center'
|
|
360
|
-
? "calc(50% - " + this.arrowWidth / 2 + "px)"
|
|
361
|
-
: '';
|
|
362
|
-
var right = pos[1] === 'before' ? this.arrowOffsetX - this.arrowWidth / 2 + "px" : '';
|
|
363
|
-
var bottom = pos[1] === 'above'
|
|
364
|
-
? this.arrowOffsetY - this.arrowHeight / 2 + "px"
|
|
365
|
-
: pos[1] === 'center'
|
|
366
|
-
? "calc(50% - " + this.arrowHeight / 2 + "px)"
|
|
367
|
-
: '';
|
|
368
|
-
var top = pos[1] === 'below' ? this.arrowOffsetY - this.arrowHeight / 2 + "px" : '';
|
|
369
|
-
this.popoverArrowStyles =
|
|
370
|
-
pos[0] === 'above' || pos[0] === 'below'
|
|
371
|
-
? {
|
|
372
|
-
left: this._dir.value === 'ltr' ? left : right,
|
|
373
|
-
right: this._dir.value === 'ltr' ? right : left,
|
|
374
|
-
}
|
|
375
|
-
: {
|
|
376
|
-
top: top,
|
|
377
|
-
bottom: bottom,
|
|
378
|
-
};
|
|
379
|
-
};
|
|
380
|
-
/**
|
|
381
|
-
* It's necessary to set position-based classes to ensure the popover panel animation
|
|
382
|
-
* folds out from the correct direction.
|
|
383
|
-
*/
|
|
384
|
-
MtxPopover.prototype.setPositionClasses = function (pos) {
|
|
385
|
-
if (pos === void 0) { pos = this.position; }
|
|
386
|
-
this._classList['mtx-popover-before-above'] = pos[0] === 'before' && pos[1] === 'above';
|
|
387
|
-
this._classList['mtx-popover-before-center'] = pos[0] === 'before' && pos[1] === 'center';
|
|
388
|
-
this._classList['mtx-popover-before-below'] = pos[0] === 'before' && pos[1] === 'below';
|
|
389
|
-
this._classList['mtx-popover-after-above'] = pos[0] === 'after' && pos[1] === 'above';
|
|
390
|
-
this._classList['mtx-popover-after-center'] = pos[0] === 'after' && pos[1] === 'center';
|
|
391
|
-
this._classList['mtx-popover-after-below'] = pos[0] === 'after' && pos[1] === 'below';
|
|
392
|
-
this._classList['mtx-popover-above-before'] = pos[0] === 'above' && pos[1] === 'before';
|
|
393
|
-
this._classList['mtx-popover-above-center'] = pos[0] === 'above' && pos[1] === 'center';
|
|
394
|
-
this._classList['mtx-popover-above-after'] = pos[0] === 'above' && pos[1] === 'after';
|
|
395
|
-
this._classList['mtx-popover-below-before'] = pos[0] === 'below' && pos[1] === 'before';
|
|
396
|
-
this._classList['mtx-popover-below-center'] = pos[0] === 'below' && pos[1] === 'center';
|
|
397
|
-
this._classList['mtx-popover-below-after'] = pos[0] === 'below' && pos[1] === 'after';
|
|
398
|
-
};
|
|
399
|
-
return MtxPopover;
|
|
400
|
-
}());
|
|
401
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
402
|
-
MtxPopover.decorators = [
|
|
403
|
-
{ type: core.Component, args: [{
|
|
404
|
-
selector: 'mtx-popover',
|
|
405
|
-
template: "<ng-template>\r\n <div class=\"mtx-popover-panel mat-elevation-z8\" role=\"dialog\"\r\n [ngClass]=\"_classList\"\r\n [ngStyle]=\"popoverPanelStyles\"\r\n (keydown)=\"_handleKeydown($event)\"\r\n (click)=\"onClick()\"\r\n (mouseover)=\"onMouseOver()\"\r\n (mouseleave)=\"onMouseLeave()\"\r\n [@.disabled]=\"disableAnimation\"\r\n [@transformPopover]=\"'enter'\">\r\n <div class=\"mtx-popover-direction-arrow\" [ngStyle]=\"popoverArrowStyles\"></div>\r\n <div class=\"mtx-popover-content\"\r\n [ngStyle]=\"popoverContentStyles\"\r\n [cdkTrapFocus]=\"focusTrapEnabled\"\r\n [cdkTrapFocusAutoCapture]=\"focusTrapAutoCaptureEnabled\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>\r\n",
|
|
406
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
407
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
408
|
-
animations: [transformPopover],
|
|
409
|
-
exportAs: 'mtxPopover',
|
|
410
|
-
styles: [".mtx-popover-panel{max-height:calc(100vh - 48px);padding:8px;border-radius:4px;font-size:16px}.mtx-popover-panel[class*=mtx-popover-below]{margin-top:calc(.5em + 2px)}.mtx-popover-panel[class*=mtx-popover-above]{margin-bottom:calc(.5em + 2px)}.mtx-popover-panel[class*=mtx-popover-before]{margin-right:calc(.5em + 2px)}[dir=rtl] .mtx-popover-panel[class*=mtx-popover-before]{margin-right:auto;margin-left:calc(.5em + 2px)}.mtx-popover-panel[class*=mtx-popover-after]{margin-left:calc(.5em + 2px)}[dir=rtl] .mtx-popover-panel[class*=mtx-popover-after]{margin-left:auto;margin-right:calc(.5em + 2px)}.mtx-popover-direction-arrow{position:absolute}.mtx-popover-direction-arrow:before,.mtx-popover-direction-arrow:after{position:absolute;display:inline-block;content:\"\";border-width:.5em;border-style:solid}.mtx-popover-direction-arrow:after{border-width:calc(.5em - 1px)}[class*=mtx-popover-below] .mtx-popover-direction-arrow,[class*=mtx-popover-above] .mtx-popover-direction-arrow{width:1em}[class*=mtx-popover-below] .mtx-popover-direction-arrow:after,[class*=mtx-popover-above] .mtx-popover-direction-arrow:after{left:1px}[dir=rtl] [class*=mtx-popover-below] .mtx-popover-direction-arrow:after,[dir=rtl] [class*=mtx-popover-above] .mtx-popover-direction-arrow:after{right:1px;left:auto}[class*=mtx-popover-below] .mtx-popover-direction-arrow{top:0}[class*=mtx-popover-below] .mtx-popover-direction-arrow:before,[class*=mtx-popover-below] .mtx-popover-direction-arrow:after{bottom:0;border-top-width:0}[class*=mtx-popover-above] .mtx-popover-direction-arrow{bottom:0}[class*=mtx-popover-above] .mtx-popover-direction-arrow:before,[class*=mtx-popover-above] .mtx-popover-direction-arrow:after{top:0;border-bottom-width:0}[class*=mtx-popover-before] .mtx-popover-direction-arrow,[class*=mtx-popover-after] .mtx-popover-direction-arrow{height:1em}[class*=mtx-popover-before] .mtx-popover-direction-arrow:after,[class*=mtx-popover-after] .mtx-popover-direction-arrow:after{top:1px}[class*=mtx-popover-before] .mtx-popover-direction-arrow{right:0}[class*=mtx-popover-before] .mtx-popover-direction-arrow:before,[class*=mtx-popover-before] .mtx-popover-direction-arrow:after{left:0;border-right-width:0}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow{right:auto;left:0}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:before,[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:after{left:auto;right:0;border-left-width:0}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:before{border-right-width:.5em}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:after{border-right-width:calc(.5em - 1px)}[class*=mtx-popover-after] .mtx-popover-direction-arrow{left:0}[class*=mtx-popover-after] .mtx-popover-direction-arrow:before,[class*=mtx-popover-after] .mtx-popover-direction-arrow:after{right:0;border-left-width:0}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow{left:auto;right:0}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:before,[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:after{right:auto;left:0;border-right-width:0}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:before{border-left-width:.5em}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:after{border-left-width:calc(.5em - 1px)}\n"]
|
|
411
|
-
},] }
|
|
412
|
-
];
|
|
413
|
-
/**
|
|
414
|
-
* @type {function(): !Array<(null|{
|
|
415
|
-
* type: ?,
|
|
416
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
417
|
-
* })>}
|
|
418
|
-
* @nocollapse
|
|
419
|
-
*/
|
|
420
|
-
MtxPopover.ctorParameters = function () { return [
|
|
421
|
-
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
422
|
-
{ type: core.ElementRef },
|
|
423
|
-
{ type: core.NgZone }
|
|
424
|
-
]; };
|
|
425
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
426
|
-
MtxPopover.propDecorators = {
|
|
427
|
-
role: [{ type: core.HostBinding, args: ['attr.role',] }],
|
|
428
|
-
position: [{ type: core.Input }],
|
|
429
|
-
triggerEvent: [{ type: core.Input }],
|
|
430
|
-
scrollStrategy: [{ type: core.Input }],
|
|
431
|
-
enterDelay: [{ type: core.Input }],
|
|
432
|
-
leaveDelay: [{ type: core.Input }],
|
|
433
|
-
xOffset: [{ type: core.Input }],
|
|
434
|
-
yOffset: [{ type: core.Input }],
|
|
435
|
-
arrowOffsetX: [{ type: core.Input }],
|
|
436
|
-
arrowOffsetY: [{ type: core.Input }],
|
|
437
|
-
arrowWidth: [{ type: core.Input }],
|
|
438
|
-
arrowHeight: [{ type: core.Input }],
|
|
439
|
-
closeOnPanelClick: [{ type: core.Input }],
|
|
440
|
-
closeOnBackdropClick: [{ type: core.Input }],
|
|
441
|
-
disableAnimation: [{ type: core.Input }],
|
|
442
|
-
focusTrapEnabled: [{ type: core.Input }],
|
|
443
|
-
focusTrapAutoCaptureEnabled: [{ type: core.Input }],
|
|
444
|
-
panelClass: [{ type: core.Input, args: ['class',] }],
|
|
445
|
-
classList: [{ type: core.Input }],
|
|
446
|
-
closed: [{ type: core.Output }],
|
|
447
|
-
templateRef: [{ type: core.ViewChild, args: [core.TemplateRef,] }]
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
/*! *****************************************************************************
|
|
451
|
-
Copyright (c) Microsoft Corporation.
|
|
452
|
-
|
|
453
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
454
|
-
purpose with or without fee is hereby granted.
|
|
455
|
-
|
|
456
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
457
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
458
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
459
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
460
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
461
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
462
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
463
|
-
***************************************************************************** */
|
|
464
|
-
/* global Reflect, Promise */
|
|
465
|
-
var extendStatics = function (d, b) {
|
|
466
|
-
extendStatics = Object.setPrototypeOf ||
|
|
467
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
468
|
-
function (d, b) { for (var p in b)
|
|
469
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
470
|
-
d[p] = b[p]; };
|
|
471
|
-
return extendStatics(d, b);
|
|
472
|
-
};
|
|
473
|
-
function __extends(d, b) {
|
|
474
|
-
if (typeof b !== "function" && b !== null)
|
|
475
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
476
|
-
extendStatics(d, b);
|
|
477
|
-
function __() { this.constructor = d; }
|
|
478
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
479
|
-
}
|
|
480
|
-
var __assign = function () {
|
|
481
|
-
__assign = Object.assign || function __assign(t) {
|
|
482
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
483
|
-
s = arguments[i];
|
|
484
|
-
for (var p in s)
|
|
485
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
486
|
-
t[p] = s[p];
|
|
487
|
-
}
|
|
488
|
-
return t;
|
|
489
|
-
};
|
|
490
|
-
return __assign.apply(this, arguments);
|
|
491
|
-
};
|
|
492
|
-
function __rest(s, e) {
|
|
493
|
-
var t = {};
|
|
494
|
-
for (var p in s)
|
|
495
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
496
|
-
t[p] = s[p];
|
|
497
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
498
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
499
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
500
|
-
t[p[i]] = s[p[i]];
|
|
501
|
-
}
|
|
502
|
-
return t;
|
|
503
|
-
}
|
|
504
|
-
function __decorate(decorators, target, key, desc) {
|
|
505
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
506
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
507
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
508
|
-
else
|
|
509
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
510
|
-
if (d = decorators[i])
|
|
511
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
512
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
513
|
-
}
|
|
514
|
-
function __param(paramIndex, decorator) {
|
|
515
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
516
|
-
}
|
|
517
|
-
function __metadata(metadataKey, metadataValue) {
|
|
518
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
519
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
520
|
-
}
|
|
521
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
522
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
523
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
524
|
-
function fulfilled(value) { try {
|
|
525
|
-
step(generator.next(value));
|
|
526
|
-
}
|
|
527
|
-
catch (e) {
|
|
528
|
-
reject(e);
|
|
529
|
-
} }
|
|
530
|
-
function rejected(value) { try {
|
|
531
|
-
step(generator["throw"](value));
|
|
532
|
-
}
|
|
533
|
-
catch (e) {
|
|
534
|
-
reject(e);
|
|
535
|
-
} }
|
|
536
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
537
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
function __generator(thisArg, body) {
|
|
541
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
542
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
543
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
544
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
545
|
-
function step(op) {
|
|
546
|
-
if (f)
|
|
547
|
-
throw new TypeError("Generator is already executing.");
|
|
548
|
-
while (_)
|
|
549
|
-
try {
|
|
550
|
-
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)
|
|
551
|
-
return t;
|
|
552
|
-
if (y = 0, t)
|
|
553
|
-
op = [op[0] & 2, t.value];
|
|
554
|
-
switch (op[0]) {
|
|
555
|
-
case 0:
|
|
556
|
-
case 1:
|
|
557
|
-
t = op;
|
|
558
|
-
break;
|
|
559
|
-
case 4:
|
|
560
|
-
_.label++;
|
|
561
|
-
return { value: op[1], done: false };
|
|
562
|
-
case 5:
|
|
563
|
-
_.label++;
|
|
564
|
-
y = op[1];
|
|
565
|
-
op = [0];
|
|
566
|
-
continue;
|
|
567
|
-
case 7:
|
|
568
|
-
op = _.ops.pop();
|
|
569
|
-
_.trys.pop();
|
|
570
|
-
continue;
|
|
571
|
-
default:
|
|
572
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
573
|
-
_ = 0;
|
|
574
|
-
continue;
|
|
575
|
-
}
|
|
576
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
577
|
-
_.label = op[1];
|
|
578
|
-
break;
|
|
579
|
-
}
|
|
580
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
581
|
-
_.label = t[1];
|
|
582
|
-
t = op;
|
|
583
|
-
break;
|
|
584
|
-
}
|
|
585
|
-
if (t && _.label < t[2]) {
|
|
586
|
-
_.label = t[2];
|
|
587
|
-
_.ops.push(op);
|
|
588
|
-
break;
|
|
589
|
-
}
|
|
590
|
-
if (t[2])
|
|
591
|
-
_.ops.pop();
|
|
592
|
-
_.trys.pop();
|
|
593
|
-
continue;
|
|
594
|
-
}
|
|
595
|
-
op = body.call(thisArg, _);
|
|
596
|
-
}
|
|
597
|
-
catch (e) {
|
|
598
|
-
op = [6, e];
|
|
599
|
-
y = 0;
|
|
600
|
-
}
|
|
601
|
-
finally {
|
|
602
|
-
f = t = 0;
|
|
603
|
-
}
|
|
604
|
-
if (op[0] & 5)
|
|
605
|
-
throw op[1];
|
|
606
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
610
|
-
if (k2 === undefined)
|
|
611
|
-
k2 = k;
|
|
612
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
613
|
-
}) : (function (o, m, k, k2) {
|
|
614
|
-
if (k2 === undefined)
|
|
615
|
-
k2 = k;
|
|
616
|
-
o[k2] = m[k];
|
|
617
|
-
});
|
|
618
|
-
function __exportStar(m, o) {
|
|
619
|
-
for (var p in m)
|
|
620
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
621
|
-
__createBinding(o, m, p);
|
|
622
|
-
}
|
|
623
|
-
function __values(o) {
|
|
624
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
625
|
-
if (m)
|
|
626
|
-
return m.call(o);
|
|
627
|
-
if (o && typeof o.length === "number")
|
|
628
|
-
return {
|
|
629
|
-
next: function () {
|
|
630
|
-
if (o && i >= o.length)
|
|
631
|
-
o = void 0;
|
|
632
|
-
return { value: o && o[i++], done: !o };
|
|
633
|
-
}
|
|
634
|
-
};
|
|
635
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
636
|
-
}
|
|
637
|
-
function __read(o, n) {
|
|
638
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
639
|
-
if (!m)
|
|
640
|
-
return o;
|
|
641
|
-
var i = m.call(o), r, ar = [], e;
|
|
642
|
-
try {
|
|
643
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
644
|
-
ar.push(r.value);
|
|
645
|
-
}
|
|
646
|
-
catch (error) {
|
|
647
|
-
e = { error: error };
|
|
648
|
-
}
|
|
649
|
-
finally {
|
|
650
|
-
try {
|
|
651
|
-
if (r && !r.done && (m = i["return"]))
|
|
652
|
-
m.call(i);
|
|
653
|
-
}
|
|
654
|
-
finally {
|
|
655
|
-
if (e)
|
|
656
|
-
throw e.error;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
return ar;
|
|
660
|
-
}
|
|
661
|
-
/** @deprecated */
|
|
662
|
-
function __spread() {
|
|
663
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
664
|
-
ar = ar.concat(__read(arguments[i]));
|
|
665
|
-
return ar;
|
|
666
|
-
}
|
|
667
|
-
/** @deprecated */
|
|
668
|
-
function __spreadArrays() {
|
|
669
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
670
|
-
s += arguments[i].length;
|
|
671
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
672
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
673
|
-
r[k] = a[j];
|
|
674
|
-
return r;
|
|
675
|
-
}
|
|
676
|
-
function __spreadArray(to, from, pack) {
|
|
677
|
-
if (pack || arguments.length === 2)
|
|
678
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
679
|
-
if (ar || !(i in from)) {
|
|
680
|
-
if (!ar)
|
|
681
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
682
|
-
ar[i] = from[i];
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
return to.concat(ar || from);
|
|
686
|
-
}
|
|
687
|
-
function __await(v) {
|
|
688
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
689
|
-
}
|
|
690
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
691
|
-
if (!Symbol.asyncIterator)
|
|
692
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
693
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
694
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
695
|
-
function verb(n) { if (g[n])
|
|
696
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
697
|
-
function resume(n, v) { try {
|
|
698
|
-
step(g[n](v));
|
|
699
|
-
}
|
|
700
|
-
catch (e) {
|
|
701
|
-
settle(q[0][3], e);
|
|
702
|
-
} }
|
|
703
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
704
|
-
function fulfill(value) { resume("next", value); }
|
|
705
|
-
function reject(value) { resume("throw", value); }
|
|
706
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
707
|
-
resume(q[0][0], q[0][1]); }
|
|
708
|
-
}
|
|
709
|
-
function __asyncDelegator(o) {
|
|
710
|
-
var i, p;
|
|
711
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
712
|
-
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; }
|
|
713
|
-
}
|
|
714
|
-
function __asyncValues(o) {
|
|
715
|
-
if (!Symbol.asyncIterator)
|
|
716
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
717
|
-
var m = o[Symbol.asyncIterator], i;
|
|
718
|
-
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);
|
|
719
|
-
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); }); }; }
|
|
720
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
721
|
-
}
|
|
722
|
-
function __makeTemplateObject(cooked, raw) {
|
|
723
|
-
if (Object.defineProperty) {
|
|
724
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
725
|
-
}
|
|
726
|
-
else {
|
|
727
|
-
cooked.raw = raw;
|
|
728
|
-
}
|
|
729
|
-
return cooked;
|
|
730
|
-
}
|
|
731
|
-
;
|
|
732
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
733
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
734
|
-
}) : function (o, v) {
|
|
735
|
-
o["default"] = v;
|
|
736
|
-
};
|
|
737
|
-
function __importStar(mod) {
|
|
738
|
-
if (mod && mod.__esModule)
|
|
739
|
-
return mod;
|
|
740
|
-
var result = {};
|
|
741
|
-
if (mod != null)
|
|
742
|
-
for (var k in mod)
|
|
743
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
744
|
-
__createBinding(result, mod, k);
|
|
745
|
-
__setModuleDefault(result, mod);
|
|
746
|
-
return result;
|
|
747
|
-
}
|
|
748
|
-
function __importDefault(mod) {
|
|
749
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
750
|
-
}
|
|
751
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
752
|
-
if (kind === "a" && !f)
|
|
753
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
754
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
755
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
756
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
757
|
-
}
|
|
758
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
759
|
-
if (kind === "m")
|
|
760
|
-
throw new TypeError("Private method is not writable");
|
|
761
|
-
if (kind === "a" && !f)
|
|
762
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
763
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
764
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
765
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
* This directive is intended to be used in conjunction with an mtx-popover tag. It is
|
|
770
|
-
* responsible for toggling the display of the provided popover instance.
|
|
771
|
-
*/
|
|
772
|
-
var MtxPopoverTrigger = /** @class */ (function () {
|
|
773
|
-
function MtxPopoverTrigger(_overlay, _elementRef, _viewContainerRef, _dir, _changeDetectorRef) {
|
|
774
|
-
this._overlay = _overlay;
|
|
775
|
-
this._elementRef = _elementRef;
|
|
776
|
-
this._viewContainerRef = _viewContainerRef;
|
|
777
|
-
this._dir = _dir;
|
|
778
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
779
|
-
this.ariaHaspopup = true;
|
|
780
|
-
this.popoverOpened$ = new rxjs.Subject();
|
|
781
|
-
this.popoverClosed$ = new rxjs.Subject();
|
|
782
|
-
this._overlayRef = null;
|
|
783
|
-
this._popoverOpen = false;
|
|
784
|
-
this._halt = false;
|
|
785
|
-
// tracking input type is necessary so it's possible to only auto-focus
|
|
786
|
-
// the first item of the list when the popover is opened via the keyboard
|
|
787
|
-
this._openedByMouse = false;
|
|
788
|
-
this._onDestroy = new rxjs.Subject();
|
|
789
|
-
/** Event emitted when the associated popover is opened. */
|
|
790
|
-
this.popoverOpened = new core.EventEmitter();
|
|
791
|
-
/** Event emitted when the associated popover is closed. */
|
|
792
|
-
this.popoverClosed = new core.EventEmitter();
|
|
793
|
-
}
|
|
794
|
-
MtxPopoverTrigger.prototype.ngAfterViewInit = function () {
|
|
795
|
-
var _this = this;
|
|
796
|
-
this._checkPopover();
|
|
797
|
-
this._setCurrentConfig();
|
|
798
|
-
this.popover.closed.subscribe(function () { return _this.closePopover(); });
|
|
799
|
-
};
|
|
800
|
-
MtxPopoverTrigger.prototype.ngOnDestroy = function () {
|
|
801
|
-
this.destroyPopover();
|
|
802
|
-
};
|
|
803
|
-
MtxPopoverTrigger.prototype._setCurrentConfig = function () {
|
|
804
|
-
if (this.triggerEvent) {
|
|
805
|
-
this.popover.triggerEvent = this.triggerEvent;
|
|
806
|
-
}
|
|
807
|
-
this.popover.setCurrentStyles();
|
|
808
|
-
};
|
|
809
|
-
Object.defineProperty(MtxPopoverTrigger.prototype, "popoverOpen", {
|
|
810
|
-
/** Whether the popover is open. */
|
|
811
|
-
get: function () {
|
|
812
|
-
return this._popoverOpen;
|
|
813
|
-
},
|
|
814
|
-
enumerable: false,
|
|
815
|
-
configurable: true
|
|
816
|
-
});
|
|
817
|
-
MtxPopoverTrigger.prototype.onClick = function (event) {
|
|
818
|
-
if (this.popover.triggerEvent === 'click') {
|
|
819
|
-
this.togglePopover();
|
|
820
|
-
}
|
|
821
|
-
};
|
|
822
|
-
MtxPopoverTrigger.prototype.onMouseEnter = function (event) {
|
|
823
|
-
var _this = this;
|
|
824
|
-
this._halt = false;
|
|
825
|
-
if (this.popover.triggerEvent === 'hover') {
|
|
826
|
-
this._mouseoverTimer = setTimeout(function () {
|
|
827
|
-
_this.openPopover();
|
|
828
|
-
}, this.popover.enterDelay);
|
|
829
|
-
}
|
|
830
|
-
};
|
|
831
|
-
MtxPopoverTrigger.prototype.onMouseLeave = function (event) {
|
|
832
|
-
var _this = this;
|
|
833
|
-
if (this.popover.triggerEvent === 'hover') {
|
|
834
|
-
if (this._mouseoverTimer) {
|
|
835
|
-
clearTimeout(this._mouseoverTimer);
|
|
836
|
-
this._mouseoverTimer = null;
|
|
837
|
-
}
|
|
838
|
-
if (this._popoverOpen) {
|
|
839
|
-
setTimeout(function () {
|
|
840
|
-
if (!_this.popover.closeDisabled) {
|
|
841
|
-
_this.closePopover();
|
|
842
|
-
}
|
|
843
|
-
}, this.popover.leaveDelay);
|
|
844
|
-
}
|
|
845
|
-
else {
|
|
846
|
-
this._halt = true;
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
};
|
|
850
|
-
/** Toggles the popover between the open and closed states. */
|
|
851
|
-
MtxPopoverTrigger.prototype.togglePopover = function () {
|
|
852
|
-
return this._popoverOpen ? this.closePopover() : this.openPopover();
|
|
853
|
-
};
|
|
854
|
-
/** Opens the popover. */
|
|
855
|
-
MtxPopoverTrigger.prototype.openPopover = function () {
|
|
856
|
-
if (!this._popoverOpen && !this._halt) {
|
|
857
|
-
this._createOverlay().attach(this._portal);
|
|
858
|
-
this._subscribeToBackdrop();
|
|
859
|
-
this._subscribeToDetachments();
|
|
860
|
-
this._initPopover();
|
|
861
|
-
}
|
|
862
|
-
};
|
|
863
|
-
/** Closes the popover. */
|
|
864
|
-
MtxPopoverTrigger.prototype.closePopover = function () {
|
|
865
|
-
if (this._overlayRef) {
|
|
866
|
-
this._overlayRef.detach();
|
|
867
|
-
this._resetPopover();
|
|
868
|
-
}
|
|
869
|
-
this.destroyPopover();
|
|
870
|
-
};
|
|
871
|
-
/** Removes the popover from the DOM. */
|
|
872
|
-
MtxPopoverTrigger.prototype.destroyPopover = function () {
|
|
873
|
-
if (this._mouseoverTimer) {
|
|
874
|
-
clearTimeout(this._mouseoverTimer);
|
|
875
|
-
this._mouseoverTimer = null;
|
|
876
|
-
}
|
|
877
|
-
if (this._overlayRef) {
|
|
878
|
-
this._overlayRef.dispose();
|
|
879
|
-
this._overlayRef = null;
|
|
880
|
-
this._cleanUpSubscriptions();
|
|
881
|
-
}
|
|
882
|
-
this._onDestroy.next();
|
|
883
|
-
this._onDestroy.complete();
|
|
884
|
-
};
|
|
885
|
-
/** Focuses the popover trigger. */
|
|
886
|
-
MtxPopoverTrigger.prototype.focus = function () {
|
|
887
|
-
this._elementRef.nativeElement.focus();
|
|
888
|
-
};
|
|
889
|
-
Object.defineProperty(MtxPopoverTrigger.prototype, "dir", {
|
|
890
|
-
/** The text direction of the containing app. */
|
|
891
|
-
get: function () {
|
|
892
|
-
return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
893
|
-
},
|
|
894
|
-
enumerable: false,
|
|
895
|
-
configurable: true
|
|
896
|
-
});
|
|
897
|
-
/**
|
|
898
|
-
* This method ensures that the popover closes when the overlay backdrop is clicked.
|
|
899
|
-
* We do not use first() here because doing so would not catch clicks from within
|
|
900
|
-
* the popover, and it would fail to unsubscribe properly. Instead, we unsubscribe
|
|
901
|
-
* explicitly when the popover is closed or destroyed.
|
|
902
|
-
*/
|
|
903
|
-
MtxPopoverTrigger.prototype._subscribeToBackdrop = function () {
|
|
904
|
-
var _this = this;
|
|
905
|
-
if (this._overlayRef) {
|
|
906
|
-
/** Only subscribe to backdrop if trigger event is click */
|
|
907
|
-
if (this.triggerEvent === 'click' && this.popover.closeOnBackdropClick === true) {
|
|
908
|
-
this._overlayRef
|
|
909
|
-
.backdropClick()
|
|
910
|
-
.pipe(operators.takeUntil(this.popoverClosed$), operators.takeUntil(this._onDestroy))
|
|
911
|
-
.subscribe(function () {
|
|
912
|
-
_this.popover._emitCloseEvent();
|
|
913
|
-
});
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
};
|
|
917
|
-
MtxPopoverTrigger.prototype._subscribeToDetachments = function () {
|
|
918
|
-
var _this = this;
|
|
919
|
-
if (this._overlayRef) {
|
|
920
|
-
this._overlayRef
|
|
921
|
-
.detachments()
|
|
922
|
-
.pipe(operators.takeUntil(this.popoverClosed$), operators.takeUntil(this._onDestroy))
|
|
923
|
-
.subscribe(function () {
|
|
924
|
-
_this._setPopoverClosed();
|
|
925
|
-
});
|
|
926
|
-
}
|
|
927
|
-
};
|
|
928
|
-
/**
|
|
929
|
-
* This method sets the popover state to open and focuses the first item if
|
|
930
|
-
* the popover was opened via the keyboard.
|
|
931
|
-
*/
|
|
932
|
-
MtxPopoverTrigger.prototype._initPopover = function () {
|
|
933
|
-
this._setPopoverOpened();
|
|
934
|
-
};
|
|
935
|
-
/**
|
|
936
|
-
* This method resets the popover when it's closed, most importantly restoring
|
|
937
|
-
* focus to the popover trigger if the popover was opened via the keyboard.
|
|
938
|
-
*/
|
|
939
|
-
MtxPopoverTrigger.prototype._resetPopover = function () {
|
|
940
|
-
this._setPopoverClosed();
|
|
941
|
-
// Focus only needs to be reset to the host element if the popover was opened
|
|
942
|
-
// by the keyboard and manually shifted to the first popover item.
|
|
943
|
-
if (!this._openedByMouse) {
|
|
944
|
-
this.focus();
|
|
945
|
-
}
|
|
946
|
-
this._openedByMouse = false;
|
|
947
|
-
};
|
|
948
|
-
/** set state rather than toggle to support triggers sharing a popover */
|
|
949
|
-
MtxPopoverTrigger.prototype._setPopoverOpened = function () {
|
|
950
|
-
if (!this._popoverOpen) {
|
|
951
|
-
this._popoverOpen = true;
|
|
952
|
-
this.popoverOpened$.next();
|
|
953
|
-
this.popoverOpened.emit();
|
|
954
|
-
}
|
|
955
|
-
};
|
|
956
|
-
/** set state rather than toggle to support triggers sharing a popover */
|
|
957
|
-
MtxPopoverTrigger.prototype._setPopoverClosed = function () {
|
|
958
|
-
if (this._popoverOpen) {
|
|
959
|
-
this._popoverOpen = false;
|
|
960
|
-
this.popoverClosed$.next();
|
|
961
|
-
this.popoverClosed.emit();
|
|
962
|
-
}
|
|
963
|
-
};
|
|
964
|
-
/**
|
|
965
|
-
* This method checks that a valid instance of MdPopover has been passed into
|
|
966
|
-
* mdPopoverTriggerFor. If not, an exception is thrown.
|
|
967
|
-
*/
|
|
968
|
-
MtxPopoverTrigger.prototype._checkPopover = function () {
|
|
969
|
-
if (!this.popover) {
|
|
970
|
-
throwMtxPopoverMissingError();
|
|
971
|
-
}
|
|
972
|
-
};
|
|
973
|
-
/**
|
|
974
|
-
* This method creates the overlay from the provided popover's template and saves its
|
|
975
|
-
* OverlayRef so that it can be attached to the DOM when openPopover is called.
|
|
976
|
-
*/
|
|
977
|
-
MtxPopoverTrigger.prototype._createOverlay = function () {
|
|
978
|
-
if (!this._overlayRef) {
|
|
979
|
-
this._portal = new portal.TemplatePortal(this.popover.templateRef, this._viewContainerRef);
|
|
980
|
-
var config = this._getOverlayConfig();
|
|
981
|
-
this._subscribeToPositions(config.positionStrategy);
|
|
982
|
-
this._overlayRef = this._overlay.create(config);
|
|
983
|
-
}
|
|
984
|
-
return this._overlayRef;
|
|
985
|
-
};
|
|
986
|
-
/**
|
|
987
|
-
* This method builds the configuration object needed to create the overlay, the OverlayConfig.
|
|
988
|
-
* @returns OverlayConfig
|
|
989
|
-
*/
|
|
990
|
-
MtxPopoverTrigger.prototype._getOverlayConfig = function () {
|
|
991
|
-
var overlayState = new overlay.OverlayConfig();
|
|
992
|
-
overlayState.positionStrategy = this._getPosition();
|
|
993
|
-
/** Display overlay backdrop if trigger event is click */
|
|
994
|
-
if (this.triggerEvent === 'click') {
|
|
995
|
-
overlayState.hasBackdrop = true;
|
|
996
|
-
overlayState.backdropClass = 'cdk-overlay-transparent-backdrop';
|
|
997
|
-
}
|
|
998
|
-
overlayState.direction = this._dir;
|
|
999
|
-
overlayState.scrollStrategy = this._getOverlayScrollStrategy(this.popover.scrollStrategy);
|
|
1000
|
-
return overlayState;
|
|
1001
|
-
};
|
|
1002
|
-
/**
|
|
1003
|
-
* This method returns the scroll strategy used by the cdk/overlay.
|
|
1004
|
-
*/
|
|
1005
|
-
MtxPopoverTrigger.prototype._getOverlayScrollStrategy = function (strategy) {
|
|
1006
|
-
switch (strategy) {
|
|
1007
|
-
case 'noop':
|
|
1008
|
-
return this._overlay.scrollStrategies.noop();
|
|
1009
|
-
case 'close':
|
|
1010
|
-
return this._overlay.scrollStrategies.close();
|
|
1011
|
-
case 'block':
|
|
1012
|
-
return this._overlay.scrollStrategies.block();
|
|
1013
|
-
case 'reposition':
|
|
1014
|
-
default:
|
|
1015
|
-
return this._overlay.scrollStrategies.reposition();
|
|
1016
|
-
}
|
|
1017
|
-
};
|
|
1018
|
-
/**
|
|
1019
|
-
* Listens to changes in the position of the overlay and sets the correct classes
|
|
1020
|
-
* on the popover based on the new position. This ensures the animation origin is always
|
|
1021
|
-
* correct, even if a fallback position is used for the overlay.
|
|
1022
|
-
*/
|
|
1023
|
-
MtxPopoverTrigger.prototype._subscribeToPositions = function (position) {
|
|
1024
|
-
var _this = this;
|
|
1025
|
-
this._positionSubscription = position.positionChanges.subscribe(function (change) {
|
|
1026
|
-
var posX = change.connectionPair.overlayX === 'start'
|
|
1027
|
-
? 'after'
|
|
1028
|
-
: change.connectionPair.overlayX === 'end'
|
|
1029
|
-
? 'before'
|
|
1030
|
-
: 'center';
|
|
1031
|
-
var posY = change.connectionPair.overlayY === 'top'
|
|
1032
|
-
? 'below'
|
|
1033
|
-
: change.connectionPair.overlayY === 'bottom'
|
|
1034
|
-
? 'above'
|
|
1035
|
-
: 'center';
|
|
1036
|
-
var pos = _this.popover.position[0] === 'above' || _this.popover.position[0] === 'below'
|
|
1037
|
-
? [posY, posX]
|
|
1038
|
-
: [posX, posY];
|
|
1039
|
-
// required for ChangeDetectionStrategy.OnPush
|
|
1040
|
-
_this._changeDetectorRef.markForCheck();
|
|
1041
|
-
_this.popover.zone.run(function () {
|
|
1042
|
-
_this.popover.setCurrentStyles(pos);
|
|
1043
|
-
_this.popover.setPositionClasses(pos);
|
|
1044
|
-
});
|
|
1045
|
-
});
|
|
1046
|
-
};
|
|
1047
|
-
/**
|
|
1048
|
-
* This method builds the position strategy for the overlay, so the popover is properly connected
|
|
1049
|
-
* to the trigger.
|
|
1050
|
-
* @returns ConnectedPositionStrategy
|
|
1051
|
-
*/
|
|
1052
|
-
MtxPopoverTrigger.prototype._getPosition = function () {
|
|
1053
|
-
var _a = __read(this.popover.position[0] === 'before' || this.popover.position[1] === 'after'
|
|
1054
|
-
? ['start', 'center', 'end']
|
|
1055
|
-
: this.popover.position[0] === 'after' || this.popover.position[1] === 'before'
|
|
1056
|
-
? ['end', 'center', 'start']
|
|
1057
|
-
: ['center', 'start', 'end'], 3), originX = _a[0], origin2ndX = _a[1], origin3rdX = _a[2];
|
|
1058
|
-
var _b = __read(this.popover.position[0] === 'above' || this.popover.position[1] === 'below'
|
|
1059
|
-
? ['top', 'center', 'bottom']
|
|
1060
|
-
: this.popover.position[0] === 'below' || this.popover.position[1] === 'above'
|
|
1061
|
-
? ['bottom', 'center', 'top']
|
|
1062
|
-
: ['center', 'top', 'bottom'], 3), originY = _b[0], origin2ndY = _b[1], origin3rdY = _b[2];
|
|
1063
|
-
var _c = __read(this.popover.position[0] === 'below' || this.popover.position[0] === 'above'
|
|
1064
|
-
? [originX, originX]
|
|
1065
|
-
: this.popover.position[0] === 'before'
|
|
1066
|
-
? ['end', 'start']
|
|
1067
|
-
: ['start', 'end'], 2), overlayX = _c[0], overlayFallbackX = _c[1];
|
|
1068
|
-
var _d = __read(this.popover.position[0] === 'before' || this.popover.position[0] === 'after'
|
|
1069
|
-
? [originY, originY]
|
|
1070
|
-
: this.popover.position[0] === 'below'
|
|
1071
|
-
? ['top', 'bottom']
|
|
1072
|
-
: ['bottom', 'top'], 2), overlayY = _d[0], overlayFallbackY = _d[1];
|
|
1073
|
-
var originFallbackX = overlayX;
|
|
1074
|
-
var originFallbackY = overlayY;
|
|
1075
|
-
var offsetX = this.popover.xOffset && !isNaN(Number(this.popover.xOffset))
|
|
1076
|
-
? Number(this.dir === 'ltr' ? this.popover.xOffset : -this.popover.xOffset)
|
|
1077
|
-
: 0;
|
|
1078
|
-
var offsetY = this.popover.yOffset && !isNaN(Number(this.popover.yOffset))
|
|
1079
|
-
? Number(this.popover.yOffset)
|
|
1080
|
-
: 0;
|
|
1081
|
-
/**
|
|
1082
|
-
* For overriding position element, when `mtxPopoverTargetAt` has a valid element reference.
|
|
1083
|
-
* Useful for sticking popover to parent element and offsetting arrow to trigger element.
|
|
1084
|
-
* If undefined defaults to the trigger element reference.
|
|
1085
|
-
*/
|
|
1086
|
-
var element = this._elementRef;
|
|
1087
|
-
if (typeof this.targetElement !== 'undefined') {
|
|
1088
|
-
this.popover.containerPositioning = true;
|
|
1089
|
-
element = this.targetElement._elementRef;
|
|
1090
|
-
}
|
|
1091
|
-
var positions = [{ originX: originX, originY: originY, overlayX: overlayX, overlayY: overlayY }];
|
|
1092
|
-
if (this.popover.position[0] === 'above' || this.popover.position[0] === 'below') {
|
|
1093
|
-
positions = [
|
|
1094
|
-
{ originX: originX, originY: originY, overlayX: overlayX, overlayY: overlayY, offsetY: offsetY },
|
|
1095
|
-
{ originX: origin2ndX, originY: originY, overlayX: origin2ndX, overlayY: overlayY, offsetY: offsetY },
|
|
1096
|
-
{ originX: origin3rdX, originY: originY, overlayX: origin3rdX, overlayY: overlayY, offsetY: offsetY },
|
|
1097
|
-
{
|
|
1098
|
-
originX: originX,
|
|
1099
|
-
originY: originFallbackY,
|
|
1100
|
-
overlayX: overlayX,
|
|
1101
|
-
overlayY: overlayFallbackY,
|
|
1102
|
-
offsetY: -offsetY,
|
|
1103
|
-
},
|
|
1104
|
-
{
|
|
1105
|
-
originX: origin2ndX,
|
|
1106
|
-
originY: originFallbackY,
|
|
1107
|
-
overlayX: origin2ndX,
|
|
1108
|
-
overlayY: overlayFallbackY,
|
|
1109
|
-
offsetY: -offsetY,
|
|
1110
|
-
},
|
|
1111
|
-
{
|
|
1112
|
-
originX: origin3rdX,
|
|
1113
|
-
originY: originFallbackY,
|
|
1114
|
-
overlayX: origin3rdX,
|
|
1115
|
-
overlayY: overlayFallbackY,
|
|
1116
|
-
offsetY: -offsetY,
|
|
1117
|
-
},
|
|
1118
|
-
];
|
|
1119
|
-
}
|
|
1120
|
-
if (this.popover.position[0] === 'before' || this.popover.position[0] === 'after') {
|
|
1121
|
-
positions = [
|
|
1122
|
-
{ originX: originX, originY: originY, overlayX: overlayX, overlayY: overlayY, offsetX: offsetX },
|
|
1123
|
-
{ originX: originX, originY: origin2ndY, overlayX: overlayX, overlayY: origin2ndY, offsetX: offsetX },
|
|
1124
|
-
{ originX: originX, originY: origin3rdY, overlayX: overlayX, overlayY: origin3rdY, offsetX: offsetX },
|
|
1125
|
-
{
|
|
1126
|
-
originX: originFallbackX,
|
|
1127
|
-
originY: originY,
|
|
1128
|
-
overlayX: overlayFallbackX,
|
|
1129
|
-
overlayY: overlayY,
|
|
1130
|
-
offsetX: -offsetX,
|
|
1131
|
-
},
|
|
1132
|
-
{
|
|
1133
|
-
originX: originFallbackX,
|
|
1134
|
-
originY: origin2ndY,
|
|
1135
|
-
overlayX: overlayFallbackX,
|
|
1136
|
-
overlayY: origin2ndY,
|
|
1137
|
-
offsetX: -offsetX,
|
|
1138
|
-
},
|
|
1139
|
-
{
|
|
1140
|
-
originX: originFallbackX,
|
|
1141
|
-
originY: origin3rdY,
|
|
1142
|
-
overlayX: overlayFallbackX,
|
|
1143
|
-
overlayY: origin3rdY,
|
|
1144
|
-
offsetX: -offsetX,
|
|
1145
|
-
},
|
|
1146
|
-
];
|
|
1147
|
-
}
|
|
1148
|
-
return this._overlay
|
|
1149
|
-
.position()
|
|
1150
|
-
.flexibleConnectedTo(element)
|
|
1151
|
-
.withLockedPosition()
|
|
1152
|
-
.withPositions(positions)
|
|
1153
|
-
.withDefaultOffsetX(offsetX)
|
|
1154
|
-
.withDefaultOffsetY(offsetY);
|
|
1155
|
-
};
|
|
1156
|
-
MtxPopoverTrigger.prototype._cleanUpSubscriptions = function () {
|
|
1157
|
-
if (this._backdropSubscription) {
|
|
1158
|
-
this._backdropSubscription.unsubscribe();
|
|
1159
|
-
}
|
|
1160
|
-
if (this._positionSubscription) {
|
|
1161
|
-
this._positionSubscription.unsubscribe();
|
|
1162
|
-
}
|
|
1163
|
-
if (this._detachmentsSubscription) {
|
|
1164
|
-
this._detachmentsSubscription.unsubscribe();
|
|
1165
|
-
}
|
|
1166
|
-
};
|
|
1167
|
-
MtxPopoverTrigger.prototype._handleMousedown = function (event) {
|
|
1168
|
-
if (event && !a11y.isFakeMousedownFromScreenReader(event)) {
|
|
1169
|
-
this._openedByMouse = true;
|
|
1170
|
-
}
|
|
1171
|
-
};
|
|
1172
|
-
return MtxPopoverTrigger;
|
|
1173
|
-
}());
|
|
1174
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1175
|
-
MtxPopoverTrigger.decorators = [
|
|
1176
|
-
{ type: core.Directive, args: [{
|
|
1177
|
-
selector: '[mtxPopoverTriggerFor]',
|
|
1178
|
-
exportAs: 'mtxPopoverTrigger',
|
|
1179
|
-
},] }
|
|
1180
|
-
];
|
|
1181
|
-
/**
|
|
1182
|
-
* @type {function(): !Array<(null|{
|
|
1183
|
-
* type: ?,
|
|
1184
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1185
|
-
* })>}
|
|
1186
|
-
* @nocollapse
|
|
1187
|
-
*/
|
|
1188
|
-
MtxPopoverTrigger.ctorParameters = function () { return [
|
|
1189
|
-
{ type: overlay.Overlay },
|
|
1190
|
-
{ type: core.ElementRef },
|
|
1191
|
-
{ type: core.ViewContainerRef },
|
|
1192
|
-
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
1193
|
-
{ type: core.ChangeDetectorRef }
|
|
1194
|
-
]; };
|
|
1195
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
1196
|
-
MtxPopoverTrigger.propDecorators = {
|
|
1197
|
-
ariaHaspopup: [{ type: core.HostBinding, args: ['attr.aria-haspopup',] }],
|
|
1198
|
-
popover: [{ type: core.Input, args: ['mtxPopoverTriggerFor',] }],
|
|
1199
|
-
targetElement: [{ type: core.Input, args: ['mtxPopoverTargetAt',] }],
|
|
1200
|
-
triggerEvent: [{ type: core.Input, args: ['mtxPopoverTriggerOn',] }],
|
|
1201
|
-
popoverOpened: [{ type: core.Output }],
|
|
1202
|
-
popoverClosed: [{ type: core.Output }],
|
|
1203
|
-
onClick: [{ type: core.HostListener, args: ['click', ['$event'],] }],
|
|
1204
|
-
onMouseEnter: [{ type: core.HostListener, args: ['mouseenter', ['$event'],] }],
|
|
1205
|
-
onMouseLeave: [{ type: core.HostListener, args: ['mouseleave', ['$event'],] }],
|
|
1206
|
-
_handleMousedown: [{ type: core.HostListener, args: ['mousedown', ['$event'],] }]
|
|
1207
|
-
};
|
|
1208
|
-
|
|
1209
|
-
var MtxPopoverTarget = /** @class */ (function () {
|
|
1210
|
-
function MtxPopoverTarget(_elementRef) {
|
|
1211
|
-
this._elementRef = _elementRef;
|
|
1212
|
-
}
|
|
1213
|
-
return MtxPopoverTarget;
|
|
1214
|
-
}());
|
|
1215
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1216
|
-
MtxPopoverTarget.decorators = [
|
|
1217
|
-
{ type: core.Directive, args: [{
|
|
1218
|
-
selector: 'mtx-popover-target, [mtxPopoverTarget]',
|
|
1219
|
-
exportAs: 'mtxPopoverTarget',
|
|
1220
|
-
},] }
|
|
1221
|
-
];
|
|
1222
|
-
/**
|
|
1223
|
-
* @type {function(): !Array<(null|{
|
|
1224
|
-
* type: ?,
|
|
1225
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1226
|
-
* })>}
|
|
1227
|
-
* @nocollapse
|
|
1228
|
-
*/
|
|
1229
|
-
MtxPopoverTarget.ctorParameters = function () { return [
|
|
1230
|
-
{ type: core.ElementRef }
|
|
1231
|
-
]; };
|
|
1232
|
-
|
|
1233
|
-
var MtxPopoverModule = /** @class */ (function () {
|
|
1234
|
-
function MtxPopoverModule() {
|
|
1235
|
-
}
|
|
1236
|
-
return MtxPopoverModule;
|
|
1237
|
-
}());
|
|
1238
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1239
|
-
MtxPopoverModule.decorators = [
|
|
1240
|
-
{ type: core.NgModule, args: [{
|
|
1241
|
-
imports: [overlay.OverlayModule, common.CommonModule, a11y.A11yModule],
|
|
1242
|
-
exports: [MtxPopover, MtxPopoverTrigger, MtxPopoverTarget],
|
|
1243
|
-
declarations: [MtxPopover, MtxPopoverTrigger, MtxPopoverTarget],
|
|
1244
|
-
},] }
|
|
1245
|
-
];
|
|
1246
|
-
|
|
1247
|
-
/**
|
|
1248
|
-
* Generated bundle index. Do not edit.
|
|
1249
|
-
*/
|
|
1250
|
-
|
|
1251
|
-
exports.MtxPopover = MtxPopover;
|
|
1252
|
-
exports.MtxPopoverModule = MtxPopoverModule;
|
|
1253
|
-
exports.MtxPopoverTarget = MtxPopoverTarget;
|
|
1254
|
-
exports.MtxPopoverTrigger = MtxPopoverTrigger;
|
|
1255
|
-
exports.transformPopover = transformPopover;
|
|
1256
|
-
|
|
1257
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1258
|
-
|
|
1259
|
-
})));
|
|
1260
|
-
//# sourceMappingURL=mtxPopover.umd.js.map
|