@agorapulse/ui-components 14.0.5 → 14.1.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/{src/lib/add-comment → add-comment}/add-comment.component.d.ts +1 -1
- package/add-comment/index.d.ts +5 -0
- package/add-comment/public_api.d.ts +1 -0
- package/agorapulse-ui-components-14.1.0.tgz +0 -0
- package/{src/lib/avatar → avatar}/avatar.component.d.ts +1 -1
- package/avatar/index.d.ts +5 -0
- package/avatar/public_api.d.ts +1 -0
- package/{src/lib/confirm-modal → confirm-modal}/confirm-modal-texts.model.d.ts +0 -0
- package/{src/lib/confirm-modal → confirm-modal}/confirm-modal.component.d.ts +2 -2
- package/confirm-modal/index.d.ts +5 -0
- package/confirm-modal/public_api.d.ts +2 -0
- package/{src/lib/datepicker → datepicker}/datepicker.component.d.ts +2 -2
- package/datepicker/index.d.ts +5 -0
- package/datepicker/public_api.d.ts +1 -0
- package/{src/lib/directives → directives}/autosize-textarea.directive.d.ts +1 -1
- package/{src/lib/directives → directives}/default-image.directive.d.ts +1 -1
- package/{src/lib/directives → directives}/ellipsis.directive.d.ts +1 -1
- package/{src/lib/directives → directives}/equal-validator.directive.d.ts +1 -1
- package/{src/lib/directives → directives}/frozen-gif.directive.d.ts +1 -1
- package/directives/index.d.ts +5 -0
- package/{src/lib/directives → directives}/multi-style-text.directive.d.ts +1 -1
- package/directives/public_api.d.ts +7 -0
- package/{src/lib/directives → directives}/truncate-tooltip.directive.d.ts +4 -4
- package/directives/truncate-tooltip.model.d.ts +5 -0
- package/{src/lib/dots-stepper → dots-stepper}/dots-stepper.component.d.ts +1 -1
- package/dots-stepper/index.d.ts +5 -0
- package/dots-stepper/public_api.d.ts +1 -0
- package/esm2020/add-comment/add-comment.component.mjs +70 -0
- package/esm2020/add-comment/agorapulse-ui-components-add-comment.mjs +5 -0
- package/esm2020/add-comment/public_api.mjs +2 -0
- package/esm2020/avatar/agorapulse-ui-components-avatar.mjs +5 -0
- package/esm2020/avatar/avatar.component.mjs +138 -0
- package/esm2020/avatar/public_api.mjs +2 -0
- package/esm2020/confirm-modal/agorapulse-ui-components-confirm-modal.mjs +5 -0
- package/esm2020/confirm-modal/confirm-modal-texts.model.mjs +2 -0
- package/esm2020/confirm-modal/confirm-modal.component.mjs +61 -0
- package/esm2020/confirm-modal/public_api.mjs +3 -0
- package/esm2020/datepicker/agorapulse-ui-components-datepicker.mjs +5 -0
- package/esm2020/datepicker/datepicker.component.mjs +225 -0
- package/esm2020/datepicker/public_api.mjs +2 -0
- package/esm2020/directives/agorapulse-ui-components-directives.mjs +5 -0
- package/esm2020/directives/autosize-textarea.directive.mjs +44 -0
- package/esm2020/directives/default-image.directive.mjs +32 -0
- package/esm2020/directives/ellipsis.directive.mjs +86 -0
- package/esm2020/directives/equal-validator.directive.mjs +66 -0
- package/esm2020/directives/frozen-gif.directive.mjs +116 -0
- package/esm2020/directives/multi-style-text.directive.mjs +136 -0
- package/esm2020/directives/public_api.mjs +8 -0
- package/esm2020/directives/truncate-tooltip.directive.mjs +41 -0
- package/esm2020/directives/truncate-tooltip.model.mjs +2 -0
- package/esm2020/dots-stepper/agorapulse-ui-components-dots-stepper.mjs +5 -0
- package/esm2020/dots-stepper/dots-stepper.component.mjs +43 -0
- package/esm2020/dots-stepper/public_api.mjs +2 -0
- package/esm2020/index.mjs +27 -33
- package/esm2020/infobox/agorapulse-ui-components-infobox.mjs +5 -0
- package/esm2020/infobox/infobox.component.mjs +30 -0
- package/esm2020/infobox/public_api.mjs +2 -0
- package/esm2020/labels/agorapulse-ui-components-labels.mjs +5 -0
- package/esm2020/labels/label-list.component.mjs +101 -0
- package/esm2020/labels/label.component.mjs +56 -0
- package/esm2020/labels/public_api.mjs +3 -0
- package/esm2020/labels-selector/agorapulse-ui-components-labels-selector.mjs +5 -0
- package/esm2020/labels-selector/labels-selector.component.mjs +95 -0
- package/esm2020/labels-selector/public_api.mjs +2 -0
- package/esm2020/media-display-overlay/agorapulse-ui-components-media-display-overlay.mjs +5 -0
- package/esm2020/media-display-overlay/media-display-overlay-dialog.component.mjs +88 -0
- package/esm2020/media-display-overlay/public_api.mjs +2 -0
- package/esm2020/modal/agorapulse-ui-components-modal.mjs +5 -0
- package/esm2020/modal/modal.component.mjs +99 -0
- package/esm2020/modal/public_api.mjs +2 -0
- package/esm2020/notification/agorapulse-ui-components-notification.mjs +5 -0
- package/esm2020/notification/notification.component.mjs +17 -0
- package/esm2020/notification/public_api.mjs +2 -0
- package/esm2020/paginator/agorapulse-ui-components-paginator.mjs +5 -0
- package/esm2020/paginator/paginator-button/paginator-button.component.mjs +24 -0
- package/esm2020/paginator/paginator.component.mjs +56 -0
- package/esm2020/paginator/public_api.mjs +3 -0
- package/esm2020/password-input/agorapulse-ui-components-password-input.mjs +5 -0
- package/esm2020/password-input/password-input.component.mjs +70 -0
- package/esm2020/password-input/public_api.mjs +2 -0
- package/esm2020/popmenu/agorapulse-ui-components-popmenu.mjs +5 -0
- package/esm2020/popmenu/options.mjs +17 -0
- package/esm2020/popmenu/popmenu-options.interface.mjs +2 -0
- package/esm2020/popmenu/popmenu-options.service.mjs +7 -0
- package/esm2020/popmenu/popmenu.component.mjs +368 -0
- package/esm2020/popmenu/popmenu.directive.mjs +241 -0
- package/esm2020/popmenu/popmenu.module.mjs +35 -0
- package/esm2020/{src/lib/popmenu/index.mjs → popmenu/public_api.mjs} +1 -1
- package/esm2020/slide-toggle/agorapulse-ui-components-slide-toggle.mjs +5 -0
- package/esm2020/slide-toggle/public_api.mjs +2 -0
- package/esm2020/slide-toggle/slide-toggle.component.mjs +65 -0
- package/esm2020/snackbar/agorapulse-ui-components-snackbar.mjs +5 -0
- package/esm2020/snackbar/public_api.mjs +2 -0
- package/esm2020/snackbar/snackbar.component.mjs +22 -0
- package/esm2020/snackbars-thread/agorapulse-ui-components-snackbars-thread.mjs +5 -0
- package/esm2020/snackbars-thread/component/snackbars-thread.component.mjs +71 -0
- package/esm2020/snackbars-thread/model/snackbars-thread.model.mjs +41 -0
- package/esm2020/snackbars-thread/public_api.mjs +4 -0
- package/esm2020/snackbars-thread/service/snackbars-thread.service.mjs +41 -0
- package/esm2020/snackbars-thread/utils/const/snackbars-thread.const.mjs +13 -0
- package/esm2020/src/lib/agorapulse-ui-components.module.mjs +60 -87
- package/esm2020/stepper/agorapulse-ui-components-stepper.mjs +5 -0
- package/esm2020/stepper/public_api.mjs +3 -0
- package/esm2020/stepper/step.model.mjs +2 -0
- package/esm2020/stepper/stepper.component.mjs +37 -0
- package/esm2020/text-measurement/agorapulse-ui-components-text-measurement.mjs +5 -0
- package/esm2020/text-measurement/public_api.mjs +2 -0
- package/esm2020/text-measurement/text-measurement.service.mjs +28 -0
- package/esm2020/tooltip-neo/agorapulse-ui-components-tooltip-neo.mjs +5 -0
- package/esm2020/tooltip-neo/public_api.mjs +4 -0
- package/esm2020/tooltip-neo/tooltip-neo.component.mjs +44 -0
- package/esm2020/tooltip-neo/tooltip-neo.const.mjs +67 -0
- package/esm2020/tooltip-neo/tooltip-neo.directive.mjs +156 -0
- package/esm2020/tooltip-neo/tooltip-neo.model.mjs +2 -0
- package/esm2020/{src/lib/tooltip-neo → tooltip-neo}/tooltip-neo.service.mjs +1 -1
- package/fesm2015/agorapulse-ui-components-add-comment.mjs +77 -0
- package/fesm2015/agorapulse-ui-components-add-comment.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-avatar.mjs +146 -0
- package/fesm2015/agorapulse-ui-components-avatar.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-confirm-modal.mjs +68 -0
- package/fesm2015/agorapulse-ui-components-confirm-modal.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-datepicker.mjs +235 -0
- package/fesm2015/agorapulse-ui-components-datepicker.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-directives.mjs +514 -0
- package/fesm2015/agorapulse-ui-components-directives.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-dots-stepper.mjs +50 -0
- package/fesm2015/agorapulse-ui-components-dots-stepper.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-infobox.mjs +37 -0
- package/fesm2015/agorapulse-ui-components-infobox.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-labels-selector.mjs +103 -0
- package/fesm2015/agorapulse-ui-components-labels-selector.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-labels.mjs +160 -0
- package/fesm2015/agorapulse-ui-components-labels.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-media-display-overlay.mjs +97 -0
- package/fesm2015/agorapulse-ui-components-media-display-overlay.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-modal.mjs +106 -0
- package/fesm2015/agorapulse-ui-components-modal.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-notification.mjs +24 -0
- package/fesm2015/agorapulse-ui-components-notification.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-paginator.mjs +82 -0
- package/fesm2015/agorapulse-ui-components-paginator.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-password-input.mjs +77 -0
- package/fesm2015/agorapulse-ui-components-password-input.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-popmenu.mjs +666 -0
- package/fesm2015/agorapulse-ui-components-popmenu.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-slide-toggle.mjs +72 -0
- package/fesm2015/agorapulse-ui-components-slide-toggle.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-snackbar.mjs +31 -0
- package/fesm2015/agorapulse-ui-components-snackbar.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-snackbars-thread.mjs +169 -0
- package/fesm2015/agorapulse-ui-components-snackbars-thread.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-stepper.mjs +45 -0
- package/fesm2015/agorapulse-ui-components-stepper.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-text-measurement.mjs +35 -0
- package/fesm2015/agorapulse-ui-components-text-measurement.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-tooltip-neo.mjs +283 -0
- package/fesm2015/agorapulse-ui-components-tooltip-neo.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components.mjs +82 -2824
- package/fesm2015/agorapulse-ui-components.mjs.map +1 -1
- package/fesm2020/agorapulse-ui-components-add-comment.mjs +77 -0
- package/fesm2020/agorapulse-ui-components-add-comment.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-avatar.mjs +145 -0
- package/fesm2020/agorapulse-ui-components-avatar.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-confirm-modal.mjs +68 -0
- package/fesm2020/agorapulse-ui-components-confirm-modal.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-datepicker.mjs +232 -0
- package/fesm2020/agorapulse-ui-components-datepicker.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-directives.mjs +515 -0
- package/fesm2020/agorapulse-ui-components-directives.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-dots-stepper.mjs +50 -0
- package/fesm2020/agorapulse-ui-components-dots-stepper.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-infobox.mjs +37 -0
- package/fesm2020/agorapulse-ui-components-infobox.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-labels-selector.mjs +102 -0
- package/fesm2020/agorapulse-ui-components-labels-selector.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-labels.mjs +160 -0
- package/fesm2020/agorapulse-ui-components-labels.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-media-display-overlay.mjs +95 -0
- package/fesm2020/agorapulse-ui-components-media-display-overlay.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-modal.mjs +106 -0
- package/fesm2020/agorapulse-ui-components-modal.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-notification.mjs +24 -0
- package/fesm2020/agorapulse-ui-components-notification.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-paginator.mjs +82 -0
- package/fesm2020/agorapulse-ui-components-paginator.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-password-input.mjs +77 -0
- package/fesm2020/agorapulse-ui-components-password-input.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-popmenu.mjs +664 -0
- package/fesm2020/agorapulse-ui-components-popmenu.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-slide-toggle.mjs +72 -0
- package/fesm2020/agorapulse-ui-components-slide-toggle.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-snackbar.mjs +29 -0
- package/fesm2020/agorapulse-ui-components-snackbar.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-snackbars-thread.mjs +169 -0
- package/fesm2020/agorapulse-ui-components-snackbars-thread.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-stepper.mjs +44 -0
- package/fesm2020/agorapulse-ui-components-stepper.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-text-measurement.mjs +35 -0
- package/fesm2020/agorapulse-ui-components-text-measurement.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-tooltip-neo.mjs +282 -0
- package/fesm2020/agorapulse-ui-components-tooltip-neo.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components.mjs +79 -2807
- package/fesm2020/agorapulse-ui-components.mjs.map +1 -1
- package/index.d.ts +28 -34
- package/infobox/index.d.ts +5 -0
- package/{src/lib/infobox → infobox}/infobox.component.d.ts +1 -1
- package/infobox/public_api.d.ts +1 -0
- package/labels/index.d.ts +5 -0
- package/{src/lib/labels → labels}/label-list.component.d.ts +2 -2
- package/{src/lib/labels → labels}/label.component.d.ts +2 -2
- package/labels/public_api.d.ts +2 -0
- package/labels-selector/index.d.ts +5 -0
- package/{src/lib/labels-selector → labels-selector}/labels-selector.component.d.ts +2 -2
- package/labels-selector/public_api.d.ts +1 -0
- package/media-display-overlay/index.d.ts +5 -0
- package/{src/lib/media-display-overlay → media-display-overlay}/media-display-overlay-dialog.component.d.ts +1 -1
- package/media-display-overlay/public_api.d.ts +1 -0
- package/modal/index.d.ts +5 -0
- package/{src/lib/modal → modal}/modal.component.d.ts +3 -4
- package/modal/public_api.d.ts +1 -0
- package/notification/index.d.ts +5 -0
- package/{src/lib/notification → notification}/notification.component.d.ts +1 -1
- package/notification/public_api.d.ts +1 -0
- package/package.json +169 -1
- package/paginator/index.d.ts +5 -0
- package/{src/lib/paginator → paginator}/paginator-button/paginator-button.component.d.ts +1 -1
- package/{src/lib/paginator → paginator}/paginator.component.d.ts +1 -1
- package/paginator/public_api.d.ts +2 -0
- package/password-input/index.d.ts +5 -0
- package/{src/lib/password-input → password-input}/password-input.component.d.ts +1 -1
- package/password-input/public_api.d.ts +1 -0
- package/popmenu/index.d.ts +5 -0
- package/{src/lib/popmenu → popmenu}/options.d.ts +0 -0
- package/{src/lib/popmenu → popmenu}/popmenu-options.interface.d.ts +0 -0
- package/{src/lib/popmenu → popmenu}/popmenu-options.service.d.ts +0 -0
- package/{src/lib/popmenu → popmenu}/popmenu.component.d.ts +1 -1
- package/{src/lib/popmenu → popmenu}/popmenu.directive.d.ts +1 -1
- package/{src/lib/popmenu → popmenu}/popmenu.module.d.ts +1 -4
- package/{src/lib/popmenu/index.d.ts → popmenu/public_api.d.ts} +0 -0
- package/slide-toggle/index.d.ts +5 -0
- package/slide-toggle/public_api.d.ts +1 -0
- package/{src/lib/slide-toggle → slide-toggle}/slide-toggle.component.d.ts +1 -1
- package/snackbar/index.d.ts +5 -0
- package/snackbar/public_api.d.ts +1 -0
- package/{src/lib/snackbar → snackbar}/snackbar.component.d.ts +1 -1
- package/{src/lib/snackbars-thread → snackbars-thread}/component/snackbars-thread.component.d.ts +1 -1
- package/snackbars-thread/index.d.ts +5 -0
- package/{src/lib/snackbars-thread → snackbars-thread}/model/snackbars-thread.model.d.ts +1 -1
- package/snackbars-thread/public_api.d.ts +3 -0
- package/{src/lib/snackbars-thread → snackbars-thread}/service/snackbars-thread.service.d.ts +0 -0
- package/{src/lib/snackbars-thread → snackbars-thread}/utils/const/snackbars-thread.const.d.ts +0 -0
- package/src/lib/agorapulse-ui-components.module.d.ts +24 -38
- package/stepper/index.d.ts +5 -0
- package/stepper/public_api.d.ts +2 -0
- package/{src/lib/stepper → stepper}/step.model.d.ts +0 -0
- package/{src/lib/stepper → stepper}/stepper.component.d.ts +1 -1
- package/text-measurement/index.d.ts +5 -0
- package/text-measurement/public_api.d.ts +1 -0
- package/{src/lib/text-measurement → text-measurement}/text-measurement.service.d.ts +0 -0
- package/tooltip-neo/index.d.ts +5 -0
- package/tooltip-neo/public_api.d.ts +3 -0
- package/{src/lib/tooltip-neo → tooltip-neo}/tooltip-neo.component.d.ts +1 -1
- package/{src/lib/tooltip-neo → tooltip-neo}/tooltip-neo.const.d.ts +0 -0
- package/{src/lib/tooltip-neo → tooltip-neo}/tooltip-neo.directive.d.ts +2 -2
- package/{src/lib/tooltip-neo → tooltip-neo}/tooltip-neo.model.d.ts +0 -0
- package/{src/lib/tooltip-neo → tooltip-neo}/tooltip-neo.service.d.ts +0 -0
- package/agorapulse-ui-components-14.0.5.tgz +0 -0
- package/esm2020/src/lib/add-comment/add-comment.component.mjs +0 -64
- package/esm2020/src/lib/avatar/avatar.component.mjs +0 -137
- package/esm2020/src/lib/confirm-modal/confirm-modal-texts.model.mjs +0 -2
- package/esm2020/src/lib/confirm-modal/confirm-modal.component.mjs +0 -61
- package/esm2020/src/lib/datepicker/datepicker.component.mjs +0 -219
- package/esm2020/src/lib/directives/autosize-textarea.directive.mjs +0 -43
- package/esm2020/src/lib/directives/default-image.directive.mjs +0 -31
- package/esm2020/src/lib/directives/ellipsis.directive.mjs +0 -85
- package/esm2020/src/lib/directives/equal-validator.directive.mjs +0 -65
- package/esm2020/src/lib/directives/frozen-gif.directive.mjs +0 -115
- package/esm2020/src/lib/directives/multi-style-text.directive.mjs +0 -135
- package/esm2020/src/lib/directives/truncate-tooltip.directive.mjs +0 -33
- package/esm2020/src/lib/dots-stepper/dots-stepper.component.mjs +0 -43
- package/esm2020/src/lib/infobox/infobox.component.mjs +0 -24
- package/esm2020/src/lib/labels/label-list.component.mjs +0 -98
- package/esm2020/src/lib/labels/label.component.mjs +0 -53
- package/esm2020/src/lib/labels-selector/labels-selector.component.mjs +0 -92
- package/esm2020/src/lib/media-display-overlay/media-display-overlay-dialog.component.mjs +0 -87
- package/esm2020/src/lib/modal/modal.component.mjs +0 -96
- package/esm2020/src/lib/notification/notification.component.mjs +0 -17
- package/esm2020/src/lib/paginator/paginator-button/paginator-button.component.mjs +0 -23
- package/esm2020/src/lib/paginator/paginator.component.mjs +0 -54
- package/esm2020/src/lib/password-input/password-input.component.mjs +0 -69
- package/esm2020/src/lib/popmenu/options.mjs +0 -17
- package/esm2020/src/lib/popmenu/popmenu-options.interface.mjs +0 -2
- package/esm2020/src/lib/popmenu/popmenu-options.service.mjs +0 -7
- package/esm2020/src/lib/popmenu/popmenu.component.mjs +0 -357
- package/esm2020/src/lib/popmenu/popmenu.directive.mjs +0 -240
- package/esm2020/src/lib/popmenu/popmenu.module.mjs +0 -47
- package/esm2020/src/lib/slide-toggle/slide-toggle.component.mjs +0 -67
- package/esm2020/src/lib/snackbar/snackbar.component.mjs +0 -21
- package/esm2020/src/lib/snackbars-thread/component/snackbars-thread.component.mjs +0 -70
- package/esm2020/src/lib/snackbars-thread/model/snackbars-thread.model.mjs +0 -41
- package/esm2020/src/lib/snackbars-thread/service/snackbars-thread.service.mjs +0 -41
- package/esm2020/src/lib/snackbars-thread/utils/const/snackbars-thread.const.mjs +0 -13
- package/esm2020/src/lib/stepper/step.model.mjs +0 -2
- package/esm2020/src/lib/stepper/stepper.component.mjs +0 -36
- package/esm2020/src/lib/text-measurement/text-measurement.service.mjs +0 -28
- package/esm2020/src/lib/tooltip-neo/tooltip-neo.component.mjs +0 -44
- package/esm2020/src/lib/tooltip-neo/tooltip-neo.const.mjs +0 -67
- package/esm2020/src/lib/tooltip-neo/tooltip-neo.directive.mjs +0 -137
- package/esm2020/src/lib/tooltip-neo/tooltip-neo.model.mjs +0 -2
|
@@ -0,0 +1,664 @@
|
|
|
1
|
+
import { NgStyle, NgTemplateOutlet, NgIf } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ViewChild, HostBinding, InjectionToken, Directive, Optional, Inject, HostListener, NgModule } from '@angular/core';
|
|
4
|
+
import * as i1 from '@angular/material/button';
|
|
5
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
6
|
+
import * as i2 from '@angular/material/menu';
|
|
7
|
+
import { MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
8
|
+
|
|
9
|
+
class PopmenuComponent {
|
|
10
|
+
constructor(renderer, elementRef, changeDetectorRef) {
|
|
11
|
+
this.renderer = renderer;
|
|
12
|
+
this.elementRef = elementRef;
|
|
13
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
14
|
+
this.events = new EventEmitter();
|
|
15
|
+
this.arrowTopPosition = '50%';
|
|
16
|
+
this.arrowBottomPosition = '50%';
|
|
17
|
+
this.menuClosed = new EventEmitter();
|
|
18
|
+
this.menuOpened = new EventEmitter();
|
|
19
|
+
this.viewInit = false;
|
|
20
|
+
this._show = false;
|
|
21
|
+
}
|
|
22
|
+
get show() {
|
|
23
|
+
return this._show;
|
|
24
|
+
}
|
|
25
|
+
set show(value) {
|
|
26
|
+
if (value) {
|
|
27
|
+
this.setPosition();
|
|
28
|
+
}
|
|
29
|
+
this._show = value;
|
|
30
|
+
}
|
|
31
|
+
set close(value) {
|
|
32
|
+
if (value) {
|
|
33
|
+
this.trigger.closeMenu();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
get arrow() {
|
|
37
|
+
return this.data.options.arrow && this.border;
|
|
38
|
+
}
|
|
39
|
+
get arrowOffset() {
|
|
40
|
+
return this.data.options.arrowOffset;
|
|
41
|
+
}
|
|
42
|
+
get arrowPosition() {
|
|
43
|
+
return this.data.options.arrowPosition;
|
|
44
|
+
}
|
|
45
|
+
get autoPlacement() {
|
|
46
|
+
return this.data.options.autoPlacement;
|
|
47
|
+
}
|
|
48
|
+
get background() {
|
|
49
|
+
return this.data.options.apPopmenuBackground;
|
|
50
|
+
}
|
|
51
|
+
get border() {
|
|
52
|
+
return this.data.options.apPopmenuBorder;
|
|
53
|
+
}
|
|
54
|
+
get element() {
|
|
55
|
+
return this.data.element;
|
|
56
|
+
}
|
|
57
|
+
get elementPosition() {
|
|
58
|
+
return this.data.elementPosition;
|
|
59
|
+
}
|
|
60
|
+
get hasBackdrop() {
|
|
61
|
+
return this.data.options.hasBackdrop;
|
|
62
|
+
}
|
|
63
|
+
get backdropClass() {
|
|
64
|
+
return this.data.options.backdropClass;
|
|
65
|
+
}
|
|
66
|
+
get isThemeLight() {
|
|
67
|
+
return this.options['theme'] === 'light';
|
|
68
|
+
}
|
|
69
|
+
get options() {
|
|
70
|
+
return this.data.options;
|
|
71
|
+
}
|
|
72
|
+
get panelClass() {
|
|
73
|
+
return this.data.options.panelClass;
|
|
74
|
+
}
|
|
75
|
+
get placement() {
|
|
76
|
+
return this.data.options.placement;
|
|
77
|
+
}
|
|
78
|
+
get rounded() {
|
|
79
|
+
return this.data.options.rounded;
|
|
80
|
+
}
|
|
81
|
+
get shadow() {
|
|
82
|
+
return this.data.options.shadow;
|
|
83
|
+
}
|
|
84
|
+
get tooltipOffset() {
|
|
85
|
+
return Number(this.data.options.offset);
|
|
86
|
+
}
|
|
87
|
+
get offsetSkidding() {
|
|
88
|
+
return Number(this.data.options.offsets.skidding) || 0;
|
|
89
|
+
}
|
|
90
|
+
get offsetDistance() {
|
|
91
|
+
return Number(this.data.options.offsets.distance || 0);
|
|
92
|
+
}
|
|
93
|
+
get value() {
|
|
94
|
+
return this.data.value;
|
|
95
|
+
}
|
|
96
|
+
ngAfterViewInit() {
|
|
97
|
+
this.viewInit = true;
|
|
98
|
+
}
|
|
99
|
+
onMenuClosed() {
|
|
100
|
+
// we set a timeout to wait for the menu to be really closed
|
|
101
|
+
setTimeout(() => this.menuClosed.emit(), 200);
|
|
102
|
+
}
|
|
103
|
+
onMenuOpened() {
|
|
104
|
+
// we set a timeout to wait for the menu to be really opened
|
|
105
|
+
setTimeout(() => this.menuOpened.emit(), 100);
|
|
106
|
+
}
|
|
107
|
+
setHostStyle(placement) {
|
|
108
|
+
const isSvg = this.element instanceof SVGElement;
|
|
109
|
+
const tooltip = this.elementRef.nativeElement;
|
|
110
|
+
const isCustomPosition = !this.elementPosition.x;
|
|
111
|
+
let elementHeight = !this.element.offsetHeight
|
|
112
|
+
? this.element.getBoundingClientRect().height
|
|
113
|
+
: this.element.offsetHeight;
|
|
114
|
+
let elementWidth = !this.element.offsetWidth
|
|
115
|
+
? this.element.getBoundingClientRect().width
|
|
116
|
+
: this.element.offsetWidth;
|
|
117
|
+
const tooltipHeight = tooltip.clientHeight;
|
|
118
|
+
const tooltipWidth = tooltip.clientWidth;
|
|
119
|
+
const scrollY = window.pageYOffset;
|
|
120
|
+
let topStyle;
|
|
121
|
+
let leftStyle;
|
|
122
|
+
if (isCustomPosition) {
|
|
123
|
+
if (placement && placement.split(' ')[0] === 'top') {
|
|
124
|
+
this.below = false;
|
|
125
|
+
}
|
|
126
|
+
if (placement && placement.split(' ')[0] === 'bottom') {
|
|
127
|
+
this.below = true;
|
|
128
|
+
}
|
|
129
|
+
elementHeight = 0;
|
|
130
|
+
elementWidth = 0;
|
|
131
|
+
topStyle = this.elementPosition.top;
|
|
132
|
+
leftStyle = this.elementPosition.left;
|
|
133
|
+
if (this.arrow && this.arrowPosition) {
|
|
134
|
+
this.arrowClass = 'arrow-' + this.arrowPosition;
|
|
135
|
+
switch (this.arrowPosition) {
|
|
136
|
+
case 'left':
|
|
137
|
+
case 'right':
|
|
138
|
+
this.arrowLeftPosition = undefined;
|
|
139
|
+
this.arrowRightPosition = undefined;
|
|
140
|
+
this.arrowBottomPosition = 'auto';
|
|
141
|
+
this.arrowTopPosition = this.arrowOffset + '%';
|
|
142
|
+
break;
|
|
143
|
+
case 'top':
|
|
144
|
+
case 'bottom':
|
|
145
|
+
this.arrowLeftPosition = this.arrowOffset + '%';
|
|
146
|
+
this.arrowRightPosition = 'auto';
|
|
147
|
+
this.arrowBottomPosition = undefined;
|
|
148
|
+
this.arrowTopPosition = undefined;
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
if (placement.split(' ')[0] === 'top') {
|
|
155
|
+
this.below = false;
|
|
156
|
+
topStyle = this.elementPosition.top - this.tooltipOffset - this.offsetDistance;
|
|
157
|
+
topStyle += 8;
|
|
158
|
+
}
|
|
159
|
+
if (placement.split(' ')[0] === 'bottom') {
|
|
160
|
+
this.below = true;
|
|
161
|
+
topStyle = this.elementPosition.bottom + this.tooltipOffset + this.offsetDistance;
|
|
162
|
+
// We remove 8px due to the margin-top we put to display the arrow.
|
|
163
|
+
topStyle -= 8;
|
|
164
|
+
}
|
|
165
|
+
if (placement.split(' ')[0] === 'left') {
|
|
166
|
+
leftStyle = this.elementPosition.left - tooltipWidth - this.tooltipOffset - this.offsetDistance;
|
|
167
|
+
}
|
|
168
|
+
if (placement.split(' ')[0] === 'right') {
|
|
169
|
+
leftStyle = this.elementPosition.left + elementWidth + this.tooltipOffset + this.offsetDistance;
|
|
170
|
+
}
|
|
171
|
+
if (placement.split(' ')[0] === 'left' || placement.split(' ')[0] === 'right') {
|
|
172
|
+
topStyle = this.elementPosition.top + scrollY + elementHeight / 2 - tooltip.clientHeight / 2;
|
|
173
|
+
}
|
|
174
|
+
if (placement === 'right bottom') {
|
|
175
|
+
this.below = true;
|
|
176
|
+
this.before = false;
|
|
177
|
+
this.arrowClass = 'arrow-left';
|
|
178
|
+
topStyle = this.elementPosition.top + scrollY + this.offsetSkidding;
|
|
179
|
+
this.arrowRightPosition = undefined;
|
|
180
|
+
this.arrowLeftPosition = undefined;
|
|
181
|
+
this.arrowBottomPosition = 'auto';
|
|
182
|
+
this.arrowTopPosition = this.arrowOffset ? this.arrowOffset + '%' : elementHeight / 2 + 'px';
|
|
183
|
+
}
|
|
184
|
+
if (placement === 'left bottom') {
|
|
185
|
+
this.below = true;
|
|
186
|
+
this.before = true;
|
|
187
|
+
this.arrowClass = 'arrow-right';
|
|
188
|
+
topStyle = this.elementPosition.top + scrollY + this.offsetSkidding;
|
|
189
|
+
this.arrowLeftPosition = undefined;
|
|
190
|
+
this.arrowRightPosition = undefined;
|
|
191
|
+
this.arrowBottomPosition = 'auto';
|
|
192
|
+
this.arrowTopPosition = this.arrowOffset ? this.arrowOffset + '%' : elementHeight / 2 + 'px';
|
|
193
|
+
}
|
|
194
|
+
if (placement === 'right top') {
|
|
195
|
+
this.below = false;
|
|
196
|
+
this.before = false;
|
|
197
|
+
this.arrowClass = 'arrow-left';
|
|
198
|
+
topStyle = this.elementPosition.top + elementHeight + scrollY + this.offsetSkidding;
|
|
199
|
+
this.arrowLeftPosition = undefined;
|
|
200
|
+
this.arrowRightPosition = undefined;
|
|
201
|
+
this.arrowTopPosition = 'auto';
|
|
202
|
+
this.arrowBottomPosition = this.arrowOffset
|
|
203
|
+
? this.arrowOffset + '%'
|
|
204
|
+
: -(tooltip.clientHeight - elementHeight / 2) + 'px';
|
|
205
|
+
}
|
|
206
|
+
if (placement === 'left top') {
|
|
207
|
+
this.below = false;
|
|
208
|
+
this.before = true;
|
|
209
|
+
this.arrowClass = 'arrow-right';
|
|
210
|
+
topStyle = this.elementPosition.top + elementHeight + scrollY + this.offsetSkidding;
|
|
211
|
+
this.arrowRightPosition = undefined;
|
|
212
|
+
this.arrowLeftPosition = undefined;
|
|
213
|
+
this.arrowTopPosition = 'auto';
|
|
214
|
+
this.arrowBottomPosition = this.arrowOffset
|
|
215
|
+
? this.arrowOffset + '%'
|
|
216
|
+
: -(tooltip.clientHeight - elementHeight / 2) + 'px';
|
|
217
|
+
}
|
|
218
|
+
if (placement === 'bottom right') {
|
|
219
|
+
this.before = false;
|
|
220
|
+
this.below = true;
|
|
221
|
+
this.arrowClass = 'arrow-top';
|
|
222
|
+
leftStyle = this.elementPosition.left + this.offsetSkidding;
|
|
223
|
+
this.arrowTopPosition = undefined;
|
|
224
|
+
this.arrowRightPosition = 'auto';
|
|
225
|
+
this.arrowLeftPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 4.5 + 'px';
|
|
226
|
+
}
|
|
227
|
+
if (placement === 'bottom left') {
|
|
228
|
+
this.before = true;
|
|
229
|
+
this.below = true;
|
|
230
|
+
this.arrowClass = 'arrow-top';
|
|
231
|
+
leftStyle = this.elementPosition.right + this.offsetSkidding;
|
|
232
|
+
this.arrowTopPosition = undefined;
|
|
233
|
+
this.arrowLeftPosition = 'auto';
|
|
234
|
+
this.arrowRightPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 2.5 + 'px';
|
|
235
|
+
}
|
|
236
|
+
if (placement === 'top right') {
|
|
237
|
+
this.before = false;
|
|
238
|
+
this.below = false;
|
|
239
|
+
this.arrowClass = 'arrow-bottom';
|
|
240
|
+
leftStyle = this.elementPosition.left + this.offsetSkidding;
|
|
241
|
+
this.arrowBottomPosition = undefined;
|
|
242
|
+
this.arrowTopPosition = undefined;
|
|
243
|
+
this.arrowRightPosition = 'auto';
|
|
244
|
+
this.arrowLeftPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 4.5 + 'px';
|
|
245
|
+
}
|
|
246
|
+
if (placement === 'top left') {
|
|
247
|
+
this.before = true;
|
|
248
|
+
this.below = false;
|
|
249
|
+
this.arrowClass = 'arrow-bottom';
|
|
250
|
+
leftStyle = this.elementPosition.right + this.offsetSkidding;
|
|
251
|
+
this.arrowBottomPosition = undefined;
|
|
252
|
+
this.arrowTopPosition = undefined;
|
|
253
|
+
this.arrowLeftPosition = 'auto';
|
|
254
|
+
this.arrowRightPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 2.5 + 'px';
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
// This line is PURE MAGIC and super important. It allows to force mat-menu
|
|
258
|
+
// to reposition the menu with the new xPosition / yPosition.
|
|
259
|
+
this.changeDetectorRef.detectChanges();
|
|
260
|
+
const topEdge = topStyle;
|
|
261
|
+
const bottomEdge = topStyle + tooltipHeight;
|
|
262
|
+
const leftEdge = leftStyle;
|
|
263
|
+
const rightEdge = leftStyle + tooltipWidth;
|
|
264
|
+
if ((topEdge < 0 ||
|
|
265
|
+
bottomEdge > document.body.clientHeight ||
|
|
266
|
+
leftEdge < 0 ||
|
|
267
|
+
rightEdge > document.body.clientWidth) &&
|
|
268
|
+
this.autoPlacement) {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
this.hostStyleTop = topStyle + 'px';
|
|
272
|
+
this.hostStyleLeft = leftStyle + 'px';
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
setPlacementClass(placement) {
|
|
276
|
+
this.renderer.addClass(this.elementRef.nativeElement, 'tooltip-' + (placement ? placement.split(' ')[0] : placement));
|
|
277
|
+
this.renderer.addClass(this.elementRef.nativeElement, 'yPosition-' + (placement && placement.split(' ').length === 2 ? placement.split(' ')[1] : 'center'));
|
|
278
|
+
if (this.elementRef.nativeElement.children && this.elementRef.nativeElement.children.length > 1) {
|
|
279
|
+
const tooltipArrow = Array.from(this.elementRef.nativeElement.children).filter((child) => child.getAttribute('id') === 'tooltipArrow');
|
|
280
|
+
if (tooltipArrow && tooltipArrow.length === 1) {
|
|
281
|
+
if (placement && placement.split(' ').length === 2 && placement.split(' ')[1] === 'bottom') {
|
|
282
|
+
this.renderer.setStyle(tooltipArrow[0], 'top', this.arrowTopPosition);
|
|
283
|
+
}
|
|
284
|
+
else if (placement && placement.split(' ').length === 2 && placement.split(' ')[1] === 'top') {
|
|
285
|
+
this.renderer.setStyle(tooltipArrow[0], 'top', this.arrowBottomPosition);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
setPosition() {
|
|
291
|
+
if (this.setHostStyle(this.placement)) {
|
|
292
|
+
this.setPlacementClass(this.placement);
|
|
293
|
+
if (this.viewInit) {
|
|
294
|
+
// We did this in order to reset overlayRef (multi web component needed with matmenu and cdk overlay)
|
|
295
|
+
if (this.trigger['_overlayRef']) {
|
|
296
|
+
this.trigger['_overlayRef'].dispose();
|
|
297
|
+
this.trigger['_overlayRef'] = null;
|
|
298
|
+
}
|
|
299
|
+
this.trigger.openMenu();
|
|
300
|
+
}
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
const placements = ['top', 'right', 'bottom', 'left'];
|
|
305
|
+
for (const placement of placements) {
|
|
306
|
+
if (this.setHostStyle(placement)) {
|
|
307
|
+
this.setPlacementClass(placement);
|
|
308
|
+
if (this.viewInit) {
|
|
309
|
+
this.trigger.openMenu();
|
|
310
|
+
}
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
PopmenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PopmenuComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
318
|
+
PopmenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: PopmenuComponent, isStandalone: true, selector: "ap-popmenu", inputs: { data: "data", show: "show", close: "close" }, outputs: { menuClosed: "menuClosed", menuOpened: "menuOpened" }, host: { properties: { "style.top": "this.hostStyleTop", "style.border-radius": "this.hostStyleBorderRadius", "style.left": "this.hostStyleLeft", "style.z-index": "this.hostStyleZIndex", "style.transition": "this.hostStyleTransition", "style.width": "this.hostStyleWidth", "style.max-width": "this.hostStyleMaxWidth", "style.pointer-events": "this.hostStylePointerEvents", "class.tooltip-show": "this.hostClassShow", "class.tooltip-shadow": "this.hostClassShadow", "class.tooltip-light": "this.hostClassLight" } }, viewQueries: [{ propertyName: "trigger", first: true, predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "<button id=\"menuTrigger\" class=\"button-trigger\" mat-button\n [matMenuTriggerFor]=\"menu\" (menuClosed)=\"onMenuClosed()\" (menuOpened)=\"onMenuOpened()\">\n</button>\n<mat-menu #menu=\"matMenu\" [yPosition]=\"!below ? 'above': 'below'\" [xPosition]=\"!before? 'after': 'before'\" [overlapTrigger]=\"false\"\n [hasBackdrop]=\"hasBackdrop\"\n [backdropClass]=\"backdropClass\"\n class=\"pop-menu {{arrow ? 'arrow-before ' + arrowClass : ''}} {{shadow ? 'shadow' : ''}} {{border ? '' : (shadow ? 'shadow-no-border' : '')}} {{rounded ? 'rounded-component' : ''}} {{ background ? '' : 'no-background'}} {{panelClass}}\">\n\n <div *ngIf=\"arrow\" class=\"{{arrow ? 'arrow-before ' + arrowClass : ''}}\" [ngStyle]=\"{'left': arrowLeftPosition, 'right': arrowRightPosition, 'top': arrowTopPosition, 'bottom': arrowBottomPosition}\"></div>\n <div (click)=\"$event.stopPropagation()\" class=\"{{rounded ? 'rounded-component' : ''}} outline-none\">\n <div class=\"{{border ? 'popover-content ' : ''}} {{rounded ? 'rounded-component' : ''}}\">\n <ng-container *ngTemplateOutlet=\"value\"></ng-container>\n </div>\n </div>\n</mat-menu>\n\n\n", styles: ["[color=facebook]{color:#1877f2}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#1877f2}[border=facebook]{border:1px solid #1877f2}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid #ff0000}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #ffffff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:transparent}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:transparent}[border=transparent]{border:1px solid transparent}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #A566A5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #C7AB82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #F2713C}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #FFD006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94C5AA}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2A9D8F}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78ACD8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525A9E}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6A2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729E}.mat-menu-content{padding:0}.mat-menu-item{height:inherit;width:inherit;background-color:#fff;padding:0;cursor:default;box-shadow:0 4px 10px #0000001c}.mat-menu-item:hover{background-color:#fff!important;cursor:default;box-shadow:none!important}.outline-none{outline:none}.mat-menu-item:hover:not([disabled]),.mat-menu-item.cdk-program-focused:not([disabled]),.mat-menu-item.cdk-keyboard-focused:not([disabled]),.mat-menu-item-highlighted:not([disabled]){background-color:#fff!important;cursor:default;box-shadow:none!important}:host ::ng-deep .mat-button{max-width:1px;max-height:1px;min-width:1px;min-height:1px;padding:0;margin:0}:host{position:absolute;max-width:1px;max-height:1px;display:flex}.button-trigger{padding:0;border:none;height:1px;width:1px}::ng-deep .rounded-component .mat-menu-content{border-radius:10px}::ng-deep .rounded-component{border-radius:10px}::ng-deep .no-background .rounded-component{position:fixed}.popover-content{border:1px solid #dfe3e9}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PopmenuComponent, decorators: [{
|
|
320
|
+
type: Component,
|
|
321
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-popmenu', standalone: true, imports: [MatButtonModule, MatMenuModule, NgStyle, NgTemplateOutlet, NgIf], template: "<button id=\"menuTrigger\" class=\"button-trigger\" mat-button\n [matMenuTriggerFor]=\"menu\" (menuClosed)=\"onMenuClosed()\" (menuOpened)=\"onMenuOpened()\">\n</button>\n<mat-menu #menu=\"matMenu\" [yPosition]=\"!below ? 'above': 'below'\" [xPosition]=\"!before? 'after': 'before'\" [overlapTrigger]=\"false\"\n [hasBackdrop]=\"hasBackdrop\"\n [backdropClass]=\"backdropClass\"\n class=\"pop-menu {{arrow ? 'arrow-before ' + arrowClass : ''}} {{shadow ? 'shadow' : ''}} {{border ? '' : (shadow ? 'shadow-no-border' : '')}} {{rounded ? 'rounded-component' : ''}} {{ background ? '' : 'no-background'}} {{panelClass}}\">\n\n <div *ngIf=\"arrow\" class=\"{{arrow ? 'arrow-before ' + arrowClass : ''}}\" [ngStyle]=\"{'left': arrowLeftPosition, 'right': arrowRightPosition, 'top': arrowTopPosition, 'bottom': arrowBottomPosition}\"></div>\n <div (click)=\"$event.stopPropagation()\" class=\"{{rounded ? 'rounded-component' : ''}} outline-none\">\n <div class=\"{{border ? 'popover-content ' : ''}} {{rounded ? 'rounded-component' : ''}}\">\n <ng-container *ngTemplateOutlet=\"value\"></ng-container>\n </div>\n </div>\n</mat-menu>\n\n\n", styles: ["[color=facebook]{color:#1877f2}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#1877f2}[border=facebook]{border:1px solid #1877f2}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid #ff0000}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #ffffff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:transparent}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:transparent}[border=transparent]{border:1px solid transparent}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #A566A5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #C7AB82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #F2713C}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #FFD006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94C5AA}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2A9D8F}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78ACD8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525A9E}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6A2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729E}.mat-menu-content{padding:0}.mat-menu-item{height:inherit;width:inherit;background-color:#fff;padding:0;cursor:default;box-shadow:0 4px 10px #0000001c}.mat-menu-item:hover{background-color:#fff!important;cursor:default;box-shadow:none!important}.outline-none{outline:none}.mat-menu-item:hover:not([disabled]),.mat-menu-item.cdk-program-focused:not([disabled]),.mat-menu-item.cdk-keyboard-focused:not([disabled]),.mat-menu-item-highlighted:not([disabled]){background-color:#fff!important;cursor:default;box-shadow:none!important}:host ::ng-deep .mat-button{max-width:1px;max-height:1px;min-width:1px;min-height:1px;padding:0;margin:0}:host{position:absolute;max-width:1px;max-height:1px;display:flex}.button-trigger{padding:0;border:none;height:1px;width:1px}::ng-deep .rounded-component .mat-menu-content{border-radius:10px}::ng-deep .rounded-component{border-radius:10px}::ng-deep .no-background .rounded-component{position:fixed}.popover-content{border:1px solid #dfe3e9}\n"] }]
|
|
322
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
|
|
323
|
+
type: Input
|
|
324
|
+
}], menuClosed: [{
|
|
325
|
+
type: Output
|
|
326
|
+
}], menuOpened: [{
|
|
327
|
+
type: Output
|
|
328
|
+
}], trigger: [{
|
|
329
|
+
type: ViewChild,
|
|
330
|
+
args: [MatMenuTrigger]
|
|
331
|
+
}], hostStyleTop: [{
|
|
332
|
+
type: HostBinding,
|
|
333
|
+
args: ['style.top']
|
|
334
|
+
}], hostStyleBorderRadius: [{
|
|
335
|
+
type: HostBinding,
|
|
336
|
+
args: ['style.border-radius']
|
|
337
|
+
}], hostStyleLeft: [{
|
|
338
|
+
type: HostBinding,
|
|
339
|
+
args: ['style.left']
|
|
340
|
+
}], hostStyleZIndex: [{
|
|
341
|
+
type: HostBinding,
|
|
342
|
+
args: ['style.z-index']
|
|
343
|
+
}], hostStyleTransition: [{
|
|
344
|
+
type: HostBinding,
|
|
345
|
+
args: ['style.transition']
|
|
346
|
+
}], hostStyleWidth: [{
|
|
347
|
+
type: HostBinding,
|
|
348
|
+
args: ['style.width']
|
|
349
|
+
}], hostStyleMaxWidth: [{
|
|
350
|
+
type: HostBinding,
|
|
351
|
+
args: ['style.max-width']
|
|
352
|
+
}], hostStylePointerEvents: [{
|
|
353
|
+
type: HostBinding,
|
|
354
|
+
args: ['style.pointer-events']
|
|
355
|
+
}], hostClassShow: [{
|
|
356
|
+
type: HostBinding,
|
|
357
|
+
args: ['class.tooltip-show']
|
|
358
|
+
}], hostClassShadow: [{
|
|
359
|
+
type: HostBinding,
|
|
360
|
+
args: ['class.tooltip-shadow']
|
|
361
|
+
}], hostClassLight: [{
|
|
362
|
+
type: HostBinding,
|
|
363
|
+
args: ['class.tooltip-light']
|
|
364
|
+
}], show: [{
|
|
365
|
+
type: Input
|
|
366
|
+
}], close: [{
|
|
367
|
+
type: Input
|
|
368
|
+
}] } });
|
|
369
|
+
|
|
370
|
+
const defaultOptions = {
|
|
371
|
+
'apPopmenuBorder': true,
|
|
372
|
+
'apPopmenuDisabled': false,
|
|
373
|
+
'apPopmenuBackground': true,
|
|
374
|
+
'hasBackdrop': true,
|
|
375
|
+
'placement': 'top',
|
|
376
|
+
'rounded': true,
|
|
377
|
+
'showDelay': 0,
|
|
378
|
+
'hideDelay': 10,
|
|
379
|
+
'hideDelayMobile': 0,
|
|
380
|
+
'shadow': true,
|
|
381
|
+
'theme': 'dark',
|
|
382
|
+
'offset': 8,
|
|
383
|
+
'offsets': {},
|
|
384
|
+
'maxWidth': '600',
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* This is not a real service, but it looks like it from the outside.
|
|
389
|
+
* It's just an InjectionToken used to import the config (initOptions) object, provided from the outside
|
|
390
|
+
*/
|
|
391
|
+
const PopmenuOptionsService = new InjectionToken('PopmenuOptions');
|
|
392
|
+
|
|
393
|
+
class PopmenuDirective {
|
|
394
|
+
constructor(initOptions, renderer, elementRef, componentFactoryResolver, appRef, injector) {
|
|
395
|
+
this.initOptions = initOptions;
|
|
396
|
+
this.renderer = renderer;
|
|
397
|
+
this.elementRef = elementRef;
|
|
398
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
399
|
+
this.appRef = appRef;
|
|
400
|
+
this.injector = injector;
|
|
401
|
+
this.apPopmenuBackground = true;
|
|
402
|
+
this.close = false;
|
|
403
|
+
this.hasBackdrop = true;
|
|
404
|
+
this.pointer = true;
|
|
405
|
+
this.menuClosed = new EventEmitter();
|
|
406
|
+
this.menuOpened = new EventEmitter();
|
|
407
|
+
this._options = {};
|
|
408
|
+
}
|
|
409
|
+
get options() {
|
|
410
|
+
return this._options;
|
|
411
|
+
}
|
|
412
|
+
set options(value) {
|
|
413
|
+
if (value && defaultOptions) {
|
|
414
|
+
this._options = value;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
get destroyDelay() {
|
|
418
|
+
return Number(this.getHideDelay()) + Number(this.options['animationDuration']);
|
|
419
|
+
}
|
|
420
|
+
get isDisplayOnHover() {
|
|
421
|
+
if (this.options['display'] === false) {
|
|
422
|
+
return false;
|
|
423
|
+
}
|
|
424
|
+
if (this.options['displayTouchscreen'] === false) {
|
|
425
|
+
return false;
|
|
426
|
+
}
|
|
427
|
+
if (this.options['trigger'] !== 'hover') {
|
|
428
|
+
return false;
|
|
429
|
+
}
|
|
430
|
+
return true;
|
|
431
|
+
}
|
|
432
|
+
get isTooltipDestroyed() {
|
|
433
|
+
return this.componentRef && this.componentRef.hostView.destroyed;
|
|
434
|
+
}
|
|
435
|
+
get tooltipPosition() {
|
|
436
|
+
if (this.options['position']) {
|
|
437
|
+
return this.options['position'];
|
|
438
|
+
}
|
|
439
|
+
else {
|
|
440
|
+
return this.elementPosition;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
appendComponentToBody(component, data = {}) {
|
|
444
|
+
this.componentRef = this.componentFactoryResolver
|
|
445
|
+
.resolveComponentFactory(component)
|
|
446
|
+
.create(this.injector);
|
|
447
|
+
this.componentRef.instance.data = {
|
|
448
|
+
value: this.popMenuValue,
|
|
449
|
+
element: this.elementRef.nativeElement,
|
|
450
|
+
elementPosition: this.tooltipPosition,
|
|
451
|
+
options: this.options
|
|
452
|
+
};
|
|
453
|
+
this.appRef.attachView(this.componentRef.hostView);
|
|
454
|
+
const domElem = this.componentRef.hostView.rootNodes[0];
|
|
455
|
+
document.body.appendChild(domElem);
|
|
456
|
+
this.componentSubscribe = this.componentRef.instance.menuClosed.subscribe((event) => {
|
|
457
|
+
this.handleClose(event);
|
|
458
|
+
});
|
|
459
|
+
this.componentSubscribe = this.componentRef.instance.menuOpened.subscribe((event) => {
|
|
460
|
+
this.handleOpen(event);
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
handleClose(event) {
|
|
464
|
+
this.menuClosed.emit();
|
|
465
|
+
}
|
|
466
|
+
handleOpen(event) {
|
|
467
|
+
this.menuOpened.emit();
|
|
468
|
+
}
|
|
469
|
+
applyOptionsDefault(defaultOptions, options) {
|
|
470
|
+
this.options = Object.assign({}, defaultOptions, this.initOptions || {}, options);
|
|
471
|
+
}
|
|
472
|
+
clearTimeouts() {
|
|
473
|
+
if (this.createTimeoutId) {
|
|
474
|
+
clearTimeout(this.createTimeoutId);
|
|
475
|
+
}
|
|
476
|
+
if (this.showTimeoutId) {
|
|
477
|
+
clearTimeout(this.showTimeoutId);
|
|
478
|
+
}
|
|
479
|
+
if (this.hideTimeoutId) {
|
|
480
|
+
clearTimeout(this.hideTimeoutId);
|
|
481
|
+
}
|
|
482
|
+
if (this.destroyTimeoutId) {
|
|
483
|
+
clearTimeout(this.destroyTimeoutId);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
createPopMenu() {
|
|
487
|
+
this.clearTimeouts();
|
|
488
|
+
this.createTimeoutId = window.setTimeout(() => {
|
|
489
|
+
this.appendComponentToBody(PopmenuComponent);
|
|
490
|
+
}, this.getShowDelay());
|
|
491
|
+
this.showTimeoutId = window.setTimeout(() => {
|
|
492
|
+
this.showTooltipElem();
|
|
493
|
+
}, this.getShowDelay());
|
|
494
|
+
}
|
|
495
|
+
getElementPosition() {
|
|
496
|
+
this.elementPosition = this.elementRef.nativeElement.getBoundingClientRect();
|
|
497
|
+
}
|
|
498
|
+
getHideDelay() {
|
|
499
|
+
return this.options['hideDelay'];
|
|
500
|
+
}
|
|
501
|
+
getProperties(changes) {
|
|
502
|
+
let properties = {};
|
|
503
|
+
for (const prop in changes) {
|
|
504
|
+
if (prop !== 'options' && prop !== 'tooltipValue') {
|
|
505
|
+
properties[prop] = changes[prop].currentValue;
|
|
506
|
+
}
|
|
507
|
+
if (prop === 'options') {
|
|
508
|
+
properties = changes[prop].currentValue;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return properties;
|
|
512
|
+
}
|
|
513
|
+
getShowDelay() {
|
|
514
|
+
return this.options['showDelay'];
|
|
515
|
+
}
|
|
516
|
+
ngOnChanges(changes) {
|
|
517
|
+
if (changes.pointer) {
|
|
518
|
+
if (!this.pointer) {
|
|
519
|
+
this.renderer.removeStyle(this.elementRef.nativeElement, 'cursor');
|
|
520
|
+
}
|
|
521
|
+
else {
|
|
522
|
+
this.renderer.setStyle(this.elementRef.nativeElement, 'cursor', 'pointer');
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
if (changes.close && changes.close.currentValue) {
|
|
526
|
+
this.hideTooltipElem();
|
|
527
|
+
}
|
|
528
|
+
const changedOptions = this.getProperties(changes);
|
|
529
|
+
this.applyOptionsDefault(this.options && Object.keys(this.options).length > 0 ? this.options : defaultOptions, changedOptions);
|
|
530
|
+
}
|
|
531
|
+
ngOnInit() {
|
|
532
|
+
if (this.pointer) {
|
|
533
|
+
this.renderer.setStyle(this.elementRef.nativeElement, 'cursor', 'pointer');
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
onClick() {
|
|
537
|
+
if (this.apPopmenuDisabled) {
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
this.show();
|
|
541
|
+
this.close = false;
|
|
542
|
+
}
|
|
543
|
+
show() {
|
|
544
|
+
this.getElementPosition();
|
|
545
|
+
if (!this.componentRef || this.isTooltipDestroyed) {
|
|
546
|
+
this.createPopMenu();
|
|
547
|
+
}
|
|
548
|
+
else if (!this.isTooltipDestroyed) {
|
|
549
|
+
this.showTooltipElem();
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
showTooltipElem() {
|
|
553
|
+
this.componentRef.instance.data = {
|
|
554
|
+
value: this.popMenuValue,
|
|
555
|
+
element: this.elementRef.nativeElement,
|
|
556
|
+
elementPosition: this.tooltipPosition,
|
|
557
|
+
options: this.options
|
|
558
|
+
};
|
|
559
|
+
this.clearTimeouts();
|
|
560
|
+
this.componentRef.instance.show = true;
|
|
561
|
+
}
|
|
562
|
+
hideTooltipElem() {
|
|
563
|
+
if (this.componentRef) {
|
|
564
|
+
this.componentRef.instance.close = true;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
PopmenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PopmenuDirective, deps: [{ token: PopmenuOptionsService, optional: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
569
|
+
PopmenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: PopmenuDirective, isStandalone: true, selector: "[apPopmenu]", inputs: { apPopmenuBorder: "apPopmenuBorder", apPopmenuDisabled: "apPopmenuDisabled", apPopmenuBackground: "apPopmenuBackground", arrow: "arrow", arrowOffset: "arrowOffset", arrowPosition: "arrowPosition", close: "close", hasBackdrop: "hasBackdrop", backdropClass: "backdropClass", panelClass: "panelClass", offset: "offset", offsets: "offsets", placement: "placement", pointer: "pointer", popMenuValue: ["apPopmenu", "popMenuValue"], position: "position", rounded: "rounded", shadow: "shadow", options: "options" }, outputs: { menuClosed: "menuClosed", menuOpened: "menuOpened" }, host: { listeners: { "click": "onClick()" } }, usesOnChanges: true, ngImport: i0 });
|
|
570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PopmenuDirective, decorators: [{
|
|
571
|
+
type: Directive,
|
|
572
|
+
args: [{
|
|
573
|
+
selector: '[apPopmenu]',
|
|
574
|
+
standalone: true,
|
|
575
|
+
}]
|
|
576
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
577
|
+
type: Optional
|
|
578
|
+
}, {
|
|
579
|
+
type: Inject,
|
|
580
|
+
args: [PopmenuOptionsService]
|
|
581
|
+
}] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }]; }, propDecorators: { apPopmenuBorder: [{
|
|
582
|
+
type: Input
|
|
583
|
+
}], apPopmenuDisabled: [{
|
|
584
|
+
type: Input
|
|
585
|
+
}], apPopmenuBackground: [{
|
|
586
|
+
type: Input
|
|
587
|
+
}], arrow: [{
|
|
588
|
+
type: Input
|
|
589
|
+
}], arrowOffset: [{
|
|
590
|
+
type: Input
|
|
591
|
+
}], arrowPosition: [{
|
|
592
|
+
type: Input
|
|
593
|
+
}], close: [{
|
|
594
|
+
type: Input
|
|
595
|
+
}], hasBackdrop: [{
|
|
596
|
+
type: Input
|
|
597
|
+
}], backdropClass: [{
|
|
598
|
+
type: Input
|
|
599
|
+
}], panelClass: [{
|
|
600
|
+
type: Input
|
|
601
|
+
}], offset: [{
|
|
602
|
+
type: Input
|
|
603
|
+
}], offsets: [{
|
|
604
|
+
type: Input
|
|
605
|
+
}], placement: [{
|
|
606
|
+
type: Input
|
|
607
|
+
}], pointer: [{
|
|
608
|
+
type: Input
|
|
609
|
+
}], popMenuValue: [{
|
|
610
|
+
type: Input,
|
|
611
|
+
args: ['apPopmenu']
|
|
612
|
+
}], position: [{
|
|
613
|
+
type: Input
|
|
614
|
+
}], rounded: [{
|
|
615
|
+
type: Input
|
|
616
|
+
}], shadow: [{
|
|
617
|
+
type: Input
|
|
618
|
+
}], menuClosed: [{
|
|
619
|
+
type: Output
|
|
620
|
+
}], menuOpened: [{
|
|
621
|
+
type: Output
|
|
622
|
+
}], options: [{
|
|
623
|
+
type: Input
|
|
624
|
+
}], onClick: [{
|
|
625
|
+
type: HostListener,
|
|
626
|
+
args: ['click']
|
|
627
|
+
}] } });
|
|
628
|
+
|
|
629
|
+
class PopmenuModule {
|
|
630
|
+
static forRoot(initOptions) {
|
|
631
|
+
return {
|
|
632
|
+
ngModule: PopmenuModule,
|
|
633
|
+
providers: [
|
|
634
|
+
{
|
|
635
|
+
provide: PopmenuOptionsService,
|
|
636
|
+
useValue: initOptions
|
|
637
|
+
}
|
|
638
|
+
]
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
PopmenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PopmenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
643
|
+
PopmenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: PopmenuModule, imports: [PopmenuDirective,
|
|
644
|
+
PopmenuComponent], exports: [PopmenuDirective] });
|
|
645
|
+
PopmenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PopmenuModule, imports: [PopmenuComponent] });
|
|
646
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PopmenuModule, decorators: [{
|
|
647
|
+
type: NgModule,
|
|
648
|
+
args: [{
|
|
649
|
+
imports: [
|
|
650
|
+
PopmenuDirective,
|
|
651
|
+
PopmenuComponent
|
|
652
|
+
],
|
|
653
|
+
exports: [
|
|
654
|
+
PopmenuDirective
|
|
655
|
+
]
|
|
656
|
+
}]
|
|
657
|
+
}] });
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Generated bundle index. Do not edit.
|
|
661
|
+
*/
|
|
662
|
+
|
|
663
|
+
export { PopmenuComponent, PopmenuDirective, PopmenuModule };
|
|
664
|
+
//# sourceMappingURL=agorapulse-ui-components-popmenu.mjs.map
|