@acorex/components 21.0.2-next.4 → 21.0.2-next.40
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.
- package/conversation2/README.md +5 -8
- package/fesm2022/acorex-components-accordion.mjs +29 -29
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +30 -30
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +16 -16
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-aspect-ratio.mjs +5 -5
- package/fesm2022/acorex-components-aspect-ratio.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +11 -11
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-autocomplete.mjs +14 -14
- package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +15 -15
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +9 -9
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +14 -14
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +13 -13
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +40 -20
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +35 -36
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +176 -39
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +10 -10
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +9 -9
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +13 -13
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-code-editor.mjs +27 -27
- package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +14 -14
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +84 -43
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-command.mjs +19 -19
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +35 -35
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +105 -105
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation2.mjs +11165 -8111
- package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +51 -51
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-list.mjs +31 -31
- package/fesm2022/acorex-components-data-list.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +88 -96
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +69 -57
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +174 -39
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +30 -38
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +62 -55
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +39 -39
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +19 -26
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +23 -23
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +9 -9
- package/fesm2022/acorex-components-dropdown.mjs +19 -19
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +12 -12
- package/fesm2022/acorex-components-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-fab.mjs +15 -15
- package/fesm2022/acorex-components-fab.mjs.map +1 -1
- package/fesm2022/acorex-components-flow-chart.mjs +74 -58
- package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +30 -30
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +15 -15
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +87 -87
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +11 -11
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +12 -12
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-kanban.mjs +23 -23
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +15 -15
- package/fesm2022/acorex-components-kbd.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +9 -9
- package/fesm2022/acorex-components-list.mjs +15 -15
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +19 -19
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +21 -21
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +46 -46
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +82 -82
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +137 -63
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/{acorex-components-modal-acorex-components-modal-DWNqU6or.mjs → acorex-components-modal-acorex-components-modal-JpPBSiVh.mjs} +27 -27
- package/fesm2022/{acorex-components-modal-acorex-components-modal-DWNqU6or.mjs.map → acorex-components-modal-acorex-components-modal-JpPBSiVh.mjs.map} +1 -1
- package/fesm2022/{acorex-components-modal-modal-content.component-DplJbJyk.mjs → acorex-components-modal-modal-content.component-DKweXQfl.mjs} +39 -39
- package/fesm2022/acorex-components-modal-modal-content.component-DKweXQfl.mjs.map +1 -0
- package/fesm2022/acorex-components-modal.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +8 -8
- package/fesm2022/acorex-components-notification.mjs +28 -28
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +61 -23
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +12 -12
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs +10 -10
- package/fesm2022/acorex-components-paint.mjs +53 -53
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +28 -28
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-pdf-reader.mjs +9 -9
- package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +19 -19
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +31 -31
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +10 -10
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +48 -24
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +8 -8
- package/fesm2022/acorex-components-qrcode.mjs +37 -20
- package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-components-query-builder.mjs +15 -14
- package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +9 -9
- package/fesm2022/acorex-components-rail-navigation.mjs +28 -28
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +34 -34
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +17 -17
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-rest-api-generator.mjs +33 -33
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +8 -8
- package/fesm2022/acorex-components-routing-progress.mjs +8 -8
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-rrule.mjs +36 -36
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +118 -118
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +398 -326
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +9 -9
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +23 -27
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +12 -12
- package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +11 -11
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +455 -97
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +8 -8
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +7 -7
- package/fesm2022/acorex-components-sliding-item.mjs +25 -25
- package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +40 -39
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +12 -12
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +20 -20
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +19 -19
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +8 -8
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +9 -9
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +12 -12
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-duration.mjs +28 -30
- package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +19 -19
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +26 -26
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-toolbar.mjs +13 -13
- package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +27 -18
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +326 -67
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +17 -17
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-video-player.mjs +8 -8
- package/fesm2022/acorex-components-video-player.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +51 -51
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/package.json +5 -4
- package/types/acorex-components-button-group.d.ts +9 -3
- package/types/acorex-components-button.d.ts +2 -8
- package/types/acorex-components-calendar.d.ts +109 -22
- package/types/acorex-components-color-palette.d.ts +2 -0
- package/types/acorex-components-conversation2.d.ts +1296 -1256
- package/types/acorex-components-data-pager.d.ts +6 -25
- package/types/acorex-components-data-table.d.ts +12 -2
- package/types/acorex-components-datetime-box.d.ts +79 -8
- package/types/acorex-components-datetime-input.d.ts +2 -2
- package/types/acorex-components-datetime-picker.d.ts +15 -5
- package/types/acorex-components-flow-chart.d.ts +4 -0
- package/types/acorex-components-menu.d.ts +47 -7
- package/types/acorex-components-number-box.d.ts +9 -0
- package/types/acorex-components-popup.d.ts +11 -1
- package/types/acorex-components-qrcode.d.ts +1 -0
- package/types/acorex-components-query-builder.d.ts +1 -1
- package/types/acorex-components-scheduler.d.ts +23 -2
- package/types/acorex-components-side-menu.d.ts +96 -34
- package/types/acorex-components-step-wizard.d.ts +2 -1
- package/types/acorex-components-tree-view.d.ts +43 -2
- package/fesm2022/acorex-components-modal-modal-content.component-DplJbJyk.mjs.map +0 -1
|
@@ -17,11 +17,11 @@ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
|
|
|
17
17
|
/** @ignore */
|
|
18
18
|
constructor() {
|
|
19
19
|
super();
|
|
20
|
-
this.type = input('number', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
20
|
+
this.type = input('number', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
21
21
|
/**
|
|
22
22
|
* Holds the length of the OTP input field.
|
|
23
23
|
*/
|
|
24
|
-
this.length = model(...(ngDevMode ? [undefined, { debugName: "length" }] : []));
|
|
24
|
+
this.length = model(...(ngDevMode ? [undefined, { debugName: "length" }] : /* istanbul ignore next */ []));
|
|
25
25
|
/**
|
|
26
26
|
* @event
|
|
27
27
|
* Emits an event when the OTP input is completed.
|
|
@@ -40,7 +40,7 @@ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
|
|
|
40
40
|
return Array(this.length())
|
|
41
41
|
.fill(1)
|
|
42
42
|
.map((x, i) => i);
|
|
43
|
-
}, ...(ngDevMode ? [{ debugName: "inputs" }] : []));
|
|
43
|
+
}, ...(ngDevMode ? [{ debugName: "inputs" }] : /* istanbul ignore next */ []));
|
|
44
44
|
afterNextRender(() => {
|
|
45
45
|
this.calcFontSize();
|
|
46
46
|
this.mapValueToInputs();
|
|
@@ -177,8 +177,8 @@ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
|
|
|
177
177
|
});
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
181
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
180
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXOtpComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
181
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXOtpComponent, isStandalone: true, selector: "ax-otp", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stateChange: "stateChange", disabledChange: "disabledChange", length: "lengthChange", onCompleted: "onCompleted" }, providers: [
|
|
182
182
|
{
|
|
183
183
|
provide: NG_VALUE_ACCESSOR,
|
|
184
184
|
useExisting: forwardRef(() => AXOtpComponent),
|
|
@@ -190,9 +190,9 @@ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
|
|
|
190
190
|
},
|
|
191
191
|
{ provide: AXValuableComponent, useExisting: AXOtpComponent },
|
|
192
192
|
{ provide: AXFocusableComponent, useExisting: AXOtpComponent },
|
|
193
|
-
], usesInheritance: true, ngImport: i0, template: "<div\n dir=\"ltr\"\n (paste)=\"_handleOnPaste($event)\"\n class=\"ax-otp-input-container ax-editor-container ax-default {{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs().length + ', minmax(0, 1fr))' }\"\n>\n @for (input of inputs(); let i = $index; track i) {\n <input\n [name]=\"name\"\n [type]=\"type()\"\n maxlength=\"1\"\n class=\"ax-input\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (focus)=\"_handleFocus(i)\"\n [ngModel]=\"inputValues[i]\"\n [attr.disabled]=\"disabled\"\n (input)=\"_handleOnInput($event, i)\"\n [class.ax-state-disabled]=\"disabled\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n [class.ax-state-error]=\"state === 'error'\"\n [class.ax-state-success]=\"state === 'success'\"\n />\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}ax-otp input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}ax-otp input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}ax-otp input[type=number]{-moz-appearance:textfield}ax-otp .ax-editor-container{padding-inline:
|
|
193
|
+
], usesInheritance: true, ngImport: i0, template: "<div\n dir=\"ltr\"\n (paste)=\"_handleOnPaste($event)\"\n class=\"ax-otp-input-container ax-editor-container ax-default {{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs().length + ', minmax(0, 1fr))' }\"\n>\n @for (input of inputs(); let i = $index; track i) {\n <input\n [name]=\"name\"\n [type]=\"type()\"\n maxlength=\"1\"\n class=\"ax-input\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (focus)=\"_handleFocus(i)\"\n [ngModel]=\"inputValues[i]\"\n [attr.disabled]=\"disabled\"\n (input)=\"_handleOnInput($event, i)\"\n [class.ax-state-disabled]=\"disabled\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n [class.ax-state-error]=\"state === 'error'\"\n [class.ax-state-success]=\"state === 'success'\"\n />\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}ax-otp input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}ax-otp input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}ax-otp input[type=number]{-moz-appearance:textfield}ax-otp .ax-editor-container{padding-inline:0!important;display:grid!important}ax-otp input{text-align:center;font-size:var(--text-lg,1.125rem);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75 / 1.125)));padding:0}:is(ax-otp .ax-solid,ax-otp .ax-outline) input{border-color:var(--color-border-default);text-align:center}:is(ax-otp .ax-solid,ax-otp .ax-outline) input:not(:last-child){border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
194
194
|
}
|
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXOtpComponent, decorators: [{
|
|
196
196
|
type: Component,
|
|
197
197
|
args: [{ selector: 'ax-otp', inputs: ['state', 'disabled', 'readonly', 'look', 'name'], outputs: ['stateChange', 'disabledChange'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
198
198
|
{
|
|
@@ -206,15 +206,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
206
206
|
},
|
|
207
207
|
{ provide: AXValuableComponent, useExisting: AXOtpComponent },
|
|
208
208
|
{ provide: AXFocusableComponent, useExisting: AXOtpComponent },
|
|
209
|
-
], imports: [NgStyle, FormsModule], template: "<div\n dir=\"ltr\"\n (paste)=\"_handleOnPaste($event)\"\n class=\"ax-otp-input-container ax-editor-container ax-default {{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs().length + ', minmax(0, 1fr))' }\"\n>\n @for (input of inputs(); let i = $index; track i) {\n <input\n [name]=\"name\"\n [type]=\"type()\"\n maxlength=\"1\"\n class=\"ax-input\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (focus)=\"_handleFocus(i)\"\n [ngModel]=\"inputValues[i]\"\n [attr.disabled]=\"disabled\"\n (input)=\"_handleOnInput($event, i)\"\n [class.ax-state-disabled]=\"disabled\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n [class.ax-state-error]=\"state === 'error'\"\n [class.ax-state-success]=\"state === 'success'\"\n />\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}ax-otp input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}ax-otp input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}ax-otp input[type=number]{-moz-appearance:textfield}ax-otp .ax-editor-container{padding-inline:
|
|
209
|
+
], imports: [NgStyle, FormsModule], template: "<div\n dir=\"ltr\"\n (paste)=\"_handleOnPaste($event)\"\n class=\"ax-otp-input-container ax-editor-container ax-default {{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs().length + ', minmax(0, 1fr))' }\"\n>\n @for (input of inputs(); let i = $index; track i) {\n <input\n [name]=\"name\"\n [type]=\"type()\"\n maxlength=\"1\"\n class=\"ax-input\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (focus)=\"_handleFocus(i)\"\n [ngModel]=\"inputValues[i]\"\n [attr.disabled]=\"disabled\"\n (input)=\"_handleOnInput($event, i)\"\n [class.ax-state-disabled]=\"disabled\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n [class.ax-state-error]=\"state === 'error'\"\n [class.ax-state-success]=\"state === 'success'\"\n />\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}ax-otp input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}ax-otp input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}ax-otp input[type=number]{-moz-appearance:textfield}ax-otp .ax-editor-container{padding-inline:0!important;display:grid!important}ax-otp input{text-align:center;font-size:var(--text-lg,1.125rem);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75 / 1.125)));padding:0}:is(ax-otp .ax-solid,ax-otp .ax-outline) input{border-color:var(--color-border-default);text-align:center}:is(ax-otp .ax-solid,ax-otp .ax-outline) input:not(:last-child){border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n"] }]
|
|
210
210
|
}], ctorParameters: () => [], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }, { type: i0.Output, args: ["lengthChange"] }], onCompleted: [{ type: i0.Output, args: ["onCompleted"] }] } });
|
|
211
211
|
|
|
212
212
|
class AXOtpModule {
|
|
213
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
214
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
215
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
213
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXOtpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
214
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXOtpModule, imports: [AXOtpComponent], exports: [AXOtpComponent] }); }
|
|
215
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXOtpModule, imports: [AXOtpComponent] }); }
|
|
216
216
|
}
|
|
217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXOtpModule, decorators: [{
|
|
218
218
|
type: NgModule,
|
|
219
219
|
args: [{
|
|
220
220
|
imports: [AXOtpComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-otp.mjs","sources":["../../../../packages/components/otp/src/lib/otp.class.ts","../../../../packages/components/otp/src/lib/otp.component.ts","../../../../packages/components/otp/src/lib/otp.component.html","../../../../packages/components/otp/src/lib/otp.module.ts","../../../../packages/components/otp/src/acorex-components-otp.ts"],"sourcesContent":["import { AXEvent } from '@acorex/cdk/common';\n\nexport class AXOtpCompletedEvent extends AXEvent {\n value: string;\n isCompleted: boolean;\n}\n","import {\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXLookComponent,\n MXValueComponent,\n} from '@acorex/cdk/common';\nimport { NgStyle } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n afterNextRender,\n computed,\n forwardRef,\n input,\n model,\n output,\n} from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\nimport { AXOtpCompletedEvent } from './otp.class';\n\n/**\n * @category\n * A component for OTP input fields with state management and custom styling support.\n */\n@Component({\n selector: 'ax-otp',\n templateUrl: './otp.component.html',\n styleUrls: ['./otp.component.compiled.css'],\n inputs: ['state', 'disabled', 'readonly', 'look', 'name'],\n outputs: ['stateChange', 'disabledChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXOtpComponent),\n multi: true,\n },\n {\n provide: AXComponent,\n useExisting: AXOtpComponent,\n },\n { provide: AXValuableComponent, useExisting: AXOtpComponent },\n { provide: AXFocusableComponent, useExisting: AXOtpComponent },\n ],\n imports: [NgStyle, FormsModule],\n})\nexport class AXOtpComponent extends classes(MXValueComponent<string>, MXLookComponent) {\n type = input<'number' | 'text'>('number');\n\n /**\n * Holds the length of the OTP input field.\n */\n length = model<number>();\n\n /**\n * @event\n * Emits an event when the OTP input is completed.\n */\n onCompleted = output<AXOtpCompletedEvent>();\n\n /**\n * Stores the values entered in the OTP input fields.\n */\n protected inputValues: string[] = [];\n\n /**\n * Holds the input values as a signal.\n */\n protected inputs = computed(() => {\n this.calcFontSize();\n //\n return Array(this.length())\n .fill(1)\n .map((x, i) => i);\n });\n\n /** @ignore */\n constructor() {\n super();\n afterNextRender(() => {\n this.calcFontSize();\n this.mapValueToInputs();\n });\n }\n\n /**\n * Converts the value string to input values and updates the inputValues array.\n */\n mapValueToInputs() {\n this._emitOnComplete();\n if (!this.value) {\n return;\n }\n this.value.split('').map((v, i) => {\n this.inputValues[i] = v;\n });\n }\n\n /**\n * Resets the input values to an empty array.\n */\n override reset() {\n this.inputValues = [];\n for (let index = 0; index < this.length(); index++) {\n this.inputValues.push(' ');\n }\n }\n\n /** @ignore */\n protected _handleOnInput(event: any, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n if (this.type() === 'number') {\n const numberRegex = /^\\d+$/;\n if (!numberRegex.test(event.target.value)) {\n event.target.value = '';\n return;\n }\n }\n if (event.target.value.length > 1) {\n const currentValue = event.target.value;\n event.target.value = '';\n event.target.value = currentValue.slice(-1);\n }\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n this.inputValues[i] = event.target.value;\n this._emitOnComplete();\n }\n\n /** @ignore */\n override internalSetValue(value: any): string {\n if (value) {\n this.inputValues = value?.toString().split('') as any;\n }\n return value;\n }\n\n /** @ignore */\n protected calcFontSize() {\n const size = this.getHostElement().querySelector<HTMLInputElement>('.ax-input')?.clientWidth;\n const fontSize = size * 0.5;\n this.getHostElement().style.setProperty('--font-size', fontSize + 'px');\n }\n\n /** @ignore */\n protected _handleOnKeyDown(event: KeyboardEvent, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n switch (event.key) {\n case 'Backspace':\n if (this.readonly || this.disabled) return;\n inputs[i].value = '';\n if (inputs[i - 1]) {\n inputs[i - 1].focus();\n event.preventDefault();\n }\n this.inputValues[i] = ' ';\n this.commitValue(this.inputValues.join(''), true);\n inputs[i].value = '';\n break;\n\n case 'ArrowRight':\n if (inputs[i + 1]) {\n event.preventDefault();\n inputs[i + 1].select();\n }\n break;\n\n case 'ArrowLeft':\n if (inputs[i - 1]) {\n event.preventDefault();\n inputs[i - 1].select();\n }\n break;\n\n case 'Home':\n event.preventDefault();\n inputs[0].select();\n break;\n\n case 'End':\n event.preventDefault();\n inputs[this.length() - 1].select();\n break;\n\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n }\n }\n\n /** @ignore */\n protected _handleOnPaste(event: ClipboardEvent) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n const data = event.clipboardData.getData('text');\n const isNumber = /\\d+/;\n\n if (isNumber.test(data)) {\n inputs[inputs.length - 1].focus();\n this.inputValues = [];\n for (let i = 0; i < inputs.length; i++) {\n this.inputValues[i] = data[i];\n }\n this._emitOnComplete();\n }\n\n event.preventDefault();\n }\n\n /** @ignore */\n protected _handleFocus(i) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[i].select();\n }\n\n /** @ignore */\n protected _emitOnComplete() {\n // TODO: Check Value delay\n setTimeout(() => {\n const filteredValues = this.inputValues.filter((c) => c && c !== ' ');\n const value = filteredValues.join('').trim();\n this.commitValue(value, true);\n this.onCompleted.emit({\n component: AXOtpComponent,\n value,\n isCompleted: filteredValues.length === this.length(),\n });\n });\n }\n}\n","<div\n dir=\"ltr\"\n (paste)=\"_handleOnPaste($event)\"\n class=\"ax-otp-input-container ax-editor-container ax-default {{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs().length + ', minmax(0, 1fr))' }\"\n>\n @for (input of inputs(); let i = $index; track i) {\n <input\n [name]=\"name\"\n [type]=\"type()\"\n maxlength=\"1\"\n class=\"ax-input\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (focus)=\"_handleFocus(i)\"\n [ngModel]=\"inputValues[i]\"\n [attr.disabled]=\"disabled\"\n (input)=\"_handleOnInput($event, i)\"\n [class.ax-state-disabled]=\"disabled\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n [class.ax-state-error]=\"state === 'error'\"\n [class.ax-state-success]=\"state === 'success'\"\n />\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { AXOtpComponent } from './otp.component';\n\n@NgModule({\n imports: [AXOtpComponent],\n exports: [AXOtpComponent],\n})\nexport class AXOtpModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEM,MAAO,mBAAoB,SAAQ,OAAO,CAAA;AAG/C;;ACkBD;;;AAGG;AAwBG,MAAO,cAAe,SAAQ,OAAO,EAAC,gBAAwB,GAAE,eAAe,CAAC,CAAA;;AA+BpF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AA/BT,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAoB,QAAQ,gDAAC;AAEzC;;AAEG;QACH,IAAA,CAAA,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAExB;;;AAGG;QACH,IAAA,CAAA,WAAW,GAAG,MAAM,EAAuB;AAE3C;;AAEG;QACO,IAAA,CAAA,WAAW,GAAa,EAAE;AAEpC;;AAEG;AACO,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,CAAC,MAAK;YAC/B,IAAI,CAAC,YAAY,EAAE;;AAEnB,YAAA,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;iBACvB,IAAI,CAAC,CAAC;iBACN,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AACrB,QAAA,CAAC,kD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A,QAAA,EAAA,CAAA,CAAA;+GAAX,WAAW,EAAA,OAAA,EAAA,CAHZ,cAAc,CAAA,EAAA,OAAA,EAAA,CACd,cAAc,CAAA,EAAA,CAAA,CAAA;AAEb,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,WAAW,YAHZ,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAGb,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc,CAAC;AAC1B,iBAAA;;;ACND;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-otp.mjs","sources":["../../../../packages/components/otp/src/lib/otp.class.ts","../../../../packages/components/otp/src/lib/otp.component.ts","../../../../packages/components/otp/src/lib/otp.component.html","../../../../packages/components/otp/src/lib/otp.module.ts","../../../../packages/components/otp/src/acorex-components-otp.ts"],"sourcesContent":["import { AXEvent } from '@acorex/cdk/common';\n\nexport class AXOtpCompletedEvent extends AXEvent {\n value: string;\n isCompleted: boolean;\n}\n","import {\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXLookComponent,\n MXValueComponent,\n} from '@acorex/cdk/common';\nimport { NgStyle } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n afterNextRender,\n computed,\n forwardRef,\n input,\n model,\n output,\n} from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\nimport { AXOtpCompletedEvent } from './otp.class';\n\n/**\n * @category\n * A component for OTP input fields with state management and custom styling support.\n */\n@Component({\n selector: 'ax-otp',\n templateUrl: './otp.component.html',\n styleUrls: ['./otp.component.compiled.css'],\n inputs: ['state', 'disabled', 'readonly', 'look', 'name'],\n outputs: ['stateChange', 'disabledChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXOtpComponent),\n multi: true,\n },\n {\n provide: AXComponent,\n useExisting: AXOtpComponent,\n },\n { provide: AXValuableComponent, useExisting: AXOtpComponent },\n { provide: AXFocusableComponent, useExisting: AXOtpComponent },\n ],\n imports: [NgStyle, FormsModule],\n})\nexport class AXOtpComponent extends classes(MXValueComponent<string>, MXLookComponent) {\n type = input<'number' | 'text'>('number');\n\n /**\n * Holds the length of the OTP input field.\n */\n length = model<number>();\n\n /**\n * @event\n * Emits an event when the OTP input is completed.\n */\n onCompleted = output<AXOtpCompletedEvent>();\n\n /**\n * Stores the values entered in the OTP input fields.\n */\n protected inputValues: string[] = [];\n\n /**\n * Holds the input values as a signal.\n */\n protected inputs = computed(() => {\n this.calcFontSize();\n //\n return Array(this.length())\n .fill(1)\n .map((x, i) => i);\n });\n\n /** @ignore */\n constructor() {\n super();\n afterNextRender(() => {\n this.calcFontSize();\n this.mapValueToInputs();\n });\n }\n\n /**\n * Converts the value string to input values and updates the inputValues array.\n */\n mapValueToInputs() {\n this._emitOnComplete();\n if (!this.value) {\n return;\n }\n this.value.split('').map((v, i) => {\n this.inputValues[i] = v;\n });\n }\n\n /**\n * Resets the input values to an empty array.\n */\n override reset() {\n this.inputValues = [];\n for (let index = 0; index < this.length(); index++) {\n this.inputValues.push(' ');\n }\n }\n\n /** @ignore */\n protected _handleOnInput(event: any, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n if (this.type() === 'number') {\n const numberRegex = /^\\d+$/;\n if (!numberRegex.test(event.target.value)) {\n event.target.value = '';\n return;\n }\n }\n if (event.target.value.length > 1) {\n const currentValue = event.target.value;\n event.target.value = '';\n event.target.value = currentValue.slice(-1);\n }\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n this.inputValues[i] = event.target.value;\n this._emitOnComplete();\n }\n\n /** @ignore */\n override internalSetValue(value: any): string {\n if (value) {\n this.inputValues = value?.toString().split('') as any;\n }\n return value;\n }\n\n /** @ignore */\n protected calcFontSize() {\n const size = this.getHostElement().querySelector<HTMLInputElement>('.ax-input')?.clientWidth;\n const fontSize = size * 0.5;\n this.getHostElement().style.setProperty('--font-size', fontSize + 'px');\n }\n\n /** @ignore */\n protected _handleOnKeyDown(event: KeyboardEvent, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n switch (event.key) {\n case 'Backspace':\n if (this.readonly || this.disabled) return;\n inputs[i].value = '';\n if (inputs[i - 1]) {\n inputs[i - 1].focus();\n event.preventDefault();\n }\n this.inputValues[i] = ' ';\n this.commitValue(this.inputValues.join(''), true);\n inputs[i].value = '';\n break;\n\n case 'ArrowRight':\n if (inputs[i + 1]) {\n event.preventDefault();\n inputs[i + 1].select();\n }\n break;\n\n case 'ArrowLeft':\n if (inputs[i - 1]) {\n event.preventDefault();\n inputs[i - 1].select();\n }\n break;\n\n case 'Home':\n event.preventDefault();\n inputs[0].select();\n break;\n\n case 'End':\n event.preventDefault();\n inputs[this.length() - 1].select();\n break;\n\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n }\n }\n\n /** @ignore */\n protected _handleOnPaste(event: ClipboardEvent) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n const data = event.clipboardData.getData('text');\n const isNumber = /\\d+/;\n\n if (isNumber.test(data)) {\n inputs[inputs.length - 1].focus();\n this.inputValues = [];\n for (let i = 0; i < inputs.length; i++) {\n this.inputValues[i] = data[i];\n }\n this._emitOnComplete();\n }\n\n event.preventDefault();\n }\n\n /** @ignore */\n protected _handleFocus(i) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[i].select();\n }\n\n /** @ignore */\n protected _emitOnComplete() {\n // TODO: Check Value delay\n setTimeout(() => {\n const filteredValues = this.inputValues.filter((c) => c && c !== ' ');\n const value = filteredValues.join('').trim();\n this.commitValue(value, true);\n this.onCompleted.emit({\n component: AXOtpComponent,\n value,\n isCompleted: filteredValues.length === this.length(),\n });\n });\n }\n}\n","<div\n dir=\"ltr\"\n (paste)=\"_handleOnPaste($event)\"\n class=\"ax-otp-input-container ax-editor-container ax-default {{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs().length + ', minmax(0, 1fr))' }\"\n>\n @for (input of inputs(); let i = $index; track i) {\n <input\n [name]=\"name\"\n [type]=\"type()\"\n maxlength=\"1\"\n class=\"ax-input\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (focus)=\"_handleFocus(i)\"\n [ngModel]=\"inputValues[i]\"\n [attr.disabled]=\"disabled\"\n (input)=\"_handleOnInput($event, i)\"\n [class.ax-state-disabled]=\"disabled\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n [class.ax-state-error]=\"state === 'error'\"\n [class.ax-state-success]=\"state === 'success'\"\n />\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { AXOtpComponent } from './otp.component';\n\n@NgModule({\n imports: [AXOtpComponent],\n exports: [AXOtpComponent],\n})\nexport class AXOtpModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEM,MAAO,mBAAoB,SAAQ,OAAO,CAAA;AAG/C;;ACkBD;;;AAGG;AAwBG,MAAO,cAAe,SAAQ,OAAO,EAAC,gBAAwB,GAAE,eAAe,CAAC,CAAA;;AA+BpF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AA/BT,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAoB,QAAQ,2EAAC;AAEzC;;AAEG;QACH,IAAA,CAAA,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA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4BAAA,WAAW,EAAA,cAAgB;AAC5B,yBAAA;AACD,wBAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,gBAAgB,EAAE;AAC7D,wBAAA,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,gBAAgB,EAAE;AAC/D,qBAAA,EAAA,OAAA,EACQ,CAAC,OAAO,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,w0BAAA,EAAA,MAAA,EAAA,CAAA,ggCAAA,CAAA,EAAA;;;MEzCpB,WAAW,CAAA;8GAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAX,WAAW,EAAA,OAAA,EAAA,CAHZ,cAAc,CAAA,EAAA,OAAA,EAAA,CACd,cAAc,CAAA,EAAA,CAAA,CAAA;AAEb,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,WAAW,YAHZ,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAGb,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc,CAAC;AAC1B,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -47,10 +47,10 @@ class AXBasePageComponent extends MXBaseComponent {
|
|
|
47
47
|
ngOnDestroy() {
|
|
48
48
|
this.onClosed.unsubscribe();
|
|
49
49
|
}
|
|
50
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
51
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
50
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXBasePageComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
51
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXBasePageComponent }); }
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXBasePageComponent, decorators: [{
|
|
54
54
|
type: Injectable
|
|
55
55
|
}], propDecorators: { footer: [{
|
|
56
56
|
type: ViewChild,
|
|
@@ -101,10 +101,10 @@ class AXPageComponent extends MXBaseComponent {
|
|
|
101
101
|
},
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
105
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPageComponent, deps: [{ token: AXLoadingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
105
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPageComponent }); }
|
|
106
106
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPageComponent, decorators: [{
|
|
108
108
|
type: Injectable
|
|
109
109
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
110
110
|
type: Inject,
|
|
@@ -117,11 +117,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
117
117
|
|
|
118
118
|
// TODO: Module is empty!?
|
|
119
119
|
class AXPageModule {
|
|
120
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
121
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
122
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
120
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
121
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPageModule }); }
|
|
122
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPageModule }); }
|
|
123
123
|
}
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPageModule, decorators: [{
|
|
125
125
|
type: NgModule,
|
|
126
126
|
args: [{
|
|
127
127
|
imports: [],
|
|
@@ -18,28 +18,28 @@ import { AsyncPipe, isPlatformBrowser } from '@angular/common';
|
|
|
18
18
|
|
|
19
19
|
class AXPaintService {
|
|
20
20
|
constructor() {
|
|
21
|
-
this.penColor = signal('rgb(12, 12, 12)', ...(ngDevMode ? [{ debugName: "penColor" }] : []));
|
|
22
|
-
this.highlightColor = signal('rgb(255, 210, 48)', ...(ngDevMode ? [{ debugName: "highlightColor" }] : []));
|
|
23
|
-
this.penWidth = signal(10, ...(ngDevMode ? [{ debugName: "penWidth" }] : []));
|
|
24
|
-
this.highlightWidth = signal(10, ...(ngDevMode ? [{ debugName: "highlightWidth" }] : []));
|
|
25
|
-
this.eraserWidth = signal(10, ...(ngDevMode ? [{ debugName: "eraserWidth" }] : []));
|
|
26
|
-
this.toggleClear = signal(false, ...(ngDevMode ? [{ debugName: "toggleClear" }] : []));
|
|
27
|
-
this.activeToolState = signal('pen', ...(ngDevMode ? [{ debugName: "activeToolState" }] : []));
|
|
28
|
-
}
|
|
29
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
30
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
21
|
+
this.penColor = signal('rgb(12, 12, 12)', ...(ngDevMode ? [{ debugName: "penColor" }] : /* istanbul ignore next */ []));
|
|
22
|
+
this.highlightColor = signal('rgb(255, 210, 48)', ...(ngDevMode ? [{ debugName: "highlightColor" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.penWidth = signal(10, ...(ngDevMode ? [{ debugName: "penWidth" }] : /* istanbul ignore next */ []));
|
|
24
|
+
this.highlightWidth = signal(10, ...(ngDevMode ? [{ debugName: "highlightWidth" }] : /* istanbul ignore next */ []));
|
|
25
|
+
this.eraserWidth = signal(10, ...(ngDevMode ? [{ debugName: "eraserWidth" }] : /* istanbul ignore next */ []));
|
|
26
|
+
this.toggleClear = signal(false, ...(ngDevMode ? [{ debugName: "toggleClear" }] : /* istanbul ignore next */ []));
|
|
27
|
+
this.activeToolState = signal('pen', ...(ngDevMode ? [{ debugName: "activeToolState" }] : /* istanbul ignore next */ []));
|
|
28
|
+
}
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
30
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintService }); }
|
|
31
31
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintService, decorators: [{
|
|
33
33
|
type: Injectable
|
|
34
34
|
}] });
|
|
35
35
|
|
|
36
36
|
class AXPaintToolsSelectorComponent {
|
|
37
37
|
constructor() {
|
|
38
38
|
this.service = inject(AXPaintService);
|
|
39
|
-
this.pen = signal(null, ...(ngDevMode ? [{ debugName: "pen" }] : []));
|
|
40
|
-
this.highlight = signal(null, ...(ngDevMode ? [{ debugName: "highlight" }] : []));
|
|
41
|
-
this.eraser = signal(null, ...(ngDevMode ? [{ debugName: "eraser" }] : []));
|
|
42
|
-
this.reset = signal(null, ...(ngDevMode ? [{ debugName: "reset" }] : []));
|
|
39
|
+
this.pen = signal(null, ...(ngDevMode ? [{ debugName: "pen" }] : /* istanbul ignore next */ []));
|
|
40
|
+
this.highlight = signal(null, ...(ngDevMode ? [{ debugName: "highlight" }] : /* istanbul ignore next */ []));
|
|
41
|
+
this.eraser = signal(null, ...(ngDevMode ? [{ debugName: "eraser" }] : /* istanbul ignore next */ []));
|
|
42
|
+
this.reset = signal(null, ...(ngDevMode ? [{ debugName: "reset" }] : /* istanbul ignore next */ []));
|
|
43
43
|
}
|
|
44
44
|
changeToolHandler(tool) {
|
|
45
45
|
if (this.service.activeToolState() === tool) {
|
|
@@ -51,10 +51,10 @@ class AXPaintToolsSelectorComponent {
|
|
|
51
51
|
clear() {
|
|
52
52
|
this.service.toggleClear.update((prev) => !prev);
|
|
53
53
|
}
|
|
54
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
55
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
54
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintToolsSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
55
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPaintToolsSelectorComponent, isStandalone: true, selector: "ax-paint-tools-selector", providers: [{ provide: AXComponent, useExisting: AXPaintToolsSelectorComponent }], ngImport: i0, template: "<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'pen' ? true : false\"\n [color]=\"this.service.activeToolState() === 'pen' ? 'primary' : 'default'\"\n>\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n</ax-button>\n\n<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'highlight' ? true : false\"\n [color]=\"this.service.activeToolState() === 'highlight' ? 'primary' : 'default'\"\n>\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n</ax-button>\n\n<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.eraser' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('eraser')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'eraser' ? true : false\"\n [color]=\"this.service.activeToolState() === 'eraser' ? 'primary' : 'default'\"\n>\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n</ax-button>\n\n<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.actions.reset' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"clear()\"\n look=\"blank\"\n>\n <i class=\"fa-solid fa-rotate\"></i>\n</ax-button>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
56
56
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintToolsSelectorComponent, decorators: [{
|
|
58
58
|
type: Component,
|
|
59
59
|
args: [{ selector: 'ax-paint-tools-selector', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorModule, AXTooltipDirective, AsyncPipe, AXTranslatorPipe], providers: [{ provide: AXComponent, useExisting: AXPaintToolsSelectorComponent }], template: "<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'pen' ? true : false\"\n [color]=\"this.service.activeToolState() === 'pen' ? 'primary' : 'default'\"\n>\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n</ax-button>\n\n<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'highlight' ? true : false\"\n [color]=\"this.service.activeToolState() === 'highlight' ? 'primary' : 'default'\"\n>\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n</ax-button>\n\n<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.eraser' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('eraser')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'eraser' ? true : false\"\n [color]=\"this.service.activeToolState() === 'eraser' ? 'primary' : 'default'\"\n>\n <ax-icon class=\"ax-icon ax-icon-eraser\"></ax-icon>\n</ax-button>\n\n<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.actions.reset' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"clear()\"\n look=\"blank\"\n>\n <i class=\"fa-solid fa-rotate\"></i>\n</ax-button>\n" }]
|
|
60
60
|
}] });
|
|
@@ -66,16 +66,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
66
66
|
class AXPaintEraserToolComponent {
|
|
67
67
|
constructor() {
|
|
68
68
|
this.service = inject(AXPaintService);
|
|
69
|
-
this.value = linkedSignal(() => this.service.eraserWidth(), ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
69
|
+
this.value = linkedSignal(() => this.service.eraserWidth(), ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
70
70
|
}
|
|
71
71
|
/** @ignore */
|
|
72
72
|
valueHandler(e) {
|
|
73
73
|
this.service.eraserWidth.set(e);
|
|
74
74
|
}
|
|
75
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
76
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
75
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintEraserToolComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
76
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPaintEraserToolComponent, isStandalone: true, selector: "ax-paint-eraser-tool", providers: [{ provide: AXComponent, useExisting: AXPaintEraserToolComponent }], ngImport: i0, template: "<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintEraserToolComponent, decorators: [{
|
|
79
79
|
type: Component,
|
|
80
80
|
args: [{ selector: 'ax-paint-eraser-tool', encapsulation: ViewEncapsulation.None, imports: [FormsModule, AXRangeSliderComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXPaintEraserToolComponent }], template: "<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n" }]
|
|
81
81
|
}] });
|
|
@@ -87,8 +87,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
87
87
|
class AXPaintHighlightToolComponent {
|
|
88
88
|
constructor() {
|
|
89
89
|
this.service = inject(AXPaintService);
|
|
90
|
-
this.value = linkedSignal(() => this.service.highlightWidth(), ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
91
|
-
this.selectedColor = linkedSignal(() => this.service.highlightColor(), ...(ngDevMode ? [{ debugName: "selectedColor" }] : []));
|
|
90
|
+
this.value = linkedSignal(() => this.service.highlightWidth(), ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
91
|
+
this.selectedColor = linkedSignal(() => this.service.highlightColor(), ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
|
|
92
92
|
}
|
|
93
93
|
changeColorHandler(e) {
|
|
94
94
|
this.service.highlightColor.set(e);
|
|
@@ -98,10 +98,10 @@ class AXPaintHighlightToolComponent {
|
|
|
98
98
|
valueHandler(e) {
|
|
99
99
|
this.service.highlightWidth.set(e);
|
|
100
100
|
}
|
|
101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
102
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintHighlightToolComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPaintHighlightToolComponent, isStandalone: true, selector: "ax-paint-highlight-tool", providers: [{ provide: AXComponent, useExisting: AXPaintHighlightToolComponent }], ngImport: i0, template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n axTooltip=\"Pen Color Picker\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", dependencies: [{ kind: "component", type: AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
103
103
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintHighlightToolComponent, decorators: [{
|
|
105
105
|
type: Component,
|
|
106
106
|
args: [{ selector: 'ax-paint-highlight-tool', encapsulation: ViewEncapsulation.None, imports: [AXColorBoxComponent, FormsModule, AXRangeSliderComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXPaintHighlightToolComponent }], template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n axTooltip=\"Pen Color Picker\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n" }]
|
|
107
107
|
}] });
|
|
@@ -114,9 +114,9 @@ class AXPaintPenToolComponent {
|
|
|
114
114
|
constructor() {
|
|
115
115
|
this.service = inject(AXPaintService);
|
|
116
116
|
/** @ignore */
|
|
117
|
-
this.value = linkedSignal(() => this.service.penWidth(), ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
117
|
+
this.value = linkedSignal(() => this.service.penWidth(), ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
118
118
|
/** @ignore */
|
|
119
|
-
this.selectedColor = linkedSignal(() => this.service.penColor(), ...(ngDevMode ? [{ debugName: "selectedColor" }] : []));
|
|
119
|
+
this.selectedColor = linkedSignal(() => this.service.penColor(), ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
|
|
120
120
|
}
|
|
121
121
|
changeColorHandler(e) {
|
|
122
122
|
this.service.penColor.set(e);
|
|
@@ -126,10 +126,10 @@ class AXPaintPenToolComponent {
|
|
|
126
126
|
valueHandler(e) {
|
|
127
127
|
this.service.penWidth.set(e);
|
|
128
128
|
}
|
|
129
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
129
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintPenToolComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
130
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPaintPenToolComponent, isStandalone: true, selector: "ax-paint-pen-tool", providers: [{ provide: AXComponent, useExisting: AXPaintPenToolComponent }], ngImport: i0, template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n axTooltip=\"Pen Color Picker\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", dependencies: [{ kind: "component", type: AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
131
131
|
}
|
|
132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintPenToolComponent, decorators: [{
|
|
133
133
|
type: Component,
|
|
134
134
|
args: [{ selector: 'ax-paint-pen-tool', encapsulation: ViewEncapsulation.None, imports: [AXColorBoxComponent, FormsModule, AXRangeSliderComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXPaintPenToolComponent }], template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n axTooltip=\"Pen Color Picker\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n" }]
|
|
135
135
|
}] });
|
|
@@ -142,12 +142,12 @@ class AXPaintContainerComponent extends classes((MXInputBaseValueComponent), MXL
|
|
|
142
142
|
constructor() {
|
|
143
143
|
super(...arguments);
|
|
144
144
|
this.service = inject(AXPaintService);
|
|
145
|
-
this.editMode = input(false, ...(ngDevMode ? [{ debugName: "editMode" }] : []));
|
|
145
|
+
this.editMode = input(false, ...(ngDevMode ? [{ debugName: "editMode" }] : /* istanbul ignore next */ []));
|
|
146
146
|
this.#eff = effect(() => {
|
|
147
147
|
if (this.editMode()) {
|
|
148
148
|
this.service.activeToolState.set('pen');
|
|
149
149
|
}
|
|
150
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
150
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
151
151
|
}
|
|
152
152
|
#eff;
|
|
153
153
|
get __hostClass() {
|
|
@@ -212,8 +212,8 @@ class AXPaintContainerComponent extends classes((MXInputBaseValueComponent), MXL
|
|
|
212
212
|
get __hostName() {
|
|
213
213
|
return this.name;
|
|
214
214
|
}
|
|
215
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
216
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
215
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
216
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPaintContainerComponent, isStandalone: true, selector: "ax-paint-container", inputs: { look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, editMode: { classPropertyName: "editMode", publicName: "editMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.__hostClass", "attr.name": "this.__hostName" } }, providers: [
|
|
217
217
|
AXPaintService,
|
|
218
218
|
{ provide: AXComponent, useExisting: AXPaintContainerComponent },
|
|
219
219
|
{ provide: AXFocusableComponent, useExisting: AXPaintContainerComponent },
|
|
@@ -223,9 +223,9 @@ class AXPaintContainerComponent extends classes((MXInputBaseValueComponent), MXL
|
|
|
223
223
|
useExisting: forwardRef(() => AXPaintContainerComponent),
|
|
224
224
|
multi: true,
|
|
225
225
|
},
|
|
226
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-editor-container ax-default {{ look }}\">\n <ng-content></ng-content>\n\n @if (service.activeToolState() && !editMode()) {\n <div class=\"ax-secondary-toolbar\">\n @switch (service.activeToolState()) {\n @case ('pen') {\n <ax-paint-pen-tool></ax-paint-pen-tool>\n }\n @case ('eraser') {\n <ax-paint-eraser-tool></ax-paint-eraser-tool>\n }\n @case ('highlight') {\n <ax-paint-highlight-tool></ax-paint-highlight-tool>\n }\n }\n </div>\n }\n\n @if (!editMode()) {\n <ax-toolbar class=\"ax-main-toolbar\">\n <ax-content>\n <ax-paint-tools-selector></ax-paint-tools-selector>\n </ax-content>\n </ax-toolbar>\n }\n\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n\n@if (disabled) {\n <div class=\"ax-disable-overlay\"></div>\n}\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-paint-container>.ax-editor-container{height:100%;display:block;padding:
|
|
226
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-editor-container ax-default {{ look }}\">\n <ng-content></ng-content>\n\n @if (service.activeToolState() && !editMode()) {\n <div class=\"ax-secondary-toolbar\">\n @switch (service.activeToolState()) {\n @case ('pen') {\n <ax-paint-pen-tool></ax-paint-pen-tool>\n }\n @case ('eraser') {\n <ax-paint-eraser-tool></ax-paint-eraser-tool>\n }\n @case ('highlight') {\n <ax-paint-highlight-tool></ax-paint-highlight-tool>\n }\n }\n </div>\n }\n\n @if (!editMode()) {\n <ax-toolbar class=\"ax-main-toolbar\">\n <ax-content>\n <ax-paint-tools-selector></ax-paint-tools-selector>\n </ax-content>\n </ax-toolbar>\n }\n\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n\n@if (disabled) {\n <div class=\"ax-disable-overlay\"></div>\n}\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-paint-container>.ax-editor-container{height:100%;display:block;padding:0!important}ax-paint-container.ax-state-disabled{opacity:.5}ax-paint-container .ax-disable-overlay{cursor:not-allowed;width:100%;height:100%;position:absolute;top:0;left:0}ax-paint-container .ax-secondary-toolbar{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface));padding:var(--spacing,.25rem);justify-content:center;display:flex}ax-paint-container .ax-secondary-toolbar:where(.ax-dark,.ax-dark *){border-color:rgba(var(--ax-sys-color-border-darkest-surface))}ax-paint-container .ax-main-toolbar{padding:var(--spacing,.25rem);justify-content:center}ax-paint-container ax-paint-tools-selector{padding:var(--spacing,.25rem);display:flex}ax-paint-container ax-paint-eraser-tool,ax-paint-container ax-paint-highlight-tool,ax-paint-container ax-paint-pen-tool{display:flex}:is(ax-paint-container ax-paint-eraser-tool,ax-paint-container ax-paint-highlight-tool,ax-paint-container ax-paint-pen-tool) ax-range-slider{width:calc(var(--spacing,.25rem) * 40);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2)}:is(ax-paint-container ax-paint-eraser-tool,ax-paint-container ax-paint-highlight-tool,ax-paint-container ax-paint-pen-tool) ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--spacing,.25rem) * 4)!important;width:calc(var(--spacing,.25rem) * 4)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXToolBarComponent, selector: "ax-toolbar" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXPaintToolsSelectorComponent, selector: "ax-paint-tools-selector" }, { kind: "component", type: AXPaintPenToolComponent, selector: "ax-paint-pen-tool" }, { kind: "component", type: AXPaintHighlightToolComponent, selector: "ax-paint-highlight-tool" }, { kind: "component", type: AXPaintEraserToolComponent, selector: "ax-paint-eraser-tool" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
227
227
|
}
|
|
228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintContainerComponent, decorators: [{
|
|
229
229
|
type: Component,
|
|
230
230
|
args: [{ selector: 'ax-paint-container', encapsulation: ViewEncapsulation.None, inputs: ['look', 'disabled'], providers: [
|
|
231
231
|
AXPaintService,
|
|
@@ -244,7 +244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
244
244
|
AXPaintPenToolComponent,
|
|
245
245
|
AXPaintHighlightToolComponent,
|
|
246
246
|
AXPaintEraserToolComponent,
|
|
247
|
-
], template: "<div class=\"ax-editor-container ax-default {{ look }}\">\n <ng-content></ng-content>\n\n @if (service.activeToolState() && !editMode()) {\n <div class=\"ax-secondary-toolbar\">\n @switch (service.activeToolState()) {\n @case ('pen') {\n <ax-paint-pen-tool></ax-paint-pen-tool>\n }\n @case ('eraser') {\n <ax-paint-eraser-tool></ax-paint-eraser-tool>\n }\n @case ('highlight') {\n <ax-paint-highlight-tool></ax-paint-highlight-tool>\n }\n }\n </div>\n }\n\n @if (!editMode()) {\n <ax-toolbar class=\"ax-main-toolbar\">\n <ax-content>\n <ax-paint-tools-selector></ax-paint-tools-selector>\n </ax-content>\n </ax-toolbar>\n }\n\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n\n@if (disabled) {\n <div class=\"ax-disable-overlay\"></div>\n}\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-paint-container>.ax-editor-container{height:100%;display:block;padding:
|
|
247
|
+
], template: "<div class=\"ax-editor-container ax-default {{ look }}\">\n <ng-content></ng-content>\n\n @if (service.activeToolState() && !editMode()) {\n <div class=\"ax-secondary-toolbar\">\n @switch (service.activeToolState()) {\n @case ('pen') {\n <ax-paint-pen-tool></ax-paint-pen-tool>\n }\n @case ('eraser') {\n <ax-paint-eraser-tool></ax-paint-eraser-tool>\n }\n @case ('highlight') {\n <ax-paint-highlight-tool></ax-paint-highlight-tool>\n }\n }\n </div>\n }\n\n @if (!editMode()) {\n <ax-toolbar class=\"ax-main-toolbar\">\n <ax-content>\n <ax-paint-tools-selector></ax-paint-tools-selector>\n </ax-content>\n </ax-toolbar>\n }\n\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n\n@if (disabled) {\n <div class=\"ax-disable-overlay\"></div>\n}\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-paint-container>.ax-editor-container{height:100%;display:block;padding:0!important}ax-paint-container.ax-state-disabled{opacity:.5}ax-paint-container .ax-disable-overlay{cursor:not-allowed;width:100%;height:100%;position:absolute;top:0;left:0}ax-paint-container .ax-secondary-toolbar{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface));padding:var(--spacing,.25rem);justify-content:center;display:flex}ax-paint-container .ax-secondary-toolbar:where(.ax-dark,.ax-dark *){border-color:rgba(var(--ax-sys-color-border-darkest-surface))}ax-paint-container .ax-main-toolbar{padding:var(--spacing,.25rem);justify-content:center}ax-paint-container ax-paint-tools-selector{padding:var(--spacing,.25rem);display:flex}ax-paint-container ax-paint-eraser-tool,ax-paint-container ax-paint-highlight-tool,ax-paint-container ax-paint-pen-tool{display:flex}:is(ax-paint-container ax-paint-eraser-tool,ax-paint-container ax-paint-highlight-tool,ax-paint-container ax-paint-pen-tool) ax-range-slider{width:calc(var(--spacing,.25rem) * 40);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2)}:is(ax-paint-container ax-paint-eraser-tool,ax-paint-container ax-paint-highlight-tool,ax-paint-container ax-paint-pen-tool) ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--spacing,.25rem) * 4)!important;width:calc(var(--spacing,.25rem) * 4)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n"] }]
|
|
248
248
|
}], propDecorators: { editMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "editMode", required: false }] }], __hostClass: [{
|
|
249
249
|
type: HostBinding,
|
|
250
250
|
args: ['class']
|
|
@@ -267,15 +267,15 @@ class AXPaintViewComponent {
|
|
|
267
267
|
this.renderer = inject(Renderer2);
|
|
268
268
|
this.platformID = inject(PLATFORM_ID);
|
|
269
269
|
this.hostElem = inject(ElementRef);
|
|
270
|
-
this.paintBackgroundColor = input('white', ...(ngDevMode ? [{ debugName: "paintBackgroundColor" }] : []));
|
|
270
|
+
this.paintBackgroundColor = input('white', ...(ngDevMode ? [{ debugName: "paintBackgroundColor" }] : /* istanbul ignore next */ []));
|
|
271
271
|
/** @ignore */
|
|
272
|
-
this.canvasElem = viewChild('c', ...(ngDevMode ? [{ debugName: "canvasElem" }] : []));
|
|
272
|
+
this.canvasElem = viewChild('c', ...(ngDevMode ? [{ debugName: "canvasElem" }] : /* istanbul ignore next */ []));
|
|
273
273
|
/** @ignore */
|
|
274
|
-
this.ctx = signal(null, ...(ngDevMode ? [{ debugName: "ctx" }] : []));
|
|
274
|
+
this.ctx = signal(null, ...(ngDevMode ? [{ debugName: "ctx" }] : /* istanbul ignore next */ []));
|
|
275
275
|
/** @ignore */
|
|
276
|
-
this.isPainting = signal(false, ...(ngDevMode ? [{ debugName: "isPainting" }] : []));
|
|
276
|
+
this.isPainting = signal(false, ...(ngDevMode ? [{ debugName: "isPainting" }] : /* istanbul ignore next */ []));
|
|
277
277
|
/** @ignore */
|
|
278
|
-
this.isUserInteract = signal(false, ...(ngDevMode ? [{ debugName: "isUserInteract" }] : []));
|
|
278
|
+
this.isUserInteract = signal(false, ...(ngDevMode ? [{ debugName: "isUserInteract" }] : /* istanbul ignore next */ []));
|
|
279
279
|
this.#init = afterNextRender(() => {
|
|
280
280
|
this.ctx.set(this.canvasElem().nativeElement.getContext('2d'));
|
|
281
281
|
this.ctx().lineJoin = 'round';
|
|
@@ -291,7 +291,7 @@ class AXPaintViewComponent {
|
|
|
291
291
|
this.isUserInteract.set(false);
|
|
292
292
|
this.service.toggleClear();
|
|
293
293
|
this.ctx()?.clearRect(0, 0, this.getBoundingCanvasHandler()?.width, this.getBoundingCanvasHandler()?.height);
|
|
294
|
-
}, ...(ngDevMode ? [{ debugName: "#effect" }] : []));
|
|
294
|
+
}, ...(ngDevMode ? [{ debugName: "#effect" }] : /* istanbul ignore next */ []));
|
|
295
295
|
}
|
|
296
296
|
#init;
|
|
297
297
|
#effect;
|
|
@@ -394,12 +394,12 @@ class AXPaintViewComponent {
|
|
|
394
394
|
get __hostClass() {
|
|
395
395
|
return [`ax-${this.paintBackgroundColor()}`];
|
|
396
396
|
}
|
|
397
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
398
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
397
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
398
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: AXPaintViewComponent, isStandalone: true, selector: "ax-paint-view", inputs: { paintBackgroundColor: { classPropertyName: "paintBackgroundColor", publicName: "paintBackgroundColor", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXComponent, useExisting: AXPaintViewComponent }], viewQueries: [{ propertyName: "canvasElem", first: true, predicate: ["c"], descendants: true, isSignal: true }], ngImport: i0, template: "<canvas\n #c\n tabindex=\"1\"\n (pointerdown)=\"mouseDownHandler($event)\"\n (pointerup)=\"mouseUpHandler()\"\n (pointermove)=\"mouseMoveHandler($event)\"\n class=\"ax-canvas-element\"\n>\n</canvas>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-paint-view{touch-action:none;width:100%;display:block}ax-paint-view.ax-white{background-color:var(--color-white,#fff)}ax-paint-view.ax-black{background-color:var(--color-black,#000)}ax-paint-view .ax-canvas-element{cursor:crosshair;border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface));width:100%}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
399
399
|
}
|
|
400
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
400
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintViewComponent, decorators: [{
|
|
401
401
|
type: Component,
|
|
402
|
-
args: [{ selector: 'ax-paint-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXPaintViewComponent }], template: "<canvas\n #c\n tabindex=\"1\"\n (pointerdown)=\"mouseDownHandler($event)\"\n (pointerup)=\"mouseUpHandler()\"\n (pointermove)=\"mouseMoveHandler($event)\"\n class=\"ax-canvas-element\"\n>\n</canvas>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-paint-view{touch-action:none;width:100%;display:block}ax-paint-view.ax-white{background-color:var(--color-white,#fff)}ax-paint-view.ax-black{background-color:var(--color-black,#000)}ax-paint-view .ax-canvas-element{cursor:crosshair;border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface));width:100%}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.
|
|
402
|
+
args: [{ selector: 'ax-paint-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXPaintViewComponent }], template: "<canvas\n #c\n tabindex=\"1\"\n (pointerdown)=\"mouseDownHandler($event)\"\n (pointerup)=\"mouseUpHandler()\"\n (pointermove)=\"mouseMoveHandler($event)\"\n class=\"ax-canvas-element\"\n>\n</canvas>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-paint-view{touch-action:none;width:100%;display:block}ax-paint-view.ax-white{background-color:var(--color-white,#fff)}ax-paint-view.ax-black{background-color:var(--color-black,#000)}ax-paint-view .ax-canvas-element{cursor:crosshair;border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface));width:100%}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n"] }]
|
|
403
403
|
}], propDecorators: { paintBackgroundColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "paintBackgroundColor", required: false }] }], canvasElem: [{ type: i0.ViewChild, args: ['c', { isSignal: true }] }], __hostClass: [{
|
|
404
404
|
type: HostBinding,
|
|
405
405
|
args: ['class']
|
|
@@ -424,8 +424,8 @@ const MODULES = [
|
|
|
424
424
|
AXTooltipModule,
|
|
425
425
|
];
|
|
426
426
|
class AXPaintModule {
|
|
427
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
428
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
427
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
428
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPaintModule, imports: [FormsModule,
|
|
429
429
|
AXRangeSliderModule,
|
|
430
430
|
AXSelectBoxModule,
|
|
431
431
|
AXButtonModule,
|
|
@@ -443,13 +443,13 @@ class AXPaintModule {
|
|
|
443
443
|
AXPaintPenToolComponent,
|
|
444
444
|
AXPaintHighlightToolComponent,
|
|
445
445
|
AXPaintEraserToolComponent] }); }
|
|
446
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
446
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintModule, imports: [MODULES, AXPaintContainerComponent,
|
|
447
447
|
AXPaintToolsSelectorComponent,
|
|
448
448
|
AXPaintPenToolComponent,
|
|
449
449
|
AXPaintHighlightToolComponent,
|
|
450
450
|
AXPaintEraserToolComponent] }); }
|
|
451
451
|
}
|
|
452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPaintModule, decorators: [{
|
|
453
453
|
type: NgModule,
|
|
454
454
|
args: [{
|
|
455
455
|
imports: [...MODULES, ...COMPONENT],
|