@acorex/components 20.8.22 → 20.8.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,8 +12,9 @@ import * as i7 from '@acorex/components/decorators';
12
12
  import * as i8 from '@acorex/components/loading';
13
13
  import * as i9 from '@acorex/components/dialog';
14
14
 
15
+ type AXImageEditorTool = 'pen' | 'highlight' | 'crop' | 'rotate';
15
16
  declare class AXImageEditorService {
16
- activeToolState: _angular_core.WritableSignal<"pen" | "highlight" | "crop" | "rotate" | "history">;
17
+ activeToolState: _angular_core.WritableSignal<AXImageEditorTool>;
17
18
  penColor: _angular_core.WritableSignal<string | CanvasGradient | CanvasPattern>;
18
19
  highlightColor: _angular_core.WritableSignal<string | CanvasGradient | CanvasPattern>;
19
20
  penWidth: _angular_core.WritableSignal<number>;
@@ -30,6 +31,9 @@ declare class AXImageEditorService {
30
31
  undoPressed: _angular_core.WritableSignal<boolean>;
31
32
  redoPressed: _angular_core.WritableSignal<boolean>;
32
33
  cropperRatio: _angular_core.WritableSignal<string>;
34
+ cropperSize: _angular_core.WritableSignal<number>;
35
+ toggleTool(tool: AXImageEditorTool): void;
36
+ activateTool(tool: AXImageEditorTool): void;
33
37
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorService, never>;
34
38
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXImageEditorService>;
35
39
  }
@@ -41,6 +45,8 @@ declare class AXImageEditorService {
41
45
  declare class AXImageEditorCropperWindowComponent implements OnDestroy {
42
46
  #private;
43
47
  readonly showGrid: _angular_core.InputSignal<boolean>;
48
+ /** Base size in pixels used to calculate the initial cropper window dimensions. */
49
+ readonly size: _angular_core.InputSignal<number>;
44
50
  protected service: AXImageEditorService;
45
51
  private ngZone;
46
52
  private selectedHandle;
@@ -78,7 +84,7 @@ declare class AXImageEditorCropperWindowComponent implements OnDestroy {
78
84
  protected changeSizeHandler(e: MouseEvent): void;
79
85
  protected clearSelector(): void;
80
86
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorCropperWindowComponent, never>;
81
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorCropperWindowComponent, "ax-image-editor-cropper-window", never, { "showGrid": { "alias": "showGrid"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
87
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorCropperWindowComponent, "ax-image-editor-cropper-window", never, { "showGrid": { "alias": "showGrid"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
82
88
  }
83
89
 
84
90
  declare class AXImageEditorViewComponent extends MXBaseComponent implements OnDestroy {
@@ -86,6 +92,10 @@ declare class AXImageEditorViewComponent extends MXBaseComponent implements OnDe
86
92
  * its change grid display state.
87
93
  */
88
94
  readonly showGrid: _angular_core.InputSignal<boolean>;
95
+ /**
96
+ * Base size in pixels for the initial cropper window dimensions.
97
+ */
98
+ readonly cropperSize: _angular_core.InputSignal<number>;
89
99
  /**
90
100
  * its change grid display state.
91
101
  */
@@ -141,13 +151,13 @@ declare class AXImageEditorViewComponent extends MXBaseComponent implements OnDe
141
151
  /** @ignore */
142
152
  protected mouseUpHandler(): void;
143
153
  /** @ignore */
144
- cropButtonHandler(): void;
154
+ crop(): void;
145
155
  /** @ignore */
146
156
  protected rotateImage(): void;
147
157
  /** @ignore */
148
158
  protected saveImageChange(): Promise<void>;
149
159
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorViewComponent, never>;
150
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorViewComponent, "ax-image-editor-view", never, { "showGrid": { "alias": "showGrid"; "required": false; "isSignal": true; }; "src": { "alias": "src"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
160
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorViewComponent, "ax-image-editor-view", never, { "showGrid": { "alias": "showGrid"; "required": false; "isSignal": true; }; "cropperSize": { "alias": "cropperSize"; "required": false; "isSignal": true; }; "src": { "alias": "src"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
151
161
  }
152
162
 
153
163
  declare const AXImageEditorContainerComponent_base: polytype.Polytype.ClusteredConstructor<[{
@@ -165,41 +175,48 @@ declare class AXImageEditorContainerComponent extends AXImageEditorContainerComp
165
175
  protected service: AXImageEditorService;
166
176
  imageEditorContainer: _angular_core.Signal<ElementRef<any>>;
167
177
  view: _angular_core.Signal<AXImageEditorViewComponent>;
168
- aspectRatio: _angular_core.InputSignal<string[]>;
169
- protected cropButtonHandler(): void;
178
+ /** Applies the current cropper selection. */
179
+ crop(): void;
170
180
  get __hostClass(): string;
171
181
  private get __hostName();
172
182
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorContainerComponent, never>;
173
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorContainerComponent, "ax-image-editor-container", never, { "look": { "alias": "look"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; }, { "onValueChanged": "onValueChanged"; }, ["view"], ["ax-header", "ax-image-editor-view", "ax-validation-rule"], true, never>;
183
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorContainerComponent, "ax-image-editor-container", never, { "look": { "alias": "look"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onValueChanged": "onValueChanged"; }, ["view"], ["ax-header", "ax-image-editor-view", "ax-footer", "ax-validation-rule"], true, never>;
174
184
  }
175
185
 
176
186
  /**
177
- * paint mode.
187
+ * Base class for image editor tool trigger components.
178
188
  * @category Components
179
189
  */
180
- declare class AXImageEditorCropComponent {
190
+ declare abstract class AXImageEditorToolComponent {
181
191
  protected service: AXImageEditorService;
182
- cropPressed: _angular_core.OutputEmitterRef<void>;
192
+ abstract readonly tool: AXImageEditorTool;
193
+ setActive(): void;
194
+ }
195
+
196
+ /**
197
+ * Crop tool trigger for the image editor toolbar.
198
+ * @category Components
199
+ */
200
+ declare class AXImageEditorCropComponent extends AXImageEditorToolComponent {
201
+ #private;
202
+ readonly tool = "crop";
203
+ private container;
204
+ /** Aspect ratio presets. Append `:active` to mark the default ratio, e.g. `'2:1:active'`. */
183
205
  aspectRatio: _angular_core.InputSignal<string[]>;
184
- protected cropButtonHandler(): void;
185
- protected ratioHandler(r: '1:1' | '16:9' | string): void;
206
+ /** Base size in pixels for the initial cropper window dimensions. */
207
+ size: _angular_core.InputSignal<number>;
208
+ /** Applies the current cropper selection. */
209
+ crop(): void;
186
210
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorCropComponent, never>;
187
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorCropComponent, "ax-image-editor-crop", never, { "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; }, { "cropPressed": "cropPressed"; }, never, never, true, never>;
211
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorCropComponent, "ax-image-editor-crop", never, { "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
188
212
  }
189
213
 
190
214
  /**
191
- * paint mode.
215
+ * Highlight tool trigger for the image editor toolbar.
192
216
  * @category Components
193
217
  */
194
- declare class AXImageEditorHighlightComponent {
195
- protected service: AXImageEditorService;
196
- /** @ignore */
197
- protected selectedColor: _angular_core.WritableSignal<string | CanvasGradient | CanvasPattern>;
198
- /** @ignore */
199
- protected value: number;
200
- protected changeColorHandler(e: string): void;
201
- /** @ignore */
202
- protected valueHandler(e: number): void;
218
+ declare class AXImageEditorHighlightComponent extends AXImageEditorToolComponent {
219
+ readonly tool = "highlight";
203
220
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorHighlightComponent, never>;
204
221
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorHighlightComponent, "ax-image-editor-highlight", never, {}, {}, never, never, true, never>;
205
222
  }
@@ -217,52 +234,62 @@ declare class AXImageEditorHistoryComponent {
217
234
  }
218
235
 
219
236
  /**
220
- * paint mode.
237
+ * Pen tool trigger for the image editor toolbar.
221
238
  * @category Components
222
239
  */
223
- declare class AXImageEditorPenComponent {
224
- protected service: AXImageEditorService;
225
- /** @ignore */
226
- protected value: number;
227
- /** @ignore */
228
- protected selectedColor: _angular_core.WritableSignal<string | CanvasGradient | CanvasPattern>;
229
- protected changeColorHandler(e: string): void;
230
- /** @ignore */
231
- protected valueHandler(e: number): void;
240
+ declare class AXImageEditorPenComponent extends AXImageEditorToolComponent {
241
+ readonly tool = "pen";
232
242
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorPenComponent, never>;
233
243
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorPenComponent, "ax-image-editor-pen", never, {}, {}, never, never, true, never>;
234
244
  }
235
245
 
236
246
  /**
237
- * paint mode.
247
+ * Rotate tool trigger for the image editor toolbar.
238
248
  * @category Components
239
249
  */
240
- declare class AXImageEditorRotateComponent {
241
- /** @ignore */
242
- protected service: AXImageEditorService;
243
- /** @ignore */
244
- protected rotateRightHandler(): void;
245
- /** @ignore */
246
- protected rotateLeftHandler(): void;
250
+ declare class AXImageEditorRotateComponent extends AXImageEditorToolComponent {
251
+ readonly tool = "rotate";
247
252
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorRotateComponent, never>;
248
253
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorRotateComponent, "ax-image-editor-rotate", never, {}, {}, never, never, true, never>;
249
254
  }
250
255
 
251
256
  /**
252
- * paint mode.
257
+ * Toolbar layout for configurable image editor tools.
253
258
  * @category Components
254
259
  */
255
- declare class AXImageEditorToolSelectorComponent {
260
+ declare class AXImageEditorToolsBarComponent {
261
+ #private;
256
262
  protected service: AXImageEditorService;
257
- protected changeToolHandler(tool: 'pen' | 'highlight' | 'crop' | 'rotate'): void;
263
+ /**
264
+ * Tool component reference to activate on load.
265
+ */
266
+ active: _angular_core.InputSignal<AXImageEditorToolComponent>;
267
+ /** Hides the tools bar UI while keeping projected tools configurable. */
268
+ hidden: _angular_core.InputSignal<boolean>;
269
+ protected penTool: _angular_core.Signal<AXImageEditorPenComponent>;
270
+ protected highlightTool: _angular_core.Signal<AXImageEditorHighlightComponent>;
271
+ protected cropTool: _angular_core.Signal<AXImageEditorCropComponent>;
272
+ protected rotateTool: _angular_core.Signal<AXImageEditorRotateComponent>;
273
+ protected cropAspectRatio: _angular_core.Signal<string[]>;
274
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorToolsBarComponent, never>;
275
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorToolsBarComponent, "ax-image-editor-tools-bar", never, { "active": { "alias": "active"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; }, {}, ["penTool", "highlightTool", "cropTool", "rotateTool"], ["ax-image-editor-pen, ax-image-editor-highlight, ax-image-editor-crop, ax-image-editor-rotate"], true, never>;
276
+ }
277
+
278
+ /**
279
+ * Convenience wrapper that includes all image editor tools.
280
+ * @category Components
281
+ */
282
+ declare class AXImageEditorToolSelectorComponent {
283
+ aspectRatio: _angular_core.InputSignal<string[]>;
258
284
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorToolSelectorComponent, never>;
259
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorToolSelectorComponent, "ax-image-editor-tool-selector", never, {}, {}, never, never, true, never>;
285
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorToolSelectorComponent, "ax-image-editor-tool-selector", never, { "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
260
286
  }
261
287
 
262
288
  declare class AXImageEditorModule {
263
289
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorModule, never>;
264
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXImageEditorModule, never, [typeof i1.AXButtonModule, typeof i2.FormsModule, typeof i3.AXRangeSliderModule, typeof i4.AXSelectBoxModule, typeof i5.AXColorBoxModule, typeof i6.AXPopoverModule, typeof i7.AXDecoratorModule, typeof i8.AXLoadingModule, typeof i9.AXDialogModule, typeof AXImageEditorViewComponent, typeof AXImageEditorContainerComponent, typeof AXImageEditorCropComponent, typeof AXImageEditorHistoryComponent, typeof AXImageEditorToolSelectorComponent, typeof AXImageEditorPenComponent, typeof AXImageEditorHighlightComponent, typeof AXImageEditorRotateComponent, typeof AXImageEditorCropperWindowComponent], [typeof AXImageEditorViewComponent, typeof AXImageEditorContainerComponent, typeof AXImageEditorCropComponent, typeof AXImageEditorHistoryComponent, typeof AXImageEditorToolSelectorComponent, typeof AXImageEditorPenComponent, typeof AXImageEditorHighlightComponent, typeof AXImageEditorRotateComponent, typeof AXImageEditorCropperWindowComponent]>;
290
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXImageEditorModule, never, [typeof i1.AXButtonModule, typeof i2.FormsModule, typeof i3.AXRangeSliderModule, typeof i4.AXSelectBoxModule, typeof i5.AXColorBoxModule, typeof i6.AXPopoverModule, typeof i7.AXDecoratorModule, typeof i8.AXLoadingModule, typeof i9.AXDialogModule, typeof AXImageEditorViewComponent, typeof AXImageEditorContainerComponent, typeof AXImageEditorCropComponent, typeof AXImageEditorHistoryComponent, typeof AXImageEditorToolSelectorComponent, typeof AXImageEditorToolsBarComponent, typeof AXImageEditorPenComponent, typeof AXImageEditorHighlightComponent, typeof AXImageEditorRotateComponent, typeof AXImageEditorCropperWindowComponent], [typeof AXImageEditorViewComponent, typeof AXImageEditorContainerComponent, typeof AXImageEditorCropComponent, typeof AXImageEditorHistoryComponent, typeof AXImageEditorToolSelectorComponent, typeof AXImageEditorToolsBarComponent, typeof AXImageEditorPenComponent, typeof AXImageEditorHighlightComponent, typeof AXImageEditorRotateComponent, typeof AXImageEditorCropperWindowComponent]>;
265
291
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXImageEditorModule>;
266
292
  }
267
293
 
268
- export { AXImageEditorContainerComponent, AXImageEditorCropComponent, AXImageEditorCropperWindowComponent, AXImageEditorHighlightComponent, AXImageEditorHistoryComponent, AXImageEditorModule, AXImageEditorPenComponent, AXImageEditorRotateComponent, AXImageEditorService, AXImageEditorToolSelectorComponent, AXImageEditorViewComponent };
294
+ export { AXImageEditorContainerComponent, AXImageEditorCropComponent, AXImageEditorCropperWindowComponent, AXImageEditorHighlightComponent, AXImageEditorHistoryComponent, AXImageEditorModule, AXImageEditorPenComponent, AXImageEditorRotateComponent, AXImageEditorService, AXImageEditorToolComponent, AXImageEditorToolSelectorComponent, AXImageEditorToolsBarComponent, AXImageEditorViewComponent };
295
+ export type { AXImageEditorTool };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@acorex/components",
3
- "version": "20.8.22",
3
+ "version": "20.8.24",
4
4
  "peerDependencies": {
5
- "@acorex/core": "20.8.22",
6
- "@acorex/cdk": "20.8.22",
5
+ "@acorex/core": "20.8.24",
6
+ "@acorex/cdk": "20.8.24",
7
7
  "polytype": ">=0.17.0",
8
8
  "angular-imask": ">=7.6.1",
9
9
  "gridstack": ">=12.0.0",
@@ -60,14 +60,14 @@
60
60
  "types": "./accordion/index.d.ts",
61
61
  "default": "./fesm2022/acorex-components-accordion.mjs"
62
62
  },
63
- "./alert": {
64
- "types": "./alert/index.d.ts",
65
- "default": "./fesm2022/acorex-components-alert.mjs"
66
- },
67
63
  "./action-sheet": {
68
64
  "types": "./action-sheet/index.d.ts",
69
65
  "default": "./fesm2022/acorex-components-action-sheet.mjs"
70
66
  },
67
+ "./alert": {
68
+ "types": "./alert/index.d.ts",
69
+ "default": "./fesm2022/acorex-components-alert.mjs"
70
+ },
71
71
  "./aspect-ratio": {
72
72
  "types": "./aspect-ratio/index.d.ts",
73
73
  "default": "./fesm2022/acorex-components-aspect-ratio.mjs"
@@ -172,14 +172,14 @@
172
172
  "types": "./datetime-box/index.d.ts",
173
173
  "default": "./fesm2022/acorex-components-datetime-box.mjs"
174
174
  },
175
- "./datetime-input": {
176
- "types": "./datetime-input/index.d.ts",
177
- "default": "./fesm2022/acorex-components-datetime-input.mjs"
178
- },
179
175
  "./datetime-picker": {
180
176
  "types": "./datetime-picker/index.d.ts",
181
177
  "default": "./fesm2022/acorex-components-datetime-picker.mjs"
182
178
  },
179
+ "./datetime-input": {
180
+ "types": "./datetime-input/index.d.ts",
181
+ "default": "./fesm2022/acorex-components-datetime-input.mjs"
182
+ },
183
183
  "./decorators": {
184
184
  "types": "./decorators/index.d.ts",
185
185
  "default": "./fesm2022/acorex-components-decorators.mjs"
@@ -340,14 +340,14 @@
340
340
  "types": "./qrcode/index.d.ts",
341
341
  "default": "./fesm2022/acorex-components-qrcode.mjs"
342
342
  },
343
- "./query-builder": {
344
- "types": "./query-builder/index.d.ts",
345
- "default": "./fesm2022/acorex-components-query-builder.mjs"
346
- },
347
343
  "./radio": {
348
344
  "types": "./radio/index.d.ts",
349
345
  "default": "./fesm2022/acorex-components-radio.mjs"
350
346
  },
347
+ "./query-builder": {
348
+ "types": "./query-builder/index.d.ts",
349
+ "default": "./fesm2022/acorex-components-query-builder.mjs"
350
+ },
351
351
  "./rail-navigation": {
352
352
  "types": "./rail-navigation/index.d.ts",
353
353
  "default": "./fesm2022/acorex-components-rail-navigation.mjs"
@@ -400,14 +400,14 @@
400
400
  "types": "./selection-list/index.d.ts",
401
401
  "default": "./fesm2022/acorex-components-selection-list.mjs"
402
402
  },
403
- "./selection-list-2": {
404
- "types": "./selection-list-2/index.d.ts",
405
- "default": "./fesm2022/acorex-components-selection-list-2.mjs"
406
- },
407
403
  "./side-menu": {
408
404
  "types": "./side-menu/index.d.ts",
409
405
  "default": "./fesm2022/acorex-components-side-menu.mjs"
410
406
  },
407
+ "./selection-list-2": {
408
+ "types": "./selection-list-2/index.d.ts",
409
+ "default": "./fesm2022/acorex-components-selection-list-2.mjs"
410
+ },
411
411
  "./skeleton": {
412
412
  "types": "./skeleton/index.d.ts",
413
413
  "default": "./fesm2022/acorex-components-skeleton.mjs"
@@ -476,14 +476,14 @@
476
476
  "types": "./tree-view-legacy/index.d.ts",
477
477
  "default": "./fesm2022/acorex-components-tree-view-legacy.mjs"
478
478
  },
479
- "./uploader": {
480
- "types": "./uploader/index.d.ts",
481
- "default": "./fesm2022/acorex-components-uploader.mjs"
482
- },
483
479
  "./video-player": {
484
480
  "types": "./video-player/index.d.ts",
485
481
  "default": "./fesm2022/acorex-components-video-player.mjs"
486
482
  },
483
+ "./uploader": {
484
+ "types": "./uploader/index.d.ts",
485
+ "default": "./fesm2022/acorex-components-uploader.mjs"
486
+ },
487
487
  "./wysiwyg": {
488
488
  "types": "./wysiwyg/index.d.ts",
489
489
  "default": "./fesm2022/acorex-components-wysiwyg.mjs"