@ascentgl/ads-ui 21.65.0 → 21.67.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.
|
@@ -9873,7 +9873,7 @@ class AdsTimeFieldComponent extends AdsInputDropdownComponent {
|
|
|
9873
9873
|
this.timeControl = new FormControl('', { validators: [TIME_VALIDATOR], nonNullable: true, updateOn: 'blur' });
|
|
9874
9874
|
/** @ignore */
|
|
9875
9875
|
this.periodOptions = ['AM', 'PM'];
|
|
9876
|
-
this.
|
|
9876
|
+
this.defaultErrorMessages = {
|
|
9877
9877
|
mask: 'Time must be in the format HH:mm.',
|
|
9878
9878
|
invalidTime: 'Enter a valid time in 12-hour format (01:00 - 12:59).',
|
|
9879
9879
|
invalidMilitaryTime: 'Enter a valid time in 24-hour format (00:00 - 23:59).',
|
|
@@ -9882,6 +9882,10 @@ class AdsTimeFieldComponent extends AdsInputDropdownComponent {
|
|
|
9882
9882
|
this.subscription = Subscription.EMPTY;
|
|
9883
9883
|
}
|
|
9884
9884
|
/** @ignore */
|
|
9885
|
+
get mergedErrorMessages() {
|
|
9886
|
+
return { ...this.defaultErrorMessages, ...this.errorMessages };
|
|
9887
|
+
}
|
|
9888
|
+
/** @ignore */
|
|
9885
9889
|
ngOnChanges(changes) {
|
|
9886
9890
|
super.ngOnChanges(changes);
|
|
9887
9891
|
// When validation-suppression is turned off, revalidate internal controls too.
|
|
@@ -9974,11 +9978,11 @@ class AdsTimeFieldComponent extends AdsInputDropdownComponent {
|
|
|
9974
9978
|
}
|
|
9975
9979
|
}
|
|
9976
9980
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AdsTimeFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
9977
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AdsTimeFieldComponent, isStandalone: false, selector: "ads-time-field", inputs: { militaryTime: { classPropertyName: "militaryTime", publicName: "militaryTime", isSignal: true, isRequired: false, transformFunction: null }, hideClockIcon: { classPropertyName: "hideClockIcon", publicName: "hideClockIcon", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (militaryTime()) {\n <ads-input\n [control]=\"valueControl\"\n [skipValidationWhenEmpty]=\"skipValidationWhenEmpty\"\n mask=\"Hh:m0\"\n [onBlur]=\"onBlurUpdateTime\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [errorMessages]=\"
|
|
9981
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AdsTimeFieldComponent, isStandalone: false, selector: "ads-time-field", inputs: { militaryTime: { classPropertyName: "militaryTime", publicName: "militaryTime", isSignal: true, isRequired: false, transformFunction: null }, hideClockIcon: { classPropertyName: "hideClockIcon", publicName: "hideClockIcon", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (militaryTime()) {\n <ads-input\n [control]=\"valueControl\"\n [skipValidationWhenEmpty]=\"skipValidationWhenEmpty\"\n mask=\"Hh:m0\"\n [onBlur]=\"onBlurUpdateTime\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [errorMessages]=\"mergedErrorMessages\"\n [width]=\"width\"\n [showClockIcon]=\"!hideClockIcon()\"\n [showClearButton]=\"showClearButton\"\n />\n} @else {\n <ads-input-dropdown\n [width]=\"width\"\n [label]=\"label\"\n [options]=\"periodOptions\"\n [hasEmptyValue]=\"false\"\n [control]=\"timeControl\"\n [dropdownControl]=\"periodControl\"\n [skipValidationWhenEmpty]=\"skipValidationWhenEmpty\"\n [placeholder]=\"placeholder\"\n [id]=\"id\"\n [dropdownId]=\"dropdownId\"\n [dropdownLabel]=\"'AM/PM'\"\n [dropdownPlaceholder]=\"dropdownPlaceholder\"\n [dropdownWidth]=\"'128px'\"\n [inputWidth]=\"inputWidth\"\n [tooltip]=\"tooltip\"\n [size]=\"size\"\n [successMessage]=\"successMessage\"\n [errorMessages]=\"mergedErrorMessages\"\n [showExclamationOnError]=\"showExclamationOnError\"\n [showClearButton]=\"showClearButton\"\n [immediateValidation]=\"immediateValidation\"\n mask=\"Hh:m0\"\n />\n}\n", styles: [":host::ng-deep .mdc-floating-label{max-width:100%!important}\n", ".footer-container{min-height:20px;overflow:hidden}.footer-container.dynamic{min-height:0;max-height:0;opacity:0;transition:max-height .3s ease-in-out,opacity .2s ease-in-out,min-height .3s ease-in-out}.footer-container.dynamic.has-content{min-height:20px;max-height:100px;opacity:1;transition:max-height .3s ease-in-out,opacity .3s ease-in-out .1s,min-height .3s ease-in-out}::ng-deep .mat-mdc-form-field{--mat-form-field-filled-input-text-placeholder-color: var(--color-medium) !important}::ng-deep .spinner{animation:spin 1s linear infinite;transform-origin:50% 50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "component", type: AdsInputDropdownComponent, selector: "ads-input-dropdown", inputs: ["maxlength", "type", "pattern", "dropdownControl", "dropdownId", "dropdownLabel", "dropdownPlaceholder", "inputWidth", "dropdownWidth", "autoSelectSingleDropdownOption", "options", "displayValueKey", "hasEmptyValue", "fitContent", "mask", "suffix", "prefix", "dropSpecialCharacters", "thousandSeparator", "decimalMarker", "showTooltip", "closeOnOutOfView", "outOfViewRootMargin"] }, { kind: "component", type: AdsInputComponent, selector: "ads-input", inputs: ["maxlength", "type", "pattern", "defaultValue", "isPasswordField", "showClockIcon", "mask", "suffix", "prefix", "dropSpecialCharacters", "thousandSeparator", "decimalMarker", "matAutocomplete", "showSearchIcon", "onFocus", "onBlur", "rightHint"] }] }); }
|
|
9978
9982
|
}
|
|
9979
9983
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AdsTimeFieldComponent, decorators: [{
|
|
9980
9984
|
type: Component,
|
|
9981
|
-
args: [{ selector: 'ads-time-field', standalone: false, template: "@if (militaryTime()) {\n <ads-input\n [control]=\"valueControl\"\n [skipValidationWhenEmpty]=\"skipValidationWhenEmpty\"\n mask=\"Hh:m0\"\n [onBlur]=\"onBlurUpdateTime\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [errorMessages]=\"
|
|
9985
|
+
args: [{ selector: 'ads-time-field', standalone: false, template: "@if (militaryTime()) {\n <ads-input\n [control]=\"valueControl\"\n [skipValidationWhenEmpty]=\"skipValidationWhenEmpty\"\n mask=\"Hh:m0\"\n [onBlur]=\"onBlurUpdateTime\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [errorMessages]=\"mergedErrorMessages\"\n [width]=\"width\"\n [showClockIcon]=\"!hideClockIcon()\"\n [showClearButton]=\"showClearButton\"\n />\n} @else {\n <ads-input-dropdown\n [width]=\"width\"\n [label]=\"label\"\n [options]=\"periodOptions\"\n [hasEmptyValue]=\"false\"\n [control]=\"timeControl\"\n [dropdownControl]=\"periodControl\"\n [skipValidationWhenEmpty]=\"skipValidationWhenEmpty\"\n [placeholder]=\"placeholder\"\n [id]=\"id\"\n [dropdownId]=\"dropdownId\"\n [dropdownLabel]=\"'AM/PM'\"\n [dropdownPlaceholder]=\"dropdownPlaceholder\"\n [dropdownWidth]=\"'128px'\"\n [inputWidth]=\"inputWidth\"\n [tooltip]=\"tooltip\"\n [size]=\"size\"\n [successMessage]=\"successMessage\"\n [errorMessages]=\"mergedErrorMessages\"\n [showExclamationOnError]=\"showExclamationOnError\"\n [showClearButton]=\"showClearButton\"\n [immediateValidation]=\"immediateValidation\"\n mask=\"Hh:m0\"\n />\n}\n", styles: [":host::ng-deep .mdc-floating-label{max-width:100%!important}\n", ".footer-container{min-height:20px;overflow:hidden}.footer-container.dynamic{min-height:0;max-height:0;opacity:0;transition:max-height .3s ease-in-out,opacity .2s ease-in-out,min-height .3s ease-in-out}.footer-container.dynamic.has-content{min-height:20px;max-height:100px;opacity:1;transition:max-height .3s ease-in-out,opacity .3s ease-in-out .1s,min-height .3s ease-in-out}::ng-deep .mat-mdc-form-field{--mat-form-field-filled-input-text-placeholder-color: var(--color-medium) !important}::ng-deep .spinner{animation:spin 1s linear infinite;transform-origin:50% 50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
9982
9986
|
}], propDecorators: { militaryTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "militaryTime", required: false }] }], hideClockIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideClockIcon", required: false }] }] } });
|
|
9983
9987
|
|
|
9984
9988
|
class AdsTimeFieldModule {
|