@dso-toolkit/angular 101.0.0 → 101.1.0
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,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Output, effect, model, input, HostListener, Directive, contentChildren, ElementRef, afterRenderEffect, forwardRef, NgModule } from '@angular/core';
|
|
3
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, Output, effect, model, input, output, afterEveryRender, HostListener, Directive, contentChildren, ElementRef, afterRenderEffect, forwardRef, NgModule } from '@angular/core';
|
|
4
4
|
import { fromEvent } from 'rxjs';
|
|
5
5
|
import { defineCustomElement as defineCustomElement$1 } from '@dso-toolkit/core/dist/components/dso-accordion.js';
|
|
6
6
|
import { defineCustomElement as defineCustomElement$2 } from '@dso-toolkit/core/dist/components/dso-accordion-section.js';
|
|
@@ -4223,8 +4223,7 @@ class DsoDatePickerFieldControl {
|
|
|
4223
4223
|
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
4224
4224
|
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
4225
4225
|
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
4226
|
-
|
|
4227
|
-
max = input(...(ngDevMode ? [undefined, { debugName: "max" }] : /* istanbul ignore next */ []));
|
|
4226
|
+
touch = output();
|
|
4228
4227
|
minDate = input(...(ngDevMode ? [undefined, { debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
4229
4228
|
maxDate = input(...(ngDevMode ? [undefined, { debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
4230
4229
|
inputError = model(...(ngDevMode ? [undefined, { debugName: "inputError" }] : /* istanbul ignore next */ []));
|
|
@@ -4235,14 +4234,13 @@ class DsoDatePickerFieldControl {
|
|
|
4235
4234
|
required: this.required,
|
|
4236
4235
|
invalid: this.invalid,
|
|
4237
4236
|
});
|
|
4238
|
-
// FormField
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
elementRef.nativeElement.max = this.maxDate();
|
|
4237
|
+
// FormField may overwrite the element's min/max through the generated Angular component.
|
|
4238
|
+
// Reapply minDate/maxDate after rendering so form constraints cannot replace the date limits.
|
|
4239
|
+
afterEveryRender({
|
|
4240
|
+
write: () => {
|
|
4241
|
+
elementRef.nativeElement.min = this.minDate();
|
|
4242
|
+
elementRef.nativeElement.max = this.maxDate();
|
|
4243
|
+
},
|
|
4246
4244
|
});
|
|
4247
4245
|
}
|
|
4248
4246
|
onDsoDateChange(event) {
|
|
@@ -4253,9 +4251,10 @@ class DsoDatePickerFieldControl {
|
|
|
4253
4251
|
this.inputError.set(event.detail.error);
|
|
4254
4252
|
this.value.set(event.detail.value);
|
|
4255
4253
|
this.touched.set(true);
|
|
4254
|
+
this.touch.emit();
|
|
4256
4255
|
}
|
|
4257
4256
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsoDatePickerFieldControl, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4258
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: DsoDatePickerFieldControl, isStandalone: true, selector: "dso-date-picker[formField]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null },
|
|
4257
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: DsoDatePickerFieldControl, isStandalone: true, selector: "dso-date-picker[formField]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, inputError: { classPropertyName: "inputError", publicName: "inputError", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", touch: "touch", inputError: "inputErrorChange" }, host: { listeners: { "dsoDateChange": "onDsoDateChange($event)", "dsoBlur": "onDsoBlur($event)" } }, ngImport: i0 });
|
|
4259
4258
|
}
|
|
4260
4259
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsoDatePickerFieldControl, decorators: [{
|
|
4261
4260
|
type: Directive,
|
|
@@ -4263,7 +4262,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
4263
4262
|
selector: "dso-date-picker[formField]",
|
|
4264
4263
|
standalone: true,
|
|
4265
4264
|
}]
|
|
4266
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }],
|
|
4265
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], touch: [{ type: i0.Output, args: ["touch"] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], inputError: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputError", required: false }] }, { type: i0.Output, args: ["inputErrorChange"] }], onDsoDateChange: [{
|
|
4267
4266
|
type: HostListener,
|
|
4268
4267
|
args: ["dsoDateChange", ["$event"]]
|
|
4269
4268
|
}], onDsoBlur: [{
|
|
@@ -4286,6 +4285,7 @@ class DsoSelectableCheckboxFieldControl {
|
|
|
4286
4285
|
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
4287
4286
|
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
4288
4287
|
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
4288
|
+
touch = output();
|
|
4289
4289
|
constructor(elementRef) {
|
|
4290
4290
|
syncFieldControlProperties(elementRef.nativeElement, "checked", {
|
|
4291
4291
|
value: this.checked,
|
|
@@ -4299,9 +4299,10 @@ class DsoSelectableCheckboxFieldControl {
|
|
|
4299
4299
|
}
|
|
4300
4300
|
onFocusOut() {
|
|
4301
4301
|
this.touched.set(true);
|
|
4302
|
+
this.touch.emit();
|
|
4302
4303
|
}
|
|
4303
4304
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsoSelectableCheckboxFieldControl, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4304
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: DsoSelectableCheckboxFieldControl, isStandalone: true, selector: "dso-selectable[type=checkbox][formField]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange" }, host: { listeners: { "dsoChange": "onDsoChange($event)", "focusout": "onFocusOut()" } }, ngImport: i0 });
|
|
4305
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: DsoSelectableCheckboxFieldControl, isStandalone: true, selector: "dso-selectable[type=checkbox][formField]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange", touch: "touch" }, host: { listeners: { "dsoChange": "onDsoChange($event)", "focusout": "onFocusOut()" } }, ngImport: i0 });
|
|
4305
4306
|
}
|
|
4306
4307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsoSelectableCheckboxFieldControl, decorators: [{
|
|
4307
4308
|
type: Directive,
|
|
@@ -4309,7 +4310,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
4309
4310
|
selector: "dso-selectable[type=checkbox][formField]",
|
|
4310
4311
|
standalone: true,
|
|
4311
4312
|
}]
|
|
4312
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], onDsoChange: [{
|
|
4313
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], touch: [{ type: i0.Output, args: ["touch"] }], onDsoChange: [{
|
|
4313
4314
|
type: HostListener,
|
|
4314
4315
|
args: ["dsoChange", ["$event"]]
|
|
4315
4316
|
}], onFocusOut: [{
|
|
@@ -4351,6 +4352,7 @@ class DsoSelectableRadioGroupFieldControl {
|
|
|
4351
4352
|
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
4352
4353
|
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
4353
4354
|
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
4355
|
+
touch = output();
|
|
4354
4356
|
options = contentChildren(DsoSelectable, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), descendants: true, read: ElementRef });
|
|
4355
4357
|
constructor(elementRef) {
|
|
4356
4358
|
this.elementRef = elementRef;
|
|
@@ -4409,6 +4411,7 @@ class DsoSelectableRadioGroupFieldControl {
|
|
|
4409
4411
|
const relatedTarget = event.relatedTarget;
|
|
4410
4412
|
if (!(relatedTarget instanceof Node) || !this.elementRef.nativeElement.contains(relatedTarget)) {
|
|
4411
4413
|
this.touched.set(true);
|
|
4414
|
+
this.touch.emit();
|
|
4412
4415
|
}
|
|
4413
4416
|
}
|
|
4414
4417
|
focus(options) {
|
|
@@ -4417,7 +4420,7 @@ class DsoSelectableRadioGroupFieldControl {
|
|
|
4417
4420
|
(radios.find((radio) => radio.checked) ?? radios[0])?.focus(options);
|
|
4418
4421
|
}
|
|
4419
4422
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsoSelectableRadioGroupFieldControl, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4420
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.22", type: DsoSelectableRadioGroupFieldControl, isStandalone: true, selector: "fieldset[dsoSelectableRadioGroup][formField]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange" }, host: { listeners: { "dsoChange": "onDsoChange($event)", "focusout": "onFocusOut($event)" } }, queries: [{ propertyName: "options", predicate: DsoSelectable, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0 });
|
|
4423
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.22", type: DsoSelectableRadioGroupFieldControl, isStandalone: true, selector: "fieldset[dsoSelectableRadioGroup][formField]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", touch: "touch" }, host: { listeners: { "dsoChange": "onDsoChange($event)", "focusout": "onFocusOut($event)" } }, queries: [{ propertyName: "options", predicate: DsoSelectable, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0 });
|
|
4421
4424
|
}
|
|
4422
4425
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsoSelectableRadioGroupFieldControl, decorators: [{
|
|
4423
4426
|
type: Directive,
|
|
@@ -4425,7 +4428,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
4425
4428
|
selector: "fieldset[dsoSelectableRadioGroup][formField]",
|
|
4426
4429
|
standalone: true,
|
|
4427
4430
|
}]
|
|
4428
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => DsoSelectable), { ...{ descendants: true, read: ElementRef }, isSignal: true }] }], onDsoChange: [{
|
|
4431
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], touch: [{ type: i0.Output, args: ["touch"] }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => DsoSelectable), { ...{ descendants: true, read: ElementRef }, isSignal: true }] }], onDsoChange: [{
|
|
4429
4432
|
type: HostListener,
|
|
4430
4433
|
args: ["dsoChange", ["$event"]]
|
|
4431
4434
|
}], onFocusOut: [{
|