mn-angular-lib 2.0.45 → 2.0.46

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.
@@ -215,6 +215,12 @@ var MnInputField = class MnInputField {
215
215
  this.destroyRef.onDestroy(() => sub.unsubscribe());
216
216
  if (this.props.autoFocus) setTimeout(() => this.focus(), 0);
217
217
  }
218
+ ngOnChanges(changes) {
219
+ if (changes["props"] && !changes["props"].firstChange && this.props) {
220
+ this.resolveConfig();
221
+ this.cdr.markForCheck();
222
+ }
223
+ }
218
224
  focus() {
219
225
  const input = this.el.nativeElement.querySelector("input");
220
226
  if (input) input.focus({ preventScroll: true });
@@ -376,6 +382,7 @@ var MnInputField = class MnInputField {
376
382
  "style.display": "props?.fullWidth ? 'block' : null",
377
383
  "style.width": "props?.fullWidth ? '100%' : null"
378
384
  } },
385
+ usesOnChanges: true,
379
386
  ngImport: i0,
380
387
  template: "<div class=\"flex flex-col h-full\" [class.is-fullwidth]=\"props.fullWidth\">\n <!-- Label -->\n @if (uiConfig.label) {\n <label class=\"pl-2 pb-1 flex flex-row gap-x-0.5! text-base!\" [attr.for]=\"resolvedId\">\n <p>{{ uiConfig.label }}</p>\n @if (isRequired()) {\n <span class=\"text-error\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n <!-- Input Element -->\n <input\n [id]=\"resolvedId\"\n [attr.aria-required]=\"isRequired() || null\"\n [attr.name]=\"resolvedName\"\n [type]=\"props.type\"\n [attr.placeholder]=\"uiConfig.placeholder || null\"\n [attr.aria-label]=\"uiConfig.ariaLabel || uiConfig.label || null\"\n [attr.aria-invalid]=\"showError || null\"\n [attr.aria-describedby]=\"showError ? errorDescribedBy : null\"\n [attr.aria-activedescendant]=\"props.ariaActiveDescendant || null\"\n [disabled]=\"isDisabled\"\n [attr.autocomplete]=\"props.autocomplete || null\"\n [attr.min]=\"minAttr\"\n [attr.max]=\"maxAttr\"\n [ngModel]=\"value\"\n [ngClass]=\"inputClasses\"\n (input)=\"handleInput(($any($event.target)).value)\"\n (search)=\"handleInput(($any($event.target)).value)\"\n (blur)=\"handleBlur()\"\n />\n\n <!-- Error Messages -->\n @if (showError) {\n <!-- Show all errors mode -->\n @if (props.showAllErrors) {\n <div class=\"flex flex-col gap-y-1\">\n @for (error of errorMessages; track $index) {\n <mn-error-message [errorMessage]=\"error\" [id]=\"resolvedId + '-' + $index\"></mn-error-message>\n }\n </div>\n } @else {\n @if (errorMessage !== null) {\n <mn-error-message [errorMessage]=\"errorMessage\" [id]=\"resolvedId\"></mn-error-message>\n\n }\n }\n }\n</div>\n",
381
388
  styles: ["input::-webkit-search-cancel-button{cursor:pointer}\n"],