@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/mtxButton.umd.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/progress-spinner'), require('@angular/cdk/coercion')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@ng-matero/extensions/button', ['exports', '@angular/core', '@angular/common', '@angular/material/button', '@angular/material/progress-spinner', '@angular/cdk/coercion'], 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.button = {}), global.ng.core, global.ng.common, global.ng.material.button, global.ng.material.progressSpinner, global.ng.cdk.coercion));
|
|
5
|
-
})(this, (function (exports, core, common, button, progressSpinner, coercion) { 'use strict';
|
|
6
|
-
|
|
7
|
-
var MatButtonLoadingDirective = /** @class */ (function () {
|
|
8
|
-
function MatButtonLoadingDirective(matButton, componentFactoryResolver, viewContainerRef, renderer) {
|
|
9
|
-
this.matButton = matButton;
|
|
10
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
11
|
-
this.viewContainerRef = viewContainerRef;
|
|
12
|
-
this.renderer = renderer;
|
|
13
|
-
this._loading = false;
|
|
14
|
-
this._disabled = false;
|
|
15
|
-
this.spinnerFactory = this.componentFactoryResolver.resolveComponentFactory(progressSpinner.MatProgressSpinner);
|
|
16
|
-
}
|
|
17
|
-
Object.defineProperty(MatButtonLoadingDirective.prototype, "loading", {
|
|
18
|
-
get: function () {
|
|
19
|
-
return this._loading;
|
|
20
|
-
},
|
|
21
|
-
set: function (value) {
|
|
22
|
-
this._loading = coercion.coerceBooleanProperty(value);
|
|
23
|
-
},
|
|
24
|
-
enumerable: false,
|
|
25
|
-
configurable: true
|
|
26
|
-
});
|
|
27
|
-
Object.defineProperty(MatButtonLoadingDirective.prototype, "disabled", {
|
|
28
|
-
get: function () {
|
|
29
|
-
return this._disabled;
|
|
30
|
-
},
|
|
31
|
-
set: function (value) {
|
|
32
|
-
this._disabled = coercion.coerceBooleanProperty(value);
|
|
33
|
-
},
|
|
34
|
-
enumerable: false,
|
|
35
|
-
configurable: true
|
|
36
|
-
});
|
|
37
|
-
MatButtonLoadingDirective.prototype.ngOnChanges = function (changes) {
|
|
38
|
-
if (!changes.loading) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (changes.loading.currentValue) {
|
|
42
|
-
this.matButton._elementRef.nativeElement.classList.add('mat-button-loading');
|
|
43
|
-
this.matButton.disabled = true;
|
|
44
|
-
this.createSpinner();
|
|
45
|
-
}
|
|
46
|
-
else if (!changes.loading.firstChange) {
|
|
47
|
-
this.matButton._elementRef.nativeElement.classList.remove('mat-button-loading');
|
|
48
|
-
this.matButton.disabled = this.disabled;
|
|
49
|
-
this.destroySpinner();
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
MatButtonLoadingDirective.prototype.createSpinner = function () {
|
|
53
|
-
if (!this.spinner) {
|
|
54
|
-
this.spinner = this.viewContainerRef.createComponent(this.spinnerFactory);
|
|
55
|
-
this.spinner.instance.color = this.color;
|
|
56
|
-
this.spinner.instance.diameter = 20;
|
|
57
|
-
this.spinner.instance.mode = 'indeterminate';
|
|
58
|
-
this.renderer.appendChild(this.matButton._elementRef.nativeElement, this.spinner.instance._elementRef.nativeElement);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
MatButtonLoadingDirective.prototype.destroySpinner = function () {
|
|
62
|
-
if (this.spinner) {
|
|
63
|
-
this.spinner.destroy();
|
|
64
|
-
this.spinner = null;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
return MatButtonLoadingDirective;
|
|
68
|
-
}());
|
|
69
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
70
|
-
MatButtonLoadingDirective.decorators = [
|
|
71
|
-
{ type: core.Directive, args: [{
|
|
72
|
-
selector: "button[mat-button][loading],\n button[mat-raised-button][loading],\n button[mat-stroked-button][loading],\n button[mat-flat-button][loading],\n button[mat-icon-button][loading],\n button[mat-fab][loading],\n button[mat-mini-fab][loading]",
|
|
73
|
-
},] }
|
|
74
|
-
];
|
|
75
|
-
/**
|
|
76
|
-
* @type {function(): !Array<(null|{
|
|
77
|
-
* type: ?,
|
|
78
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
79
|
-
* })>}
|
|
80
|
-
* @nocollapse
|
|
81
|
-
*/
|
|
82
|
-
MatButtonLoadingDirective.ctorParameters = function () { return [
|
|
83
|
-
{ type: button.MatButton },
|
|
84
|
-
{ type: core.ComponentFactoryResolver },
|
|
85
|
-
{ type: core.ViewContainerRef },
|
|
86
|
-
{ type: core.Renderer2 }
|
|
87
|
-
]; };
|
|
88
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
89
|
-
MatButtonLoadingDirective.propDecorators = {
|
|
90
|
-
loading: [{ type: core.Input }],
|
|
91
|
-
disabled: [{ type: core.Input }],
|
|
92
|
-
color: [{ type: core.Input }]
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
var MtxButtonModule = /** @class */ (function () {
|
|
96
|
-
function MtxButtonModule() {
|
|
97
|
-
}
|
|
98
|
-
return MtxButtonModule;
|
|
99
|
-
}());
|
|
100
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
101
|
-
MtxButtonModule.decorators = [
|
|
102
|
-
{ type: core.NgModule, args: [{
|
|
103
|
-
imports: [common.CommonModule, button.MatButtonModule, progressSpinner.MatProgressSpinnerModule],
|
|
104
|
-
exports: [MatButtonLoadingDirective],
|
|
105
|
-
declarations: [MatButtonLoadingDirective],
|
|
106
|
-
},] }
|
|
107
|
-
];
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Generated bundle index. Do not edit.
|
|
111
|
-
*/
|
|
112
|
-
|
|
113
|
-
exports.MatButtonLoadingDirective = MatButtonLoadingDirective;
|
|
114
|
-
exports.MtxButtonModule = MtxButtonModule;
|
|
115
|
-
|
|
116
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
117
|
-
|
|
118
|
-
}));
|
|
119
|
-
//# sourceMappingURL=mtxButton.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mtxButton.umd.js","sources":["../../../projects/extensions/button/button-loading.directive.ts","../../../projects/extensions/button/button.module.ts","../../../projects/extensions/button/mtxButton.ts"],"sourcesContent":["import {\n ComponentFactory,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n Input,\n OnChanges,\n Renderer2,\n SimpleChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ThemePalette } from '@angular/material/core';\nimport { MatButton } from '@angular/material/button';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\n\n@Directive({\n selector: `button[mat-button][loading],\n button[mat-raised-button][loading],\n button[mat-stroked-button][loading],\n button[mat-flat-button][loading],\n button[mat-icon-button][loading],\n button[mat-fab][loading],\n button[mat-mini-fab][loading]`,\n})\nexport class MatButtonLoadingDirective implements OnChanges {\n private spinnerFactory: ComponentFactory<MatProgressSpinner>;\n private spinner!: ComponentRef<MatProgressSpinner> | null;\n\n @Input()\n get loading(): boolean {\n return this._loading;\n }\n set loading(value: boolean) {\n this._loading = coerceBooleanProperty(value);\n }\n private _loading = false;\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled = false;\n\n @Input()\n color: ThemePalette;\n\n constructor(\n private matButton: MatButton,\n private componentFactoryResolver: ComponentFactoryResolver,\n private viewContainerRef: ViewContainerRef,\n private renderer: Renderer2\n ) {\n this.spinnerFactory = this.componentFactoryResolver.resolveComponentFactory(MatProgressSpinner);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!changes.loading) {\n return;\n }\n\n if (changes.loading.currentValue) {\n this.matButton._elementRef.nativeElement.classList.add('mat-button-loading');\n this.matButton.disabled = true;\n this.createSpinner();\n } else if (!changes.loading.firstChange) {\n this.matButton._elementRef.nativeElement.classList.remove('mat-button-loading');\n this.matButton.disabled = this.disabled;\n this.destroySpinner();\n }\n }\n\n private createSpinner(): void {\n if (!this.spinner) {\n this.spinner = this.viewContainerRef.createComponent(this.spinnerFactory);\n this.spinner.instance.color = this.color;\n this.spinner.instance.diameter = 20;\n this.spinner.instance.mode = 'indeterminate';\n this.renderer.appendChild(\n this.matButton._elementRef.nativeElement,\n this.spinner.instance._elementRef.nativeElement\n );\n }\n }\n\n private destroySpinner(): void {\n if (this.spinner) {\n this.spinner.destroy();\n this.spinner = null;\n }\n }\n\n static ngAcceptInputType_loading: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatButtonLoadingDirective } from './button-loading.directive';\n\n@NgModule({\n imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule],\n exports: [MatButtonLoadingDirective],\n declarations: [MatButtonLoadingDirective],\n})\nexport class MtxButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["MatProgressSpinner","coerceBooleanProperty","Directive","MatButton","ComponentFactoryResolver","ViewContainerRef","Renderer2","Input","NgModule","CommonModule","MatButtonModule","MatProgressSpinnerModule"],"mappings":";;;;;;;QAkDE,mCACU,SAAoB,EACpB,wBAAkD,EACl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=== 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/checkbox'), require('@ng-matero/extensions/pipes'), require('@angular/cdk/coercion'), require('@angular/cdk/a11y')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@ng-matero/extensions/checkbox-group', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/checkbox', '@ng-matero/extensions/pipes', '@angular/cdk/coercion', '@angular/cdk/a11y'], 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["checkbox-group"] = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.checkbox, global["ng-matero"].extensions.pipes, global.ng.cdk.coercion, global.ng.cdk.a11y));
|
|
5
|
-
})(this, (function (exports, core, common, forms, checkbox, pipes, coercion, a11y) { 'use strict';
|
|
6
|
-
|
|
7
|
-
var MtxCheckboxBase = /** @class */ (function () {
|
|
8
|
-
function MtxCheckboxBase(label, value) {
|
|
9
|
-
this.label = label;
|
|
10
|
-
this.value = value;
|
|
11
|
-
}
|
|
12
|
-
return MtxCheckboxBase;
|
|
13
|
-
}());
|
|
14
|
-
var MtxCheckboxGroupComponent = /** @class */ (function () {
|
|
15
|
-
function MtxCheckboxGroupComponent(_changeDetectorRef, _focusMonitor, _elementRef) {
|
|
16
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
17
|
-
this._focusMonitor = _focusMonitor;
|
|
18
|
-
this._elementRef = _elementRef;
|
|
19
|
-
this._items = [];
|
|
20
|
-
this._originalItems = [];
|
|
21
|
-
this.bindLabel = 'label';
|
|
22
|
-
this.bindValue = 'value';
|
|
23
|
-
this._showSelectAll = false;
|
|
24
|
-
this.selectAllLabel = 'Select All';
|
|
25
|
-
this._disabled = false;
|
|
26
|
-
this.change = new core.EventEmitter();
|
|
27
|
-
this.selectAll = false;
|
|
28
|
-
this.selectAllIndeterminate = false;
|
|
29
|
-
this.selectedItems = [];
|
|
30
|
-
this._onChange = function () { return null; };
|
|
31
|
-
this._onTouched = function () { return null; };
|
|
32
|
-
}
|
|
33
|
-
Object.defineProperty(MtxCheckboxGroupComponent.prototype, "items", {
|
|
34
|
-
get: function () {
|
|
35
|
-
return this._items;
|
|
36
|
-
},
|
|
37
|
-
set: function (value) {
|
|
38
|
-
// TODO: Deep clone
|
|
39
|
-
this._originalItems = JSON.parse(JSON.stringify(value));
|
|
40
|
-
this._items = value.map(function (option) {
|
|
41
|
-
return option instanceof Object ? option : new MtxCheckboxBase(option, option);
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
enumerable: false,
|
|
45
|
-
configurable: true
|
|
46
|
-
});
|
|
47
|
-
Object.defineProperty(MtxCheckboxGroupComponent.prototype, "showSelectAll", {
|
|
48
|
-
get: function () {
|
|
49
|
-
return this._showSelectAll;
|
|
50
|
-
},
|
|
51
|
-
set: function (value) {
|
|
52
|
-
this._showSelectAll = coercion.coerceBooleanProperty(value);
|
|
53
|
-
},
|
|
54
|
-
enumerable: false,
|
|
55
|
-
configurable: true
|
|
56
|
-
});
|
|
57
|
-
Object.defineProperty(MtxCheckboxGroupComponent.prototype, "compareWith", {
|
|
58
|
-
get: function () {
|
|
59
|
-
return this._compareWith;
|
|
60
|
-
},
|
|
61
|
-
set: function (fn) {
|
|
62
|
-
if (typeof fn !== 'function') {
|
|
63
|
-
throw Error('`compareWith` must be a function.');
|
|
64
|
-
}
|
|
65
|
-
if (fn) {
|
|
66
|
-
this._compareWith = fn;
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
enumerable: false,
|
|
70
|
-
configurable: true
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(MtxCheckboxGroupComponent.prototype, "disabled", {
|
|
73
|
-
get: function () {
|
|
74
|
-
return this._disabled;
|
|
75
|
-
},
|
|
76
|
-
set: function (value) {
|
|
77
|
-
this._disabled = coercion.coerceBooleanProperty(value);
|
|
78
|
-
},
|
|
79
|
-
enumerable: false,
|
|
80
|
-
configurable: true
|
|
81
|
-
});
|
|
82
|
-
MtxCheckboxGroupComponent.prototype.ngAfterViewInit = function () {
|
|
83
|
-
var _this = this;
|
|
84
|
-
this._focusMonitor.monitor(this._elementRef, true).subscribe(function (focusOrigin) {
|
|
85
|
-
if (!focusOrigin) {
|
|
86
|
-
// When a focused element becomes disabled, the browser *immediately* fires a blur event.
|
|
87
|
-
// Angular does not expect events to be raised during change detection, so any state change
|
|
88
|
-
// (such as a form control's 'ng-touched') will cause a changed-after-checked error.
|
|
89
|
-
// See https://github.com/angular/angular/issues/17793. To work around this, we defer
|
|
90
|
-
// telling the form control it has been touched until the next tick.
|
|
91
|
-
Promise.resolve().then(function () {
|
|
92
|
-
_this._onTouched();
|
|
93
|
-
_this._changeDetectorRef.markForCheck();
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
MtxCheckboxGroupComponent.prototype.ngOnDestroy = function () {
|
|
99
|
-
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* Finds and selects and option based on its value.
|
|
103
|
-
* @returns Option that has the corresponding value.
|
|
104
|
-
*/
|
|
105
|
-
MtxCheckboxGroupComponent.prototype._selectValue = function (value) {
|
|
106
|
-
var _this = this;
|
|
107
|
-
var correspondingOption = this.items.find(function (option) {
|
|
108
|
-
try {
|
|
109
|
-
var compareValue = option[_this.bindValue] === value;
|
|
110
|
-
return _this._compareWith ? _this._compareWith(option, value) : compareValue;
|
|
111
|
-
}
|
|
112
|
-
catch (error) {
|
|
113
|
-
console.warn(error);
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
if (correspondingOption) {
|
|
118
|
-
correspondingOption.checked = true;
|
|
119
|
-
}
|
|
120
|
-
return correspondingOption;
|
|
121
|
-
};
|
|
122
|
-
/**
|
|
123
|
-
* Sets the model value. Implemented as part of ControlValueAccessor.
|
|
124
|
-
* @param value New value to be written to the model.
|
|
125
|
-
*/
|
|
126
|
-
MtxCheckboxGroupComponent.prototype.writeValue = function (value) {
|
|
127
|
-
var _this = this;
|
|
128
|
-
if (value) {
|
|
129
|
-
if (!Array.isArray(value)) {
|
|
130
|
-
throw Error('Value must be an array.');
|
|
131
|
-
}
|
|
132
|
-
value.forEach(function (currentValue) { return _this._selectValue(currentValue); });
|
|
133
|
-
this.selectedItems = value;
|
|
134
|
-
}
|
|
135
|
-
this._checkMasterCheckboxState();
|
|
136
|
-
this._changeDetectorRef.markForCheck();
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* Registers a callback to be triggered when the model value changes.
|
|
140
|
-
* Implemented as part of ControlValueAccessor.
|
|
141
|
-
* @param fn Callback to be registered.
|
|
142
|
-
*/
|
|
143
|
-
MtxCheckboxGroupComponent.prototype.registerOnChange = function (fn) {
|
|
144
|
-
this._onChange = fn;
|
|
145
|
-
};
|
|
146
|
-
/**
|
|
147
|
-
* Registers a callback to be triggered when the control is touched.
|
|
148
|
-
* Implemented as part of ControlValueAccessor.
|
|
149
|
-
* @param fn Callback to be registered.
|
|
150
|
-
*/
|
|
151
|
-
MtxCheckboxGroupComponent.prototype.registerOnTouched = function (fn) {
|
|
152
|
-
this._onTouched = fn;
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
|
|
156
|
-
* @param isDisabled Whether the control should be disabled.
|
|
157
|
-
*/
|
|
158
|
-
MtxCheckboxGroupComponent.prototype.setDisabledState = function (isDisabled) {
|
|
159
|
-
this._disabled = isDisabled;
|
|
160
|
-
};
|
|
161
|
-
MtxCheckboxGroupComponent.prototype._checkMasterCheckboxState = function () {
|
|
162
|
-
if (this.items
|
|
163
|
-
.filter(function (option) { return option.checked || !option.disabled; })
|
|
164
|
-
.every(function (option) { return !option.checked; })) {
|
|
165
|
-
this.selectAll = false;
|
|
166
|
-
this.selectAllIndeterminate = false;
|
|
167
|
-
}
|
|
168
|
-
else if (this.items
|
|
169
|
-
.filter(function (option) { return option.checked || !option.disabled; })
|
|
170
|
-
.every(function (option) { return option.checked; })) {
|
|
171
|
-
this.selectAll = true;
|
|
172
|
-
this.selectAllIndeterminate = false;
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
this.selectAllIndeterminate = true;
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
MtxCheckboxGroupComponent.prototype._getSelectedItems = function (index) {
|
|
179
|
-
var _this = this;
|
|
180
|
-
this.selectedItems = this.items.filter(function (option) { return option.checked; });
|
|
181
|
-
if (this._compareWith) {
|
|
182
|
-
this.selectedItems = this._originalItems.filter(function (option) { return _this.selectedItems.find(function (selectedOption) { return _this._compareWith(option, selectedOption); }); });
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
this.selectedItems = this.selectedItems.map(function (option) { return option[_this.bindValue]; });
|
|
186
|
-
}
|
|
187
|
-
this._onChange(this.selectedItems);
|
|
188
|
-
this.change.emit({ model: this.selectedItems, index: index });
|
|
189
|
-
};
|
|
190
|
-
/** Handle normal checkbox toggle */
|
|
191
|
-
MtxCheckboxGroupComponent.prototype._updateNormalCheckboxState = function (e, index) {
|
|
192
|
-
this._checkMasterCheckboxState();
|
|
193
|
-
this._getSelectedItems(index);
|
|
194
|
-
};
|
|
195
|
-
/** Handle master checkbox toggle */
|
|
196
|
-
MtxCheckboxGroupComponent.prototype._updateMasterCheckboxState = function (e, index) {
|
|
197
|
-
this.selectAll = !this.selectAll;
|
|
198
|
-
this.selectAllIndeterminate = false;
|
|
199
|
-
if (this.selectAll) {
|
|
200
|
-
this.items
|
|
201
|
-
.filter(function (option) { return option.checked || !option.disabled; })
|
|
202
|
-
.forEach(function (option) { return (option.checked = true); });
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
this.items
|
|
206
|
-
.filter(function (option) { return option.checked || !option.disabled; })
|
|
207
|
-
.forEach(function (option) { return (option.checked = !!option.disabled); });
|
|
208
|
-
}
|
|
209
|
-
this._getSelectedItems(index);
|
|
210
|
-
};
|
|
211
|
-
return MtxCheckboxGroupComponent;
|
|
212
|
-
}());
|
|
213
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
214
|
-
MtxCheckboxGroupComponent.decorators = [
|
|
215
|
-
{ type: core.Component, args: [{
|
|
216
|
-
selector: 'mtx-checkbox-group',
|
|
217
|
-
exportAs: 'mtxCheckboxGroup',
|
|
218
|
-
host: {
|
|
219
|
-
class: 'mtx-checkbox-group',
|
|
220
|
-
},
|
|
221
|
-
template: "<mat-checkbox class=\"mtx-checkbox-master\"\n *ngIf=\"showSelectAll\"\n [checked]=\"selectAll\"\n [(indeterminate)]=\"selectAllIndeterminate\"\n [disabled]=\"disabled\"\n (change)=\"_updateMasterCheckboxState($event, -1);\">\n {{selectAllLabel}}\n</mat-checkbox>\n\n<mat-checkbox class=\"mtx-checkbox-normal\"\n *ngFor=\"let option of items; let i = index;\"\n [(ngModel)]=\"option.checked\"\n [aria-describedby]=\"option.ariaDescribedby\"\n [aria-label]=\"option.ariaLabel\"\n [aria-labelledby]=\"option.ariaLabelledby\"\n [color]=\"option.color\"\n [disabled]=\"option.disabled || disabled\"\n [disableRipple]=\"option.disableRipple\"\n [labelPosition]=\"option.labelPosition\"\n [required]=\"option.required\"\n (change)=\"_updateNormalCheckboxState($event, i)\">\n {{option[bindLabel] | toObservable | async}}\n</mat-checkbox>\n",
|
|
222
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
223
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
224
|
-
providers: [
|
|
225
|
-
{
|
|
226
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
227
|
-
useExisting: core.forwardRef(function () { return MtxCheckboxGroupComponent; }),
|
|
228
|
-
multi: true,
|
|
229
|
-
},
|
|
230
|
-
],
|
|
231
|
-
styles: [".mtx-checkbox-group{display:block}.mtx-checkbox-group .mat-checkbox{margin-right:16px}[dir=rtl] .mtx-checkbox-group .mat-checkbox{margin-right:auto;margin-left:16px}\n"]
|
|
232
|
-
},] }
|
|
233
|
-
];
|
|
234
|
-
/**
|
|
235
|
-
* @type {function(): !Array<(null|{
|
|
236
|
-
* type: ?,
|
|
237
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
238
|
-
* })>}
|
|
239
|
-
* @nocollapse
|
|
240
|
-
*/
|
|
241
|
-
MtxCheckboxGroupComponent.ctorParameters = function () { return [
|
|
242
|
-
{ type: core.ChangeDetectorRef },
|
|
243
|
-
{ type: a11y.FocusMonitor },
|
|
244
|
-
{ type: core.ElementRef }
|
|
245
|
-
]; };
|
|
246
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
247
|
-
MtxCheckboxGroupComponent.propDecorators = {
|
|
248
|
-
_checkboxes: [{ type: core.ContentChildren, args: [core.forwardRef(function () { return checkbox.MatCheckbox; }), { descendants: true },] }],
|
|
249
|
-
items: [{ type: core.Input }],
|
|
250
|
-
bindLabel: [{ type: core.Input }],
|
|
251
|
-
bindValue: [{ type: core.Input }],
|
|
252
|
-
showSelectAll: [{ type: core.Input }],
|
|
253
|
-
selectAllLabel: [{ type: core.Input }],
|
|
254
|
-
compareWith: [{ type: core.Input }],
|
|
255
|
-
disabled: [{ type: core.Input }],
|
|
256
|
-
change: [{ type: core.Output }]
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
var MtxCheckboxGroupModule = /** @class */ (function () {
|
|
260
|
-
function MtxCheckboxGroupModule() {
|
|
261
|
-
}
|
|
262
|
-
return MtxCheckboxGroupModule;
|
|
263
|
-
}());
|
|
264
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
265
|
-
MtxCheckboxGroupModule.decorators = [
|
|
266
|
-
{ type: core.NgModule, args: [{
|
|
267
|
-
imports: [common.CommonModule, forms.FormsModule, checkbox.MatCheckboxModule, pipes.MtxPipesModule],
|
|
268
|
-
exports: [MtxCheckboxGroupComponent, pipes.MtxPipesModule],
|
|
269
|
-
declarations: [MtxCheckboxGroupComponent],
|
|
270
|
-
},] }
|
|
271
|
-
];
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Generated bundle index. Do not edit.
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
|
-
exports.MtxCheckboxBase = MtxCheckboxBase;
|
|
278
|
-
exports.MtxCheckboxGroupComponent = MtxCheckboxGroupComponent;
|
|
279
|
-
exports.MtxCheckboxGroupModule = MtxCheckboxGroupModule;
|
|
280
|
-
|
|
281
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
282
|
-
|
|
283
|
-
}));
|
|
284
|
-
//# sourceMappingURL=mtxCheckboxGroup.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mtxCheckboxGroup.umd.js","sources":["../../../projects/extensions/checkbox-group/checkbox-group.component.ts","../../../projects/extensions/checkbox-group/checkbox-group.module.ts","../../../projects/extensions/checkbox-group/mtxCheckboxGroup.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n forwardRef,\n AfterViewInit,\n ContentChildren,\n QueryList,\n ElementRef,\n OnDestroy,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';\nimport { MtxCheckboxGroupOption } from './checkbox-group.interface';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\nexport class MtxCheckboxBase {\n constructor(public label?: any, public value?: any) {}\n}\n\n@Component({\n selector: 'mtx-checkbox-group',\n exportAs: 'mtxCheckboxGroup',\n host: {\n class: 'mtx-checkbox-group',\n },\n templateUrl: './checkbox-group.component.html',\n styleUrls: ['./checkbox-group.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MtxCheckboxGroupComponent),\n multi: true,\n },\n ],\n})\nexport class MtxCheckboxGroupComponent implements AfterViewInit, OnDestroy, ControlValueAccessor {\n @ContentChildren(forwardRef(() => MatCheckbox), { descendants: true })\n _checkboxes!: QueryList<MatCheckbox>;\n\n @Input()\n get items() {\n return this._items;\n }\n set items(value: any[]) {\n // TODO: Deep clone\n this._originalItems = JSON.parse(JSON.stringify(value));\n this._items = value.map(option => {\n return option instanceof Object ? option : new MtxCheckboxBase(option, option);\n });\n }\n private _items: any[] = [];\n private _originalItems: any[] = [];\n\n @Input() bindLabel = 'label';\n\n @Input() bindValue = 'value';\n\n @Input()\n get showSelectAll(): boolean {\n return this._showSelectAll;\n }\n set showSelectAll(value: boolean) {\n this._showSelectAll = coerceBooleanProperty(value);\n }\n private _showSelectAll = false;\n\n @Input() selectAllLabel = 'Select All';\n\n @Input()\n get compareWith() {\n return this._compareWith;\n }\n set compareWith(fn: (o1: any, o2: any) => boolean) {\n if (typeof fn !== 'function') {\n throw Error('`compareWith` must be a function.');\n }\n\n if (fn) {\n this._compareWith = fn;\n }\n }\n private _compareWith!: (o1: any, o2: any) => boolean;\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled = false;\n\n @Output() change = new EventEmitter<{ model: MtxCheckboxGroupOption[]; index: number }>();\n\n selectAll = false;\n selectAllIndeterminate = false;\n\n selectedItems: MtxCheckboxGroupOption[] = [];\n\n _onChange: (value: MtxCheckboxGroupOption[]) => void = () => null;\n _onTouched: () => void = () => null;\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _elementRef: ElementRef<HTMLElement>\n ) {}\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /**\n * Finds and selects and option based on its value.\n * @returns Option that has the corresponding value.\n */\n private _selectValue(value: MtxCheckboxGroupOption) {\n const correspondingOption = (this.items as MtxCheckboxGroupOption[]).find(option => {\n try {\n const compareValue = option[this.bindValue] === value;\n return this._compareWith ? this._compareWith(option, value) : compareValue;\n } catch (error) {\n console.warn(error);\n return false;\n }\n });\n\n if (correspondingOption) {\n correspondingOption.checked = true;\n }\n\n return correspondingOption;\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value New value to be written to the model.\n */\n writeValue(value: any[]): void {\n if (value) {\n if (!Array.isArray(value)) {\n throw Error('Value must be an array.');\n }\n\n value.forEach((currentValue: any) => this._selectValue(currentValue));\n this.selectedItems = value;\n }\n\n this._checkMasterCheckboxState();\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: MtxCheckboxGroupOption[]) => Record<string, unknown>): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: () => Record<string, unknown>): void {\n this._onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this._disabled = isDisabled;\n }\n\n private _checkMasterCheckboxState() {\n if (\n (this.items as MtxCheckboxGroupOption[])\n .filter(option => option.checked || !option.disabled)\n .every(option => !option.checked)\n ) {\n this.selectAll = false;\n this.selectAllIndeterminate = false;\n } else if (\n (this.items as MtxCheckboxGroupOption[])\n .filter(option => option.checked || !option.disabled)\n .every(option => option.checked)\n ) {\n this.selectAll = true;\n this.selectAllIndeterminate = false;\n } else {\n this.selectAllIndeterminate = true;\n }\n }\n\n private _getSelectedItems(index: number) {\n this.selectedItems = (this.items as MtxCheckboxGroupOption[]).filter(option => option.checked);\n\n if (this._compareWith) {\n this.selectedItems = (this._originalItems as MtxCheckboxGroupOption[]).filter(option =>\n this.selectedItems.find(selectedOption => this._compareWith(option, selectedOption))\n );\n } else {\n this.selectedItems = this.selectedItems.map(option => option[this.bindValue]);\n }\n\n this._onChange(this.selectedItems);\n\n this.change.emit({ model: this.selectedItems, index });\n }\n\n /** Handle normal checkbox toggle */\n _updateNormalCheckboxState(e: MatCheckboxChange, index: number): void {\n this._checkMasterCheckboxState();\n this._getSelectedItems(index);\n }\n\n /** Handle master checkbox toggle */\n _updateMasterCheckboxState(e: MatCheckboxChange, index: number): void {\n this.selectAll = !this.selectAll;\n this.selectAllIndeterminate = false;\n\n if (this.selectAll) {\n (this.items as MtxCheckboxGroupOption[])\n .filter(option => option.checked || !option.disabled)\n .forEach(option => (option.checked = true));\n } else {\n (this.items as MtxCheckboxGroupOption[])\n .filter(option => option.checked || !option.disabled)\n .forEach(option => (option.checked = !!option.disabled));\n }\n\n this._getSelectedItems(index);\n }\n\n static ngAcceptInputType_showSelectAll: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\nimport { MtxPipesModule } from '@ng-matero/extensions/pipes';\nimport { MtxCheckboxGroupComponent } from './checkbox-group.component';\n\n@NgModule({\n imports: [CommonModule, FormsModule, MatCheckboxModule, MtxPipesModule],\n exports: [MtxCheckboxGroupComponent, MtxPipesModule],\n declarations: [MtxCheckboxGroupComponent],\n})\nexport class MtxCheckboxGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["EventEmitter","coerceBooleanProperty","Component","ViewEncapsulation","ChangeDetectionStrategy","NG_VALUE_ACCESSOR","forwardRef","ChangeDetectorRef","FocusMonitor","ElementRef","ContentChildren","MatCheckbox","Input","Output","NgModule","CommonModule","FormsModule","MatCheckboxModule","MtxPipesModule"],"mappings":";;;;;;;QAsBE,yBAAmB,KAAW,EAAS,KAAW;YAA/B,UAAK,GAAL,KAAK,CAAM;YAAS,UAAK,GAAL,KAAK,CAAM;SAAI;8BACvD;KAAA,IAAA;;QAuFC,mCACU,kBAAqC,EACrC,aAA2B,EAC3B,WAAoC;YAFpC,uBAAkB,GAAlB,kBAAkB,CAAmB;YACrC,kBAAa,GAAb,aAAa,CAAc;YAC3B,gBAAW,GAAX,WAAW,CAAyB;YAvDtC,WAAM,GAAU,EAAE,CAAC;YACnB,mBAAc,GAAU,EAAE,CAAC;YAE1B,cAAS,GAAG,OAAO,CAAC;YAEpB,cAAS,GAAG,OAAO,CAAC;YASrB,mBAAc,GAAG,KAAK,CAAC;YAEtB,mBAAc,GAAG,YAAY,CAAC;YAwB/B,cAAS,GAAG,KAAK,CAAC;YAEhB,WAAM,GAAG,IAAIA,iBAAY,EAAsD,CAAC;YAE1F,cAAS,GAAG,KAAK,CAAC;YAClB,2BAAsB,GAAG,KAAK,CAAC;YAE/B,kBAAa,GAA6B,EAAE,CAAC;YAE7C,cAAS,GAA8C,cAAM,OAAA,IAAI,GAAA,CAAC;YAClE,eAAU,GAAe,cAAM,OAAA,IAAI,GAAA,CAAC;SAMhC;QAnEJ,sBACI,4CAAK;iBADT;gBAEE,OAAO,IAAI,CAAC,MAAM,CAAC;aACpB;iBACD,U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