@acorex/components 19.11.0-next.1 → 19.11.0-next.3
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/autocomplete/README.md +3 -0
- package/autocomplete/index.d.ts +2 -0
- package/autocomplete/lib/autocomplete.component.d.ts +113 -0
- package/autocomplete/lib/autocomplete.module.d.ts +7 -0
- package/common/lib/classes/components.class.d.ts +14 -1
- package/data-table/lib/columns/row-select-column.component.d.ts +8 -7
- package/dropdown/lib/dropdown-box.component.d.ts +2 -1
- package/dropdown/lib/dropdown-panel.component.d.ts +3 -1
- package/dropdown-button/lib/dropdown-button.component.d.ts +2 -1
- package/fesm2022/acorex-components-action-sheet.mjs +11 -11
- package/fesm2022/acorex-components-alert.mjs +8 -8
- package/fesm2022/acorex-components-audio-wave.mjs +8 -8
- package/fesm2022/acorex-components-autocomplete.mjs +317 -0
- package/fesm2022/acorex-components-autocomplete.mjs.map +1 -0
- package/fesm2022/acorex-components-avatar.mjs +11 -11
- package/fesm2022/acorex-components-badge.mjs +8 -8
- package/fesm2022/acorex-components-bottom-navigation.mjs +11 -11
- package/fesm2022/acorex-components-breadcrumbs.mjs +11 -11
- package/fesm2022/acorex-components-button-group.mjs +11 -11
- package/fesm2022/acorex-components-button.mjs +15 -15
- package/fesm2022/acorex-components-calendar.mjs +15 -15
- package/fesm2022/acorex-components-check-box.mjs +11 -11
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +8 -8
- package/fesm2022/acorex-components-circular-progress.mjs +8 -8
- package/fesm2022/acorex-components-collapse.mjs +12 -12
- package/fesm2022/acorex-components-color-box.mjs +10 -10
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +26 -26
- package/fesm2022/acorex-components-comment.mjs +29 -29
- package/fesm2022/acorex-components-common.mjs +736 -696
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +52 -52
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +47 -47
- package/fesm2022/acorex-components-data-pager.mjs +44 -47
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +93 -70
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +10 -10
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +9 -9
- package/fesm2022/acorex-components-datetime-picker.mjs +9 -9
- package/fesm2022/acorex-components-decorators.mjs +26 -26
- package/fesm2022/acorex-components-dialog.mjs +12 -12
- package/fesm2022/acorex-components-drawer.mjs +14 -14
- package/fesm2022/acorex-components-dropdown-button.mjs +16 -10
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +23 -15
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-file-explorer.mjs +27 -27
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +17 -17
- package/fesm2022/acorex-components-grid-layout-builder.mjs +149 -598
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +311 -180
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +8 -8
- package/fesm2022/acorex-components-json-viewer.mjs +8 -8
- package/fesm2022/acorex-components-kbd.mjs +11 -11
- package/fesm2022/acorex-components-label.mjs +8 -8
- package/fesm2022/acorex-components-list.mjs +9 -9
- package/fesm2022/acorex-components-loading-dialog.mjs +11 -11
- package/fesm2022/acorex-components-loading.mjs +18 -18
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +13729 -39
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +54 -40
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +17 -17
- package/fesm2022/acorex-components-navbar.mjs +8 -8
- package/fesm2022/acorex-components-notification.mjs +11 -11
- package/fesm2022/acorex-components-number-box.mjs +9 -9
- package/fesm2022/acorex-components-otp.mjs +9 -9
- package/fesm2022/acorex-components-page.mjs +11 -11
- package/fesm2022/acorex-components-paint.mjs +20 -20
- package/fesm2022/acorex-components-password-box.mjs +12 -12
- package/fesm2022/acorex-components-pdf-reader.mjs +8 -8
- package/fesm2022/acorex-components-phone-box.mjs +9 -9
- package/fesm2022/acorex-components-picker.mjs +14 -14
- package/fesm2022/acorex-components-popover.mjs +8 -8
- package/fesm2022/acorex-components-popup.mjs +11 -11
- package/fesm2022/acorex-components-progress-bar.mjs +8 -8
- package/fesm2022/acorex-components-qrcode.mjs +8 -8
- package/fesm2022/acorex-components-query-builder.mjs +25 -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 +14 -14
- package/fesm2022/acorex-components-range-slider.mjs +8 -8
- package/fesm2022/acorex-components-rate-picker.mjs +8 -8
- package/fesm2022/acorex-components-rest-api-generator.mjs +23 -23
- package/fesm2022/acorex-components-result.mjs +8 -8
- package/fesm2022/acorex-components-routing-progress.mjs +8 -8
- package/fesm2022/acorex-components-scheduler.mjs +14 -14
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-scss.mjs +4 -4
- package/fesm2022/acorex-components-search-box.mjs +10 -10
- package/fesm2022/acorex-components-select-box.mjs +10 -10
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +9 -9
- package/fesm2022/acorex-components-side-menu.mjs +15 -15
- package/fesm2022/acorex-components-skeleton.mjs +8 -8
- package/fesm2022/acorex-components-slider.mjs +9 -9
- package/fesm2022/acorex-components-sliding-item.mjs +14 -14
- package/fesm2022/acorex-components-step-wizard.mjs +14 -14
- package/fesm2022/acorex-components-switch.mjs +11 -11
- package/fesm2022/acorex-components-tabs.mjs +14 -14
- package/fesm2022/acorex-components-tag-box.mjs +121 -0
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -0
- package/fesm2022/acorex-components-tag.mjs +9 -9
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +9 -9
- package/fesm2022/acorex-components-text-box.mjs +14 -14
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +12 -12
- package/fesm2022/acorex-components-toast.mjs +11 -11
- package/fesm2022/acorex-components-toolbar.mjs +8 -8
- package/fesm2022/acorex-components-tooltip.mjs +11 -11
- package/fesm2022/acorex-components-tree-view.mjs +31 -27
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +32 -27
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-video-player.mjs +8 -8
- package/fesm2022/acorex-components-wysiwyg.mjs +32 -32
- package/grid-layout-builder/index.d.ts +0 -1
- package/grid-layout-builder/lib/grid-layout-builder.module.d.ts +1 -2
- package/grid-layout-builder/lib/grid-layout-container.component.d.ts +37 -235
- package/grid-layout-builder/lib/grid-layout-widget.component.d.ts +6 -86
- package/grid-layout-builder/lib/types.d.ts +8 -12
- package/image-editor/index.d.ts +7 -2
- package/image-editor/lib/image-editor-container/image-editor-container.component.d.ts +4 -1
- package/image-editor/lib/image-editor-tools/image-editor-crop/image-editor-crop.component.d.ts +3 -8
- package/image-editor/lib/image-editor-tools/image-editor-header/image-editor-header.component.d.ts +12 -0
- package/image-editor/lib/image-editor-tools/image-editor-highlight/image-editor-highlight.component.d.ts +18 -0
- package/image-editor/lib/image-editor-tools/image-editor-history/image-editor-history.component.d.ts +13 -0
- package/image-editor/lib/image-editor-tools/image-editor-pen/image-editor-pen.component.d.ts +18 -0
- package/image-editor/lib/image-editor-tools/image-editor-rotate/image-editor-rotate.component.d.ts +16 -0
- package/image-editor/lib/image-editor-tools/image-editor-tool-selector/image-editor-tool-selector.component.d.ts +12 -0
- package/image-editor/lib/image-editor-view/image-editor-view.component.d.ts +7 -1
- package/image-editor/lib/image-editor.module.d.ts +10 -6
- package/image-editor/lib/image-editor.service.d.ts +6 -10
- package/map/index.d.ts +2 -0
- package/map/lib/map.component.d.ts +23 -4
- package/map/lib/map.service.d.ts +27 -1
- package/map/lib/map.utility.d.ts +2 -0
- package/map/lib/map.world-map.d.ts +28 -0
- package/package.json +9 -1
- package/query-builder/lib/query-builder.component.d.ts +5 -2
- package/tag-box/README.md +3 -0
- package/tag-box/index.d.ts +2 -0
- package/tag-box/lib/tag-box.component.d.ts +30 -0
- package/tag-box/lib/tag-box.module.d.ts +7 -0
- package/tree-view/lib/tree-view-item.component.d.ts +3 -2
- package/tree-view/lib/tree-view.component.d.ts +6 -7
- package/grid-layout-builder/lib/grid-layout-widget.directive.d.ts +0 -106
- package/image-editor/lib/image-editor-tools/image-editor-color-picker/image-editor-color-picker.component.d.ts +0 -17
- package/image-editor/lib/image-editor-tools/image-editor-pen-mode-changer/image-editor-pen-mode-changer.component.d.ts +0 -34
@@ -1,17 +1,17 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { model, output, Component, inject, ElementRef, signal, afterNextRender, Injectable, PLATFORM_ID,
|
2
|
+
import { model, output, Component, inject, ElementRef, signal, afterNextRender, Injectable, ChangeDetectorRef, ViewContainerRef, EventEmitter, PLATFORM_ID, Input, Host, Self, Optional, Directive, Inject, NgModule, InjectionToken, Output, input, effect } from '@angular/core';
|
3
3
|
import { AXHtmlUtil } from '@acorex/core/utils';
|
4
|
-
import { flatten, clone,
|
5
|
-
import {
|
6
|
-
import {
|
4
|
+
import { flatten, clone, cloneDeep, isEqual, set } from 'lodash-es';
|
5
|
+
import { isBrowser } from '@acorex/core/platform';
|
6
|
+
import { AXValidationService } from '@acorex/core/validation';
|
7
|
+
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
7
8
|
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
9
|
+
import { noop, Subscription, BehaviorSubject, debounceTime, distinctUntilChanged, Subject, fromEvent, skip } from 'rxjs';
|
10
|
+
import { DataSource } from '@angular/cdk/collections';
|
8
11
|
import * as i1 from '@angular/platform-browser';
|
9
12
|
import { Observable } from 'rxjs/internal/Observable';
|
10
13
|
import { map, pairwise, filter, startWith, exhaustMap } from 'rxjs/operators';
|
11
14
|
import { classes } from 'polytype';
|
12
|
-
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
13
|
-
import { isBrowser } from '@acorex/core/platform';
|
14
|
-
import { AXValidationService } from '@acorex/core/validation';
|
15
15
|
import { AXFormatService } from '@acorex/core/format';
|
16
16
|
import * as i1$1 from '@angular/forms';
|
17
17
|
|
@@ -21,10 +21,10 @@ class NXButtonComponent {
|
|
21
21
|
this.toggleableChange = output();
|
22
22
|
this.selectedChange = output();
|
23
23
|
}
|
24
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
25
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.8", type: NXButtonComponent, isStandalone: false, selector: "ng-component", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { text: "textChange", toggleableChange: "toggleableChange", selectedChange: "selectedChange" }, ngImport: i0, template: '', isInline: true }); }
|
26
26
|
}
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXButtonComponent, decorators: [{
|
28
28
|
type: Component,
|
29
29
|
args: [{
|
30
30
|
template: '',
|
@@ -36,10 +36,10 @@ class NXColorComponent {
|
|
36
36
|
constructor() {
|
37
37
|
this.color = model('default');
|
38
38
|
}
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
40
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXColorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
40
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.8", type: NXColorComponent, isStandalone: false, selector: "ng-component", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange" }, ngImport: i0, template: '', isInline: true }); }
|
41
41
|
}
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXColorComponent, decorators: [{
|
43
43
|
type: Component,
|
44
44
|
args: [{
|
45
45
|
template: '',
|
@@ -65,10 +65,10 @@ class NXComponent {
|
|
65
65
|
get nativeElement() {
|
66
66
|
return this.#elementRef.nativeElement;
|
67
67
|
}
|
68
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
69
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.
|
68
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
69
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXComponent }); }
|
70
70
|
}
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXComponent, decorators: [{
|
72
72
|
type: Injectable
|
73
73
|
}] });
|
74
74
|
|
@@ -108,10 +108,10 @@ class NXInteractiveComponent extends NXComponent {
|
|
108
108
|
hasFocus() {
|
109
109
|
return AXHtmlUtil.hasFocus(this.nativeElement);
|
110
110
|
}
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
112
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.
|
111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXInteractiveComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
112
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.8", type: NXInteractiveComponent, isStandalone: false, selector: "ng-component", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", tabIndex: "tabIndexChange", onFocus: "onFocus", onBlur: "onBlur" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
113
113
|
}
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXInteractiveComponent, decorators: [{
|
115
115
|
type: Component,
|
116
116
|
args: [{
|
117
117
|
template: '',
|
@@ -123,10 +123,10 @@ class NXLookComponent {
|
|
123
123
|
constructor() {
|
124
124
|
this.look = model('solid');
|
125
125
|
}
|
126
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
127
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.
|
126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXLookComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
127
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.8", type: NXLookComponent, isStandalone: false, selector: "ng-component", inputs: { look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { look: "lookChange" }, ngImport: i0, template: '', isInline: true }); }
|
128
128
|
}
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXLookComponent, decorators: [{
|
130
130
|
type: Component,
|
131
131
|
args: [{
|
132
132
|
template: '',
|
@@ -141,10 +141,10 @@ class NXValueComponent {
|
|
141
141
|
this.value = model();
|
142
142
|
this.onValueChanged = output();
|
143
143
|
}
|
144
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
145
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.
|
144
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
145
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.8", type: NXValueComponent, isStandalone: false, selector: "ng-component", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { readonly: "readonlyChange", name: "nameChange", value: "valueChange", onValueChanged: "onValueChanged" }, ngImport: i0, template: '', isInline: true }); }
|
146
146
|
}
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NXValueComponent, decorators: [{
|
148
148
|
type: Component,
|
149
149
|
args: [{
|
150
150
|
template: '',
|
@@ -321,191 +321,663 @@ const AX_PLACEMENT_MAP = {
|
|
321
321
|
* A token that specifies the selection mode of component.
|
322
322
|
*/
|
323
323
|
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
constructor() {
|
330
|
-
this.isUserInteraction = false;
|
324
|
+
class AXDomService {
|
325
|
+
generateElementId() {
|
326
|
+
const dateString = Date.now().toString(36);
|
327
|
+
const randomness = Math.random().toString(36).substr(2);
|
328
|
+
return dateString + randomness;
|
331
329
|
}
|
330
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXDomService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
331
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXDomService, providedIn: 'root' }); }
|
332
332
|
}
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
/**
|
340
|
-
* Contains native event
|
341
|
-
* @category Events
|
342
|
-
*/
|
343
|
-
class AXValueChangedEvent extends AXEvent {
|
344
|
-
}
|
345
|
-
/**
|
346
|
-
* Contains native event
|
347
|
-
* @category Events
|
348
|
-
*/
|
349
|
-
class AXOptionChangedEvent extends AXEvent {
|
350
|
-
}
|
351
|
-
/**
|
352
|
-
* Fires each time the user click the element.
|
353
|
-
* @category Events
|
354
|
-
*/
|
355
|
-
class AXClickEvent extends AXHtmlEvent {
|
333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXDomService, decorators: [{
|
334
|
+
type: Injectable,
|
335
|
+
args: [{ providedIn: 'root' }]
|
336
|
+
}] });
|
337
|
+
|
338
|
+
class MXBaseComponent {
|
356
339
|
constructor() {
|
357
|
-
|
340
|
+
this._cdr = inject(ChangeDetectorRef);
|
341
|
+
this._elementRef = inject(ElementRef);
|
342
|
+
this._viewRef = inject(ViewContainerRef);
|
343
|
+
this._domService = inject(AXDomService);
|
344
|
+
this._id = this._domService.generateElementId();
|
358
345
|
/**
|
359
|
-
*
|
346
|
+
* Fired when an option related to the component changes.
|
347
|
+
*
|
348
|
+
* @event
|
360
349
|
*/
|
361
|
-
this.
|
362
|
-
this.nativeEvent = null;
|
350
|
+
this.onOptionChanged = new EventEmitter();
|
363
351
|
}
|
364
|
-
|
365
|
-
|
366
|
-
* Fires each time the user click the element.
|
367
|
-
* @category Events
|
368
|
-
*/
|
369
|
-
class AXButtonClickEvent extends AXClickEvent {
|
370
|
-
}
|
371
|
-
/**
|
372
|
-
* Fires each time the user click the element.
|
373
|
-
* @category Events
|
374
|
-
*/
|
375
|
-
class AXItemClickEvent extends AXClickEvent {
|
376
|
-
}
|
377
|
-
/**
|
378
|
-
* Fires each time the component gets focused.
|
379
|
-
* @category Events
|
380
|
-
*/
|
381
|
-
class AXFocusEvent extends AXHtmlEvent {
|
382
|
-
}
|
383
|
-
/**
|
384
|
-
* Fires each time an item or multiple items selected by the user or value.
|
385
|
-
* @category Events
|
386
|
-
*/
|
387
|
-
class AXSelectionValueChangedEvent extends AXValueChangedEvent {
|
388
|
-
constructor() {
|
389
|
-
super(...arguments);
|
390
|
-
this.value = null;
|
391
|
-
this.oldValue = null;
|
392
|
-
this.selectedKeys = [];
|
393
|
-
this.selectedItems = [];
|
352
|
+
get id() {
|
353
|
+
return this._id;
|
394
354
|
}
|
395
|
-
|
396
|
-
|
397
|
-
* Contains range start & end values
|
398
|
-
* @category Events
|
399
|
-
*/
|
400
|
-
class AXRangeChangedEvent extends AXEvent {
|
401
|
-
}
|
402
|
-
|
403
|
-
const TAB_META_KEY = '__meta__';
|
404
|
-
class AXComponentCloseEvent extends AXEvent {
|
405
|
-
}
|
406
|
-
class AXComponentClosing {
|
407
|
-
constructor() {
|
408
|
-
this.cancel = false;
|
355
|
+
set id(v) {
|
356
|
+
this._id = v;
|
409
357
|
}
|
410
|
-
|
411
|
-
|
412
|
-
}
|
413
|
-
/**
|
414
|
-
* Defines a CSS class—or multiple classes separated by spaces— which are applied to a span element inside the Button. Allows the usage of custom icons after the primary text.
|
415
|
-
*/
|
416
|
-
class AXComponentClosedPromise extends Promise {
|
417
|
-
constructor(executor) {
|
418
|
-
super(executor);
|
358
|
+
get cdr() {
|
359
|
+
return this._cdr;
|
419
360
|
}
|
420
|
-
|
421
|
-
|
422
|
-
|
361
|
+
getHostElement() {
|
362
|
+
return this._elementRef?.nativeElement;
|
363
|
+
}
|
364
|
+
getViewContainer() {
|
365
|
+
return this._viewRef;
|
366
|
+
}
|
367
|
+
internalOptionChanging(option) {
|
368
|
+
return option?.value;
|
369
|
+
}
|
370
|
+
internalOptionChanged(option) { }
|
371
|
+
/**
|
372
|
+
* @ignore
|
373
|
+
*/
|
374
|
+
ngOnInit() {
|
375
|
+
this.getHostElement().__axContext__ = this;
|
376
|
+
}
|
377
|
+
setOption(option) {
|
378
|
+
const oldValue = this[option.name];
|
379
|
+
let newValue = this.internalOptionChanging({
|
380
|
+
name: option.name,
|
381
|
+
value: option.value,
|
382
|
+
});
|
383
|
+
if (option.beforeCallback) {
|
384
|
+
newValue = option.beforeCallback(oldValue, newValue);
|
385
|
+
}
|
386
|
+
//TODO : check real changes if value is object
|
387
|
+
if (oldValue != newValue) {
|
388
|
+
this[`_${option.name}`] = option.value;
|
389
|
+
this.onOptionChanged.emit({
|
390
|
+
component: this,
|
391
|
+
name: option.name,
|
392
|
+
newValue,
|
393
|
+
oldValue,
|
394
|
+
});
|
395
|
+
const emitter = this[`${option.name}Change`];
|
396
|
+
emitter?.emit(newValue);
|
397
|
+
this.internalOptionChanged({ name: option.name, value: newValue });
|
423
398
|
}
|
399
|
+
if (option.afterCallback)
|
400
|
+
option.afterCallback(oldValue, newValue);
|
424
401
|
}
|
402
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
403
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXBaseComponent }); }
|
425
404
|
}
|
426
|
-
|
427
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
428
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXComponent }); }
|
429
|
-
}
|
430
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXComponent, decorators: [{
|
431
|
-
type: Injectable
|
432
|
-
}] });
|
433
|
-
class AXClosbaleComponent extends AXComponent {
|
434
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXClosbaleComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
435
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXClosbaleComponent }); }
|
436
|
-
}
|
437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXClosbaleComponent, decorators: [{
|
438
|
-
type: Injectable
|
439
|
-
}] });
|
440
|
-
class AXClearableComponent extends AXComponent {
|
441
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXClearableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
442
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXClearableComponent }); }
|
443
|
-
}
|
444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXClearableComponent, decorators: [{
|
445
|
-
type: Injectable
|
446
|
-
}] });
|
447
|
-
class AXSearchableComponent extends AXComponent {
|
448
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXSearchableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
449
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXSearchableComponent }); }
|
450
|
-
}
|
451
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXSearchableComponent, decorators: [{
|
452
|
-
type: Injectable
|
453
|
-
}] });
|
454
|
-
class AXValuableComponent extends AXComponent {
|
455
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXValuableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
456
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXValuableComponent }); }
|
457
|
-
}
|
458
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXValuableComponent, decorators: [{
|
459
|
-
type: Injectable
|
460
|
-
}] });
|
461
|
-
class AXFocusableComponent extends AXComponent {
|
462
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXFocusableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
463
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXFocusableComponent }); }
|
464
|
-
}
|
465
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXFocusableComponent, decorators: [{
|
466
|
-
type: Injectable
|
467
|
-
}] });
|
468
|
-
class AXPagedComponent extends AXComponent {
|
469
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXPagedComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
470
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXPagedComponent }); }
|
471
|
-
}
|
472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXPagedComponent, decorators: [{
|
405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXBaseComponent, decorators: [{
|
473
406
|
type: Injectable
|
474
407
|
}] });
|
475
408
|
|
476
|
-
class
|
477
|
-
|
478
|
-
|
409
|
+
class MXInteractiveComponent extends MXBaseComponent {
|
410
|
+
constructor() {
|
411
|
+
super(...arguments);
|
412
|
+
/**
|
413
|
+
* @ignore
|
414
|
+
*/
|
415
|
+
this.onTouchedCallback = noop;
|
416
|
+
this._touched = false;
|
417
|
+
/**
|
418
|
+
* Emits an event whenever the disabled state of the component changes.
|
419
|
+
*
|
420
|
+
* @event
|
421
|
+
*/
|
422
|
+
this.disabledChange = new EventEmitter();
|
423
|
+
this._tabIndex = 0;
|
424
|
+
/**
|
425
|
+
* Fires each time the component gets focused.
|
426
|
+
* @event
|
427
|
+
*/
|
428
|
+
this.onFocus = new EventEmitter();
|
429
|
+
/**
|
430
|
+
* Fires each time the component gets blurred.
|
431
|
+
* @event
|
432
|
+
*/
|
433
|
+
this.onBlur = new EventEmitter();
|
434
|
+
// private _focused = signal(false);
|
435
|
+
// protected markAsFocused() {
|
436
|
+
// this._focused.set(true);
|
437
|
+
// }
|
438
|
+
// protected markAsBlured() {
|
439
|
+
// this._focused.set(false);
|
440
|
+
// }
|
441
|
+
}
|
442
|
+
registerOnTouched(fn) {
|
443
|
+
this.onTouchedCallback = fn;
|
479
444
|
}
|
480
445
|
/**
|
481
|
-
*
|
446
|
+
* Indicates whether the component has been touched.
|
447
|
+
*
|
482
448
|
*/
|
483
|
-
|
484
|
-
|
485
|
-
this.config = config;
|
486
|
-
this.debounceTime = 0;
|
487
|
-
this.subscription = new Subscription();
|
488
|
-
this._range = { start: 0, end: 0 };
|
489
|
-
this.source = config.source;
|
490
|
-
if (config.debounceTime)
|
491
|
-
this.debounceTime = config.debounceTime;
|
492
|
-
//
|
493
|
-
this.dataStream = new BehaviorSubject(this.config.source.cachedItems);
|
494
|
-
this.source.onChanged.subscribe((data) => {
|
495
|
-
this.dataStream.next(data.cachedItems);
|
496
|
-
});
|
449
|
+
get touched() {
|
450
|
+
return this._touched;
|
497
451
|
}
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
this.
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
452
|
+
/**
|
453
|
+
* @ignore
|
454
|
+
*/
|
455
|
+
markAsTouched() {
|
456
|
+
if (!this.touched) {
|
457
|
+
this.onTouchedCallback();
|
458
|
+
this._touched = true;
|
459
|
+
}
|
460
|
+
}
|
461
|
+
/**
|
462
|
+
* If set to true, it disables the component.
|
463
|
+
*/
|
464
|
+
get disabled() {
|
465
|
+
return this._disabled;
|
466
|
+
}
|
467
|
+
set disabled(value) {
|
468
|
+
value = coerceBooleanProperty(value);
|
469
|
+
this.setOption({
|
470
|
+
name: 'disabled',
|
471
|
+
value,
|
472
|
+
afterCallback: () => {
|
473
|
+
this.cdr.markForCheck();
|
474
|
+
},
|
475
|
+
});
|
476
|
+
}
|
477
|
+
setDisabledState(isDisabled) {
|
478
|
+
this.disabled = isDisabled;
|
479
|
+
}
|
480
|
+
/**
|
481
|
+
* Specifies the tabindex of the component.
|
482
|
+
*/
|
483
|
+
get tabIndex() {
|
484
|
+
return this.disabled ? -1 : this._tabIndex;
|
485
|
+
}
|
486
|
+
set tabIndex(value) {
|
487
|
+
this.setOption({
|
488
|
+
name: 'tabIndex',
|
489
|
+
value: value != null ? coerceNumberProperty(value) : 0,
|
490
|
+
});
|
491
|
+
}
|
492
|
+
emitOnFocusEvent(e) {
|
493
|
+
this.onFocus.emit({
|
494
|
+
component: this,
|
495
|
+
htmlElement: this.getHostElement(),
|
496
|
+
nativeEvent: e,
|
497
|
+
});
|
498
|
+
}
|
499
|
+
emitOnBlurEvent(e) {
|
500
|
+
this.markAsTouched();
|
501
|
+
this.onBlur.emit({
|
502
|
+
component: this,
|
503
|
+
htmlElement: this.getHostElement(),
|
504
|
+
nativeEvent: e,
|
505
|
+
});
|
506
|
+
}
|
507
|
+
// /**
|
508
|
+
// * Fires each time the user clicks the button.
|
509
|
+
// * @event
|
510
|
+
// */
|
511
|
+
// onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();
|
512
|
+
// protected emitOnClickEvent(e: MouseEvent): void {
|
513
|
+
// this.onClick.emit({
|
514
|
+
// component: this,
|
515
|
+
// htmlElement: this.getHostElement(),
|
516
|
+
// nativeEvent: e,
|
517
|
+
// });
|
518
|
+
// }
|
519
|
+
focus() {
|
520
|
+
AXHtmlUtil.focusElement(this.getHostElement());
|
521
|
+
}
|
522
|
+
blur() {
|
523
|
+
AXHtmlUtil.blurElement(this.getHostElement());
|
524
|
+
}
|
525
|
+
/**
|
526
|
+
* Check component is focused or has any focused element.
|
527
|
+
*/
|
528
|
+
hasFocus() {
|
529
|
+
return AXHtmlUtil.hasFocus(this.getHostElement());
|
530
|
+
}
|
531
|
+
}
|
532
|
+
|
533
|
+
class MXValueComponent extends MXInteractiveComponent {
|
534
|
+
constructor() {
|
535
|
+
super(...arguments);
|
536
|
+
/**
|
537
|
+
* Fires each time the user press a key.
|
538
|
+
* @event
|
539
|
+
*/
|
540
|
+
this.onValueChanged = new EventEmitter();
|
541
|
+
/**
|
542
|
+
* @deprecated The event should not be used, use ngModelChange instead
|
543
|
+
*/
|
544
|
+
this.valueChange = new EventEmitter();
|
545
|
+
this.readonlyChange = new EventEmitter();
|
546
|
+
this._readonly = false;
|
547
|
+
this._dirty = false;
|
548
|
+
this._isUserInteraction = false;
|
549
|
+
this.stateChange = new EventEmitter();
|
550
|
+
this._state = 'clear';
|
551
|
+
this.document = inject(DOCUMENT);
|
552
|
+
this.platformID = inject(PLATFORM_ID);
|
553
|
+
this.validationService = inject(AXValidationService);
|
554
|
+
this.validationRulesChange = new EventEmitter();
|
555
|
+
this.validationRules = [];
|
556
|
+
this.onChangeCallback = noop;
|
557
|
+
}
|
558
|
+
/**
|
559
|
+
* If set to true, user cannot change the value of component.
|
560
|
+
*/
|
561
|
+
get readonly() {
|
562
|
+
return this._readonly;
|
563
|
+
}
|
564
|
+
set readonly(value) {
|
565
|
+
value = coerceBooleanProperty(value);
|
566
|
+
this.setOption({
|
567
|
+
name: 'readonly',
|
568
|
+
value,
|
569
|
+
afterCallback: () => {
|
570
|
+
this.cdr.markForCheck();
|
571
|
+
},
|
572
|
+
});
|
573
|
+
}
|
574
|
+
get name() {
|
575
|
+
return this._name;
|
576
|
+
}
|
577
|
+
set name(value) {
|
578
|
+
this._name = value;
|
579
|
+
}
|
580
|
+
get dirty() {
|
581
|
+
return this._dirty;
|
582
|
+
}
|
583
|
+
markAsDirty() {
|
584
|
+
this._dirty = true;
|
585
|
+
}
|
586
|
+
/**
|
587
|
+
* @deprecated The property should not be used, use ngModel instead
|
588
|
+
*/
|
589
|
+
get value() {
|
590
|
+
return this.internalGetValue(this._value) ?? this.defaultValue;
|
591
|
+
}
|
592
|
+
set value(v) {
|
593
|
+
v = this.internalSetValue(v);
|
594
|
+
const old = cloneDeep(this.value);
|
595
|
+
if (v === null || v === undefined || v === '' || (Array.isArray(v) && v.length === 0)) {
|
596
|
+
this.setState('clear');
|
597
|
+
if (old === null || old === undefined || old === '' || (Array.isArray(old) && old.length === 0)) {
|
598
|
+
return;
|
599
|
+
}
|
600
|
+
}
|
601
|
+
if (!isEqual(old, v)) {
|
602
|
+
this._value = v;
|
603
|
+
this.emitOnValueChangedEvent(old, this.value);
|
604
|
+
this.internalValueChanged(this.value);
|
605
|
+
}
|
606
|
+
}
|
607
|
+
get state() {
|
608
|
+
return this._state;
|
609
|
+
}
|
610
|
+
set state(value) {
|
611
|
+
this.setState(value);
|
612
|
+
this.stateChange.emit(value);
|
613
|
+
}
|
614
|
+
emitOnValueChangedEvent(oldValue, newValue) {
|
615
|
+
this.valueChange.emit(newValue);
|
616
|
+
this.onValueChanged.emit({
|
617
|
+
component: this,
|
618
|
+
value: newValue,
|
619
|
+
oldValue: oldValue,
|
620
|
+
name: this.name,
|
621
|
+
isUserInteraction: this._isUserInteraction,
|
622
|
+
});
|
623
|
+
this.onChangeCallback(newValue);
|
624
|
+
this.cdr.markForCheck();
|
625
|
+
this._isUserInteraction = false;
|
626
|
+
}
|
627
|
+
internalSetValue(value) {
|
628
|
+
return value;
|
629
|
+
}
|
630
|
+
internalGetValue(value) {
|
631
|
+
return value;
|
632
|
+
}
|
633
|
+
internalValueChanged(value) { }
|
634
|
+
ngOnInit() {
|
635
|
+
super.ngOnInit();
|
636
|
+
//
|
637
|
+
this.registerValidation();
|
638
|
+
}
|
639
|
+
ngOnDestroy() {
|
640
|
+
this.onValueChanged?.unsubscribe();
|
641
|
+
this.onOptionChanged?.unsubscribe();
|
642
|
+
}
|
643
|
+
registerValidation() {
|
644
|
+
const a = this.getHostElement().querySelectorAll('[ax-form-item="true"]');
|
645
|
+
a.forEach((c) => {
|
646
|
+
c.removeAttribute('ax-form-item');
|
647
|
+
});
|
648
|
+
this.getHostElement().setAttribute('ax-form-item', 'true');
|
649
|
+
}
|
650
|
+
get isRequired() {
|
651
|
+
return this.validationRules?.some((c) => c.rule == 'required');
|
652
|
+
}
|
653
|
+
addValidationRule(rule) {
|
654
|
+
this.validationRules.push(rule);
|
655
|
+
this.validationRulesChange.emit(this.validationRules);
|
656
|
+
}
|
657
|
+
removeValidationRule(rule) {
|
658
|
+
this.validationRules = this.validationRules.filter((r) => r.rule !== rule.rule || !isEqual(r.options, rule.options));
|
659
|
+
this.validationRulesChange.emit(this.validationRules);
|
660
|
+
}
|
661
|
+
async validate() {
|
662
|
+
const container_classes = ['ax-editor-container', 'ax-checkbox', 'ax-radio'];
|
663
|
+
const container = container_classes.some((c) => this.getHostElement().classList.contains(c))
|
664
|
+
? this.getHostElement()
|
665
|
+
: this.getHostElement().querySelector('.ax-editor-container');
|
666
|
+
const formField = container?.closest('ax-form-field') || container?.closest('ax-checkbox');
|
667
|
+
const label = formField?.querySelector('ax-label') || formField?.querySelector('label');
|
668
|
+
//
|
669
|
+
const rules = this.validationService.ruleFor(this.value);
|
670
|
+
this.validationRules.forEach((r) => {
|
671
|
+
r.options['title'] = (label?.firstChild?.textContent ?? this.name)?.replace('*', '').trim();
|
672
|
+
rules.addRule(r.rule, r.options);
|
673
|
+
});
|
674
|
+
const result = await rules.validate();
|
675
|
+
if (result.result) {
|
676
|
+
this.setState('clear');
|
677
|
+
}
|
678
|
+
else {
|
679
|
+
const message = result.rules.find((c) => !c.result).message;
|
680
|
+
this.setState('error', message);
|
681
|
+
}
|
682
|
+
return result;
|
683
|
+
}
|
684
|
+
setState(state, ...args) {
|
685
|
+
//TODO: find a better solution
|
686
|
+
if (isBrowser()) {
|
687
|
+
const container = this.getHostElement().classList.contains('ax-editor-container')
|
688
|
+
? this.getHostElement()
|
689
|
+
: this.getHostElement().querySelector('.ax-editor-container');
|
690
|
+
const formField = container?.closest('ax-form-field');
|
691
|
+
const label = formField?.querySelector('ax-label') || formField?.querySelector('label');
|
692
|
+
let target = container || this.getHostElement().firstElementChild;
|
693
|
+
if (target?.querySelector('.ax-error-container')) {
|
694
|
+
target = target.querySelector('.ax-error-container');
|
695
|
+
}
|
696
|
+
const parent = target?.parentElement;
|
697
|
+
if (!target || !parent)
|
698
|
+
return;
|
699
|
+
switch (state) {
|
700
|
+
case 'clear':
|
701
|
+
this._state = 'clear';
|
702
|
+
if (parent.querySelector('span.ax-error-message')) {
|
703
|
+
parent.removeChild(parent.querySelector('span.ax-error-message'));
|
704
|
+
}
|
705
|
+
label?.classList.remove('ax-state-error');
|
706
|
+
target.classList.remove('ax-state-error', 'ax-state-success');
|
707
|
+
break;
|
708
|
+
case 'success':
|
709
|
+
this.setState('clear');
|
710
|
+
target.classList.add('ax-state-success');
|
711
|
+
this._state = 'success';
|
712
|
+
break;
|
713
|
+
case 'error':
|
714
|
+
this.setState('clear');
|
715
|
+
if (args[0] && isPlatformBrowser(this.platformID)) {
|
716
|
+
const span = this.document.createElement('span');
|
717
|
+
span.innerHTML = args[0];
|
718
|
+
span.classList.add('ax-error-message');
|
719
|
+
parent.appendChild(span);
|
720
|
+
}
|
721
|
+
label?.classList.add('ax-state-error');
|
722
|
+
target.classList.add('ax-state-error');
|
723
|
+
this._state = 'error';
|
724
|
+
break;
|
725
|
+
}
|
726
|
+
this.cdr.markForCheck();
|
727
|
+
}
|
728
|
+
}
|
729
|
+
registerOnChange(fn) {
|
730
|
+
this.onChangeCallback = fn;
|
731
|
+
}
|
732
|
+
writeValue(value) {
|
733
|
+
this.value = value;
|
734
|
+
}
|
735
|
+
commitValue(value, u = false) {
|
736
|
+
if (u) {
|
737
|
+
this.markAsTouched();
|
738
|
+
this.markAsDirty();
|
739
|
+
this._isUserInteraction = true;
|
740
|
+
}
|
741
|
+
this.writeValue(value);
|
742
|
+
}
|
743
|
+
reset(e = false) {
|
744
|
+
this.commitValue(null, e);
|
745
|
+
}
|
746
|
+
resetErrors() {
|
747
|
+
this.setState('clear');
|
748
|
+
}
|
749
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXValueComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
750
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXValueComponent }); }
|
751
|
+
}
|
752
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXValueComponent, decorators: [{
|
753
|
+
type: Injectable
|
754
|
+
}] });
|
755
|
+
|
756
|
+
/**
|
757
|
+
* Contains native event
|
758
|
+
* @category Events
|
759
|
+
*/
|
760
|
+
class AXEvent {
|
761
|
+
constructor() {
|
762
|
+
this.isUserInteraction = false;
|
763
|
+
}
|
764
|
+
}
|
765
|
+
/**
|
766
|
+
* Contains native event
|
767
|
+
* @category Events
|
768
|
+
*/
|
769
|
+
class AXHtmlEvent extends AXEvent {
|
770
|
+
}
|
771
|
+
/**
|
772
|
+
* Contains native event
|
773
|
+
* @category Events
|
774
|
+
*/
|
775
|
+
class AXValueChangedEvent extends AXEvent {
|
776
|
+
}
|
777
|
+
/**
|
778
|
+
* Contains native event
|
779
|
+
* @category Events
|
780
|
+
*/
|
781
|
+
class AXOptionChangedEvent extends AXEvent {
|
782
|
+
}
|
783
|
+
/**
|
784
|
+
* Fires each time the user click the element.
|
785
|
+
* @category Events
|
786
|
+
*/
|
787
|
+
class AXClickEvent extends AXHtmlEvent {
|
788
|
+
constructor() {
|
789
|
+
super(...arguments);
|
790
|
+
/**
|
791
|
+
* uses for extra data
|
792
|
+
*/
|
793
|
+
this.data = null;
|
794
|
+
this.nativeEvent = null;
|
795
|
+
}
|
796
|
+
}
|
797
|
+
/**
|
798
|
+
* Fires each time the user click the element.
|
799
|
+
* @category Events
|
800
|
+
*/
|
801
|
+
class AXButtonClickEvent extends AXClickEvent {
|
802
|
+
}
|
803
|
+
/**
|
804
|
+
* Fires each time the user click the element.
|
805
|
+
* @category Events
|
806
|
+
*/
|
807
|
+
class AXItemClickEvent extends AXClickEvent {
|
808
|
+
}
|
809
|
+
/**
|
810
|
+
* Fires each time the component gets focused.
|
811
|
+
* @category Events
|
812
|
+
*/
|
813
|
+
class AXFocusEvent extends AXHtmlEvent {
|
814
|
+
}
|
815
|
+
/**
|
816
|
+
* Fires each time an item or multiple items selected by the user or value.
|
817
|
+
* @category Events
|
818
|
+
*/
|
819
|
+
class AXSelectionValueChangedEvent extends AXValueChangedEvent {
|
820
|
+
constructor() {
|
821
|
+
super(...arguments);
|
822
|
+
this.value = null;
|
823
|
+
this.oldValue = null;
|
824
|
+
this.selectedKeys = [];
|
825
|
+
this.selectedItems = [];
|
826
|
+
}
|
827
|
+
}
|
828
|
+
/**
|
829
|
+
* Contains range start & end values
|
830
|
+
* @category Events
|
831
|
+
*/
|
832
|
+
class AXRangeChangedEvent extends AXEvent {
|
833
|
+
}
|
834
|
+
|
835
|
+
const TAB_META_KEY = '__meta__';
|
836
|
+
class AXComponentCloseEvent extends AXEvent {
|
837
|
+
}
|
838
|
+
class AXComponentClosing {
|
839
|
+
constructor() {
|
840
|
+
this.cancel = false;
|
841
|
+
}
|
842
|
+
}
|
843
|
+
class AXComponentResult {
|
844
|
+
}
|
845
|
+
/**
|
846
|
+
* Defines a CSS class—or multiple classes separated by spaces— which are applied to a span element inside the Button. Allows the usage of custom icons after the primary text.
|
847
|
+
*/
|
848
|
+
class AXComponentClosedPromise extends Promise {
|
849
|
+
constructor(executor) {
|
850
|
+
super(executor);
|
851
|
+
}
|
852
|
+
close() {
|
853
|
+
if (this.closeMethod) {
|
854
|
+
this.closeMethod();
|
855
|
+
}
|
856
|
+
}
|
857
|
+
}
|
858
|
+
class AXComponent {
|
859
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
860
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXComponent }); }
|
861
|
+
}
|
862
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXComponent, decorators: [{
|
863
|
+
type: Injectable
|
864
|
+
}] });
|
865
|
+
class AXClosbaleComponent extends AXComponent {
|
866
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXClosbaleComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
867
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXClosbaleComponent }); }
|
868
|
+
}
|
869
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXClosbaleComponent, decorators: [{
|
870
|
+
type: Injectable
|
871
|
+
}] });
|
872
|
+
class AXClearableComponent extends AXComponent {
|
873
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXClearableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
874
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXClearableComponent }); }
|
875
|
+
}
|
876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXClearableComponent, decorators: [{
|
877
|
+
type: Injectable
|
878
|
+
}] });
|
879
|
+
class AXSearchableComponent extends AXComponent {
|
880
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXSearchableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
881
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXSearchableComponent }); }
|
882
|
+
}
|
883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXSearchableComponent, decorators: [{
|
884
|
+
type: Injectable
|
885
|
+
}] });
|
886
|
+
class AXValuableComponent extends AXComponent {
|
887
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValuableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
888
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValuableComponent }); }
|
889
|
+
}
|
890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValuableComponent, decorators: [{
|
891
|
+
type: Injectable
|
892
|
+
}] });
|
893
|
+
class AXFocusableComponent extends AXComponent {
|
894
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXFocusableComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
895
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXFocusableComponent }); }
|
896
|
+
}
|
897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXFocusableComponent, decorators: [{
|
898
|
+
type: Injectable
|
899
|
+
}] });
|
900
|
+
class AXPagedComponent extends AXComponent {
|
901
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXPagedComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
902
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXPagedComponent }); }
|
903
|
+
}
|
904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXPagedComponent, decorators: [{
|
905
|
+
type: Injectable
|
906
|
+
}] });
|
907
|
+
class AXAutocompleteParentComponent extends MXValueComponent {
|
908
|
+
constructor() {
|
909
|
+
super(...arguments);
|
910
|
+
this.oldInputValue = '';
|
911
|
+
this.onKeyDown = new EventEmitter();
|
912
|
+
this.onInputValueEmit = new EventEmitter();
|
913
|
+
this.onInputValueChanged = new EventEmitter();
|
914
|
+
}
|
915
|
+
handleInputValueChanged(value, isUserInteraction = false) {
|
916
|
+
if (value === this.oldInputValue)
|
917
|
+
return;
|
918
|
+
this.onInputValueChanged.emit({
|
919
|
+
value,
|
920
|
+
name: this.name,
|
921
|
+
component: this,
|
922
|
+
isUserInteraction,
|
923
|
+
oldValue: this.oldInputValue,
|
924
|
+
htmlElement: this.getHostElement(),
|
925
|
+
});
|
926
|
+
this.oldInputValue = value;
|
927
|
+
}
|
928
|
+
handleInputValueEmit(value, isUserInteraction = false) {
|
929
|
+
if (value === this.oldInputValue)
|
930
|
+
return;
|
931
|
+
this.onInputValueEmit.emit({
|
932
|
+
value,
|
933
|
+
name: this.name,
|
934
|
+
component: this,
|
935
|
+
isUserInteraction,
|
936
|
+
oldValue: this.oldInputValue,
|
937
|
+
htmlElement: this.getHostElement(),
|
938
|
+
});
|
939
|
+
this.oldInputValue = value;
|
940
|
+
}
|
941
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXAutocompleteParentComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
942
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXAutocompleteParentComponent }); }
|
943
|
+
}
|
944
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXAutocompleteParentComponent, decorators: [{
|
945
|
+
type: Injectable
|
946
|
+
}] });
|
947
|
+
|
948
|
+
class AXListDataSource extends DataSource {
|
949
|
+
get range() {
|
950
|
+
return this._range;
|
951
|
+
}
|
952
|
+
/**
|
953
|
+
* @ignore
|
954
|
+
*/
|
955
|
+
constructor(config) {
|
956
|
+
super();
|
957
|
+
this.config = config;
|
958
|
+
this.debounceTime = 0;
|
959
|
+
this.subscription = new Subscription();
|
960
|
+
this._range = { start: 0, end: 0 };
|
961
|
+
this.source = config.source;
|
962
|
+
if (config.debounceTime)
|
963
|
+
this.debounceTime = config.debounceTime;
|
964
|
+
//
|
965
|
+
this.dataStream = new BehaviorSubject(this.config.source.cachedItems);
|
966
|
+
this.source.onChanged.subscribe((data) => {
|
967
|
+
this.dataStream.next(data.cachedItems);
|
968
|
+
});
|
969
|
+
}
|
970
|
+
connect(collectionViewer) {
|
971
|
+
this.subscription.add(collectionViewer.viewChange
|
972
|
+
.pipe(debounceTime(this.debounceTime))
|
973
|
+
.pipe(distinctUntilChanged())
|
974
|
+
.subscribe((range) => {
|
975
|
+
this._range = range;
|
976
|
+
const startPage = this.getPageForIndex(range.start);
|
977
|
+
const endPage = this.getPageForIndex(range.end - 1);
|
978
|
+
for (let i = startPage; i <= endPage; i++) {
|
979
|
+
this.source.setPage(i);
|
980
|
+
}
|
509
981
|
}));
|
510
982
|
return this.dataStream;
|
511
983
|
}
|
@@ -712,10 +1184,10 @@ class AXAutoFocusDirective {
|
|
712
1184
|
}, this.time);
|
713
1185
|
}
|
714
1186
|
}
|
715
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
716
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.
|
1187
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXAutoFocusDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: AXFocusableComponent, host: true, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
1188
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: AXAutoFocusDirective, isStandalone: true, selector: "[axAutoFocus]", inputs: { autoFocus: ["axAutoFocus", "autoFocus"], time: ["axAutoFocusTime", "time"] }, ngImport: i0 }); }
|
717
1189
|
}
|
718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXAutoFocusDirective, decorators: [{
|
719
1191
|
type: Directive,
|
720
1192
|
args: [{ selector: '[axAutoFocus]' }]
|
721
1193
|
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: AXFocusableComponent, decorators: [{
|
@@ -768,10 +1240,10 @@ class AXHotkeysService {
|
|
768
1240
|
}
|
769
1241
|
});
|
770
1242
|
}
|
771
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
772
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.
|
1243
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXHotkeysService, deps: [{ token: i1.EventManager }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1244
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXHotkeysService }); }
|
773
1245
|
}
|
774
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXHotkeysService, decorators: [{
|
775
1247
|
type: Injectable
|
776
1248
|
}], ctorParameters: () => [{ type: i1.EventManager }, { type: Document, decorators: [{
|
777
1249
|
type: Inject,
|
@@ -834,10 +1306,10 @@ class AXHotkeyDirective {
|
|
834
1306
|
s.unsubscribe();
|
835
1307
|
});
|
836
1308
|
}
|
837
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
838
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.
|
1309
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXHotkeyDirective, deps: [{ token: i0.ElementRef }, { token: AXComponent, host: true, optional: true, self: true }, { token: AXHotkeysService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
1310
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: AXHotkeyDirective, isStandalone: true, selector: "[axHotkey]", inputs: { axHotkey: "axHotkey" }, ngImport: i0 }); }
|
839
1311
|
}
|
840
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXHotkeyDirective, decorators: [{
|
841
1313
|
type: Directive,
|
842
1314
|
args: [{ selector: '[axHotkey]' }]
|
843
1315
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: AXComponent, decorators: [{
|
@@ -890,10 +1362,10 @@ class AXInfiniteScrollerDirective {
|
|
890
1362
|
return this.scrollCallback();
|
891
1363
|
}));
|
892
1364
|
}
|
893
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
894
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.
|
1365
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXInfiniteScrollerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
1366
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: AXInfiniteScrollerDirective, isStandalone: true, selector: "[axInfiniteScroller]", inputs: { scrollCallback: "scrollCallback", immediateCallback: "immediateCallback", scrollPercent: "scrollPercent" }, ngImport: i0 }); }
|
895
1367
|
}
|
896
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXInfiniteScrollerDirective, decorators: [{
|
897
1369
|
type: Directive,
|
898
1370
|
args: [{ selector: '[axInfiniteScroller]' }]
|
899
1371
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { scrollCallback: [{
|
@@ -931,20 +1403,20 @@ class AXResponsiveDirective {
|
|
931
1403
|
this._observer?.disconnect();
|
932
1404
|
this._observer?.unobserve(this._elementRef.nativeElement);
|
933
1405
|
}
|
934
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
935
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.
|
1406
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXResponsiveDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
1407
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: AXResponsiveDirective, isStandalone: true, selector: "[axResponsive]", ngImport: i0 }); }
|
936
1408
|
}
|
937
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXResponsiveDirective, decorators: [{
|
938
1410
|
type: Directive,
|
939
1411
|
args: [{ selector: '[axResponsive]' }]
|
940
1412
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
941
1413
|
|
942
1414
|
class AXCommonModule {
|
943
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
944
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.
|
945
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.
|
1415
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1416
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: AXCommonModule, imports: [AXResponsiveDirective, AXInfiniteScrollerDirective, AXAutoFocusDirective, AXHotkeyDirective], exports: [AXResponsiveDirective, AXInfiniteScrollerDirective, AXAutoFocusDirective, AXHotkeyDirective] }); }
|
1417
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXCommonModule, providers: [AXHotkeysService] }); }
|
946
1418
|
}
|
947
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXCommonModule, decorators: [{
|
948
1420
|
type: NgModule,
|
949
1421
|
args: [{
|
950
1422
|
imports: [AXResponsiveDirective, AXInfiniteScrollerDirective, AXAutoFocusDirective, AXHotkeyDirective],
|
@@ -953,91 +1425,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
953
1425
|
}]
|
954
1426
|
}] });
|
955
1427
|
|
956
|
-
class AXDomService {
|
957
|
-
generateElementId() {
|
958
|
-
const dateString = Date.now().toString(36);
|
959
|
-
const randomness = Math.random().toString(36).substr(2);
|
960
|
-
return dateString + randomness;
|
961
|
-
}
|
962
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXDomService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
963
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXDomService, providedIn: 'root' }); }
|
964
|
-
}
|
965
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AXDomService, decorators: [{
|
966
|
-
type: Injectable,
|
967
|
-
args: [{ providedIn: 'root' }]
|
968
|
-
}] });
|
969
|
-
|
970
|
-
class MXBaseComponent {
|
971
|
-
constructor() {
|
972
|
-
this._cdr = inject(ChangeDetectorRef);
|
973
|
-
this._elementRef = inject(ElementRef);
|
974
|
-
this._viewRef = inject(ViewContainerRef);
|
975
|
-
this._domService = inject(AXDomService);
|
976
|
-
this._id = this._domService.generateElementId();
|
977
|
-
/**
|
978
|
-
* Fired when an option related to the component changes.
|
979
|
-
*
|
980
|
-
* @event
|
981
|
-
*/
|
982
|
-
this.onOptionChanged = new EventEmitter();
|
983
|
-
}
|
984
|
-
get id() {
|
985
|
-
return this._id;
|
986
|
-
}
|
987
|
-
set id(v) {
|
988
|
-
this._id = v;
|
989
|
-
}
|
990
|
-
get cdr() {
|
991
|
-
return this._cdr;
|
992
|
-
}
|
993
|
-
getHostElement() {
|
994
|
-
return this._elementRef?.nativeElement;
|
995
|
-
}
|
996
|
-
getViewContainer() {
|
997
|
-
return this._viewRef;
|
998
|
-
}
|
999
|
-
internalOptionChanging(option) {
|
1000
|
-
return option?.value;
|
1001
|
-
}
|
1002
|
-
internalOptionChanged(option) { }
|
1003
|
-
/**
|
1004
|
-
* @ignore
|
1005
|
-
*/
|
1006
|
-
ngOnInit() {
|
1007
|
-
this.getHostElement().__axContext__ = this;
|
1008
|
-
}
|
1009
|
-
setOption(option) {
|
1010
|
-
const oldValue = this[option.name];
|
1011
|
-
let newValue = this.internalOptionChanging({
|
1012
|
-
name: option.name,
|
1013
|
-
value: option.value,
|
1014
|
-
});
|
1015
|
-
if (option.beforeCallback) {
|
1016
|
-
newValue = option.beforeCallback(oldValue, newValue);
|
1017
|
-
}
|
1018
|
-
//TODO : check real changes if value is object
|
1019
|
-
if (oldValue != newValue) {
|
1020
|
-
this[`_${option.name}`] = option.value;
|
1021
|
-
this.onOptionChanged.emit({
|
1022
|
-
component: this,
|
1023
|
-
name: option.name,
|
1024
|
-
newValue,
|
1025
|
-
oldValue,
|
1026
|
-
});
|
1027
|
-
const emitter = this[`${option.name}Change`];
|
1028
|
-
emitter?.emit(newValue);
|
1029
|
-
this.internalOptionChanged({ name: option.name, value: newValue });
|
1030
|
-
}
|
1031
|
-
if (option.afterCallback)
|
1032
|
-
option.afterCallback(oldValue, newValue);
|
1033
|
-
}
|
1034
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MXBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1035
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MXBaseComponent }); }
|
1036
|
-
}
|
1037
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MXBaseComponent, decorators: [{
|
1038
|
-
type: Injectable
|
1039
|
-
}] });
|
1040
|
-
|
1041
1428
|
class MXColorComponent extends MXBaseComponent {
|
1042
1429
|
constructor() {
|
1043
1430
|
super(...arguments);
|
@@ -1052,172 +1439,48 @@ class MXColorComponent extends MXBaseComponent {
|
|
1052
1439
|
}
|
1053
1440
|
set color(value) {
|
1054
1441
|
this.setOption({
|
1055
|
-
name: 'color',
|
1056
|
-
value,
|
1057
|
-
afterCallback: () => {
|
1058
|
-
this.cdr.markForCheck();
|
1059
|
-
},
|
1060
|
-
});
|
1061
|
-
}
|
1062
|
-
}
|
1063
|
-
|
1064
|
-
class MXLookableComponent {
|
1065
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MXLookableComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1066
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MXLookableComponent }); }
|
1067
|
-
}
|
1068
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MXLookableComponent, decorators: [{
|
1069
|
-
type: Injectable
|
1070
|
-
}] });
|
1071
|
-
class MXLookComponent extends MXBaseComponent {
|
1072
|
-
constructor() {
|
1073
|
-
super(...arguments);
|
1074
|
-
this.lookChange = new EventEmitter();
|
1075
|
-
this._look = 'solid';
|
1076
|
-
}
|
1077
|
-
/**
|
1078
|
-
* Predefined look schemes
|
1079
|
-
*/
|
1080
|
-
get look() {
|
1081
|
-
return this._look;
|
1082
|
-
}
|
1083
|
-
set look(value) {
|
1084
|
-
this.setOption({
|
1085
|
-
name: 'look',
|
1086
|
-
value,
|
1087
|
-
afterCallback: () => {
|
1088
|
-
this.cdr.markForCheck();
|
1089
|
-
},
|
1090
|
-
});
|
1091
|
-
}
|
1092
|
-
}
|
1093
|
-
|
1094
|
-
class MXColorLookComponent extends classes(MXColorComponent, MXLookComponent) {
|
1095
|
-
}
|
1096
|
-
|
1097
|
-
class MXInteractiveComponent extends MXBaseComponent {
|
1098
|
-
constructor() {
|
1099
|
-
super(...arguments);
|
1100
|
-
/**
|
1101
|
-
* @ignore
|
1102
|
-
*/
|
1103
|
-
this.onTouchedCallback = noop;
|
1104
|
-
this._touched = false;
|
1105
|
-
/**
|
1106
|
-
* Emits an event whenever the disabled state of the component changes.
|
1107
|
-
*
|
1108
|
-
* @event
|
1109
|
-
*/
|
1110
|
-
this.disabledChange = new EventEmitter();
|
1111
|
-
this._tabIndex = 0;
|
1112
|
-
/**
|
1113
|
-
* Fires each time the component gets focused.
|
1114
|
-
* @event
|
1115
|
-
*/
|
1116
|
-
this.onFocus = new EventEmitter();
|
1117
|
-
/**
|
1118
|
-
* Fires each time the component gets blurred.
|
1119
|
-
* @event
|
1120
|
-
*/
|
1121
|
-
this.onBlur = new EventEmitter();
|
1122
|
-
// private _focused = signal(false);
|
1123
|
-
// protected markAsFocused() {
|
1124
|
-
// this._focused.set(true);
|
1125
|
-
// }
|
1126
|
-
// protected markAsBlured() {
|
1127
|
-
// this._focused.set(false);
|
1128
|
-
// }
|
1129
|
-
}
|
1130
|
-
registerOnTouched(fn) {
|
1131
|
-
this.onTouchedCallback = fn;
|
1132
|
-
}
|
1133
|
-
/**
|
1134
|
-
* Indicates whether the component has been touched.
|
1135
|
-
*
|
1136
|
-
*/
|
1137
|
-
get touched() {
|
1138
|
-
return this._touched;
|
1139
|
-
}
|
1140
|
-
/**
|
1141
|
-
* @ignore
|
1142
|
-
*/
|
1143
|
-
markAsTouched() {
|
1144
|
-
if (!this.touched) {
|
1145
|
-
this.onTouchedCallback();
|
1146
|
-
this._touched = true;
|
1147
|
-
}
|
1148
|
-
}
|
1149
|
-
/**
|
1150
|
-
* If set to true, it disables the component.
|
1151
|
-
*/
|
1152
|
-
get disabled() {
|
1153
|
-
return this._disabled;
|
1154
|
-
}
|
1155
|
-
set disabled(value) {
|
1156
|
-
value = coerceBooleanProperty(value);
|
1157
|
-
this.setOption({
|
1158
|
-
name: 'disabled',
|
1159
|
-
value,
|
1160
|
-
afterCallback: () => {
|
1161
|
-
this.cdr.markForCheck();
|
1162
|
-
},
|
1163
|
-
});
|
1164
|
-
}
|
1165
|
-
setDisabledState(isDisabled) {
|
1166
|
-
this.disabled = isDisabled;
|
1167
|
-
}
|
1168
|
-
/**
|
1169
|
-
* Specifies the tabindex of the component.
|
1170
|
-
*/
|
1171
|
-
get tabIndex() {
|
1172
|
-
return this.disabled ? -1 : this._tabIndex;
|
1173
|
-
}
|
1174
|
-
set tabIndex(value) {
|
1175
|
-
this.setOption({
|
1176
|
-
name: 'tabIndex',
|
1177
|
-
value: value != null ? coerceNumberProperty(value) : 0,
|
1178
|
-
});
|
1179
|
-
}
|
1180
|
-
emitOnFocusEvent(e) {
|
1181
|
-
this.onFocus.emit({
|
1182
|
-
component: this,
|
1183
|
-
htmlElement: this.getHostElement(),
|
1184
|
-
nativeEvent: e,
|
1185
|
-
});
|
1186
|
-
}
|
1187
|
-
emitOnBlurEvent(e) {
|
1188
|
-
this.markAsTouched();
|
1189
|
-
this.onBlur.emit({
|
1190
|
-
component: this,
|
1191
|
-
htmlElement: this.getHostElement(),
|
1192
|
-
nativeEvent: e,
|
1193
|
-
});
|
1194
|
-
}
|
1195
|
-
// /**
|
1196
|
-
// * Fires each time the user clicks the button.
|
1197
|
-
// * @event
|
1198
|
-
// */
|
1199
|
-
// onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();
|
1200
|
-
// protected emitOnClickEvent(e: MouseEvent): void {
|
1201
|
-
// this.onClick.emit({
|
1202
|
-
// component: this,
|
1203
|
-
// htmlElement: this.getHostElement(),
|
1204
|
-
// nativeEvent: e,
|
1205
|
-
// });
|
1206
|
-
// }
|
1207
|
-
focus() {
|
1208
|
-
AXHtmlUtil.focusElement(this.getHostElement());
|
1442
|
+
name: 'color',
|
1443
|
+
value,
|
1444
|
+
afterCallback: () => {
|
1445
|
+
this.cdr.markForCheck();
|
1446
|
+
},
|
1447
|
+
});
|
1209
1448
|
}
|
1210
|
-
|
1211
|
-
|
1449
|
+
}
|
1450
|
+
|
1451
|
+
class MXLookableComponent {
|
1452
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXLookableComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1453
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXLookableComponent }); }
|
1454
|
+
}
|
1455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXLookableComponent, decorators: [{
|
1456
|
+
type: Injectable
|
1457
|
+
}] });
|
1458
|
+
class MXLookComponent extends MXBaseComponent {
|
1459
|
+
constructor() {
|
1460
|
+
super(...arguments);
|
1461
|
+
this.lookChange = new EventEmitter();
|
1462
|
+
this._look = 'solid';
|
1212
1463
|
}
|
1213
1464
|
/**
|
1214
|
-
*
|
1465
|
+
* Predefined look schemes
|
1215
1466
|
*/
|
1216
|
-
|
1217
|
-
return
|
1467
|
+
get look() {
|
1468
|
+
return this._look;
|
1469
|
+
}
|
1470
|
+
set look(value) {
|
1471
|
+
this.setOption({
|
1472
|
+
name: 'look',
|
1473
|
+
value,
|
1474
|
+
afterCallback: () => {
|
1475
|
+
this.cdr.markForCheck();
|
1476
|
+
},
|
1477
|
+
});
|
1218
1478
|
}
|
1219
1479
|
}
|
1220
1480
|
|
1481
|
+
class MXColorLookComponent extends classes(MXColorComponent, MXLookComponent) {
|
1482
|
+
}
|
1483
|
+
|
1221
1484
|
class MXButtonBaseComponent extends classes(MXInteractiveComponent, MXColorLookComponent) {
|
1222
1485
|
/**
|
1223
1486
|
* Defines the primary text to show inside the button.
|
@@ -1302,229 +1565,6 @@ class MXButtonBaseComponent extends classes(MXInteractiveComponent, MXColorLookC
|
|
1302
1565
|
}
|
1303
1566
|
}
|
1304
1567
|
|
1305
|
-
class MXValueComponent extends MXInteractiveComponent {
|
1306
|
-
constructor() {
|
1307
|
-
super(...arguments);
|
1308
|
-
/**
|
1309
|
-
* Fires each time the user press a key.
|
1310
|
-
* @event
|
1311
|
-
*/
|
1312
|
-
this.onValueChanged = new EventEmitter();
|
1313
|
-
/**
|
1314
|
-
* @deprecated The event should not be used, use ngModelChange instead
|
1315
|
-
*/
|
1316
|
-
this.valueChange = new EventEmitter();
|
1317
|
-
this.readonlyChange = new EventEmitter();
|
1318
|
-
this._readonly = false;
|
1319
|
-
this._dirty = false;
|
1320
|
-
this._isUserInteraction = false;
|
1321
|
-
this.stateChange = new EventEmitter();
|
1322
|
-
this._state = 'clear';
|
1323
|
-
this.document = inject(DOCUMENT);
|
1324
|
-
this.platformID = inject(PLATFORM_ID);
|
1325
|
-
this.validationService = inject(AXValidationService);
|
1326
|
-
this.validationRulesChange = new EventEmitter();
|
1327
|
-
this.validationRules = [];
|
1328
|
-
this.onChangeCallback = noop;
|
1329
|
-
}
|
1330
|
-
/**
|
1331
|
-
* If set to true, user cannot change the value of component.
|
1332
|
-
*/
|
1333
|
-
get readonly() {
|
1334
|
-
return this._readonly;
|
1335
|
-
}
|
1336
|
-
set readonly(value) {
|
1337
|
-
value = coerceBooleanProperty(value);
|
1338
|
-
this.setOption({
|
1339
|
-
name: 'readonly',
|
1340
|
-
value,
|
1341
|
-
afterCallback: () => {
|
1342
|
-
this.cdr.markForCheck();
|
1343
|
-
},
|
1344
|
-
});
|
1345
|
-
}
|
1346
|
-
get name() {
|
1347
|
-
return this._name;
|
1348
|
-
}
|
1349
|
-
set name(value) {
|
1350
|
-
this._name = value;
|
1351
|
-
}
|
1352
|
-
get dirty() {
|
1353
|
-
return this._dirty;
|
1354
|
-
}
|
1355
|
-
markAsDirty() {
|
1356
|
-
this._dirty = true;
|
1357
|
-
}
|
1358
|
-
/**
|
1359
|
-
* @deprecated The property should not be used, use ngModel instead
|
1360
|
-
*/
|
1361
|
-
get value() {
|
1362
|
-
return this.internalGetValue(this._value) ?? this.defaultValue;
|
1363
|
-
}
|
1364
|
-
set value(v) {
|
1365
|
-
v = this.internalSetValue(v);
|
1366
|
-
const old = clone(this.value);
|
1367
|
-
if (v === null || v === undefined || v === '' || (Array.isArray(v) && v.length === 0)) {
|
1368
|
-
this.setState('clear');
|
1369
|
-
if (old === null || old === undefined || old === '' || (Array.isArray(old) && old.length === 0)) {
|
1370
|
-
return;
|
1371
|
-
}
|
1372
|
-
}
|
1373
|
-
if (!isEqual(old, v)) {
|
1374
|
-
this._value = v;
|
1375
|
-
this.emitOnValueChangedEvent(old, this.value);
|
1376
|
-
this.internalValueChanged(this.value);
|
1377
|
-
}
|
1378
|
-
}
|
1379
|
-
get state() {
|
1380
|
-
return this._state;
|
1381
|
-
}
|
1382
|
-
set state(value) {
|
1383
|
-
this.setState(value);
|
1384
|
-
this.stateChange.emit(value);
|
1385
|
-
}
|
1386
|
-
emitOnValueChangedEvent(oldValue, newValue) {
|
1387
|
-
this.valueChange.emit(newValue);
|
1388
|
-
this.onValueChanged.emit({
|
1389
|
-
component: this,
|
1390
|
-
value: newValue,
|
1391
|
-
oldValue: oldValue,
|
1392
|
-
name: this.name,
|
1393
|
-
isUserInteraction: this._isUserInteraction,
|
1394
|
-
});
|
1395
|
-
this.onChangeCallback(newValue);
|
1396
|
-
this.cdr.markForCheck();
|
1397
|
-
this._isUserInteraction = false;
|
1398
|
-
}
|
1399
|
-
internalSetValue(value) {
|
1400
|
-
return value;
|
1401
|
-
}
|
1402
|
-
internalGetValue(value) {
|
1403
|
-
return value;
|
1404
|
-
}
|
1405
|
-
internalValueChanged(value) { }
|
1406
|
-
ngOnInit() {
|
1407
|
-
super.ngOnInit();
|
1408
|
-
//
|
1409
|
-
this.registerValidation();
|
1410
|
-
}
|
1411
|
-
ngOnDestroy() {
|
1412
|
-
this.onValueChanged?.unsubscribe();
|
1413
|
-
this.onOptionChanged?.unsubscribe();
|
1414
|
-
}
|
1415
|
-
registerValidation() {
|
1416
|
-
const a = this.getHostElement().querySelectorAll('[ax-form-item="true"]');
|
1417
|
-
a.forEach((c) => {
|
1418
|
-
c.removeAttribute('ax-form-item');
|
1419
|
-
});
|
1420
|
-
this.getHostElement().setAttribute('ax-form-item', 'true');
|
1421
|
-
}
|
1422
|
-
get isRequired() {
|
1423
|
-
return this.validationRules?.some((c) => c.rule == 'required');
|
1424
|
-
}
|
1425
|
-
addValidationRule(rule) {
|
1426
|
-
this.validationRules.push(rule);
|
1427
|
-
this.validationRulesChange.emit(this.validationRules);
|
1428
|
-
}
|
1429
|
-
removeValidationRule(rule) {
|
1430
|
-
this.validationRules = this.validationRules.filter((r) => r.rule !== rule.rule || !isEqual(r.options, rule.options));
|
1431
|
-
this.validationRulesChange.emit(this.validationRules);
|
1432
|
-
}
|
1433
|
-
async validate() {
|
1434
|
-
const container_classes = ['ax-editor-container', 'ax-checkbox', 'ax-radio'];
|
1435
|
-
const container = container_classes.some((c) => this.getHostElement().classList.contains(c))
|
1436
|
-
? this.getHostElement()
|
1437
|
-
: this.getHostElement().querySelector('.ax-editor-container');
|
1438
|
-
const formField = container?.closest('ax-form-field') || container?.closest('ax-checkbox');
|
1439
|
-
const label = formField?.querySelector('ax-label') || formField?.querySelector('label');
|
1440
|
-
//
|
1441
|
-
const rules = this.validationService.ruleFor(this.value);
|
1442
|
-
this.validationRules.forEach((r) => {
|
1443
|
-
r.options['title'] = (label?.firstChild?.textContent ?? this.name)?.replace('*', '').trim();
|
1444
|
-
rules.addRule(r.rule, r.options);
|
1445
|
-
});
|
1446
|
-
const result = await rules.validate();
|
1447
|
-
if (result.result) {
|
1448
|
-
this.setState('clear');
|
1449
|
-
}
|
1450
|
-
else {
|
1451
|
-
const message = result.rules.find((c) => !c.result).message;
|
1452
|
-
this.setState('error', message);
|
1453
|
-
}
|
1454
|
-
return result;
|
1455
|
-
}
|
1456
|
-
setState(state, ...args) {
|
1457
|
-
//TODO: find a better solution
|
1458
|
-
if (isBrowser()) {
|
1459
|
-
const container = this.getHostElement().classList.contains('ax-editor-container')
|
1460
|
-
? this.getHostElement()
|
1461
|
-
: this.getHostElement().querySelector('.ax-editor-container');
|
1462
|
-
const formField = container?.closest('ax-form-field');
|
1463
|
-
const label = formField?.querySelector('ax-label') || formField?.querySelector('label');
|
1464
|
-
let target = container || this.getHostElement().firstElementChild;
|
1465
|
-
if (target?.querySelector('.ax-error-container')) {
|
1466
|
-
target = target.querySelector('.ax-error-container');
|
1467
|
-
}
|
1468
|
-
const parent = target?.parentElement;
|
1469
|
-
if (!target || !parent)
|
1470
|
-
return;
|
1471
|
-
switch (state) {
|
1472
|
-
case 'clear':
|
1473
|
-
this._state = 'clear';
|
1474
|
-
if (parent.querySelector('span.ax-error-message')) {
|
1475
|
-
parent.removeChild(parent.querySelector('span.ax-error-message'));
|
1476
|
-
}
|
1477
|
-
label?.classList.remove('ax-state-error');
|
1478
|
-
target.classList.remove('ax-state-error', 'ax-state-success');
|
1479
|
-
break;
|
1480
|
-
case 'success':
|
1481
|
-
this.setState('clear');
|
1482
|
-
target.classList.add('ax-state-success');
|
1483
|
-
this._state = 'success';
|
1484
|
-
break;
|
1485
|
-
case 'error':
|
1486
|
-
this.setState('clear');
|
1487
|
-
if (args[0] && isPlatformBrowser(this.platformID)) {
|
1488
|
-
const span = this.document.createElement('span');
|
1489
|
-
span.innerHTML = args[0];
|
1490
|
-
span.classList.add('ax-error-message');
|
1491
|
-
parent.appendChild(span);
|
1492
|
-
}
|
1493
|
-
label?.classList.add('ax-state-error');
|
1494
|
-
target.classList.add('ax-state-error');
|
1495
|
-
this._state = 'error';
|
1496
|
-
break;
|
1497
|
-
}
|
1498
|
-
this.cdr.markForCheck();
|
1499
|
-
}
|
1500
|
-
}
|
1501
|
-
registerOnChange(fn) {
|
1502
|
-
this.onChangeCallback = fn;
|
1503
|
-
}
|
1504
|
-
writeValue(value) {
|
1505
|
-
this.value = value;
|
1506
|
-
}
|
1507
|
-
commitValue(value, u = false) {
|
1508
|
-
if (u) {
|
1509
|
-
this.markAsTouched();
|
1510
|
-
this.markAsDirty();
|
1511
|
-
this._isUserInteraction = true;
|
1512
|
-
}
|
1513
|
-
this.writeValue(value);
|
1514
|
-
}
|
1515
|
-
reset(e = false) {
|
1516
|
-
this.commitValue(null, e);
|
1517
|
-
}
|
1518
|
-
resetErrors() {
|
1519
|
-
this.setState('clear');
|
1520
|
-
}
|
1521
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MXValueComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
1522
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MXValueComponent }); }
|
1523
|
-
}
|
1524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MXValueComponent, decorators: [{
|
1525
|
-
type: Injectable
|
1526
|
-
}] });
|
1527
|
-
|
1528
1568
|
class MXInputBaseValueComponent extends MXValueComponent {
|
1529
1569
|
constructor() {
|
1530
1570
|
super(...arguments);
|
@@ -1569,10 +1609,10 @@ class MXInputBaseValueComponent extends MXValueComponent {
|
|
1569
1609
|
else
|
1570
1610
|
super.focus();
|
1571
1611
|
}
|
1572
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
1573
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.
|
1612
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXInputBaseValueComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
1613
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXInputBaseValueComponent }); }
|
1574
1614
|
}
|
1575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXInputBaseValueComponent, decorators: [{
|
1576
1616
|
type: Injectable
|
1577
1617
|
}] });
|
1578
1618
|
|
@@ -1581,10 +1621,10 @@ class MXSelectionBridgeService {
|
|
1581
1621
|
this.selectedItems = [];
|
1582
1622
|
this.cacheList = {};
|
1583
1623
|
}
|
1584
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
1585
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.
|
1624
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXSelectionBridgeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1625
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXSelectionBridgeService }); }
|
1586
1626
|
}
|
1587
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXSelectionBridgeService, decorators: [{
|
1588
1628
|
type: Injectable
|
1589
1629
|
}] });
|
1590
1630
|
const AX_SELECTION_DATA_TOKEN = new InjectionToken('AX_SELECTION_DATA_TOKEN');
|
@@ -1788,10 +1828,10 @@ class MXSelectionValueComponent extends MXValueComponent {
|
|
1788
1828
|
this.dataService.cacheList = {};
|
1789
1829
|
this.cdr.markForCheck();
|
1790
1830
|
}
|
1791
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
1792
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.
|
1831
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXSelectionValueComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
1832
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXSelectionValueComponent }); }
|
1793
1833
|
}
|
1794
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: MXSelectionValueComponent, decorators: [{
|
1795
1835
|
type: Injectable
|
1796
1836
|
}] });
|
1797
1837
|
|
@@ -1824,10 +1864,10 @@ class AXNgModelDelayedValueChangedDirective {
|
|
1824
1864
|
distinctUntilChanged(), debounceTime(this.delayTime))
|
1825
1865
|
.subscribe((value) => this.axDelayedValueChanged.emit(value));
|
1826
1866
|
}
|
1827
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
1828
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.
|
1867
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXNgModelDelayedValueChangedDirective, deps: [{ token: i1$1.NgModel }], target: i0.ɵɵFactoryTarget.Directive }); }
|
1868
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: AXNgModelDelayedValueChangedDirective, isStandalone: true, selector: "[axDelayedValueChanged]", inputs: { delayTime: "delayTime" }, outputs: { axDelayedValueChanged: "axDelayedValueChanged", axDelayTimeChange: "axDelayTimeChange" }, ngImport: i0 }); }
|
1829
1869
|
}
|
1830
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXNgModelDelayedValueChangedDirective, decorators: [{
|
1831
1871
|
type: Directive,
|
1832
1872
|
args: [{
|
1833
1873
|
selector: '[axDelayedValueChanged]',
|
@@ -1879,10 +1919,10 @@ class AXInvertedColorDirective {
|
|
1879
1919
|
});
|
1880
1920
|
}
|
1881
1921
|
}
|
1882
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
1883
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.
|
1922
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXInvertedColorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1923
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.8", type: AXInvertedColorDirective, isStandalone: true, selector: "[axInvertedColor]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
1884
1924
|
}
|
1885
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXInvertedColorDirective, decorators: [{
|
1886
1926
|
type: Directive,
|
1887
1927
|
args: [{
|
1888
1928
|
selector: '[axInvertedColor]',
|
@@ -1936,10 +1976,10 @@ class AXRippleDirective {
|
|
1936
1976
|
});
|
1937
1977
|
}
|
1938
1978
|
}
|
1939
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
1940
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.
|
1979
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXRippleDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
1980
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: AXRippleDirective, isStandalone: true, selector: "[axRipple]", inputs: { enabled: ["axRipple", "enabled"], axRippleColor: "axRippleColor" }, ngImport: i0 }); }
|
1941
1981
|
}
|
1942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
1982
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXRippleDirective, decorators: [{
|
1943
1983
|
type: Directive,
|
1944
1984
|
args: [{
|
1945
1985
|
selector: '[axRipple]',
|
@@ -1956,5 +1996,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
1956
1996
|
* Generated bundle index. Do not edit.
|
1957
1997
|
*/
|
1958
1998
|
|
1959
|
-
export { AXAutoFocusDirective, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosbaleComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDataSource, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXInvertedColorDirective, AXItemClickEvent, AXListDataSource, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_SELECTION_DATA_TOKEN, AX_STYLE_COLOR_TYPES, AX_STYLE_LOOK_TYPES, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInputBaseValueComponent, MXInteractiveComponent, MXLookComponent, MXLookableComponent, MXSelectionBridgeService, MXSelectionValueComponent, MXValueComponent, NXButtonComponent, NXClickEvent, NXColorComponent, NXComponent, NXEvent, NXInteractiveComponent, NXLookComponent, NXNativeEvent, NXValueComponent, TAB_META_KEY, convertArrayToDataSource, convertToPlacement };
|
1999
|
+
export { AXAutoFocusDirective, AXAutocompleteParentComponent, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosbaleComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDataSource, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXInvertedColorDirective, AXItemClickEvent, AXListDataSource, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_SELECTION_DATA_TOKEN, AX_STYLE_COLOR_TYPES, AX_STYLE_LOOK_TYPES, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInputBaseValueComponent, MXInteractiveComponent, MXLookComponent, MXLookableComponent, MXSelectionBridgeService, MXSelectionValueComponent, MXValueComponent, NXButtonComponent, NXClickEvent, NXColorComponent, NXComponent, NXEvent, NXInteractiveComponent, NXLookComponent, NXNativeEvent, NXValueComponent, TAB_META_KEY, convertArrayToDataSource, convertToPlacement };
|
1960
2000
|
//# sourceMappingURL=acorex-components-common.mjs.map
|