@acorex/components 16.19.14 → 16.19.16
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.
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { ElementRef, Input, Inject, Optional, Component, Injectable, EventEmitter, Output, Directive, ContentChild, ViewChild, TemplateRef, HostListener, ViewEncapsulation, NgModule, ChangeDetectionStrategy, Attribute, ContentChildren, input, ViewChildren, output, inject, model, contentChild, afterNextRender, contentChildren, NO_ERRORS_SCHEMA, ViewContainerRef, HostBinding } from '@angular/core';
|
2
|
+
import { ElementRef, Input, Inject, Optional, Component, Injectable, EventEmitter, Output, Directive, ContentChild, ViewChild, TemplateRef, HostListener, ViewEncapsulation, NgModule, ChangeDetectionStrategy, Attribute, ContentChildren, input, ViewChildren, output, inject, ChangeDetectorRef, model, contentChild, afterNextRender, contentChildren, NO_ERRORS_SCHEMA, ViewContainerRef, HostBinding } from '@angular/core';
|
3
3
|
import * as i1$2 from '@acorex/core';
|
4
|
-
import { AXTranslator, AXHtmlUtil, AXConfig, AXDateTime, AXDateTimeRange, AXCoreModule, AXTranslatorModule,
|
4
|
+
import { AXTranslator, AXHtmlUtil, AXConfig, AXDateTime, AXDateTimeRange, AXCoreModule, AXTranslatorModule, AXObjectUtil, AXScrollModule, setPropByPath, AXColorUtil } from '@acorex/core';
|
5
5
|
import * as i1 from '@angular/cdk/overlay';
|
6
6
|
import { OverlayContainer, Overlay, OverlayModule } from '@angular/cdk/overlay';
|
7
7
|
import * as i1$3 from '@angular/cdk/portal';
|
@@ -4270,16 +4270,21 @@ class AXDatePickerComponent extends AXValidatableComponent {
|
|
4270
4270
|
if (!unValidDate) {
|
4271
4271
|
if ((!v && oldValue) ||
|
4272
4272
|
(this._value && !this._value.equal(oldValue, 'day'))) {
|
4273
|
-
|
4274
|
-
|
4275
|
-
|
4276
|
-
|
4277
|
-
|
4278
|
-
|
4279
|
-
|
4280
|
-
|
4281
|
-
|
4282
|
-
|
4273
|
+
if (this._value) {
|
4274
|
+
switch (this.dateType) {
|
4275
|
+
case this.ddMMyyyy:
|
4276
|
+
this.text = this._value.format(this.convertToAXFormatDate.DDMMYYYY);
|
4277
|
+
break;
|
4278
|
+
case this.MMddyyyy:
|
4279
|
+
this.text = this._value.format(this.convertToAXFormatDate.MMDDYYYY);
|
4280
|
+
break;
|
4281
|
+
default:
|
4282
|
+
this.text = this._value.format(this.convertToAXFormatDate.YYYYMMDD);
|
4283
|
+
break;
|
4284
|
+
}
|
4285
|
+
}
|
4286
|
+
else {
|
4287
|
+
this.text = null;
|
4283
4288
|
}
|
4284
4289
|
setTimeout(() => {
|
4285
4290
|
this.valueChange.emit(v);
|
@@ -6280,7 +6285,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
6280
6285
|
}] } });
|
6281
6286
|
|
6282
6287
|
class AXFormGroupComponent extends AXBaseComponent {
|
6283
|
-
|
6288
|
+
crd = inject(ChangeDetectorRef);
|
6284
6289
|
size = AXConfig.get('form')?.size || 'md';
|
6285
6290
|
div;
|
6286
6291
|
component;
|
@@ -6325,6 +6330,14 @@ class AXFormGroupComponent extends AXBaseComponent {
|
|
6325
6330
|
});
|
6326
6331
|
break;
|
6327
6332
|
case 'textArea':
|
6333
|
+
convertTypeComponent.onValueChanged.subscribe((e) => {
|
6334
|
+
if (e.value) {
|
6335
|
+
this.labelMode.set('over');
|
6336
|
+
}
|
6337
|
+
else {
|
6338
|
+
this.labelMode.set('float');
|
6339
|
+
}
|
6340
|
+
});
|
6328
6341
|
convertTypeComponent.onFocus.subscribe((e) => {
|
6329
6342
|
if (!e.target.value) {
|
6330
6343
|
this.labelMode.set('over');
|
@@ -6337,7 +6350,14 @@ class AXFormGroupComponent extends AXBaseComponent {
|
|
6337
6350
|
});
|
6338
6351
|
break;
|
6339
6352
|
default:
|
6340
|
-
convertTypeComponent.onValueChanged.subscribe((e) => {
|
6353
|
+
convertTypeComponent.onValueChanged.subscribe((e) => {
|
6354
|
+
if (e.value) {
|
6355
|
+
this.labelMode.set('over');
|
6356
|
+
}
|
6357
|
+
else {
|
6358
|
+
this.labelMode.set('float');
|
6359
|
+
}
|
6360
|
+
});
|
6341
6361
|
convertTypeComponent.onFocus.subscribe((e) => {
|
6342
6362
|
if (!e.component?.value) {
|
6343
6363
|
this.labelMode.set('over');
|
@@ -6351,11 +6371,11 @@ class AXFormGroupComponent extends AXBaseComponent {
|
|
6351
6371
|
}
|
6352
6372
|
});
|
6353
6373
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AXFormGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
6354
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.5", type: AXFormGroupComponent, isStandalone: false, selector: "ax-form-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, labelMode: { classPropertyName: "labelMode", publicName: "labelMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { labelMode: "labelModeChange" }, host: { styleAttribute: "width: 100%; display:contents;" }, queries: [{ propertyName: "label", first: true, predicate: AXLabelComponent, descendants: true, isSignal: true }, { propertyName: "component", first: true, predicate: AXValidatableComponent, descendants: true }], viewQueries: [{ propertyName: "div", first: true, predicate: ["div"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"ax form-group {{ size }} ax-form-group-container {{\n labelMode() !== 'static' && 'ax-margin-form'\n }}\"\n>\n <div *ngIf=\"labelMode() === 'static'\" class=\"ax-lable-static\">\n <ng-container *ngTemplateOutlet=\"lableRef\"></ng-container>\n </div>\n\n <div\n #div\n class=\"ax form-item {{ size }}
|
6374
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.5", type: AXFormGroupComponent, isStandalone: false, selector: "ax-form-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, labelMode: { classPropertyName: "labelMode", publicName: "labelMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { labelMode: "labelModeChange" }, host: { styleAttribute: "width: 100%; display:contents;" }, queries: [{ propertyName: "label", first: true, predicate: AXLabelComponent, descendants: true, isSignal: true }, { propertyName: "component", first: true, predicate: AXValidatableComponent, descendants: true }], viewQueries: [{ propertyName: "div", first: true, predicate: ["div"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"ax form-group {{ size }} ax-form-group-container {{\n labelMode() !== 'static' && 'ax-margin-form'\n }}\"\n>\n <div *ngIf=\"labelMode() === 'static'\" class=\"ax-lable-static\">\n <ng-container *ngTemplateOutlet=\"lableRef\"></ng-container>\n </div>\n\n <div\n #div\n class=\"ax form-item {{ size }}\"\n [ngClass]=\"{ 'required-state': required }\"\n >\n <div *ngIf=\"labelMode() !== 'static'\" class=\"ax-lable-{{ labelMode() }}\">\n <ng-container *ngTemplateOutlet=\"lableRef\"></ng-container>\n </div>\n\n <div class=\"ax buttons start-buttons\" #startButtons>\n <ng-content select=\"ax-button[start]\"></ng-content>\n </div>\n <div class=\"content\" #content>\n <ng-content></ng-content>\n </div>\n <div class=\"ax buttons end-buttons\" #endButtons>\n <ng-content select=\"ax-button[end]\"></ng-content>\n <ng-content select=\"ax-button\"></ng-content>\n </div>\n </div>\n</div>\n\n<ng-template #lableRef><ng-content select=\"ax-label\"></ng-content></ng-template>\n", styles: [".ax-form-group-container{position:relative}.ax-form-group-container .ax-lable-static{position:static}.ax-form-group-container .ax-lable-float{top:50%;transform:translateY(-50%)}.ax-form-group-container .ax-lable-over{top:-9%}.ax-form-group-container .ax-lable-over label{transition:all .2s ease-in-out;font-size:.67rem!important}.ax-form-group-container .ax-lable-over,.ax-form-group-container .ax-lable-float{position:absolute;z-index:999;transition:all .15s ease-in-out;inset-inline-start:.3rem;color:var(--ax-gray-dark-color)}.ax-form-group-container .form-group-label{padding:.1rem .5rem!important}.ax-form-group-container.ax-margin-form{margin-bottom:.5rem}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
6355
6375
|
}
|
6356
6376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AXFormGroupComponent, decorators: [{
|
6357
6377
|
type: Component,
|
6358
|
-
args: [{ selector: 'ax-form-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'width: 100%; display:contents;' }, standalone: false, template: "<div\n class=\"ax form-group {{ size }} ax-form-group-container {{\n labelMode() !== 'static' && 'ax-margin-form'\n }}\"\n>\n <div *ngIf=\"labelMode() === 'static'\" class=\"ax-lable-static\">\n <ng-container *ngTemplateOutlet=\"lableRef\"></ng-container>\n </div>\n\n <div\n #div\n class=\"ax form-item {{ size }}
|
6378
|
+
args: [{ selector: 'ax-form-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'width: 100%; display:contents;' }, standalone: false, template: "<div\n class=\"ax form-group {{ size }} ax-form-group-container {{\n labelMode() !== 'static' && 'ax-margin-form'\n }}\"\n>\n <div *ngIf=\"labelMode() === 'static'\" class=\"ax-lable-static\">\n <ng-container *ngTemplateOutlet=\"lableRef\"></ng-container>\n </div>\n\n <div\n #div\n class=\"ax form-item {{ size }}\"\n [ngClass]=\"{ 'required-state': required }\"\n >\n <div *ngIf=\"labelMode() !== 'static'\" class=\"ax-lable-{{ labelMode() }}\">\n <ng-container *ngTemplateOutlet=\"lableRef\"></ng-container>\n </div>\n\n <div class=\"ax buttons start-buttons\" #startButtons>\n <ng-content select=\"ax-button[start]\"></ng-content>\n </div>\n <div class=\"content\" #content>\n <ng-content></ng-content>\n </div>\n <div class=\"ax buttons end-buttons\" #endButtons>\n <ng-content select=\"ax-button[end]\"></ng-content>\n <ng-content select=\"ax-button\"></ng-content>\n </div>\n </div>\n</div>\n\n<ng-template #lableRef><ng-content select=\"ax-label\"></ng-content></ng-template>\n", styles: [".ax-form-group-container{position:relative}.ax-form-group-container .ax-lable-static{position:static}.ax-form-group-container .ax-lable-float{top:50%;transform:translateY(-50%)}.ax-form-group-container .ax-lable-over{top:-9%}.ax-form-group-container .ax-lable-over label{transition:all .2s ease-in-out;font-size:.67rem!important}.ax-form-group-container .ax-lable-over,.ax-form-group-container .ax-lable-float{position:absolute;z-index:999;transition:all .15s ease-in-out;inset-inline-start:.3rem;color:var(--ax-gray-dark-color)}.ax-form-group-container .form-group-label{padding:.1rem .5rem!important}.ax-form-group-container.ax-margin-form{margin-bottom:.5rem}\n"] }]
|
6359
6379
|
}], propDecorators: { size: [{
|
6360
6380
|
type: Input
|
6361
6381
|
}], div: [{
|