@acorex/components 18.9.6 → 18.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/drawer/index.d.ts +2 -2
  2. package/drawer/lib/{drawer-container.component.d.ts → drawer/drawer-container/drawer-container.component.d.ts} +3 -4
  3. package/drawer/lib/drawer/drawer-item/drawer.component.d.ts +65 -0
  4. package/drawer/lib/drawer.module.d.ts +2 -2
  5. package/drawer/lib/drawer.service.d.ts +7 -0
  6. package/esm2022/decorators/lib/components/close-button.component.mjs +3 -2
  7. package/esm2022/drawer/index.mjs +3 -3
  8. package/esm2022/drawer/lib/drawer/drawer-container/drawer-container.component.mjs +34 -0
  9. package/esm2022/drawer/lib/drawer/drawer-item/drawer.component.mjs +151 -0
  10. package/esm2022/drawer/lib/drawer.module.mjs +3 -3
  11. package/esm2022/drawer/lib/drawer.service.mjs +13 -0
  12. package/esm2022/paint/lib/paint.module.mjs +2 -2
  13. package/esm2022/qrcode/acorex-components-qrcode.mjs +5 -0
  14. package/esm2022/qrcode/index.mjs +4 -0
  15. package/esm2022/qrcode/lib/qrcode.class.mjs +14 -0
  16. package/esm2022/qrcode/lib/qrcode.component.mjs +129 -0
  17. package/esm2022/qrcode/lib/qrcode.module.mjs +18 -0
  18. package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +6 -1
  19. package/fesm2022/acorex-components-decorators.mjs +1 -0
  20. package/fesm2022/acorex-components-decorators.mjs.map +1 -1
  21. package/fesm2022/acorex-components-drawer.mjs +75 -173
  22. package/fesm2022/acorex-components-drawer.mjs.map +1 -1
  23. package/fesm2022/acorex-components-paint.mjs +2 -2
  24. package/fesm2022/acorex-components-paint.mjs.map +1 -1
  25. package/fesm2022/acorex-components-qrcode.mjs +165 -0
  26. package/fesm2022/acorex-components-qrcode.mjs.map +1 -0
  27. package/fesm2022/acorex-components-wysiwyg.mjs +5 -0
  28. package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
  29. package/package.json +55 -48
  30. package/qrcode/README.md +3 -0
  31. package/qrcode/index.d.ts +3 -0
  32. package/qrcode/lib/qrcode.class.d.ts +3 -0
  33. package/qrcode/lib/qrcode.component.d.ts +57 -0
  34. package/qrcode/lib/qrcode.module.d.ts +8 -0
  35. package/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.d.ts +1 -0
  36. package/drawer/lib/drawer.component.d.ts +0 -143
  37. package/esm2022/drawer/lib/drawer-container.component.mjs +0 -40
  38. package/esm2022/drawer/lib/drawer.component.mjs +0 -252
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-paint.mjs","sources":["../../../../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.service.ts","../../../../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-cap/paint-pen-cap.component.ts","../../../../libs/components/paint/src/lib/paint/paint-tools/paint-pen-cap/paint-pen-cap.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 {\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';\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 { 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","<div class=\"ax-paint-toolbar-container\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n","import { Injectable, signal } from '@angular/core';\n\n@Injectable()\nexport class AXPaintService {\n penColor = signal<string | CanvasGradient | CanvasPattern>('');\n lineCap = signal<CanvasLineCap>('round');\n lineWidth = signal<number>(10);\n penType = signal<'pen' | 'highlight' | 'eraser'>('pen');\n toggleClear = signal(false);\n}\n","import { AXPlacement } from '@acorex/components/common';\nimport { AXPopoverCloseTrigger, AXPopoverOpenTrigger } from '@acorex/components/popover';\nimport { 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 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 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-button #colorBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-color-palette\"></ax-icon>\n</ax-button>\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"colorBtn\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-color-palette (ngModelChange)=\"changeColorHandler($event)\" [ngModel]=\"selectedColor()\">\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-picker></ax-color-palette-picker>\n <ax-color-palette-input></ax-color-palette-input>\n </ax-color-palette>\n </div>\n</ax-popover>\n","import { Component, HostBinding, inject, signal, ViewEncapsulation } from '@angular/core';\nimport { AXPaintContainerComponent } from '../../paint-container/paint-container.component';\nimport { AXPaintService } from '../../paint.service';\n\n/**\n * paint pen cap.\n * @category Components\n */\n@Component({\n selector: 'ax-paint-pen-cap',\n templateUrl: './paint-pen-cap.component.html',\n styleUrl: './paint-pen-cap.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintPenCapComponent {\n /** @ignore */\n protected parent = inject(AXPaintContainerComponent);\n\n /** @ignore */\n protected service = inject(AXPaintService);\n\n /** @ignore */\n protected selectedLineCap = signal<CanvasLineCap>('round');\n\n /** @ignore */\n protected lineCapHandler(e: CanvasLineCap) {\n this.service.lineCap.set(e);\n }\n\n @HostBinding('style.marginInline')\n get __hostClass(): string {\n return `.5rem`;\n }\n}\n","<ax-select-box\n [look]=\"this.parent.look\"\n (ngModelChange)=\"lineCapHandler($event)\"\n [ngModel]=\"selectedLineCap()\"\n [dataSource]=\"['round', 'square']\"\n placeholder=\"Choose...\"\n>\n</ax-select-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","<div class=\"ax-paint-pen-mode-changer-container\">\n <div class=\"ax-pen-type-container\">\n <ax-button look=\"blank\" #alignPop>\n <ax-icon class=\"ax-icon ax-icon-pen-ruler\"></ax-icon>\n </ax-button>\n </div>\n\n <ax-button (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</div>\n","import {\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 = this.service.lineCap();\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 window.addEventListener('resize', this.resizeEventHandler.bind(this));\n }\n\n /** @ignore */\n ngOnDestroy(): void {\n removeEventListener('resize', this.resizeEventHandler);\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().lineCap = this.service.lineCap();\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().lineCap = this.service.lineCap();\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 { NgModule } from '@angular/core';\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXColorPaletteModule } from '@acorex/components/color-palette';\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 { 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 { AXPaintPenCapComponent } from './paint/paint-tools/paint-pen-cap/paint-pen-cap.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';\nimport { AXPaintService } from './paint/paint.service';\n\nconst COMPONENT = [\n AXPaintContainerComponent,\n AXPaintToolbarComponent,\n AXPaintViewComponent,\n AXPaintColorPickerComponent,\n AXPaintPenCapComponent,\n AXPaintPenModeChangerComponent,\n];\n\nconst MODULES = [\n FormsModule,\n AXRangeSliderModule,\n AXSelectBoxModule,\n AXButtonModule,\n AXColorPaletteModule,\n AXPopoverModule,\n AXDecoratorModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXPaintService],\n})\nexport class AXPaintModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;AAYA;;;AAGG;AAmBG,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,EAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,EAZzB,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA;AACT,YAAA,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,yBAAyB,EAAE;AAChE,YAAA,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,yBAAyB,EAAE;AACzE,YAAA,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,yBAAyB,EAAE;AACzE,YAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,yBAAyB,EAAE;AACxE,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,yBAAyB,CAAC;AACxD,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACF,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChCH,qMAKA,EAAA,MAAA,EAAA,CAAA,8GAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,E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../../../../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.service.ts","../../../../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-cap/paint-pen-cap.component.ts","../../../../libs/components/paint/src/lib/paint/paint-tools/paint-pen-cap/paint-pen-cap.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 {\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';\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 { 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","<div class=\"ax-paint-toolbar-container\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n","import { Injectable, signal } from '@angular/core';\n\n@Injectable()\nexport class AXPaintService {\n penColor = signal<string | CanvasGradient | CanvasPattern>('');\n lineCap = signal<CanvasLineCap>('round');\n lineWidth = signal<number>(10);\n penType = signal<'pen' | 'highlight' | 'eraser'>('pen');\n toggleClear = signal(false);\n}\n","import { AXPlacement } from '@acorex/components/common';\nimport { AXPopoverCloseTrigger, AXPopoverOpenTrigger } from '@acorex/components/popover';\nimport { 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 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 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-button #colorBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-color-palette\"></ax-icon>\n</ax-button>\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"colorBtn\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-color-palette (ngModelChange)=\"changeColorHandler($event)\" [ngModel]=\"selectedColor()\">\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-picker></ax-color-palette-picker>\n <ax-color-palette-input></ax-color-palette-input>\n </ax-color-palette>\n </div>\n</ax-popover>\n","import { Component, HostBinding, inject, signal, ViewEncapsulation } from '@angular/core';\nimport { AXPaintContainerComponent } from '../../paint-container/paint-container.component';\nimport { AXPaintService } from '../../paint.service';\n\n/**\n * paint pen cap.\n * @category Components\n */\n@Component({\n selector: 'ax-paint-pen-cap',\n templateUrl: './paint-pen-cap.component.html',\n styleUrl: './paint-pen-cap.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintPenCapComponent {\n /** @ignore */\n protected parent = inject(AXPaintContainerComponent);\n\n /** @ignore */\n protected service = inject(AXPaintService);\n\n /** @ignore */\n protected selectedLineCap = signal<CanvasLineCap>('round');\n\n /** @ignore */\n protected lineCapHandler(e: CanvasLineCap) {\n this.service.lineCap.set(e);\n }\n\n @HostBinding('style.marginInline')\n get __hostClass(): string {\n return `.5rem`;\n }\n}\n","<ax-select-box\n [look]=\"this.parent.look\"\n (ngModelChange)=\"lineCapHandler($event)\"\n [ngModel]=\"selectedLineCap()\"\n [dataSource]=\"['round', 'square']\"\n placeholder=\"Choose...\"\n>\n</ax-select-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","<div class=\"ax-paint-pen-mode-changer-container\">\n <div class=\"ax-pen-type-container\">\n <ax-button look=\"blank\" #alignPop>\n <ax-icon class=\"ax-icon ax-icon-pen-ruler\"></ax-icon>\n </ax-button>\n </div>\n\n <ax-button (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</div>\n","import {\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 = this.service.lineCap();\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 window.addEventListener('resize', this.resizeEventHandler.bind(this));\n }\n\n /** @ignore */\n ngOnDestroy(): void {\n removeEventListener('resize', this.resizeEventHandler);\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().lineCap = this.service.lineCap();\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().lineCap = this.service.lineCap();\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 { AXColorPaletteModule } from '@acorex/components/color-palette';\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 { 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 { AXPaintPenCapComponent } from './paint/paint-tools/paint-pen-cap/paint-pen-cap.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';\nimport { AXPaintService } from './paint/paint.service';\n\nconst COMPONENT = [\n AXPaintContainerComponent,\n AXPaintToolbarComponent,\n AXPaintViewComponent,\n AXPaintColorPickerComponent,\n AXPaintPenCapComponent,\n AXPaintPenModeChangerComponent,\n];\n\nconst MODULES = [\n FormsModule,\n AXRangeSliderModule,\n AXSelectBoxModule,\n AXButtonModule,\n AXColorPaletteModule,\n AXPopoverModule,\n AXDecoratorModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXPaintService],\n})\nexport class AXPaintModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;AAYA;;;AAGG;AAmBG,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,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B,2BAA2B;YAC3B,sBAAsB;AACtB,YAAA,8BAA8B,aAI9B,WAAW;YACX,mBAAmB;YACnB,iBAAiB;YACjB,cAAc;YACd,oBAAoB;YACpB,eAAe;AACf,YAAA,iBAAiB,aAfjB,yBAAyB;YACzB,uBAAuB;YACvB,oBAAoB;YACpB,2BAA2B;YAC3B,sBAAsB;YACtB,8BAA8B,CAAA,EAAA,CAAA,CAAA,EAAA;AAmBnB,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,EAAA;;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,CAAA;;;ACxCD;;AAEG;;;;"}
@@ -0,0 +1,165 @@
1
+ import { AXValuableComponent } from '@acorex/components/common';
2
+ import * as i0 from '@angular/core';
3
+ import { input, signal, viewChild, effect, forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
4
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
+ import QRCode from 'qrcode';
6
+ import { CommonModule } from '@angular/common';
7
+
8
+ function debounce(func, delay) {
9
+ let timeoutId;
10
+ return function (...args) {
11
+ // Clear the existing timeout if there is one
12
+ if (timeoutId) {
13
+ clearTimeout(timeoutId);
14
+ }
15
+ // Set a new timeout
16
+ timeoutId = setTimeout(() => {
17
+ func(...args);
18
+ }, delay);
19
+ };
20
+ }
21
+
22
+ class AXQrcodeComponent {
23
+ /**
24
+ * @ignore
25
+ */
26
+ constructor() {
27
+ /**
28
+ * @description Value of QR code
29
+ */
30
+ this.content = input.required();
31
+ /**
32
+ * @description Size of the QR code
33
+ * @default 256
34
+ */
35
+ this.size = input(256);
36
+ /**
37
+ * @description Error correction level can be 'L' | 'M' | 'Q' | 'H'
38
+ * @default 'M'
39
+ */
40
+ this.level = input('M');
41
+ /**
42
+ * @description QR code color, can be a hex code or CSS color name
43
+ * @default '#000000'
44
+ */
45
+ this.color = input('#000000');
46
+ /**
47
+ * @description QR code Background color, can be a hex code or CSS color name
48
+ * @default '#FFFFFF'
49
+ */
50
+ this.backgroundColor = input('#FFFFFF');
51
+ /**
52
+ * @description Type of output can be 'canvas' | 'svg' | 'url'
53
+ * @default 'canvas'
54
+ */
55
+ this.outputType = input('canvas'); //
56
+ /**
57
+ * @ignore
58
+ */
59
+ /**
60
+ * @description // Holds base64 or URL if outputType is 'url' or 'base64'
61
+ */
62
+ this.qrCodeUrl = signal(undefined);
63
+ /**
64
+ * @ignore
65
+ */
66
+ this.canvas = viewChild('canvas');
67
+ /**
68
+ * @ignore
69
+ */
70
+ this.svg = viewChild('svg');
71
+ effect(() => {
72
+ this.generateQRCode();
73
+ }, {
74
+ allowSignalWrites: true,
75
+ });
76
+ }
77
+ // ngOnChanges(): void {
78
+ // const debunce = debounce(this.generateQRCode, 500);
79
+ // debunce();
80
+ // }
81
+ ngAfterViewInit() {
82
+ this.generateQRCode();
83
+ }
84
+ generateQRCode() {
85
+ if (!this.content())
86
+ return;
87
+ const options = {
88
+ margin: 0,
89
+ width: this.size(),
90
+ errorCorrectionLevel: this.level(),
91
+ color: {
92
+ dark: this.color(),
93
+ light: this.backgroundColor(),
94
+ },
95
+ };
96
+ if (this.outputType() === 'canvas') {
97
+ QRCode.toCanvas(this.canvas().nativeElement, this.content(), options, (error) => {
98
+ if (error) {
99
+ console.error(error);
100
+ }
101
+ });
102
+ }
103
+ else if (this.outputType() === 'svg') {
104
+ QRCode.toString(this.content(), { ...options, type: 'svg' }, (error, svgString) => {
105
+ if (error) {
106
+ console.error(error);
107
+ }
108
+ else {
109
+ this.svg().nativeElement.innerHTML = svgString;
110
+ }
111
+ });
112
+ }
113
+ else {
114
+ QRCode.toDataURL(this.content(), options, (error, url) => {
115
+ if (error) {
116
+ console.error(error);
117
+ }
118
+ else {
119
+ this.qrCodeUrl.set(url);
120
+ }
121
+ });
122
+ }
123
+ }
124
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXQrcodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
125
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXQrcodeComponent, selector: "ax-qrcode", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, outputType: { classPropertyName: "outputType", publicName: "outputType", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
126
+ { provide: AXValuableComponent, useExisting: AXQrcodeComponent },
127
+ {
128
+ provide: NG_VALUE_ACCESSOR,
129
+ useExisting: forwardRef(() => AXQrcodeComponent),
130
+ multi: true,
131
+ },
132
+ ], viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }, { propertyName: "svg", first: true, predicate: ["svg"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"qrcode\"></div>\n@if (outputType() === 'canvas') {\n <canvas #canvas></canvas>\n} @else if (outputType() === 'svg') {\n <div #svg></div>\n} @else {\n <img [src]=\"qrCodeUrl()\" alt=\"QR Code\" #img />\n}\n", styles: [".qrcode{width:fit-content;height:fit-content;border:1px solid black}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
133
+ }
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXQrcodeComponent, decorators: [{
135
+ type: Component,
136
+ args: [{ selector: 'ax-qrcode', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
137
+ { provide: AXValuableComponent, useExisting: AXQrcodeComponent },
138
+ {
139
+ provide: NG_VALUE_ACCESSOR,
140
+ useExisting: forwardRef(() => AXQrcodeComponent),
141
+ multi: true,
142
+ },
143
+ ], template: "<div class=\"qrcode\"></div>\n@if (outputType() === 'canvas') {\n <canvas #canvas></canvas>\n} @else if (outputType() === 'svg') {\n <div #svg></div>\n} @else {\n <img [src]=\"qrCodeUrl()\" alt=\"QR Code\" #img />\n}\n", styles: [".qrcode{width:fit-content;height:fit-content;border:1px solid black}\n"] }]
144
+ }], ctorParameters: () => [] });
145
+
146
+ class QrcodeModule {
147
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: QrcodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
148
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: QrcodeModule, declarations: [AXQrcodeComponent], imports: [CommonModule], exports: [AXQrcodeComponent] }); }
149
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: QrcodeModule, imports: [CommonModule] }); }
150
+ }
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: QrcodeModule, decorators: [{
152
+ type: NgModule,
153
+ args: [{
154
+ declarations: [AXQrcodeComponent],
155
+ imports: [CommonModule],
156
+ exports: [AXQrcodeComponent],
157
+ }]
158
+ }] });
159
+
160
+ /**
161
+ * Generated bundle index. Do not edit.
162
+ */
163
+
164
+ export { AXQrcodeComponent, QrcodeModule, debounce };
165
+ //# sourceMappingURL=acorex-components-qrcode.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-qrcode.mjs","sources":["../../../../libs/components/qrcode/src/lib/qrcode.class.ts","../../../../libs/components/qrcode/src/lib/qrcode.component.ts","../../../../libs/components/qrcode/src/lib/qrcode.component.html","../../../../libs/components/qrcode/src/lib/qrcode.module.ts","../../../../libs/components/qrcode/src/acorex-components-qrcode.ts"],"sourcesContent":["export type AXQrcodeOutputType = 'canvas' | 'svg' | 'url';\nexport type AXQrcodeLevel = 'L' | 'M' | 'Q' | 'H';\n\nexport function debounce(func, delay) {\n let timeoutId;\n\n return function (...args) {\n // Clear the existing timeout if there is one\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n\n // Set a new timeout\n timeoutId = setTimeout(() => {\n func(...args);\n }, delay);\n };\n}\n","import { AXValuableComponent } from '@acorex/components/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n forwardRef,\n input,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport QRCode from 'qrcode';\nimport { AXQrcodeLevel, AXQrcodeOutputType } from './qrcode.class';\n\n@Component({\n selector: 'ax-qrcode',\n templateUrl: './qrcode.component.html',\n styleUrls: ['./qrcode.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXValuableComponent, useExisting: AXQrcodeComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXQrcodeComponent),\n multi: true,\n },\n ],\n})\nexport class AXQrcodeComponent implements AfterViewInit {\n /**\n * @description Value of QR code\n */\n content = input.required<string>();\n /**\n * @description Size of the QR code\n * @default 256\n */\n size = input(256);\n /**\n * @description Error correction level can be 'L' | 'M' | 'Q' | 'H'\n * @default 'M'\n */\n level = input<AXQrcodeLevel>('M');\n /**\n * @description QR code color, can be a hex code or CSS color name\n * @default '#000000'\n */\n color = input('#000000');\n /**\n * @description QR code Background color, can be a hex code or CSS color name\n * @default '#FFFFFF'\n */\n backgroundColor = input('#FFFFFF');\n /**\n * @description Type of output can be 'canvas' | 'svg' | 'url'\n * @default 'canvas'\n */\n outputType = input<AXQrcodeOutputType>('canvas'); //\n /**\n * @ignore\n */\n /**\n * @description // Holds base64 or URL if outputType is 'url' or 'base64'\n */\n protected qrCodeUrl = signal<string | undefined>(undefined);\n /**\n * @ignore\n */\n private canvas = viewChild<ElementRef<HTMLCanvasElement>>('canvas');\n /**\n * @ignore\n */\n private svg = viewChild<ElementRef<HTMLCanvasElement>>('svg');\n /**\n * @ignore\n */\n\n constructor() {\n effect(\n () => {\n this.generateQRCode();\n },\n {\n allowSignalWrites: true,\n },\n );\n }\n // ngOnChanges(): void {\n // const debunce = debounce(this.generateQRCode, 500);\n // debunce();\n // }\n ngAfterViewInit() {\n this.generateQRCode();\n }\n\n private generateQRCode() {\n if (!this.content()) return;\n const options = {\n margin: 0,\n width: this.size(),\n errorCorrectionLevel: this.level(),\n color: {\n dark: this.color(),\n light: this.backgroundColor(),\n },\n };\n\n if (this.outputType() === 'canvas') {\n QRCode.toCanvas(this.canvas().nativeElement, this.content(), options, (error) => {\n if (error) {\n console.error(error);\n }\n });\n } else if (this.outputType() === 'svg') {\n QRCode.toString(this.content(), { ...options, type: 'svg' }, (error, svgString) => {\n if (error) {\n console.error(error);\n } else {\n this.svg().nativeElement.innerHTML = svgString;\n }\n });\n } else {\n QRCode.toDataURL(this.content(), options, (error, url) => {\n if (error) {\n console.error(error);\n } else {\n this.qrCodeUrl.set(url);\n }\n });\n }\n }\n}\n","<div class=\"qrcode\"></div>\n@if (outputType() === 'canvas') {\n <canvas #canvas></canvas>\n} @else if (outputType() === 'svg') {\n <div #svg></div>\n} @else {\n <img [src]=\"qrCodeUrl()\" alt=\"QR Code\" #img />\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXQrcodeComponent } from './qrcode.component';\n\n@NgModule({\n declarations: [AXQrcodeComponent],\n imports: [CommonModule],\n exports: [AXQrcodeComponent],\n})\nexport class QrcodeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGgB,SAAA,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAA;AAClC,IAAA,IAAI,SAAS,CAAC;IAEd,OAAO,UAAU,GAAG,IAAI,EAAA;;QAEtB,IAAI,SAAS,EAAE;YACb,YAAY,CAAC,SAAS,CAAC,CAAC;SACzB;;AAGD,QAAA,SAAS,GAAG,UAAU,CAAC,MAAK;AAC1B,YAAA,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;SACf,EAAE,KAAK,CAAC,CAAC;AACZ,KAAC,CAAC;AACJ;;MCea,iBAAiB,CAAA;AA6C5B;;AAEG;AAEH,IAAA,WAAA,GAAA;AAhDA;;AAEG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;AACnC;;;AAGG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAClB;;;AAGG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,GAAG,CAAC,CAAC;AAClC;;;AAGG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AACzB;;;AAGG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AACnC;;;AAGG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAqB,QAAQ,CAAC,CAAC;AACjD;;AAEG;AACH;;AAEG;AACO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,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
@@ -56,12 +56,16 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
56
56
  this.zone.runOutsideAngular(() => {
57
57
  this.wysiwyg.set(new AXWysiwyg(this.view(), {
58
58
  placeholder: 'Write Your Message ...',
59
+ readOnly: true,
59
60
  }));
60
61
  this.wysiwyg().wysiwygObj.on('text-change', this.changeHandler.bind(this));
61
62
  });
62
63
  this.service.wysiwyg.set(this.wysiwyg());
63
64
  if (this.initialValue())
64
65
  this.wysiwyg().wysiwygObj.root.innerHTML = this.initialValue();
66
+ this.setTimeOut = setTimeout(() => {
67
+ this.wysiwyg().wysiwygObj.enable();
68
+ }, 1000);
65
69
  });
66
70
  effect(() => {
67
71
  if (this.value) {
@@ -92,6 +96,7 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
92
96
  /** @ignore */
93
97
  ngOnDestroy() {
94
98
  this.wysiwyg().wysiwygObj.off('text-change', this.changeHandler);
99
+ clearTimeout(this.setTimeOut);
95
100
  }
96
101
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
97
102
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXWysiwygContainerComponent, selector: "ax-wysiwyg-container", inputs: { look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null } }, providers: [