@acorex/components 19.11.0 → 19.11.2-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/common/index.d.ts +1 -0
  2. package/common/lib/interfaces/component.interface.d.ts +4 -0
  3. package/fesm2022/acorex-components-color-palette.mjs +1 -1
  4. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  5. package/fesm2022/acorex-components-conversation.mjs +2 -2
  6. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  7. package/fesm2022/acorex-components-data-pager.mjs +1 -1
  8. package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
  9. package/fesm2022/acorex-components-datetime-box.mjs +26 -1
  10. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  11. package/fesm2022/acorex-components-datetime-input.mjs +11 -2
  12. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  13. package/fesm2022/acorex-components-datetime-picker.mjs +8 -3
  14. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  15. package/fesm2022/acorex-components-file-explorer.mjs +1 -1
  16. package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
  17. package/fesm2022/acorex-components-grid-layout-builder.mjs +43 -26
  18. package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
  19. package/fesm2022/acorex-components-image-editor.mjs +9 -8
  20. package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
  21. package/fesm2022/acorex-components-menu.mjs +4 -4
  22. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  23. package/fesm2022/acorex-components-number-box.mjs +20 -5
  24. package/fesm2022/acorex-components-number-box.mjs.map +1 -1
  25. package/fesm2022/acorex-components-password-box.mjs +2 -2
  26. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  27. package/fesm2022/acorex-components-query-builder.mjs +1 -1
  28. package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
  29. package/fesm2022/acorex-components-range-slider.mjs +20 -2
  30. package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
  31. package/fesm2022/acorex-components-side-menu.mjs +2 -2
  32. package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
  33. package/fesm2022/acorex-components-step-wizard.mjs +2 -2
  34. package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
  35. package/fesm2022/acorex-components-tag-box.mjs +2 -2
  36. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  37. package/fesm2022/acorex-components-text-box.mjs +2 -2
  38. package/fesm2022/acorex-components-text-box.mjs.map +1 -1
  39. package/fesm2022/acorex-components-tree-view.mjs +35 -38
  40. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  41. package/grid-layout-builder/lib/grid-layout-container.component.d.ts +2 -8
  42. package/grid-layout-builder/lib/types.d.ts +10 -2
  43. package/grid-layout-builder/lib/utility.d.ts +2 -0
  44. package/number-box/lib/number-box.component.d.ts +5 -1
  45. package/package.json +1 -1
  46. package/range-slider/lib/range-slider.component.d.ts +6 -0
  47. package/side-menu/lib/side-menu-item/side-menu-item.component.d.ts +1 -1
  48. package/tree-view/lib/tree-view-item.component.d.ts +1 -5
  49. package/tree-view/lib/tree-view.component.d.ts +7 -2
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-grid-layout-builder.mjs","sources":["../../../../libs/components/grid-layout-builder/src/lib/utility.ts","../../../../libs/components/grid-layout-builder/src/lib/grid-layout-widget.component.ts","../../../../libs/components/grid-layout-builder/src/lib/grid-layout-container.component.ts","../../../../libs/components/grid-layout-builder/src/lib/grid-layout-builder.module.ts","../../../../libs/components/grid-layout-builder/src/acorex-components-grid-layout-builder.ts"],"sourcesContent":["import { AXGridLayoutNode, AXGridLayoutOptions, AXGridLayoutWidget } from './types';\n\n// Convert AXGridLayoutWidget to GridStackWidget\nexport function convertAXGridLayoutWidgetToGridStackWidget(\n widget: AXGridLayoutWidget,\n): import('gridstack').GridStackWidget {\n return {\n id: widget.id,\n x: widget.x,\n y: widget.y,\n w: widget.w,\n h: widget.h,\n noResize: widget.disableResize,\n noMove: widget.disableDrag,\n };\n}\n\n// Convert GridStackWidget to AXGridLayoutWidget\nexport function convertGridStackWidgetToAXGridLayoutWidget(\n widget: import('gridstack').GridStackWidget,\n): AXGridLayoutWidget {\n return {\n id: widget.id,\n x: widget.x,\n y: widget.y,\n w: widget.w,\n h: widget.h,\n disableResize: widget.noResize,\n disableDrag: widget.noMove,\n };\n}\n\n// Convert AXGridLayoutNode to GridStackNode\nexport function convertAXGridLayoutNodeToGridStackNode(node: AXGridLayoutNode): import('gridstack').GridStackNode {\n return {\n id: node.id,\n x: node.x,\n y: node.y,\n w: node.w,\n h: node.h,\n noResize: node.disableResize,\n noMove: node.disableDrag,\n el: node.element,\n };\n}\n\n// Convert GridStackNode to AXGridLayoutNode\nexport function convertGridStackNodeToAXGridLayoutNode(node: import('gridstack').GridStackNode): AXGridLayoutNode {\n return {\n id: node.id,\n x: node.x,\n y: node.y,\n w: node.w,\n h: node.h,\n disableResize: node.noResize,\n disableDrag: node.noMove,\n element: node.el,\n };\n}\n\n// Convert AXGridLayoutOptions to GridStackOptions\nexport function convertAXGridLayoutOptionsToGridStackOptions(\n options: AXGridLayoutOptions,\n): import('gridstack').GridStackOptions {\n return {\n column: options.column,\n disableDrag: options.disableDrag,\n disableResize: options.disableResize,\n margin: options.gap,\n cellHeight: options.cellHeight,\n rtl: options.rtl,\n maxRow: options.maxRow,\n minRow: options.minRow,\n row: options.row,\n removable: options.removableSelector || options.removable,\n acceptWidgets: options.acceptWidgets,\n float: options.float,\n handle: options.dragHandlerSelector,\n };\n}\n\n// Convert GridStackOptions to AXGridLayoutOptions\nexport function convertGridStackOptionsToAXGridLayoutOptions(\n options: import('gridstack').GridStackOptions,\n): AXGridLayoutOptions {\n return {\n column: options.column,\n disableDrag: options.disableDrag,\n disableResize: options.disableResize,\n gap: options.margin,\n cellHeight: options.cellHeight,\n rtl: options.rtl,\n maxRow: options.maxRow,\n minRow: options.minRow,\n row: options.row,\n removableSelector: typeof options.removable === 'string' ? options.removable : undefined,\n removable: typeof options.removable === 'boolean' ? options.removable : undefined,\n acceptWidgets: options.acceptWidgets as boolean,\n float: options.float,\n dragHandlerSelector: options.handle,\n };\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n input,\n untracked,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXGridLayoutNode, AXGridLayoutWidget, AXGridLayoutWidgetElement } from './types';\nimport { convertAXGridLayoutWidgetToGridStackWidget, convertGridStackNodeToAXGridLayoutNode } from './utility';\n\n@Component({\n selector: 'ax-grid-layout-widget',\n template: `<ng-content></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'grid-stack-item-content' },\n})\nexport class AXGridLayoutWidgetComponent {\n private readonly elementRef: ElementRef<AXGridLayoutWidgetElement> = inject(ElementRef);\n\n public options = input<AXGridLayoutNode>();\n\n #eff = effect(() => {\n const options = this.options();\n\n untracked(() => {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode as import('gridstack').GridStackNode;\n if (gridstackNode?.grid) {\n gridstackNode.grid.update(this.elementRef.nativeElement, convertAXGridLayoutWidgetToGridStackWidget(options));\n }\n });\n });\n\n /**\n * Locks or unlocks the widget (prevents dragging and resizing).\n * @param state - If `true`, the widget will be locked.\n */\n public setLockable(state: boolean): void {\n this.updateWidgetOptions({ disableResize: state, disableDrag: state });\n }\n\n /**\n * Enables or disables resizing of the widget.\n * @param state - If `true`, resizing will be enabled.\n */\n public setResizable(state: boolean): void {\n this.updateWidgetOptions({ disableResize: !state });\n }\n\n /**\n * Updates the widget options.\n * @param options - The new options for the widget.\n */\n public setOptions(options: AXGridLayoutWidget): void {\n this.updateWidgetOptions(options);\n }\n\n /**\n * Returns the current options of the widget.\n * @returns The current widget options.\n */\n public getOptions(): AXGridLayoutNode {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode;\n return gridstackNode\n ? convertGridStackNodeToAXGridLayoutNode(gridstackNode)\n : { ...this.options(), element: this.elementRef.nativeElement };\n }\n\n /**\n * Returns the native DOM element of the widget.\n * @returns The native element.\n */\n public get element(): AXGridLayoutWidgetElement {\n return this.elementRef.nativeElement;\n }\n\n /**\n * Updates the widget options and triggers a grid update.\n * @param options - The partial options to update.\n */\n private updateWidgetOptions(options: Partial<AXGridLayoutWidget>): void {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode as import('gridstack').GridStackNode;\n if (gridstackNode?.grid) {\n gridstackNode.grid.update(this.elementRef.nativeElement, convertAXGridLayoutWidgetToGridStackWidget(options));\n }\n }\n}\n","import { NXComponent } from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n NgZone,\n OnDestroy,\n QueryList,\n ViewEncapsulation,\n afterNextRender,\n inject,\n input,\n model,\n output,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXGridLayoutWidgetComponent } from './grid-layout-widget.component';\nimport {\n AXGridLayout,\n AXGridLayoutContainerElement,\n AXGridLayoutEvent,\n AXGridLayoutNode,\n AXGridLayoutOptions,\n AXGridLayoutWidget,\n AXGridLayoutWidgetElement,\n} from './types';\nimport {\n convertAXGridLayoutNodeToGridStackNode,\n convertAXGridLayoutOptionsToGridStackOptions,\n convertAXGridLayoutWidgetToGridStackWidget,\n convertGridStackNodeToAXGridLayoutNode,\n convertGridStackOptionsToAXGridLayoutOptions,\n} from './utility';\n\n@Component({\n selector: 'ax-grid-layout-container',\n template: ` <ng-content></ng-content> `,\n styleUrl: './grid-layout-container.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXGridLayoutContainerComponent extends NXComponent implements OnDestroy {\n //#region Inputs and Outputs\n public options = input<AXGridLayoutOptions>();\n\n protected onAdded = output<AXGridLayoutEvent>();\n protected onRemoved = output<AXGridLayoutEvent>();\n protected onWidgetChange = output<AXGridLayoutEvent>();\n protected onChange = output<AXGridLayoutEvent>();\n protected isLayoutRendered = output<boolean>();\n\n protected isEmpty = model(false);\n //#endregion\n\n //#region Private Properties\n private readonly elementRef: ElementRef<AXGridLayoutContainerElement> = inject(ElementRef);\n private readonly ngZone = inject(NgZone);\n\n @ContentChildren(AXGridLayoutWidgetComponent) public gridstackItems?: QueryList<AXGridLayoutWidgetComponent>;\n\n private el = this.elementRef.nativeElement;\n private grid?: AXGridLayout;\n protected _sub: Subscription | undefined;\n //#endregion\n\n //#region Initialization\n #init = afterNextRender(() => {\n (window as any).g = this;\n this.ngZone.runOutsideAngular(async () => {\n const { GridStack } = await import('gridstack');\n const gridStackOptions = convertAXGridLayoutOptionsToGridStackOptions(this.options() ?? {});\n this.grid = GridStack.init(gridStackOptions, this.el);\n this.updateAll();\n this.hookEvents(this.grid);\n this.isLayoutRendered.emit(true);\n });\n this._sub = this.gridstackItems?.changes.subscribe(() => {\n this.updateAll();\n });\n });\n\n public ngOnDestroy(): void {\n this.unhookEvents(this.grid);\n this._sub?.unsubscribe();\n this.destroy();\n }\n //#endregion\n\n //#region Internal Methods\n private updateAll() {\n if (!this.grid) return;\n\n const layout: AXGridLayoutNode[] = [];\n const arrays = this.gridstackItems?.toArray() ?? [];\n\n if (arrays.length) {\n arrays.forEach((item) => {\n const widgetOptions = item.getOptions();\n if (widgetOptions) {\n layout.push(convertAXGridLayoutNodeToGridStackNode(widgetOptions));\n }\n });\n this.grid.load(layout);\n }\n this.checkEmpty();\n }\n\n private checkEmpty() {\n if (this.grid) {\n const isEmpty = !this.getChildren().length;\n if (isEmpty === this.isEmpty()) return;\n this.isEmpty.set(isEmpty);\n }\n }\n\n private hookEvents(grid?: AXGridLayout): void {\n if (grid) {\n grid\n .on('added', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => convertGridStackNodeToAXGridLayoutNode(node));\n this.checkEmpty();\n this.onAdded.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n })\n .on('removed', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => convertGridStackNodeToAXGridLayoutNode(node));\n this.checkEmpty();\n this.onRemoved.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n })\n .on('change', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => convertGridStackNodeToAXGridLayoutNode(node));\n this.onWidgetChange.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n });\n }\n }\n\n private unhookEvents(grid?: AXGridLayout) {\n if (grid) grid.offAll();\n }\n\n private _dispatchChangeEvent() {\n if (this.getChildren().length) {\n this.onChange.emit({\n sender: this,\n nodes: this.getChildren(),\n });\n }\n }\n //#endregion\n\n //#region Public Methods\n public addWidget(w: AXGridLayoutWidget, withAutoArrange = false): AXGridLayoutWidgetElement | undefined {\n if (withAutoArrange) this.compact();\n\n const gridStackWidget = convertAXGridLayoutWidgetToGridStackWidget(w);\n const node = this.grid?.addWidget(gridStackWidget)?.gridstackNode;\n if (!node) return undefined;\n\n const widgetElement: AXGridLayoutWidgetElement = node.el as AXGridLayoutWidgetElement;\n widgetElement.gridstackNode = convertGridStackNodeToAXGridLayoutNode(node);\n\n return widgetElement;\n }\n\n public compact(layout: 'list' | 'compact' = 'compact', doSort = true): void {\n this.grid?.compact(layout, doSort);\n }\n\n public setCellHeight(val: number, update = true): void {\n this.grid?.cellHeight(val, update);\n }\n\n public setColumn(\n column: number,\n layout: 'list' | 'compact' | 'moveScale' | 'move' | 'scale' | 'none' = 'moveScale',\n ): void {\n this.grid?.column(column, layout);\n }\n\n public destroy(removeDOM = true): void {\n this.grid?.destroy(removeDOM);\n }\n\n public setMovable(state: boolean, recurse?: boolean) {\n this.grid?.enableMove(state, recurse);\n }\n\n public setResizable(state: boolean, recurse?: boolean) {\n this.grid?.enableResize(state, recurse);\n }\n\n public setFloat(val: boolean): void {\n this.grid?.float(val);\n }\n\n public setMargin(value: number | string): void {\n this.grid?.margin(value);\n }\n\n public removeWidget(el: AXGridLayoutWidgetElement, removeDOM = true, triggerEvent = true): void {\n this.grid?.removeWidget(el, removeDOM, triggerEvent);\n }\n\n public removeAll(removeDOM = true): void {\n this.grid?.removeAll(removeDOM);\n }\n\n public setAnimation(doAnimate: boolean): void {\n this.grid?.setAnimation(doAnimate);\n }\n\n public async setupDraggable(dragIn?: string | HTMLElement[], widgets?: AXGridLayoutWidget) {\n if (typeof dragIn === 'string') {\n document.querySelectorAll(dragIn).forEach((item) => {\n if (!item.classList.contains('grid-stack-item')) {\n item.classList.add('grid-stack-item');\n }\n });\n }\n const { GridStack } = await import('gridstack');\n const gridStackWidgets = widgets ? [convertAXGridLayoutWidgetToGridStackWidget(widgets)] : undefined;\n GridStack.setupDragIn(dragIn, undefined, gridStackWidgets);\n }\n\n public getOptions(): AXGridLayoutOptions {\n const opts = this.grid?.opts;\n if (!opts) return {};\n\n return convertGridStackOptionsToAXGridLayoutOptions(opts);\n }\n\n public getChildren(): AXGridLayoutNode[] {\n const children = this.grid?.engine.nodes ?? [];\n return children.map((node) => convertGridStackNodeToAXGridLayoutNode(node));\n }\n\n public findEmptySpace(input: { h: number; w: number }): { x?: number; y?: number } {\n const value = { ...input } as any;\n this.grid?.engine.findEmptyPosition(value);\n return { x: value.x, y: value.y };\n }\n //#endregion\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AXGridLayoutContainerComponent } from './grid-layout-container.component';\nimport { AXGridLayoutWidgetComponent } from './grid-layout-widget.component';\n\n@NgModule({\n imports: [CommonModule, AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent],\n exports: [AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent],\n})\nexport class AXGridLayoutBuilderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEA;AACM,SAAU,0CAA0C,CACxD,MAA0B,EAAA;IAE1B,OAAO;QACL,EAAE,EAAE,MAAM,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BAA8B,EAAE,2BAA2B,CAAC;AACvE,iBAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-grid-layout-builder.mjs","sources":["../../../../libs/components/grid-layout-builder/src/lib/utility.ts","../../../../libs/components/grid-layout-builder/src/lib/grid-layout-widget.component.ts","../../../../libs/components/grid-layout-builder/src/lib/grid-layout-container.component.ts","../../../../libs/components/grid-layout-builder/src/lib/grid-layout-builder.module.ts","../../../../libs/components/grid-layout-builder/src/acorex-components-grid-layout-builder.ts"],"sourcesContent":["import { AXGridLayoutNode, AXGridLayoutOptions, AXGridLayoutWidget } from './types';\n\n// Convert AXGridLayoutWidget to GridStackWidget\nexport function convertAXGridLayoutWidgetToGridStackWidget(\n widget: AXGridLayoutWidget,\n): import('gridstack').GridStackWidget {\n return {\n id: widget.id,\n x: widget.x,\n y: widget.y,\n w: widget.width,\n h: widget.height,\n noResize: widget.disableResize,\n noMove: widget.disableDrag,\n };\n}\n\n// Convert GridStackWidget to AXGridLayoutWidget\nexport function convertGridStackWidgetToAXGridLayoutWidget(\n widget: import('gridstack').GridStackWidget,\n): AXGridLayoutWidget {\n return {\n id: widget.id,\n x: widget.x,\n y: widget.y,\n width: widget.w,\n height: widget.h,\n disableResize: widget.noResize,\n disableDrag: widget.noMove,\n };\n}\n\n// Convert AXGridLayoutNode to GridStackNode\nexport function convertAXGridLayoutNodeToGridStackNode(node: AXGridLayoutNode): import('gridstack').GridStackNode {\n return {\n id: node.id,\n x: node.x,\n y: node.y,\n w: node.width,\n h: node.height,\n noResize: node.disableResize,\n noMove: node.disableDrag,\n el: node.element,\n };\n}\n\n// Convert GridStackNode to AXGridLayoutNode\nexport function convertGridStackNodeToAXGridLayoutNode(node: import('gridstack').GridStackNode): AXGridLayoutNode {\n return {\n id: node.id,\n x: node.x,\n y: node.y,\n width: node.w,\n height: node.h,\n disableResize: node.noResize,\n disableDrag: node.noMove,\n element: node.el,\n };\n}\n\n// Convert AXGridLayoutOptions to GridStackOptions\nexport function convertAXGridLayoutOptionsToGridStackOptions(\n options: AXGridLayoutOptions,\n): import('gridstack').GridStackOptions {\n return {\n column: options.column,\n disableDrag: options.disableDrag,\n disableResize: options.disableResize,\n margin: options.gap,\n cellHeight: options.cellHeight,\n rtl: options.rtl,\n maxRow: options.maxRow,\n minRow: options.minRow,\n row: options.row,\n removable: options.removableSelector || options.removable,\n acceptWidgets: options.acceptWidgets,\n float: options.float,\n handle: options.dragHandlerSelector,\n columnOpts: { breakpoints: options?.responsiveLayout?.map((i) => ({ c: i.column, w: i.width })) },\n };\n}\n\n// Convert GridStackOptions to AXGridLayoutOptions\nexport function convertGridStackOptionsToAXGridLayoutOptions(\n options: import('gridstack').GridStackOptions,\n): AXGridLayoutOptions {\n return {\n column: options.column,\n disableDrag: options.disableDrag,\n disableResize: options.disableResize,\n gap: options.margin,\n cellHeight: options.cellHeight,\n rtl: options.rtl,\n maxRow: options.maxRow,\n minRow: options.minRow,\n row: options.row,\n removableSelector: typeof options.removable === 'string' ? options.removable : undefined,\n removable: typeof options.removable === 'boolean' ? options.removable : undefined,\n acceptWidgets: options.acceptWidgets as boolean,\n float: options.float,\n dragHandlerSelector: options.handle,\n responsiveLayout: options?.columnOpts?.breakpoints?.map((i) => ({ width: i.w, column: i.c })),\n };\n}\n\n/** remove keys which are undefined */\nexport function removeUndefinedKeys(obj) {\n const newObj = { ...obj };\n for (const key in newObj) {\n if (newObj[key] === undefined) {\n delete newObj[key];\n }\n }\n return newObj;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n input,\n untracked,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXGridLayoutNode, AXGridLayoutWidget, AXGridLayoutWidgetElement } from './types';\nimport { convertAXGridLayoutWidgetToGridStackWidget, convertGridStackNodeToAXGridLayoutNode } from './utility';\n\n@Component({\n selector: 'ax-grid-layout-widget',\n template: `<div class=\"grid-stack-item-content\"><ng-content></ng-content></div>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXGridLayoutWidgetComponent {\n private readonly elementRef: ElementRef<AXGridLayoutWidgetElement> = inject(ElementRef);\n\n public options = input<AXGridLayoutNode>();\n\n #eff = effect(() => {\n const options = this.options();\n\n untracked(() => {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode as import('gridstack').GridStackNode;\n if (gridstackNode?.grid) {\n gridstackNode.grid.update(this.elementRef.nativeElement, convertAXGridLayoutWidgetToGridStackWidget(options));\n }\n });\n });\n\n /**\n * Locks or unlocks the widget (prevents dragging and resizing).\n * @param state - If `true`, the widget will be locked.\n */\n public setLockable(state: boolean): void {\n this.updateWidgetOptions({ disableResize: state, disableDrag: state });\n }\n\n /**\n * Enables or disables resizing of the widget.\n * @param state - If `true`, resizing will be enabled.\n */\n public setResizable(state: boolean): void {\n this.updateWidgetOptions({ disableResize: !state });\n }\n\n /**\n * Updates the widget options.\n * @param options - The new options for the widget.\n */\n public setOptions(options: AXGridLayoutWidget): void {\n this.updateWidgetOptions(options);\n }\n\n /**\n * Returns the current options of the widget.\n * @returns The current widget options.\n */\n public getOptions(): AXGridLayoutNode {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode;\n return gridstackNode\n ? convertGridStackNodeToAXGridLayoutNode(gridstackNode)\n : { ...this.options(), element: this.elementRef.nativeElement };\n }\n\n /**\n * Returns the native DOM element of the widget.\n * @returns The native element.\n */\n public get element(): AXGridLayoutWidgetElement {\n return this.elementRef.nativeElement;\n }\n\n /**\n * Updates the widget options and triggers a grid update.\n * @param options - The partial options to update.\n */\n private updateWidgetOptions(options: Partial<AXGridLayoutWidget>): void {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode as import('gridstack').GridStackNode;\n if (gridstackNode?.grid) {\n gridstackNode.grid.update(this.elementRef.nativeElement, convertAXGridLayoutWidgetToGridStackWidget(options));\n }\n }\n}\n","import { NXComponent } from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n NgZone,\n OnDestroy,\n QueryList,\n ViewEncapsulation,\n afterNextRender,\n inject,\n input,\n model,\n output,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXGridLayoutWidgetComponent } from './grid-layout-widget.component';\nimport {\n AXGridLayout,\n AXGridLayoutContainerElement,\n AXGridLayoutEvent,\n AXGridLayoutNode,\n AXGridLayoutOptions,\n AXGridLayoutPosition,\n AXGridLayoutWidget,\n AXGridLayoutWidgetElement,\n} from './types';\nimport {\n convertAXGridLayoutNodeToGridStackNode,\n convertAXGridLayoutOptionsToGridStackOptions,\n convertAXGridLayoutWidgetToGridStackWidget,\n convertGridStackNodeToAXGridLayoutNode,\n convertGridStackOptionsToAXGridLayoutOptions,\n removeUndefinedKeys,\n} from './utility';\n\n@Component({\n selector: 'ax-grid-layout-container',\n template: `<ng-content></ng-content> `,\n styleUrl: './grid-layout-container.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXGridLayoutContainerComponent extends NXComponent implements OnDestroy {\n //#region Inputs and Outputs\n public options = input<AXGridLayoutOptions>();\n\n protected onAdded = output<AXGridLayoutEvent>();\n protected onRemoved = output<AXGridLayoutEvent>();\n protected onWidgetChange = output<AXGridLayoutEvent>();\n protected onChange = output<AXGridLayoutEvent>();\n protected isLayoutRendered = output<boolean>();\n\n protected isEmpty = model(false);\n //#endregion\n\n //#region Private Properties\n private readonly elementRef: ElementRef<AXGridLayoutContainerElement> = inject(ElementRef);\n private readonly ngZone = inject(NgZone);\n\n @ContentChildren(AXGridLayoutWidgetComponent) public gridstackItems?: QueryList<AXGridLayoutWidgetComponent>;\n\n private el = this.elementRef.nativeElement;\n private grid?: AXGridLayout;\n protected _sub: Subscription | undefined;\n //#endregion\n\n //#region Initialization\n #init = afterNextRender(() => {\n (window as any).g = this;\n this.ngZone.runOutsideAngular(async () => {\n const { GridStack } = await import('gridstack');\n const gridStackOptions = convertAXGridLayoutOptionsToGridStackOptions(this.options() ?? {});\n this.grid = GridStack.init(gridStackOptions, this.el);\n this.updateAll();\n this.hookEvents(this.grid);\n this.isLayoutRendered.emit(true);\n });\n this._sub = this.gridstackItems?.changes.subscribe(() => {\n this.updateAll();\n });\n });\n\n public ngOnDestroy(): void {\n this.unhookEvents(this.grid);\n this._sub?.unsubscribe();\n this.destroy();\n }\n //#endregion\n\n //#region Internal Methods\n private updateAll() {\n if (!this.grid) return;\n\n const arrays = this.gridstackItems?.toArray() ?? [];\n\n // If there are no items, remove all widgets first\n if (arrays.length === 0) {\n this.grid.removeAll(true);\n this.checkEmpty();\n return;\n }\n\n const layout: AXGridLayoutNode[] = [];\n arrays.forEach((item) => {\n const widgetOptions = item.getOptions();\n if (widgetOptions) {\n layout.push(convertAXGridLayoutNodeToGridStackNode(widgetOptions));\n }\n });\n\n // Clear existing widgets before loading new ones\n this.grid.removeAll(false);\n this.grid.load(layout);\n this.checkEmpty();\n }\n\n private checkEmpty() {\n if (this.grid) {\n const isEmpty = !this.getChildren().length;\n if (isEmpty === this.isEmpty()) return;\n this.isEmpty.set(isEmpty);\n }\n }\n\n private hookEvents(grid?: AXGridLayout): void {\n if (grid) {\n grid\n .on('added', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n this.checkEmpty();\n this.onAdded.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n })\n .on('removed', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n this.checkEmpty();\n this.onRemoved.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n })\n .on('change', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n this.onWidgetChange.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n });\n }\n }\n\n private unhookEvents(grid?: AXGridLayout) {\n if (grid) grid.offAll();\n }\n\n private _dispatchChangeEvent() {\n if (this.getChildren().length) {\n this.onChange.emit({\n sender: this,\n nodes: this.getChildren(),\n });\n }\n }\n //#endregion\n\n //#region Public Methods\n public addWidget(w: AXGridLayoutWidget, withAutoArrange = false): AXGridLayoutWidgetElement | undefined {\n if (withAutoArrange) this.compact();\n\n const gridStackWidget = convertAXGridLayoutWidgetToGridStackWidget(w);\n const node = this.grid?.addWidget(gridStackWidget)?.gridstackNode;\n if (!node) return undefined;\n\n const widgetElement: AXGridLayoutWidgetElement = node.el as AXGridLayoutWidgetElement;\n widgetElement.gridstackNode = convertGridStackNodeToAXGridLayoutNode(node);\n\n return widgetElement;\n }\n\n public compact(layout: 'list' | 'compact' = 'compact', doSort = true): void {\n this.grid?.compact(layout, doSort);\n }\n\n public setCellHeight(val: number, update = true): void {\n this.grid?.cellHeight(val, update);\n }\n\n public setColumn(\n column: number,\n layout: 'list' | 'compact' | 'moveScale' | 'move' | 'scale' | 'none' = 'moveScale',\n ): void {\n this.grid?.column(column, layout);\n }\n\n public destroy(removeDOM = true): void {\n this.grid?.destroy(removeDOM);\n }\n\n public setMovable(state: boolean, recurse?: boolean) {\n this.grid?.enableMove(state, recurse);\n }\n\n public setResizable(state: boolean, recurse?: boolean) {\n this.grid?.enableResize(state, recurse);\n }\n\n public setFloat(val: boolean): void {\n this.grid?.float(val);\n }\n\n public setMargin(value: number | string): void {\n this.grid?.margin(value);\n }\n\n public removeWidget(el: AXGridLayoutWidgetElement, removeDOM = true, triggerEvent = true): void {\n this.grid?.removeWidget(el, removeDOM, triggerEvent);\n }\n\n public removeAll(removeDOM = true): void {\n this.grid?.removeAll(removeDOM);\n }\n\n public setAnimation(doAnimate: boolean): void {\n this.grid?.setAnimation(doAnimate);\n }\n\n public async setupDraggable(dragIn?: string | HTMLElement[], widgets?: AXGridLayoutWidget) {\n if (typeof dragIn === 'string') {\n document.querySelectorAll(dragIn).forEach((item) => {\n if (!item.classList.contains('grid-stack-item')) {\n item.classList.add('grid-stack-item');\n }\n });\n }\n const { GridStack } = await import('gridstack');\n const gridStackWidgets = widgets ? [convertAXGridLayoutWidgetToGridStackWidget(widgets)] : undefined;\n GridStack.setupDragIn(dragIn, undefined, gridStackWidgets);\n }\n\n public getOptions(): AXGridLayoutOptions {\n const opts = this.grid?.opts;\n if (!opts) return {};\n\n return convertGridStackOptionsToAXGridLayoutOptions(opts);\n }\n\n public getChildren(): AXGridLayoutNode[] {\n const children = this.grid?.engine.nodes ?? [];\n return children.map((node) => convertGridStackNodeToAXGridLayoutNode(node));\n }\n public findEmptySpace(\n input: Required<Pick<AXGridLayoutPosition, 'height' | 'width'>>,\n ): Pick<AXGridLayoutPosition, 'x' | 'y'> {\n const value = { h: input.height, w: input.height } as any;\n this.grid?.engine.findEmptyPosition(value);\n return { x: value.x, y: value.y };\n }\n //#endregion\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AXGridLayoutContainerComponent } from './grid-layout-container.component';\nimport { AXGridLayoutWidgetComponent } from './grid-layout-widget.component';\n\n@NgModule({\n imports: [CommonModule, AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent],\n exports: [AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent],\n})\nexport class AXGridLayoutBuilderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEA;AACM,SAAU,0CAA0C,CACxD,MAA0B,EAAA;IAE1B,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,EAAE;QACb,CAAC,EAAE,MAAM,CAAC,CAAC;QACX,CAAC,EAAE,MAAM,CAAC,CAAC;QACX,CAAC,EAAE,MAAM,CAAC,KAAK;QACf,CAAC,EAAE,MAAM,CAAC,MAAM;QAChB,QAAQ,EAAE,MAAM,CAAC,aAAa;QAC9B,MAAM,EAAE,MAAM,CAAC,WAAW;K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AyB,CAAA;8GAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAzB,yBAAyB,EAAA,OAAA,EAAA,CAH1B,YAAY,EAAE,8BAA8B,EAAE,2BAA2B,CAAA,EAAA,OAAA,EAAA,CACzE,8BAA8B,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAE1D,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,yBAAyB,YAH1B,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGX,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,8BAA8B,EAAE,2BAA2B,CAAC;AACpF,oBAAA,OAAO,EAAE,CAAC,8BAA8B,EAAE,2BAA2B,CAAC;AACvE,iBAAA;;;ACTD;;AAEG;;;;"}
@@ -215,12 +215,12 @@ class AXImageEditorCropperWindowComponent {
215
215
  this.#init = afterNextRender(() => {
216
216
  const host = this.elementRef.nativeElement;
217
217
  this.ngZone.runOutsideAngular(() => {
218
- this.mouseMoveEvent = this.renderer.listen(document, 'mousemove', this.changeSizeHandler.bind(this));
219
- this.mouseUpEvent = this.renderer.listen(document, 'mouseup', this.clearSelector.bind(this));
220
- this.mouseDownEvent = this.renderer.listen(host, 'mousedown', this.panDown.bind(this));
221
- this.mouseMoveEvent2 = this.renderer.listen(host, 'mousemove', this.panMove.bind(this));
222
- this.mouseUpEvent2 = this.renderer.listen(host, 'mouseup', this.panUp.bind(this));
223
- this.mouseLeaveEvent = this.renderer.listen(host, 'mouseleave', this.panUp.bind(this));
218
+ this.mouseMoveEvent = this.renderer.listen(document, 'pointermove', this.changeSizeHandler.bind(this));
219
+ this.mouseUpEvent = this.renderer.listen(document, 'pointerup', this.clearSelector.bind(this));
220
+ this.mouseDownEvent = this.renderer.listen(host, 'pointerdown', this.panDown.bind(this));
221
+ this.mouseMoveEvent2 = this.renderer.listen(host, 'pointermove', this.panMove.bind(this));
222
+ this.mouseUpEvent2 = this.renderer.listen(host, 'pointerup', this.panUp.bind(this));
223
+ this.mouseLeaveEvent = this.renderer.listen(host, 'pointerleave', this.panUp.bind(this));
224
224
  });
225
225
  });
226
226
  this.#positionChange = effect(() => {
@@ -405,11 +405,11 @@ class AXImageEditorCropperWindowComponent {
405
405
  this.selectedHandle.set(null);
406
406
  }
407
407
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AXImageEditorCropperWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
408
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: AXImageEditorCropperWindowComponent, isStandalone: true, selector: "ax-image-editor-cropper-window", inputs: { showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "cropperWindow", first: true, predicate: ["r"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [ngStyle]=\"!showGrid() && { border: '1px dashed white' }\" #r class=\"ax-image-cropper-window-container\">\n @if (!this.service.cropperRatio()) {\n <div (mousedown)=\"handleSelector($event, 'right')\" class=\"ax-image-right-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'top')\" class=\"ax-image-top-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'left')\" class=\"ax-image-left-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'bottom')\" class=\"ax-image-bottom-handle ax-handle-shape\"></div>\n }\n\n <div (mousedown)=\"handleSelector($event, 'right-top')\" class=\"ax-image-right-top-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'bottom-right')\" class=\"ax-image-bottom-right-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'bottom-left')\" class=\"ax-image-bottom-left-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'left-top')\" class=\"ax-image-left-top-handle ax-handle-shape\"></div>\n\n @if (showGrid()) {\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n }\n</div>\n", styles: ["ax-image-editor-cropper-window{position:absolute;top:45%;left:45%;-webkit-user-select:none;user-select:none}ax-image-editor-cropper-window .ax-image-cropper-window-container{position:relative;height:100%;cursor:move;outline:rgba(0,0,0,.7) solid 100vmax;display:grid;grid-template-columns:repeat(3,1fr)}ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border:1px dashed rgba(255,255,255,.5)}ax-image-editor-cropper-window .ax-handle-shape{width:1rem;height:1rem;border:1px dashed white;background-color:gray;position:absolute;-webkit-user-select:none;user-select:none}ax-image-editor-cropper-window .ax-image-right-top-handle{top:-.5rem;right:-.5rem;cursor:ne-resize}ax-image-editor-cropper-window .ax-image-bottom-right-handle{bottom:-.5rem;right:-.5rem;cursor:se-resize}ax-image-editor-cropper-window .ax-image-right-handle{right:-.5rem;top:calc(50% - .5rem);cursor:e-resize}ax-image-editor-cropper-window .ax-image-bottom-left-handle{bottom:-.5rem;left:-.5rem;cursor:sw-resize}ax-image-editor-cropper-window .ax-image-left-top-handle{top:-.5rem;left:-.5rem;cursor:nw-resize}ax-image-editor-cropper-window .ax-image-bottom-handle{bottom:-.5rem;right:calc(50% - .5rem);cursor:s-resize}ax-image-editor-cropper-window .ax-image-left-handle{left:-.5rem;top:calc(50% - .5rem);cursor:w-resize}ax-image-editor-cropper-window .ax-image-top-handle{top:-.5rem;right:calc(50% - .5rem);cursor:n-resize}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
408
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: AXImageEditorCropperWindowComponent, isStandalone: true, selector: "ax-image-editor-cropper-window", inputs: { showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "cropperWindow", first: true, predicate: ["r"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [ngStyle]=\"!showGrid() && { border: '1px dashed white' }\" #r class=\"ax-image-cropper-window-container\">\n @if (!this.service.cropperRatio()) {\n <div (pointerdown)=\"handleSelector($event, 'right')\" class=\"ax-image-right-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'top')\" class=\"ax-image-top-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left')\" class=\"ax-image-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom')\" class=\"ax-image-bottom-handle ax-handle-shape\"></div>\n }\n\n <div (pointerdown)=\"handleSelector($event, 'right-top')\" class=\"ax-image-right-top-handle ax-handle-shape\"></div>\n <div\n (pointerdown)=\"handleSelector($event, 'bottom-right')\"\n class=\"ax-image-bottom-right-handle ax-handle-shape\"\n ></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom-left')\" class=\"ax-image-bottom-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left-top')\" class=\"ax-image-left-top-handle ax-handle-shape\"></div>\n\n @if (showGrid()) {\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n }\n</div>\n", styles: ["ax-image-editor-cropper-window{position:absolute;top:45%;left:45%;-webkit-user-select:none;user-select:none;touch-action:none}ax-image-editor-cropper-window .ax-image-cropper-window-container{position:relative;height:100%;cursor:move;outline:rgba(0,0,0,.7) solid 100vmax;display:grid;grid-template-columns:repeat(3,1fr)}ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border:1px dashed rgba(255,255,255,.5)}ax-image-editor-cropper-window .ax-handle-shape{width:1rem;height:1rem;border:1px dashed white;background-color:gray;position:absolute;-webkit-user-select:none;user-select:none}ax-image-editor-cropper-window .ax-image-right-top-handle{top:-.5rem;right:-.5rem;cursor:ne-resize}ax-image-editor-cropper-window .ax-image-bottom-right-handle{bottom:-.5rem;right:-.5rem;cursor:se-resize}ax-image-editor-cropper-window .ax-image-right-handle{right:-.5rem;top:calc(50% - .5rem);cursor:e-resize}ax-image-editor-cropper-window .ax-image-bottom-left-handle{bottom:-.5rem;left:-.5rem;cursor:sw-resize}ax-image-editor-cropper-window .ax-image-left-top-handle{top:-.5rem;left:-.5rem;cursor:nw-resize}ax-image-editor-cropper-window .ax-image-bottom-handle{bottom:-.5rem;right:calc(50% - .5rem);cursor:s-resize}ax-image-editor-cropper-window .ax-image-left-handle{left:-.5rem;top:calc(50% - .5rem);cursor:w-resize}ax-image-editor-cropper-window .ax-image-top-handle{top:-.5rem;right:calc(50% - .5rem);cursor:n-resize}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
409
409
  }
410
410
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AXImageEditorCropperWindowComponent, decorators: [{
411
411
  type: Component,
412
- args: [{ selector: 'ax-image-editor-cropper-window', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], template: "<div [ngStyle]=\"!showGrid() && { border: '1px dashed white' }\" #r class=\"ax-image-cropper-window-container\">\n @if (!this.service.cropperRatio()) {\n <div (mousedown)=\"handleSelector($event, 'right')\" class=\"ax-image-right-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'top')\" class=\"ax-image-top-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'left')\" class=\"ax-image-left-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'bottom')\" class=\"ax-image-bottom-handle ax-handle-shape\"></div>\n }\n\n <div (mousedown)=\"handleSelector($event, 'right-top')\" class=\"ax-image-right-top-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'bottom-right')\" class=\"ax-image-bottom-right-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'bottom-left')\" class=\"ax-image-bottom-left-handle ax-handle-shape\"></div>\n <div (mousedown)=\"handleSelector($event, 'left-top')\" class=\"ax-image-left-top-handle ax-handle-shape\"></div>\n\n @if (showGrid()) {\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n }\n</div>\n", styles: ["ax-image-editor-cropper-window{position:absolute;top:45%;left:45%;-webkit-user-select:none;user-select:none}ax-image-editor-cropper-window .ax-image-cropper-window-container{position:relative;height:100%;cursor:move;outline:rgba(0,0,0,.7) solid 100vmax;display:grid;grid-template-columns:repeat(3,1fr)}ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border:1px dashed rgba(255,255,255,.5)}ax-image-editor-cropper-window .ax-handle-shape{width:1rem;height:1rem;border:1px dashed white;background-color:gray;position:absolute;-webkit-user-select:none;user-select:none}ax-image-editor-cropper-window .ax-image-right-top-handle{top:-.5rem;right:-.5rem;cursor:ne-resize}ax-image-editor-cropper-window .ax-image-bottom-right-handle{bottom:-.5rem;right:-.5rem;cursor:se-resize}ax-image-editor-cropper-window .ax-image-right-handle{right:-.5rem;top:calc(50% - .5rem);cursor:e-resize}ax-image-editor-cropper-window .ax-image-bottom-left-handle{bottom:-.5rem;left:-.5rem;cursor:sw-resize}ax-image-editor-cropper-window .ax-image-left-top-handle{top:-.5rem;left:-.5rem;cursor:nw-resize}ax-image-editor-cropper-window .ax-image-bottom-handle{bottom:-.5rem;right:calc(50% - .5rem);cursor:s-resize}ax-image-editor-cropper-window .ax-image-left-handle{left:-.5rem;top:calc(50% - .5rem);cursor:w-resize}ax-image-editor-cropper-window .ax-image-top-handle{top:-.5rem;right:calc(50% - .5rem);cursor:n-resize}\n"] }]
412
+ args: [{ selector: 'ax-image-editor-cropper-window', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], template: "<div [ngStyle]=\"!showGrid() && { border: '1px dashed white' }\" #r class=\"ax-image-cropper-window-container\">\n @if (!this.service.cropperRatio()) {\n <div (pointerdown)=\"handleSelector($event, 'right')\" class=\"ax-image-right-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'top')\" class=\"ax-image-top-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left')\" class=\"ax-image-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom')\" class=\"ax-image-bottom-handle ax-handle-shape\"></div>\n }\n\n <div (pointerdown)=\"handleSelector($event, 'right-top')\" class=\"ax-image-right-top-handle ax-handle-shape\"></div>\n <div\n (pointerdown)=\"handleSelector($event, 'bottom-right')\"\n class=\"ax-image-bottom-right-handle ax-handle-shape\"\n ></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom-left')\" class=\"ax-image-bottom-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left-top')\" class=\"ax-image-left-top-handle ax-handle-shape\"></div>\n\n @if (showGrid()) {\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n }\n</div>\n", styles: ["ax-image-editor-cropper-window{position:absolute;top:45%;left:45%;-webkit-user-select:none;user-select:none;touch-action:none}ax-image-editor-cropper-window .ax-image-cropper-window-container{position:relative;height:100%;cursor:move;outline:rgba(0,0,0,.7) solid 100vmax;display:grid;grid-template-columns:repeat(3,1fr)}ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border:1px dashed rgba(255,255,255,.5)}ax-image-editor-cropper-window .ax-handle-shape{width:1rem;height:1rem;border:1px dashed white;background-color:gray;position:absolute;-webkit-user-select:none;user-select:none}ax-image-editor-cropper-window .ax-image-right-top-handle{top:-.5rem;right:-.5rem;cursor:ne-resize}ax-image-editor-cropper-window .ax-image-bottom-right-handle{bottom:-.5rem;right:-.5rem;cursor:se-resize}ax-image-editor-cropper-window .ax-image-right-handle{right:-.5rem;top:calc(50% - .5rem);cursor:e-resize}ax-image-editor-cropper-window .ax-image-bottom-left-handle{bottom:-.5rem;left:-.5rem;cursor:sw-resize}ax-image-editor-cropper-window .ax-image-left-top-handle{top:-.5rem;left:-.5rem;cursor:nw-resize}ax-image-editor-cropper-window .ax-image-bottom-handle{bottom:-.5rem;right:calc(50% - .5rem);cursor:s-resize}ax-image-editor-cropper-window .ax-image-left-handle{left:-.5rem;top:calc(50% - .5rem);cursor:w-resize}ax-image-editor-cropper-window .ax-image-top-handle{top:-.5rem;right:calc(50% - .5rem);cursor:n-resize}\n"] }]
413
413
  }] });
414
414
 
415
415
  class AXImageEditorViewComponent extends MXBaseComponent {
@@ -600,6 +600,7 @@ class AXImageEditorViewComponent extends MXBaseComponent {
600
600
  }
601
601
  /** @ignore */
602
602
  rotateImage() {
603
+ this.ctx().globalAlpha = 1;
603
604
  this.ctx().save();
604
605
  this.ctx().clearRect(0, 0, this.canvasElem().nativeElement.width, this.canvasElem().nativeElement.height);
605
606
  this.ctx().translate(this.service.newImage().width / 2, this.service.newImage().height / 2);