@acorex/components 20.8.22 → 20.8.23

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,8 @@ 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
+ toggleTool(tool: AXImageEditorTool): void;
35
+ activateTool(tool: AXImageEditorTool): void;
33
36
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorService, never>;
34
37
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXImageEditorService>;
35
38
  }
@@ -165,41 +168,39 @@ declare class AXImageEditorContainerComponent extends AXImageEditorContainerComp
165
168
  protected service: AXImageEditorService;
166
169
  imageEditorContainer: _angular_core.Signal<ElementRef<any>>;
167
170
  view: _angular_core.Signal<AXImageEditorViewComponent>;
168
- aspectRatio: _angular_core.InputSignal<string[]>;
169
- protected cropButtonHandler(): void;
170
171
  get __hostClass(): string;
171
172
  private get __hostName();
172
173
  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>;
174
+ 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
175
  }
175
176
 
176
177
  /**
177
- * paint mode.
178
+ * Base class for image editor tool trigger components.
178
179
  * @category Components
179
180
  */
180
- declare class AXImageEditorCropComponent {
181
+ declare abstract class AXImageEditorToolComponent {
181
182
  protected service: AXImageEditorService;
182
- cropPressed: _angular_core.OutputEmitterRef<void>;
183
+ abstract readonly tool: AXImageEditorTool;
184
+ setActive(): void;
185
+ }
186
+
187
+ /**
188
+ * Crop tool trigger for the image editor toolbar.
189
+ * @category Components
190
+ */
191
+ declare class AXImageEditorCropComponent extends AXImageEditorToolComponent {
192
+ readonly tool = "crop";
183
193
  aspectRatio: _angular_core.InputSignal<string[]>;
184
- protected cropButtonHandler(): void;
185
- protected ratioHandler(r: '1:1' | '16:9' | string): void;
186
194
  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>;
195
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorCropComponent, "ax-image-editor-crop", never, { "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
188
196
  }
189
197
 
190
198
  /**
191
- * paint mode.
199
+ * Highlight tool trigger for the image editor toolbar.
192
200
  * @category Components
193
201
  */
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;
202
+ declare class AXImageEditorHighlightComponent extends AXImageEditorToolComponent {
203
+ readonly tool = "highlight";
203
204
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorHighlightComponent, never>;
204
205
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorHighlightComponent, "ax-image-editor-highlight", never, {}, {}, never, never, true, never>;
205
206
  }
@@ -217,52 +218,60 @@ declare class AXImageEditorHistoryComponent {
217
218
  }
218
219
 
219
220
  /**
220
- * paint mode.
221
+ * Pen tool trigger for the image editor toolbar.
221
222
  * @category Components
222
223
  */
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;
224
+ declare class AXImageEditorPenComponent extends AXImageEditorToolComponent {
225
+ readonly tool = "pen";
232
226
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorPenComponent, never>;
233
227
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorPenComponent, "ax-image-editor-pen", never, {}, {}, never, never, true, never>;
234
228
  }
235
229
 
236
230
  /**
237
- * paint mode.
231
+ * Rotate tool trigger for the image editor toolbar.
238
232
  * @category Components
239
233
  */
240
- declare class AXImageEditorRotateComponent {
241
- /** @ignore */
242
- protected service: AXImageEditorService;
243
- /** @ignore */
244
- protected rotateRightHandler(): void;
245
- /** @ignore */
246
- protected rotateLeftHandler(): void;
234
+ declare class AXImageEditorRotateComponent extends AXImageEditorToolComponent {
235
+ readonly tool = "rotate";
247
236
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorRotateComponent, never>;
248
237
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorRotateComponent, "ax-image-editor-rotate", never, {}, {}, never, never, true, never>;
249
238
  }
250
239
 
251
240
  /**
252
- * paint mode.
241
+ * Toolbar layout for configurable image editor tools.
253
242
  * @category Components
254
243
  */
255
- declare class AXImageEditorToolSelectorComponent {
244
+ declare class AXImageEditorToolsBarComponent {
245
+ #private;
256
246
  protected service: AXImageEditorService;
257
- protected changeToolHandler(tool: 'pen' | 'highlight' | 'crop' | 'rotate'): void;
247
+ /**
248
+ * Tool component reference to activate on load.
249
+ */
250
+ active: _angular_core.InputSignal<AXImageEditorToolComponent>;
251
+ protected penTool: _angular_core.Signal<AXImageEditorPenComponent>;
252
+ protected highlightTool: _angular_core.Signal<AXImageEditorHighlightComponent>;
253
+ protected cropTool: _angular_core.Signal<AXImageEditorCropComponent>;
254
+ protected rotateTool: _angular_core.Signal<AXImageEditorRotateComponent>;
255
+ protected cropAspectRatio: _angular_core.Signal<string[]>;
256
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorToolsBarComponent, never>;
257
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorToolsBarComponent, "ax-image-editor-tools-bar", never, { "active": { "alias": "active"; "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>;
258
+ }
259
+
260
+ /**
261
+ * Convenience wrapper that includes all image editor tools.
262
+ * @category Components
263
+ */
264
+ declare class AXImageEditorToolSelectorComponent {
265
+ aspectRatio: _angular_core.InputSignal<string[]>;
258
266
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXImageEditorToolSelectorComponent, never>;
259
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorToolSelectorComponent, "ax-image-editor-tool-selector", never, {}, {}, never, never, true, never>;
267
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXImageEditorToolSelectorComponent, "ax-image-editor-tool-selector", never, { "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
260
268
  }
261
269
 
262
270
  declare class AXImageEditorModule {
263
271
  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]>;
272
+ 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
273
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXImageEditorModule>;
266
274
  }
267
275
 
268
- export { AXImageEditorContainerComponent, AXImageEditorCropComponent, AXImageEditorCropperWindowComponent, AXImageEditorHighlightComponent, AXImageEditorHistoryComponent, AXImageEditorModule, AXImageEditorPenComponent, AXImageEditorRotateComponent, AXImageEditorService, AXImageEditorToolSelectorComponent, AXImageEditorViewComponent };
276
+ export { AXImageEditorContainerComponent, AXImageEditorCropComponent, AXImageEditorCropperWindowComponent, AXImageEditorHighlightComponent, AXImageEditorHistoryComponent, AXImageEditorModule, AXImageEditorPenComponent, AXImageEditorRotateComponent, AXImageEditorService, AXImageEditorToolComponent, AXImageEditorToolSelectorComponent, AXImageEditorToolsBarComponent, AXImageEditorViewComponent };
277
+ 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.23",
4
4
  "peerDependencies": {
5
- "@acorex/core": "20.8.22",
6
- "@acorex/cdk": "20.8.22",
5
+ "@acorex/core": "20.8.23",
6
+ "@acorex/cdk": "20.8.23",
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"
@@ -260,14 +260,14 @@
260
260
  "types": "./loading/index.d.ts",
261
261
  "default": "./fesm2022/acorex-components-loading.mjs"
262
262
  },
263
- "./loading-dialog": {
264
- "types": "./loading-dialog/index.d.ts",
265
- "default": "./fesm2022/acorex-components-loading-dialog.mjs"
266
- },
267
263
  "./map": {
268
264
  "types": "./map/index.d.ts",
269
265
  "default": "./fesm2022/acorex-components-map.mjs"
270
266
  },
267
+ "./loading-dialog": {
268
+ "types": "./loading-dialog/index.d.ts",
269
+ "default": "./fesm2022/acorex-components-loading-dialog.mjs"
270
+ },
271
271
  "./media-viewer": {
272
272
  "types": "./media-viewer/index.d.ts",
273
273
  "default": "./fesm2022/acorex-components-media-viewer.mjs"
@@ -352,14 +352,14 @@
352
352
  "types": "./rail-navigation/index.d.ts",
353
353
  "default": "./fesm2022/acorex-components-rail-navigation.mjs"
354
354
  },
355
- "./range-slider": {
356
- "types": "./range-slider/index.d.ts",
357
- "default": "./fesm2022/acorex-components-range-slider.mjs"
358
- },
359
355
  "./rate-picker": {
360
356
  "types": "./rate-picker/index.d.ts",
361
357
  "default": "./fesm2022/acorex-components-rate-picker.mjs"
362
358
  },
359
+ "./range-slider": {
360
+ "types": "./range-slider/index.d.ts",
361
+ "default": "./fesm2022/acorex-components-range-slider.mjs"
362
+ },
363
363
  "./rest-api-generator": {
364
364
  "types": "./rest-api-generator/index.d.ts",
365
365
  "default": "./fesm2022/acorex-components-rest-api-generator.mjs"
@@ -412,14 +412,14 @@
412
412
  "types": "./skeleton/index.d.ts",
413
413
  "default": "./fesm2022/acorex-components-skeleton.mjs"
414
414
  },
415
- "./slider": {
416
- "types": "./slider/index.d.ts",
417
- "default": "./fesm2022/acorex-components-slider.mjs"
418
- },
419
415
  "./sliding-item": {
420
416
  "types": "./sliding-item/index.d.ts",
421
417
  "default": "./fesm2022/acorex-components-sliding-item.mjs"
422
418
  },
419
+ "./slider": {
420
+ "types": "./slider/index.d.ts",
421
+ "default": "./fesm2022/acorex-components-slider.mjs"
422
+ },
423
423
  "./step-wizard": {
424
424
  "types": "./step-wizard/index.d.ts",
425
425
  "default": "./fesm2022/acorex-components-step-wizard.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"