@acorex/components 18.10.12 → 18.10.14
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/paint/index.mjs +1 -2
- package/esm2022/paint/lib/paint/paint-toolbar/paint-toolbar.component.mjs +3 -3
- package/esm2022/paint/lib/paint/paint-tools/paint-color-picker/paint-color-picker.component.mjs +3 -3
- package/esm2022/paint/lib/paint/paint-tools/paint-pen-mode-changer/paint-pen-mode-changer.component.mjs +3 -3
- package/esm2022/paint/lib/paint/paint-view/paint-view.component.mjs +2 -4
- package/esm2022/paint/lib/paint/paint.service.mjs +1 -2
- package/esm2022/paint/lib/paint.module.mjs +1 -5
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +9 -4
- package/fesm2022/acorex-components-paint.mjs +9 -47
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +8 -3
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/package.json +24 -24
- package/paint/index.d.ts +0 -1
- package/paint/lib/paint/paint.service.d.ts +0 -1
- package/paint/lib/paint.module.d.ts +9 -10
- package/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.d.ts +7 -1
- package/esm2022/paint/lib/paint/paint-tools/paint-pen-cap/paint-pen-cap.component.mjs +0 -37
- package/paint/lib/paint/paint-tools/paint-pen-cap/paint-pen-cap.component.d.ts +0 -20
@@ -6,9 +6,8 @@ import * as i5 from '@acorex/components/decorators';
|
|
6
6
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
7
7
|
import * as i4 from '@acorex/components/popover';
|
8
8
|
import { AXPopoverModule } from '@acorex/components/popover';
|
9
|
-
import * as i2$
|
9
|
+
import * as i2$1 from '@acorex/components/range-slider';
|
10
10
|
import { AXRangeSliderModule } from '@acorex/components/range-slider';
|
11
|
-
import * as i2$1 from '@acorex/components/select-box';
|
12
11
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
13
12
|
import * as i0 from '@angular/core';
|
14
13
|
import { forwardRef, Component, ViewEncapsulation, signal, Injectable, inject, HostBinding, input, viewChild, afterNextRender, effect, NgModule } from '@angular/core';
|
@@ -56,17 +55,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
56
55
|
*/
|
57
56
|
class AXPaintToolbarComponent {
|
58
57
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
59
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPaintToolbarComponent, selector: "ax-paint-toolbar", ngImport: i0, template: "<
|
58
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPaintToolbarComponent, selector: "ax-paint-toolbar", ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-toolbar-container\">\n <ng-content></ng-content>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n", styles: ["ax-paint-toolbar{padding:.3rem;width:100%;display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}ax-paint-toolbar .ax-toolbar-container{display:flex;justify-content:flex-start;align-items:center;margin-inline:.5rem}ax-paint-toolbar .ax-icon{font-weight:900;font-size:1rem}ax-paint-toolbar ax-prefix,ax-paint-toolbar ax-suffix{margin-inline:.3rem}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
60
59
|
}
|
61
60
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintToolbarComponent, decorators: [{
|
62
61
|
type: Component,
|
63
|
-
args: [{ selector: 'ax-paint-toolbar', encapsulation: ViewEncapsulation.None, template: "<
|
62
|
+
args: [{ selector: 'ax-paint-toolbar', encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-toolbar-container\">\n <ng-content></ng-content>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n", styles: ["ax-paint-toolbar{padding:.3rem;width:100%;display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}ax-paint-toolbar .ax-toolbar-container{display:flex;justify-content:flex-start;align-items:center;margin-inline:.5rem}ax-paint-toolbar .ax-icon{font-weight:900;font-size:1rem}ax-paint-toolbar ax-prefix,ax-paint-toolbar ax-suffix{margin-inline:.3rem}\n"] }]
|
64
63
|
}] });
|
65
64
|
|
66
65
|
class AXPaintService {
|
67
66
|
constructor() {
|
68
67
|
this.penColor = signal('');
|
69
|
-
this.lineCap = signal('round');
|
70
68
|
this.lineWidth = signal(10);
|
71
69
|
this.penType = signal('pen');
|
72
70
|
this.toggleClear = signal(false);
|
@@ -106,42 +104,11 @@ class AXPaintColorPickerComponent {
|
|
106
104
|
return `.5rem`;
|
107
105
|
}
|
108
106
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
109
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPaintColorPickerComponent, selector: "ax-paint-color-picker", host: { properties: { "style.marginInline": "this.__hostClass" } }, ngImport: i0, template: "<ax-button #colorBtn look=\"blank\">\n
|
107
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPaintColorPickerComponent, selector: "ax-paint-color-picker", host: { properties: { "style.marginInline": "this.__hostClass" } }, ngImport: i0, template: "<div class=\"ax-color-flex-container\">\n <div [style]=\"{ backgroundColor: selectedColor() }\" class=\"ax-submit-color\"></div>\n <ax-button #colorBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-color-palette\"></ax-icon>\n </ax-button>\n</div>\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", styles: ["ax-paint-color-picker{margin-inline:0!important}ax-paint-color-picker .ax-submit-color{border:1px solid rgb(var(--ax-color-text-default));width:.6rem;height:.6rem;border-radius:1000vmax}ax-paint-color-picker .ax-color-flex-container{display:flex;align-items:center;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i3.AXColorPalleteComponent, selector: "ax-color-palette", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "checked"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "component", type: i3.AXColorPalettePreviewComponent, selector: "ax-color-palette-preview" }, { kind: "component", type: i3.AXColorPaletteInputComponent, selector: "ax-color-palette-input" }, { kind: "component", type: i3.AXColorPalettePickerComponent, selector: "ax-color-palette-picker" }, { kind: "component", type: i4.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i5.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
110
108
|
}
|
111
109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintColorPickerComponent, decorators: [{
|
112
110
|
type: Component,
|
113
|
-
args: [{ selector: 'ax-paint-color-picker', encapsulation: ViewEncapsulation.None, template: "<ax-button #colorBtn look=\"blank\">\n
|
114
|
-
}], propDecorators: { __hostClass: [{
|
115
|
-
type: HostBinding,
|
116
|
-
args: ['style.marginInline']
|
117
|
-
}] } });
|
118
|
-
|
119
|
-
/**
|
120
|
-
* paint pen cap.
|
121
|
-
* @category Components
|
122
|
-
*/
|
123
|
-
class AXPaintPenCapComponent {
|
124
|
-
constructor() {
|
125
|
-
/** @ignore */
|
126
|
-
this.parent = inject(AXPaintContainerComponent);
|
127
|
-
/** @ignore */
|
128
|
-
this.service = inject(AXPaintService);
|
129
|
-
/** @ignore */
|
130
|
-
this.selectedLineCap = signal('round');
|
131
|
-
}
|
132
|
-
/** @ignore */
|
133
|
-
lineCapHandler(e) {
|
134
|
-
this.service.lineCap.set(e);
|
135
|
-
}
|
136
|
-
get __hostClass() {
|
137
|
-
return `.5rem`;
|
138
|
-
}
|
139
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintPenCapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
140
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPaintPenCapComponent, selector: "ax-paint-pen-cap", host: { properties: { "style.marginInline": "this.__hostClass" } }, ngImport: i0, template: "<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", styles: [""], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
141
|
-
}
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintPenCapComponent, decorators: [{
|
143
|
-
type: Component,
|
144
|
-
args: [{ selector: 'ax-paint-pen-cap', encapsulation: ViewEncapsulation.None, template: "<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" }]
|
111
|
+
args: [{ selector: 'ax-paint-color-picker', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-color-flex-container\">\n <div [style]=\"{ backgroundColor: selectedColor() }\" class=\"ax-submit-color\"></div>\n <ax-button #colorBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-color-palette\"></ax-icon>\n </ax-button>\n</div>\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", styles: ["ax-paint-color-picker{margin-inline:0!important}ax-paint-color-picker .ax-submit-color{border:1px solid rgb(var(--ax-color-text-default));width:.6rem;height:.6rem;border-radius:1000vmax}ax-paint-color-picker .ax-color-flex-container{display:flex;align-items:center;cursor:pointer}\n"] }]
|
145
112
|
}], propDecorators: { __hostClass: [{
|
146
113
|
type: HostBinding,
|
147
114
|
args: ['style.marginInline']
|
@@ -184,11 +151,11 @@ class AXPaintPenModeChangerComponent {
|
|
184
151
|
this.service.lineWidth.set(e);
|
185
152
|
}
|
186
153
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintPenModeChangerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
187
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
154
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPaintPenModeChangerComponent, selector: "ax-paint-pen-mode-changer", host: { properties: { "style.marginInline": "this.__hostClass" } }, ngImport: i0, template: "<ax-button look=\"blank\" #alignPop>\n @switch (service.penType()) {\n @case ('pen') {\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n }\n @case ('highlight') {\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n }\n @case ('eraser') {\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n }\n }\n</ax-button>\n\n<ax-button (click)=\"clear()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n</ax-button>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"alignPop\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-button\n (click)=\"penTypeHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'pen' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'highlight' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('eraser')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'eraser' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n </ax-button>\n\n <div class=\"ax-paint-width-slider\">\n <ax-range-slider\n [min]=\"2\"\n [max]=\"20\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"valueHandler($event)\"\n ></ax-range-slider>\n </div>\n </div>\n</ax-popover>\n", styles: ["ax-paint-pen-mode-changer{display:flex;align-items:center;margin-inline:0!important}ax-paint-pen-mode-changer ax-range-slider{padding:.5rem .75rem}ax-paint-pen-mode-changer ax-range-slider .ax-range-slider .ax-range-slider-handler{width:1rem!important;height:1rem!important}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i5.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
188
155
|
}
|
189
156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintPenModeChangerComponent, decorators: [{
|
190
157
|
type: Component,
|
191
|
-
args: [{ selector: 'ax-paint-pen-mode-changer', encapsulation: ViewEncapsulation.None, template: "<
|
158
|
+
args: [{ selector: 'ax-paint-pen-mode-changer', encapsulation: ViewEncapsulation.None, template: "<ax-button look=\"blank\" #alignPop>\n @switch (service.penType()) {\n @case ('pen') {\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n }\n @case ('highlight') {\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n }\n @case ('eraser') {\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n }\n }\n</ax-button>\n\n<ax-button (click)=\"clear()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n</ax-button>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"alignPop\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-button\n (click)=\"penTypeHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'pen' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'highlight' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('eraser')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'eraser' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n </ax-button>\n\n <div class=\"ax-paint-width-slider\">\n <ax-range-slider\n [min]=\"2\"\n [max]=\"20\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"valueHandler($event)\"\n ></ax-range-slider>\n </div>\n </div>\n</ax-popover>\n", styles: ["ax-paint-pen-mode-changer{display:flex;align-items:center;margin-inline:0!important}ax-paint-pen-mode-changer ax-range-slider{padding:.5rem .75rem}ax-paint-pen-mode-changer ax-range-slider .ax-range-slider .ax-range-slider-handler{width:1rem!important;height:1rem!important}\n"] }]
|
192
159
|
}], propDecorators: { __hostClass: [{
|
193
160
|
type: HostBinding,
|
194
161
|
args: ['style.marginInline']
|
@@ -223,7 +190,7 @@ class AXPaintViewComponent {
|
|
223
190
|
this.ctx().canvas.width = this.getBoundingCanvasHandler().width;
|
224
191
|
this.ctx().canvas.height = this.getBoundingCanvasHandler().height;
|
225
192
|
this.ctx().lineJoin = 'round';
|
226
|
-
this.ctx().lineCap =
|
193
|
+
this.ctx().lineCap = 'round';
|
227
194
|
this.ctx().strokeStyle = this.service.penColor();
|
228
195
|
this.ctx().lineWidth = this.service.lineWidth();
|
229
196
|
});
|
@@ -270,7 +237,6 @@ class AXPaintViewComponent {
|
|
270
237
|
this.isUserInteract.set(true);
|
271
238
|
this.penConfigHandler(this.service.penType());
|
272
239
|
this.ctx().strokeStyle = this.service.penColor();
|
273
|
-
this.ctx().lineCap = this.service.lineCap();
|
274
240
|
this.ctx().lineWidth = this.service.lineWidth();
|
275
241
|
this.ctx().beginPath();
|
276
242
|
this.ctx().moveTo(e.offsetX, e.offsetY);
|
@@ -297,7 +263,6 @@ class AXPaintViewComponent {
|
|
297
263
|
this.isUserInteract.set(true);
|
298
264
|
this.penConfigHandler(this.service.penType());
|
299
265
|
this.ctx().strokeStyle = this.service.penColor();
|
300
|
-
this.ctx().lineCap = this.service.lineCap();
|
301
266
|
this.ctx().lineWidth = this.service.lineWidth();
|
302
267
|
this.ctx().beginPath();
|
303
268
|
this.ctx().moveTo(offsetX, offsetY);
|
@@ -350,7 +315,6 @@ const COMPONENT = [
|
|
350
315
|
AXPaintToolbarComponent,
|
351
316
|
AXPaintViewComponent,
|
352
317
|
AXPaintColorPickerComponent,
|
353
|
-
AXPaintPenCapComponent,
|
354
318
|
AXPaintPenModeChangerComponent,
|
355
319
|
];
|
356
320
|
const MODULES = [
|
@@ -368,7 +332,6 @@ class AXPaintModule {
|
|
368
332
|
AXPaintToolbarComponent,
|
369
333
|
AXPaintViewComponent,
|
370
334
|
AXPaintColorPickerComponent,
|
371
|
-
AXPaintPenCapComponent,
|
372
335
|
AXPaintPenModeChangerComponent], imports: [FormsModule,
|
373
336
|
AXRangeSliderModule,
|
374
337
|
AXSelectBoxModule,
|
@@ -379,7 +342,6 @@ class AXPaintModule {
|
|
379
342
|
AXPaintToolbarComponent,
|
380
343
|
AXPaintViewComponent,
|
381
344
|
AXPaintColorPickerComponent,
|
382
|
-
AXPaintPenCapComponent,
|
383
345
|
AXPaintPenModeChangerComponent] }); }
|
384
346
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPaintModule, providers: [AXPaintService], imports: [MODULES] }); }
|
385
347
|
}
|
@@ -397,5 +359,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
397
359
|
* Generated bundle index. Do not edit.
|
398
360
|
*/
|
399
361
|
|
400
|
-
export { AXPaintColorPickerComponent, AXPaintContainerComponent, AXPaintModule,
|
362
|
+
export { AXPaintColorPickerComponent, AXPaintContainerComponent, AXPaintModule, AXPaintPenModeChangerComponent, AXPaintToolbarComponent, AXPaintViewComponent };
|
401
363
|
//# sourceMappingURL=acorex-components-paint.mjs.map
|
@@ -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 { 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,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BAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBAxBxB,yBAAyB;YACzB,uBAAuB;YACvB,oBAAoB;YACpB,2BAA2B;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;;;;"}
|
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-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","<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-toolbar-container\">\n <ng-content></ng-content>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n","import { Injectable, signal } from '@angular/core';\n\n@Injectable()\nexport class AXPaintService {\n penColor = signal<string | CanvasGradient | CanvasPattern>('');\n lineWidth = signal<number>(10);\n penType = signal<'pen' | 'highlight' | 'eraser'>('pen');\n toggleClear = signal(false);\n}\n","import { 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","<div class=\"ax-color-flex-container\">\n <div [style]=\"{ backgroundColor: selectedColor() }\" class=\"ax-submit-color\"></div>\n <ax-button #colorBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-color-palette\"></ax-icon>\n </ax-button>\n</div>\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 { AXPlacement } from '@acorex/components/common';\nimport { AXPopoverCloseTrigger, AXPopoverOpenTrigger } from '@acorex/components/popover';\nimport { Component, HostBinding, inject, signal, ViewEncapsulation } from '@angular/core';\nimport { AXPaintService } from '../../paint.service';\n\n/**\n * paint mode.\n * @category Components\n */\n@Component({\n selector: 'ax-paint-pen-mode-changer',\n templateUrl: './paint-pen-mode-changer.component.html',\n styleUrl: './paint-pen-mode-changer.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintPenModeChangerComponent {\n /** @ignore */\n protected service = inject(AXPaintService);\n\n /** @ignore */\n protected value = 10;\n\n /** @ignore */\n protected popoverOption: {\n openOn: AXPopoverOpenTrigger;\n closeOn: AXPopoverCloseTrigger;\n placement: AXPlacement;\n offsetX: number;\n offsetY: number;\n } = {\n openOn: 'click',\n closeOn: 'clickOut',\n placement: 'top',\n offsetX: 0,\n offsetY: 0,\n };\n\n /** @ignore */\n protected selectedPenType = signal<'pen' | 'highlight' | 'eraser'>('pen');\n\n /** @ignore */\n protected penTypeHandler(e: 'pen' | 'highlight' | 'eraser') {\n this.service.penType.set(e);\n }\n\n /** @ignore */\n protected clear() {\n this.service.toggleClear.update((prev) => !prev);\n }\n\n @HostBinding('style.marginInline')\n get __hostClass(): string {\n return `.5rem`;\n }\n\n /** @ignore */\n protected valueHandler(e: number) {\n this.service.lineWidth.set(e);\n }\n}\n","<ax-button look=\"blank\" #alignPop>\n @switch (service.penType()) {\n @case ('pen') {\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n }\n @case ('highlight') {\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n }\n @case ('eraser') {\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n }\n }\n</ax-button>\n\n<ax-button (click)=\"clear()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n</ax-button>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"alignPop\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-button\n (click)=\"penTypeHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'pen' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'highlight' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n (click)=\"penTypeHandler('eraser')\"\n look=\"blank\"\n [selected]=\"this.service.penType() === 'eraser' ? true : false\"\n >\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n </ax-button>\n\n <div class=\"ax-paint-width-slider\">\n <ax-range-slider\n [min]=\"2\"\n [max]=\"20\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"valueHandler($event)\"\n ></ax-range-slider>\n </div>\n </div>\n</ax-popover>\n","import {\n afterNextRender,\n Component,\n effect,\n ElementRef,\n HostBinding,\n inject,\n input,\n OnDestroy,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXPaintContainerComponent } from '../paint-container/paint-container.component';\nimport { AXPaintService } from '../paint.service';\n\n/**\n * @category Components\n * paint view\n */\n@Component({\n selector: 'ax-paint-view',\n templateUrl: './paint-view.component.html',\n styleUrl: './paint-view.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPaintViewComponent implements OnDestroy {\n /** @ignore */\n parent = inject(AXPaintContainerComponent);\n\n /** @ignore */\n protected service = inject(AXPaintService);\n\n /**\n * Specifies the class that pass to component.\n *\n */\n customClass = input<string>('', { alias: 'class' });\n\n /** @ignore */\n protected canvasElem = viewChild<ElementRef<HTMLCanvasElement>>('c');\n\n /** @ignore */\n protected ctx = signal<CanvasRenderingContext2D>(null);\n\n /** @ignore */\n protected isPainting = signal(false);\n\n /** @ignore */\n protected isUserInteract = signal(false);\n\n /** @ignore */\n constructor() {\n afterNextRender(() => {\n this.ctx.set(this.canvasElem().nativeElement.getContext('2d'));\n this.ctx().canvas.width = this.getBoundingCanvasHandler().width;\n this.ctx().canvas.height = this.getBoundingCanvasHandler().height;\n this.ctx().lineJoin = 'round';\n this.ctx().lineCap = 'round';\n this.ctx().strokeStyle = this.service.penColor();\n this.ctx().lineWidth = this.service.lineWidth();\n });\n\n effect(\n () => {\n this.isUserInteract.set(false);\n this.service.toggleClear();\n this.ctx()?.clearRect(\n 0,\n 0,\n this.getBoundingCanvasHandler()?.width,\n this.getBoundingCanvasHandler()?.height,\n );\n },\n { allowSignalWrites: true },\n );\n\n 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().lineWidth = this.service.lineWidth();\n\n this.ctx().beginPath();\n this.ctx().moveTo(e.offsetX, e.offsetY);\n this.ctx().lineTo(e.offsetX, e.offsetY);\n this.ctx().stroke();\n }\n\n /** @ignore */\n protected mouseMoveHandler(e: MouseEvent) {\n if (this.isPainting()) {\n this.ctx().lineTo(e.offsetX, e.offsetY);\n this.ctx().stroke();\n }\n }\n\n /** @ignore */\n protected mouseUpHandler() {\n this.ctx().closePath();\n this.isPainting.set(false);\n }\n\n /** @ignore */\n protected touchStartHandler(e: TouchEvent) {\n const offsetX = e.touches[0].clientX - this.getBoundingCanvasHandler().left;\n const offsetY = e.touches[0].clientY - this.getBoundingCanvasHandler().top;\n\n this.isPainting.set(true);\n this.isUserInteract.set(true);\n\n this.penConfigHandler(this.service.penType());\n\n this.ctx().strokeStyle = this.service.penColor();\n this.ctx().lineWidth = this.service.lineWidth();\n\n this.ctx().beginPath();\n this.ctx().moveTo(offsetX, offsetY);\n this.ctx().lineTo(offsetX, offsetY);\n this.ctx().stroke();\n }\n\n /** @ignore */\n protected touchMoveHandler(e: TouchEvent) {\n e.preventDefault(); // prevent page from scroll\n if (this.isPainting()) {\n const offsetX = e.touches[0].clientX - this.getBoundingCanvasHandler().left;\n const offsetY = e.touches[0].clientY - this.getBoundingCanvasHandler().top;\n this.ctx().lineTo(offsetX, offsetY);\n this.ctx().stroke();\n }\n }\n\n /** @ignore */\n protected touchEndHandler() {\n this.ctx().closePath();\n this.isPainting.set(false);\n }\n\n /**\n * @param e - output file type\n */\n getOutPut(e: 'image/webp' | 'image/png' | 'image/jpeg') {\n const base64 = this.canvasElem().nativeElement.toDataURL(e, 0.1);\n if (this.isUserInteract()) {\n this.parent.commitValue(base64);\n } else {\n this.parent.commitValue(null);\n }\n }\n\n @HostBinding('class')\n get __hostClass(): string {\n return `${this.customClass()}`;\n }\n}\n","<canvas\n #c\n tabindex=\"1\"\n (mousedown)=\"mouseDownHandler($event)\"\n (mouseup)=\"mouseUpHandler()\"\n (mousemove)=\"mouseMoveHandler($event)\"\n (touchstart)=\"touchStartHandler($event)\"\n (touchend)=\"touchEndHandler()\"\n (touchmove)=\"touchMoveHandler($event)\"\n class=\"ax-canvas-element\"\n>\n</canvas>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { 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 { 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 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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Ac,CAAC;AAC5B,iBAAA,CAAA;;;ACtCD;;AAEG;;;;"}
|
@@ -5,7 +5,7 @@ import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
5
5
|
import * as i3$2 from '@acorex/components/select-box';
|
6
6
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
7
7
|
import * as i0 from '@angular/core';
|
8
|
-
import { signal, Injectable, inject, NgZone, afterNextRender, effect, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation,
|
8
|
+
import { signal, Injectable, inject, NgZone, input, afterNextRender, effect, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, HostListener, NgModule } from '@angular/core';
|
9
9
|
import * as i3$1 from '@angular/forms';
|
10
10
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
11
11
|
import { AXWysiwyg } from '@acorex/cdk/wysiwyg';
|
@@ -50,11 +50,16 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
50
50
|
this.view = signal(null);
|
51
51
|
/** @ignore */
|
52
52
|
this.service = inject(AXWysiwygService);
|
53
|
+
/**
|
54
|
+
* Specifies the placeholder text.
|
55
|
+
*
|
56
|
+
*/
|
57
|
+
this.placeHolder = input();
|
53
58
|
afterNextRender(() => {
|
54
59
|
this.view.set(this.getHostElement().querySelector('ax-wysiwyg-view'));
|
55
60
|
this.zone.runOutsideAngular(() => {
|
56
61
|
this.wysiwyg.set(new AXWysiwyg(this.view(), {
|
57
|
-
placeholder: 'Write Your Message ...',
|
62
|
+
placeholder: this.placeHolder() || 'Write Your Message ...',
|
58
63
|
readOnly: true,
|
59
64
|
}));
|
60
65
|
this.wysiwyg().wysiwygObj.on('text-change', this.changeHandler.bind(this));
|
@@ -96,7 +101,7 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
96
101
|
clearTimeout(this.setTimeOut);
|
97
102
|
}
|
98
103
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
99
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
104
|
+
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 }, placeHolder: { classPropertyName: "placeHolder", publicName: "placeHolder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onValueChanged: "onValueChanged" }, providers: [
|
100
105
|
{ provide: AXComponent, useExisting: AXWysiwygContainerComponent },
|
101
106
|
{ provide: AXFocusableComponent, useExisting: AXWysiwygContainerComponent },
|
102
107
|
{ provide: AXClearableComponent, useExisting: AXWysiwygContainerComponent },
|