@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
package/bundles/mtxGrid.umd.js
DELETED
|
@@ -1,1583 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/material/checkbox'), require('@angular/material/button'), require('@angular/material/progress-bar'), require('@angular/material/chips'), require('@angular/material/tooltip'), require('@angular/material/icon'), require('@angular/material/select'), require('@angular/material/form-field'), require('@angular/material/menu'), require('@angular/cdk/drag-drop'), require('@ng-matero/extensions/pipes'), require('@ng-matero/extensions/dialog'), require('@angular/animations'), require('@angular/cdk/collections'), require('photoviewer'), require('@angular/cdk/overlay'), require('@ng-matero/extensions/column-resize'), require('@angular/cdk/table'), require('@angular/cdk/bidi')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@ng-matero/extensions/grid', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/table', '@angular/material/sort', '@angular/material/paginator', '@angular/material/checkbox', '@angular/material/button', '@angular/material/progress-bar', '@angular/material/chips', '@angular/material/tooltip', '@angular/material/icon', '@angular/material/select', '@angular/material/form-field', '@angular/material/menu', '@angular/cdk/drag-drop', '@ng-matero/extensions/pipes', '@ng-matero/extensions/dialog', '@angular/animations', '@angular/cdk/collections', 'photoviewer', '@angular/cdk/overlay', '@ng-matero/extensions/column-resize', '@angular/cdk/table', '@angular/cdk/bidi'], 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.grid = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.material.checkbox, global.ng.material.button, global.ng.material.progressBar, global.ng.material.chips, global.ng.material.tooltip, global.ng.material.icon, global.ng.material.select, global.ng.material.formField, global.ng.material.menu, global.ng.cdk.dragDrop, global['ng-matero'].extensions.pipes, global['ng-matero'].extensions.dialog, global.ng.animations, global.ng.cdk.collections, global.PhotoViewer, global.ng.cdk.overlay, global['ng-matero'].extensions['column-resize'], global.ng.cdk.table, global.ng.cdk.bidi));
|
|
5
|
-
}(this, (function (exports, core, common, forms, table, sort, paginator, checkbox, button, progressBar, chips, tooltip, icon, select, formField, menu, dragDrop, pipes, dialog, animations, collections, PhotoViewer, overlay, columnResize, table$1, bidi) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var PhotoViewer__default = /*#__PURE__*/_interopDefaultLegacy(PhotoViewer);
|
|
10
|
-
|
|
11
|
-
/*! *****************************************************************************
|
|
12
|
-
Copyright (c) Microsoft Corporation.
|
|
13
|
-
|
|
14
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
15
|
-
purpose with or without fee is hereby granted.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
18
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
19
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
20
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
21
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
22
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
23
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
24
|
-
***************************************************************************** */
|
|
25
|
-
/* global Reflect, Promise */
|
|
26
|
-
var extendStatics = function (d, b) {
|
|
27
|
-
extendStatics = Object.setPrototypeOf ||
|
|
28
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
29
|
-
function (d, b) { for (var p in b)
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
31
|
-
d[p] = b[p]; };
|
|
32
|
-
return extendStatics(d, b);
|
|
33
|
-
};
|
|
34
|
-
function __extends(d, b) {
|
|
35
|
-
if (typeof b !== "function" && b !== null)
|
|
36
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
37
|
-
extendStatics(d, b);
|
|
38
|
-
function __() { this.constructor = d; }
|
|
39
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
40
|
-
}
|
|
41
|
-
var __assign = function () {
|
|
42
|
-
__assign = Object.assign || function __assign(t) {
|
|
43
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
44
|
-
s = arguments[i];
|
|
45
|
-
for (var p in s)
|
|
46
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
47
|
-
t[p] = s[p];
|
|
48
|
-
}
|
|
49
|
-
return t;
|
|
50
|
-
};
|
|
51
|
-
return __assign.apply(this, arguments);
|
|
52
|
-
};
|
|
53
|
-
function __rest(s, e) {
|
|
54
|
-
var t = {};
|
|
55
|
-
for (var p in s)
|
|
56
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
57
|
-
t[p] = s[p];
|
|
58
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
59
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
60
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
61
|
-
t[p[i]] = s[p[i]];
|
|
62
|
-
}
|
|
63
|
-
return t;
|
|
64
|
-
}
|
|
65
|
-
function __decorate(decorators, target, key, desc) {
|
|
66
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
67
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
68
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
69
|
-
else
|
|
70
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
71
|
-
if (d = decorators[i])
|
|
72
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
73
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
74
|
-
}
|
|
75
|
-
function __param(paramIndex, decorator) {
|
|
76
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
77
|
-
}
|
|
78
|
-
function __metadata(metadataKey, metadataValue) {
|
|
79
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
80
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
81
|
-
}
|
|
82
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
83
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
84
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
85
|
-
function fulfilled(value) { try {
|
|
86
|
-
step(generator.next(value));
|
|
87
|
-
}
|
|
88
|
-
catch (e) {
|
|
89
|
-
reject(e);
|
|
90
|
-
} }
|
|
91
|
-
function rejected(value) { try {
|
|
92
|
-
step(generator["throw"](value));
|
|
93
|
-
}
|
|
94
|
-
catch (e) {
|
|
95
|
-
reject(e);
|
|
96
|
-
} }
|
|
97
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
98
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function __generator(thisArg, body) {
|
|
102
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
103
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
104
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
105
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
106
|
-
function step(op) {
|
|
107
|
-
if (f)
|
|
108
|
-
throw new TypeError("Generator is already executing.");
|
|
109
|
-
while (_)
|
|
110
|
-
try {
|
|
111
|
-
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)
|
|
112
|
-
return t;
|
|
113
|
-
if (y = 0, t)
|
|
114
|
-
op = [op[0] & 2, t.value];
|
|
115
|
-
switch (op[0]) {
|
|
116
|
-
case 0:
|
|
117
|
-
case 1:
|
|
118
|
-
t = op;
|
|
119
|
-
break;
|
|
120
|
-
case 4:
|
|
121
|
-
_.label++;
|
|
122
|
-
return { value: op[1], done: false };
|
|
123
|
-
case 5:
|
|
124
|
-
_.label++;
|
|
125
|
-
y = op[1];
|
|
126
|
-
op = [0];
|
|
127
|
-
continue;
|
|
128
|
-
case 7:
|
|
129
|
-
op = _.ops.pop();
|
|
130
|
-
_.trys.pop();
|
|
131
|
-
continue;
|
|
132
|
-
default:
|
|
133
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
134
|
-
_ = 0;
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
138
|
-
_.label = op[1];
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
142
|
-
_.label = t[1];
|
|
143
|
-
t = op;
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
if (t && _.label < t[2]) {
|
|
147
|
-
_.label = t[2];
|
|
148
|
-
_.ops.push(op);
|
|
149
|
-
break;
|
|
150
|
-
}
|
|
151
|
-
if (t[2])
|
|
152
|
-
_.ops.pop();
|
|
153
|
-
_.trys.pop();
|
|
154
|
-
continue;
|
|
155
|
-
}
|
|
156
|
-
op = body.call(thisArg, _);
|
|
157
|
-
}
|
|
158
|
-
catch (e) {
|
|
159
|
-
op = [6, e];
|
|
160
|
-
y = 0;
|
|
161
|
-
}
|
|
162
|
-
finally {
|
|
163
|
-
f = t = 0;
|
|
164
|
-
}
|
|
165
|
-
if (op[0] & 5)
|
|
166
|
-
throw op[1];
|
|
167
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
171
|
-
if (k2 === undefined)
|
|
172
|
-
k2 = k;
|
|
173
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
174
|
-
}) : (function (o, m, k, k2) {
|
|
175
|
-
if (k2 === undefined)
|
|
176
|
-
k2 = k;
|
|
177
|
-
o[k2] = m[k];
|
|
178
|
-
});
|
|
179
|
-
function __exportStar(m, o) {
|
|
180
|
-
for (var p in m)
|
|
181
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
182
|
-
__createBinding(o, m, p);
|
|
183
|
-
}
|
|
184
|
-
function __values(o) {
|
|
185
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
186
|
-
if (m)
|
|
187
|
-
return m.call(o);
|
|
188
|
-
if (o && typeof o.length === "number")
|
|
189
|
-
return {
|
|
190
|
-
next: function () {
|
|
191
|
-
if (o && i >= o.length)
|
|
192
|
-
o = void 0;
|
|
193
|
-
return { value: o && o[i++], done: !o };
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
197
|
-
}
|
|
198
|
-
function __read(o, n) {
|
|
199
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
200
|
-
if (!m)
|
|
201
|
-
return o;
|
|
202
|
-
var i = m.call(o), r, ar = [], e;
|
|
203
|
-
try {
|
|
204
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
205
|
-
ar.push(r.value);
|
|
206
|
-
}
|
|
207
|
-
catch (error) {
|
|
208
|
-
e = { error: error };
|
|
209
|
-
}
|
|
210
|
-
finally {
|
|
211
|
-
try {
|
|
212
|
-
if (r && !r.done && (m = i["return"]))
|
|
213
|
-
m.call(i);
|
|
214
|
-
}
|
|
215
|
-
finally {
|
|
216
|
-
if (e)
|
|
217
|
-
throw e.error;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return ar;
|
|
221
|
-
}
|
|
222
|
-
/** @deprecated */
|
|
223
|
-
function __spread() {
|
|
224
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
225
|
-
ar = ar.concat(__read(arguments[i]));
|
|
226
|
-
return ar;
|
|
227
|
-
}
|
|
228
|
-
/** @deprecated */
|
|
229
|
-
function __spreadArrays() {
|
|
230
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
231
|
-
s += arguments[i].length;
|
|
232
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
233
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
234
|
-
r[k] = a[j];
|
|
235
|
-
return r;
|
|
236
|
-
}
|
|
237
|
-
function __spreadArray(to, from, pack) {
|
|
238
|
-
if (pack || arguments.length === 2)
|
|
239
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
240
|
-
if (ar || !(i in from)) {
|
|
241
|
-
if (!ar)
|
|
242
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
243
|
-
ar[i] = from[i];
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
return to.concat(ar || from);
|
|
247
|
-
}
|
|
248
|
-
function __await(v) {
|
|
249
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
250
|
-
}
|
|
251
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
252
|
-
if (!Symbol.asyncIterator)
|
|
253
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
254
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
255
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
256
|
-
function verb(n) { if (g[n])
|
|
257
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
258
|
-
function resume(n, v) { try {
|
|
259
|
-
step(g[n](v));
|
|
260
|
-
}
|
|
261
|
-
catch (e) {
|
|
262
|
-
settle(q[0][3], e);
|
|
263
|
-
} }
|
|
264
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
265
|
-
function fulfill(value) { resume("next", value); }
|
|
266
|
-
function reject(value) { resume("throw", value); }
|
|
267
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
268
|
-
resume(q[0][0], q[0][1]); }
|
|
269
|
-
}
|
|
270
|
-
function __asyncDelegator(o) {
|
|
271
|
-
var i, p;
|
|
272
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
273
|
-
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; }
|
|
274
|
-
}
|
|
275
|
-
function __asyncValues(o) {
|
|
276
|
-
if (!Symbol.asyncIterator)
|
|
277
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
278
|
-
var m = o[Symbol.asyncIterator], i;
|
|
279
|
-
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);
|
|
280
|
-
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); }); }; }
|
|
281
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
282
|
-
}
|
|
283
|
-
function __makeTemplateObject(cooked, raw) {
|
|
284
|
-
if (Object.defineProperty) {
|
|
285
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
cooked.raw = raw;
|
|
289
|
-
}
|
|
290
|
-
return cooked;
|
|
291
|
-
}
|
|
292
|
-
;
|
|
293
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
294
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
295
|
-
}) : function (o, v) {
|
|
296
|
-
o["default"] = v;
|
|
297
|
-
};
|
|
298
|
-
function __importStar(mod) {
|
|
299
|
-
if (mod && mod.__esModule)
|
|
300
|
-
return mod;
|
|
301
|
-
var result = {};
|
|
302
|
-
if (mod != null)
|
|
303
|
-
for (var k in mod)
|
|
304
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
305
|
-
__createBinding(result, mod, k);
|
|
306
|
-
__setModuleDefault(result, mod);
|
|
307
|
-
return result;
|
|
308
|
-
}
|
|
309
|
-
function __importDefault(mod) {
|
|
310
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
311
|
-
}
|
|
312
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
313
|
-
if (kind === "a" && !f)
|
|
314
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
315
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
316
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
317
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
318
|
-
}
|
|
319
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
320
|
-
if (kind === "m")
|
|
321
|
-
throw new TypeError("Private method is not writable");
|
|
322
|
-
if (kind === "a" && !f)
|
|
323
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
324
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
325
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
326
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
var MtxGridService = /** @class */ (function () {
|
|
330
|
-
function MtxGridService() {
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* Get cell value from column key e.g. `a.b.c`
|
|
334
|
-
* @param rowData Row data
|
|
335
|
-
* @param colDef Column definition
|
|
336
|
-
*/
|
|
337
|
-
MtxGridService.prototype.getCellValue = function (rowData, colDef) {
|
|
338
|
-
var keyArr = colDef.field ? colDef.field.split('.') : [];
|
|
339
|
-
var tmp = '';
|
|
340
|
-
keyArr.forEach(function (key, i) {
|
|
341
|
-
if (i === 0) {
|
|
342
|
-
tmp = rowData[key];
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
tmp = tmp && tmp[key];
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
return tmp;
|
|
349
|
-
};
|
|
350
|
-
/**
|
|
351
|
-
* Get all data of a col
|
|
352
|
-
* @param data All data
|
|
353
|
-
* @param colDef Column definition
|
|
354
|
-
*/
|
|
355
|
-
MtxGridService.prototype.getColData = function (data, colDef) {
|
|
356
|
-
var _this = this;
|
|
357
|
-
return data.map(function (rowData) { return _this.getCellValue(rowData, colDef); });
|
|
358
|
-
};
|
|
359
|
-
/**
|
|
360
|
-
* Remove white spaces in a string and convert string to array
|
|
361
|
-
* @param str string
|
|
362
|
-
*/
|
|
363
|
-
MtxGridService.prototype.str2arr = function (str) {
|
|
364
|
-
return str.replace(/[\r\n\s]/g, '').split(',');
|
|
365
|
-
};
|
|
366
|
-
return MtxGridService;
|
|
367
|
-
}());
|
|
368
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
369
|
-
MtxGridService.decorators = [
|
|
370
|
-
{ type: core.Injectable }
|
|
371
|
-
];
|
|
372
|
-
/**
|
|
373
|
-
* @type {function(): !Array<(null|{
|
|
374
|
-
* type: ?,
|
|
375
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
376
|
-
* })>}
|
|
377
|
-
* @nocollapse
|
|
378
|
-
*/
|
|
379
|
-
MtxGridService.ctorParameters = function () { return []; };
|
|
380
|
-
|
|
381
|
-
var MtxGridComponent = /** @class */ (function () {
|
|
382
|
-
function MtxGridComponent(_dataGridSrv, _changeDetectorRef) {
|
|
383
|
-
this._dataGridSrv = _dataGridSrv;
|
|
384
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
385
|
-
this.dataSource = new table.MatTableDataSource();
|
|
386
|
-
this.columns = [];
|
|
387
|
-
this.data = [];
|
|
388
|
-
this.length = 0;
|
|
389
|
-
this.loading = false;
|
|
390
|
-
this.columnResizable = false;
|
|
391
|
-
// ===== Page =====
|
|
392
|
-
this.pageOnFront = true;
|
|
393
|
-
this.showPaginator = true;
|
|
394
|
-
this.pageDisabled = false;
|
|
395
|
-
this.showFirstLastButtons = true;
|
|
396
|
-
this.pageIndex = 0;
|
|
397
|
-
this.pageSize = 10;
|
|
398
|
-
this.pageSizeOptions = [10, 50, 100];
|
|
399
|
-
this.hidePageSize = false;
|
|
400
|
-
this.page = new core.EventEmitter();
|
|
401
|
-
// ===== Sort =====
|
|
402
|
-
this.sortOnFront = true;
|
|
403
|
-
this.sortDisableClear = false;
|
|
404
|
-
this.sortDisabled = false;
|
|
405
|
-
this.sortStart = 'asc';
|
|
406
|
-
this.sortChange = new core.EventEmitter();
|
|
407
|
-
// ===== Row =====
|
|
408
|
-
this.rowHover = false;
|
|
409
|
-
this.rowStriped = false;
|
|
410
|
-
this.rowClick = new core.EventEmitter();
|
|
411
|
-
// ===== Expandable Row =====
|
|
412
|
-
this.expansionRowStates = [];
|
|
413
|
-
this.expandable = false;
|
|
414
|
-
this.expansionChange = new core.EventEmitter();
|
|
415
|
-
// ===== Row Selection =====
|
|
416
|
-
/** Whether support multiple row/cell selection. */
|
|
417
|
-
this.multiSelectable = true;
|
|
418
|
-
this.multiSelectionWithClick = false;
|
|
419
|
-
this.rowSelection = new collections.SelectionModel(true, []);
|
|
420
|
-
this.rowSelected = [];
|
|
421
|
-
this.rowSelectable = false;
|
|
422
|
-
this.hideRowSelectionCheckbox = false;
|
|
423
|
-
this.rowSelectionFormatter = {};
|
|
424
|
-
this.rowSelectionChange = new core.EventEmitter();
|
|
425
|
-
// ===== Cell Selection =====
|
|
426
|
-
this.cellSelection = [];
|
|
427
|
-
this.cellSelectable = true;
|
|
428
|
-
this.cellSelectionChange = new core.EventEmitter();
|
|
429
|
-
// ===== Toolbar =====
|
|
430
|
-
this.showToolbar = false;
|
|
431
|
-
this.toolbarTitle = '';
|
|
432
|
-
// ===== Column Menu =====
|
|
433
|
-
this.columnMenuData = [];
|
|
434
|
-
this.showColumnMenuButton = true;
|
|
435
|
-
this.columnMenuButtonText = '';
|
|
436
|
-
this.columnMenuButtonType = 'stroked';
|
|
437
|
-
this.columnMenuButtonClass = '';
|
|
438
|
-
this.columnMenuButtonIcon = '';
|
|
439
|
-
this.columnHideable = true;
|
|
440
|
-
this.columnHideableChecked = 'show';
|
|
441
|
-
this.columnMovable = true;
|
|
442
|
-
this.columnPinnable = true;
|
|
443
|
-
this.columnChange = new core.EventEmitter();
|
|
444
|
-
this.showColumnMenuHeader = false;
|
|
445
|
-
this.columnMenuHeaderText = 'Columns Header';
|
|
446
|
-
this.showColumnMenuFooter = false;
|
|
447
|
-
this.columnMenuFooterText = 'Columns Footer';
|
|
448
|
-
// ===== No Result =====
|
|
449
|
-
this.noResultText = 'No records found';
|
|
450
|
-
// ===== Row Templates =====
|
|
451
|
-
this.useContentRowTemplate = false;
|
|
452
|
-
// TODO: It can't use together with `useContentRowTemplate`
|
|
453
|
-
this.useContentHeaderRowTemplate = false;
|
|
454
|
-
// TODO: It's not working
|
|
455
|
-
this.useContentFooterRowTemplate = false;
|
|
456
|
-
// ===== Summary =====
|
|
457
|
-
this.showSummary = false;
|
|
458
|
-
// ===== Side Bar =====
|
|
459
|
-
this.showSidebar = false;
|
|
460
|
-
// ===== Status Bar =====
|
|
461
|
-
this.showStatusbar = false;
|
|
462
|
-
}
|
|
463
|
-
Object.defineProperty(MtxGridComponent.prototype, "_hasNoResult", {
|
|
464
|
-
get: function () {
|
|
465
|
-
return (!this.data || this.data.length === 0) && !this.loading;
|
|
466
|
-
},
|
|
467
|
-
enumerable: false,
|
|
468
|
-
configurable: true
|
|
469
|
-
});
|
|
470
|
-
Object.defineProperty(MtxGridComponent.prototype, "_whetherShowSummary", {
|
|
471
|
-
// TODO: Summary display conditions
|
|
472
|
-
get: function () {
|
|
473
|
-
return this.showSummary;
|
|
474
|
-
},
|
|
475
|
-
enumerable: false,
|
|
476
|
-
configurable: true
|
|
477
|
-
});
|
|
478
|
-
MtxGridComponent.prototype.detectChanges = function () {
|
|
479
|
-
this._changeDetectorRef.detectChanges();
|
|
480
|
-
};
|
|
481
|
-
MtxGridComponent.prototype._isTemplateRef = function (obj) {
|
|
482
|
-
return obj instanceof core.TemplateRef;
|
|
483
|
-
};
|
|
484
|
-
MtxGridComponent.prototype._getColData = function (data, colDef) {
|
|
485
|
-
return this._dataGridSrv.getColData(data, colDef);
|
|
486
|
-
};
|
|
487
|
-
MtxGridComponent.prototype._getRowClassList = function (rowData, index) {
|
|
488
|
-
var e_1, _e;
|
|
489
|
-
var classList = {
|
|
490
|
-
'selected': this.rowSelection.isSelected(rowData),
|
|
491
|
-
'mat-row-odd': index % 2,
|
|
492
|
-
};
|
|
493
|
-
if (this.rowClassFormatter) {
|
|
494
|
-
try {
|
|
495
|
-
for (var _f = __values(Object.keys(this.rowClassFormatter)), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
496
|
-
var key = _g.value;
|
|
497
|
-
classList[key] = this.rowClassFormatter[key](rowData, index);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
501
|
-
finally {
|
|
502
|
-
try {
|
|
503
|
-
if (_g && !_g.done && (_e = _f.return)) _e.call(_f);
|
|
504
|
-
}
|
|
505
|
-
finally { if (e_1) throw e_1.error; }
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
return classList;
|
|
509
|
-
};
|
|
510
|
-
// Waiting for async data
|
|
511
|
-
MtxGridComponent.prototype.ngOnChanges = function (changes) {
|
|
512
|
-
var _this = this;
|
|
513
|
-
var _a;
|
|
514
|
-
this._countPinnedPosition();
|
|
515
|
-
this.displayedColumns = this.columns.filter(function (item) { return !item.hide; }).map(function (item) { return item.field; });
|
|
516
|
-
if (this.showColumnMenuButton) {
|
|
517
|
-
this.columnMenuData = this.columns.map(function (item) {
|
|
518
|
-
var newItem = {
|
|
519
|
-
label: item.header,
|
|
520
|
-
field: item.field,
|
|
521
|
-
disabled: item.disabled,
|
|
522
|
-
};
|
|
523
|
-
if (_this.columnHideableChecked === 'show') {
|
|
524
|
-
newItem.show = !item.hide;
|
|
525
|
-
}
|
|
526
|
-
else {
|
|
527
|
-
newItem.hide = item.hide;
|
|
528
|
-
}
|
|
529
|
-
return newItem;
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
if (this.rowSelectable && !this.hideRowSelectionCheckbox) {
|
|
533
|
-
this.displayedColumns.unshift('MtxGridCheckboxColumnDef');
|
|
534
|
-
}
|
|
535
|
-
// We should copy each item of data for expansion data
|
|
536
|
-
if (this.expandable) {
|
|
537
|
-
this.expansionRowStates = []; // reset
|
|
538
|
-
(_a = this.data) === null || _a === void 0 ? void 0 : _a.forEach(function (_) {
|
|
539
|
-
_this.expansionRowStates.push({ expanded: false });
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
if (this.rowSelectable) {
|
|
543
|
-
this.rowSelection = new collections.SelectionModel(this.multiSelectable, this.rowSelected);
|
|
544
|
-
}
|
|
545
|
-
this.dataSource = new table.MatTableDataSource(this.data);
|
|
546
|
-
this.dataSource.paginator = this.pageOnFront ? this.paginator : null;
|
|
547
|
-
this.dataSource.sort = this.sortOnFront ? this.sort : null;
|
|
548
|
-
// Only scroll top with data change
|
|
549
|
-
if (changes.data) {
|
|
550
|
-
this.scrollTop(0);
|
|
551
|
-
}
|
|
552
|
-
};
|
|
553
|
-
MtxGridComponent.prototype.ngAfterViewInit = function () {
|
|
554
|
-
var _this = this;
|
|
555
|
-
var _a, _b, _c;
|
|
556
|
-
if (this.pageOnFront) {
|
|
557
|
-
this.dataSource.paginator = this.paginator;
|
|
558
|
-
}
|
|
559
|
-
if (this.sortOnFront) {
|
|
560
|
-
this.dataSource.sort = this.sort;
|
|
561
|
-
}
|
|
562
|
-
if (((_a = this.rowDefs) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.useContentRowTemplate) {
|
|
563
|
-
this.rowDefs.forEach(function (rowDef) { return _this.table.addRowDef(rowDef); });
|
|
564
|
-
}
|
|
565
|
-
if (((_b = this.headerRowDefs) === null || _b === void 0 ? void 0 : _b.length) > 0 && this.useContentHeaderRowTemplate) {
|
|
566
|
-
this.headerRowDefs.forEach(function (headerRowDef) { return _this.table.addHeaderRowDef(headerRowDef); });
|
|
567
|
-
}
|
|
568
|
-
if (((_c = this.footerRowDefs) === null || _c === void 0 ? void 0 : _c.length) > 0 && this.useContentFooterRowTemplate) {
|
|
569
|
-
this.footerRowDefs.forEach(function (footerRowDef) { return _this.table.addFooterRowDef(footerRowDef); });
|
|
570
|
-
}
|
|
571
|
-
};
|
|
572
|
-
MtxGridComponent.prototype.ngOnDestroy = function () { };
|
|
573
|
-
MtxGridComponent.prototype._countPinnedPosition = function () {
|
|
574
|
-
var count = function (acc, cur) { return acc + parseFloat(cur.width || '80px'); };
|
|
575
|
-
var pinnedLeftCols = this.columns.filter(function (col) { return col.pinned && col.pinned === 'left'; });
|
|
576
|
-
pinnedLeftCols.forEach(function (item, idx) {
|
|
577
|
-
item.left = pinnedLeftCols.slice(0, idx).reduce(count, 0) + 'px';
|
|
578
|
-
});
|
|
579
|
-
var pinnedRightCols = this.columns
|
|
580
|
-
.filter(function (col) { return col.pinned && col.pinned === 'right'; })
|
|
581
|
-
.reverse();
|
|
582
|
-
pinnedRightCols.forEach(function (item, idx) {
|
|
583
|
-
item.right = pinnedRightCols.slice(0, idx).reduce(count, 0) + 'px';
|
|
584
|
-
});
|
|
585
|
-
};
|
|
586
|
-
MtxGridComponent.prototype._getIndex = function (index, dataIndex) {
|
|
587
|
-
return typeof index === 'undefined' ? dataIndex : index;
|
|
588
|
-
};
|
|
589
|
-
MtxGridComponent.prototype._handleSortChange = function (sort) {
|
|
590
|
-
this.sortChange.emit(sort);
|
|
591
|
-
};
|
|
592
|
-
/** Expansion change event */
|
|
593
|
-
MtxGridComponent.prototype._handleExpansionChange = function (expansionRef, rowData, column, index) {
|
|
594
|
-
this.expansionChange.emit({ expanded: expansionRef.expanded, data: rowData, index: index, column: column });
|
|
595
|
-
};
|
|
596
|
-
/** Cell select event */
|
|
597
|
-
MtxGridComponent.prototype._selectCell = function (cellRef, rowData, colDef) {
|
|
598
|
-
// If not the same cell
|
|
599
|
-
if (this._selectedCell !== cellRef) {
|
|
600
|
-
var colValue = this._dataGridSrv.getCellValue(rowData, colDef);
|
|
601
|
-
this.cellSelection = []; // reset
|
|
602
|
-
this.cellSelection.push({ cellData: colValue, rowData: rowData, colDef: colDef });
|
|
603
|
-
this.cellSelectionChange.emit(this.cellSelection);
|
|
604
|
-
if (this._selectedCell) {
|
|
605
|
-
this._selectedCell.deselect(); // the selectedCell will be undefined
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
this._selectedCell = cellRef.selected ? cellRef : undefined;
|
|
609
|
-
};
|
|
610
|
-
/** Row select event */
|
|
611
|
-
MtxGridComponent.prototype._selectRow = function (event, rowData, index) {
|
|
612
|
-
var _a, _b, _c, _d;
|
|
613
|
-
if (this.rowSelectable &&
|
|
614
|
-
!((_b = (_a = this.rowSelectionFormatter).disabled) === null || _b === void 0 ? void 0 : _b.call(_a, rowData, index)) &&
|
|
615
|
-
!((_d = (_c = this.rowSelectionFormatter).hideCheckbox) === null || _d === void 0 ? void 0 : _d.call(_c, rowData, index))) {
|
|
616
|
-
// metaKey -> command key
|
|
617
|
-
if (!this.multiSelectionWithClick && !event.ctrlKey && !event.metaKey) {
|
|
618
|
-
this.rowSelection.clear();
|
|
619
|
-
}
|
|
620
|
-
this._toggleNormalCheckbox(rowData);
|
|
621
|
-
}
|
|
622
|
-
this.rowClick.emit({ rowData: rowData, index: index });
|
|
623
|
-
};
|
|
624
|
-
/** Whether the number of selected elements matches the total number of rows. */
|
|
625
|
-
MtxGridComponent.prototype._isAllSelected = function () {
|
|
626
|
-
var _this = this;
|
|
627
|
-
var numSelected = this.rowSelection.selected.length;
|
|
628
|
-
var numRows = this.dataSource.data.filter(function (row, index) { var _a, _b; return !((_b = (_a = _this.rowSelectionFormatter).disabled) === null || _b === void 0 ? void 0 : _b.call(_a, row, index)); }).length;
|
|
629
|
-
return numSelected === numRows;
|
|
630
|
-
};
|
|
631
|
-
/** Select all rows if they are not all selected; otherwise clear selection. */
|
|
632
|
-
MtxGridComponent.prototype._toggleMasterCheckbox = function () {
|
|
633
|
-
var _this = this;
|
|
634
|
-
this._isAllSelected()
|
|
635
|
-
? this.rowSelection.clear()
|
|
636
|
-
: this.dataSource.data.forEach(function (row, index) {
|
|
637
|
-
var _a, _b;
|
|
638
|
-
if (!((_b = (_a = _this.rowSelectionFormatter).disabled) === null || _b === void 0 ? void 0 : _b.call(_a, row, index))) {
|
|
639
|
-
_this.rowSelection.select(row);
|
|
640
|
-
}
|
|
641
|
-
});
|
|
642
|
-
this.rowSelectionChange.emit(this.rowSelection.selected);
|
|
643
|
-
};
|
|
644
|
-
/** Select normal row */
|
|
645
|
-
MtxGridComponent.prototype._toggleNormalCheckbox = function (row) {
|
|
646
|
-
this.rowSelection.toggle(row);
|
|
647
|
-
this.rowSelectionChange.emit(this.rowSelection.selected);
|
|
648
|
-
};
|
|
649
|
-
/** Column change event */
|
|
650
|
-
MtxGridComponent.prototype._handleColumnChange = function (columns) {
|
|
651
|
-
this.columnChange.emit(columns);
|
|
652
|
-
this.displayedColumns = Object.assign([], this.getDisplayedColumnFields(columns));
|
|
653
|
-
if (this.rowSelectable && !this.hideRowSelectionCheckbox) {
|
|
654
|
-
this.displayedColumns.unshift('MtxGridCheckboxColumnDef');
|
|
655
|
-
}
|
|
656
|
-
};
|
|
657
|
-
MtxGridComponent.prototype.getDisplayedColumnFields = function (columns) {
|
|
658
|
-
var _this = this;
|
|
659
|
-
var fields = columns
|
|
660
|
-
.filter(function (item) { return _this.columnHideableChecked === 'show' ? item.show : !item.hide; })
|
|
661
|
-
.map(function (item) { return item.field; });
|
|
662
|
-
return fields;
|
|
663
|
-
};
|
|
664
|
-
/** Customize expansion event */
|
|
665
|
-
MtxGridComponent.prototype.toggleExpansion = function (index) {
|
|
666
|
-
if (!this.expandable) {
|
|
667
|
-
throw new Error('The `expandable` should be set true.');
|
|
668
|
-
}
|
|
669
|
-
this.expansionRowStates[index].expanded = !this.expansionRowStates[index].expanded;
|
|
670
|
-
return this.expansionRowStates[index].expanded;
|
|
671
|
-
};
|
|
672
|
-
/** Scroll to top when turn to the next page. */
|
|
673
|
-
MtxGridComponent.prototype._handlePage = function (e) {
|
|
674
|
-
if (this.pageOnFront) {
|
|
675
|
-
this.scrollTop(0);
|
|
676
|
-
}
|
|
677
|
-
this.page.emit(e);
|
|
678
|
-
};
|
|
679
|
-
MtxGridComponent.prototype.scrollTop = function (value) {
|
|
680
|
-
var _a;
|
|
681
|
-
if (value == null) {
|
|
682
|
-
return (_a = this.tableContainer) === null || _a === void 0 ? void 0 : _a.nativeElement.scrollTop;
|
|
683
|
-
}
|
|
684
|
-
if (this.tableContainer && !this.loading) {
|
|
685
|
-
this.tableContainer.nativeElement.scrollTop = value;
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
MtxGridComponent.prototype.scrollLeft = function (value) {
|
|
689
|
-
var _a;
|
|
690
|
-
if (value == null) {
|
|
691
|
-
return (_a = this.tableContainer) === null || _a === void 0 ? void 0 : _a.nativeElement.scrollLeft;
|
|
692
|
-
}
|
|
693
|
-
if (this.tableContainer && !this.loading) {
|
|
694
|
-
this.tableContainer.nativeElement.scrollLeft = value;
|
|
695
|
-
}
|
|
696
|
-
};
|
|
697
|
-
return MtxGridComponent;
|
|
698
|
-
}());
|
|
699
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
700
|
-
MtxGridComponent.decorators = [
|
|
701
|
-
{ type: core.Component, args: [{
|
|
702
|
-
selector: 'mtx-grid',
|
|
703
|
-
exportAs: 'mtxGrid',
|
|
704
|
-
template: "<!-- Progress bar-->\r\n<div class=\"mtx-grid-progress\" *ngIf=\"loading\">\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n</div>\r\n\r\n<!-- Toolbar -->\r\n<div class=\"mtx-grid-toolbar\" *ngIf=\"showToolbar\">\r\n <div class=\"mtx-grid-toolbar-content\">\r\n <ng-template [ngIf]=\"_isTemplateRef(toolbarTemplate)\" [ngIfElse]=\"defaultToolbarTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"toolbarTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultToolbarTemplate>\r\n <div class=\"mtx-grid-toolbar-title\" *ngIf=\"toolbarTitle\">{{toolbarTitle}}</div>\r\n </ng-template>\r\n </div>\r\n <div class=\"mtx-grid-toolbar-actions\">\r\n <mtx-grid-column-menu *ngIf=\"showColumnMenuButton\" #columnMenu\r\n [columns]=\"columnMenuData\"\r\n [buttonText]=\"columnMenuButtonText\"\r\n [buttonType]=\"columnMenuButtonType\"\r\n [buttonColor]=\"columnMenuButtonColor\"\r\n [buttonClass]=\"columnMenuButtonClass\"\r\n [buttonIcon]=\"columnMenuButtonIcon\"\r\n [selectable]=\"columnHideable\"\r\n [selectableChecked]=\"columnHideableChecked\"\r\n [sortable]=\"columnMovable\"\r\n (selectionChange)=\"_handleColumnChange($event)\"\r\n (sortChange)=\"_handleColumnChange($event)\"\r\n [showHeader]=\"showColumnMenuHeader\"\r\n [headerText]=\"columnMenuHeaderText\"\r\n [headerTemplate]=\"columnMenuHeaderTemplate\"\r\n [showFooter]=\"showColumnMenuFooter\"\r\n [footerText]=\"columnMenuFooterText\"\r\n [footerTemplate]=\"columnMenuFooterTemplate\">\r\n </mtx-grid-column-menu>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mtx-grid-main mtx-grid-layout\">\r\n <!-- Table content -->\r\n <div class=\"mtx-grid-content mtx-grid-layout\">\r\n <div #tableContainer class=\"mat-table-container\"\r\n [ngClass]=\"{'mat-table-with-data': !_hasNoResult}\">\r\n <table mat-table *ngIf=\"!columnResizable\"\r\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-expandable': expandable}\"\r\n [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"expandable\"\r\n matSort\r\n [matSortActive]=\"sortActive\"\r\n [matSortDirection]=\"sortDirection\"\r\n [matSortDisableClear]=\"sortDisableClear\"\r\n [matSortDisabled]=\"sortDisabled\"\r\n [matSortStart]=\"sortStart\"\r\n (matSortChange)=\"_handleSortChange($event)\"\r\n [trackBy]=\"trackBy\">\r\n\r\n <ng-container *ngIf=\"rowSelectable && !hideRowSelectionCheckbox\"\r\n matColumnDef=\"MtxGridCheckboxColumnDef\">\r\n <th mat-header-cell *matHeaderCellDef class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"multiSelectable\"\r\n [checked]=\"rowSelection.hasValue() && _isAllSelected()\"\r\n [indeterminate]=\"rowSelection.hasValue() && !_isAllSelected()\"\r\n (change)=\"$event ? _toggleMasterCheckbox() : null\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"!(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox(row, _getIndex(index, dataIndex)))\"\r\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled(row, _getIndex(index, dataIndex))\"\r\n [checked]=\"rowSelection.isSelected(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? _toggleNormalCheckbox(row) : null\">\r\n </mat-checkbox>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef class=\"mtx-grid-checkbox-cell\"></td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let col of columns;\">\r\n <ng-container [matColumnDef]=\"col.field\"\r\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\r\n <th mat-header-cell *matHeaderCellDef\r\n [class]=\"col.class!\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\">\r\n <div class=\"mat-header-cell-inner\">\r\n <ng-template [ngIf]=\"_isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerTpl>\r\n <ng-template [ngIf]=\"headerTemplate && _isTemplateRef(headerTemplate[col.field])\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>\r\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\r\n [disabled]=\"!col.sortable\"\r\n [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [disableClear]=\"col.sortProp?.disableClear\"\r\n [start]=\"col.sortProp?.start!\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n <span>{{col.header | toObservable | async}}</span>\r\n <mat-icon class=\"mat-sort-header-icon\" *ngIf=\"col.sortable\">sort</mat-icon>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTplBase\"\r\n [ngTemplateOutletContext]=\"{ $implicit: headerExtraTemplate, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n [class]=\"col.class!\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\"\r\n mtx-grid-selectable-cell (cellSelectionChange)=\"_selectCell($event, row, col)\">\r\n <ng-template [ngIf]=\"_isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"cellTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #cellTpl>\r\n <ng-template [ngIf]=\"cellTemplate && _isTemplateRef(cellTemplate[col.field])\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"cellTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #colDefCellTpl>\r\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\r\n [ngTemplateOutlet]=\"col.cellTemplate!\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultCellTpl>\r\n <button *ngIf=\"col.showExpand\" mat-icon-button mtx-grid-expansion-toggle\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_handleExpansionChange($event, row, col, dataIndex);\">\r\n <mat-icon>keyboard_arrow_right</mat-icon>\r\n </button>\r\n\r\n <mtx-grid-cell [rowData]=\"row\" [colDef]=\"col\"></mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'min-width': col.width, 'left': col.left, 'right': col.right}\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n\r\n <ng-template [ngIf]=\"_isTemplateRef(summaryTemplate)\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"summaryTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col, data: data }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #summaryTpl>\r\n <ng-template [ngIf]=\"summaryTemplate && _isTemplateRef(summaryTemplate[col.field])\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"summaryTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: _getColData(data, col), colData: _getColData(data, col), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultSummaryTpl>\r\n <mtx-grid-cell [summary]=\"true\" [data]=\"data\" [colDef]=\"col\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template [ngIf]=\"useContentHeaderRowTemplate\" [ngIfElse]=\"defaultHeaderRowTpl\">\r\n </ng-template>\r\n <ng-template #defaultHeaderRowTpl>\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"useContentRowTemplate\" [ngIfElse]=\"defaultRowTpl\"></ng-template>\r\n <ng-template #defaultRowTpl>\r\n <tr mat-row\r\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\r\n [ngClass]=\"_getRowClassList(row, _getIndex(index, dataIndex))\"\r\n (click)=\"_selectRow($event, row, _getIndex(index, dataIndex))\">\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"_whetherShowSummary\">\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n <ng-template [ngIf]=\"useContentFooterRowTemplate\"></ng-template>\r\n\r\n <ng-container *ngIf=\"expandable\">\r\n <!-- Expanded Content Column - The expandable row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"MtxGridExpansionColumnDef\">\r\n <td mat-cell *matCellDef=\"let row; let dataIndex = dataIndex\"\r\n [attr.colspan]=\"displayedColumns.length\">\r\n <div class=\"mtx-grid-expansion-detail\"\r\n [@expansion]=\"expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed'\">\r\n <ng-template [ngTemplateOutlet]=\"expansionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: dataIndex, expanded: expansionRowStates[dataIndex].expanded }\">\r\n </ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-row\r\n *matRowDef=\"let row; columns: ['MtxGridExpansionColumnDef']; let dataIndex = dataIndex\"\r\n [ngClass]=\"['mtx-grid-expansion', expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed']\">\r\n </tr>\r\n </ng-container>\r\n </table>\r\n\r\n <!-- TODO: Use flexbox-based mat-table -->\r\n <table mat-table *ngIf=\"columnResizable\"\r\n columnResize\r\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-expandable': expandable}\"\r\n [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"expandable\"\r\n matSort\r\n [matSortActive]=\"sortActive\"\r\n [matSortDirection]=\"sortDirection\"\r\n [matSortDisableClear]=\"sortDisableClear\"\r\n [matSortDisabled]=\"sortDisabled\"\r\n [matSortStart]=\"sortStart\"\r\n (matSortChange)=\"_handleSortChange($event)\"\r\n [trackBy]=\"trackBy\">\r\n\r\n <ng-container *ngIf=\"rowSelectable && !hideRowSelectionCheckbox\"\r\n matColumnDef=\"MtxGridCheckboxColumnDef\">\r\n <th mat-header-cell *matHeaderCellDef class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"multiSelectable\"\r\n [checked]=\"rowSelection.hasValue() && _isAllSelected()\"\r\n [indeterminate]=\"rowSelection.hasValue() && !_isAllSelected()\"\r\n (change)=\"$event ? _toggleMasterCheckbox() : null\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n class=\"mtx-grid-checkbox-cell\">\r\n <mat-checkbox *ngIf=\"!(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox(row, _getIndex(index, dataIndex)))\"\r\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled(row, _getIndex(index, dataIndex))\"\r\n [checked]=\"rowSelection.isSelected(row)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? _toggleNormalCheckbox(row) : null\">\r\n </mat-checkbox>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef class=\"mtx-grid-checkbox-cell\"></td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let col of columns;\">\r\n <ng-container [matColumnDef]=\"col.field\"\r\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\r\n <th mat-header-cell *matHeaderCellDef\r\n [class]=\"col.class!\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\"\r\n [resizable]=\"col.resizable\"\r\n [matResizableMinWidthPx]=\"col.minWidth\" [matResizableMaxWidthPx]=\"col.maxWidth\">\r\n <div class=\"mat-header-cell-inner\">\r\n <ng-template [ngIf]=\"_isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerTpl>\r\n <ng-template [ngIf]=\"headerTemplate && _isTemplateRef(headerTemplate[col.field])\"\r\n [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>\r\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\r\n [disabled]=\"!col.sortable\"\r\n [arrowPosition]=\"col.sortProp?.arrowPosition!\"\r\n [disableClear]=\"col.sortProp?.disableClear\"\r\n [start]=\"col.sortProp?.start!\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n <span>{{col.header | toObservable | async}}</span>\r\n <mat-icon class=\"mat-sort-header-icon\" *ngIf=\"col.sortable\">sort</mat-icon>\r\n </div>\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTplBase\"\r\n [ngTemplateOutletContext]=\"{ $implicit: headerExtraTemplate, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\r\n [class]=\"col.class!\"\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\"\r\n mtx-grid-selectable-cell (cellSelectionChange)=\"_selectCell($event, row, col)\">\r\n <ng-template [ngIf]=\"_isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"cellTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #cellTpl>\r\n <ng-template [ngIf]=\"cellTemplate && _isTemplateRef(cellTemplate[col.field])\"\r\n [ngIfElse]=\"colDefCellTpl\">\r\n <ng-template [ngTemplateOutlet]=\"cellTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #colDefCellTpl>\r\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\r\n [ngTemplateOutlet]=\"col.cellTemplate!\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: _getIndex(index, dataIndex), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultCellTpl>\r\n <button *ngIf=\"col.showExpand\" mat-icon-button mtx-grid-expansion-toggle\r\n [(opened)]=\"expansionRowStates[dataIndex].expanded\"\r\n (toggleChange)=\"_handleExpansionChange($event, row, col, dataIndex);\">\r\n <mat-icon>keyboard_arrow_right</mat-icon>\r\n </button>\r\n\r\n <mtx-grid-cell [rowData]=\"row\" [colDef]=\"col\"></mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef\r\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\r\n [ngStyle]=\"{'width': col.width, 'left': col.left, 'right': col.right}\">\r\n <span class=\"mtx-grid-expansion-placeholder\" *ngIf=\"col.showExpand\"></span>\r\n\r\n <ng-template [ngIf]=\"_isTemplateRef(summaryTemplate)\" [ngIfElse]=\"summaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"summaryTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col, data: data }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #summaryTpl>\r\n <ng-template [ngIf]=\"summaryTemplate && _isTemplateRef(summaryTemplate[col.field])\"\r\n [ngIfElse]=\"defaultSummaryTpl\">\r\n <ng-template [ngTemplateOutlet]=\"summaryTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: _getColData(data, col), colData: _getColData(data, col), colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #defaultSummaryTpl>\r\n <mtx-grid-cell [summary]=\"true\" [data]=\"data\" [colDef]=\"col\">\r\n </mtx-grid-cell>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template [ngIf]=\"useContentHeaderRowTemplate\" [ngIfElse]=\"defaultHeaderRowTpl\">\r\n </ng-template>\r\n <ng-template #defaultHeaderRowTpl>\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"useContentRowTemplate\" [ngIfElse]=\"defaultRowTpl\"></ng-template>\r\n <ng-template #defaultRowTpl>\r\n <tr mat-row\r\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\r\n [ngClass]=\"_getRowClassList(row, _getIndex(index, dataIndex))\"\r\n (click)=\"_selectRow($event, row, _getIndex(index, dataIndex))\">\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"_whetherShowSummary\">\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n </ng-template>\r\n <ng-template [ngIf]=\"useContentFooterRowTemplate\"></ng-template>\r\n\r\n <ng-container *ngIf=\"expandable\">\r\n <!-- Expanded Content Column - The expandable row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"MtxGridExpansionColumnDef\">\r\n <td mat-cell *matCellDef=\"let row; let dataIndex = dataIndex\"\r\n [attr.colspan]=\"displayedColumns.length\">\r\n <div class=\"mtx-grid-expansion-detail\"\r\n [@expansion]=\"expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed'\">\r\n <ng-template [ngTemplateOutlet]=\"expansionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: dataIndex, expanded: expansionRowStates[dataIndex].expanded }\">\r\n </ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-row\r\n *matRowDef=\"let row; columns: ['MtxGridExpansionColumnDef']; let dataIndex = dataIndex\"\r\n [ngClass]=\"['mtx-grid-expansion', expansionRowStates[dataIndex].expanded ? 'expanded' : 'collapsed']\">\r\n </tr>\r\n </ng-container>\r\n </table>\r\n </div>\r\n\r\n <!-- No result -->\r\n <div class=\"mtx-grid-no-result\" *ngIf=\"_hasNoResult\">\r\n <ng-template [ngIf]=\"_isTemplateRef(noResultTemplate)\" [ngIfElse]=\"defaultNoResultTpl\">\r\n <ng-template [ngTemplateOutlet]=\"noResultTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultNoResultTpl>{{noResultText}}</ng-template>\r\n </div>\r\n </div>\r\n\r\n <!-- Tool sidebar -->\r\n <div class=\"mtx-grid-sidebar\" *ngIf=\"showSidebar\">\r\n <ng-template [ngIf]=\"_isTemplateRef(sidebarTemplate)\">\r\n <ng-template [ngTemplateOutlet]=\"sidebarTemplate\"></ng-template>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mtx-grid-footer\">\r\n <!-- Status Bar -->\r\n <div class=\"mtx-grid-statusbar\" *ngIf=\"showStatusbar\">\r\n <ng-template [ngIf]=\"_isTemplateRef(statusbarTemplate)\">\r\n <ng-template [ngTemplateOutlet]=\"statusbarTemplate\"></ng-template>\r\n </ng-template>\r\n </div>\r\n\r\n <!-- Pagination -->\r\n <div class=\"mtx-grid-pagination\">\r\n <ng-template [ngIf]=\"_isTemplateRef(paginationTemplate)\" [ngIfElse]=\"defaultPaginationTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"paginationTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultPaginationTemplate>\r\n <mat-paginator [class.mat-paginator-hidden]=\"!showPaginator || _hasNoResult\"\r\n [showFirstLastButtons]=\"showFirstLastButtons\"\r\n [length]=\"length\"\r\n [pageIndex]=\"pageIndex\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n [hidePageSize]=\"hidePageSize\"\r\n (page)=\"_handlePage($event)\"\r\n [disabled]=\"pageDisabled\">\r\n </mat-paginator>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<!-- Header template for extra content -->\r\n<ng-template #headerExtraTplBase let-headerExtraTemplate let-col=\"colDef\">\r\n <ng-template [ngIf]=\"_isTemplateRef(headerExtraTemplate)\" [ngIfElse]=\"headerExtraTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n <ng-template #headerExtraTpl>\r\n <ng-template [ngIf]=\"headerExtraTemplate && _isTemplateRef(headerExtraTemplate[col.field])\">\r\n <ng-template [ngTemplateOutlet]=\"headerExtraTemplate[col.field]\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n</ng-template>\r\n",
|
|
705
|
-
host: {
|
|
706
|
-
class: 'mtx-grid',
|
|
707
|
-
},
|
|
708
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
709
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
710
|
-
animations: [
|
|
711
|
-
animations.trigger('expansion', [
|
|
712
|
-
animations.state('collapsed', animations.style({ height: '0', minHeight: '0', visibility: 'hidden' })),
|
|
713
|
-
animations.state('expanded', animations.style({ height: '*', visibility: 'visible' })),
|
|
714
|
-
animations.transition('expanded <=> collapsed', animations.animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
715
|
-
]),
|
|
716
|
-
],
|
|
717
|
-
styles: [".mtx-grid{position:relative;display:flex;flex-direction:column;width:100%}.mtx-grid .mat-table-container{overflow:auto}.mtx-grid .mat-table-container.mat-table-with-data{flex:1}.mtx-grid .mat-table:not(.mat-column-resize-table){min-width:100%;border-collapse:separate}.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-header-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-footer-cell:not(.mtx-grid-checkbox-cell),.mtx-grid .mat-table:not(.mat-column-resize-table) .mat-cell:not(.mtx-grid-checkbox-cell){min-width:80px}.mtx-grid .mat-table-sticky-left{border-right-width:1px;border-right-style:solid}[dir=rtl] .mtx-grid .mat-table-sticky-left{border-right-width:0;border-left-width:1px;border-left-style:solid}.mtx-grid .mat-table-sticky-right{border-left-width:1px;border-left-style:solid}[dir=rtl] .mtx-grid .mat-table-sticky-right{border-left-width:0;border-right-width:1px;border-right-style:solid}.mtx-grid .mat-header-cell,.mtx-grid .mat-footer-cell,.mtx-grid .mat-cell{padding:4px 10px;box-sizing:border-box}.mtx-grid .mat-header-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type),.mtx-grid .mat-cell:first-of-type:not(:only-of-type){padding-left:24px}.mtx-grid .mat-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,.mtx-grid .mat-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}[dir=rtl] .mtx-grid .mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-cell:first-of-type:not(:only-of-type){padding-left:10px;padding-right:24px}[dir=rtl] .mtx-grid .mat-header-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-footer-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell,[dir=rtl] .mtx-grid .mat-cell:first-of-type:not(:only-of-type).mtx-grid-checkbox-cell{padding-left:10px;padding-right:10px}.mtx-grid .mat-header-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-footer-cell:last-of-type:not(:only-of-type),.mtx-grid .mat-cell:last-of-type:not(:only-of-type){padding-right:24px}[dir=rtl] .mtx-grid .mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-footer-cell:last-of-type:not(:only-of-type),[dir=rtl] .mtx-grid .mat-cell:last-of-type:not(:only-of-type){padding-left:24px;padding-right:10px}.mtx-grid .mat-cell .mat-icon-button.expanded .mat-icon{transform:rotate(90deg)}.mtx-grid .mat-row.mtx-grid-expansion{height:0;overflow:hidden}.mtx-grid .mat-row.mtx-grid-expansion .mat-cell{padding-top:0;padding-bottom:0}.mtx-grid .mat-row.mtx-grid-expansion.collapsed .mat-cell{border-bottom-width:0}.mtx-grid .mat-row:last-of-type .mat-cell{border-bottom-width:0}.mtx-grid .mat-sort-header-icon{width:18px;height:18px;margin:0 4px;font-size:18px}.mtx-grid .mat-header-cell-inner{display:flex;align-items:center}.mtx-grid .mat-paginator-hidden{display:none}.mtx-grid-progress{position:absolute;top:0;z-index:120;width:100%}.mtx-grid-toolbar{display:flex;justify-content:space-between;align-items:center;min-height:48px;padding:8px;box-sizing:border-box}.mtx-grid-layout{display:flex;flex:1 1 auto;overflow:auto}.mtx-grid-content{flex-direction:column;width:0}.mtx-grid-sidebar{max-width:50%;border-left-width:1px;border-left-style:solid}[dir=rtl] .mtx-grid-sidebar{border-left-width:0;border-right-width:1px;border-right-style:solid}.mtx-grid-footer{position:relative;z-index:1}.mtx-grid-statusbar{display:flex;align-items:center;min-height:56px;padding:8px}.mtx-grid-no-result{display:flex;justify-content:center;align-items:center;flex:1;min-height:150px}.mtx-grid-expansion-placeholder{display:inline-block;width:40px;height:40px;vertical-align:middle}.mtx-grid-expansion-detail{display:flex;align-items:center;min-height:48px;overflow:hidden}.mtx-grid-checkbox-cell{flex:none;justify-content:center;width:56px;min-width:56px}.mtx-grid-checkbox-cell .mat-checkbox{display:flex;margin:0 10px}.mtx-grid-checkbox-cell .mat-checkbox-inner-container{margin-left:0}\n"]
|
|
718
|
-
},] }
|
|
719
|
-
];
|
|
720
|
-
/**
|
|
721
|
-
* @type {function(): !Array<(null|{
|
|
722
|
-
* type: ?,
|
|
723
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
724
|
-
* })>}
|
|
725
|
-
* @nocollapse
|
|
726
|
-
*/
|
|
727
|
-
MtxGridComponent.ctorParameters = function () { return [
|
|
728
|
-
{ type: MtxGridService },
|
|
729
|
-
{ type: core.ChangeDetectorRef }
|
|
730
|
-
]; };
|
|
731
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
732
|
-
MtxGridComponent.propDecorators = {
|
|
733
|
-
table: [{ type: core.ViewChild, args: [table.MatTable,] }],
|
|
734
|
-
paginator: [{ type: core.ViewChild, args: [paginator.MatPaginator,] }],
|
|
735
|
-
sort: [{ type: core.ViewChild, args: [sort.MatSort,] }],
|
|
736
|
-
rowDefs: [{ type: core.ContentChildren, args: [table.MatRowDef,] }],
|
|
737
|
-
headerRowDefs: [{ type: core.ContentChildren, args: [table.MatHeaderRowDef,] }],
|
|
738
|
-
footerRowDefs: [{ type: core.ContentChildren, args: [table.MatFooterRow,] }],
|
|
739
|
-
columnMenu: [{ type: core.ViewChild, args: ['columnMenu',] }],
|
|
740
|
-
tableContainer: [{ type: core.ViewChild, args: ['tableContainer',] }],
|
|
741
|
-
displayedColumns: [{ type: core.Input }],
|
|
742
|
-
columns: [{ type: core.Input }],
|
|
743
|
-
data: [{ type: core.Input }],
|
|
744
|
-
length: [{ type: core.Input }],
|
|
745
|
-
loading: [{ type: core.Input }],
|
|
746
|
-
trackBy: [{ type: core.Input }],
|
|
747
|
-
columnResizable: [{ type: core.Input }],
|
|
748
|
-
pageOnFront: [{ type: core.Input }],
|
|
749
|
-
showPaginator: [{ type: core.Input }],
|
|
750
|
-
pageDisabled: [{ type: core.Input }],
|
|
751
|
-
showFirstLastButtons: [{ type: core.Input }],
|
|
752
|
-
pageIndex: [{ type: core.Input }],
|
|
753
|
-
pageSize: [{ type: core.Input }],
|
|
754
|
-
pageSizeOptions: [{ type: core.Input }],
|
|
755
|
-
hidePageSize: [{ type: core.Input }],
|
|
756
|
-
page: [{ type: core.Output }],
|
|
757
|
-
paginationTemplate: [{ type: core.Input }],
|
|
758
|
-
sortOnFront: [{ type: core.Input }],
|
|
759
|
-
sortActive: [{ type: core.Input }],
|
|
760
|
-
sortDirection: [{ type: core.Input }],
|
|
761
|
-
sortDisableClear: [{ type: core.Input }],
|
|
762
|
-
sortDisabled: [{ type: core.Input }],
|
|
763
|
-
sortStart: [{ type: core.Input }],
|
|
764
|
-
sortChange: [{ type: core.Output }],
|
|
765
|
-
rowHover: [{ type: core.Input }],
|
|
766
|
-
rowStriped: [{ type: core.Input }],
|
|
767
|
-
rowClick: [{ type: core.Output }],
|
|
768
|
-
expandable: [{ type: core.Input }],
|
|
769
|
-
expansionTemplate: [{ type: core.Input }],
|
|
770
|
-
expansionChange: [{ type: core.Output }],
|
|
771
|
-
multiSelectable: [{ type: core.Input }],
|
|
772
|
-
multiSelectionWithClick: [{ type: core.Input }],
|
|
773
|
-
rowSelected: [{ type: core.Input }],
|
|
774
|
-
rowSelectable: [{ type: core.Input }],
|
|
775
|
-
hideRowSelectionCheckbox: [{ type: core.Input }],
|
|
776
|
-
rowSelectionFormatter: [{ type: core.Input }],
|
|
777
|
-
rowClassFormatter: [{ type: core.Input }],
|
|
778
|
-
rowSelectionChange: [{ type: core.Output }],
|
|
779
|
-
cellSelectable: [{ type: core.Input }],
|
|
780
|
-
cellSelectionChange: [{ type: core.Output }],
|
|
781
|
-
showToolbar: [{ type: core.Input }],
|
|
782
|
-
toolbarTitle: [{ type: core.Input }],
|
|
783
|
-
toolbarTemplate: [{ type: core.Input }],
|
|
784
|
-
showColumnMenuButton: [{ type: core.Input }],
|
|
785
|
-
columnMenuButtonText: [{ type: core.Input }],
|
|
786
|
-
columnMenuButtonType: [{ type: core.Input }],
|
|
787
|
-
columnMenuButtonColor: [{ type: core.Input }],
|
|
788
|
-
columnMenuButtonClass: [{ type: core.Input }],
|
|
789
|
-
columnMenuButtonIcon: [{ type: core.Input }],
|
|
790
|
-
columnHideable: [{ type: core.Input }],
|
|
791
|
-
columnHideableChecked: [{ type: core.Input }],
|
|
792
|
-
columnMovable: [{ type: core.Input }],
|
|
793
|
-
columnPinnable: [{ type: core.Input }],
|
|
794
|
-
columnChange: [{ type: core.Output }],
|
|
795
|
-
showColumnMenuHeader: [{ type: core.Input }],
|
|
796
|
-
columnMenuHeaderText: [{ type: core.Input }],
|
|
797
|
-
columnMenuHeaderTemplate: [{ type: core.Input }],
|
|
798
|
-
showColumnMenuFooter: [{ type: core.Input }],
|
|
799
|
-
columnMenuFooterText: [{ type: core.Input }],
|
|
800
|
-
columnMenuFooterTemplate: [{ type: core.Input }],
|
|
801
|
-
noResultText: [{ type: core.Input }],
|
|
802
|
-
noResultTemplate: [{ type: core.Input }],
|
|
803
|
-
headerTemplate: [{ type: core.Input }],
|
|
804
|
-
headerExtraTemplate: [{ type: core.Input }],
|
|
805
|
-
cellTemplate: [{ type: core.Input }],
|
|
806
|
-
useContentRowTemplate: [{ type: core.Input }],
|
|
807
|
-
useContentHeaderRowTemplate: [{ type: core.Input }],
|
|
808
|
-
useContentFooterRowTemplate: [{ type: core.Input }],
|
|
809
|
-
showSummary: [{ type: core.Input }],
|
|
810
|
-
summaryTemplate: [{ type: core.Input }],
|
|
811
|
-
showSidebar: [{ type: core.Input }],
|
|
812
|
-
sidebarTemplate: [{ type: core.Input }],
|
|
813
|
-
showStatusbar: [{ type: core.Input }],
|
|
814
|
-
statusbarTemplate: [{ type: core.Input }]
|
|
815
|
-
};
|
|
816
|
-
|
|
817
|
-
var MtxGridCellComponent = /** @class */ (function () {
|
|
818
|
-
function MtxGridCellComponent(_dialog, _dataGridSrv) {
|
|
819
|
-
this._dialog = _dialog;
|
|
820
|
-
this._dataGridSrv = _dataGridSrv;
|
|
821
|
-
/** Row data */
|
|
822
|
-
this.rowData = {};
|
|
823
|
-
/** All data */
|
|
824
|
-
this.data = [];
|
|
825
|
-
/** Whether show summary */
|
|
826
|
-
this.summary = false;
|
|
827
|
-
}
|
|
828
|
-
Object.defineProperty(MtxGridCellComponent.prototype, "_colValue", {
|
|
829
|
-
get: function () {
|
|
830
|
-
return this._dataGridSrv.getCellValue(this.rowData, this.colDef);
|
|
831
|
-
},
|
|
832
|
-
enumerable: false,
|
|
833
|
-
configurable: true
|
|
834
|
-
});
|
|
835
|
-
MtxGridCellComponent.prototype._isString = function (fn) {
|
|
836
|
-
return Object.prototype.toString.call(fn) === '[object String]';
|
|
837
|
-
};
|
|
838
|
-
MtxGridCellComponent.prototype._isFunction = function (fn) {
|
|
839
|
-
return Object.prototype.toString.call(fn) === '[object Function]';
|
|
840
|
-
};
|
|
841
|
-
MtxGridCellComponent.prototype._isEmptyValue = function (value) {
|
|
842
|
-
return value == null || value.toString() === '';
|
|
843
|
-
};
|
|
844
|
-
MtxGridCellComponent.prototype._isContainHTML = function (value) {
|
|
845
|
-
return /<\/?[a-z][\s\S]*>/i.test(value);
|
|
846
|
-
};
|
|
847
|
-
MtxGridCellComponent.prototype._getText = function (value) {
|
|
848
|
-
return this._isEmptyValue(value) ? '--' : value;
|
|
849
|
-
};
|
|
850
|
-
MtxGridCellComponent.prototype._getTooltip = function (value) {
|
|
851
|
-
return this._isEmptyValue(value) ? '' : value;
|
|
852
|
-
};
|
|
853
|
-
MtxGridCellComponent.prototype._getFormatterTooltip = function (value) {
|
|
854
|
-
return this._isContainHTML(value) || this._isEmptyValue(value) ? '' : value;
|
|
855
|
-
};
|
|
856
|
-
MtxGridCellComponent.prototype._formatSummary = function (data, colDef) {
|
|
857
|
-
if (this._isString(colDef.summary)) {
|
|
858
|
-
return colDef.summary;
|
|
859
|
-
}
|
|
860
|
-
else if (this._isFunction(colDef.summary)) {
|
|
861
|
-
return colDef.summary(this._dataGridSrv.getColData(data, colDef), colDef);
|
|
862
|
-
}
|
|
863
|
-
};
|
|
864
|
-
MtxGridCellComponent.prototype._handleActionConfirm = function (event, title, description, okColor, okText, closeColor, closeText, fn, data) {
|
|
865
|
-
if (description === void 0) { description = ''; }
|
|
866
|
-
if (okColor === void 0) { okColor = 'primary'; }
|
|
867
|
-
if (okText === void 0) { okText = 'OK'; }
|
|
868
|
-
if (closeText === void 0) { closeText = 'CLOSE'; }
|
|
869
|
-
event.preventDefault();
|
|
870
|
-
event.stopPropagation();
|
|
871
|
-
this._dialog.open({
|
|
872
|
-
title: title,
|
|
873
|
-
description: description,
|
|
874
|
-
buttons: [
|
|
875
|
-
{
|
|
876
|
-
color: okColor,
|
|
877
|
-
text: okText,
|
|
878
|
-
onClick: function () { return (fn ? fn(data) : {}); },
|
|
879
|
-
},
|
|
880
|
-
{ color: closeColor, text: closeText, onClick: function () { } },
|
|
881
|
-
],
|
|
882
|
-
});
|
|
883
|
-
};
|
|
884
|
-
MtxGridCellComponent.prototype._handleActionClick = function (event, btn, rowData) {
|
|
885
|
-
event.preventDefault();
|
|
886
|
-
event.stopPropagation();
|
|
887
|
-
if (btn.click) {
|
|
888
|
-
btn.click(rowData);
|
|
889
|
-
}
|
|
890
|
-
};
|
|
891
|
-
/** Preview enlarged image */
|
|
892
|
-
MtxGridCellComponent.prototype._onPreview = function (urlStr) {
|
|
893
|
-
var imgs = [];
|
|
894
|
-
this._dataGridSrv.str2arr(urlStr).forEach(function (url, index) {
|
|
895
|
-
imgs.push({ title: index + 1 + '', src: url });
|
|
896
|
-
});
|
|
897
|
-
var footerToolbar = imgs.length > 1
|
|
898
|
-
? ['zoomIn', 'zoomOut', 'prev', 'next', 'rotateRight', 'rotateLeft', 'actualSize']
|
|
899
|
-
: ['zoomIn', 'zoomOut', 'rotateRight', 'rotateLeft', 'actualSize'];
|
|
900
|
-
var options = {
|
|
901
|
-
title: imgs.length > 1,
|
|
902
|
-
footerToolbar: footerToolbar,
|
|
903
|
-
};
|
|
904
|
-
var viewer = new PhotoViewer__default['default'](imgs, options);
|
|
905
|
-
};
|
|
906
|
-
return MtxGridCellComponent;
|
|
907
|
-
}());
|
|
908
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
909
|
-
MtxGridCellComponent.decorators = [
|
|
910
|
-
{ type: core.Component, args: [{
|
|
911
|
-
selector: 'mtx-grid-cell',
|
|
912
|
-
exportAs: 'mtxGridCell',
|
|
913
|
-
template: "<span *ngIf=\"summary; else customCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip(_formatSummary(data, colDef))\"\r\n [innerHTML]=\"_getText(_formatSummary(data, colDef))\">\r\n</span>\r\n\r\n<!-- Custom formatting -->\r\n<ng-template #customCellFormattingTpl>\r\n <span *ngIf=\"colDef.formatter; else defaultCellFormattingTpl\"\r\n [title]=\"_getFormatterTooltip(colDef.formatter(rowData, colDef))\"\r\n [innerHTML]=\"_getText(colDef.formatter(rowData, colDef))\">\r\n </span>\r\n</ng-template>\r\n\r\n<!-- Default formatting -->\r\n<ng-template #defaultCellFormattingTpl>\r\n <ng-container [ngSwitch]=\"colDef.type\">\r\n <!-- Tag -->\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <mat-chip-list *ngIf=\"colDef.tag && colDef.tag[_colValue]; else tagEmptyTpl\">\r\n <mat-chip color=\"primary\" [ngClass]=\"['bg-' + colDef.tag[_colValue].color]\">\r\n {{colDef.tag[_colValue].text}}\r\n </mat-chip>\r\n </mat-chip-list>\r\n <ng-template #tagEmptyTpl>{{_colValue}}</ng-template>\r\n </ng-container>\r\n <!-- Buttons -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <ng-container *ngFor=\"let btn of colDef.buttons;\">\r\n <ng-container *ngIf=\"!btn.iif || btn.iif(rowData)\">\r\n <ng-container *ngIf=\"btn.pop; else btnDefaultTpl\">\r\n <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"btn.type==='basic'\"\r\n mat-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionConfirm($event, btn.popTitle!, btn.popDescription,\r\n btn.popOkColor, btn.popOkText,\r\n btn.popCloseColor, btn.popCloseText,\r\n btn.click, rowData)\">\r\n <mat-icon *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"!btn.type || btn.type==='icon'\"\r\n mat-icon-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionConfirm($event, btn.popTitle!, btn.popDescription,\r\n btn.popOkColor, btn.popOkText,\r\n btn.popCloseColor, btn.popCloseText,\r\n btn.click, rowData)\">\r\n <mat-icon>{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-template #btnDefaultTpl>\r\n <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"btn.type==='basic'\"\r\n mat-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionClick($event, btn, rowData)\">\r\n <mat-icon *ngIf=\"btn.icon\">{{btn.icon}}</mat-icon>\r\n <span>{{btn.text | toObservable | async}}</span>\r\n </button>\r\n <button [ngClass]=\"['mtx-grid-action-button', btn.class||'']\"\r\n *ngIf=\"!btn.type || btn.type==='icon'\"\r\n mat-icon-button\r\n [color]=\"btn.color || 'primary'\"\r\n [disabled]=\"btn.disabled\"\r\n [matTooltip]=\"btn.tooltip | toObservable | async\"\r\n (click)=\"_handleActionClick($event, btn, rowData)\">\r\n <mat-icon>{{btn.icon}}</mat-icon>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- Link -->\r\n <ng-container *ngSwitchCase=\"'link'\">\r\n <a [href]=\"_colValue\" target=\"_blank\">{{_colValue}}</a>\r\n </ng-container>\r\n <!-- Image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <img class=\"mtx-grid-img\" [src]=\"_colValue\" (click)=\"_onPreview(_colValue)\">\r\n </ng-container>\r\n <!-- Boolean -->\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <span [title]=\"_getTooltip(_colValue)\">{{_getText(_colValue)}}</span>\r\n </ng-container>\r\n <!-- Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <span [title]=\"_getTooltip(_colValue | number: colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | number: colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Currency -->\r\n <ng-container *ngSwitchCase=\"'currency'\">\r\n <span [title]=\"_getTooltip(_colValue | currency: colDef.typeParameter?.currencyCode : colDef.typeParameter?.display : colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | currency: colDef.typeParameter?.currencyCode : colDef.typeParameter?.display : colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Percent -->\r\n <ng-container *ngSwitchCase=\"'percent'\">\r\n <span [title]=\"_getTooltip(_colValue | percent: colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | percent: colDef.typeParameter?.digitsInfo : colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <span [title]=\"_getTooltip(_colValue | date: colDef.typeParameter?.format : colDef.typeParameter?.timezone : colDef.typeParameter?.locale)\">\r\n {{_getText(_colValue | date: colDef.typeParameter?.format : colDef.typeParameter?.timezone : colDef.typeParameter?.locale)}}\r\n </span>\r\n </ng-container>\r\n <!-- Default -->\r\n <ng-container *ngSwitchDefault>\r\n <span [title]=\"_getTooltip(_colValue)\">{{_getText(_colValue)}}</span>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n",
|
|
914
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
915
|
-
styles: [".mtx-grid-action-button .mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.mtx-grid-img{display:block;width:30px;border-radius:4px;cursor:pointer}\n"]
|
|
916
|
-
},] }
|
|
917
|
-
];
|
|
918
|
-
/**
|
|
919
|
-
* @type {function(): !Array<(null|{
|
|
920
|
-
* type: ?,
|
|
921
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
922
|
-
* })>}
|
|
923
|
-
* @nocollapse
|
|
924
|
-
*/
|
|
925
|
-
MtxGridCellComponent.ctorParameters = function () { return [
|
|
926
|
-
{ type: dialog.MtxDialog },
|
|
927
|
-
{ type: MtxGridService }
|
|
928
|
-
]; };
|
|
929
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
930
|
-
MtxGridCellComponent.propDecorators = {
|
|
931
|
-
rowData: [{ type: core.Input }],
|
|
932
|
-
colDef: [{ type: core.Input }],
|
|
933
|
-
data: [{ type: core.Input }],
|
|
934
|
-
summary: [{ type: core.Input }]
|
|
935
|
-
};
|
|
936
|
-
|
|
937
|
-
var MtxGridColumnMenuComponent = /** @class */ (function () {
|
|
938
|
-
function MtxGridColumnMenuComponent() {
|
|
939
|
-
this.columns = [];
|
|
940
|
-
this.selectable = true;
|
|
941
|
-
this.selectableChecked = 'show';
|
|
942
|
-
this.sortable = true;
|
|
943
|
-
this.dndSortable = true;
|
|
944
|
-
this._buttonText = '';
|
|
945
|
-
this.buttonType = 'stroked';
|
|
946
|
-
this.buttonClass = '';
|
|
947
|
-
this.buttonIcon = '';
|
|
948
|
-
this.showHeader = false;
|
|
949
|
-
this.headerText = 'Columns Header';
|
|
950
|
-
this.showFooter = false;
|
|
951
|
-
this.footerText = 'Columns Footer';
|
|
952
|
-
this.selectionChange = new core.EventEmitter();
|
|
953
|
-
this.sortChange = new core.EventEmitter();
|
|
954
|
-
}
|
|
955
|
-
Object.defineProperty(MtxGridColumnMenuComponent.prototype, "buttonText", {
|
|
956
|
-
get: function () {
|
|
957
|
-
var defaultText = "Columns " + (this.selectableChecked === 'show' ? 'Shown' : 'Hidden');
|
|
958
|
-
var text = this._buttonText ? this._buttonText : defaultText;
|
|
959
|
-
return text;
|
|
960
|
-
},
|
|
961
|
-
set: function (value) {
|
|
962
|
-
this._buttonText = value;
|
|
963
|
-
},
|
|
964
|
-
enumerable: false,
|
|
965
|
-
configurable: true
|
|
966
|
-
});
|
|
967
|
-
MtxGridColumnMenuComponent.prototype._handleDroped = function (event) {
|
|
968
|
-
dragDrop.moveItemInArray(this.columns, event.previousIndex, event.currentIndex);
|
|
969
|
-
this.sortChange.emit(this.columns);
|
|
970
|
-
};
|
|
971
|
-
MtxGridColumnMenuComponent.prototype._handleSelection = function (e) {
|
|
972
|
-
this.selectionChange.emit(this.columns);
|
|
973
|
-
};
|
|
974
|
-
return MtxGridColumnMenuComponent;
|
|
975
|
-
}());
|
|
976
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
977
|
-
MtxGridColumnMenuComponent.decorators = [
|
|
978
|
-
{ type: core.Component, args: [{
|
|
979
|
-
selector: 'mtx-grid-column-menu',
|
|
980
|
-
exportAs: 'mtxGridColumnMenu',
|
|
981
|
-
template: "<ng-container [ngSwitch]=\"buttonType\">\r\n <ng-container *ngSwitchCase=\"'raised'\">\r\n <button [ngClass]=\"buttonClass\" mat-raised-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'stroked'\">\r\n <button [ngClass]=\"buttonClass\" mat-stroked-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'flat'\">\r\n <button [ngClass]=\"buttonClass\" mat-flat-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <button [ngClass]=\"buttonClass\" mat-icon-button [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fab'\">\r\n <button [ngClass]=\"buttonClass\" mat-fab [color]=\"buttonColor\" [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mini-fab'\">\r\n <button [ngClass]=\"buttonClass\" mat-mini-fab [color]=\"buttonColor\"\r\n [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button [ngClass]=\"buttonClass\" mat-button [color]=\"buttonColor\" [matMenuTriggerFor]=\"menu\">\r\n <mat-icon *ngIf=\"buttonIcon\">{{buttonIcon}}</mat-icon> {{buttonText}}\r\n </button>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<mat-menu #menu=\"matMenu\" class=\"mtx-grid-column-menu\">\r\n <div class=\"mtx-grid-column-menu-content\"\r\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\r\n <div class=\"mtx-grid-column-menu-header\" *ngIf=\"showHeader\">\r\n <ng-template [ngIf]=\"headerTemplate\" [ngIfElse]=\"defaultHeaderTpl\">\r\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultHeaderTpl>{{headerText}}</ng-template>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-body\">\r\n <div class=\"mtx-grid-column-menu-list\"\r\n cdkDropList (cdkDropListDropped)=\"_handleDroped($event)\"\r\n *ngIf=\"sortable\">\r\n <div class=\"mtx-grid-column-menu-item\" *ngFor=\"let col of columns\"\r\n cdkDrag [cdkDragDisabled]=\"selectableChecked === 'show'? !col.show : col.hide\">\r\n <mat-icon cdkDragHandle>drag_handle</mat-icon>\r\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-list\" *ngIf=\"!sortable\">\r\n <div class=\"mtx-grid-column-menu-item\" *ngFor=\"let col of columns\">\r\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mtx-grid-column-menu-footer\" *ngIf=\"showFooter\">\r\n <ng-template [ngIf]=\"footerTemplate\" [ngIfElse]=\"defaultFooterTpl\">\r\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\r\n </ng-template>\r\n <ng-template #defaultFooterTpl>{{footerText}}</ng-template>\r\n </div>\r\n </div>\r\n</mat-menu>\r\n\r\n<ng-template #checkboxList let-col>\r\n <mat-checkbox class=\"mtx-grid-column-menu-item-label\"\r\n *ngIf=\"selectable\"\r\n [(ngModel)]=\"col[selectableChecked]\"\r\n [disabled]=\"col.disabled\"\r\n (change)=\"_handleSelection($event)\">\r\n {{col.label | toObservable | async}}\r\n </mat-checkbox>\r\n <span class=\"mtx-grid-column-menu-item-label\" *ngIf=\"!selectable\">\r\n {{col.label | toObservable | async}}\r\n </span>\r\n</ng-template>\r\n",
|
|
982
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
983
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
984
|
-
styles: [".mtx-grid-column-menu .mat-menu-content{padding:0}.mtx-grid-column-menu-body{padding:16px}.mtx-grid-column-menu-header,.mtx-grid-column-menu-footer{position:sticky;z-index:1;padding:8px 16px}.mtx-grid-column-menu-header{top:0}.mtx-grid-column-menu-footer{bottom:0}.mtx-grid-column-menu-list{display:block;max-width:100%}.mtx-grid-column-menu-list.cdk-drop-list-dragging .mtx-grid-column-menu-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-menu-list.cdk-drop-list .mtx-grid-column-menu-item-label{padding:0 4px}.mtx-grid-column-menu-item{display:flex;flex-direction:row;align-items:center;padding:4px 0}.mtx-grid-column-menu-item.cdk-drag-disabled .cdk-drag-handle{opacity:.35;cursor:no-drop}.mtx-grid-column-menu-item .cdk-drag-handle{cursor:move}.mtx-grid-column-menu-item.cdk-drag-preview{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mtx-grid-column-menu-item.cdk-drag-placeholder{opacity:0}.mtx-grid-column-menu-item.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"]
|
|
985
|
-
},] }
|
|
986
|
-
];
|
|
987
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
988
|
-
MtxGridColumnMenuComponent.propDecorators = {
|
|
989
|
-
menuPanel: [{ type: core.ViewChild, args: ['menu', { static: true },] }],
|
|
990
|
-
menuTrigger: [{ type: core.ViewChild, args: [menu.MatMenuTrigger,] }],
|
|
991
|
-
columns: [{ type: core.Input }],
|
|
992
|
-
selectable: [{ type: core.Input }],
|
|
993
|
-
selectableChecked: [{ type: core.Input }],
|
|
994
|
-
sortable: [{ type: core.Input }],
|
|
995
|
-
dndSortable: [{ type: core.Input }],
|
|
996
|
-
buttonText: [{ type: core.Input }],
|
|
997
|
-
buttonType: [{ type: core.Input }],
|
|
998
|
-
buttonColor: [{ type: core.Input }],
|
|
999
|
-
buttonClass: [{ type: core.Input }],
|
|
1000
|
-
buttonIcon: [{ type: core.Input }],
|
|
1001
|
-
showHeader: [{ type: core.Input }],
|
|
1002
|
-
headerText: [{ type: core.Input }],
|
|
1003
|
-
headerTemplate: [{ type: core.Input }],
|
|
1004
|
-
showFooter: [{ type: core.Input }],
|
|
1005
|
-
footerText: [{ type: core.Input }],
|
|
1006
|
-
footerTemplate: [{ type: core.Input }],
|
|
1007
|
-
selectionChange: [{ type: core.Output }],
|
|
1008
|
-
sortChange: [{ type: core.Output }]
|
|
1009
|
-
};
|
|
1010
|
-
|
|
1011
|
-
var MtxGridExpansionToggleDirective = /** @class */ (function () {
|
|
1012
|
-
function MtxGridExpansionToggleDirective() {
|
|
1013
|
-
this._opened = false;
|
|
1014
|
-
this.openedChange = new core.EventEmitter();
|
|
1015
|
-
this.toggleChange = new core.EventEmitter();
|
|
1016
|
-
}
|
|
1017
|
-
Object.defineProperty(MtxGridExpansionToggleDirective.prototype, "opened", {
|
|
1018
|
-
get: function () {
|
|
1019
|
-
return this._opened;
|
|
1020
|
-
},
|
|
1021
|
-
set: function (newValue) {
|
|
1022
|
-
this._opened = newValue;
|
|
1023
|
-
this.openedChange.emit(newValue);
|
|
1024
|
-
},
|
|
1025
|
-
enumerable: false,
|
|
1026
|
-
configurable: true
|
|
1027
|
-
});
|
|
1028
|
-
Object.defineProperty(MtxGridExpansionToggleDirective.prototype, "expanded", {
|
|
1029
|
-
get: function () {
|
|
1030
|
-
return this._opened;
|
|
1031
|
-
},
|
|
1032
|
-
enumerable: false,
|
|
1033
|
-
configurable: true
|
|
1034
|
-
});
|
|
1035
|
-
Object.defineProperty(MtxGridExpansionToggleDirective.prototype, "expandableRow", {
|
|
1036
|
-
set: function (value) {
|
|
1037
|
-
if (value !== this._row) {
|
|
1038
|
-
this._row = value;
|
|
1039
|
-
}
|
|
1040
|
-
},
|
|
1041
|
-
enumerable: false,
|
|
1042
|
-
configurable: true
|
|
1043
|
-
});
|
|
1044
|
-
Object.defineProperty(MtxGridExpansionToggleDirective.prototype, "template", {
|
|
1045
|
-
set: function (value) {
|
|
1046
|
-
if (value !== this._tplRef) {
|
|
1047
|
-
this._tplRef = value;
|
|
1048
|
-
}
|
|
1049
|
-
},
|
|
1050
|
-
enumerable: false,
|
|
1051
|
-
configurable: true
|
|
1052
|
-
});
|
|
1053
|
-
MtxGridExpansionToggleDirective.prototype.onClick = function (event) {
|
|
1054
|
-
event.preventDefault();
|
|
1055
|
-
event.stopPropagation();
|
|
1056
|
-
this.toggle();
|
|
1057
|
-
};
|
|
1058
|
-
MtxGridExpansionToggleDirective.prototype.toggle = function () {
|
|
1059
|
-
this.opened = !this.opened;
|
|
1060
|
-
this.toggleChange.emit(this);
|
|
1061
|
-
};
|
|
1062
|
-
return MtxGridExpansionToggleDirective;
|
|
1063
|
-
}());
|
|
1064
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1065
|
-
MtxGridExpansionToggleDirective.decorators = [
|
|
1066
|
-
{ type: core.Directive, args: [{
|
|
1067
|
-
selector: '[mtx-grid-expansion-toggle]',
|
|
1068
|
-
},] }
|
|
1069
|
-
];
|
|
1070
|
-
/**
|
|
1071
|
-
* @type {function(): !Array<(null|{
|
|
1072
|
-
* type: ?,
|
|
1073
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1074
|
-
* })>}
|
|
1075
|
-
* @nocollapse
|
|
1076
|
-
*/
|
|
1077
|
-
MtxGridExpansionToggleDirective.ctorParameters = function () { return []; };
|
|
1078
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
1079
|
-
MtxGridExpansionToggleDirective.propDecorators = {
|
|
1080
|
-
opened: [{ type: core.Input }],
|
|
1081
|
-
openedChange: [{ type: core.Output }],
|
|
1082
|
-
expanded: [{ type: core.HostBinding, args: ['class.expanded',] }],
|
|
1083
|
-
expandableRow: [{ type: core.Input }],
|
|
1084
|
-
template: [{ type: core.Input, args: ['expansionRowTpl',] }],
|
|
1085
|
-
toggleChange: [{ type: core.Output }],
|
|
1086
|
-
onClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
|
|
1087
|
-
};
|
|
1088
|
-
|
|
1089
|
-
var MtxGridCellSelectionDirective = /** @class */ (function () {
|
|
1090
|
-
function MtxGridCellSelectionDirective(_dataGrid) {
|
|
1091
|
-
this._dataGrid = _dataGrid;
|
|
1092
|
-
this._selected = false;
|
|
1093
|
-
this.shiftKeyPressed = false;
|
|
1094
|
-
this.ctrlKeyPressed = false;
|
|
1095
|
-
this.cellSelectionChange = new core.EventEmitter();
|
|
1096
|
-
}
|
|
1097
|
-
Object.defineProperty(MtxGridCellSelectionDirective.prototype, "selected", {
|
|
1098
|
-
get: function () {
|
|
1099
|
-
return this._selected;
|
|
1100
|
-
},
|
|
1101
|
-
enumerable: false,
|
|
1102
|
-
configurable: true
|
|
1103
|
-
});
|
|
1104
|
-
Object.defineProperty(MtxGridCellSelectionDirective.prototype, "matSelectableRowData", {
|
|
1105
|
-
set: function (value) {
|
|
1106
|
-
if (value !== this._rowData) {
|
|
1107
|
-
this._rowData = value;
|
|
1108
|
-
}
|
|
1109
|
-
},
|
|
1110
|
-
enumerable: false,
|
|
1111
|
-
configurable: true
|
|
1112
|
-
});
|
|
1113
|
-
MtxGridCellSelectionDirective.prototype.onClick = function (event) {
|
|
1114
|
-
this.ctrlKeyPressed = event.ctrlKey;
|
|
1115
|
-
this.shiftKeyPressed = event.shiftKey;
|
|
1116
|
-
if (this._dataGrid.cellSelectable) {
|
|
1117
|
-
this.select();
|
|
1118
|
-
}
|
|
1119
|
-
};
|
|
1120
|
-
MtxGridCellSelectionDirective.prototype.select = function () {
|
|
1121
|
-
this._selected = true;
|
|
1122
|
-
this.cellSelectionChange.emit(this);
|
|
1123
|
-
};
|
|
1124
|
-
MtxGridCellSelectionDirective.prototype.deselect = function () {
|
|
1125
|
-
this._selected = false;
|
|
1126
|
-
this.cellSelectionChange.emit(this);
|
|
1127
|
-
};
|
|
1128
|
-
MtxGridCellSelectionDirective.prototype.toggle = function () {
|
|
1129
|
-
this._selected = !this._selected;
|
|
1130
|
-
this.cellSelectionChange.emit(this);
|
|
1131
|
-
};
|
|
1132
|
-
return MtxGridCellSelectionDirective;
|
|
1133
|
-
}());
|
|
1134
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1135
|
-
MtxGridCellSelectionDirective.decorators = [
|
|
1136
|
-
{ type: core.Directive, args: [{
|
|
1137
|
-
selector: '[mtx-grid-selectable-cell]',
|
|
1138
|
-
},] }
|
|
1139
|
-
];
|
|
1140
|
-
/**
|
|
1141
|
-
* @type {function(): !Array<(null|{
|
|
1142
|
-
* type: ?,
|
|
1143
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1144
|
-
* })>}
|
|
1145
|
-
* @nocollapse
|
|
1146
|
-
*/
|
|
1147
|
-
MtxGridCellSelectionDirective.ctorParameters = function () { return [
|
|
1148
|
-
{ type: MtxGridComponent }
|
|
1149
|
-
]; };
|
|
1150
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
1151
|
-
MtxGridCellSelectionDirective.propDecorators = {
|
|
1152
|
-
selected: [{ type: core.HostBinding, args: ['class.selected',] }],
|
|
1153
|
-
matSelectableRowData: [{ type: core.Input }],
|
|
1154
|
-
cellSelectionChange: [{ type: core.Output }],
|
|
1155
|
-
onClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
|
|
1156
|
-
};
|
|
1157
|
-
|
|
1158
|
-
/**
|
|
1159
|
-
* Overrides CdkFlexTableResizeStrategy to match mat-column elements.
|
|
1160
|
-
*/
|
|
1161
|
-
var MatFlexTableResizeStrategy = /** @class */ (function (_super) {
|
|
1162
|
-
__extends(MatFlexTableResizeStrategy, _super);
|
|
1163
|
-
function MatFlexTableResizeStrategy(columnResize, styleScheduler, table, document) {
|
|
1164
|
-
return _super.call(this, columnResize, styleScheduler, table, document) || this;
|
|
1165
|
-
}
|
|
1166
|
-
MatFlexTableResizeStrategy.prototype.getColumnCssClass = function (cssFriendlyColumnName) {
|
|
1167
|
-
return "mat-column-" + cssFriendlyColumnName;
|
|
1168
|
-
};
|
|
1169
|
-
return MatFlexTableResizeStrategy;
|
|
1170
|
-
}(columnResize.CdkFlexTableResizeStrategy));
|
|
1171
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1172
|
-
MatFlexTableResizeStrategy.decorators = [
|
|
1173
|
-
{ type: core.Injectable }
|
|
1174
|
-
];
|
|
1175
|
-
/**
|
|
1176
|
-
* @type {function(): !Array<(null|{
|
|
1177
|
-
* type: ?,
|
|
1178
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1179
|
-
* })>}
|
|
1180
|
-
* @nocollapse
|
|
1181
|
-
*/
|
|
1182
|
-
MatFlexTableResizeStrategy.ctorParameters = function () { return [
|
|
1183
|
-
{ type: columnResize.ColumnResize },
|
|
1184
|
-
{ type: table$1._CoalescedStyleScheduler, decorators: [{ type: core.Inject, args: [table$1._COALESCED_STYLE_SCHEDULER,] }] },
|
|
1185
|
-
{ type: table$1.CdkTable },
|
|
1186
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
|
|
1187
|
-
]; };
|
|
1188
|
-
var FLEX_RESIZE_STRATEGY_PROVIDER = {
|
|
1189
|
-
provide: columnResize.ResizeStrategy,
|
|
1190
|
-
useClass: MatFlexTableResizeStrategy,
|
|
1191
|
-
};
|
|
1192
|
-
|
|
1193
|
-
var PROVIDERS = [
|
|
1194
|
-
columnResize.ColumnResizeNotifier,
|
|
1195
|
-
columnResize.HeaderRowEventDispatcher,
|
|
1196
|
-
columnResize.ColumnResizeNotifierSource,
|
|
1197
|
-
];
|
|
1198
|
-
var TABLE_PROVIDERS = __spreadArray(__spreadArray([], __read(PROVIDERS)), [
|
|
1199
|
-
columnResize.TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER,
|
|
1200
|
-
]);
|
|
1201
|
-
var FLEX_PROVIDERS = __spreadArray(__spreadArray([], __read(PROVIDERS)), [FLEX_RESIZE_STRATEGY_PROVIDER]);
|
|
1202
|
-
var TABLE_HOST_BINDINGS = {
|
|
1203
|
-
class: 'mat-column-resize-table',
|
|
1204
|
-
};
|
|
1205
|
-
var FLEX_HOST_BINDINGS = {
|
|
1206
|
-
class: 'mat-column-resize-flex',
|
|
1207
|
-
};
|
|
1208
|
-
var AbstractMatColumnResize = /** @class */ (function (_super) {
|
|
1209
|
-
__extends(AbstractMatColumnResize, _super);
|
|
1210
|
-
function AbstractMatColumnResize() {
|
|
1211
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1212
|
-
}
|
|
1213
|
-
AbstractMatColumnResize.prototype.getTableHeight = function () {
|
|
1214
|
-
var table = this.elementRef.nativeElement;
|
|
1215
|
-
var tableParent = table.parentNode;
|
|
1216
|
-
var isTableContainer = tableParent.classList.contains('mat-table-container');
|
|
1217
|
-
return isTableContainer ? tableParent.offsetHeight : table.offsetHeight;
|
|
1218
|
-
};
|
|
1219
|
-
return AbstractMatColumnResize;
|
|
1220
|
-
}(columnResize.ColumnResize));
|
|
1221
|
-
|
|
1222
|
-
/**
|
|
1223
|
-
* Explicitly enables column resizing for a table-based mat-table.
|
|
1224
|
-
* Individual columns must be annotated specifically.
|
|
1225
|
-
*/
|
|
1226
|
-
var MatColumnResize = /** @class */ (function (_super) {
|
|
1227
|
-
__extends(MatColumnResize, _super);
|
|
1228
|
-
function MatColumnResize(columnResizeNotifier, elementRef, eventDispatcher, ngZone, notifier) {
|
|
1229
|
-
var _this = _super.call(this) || this;
|
|
1230
|
-
_this.columnResizeNotifier = columnResizeNotifier;
|
|
1231
|
-
_this.elementRef = elementRef;
|
|
1232
|
-
_this.eventDispatcher = eventDispatcher;
|
|
1233
|
-
_this.ngZone = ngZone;
|
|
1234
|
-
_this.notifier = notifier;
|
|
1235
|
-
return _this;
|
|
1236
|
-
}
|
|
1237
|
-
return MatColumnResize;
|
|
1238
|
-
}(AbstractMatColumnResize));
|
|
1239
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1240
|
-
MatColumnResize.decorators = [
|
|
1241
|
-
{ type: core.Directive, args: [{
|
|
1242
|
-
selector: 'table[mat-table][columnResize]',
|
|
1243
|
-
host: TABLE_HOST_BINDINGS,
|
|
1244
|
-
providers: __spreadArray(__spreadArray([], __read(TABLE_PROVIDERS)), [{ provide: columnResize.ColumnResize, useExisting: MatColumnResize }]),
|
|
1245
|
-
},] }
|
|
1246
|
-
];
|
|
1247
|
-
/**
|
|
1248
|
-
* @type {function(): !Array<(null|{
|
|
1249
|
-
* type: ?,
|
|
1250
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1251
|
-
* })>}
|
|
1252
|
-
* @nocollapse
|
|
1253
|
-
*/
|
|
1254
|
-
MatColumnResize.ctorParameters = function () { return [
|
|
1255
|
-
{ type: columnResize.ColumnResizeNotifier },
|
|
1256
|
-
{ type: core.ElementRef },
|
|
1257
|
-
{ type: columnResize.HeaderRowEventDispatcher },
|
|
1258
|
-
{ type: core.NgZone },
|
|
1259
|
-
{ type: columnResize.ColumnResizeNotifierSource }
|
|
1260
|
-
]; };
|
|
1261
|
-
|
|
1262
|
-
/**
|
|
1263
|
-
* Explicitly enables column resizing for a flexbox-based mat-table.
|
|
1264
|
-
* Individual columns must be annotated specifically.
|
|
1265
|
-
*/
|
|
1266
|
-
var MatColumnResizeFlex = /** @class */ (function (_super) {
|
|
1267
|
-
__extends(MatColumnResizeFlex, _super);
|
|
1268
|
-
function MatColumnResizeFlex(columnResizeNotifier, elementRef, eventDispatcher, ngZone, notifier) {
|
|
1269
|
-
var _this = _super.call(this) || this;
|
|
1270
|
-
_this.columnResizeNotifier = columnResizeNotifier;
|
|
1271
|
-
_this.elementRef = elementRef;
|
|
1272
|
-
_this.eventDispatcher = eventDispatcher;
|
|
1273
|
-
_this.ngZone = ngZone;
|
|
1274
|
-
_this.notifier = notifier;
|
|
1275
|
-
return _this;
|
|
1276
|
-
}
|
|
1277
|
-
return MatColumnResizeFlex;
|
|
1278
|
-
}(AbstractMatColumnResize));
|
|
1279
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1280
|
-
MatColumnResizeFlex.decorators = [
|
|
1281
|
-
{ type: core.Directive, args: [{
|
|
1282
|
-
selector: 'mat-table[columnResize]',
|
|
1283
|
-
host: FLEX_HOST_BINDINGS,
|
|
1284
|
-
providers: __spreadArray(__spreadArray([], __read(FLEX_PROVIDERS)), [{ provide: columnResize.ColumnResize, useExisting: MatColumnResizeFlex }]),
|
|
1285
|
-
},] }
|
|
1286
|
-
];
|
|
1287
|
-
/**
|
|
1288
|
-
* @type {function(): !Array<(null|{
|
|
1289
|
-
* type: ?,
|
|
1290
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1291
|
-
* })>}
|
|
1292
|
-
* @nocollapse
|
|
1293
|
-
*/
|
|
1294
|
-
MatColumnResizeFlex.ctorParameters = function () { return [
|
|
1295
|
-
{ type: columnResize.ColumnResizeNotifier },
|
|
1296
|
-
{ type: core.ElementRef },
|
|
1297
|
-
{ type: columnResize.HeaderRowEventDispatcher },
|
|
1298
|
-
{ type: core.NgZone },
|
|
1299
|
-
{ type: columnResize.ColumnResizeNotifierSource }
|
|
1300
|
-
]; };
|
|
1301
|
-
|
|
1302
|
-
/**
|
|
1303
|
-
* Component shown over the edge of a resizable column that is responsible
|
|
1304
|
-
* for handling column resize mouse events and displaying a vertical line along the column edge.
|
|
1305
|
-
*/
|
|
1306
|
-
var MatColumnResizeOverlayHandle = /** @class */ (function (_super) {
|
|
1307
|
-
__extends(MatColumnResizeOverlayHandle, _super);
|
|
1308
|
-
function MatColumnResizeOverlayHandle(columnDef, columnResize, directionality, elementRef, eventDispatcher, ngZone, resizeNotifier, resizeRef, styleScheduler, document) {
|
|
1309
|
-
var _this = _super.call(this) || this;
|
|
1310
|
-
_this.columnDef = columnDef;
|
|
1311
|
-
_this.columnResize = columnResize;
|
|
1312
|
-
_this.directionality = directionality;
|
|
1313
|
-
_this.elementRef = elementRef;
|
|
1314
|
-
_this.eventDispatcher = eventDispatcher;
|
|
1315
|
-
_this.ngZone = ngZone;
|
|
1316
|
-
_this.resizeNotifier = resizeNotifier;
|
|
1317
|
-
_this.resizeRef = resizeRef;
|
|
1318
|
-
_this.styleScheduler = styleScheduler;
|
|
1319
|
-
_this.document = document;
|
|
1320
|
-
return _this;
|
|
1321
|
-
}
|
|
1322
|
-
MatColumnResizeOverlayHandle.prototype.updateResizeActive = function (active) {
|
|
1323
|
-
_super.prototype.updateResizeActive.call(this, active);
|
|
1324
|
-
this.resizeRef.overlayRef.updateSize({
|
|
1325
|
-
height: active
|
|
1326
|
-
? this.columnResize.getTableHeight()
|
|
1327
|
-
: this.resizeRef.origin.nativeElement.offsetHeight,
|
|
1328
|
-
});
|
|
1329
|
-
};
|
|
1330
|
-
return MatColumnResizeOverlayHandle;
|
|
1331
|
-
}(columnResize.ResizeOverlayHandle));
|
|
1332
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1333
|
-
MatColumnResizeOverlayHandle.decorators = [
|
|
1334
|
-
{ type: core.Component, args: [{
|
|
1335
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1336
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
1337
|
-
host: { class: 'mat-column-resize-overlay-thumb' },
|
|
1338
|
-
template: ''
|
|
1339
|
-
},] }
|
|
1340
|
-
];
|
|
1341
|
-
/**
|
|
1342
|
-
* @type {function(): !Array<(null|{
|
|
1343
|
-
* type: ?,
|
|
1344
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1345
|
-
* })>}
|
|
1346
|
-
* @nocollapse
|
|
1347
|
-
*/
|
|
1348
|
-
MatColumnResizeOverlayHandle.ctorParameters = function () { return [
|
|
1349
|
-
{ type: table$1.CdkColumnDef },
|
|
1350
|
-
{ type: columnResize.ColumnResize },
|
|
1351
|
-
{ type: bidi.Directionality },
|
|
1352
|
-
{ type: core.ElementRef },
|
|
1353
|
-
{ type: columnResize.HeaderRowEventDispatcher },
|
|
1354
|
-
{ type: core.NgZone },
|
|
1355
|
-
{ type: columnResize.ColumnResizeNotifierSource },
|
|
1356
|
-
{ type: columnResize.ResizeRef },
|
|
1357
|
-
{ type: table$1._CoalescedStyleScheduler, decorators: [{ type: core.Inject, args: [table$1._COALESCED_STYLE_SCHEDULER,] }] },
|
|
1358
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
|
|
1359
|
-
]; };
|
|
1360
|
-
|
|
1361
|
-
var AbstractMatResizable = /** @class */ (function (_super) {
|
|
1362
|
-
__extends(AbstractMatResizable, _super);
|
|
1363
|
-
function AbstractMatResizable() {
|
|
1364
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1365
|
-
_this.minWidthPxInternal = 32;
|
|
1366
|
-
return _this;
|
|
1367
|
-
}
|
|
1368
|
-
AbstractMatResizable.prototype.getInlineHandleCssClassName = function () {
|
|
1369
|
-
return 'mat-resizable-handle';
|
|
1370
|
-
};
|
|
1371
|
-
AbstractMatResizable.prototype.getOverlayHandleComponentType = function () {
|
|
1372
|
-
return MatColumnResizeOverlayHandle;
|
|
1373
|
-
};
|
|
1374
|
-
return AbstractMatResizable;
|
|
1375
|
-
}(columnResize.Resizable));
|
|
1376
|
-
var RESIZABLE_HOST_BINDINGS = {
|
|
1377
|
-
class: 'mat-resizable',
|
|
1378
|
-
};
|
|
1379
|
-
var RESIZABLE_INPUTS = [
|
|
1380
|
-
'minWidthPx: matResizableMinWidthPx',
|
|
1381
|
-
'maxWidthPx: matResizableMaxWidthPx',
|
|
1382
|
-
];
|
|
1383
|
-
|
|
1384
|
-
/**
|
|
1385
|
-
* Explicitly enables column resizing for a mat-header-cell.
|
|
1386
|
-
*/
|
|
1387
|
-
var MatResizable = /** @class */ (function (_super) {
|
|
1388
|
-
__extends(MatResizable, _super);
|
|
1389
|
-
function MatResizable(columnDef, columnResize, directionality, document, elementRef, eventDispatcher, injector, ngZone, overlay, resizeNotifier, resizeStrategy, styleScheduler, viewContainerRef, changeDetectorRef) {
|
|
1390
|
-
var _this = _super.call(this) || this;
|
|
1391
|
-
_this.columnDef = columnDef;
|
|
1392
|
-
_this.columnResize = columnResize;
|
|
1393
|
-
_this.directionality = directionality;
|
|
1394
|
-
_this.elementRef = elementRef;
|
|
1395
|
-
_this.eventDispatcher = eventDispatcher;
|
|
1396
|
-
_this.injector = injector;
|
|
1397
|
-
_this.ngZone = ngZone;
|
|
1398
|
-
_this.overlay = overlay;
|
|
1399
|
-
_this.resizeNotifier = resizeNotifier;
|
|
1400
|
-
_this.resizeStrategy = resizeStrategy;
|
|
1401
|
-
_this.styleScheduler = styleScheduler;
|
|
1402
|
-
_this.viewContainerRef = viewContainerRef;
|
|
1403
|
-
_this.changeDetectorRef = changeDetectorRef;
|
|
1404
|
-
_this.isResizable = true;
|
|
1405
|
-
_this.document = document;
|
|
1406
|
-
return _this;
|
|
1407
|
-
}
|
|
1408
|
-
Object.defineProperty(MatResizable.prototype, "hasResizableClass", {
|
|
1409
|
-
get: function () {
|
|
1410
|
-
return this.isResizable ? RESIZABLE_HOST_BINDINGS.class : '';
|
|
1411
|
-
},
|
|
1412
|
-
enumerable: false,
|
|
1413
|
-
configurable: true
|
|
1414
|
-
});
|
|
1415
|
-
Object.defineProperty(MatResizable.prototype, "resizable", {
|
|
1416
|
-
get: function () {
|
|
1417
|
-
return this.isResizable;
|
|
1418
|
-
},
|
|
1419
|
-
set: function (newValue) {
|
|
1420
|
-
this.isResizable = newValue == null || newValue === '' || newValue;
|
|
1421
|
-
},
|
|
1422
|
-
enumerable: false,
|
|
1423
|
-
configurable: true
|
|
1424
|
-
});
|
|
1425
|
-
return MatResizable;
|
|
1426
|
-
}(AbstractMatResizable));
|
|
1427
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1428
|
-
MatResizable.decorators = [
|
|
1429
|
-
{ type: core.Directive, args: [{
|
|
1430
|
-
selector: 'mat-header-cell[resizable], th[mat-header-cell][resizable]',
|
|
1431
|
-
inputs: RESIZABLE_INPUTS,
|
|
1432
|
-
},] }
|
|
1433
|
-
];
|
|
1434
|
-
/**
|
|
1435
|
-
* @type {function(): !Array<(null|{
|
|
1436
|
-
* type: ?,
|
|
1437
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1438
|
-
* })>}
|
|
1439
|
-
* @nocollapse
|
|
1440
|
-
*/
|
|
1441
|
-
MatResizable.ctorParameters = function () { return [
|
|
1442
|
-
{ type: table$1.CdkColumnDef },
|
|
1443
|
-
{ type: columnResize.ColumnResize },
|
|
1444
|
-
{ type: bidi.Directionality },
|
|
1445
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
|
|
1446
|
-
{ type: core.ElementRef },
|
|
1447
|
-
{ type: columnResize.HeaderRowEventDispatcher },
|
|
1448
|
-
{ type: core.Injector },
|
|
1449
|
-
{ type: core.NgZone },
|
|
1450
|
-
{ type: overlay.Overlay },
|
|
1451
|
-
{ type: columnResize.ColumnResizeNotifierSource },
|
|
1452
|
-
{ type: columnResize.ResizeStrategy },
|
|
1453
|
-
{ type: table$1._CoalescedStyleScheduler, decorators: [{ type: core.Inject, args: [table$1._COALESCED_STYLE_SCHEDULER,] }] },
|
|
1454
|
-
{ type: core.ViewContainerRef },
|
|
1455
|
-
{ type: core.ChangeDetectorRef }
|
|
1456
|
-
]; };
|
|
1457
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
1458
|
-
MatResizable.propDecorators = {
|
|
1459
|
-
hasResizableClass: [{ type: core.HostBinding, args: ['class',] }],
|
|
1460
|
-
resizable: [{ type: core.Input }]
|
|
1461
|
-
};
|
|
1462
|
-
|
|
1463
|
-
/**
|
|
1464
|
-
* @license
|
|
1465
|
-
* Copyright Google LLC All Rights Reserved.
|
|
1466
|
-
*
|
|
1467
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
1468
|
-
* found in the LICENSE file at https://angular.io/license
|
|
1469
|
-
*/
|
|
1470
|
-
var ENTRY_COMMON_COMPONENTS = [MatColumnResizeOverlayHandle];
|
|
1471
|
-
var MatColumnResizeCommonModule = /** @class */ (function () {
|
|
1472
|
-
function MatColumnResizeCommonModule() {
|
|
1473
|
-
}
|
|
1474
|
-
return MatColumnResizeCommonModule;
|
|
1475
|
-
}());
|
|
1476
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1477
|
-
MatColumnResizeCommonModule.decorators = [
|
|
1478
|
-
{ type: core.NgModule, args: [{
|
|
1479
|
-
declarations: ENTRY_COMMON_COMPONENTS,
|
|
1480
|
-
exports: ENTRY_COMMON_COMPONENTS,
|
|
1481
|
-
entryComponents: ENTRY_COMMON_COMPONENTS,
|
|
1482
|
-
},] }
|
|
1483
|
-
];
|
|
1484
|
-
var IMPORTS = [overlay.OverlayModule, MatColumnResizeCommonModule];
|
|
1485
|
-
var MatColumnResizeModule = /** @class */ (function () {
|
|
1486
|
-
function MatColumnResizeModule() {
|
|
1487
|
-
}
|
|
1488
|
-
return MatColumnResizeModule;
|
|
1489
|
-
}());
|
|
1490
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1491
|
-
MatColumnResizeModule.decorators = [
|
|
1492
|
-
{ type: core.NgModule, args: [{
|
|
1493
|
-
imports: IMPORTS,
|
|
1494
|
-
declarations: [MatColumnResize, MatColumnResizeFlex, MatResizable],
|
|
1495
|
-
exports: [MatColumnResize, MatColumnResizeFlex, MatResizable],
|
|
1496
|
-
},] }
|
|
1497
|
-
];
|
|
1498
|
-
|
|
1499
|
-
var MtxGridModule = /** @class */ (function () {
|
|
1500
|
-
function MtxGridModule() {
|
|
1501
|
-
}
|
|
1502
|
-
return MtxGridModule;
|
|
1503
|
-
}());
|
|
1504
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1505
|
-
MtxGridModule.decorators = [
|
|
1506
|
-
{ type: core.NgModule, args: [{
|
|
1507
|
-
imports: [
|
|
1508
|
-
common.CommonModule,
|
|
1509
|
-
forms.FormsModule,
|
|
1510
|
-
table.MatTableModule,
|
|
1511
|
-
sort.MatSortModule,
|
|
1512
|
-
paginator.MatPaginatorModule,
|
|
1513
|
-
checkbox.MatCheckboxModule,
|
|
1514
|
-
button.MatButtonModule,
|
|
1515
|
-
progressBar.MatProgressBarModule,
|
|
1516
|
-
chips.MatChipsModule,
|
|
1517
|
-
tooltip.MatTooltipModule,
|
|
1518
|
-
icon.MatIconModule,
|
|
1519
|
-
select.MatSelectModule,
|
|
1520
|
-
formField.MatFormFieldModule,
|
|
1521
|
-
menu.MatMenuModule,
|
|
1522
|
-
dragDrop.DragDropModule,
|
|
1523
|
-
dialog.MtxDialogModule,
|
|
1524
|
-
pipes.MtxPipesModule,
|
|
1525
|
-
MatColumnResizeModule,
|
|
1526
|
-
],
|
|
1527
|
-
exports: [
|
|
1528
|
-
MtxGridComponent,
|
|
1529
|
-
MtxGridCellComponent,
|
|
1530
|
-
MtxGridColumnMenuComponent,
|
|
1531
|
-
MtxGridExpansionToggleDirective,
|
|
1532
|
-
MtxGridCellSelectionDirective,
|
|
1533
|
-
MatColumnResizeModule,
|
|
1534
|
-
],
|
|
1535
|
-
declarations: [
|
|
1536
|
-
MtxGridComponent,
|
|
1537
|
-
MtxGridCellComponent,
|
|
1538
|
-
MtxGridColumnMenuComponent,
|
|
1539
|
-
MtxGridExpansionToggleDirective,
|
|
1540
|
-
MtxGridCellSelectionDirective,
|
|
1541
|
-
],
|
|
1542
|
-
providers: [MtxGridService],
|
|
1543
|
-
},] }
|
|
1544
|
-
];
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* Generated bundle index. Do not edit.
|
|
1548
|
-
*/
|
|
1549
|
-
|
|
1550
|
-
Object.defineProperty(exports, 'MAT_TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER', {
|
|
1551
|
-
enumerable: true,
|
|
1552
|
-
get: function () {
|
|
1553
|
-
return columnResize.TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER;
|
|
1554
|
-
}
|
|
1555
|
-
});
|
|
1556
|
-
exports.AbstractMatColumnResize = AbstractMatColumnResize;
|
|
1557
|
-
exports.AbstractMatResizable = AbstractMatResizable;
|
|
1558
|
-
exports.MAT_FLEX_HOST_BINDINGS = FLEX_HOST_BINDINGS;
|
|
1559
|
-
exports.MAT_FLEX_PROVIDERS = FLEX_PROVIDERS;
|
|
1560
|
-
exports.MAT_FLEX_RESIZE_STRATEGY_PROVIDER = FLEX_RESIZE_STRATEGY_PROVIDER;
|
|
1561
|
-
exports.MAT_RESIZABLE_HOST_BINDINGS = RESIZABLE_HOST_BINDINGS;
|
|
1562
|
-
exports.MAT_RESIZABLE_INPUTS = RESIZABLE_INPUTS;
|
|
1563
|
-
exports.MAT_TABLE_HOST_BINDINGS = TABLE_HOST_BINDINGS;
|
|
1564
|
-
exports.MAT_TABLE_PROVIDERS = TABLE_PROVIDERS;
|
|
1565
|
-
exports.MatColumnResize = MatColumnResize;
|
|
1566
|
-
exports.MatColumnResizeCommonModule = MatColumnResizeCommonModule;
|
|
1567
|
-
exports.MatColumnResizeFlex = MatColumnResizeFlex;
|
|
1568
|
-
exports.MatColumnResizeModule = MatColumnResizeModule;
|
|
1569
|
-
exports.MatColumnResizeOverlayHandle = MatColumnResizeOverlayHandle;
|
|
1570
|
-
exports.MatFlexTableResizeStrategy = MatFlexTableResizeStrategy;
|
|
1571
|
-
exports.MatResizable = MatResizable;
|
|
1572
|
-
exports.MtxGridCellComponent = MtxGridCellComponent;
|
|
1573
|
-
exports.MtxGridCellSelectionDirective = MtxGridCellSelectionDirective;
|
|
1574
|
-
exports.MtxGridColumnMenuComponent = MtxGridColumnMenuComponent;
|
|
1575
|
-
exports.MtxGridComponent = MtxGridComponent;
|
|
1576
|
-
exports.MtxGridExpansionToggleDirective = MtxGridExpansionToggleDirective;
|
|
1577
|
-
exports.MtxGridModule = MtxGridModule;
|
|
1578
|
-
exports.MtxGridService = MtxGridService;
|
|
1579
|
-
|
|
1580
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1581
|
-
|
|
1582
|
-
})));
|
|
1583
|
-
//# sourceMappingURL=mtxGrid.umd.js.map
|