@acorex/components 18.12.25 → 18.12.27
Sign up to get free protection for your applications and to get access to all the features.
- package/common/lib/classes/styles.class.d.ts +1 -1
- package/esm2022/button-group/lib/button-group.component.mjs +2 -2
- package/esm2022/color-palette/lib/color-palette-input.component.mjs +6 -6
- package/esm2022/common/lib/classes/styles.class.mjs +1 -1
- package/esm2022/conversation/lib/conversation-message/conversation-message.component.mjs +1 -1
- package/esm2022/dropdown/lib/dropdown-box.component.mjs +1 -1
- package/esm2022/dropdown/lib/dropdown-panel.component.mjs +1 -1
- package/esm2022/dropdown-button/lib/dropdown-button.component.mjs +3 -3
- package/esm2022/image-editor/lib/image-editor-tools/image-editor-pen-mode-changer/image-editor-pen-mode-changer.component.mjs +1 -1
- package/esm2022/json-viewer/lib/json-viewer/json-viewer.component.mjs +6 -5
- package/esm2022/paint/lib/paint/paint-tools/paint-pen-mode-changer/paint-pen-mode-changer.component.mjs +1 -1
- package/esm2022/popover/lib/popover.component.mjs +13 -5
- package/esm2022/popup/lib/popup.component.mjs +2 -2
- package/esm2022/popup/lib/popup.interface.mjs +1 -1
- package/esm2022/popup/lib/popup.service.mjs +5 -1
- package/esm2022/side-menu/lib/side-menu-item/side-menu-item.compoent.mjs +5 -5
- package/esm2022/side-menu/lib/side-menu.component.mjs +2 -2
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-alignment/wysiwyg-alignment.component.mjs +1 -1
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-colors/wysiwyg-colors.component.mjs +1 -1
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-insert/wysiwyg-insert.component.mjs +1 -1
- package/fesm2022/acorex-components-button-group.mjs +2 -2
- package/fesm2022/acorex-components-color-palette.mjs +4 -4
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +2 -2
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +2 -2
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +1 -1
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +5 -4
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +1 -1
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +12 -4
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +6 -2
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +6 -6
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +3 -3
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/package.json +66 -66
- package/popover/lib/popover.component.d.ts +6 -2
- package/popup/lib/popup.interface.d.ts +1 -0
- package/popup/lib/popup.service.d.ts +1 -0
@@ -148,7 +148,7 @@ class AXPaintPenModeChangerComponent {
|
|
148
148
|
this.service.lineWidth.set(e);
|
149
149
|
}
|
150
150
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintPenModeChangerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
151
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPaintPenModeChangerComponent, selector: "ax-paint-pen-mode-changer", host: { properties: { "style.marginInline": "this.__hostClass" } }, ngImport: i0, template: "<ax-button axTooltip=\"Draw Utilities\" axTooltipPlacement=\"top\" look=\"blank\" #alignPop>\n @switch (service.penType()) {\n @case ('pen') {\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n }\n @case ('highlight') {\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n }\n @case ('eraser') {\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n }\n }\n</ax-button>\n\n<ax-button axTooltip=\"Reset Changes\" axTooltipPlacement=\"top\" (click)=\"clear()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n</ax-button>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"alignPop\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-button\n (click)=\"penTypeHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'pen' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'highlight' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('eraser')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'eraser' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n </ax-button>\n\n <div class=\"ax-paint-width-slider\">\n <ax-range-slider\n [min]=\"2\"\n [max]=\"20\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"valueHandler($event)\"\n ></ax-range-slider>\n </div>\n </div>\n</ax-popover>\n", styles: ["ax-paint-pen-mode-changer{display:flex;align-items:center;margin-inline:0!important}ax-paint-pen-mode-changer ax-range-slider{padding:.5rem .75rem}ax-paint-pen-mode-changer ax-range-slider .ax-range-slider .ax-range-slider-handler{width:1rem!important;height:1rem!important}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }, { kind: "component", type: i3$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i5.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: i3.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltip", "axTooltipPlacement", "axTooltipOpenAfter", "axTooltipCloseAfter"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
151
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPaintPenModeChangerComponent, selector: "ax-paint-pen-mode-changer", host: { properties: { "style.marginInline": "this.__hostClass" } }, ngImport: i0, template: "<ax-button axTooltip=\"Draw Utilities\" axTooltipPlacement=\"top\" look=\"blank\" #alignPop>\n @switch (service.penType()) {\n @case ('pen') {\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n }\n @case ('highlight') {\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n }\n @case ('eraser') {\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n }\n }\n</ax-button>\n\n<ax-button axTooltip=\"Reset Changes\" axTooltipPlacement=\"top\" (click)=\"clear()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n</ax-button>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"alignPop\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-button\n (click)=\"penTypeHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'pen' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'highlight' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('eraser')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'eraser' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n </ax-button>\n\n <div class=\"ax-paint-width-slider\">\n <ax-range-slider\n [min]=\"2\"\n [max]=\"20\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"valueHandler($event)\"\n ></ax-range-slider>\n </div>\n </div>\n</ax-popover>\n", styles: ["ax-paint-pen-mode-changer{display:flex;align-items:center;margin-inline:0!important}ax-paint-pen-mode-changer ax-range-slider{padding:.5rem .75rem}ax-paint-pen-mode-changer ax-range-slider .ax-range-slider .ax-range-slider-handler{width:1rem!important;height:1rem!important}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }, { kind: "component", type: i3$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i5.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: i3.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltip", "axTooltipPlacement", "axTooltipOpenAfter", "axTooltipCloseAfter"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
152
152
|
}
|
153
153
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintPenModeChangerComponent, decorators: [{
|
154
154
|
type: Component,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-paint.mjs","sources":["../../../../libs/components/paint/src/lib/paint/paint.service.ts","../../../../libs/components/paint/src/lib/paint/paint-container/paint-container.component.ts","../../../../libs/components/paint/src/lib/paint/paint-container/paint-container.component.html","../../../../libs/components/paint/src/lib/paint/paint-toolbar/paint-toolbar.component.ts","../../../../libs/components/paint/src/lib/paint/paint-toolbar/paint-toolbar.component.html","../../../../libs/components/paint/src/lib/paint/paint-tools/paint-color-picker/paint-color-picker.component.ts","../../../../libs/components/paint/src/lib/paint/paint-tools/paint-color-picker/paint-color-picker.component.html","../../../../libs/components/paint/src/lib/paint/paint-tools/paint-pen-mode-changer/paint-pen-mode-changer.component.ts","../../../../libs/components/paint/src/lib/paint/paint-tools/paint-pen-mode-changer/paint-pen-mode-changer.component.html","../../../../libs/components/paint/src/lib/paint/paint-view/paint-view.component.ts","../../../../libs/components/paint/src/lib/paint/paint-view/paint-view.component.html","../../../../libs/components/paint/src/lib/paint.module.ts","../../../../libs/components/paint/src/acorex-components-paint.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\n\n@Injectable()\nexport class AXPaintService {\n penColor = signal<string | CanvasGradient | CanvasPattern>('');\n lineWidth = signal<number>(10);\n penType = signal<'pen' | 'highlight' | 'eraser'>('pen');\n toggleClear = signal(false);\n}\n","import {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport { Component, ViewEncapsulation, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\nimport { AXPaintService } from '../paint.service';\n\n/**\n * paint container.\n * @category Components\n */\n@Component({\n selector: 'ax-paint-container',\n templateUrl: './paint-container.component.html',\n styleUrl: './paint-container.component.scss',\n encapsulation: ViewEncapsulation.None,\n inputs: ['look'],\n providers: [\n AXPaintService,\n { provide: AXComponent, useExisting: AXPaintContainerComponent },\n { provide: AXFocusableComponent, useExisting: AXPaintContainerComponent },\n { provide: AXClearableComponent, useExisting: AXPaintContainerComponent },\n { provide: AXValuableComponent, useExisting: AXPaintContainerComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXPaintContainerComponent),\n multi: true,\n },\n ],\n})\nexport class AXPaintContainerComponent extends classes(MXInputBaseValueComponent<string>, MXLookComponent) {}\n","<div class=\"ax-editor-container ax-look-{{ look }}\">\n <ng-content></ng-content>\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n *paint toolbar\n * @category Components\n */\n@Component({\n selector: 'ax-paint-toolbar',\n templateUrl: './paint-toolbar.component.html',\n styleUrl: './paint-toolbar.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintToolbarComponent {}\n","<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-toolbar-container\">\n <ng-content></ng-content>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n","import { Component, HostBinding, ViewEncapsulation, inject, signal } from '@angular/core';\nimport { AXPaintService } from '../../paint.service';\n\n/**\n * paint color picker.\n * @category Components\n */\n@Component({\n selector: 'ax-paint-color-picker',\n templateUrl: './paint-color-picker.component.html',\n styleUrl: './paint-color-picker.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintColorPickerComponent {\n /** @ignore */\n protected service = inject(AXPaintService);\n\n /** @ignore */\n protected selectedColor = signal('rgb(12, 12, 12)');\n\n /** @ignore */\n protected changeColorHandler(e: string) {\n this.service.penColor.set(e);\n this.selectedColor.set(e);\n }\n\n @HostBinding('style.marginInline')\n get __hostClass(): string {\n return `.5rem`;\n }\n}\n","<ax-color-box\n axTooltip=\"Color Picker\"\n axTooltipPlacement=\"top\"\n look=\"outline\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n","import { AXPlacement } from '@acorex/components/common';\nimport { AXPopoverCloseTrigger, AXPopoverOpenTrigger } from '@acorex/components/popover';\nimport { Component, HostBinding, inject, signal, ViewEncapsulation } from '@angular/core';\nimport { AXPaintService } from '../../paint.service';\n\n/**\n * paint mode.\n * @category Components\n */\n@Component({\n selector: 'ax-paint-pen-mode-changer',\n templateUrl: './paint-pen-mode-changer.component.html',\n styleUrl: './paint-pen-mode-changer.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintPenModeChangerComponent {\n /** @ignore */\n protected service = inject(AXPaintService);\n\n /** @ignore */\n protected value = 10;\n\n /** @ignore */\n protected popoverOption: {\n openOn: AXPopoverOpenTrigger;\n closeOn: AXPopoverCloseTrigger;\n placement: AXPlacement;\n offsetX: number;\n offsetY: number;\n } = {\n openOn: 'click',\n closeOn: 'clickOut',\n placement: 'top',\n offsetX: 0,\n offsetY: 0,\n };\n\n /** @ignore */\n protected selectedPenType = signal<'pen' | 'highlight' | 'eraser'>('pen');\n\n /** @ignore */\n protected penTypeHandler(e: 'pen' | 'highlight' | 'eraser') {\n this.service.penType.set(e);\n }\n\n /** @ignore */\n protected clear() {\n this.service.toggleClear.update((prev) => !prev);\n }\n\n @HostBinding('style.marginInline')\n get __hostClass(): string {\n return `.5rem`;\n }\n\n /** @ignore */\n protected valueHandler(e: number) {\n this.service.lineWidth.set(e);\n }\n}\n","<ax-button axTooltip=\"Draw Utilities\" axTooltipPlacement=\"top\" look=\"blank\" #alignPop>\n @switch (service.penType()) {\n @case ('pen') {\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n }\n @case ('highlight') {\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n }\n @case ('eraser') {\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n }\n }\n</ax-button>\n\n<ax-button axTooltip=\"Reset Changes\" axTooltipPlacement=\"top\" (click)=\"clear()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n</ax-button>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"alignPop\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-button\n (click)=\"penTypeHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'pen' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'highlight' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('eraser')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'eraser' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n </ax-button>\n\n <div class=\"ax-paint-width-slider\">\n <ax-range-slider\n [min]=\"2\"\n [max]=\"20\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"valueHandler($event)\"\n ></ax-range-slider>\n </div>\n </div>\n</ax-popover>\n","import { isBrowser } from '@acorex/core/platform';\nimport {\n afterNextRender,\n Component,\n effect,\n ElementRef,\n HostBinding,\n inject,\n input,\n OnDestroy,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXPaintContainerComponent } from '../paint-container/paint-container.component';\nimport { AXPaintService } from '../paint.service';\n\n/**\n * @category Components\n * paint view\n */\n@Component({\n selector: 'ax-paint-view',\n templateUrl: './paint-view.component.html',\n styleUrl: './paint-view.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintViewComponent implements OnDestroy {\n /** @ignore */\n parent = inject(AXPaintContainerComponent);\n\n /** @ignore */\n protected service = inject(AXPaintService);\n\n /**\n * Specifies the class that pass to component.\n *\n */\n customClass = input<string>('', { alias: 'class' });\n\n /** @ignore */\n protected canvasElem = viewChild<ElementRef<HTMLCanvasElement>>('c');\n\n /** @ignore */\n protected ctx = signal<CanvasRenderingContext2D>(null);\n\n /** @ignore */\n protected isPainting = signal(false);\n\n /** @ignore */\n protected isUserInteract = signal(false);\n\n /** @ignore */\n constructor() {\n afterNextRender(() => {\n this.ctx.set(this.canvasElem().nativeElement.getContext('2d'));\n this.ctx().canvas.width = this.getBoundingCanvasHandler().width;\n this.ctx().canvas.height = this.getBoundingCanvasHandler().height;\n this.ctx().lineJoin = 'round';\n this.ctx().lineCap = 'round';\n this.ctx().strokeStyle = this.service.penColor();\n this.ctx().lineWidth = this.service.lineWidth();\n });\n\n effect(\n () => {\n this.isUserInteract.set(false);\n this.service.toggleClear();\n this.ctx()?.clearRect(\n 0,\n 0,\n this.getBoundingCanvasHandler()?.width,\n this.getBoundingCanvasHandler()?.height,\n );\n },\n { allowSignalWrites: true },\n );\n\n if (isBrowser()) {\n window.addEventListener('resize', this.resizeEventHandler.bind(this));\n }\n }\n\n /** @ignore */\n ngOnDestroy(): void {\n if (isBrowser()) {\n window.removeEventListener('resize', this.resizeEventHandler);\n }\n }\n\n /** @ignore */\n protected resizeEventHandler() {\n this.ctx().canvas.width = this.getBoundingCanvasHandler()?.width;\n this.ctx().canvas.height = this.getBoundingCanvasHandler()?.height;\n }\n\n /** @ignore */\n protected penConfigHandler(penType: 'eraser' | 'pen' | 'highlight') {\n switch (penType) {\n case 'pen':\n this.ctx().globalAlpha = 1;\n this.ctx().globalCompositeOperation = 'source-over';\n break;\n case 'eraser':\n this.ctx().globalAlpha = 1;\n this.ctx().globalCompositeOperation = 'destination-out';\n break;\n case 'highlight':\n this.ctx().globalAlpha = 0.008;\n this.ctx().globalCompositeOperation = 'source-over';\n break;\n }\n }\n\n /** @ignore */\n protected getBoundingCanvasHandler() {\n return this.canvasElem().nativeElement.getBoundingClientRect();\n }\n\n /** @ignore */\n protected mouseDownHandler(e: MouseEvent) {\n this.isPainting.set(true);\n this.isUserInteract.set(true);\n\n this.penConfigHandler(this.service.penType());\n\n this.ctx().strokeStyle = this.service.penColor();\n this.ctx().lineWidth = this.service.lineWidth();\n\n this.ctx().beginPath();\n this.ctx().moveTo(e.offsetX, e.offsetY);\n this.ctx().lineTo(e.offsetX, e.offsetY);\n this.ctx().stroke();\n }\n\n /** @ignore */\n protected mouseMoveHandler(e: MouseEvent) {\n if (this.isPainting()) {\n this.ctx().lineTo(e.offsetX, e.offsetY);\n this.ctx().stroke();\n }\n }\n\n /** @ignore */\n protected mouseUpHandler() {\n this.ctx().closePath();\n this.isPainting.set(false);\n }\n\n /** @ignore */\n protected touchStartHandler(e: TouchEvent) {\n const offsetX = e.touches[0].clientX - this.getBoundingCanvasHandler().left;\n const offsetY = e.touches[0].clientY - this.getBoundingCanvasHandler().top;\n\n this.isPainting.set(true);\n this.isUserInteract.set(true);\n\n this.penConfigHandler(this.service.penType());\n\n this.ctx().strokeStyle = this.service.penColor();\n this.ctx().lineWidth = this.service.lineWidth();\n\n this.ctx().beginPath();\n this.ctx().moveTo(offsetX, offsetY);\n this.ctx().lineTo(offsetX, offsetY);\n this.ctx().stroke();\n }\n\n /** @ignore */\n protected touchMoveHandler(e: TouchEvent) {\n e.preventDefault(); // prevent page from scroll\n if (this.isPainting()) {\n const offsetX = e.touches[0].clientX - this.getBoundingCanvasHandler().left;\n const offsetY = e.touches[0].clientY - this.getBoundingCanvasHandler().top;\n this.ctx().lineTo(offsetX, offsetY);\n this.ctx().stroke();\n }\n }\n\n /** @ignore */\n protected touchEndHandler() {\n this.ctx().closePath();\n this.isPainting.set(false);\n }\n\n /**\n * @param e - output file type\n */\n getOutPut(e: 'image/webp' | 'image/png' | 'image/jpeg') {\n const base64 = this.canvasElem().nativeElement.toDataURL(e, 0.1);\n if (this.isUserInteract()) {\n this.parent.commitValue(base64);\n } else {\n this.parent.commitValue(null);\n }\n }\n\n @HostBinding('class')\n get __hostClass(): string {\n return `${this.customClass()}`;\n }\n}\n","<canvas\n #c\n tabindex=\"1\"\n (mousedown)=\"mouseDownHandler($event)\"\n (mouseup)=\"mouseUpHandler()\"\n (mousemove)=\"mouseMoveHandler($event)\"\n (touchstart)=\"touchStartHandler($event)\"\n (touchend)=\"touchEndHandler()\"\n (touchmove)=\"touchMoveHandler($event)\"\n class=\"ax-canvas-element\"\n>\n</canvas>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXColorBoxModule } from '@acorex/components/color-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXRangeSliderModule } from '@acorex/components/range-slider';\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\nimport { AXTooltipModule } from '@acorex/components/tooltip';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXPaintContainerComponent } from './paint/paint-container/paint-container.component';\nimport { AXPaintToolbarComponent } from './paint/paint-toolbar/paint-toolbar.component';\nimport { AXPaintColorPickerComponent } from './paint/paint-tools/paint-color-picker/paint-color-picker.component';\nimport { AXPaintPenModeChangerComponent } from './paint/paint-tools/paint-pen-mode-changer/paint-pen-mode-changer.component';\nimport { AXPaintViewComponent } from './paint/paint-view/paint-view.component';\n\nconst COMPONENT = [\n AXPaintContainerComponent,\n AXPaintToolbarComponent,\n AXPaintViewComponent,\n AXPaintColorPickerComponent,\n AXPaintPenModeChangerComponent,\n];\n\nconst MODULES = [\n FormsModule,\n AXRangeSliderModule,\n AXSelectBoxModule,\n AXButtonModule,\n AXColorBoxModule,\n AXPopoverModule,\n AXDecoratorModule,\n AXTooltipModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXPaintModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i3","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAGa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAA0C,EAAE,CAAC;AAC9D,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAS,EAAE,CAAC;AAC9B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAiC,KAAK,CAAC;AACvD,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;AAC5B;8GALY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAd,cAAc,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B;;;ACWD;;;AAGG;AAoBG,MAAO,yBAA0B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AAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACvCD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-paint.mjs","sources":["../../../../libs/components/paint/src/lib/paint/paint.service.ts","../../../../libs/components/paint/src/lib/paint/paint-container/paint-container.component.ts","../../../../libs/components/paint/src/lib/paint/paint-container/paint-container.component.html","../../../../libs/components/paint/src/lib/paint/paint-toolbar/paint-toolbar.component.ts","../../../../libs/components/paint/src/lib/paint/paint-toolbar/paint-toolbar.component.html","../../../../libs/components/paint/src/lib/paint/paint-tools/paint-color-picker/paint-color-picker.component.ts","../../../../libs/components/paint/src/lib/paint/paint-tools/paint-color-picker/paint-color-picker.component.html","../../../../libs/components/paint/src/lib/paint/paint-tools/paint-pen-mode-changer/paint-pen-mode-changer.component.ts","../../../../libs/components/paint/src/lib/paint/paint-tools/paint-pen-mode-changer/paint-pen-mode-changer.component.html","../../../../libs/components/paint/src/lib/paint/paint-view/paint-view.component.ts","../../../../libs/components/paint/src/lib/paint/paint-view/paint-view.component.html","../../../../libs/components/paint/src/lib/paint.module.ts","../../../../libs/components/paint/src/acorex-components-paint.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\n\n@Injectable()\nexport class AXPaintService {\n penColor = signal<string | CanvasGradient | CanvasPattern>('');\n lineWidth = signal<number>(10);\n penType = signal<'pen' | 'highlight' | 'eraser'>('pen');\n toggleClear = signal(false);\n}\n","import {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport { Component, ViewEncapsulation, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\nimport { AXPaintService } from '../paint.service';\n\n/**\n * paint container.\n * @category Components\n */\n@Component({\n selector: 'ax-paint-container',\n templateUrl: './paint-container.component.html',\n styleUrl: './paint-container.component.scss',\n encapsulation: ViewEncapsulation.None,\n inputs: ['look'],\n providers: [\n AXPaintService,\n { provide: AXComponent, useExisting: AXPaintContainerComponent },\n { provide: AXFocusableComponent, useExisting: AXPaintContainerComponent },\n { provide: AXClearableComponent, useExisting: AXPaintContainerComponent },\n { provide: AXValuableComponent, useExisting: AXPaintContainerComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXPaintContainerComponent),\n multi: true,\n },\n ],\n})\nexport class AXPaintContainerComponent extends classes(MXInputBaseValueComponent<string>, MXLookComponent) {}\n","<div class=\"ax-editor-container ax-look-{{ look }}\">\n <ng-content></ng-content>\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n *paint toolbar\n * @category Components\n */\n@Component({\n selector: 'ax-paint-toolbar',\n templateUrl: './paint-toolbar.component.html',\n styleUrl: './paint-toolbar.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintToolbarComponent {}\n","<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-toolbar-container\">\n <ng-content></ng-content>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n","import { Component, HostBinding, ViewEncapsulation, inject, signal } from '@angular/core';\nimport { AXPaintService } from '../../paint.service';\n\n/**\n * paint color picker.\n * @category Components\n */\n@Component({\n selector: 'ax-paint-color-picker',\n templateUrl: './paint-color-picker.component.html',\n styleUrl: './paint-color-picker.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintColorPickerComponent {\n /** @ignore */\n protected service = inject(AXPaintService);\n\n /** @ignore */\n protected selectedColor = signal('rgb(12, 12, 12)');\n\n /** @ignore */\n protected changeColorHandler(e: string) {\n this.service.penColor.set(e);\n this.selectedColor.set(e);\n }\n\n @HostBinding('style.marginInline')\n get __hostClass(): string {\n return `.5rem`;\n }\n}\n","<ax-color-box\n axTooltip=\"Color Picker\"\n axTooltipPlacement=\"top\"\n look=\"outline\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n","import { AXPlacement } from '@acorex/components/common';\nimport { AXPopoverCloseTrigger, AXPopoverOpenTrigger } from '@acorex/components/popover';\nimport { Component, HostBinding, inject, signal, ViewEncapsulation } from '@angular/core';\nimport { AXPaintService } from '../../paint.service';\n\n/**\n * paint mode.\n * @category Components\n */\n@Component({\n selector: 'ax-paint-pen-mode-changer',\n templateUrl: './paint-pen-mode-changer.component.html',\n styleUrl: './paint-pen-mode-changer.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintPenModeChangerComponent {\n /** @ignore */\n protected service = inject(AXPaintService);\n\n /** @ignore */\n protected value = 10;\n\n /** @ignore */\n protected popoverOption: {\n openOn: AXPopoverOpenTrigger;\n closeOn: AXPopoverCloseTrigger;\n placement: AXPlacement;\n offsetX: number;\n offsetY: number;\n } = {\n openOn: 'click',\n closeOn: 'clickOut',\n placement: 'top',\n offsetX: 0,\n offsetY: 0,\n };\n\n /** @ignore */\n protected selectedPenType = signal<'pen' | 'highlight' | 'eraser'>('pen');\n\n /** @ignore */\n protected penTypeHandler(e: 'pen' | 'highlight' | 'eraser') {\n this.service.penType.set(e);\n }\n\n /** @ignore */\n protected clear() {\n this.service.toggleClear.update((prev) => !prev);\n }\n\n @HostBinding('style.marginInline')\n get __hostClass(): string {\n return `.5rem`;\n }\n\n /** @ignore */\n protected valueHandler(e: number) {\n this.service.lineWidth.set(e);\n }\n}\n","<ax-button axTooltip=\"Draw Utilities\" axTooltipPlacement=\"top\" look=\"blank\" #alignPop>\n @switch (service.penType()) {\n @case ('pen') {\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n }\n @case ('highlight') {\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n }\n @case ('eraser') {\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n }\n }\n</ax-button>\n\n<ax-button axTooltip=\"Reset Changes\" axTooltipPlacement=\"top\" (click)=\"clear()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n</ax-button>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"alignPop\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-button\n (click)=\"penTypeHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'pen' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'highlight' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('eraser')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'eraser' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n </ax-button>\n\n <div class=\"ax-paint-width-slider\">\n <ax-range-slider\n [min]=\"2\"\n [max]=\"20\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"valueHandler($event)\"\n ></ax-range-slider>\n </div>\n </div>\n</ax-popover>\n","import { isBrowser } from '@acorex/core/platform';\nimport {\n afterNextRender,\n Component,\n effect,\n ElementRef,\n HostBinding,\n inject,\n input,\n OnDestroy,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXPaintContainerComponent } from '../paint-container/paint-container.component';\nimport { AXPaintService } from '../paint.service';\n\n/**\n * @category Components\n * paint view\n */\n@Component({\n selector: 'ax-paint-view',\n templateUrl: './paint-view.component.html',\n styleUrl: './paint-view.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintViewComponent implements OnDestroy {\n /** @ignore */\n parent = inject(AXPaintContainerComponent);\n\n /** @ignore */\n protected service = inject(AXPaintService);\n\n /**\n * Specifies the class that pass to component.\n *\n */\n customClass = input<string>('', { alias: 'class' });\n\n /** @ignore */\n protected canvasElem = viewChild<ElementRef<HTMLCanvasElement>>('c');\n\n /** @ignore */\n protected ctx = signal<CanvasRenderingContext2D>(null);\n\n /** @ignore */\n protected isPainting = signal(false);\n\n /** @ignore */\n protected isUserInteract = signal(false);\n\n /** @ignore */\n constructor() {\n afterNextRender(() => {\n this.ctx.set(this.canvasElem().nativeElement.getContext('2d'));\n this.ctx().canvas.width = this.getBoundingCanvasHandler().width;\n this.ctx().canvas.height = this.getBoundingCanvasHandler().height;\n this.ctx().lineJoin = 'round';\n this.ctx().lineCap = 'round';\n this.ctx().strokeStyle = this.service.penColor();\n this.ctx().lineWidth = this.service.lineWidth();\n });\n\n effect(\n () => {\n this.isUserInteract.set(false);\n this.service.toggleClear();\n this.ctx()?.clearRect(\n 0,\n 0,\n this.getBoundingCanvasHandler()?.width,\n this.getBoundingCanvasHandler()?.height,\n );\n },\n { allowSignalWrites: true },\n );\n\n if (isBrowser()) {\n window.addEventListener('resize', this.resizeEventHandler.bind(this));\n }\n }\n\n /** @ignore */\n ngOnDestroy(): void {\n if (isBrowser()) {\n window.removeEventListener('resize', this.resizeEventHandler);\n }\n }\n\n /** @ignore */\n protected resizeEventHandler() {\n this.ctx().canvas.width = this.getBoundingCanvasHandler()?.width;\n this.ctx().canvas.height = this.getBoundingCanvasHandler()?.height;\n }\n\n /** @ignore */\n protected penConfigHandler(penType: 'eraser' | 'pen' | 'highlight') {\n switch (penType) {\n case 'pen':\n this.ctx().globalAlpha = 1;\n this.ctx().globalCompositeOperation = 'source-over';\n break;\n case 'eraser':\n this.ctx().globalAlpha = 1;\n this.ctx().globalCompositeOperation = 'destination-out';\n break;\n case 'highlight':\n this.ctx().globalAlpha = 0.008;\n this.ctx().globalCompositeOperation = 'source-over';\n break;\n }\n }\n\n /** @ignore */\n protected getBoundingCanvasHandler() {\n return this.canvasElem().nativeElement.getBoundingClientRect();\n }\n\n /** @ignore */\n protected mouseDownHandler(e: MouseEvent) {\n this.isPainting.set(true);\n this.isUserInteract.set(true);\n\n this.penConfigHandler(this.service.penType());\n\n this.ctx().strokeStyle = this.service.penColor();\n this.ctx().lineWidth = this.service.lineWidth();\n\n this.ctx().beginPath();\n this.ctx().moveTo(e.offsetX, e.offsetY);\n this.ctx().lineTo(e.offsetX, e.offsetY);\n this.ctx().stroke();\n }\n\n /** @ignore */\n protected mouseMoveHandler(e: MouseEvent) {\n if (this.isPainting()) {\n this.ctx().lineTo(e.offsetX, e.offsetY);\n this.ctx().stroke();\n }\n }\n\n /** @ignore */\n protected mouseUpHandler() {\n this.ctx().closePath();\n this.isPainting.set(false);\n }\n\n /** @ignore */\n protected touchStartHandler(e: TouchEvent) {\n const offsetX = e.touches[0].clientX - this.getBoundingCanvasHandler().left;\n const offsetY = e.touches[0].clientY - this.getBoundingCanvasHandler().top;\n\n this.isPainting.set(true);\n this.isUserInteract.set(true);\n\n this.penConfigHandler(this.service.penType());\n\n this.ctx().strokeStyle = this.service.penColor();\n this.ctx().lineWidth = this.service.lineWidth();\n\n this.ctx().beginPath();\n this.ctx().moveTo(offsetX, offsetY);\n this.ctx().lineTo(offsetX, offsetY);\n this.ctx().stroke();\n }\n\n /** @ignore */\n protected touchMoveHandler(e: TouchEvent) {\n e.preventDefault(); // prevent page from scroll\n if (this.isPainting()) {\n const offsetX = e.touches[0].clientX - this.getBoundingCanvasHandler().left;\n const offsetY = e.touches[0].clientY - this.getBoundingCanvasHandler().top;\n this.ctx().lineTo(offsetX, offsetY);\n this.ctx().stroke();\n }\n }\n\n /** @ignore */\n protected touchEndHandler() {\n this.ctx().closePath();\n this.isPainting.set(false);\n }\n\n /**\n * @param e - output file type\n */\n getOutPut(e: 'image/webp' | 'image/png' | 'image/jpeg') {\n const base64 = this.canvasElem().nativeElement.toDataURL(e, 0.1);\n if (this.isUserInteract()) {\n this.parent.commitValue(base64);\n } else {\n this.parent.commitValue(null);\n }\n }\n\n @HostBinding('class')\n get __hostClass(): string {\n return `${this.customClass()}`;\n }\n}\n","<canvas\n #c\n tabindex=\"1\"\n (mousedown)=\"mouseDownHandler($event)\"\n (mouseup)=\"mouseUpHandler()\"\n (mousemove)=\"mouseMoveHandler($event)\"\n (touchstart)=\"touchStartHandler($event)\"\n (touchend)=\"touchEndHandler()\"\n (touchmove)=\"touchMoveHandler($event)\"\n class=\"ax-canvas-element\"\n>\n</canvas>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXColorBoxModule } from '@acorex/components/color-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXRangeSliderModule } from '@acorex/components/range-slider';\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\nimport { AXTooltipModule } from '@acorex/components/tooltip';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXPaintContainerComponent } from './paint/paint-container/paint-container.component';\nimport { AXPaintToolbarComponent } from './paint/paint-toolbar/paint-toolbar.component';\nimport { AXPaintColorPickerComponent } from './paint/paint-tools/paint-color-picker/paint-color-picker.component';\nimport { AXPaintPenModeChangerComponent } from './paint/paint-tools/paint-pen-mode-changer/paint-pen-mode-changer.component';\nimport { AXPaintViewComponent } from './paint/paint-view/paint-view.component';\n\nconst COMPONENT = [\n AXPaintContainerComponent,\n AXPaintToolbarComponent,\n AXPaintViewComponent,\n AXPaintColorPickerComponent,\n AXPaintPenModeChangerComponent,\n];\n\nconst MODULES = [\n FormsModule,\n AXRangeSliderModule,\n AXSelectBoxModule,\n AXButtonModule,\n AXColorBoxModule,\n AXPopoverModule,\n AXDecoratorModule,\n AXTooltipModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXPaintModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i3","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAGa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAA0C,EAAE,CAAC;AAC9D,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAS,EAAE,CAAC;AAC9B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAiC,KAAK,CAAC;AACvD,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;AAC5B;8GALY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAd,cAAc,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B;;;ACWD;;;AAGG;AAoBG,MAAO,yBAA0B,SAAQ,OAAO,EAAC,yBAAiC,GAAE,eAAe,CAAC,CAAA;8GAA7F,yBAAyB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,EAbzB,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA;YACT,cAAc;AACd,YAAA,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,yBAAyB,EAAE;AAChE,YAAA,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,yBAAyB,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AAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBAxBxB,yBAAyB;YACzB,uBAAuB;YACvB,oBAAoB;YACpB,2BAA2B;AAC3B,YAAA,8BAA8B,aAI9B,WAAW;YACX,mBAAmB;YACnB,iBAAiB;YACjB,cAAc;YACd,gBAAgB;YAChB,eAAe;YACf,iBAAiB;AACjB,YAAA,eAAe,aAff,yBAAyB;YACzB,uBAAuB;YACvB,oBAAoB;YACpB,2BAA2B;YAC3B,8BAA8B,CAAA,EAAA,CAAA,CAAA;AAoBnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAJX,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACvCD;;AAEG;;;;"}
|
@@ -15,7 +15,7 @@ import { CommonModule } from '@angular/common';
|
|
15
15
|
class AXPopoverComponent extends MXBaseComponent {
|
16
16
|
constructor() {
|
17
17
|
super(...arguments);
|
18
|
-
this
|
18
|
+
this.#platform = inject(AXPlatform);
|
19
19
|
/** @ignore */
|
20
20
|
this._platform = inject(AXPlatform);
|
21
21
|
/** @ignore */
|
@@ -77,6 +77,7 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
77
77
|
*/
|
78
78
|
this.onClosed = new EventEmitter();
|
79
79
|
}
|
80
|
+
#platform;
|
80
81
|
/**
|
81
82
|
* Gets or sets the horizontal offset and updates it accordingly.
|
82
83
|
*/
|
@@ -361,7 +362,12 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
361
362
|
positionStrategy: this._overlay.position().global().bottom().centerHorizontally(),
|
362
363
|
disposeOnNavigation: true,
|
363
364
|
scrollStrategy: this._overlay.scrollStrategies.block(),
|
364
|
-
panelClass: [
|
365
|
+
panelClass: [
|
366
|
+
'ax-actionsheet-base',
|
367
|
+
'ax-animate-slideInUp',
|
368
|
+
'ax-animate-faster',
|
369
|
+
this.panelClass ? this.panelClass : this.#platform.isDark() ? 'ax-dark' : '',
|
370
|
+
],
|
365
371
|
hasBackdrop: true,
|
366
372
|
width: '100%',
|
367
373
|
});
|
@@ -375,7 +381,7 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
375
381
|
.withPush(false),
|
376
382
|
scrollStrategy: this._overlay.scrollStrategies.noop(),
|
377
383
|
disposeOnNavigation: true,
|
378
|
-
panelClass: ['ax-animate-fadeIn', 'ax-animate-faster'],
|
384
|
+
panelClass: ['ax-animate-fadeIn', 'ax-animate-faster', this.#platform.isDark() ? 'ax-dark' : ''],
|
379
385
|
maxHeight: 'unset',
|
380
386
|
hasBackdrop: this.hasBackdrop,
|
381
387
|
backdropClass: [this.backdropClass || 'cdk-overlay-transparent-backdrop'],
|
@@ -476,7 +482,7 @@ class AXPopoverComponent extends MXBaseComponent {
|
|
476
482
|
this._overlayRef?.dispose();
|
477
483
|
}
|
478
484
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPopoverComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
479
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPopoverComponent, selector: "ax-popover", inputs: { offsetX: "offsetX", offsetY: "offsetY", target: "target", placement: "placement", content: "content", openOn: "openOn", closeOn: "closeOn", hasBackdrop: "hasBackdrop", openAfter: "openAfter", closeAfter: "closeAfter", backdropClass: "backdropClass", adaptivityEnabled: "adaptivityEnabled" }, outputs: { onOpened: "onOpened", onClosed: "onClosed" }, providers: [{ provide: AXFocusableComponent, useExisting: AXPopoverComponent }], viewQueries: [{ propertyName: "_baseTemplate", first: true, predicate: ["baseTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #baseTemplate>\n <ng-content></ng-content>\n</ng-template>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
485
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPopoverComponent, selector: "ax-popover", inputs: { offsetX: "offsetX", offsetY: "offsetY", target: "target", placement: "placement", content: "content", openOn: "openOn", closeOn: "closeOn", hasBackdrop: "hasBackdrop", openAfter: "openAfter", closeAfter: "closeAfter", backdropClass: "backdropClass", panelClass: "panelClass", adaptivityEnabled: "adaptivityEnabled" }, outputs: { onOpened: "onOpened", onClosed: "onClosed" }, providers: [{ provide: AXFocusableComponent, useExisting: AXPopoverComponent }], viewQueries: [{ propertyName: "_baseTemplate", first: true, predicate: ["baseTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #baseTemplate>\n <ng-content></ng-content>\n</ng-template>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
480
486
|
}
|
481
487
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPopoverComponent, decorators: [{
|
482
488
|
type: Component,
|
@@ -506,6 +512,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
506
512
|
type: Input
|
507
513
|
}], backdropClass: [{
|
508
514
|
type: Input
|
515
|
+
}], panelClass: [{
|
516
|
+
type: Input
|
509
517
|
}], adaptivityEnabled: [{
|
510
518
|
type: Input
|
511
519
|
}], onOpened: [{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-popover.mjs","sources":["../../../../libs/components/popover/src/lib/popover.component.ts","../../../../libs/components/popover/src/lib/popover.component.html","../../../../libs/components/popover/src/lib/popover.module.ts","../../../../libs/components/popover/src/acorex-components-popover.ts"],"sourcesContent":["import {\n AXConnectedPosition,\n AXEvent,\n AXFocusableComponent,\n AXPlacementType,\n MXBaseComponent,\n convertToPlacement,\n} from '@acorex/components/common';\nimport { AXPlatform, isBrowser } from '@acorex/core/platform';\nimport { AXHtmlUtil } from '@acorex/core/utils';\nimport { Overlay, OverlayRef, PositionStrategy } from '@angular/cdk/overlay';\nimport { ComponentPortal, ComponentType, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { Subscription, delay, fromEvent } from 'rxjs';\n\nexport type AXPopoverOpenTrigger = 'manual' | 'click' | 'hover' | 'toggle';\n\nexport type AXPopoverCloseTrigger = 'manual' | 'clickOut' | 'leave';\n\n/**\n * @category Components\n * A popover component with custom encapsulation and change detection settings.\n */\n@Component({\n selector: 'ax-popover',\n templateUrl: './popover.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXFocusableComponent, useExisting: AXPopoverComponent }],\n})\nexport class AXPopoverComponent extends MXBaseComponent {\n private platformService = inject(AXPlatform);\n\n /** @ignore */\n private _platform: AXPlatform = inject(AXPlatform);\n\n /** @ignore */\n private _overlay: Overlay = inject(Overlay);\n\n /** @ignore */\n private _overlayRef!: OverlayRef;\n\n /** @ignore */\n private _isMouseOverButton = false;\n\n /** @ignore */\n private _isMouseOverTooltip = false;\n\n /** @ignore */\n private _lastActiveElement: HTMLElement;\n\n /** @ignore */\n private _targetEvents: {\n mouseenter?: Subscription;\n mouseleave?: Subscription;\n click?: Subscription;\n } = {};\n\n /** @ignore */\n private _overlayEvents: {\n attach?: Subscription;\n detach?: Subscription;\n scroll?: Subscription;\n outside?: Subscription;\n } = {};\n\n //\n\n /** @ignore */\n private _offsetX = 0;\n\n /**\n * Gets or sets the horizontal offset and updates it accordingly.\n */\n @Input()\n\n /**\n * Gets the horizontal offset value.\n */\n public get offsetX(): number {\n return this._offsetX;\n }\n\n /**\n * Sets the horizontal offset and updates it with a callback.\n */\n public set offsetX(v: number) {\n this.setOption({\n name: 'offsetX',\n value: v,\n afterCallback: () => {\n this.updateOffset();\n },\n });\n }\n //\n\n /** @ignore */\n private _offsetY = 0;\n\n /**\n * Vertical offset with update callback.\n */\n @Input()\n\n /**\n * Gets the vertical offset of the component.\n */\n public get offsetY(): number {\n return this._offsetY;\n }\n\n /**\n * Sets the vertical offset and updates the component position.\n */\n public set offsetY(v: number) {\n this.setOption({\n name: 'offsetY',\n value: v,\n afterCallback: () => {\n this.updateOffset();\n },\n });\n }\n\n //\n\n /** @ignore */\n private _target!: HTMLElement;\n\n /**\n * Gets or sets the target element, supporting HTMLElement, ElementRef, or MXBaseComponent.\n */\n @Input()\n\n /**\n * Gets the current target element.\n */\n public get target(): HTMLElement | ElementRef | MXBaseComponent {\n return this._target;\n }\n\n /**\n * Sets the target element and updates event bindings.\n */\n public set target(v: HTMLElement | ElementRef | MXBaseComponent) {\n this.removeTargetEvents();\n if (v instanceof HTMLElement) this._target = v;\n else if (v instanceof ElementRef) this._target = v.nativeElement;\n else if (typeof v?.getHostElement == 'function') this._target = v.getHostElement();\n //\n this.bindTargetEvents();\n }\n //\n\n /** @ignore */\n private _defautPlacements: AXConnectedPosition[] = convertToPlacement('bottom-start');\n\n /** @ignore */\n private _placements: AXConnectedPosition[] = [...this._defautPlacements];\n\n /** @ignore */\n private _placement: AXPlacementType = this._placements;\n\n /**\n * Gets or sets the component's placement and updates position settings.\n */\n @Input()\n\n /**\n * Gets the current placement of the component.\n */\n public get placement(): AXPlacementType {\n return this._placement;\n }\n\n /**\n * Sets the component's placement and updates its position settings.\n */\n public set placement(v: AXPlacementType) {\n this.setOption({\n name: 'placement',\n value: v,\n afterCallback: (o, n) => {\n const converted = convertToPlacement(n);\n this._placements = converted.length ? converted : this._defautPlacements;\n this.updateOffset();\n this.updatePositionStrategy();\n },\n });\n }\n //\n\n /** @ignore */\n private _portal: Portal<unknown>;\n\n /** @ignore */\n private _componentRef: ComponentRef<unknown>;\n\n /**\n * Gets the reference to the component.\n */\n public get componentRef(): ComponentRef<unknown> {\n return this._componentRef;\n }\n\n /**\n * Holds the context data for the component.\n */\n public context: unknown;\n\n //\n\n /** @ignore */\n @ViewChild('baseTemplate', { static: true })\n _baseTemplate: TemplateRef<unknown>;\n //\n\n /**\n * Defines the content to be displayed, which can be a template or a component.\n */\n @Input()\n content: TemplateRef<unknown> | ComponentType<unknown>;\n //\n\n /** @ignore */\n private _openOn: AXPopoverOpenTrigger = 'toggle';\n\n /**\n * Gets or sets the trigger for opening the popover and updates target events.\n */\n @Input()\n\n /**\n * Gets the trigger for opening the popover.\n */\n public get openOn(): AXPopoverOpenTrigger {\n return this._openOn;\n }\n\n /**\n * Sets the trigger for opening the popover and updates target events.\n */\n public set openOn(v: AXPopoverOpenTrigger) {\n this.setOption({\n name: 'openOn',\n value: v,\n afterCallback: () => {\n this.bindTargetEvents();\n },\n });\n }\n //\n\n /** @ignore */\n private _closeOn: AXPopoverCloseTrigger = 'clickOut';\n\n /**\n * Gets or sets the trigger for closing the popover.\n */\n @Input()\n public get closeOn(): AXPopoverCloseTrigger {\n return this._closeOn;\n }\n\n /**\n * Sets the trigger for closing the popover and rebinds target events.\n * @param v\n */\n public set closeOn(v: AXPopoverCloseTrigger) {\n this.setOption({\n name: 'closeOn',\n value: v,\n afterCallback: () => {\n this.bindTargetEvents();\n },\n });\n }\n\n //\n\n /**\n * Determines if a backdrop should be displayed behind the popover.\n */\n @Input()\n hasBackdrop = false;\n //\n\n /**\n * Delay in milliseconds before the popover opens after a trigger event.\n */\n @Input()\n openAfter = 200;\n\n /**\n * Delay in milliseconds before the popover closes after a trigger event.\n */\n @Input()\n closeAfter = 200;\n\n /**\n * CSS class to apply to the backdrop element.\n */\n @Input()\n backdropClass: string;\n\n /**\n * Enables or disables adaptivity.\n */\n @Input()\n adaptivityEnabled = false;\n //\n\n /**\n * Emits when the component is opened.\n * @event\n */\n @Output()\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /**\n * Emits when the component is closed.\n * @event\n */\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /** @ignore */\n private _emitOnOpenedEvent() {\n this.onOpened.emit({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n\n /** @ignore */\n private _emitOnClosedEvent() {\n this.onClosed.emit({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n //\n\n /** @ignore */\n protected _handleMouseEnter(e: MouseEvent) {\n this._isMouseOverTooltip = true;\n }\n\n /** @ignore */\n protected _handleMouseLeave(e: MouseEvent) {\n this._isMouseOverTooltip = false;\n setTimeout(() => {\n if (!this._isMouseOverButton && this.closeOn == 'leave') {\n this.close();\n }\n }, 250);\n }\n\n /** @ignore */\n private removeTargetEvents(): void {\n Object.entries(this._targetEvents).forEach((e) => {\n e[1].unsubscribe();\n });\n }\n\n /** @ignore */\n private bindTargetEvents() {\n this.removeTargetEvents();\n if (!this._target) return;\n const targetMouseEnter$ = fromEvent(this._target, 'mouseenter');\n const targetMouseLeave$ = fromEvent(this._target, 'mouseleave');\n\n if (this.openOn == 'hover') {\n this._targetEvents.mouseenter = targetMouseEnter$.pipe(delay(this.openAfter)).subscribe(() => {\n this._isMouseOverButton = true;\n this.open();\n });\n }\n\n if (this.closeOn == 'leave') {\n this._targetEvents.mouseleave = targetMouseLeave$.pipe(delay(this.closeAfter)).subscribe(() => {\n this._isMouseOverButton = false;\n if (!this._isMouseOverTooltip) {\n this.close();\n }\n });\n }\n\n if (this.openOn === 'click' || this.openOn === 'toggle') {\n const click$ = fromEvent<MouseEvent>(this._target, 'click');\n this._targetEvents.click = click$.subscribe((e) => {\n this.openOn == 'toggle' ? this.toggle() : this.open();\n });\n }\n }\n //\n\n /** @ignore */\n private bindOverlayEvents() {\n this.removeOverlayEvents();\n this._overlayEvents.attach = this._overlayRef.attachments().subscribe(() => {\n if (this.openOn == 'hover') {\n this._overlayRef.overlayElement.addEventListener('mouseenter', this._handleMouseEnter.bind(this));\n }\n if (this.closeOn == 'leave') {\n this._overlayRef.overlayElement.addEventListener('mouseleave', this._handleMouseLeave.bind(this));\n }\n //\n this._overlayEvents.outside = this._overlayRef._outsidePointerEvents.subscribe((e: MouseEvent) => {\n const el = e.target as HTMLElement;\n if (\n this.closeOn == 'clickOut' &&\n this.isOpen &&\n !this._target.contains(el) &&\n !this._overlayRef?.overlayElement?.contains(el)\n ) {\n this.close();\n }\n });\n //\n\n this._overlayEvents.scroll = this._platform.scroll.subscribe((c) => {\n //__axContext__\n const el = c.nativeEvent.target as HTMLElement;\n if (!this.isActionsheetStyle) {\n if (el == (document as any)) {\n this.close();\n return;\n }\n if (\n el?.closest &&\n !el.closest('.ax-overlay-pane') &&\n !this._target.contains(el) &&\n !this._overlayRef?.overlayElement?.contains(el)\n ) {\n this.close();\n }\n }\n });\n });\n }\n\n /** @ignore */\n private removeOverlayEvents() {\n this._overlayRef?.overlayElement.removeEventListener('mouseenter', this._handleMouseEnter.bind(this));\n this._overlayRef?.overlayElement.addEventListener('mouseleave', this._handleMouseLeave.bind(this));\n Object.entries(this._overlayEvents).forEach((e) => {\n e[1].unsubscribe();\n });\n }\n\n //\n /**\n * Toggles the component's open state.\n */\n toggle() {\n this.isOpen ? this.close() : this.open();\n }\n\n //\n /**\n * Closes the component if it's open, detaches the overlay, restores focus, and emits the closed event.\n */\n close() {\n if (!this.isOpen) {\n return;\n }\n this._overlayRef?.detach();\n this.restoreFocus();\n this._emitOnClosedEvent();\n }\n\n //\n /**\n * Opens the component if it's not already open, saves focus, opens the overlay, and emits the opened event.\n */\n open() {\n if (this.isOpen) {\n return;\n }\n this.saveFocus();\n this.openOverlayInternal();\n this._emitOnOpenedEvent();\n }\n\n /** @ignore */\n private saveFocus() {\n if (isBrowser()) {\n this._lastActiveElement = document.activeElement as HTMLElement;\n }\n }\n\n /** @ignore */\n private restoreFocus() {\n if (this._lastActiveElement?.focus) {\n this._lastActiveElement.focus();\n }\n }\n\n /** @ignore */\n private openOverlayInternal() {\n const targetRef = this._target;\n if (!targetRef) return;\n\n //if (!this._overlayRef) {\n if (this.isActionsheetStyle) {\n this._overlayRef = this._overlay.create({\n positionStrategy: this._overlay.position().global().bottom().centerHorizontally(),\n disposeOnNavigation: true,\n scrollStrategy: this._overlay.scrollStrategies.block(),\n panelClass: ['ax-actionsheet-base', 'ax-animate-slideInUp', 'ax-animate-faster'],\n hasBackdrop: true,\n width: '100%',\n });\n } else {\n this._overlayRef = this._overlay.create({\n positionStrategy: this._overlay\n .position()\n .flexibleConnectedTo(targetRef)\n .withPositions(this._placements)\n .withPush(false),\n scrollStrategy: this._overlay.scrollStrategies.noop(),\n disposeOnNavigation: true,\n panelClass: ['ax-animate-fadeIn', 'ax-animate-faster'],\n maxHeight: 'unset',\n hasBackdrop: this.hasBackdrop,\n backdropClass: [this.backdropClass || 'cdk-overlay-transparent-backdrop'],\n direction: AXHtmlUtil.isRtl(this.getHostElement()) ? 'rtl' : 'ltr',\n });\n // this._overlayRef.setDirection()\n }\n\n //\n this.bindOverlayEvents();\n //}\n //\n if (this.content instanceof TemplateRef) {\n this._portal = new TemplatePortal(this.content, this.getViewContainer(), {\n $implicit: this.context,\n ref: this,\n });\n this._overlayRef?.attach(this._portal);\n } else if (typeof this.content === 'function') {\n this._portal = new ComponentPortal(this.content);\n this._componentRef = this._overlayRef?.attach(this._portal);\n Object.assign(this._componentRef.instance, this.context);\n } else {\n this._portal = new TemplatePortal(this._baseTemplate, this.getViewContainer(), {\n $implicit: this.context,\n ref: this,\n });\n this._overlayRef?.attach(this._portal);\n }\n }\n\n /**\n * Checks if the overlay is currently open.\n * @returns {boolean}\n */\n get isOpen(): boolean {\n return this._overlayRef ? this._overlayRef.hasAttached() : false;\n }\n\n /**\n * Determines if the actionsheet style should be applied.\n * @returns {boolean}\n */\n get isActionsheetStyle(): boolean {\n return this._platform.is('SM') && this.adaptivityEnabled;\n }\n\n /** @ignore */\n private updatePositionStrategy(): void {\n const targetRef = this._target;\n if (!targetRef) return;\n let strategy: PositionStrategy;\n if (this.isActionsheetStyle) {\n strategy = this._overlay.position().global().bottom().centerHorizontally();\n } else {\n strategy = this._overlay\n .position()\n .flexibleConnectedTo(targetRef)\n .withPositions(this._placements)\n .withPush(false);\n }\n this._overlayRef?.updatePositionStrategy(strategy);\n }\n\n /** @ignore */\n private updateOffset() {\n this._placements?.forEach((p) => {\n if (this.offsetY != null) p.offsetY = this.offsetY;\n if (this.offsetX != null) p.offsetX = this.offsetX;\n });\n }\n\n /**\n * Updates the position of the overlay and focuses on it.\n */\n public updatePosition(): void {\n this._overlayRef?.updatePosition();\n this.focus();\n }\n\n /**\n * Focuses the overlay element.\n */\n public focus(): void {\n //TODO: need this??\n }\n //\n\n protected override ngOnInit(): void {\n super.ngOnInit();\n // this.platformService.directionChange.subscribe((c) => {\n // this.isRtl = c.data == 'rtl';\n // });\n }\n\n /** @ignore */\n ngOnDestroy(): void {\n this.removeTargetEvents();\n this.removeOverlayEvents();\n this._overlayRef?.detach();\n this._overlayRef?.dispose();\n }\n}\n","<ng-template #baseTemplate>\n <ng-content></ng-content>\n</ng-template>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXPopoverComponent } from './popover.component';\n\n@NgModule({\n declarations: [AXPopoverComponent],\n imports: [CommonModule],\n exports: [AXPopoverComponent],\n providers: [],\n})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.mjs","sources":["../../../../libs/components/popover/src/lib/popover.component.ts","../../../../libs/components/popover/src/lib/popover.component.html","../../../../libs/components/popover/src/lib/popover.module.ts","../../../../libs/components/popover/src/acorex-components-popover.ts"],"sourcesContent":["import {\n AXConnectedPosition,\n AXEvent,\n AXFocusableComponent,\n AXPlacementType,\n MXBaseComponent,\n convertToPlacement,\n} from '@acorex/components/common';\nimport { AXPlatform, isBrowser } from '@acorex/core/platform';\nimport { AXHtmlUtil } from '@acorex/core/utils';\nimport { Overlay, OverlayRef, PositionStrategy } from '@angular/cdk/overlay';\nimport { ComponentPortal, ComponentType, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { Subscription, delay, fromEvent } from 'rxjs';\n\nexport type AXPopoverOpenTrigger = 'manual' | 'click' | 'hover' | 'toggle';\n\nexport type AXPopoverCloseTrigger = 'manual' | 'clickOut' | 'leave';\n\n/**\n * @category Components\n * A popover component with custom encapsulation and change detection settings.\n */\n@Component({\n selector: 'ax-popover',\n templateUrl: './popover.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXFocusableComponent, useExisting: AXPopoverComponent }],\n})\nexport class AXPopoverComponent extends MXBaseComponent {\n #platform = inject(AXPlatform);\n\n /** @ignore */\n private _platform: AXPlatform = inject(AXPlatform);\n\n /** @ignore */\n private _overlay: Overlay = inject(Overlay);\n\n /** @ignore */\n private _overlayRef!: OverlayRef;\n\n /** @ignore */\n private _isMouseOverButton = false;\n\n /** @ignore */\n private _isMouseOverTooltip = false;\n\n /** @ignore */\n private _lastActiveElement: HTMLElement;\n\n /** @ignore */\n private _targetEvents: {\n mouseenter?: Subscription;\n mouseleave?: Subscription;\n click?: Subscription;\n } = {};\n\n /** @ignore */\n private _overlayEvents: {\n attach?: Subscription;\n detach?: Subscription;\n scroll?: Subscription;\n outside?: Subscription;\n } = {};\n\n //\n\n /** @ignore */\n private _offsetX = 0;\n\n /**\n * Gets or sets the horizontal offset and updates it accordingly.\n */\n @Input()\n\n /**\n * Gets the horizontal offset value.\n */\n public get offsetX(): number {\n return this._offsetX;\n }\n\n /**\n * Sets the horizontal offset and updates it with a callback.\n */\n public set offsetX(v: number) {\n this.setOption({\n name: 'offsetX',\n value: v,\n afterCallback: () => {\n this.updateOffset();\n },\n });\n }\n //\n\n /** @ignore */\n private _offsetY = 0;\n\n /**\n * Vertical offset with update callback.\n */\n @Input()\n\n /**\n * Gets the vertical offset of the component.\n */\n public get offsetY(): number {\n return this._offsetY;\n }\n\n /**\n * Sets the vertical offset and updates the component position.\n */\n public set offsetY(v: number) {\n this.setOption({\n name: 'offsetY',\n value: v,\n afterCallback: () => {\n this.updateOffset();\n },\n });\n }\n\n //\n\n /** @ignore */\n private _target!: HTMLElement;\n\n /**\n * Gets or sets the target element, supporting HTMLElement, ElementRef, or MXBaseComponent.\n */\n @Input()\n\n /**\n * Gets the current target element.\n */\n public get target(): HTMLElement | ElementRef | MXBaseComponent {\n return this._target;\n }\n\n /**\n * Sets the target element and updates event bindings.\n */\n public set target(v: HTMLElement | ElementRef | MXBaseComponent) {\n this.removeTargetEvents();\n if (v instanceof HTMLElement) this._target = v;\n else if (v instanceof ElementRef) this._target = v.nativeElement;\n else if (typeof v?.getHostElement == 'function') this._target = v.getHostElement();\n //\n this.bindTargetEvents();\n }\n //\n\n /** @ignore */\n private _defautPlacements: AXConnectedPosition[] = convertToPlacement('bottom-start');\n\n /** @ignore */\n private _placements: AXConnectedPosition[] = [...this._defautPlacements];\n\n /** @ignore */\n private _placement: AXPlacementType = this._placements;\n\n /**\n * Gets or sets the component's placement and updates position settings.\n */\n @Input()\n\n /**\n * Gets the current placement of the component.\n */\n public get placement(): AXPlacementType {\n return this._placement;\n }\n\n /**\n * Sets the component's placement and updates its position settings.\n */\n public set placement(v: AXPlacementType) {\n this.setOption({\n name: 'placement',\n value: v,\n afterCallback: (o, n) => {\n const converted = convertToPlacement(n);\n this._placements = converted.length ? converted : this._defautPlacements;\n this.updateOffset();\n this.updatePositionStrategy();\n },\n });\n }\n //\n\n /** @ignore */\n private _portal: Portal<unknown>;\n\n /** @ignore */\n private _componentRef: ComponentRef<unknown>;\n\n /**\n * Gets the reference to the component.\n */\n public get componentRef(): ComponentRef<unknown> {\n return this._componentRef;\n }\n\n /**\n * Holds the context data for the component.\n */\n public context: unknown;\n\n //\n\n /** @ignore */\n @ViewChild('baseTemplate', { static: true })\n _baseTemplate: TemplateRef<unknown>;\n //\n\n /**\n * Defines the content to be displayed, which can be a template or a component.\n */\n @Input()\n content: TemplateRef<unknown> | ComponentType<unknown>;\n //\n\n /** @ignore */\n private _openOn: AXPopoverOpenTrigger = 'toggle';\n\n /**\n * Gets or sets the trigger for opening the popover and updates target events.\n */\n @Input()\n\n /**\n * Gets the trigger for opening the popover.\n */\n public get openOn(): AXPopoverOpenTrigger {\n return this._openOn;\n }\n\n /**\n * Sets the trigger for opening the popover and updates target events.\n */\n public set openOn(v: AXPopoverOpenTrigger) {\n this.setOption({\n name: 'openOn',\n value: v,\n afterCallback: () => {\n this.bindTargetEvents();\n },\n });\n }\n //\n\n /** @ignore */\n private _closeOn: AXPopoverCloseTrigger = 'clickOut';\n\n /**\n * Gets or sets the trigger for closing the popover.\n */\n @Input()\n public get closeOn(): AXPopoverCloseTrigger {\n return this._closeOn;\n }\n\n /**\n * Sets the trigger for closing the popover and rebinds target events.\n * @param v\n */\n public set closeOn(v: AXPopoverCloseTrigger) {\n this.setOption({\n name: 'closeOn',\n value: v,\n afterCallback: () => {\n this.bindTargetEvents();\n },\n });\n }\n\n //\n\n /**\n * Determines if a backdrop should be displayed behind the popover.\n */\n @Input()\n hasBackdrop = false;\n //\n\n /**\n * Delay in milliseconds before the popover opens after a trigger event.\n */\n @Input()\n openAfter = 200;\n\n /**\n * Delay in milliseconds before the popover closes after a trigger event.\n */\n @Input()\n closeAfter = 200;\n\n /**\n * CSS class to apply to the backdrop element.\n */\n @Input()\n backdropClass: string;\n\n /**\n * CSS class to apply to the backdrop element.\n */\n @Input()\n panelClass: string;\n\n /**\n * Enables or disables adaptivity.\n */\n @Input()\n adaptivityEnabled = false;\n //\n\n /**\n * Emits when the component is opened.\n * @event\n */\n @Output()\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /**\n * Emits when the component is closed.\n * @event\n */\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /** @ignore */\n private _emitOnOpenedEvent() {\n this.onOpened.emit({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n\n /** @ignore */\n private _emitOnClosedEvent() {\n this.onClosed.emit({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n //\n\n /** @ignore */\n protected _handleMouseEnter(e: MouseEvent) {\n this._isMouseOverTooltip = true;\n }\n\n /** @ignore */\n protected _handleMouseLeave(e: MouseEvent) {\n this._isMouseOverTooltip = false;\n setTimeout(() => {\n if (!this._isMouseOverButton && this.closeOn == 'leave') {\n this.close();\n }\n }, 250);\n }\n\n /** @ignore */\n private removeTargetEvents(): void {\n Object.entries(this._targetEvents).forEach((e) => {\n e[1].unsubscribe();\n });\n }\n\n /** @ignore */\n private bindTargetEvents() {\n this.removeTargetEvents();\n if (!this._target) return;\n const targetMouseEnter$ = fromEvent(this._target, 'mouseenter');\n const targetMouseLeave$ = fromEvent(this._target, 'mouseleave');\n\n if (this.openOn == 'hover') {\n this._targetEvents.mouseenter = targetMouseEnter$.pipe(delay(this.openAfter)).subscribe(() => {\n this._isMouseOverButton = true;\n this.open();\n });\n }\n\n if (this.closeOn == 'leave') {\n this._targetEvents.mouseleave = targetMouseLeave$.pipe(delay(this.closeAfter)).subscribe(() => {\n this._isMouseOverButton = false;\n if (!this._isMouseOverTooltip) {\n this.close();\n }\n });\n }\n\n if (this.openOn === 'click' || this.openOn === 'toggle') {\n const click$ = fromEvent<MouseEvent>(this._target, 'click');\n this._targetEvents.click = click$.subscribe((e) => {\n this.openOn == 'toggle' ? this.toggle() : this.open();\n });\n }\n }\n //\n\n /** @ignore */\n private bindOverlayEvents() {\n this.removeOverlayEvents();\n this._overlayEvents.attach = this._overlayRef.attachments().subscribe(() => {\n if (this.openOn == 'hover') {\n this._overlayRef.overlayElement.addEventListener('mouseenter', this._handleMouseEnter.bind(this));\n }\n if (this.closeOn == 'leave') {\n this._overlayRef.overlayElement.addEventListener('mouseleave', this._handleMouseLeave.bind(this));\n }\n //\n this._overlayEvents.outside = this._overlayRef._outsidePointerEvents.subscribe((e: MouseEvent) => {\n const el = e.target as HTMLElement;\n if (\n this.closeOn == 'clickOut' &&\n this.isOpen &&\n !this._target.contains(el) &&\n !this._overlayRef?.overlayElement?.contains(el)\n ) {\n this.close();\n }\n });\n //\n\n this._overlayEvents.scroll = this._platform.scroll.subscribe((c) => {\n //__axContext__\n const el = c.nativeEvent.target as HTMLElement;\n if (!this.isActionsheetStyle) {\n if (el == (document as any)) {\n this.close();\n return;\n }\n if (\n el?.closest &&\n !el.closest('.ax-overlay-pane') &&\n !this._target.contains(el) &&\n !this._overlayRef?.overlayElement?.contains(el)\n ) {\n this.close();\n }\n }\n });\n });\n }\n\n /** @ignore */\n private removeOverlayEvents() {\n this._overlayRef?.overlayElement.removeEventListener('mouseenter', this._handleMouseEnter.bind(this));\n this._overlayRef?.overlayElement.addEventListener('mouseleave', this._handleMouseLeave.bind(this));\n Object.entries(this._overlayEvents).forEach((e) => {\n e[1].unsubscribe();\n });\n }\n\n //\n /**\n * Toggles the component's open state.\n */\n toggle() {\n this.isOpen ? this.close() : this.open();\n }\n\n //\n /**\n * Closes the component if it's open, detaches the overlay, restores focus, and emits the closed event.\n */\n close() {\n if (!this.isOpen) {\n return;\n }\n this._overlayRef?.detach();\n this.restoreFocus();\n this._emitOnClosedEvent();\n }\n\n //\n /**\n * Opens the component if it's not already open, saves focus, opens the overlay, and emits the opened event.\n */\n open() {\n if (this.isOpen) {\n return;\n }\n this.saveFocus();\n this.openOverlayInternal();\n this._emitOnOpenedEvent();\n }\n\n /** @ignore */\n private saveFocus() {\n if (isBrowser()) {\n this._lastActiveElement = document.activeElement as HTMLElement;\n }\n }\n\n /** @ignore */\n private restoreFocus() {\n if (this._lastActiveElement?.focus) {\n this._lastActiveElement.focus();\n }\n }\n\n /** @ignore */\n private openOverlayInternal() {\n const targetRef = this._target;\n if (!targetRef) return;\n\n //if (!this._overlayRef) {\n if (this.isActionsheetStyle) {\n this._overlayRef = this._overlay.create({\n positionStrategy: this._overlay.position().global().bottom().centerHorizontally(),\n disposeOnNavigation: true,\n scrollStrategy: this._overlay.scrollStrategies.block(),\n panelClass: [\n 'ax-actionsheet-base',\n 'ax-animate-slideInUp',\n 'ax-animate-faster',\n this.panelClass ? this.panelClass : this.#platform.isDark() ? 'ax-dark' : '',\n ],\n hasBackdrop: true,\n width: '100%',\n });\n } else {\n this._overlayRef = this._overlay.create({\n positionStrategy: this._overlay\n .position()\n .flexibleConnectedTo(targetRef)\n .withPositions(this._placements)\n .withPush(false),\n scrollStrategy: this._overlay.scrollStrategies.noop(),\n disposeOnNavigation: true,\n panelClass: ['ax-animate-fadeIn', 'ax-animate-faster', this.#platform.isDark() ? 'ax-dark' : ''],\n maxHeight: 'unset',\n hasBackdrop: this.hasBackdrop,\n backdropClass: [this.backdropClass || 'cdk-overlay-transparent-backdrop'],\n direction: AXHtmlUtil.isRtl(this.getHostElement()) ? 'rtl' : 'ltr',\n });\n // this._overlayRef.setDirection()\n }\n\n //\n this.bindOverlayEvents();\n //}\n //\n if (this.content instanceof TemplateRef) {\n this._portal = new TemplatePortal(this.content, this.getViewContainer(), {\n $implicit: this.context,\n ref: this,\n });\n this._overlayRef?.attach(this._portal);\n } else if (typeof this.content === 'function') {\n this._portal = new ComponentPortal(this.content);\n this._componentRef = this._overlayRef?.attach(this._portal);\n Object.assign(this._componentRef.instance, this.context);\n } else {\n this._portal = new TemplatePortal(this._baseTemplate, this.getViewContainer(), {\n $implicit: this.context,\n ref: this,\n });\n this._overlayRef?.attach(this._portal);\n }\n }\n\n /**\n * Checks if the overlay is currently open.\n * @returns {boolean}\n */\n get isOpen(): boolean {\n return this._overlayRef ? this._overlayRef.hasAttached() : false;\n }\n\n /**\n * Determines if the actionsheet style should be applied.\n * @returns {boolean}\n */\n get isActionsheetStyle(): boolean {\n return this._platform.is('SM') && this.adaptivityEnabled;\n }\n\n /** @ignore */\n private updatePositionStrategy(): void {\n const targetRef = this._target;\n if (!targetRef) return;\n let strategy: PositionStrategy;\n if (this.isActionsheetStyle) {\n strategy = this._overlay.position().global().bottom().centerHorizontally();\n } else {\n strategy = this._overlay\n .position()\n .flexibleConnectedTo(targetRef)\n .withPositions(this._placements)\n .withPush(false);\n }\n this._overlayRef?.updatePositionStrategy(strategy);\n }\n\n /** @ignore */\n private updateOffset() {\n this._placements?.forEach((p) => {\n if (this.offsetY != null) p.offsetY = this.offsetY;\n if (this.offsetX != null) p.offsetX = this.offsetX;\n });\n }\n\n /**\n * Updates the position of the overlay and focuses on it.\n */\n public updatePosition(): void {\n this._overlayRef?.updatePosition();\n this.focus();\n }\n\n /**\n * Focuses the overlay element.\n */\n public focus(): void {\n //TODO: need this??\n }\n //\n\n protected override ngOnInit(): void {\n super.ngOnInit();\n // this.platformService.directionChange.subscribe((c) => {\n // this.isRtl = c.data == 'rtl';\n // });\n }\n\n /** @ignore */\n ngOnDestroy(): void {\n this.removeTargetEvents();\n this.removeOverlayEvents();\n this._overlayRef?.detach();\n this._overlayRef?.dispose();\n }\n}\n","<ng-template #baseTemplate>\n <ng-content></ng-content>\n</ng-template>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXPopoverComponent } from './popover.component';\n\n@NgModule({\n declarations: [AXPopoverComponent],\n imports: [CommonModule],\n exports: [AXPopoverComponent],\n providers: [],\n})\nexport class AXPopoverModule {}\n","/**\n * Generated bundle index.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CAAA;oBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC7B,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACTD;;AAEG;;;;"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import * as i2 from '@acorex/core/platform';
|
2
|
+
import { AXPlatform } from '@acorex/core/platform';
|
2
3
|
import * as i6 from '@angular/cdk/portal';
|
3
4
|
import { TemplatePortal, ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
4
5
|
import * as i0 from '@angular/core';
|
@@ -167,11 +168,11 @@ class AXPopupComponent extends MXBaseComponent {
|
|
167
168
|
}
|
168
169
|
}
|
169
170
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPopupComponent, deps: [{ token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: i1.AXLoadingService }, { token: i2.AXPlatform }, { token: DIALOG_DATA }, { token: i3.DialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
170
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPopupComponent, selector: "ax-popup", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-popup-wrapper \" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{ data.size }}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!data.draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n @if(data.header){\n <div class=\"ax-popup-header\">\n <span class=\"ax-popup-title\">{{ data.title | translate | async }}</span>\n @if(data.closeButton){\n <ax-close-button tabindex=\"1\"></ax-close-button>\n }\n </div>\n }\n </div>\n <div class=\"ax-popup-main-container ax-loading-container\">\n <div class=\"ax-popup-body-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n </div>\n</div>", styles: [".ax-popup{max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));
|
171
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPopupComponent, selector: "ax-popup", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-popup-wrapper \" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{ data.size }}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!data.draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n @if(data.header){\n <div class=\"ax-popup-header\">\n <span class=\"ax-popup-title\">{{ data.title | translate | async }}</span>\n @if(data.closeButton){\n <ax-close-button tabindex=\"1\"></ax-close-button>\n }\n </div>\n }\n </div>\n <div class=\"ax-popup-main-container ax-loading-container\">\n <div class=\"ax-popup-body-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n </div>\n</div>", styles: [".ax-popup{max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));margin-left:auto;margin-right:auto;display:flex;width:auto;flex-direction:column;overflow:hidden;border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface));padding:0;--ax-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--ax-shadow-colored: 0 10px 15px -3px var(--ax-shadow-color), 0 4px 6px -4px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-shadow);outline:2px solid transparent;outline-offset:2px;color:rgba(var(--ax-color-text-default))}.ax-popup .ax-popup-header{display:flex;align-items:center;justify-content:space-between;border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default));padding:.75rem}.ax-popup .ax-popup-header .ax-popup-title{font-size:1rem;line-height:1;font-weight:500}@media (min-width: 768px){.ax-popup .ax-popup-header .ax-popup-title{font-size:1.125rem;line-height:1.75rem}}.ax-popup ax-footer{box-shadow:0 2px 10px #0000004d;display:flex;align-items:center;justify-content:space-between;border-top-width:1px;border-color:rgba(var(--ax-color-border-default));padding:.75rem}.ax-popup:focus{outline:2px solid transparent;outline-offset:2px}.ax-popup:focus-visible{border-color:rgba(var(--ax-color-primary-500))}.ax-popup .ax-popup-main-container{display:flex;flex:1 1 0%;flex-direction:column;overflow:hidden}.ax-popup .ax-popup-main-container .ax-popup-body-container{flex:1 1 0%;overflow:auto}.ax-popup.ax-popup-full{width:100vw;max-height:calc(100 * var(--ax-vh));height:calc(100 * var(--ax-vh));border-radius:0!important}.ax-popup.ax-fit{width:fit-content!important}.ax-popup.ax-fit .ax-popup-body-container{max-height:100vh}.ax-popup.ax-fit .ax-popup-body-container>ng-component>div{width:fit-content!important}@media (min-width: 320px) and (max-width: 600px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{width:93vw!important;height:fit-content;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important}.ax-popup.ax-popup-sm .ax-popup-body-container>ng-component>div,.ax-popup.ax-popup-md .ax-popup-body-container>ng-component>div,.ax-popup.ax-popup-lg .ax-popup-body-container>ng-component>div{width:100%}}@media (min-width: 768px){.ax-popup.ax-popup-sm{width:55vw!important}.ax-popup.ax-popup-md{width:65vw!important}.ax-popup.ax-popup-lg{width:75vw!important}}@media (min-width: 1280px){.ax-popup.ax-popup-sm{width:30vw!important}.ax-popup.ax-popup-md{width:50vw!important}.ax-popup.ax-popup-lg{width:85vw!important}}@media (min-width: 1536px){.ax-popup.ax-popup-sm{width:25vw!important}.ax-popup.ax-popup-md{width:40vw!important}.ax-popup.ax-popup-lg{width:65vw!important}}\n"], dependencies: [{ kind: "directive", type: i4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i5.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i6.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i7.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i9.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
171
172
|
}
|
172
173
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPopupComponent, decorators: [{
|
173
174
|
type: Component,
|
174
|
-
args: [{ selector: 'ax-popup', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], template: "<div class=\"ax-popup-wrapper \" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{ data.size }}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!data.draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n @if(data.header){\n <div class=\"ax-popup-header\">\n <span class=\"ax-popup-title\">{{ data.title | translate | async }}</span>\n @if(data.closeButton){\n <ax-close-button tabindex=\"1\"></ax-close-button>\n }\n </div>\n }\n </div>\n <div class=\"ax-popup-main-container ax-loading-container\">\n <div class=\"ax-popup-body-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n </div>\n</div>", styles: [".ax-popup{max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));
|
175
|
+
args: [{ selector: 'ax-popup', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], template: "<div class=\"ax-popup-wrapper \" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{ data.size }}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!data.draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n @if(data.header){\n <div class=\"ax-popup-header\">\n <span class=\"ax-popup-title\">{{ data.title | translate | async }}</span>\n @if(data.closeButton){\n <ax-close-button tabindex=\"1\"></ax-close-button>\n }\n </div>\n }\n </div>\n <div class=\"ax-popup-main-container ax-loading-container\">\n <div class=\"ax-popup-body-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n </div>\n</div>", styles: [".ax-popup{max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));margin-left:auto;margin-right:auto;display:flex;width:auto;flex-direction:column;overflow:hidden;border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface));padding:0;--ax-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--ax-shadow-colored: 0 10px 15px -3px var(--ax-shadow-color), 0 4px 6px -4px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-shadow);outline:2px solid transparent;outline-offset:2px;color:rgba(var(--ax-color-text-default))}.ax-popup .ax-popup-header{display:flex;align-items:center;justify-content:space-between;border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default));padding:.75rem}.ax-popup .ax-popup-header .ax-popup-title{font-size:1rem;line-height:1;font-weight:500}@media (min-width: 768px){.ax-popup .ax-popup-header .ax-popup-title{font-size:1.125rem;line-height:1.75rem}}.ax-popup ax-footer{box-shadow:0 2px 10px #0000004d;display:flex;align-items:center;justify-content:space-between;border-top-width:1px;border-color:rgba(var(--ax-color-border-default));padding:.75rem}.ax-popup:focus{outline:2px solid transparent;outline-offset:2px}.ax-popup:focus-visible{border-color:rgba(var(--ax-color-primary-500))}.ax-popup .ax-popup-main-container{display:flex;flex:1 1 0%;flex-direction:column;overflow:hidden}.ax-popup .ax-popup-main-container .ax-popup-body-container{flex:1 1 0%;overflow:auto}.ax-popup.ax-popup-full{width:100vw;max-height:calc(100 * var(--ax-vh));height:calc(100 * var(--ax-vh));border-radius:0!important}.ax-popup.ax-fit{width:fit-content!important}.ax-popup.ax-fit .ax-popup-body-container{max-height:100vh}.ax-popup.ax-fit .ax-popup-body-container>ng-component>div{width:fit-content!important}@media (min-width: 320px) and (max-width: 600px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{width:93vw!important;height:fit-content;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important}.ax-popup.ax-popup-sm .ax-popup-body-container>ng-component>div,.ax-popup.ax-popup-md .ax-popup-body-container>ng-component>div,.ax-popup.ax-popup-lg .ax-popup-body-container>ng-component>div{width:100%}}@media (min-width: 768px){.ax-popup.ax-popup-sm{width:55vw!important}.ax-popup.ax-popup-md{width:65vw!important}.ax-popup.ax-popup-lg{width:75vw!important}}@media (min-width: 1280px){.ax-popup.ax-popup-sm{width:30vw!important}.ax-popup.ax-popup-md{width:50vw!important}.ax-popup.ax-popup-lg{width:85vw!important}}@media (min-width: 1536px){.ax-popup.ax-popup-sm{width:25vw!important}.ax-popup.ax-popup-md{width:40vw!important}.ax-popup.ax-popup-lg{width:65vw!important}}\n"] }]
|
175
176
|
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: i1.AXLoadingService }, { type: i2.AXPlatform }, { type: undefined, decorators: [{
|
176
177
|
type: Inject,
|
177
178
|
args: [DIALOG_DATA]
|
@@ -188,7 +189,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
188
189
|
class AXPopupService {
|
189
190
|
constructor() {
|
190
191
|
this.dialog = inject(Dialog);
|
192
|
+
this.#platform = inject(AXPlatform);
|
191
193
|
}
|
194
|
+
#platform;
|
192
195
|
/**
|
193
196
|
* @ignore
|
194
197
|
*/
|
@@ -220,6 +223,7 @@ class AXPopupService {
|
|
220
223
|
disableClose: config.closeOnBackdropClick ? false : true,
|
221
224
|
viewContainerRef: config.viewContainerRef,
|
222
225
|
providers: config.providers,
|
226
|
+
panelClass: config.panelClass ? config.panelClass : [this.#platform.isDark() ? 'ax-dark' : ''],
|
223
227
|
});
|
224
228
|
const promise = new AXComponentClosedPromise((resolve) => {
|
225
229
|
dialogRef.closed.subscribe((d) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-popup.mjs","sources":["../../../../libs/components/popup/src/lib/popup.component.ts","../../../../libs/components/popup/src/lib/popup.component.html","../../../../libs/components/popup/src/lib/popup.service.ts","../../../../libs/components/popup/src/lib/popup.module.ts","../../../../libs/components/popup/src/acorex-components-popup.ts"],"sourcesContent":["import { AXPlatform } from '@acorex/core/platform';\nimport { CdkPortalOutletAttachedRef, ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n HostListener,\n Inject,\n NgZone,\n OnInit,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { AXClosbaleComponent, AXComponentCloseEvent, AXComponentClosing, MXBaseComponent } from '@acorex/components/common';\nimport { AXLoadingService } from '@acorex/components/loading';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { AXPopupData } from './popup.interface';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-popup',\n templateUrl: './popup.component.html',\n styleUrls: ['./popup.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }],\n})\nexport class AXPopupComponent extends MXBaseComponent implements OnInit {\n\n /**\n * Indicates whether the component is loading.\n * @defaultValue true\n */\n isLoading = true;\n\n /** @ignore */\n private _loadingId: number;\n\n /** @ignore */\n protected _selectedPortal: Portal<unknown>;\n\n /** @ignore */\n protected _footerPortal: Portal<unknown>;\n\n /** @ignore */\n protected _headerPortal: Portal<unknown>;\n\n /** @ignore */\n private _componentRef: any;\n\n/** @ignore */\n constructor(\n\n /** @ignore */\n private _zone: NgZone,\n\n /** @ignore */\n private _viewContainerRef: ViewContainerRef,\n\n /** @ignore */\n private loadingService: AXLoadingService,\n\n /** @ignore */\n private _platform: AXPlatform,\n @Inject(DIALOG_DATA)\n\n /** @ignore */\n protected data: AXPopupData,\n\n /** @ignore */\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n\n /** @ignore */\n super();\n }\n\n /** @ignore */\n override ngOnInit() {\n super.ngOnInit();\n if (this._platform.is('SM')) {\n this.data.draggable = false;\n }\n this._loadingId = this.loadingService.show({\n location: this.getHostElement(),\n });\n //\n if (this.data.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(this.data.content, this._viewContainerRef, {\n $implicit: this.data,\n ref: this,\n });\n this.cdr.markForCheck();\n } else if (typeof this.data.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.data.content);\n this.cdr.markForCheck();\n }\n }\n\n /** @ignore */\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<unknown>;\n if (ref.instance) {\n this._componentRef = ref.instance;\n Object.assign(this._componentRef, this.data.data);\n Object.assign(this._componentRef, { _isPopup: true });\n Object.assign(this._componentRef, {\n setTitle: (title: string) => {\n this.data.title = title;\n },\n });\n if (ref.instance.onClosed) {\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\n this.close(e.data);\n });\n }\n }\n this._zone.runOutsideAngular(() => {\n setTimeout(() => {\n const main = this.getHostElement().querySelector<HTMLDivElement>('.ax-popup-main-container');\n const popHeader = this.getHostElement().querySelector<HTMLDivElement>('.ax-popup-header-container');\n const popFooter = this.getHostElement().querySelector<HTMLDivElement>('.ax-popup-footer-container');\n const footer = main.querySelector<HTMLDivElement>('ax-footer');\n const header = main.querySelector<HTMLDivElement>('ax-header');\n if (footer) {\n popFooter?.append(footer);\n }\n if (header) {\n popHeader.innerHTML = '';\n popHeader.append(header);\n }\n this.focus();\n });\n });\n this.loadingService.hide(this._loadingId);\n this.cdr.markForCheck();\n }\n\n /** @ignore */\n @HostListener('keydown.escape', ['$event'])\n onKeydownHandler(event: KeyboardEvent) {\n const focusedOrHasFocused = this.getHostElement().matches(':focus-within');\n if (this.data.closeButton && focusedOrHasFocused) {\n this.close();\n }\n }\n\n /** @ignore */\n _handleCloseClick() {\n this.close();\n }\n\n /** @ignore */\n ngOnDestroy() {\n this.loadingService.hide(this._loadingId);\n }\n\n /**\n * Sets focus on the `.ax-popup` element within the host element after a short delay.\n */\n focus() {\n setTimeout(() => this.getHostElement().querySelector<HTMLDivElement>('.ax-popup')?.focus());\n }\n\n /**\n * Closes the dialog, emitting component reference, host element, and optional data.\n * @param {unknown} [data]\n */\n close(data?: unknown) {\n const closeFn = () => {\n this.dialogRef.close({\n component: this._componentRef,\n htmlElement: this.getHostElement(),\n data: data,\n });\n };\n if (typeof this._componentRef.onClosing === 'function') {\n const ee: AXComponentClosing = {\n cancel: false,\n data,\n };\n const closingResult = this._componentRef.onClosing(ee);\n if (closingResult instanceof Promise) {\n closingResult.then(() => {\n if (!ee.cancel) {\n closeFn();\n }\n });\n } else {\n if (!ee.cancel) {\n closeFn();\n }\n }\n } else {\n closeFn();\n }\n }\n}\n","<div class=\"ax-popup-wrapper \" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{ data.size }}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!data.draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n @if(data.header){\n <div class=\"ax-popup-header\">\n <span class=\"ax-popup-title\">{{ data.title | translate | async }}</span>\n @if(data.closeButton){\n <ax-close-button tabindex=\"1\"></ax-close-button>\n }\n </div>\n }\n </div>\n <div class=\"ax-popup-main-container ax-loading-container\">\n <div class=\"ax-popup-body-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n </div>\n</div>","import { AXComponentCloseEvent, AXComponentClosedPromise } from '@acorex/components/common';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPopupComponent } from './popup.component';\nimport { AXPopupConfig, AXPopupContentType } from './popup.interface';\n\n/**\n * This is a service which you can create popup with it\n *\n * @category Components\n */\n@Injectable()\nexport class AXPopupService {\n private dialog: Dialog = inject(Dialog);\n\n /**\n * Open popup 1\n */\n open(content: AXPopupContentType, title: string): AXComponentClosedPromise;\n /**\n * Open popup 2\n */\n open(content: AXPopupContentType, config?: AXPopupConfig): AXComponentClosedPromise;\n\n /**\n * @ignore\n */\n open(arg1, arg2): AXComponentClosedPromise {\n let config: AXPopupConfig = {\n closeButton: true,\n header: true,\n size: 'md',\n maximizable: false,\n draggable: true,\n hasBackdrop: true,\n closeOnBackdropClick: false,\n data: {},\n };\n if (typeof arg2 === 'string') {\n config.title = arg2;\n } else {\n config = Object.assign(config, arg2);\n }\n\n const dialogRef = this.dialog.open<AXComponentCloseEvent, AXPopupConfig, AXPopupComponent>(AXPopupComponent, {\n data: Object.assign(config, { content: arg1 }),\n autoFocus: true,\n restoreFocus: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: config.hasBackdrop,\n backdropClass: config.backdropClass,\n disableClose: config.closeOnBackdropClick ? false : true,\n viewContainerRef: config.viewContainerRef,\n providers: config.providers,\n });\n const promise = new AXComponentClosedPromise((resolve) => {\n dialogRef.closed.subscribe((d) => {\n if (resolve) {\n resolve({\n sender: d.component,\n data: d.data,\n });\n }\n });\n });\n return promise;\n }\n}\n","import { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXPopupComponent } from './popup.component';\nimport { AXPopupService } from './popup.service';\n\nconst COMPONENT = [AXPopupComponent];\nconst MODULES = [\n CommonModule,\n AXCommonModule,\n DragDropModule,\n A11yModule,\n PortalModule,\n AXDecoratorModule,\n DialogModule,\n AXTranslationModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXPopupService],\n})\nexport class AXPopupModule {}\n","/**\n * Generated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B,YAAY;IACZ,mBAAmB;CACpB;MAQY,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAb,aAAa,EAAA,YAAA,EAAA,CAlBP,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAEjC,YAAY;YACZ,cAAc;YACd,cAAc;YACd,UAAU;YACV,YAAY;YACZ,iBAAiB;YACjB,YAAY;AACZ,YAAA,mBAAmB,aATF,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAkBtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAFb,SAAA,EAAA,CAAC,cAAc,CAAC,YAFd,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,cAAc,CAAC;AAC5B,iBAAA;;;AC7BD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-popup.mjs","sources":["../../../../libs/components/popup/src/lib/popup.component.ts","../../../../libs/components/popup/src/lib/popup.component.html","../../../../libs/components/popup/src/lib/popup.service.ts","../../../../libs/components/popup/src/lib/popup.module.ts","../../../../libs/components/popup/src/acorex-components-popup.ts"],"sourcesContent":["import { AXPlatform } from '@acorex/core/platform';\nimport { CdkPortalOutletAttachedRef, ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n HostListener,\n Inject,\n NgZone,\n OnInit,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { AXClosbaleComponent, AXComponentCloseEvent, AXComponentClosing, MXBaseComponent } from '@acorex/components/common';\nimport { AXLoadingService } from '@acorex/components/loading';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { AXPopupData } from './popup.interface';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-popup',\n templateUrl: './popup.component.html',\n styleUrls: ['./popup.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }],\n})\nexport class AXPopupComponent extends MXBaseComponent implements OnInit {\n\n /**\n * Indicates whether the component is loading.\n * @defaultValue true\n */\n isLoading = true;\n\n /** @ignore */\n private _loadingId: number;\n\n /** @ignore */\n protected _selectedPortal: Portal<unknown>;\n\n /** @ignore */\n protected _footerPortal: Portal<unknown>;\n\n /** @ignore */\n protected _headerPortal: Portal<unknown>;\n\n /** @ignore */\n private _componentRef: any;\n\n/** @ignore */\n constructor(\n\n /** @ignore */\n private _zone: NgZone,\n\n /** @ignore */\n private _viewContainerRef: ViewContainerRef,\n\n /** @ignore */\n private loadingService: AXLoadingService,\n\n /** @ignore */\n private _platform: AXPlatform,\n @Inject(DIALOG_DATA)\n\n /** @ignore */\n protected data: AXPopupData,\n\n /** @ignore */\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n\n /** @ignore */\n super();\n }\n\n /** @ignore */\n override ngOnInit() {\n super.ngOnInit();\n if (this._platform.is('SM')) {\n this.data.draggable = false;\n }\n this._loadingId = this.loadingService.show({\n location: this.getHostElement(),\n });\n //\n if (this.data.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(this.data.content, this._viewContainerRef, {\n $implicit: this.data,\n ref: this,\n });\n this.cdr.markForCheck();\n } else if (typeof this.data.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.data.content);\n this.cdr.markForCheck();\n }\n }\n\n /** @ignore */\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<unknown>;\n if (ref.instance) {\n this._componentRef = ref.instance;\n Object.assign(this._componentRef, this.data.data);\n Object.assign(this._componentRef, { _isPopup: true });\n Object.assign(this._componentRef, {\n setTitle: (title: string) => {\n this.data.title = title;\n },\n });\n if (ref.instance.onClosed) {\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\n this.close(e.data);\n });\n }\n }\n this._zone.runOutsideAngular(() => {\n setTimeout(() => {\n const main = this.getHostElement().querySelector<HTMLDivElement>('.ax-popup-main-container');\n const popHeader = this.getHostElement().querySelector<HTMLDivElement>('.ax-popup-header-container');\n const popFooter = this.getHostElement().querySelector<HTMLDivElement>('.ax-popup-footer-container');\n const footer = main.querySelector<HTMLDivElement>('ax-footer');\n const header = main.querySelector<HTMLDivElement>('ax-header');\n if (footer) {\n popFooter?.append(footer);\n }\n if (header) {\n popHeader.innerHTML = '';\n popHeader.append(header);\n }\n this.focus();\n });\n });\n this.loadingService.hide(this._loadingId);\n this.cdr.markForCheck();\n }\n\n /** @ignore */\n @HostListener('keydown.escape', ['$event'])\n onKeydownHandler(event: KeyboardEvent) {\n const focusedOrHasFocused = this.getHostElement().matches(':focus-within');\n if (this.data.closeButton && focusedOrHasFocused) {\n this.close();\n }\n }\n\n /** @ignore */\n _handleCloseClick() {\n this.close();\n }\n\n /** @ignore */\n ngOnDestroy() {\n this.loadingService.hide(this._loadingId);\n }\n\n /**\n * Sets focus on the `.ax-popup` element within the host element after a short delay.\n */\n focus() {\n setTimeout(() => this.getHostElement().querySelector<HTMLDivElement>('.ax-popup')?.focus());\n }\n\n /**\n * Closes the dialog, emitting component reference, host element, and optional data.\n * @param {unknown} [data]\n */\n close(data?: unknown) {\n const closeFn = () => {\n this.dialogRef.close({\n component: this._componentRef,\n htmlElement: this.getHostElement(),\n data: data,\n });\n };\n if (typeof this._componentRef.onClosing === 'function') {\n const ee: AXComponentClosing = {\n cancel: false,\n data,\n };\n const closingResult = this._componentRef.onClosing(ee);\n if (closingResult instanceof Promise) {\n closingResult.then(() => {\n if (!ee.cancel) {\n closeFn();\n }\n });\n } else {\n if (!ee.cancel) {\n closeFn();\n }\n }\n } else {\n closeFn();\n }\n }\n}\n","<div class=\"ax-popup-wrapper \" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{ data.size }}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!data.draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n @if(data.header){\n <div class=\"ax-popup-header\">\n <span class=\"ax-popup-title\">{{ data.title | translate | async }}</span>\n @if(data.closeButton){\n <ax-close-button tabindex=\"1\"></ax-close-button>\n }\n </div>\n }\n </div>\n <div class=\"ax-popup-main-container ax-loading-container\">\n <div class=\"ax-popup-body-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n </div>\n</div>","import { AXComponentCloseEvent, AXComponentClosedPromise } from '@acorex/components/common';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPopupComponent } from './popup.component';\nimport { AXPopupConfig, AXPopupContentType } from './popup.interface';\n\n/**\n * This is a service which you can create popup with it\n *\n * @category Components\n */\n@Injectable()\nexport class AXPopupService {\n private dialog: Dialog = inject(Dialog);\n #platform = inject(AXPlatform);\n /**\n * Open popup 1\n */\n open(content: AXPopupContentType, title: string): AXComponentClosedPromise;\n /**\n * Open popup 2\n */\n open(content: AXPopupContentType, config?: AXPopupConfig): AXComponentClosedPromise;\n\n /**\n * @ignore\n */\n open(arg1, arg2): AXComponentClosedPromise {\n let config: AXPopupConfig = {\n closeButton: true,\n header: true,\n size: 'md',\n maximizable: false,\n draggable: true,\n hasBackdrop: true,\n closeOnBackdropClick: false,\n data: {},\n };\n if (typeof arg2 === 'string') {\n config.title = arg2;\n } else {\n config = Object.assign(config, arg2);\n }\n\n const dialogRef = this.dialog.open<AXComponentCloseEvent, AXPopupConfig, AXPopupComponent>(\n AXPopupComponent,\n {\n data: Object.assign(config, { content: arg1 }),\n autoFocus: true,\n restoreFocus: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: config.hasBackdrop,\n backdropClass: config.backdropClass,\n disableClose: config.closeOnBackdropClick ? false : true,\n viewContainerRef: config.viewContainerRef,\n providers: config.providers,\n panelClass: config.panelClass ? config.panelClass : [this.#platform.isDark() ? 'ax-dark' : ''],\n },\n );\n const promise = new AXComponentClosedPromise((resolve) => {\n dialogRef.closed.subscribe((d) => {\n if (resolve) {\n resolve({\n sender: d.component,\n data: d.data,\n });\n }\n });\n });\n return promise;\n }\n}\n","import { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXPopupComponent } from './popup.component';\nimport { AXPopupService } from './popup.service';\n\nconst COMPONENT = [AXPopupComponent];\nconst MODULES = [\n CommonModule,\n AXCommonModule,\n DragDropModule,\n A11yModule,\n PortalModule,\n AXDecoratorModule,\n DialogModule,\n AXTranslationModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXPopupService],\n})\nexport class AXPopupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;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