@vallift/ngl 22.0.14 → 22.0.15

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.
@@ -14579,15 +14579,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
14579
14579
  }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], iconSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSrc", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
14580
14580
 
14581
14581
  class SignalError {
14582
- getSignalFieldErrorMessage = getSignalFieldErrorMessage;
14582
+ signalFormErrors = inject(SIGNAL_FORM_ERRORS);
14583
14583
  formField = input.required(/* @ts-ignore */
14584
14584
  ...(ngDevMode ? [{ debugName: "formField" }] : /* istanbul ignore next */ []));
14585
+ fieldState = computed(() => this.formField()(), /* @ts-ignore */
14586
+ ...(ngDevMode ? [{ debugName: "fieldState" }] : /* istanbul ignore next */ []));
14587
+ showError = computed(() => {
14588
+ const state = this.fieldState();
14589
+ return state.invalid() && (state.touched() || state.dirty());
14590
+ }, /* @ts-ignore */
14591
+ ...(ngDevMode ? [{ debugName: "showError" }] : /* istanbul ignore next */ []));
14592
+ errorMessage = computed(() => getSignalValidationErrorMessage(this.fieldState().errors(), this.signalFormErrors), /* @ts-ignore */
14593
+ ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
14585
14594
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalError, deps: [], target: i0.ɵɵFactoryTarget.Component });
14586
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: SignalError, isStandalone: true, selector: "lib-signal-error", inputs: { formField: { classPropertyName: "formField", publicName: "formField", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<p class=\"text-caption text-error\">{{ getSignalFieldErrorMessage(formField()) }}</p>\n", styles: [""] });
14595
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: SignalError, isStandalone: true, selector: "lib-signal-error", inputs: { formField: { classPropertyName: "formField", publicName: "formField", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"grid transition-[grid-template-rows,margin-top] duration-300 ease-in-out\"\n [ngClass]=\"showError() ? 'grid-rows-[1fr] mt-2' : 'grid-rows-[0fr] mt-0'\">\n <p\n class=\"overflow-hidden min-h-0 text-caption text-error transition-[opacity,transform] duration-300 ease-in-out\"\n [class.opacity-0]=\"!showError()\"\n [class.opacity-100]=\"showError()\"\n [class.-translate-y-1]=\"!showError()\"\n [class.translate-y-0]=\"showError()\"\n [attr.role]=\"showError() ? 'alert' : null\"\n [attr.aria-hidden]=\"!showError()\">\n {{ showError() ? (errorMessage() ?? '') : '' }}\n </p>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
14587
14596
  }
14588
14597
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalError, decorators: [{
14589
14598
  type: Component,
14590
- args: [{ selector: 'lib-signal-error', imports: [], template: "<p class=\"text-caption text-error\">{{ getSignalFieldErrorMessage(formField()) }}</p>\n" }]
14599
+ args: [{ selector: 'lib-signal-error', imports: [NgClass], template: "<div\n class=\"grid transition-[grid-template-rows,margin-top] duration-300 ease-in-out\"\n [ngClass]=\"showError() ? 'grid-rows-[1fr] mt-2' : 'grid-rows-[0fr] mt-0'\">\n <p\n class=\"overflow-hidden min-h-0 text-caption text-error transition-[opacity,transform] duration-300 ease-in-out\"\n [class.opacity-0]=\"!showError()\"\n [class.opacity-100]=\"showError()\"\n [class.-translate-y-1]=\"!showError()\"\n [class.translate-y-0]=\"showError()\"\n [attr.role]=\"showError() ? 'alert' : null\"\n [attr.aria-hidden]=\"!showError()\">\n {{ showError() ? (errorMessage() ?? '') : '' }}\n </p>\n</div>\n" }]
14591
14600
  }], propDecorators: { formField: [{ type: i0.Input, args: [{ isSignal: true, alias: "formField", required: true }] }] } });
14592
14601
 
14593
14602
  class DateUtils {