@ptsecurity/mosaic 11.5.0 → 12.2.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/_theming.scss +409 -100
- package/_visual.scss +66 -23
- package/autocomplete/autocomplete-origin.directive.d.ts +3 -0
- package/autocomplete/autocomplete-trigger.directive.d.ts +3 -0
- package/autocomplete/autocomplete.component.d.ts +3 -0
- package/autocomplete/autocomplete.module.d.ts +10 -0
- package/autocomplete/package.json +0 -1
- package/autocomplete/ptsecurity-mosaic-autocomplete.d.ts +1 -0
- package/bundles/ptsecurity-mosaic-autocomplete.umd.js +178 -114
- package/bundles/ptsecurity-mosaic-autocomplete.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-button-toggle.umd.js +107 -71
- package/bundles/ptsecurity-mosaic-button-toggle.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-button.umd.js +106 -77
- package/bundles/ptsecurity-mosaic-button.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-card.umd.js +74 -43
- package/bundles/ptsecurity-mosaic-card.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-checkbox.umd.js +114 -69
- package/bundles/ptsecurity-mosaic-checkbox.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-core.umd.js +804 -256
- package/bundles/ptsecurity-mosaic-core.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-datepicker.umd.js +601 -421
- package/bundles/ptsecurity-mosaic-datepicker.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-design-tokens.umd.js +108 -26
- package/bundles/ptsecurity-mosaic-design-tokens.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-divider.umd.js +55 -28
- package/bundles/ptsecurity-mosaic-divider.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-dropdown.umd.js +263 -187
- package/bundles/ptsecurity-mosaic-dropdown.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-form-field.umd.js +200 -125
- package/bundles/ptsecurity-mosaic-form-field.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-icon.umd.js +79 -41
- package/bundles/ptsecurity-mosaic-icon.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-input.umd.js +222 -124
- package/bundles/ptsecurity-mosaic-input.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-link.umd.js +76 -45
- package/bundles/ptsecurity-mosaic-link.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-list.umd.js +354 -202
- package/bundles/ptsecurity-mosaic-list.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-modal.umd.js +324 -220
- package/bundles/ptsecurity-mosaic-modal.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-navbar.umd.js +289 -208
- package/bundles/ptsecurity-mosaic-navbar.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-popover.umd.js +346 -640
- package/bundles/ptsecurity-mosaic-popover.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-progress-bar.umd.js +69 -40
- package/bundles/ptsecurity-mosaic-progress-bar.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-progress-spinner.umd.js +69 -40
- package/bundles/ptsecurity-mosaic-progress-spinner.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-radio.umd.js +126 -81
- package/bundles/ptsecurity-mosaic-radio.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-select.umd.js +276 -154
- package/bundles/ptsecurity-mosaic-select.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-sidebar.umd.js +105 -68
- package/bundles/ptsecurity-mosaic-sidebar.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-sidepanel.umd.js +236 -158
- package/bundles/ptsecurity-mosaic-sidepanel.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-splitter.umd.js +112 -83
- package/bundles/ptsecurity-mosaic-splitter.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-table.umd.js +77 -44
- package/bundles/ptsecurity-mosaic-table.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-tabs.umd.js +894 -687
- package/bundles/ptsecurity-mosaic-tabs.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-tags.umd.js +313 -209
- package/bundles/ptsecurity-mosaic-tags.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-textarea.umd.js +107 -53
- package/bundles/ptsecurity-mosaic-textarea.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-timepicker.umd.js +117 -72
- package/bundles/ptsecurity-mosaic-timepicker.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-toggle.umd.js +97 -58
- package/bundles/ptsecurity-mosaic-toggle.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-tooltip.umd.js +347 -615
- package/bundles/ptsecurity-mosaic-tooltip.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-tree-select.umd.js +223 -118
- package/bundles/ptsecurity-mosaic-tree-select.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic-tree.umd.js +1162 -344
- package/bundles/ptsecurity-mosaic-tree.umd.js.map +1 -1
- package/bundles/ptsecurity-mosaic.umd.js +2 -2
- package/button/button.component.d.ts +7 -0
- package/button/button.module.d.ts +8 -0
- package/button/package.json +0 -1
- package/button/ptsecurity-mosaic-button.d.ts +1 -0
- package/button-toggle/button-toggle.component.d.ts +5 -0
- package/button-toggle/button-toggle.module.d.ts +7 -0
- package/button-toggle/package.json +0 -1
- package/button-toggle/ptsecurity-mosaic-button-toggle.d.ts +1 -0
- package/card/card.component.d.ts +3 -0
- package/card/card.module.d.ts +8 -0
- package/card/package.json +0 -1
- package/card/ptsecurity-mosaic-card.d.ts +1 -0
- package/checkbox/checkbox-module.d.ts +7 -0
- package/checkbox/checkbox-required-validator.d.ts +3 -0
- package/checkbox/checkbox.d.ts +3 -0
- package/checkbox/package.json +0 -1
- package/checkbox/ptsecurity-mosaic-checkbox.d.ts +1 -0
- package/core/common-behaviors/color.d.ts +3 -3
- package/core/common-behaviors/common-module.d.ts +5 -0
- package/core/common-behaviors/disabled.d.ts +4 -3
- package/core/common-behaviors/tabindex.d.ts +2 -1
- package/core/error/error-options.d.ts +5 -0
- package/core/formatters/date/formatter.d.ts +3 -0
- package/core/formatters/index.d.ts +5 -0
- package/core/formatters/number/formatter.d.ts +4 -0
- package/core/forms/forms-module.d.ts +5 -0
- package/core/forms/forms.directive.d.ts +5 -0
- package/core/highlight/highlight.pipe.d.ts +3 -0
- package/core/highlight/index.d.ts +6 -0
- package/core/line/line.d.ts +6 -0
- package/core/option/action.d.ts +42 -0
- package/core/option/index.d.ts +1 -0
- package/core/option/optgroup.d.ts +3 -0
- package/core/option/option-module.d.ts +9 -0
- package/core/option/option.d.ts +3 -0
- package/core/overlay/overlay-position-map.d.ts +0 -4
- package/core/package.json +0 -1
- package/core/pop-up/constants.d.ts +29 -0
- package/core/pop-up/index.d.ts +3 -0
- package/core/pop-up/pop-up-trigger.d.ts +70 -0
- package/core/pop-up/pop-up.d.ts +35 -0
- package/core/ptsecurity-mosaic-core.d.ts +1 -1
- package/core/public-api.d.ts +1 -0
- package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +3 -0
- package/core/selection/pseudo-checkbox/pseudo-checkbox.module.d.ts +6 -0
- package/core/services/measure-scrollbar.service.d.ts +3 -0
- package/datepicker/calendar-body.component.d.ts +5 -6
- package/datepicker/calendar.component.d.ts +5 -0
- package/datepicker/datepicker-input.directive.d.ts +6 -2
- package/datepicker/datepicker-intl.d.ts +3 -0
- package/datepicker/datepicker-module.d.ts +18 -0
- package/datepicker/datepicker-toggle.component.d.ts +5 -0
- package/datepicker/datepicker.component.d.ts +5 -0
- package/datepicker/month-view.component.d.ts +3 -0
- package/datepicker/multi-year-view.component.d.ts +3 -0
- package/datepicker/package.json +0 -1
- package/datepicker/ptsecurity-mosaic-datepicker.d.ts +1 -0
- package/datepicker/year-view.component.d.ts +3 -0
- package/design-tokens/package.json +0 -1
- package/design-tokens/ptsecurity-mosaic-design-tokens.d.ts +1 -0
- package/design-tokens/tokens/components/list.json5 +0 -4
- package/design-tokens/tokens/components/popover.json5 +32 -4
- package/design-tokens/tokens/components/tooltip.json5 +49 -3
- package/design-tokens/tokens/components/tree.json5 +3 -3
- package/design-tokens/tokens/properties/globals.json5 +1 -1
- package/design-tokens/tokens.d.ts +56 -15
- package/divider/divider.component.d.ts +3 -0
- package/divider/divider.module.d.ts +6 -0
- package/divider/package.json +0 -1
- package/divider/ptsecurity-mosaic-divider.d.ts +1 -0
- package/dropdown/dropdown-content.directive.d.ts +3 -0
- package/dropdown/dropdown-item.component.d.ts +3 -0
- package/dropdown/dropdown-trigger.directive.d.ts +6 -8
- package/dropdown/dropdown.component.d.ts +5 -1
- package/dropdown/dropdown.module.d.ts +11 -0
- package/dropdown/package.json +0 -1
- package/dropdown/ptsecurity-mosaic-dropdown.d.ts +1 -0
- package/esm2015/autocomplete/autocomplete-origin.directive.js +11 -11
- package/esm2015/autocomplete/autocomplete-trigger.directive.js +53 -38
- package/esm2015/autocomplete/autocomplete.component.js +56 -37
- package/esm2015/autocomplete/autocomplete.module.js +25 -15
- package/esm2015/button/button.component.js +52 -56
- package/esm2015/button/button.module.js +35 -20
- package/esm2015/button-toggle/button-toggle.component.js +76 -55
- package/esm2015/button-toggle/button-toggle.module.js +13 -8
- package/esm2015/card/card.component.js +32 -30
- package/esm2015/card/card.module.js +23 -12
- package/esm2015/checkbox/checkbox-module.js +13 -8
- package/esm2015/checkbox/checkbox-required-validator.js +12 -8
- package/esm2015/checkbox/checkbox.js +61 -44
- package/esm2015/core/common-behaviors/color.js +2 -5
- package/esm2015/core/common-behaviors/common-module.js +17 -11
- package/esm2015/core/common-behaviors/disabled.js +1 -1
- package/esm2015/core/common-behaviors/tabindex.js +4 -13
- package/esm2015/core/error/error-options.js +12 -8
- package/esm2015/core/formatters/date/formatter.js +13 -10
- package/esm2015/core/formatters/index.js +13 -8
- package/esm2015/core/formatters/number/formatter.js +16 -10
- package/esm2015/core/forms/forms-module.js +20 -13
- package/esm2015/core/forms/forms.directive.js +32 -29
- package/esm2015/core/highlight/highlight.pipe.js +8 -4
- package/esm2015/core/highlight/index.js +13 -8
- package/esm2015/core/line/line.js +22 -14
- package/esm2015/core/option/action.js +131 -0
- package/esm2015/core/option/index.js +2 -1
- package/esm2015/core/option/optgroup.js +22 -19
- package/esm2015/core/option/option-module.js +14 -8
- package/esm2015/core/option/option.js +44 -35
- package/esm2015/core/overlay/overlay-position-map.js +16 -18
- package/esm2015/core/pop-up/constants.js +34 -0
- package/esm2015/core/pop-up/index.js +4 -0
- package/esm2015/core/pop-up/pop-up-trigger.js +241 -0
- package/esm2015/core/pop-up/pop-up.js +87 -0
- package/esm2015/core/ptsecurity-mosaic-core.js +1 -2
- package/esm2015/core/public-api.js +2 -1
- package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +25 -21
- package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.module.js +13 -8
- package/esm2015/core/services/measure-scrollbar.service.js +12 -12
- package/esm2015/datepicker/calendar-body.component.js +39 -32
- package/esm2015/datepicker/calendar.component.js +92 -58
- package/esm2015/datepicker/datepicker-input.directive.js +94 -62
- package/esm2015/datepicker/datepicker-intl.js +7 -5
- package/esm2015/datepicker/datepicker-module.js +89 -48
- package/esm2015/datepicker/datepicker-toggle.component.js +44 -32
- package/esm2015/datepicker/datepicker.component.js +88 -63
- package/esm2015/datepicker/month-view.component.js +48 -29
- package/esm2015/datepicker/multi-year-view.component.js +40 -27
- package/esm2015/datepicker/year-view.component.js +45 -28
- package/esm2015/design-tokens/tokens.js +57 -16
- package/esm2015/divider/divider.component.js +24 -20
- package/esm2015/divider/divider.module.js +13 -8
- package/esm2015/dropdown/dropdown-content.directive.js +13 -15
- package/esm2015/dropdown/dropdown-item.component.js +40 -30
- package/esm2015/dropdown/dropdown-trigger.directive.js +75 -67
- package/esm2015/dropdown/dropdown.component.js +63 -38
- package/esm2015/dropdown/dropdown.module.js +40 -23
- package/esm2015/form-field/cleaner.js +20 -11
- package/esm2015/form-field/form-field.js +77 -53
- package/esm2015/form-field/form-field.module.js +41 -24
- package/esm2015/form-field/hint.js +16 -13
- package/esm2015/form-field/prefix.js +10 -6
- package/esm2015/form-field/stepper.js +22 -11
- package/esm2015/form-field/suffix.js +10 -6
- package/esm2015/icon/icon.component.js +27 -22
- package/esm2015/icon/icon.module.js +31 -18
- package/esm2015/input/input-number-validators.js +48 -29
- package/esm2015/input/input-number.js +42 -28
- package/esm2015/input/input.js +94 -52
- package/esm2015/input/input.module.js +13 -8
- package/esm2015/link/link.component.js +38 -34
- package/esm2015/link/link.module.js +20 -11
- package/esm2015/list/list-selection.component.js +234 -124
- package/esm2015/list/list.component.js +35 -32
- package/esm2015/list/list.module.js +47 -25
- package/esm2015/modal/css-unit.pipe.js +10 -6
- package/esm2015/modal/modal-control.service.js +11 -8
- package/esm2015/modal/modal.component.js +107 -61
- package/esm2015/modal/modal.directive.js +43 -30
- package/esm2015/modal/modal.module.js +59 -31
- package/esm2015/modal/modal.service.js +9 -9
- package/esm2015/modal/ptsecurity-mosaic-modal.js +1 -3
- package/esm2015/navbar/navbar-item.component.js +111 -95
- package/esm2015/navbar/navbar.component.js +40 -30
- package/esm2015/navbar/navbar.module.js +66 -35
- package/esm2015/navbar/ptsecurity-mosaic-navbar.js +1 -2
- package/esm2015/navbar/vertical-navbar.component.js +68 -46
- package/esm2015/popover/popover-confirm.component.js +115 -0
- package/esm2015/popover/popover.component.js +180 -587
- package/esm2015/popover/popover.module.js +18 -12
- package/esm2015/popover/public-api.js +2 -1
- package/esm2015/progress-bar/progress-bar.component.js +26 -24
- package/esm2015/progress-bar/progress-bar.module.js +24 -15
- package/esm2015/progress-spinner/progress-spinner.component.js +26 -24
- package/esm2015/progress-spinner/progress-spinner.module.js +24 -15
- package/esm2015/radio/radio.component.js +87 -67
- package/esm2015/radio/radio.module.js +13 -8
- package/esm2015/select/select.component.js +181 -105
- package/esm2015/select/select.module.js +54 -28
- package/esm2015/sidebar/ptsecurity-mosaic-sidebar.js +1 -2
- package/esm2015/sidebar/sidebar.component.js +61 -50
- package/esm2015/sidebar/sidebar.module.js +25 -16
- package/esm2015/sidepanel/ptsecurity-mosaic-sidepanel.js +1 -2
- package/esm2015/sidepanel/sidepanel-container.component.js +46 -40
- package/esm2015/sidepanel/sidepanel-directives.js +87 -57
- package/esm2015/sidepanel/sidepanel.module.js +63 -30
- package/esm2015/sidepanel/sidepanel.service.js +20 -12
- package/esm2015/splitter/splitter.component.js +62 -64
- package/esm2015/splitter/splitter.module.js +32 -19
- package/esm2015/table/table.component.js +13 -9
- package/esm2015/table/table.module.js +23 -12
- package/esm2015/tabs/paginated-tab-header.js +20 -18
- package/esm2015/tabs/ptsecurity-mosaic-tabs.js +1 -6
- package/esm2015/tabs/tab-body.component.js +52 -42
- package/esm2015/tabs/tab-content.directive.js +8 -8
- package/esm2015/tabs/tab-group.component.js +145 -74
- package/esm2015/tabs/tab-header.component.js +50 -36
- package/esm2015/tabs/tab-label-wrapper.directive.js +30 -16
- package/esm2015/tabs/tab-label.directive.js +11 -7
- package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +46 -46
- package/esm2015/tabs/tab.component.js +67 -33
- package/esm2015/tabs/tabs.module.js +87 -45
- package/esm2015/tags/tag-input.js +48 -34
- package/esm2015/tags/tag-list.component.js +93 -56
- package/esm2015/tags/tag.component.js +90 -73
- package/esm2015/tags/tag.module.js +46 -29
- package/esm2015/textarea/textarea.component.js +70 -41
- package/esm2015/textarea/textarea.module.js +13 -8
- package/esm2015/timepicker/timepicker.directive.js +66 -54
- package/esm2015/timepicker/timepicker.module.js +26 -13
- package/esm2015/toggle/toggle.component.js +65 -47
- package/esm2015/toggle/toggle.module.js +13 -8
- package/esm2015/tooltip/tooltip.animations.js +19 -0
- package/esm2015/tooltip/tooltip.component.js +239 -555
- package/esm2015/tooltip/tooltip.module.js +38 -11
- package/esm2015/tree/control/base-tree-control.js +60 -0
- package/esm2015/tree/control/flat-tree-control.js +123 -0
- package/esm2015/tree/control/nested-tree-control.js +41 -0
- package/esm2015/tree/control/tree-control.js +2 -0
- package/esm2015/tree/data-source/flat-data-source.js +1 -1
- package/esm2015/tree/node.js +31 -0
- package/esm2015/tree/outlet.js +15 -0
- package/esm2015/tree/padding.directive.js +98 -25
- package/esm2015/tree/public-api.js +9 -2
- package/esm2015/tree/toggle.js +65 -70
- package/esm2015/tree/tree-base.js +243 -0
- package/esm2015/tree/tree-errors.js +36 -0
- package/esm2015/tree/tree-option.component.js +102 -56
- package/esm2015/tree/tree-selection.component.js +180 -115
- package/esm2015/tree/tree.js +23 -0
- package/esm2015/tree/tree.module.js +38 -12
- package/esm2015/tree-select/tree-select.component.js +153 -85
- package/esm2015/tree-select/tree-select.module.js +33 -18
- package/fesm2015/ptsecurity-mosaic-autocomplete.js +140 -102
- package/fesm2015/ptsecurity-mosaic-autocomplete.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-button-toggle.js +87 -63
- package/fesm2015/ptsecurity-mosaic-button-toggle.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-button.js +86 -76
- package/fesm2015/ptsecurity-mosaic-button.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-card.js +54 -42
- package/fesm2015/ptsecurity-mosaic-card.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-checkbox.js +82 -59
- package/fesm2015/ptsecurity-mosaic-checkbox.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-core.js +758 -239
- package/fesm2015/ptsecurity-mosaic-core.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-datepicker.js +546 -377
- package/fesm2015/ptsecurity-mosaic-datepicker.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-design-tokens.js +57 -16
- package/fesm2015/ptsecurity-mosaic-design-tokens.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-divider.js +34 -26
- package/fesm2015/ptsecurity-mosaic-divider.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-dropdown.js +219 -171
- package/fesm2015/ptsecurity-mosaic-dropdown.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-form-field.js +184 -119
- package/fesm2015/ptsecurity-mosaic-form-field.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-icon.js +56 -39
- package/fesm2015/ptsecurity-mosaic-icon.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-input.js +191 -116
- package/fesm2015/ptsecurity-mosaic-input.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-link.js +57 -45
- package/fesm2015/ptsecurity-mosaic-link.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-list.js +311 -179
- package/fesm2015/ptsecurity-mosaic-list.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-modal.js +243 -159
- package/fesm2015/ptsecurity-mosaic-modal.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-navbar.js +280 -205
- package/fesm2015/ptsecurity-mosaic-navbar.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-popover.js +297 -597
- package/fesm2015/ptsecurity-mosaic-popover.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-progress-bar.js +48 -38
- package/fesm2015/ptsecurity-mosaic-progress-bar.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-progress-spinner.js +48 -38
- package/fesm2015/ptsecurity-mosaic-progress-spinner.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-radio.js +99 -76
- package/fesm2015/ptsecurity-mosaic-radio.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-select.js +236 -136
- package/fesm2015/ptsecurity-mosaic-select.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-sidebar.js +85 -66
- package/fesm2015/ptsecurity-mosaic-sidebar.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-sidepanel.js +207 -139
- package/fesm2015/ptsecurity-mosaic-sidepanel.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-splitter.js +92 -82
- package/fesm2015/ptsecurity-mosaic-splitter.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-table.js +33 -19
- package/fesm2015/ptsecurity-mosaic-table.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tabs.js +557 -387
- package/fesm2015/ptsecurity-mosaic-tabs.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tags.js +273 -192
- package/fesm2015/ptsecurity-mosaic-tags.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-textarea.js +83 -50
- package/fesm2015/ptsecurity-mosaic-textarea.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-timepicker.js +89 -66
- package/fesm2015/ptsecurity-mosaic-timepicker.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-toggle.js +77 -55
- package/fesm2015/ptsecurity-mosaic-toggle.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tooltip.js +293 -566
- package/fesm2015/ptsecurity-mosaic-tooltip.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tree-select.js +188 -106
- package/fesm2015/ptsecurity-mosaic-tree-select.js.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tree.js +1001 -279
- package/fesm2015/ptsecurity-mosaic-tree.js.map +1 -1
- package/form-field/cleaner.d.ts +5 -0
- package/form-field/form-field.d.ts +5 -0
- package/form-field/form-field.module.d.ts +12 -0
- package/form-field/hint.d.ts +3 -0
- package/form-field/package.json +0 -1
- package/form-field/prefix.d.ts +3 -0
- package/form-field/ptsecurity-mosaic-form-field.d.ts +1 -0
- package/form-field/stepper.d.ts +3 -0
- package/form-field/suffix.d.ts +3 -0
- package/icon/icon.component.d.ts +5 -0
- package/icon/icon.module.d.ts +8 -0
- package/icon/package.json +0 -1
- package/icon/ptsecurity-mosaic-icon.d.ts +1 -0
- package/input/input-number-validators.d.ts +7 -2
- package/input/input-number.d.ts +3 -0
- package/input/input.d.ts +5 -0
- package/input/input.module.d.ts +11 -0
- package/input/package.json +0 -1
- package/input/ptsecurity-mosaic-input.d.ts +1 -0
- package/link/link.component.d.ts +3 -0
- package/link/link.module.d.ts +7 -0
- package/link/package.json +0 -1
- package/link/ptsecurity-mosaic-link.d.ts +1 -0
- package/list/list-selection.component.d.ts +30 -3
- package/list/list.component.d.ts +5 -0
- package/list/list.module.d.ts +9 -0
- package/list/package.json +0 -1
- package/list/ptsecurity-mosaic-list.d.ts +1 -0
- package/modal/css-unit.pipe.d.ts +3 -0
- package/modal/modal-control.service.d.ts +3 -0
- package/modal/modal.component.d.ts +5 -0
- package/modal/modal.directive.d.ts +9 -0
- package/modal/modal.module.d.ts +12 -0
- package/modal/modal.service.d.ts +3 -0
- package/modal/package.json +0 -1
- package/modal/ptsecurity-mosaic-modal.d.ts +1 -2
- package/navbar/navbar-item.component.d.ts +13 -0
- package/navbar/navbar.component.d.ts +5 -0
- package/navbar/navbar.module.d.ts +11 -0
- package/navbar/package.json +0 -1
- package/navbar/ptsecurity-mosaic-navbar.d.ts +1 -1
- package/navbar/vertical-navbar.component.d.ts +5 -0
- package/package.json +8 -9
- package/popover/package.json +0 -1
- package/popover/popover-confirm.component.d.ts +33 -0
- package/popover/popover.component.d.ts +50 -136
- package/popover/popover.module.d.ts +9 -0
- package/popover/ptsecurity-mosaic-popover.d.ts +1 -0
- package/popover/public-api.d.ts +1 -0
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
- package/prebuilt-visual/default-visual.css +1 -1
- package/progress-bar/package.json +0 -1
- package/progress-bar/progress-bar.component.d.ts +3 -0
- package/progress-bar/progress-bar.module.d.ts +7 -0
- package/progress-bar/ptsecurity-mosaic-progress-bar.d.ts +1 -0
- package/progress-spinner/package.json +0 -1
- package/progress-spinner/progress-spinner.component.d.ts +3 -0
- package/progress-spinner/progress-spinner.module.d.ts +7 -0
- package/progress-spinner/ptsecurity-mosaic-progress-spinner.d.ts +1 -0
- package/ptsecurity-mosaic.d.ts +1 -0
- package/radio/package.json +0 -1
- package/radio/ptsecurity-mosaic-radio.d.ts +1 -0
- package/radio/radio.component.d.ts +5 -0
- package/radio/radio.module.d.ts +8 -0
- package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js +6 -3
- package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js.map +1 -1
- package/select/package.json +0 -1
- package/select/ptsecurity-mosaic-select.d.ts +1 -0
- package/select/select.component.d.ts +11 -7
- package/select/select.module.d.ts +11 -0
- package/sidebar/package.json +0 -1
- package/sidebar/ptsecurity-mosaic-sidebar.d.ts +1 -1
- package/sidebar/sidebar.component.d.ts +7 -0
- package/sidebar/sidebar.module.d.ts +6 -0
- package/sidepanel/package.json +0 -1
- package/sidepanel/ptsecurity-mosaic-sidepanel.d.ts +1 -1
- package/sidepanel/sidepanel-container.component.d.ts +3 -0
- package/sidepanel/sidepanel-directives.d.ts +13 -0
- package/sidepanel/sidepanel.module.d.ts +13 -0
- package/sidepanel/sidepanel.service.d.ts +3 -0
- package/splitter/package.json +0 -1
- package/splitter/ptsecurity-mosaic-splitter.d.ts +1 -0
- package/splitter/splitter.component.d.ts +7 -0
- package/splitter/splitter.module.d.ts +7 -0
- package/table/package.json +0 -1
- package/table/ptsecurity-mosaic-table.d.ts +1 -0
- package/table/table.component.d.ts +3 -0
- package/table/table.module.d.ts +8 -0
- package/tabs/package.json +0 -1
- package/tabs/paginated-tab-header.d.ts +3 -0
- package/tabs/ptsecurity-mosaic-tabs.d.ts +1 -5
- package/tabs/tab-body.component.d.ts +5 -0
- package/tabs/tab-content.directive.d.ts +3 -0
- package/tabs/tab-group.component.d.ts +24 -4
- package/tabs/tab-header.component.d.ts +3 -0
- package/tabs/tab-label-wrapper.directive.d.ts +9 -0
- package/tabs/tab-label.directive.d.ts +3 -0
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +5 -0
- package/tabs/tab.component.d.ts +12 -3
- package/tabs/tabs.module.d.ts +18 -0
- package/tags/package.json +0 -1
- package/tags/ptsecurity-mosaic-tags.d.ts +1 -0
- package/tags/tag-input.d.ts +3 -0
- package/tags/tag-list.component.d.ts +3 -0
- package/tags/tag.component.d.ts +9 -0
- package/tags/tag.module.d.ts +9 -0
- package/textarea/package.json +0 -1
- package/textarea/ptsecurity-mosaic-textarea.d.ts +1 -0
- package/textarea/textarea.component.d.ts +3 -0
- package/textarea/textarea.module.d.ts +9 -0
- package/timepicker/package.json +0 -1
- package/timepicker/ptsecurity-mosaic-timepicker.d.ts +1 -0
- package/timepicker/timepicker.directive.d.ts +5 -2
- package/timepicker/timepicker.module.d.ts +9 -0
- package/toggle/package.json +0 -1
- package/toggle/ptsecurity-mosaic-toggle.d.ts +1 -0
- package/toggle/toggle.component.d.ts +3 -0
- package/toggle/toggle.module.d.ts +8 -0
- package/tooltip/package.json +0 -1
- package/tooltip/ptsecurity-mosaic-tooltip.d.ts +1 -0
- package/tooltip/tooltip.animations.d.ts +8 -0
- package/tooltip/tooltip.component.d.ts +74 -134
- package/tooltip/tooltip.module.d.ts +7 -0
- package/tree/control/base-tree-control.d.ts +40 -0
- package/tree/control/flat-tree-control.d.ts +48 -0
- package/tree/control/nested-tree-control.d.ts +19 -0
- package/tree/control/tree-control.d.ts +44 -0
- package/tree/data-source/flat-data-source.d.ts +2 -1
- package/tree/node.d.ts +34 -0
- package/tree/outlet.d.ts +9 -0
- package/tree/package.json +0 -1
- package/tree/padding.directive.d.ts +36 -5
- package/tree/ptsecurity-mosaic-tree.d.ts +1 -0
- package/tree/public-api.d.ts +8 -1
- package/tree/toggle.d.ts +20 -15
- package/tree/tree-base.d.ts +97 -0
- package/tree/tree-errors.d.ts +25 -0
- package/tree/tree-option.component.d.ts +15 -4
- package/tree/tree-selection.component.d.ts +46 -24
- package/tree/tree.d.ts +6 -0
- package/tree/tree.module.d.ts +14 -0
- package/tree-select/package.json +0 -1
- package/tree-select/ptsecurity-mosaic-tree-select.d.ts +1 -0
- package/tree-select/tree-select.component.d.ts +8 -8
- package/tree-select/tree-select.module.d.ts +11 -0
- package/autocomplete/ptsecurity-mosaic-autocomplete.metadata.json +0 -1
- package/bundles/ptsecurity-mosaic-autocomplete.umd.min.js +0 -2
- package/bundles/ptsecurity-mosaic-autocomplete.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-button-toggle.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-button-toggle.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-button.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-button.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-card.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-card.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-checkbox.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-checkbox.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-core.umd.min.js +0 -17
- package/bundles/ptsecurity-mosaic-core.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-datepicker.umd.min.js +0 -2
- package/bundles/ptsecurity-mosaic-datepicker.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-design-tokens.umd.min.js +0 -2
- package/bundles/ptsecurity-mosaic-design-tokens.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-divider.umd.min.js +0 -2
- package/bundles/ptsecurity-mosaic-divider.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-dropdown.umd.min.js +0 -17
- package/bundles/ptsecurity-mosaic-dropdown.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-form-field.umd.min.js +0 -17
- package/bundles/ptsecurity-mosaic-form-field.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-icon.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-icon.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-input.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-input.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-link.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-link.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-list.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-list.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-modal.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-modal.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-navbar.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-navbar.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-popover.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-popover.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-progress-bar.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-progress-bar.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-progress-spinner.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-progress-spinner.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-radio.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-radio.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-select.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-select.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-sidebar.umd.min.js +0 -2
- package/bundles/ptsecurity-mosaic-sidebar.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-sidepanel.umd.min.js +0 -2
- package/bundles/ptsecurity-mosaic-sidepanel.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-splitter.umd.min.js +0 -2
- package/bundles/ptsecurity-mosaic-splitter.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-table.umd.min.js +0 -2
- package/bundles/ptsecurity-mosaic-table.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tabs.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-tabs.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tags.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-tags.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-textarea.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-textarea.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-timepicker.umd.min.js +0 -2
- package/bundles/ptsecurity-mosaic-timepicker.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-toggle.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-toggle.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tooltip.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-tooltip.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tree-select.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-tree-select.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tree.umd.min.js +0 -16
- package/bundles/ptsecurity-mosaic-tree.umd.min.js.map +0 -1
- package/bundles/ptsecurity-mosaic.umd.min.js +0 -2
- package/bundles/ptsecurity-mosaic.umd.min.js.map +0 -1
- package/button/ptsecurity-mosaic-button.metadata.json +0 -1
- package/button-toggle/ptsecurity-mosaic-button-toggle.metadata.json +0 -1
- package/card/ptsecurity-mosaic-card.metadata.json +0 -1
- package/checkbox/ptsecurity-mosaic-checkbox.metadata.json +0 -1
- package/core/ptsecurity-mosaic-core.metadata.json +0 -1
- package/datepicker/ptsecurity-mosaic-datepicker.metadata.json +0 -1
- package/design-tokens/ptsecurity-mosaic-design-tokens.metadata.json +0 -1
- package/divider/ptsecurity-mosaic-divider.metadata.json +0 -1
- package/dropdown/ptsecurity-mosaic-dropdown.metadata.json +0 -1
- package/esm2015/tree/node.directive.js +0 -15
- package/form-field/ptsecurity-mosaic-form-field.metadata.json +0 -1
- package/icon/ptsecurity-mosaic-icon.metadata.json +0 -1
- package/input/ptsecurity-mosaic-input.metadata.json +0 -1
- package/link/ptsecurity-mosaic-link.metadata.json +0 -1
- package/list/ptsecurity-mosaic-list.metadata.json +0 -1
- package/modal/ptsecurity-mosaic-modal.metadata.json +0 -1
- package/navbar/ptsecurity-mosaic-navbar.metadata.json +0 -1
- package/popover/ptsecurity-mosaic-popover.metadata.json +0 -1
- package/progress-bar/ptsecurity-mosaic-progress-bar.metadata.json +0 -1
- package/progress-spinner/ptsecurity-mosaic-progress-spinner.metadata.json +0 -1
- package/ptsecurity-mosaic.metadata.json +0 -1
- package/radio/ptsecurity-mosaic-radio.metadata.json +0 -1
- package/select/ptsecurity-mosaic-select.metadata.json +0 -1
- package/sidebar/ptsecurity-mosaic-sidebar.metadata.json +0 -1
- package/sidepanel/ptsecurity-mosaic-sidepanel.metadata.json +0 -1
- package/splitter/ptsecurity-mosaic-splitter.metadata.json +0 -1
- package/table/ptsecurity-mosaic-table.metadata.json +0 -1
- package/tabs/ptsecurity-mosaic-tabs.metadata.json +0 -1
- package/tags/ptsecurity-mosaic-tags.metadata.json +0 -1
- package/textarea/ptsecurity-mosaic-textarea.metadata.json +0 -1
- package/timepicker/ptsecurity-mosaic-timepicker.metadata.json +0 -1
- package/toggle/ptsecurity-mosaic-toggle.metadata.json +0 -1
- package/tooltip/ptsecurity-mosaic-tooltip.metadata.json +0 -1
- package/tree/node.directive.d.ts +0 -4
- package/tree/ptsecurity-mosaic-tree.metadata.json +0 -1
- package/tree-select/ptsecurity-mosaic-tree-select.metadata.json +0 -1
@@ -1,15 +1,17 @@
|
|
1
|
-
import
|
2
|
-
import { Overlay,
|
1
|
+
import * as i2 from '@angular/cdk/overlay';
|
2
|
+
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
3
|
+
import * as i1 from '@angular/common';
|
3
4
|
import { CommonModule } from '@angular/common';
|
4
|
-
import
|
5
|
-
import {
|
6
|
-
import
|
7
|
-
import {
|
8
|
-
import
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import { takeUntil
|
5
|
+
import * as i0 from '@angular/core';
|
6
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, EventEmitter, Directive, Inject, Optional, Input, Output, NgModule } from '@angular/core';
|
7
|
+
import * as i1$1 from '@ptsecurity/mosaic/button';
|
8
|
+
import { McButtonModule } from '@ptsecurity/mosaic/button';
|
9
|
+
import * as i3 from '@angular/cdk/bidi';
|
10
|
+
import { McPopUp, McPopUpTrigger, PopUpTriggers, PopUpSizes, POSITION_TO_CSS_MAP, ThemePalette } from '@ptsecurity/mosaic/core';
|
11
|
+
import { merge, NEVER, Subject } from 'rxjs';
|
12
|
+
import { takeUntil } from 'rxjs/operators';
|
12
13
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
14
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
13
15
|
|
14
16
|
const mcPopoverAnimations = {
|
15
17
|
/** Animation that transitions a tooltip in and out. */
|
@@ -26,178 +28,32 @@ const mcPopoverAnimations = {
|
|
26
28
|
])
|
27
29
|
};
|
28
30
|
|
29
|
-
|
30
|
-
(
|
31
|
-
|
32
|
-
|
33
|
-
PopoverTriggers["Hover"] = "hover";
|
34
|
-
})(PopoverTriggers || (PopoverTriggers = {}));
|
35
|
-
var PopoverVisibility;
|
36
|
-
(function (PopoverVisibility) {
|
37
|
-
PopoverVisibility["Initial"] = "initial";
|
38
|
-
PopoverVisibility["Visible"] = "visible";
|
39
|
-
PopoverVisibility["Hidden"] = "hidden";
|
40
|
-
})(PopoverVisibility || (PopoverVisibility = {}));
|
41
|
-
class McPopoverComponent {
|
42
|
-
constructor(changeDetectorRef, componentElementRef) {
|
43
|
-
this.changeDetectorRef = changeDetectorRef;
|
44
|
-
this.componentElementRef = componentElementRef;
|
45
|
-
this.positions = [...EXTENDED_OVERLAY_POSITIONS];
|
46
|
-
this.popoverVisibility = PopoverVisibility.Initial;
|
47
|
-
this.closeOnInteraction = false;
|
48
|
-
this.mcVisibleChange = new EventEmitter();
|
49
|
-
this._mcTrigger = PopoverTriggers.Hover;
|
50
|
-
this._mcPlacement = 'top';
|
51
|
-
this._mcVisible = new BehaviorSubject(false);
|
52
|
-
this._classList = [];
|
53
|
-
/** Subject for notifying that the popover has been hidden from the view */
|
54
|
-
this.onHideSubject = new Subject();
|
55
|
-
this.availablePositions = POSITION_MAP;
|
56
|
-
}
|
57
|
-
get mcTrigger() {
|
58
|
-
return this._mcTrigger;
|
59
|
-
}
|
60
|
-
set mcTrigger(value) {
|
61
|
-
this._mcTrigger = value;
|
62
|
-
}
|
63
|
-
get mcPlacement() {
|
64
|
-
return this._mcPlacement;
|
65
|
-
}
|
66
|
-
set mcPlacement(value) {
|
67
|
-
if (value !== this._mcPlacement) {
|
68
|
-
this._mcPlacement = value;
|
69
|
-
this.positions.unshift(POSITION_MAP[this.mcPlacement]);
|
70
|
-
}
|
71
|
-
else if (!value) {
|
72
|
-
this._mcPlacement = 'top';
|
73
|
-
}
|
74
|
-
}
|
75
|
-
get mcPopoverSize() {
|
76
|
-
return this.popoverSize;
|
77
|
-
}
|
78
|
-
set mcPopoverSize(value) {
|
79
|
-
if (value !== this.popoverSize) {
|
80
|
-
this.popoverSize = value;
|
81
|
-
}
|
82
|
-
else if (!value) {
|
83
|
-
this.popoverSize = 'normal';
|
84
|
-
}
|
85
|
-
}
|
86
|
-
get mcVisible() {
|
87
|
-
return this._mcVisible.value;
|
88
|
-
}
|
89
|
-
set mcVisible(value) {
|
90
|
-
const visible = coerceBooleanProperty(value);
|
91
|
-
if (this._mcVisible.value !== visible) {
|
92
|
-
this._mcVisible.next(visible);
|
93
|
-
this.mcVisibleChange.emit(visible);
|
94
|
-
}
|
95
|
-
}
|
96
|
-
get classList() {
|
97
|
-
return this._classList.join(' ');
|
98
|
-
}
|
99
|
-
set classList(value) {
|
100
|
-
let list = [];
|
101
|
-
if (Array.isArray(value)) {
|
102
|
-
list = value;
|
103
|
-
}
|
104
|
-
else {
|
105
|
-
list.push(value);
|
106
|
-
}
|
107
|
-
this._classList = list;
|
108
|
-
}
|
109
|
-
get getCssClassesList() {
|
110
|
-
return `${this.classList} mc-popover-${this.mcPopoverSize} mc-popover_placement-${this.getPlacementClass}`;
|
111
|
-
}
|
112
|
-
get getPlacementClass() {
|
113
|
-
return POSITION_TO_CSS_MAP[this.mcPlacement];
|
114
|
-
}
|
115
|
-
get isOpen() {
|
116
|
-
return this.popoverVisibility === PopoverVisibility.Visible;
|
117
|
-
}
|
118
|
-
handleKeydown(e) {
|
119
|
-
// tslint:disable-next-line: deprecation
|
120
|
-
if (this.isOpen && e.keyCode === ESCAPE) {
|
121
|
-
this.hide();
|
122
|
-
}
|
123
|
-
}
|
124
|
-
show() {
|
125
|
-
if (this.isNonEmptyContent()) {
|
126
|
-
this.closeOnInteraction = true;
|
127
|
-
this.popoverVisibility = PopoverVisibility.Visible;
|
128
|
-
this._mcVisible.next(true);
|
129
|
-
this.mcVisibleChange.emit(true);
|
130
|
-
// Mark for check so if any parent component has set the
|
131
|
-
// ChangeDetectionStrategy to OnPush it will be checked anyways
|
132
|
-
this.markForCheck();
|
133
|
-
}
|
134
|
-
}
|
135
|
-
hide() {
|
136
|
-
this.popoverVisibility = PopoverVisibility.Hidden;
|
137
|
-
this._mcVisible.next(false);
|
138
|
-
this.mcVisibleChange.emit(false);
|
139
|
-
// Mark for check so if any parent component has set the
|
140
|
-
// ChangeDetectionStrategy to OnPush it will be checked anyways
|
141
|
-
this.markForCheck();
|
142
|
-
}
|
143
|
-
isNonEmptyContent() {
|
144
|
-
return !!this.mcContent && (this.isTemplateRef(this.mcContent) || this.isNonEmptyString(this.mcContent));
|
145
|
-
}
|
146
|
-
/** Returns an observable that notifies when the popover has been hidden from view. */
|
147
|
-
afterHidden() {
|
148
|
-
return this.onHideSubject.asObservable();
|
149
|
-
}
|
150
|
-
isVisible() {
|
151
|
-
return this.popoverVisibility === PopoverVisibility.Visible;
|
31
|
+
class McPopoverComponent extends McPopUp {
|
32
|
+
constructor(changeDetectorRef) {
|
33
|
+
super(changeDetectorRef);
|
34
|
+
this.prefix = 'mc-popover';
|
152
35
|
}
|
153
|
-
|
154
|
-
this.
|
155
|
-
}
|
156
|
-
isTemplateRef(value) {
|
157
|
-
return value instanceof TemplateRef;
|
158
|
-
}
|
159
|
-
isNonEmptyString(value) {
|
160
|
-
return typeof value === 'string' && value !== '';
|
161
|
-
}
|
162
|
-
animationStart() {
|
163
|
-
this.closeOnInteraction = false;
|
164
|
-
}
|
165
|
-
animationDone(event) {
|
166
|
-
const toState = event.toState;
|
167
|
-
if (toState === PopoverVisibility.Hidden && !this.isVisible()) {
|
168
|
-
this.onHideSubject.next();
|
169
|
-
}
|
170
|
-
if (toState === PopoverVisibility.Visible || toState === PopoverVisibility.Hidden) {
|
171
|
-
this.closeOnInteraction = true;
|
172
|
-
}
|
173
|
-
}
|
174
|
-
ngOnDestroy() {
|
175
|
-
this.onHideSubject.complete();
|
36
|
+
updateClassMap(placement, customClass, size) {
|
37
|
+
super.updateClassMap(placement, customClass, { [`${this.prefix}_${size}`]: !!size });
|
176
38
|
}
|
177
39
|
}
|
178
|
-
McPopoverComponent
|
179
|
-
{ type:
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
]
|
193
|
-
|
194
|
-
|
195
|
-
{ type: ChangeDetectorRef },
|
196
|
-
{ type: ElementRef }
|
197
|
-
];
|
198
|
-
McPopoverComponent.propDecorators = {
|
199
|
-
mcVisibleChange: [{ type: Output, args: ['mcPopoverVisibleChange',] }]
|
200
|
-
};
|
40
|
+
/** @nocollapse */ McPopoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
41
|
+
/** @nocollapse */ McPopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: McPopoverComponent, selector: "mc-popover-component", host: { listeners: { "keydown.esc": "hide(0)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"mc-popover\"\n [ngClass]=\"classMap\"\n [@state]=\"visibility\"\n (@state.start)=\"animationStart()\"\n (@state.done)=\"animationDone($event)\">\n\n <div class=\"mc-popover__container\">\n <div class=\"mc-popover__header\" *ngIf=\"header\">\n <ng-container *ngIf=\"isTemplateRef(header)\" [ngTemplateOutlet]=\"$any(header)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(header)\">\n <div>{{ header }}</div>\n </ng-container>\n </div>\n\n <div class=\"mc-popover__content\" *ngIf=\"content\">\n <ng-container *ngIf=\"isTemplateRef(content)\" [ngTemplateOutlet]=\"$any(content)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(content)\">\n <div>{{ content }}</div>\n </ng-container>\n </div>\n\n <div class=\"mc-popover__footer\" *ngIf=\"footer\">\n <ng-container *ngIf=\"isTemplateRef(footer)\" [ngTemplateOutlet]=\"$any(footer)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(footer)\">\n <div>{{ footer }}</div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"mc-popover__arrow\" [class.mc-popover__arrow_with-footer]=\"footer\"></div>\n</div>\n", styles: ["@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-backdrop{top:0;bottom:0;left:0;right:0;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0;position:absolute;pointer-events:auto;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-pane{box-sizing:border-box;position:absolute;pointer-events:auto;margin:0;padding:0;z-index:1000;max-width:100%;max-height:100%}.cdk-overlay-connected-position-bounding-box{box-sizing:border-box;position:absolute;z-index:1000;display:flex;flex-direction:column;margin:0;padding:0;min-width:1px;min-height:1px}.mc-popover{position:relative;border-radius:3px;border-radius:var(--mc-popover-size-border-radius, 3px);border-width:1px;border-style:solid;box-sizing:border-box;z-index:1030;list-style:none;white-space:pre-line}.mc-popover.mc-popover_small{max-width:200px;max-width:var(--mc-popover-size-small-width, 200px)}.mc-popover.mc-popover_normal{max-width:400px;max-width:var(--mc-popover-size-normal-width, 400px)}.mc-popover.mc-popover_large{max-width:640px;max-width:var(--mc-popover-size-large-width, 640px)}.mc-popover.mc-popover_placement-top,.mc-popover.mc-popover_placement-top-left,.mc-popover.mc-popover_placement-top-right{margin-bottom:calc(9px);margin-bottom:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-right,.mc-popover.mc-popover_placement-right-top,.mc-popover.mc-popover_placement-right-bottom{margin-left:calc(9px);margin-left:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-bottom,.mc-popover.mc-popover_placement-bottom-left,.mc-popover.mc-popover_placement-bottom-right{margin-top:calc(9px);margin-top:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-left,.mc-popover.mc-popover_placement-left-top,.mc-popover.mc-popover_placement-left-bottom{margin-right:calc(9px);margin-right:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover__container{display:flex;flex-direction:column;max-height:480px;max-height:var(--mc-popover-size-max-height, 480px);border-radius:3px;border-radius:var(--mc-popover-size-border-radius, 3px);overflow:hidden}.mc-popover__header{height:10px 16px;height:var(--mc-popover-header-size-height, 10px 16px);padding:10px 16px;padding:var(--mc-popover-header-size-padding, 10px 16px);border-bottom-width:1px;border-bottom-style:solid}.mc-popover__content{overflow:hidden;padding:16px;padding:var(--mc-popover-size-padding, 16px)}.mc-popover__footer{box-sizing:border-box;margin-top:8px;margin-top:var(--mc-popover-footer-size-margin-top, 8px);height:56px;height:var(--mc-popover-footer-size-height, 56px);padding:12px 16px;padding:var(--mc-popover-footer-size-padding, 12px 16px);border-top-width:1px;border-top-style:solid}.mc-popover__arrow{position:absolute;z-index:-1;width:12px;width:var(--mc-popover-size-arrow-size, 12px);height:12px;height:var(--mc-popover-size-arrow-size, 12px);border:solid 1px;transform:rotate(45deg)}.mc-popover_placement-top .mc-popover__arrow{bottom:calc(11px / -2);bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:50%;margin-left:calc(11px / -2);margin-left:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-top-left .mc-popover__arrow{bottom:calc(11px / -2);bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:calc(18px - 9px);left:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-top-right .mc-popover__arrow{bottom:calc(11px / -2);bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);right:calc(18px - 9px);right:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-right .mc-popover__arrow{left:calc(11px / -2);left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:50%;margin-top:calc(11px / -2);margin-top:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-right-top .mc-popover__arrow{left:calc(11px / -2);left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:calc(18px - 9px);top:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-right-bottom .mc-popover__arrow{left:calc(11px / -2);left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);bottom:calc(18px - 9px);bottom:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-left .mc-popover__arrow{right:calc(11px / -2);right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:50%;margin-top:calc(11px / -2);margin-top:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-left-top .mc-popover__arrow{right:calc(11px / -2);right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:calc(18px - 9px);top:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-left-bottom .mc-popover__arrow{right:calc(11px / -2);right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);bottom:calc(18px - 9px);bottom:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-bottom .mc-popover__arrow{top:calc(11px / -2);top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:50%;margin-left:calc(11px / -2);margin-left:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-bottom-left .mc-popover__arrow{top:calc(11px / -2);top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:calc(18px - 9px);left:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-bottom-right .mc-popover__arrow{top:calc(11px / -2);top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);right:calc(18px - 9px);right:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover-confirm .mc-popover__content{padding:24px 16px 16px}.mc-popover-confirm .mc-popover__content button{margin-top:16px;display:block;margin-left:auto}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [mcPopoverAnimations.popoverState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverComponent, decorators: [{
|
43
|
+
type: Component,
|
44
|
+
args: [{
|
45
|
+
selector: 'mc-popover-component',
|
46
|
+
templateUrl: './popover.component.html',
|
47
|
+
preserveWhitespaces: false,
|
48
|
+
styleUrls: ['./popover.scss'],
|
49
|
+
host: {
|
50
|
+
'(keydown.esc)': 'hide(0)'
|
51
|
+
},
|
52
|
+
encapsulation: ViewEncapsulation.None,
|
53
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
54
|
+
animations: [mcPopoverAnimations.popoverState]
|
55
|
+
}]
|
56
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
201
57
|
const MC_POPOVER_SCROLL_STRATEGY = new InjectionToken('mc-popover-scroll-strategy');
|
202
58
|
/** @docs-private */
|
203
59
|
function mcPopoverScrollStrategyFactory(overlay) {
|
@@ -213,43 +69,35 @@ const MC_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
|
|
213
69
|
function getMcPopoverInvalidPositionError(position) {
|
214
70
|
return Error(`McPopover position "${position}" is invalid.`);
|
215
71
|
}
|
216
|
-
|
217
|
-
/* Constant distance between popover container border
|
218
|
-
* corner according to popover placement and middle of arrow
|
219
|
-
* */
|
220
|
-
const POPOVER_ARROW_BORDER_DISTANCE = 20; // tslint:disable-line
|
221
|
-
/* Constant value for min height and width of anchor element used for popover.
|
222
|
-
* Set as POPOVER_ARROW_BORDER_DISTANCE multiplied by 2
|
223
|
-
* plus 2px border for both sides of element. Used in check of position management.
|
224
|
-
* */
|
225
|
-
const ANCHOR_MIN_HEIGHT_WIDTH = 44; // tslint:disable-line
|
226
|
-
class McPopover {
|
72
|
+
class McPopoverTrigger extends McPopUpTrigger {
|
227
73
|
constructor(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction) {
|
228
|
-
|
229
|
-
this.elementRef = elementRef;
|
230
|
-
this.ngZone = ngZone;
|
231
|
-
this.scrollDispatcher = scrollDispatcher;
|
232
|
-
this.hostView = hostView;
|
233
|
-
this.scrollStrategy = scrollStrategy;
|
234
|
-
this.direction = direction;
|
235
|
-
this.isPopoverOpen = false;
|
236
|
-
this.isDynamicPopover = false;
|
237
|
-
this.backdropClass = 'cdk-overlay-transparent-backdrop';
|
238
|
-
this.mcVisibleChange = new EventEmitter();
|
239
|
-
this.mcPositionStrategyPlacementChange = new EventEmitter();
|
74
|
+
super(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction);
|
240
75
|
this._hasBackdrop = false;
|
241
|
-
this
|
242
|
-
this.
|
243
|
-
this.
|
244
|
-
this.
|
245
|
-
this.
|
246
|
-
this.
|
247
|
-
this.
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
76
|
+
this._trigger = PopUpTriggers.Click;
|
77
|
+
this._size = PopUpSizes.Normal;
|
78
|
+
this._closeOnScroll = false;
|
79
|
+
this.backdropClass = 'cdk-overlay-transparent-backdrop';
|
80
|
+
this.placementChange = new EventEmitter();
|
81
|
+
this.visibleChange = new EventEmitter();
|
82
|
+
this.originSelector = '.mc-popover';
|
83
|
+
}
|
84
|
+
get popoverVisible() {
|
85
|
+
return this.visible;
|
86
|
+
}
|
87
|
+
set popoverVisible(value) {
|
88
|
+
super.updateVisible(value);
|
89
|
+
}
|
90
|
+
get popoverPlacement() {
|
91
|
+
return this.placement;
|
92
|
+
}
|
93
|
+
set popoverPlacement(value) {
|
94
|
+
super.updatePlacement(value);
|
95
|
+
}
|
96
|
+
get popoverPlacementPriority() {
|
97
|
+
return this.placementPriority;
|
98
|
+
}
|
99
|
+
set popoverPlacementPriority(value) {
|
100
|
+
super.updatePlacementPriority(value);
|
253
101
|
}
|
254
102
|
get hasBackdrop() {
|
255
103
|
return this._hasBackdrop;
|
@@ -257,35 +105,26 @@ class McPopover {
|
|
257
105
|
set hasBackdrop(value) {
|
258
106
|
this._hasBackdrop = coerceBooleanProperty(value);
|
259
107
|
}
|
260
|
-
get
|
261
|
-
return this.
|
108
|
+
get header() {
|
109
|
+
return this._header;
|
262
110
|
}
|
263
|
-
set
|
264
|
-
this.
|
265
|
-
this.
|
266
|
-
if (this.isPopoverOpen) {
|
267
|
-
this.updatePosition(true);
|
268
|
-
}
|
111
|
+
set header(value) {
|
112
|
+
this._header = value;
|
113
|
+
this.updateData();
|
269
114
|
}
|
270
|
-
get
|
271
|
-
return this.
|
115
|
+
get content() {
|
116
|
+
return this._content;
|
272
117
|
}
|
273
|
-
set
|
274
|
-
this.
|
275
|
-
this.
|
276
|
-
if (this.isPopoverOpen) {
|
277
|
-
this.updatePosition(true);
|
278
|
-
}
|
118
|
+
set content(value) {
|
119
|
+
this._content = value;
|
120
|
+
this.updateData();
|
279
121
|
}
|
280
|
-
get
|
281
|
-
return this.
|
122
|
+
get footer() {
|
123
|
+
return this._footer;
|
282
124
|
}
|
283
|
-
set
|
284
|
-
this.
|
285
|
-
this.
|
286
|
-
if (this.isPopoverOpen) {
|
287
|
-
this.updatePosition(true);
|
288
|
-
}
|
125
|
+
set footer(value) {
|
126
|
+
this._footer = value;
|
127
|
+
this.updateData();
|
289
128
|
}
|
290
129
|
get disabled() {
|
291
130
|
return this._disabled;
|
@@ -293,407 +132,268 @@ class McPopover {
|
|
293
132
|
set disabled(value) {
|
294
133
|
this._disabled = coerceBooleanProperty(value);
|
295
134
|
}
|
296
|
-
get
|
297
|
-
return this.
|
298
|
-
}
|
299
|
-
set mcMouseEnterDelay(value) {
|
300
|
-
this._mcMouseEnterDelay = value;
|
301
|
-
this.updateCompValue('mcMouseEnterDelay', value);
|
302
|
-
}
|
303
|
-
get mcMouseLeaveDelay() {
|
304
|
-
return this._mcMouseLeaveDelay;
|
305
|
-
}
|
306
|
-
set mcMouseLeaveDelay(value) {
|
307
|
-
this._mcMouseLeaveDelay = value;
|
308
|
-
this.updateCompValue('mcMouseLeaveDelay', value);
|
135
|
+
get trigger() {
|
136
|
+
return this._trigger;
|
309
137
|
}
|
310
|
-
|
311
|
-
return this._mcTrigger;
|
312
|
-
}
|
313
|
-
set mcTrigger(value) {
|
138
|
+
set trigger(value) {
|
314
139
|
if (value) {
|
315
|
-
this.
|
316
|
-
this.updateCompValue('mcTrigger', value);
|
140
|
+
this._trigger = value;
|
317
141
|
}
|
318
142
|
else {
|
319
|
-
this.
|
143
|
+
this._trigger = PopUpTriggers.Click;
|
320
144
|
}
|
321
|
-
this.
|
145
|
+
this.initListeners();
|
322
146
|
}
|
323
|
-
get
|
324
|
-
return this.
|
147
|
+
get size() {
|
148
|
+
return this._size;
|
325
149
|
}
|
326
|
-
set
|
327
|
-
if (
|
328
|
-
this.
|
329
|
-
this.
|
150
|
+
set size(value) {
|
151
|
+
if ([PopUpSizes.Small, PopUpSizes.Normal, PopUpSizes.Large].includes(value)) {
|
152
|
+
this._size = value;
|
153
|
+
this.updateClassMap();
|
330
154
|
}
|
331
155
|
else {
|
332
|
-
this.
|
156
|
+
this._size = PopUpSizes.Normal;
|
333
157
|
}
|
334
158
|
}
|
335
|
-
get
|
336
|
-
return this.
|
159
|
+
get customClass() {
|
160
|
+
return this._customClass;
|
337
161
|
}
|
338
|
-
set
|
339
|
-
|
340
|
-
|
341
|
-
}
|
342
|
-
else {
|
343
|
-
this._mcPlacementPriority = null;
|
344
|
-
}
|
345
|
-
}
|
346
|
-
get mcPlacement() {
|
347
|
-
return this._mcPlacement;
|
348
|
-
}
|
349
|
-
set mcPlacement(value) {
|
350
|
-
if (value) {
|
351
|
-
this._mcPlacement = value;
|
352
|
-
this.updateCompValue('mcPlacement', value);
|
353
|
-
}
|
354
|
-
else {
|
355
|
-
this._mcPlacement = 'top';
|
356
|
-
}
|
162
|
+
set customClass(value) {
|
163
|
+
this._customClass = value;
|
164
|
+
this.updateClassMap();
|
357
165
|
}
|
358
|
-
get
|
359
|
-
return this.
|
360
|
-
}
|
361
|
-
set classList(value) {
|
362
|
-
this._classList = value;
|
363
|
-
this.updateCompValue('classList', this._classList);
|
364
|
-
}
|
365
|
-
get mcVisible() {
|
366
|
-
return this._mcVisible;
|
367
|
-
}
|
368
|
-
set mcVisible(externalValue) {
|
369
|
-
const value = coerceBooleanProperty(externalValue);
|
370
|
-
if (this._mcVisible !== value) {
|
371
|
-
this._mcVisible = value;
|
372
|
-
this.updateCompValue('mcVisible', value);
|
373
|
-
if (value) {
|
374
|
-
this.show();
|
375
|
-
}
|
376
|
-
else {
|
377
|
-
this.hide();
|
378
|
-
}
|
379
|
-
}
|
166
|
+
get closeOnScroll() {
|
167
|
+
return this._closeOnScroll;
|
380
168
|
}
|
381
|
-
|
382
|
-
|
169
|
+
set closeOnScroll(value) {
|
170
|
+
this._closeOnScroll = coerceBooleanProperty(value);
|
383
171
|
}
|
384
|
-
|
385
|
-
|
386
|
-
if (this.overlayRef) {
|
387
|
-
this.overlayRef.dispose();
|
388
|
-
}
|
389
|
-
// Create connected position strategy that listens for scroll events to reposition.
|
390
|
-
const strategy = this.overlay.position()
|
391
|
-
.flexibleConnectedTo(this.elementRef)
|
392
|
-
.withTransformOriginOn('.mc-popover')
|
393
|
-
.withFlexibleDimensions(false)
|
394
|
-
.withViewportMargin(VIEWPORT_MARGIN)
|
395
|
-
.withPositions([...EXTENDED_OVERLAY_POSITIONS]);
|
396
|
-
const scrollableAncestors = this.scrollDispatcher.getAncestorScrollContainers(this.elementRef);
|
397
|
-
strategy.withScrollableContainers(scrollableAncestors);
|
398
|
-
strategy.positionChanges
|
399
|
-
.pipe(takeUntil(this.destroyed))
|
400
|
-
.subscribe((change) => {
|
401
|
-
if (this.popover) {
|
402
|
-
this.onPositionChange(change);
|
403
|
-
if (change.scrollableViewProperties.isOverlayClipped && this.popover.mcVisible) {
|
404
|
-
// After position changes occur and the overlay is clipped by
|
405
|
-
// a parent scrollable then close the popover.
|
406
|
-
this.ngZone.run(() => this.hide());
|
407
|
-
}
|
408
|
-
}
|
409
|
-
});
|
410
|
-
this.overlayRef = this.overlay.create({
|
411
|
-
direction: this.direction,
|
412
|
-
positionStrategy: strategy,
|
172
|
+
get overlayConfig() {
|
173
|
+
return {
|
413
174
|
panelClass: 'mc-popover__panel',
|
414
|
-
scrollStrategy: this.scrollStrategy(),
|
415
175
|
hasBackdrop: this.hasBackdrop,
|
416
176
|
backdropClass: this.backdropClass
|
417
|
-
});
|
418
|
-
this.closeSubscription = this.closingActions()
|
419
|
-
// need for close popover on trigger click, because popover fire unexpected events: hide and then show
|
420
|
-
// todo need fix it
|
421
|
-
.pipe(delay(0))
|
422
|
-
.subscribe(() => this.hide());
|
423
|
-
this.updatePosition();
|
424
|
-
this.overlayRef.detachments()
|
425
|
-
.pipe(takeUntil(this.destroyed))
|
426
|
-
.subscribe(() => this.detach());
|
427
|
-
return this.overlayRef;
|
428
|
-
}
|
429
|
-
detach() {
|
430
|
-
if (this.overlayRef && this.overlayRef.hasAttached()) {
|
431
|
-
this.overlayRef.detach();
|
432
|
-
}
|
433
|
-
this.popover = null;
|
434
|
-
}
|
435
|
-
onPositionChange($event) {
|
436
|
-
let updatedPlacement = this.mcPlacement;
|
437
|
-
Object.keys(this.availablePositions).some((key) => {
|
438
|
-
if ($event.connectionPair.originX === this.availablePositions[key].originX &&
|
439
|
-
$event.connectionPair.originY === this.availablePositions[key].originY &&
|
440
|
-
$event.connectionPair.overlayX === this.availablePositions[key].overlayX &&
|
441
|
-
$event.connectionPair.overlayY === this.availablePositions[key].overlayY) {
|
442
|
-
updatedPlacement = key;
|
443
|
-
return true;
|
444
|
-
}
|
445
|
-
return false;
|
446
|
-
});
|
447
|
-
this.updateCompValue('mcPlacement', updatedPlacement);
|
448
|
-
this.mcPositionStrategyPlacementChange.emit(updatedPlacement);
|
449
|
-
if (this.popover) {
|
450
|
-
this.updateCompValue('classList', this.classList);
|
451
|
-
this.popover.markForCheck();
|
452
|
-
}
|
453
|
-
if (!this.defaultPositionsMap[updatedPlacement]) {
|
454
|
-
this.handlePositionUpdate(updatedPlacement);
|
455
|
-
}
|
456
|
-
}
|
457
|
-
handlePositionUpdate(updatedPlacement) {
|
458
|
-
if (!this.overlayRef) {
|
459
|
-
this.overlayRef = this.createOverlay();
|
460
|
-
}
|
461
|
-
const currentContainer = this.overlayRef.overlayElement.style;
|
462
|
-
const elementHeight = this.hostView.element.nativeElement.clientHeight;
|
463
|
-
const elementWidth = this.hostView.element.nativeElement.clientWidth;
|
464
|
-
const verticalOffset = Math.floor(elementHeight / 2); // tslint:disable-line
|
465
|
-
const horizontalOffset = Math.floor(elementWidth / 2 - 6); // tslint:disable-line
|
466
|
-
const offsets = {
|
467
|
-
top: verticalOffset,
|
468
|
-
bottom: verticalOffset,
|
469
|
-
right: horizontalOffset,
|
470
|
-
left: horizontalOffset
|
471
177
|
};
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
((styleProperty === 'left' || styleProperty === 'right') &&
|
476
|
-
elementWidth > ANCHOR_MIN_HEIGHT_WIDTH)) {
|
178
|
+
}
|
179
|
+
updateData() {
|
180
|
+
if (!this.instance) {
|
477
181
|
return;
|
478
182
|
}
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
this.
|
483
|
-
|
484
|
-
offsets[styleProperty] - POPOVER_ARROW_BORDER_DISTANCE}px`;
|
485
|
-
}
|
486
|
-
// tslint:disable-next-line:no-any
|
487
|
-
updateCompValue(key, value) {
|
488
|
-
if (this.isDynamicPopover && value) {
|
489
|
-
if (this.popover) {
|
490
|
-
this.popover[key] = value;
|
491
|
-
}
|
183
|
+
this.instance.header = this.header;
|
184
|
+
this.instance.content = this.content;
|
185
|
+
this.instance.footer = this.footer;
|
186
|
+
if (this.isOpen) {
|
187
|
+
this.updatePosition(true);
|
492
188
|
}
|
493
189
|
}
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
this.elementRef.nativeElement.removeEventListener(event, listener);
|
503
|
-
});
|
504
|
-
this.manualListeners.clear();
|
505
|
-
this.$unsubscribe.next();
|
506
|
-
this.$unsubscribe.complete();
|
507
|
-
this.closeSubscription.unsubscribe();
|
508
|
-
}
|
509
|
-
handleKeydown(e) {
|
510
|
-
// tslint:disable-next-line: deprecation
|
511
|
-
if (this.isOpen && e.keyCode === ESCAPE) {
|
512
|
-
this.hide();
|
190
|
+
/** Updates the position of the current popover. */
|
191
|
+
updatePosition(reapplyPosition = false) {
|
192
|
+
this.overlayRef = this.createOverlay();
|
193
|
+
const position = this.overlayRef.getConfig().positionStrategy
|
194
|
+
.withPositions(this.getPrioritizedPositions())
|
195
|
+
.withPush(true);
|
196
|
+
if (reapplyPosition) {
|
197
|
+
setTimeout(() => position.reapplyLastPosition());
|
513
198
|
}
|
514
199
|
}
|
515
|
-
|
516
|
-
|
200
|
+
getOverlayHandleComponentType() {
|
201
|
+
return McPopoverComponent;
|
517
202
|
}
|
518
|
-
|
519
|
-
if (this.
|
520
|
-
|
521
|
-
.set('click', () => this.show())
|
522
|
-
.forEach((listener, event) => {
|
523
|
-
this.elementRef.nativeElement.addEventListener(event, listener);
|
524
|
-
});
|
525
|
-
}
|
526
|
-
else if (this.mcTrigger === PopoverTriggers.Hover) {
|
527
|
-
this.manualListeners
|
528
|
-
.set('mouseenter', () => this.show())
|
529
|
-
.set('mouseleave', () => this.hide())
|
530
|
-
.forEach((listener, event) => {
|
531
|
-
this.elementRef.nativeElement.addEventListener(event, listener);
|
532
|
-
});
|
533
|
-
}
|
534
|
-
else if (this.mcTrigger === PopoverTriggers.Focus) {
|
535
|
-
this.manualListeners
|
536
|
-
.set('focus', () => this.show())
|
537
|
-
.set('blur', () => this.hide())
|
538
|
-
.forEach((listener, event) => {
|
539
|
-
this.elementRef.nativeElement.addEventListener(event, listener);
|
540
|
-
});
|
203
|
+
updateClassMap(newPlacement = this.placement) {
|
204
|
+
if (!this.instance) {
|
205
|
+
return;
|
541
206
|
}
|
207
|
+
this.instance.updateClassMap(POSITION_TO_CSS_MAP[newPlacement], this.customClass, this.size);
|
208
|
+
this.instance.markForCheck();
|
542
209
|
}
|
543
|
-
|
544
|
-
|
545
|
-
// changes and therefore doesn't cause a value change that needs to be propagated.
|
546
|
-
this.ngZone.runOutsideAngular(() => {
|
547
|
-
window.addEventListener('resize', this.resizeListener);
|
548
|
-
});
|
549
|
-
}
|
550
|
-
deregisterResizeHandler() {
|
551
|
-
window.removeEventListener('resize', this.resizeListener);
|
210
|
+
closingActions() {
|
211
|
+
return merge(this.overlayRef.backdropClick(), this.hasBackdrop ? NEVER : this.overlayRef.outsidePointerEvents(), this.closeOnScroll ? this.scrollDispatcher.scrolled() : NEVER, this.overlayRef.detachments());
|
552
212
|
}
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
213
|
+
}
|
214
|
+
/** @nocollapse */ McPopoverTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverTrigger, deps: [{ token: i2.Overlay }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i2.ScrollDispatcher }, { token: i0.ViewContainerRef }, { token: MC_POPOVER_SCROLL_STRATEGY }, { token: i3.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
215
|
+
/** @nocollapse */ McPopoverTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McPopoverTrigger, selector: "[mcPopover]", inputs: { popoverVisible: ["mcPopoverVisible", "popoverVisible"], popoverPlacement: ["mcPopoverPlacement", "popoverPlacement"], popoverPlacementPriority: ["mcPopoverPlacementPriority", "popoverPlacementPriority"], hasBackdrop: "hasBackdrop", header: ["mcPopoverHeader", "header"], content: ["mcPopoverContent", "content"], footer: ["mcPopoverFooter", "footer"], disabled: ["mcPopoverDisabled", "disabled"], trigger: ["mcTrigger", "trigger"], size: ["mcPopoverSize", "size"], customClass: ["mcPopoverClass", "customClass"], closeOnScroll: "closeOnScroll", backdropClass: "backdropClass" }, outputs: { placementChange: "mcPopoverPlacementChange", visibleChange: "mcPopoverVisibleChange" }, host: { listeners: { "keydown": "handleKeydown($event)", "touchend": "handleTouchend()" }, properties: { "class.mc-popover_open": "isOpen" } }, exportAs: ["mcPopover"], usesInheritance: true, ngImport: i0 });
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverTrigger, decorators: [{
|
217
|
+
type: Directive,
|
218
|
+
args: [{
|
219
|
+
selector: '[mcPopover]',
|
220
|
+
exportAs: 'mcPopover',
|
221
|
+
host: {
|
222
|
+
'[class.mc-popover_open]': 'isOpen',
|
223
|
+
'(keydown)': 'handleKeydown($event)',
|
224
|
+
'(touchend)': 'handleTouchend()'
|
225
|
+
}
|
226
|
+
}]
|
227
|
+
}], ctorParameters: function () { return [{ type: i2.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i2.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
|
228
|
+
type: Inject,
|
229
|
+
args: [MC_POPOVER_SCROLL_STRATEGY]
|
230
|
+
}] }, { type: i3.Directionality, decorators: [{
|
231
|
+
type: Optional
|
232
|
+
}] }]; }, propDecorators: { popoverVisible: [{
|
233
|
+
type: Input,
|
234
|
+
args: ['mcPopoverVisible']
|
235
|
+
}], popoverPlacement: [{
|
236
|
+
type: Input,
|
237
|
+
args: ['mcPopoverPlacement']
|
238
|
+
}], popoverPlacementPriority: [{
|
239
|
+
type: Input,
|
240
|
+
args: ['mcPopoverPlacementPriority']
|
241
|
+
}], hasBackdrop: [{
|
242
|
+
type: Input
|
243
|
+
}], header: [{
|
244
|
+
type: Input,
|
245
|
+
args: ['mcPopoverHeader']
|
246
|
+
}], content: [{
|
247
|
+
type: Input,
|
248
|
+
args: ['mcPopoverContent']
|
249
|
+
}], footer: [{
|
250
|
+
type: Input,
|
251
|
+
args: ['mcPopoverFooter']
|
252
|
+
}], disabled: [{
|
253
|
+
type: Input,
|
254
|
+
args: ['mcPopoverDisabled']
|
255
|
+
}], trigger: [{
|
256
|
+
type: Input,
|
257
|
+
args: ['mcTrigger']
|
258
|
+
}], size: [{
|
259
|
+
type: Input,
|
260
|
+
args: ['mcPopoverSize']
|
261
|
+
}], customClass: [{
|
262
|
+
type: Input,
|
263
|
+
args: ['mcPopoverClass']
|
264
|
+
}], closeOnScroll: [{
|
265
|
+
type: Input
|
266
|
+
}], backdropClass: [{
|
267
|
+
type: Input
|
268
|
+
}], placementChange: [{
|
269
|
+
type: Output,
|
270
|
+
args: ['mcPopoverPlacementChange']
|
271
|
+
}], visibleChange: [{
|
272
|
+
type: Output,
|
273
|
+
args: ['mcPopoverVisibleChange']
|
274
|
+
}] } });
|
275
|
+
|
276
|
+
const MC_POPOVER_CONFIRM_TEXT = new InjectionToken('');
|
277
|
+
const MC_POPOVER_CONFIRM_BUTTON_TEXT = new InjectionToken('');
|
278
|
+
class McPopoverConfirmComponent extends McPopoverComponent {
|
279
|
+
constructor(changeDetectorRef) {
|
280
|
+
super(changeDetectorRef);
|
281
|
+
this.themePalette = ThemePalette;
|
282
|
+
this.onConfirm = new Subject();
|
561
283
|
}
|
562
|
-
|
563
|
-
|
284
|
+
}
|
285
|
+
/** @nocollapse */ McPopoverConfirmComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverConfirmComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
286
|
+
/** @nocollapse */ McPopoverConfirmComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: McPopoverConfirmComponent, selector: "mc-popover-confirm-component", usesInheritance: true, ngImport: i0, template: "<div class=\"mc-popover-confirm mc-popover\"\n [ngClass]=\"classMap\"\n [@state]=\"visibility\"\n (@state.start)=\"animationStart()\"\n (@state.done)=\"animationDone($event)\">\n <div class=\"mc-popover__content\">\n <div>{{ confirmText }}</div>\n <button mc-button [color]=\"themePalette.Primary\" (click)=\"onConfirm.next()\">{{confirmButtonText}}</button> \n </div>\n\n <div class=\"mc-popover__arrow\"></div>\n</div>\n", styles: ["@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-backdrop{top:0;bottom:0;left:0;right:0;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0;position:absolute;pointer-events:auto;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-pane{box-sizing:border-box;position:absolute;pointer-events:auto;margin:0;padding:0;z-index:1000;max-width:100%;max-height:100%}.cdk-overlay-connected-position-bounding-box{box-sizing:border-box;position:absolute;z-index:1000;display:flex;flex-direction:column;margin:0;padding:0;min-width:1px;min-height:1px}.mc-popover{position:relative;border-radius:3px;border-radius:var(--mc-popover-size-border-radius, 3px);border-width:1px;border-style:solid;box-sizing:border-box;z-index:1030;list-style:none;white-space:pre-line}.mc-popover.mc-popover_small{max-width:200px;max-width:var(--mc-popover-size-small-width, 200px)}.mc-popover.mc-popover_normal{max-width:400px;max-width:var(--mc-popover-size-normal-width, 400px)}.mc-popover.mc-popover_large{max-width:640px;max-width:var(--mc-popover-size-large-width, 640px)}.mc-popover.mc-popover_placement-top,.mc-popover.mc-popover_placement-top-left,.mc-popover.mc-popover_placement-top-right{margin-bottom:calc(9px);margin-bottom:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-right,.mc-popover.mc-popover_placement-right-top,.mc-popover.mc-popover_placement-right-bottom{margin-left:calc(9px);margin-left:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-bottom,.mc-popover.mc-popover_placement-bottom-left,.mc-popover.mc-popover_placement-bottom-right{margin-top:calc(9px);margin-top:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-left,.mc-popover.mc-popover_placement-left-top,.mc-popover.mc-popover_placement-left-bottom{margin-right:calc(9px);margin-right:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover__container{display:flex;flex-direction:column;max-height:480px;max-height:var(--mc-popover-size-max-height, 480px);border-radius:3px;border-radius:var(--mc-popover-size-border-radius, 3px);overflow:hidden}.mc-popover__header{height:10px 16px;height:var(--mc-popover-header-size-height, 10px 16px);padding:10px 16px;padding:var(--mc-popover-header-size-padding, 10px 16px);border-bottom-width:1px;border-bottom-style:solid}.mc-popover__content{overflow:hidden;padding:16px;padding:var(--mc-popover-size-padding, 16px)}.mc-popover__footer{box-sizing:border-box;margin-top:8px;margin-top:var(--mc-popover-footer-size-margin-top, 8px);height:56px;height:var(--mc-popover-footer-size-height, 56px);padding:12px 16px;padding:var(--mc-popover-footer-size-padding, 12px 16px);border-top-width:1px;border-top-style:solid}.mc-popover__arrow{position:absolute;z-index:-1;width:12px;width:var(--mc-popover-size-arrow-size, 12px);height:12px;height:var(--mc-popover-size-arrow-size, 12px);border:solid 1px;transform:rotate(45deg)}.mc-popover_placement-top .mc-popover__arrow{bottom:calc(11px / -2);bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:50%;margin-left:calc(11px / -2);margin-left:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-top-left .mc-popover__arrow{bottom:calc(11px / -2);bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:calc(18px - 9px);left:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-top-right .mc-popover__arrow{bottom:calc(11px / -2);bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);right:calc(18px - 9px);right:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-right .mc-popover__arrow{left:calc(11px / -2);left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:50%;margin-top:calc(11px / -2);margin-top:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-right-top .mc-popover__arrow{left:calc(11px / -2);left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:calc(18px - 9px);top:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-right-bottom .mc-popover__arrow{left:calc(11px / -2);left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);bottom:calc(18px - 9px);bottom:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-left .mc-popover__arrow{right:calc(11px / -2);right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:50%;margin-top:calc(11px / -2);margin-top:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-left-top .mc-popover__arrow{right:calc(11px / -2);right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:calc(18px - 9px);top:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-left-bottom .mc-popover__arrow{right:calc(11px / -2);right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);bottom:calc(18px - 9px);bottom:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-bottom .mc-popover__arrow{top:calc(11px / -2);top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:50%;margin-left:calc(11px / -2);margin-left:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-bottom-left .mc-popover__arrow{top:calc(11px / -2);top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:calc(18px - 9px);left:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-bottom-right .mc-popover__arrow{top:calc(11px / -2);top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);right:calc(18px - 9px);right:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover-confirm .mc-popover__content{padding:24px 16px 16px}.mc-popover-confirm .mc-popover__content button{margin-top:16px;display:block;margin-left:auto}\n"], components: [{ type: i1$1.McButton, selector: "button[mc-button]", inputs: ["disabled", "color"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$1.McButtonCssStyler, selector: "button[mc-button], a[mc-button]" }], animations: [mcPopoverAnimations.popoverState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverConfirmComponent, decorators: [{
|
288
|
+
type: Component,
|
289
|
+
args: [{
|
290
|
+
selector: 'mc-popover-confirm-component',
|
291
|
+
templateUrl: './popover-confirm.component.html',
|
292
|
+
preserveWhitespaces: false,
|
293
|
+
styleUrls: ['./popover.scss'],
|
294
|
+
encapsulation: ViewEncapsulation.None,
|
295
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
296
|
+
animations: [mcPopoverAnimations.popoverState]
|
297
|
+
}]
|
298
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
299
|
+
class McPopoverConfirmTrigger extends McPopoverTrigger {
|
300
|
+
constructor(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction, confirmText, confirmButtonText) {
|
301
|
+
super(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction);
|
302
|
+
this.confirm = new EventEmitter();
|
303
|
+
this._confirmButtonText = 'Да';
|
304
|
+
this.confirmText = confirmText || 'Вы уверены, что хотите продолжить?';
|
305
|
+
this.confirmButtonText = confirmButtonText || 'Да';
|
306
|
+
}
|
307
|
+
get confirmText() {
|
308
|
+
return this._confirmText;
|
309
|
+
}
|
310
|
+
set confirmText(value) {
|
311
|
+
this._confirmText = value;
|
312
|
+
this.updateData();
|
313
|
+
}
|
314
|
+
get confirmButtonText() {
|
315
|
+
return this._confirmButtonText;
|
316
|
+
}
|
317
|
+
set confirmButtonText(value) {
|
318
|
+
this._confirmButtonText = value;
|
319
|
+
this.updateData();
|
320
|
+
}
|
321
|
+
updateData() {
|
322
|
+
if (!this.instance) {
|
564
323
|
return;
|
565
324
|
}
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
this.popover = overlayRef.attach(this.portal).instance;
|
571
|
-
this.popover.afterHidden()
|
572
|
-
.pipe(takeUntil(this.destroyed))
|
573
|
-
.subscribe(() => this.detach());
|
574
|
-
this.isDynamicPopover = true;
|
575
|
-
const properties = [
|
576
|
-
'mcPlacement',
|
577
|
-
'mcPopoverSize',
|
578
|
-
'mcTrigger',
|
579
|
-
'mcMouseEnterDelay',
|
580
|
-
'mcMouseLeaveDelay',
|
581
|
-
'classList',
|
582
|
-
'mcVisible',
|
583
|
-
'mcHeader',
|
584
|
-
'mcContent',
|
585
|
-
'mcFooter'
|
586
|
-
];
|
587
|
-
properties.forEach((property) => this.updateCompValue(property, this[property]));
|
588
|
-
this.popover.mcVisibleChange
|
589
|
-
.pipe(takeUntil(this.$unsubscribe), distinctUntilChanged())
|
590
|
-
.subscribe((data) => {
|
591
|
-
this.mcVisible = data;
|
592
|
-
this.mcVisibleChange.emit(data);
|
593
|
-
this.isPopoverOpen = data;
|
594
|
-
});
|
595
|
-
}
|
596
|
-
this.popover.show();
|
325
|
+
super.updateData();
|
326
|
+
this.setupButtonEvents();
|
327
|
+
this.instance.confirmButtonText = this.confirmButtonText;
|
328
|
+
this.instance.confirmText = this.confirmText;
|
597
329
|
}
|
598
|
-
|
599
|
-
|
600
|
-
this.
|
601
|
-
|
602
|
-
|
603
|
-
/** Updates the position of the current popover. */
|
604
|
-
updatePosition(reapplyPosition = false) {
|
605
|
-
if (!this.overlayRef) {
|
606
|
-
this.overlayRef = this.createOverlay();
|
607
|
-
}
|
608
|
-
const position = this.overlayRef.getConfig().positionStrategy;
|
609
|
-
position.withPositions(this.getPrioritizedPositions()).withPush(true);
|
610
|
-
if (reapplyPosition) {
|
611
|
-
setTimeout(() => position.reapplyLastPosition());
|
612
|
-
}
|
613
|
-
}
|
614
|
-
closingActions() {
|
615
|
-
const backdrop = this.overlayRef.backdropClick();
|
616
|
-
const outsidePointerEvents = this.hasBackdrop ? NEVER : this.overlayRef.outsidePointerEvents();
|
617
|
-
const detachments = this.overlayRef.detachments();
|
618
|
-
return merge(backdrop, outsidePointerEvents, detachments);
|
619
|
-
}
|
620
|
-
getPriorityPlacementStrategy(value) {
|
621
|
-
const result = [];
|
622
|
-
const possiblePositions = Object.keys(this.availablePositions);
|
623
|
-
if (Array.isArray(value)) {
|
624
|
-
value.forEach((position) => {
|
625
|
-
if (possiblePositions.includes(position)) {
|
626
|
-
result.push(this.availablePositions[position]);
|
627
|
-
}
|
628
|
-
});
|
629
|
-
}
|
630
|
-
else if (possiblePositions.includes(value)) {
|
631
|
-
result.push(this.availablePositions[value]);
|
632
|
-
}
|
633
|
-
return result;
|
330
|
+
setupButtonEvents() {
|
331
|
+
this.instance.onConfirm.pipe(takeUntil(this.destroyed)).subscribe(() => {
|
332
|
+
this.confirm.emit();
|
333
|
+
this.hide();
|
334
|
+
});
|
634
335
|
}
|
635
|
-
|
636
|
-
|
637
|
-
return this.getPriorityPlacementStrategy(this.mcPlacementPriority);
|
638
|
-
}
|
639
|
-
return POSITION_PRIORITY_STRATEGY[this.mcPlacement];
|
336
|
+
getOverlayHandleComponentType() {
|
337
|
+
return McPopoverConfirmComponent;
|
640
338
|
}
|
641
339
|
}
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
mcVisible: [{ type: Input, args: ['mcPopoverVisible',] }]
|
680
|
-
};
|
340
|
+
/** @nocollapse */ McPopoverConfirmTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverConfirmTrigger, deps: [{ token: i2.Overlay }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i2.ScrollDispatcher }, { token: i0.ViewContainerRef }, { token: MC_POPOVER_SCROLL_STRATEGY }, { token: i3.Directionality, optional: true }, { token: MC_POPOVER_CONFIRM_TEXT, optional: true }, { token: MC_POPOVER_CONFIRM_BUTTON_TEXT, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
341
|
+
/** @nocollapse */ McPopoverConfirmTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McPopoverConfirmTrigger, selector: "[mcPopoverConfirm]", inputs: { confirmText: ["mcPopoverConfirmText", "confirmText"], confirmButtonText: ["mcPopoverConfirmButtonText", "confirmButtonText"] }, outputs: { confirm: "confirm" }, host: { listeners: { "keydown": "handleKeydown($event)", "touchend": "handleTouchend()" }, properties: { "class.mc-popover_open": "isOpen" } }, exportAs: ["mcPopoverConfirm"], usesInheritance: true, ngImport: i0 });
|
342
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverConfirmTrigger, decorators: [{
|
343
|
+
type: Directive,
|
344
|
+
args: [{
|
345
|
+
selector: '[mcPopoverConfirm]',
|
346
|
+
exportAs: 'mcPopoverConfirm',
|
347
|
+
host: {
|
348
|
+
'[class.mc-popover_open]': 'isOpen',
|
349
|
+
'(keydown)': 'handleKeydown($event)',
|
350
|
+
'(touchend)': 'handleTouchend()'
|
351
|
+
}
|
352
|
+
}]
|
353
|
+
}], ctorParameters: function () { return [{ type: i2.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i2.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
|
354
|
+
type: Inject,
|
355
|
+
args: [MC_POPOVER_SCROLL_STRATEGY]
|
356
|
+
}] }, { type: i3.Directionality, decorators: [{
|
357
|
+
type: Optional
|
358
|
+
}] }, { type: undefined, decorators: [{
|
359
|
+
type: Optional
|
360
|
+
}, {
|
361
|
+
type: Inject,
|
362
|
+
args: [MC_POPOVER_CONFIRM_TEXT]
|
363
|
+
}] }, { type: undefined, decorators: [{
|
364
|
+
type: Optional
|
365
|
+
}, {
|
366
|
+
type: Inject,
|
367
|
+
args: [MC_POPOVER_CONFIRM_BUTTON_TEXT]
|
368
|
+
}] }]; }, propDecorators: { confirm: [{
|
369
|
+
type: Output
|
370
|
+
}], confirmText: [{
|
371
|
+
type: Input,
|
372
|
+
args: ['mcPopoverConfirmText']
|
373
|
+
}], confirmButtonText: [{
|
374
|
+
type: Input,
|
375
|
+
args: ['mcPopoverConfirmButtonText']
|
376
|
+
}] } });
|
681
377
|
|
682
378
|
class McPopoverModule {
|
683
379
|
}
|
684
|
-
McPopoverModule
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
]
|
380
|
+
/** @nocollapse */ McPopoverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
381
|
+
/** @nocollapse */ McPopoverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverModule, declarations: [McPopoverComponent, McPopoverTrigger, McPopoverConfirmComponent, McPopoverConfirmTrigger], imports: [CommonModule, OverlayModule, McButtonModule], exports: [McPopoverComponent, McPopoverTrigger, McPopoverConfirmComponent, McPopoverConfirmTrigger] });
|
382
|
+
/** @nocollapse */ McPopoverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverModule, providers: [MC_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [[CommonModule, OverlayModule, McButtonModule]] });
|
383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McPopoverModule, decorators: [{
|
384
|
+
type: NgModule,
|
385
|
+
args: [{
|
386
|
+
declarations: [McPopoverComponent, McPopoverTrigger, McPopoverConfirmComponent, McPopoverConfirmTrigger],
|
387
|
+
exports: [McPopoverComponent, McPopoverTrigger, McPopoverConfirmComponent, McPopoverConfirmTrigger],
|
388
|
+
imports: [CommonModule, OverlayModule, McButtonModule],
|
389
|
+
providers: [MC_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER],
|
390
|
+
entryComponents: [McPopoverComponent, McPopoverConfirmComponent]
|
391
|
+
}]
|
392
|
+
}] });
|
693
393
|
|
694
394
|
/**
|
695
395
|
* Generated bundle index. Do not edit.
|
696
396
|
*/
|
697
397
|
|
698
|
-
export { MC_POPOVER_SCROLL_STRATEGY, MC_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER,
|
398
|
+
export { MC_POPOVER_CONFIRM_BUTTON_TEXT, MC_POPOVER_CONFIRM_TEXT, MC_POPOVER_SCROLL_STRATEGY, MC_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER, McPopoverComponent, McPopoverConfirmComponent, McPopoverConfirmTrigger, McPopoverModule, McPopoverTrigger, getMcPopoverInvalidPositionError, mcPopoverAnimations, mcPopoverScrollStrategyFactory };
|
699
399
|
//# sourceMappingURL=ptsecurity-mosaic-popover.js.map
|