@acorex/components 18.14.1-next.1 → 18.14.1-next.3
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/bottom-navigation/lib/bottom-navigation.component.mjs +2 -2
- package/esm2022/calendar/lib/calendar.component.mjs +3 -3
- package/esm2022/cron-job/lib/day/day.component.mjs +1 -1
- package/esm2022/cron-job/lib/hours/hours.component.mjs +1 -1
- package/esm2022/cron-job/lib/minutes/minutes.component.mjs +1 -1
- package/esm2022/cron-job/lib/month/month.component.mjs +1 -1
- package/esm2022/cron-job/lib/seconds/seconds.component.mjs +1 -1
- package/esm2022/cron-job/lib/year/year.component.mjs +1 -1
- package/esm2022/form/lib/form.component.mjs +24 -5
- package/esm2022/loading/lib/loading.service.mjs +2 -2
- package/esm2022/side-menu/lib/side-menu.component.mjs +2 -2
- package/fesm2022/acorex-components-action-sheet.mjs +1 -1
- package/fesm2022/acorex-components-alert.mjs +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +1 -1
- package/fesm2022/acorex-components-avatar.mjs +1 -1
- package/fesm2022/acorex-components-badge.mjs +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +3 -3
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +1 -1
- package/fesm2022/acorex-components-button-group.mjs +1 -1
- package/fesm2022/acorex-components-button.mjs +1 -1
- package/fesm2022/acorex-components-calendar.mjs +3 -3
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +1 -1
- package/fesm2022/acorex-components-chips.mjs +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +1 -1
- package/fesm2022/acorex-components-collapse.mjs +1 -1
- package/fesm2022/acorex-components-color-box.mjs +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +1 -1
- package/fesm2022/acorex-components-comment.mjs +1 -1
- package/fesm2022/acorex-components-common.mjs +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +7 -7
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +1 -1
- package/fesm2022/acorex-components-data-table.mjs +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +1 -1
- package/fesm2022/acorex-components-decorators.mjs +1 -1
- package/fesm2022/acorex-components-dialog.mjs +1 -1
- package/fesm2022/acorex-components-drawer.mjs +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +1 -1
- package/fesm2022/acorex-components-form.mjs +22 -4
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +1 -1
- package/fesm2022/acorex-components-image.mjs +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +1 -1
- package/fesm2022/acorex-components-label.mjs +1 -1
- package/fesm2022/acorex-components-list.mjs +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +1 -1
- package/fesm2022/acorex-components-loading.mjs +2 -2
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +1 -1
- package/fesm2022/acorex-components-menu.mjs +1 -1
- package/fesm2022/acorex-components-nav.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +1 -1
- package/fesm2022/acorex-components-notification.mjs +1 -1
- package/fesm2022/acorex-components-number-box.mjs +1 -1
- package/fesm2022/acorex-components-otp.mjs +1 -1
- package/fesm2022/acorex-components-page.mjs +1 -1
- package/fesm2022/acorex-components-paint.mjs +1 -1
- package/fesm2022/acorex-components-password-box.mjs +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +1 -1
- package/fesm2022/acorex-components-picker.mjs +1 -1
- package/fesm2022/acorex-components-popover.mjs +1 -1
- package/fesm2022/acorex-components-popup.mjs +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +1 -1
- package/fesm2022/acorex-components-radio.mjs +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +1 -1
- package/fesm2022/acorex-components-result.mjs +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +1 -1
- package/fesm2022/acorex-components-search-box.mjs +1 -1
- package/fesm2022/acorex-components-select-box.mjs +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +2 -2
- package/fesm2022/acorex-components-side-menu.mjs +3 -3
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +1 -1
- package/fesm2022/acorex-components-slider.mjs +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +1 -1
- package/fesm2022/acorex-components-switch.mjs +1 -1
- package/fesm2022/acorex-components-tabs.mjs +1 -1
- package/fesm2022/acorex-components-tag.mjs +1 -1
- package/fesm2022/acorex-components-text-area.mjs +1 -1
- package/fesm2022/acorex-components-text-box.mjs +1 -1
- package/fesm2022/acorex-components-time-line.mjs +1 -1
- package/fesm2022/acorex-components-toast.mjs +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +1 -1
- package/fesm2022/acorex-components-uploader.mjs +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +1 -1
- package/form/lib/form.component.d.ts +6 -2
- package/package.json +1 -1
@@ -2,7 +2,7 @@ import * as i8 from '@acorex/components/common';
|
|
2
2
|
import { AXEvent, MXInteractiveComponent, MXValueComponent, AXPagedComponent } from '@acorex/components/common';
|
3
3
|
import { AXUnsubscriber, AXHtmlUtil } from '@acorex/core/utils';
|
4
4
|
import * as i0 from '@angular/core';
|
5
|
-
import { Injectable, inject,
|
5
|
+
import { Injectable, inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, signal, EventEmitter, forwardRef, Optional, Inject, Output, NgModule } from '@angular/core';
|
6
6
|
import * as i2 from '@acorex/core/translation';
|
7
7
|
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
8
8
|
import * as i1 from '@angular/common';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i5$1 from '@acorex/components/common';
|
2
2
|
import { MXBaseComponent, convertArrayToDataSource, AXListDataSource, AXPagedComponent, AXCommonModule, AXRippleDirective } from '@acorex/components/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { EventEmitter, signal, Input, Output,
|
4
|
+
import { EventEmitter, signal, Injectable, Input, Output, Directive, HostListener, inject, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, ChangeDetectorRef, NgZone, computed, ContentChildren, NgModule } from '@angular/core';
|
5
5
|
import { isBrowser } from '@acorex/core/platform';
|
6
6
|
import { Subject, debounceTime, buffer, filter } from 'rxjs';
|
7
7
|
import { __decorate, __metadata } from 'tslib';
|
@@ -7,7 +7,7 @@ import { AXDateTimePickerComponent, AXDateTimePickerModule } from '@acorex/compo
|
|
7
7
|
import * as i3 from '@acorex/components/dropdown';
|
8
8
|
import { MXDropdownBoxBaseComponent, AXDropdownBoxComponent, AXDropdownModule } from '@acorex/components/dropdown';
|
9
9
|
import * as i0 from '@angular/core';
|
10
|
-
import { EventEmitter, input, forwardRef,
|
10
|
+
import { EventEmitter, input, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Output, Input, NgModule } from '@angular/core';
|
11
11
|
import * as i1 from '@angular/forms';
|
12
12
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
13
13
|
import { classes } from 'polytype';
|
@@ -3,7 +3,7 @@ import { AXCalendarService, AXDateTimeModule } from '@acorex/core/date-time';
|
|
3
3
|
import { AXPlatform } from '@acorex/core/platform';
|
4
4
|
import { AXStringUtil } from '@acorex/core/utils';
|
5
5
|
import * as i0 from '@angular/core';
|
6
|
-
import { inject, input, EventEmitter, signal, forwardRef,
|
6
|
+
import { inject, input, EventEmitter, signal, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ViewChild, Output, HostListener, NgModule } from '@angular/core';
|
7
7
|
import * as i1 from '@angular/forms';
|
8
8
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
9
9
|
import { map } from 'rxjs';
|
@@ -10,7 +10,7 @@ import { AXCalendarService, AXDateTimeModule } from '@acorex/core/date-time';
|
|
10
10
|
import * as i8 from '@acorex/core/translation';
|
11
11
|
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
12
12
|
import * as i0 from '@angular/core';
|
13
|
-
import { InjectionToken, inject, EventEmitter, forwardRef,
|
13
|
+
import { InjectionToken, inject, EventEmitter, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ViewChild, Output, NgModule } from '@angular/core';
|
14
14
|
import * as i1 from '@angular/forms';
|
15
15
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
16
16
|
import { classes } from 'polytype';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i2 from '@acorex/components/common';
|
2
2
|
import { MXBaseComponent, AXClearableComponent, AXClosbaleComponent } from '@acorex/components/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import {
|
4
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, Input, HostBinding, HostListener, NgModule } from '@angular/core';
|
5
5
|
import * as i1 from '@angular/common';
|
6
6
|
import { CommonModule } from '@angular/common';
|
7
7
|
|
@@ -3,7 +3,7 @@ import { MXBaseComponent, AXClosbaleComponent, AXCommonModule, AXHotkeysService
|
|
3
3
|
import * as i1 from '@angular/cdk/dialog';
|
4
4
|
import { DIALOG_DATA, Dialog, DialogModule } from '@angular/cdk/dialog';
|
5
5
|
import * as i0 from '@angular/core';
|
6
|
-
import {
|
6
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, HostBinding, inject, Injectable, NgModule } from '@angular/core';
|
7
7
|
import * as i3 from '@angular/cdk/drag-drop';
|
8
8
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
9
9
|
import * as i4 from '@acorex/components/button';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { signal, Injectable, inject, afterNextRender,
|
3
|
+
import { signal, Injectable, inject, afterNextRender, Component, ChangeDetectionStrategy, ViewEncapsulation, model, input, HostBinding, NgModule } from '@angular/core';
|
4
4
|
import { MXBaseComponent, AXComponent, AXClosbaleComponent } from '@acorex/components/common';
|
5
5
|
import { isBrowser } from '@acorex/core/platform';
|
6
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i3 from '@acorex/components/common';
|
2
2
|
import { MXButtonBaseComponent, AXClosbaleComponent, AXCommonModule, AXRippleDirective } from '@acorex/components/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { EventEmitter,
|
4
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, NgModule } from '@angular/core';
|
5
5
|
import * as i1 from '@angular/common';
|
6
6
|
import { CommonModule } from '@angular/common';
|
7
7
|
import * as i2 from '@acorex/components/decorators';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXInteractiveComponent, MXLookComponent, convertToPlacement, AXClosbaleComponent, AXCommonModule } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { EventEmitter, Injectable, inject,
|
3
|
+
import { EventEmitter, Injectable, inject, Component, ViewChild, Output, HostListener, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@acorex/components/popover';
|
5
5
|
import { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';
|
6
6
|
import { AXPlatform, isBrowser } from '@acorex/core/platform';
|
@@ -4,7 +4,7 @@ import { AXLabelComponent } from '@acorex/components/label';
|
|
4
4
|
import { AXSelectBoxComponent } from '@acorex/components/select-box';
|
5
5
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
6
6
|
import * as i0 from '@angular/core';
|
7
|
-
import { input, EventEmitter,
|
7
|
+
import { input, contentChildren, effect, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, Input, signal, inject, ViewContainerRef, afterNextRender, ContentChild, HostBinding, InjectionToken, Directive, Optional, Inject, NgModule } from '@angular/core';
|
8
8
|
import * as i3 from '@acorex/components/alert';
|
9
9
|
import { AXAlertModule } from '@acorex/components/alert';
|
10
10
|
import * as i4 from '@acorex/components/button';
|
@@ -30,6 +30,7 @@ class AXFormValidationEvent extends AXEvent {
|
|
30
30
|
* @category Components
|
31
31
|
*/
|
32
32
|
class AXFormComponent extends MXBaseComponent {
|
33
|
+
#applyLooks;
|
33
34
|
/**
|
34
35
|
* Determines when the form should be updated.
|
35
36
|
*/
|
@@ -72,6 +73,13 @@ class AXFormComponent extends MXBaseComponent {
|
|
72
73
|
* @defaultValue 'static'
|
73
74
|
*/
|
74
75
|
this.labelMode = input('static');
|
76
|
+
this.look = input('solid');
|
77
|
+
this.content = contentChildren(AXFormFieldComponent, { descendants: true });
|
78
|
+
this.#applyLooks = effect(() => {
|
79
|
+
this.content().forEach((item) => {
|
80
|
+
item.input.look = this.look();
|
81
|
+
});
|
82
|
+
});
|
75
83
|
/**
|
76
84
|
* Determines the style of the message in the form field.
|
77
85
|
* @defaultValue 'bottom'
|
@@ -138,7 +146,9 @@ class AXFormComponent extends MXBaseComponent {
|
|
138
146
|
.filter((c) => c != null);
|
139
147
|
}
|
140
148
|
async validate(...names) {
|
141
|
-
const results = await Promise.all(this.fields
|
149
|
+
const results = await Promise.all(this.fields
|
150
|
+
.filter((c) => names == null || names.length == 0 || names.includes(c.name))
|
151
|
+
.map((field) => field.validate()));
|
142
152
|
// Merge all validation summaries into one
|
143
153
|
const mergedSummary = {
|
144
154
|
result: results.every((res) => res.result),
|
@@ -176,7 +186,11 @@ class AXFormComponent extends MXBaseComponent {
|
|
176
186
|
this._clearSubs();
|
177
187
|
}
|
178
188
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
179
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
189
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: AXFormComponent, selector: "ax-form", inputs: { labelMode: { classPropertyName: "labelMode", publicName: "labelMode", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, messageStyle: { classPropertyName: "messageStyle", publicName: "messageStyle", isSignal: true, isRequired: false, transformFunction: null }, updateOn: { classPropertyName: "updateOn", publicName: "updateOn", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onValidate: "onValidate", updateOnChange: "updateOnChange" }, queries: [{ propertyName: "content", predicate: AXFormFieldComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `<form
|
190
|
+
(submit)="_handleSubmit($event)"
|
191
|
+
(reset)="_handleReset()"
|
192
|
+
class="ax-{{ messageStyle() }}-error"
|
193
|
+
>
|
180
194
|
<ng-content></ng-content>
|
181
195
|
</form>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
182
196
|
}
|
@@ -184,7 +198,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
184
198
|
type: Component,
|
185
199
|
args: [{
|
186
200
|
selector: 'ax-form',
|
187
|
-
template: `<form
|
201
|
+
template: `<form
|
202
|
+
(submit)="_handleSubmit($event)"
|
203
|
+
(reset)="_handleReset()"
|
204
|
+
class="ax-{{ messageStyle() }}-error"
|
205
|
+
>
|
188
206
|
<ng-content></ng-content>
|
189
207
|
</form>`,
|
190
208
|
encapsulation: ViewEncapsulation.None,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-form.mjs","sources":["../../../../libs/components/form/src/lib/form.component.ts","../../../../libs/components/form/src/lib/form-field.component.ts","../../../../libs/components/form/src/lib/form.config.ts","../../../../libs/components/form/src/lib/validation-rule.directive.ts","../../../../libs/components/form/src/lib/validation-summary.component.ts","../../../../libs/components/form/src/lib/form.module.ts","../../../../libs/components/form/src/acorex-components-form.ts"],"sourcesContent":["import { AXEvent, AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXValidationSummary } from '@acorex/core/validation';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n InputSignal,\n OnDestroy,\n Output,\n ViewEncapsulation,\n input,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\n/**\n * Contains native event\n * @category Events\n */\nexport class AXFormValidationEvent extends AXEvent {\n result: AXValidationSummary;\n}\n\n/**\n * Contains native event\n * @category Events\n */\nexport type AXFormUpdateOn = 'change' | 'blur' | 'submit';\nexport type AXFormMessageStyle = 'bottom' | 'float';\nexport type AXLabelMode = 'static' | 'floating' | 'over';\n\n/**\n * The AXForm is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form',\n template: `<form (submit)=\"_handleSubmit($event)\" (reset)=\"_handleReset()\" class=\"ax-{{ messageStyle() }}-error\">\n <ng-content></ng-content>\n </form>`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXFormComponent extends MXBaseComponent implements OnDestroy {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n /**\n * Determines the style of the message in the form field.\n * @defaultValue 'bottom'\n */\n messageStyle: InputSignal<AXFormMessageStyle> = input<AXFormMessageStyle>('bottom');\n\n /**\n * Emitted when the form is validated.\n *\n * @event\n */\n @Output()\n onValidate: EventEmitter<AXFormValidationEvent> = new EventEmitter<AXFormValidationEvent>();\n\n /**\n * Emitted when the form's update mode changes.\n *\n * @event\n */\n @Output()\n updateOnChange: EventEmitter<AXFormUpdateOn> = new EventEmitter<AXFormUpdateOn>();\n\n /**\n * @ignore\n */\n private _updateOn: AXFormUpdateOn = 'blur';\n\n /**\n * Determines when the form should be updated.\n */\n @Input()\n public get updateOn(): AXFormUpdateOn {\n return this._updateOn;\n }\n\n /**\n * Sets the criteria for when the form should be updated.\n * @param v The criteria to set (e.g., 'change', 'blur').\n */\n public set updateOn(v: AXFormUpdateOn) {\n this.setOption({\n name: 'updateOn',\n value: v,\n afterCallback: () => {\n //this._bindEvents();\n },\n });\n }\n\n /**\n * @ignore\n */\n private _subs: Subscription[] = [];\n\n /**\n * @ignore\n */\n protected async _handleSubmit(e: SubmitEvent) {\n e.preventDefault();\n await this.validate();\n }\n\n /**\n * @ignore\n */\n protected _handleReset() {\n this.reset();\n }\n\n /**\n * @ignore\n */\n constructor() {\n super();\n }\n\n //TODO: check update on\n\n // ngAfterViewInit(): void {\n // //this._bindEvents();\n // }\n\n // private _bindEvents() {\n // this._clearSubs();\n // const widgets = this._getComponenets();\n // //\n // widgets.forEach((w) => {\n // if (this.updateOn == 'change') {\n // this._subs.push(\n // w.onValueChanged?.subscribe((v: AXValueChangedEvent) => {\n // if (v.isUserInteraction) w.validate();\n // }),\n // );\n // } else if (this.updateOn == 'blur') {\n // this._subs.push(\n // w.onBlur?.subscribe((v) => {\n // w.validate();\n // }),\n // );\n // }\n // });\n // }\n\n /**\n * @ignore\n */\n private _clearSubs() {\n this._subs.forEach((c) => c?.unsubscribe());\n this._subs = [];\n }\n\n /**\n * @ignore\n */\n private get fields(): AXValuableComponent[] {\n return Array.from(this.getHostElement().querySelectorAll('[ax-form-item=\"true\"]'))\n .map((c) => (c as any).__axContext__)\n .filter((c) => c != null);\n }\n\n async validate(...names: string[]): Promise<AXValidationSummary> {\n const results = await Promise.all(\n this.fields.filter((c) => names == null || names.length == 0 || names.includes(c.name)).map((field) => field.validate()),\n );\n // Merge all validation summaries into one\n const mergedSummary: AXValidationSummary = {\n result: results.every((res) => res.result),\n rules: results.flatMap((res) => res.rules),\n };\n this._emitOnValidateEvent(mergedSummary);\n return mergedSummary;\n }\n\n /**\n * @ignore\n */\n private _emitOnValidateEvent(e: AXValidationSummary) {\n this.onValidate.emit({\n component: this,\n result: e,\n htmlElement: this.getHostElement(),\n });\n }\n\n /**\n * Resets all form fields without clearing errors.\n */\n reset() {\n this.fields.forEach((c) => c.reset(false));\n }\n\n /**\n * Resets validation errors for all form fields.\n */\n resetErrors() {\n this.fields.forEach((c) => c.resetErrors());\n }\n\n /**\n * @ignore\n */\n ngOnDestroy(): void {\n this._clearSubs();\n }\n}\n","import { AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXLabelComponent } from '@acorex/components/label';\nimport { AXSelectBoxComponent } from '@acorex/components/select-box';\nimport { AXUnsubscriber } from '@acorex/core/utils';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n ViewContainerRef,\n ViewEncapsulation,\n WritableSignal,\n afterNextRender,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { AXFormComponent, AXLabelMode } from './form.component';\n\n/**\n * A container component for form fields that provides styling and structure.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form-field',\n template: `<ng-content></ng-content>`,\n styleUrls: ['./form-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [AXUnsubscriber],\n})\nexport class AXFormFieldComponent extends MXBaseComponent {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n /**\n * @ignore\n */\n protected _labelMode: WritableSignal<AXLabelMode> = signal(this.labelMode());\n\n private unsubscriber = inject(AXUnsubscriber);\n\n @ContentChild(AXValuableComponent)\n private input: AXValuableComponent;\n\n /**\n * @ignore\n */\n @ContentChild(AXLabelComponent)\n private label: AXLabelComponent;\n\n form = inject(AXFormComponent, { optional: true });\n\n host = inject(ViewContainerRef);\n\n /**\n * @ignore\n */\n prefix: HTMLElement;\n\n /**\n * @ignore\n */\n constructor() {\n super();\n\n afterNextRender(() => {\n this.calcIndentSize();\n this.setRequired();\n this.setLabelMode();\n this.listeningEvent();\n });\n\n effect(\n () => {\n this.setLabelMode();\n },\n { allowSignalWrites: true },\n );\n }\n\n /**\n * Calculates and sets the indentation size for the label based on the width of the prefix element.\n * @ignore\n */\n calcIndentSize() {\n const prefix = (this.input as any)?.getHostElement()?.querySelector('ax-prefix') as HTMLElement;\n if (prefix) {\n this.label.getHostElement().style.insetInlineStart = prefix?.clientWidth + 'px';\n }\n }\n\n /**\n * Sets the required attribute for the input field based on validation rules.\n * Automatically updates if validation rules change.\n * @ignore\n */\n setRequired() {\n this.autoSetRequired();\n this.input?.validationRulesChange.pipe(this.unsubscriber.takeUntilDestroy).subscribe(() => {\n this.autoSetRequired();\n });\n }\n /**\n * Sets the label mode based on the form's label mode configuration.\n * @ignore\n */\n setLabelMode() {\n this._labelMode.set(this.form?.labelMode());\n }\n\n /**\n * Subscribes to focus and blur events on the input element.\n * Adds or removes the 'ax-state-focused' class to/from the host element based on the focus state.\n * @ignone\n */\n listeningEvent() {\n const focusEvent = this.input?.['onFocus'] as Subject<any>;\n focusEvent?.subscribe((e) => {\n // this.handleFloating('focus');\n this.host.element.nativeElement.classList.add('ax-state-focused');\n });\n //\n const blurEvent = this.input?.['onBlur'] as Subject<any>;\n blurEvent?.subscribe((e) => {\n // this.handleFloating('blur');\n this.host.element.nativeElement.classList.remove('ax-state-focused');\n });\n }\n // protected handleFloating(mode: 'focus' | 'blur') {\n // const _host = this.host.element.nativeElement as HTMLElement;\n // const placeholder = this.input;\n\n // switch (mode) {\n // case 'focus':\n // _host.classList.add('ax-state-floating');\n // this.label.getHostElement().style.insetInlineStart = 'inherit';\n\n // break;\n // case 'blur':\n // _host.classList.remove('ax-state-floating');\n\n // break;\n // }\n // }\n\n /**\n * @ignore\n */\n private autoSetRequired() {\n if (this.label && this.input) {\n if (this.label.required == null || this.label['autoSetRequired']) {\n this.label.required = this.input.isRequired;\n this.label['autoSetRequired'] = true;\n }\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string[] {\n let hasValue;\n if (this.input) {\n if (this.input instanceof AXSelectBoxComponent && this.input.multiple) {\n hasValue = (this.input as any).value?.length;\n } else {\n hasValue = this.input.value;\n }\n }\n return [`ax-state-${this._labelMode()}-label`, `${hasValue && 'ax-state-has-value'}`];\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface AXFormConfig {}\n\nexport const AX_FORM_CONFIG = new InjectionToken<AXFormConfig>('AX_FORM_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXFormDefaultConfig;\n },\n});\n\nexport const AXFormDefaultConfig: AXFormConfig = {};\n\nexport type PartialFormConfig = Partial<AXFormConfig>;\n\nexport function formConfig(config: PartialFormConfig = {}): AXFormConfig {\n const result = {\n ...AXFormDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXValuableComponent } from '@acorex/components/common';\nimport { AXValidationRuleOptions } from '@acorex/core/validation';\nimport { Directive, Input, OnDestroy, OnInit } from '@angular/core';\n\n@Directive({\n selector: 'ax-validation-rule',\n})\nexport class AXValidationRuleDirective implements OnInit, OnDestroy {\n @Input() rule: string;\n @Input() options: Omit<AXValidationRuleOptions, 'message'>;\n @Input() message: string;\n\n constructor(private host: AXValuableComponent) {}\n\n ngOnInit() {\n this.host.addValidationRule({ rule: this.rule, options: this.ruleOptions });\n }\n\n ngOnDestroy() {\n this.host.removeValidationRule({\n rule: this.rule,\n options: this.ruleOptions,\n });\n }\n\n private get ruleOptions(): AXValidationRuleOptions {\n return Object.assign({ message: this.message, name: this.host.name }, this.options);\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXToastService } from '@acorex/components/toast';\nimport { translateSync } from '@acorex/core/translation';\nimport { ChangeDetectionStrategy, Component, Inject, Input, OnDestroy, Optional, ViewEncapsulation } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormComponent, AXFormValidationEvent } from './form.component';\n\nexport type AXValidationSummaryDisplayMode = 'toast' | 'alert';\n\n/**\n * Displays validation summaries in the form of an alert.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-validation-summary',\n template: `\n @if (displayMode === 'alert' && _content) {\n <ax-alert color=\"danger\" [timeOut]=\"_timeOut\" #a (onClosed)=\"_handleOnDismissed()\">\n <ax-icon></ax-icon>\n <ax-title>{{ title | translate | async }}</ax-title>\n <ax-content>\n <div [innerHTML]=\"_content\"></div>\n </ax-content>\n <ax-footer>\n <ax-suffix>\n <ax-button text=\"Dismiss\" (onClick)=\"a.close()\"></ax-button>\n </ax-suffix>\n </ax-footer>\n </ax-alert>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXValidationSummaryComponent extends MXBaseComponent implements OnDestroy {\n /**\n * @ignore\n */\n protected _content?: string = null;\n\n /**\n * @ignore\n */\n private _title = 'validation.messages.title';\n\n /**\n * The title of the validation summary alert.\n */\n @Input()\n public get title(): string {\n return this._title;\n }\n\n /**\n * Sets the title of the validation summary alert.\n *\n * @param v The title to be set.\n */\n public set title(v: string) {\n this._title = v;\n }\n\n /**\n * Specifies the display mode for the validation summary.\n *\n * @defaultValue 'toast'\n */\n @Input()\n displayMode: AXValidationSummaryDisplayMode = 'toast';\n\n /**\n * Specifies the time in milliseconds before the validation summary automatically hides.\n */\n @Input()\n timeOut?: number;\n\n /**\n * Determines whether the validation summary should automatically hide after a specified time.\n * @defaultValue false\n */\n @Input()\n autoHide = false;\n\n /**\n * @ignore\n */\n protected _timeOut: number;\n\n /**\n * @ignore\n */\n private sub: Subscription;\n\n /**\n * @ignore\n */\n constructor(\n private _tosatService: AXToastService,\n @Optional()\n @Inject(AXFormComponent)\n private host: AXFormComponent,\n ) {\n super();\n //\n this.sub = host.onValidate.subscribe((e: AXFormValidationEvent) => {\n if (e.result.result) {\n this._content = null;\n } else {\n const failedRules = e.result.rules.filter((c) => !c.result && c.message);\n\n this._content = `<ul>${failedRules.map((c) => this.formatRule({ title: c['title'] as string, message: c.message })).join('')}</ul>`;\n this._timeOut = this.autoHide ? this.timeOut ?? Math.max(failedRules.length * 1000, 2000) : 0;\n\n if (this.displayMode == 'toast') {\n this._tosatService.show({\n color: 'danger',\n closeButton: true,\n timeOut: this._timeOut,\n timeOutProgress: true,\n content: this._content,\n title: translateSync(this.title),\n location: 'bottom-center',\n });\n }\n }\n this.cdr.markForCheck();\n });\n }\n\n /**\n * @ignore\n */\n private formatRule(rule: { title?: string; message: string }): string {\n return rule.title ? `<li><b>${rule.title}:</b> ${rule.message}</li>` : `<li>${rule.message}</li>`;\n }\n\n /**\n * @ignore\n */\n protected _handleOnDismissed() {\n this._content = null;\n }\n\n /**\n * @ignore\n */\n ngOnDestroy() {\n this.sub?.unsubscribe();\n }\n}\n","import { AXAlertModule } from '@acorex/components/alert';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXFormFieldComponent } from './form-field.component';\nimport { AXFormComponent } from './form.component';\nimport { AXValidationRuleDirective } from './validation-rule.directive';\nimport { AXValidationSummaryComponent } from './validation-summary.component';\n\n@NgModule({\n declarations: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n imports: [CommonModule, AXDecoratorModule, AXAlertModule, AXButtonModule, AXValidationModule, AXTranslationModule],\n exports: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n providers: [],\n})\nexport class AXFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n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AA,CAAA,CAAA;;2FAItG,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AAC9G,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;oBAClH,OAAO,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AACzG,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACjBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-form.mjs","sources":["../../../../libs/components/form/src/lib/form.component.ts","../../../../libs/components/form/src/lib/form-field.component.ts","../../../../libs/components/form/src/lib/form.config.ts","../../../../libs/components/form/src/lib/validation-rule.directive.ts","../../../../libs/components/form/src/lib/validation-summary.component.ts","../../../../libs/components/form/src/lib/form.module.ts","../../../../libs/components/form/src/acorex-components-form.ts"],"sourcesContent":["import { AXEvent, AXStyleLookType, AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXValidationSummary } from '@acorex/core/validation';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n InputSignal,\n OnDestroy,\n Output,\n ViewEncapsulation,\n contentChildren,\n effect,\n input,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormFieldComponent } from './form-field.component';\n\n/**\n * Contains native event\n * @category Events\n */\nexport class AXFormValidationEvent extends AXEvent {\n result: AXValidationSummary;\n}\n\n/**\n * Contains native event\n * @category Events\n */\nexport type AXFormUpdateOn = 'change' | 'blur' | 'submit';\nexport type AXFormMessageStyle = 'bottom' | 'float';\nexport type AXLabelMode = 'static' | 'floating' | 'over';\n\n/**\n * The AXForm is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form',\n template: `<form\n (submit)=\"_handleSubmit($event)\"\n (reset)=\"_handleReset()\"\n class=\"ax-{{ messageStyle() }}-error\"\n >\n <ng-content></ng-content>\n </form>`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXFormComponent extends MXBaseComponent implements OnDestroy {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n look = input<AXStyleLookType>('solid');\n\n content = contentChildren(AXFormFieldComponent, { descendants: true });\n\n #applyLooks = effect(() => {\n this.content().forEach((item: any) => {\n item.input.look = this.look();\n });\n });\n\n /**\n * Determines the style of the message in the form field.\n * @defaultValue 'bottom'\n */\n messageStyle: InputSignal<AXFormMessageStyle> = input<AXFormMessageStyle>('bottom');\n\n /**\n * Emitted when the form is validated.\n *\n * @event\n */\n @Output()\n onValidate: EventEmitter<AXFormValidationEvent> = new EventEmitter<AXFormValidationEvent>();\n\n /**\n * Emitted when the form's update mode changes.\n *\n * @event\n */\n @Output()\n updateOnChange: EventEmitter<AXFormUpdateOn> = new EventEmitter<AXFormUpdateOn>();\n\n /**\n * @ignore\n */\n private _updateOn: AXFormUpdateOn = 'blur';\n\n /**\n * Determines when the form should be updated.\n */\n @Input()\n public get updateOn(): AXFormUpdateOn {\n return this._updateOn;\n }\n\n /**\n * Sets the criteria for when the form should be updated.\n * @param v The criteria to set (e.g., 'change', 'blur').\n */\n public set updateOn(v: AXFormUpdateOn) {\n this.setOption({\n name: 'updateOn',\n value: v,\n afterCallback: () => {\n //this._bindEvents();\n },\n });\n }\n\n /**\n * @ignore\n */\n private _subs: Subscription[] = [];\n\n /**\n * @ignore\n */\n protected async _handleSubmit(e: SubmitEvent) {\n e.preventDefault();\n await this.validate();\n }\n\n /**\n * @ignore\n */\n protected _handleReset() {\n this.reset();\n }\n\n /**\n * @ignore\n */\n constructor() {\n super();\n }\n\n //TODO: check update on\n\n // ngAfterViewInit(): void {\n // //this._bindEvents();\n // }\n\n // private _bindEvents() {\n // this._clearSubs();\n // const widgets = this._getComponenets();\n // //\n // widgets.forEach((w) => {\n // if (this.updateOn == 'change') {\n // this._subs.push(\n // w.onValueChanged?.subscribe((v: AXValueChangedEvent) => {\n // if (v.isUserInteraction) w.validate();\n // }),\n // );\n // } else if (this.updateOn == 'blur') {\n // this._subs.push(\n // w.onBlur?.subscribe((v) => {\n // w.validate();\n // }),\n // );\n // }\n // });\n // }\n\n /**\n * @ignore\n */\n private _clearSubs() {\n this._subs.forEach((c) => c?.unsubscribe());\n this._subs = [];\n }\n\n /**\n * @ignore\n */\n private get fields(): AXValuableComponent[] {\n return Array.from(this.getHostElement().querySelectorAll('[ax-form-item=\"true\"]'))\n .map((c) => (c as any).__axContext__)\n .filter((c) => c != null);\n }\n\n async validate(...names: string[]): Promise<AXValidationSummary> {\n const results = await Promise.all(\n this.fields\n .filter((c) => names == null || names.length == 0 || names.includes(c.name))\n .map((field) => field.validate()),\n );\n // Merge all validation summaries into one\n const mergedSummary: AXValidationSummary = {\n result: results.every((res) => res.result),\n rules: results.flatMap((res) => res.rules),\n };\n this._emitOnValidateEvent(mergedSummary);\n return mergedSummary;\n }\n\n /**\n * @ignore\n */\n private _emitOnValidateEvent(e: AXValidationSummary) {\n this.onValidate.emit({\n component: this,\n result: e,\n htmlElement: this.getHostElement(),\n });\n }\n\n /**\n * Resets all form fields without clearing errors.\n */\n reset() {\n this.fields.forEach((c) => c.reset(false));\n }\n\n /**\n * Resets validation errors for all form fields.\n */\n resetErrors() {\n this.fields.forEach((c) => c.resetErrors());\n }\n\n /**\n * @ignore\n */\n ngOnDestroy(): void {\n this._clearSubs();\n }\n}\n","import { AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXLabelComponent } from '@acorex/components/label';\nimport { AXSelectBoxComponent } from '@acorex/components/select-box';\nimport { AXUnsubscriber } from '@acorex/core/utils';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n ViewContainerRef,\n ViewEncapsulation,\n WritableSignal,\n afterNextRender,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { AXFormComponent, AXLabelMode } from './form.component';\n\n/**\n * A container component for form fields that provides styling and structure.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form-field',\n template: `<ng-content></ng-content>`,\n styleUrls: ['./form-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [AXUnsubscriber],\n})\nexport class AXFormFieldComponent extends MXBaseComponent {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n /**\n * @ignore\n */\n protected _labelMode: WritableSignal<AXLabelMode> = signal(this.labelMode());\n\n private unsubscriber = inject(AXUnsubscriber);\n\n @ContentChild(AXValuableComponent)\n private input: AXValuableComponent;\n\n /**\n * @ignore\n */\n @ContentChild(AXLabelComponent)\n private label: AXLabelComponent;\n\n form = inject(AXFormComponent, { optional: true });\n\n host = inject(ViewContainerRef);\n\n /**\n * @ignore\n */\n prefix: HTMLElement;\n\n /**\n * @ignore\n */\n constructor() {\n super();\n\n afterNextRender(() => {\n this.calcIndentSize();\n this.setRequired();\n this.setLabelMode();\n this.listeningEvent();\n });\n\n effect(\n () => {\n this.setLabelMode();\n },\n { allowSignalWrites: true },\n );\n }\n\n /**\n * Calculates and sets the indentation size for the label based on the width of the prefix element.\n * @ignore\n */\n calcIndentSize() {\n const prefix = (this.input as any)?.getHostElement()?.querySelector('ax-prefix') as HTMLElement;\n if (prefix) {\n this.label.getHostElement().style.insetInlineStart = prefix?.clientWidth + 'px';\n }\n }\n\n /**\n * Sets the required attribute for the input field based on validation rules.\n * Automatically updates if validation rules change.\n * @ignore\n */\n setRequired() {\n this.autoSetRequired();\n this.input?.validationRulesChange.pipe(this.unsubscriber.takeUntilDestroy).subscribe(() => {\n this.autoSetRequired();\n });\n }\n /**\n * Sets the label mode based on the form's label mode configuration.\n * @ignore\n */\n setLabelMode() {\n this._labelMode.set(this.form?.labelMode());\n }\n\n /**\n * Subscribes to focus and blur events on the input element.\n * Adds or removes the 'ax-state-focused' class to/from the host element based on the focus state.\n * @ignone\n */\n listeningEvent() {\n const focusEvent = this.input?.['onFocus'] as Subject<any>;\n focusEvent?.subscribe((e) => {\n // this.handleFloating('focus');\n this.host.element.nativeElement.classList.add('ax-state-focused');\n });\n //\n const blurEvent = this.input?.['onBlur'] as Subject<any>;\n blurEvent?.subscribe((e) => {\n // this.handleFloating('blur');\n this.host.element.nativeElement.classList.remove('ax-state-focused');\n });\n }\n // protected handleFloating(mode: 'focus' | 'blur') {\n // const _host = this.host.element.nativeElement as HTMLElement;\n // const placeholder = this.input;\n\n // switch (mode) {\n // case 'focus':\n // _host.classList.add('ax-state-floating');\n // this.label.getHostElement().style.insetInlineStart = 'inherit';\n\n // break;\n // case 'blur':\n // _host.classList.remove('ax-state-floating');\n\n // break;\n // }\n // }\n\n /**\n * @ignore\n */\n private autoSetRequired() {\n if (this.label && this.input) {\n if (this.label.required == null || this.label['autoSetRequired']) {\n this.label.required = this.input.isRequired;\n this.label['autoSetRequired'] = true;\n }\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string[] {\n let hasValue;\n if (this.input) {\n if (this.input instanceof AXSelectBoxComponent && this.input.multiple) {\n hasValue = (this.input as any).value?.length;\n } else {\n hasValue = this.input.value;\n }\n }\n return [`ax-state-${this._labelMode()}-label`, `${hasValue && 'ax-state-has-value'}`];\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface AXFormConfig {}\n\nexport const AX_FORM_CONFIG = new InjectionToken<AXFormConfig>('AX_FORM_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXFormDefaultConfig;\n },\n});\n\nexport const AXFormDefaultConfig: AXFormConfig = {};\n\nexport type PartialFormConfig = Partial<AXFormConfig>;\n\nexport function formConfig(config: PartialFormConfig = {}): AXFormConfig {\n const result = {\n ...AXFormDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXValuableComponent } from '@acorex/components/common';\nimport { AXValidationRuleOptions } from '@acorex/core/validation';\nimport { Directive, Input, OnDestroy, OnInit } from '@angular/core';\n\n@Directive({\n selector: 'ax-validation-rule',\n})\nexport class AXValidationRuleDirective implements OnInit, OnDestroy {\n @Input() rule: string;\n @Input() options: Omit<AXValidationRuleOptions, 'message'>;\n @Input() message: string;\n\n constructor(private host: AXValuableComponent) {}\n\n ngOnInit() {\n this.host.addValidationRule({ rule: this.rule, options: this.ruleOptions });\n }\n\n ngOnDestroy() {\n this.host.removeValidationRule({\n rule: this.rule,\n options: this.ruleOptions,\n });\n }\n\n private get ruleOptions(): AXValidationRuleOptions {\n return Object.assign({ message: this.message, name: this.host.name }, this.options);\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXToastService } from '@acorex/components/toast';\nimport { translateSync } from '@acorex/core/translation';\nimport { ChangeDetectionStrategy, Component, Inject, Input, OnDestroy, Optional, ViewEncapsulation } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormComponent, AXFormValidationEvent } from './form.component';\n\nexport type AXValidationSummaryDisplayMode = 'toast' | 'alert';\n\n/**\n * Displays validation summaries in the form of an alert.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-validation-summary',\n template: `\n @if (displayMode === 'alert' && _content) {\n <ax-alert color=\"danger\" [timeOut]=\"_timeOut\" #a (onClosed)=\"_handleOnDismissed()\">\n <ax-icon></ax-icon>\n <ax-title>{{ title | translate | async }}</ax-title>\n <ax-content>\n <div [innerHTML]=\"_content\"></div>\n </ax-content>\n <ax-footer>\n <ax-suffix>\n <ax-button text=\"Dismiss\" (onClick)=\"a.close()\"></ax-button>\n </ax-suffix>\n </ax-footer>\n </ax-alert>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXValidationSummaryComponent extends MXBaseComponent implements OnDestroy {\n /**\n * @ignore\n */\n protected _content?: string = null;\n\n /**\n * @ignore\n */\n private _title = 'validation.messages.title';\n\n /**\n * The title of the validation summary alert.\n */\n @Input()\n public get title(): string {\n return this._title;\n }\n\n /**\n * Sets the title of the validation summary alert.\n *\n * @param v The title to be set.\n */\n public set title(v: string) {\n this._title = v;\n }\n\n /**\n * Specifies the display mode for the validation summary.\n *\n * @defaultValue 'toast'\n */\n @Input()\n displayMode: AXValidationSummaryDisplayMode = 'toast';\n\n /**\n * Specifies the time in milliseconds before the validation summary automatically hides.\n */\n @Input()\n timeOut?: number;\n\n /**\n * Determines whether the validation summary should automatically hide after a specified time.\n * @defaultValue false\n */\n @Input()\n autoHide = false;\n\n /**\n * @ignore\n */\n protected _timeOut: number;\n\n /**\n * @ignore\n */\n private sub: Subscription;\n\n /**\n * @ignore\n */\n constructor(\n private _tosatService: AXToastService,\n @Optional()\n @Inject(AXFormComponent)\n private host: AXFormComponent,\n ) {\n super();\n //\n this.sub = host.onValidate.subscribe((e: AXFormValidationEvent) => {\n if (e.result.result) {\n this._content = null;\n } else {\n const failedRules = e.result.rules.filter((c) => !c.result && c.message);\n\n this._content = `<ul>${failedRules.map((c) => this.formatRule({ title: c['title'] as string, message: c.message })).join('')}</ul>`;\n this._timeOut = this.autoHide ? this.timeOut ?? Math.max(failedRules.length * 1000, 2000) : 0;\n\n if (this.displayMode == 'toast') {\n this._tosatService.show({\n color: 'danger',\n closeButton: true,\n timeOut: this._timeOut,\n timeOutProgress: true,\n content: this._content,\n title: translateSync(this.title),\n location: 'bottom-center',\n });\n }\n }\n this.cdr.markForCheck();\n });\n }\n\n /**\n * @ignore\n */\n private formatRule(rule: { title?: string; message: string }): string {\n return rule.title ? `<li><b>${rule.title}:</b> ${rule.message}</li>` : `<li>${rule.message}</li>`;\n }\n\n /**\n * @ignore\n */\n protected _handleOnDismissed() {\n this._content = null;\n }\n\n /**\n * @ignore\n */\n ngOnDestroy() {\n this.sub?.unsubscribe();\n }\n}\n","import { AXAlertModule } from '@acorex/components/alert';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXFormFieldComponent } from './form-field.component';\nimport { AXFormComponent } from './form.component';\nimport { AXValidationRuleDirective } from './validation-rule.directive';\nimport { AXValidationSummaryComponent } from './validation-summary.component';\n\n@NgModule({\n declarations: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n imports: [CommonModule, AXDecoratorModule, AXAlertModule, AXButtonModule, AXValidationModule, AXTranslationModule],\n exports: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n providers: [],\n})\nexport class AXFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA;;;AAGG;AACG,MAAO,qBAAsB,SAAQ,OAAO,CAAA;AAEjD;AAUD;;;;AAIG;AAaG,MAAO,eAAgB,SAAQ,eAAe,CAAA;AAWlD,IAAA,WAAW;AAiCX;;AAEG;AACH,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS;;AAGvB;;;AAGG;IACH,IAAW,QAAQ,CAAC,CAAiB,EAAA;QACnC,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,KAAK,EAAE,CAAC;YACR,aAAa,EAAE,MAAK;;aAEnB;AACF,SAAA,CAAC;;AAQJ;;AAEG;IACO,MAAM,aAAa,CAAC,CAAc,EAAA;QAC1C,CAAC,CAAC,cAAc,EAAE;AAClB,QAAA,MAAM,IAAI,CAAC,QAAQ,EAAE;;AAGvB;;AAEG;IACO,YAAY,GAAA;QACpB,IAAI,CAAC,KAAK,EAAE;;AAGd;;AAEG;AAC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,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AAC9G,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;oBAClH,OAAO,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AACzG,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACjBD;;AAEG;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXLookComponent, MXInputBaseValueComponent, AXComponent, AXFocusableComponent, AXClearableComponent, AXValuableComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { signal, Injectable, inject,
|
3
|
+
import { signal, Injectable, inject, Component, ViewEncapsulation, forwardRef, HostBinding, input, viewChild, afterNextRender, effect, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@acorex/components/loading';
|
5
5
|
import { AXLoadingModule } from '@acorex/components/loading';
|
6
6
|
import { AXDialogService, AXDialogModule } from '@acorex/components/dialog';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXBaseComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { EventEmitter,
|
3
|
+
import { EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, HostBinding, NgModule } from '@angular/core';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
|
6
6
|
/**
|
@@ -2,7 +2,7 @@ import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
2
2
|
import * as i1 from '@angular/common';
|
3
3
|
import { CommonModule } from '@angular/common';
|
4
4
|
import * as i0 from '@angular/core';
|
5
|
-
import { input, signal, effect,
|
5
|
+
import { input, signal, effect, Component, ViewEncapsulation, NgModule } from '@angular/core';
|
6
6
|
import { FormsModule } from '@angular/forms';
|
7
7
|
|
8
8
|
class JsonViewerComponent {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXBaseComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { EventEmitter,
|
3
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Output, Input, NgModule } from '@angular/core';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
|
6
6
|
/**
|
@@ -2,7 +2,7 @@ import { MXSelectionValueComponent, convertArrayToDataSource, AXListDataSource,
|
|
2
2
|
import * as i2 from '@angular/cdk/scrolling';
|
3
3
|
import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
|
4
4
|
import * as i0 from '@angular/core';
|
5
|
-
import { EventEmitter, signal, forwardRef, Optional, SkipSelf,
|
5
|
+
import { EventEmitter, signal, forwardRef, Optional, SkipSelf, Component, ChangeDetectionStrategy, ViewEncapsulation, Output, Input, ViewChild, HostListener, HostBinding, NgModule } from '@angular/core';
|
6
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
7
7
|
import * as i1 from '@angular/common';
|
8
8
|
import { CommonModule } from '@angular/common';
|
@@ -3,7 +3,7 @@ import { MXBaseComponent, AXCommonModule } from '@acorex/components/common';
|
|
3
3
|
import * as i1 from '@angular/cdk/dialog';
|
4
4
|
import { DIALOG_DATA, Dialog } from '@angular/cdk/dialog';
|
5
5
|
import * as i0 from '@angular/core';
|
6
|
-
import { signal,
|
6
|
+
import { signal, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, inject, Injectable, NgModule } from '@angular/core';
|
7
7
|
import * as i3 from '@acorex/components/progress-bar';
|
8
8
|
import { AXProgressBarModule } from '@acorex/components/progress-bar';
|
9
9
|
import * as i4 from '@acorex/components/loading';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import {
|
2
|
+
import { Component, ViewEncapsulation, Input, InjectionToken, inject, EventEmitter, ChangeDetectionStrategy, Output, Injectable, Directive, NgModule } from '@angular/core';
|
3
3
|
import { MXBaseComponent } from '@acorex/components/common';
|
4
4
|
import * as i1 from '@angular/cdk/portal';
|
5
5
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
@@ -191,8 +191,8 @@ class AXLoadingService {
|
|
191
191
|
ce.style.position = 'relative';
|
192
192
|
ov.style.position = 'absolute';
|
193
193
|
ce.appendChild(bg);
|
194
|
+
ce.appendChild(ov);
|
194
195
|
setTimeout(() => {
|
195
|
-
ce.appendChild(ov);
|
196
196
|
ov.style.position = 'absolute';
|
197
197
|
});
|
198
198
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-loading.mjs","sources":["../../../../libs/components/loading/src/lib/loading-spinner.component.ts","../../../../libs/components/loading/src/lib/loading.config.ts","../../../../libs/components/loading/src/lib/loading.component.ts","../../../../libs/components/loading/src/lib/loading.service.ts","../../../../libs/components/loading/src/lib/loading.directive.ts","../../../../libs/components/loading/src/lib/loading.module.ts","../../../../libs/components/loading/src/acorex-components-loading.ts"],"sourcesContent":["import { AXStyleColorType } from '@acorex/components/common';\nimport { Component, Input, ViewEncapsulation } from '@angular/core';\n\n/**\n * A loading spinner component that displays a rotating spinner icon.\n * @category Components\n */\n@Component({\n selector: 'ax-loading-spinner',\n template: `\n <span\n class=\"ax-loader ax-{{ color }}\"\n [style.width.px]=\"size\"\n [style.height.px]=\"size\"\n [style.border-width.px]=\"stroke\"\n [style.border-color]=\"color\"\n ></span>\n @if (text) {\n <span> {{ text }} </span>\n }\n `,\n styleUrls: ['./loading-spinner.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXLoadingSpinnerComponent {\n /**\n * The text to display alongside the spinner.\n * @ignore\n */\n @Input()\n text: string;\n\n /**\n * Color of the spinner. Can be a predefined style color or a custom color.\n * @defaultValue 'ghost'\n */\n @Input()\n color: AXStyleColorType | string = 'ghost';\n\n /**\n * Size of the spinner, in pixels. This determines both the width and height of the spinner.\n * @defaultValue 16\n */\n @Input() size = 16;\n\n /**\n * Thickness of the spinner's border, in pixels. This affects the visual weight of the spinner's outline.\n * @defaultValue 3\n */\n @Input() stroke = 3;\n}\n","import { InjectionToken } from '@angular/core';\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\n\nexport interface AXLoadingConfig {\n spinner: unknown;\n}\n\nexport const AX_LOADING_CONFIG = new InjectionToken<AXLoadingConfig>('AX_LOADING_CONFIG', {\n providedIn: 'root',\n factory: () => AXLoadingDefaultConfig,\n});\n\nexport const AXLoadingDefaultConfig: AXLoadingConfig = {\n spinner: AXLoadingSpinnerComponent,\n};\n\nexport type PartialLoadingConfig = Partial<AXLoadingConfig>;\n\nexport function loadingConfig(config: PartialLoadingConfig = {}): AXLoadingConfig {\n const result = {\n ...AXLoadingDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { CdkPortalOutletAttachedRef, ComponentPortal, ComponentType, Portal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { AXLoadingConfig, AX_LOADING_CONFIG } from './loading.config';\n\n/**\n * A component that displays a loading indicator.\n * @category Components\n */\n@Component({\n selector: 'ax-loading',\n template: `\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n `,\n styleUrls: ['./loading.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXLoadingComponent extends MXBaseComponent implements OnInit {\n private config: AXLoadingConfig = inject(AX_LOADING_CONFIG);\n\n /**\n * @ignore\n */\n protected _selectedPortal: Portal<unknown>;\n\n /**\n * Emits an event when the visibility state of the component changes.\n * @event\n */\n @Output()\n visibleChange: EventEmitter<boolean> = new EventEmitter();\n\n /**\n * @ignore\n */\n private _visible: boolean;\n\n /**\n * Determines whether the component is visible or not.\n */\n @Input()\n public get visible(): boolean {\n return this._visible;\n }\n\n /**\n * Sets the visibility of the component and emits a visibility change event.\n *\n * @param v - A boolean value indicating whether the component should be visible.\n */\n public set visible(v: boolean) {\n if (v != this._visible) {\n this._visible = v;\n v ? this.getHostElement().classList.remove('ax-hide') : this.getHostElement().classList.add('ax-hide');\n this.visibleChange.emit(v);\n }\n }\n\n /**\n * Specifies the type of loading indicator to display.\n * @defaultValue 'spinner'\n */\n @Input()\n type = 'spinner';\n\n /**\n * Provides additional context or data that may be used by the component.\n */\n @Input()\n context?: unknown;\n\n /**\n * @ignore\n */\n override ngOnInit() {\n super.ngOnInit();\n this._selectedPortal = new ComponentPortal(this.config.spinner as ComponentType<unknown>);\n this.cdr.markForCheck();\n }\n\n /**\n * @ignore\n */\n protected _handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<unknown>;\n if (ref.instance && this.context) {\n Object.assign(ref.instance, this.context);\n }\n }\n}\n","import { Dialog } from '@angular/cdk/dialog';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Observable, asyncScheduler } from 'rxjs';\nimport { finalize, observeOn } from 'rxjs/operators';\nimport { AXLoadingComponent } from './loading.component';\n\ntype LoadingContext = object;\ntype LoaderId = string | number; // expected enum values\nconst DEFAULT_LOADER_ID: LoaderId = '_DEFAULT';\n\n@Injectable()\nexport class AXLoadingService {\n // WeakMap will remove components from itself upon\n // their garbage collection by JS runtime.\n protected loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\n // Both loading state maps are kept in-sync such that\n // they can be used by both sync and async methods.\n protected loadingStates$ = new WeakMap<LoadingContext, Map<LoaderId, BehaviorSubject<boolean>>>();\n\n private dialog = inject(Dialog);\n\n show(config?: { location?: Element; type?: string; context?: unknown }): number {\n const ce = (config?.location ?? document.body) as HTMLDivElement;\n const dialogRef = this.dialog.open(AXLoadingComponent, {\n hasBackdrop: true,\n disableClose: true,\n restoreFocus: true,\n closeOnDestroy: true,\n closeOnNavigation: true,\n ariaModal: true,\n role: 'alertdialog',\n panelClass: ['ax-loading-pane', 'ax-animate-fadeIn'],\n backdropClass: ['ax-loading-overlay-backdrop', 'ax-animate-fadeIn'],\n });\n const id = new Date().getTime();\n dialogRef.componentInstance.visible = true;\n dialogRef.componentInstance.id = id.toString();\n if (ce != document.body) {\n const bg = dialogRef.overlayRef.backdropElement;\n const ov = dialogRef.overlayRef.overlayElement;\n ce.style.position = 'relative';\n ov.style.position = 'absolute';\n\n ce.appendChild(bg);\n\n setTimeout(() => {\n ce.appendChild(ov);\n ov.style.position = 'absolute';\n });\n }\n return id;\n // TODO: diabled focus and click, maybe we need a service and directive for it\n }\n\n hide(id: number): void {\n const f = this.dialog.openDialogs.find((c) => c.componentInstance.id === id.toString());\n if (f) {\n f.close();\n }\n }\n\n doLoading<V>(source$: Observable<V>, context: LoadingContext, loaderId?: LoaderId): Observable<V> {\n this.startLoading(context, loaderId);\n return source$.pipe(\n observeOn(asyncScheduler),\n finalize(() => this.endLoading(context, loaderId)),\n );\n }\n\n isLoading(context: LoadingContext, loaderId?: LoaderId): boolean {\n const loaderStates = this.loadingStates.get(context);\n\n if (!loaderStates) {\n return false;\n } else {\n if (loaderId !== undefined) {\n return loaderStates.get(this.getLoaderId(loaderId)) ?? false;\n } else {\n return [...loaderStates.values()].filter((state) => state).length > 0;\n }\n }\n }\n\n isLoading$(context: LoadingContext, loaderId?: LoaderId | any): Observable<boolean> {\n const coalescedLoaderId = this.getLoaderId(loaderId);\n\n if (!this.hasLoadingStates(context, coalescedLoaderId)) {\n this.setLoadingState(context, false, loaderId);\n }\n\n return this.loadingStates$.get(context).get(coalescedLoaderId);\n }\n\n startLoading(context: LoadingContext, loaderId?: LoaderId): void {\n this.setLoadingState(context, true, this.getLoaderId(loaderId));\n }\n\n endLoading(context: LoadingContext, loaderId?: LoaderId): void {\n this.setLoadingState(context, false, this.getLoaderId(loaderId));\n }\n\n clearLoadings(): void {\n this.loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\n this.loadingStates$ = new WeakMap<LoadingContext, Map<LoaderId, BehaviorSubject<boolean>>>();\n }\n\n protected setLoadingState(context: LoadingContext, state: boolean, loaderId: LoaderId): void {\n if (!this.hasLoadingStates(context, loaderId)) {\n if (this.hasContextLoadingState(context)) {\n this.loadingStates.get(context).set(loaderId, state);\n this.loadingStates$.get(context).set(loaderId, new BehaviorSubject<boolean>(state));\n } else {\n this.loadingStates.set(context, new Map<LoaderId, boolean>([[loaderId, state]]));\n this.loadingStates$.set(\n context,\n new Map<LoaderId, BehaviorSubject<boolean>>([[loaderId, new BehaviorSubject<boolean>(state)]]),\n );\n }\n } else {\n this.loadingStates.get(context).set(loaderId, state);\n this.loadingStates$.get(context).get(loaderId).next(state);\n }\n }\n\n protected hasLoadingStates(context: LoadingContext, loaderId: LoaderId) {\n return this.hasContextLoadingState(context) && this.hasLoaderLoadingState(context, loaderId);\n }\n\n protected hasContextLoadingState(context: LoadingContext) {\n return this.loadingStates.has(context) && this.loadingStates$.has(context);\n }\n\n protected hasLoaderLoadingState(context: LoadingContext, loaderId: LoaderId) {\n return this.loadingStates.get(context).has(loaderId) && this.loadingStates$.get(context).has(loaderId);\n }\n\n protected getLoaderId(loaderId?: LoaderId): LoaderId {\n return loaderId ?? DEFAULT_LOADER_ID;\n }\n}\n","import { Directive, ElementRef, Input } from '@angular/core';\nimport { AXLoadingService } from './loading.service';\n\n// This directive places an overlay with a loading spinner over its host element\n// if isLoading equals to true and hides the overlay when isLoading becomes false.\n@Directive({\n selector: '[axIsLoading]',\n})\nexport class AXLoadingDirective {\n private _hostElement!: HTMLDivElement;\n private _loadingRef!: number;\n\n private _isLoading: boolean;\n\n @Input('axIsLoading')\n public get isLoading(): boolean {\n return this._isLoading;\n }\n public set isLoading(v: boolean) {\n this._isLoading = v;\n if (v) {\n this._loadingRef = this.loadingService.show({\n location: this._hostElement,\n });\n } else {\n this.loadingService.hide(this._loadingRef);\n }\n }\n\n constructor(\n protected readonly elementRef: ElementRef,\n protected readonly loadingService: AXLoadingService,\n ) {\n this._hostElement = this.elementRef.nativeElement;\n }\n}\n","import { DialogModule } from '@angular/cdk/dialog';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\nimport { AXLoadingComponent } from './loading.component';\nimport { AXLoadingDirective } from './loading.directive';\nimport { AXLoadingService } from './loading.service';\n\nconst COMPONENT = [AXLoadingComponent, AXLoadingDirective, AXLoadingSpinnerComponent];\nconst MODULES = [CommonModule, OverlayModule, DialogModule, PortalModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXLoadingService],\n})\nexport class AXLoadingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AXLoadingService"],"mappings":";;;;;;;;;;;AAGA;;;AAGG;MAkBU,yBAAyB,CAAA;AAjBtC,IAAA,WAAA,GAAA;AAyBE;;;AAGG;QAEH,IAAK,CAAA,KAAA,GAA8B,OAAO;AAE1C;;;AAGG;QACM,IAAI,CAAA,IAAA,GAAG,EAAE;AAElB;;;AAGG;QACM,IAAM,CAAA,MAAA,GAAG,CAAC;AACpB;8GA1BY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,EAf1B,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA,OAAA,EAAA,IAAA,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,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,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,eAAe,iBATT,kBAAkB,EAAE,kBAAkB,EAAE,yBAAyB,aACnE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CADrD,kBAAkB,EAAE,kBAAkB,EAAE,yBAAyB,CAAA,EAAA,CAAA,CAAA;AASvE,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,eAAe,EAFf,SAAA,EAAA,CAAC,gBAAgB,CAAC,YAFhB,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,gBAAgB,CAAC;AAC9B,iBAAA;;;AClBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-loading.mjs","sources":["../../../../libs/components/loading/src/lib/loading-spinner.component.ts","../../../../libs/components/loading/src/lib/loading.config.ts","../../../../libs/components/loading/src/lib/loading.component.ts","../../../../libs/components/loading/src/lib/loading.service.ts","../../../../libs/components/loading/src/lib/loading.directive.ts","../../../../libs/components/loading/src/lib/loading.module.ts","../../../../libs/components/loading/src/acorex-components-loading.ts"],"sourcesContent":["import { AXStyleColorType } from '@acorex/components/common';\nimport { Component, Input, ViewEncapsulation } from '@angular/core';\n\n/**\n * A loading spinner component that displays a rotating spinner icon.\n * @category Components\n */\n@Component({\n selector: 'ax-loading-spinner',\n template: `\n <span\n class=\"ax-loader ax-{{ color }}\"\n [style.width.px]=\"size\"\n [style.height.px]=\"size\"\n [style.border-width.px]=\"stroke\"\n [style.border-color]=\"color\"\n ></span>\n @if (text) {\n <span> {{ text }} </span>\n }\n `,\n styleUrls: ['./loading-spinner.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXLoadingSpinnerComponent {\n /**\n * The text to display alongside the spinner.\n * @ignore\n */\n @Input()\n text: string;\n\n /**\n * Color of the spinner. Can be a predefined style color or a custom color.\n * @defaultValue 'ghost'\n */\n @Input()\n color: AXStyleColorType | string = 'ghost';\n\n /**\n * Size of the spinner, in pixels. This determines both the width and height of the spinner.\n * @defaultValue 16\n */\n @Input() size = 16;\n\n /**\n * Thickness of the spinner's border, in pixels. This affects the visual weight of the spinner's outline.\n * @defaultValue 3\n */\n @Input() stroke = 3;\n}\n","import { InjectionToken } from '@angular/core';\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\n\nexport interface AXLoadingConfig {\n spinner: unknown;\n}\n\nexport const AX_LOADING_CONFIG = new InjectionToken<AXLoadingConfig>('AX_LOADING_CONFIG', {\n providedIn: 'root',\n factory: () => AXLoadingDefaultConfig,\n});\n\nexport const AXLoadingDefaultConfig: AXLoadingConfig = {\n spinner: AXLoadingSpinnerComponent,\n};\n\nexport type PartialLoadingConfig = Partial<AXLoadingConfig>;\n\nexport function loadingConfig(config: PartialLoadingConfig = {}): AXLoadingConfig {\n const result = {\n ...AXLoadingDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { CdkPortalOutletAttachedRef, ComponentPortal, ComponentType, Portal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { AXLoadingConfig, AX_LOADING_CONFIG } from './loading.config';\n\n/**\n * A component that displays a loading indicator.\n * @category Components\n */\n@Component({\n selector: 'ax-loading',\n template: `\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n `,\n styleUrls: ['./loading.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXLoadingComponent extends MXBaseComponent implements OnInit {\n private config: AXLoadingConfig = inject(AX_LOADING_CONFIG);\n\n /**\n * @ignore\n */\n protected _selectedPortal: Portal<unknown>;\n\n /**\n * Emits an event when the visibility state of the component changes.\n * @event\n */\n @Output()\n visibleChange: EventEmitter<boolean> = new EventEmitter();\n\n /**\n * @ignore\n */\n private _visible: boolean;\n\n /**\n * Determines whether the component is visible or not.\n */\n @Input()\n public get visible(): boolean {\n return this._visible;\n }\n\n /**\n * Sets the visibility of the component and emits a visibility change event.\n *\n * @param v - A boolean value indicating whether the component should be visible.\n */\n public set visible(v: boolean) {\n if (v != this._visible) {\n this._visible = v;\n v ? this.getHostElement().classList.remove('ax-hide') : this.getHostElement().classList.add('ax-hide');\n this.visibleChange.emit(v);\n }\n }\n\n /**\n * Specifies the type of loading indicator to display.\n * @defaultValue 'spinner'\n */\n @Input()\n type = 'spinner';\n\n /**\n * Provides additional context or data that may be used by the component.\n */\n @Input()\n context?: unknown;\n\n /**\n * @ignore\n */\n override ngOnInit() {\n super.ngOnInit();\n this._selectedPortal = new ComponentPortal(this.config.spinner as ComponentType<unknown>);\n this.cdr.markForCheck();\n }\n\n /**\n * @ignore\n */\n protected _handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<unknown>;\n if (ref.instance && this.context) {\n Object.assign(ref.instance, this.context);\n }\n }\n}\n","import { Dialog } from '@angular/cdk/dialog';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Observable, asyncScheduler } from 'rxjs';\nimport { finalize, observeOn } from 'rxjs/operators';\nimport { AXLoadingComponent } from './loading.component';\n\ntype LoadingContext = object;\ntype LoaderId = string | number; // expected enum values\nconst DEFAULT_LOADER_ID: LoaderId = '_DEFAULT';\n\n@Injectable()\nexport class AXLoadingService {\n // WeakMap will remove components from itself upon\n // their garbage collection by JS runtime.\n protected loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\n // Both loading state maps are kept in-sync such that\n // they can be used by both sync and async methods.\n protected loadingStates$ = new WeakMap<LoadingContext, Map<LoaderId, BehaviorSubject<boolean>>>();\n\n private dialog = inject(Dialog);\n\n show(config?: { location?: Element; type?: string; context?: unknown }): number {\n const ce = (config?.location ?? document.body) as HTMLDivElement;\n const dialogRef = this.dialog.open(AXLoadingComponent, {\n hasBackdrop: true,\n disableClose: true,\n restoreFocus: true,\n closeOnDestroy: true,\n closeOnNavigation: true,\n ariaModal: true,\n role: 'alertdialog',\n panelClass: ['ax-loading-pane', 'ax-animate-fadeIn'],\n backdropClass: ['ax-loading-overlay-backdrop', 'ax-animate-fadeIn'],\n });\n const id = new Date().getTime();\n dialogRef.componentInstance.visible = true;\n dialogRef.componentInstance.id = id.toString();\n if (ce != document.body) {\n const bg = dialogRef.overlayRef.backdropElement;\n const ov = dialogRef.overlayRef.overlayElement;\n ce.style.position = 'relative';\n ov.style.position = 'absolute';\n\n ce.appendChild(bg);\n ce.appendChild(ov);\n setTimeout(() => {\n ov.style.position = 'absolute';\n });\n }\n return id;\n // TODO: diabled focus and click, maybe we need a service and directive for it\n }\n\n hide(id: number): void {\n const f = this.dialog.openDialogs.find((c) => c.componentInstance.id === id.toString());\n if (f) {\n f.close();\n }\n }\n\n doLoading<V>(source$: Observable<V>, context: LoadingContext, loaderId?: LoaderId): Observable<V> {\n this.startLoading(context, loaderId);\n return source$.pipe(\n observeOn(asyncScheduler),\n finalize(() => this.endLoading(context, loaderId)),\n );\n }\n\n isLoading(context: LoadingContext, loaderId?: LoaderId): boolean {\n const loaderStates = this.loadingStates.get(context);\n\n if (!loaderStates) {\n return false;\n } else {\n if (loaderId !== undefined) {\n return loaderStates.get(this.getLoaderId(loaderId)) ?? false;\n } else {\n return [...loaderStates.values()].filter((state) => state).length > 0;\n }\n }\n }\n\n isLoading$(context: LoadingContext, loaderId?: LoaderId | any): Observable<boolean> {\n const coalescedLoaderId = this.getLoaderId(loaderId);\n\n if (!this.hasLoadingStates(context, coalescedLoaderId)) {\n this.setLoadingState(context, false, loaderId);\n }\n\n return this.loadingStates$.get(context).get(coalescedLoaderId);\n }\n\n startLoading(context: LoadingContext, loaderId?: LoaderId): void {\n this.setLoadingState(context, true, this.getLoaderId(loaderId));\n }\n\n endLoading(context: LoadingContext, loaderId?: LoaderId): void {\n this.setLoadingState(context, false, this.getLoaderId(loaderId));\n }\n\n clearLoadings(): void {\n this.loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\n this.loadingStates$ = new WeakMap<LoadingContext, Map<LoaderId, BehaviorSubject<boolean>>>();\n }\n\n protected setLoadingState(context: LoadingContext, state: boolean, loaderId: LoaderId): void {\n if (!this.hasLoadingStates(context, loaderId)) {\n if (this.hasContextLoadingState(context)) {\n this.loadingStates.get(context).set(loaderId, state);\n this.loadingStates$.get(context).set(loaderId, new BehaviorSubject<boolean>(state));\n } else {\n this.loadingStates.set(context, new Map<LoaderId, boolean>([[loaderId, state]]));\n this.loadingStates$.set(\n context,\n new Map<LoaderId, BehaviorSubject<boolean>>([[loaderId, new BehaviorSubject<boolean>(state)]]),\n );\n }\n } else {\n this.loadingStates.get(context).set(loaderId, state);\n this.loadingStates$.get(context).get(loaderId).next(state);\n }\n }\n\n protected hasLoadingStates(context: LoadingContext, loaderId: LoaderId) {\n return this.hasContextLoadingState(context) && this.hasLoaderLoadingState(context, loaderId);\n }\n\n protected hasContextLoadingState(context: LoadingContext) {\n return this.loadingStates.has(context) && this.loadingStates$.has(context);\n }\n\n protected hasLoaderLoadingState(context: LoadingContext, loaderId: LoaderId) {\n return this.loadingStates.get(context).has(loaderId) && this.loadingStates$.get(context).has(loaderId);\n }\n\n protected getLoaderId(loaderId?: LoaderId): LoaderId {\n return loaderId ?? DEFAULT_LOADER_ID;\n }\n}\n","import { Directive, ElementRef, Input } from '@angular/core';\nimport { AXLoadingService } from './loading.service';\n\n// This directive places an overlay with a loading spinner over its host element\n// if isLoading equals to true and hides the overlay when isLoading becomes false.\n@Directive({\n selector: '[axIsLoading]',\n})\nexport class AXLoadingDirective {\n private _hostElement!: HTMLDivElement;\n private _loadingRef!: number;\n\n private _isLoading: boolean;\n\n @Input('axIsLoading')\n public get isLoading(): boolean {\n return this._isLoading;\n }\n public set isLoading(v: boolean) {\n this._isLoading = v;\n if (v) {\n this._loadingRef = this.loadingService.show({\n location: this._hostElement,\n });\n } else {\n this.loadingService.hide(this._loadingRef);\n }\n }\n\n constructor(\n protected readonly elementRef: ElementRef,\n protected readonly loadingService: AXLoadingService,\n ) {\n this._hostElement = this.elementRef.nativeElement;\n }\n}\n","import { DialogModule } from '@angular/cdk/dialog';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\nimport { AXLoadingComponent } from './loading.component';\nimport { AXLoadingDirective } from './loading.directive';\nimport { AXLoadingService } from './loading.service';\n\nconst COMPONENT = [AXLoadingComponent, AXLoadingDirective, AXLoadingSpinnerComponent];\nconst MODULES = [CommonModule, OverlayModule, DialogModule, PortalModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXLoadingService],\n})\nexport class AXLoadingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AXLoadingService"],"mappings":";;;;;;;;;;;AAGA;;;AAGG;MAkBU,yBAAyB,CAAA;AAjBtC,IAAA,WAAA,GAAA;AAyBE;;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E,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,gBAAgB,CAAC;AAC9B,iBAAA;;;AClBD;;AAEG;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AXLeafletService } from '@acorex/cdk/map';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { input, output, viewChild, inject, signal, afterNextRender, effect,
|
3
|
+
import { input, output, viewChild, inject, signal, afterNextRender, effect, Component, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
|
4
4
|
import { distinctUntilChanged } from 'rxjs/operators';
|
5
5
|
import { CommonModule } from '@angular/common';
|
6
6
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { signal, Injectable, inject, input, effect,
|
2
|
+
import { signal, Injectable, inject, input, effect, Component, ChangeDetectionStrategy, ViewEncapsulation, computed, afterNextRender, HostBinding, NgModule, Optional, Inject } from '@angular/core';
|
3
3
|
import { isBrowser } from '@acorex/core/platform';
|
4
4
|
import * as i1 from '@angular/cdk/portal';
|
5
5
|
import { ComponentPortal, CdkPortalOutlet } from '@angular/cdk/portal';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { NXClickEvent, NXComponent, NXEvent } from '@acorex/components/common';
|
2
2
|
import { AXUnsubscriber, AXHtmlUtil } from '@acorex/core/utils';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Injectable, signal, inject, Renderer2, computed, output, input, afterNextRender,
|
4
|
+
import { Injectable, signal, inject, Renderer2, computed, output, input, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, HostListener, HostBinding, NgModule } from '@angular/core';
|
5
5
|
import { Subject } from 'rxjs';
|
6
6
|
import { cloneDeep } from 'lodash-es';
|
7
7
|
import { isBrowser } from '@acorex/core/platform';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXInteractiveComponent, MXBaseComponent, AXCommonModule } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { EventEmitter,
|
3
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Output, Input, NgModule } from '@angular/core';
|
4
4
|
import { classes } from 'polytype';
|
5
5
|
import { CommonModule } from '@angular/common';
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXLookComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import {
|
3
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, NgModule } from '@angular/core';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
|
6
6
|
/**
|
@@ -4,7 +4,7 @@ import { DIALOG_DATA, Dialog, DialogModule } from '@angular/cdk/dialog';
|
|
4
4
|
import * as i2 from '@angular/cdk/portal';
|
5
5
|
import { TemplatePortal, ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
6
6
|
import * as i0 from '@angular/core';
|
7
|
-
import { TemplateRef,
|
7
|
+
import { TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, HostBinding, InjectionToken, inject, Injectable, NgModule } from '@angular/core';
|
8
8
|
import * as i3 from '@acorex/components/button';
|
9
9
|
import { AXButtonModule } from '@acorex/components/button';
|
10
10
|
import * as i4 from '@acorex/components/loading';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { forwardRef,
|
2
|
+
import { forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, HostListener, NgModule } from '@angular/core';
|
3
3
|
import * as i2 from 'angular-imask';
|
4
4
|
import { IMaskDirective, IMaskModule } from 'angular-imask';
|
5
5
|
import { createMask } from 'imask';
|