@sumaris-net/ngx-components 2.9.0-alpha5 → 2.9.0-alpha7

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.
@@ -7095,8 +7095,9 @@ class MatAutocompleteField {
7095
7095
  this._fixMatSelectPanelPosition(overlayPane);
7096
7096
  // Fix overlay, for searchbar
7097
7097
  if (this.showSearchBar) {
7098
- const searchBarSubscription = await this._fixSearchbarOverlay(panelElement, overlayPane);
7099
- this._subscription.add(searchBarSubscription);
7098
+ searchBarSubscription = await this._fixSearchbarOverlay(panelElement, overlayPane);
7099
+ if (searchBarSubscription)
7100
+ this._subscription.add(searchBarSubscription);
7100
7101
  }
7101
7102
  // Show the panel
7102
7103
  this.renderer.removeClass(panelElement, 'cdk-visually-hidden');
@@ -7104,7 +7105,7 @@ class MatAutocompleteField {
7104
7105
  }
7105
7106
  // ON close
7106
7107
  else if (searchBarSubscription) {
7107
- searchBarSubscription?.unsubscribe();
7108
+ searchBarSubscription.unsubscribe();
7108
7109
  this._subscription.remove(searchBarSubscription);
7109
7110
  searchBarSubscription = null;
7110
7111
  }
@@ -7154,9 +7155,10 @@ class MatAutocompleteField {
7154
7155
  const overlayContainer = findParentWithClass(panelElement, 'cdk-overlay-container');
7155
7156
  if (!overlayContainer)
7156
7157
  return;
7157
- // DEBUG
7158
- console.debug(`${this.logPrefix} moving the "cdk-overlay" container from the "body" to the "ion-modal" container`);
7159
7158
  const originalParent = overlayContainer.parentElement;
7159
+ // DEBUG
7160
+ //if (this.debug)
7161
+ console.debug(`${this.logPrefix} moving the "cdk-overlay" container from the "${originalParent?.tagName || 'body'}" to the "ion-modal" container`);
7160
7162
  this.renderer.appendChild(modalElement, overlayContainer);
7161
7163
  const shiftLeft = (this._document.defaultView.innerWidth - modalElement.firstElementChild.getBoundingClientRect().width) / 2;
7162
7164
  const shiftTop = (this._document.defaultView.innerHeight - modalElement.firstElementChild.getBoundingClientRect().height) / 2;
@@ -7165,6 +7167,7 @@ class MatAutocompleteField {
7165
7167
  // Return the reverse function, to replace the container in body
7166
7168
  return new Subscription(() => {
7167
7169
  // DEBUG
7170
+ //if (this.debug)
7168
7171
  console.debug(`${this.logPrefix} moving the "cdk-overlay" container from the "ion-modal" to the "body" container`);
7169
7172
  this.renderer.appendChild(originalParent /*this.document.body*/, overlayContainer);
7170
7173
  });
@@ -11930,6 +11933,15 @@ class AppForm {
11930
11933
  set _enable(value) {
11931
11934
  this._enabled = value;
11932
11935
  }
11936
+ /**
11937
+ * @deprecated use errorTranslateOptions instead
11938
+ */
11939
+ get errorTranslatorOptions() {
11940
+ return this.errorTranslateOptions;
11941
+ }
11942
+ set errorTranslatorOptions(options) {
11943
+ this.errorTranslateOptions = options;
11944
+ }
11933
11945
  disable(opts) {
11934
11946
  this.form?.disable(opts);
11935
11947
  if (this._enabled) {
@@ -11951,7 +11963,7 @@ class AppForm {
11951
11963
  }
11952
11964
  debug = false;
11953
11965
  tabindex;
11954
- formErrorTranslateOptions;
11966
+ errorTranslateOptions;
11955
11967
  set form(value) {
11956
11968
  this.setForm(value);
11957
11969
  }
@@ -11972,14 +11984,13 @@ class AppForm {
11972
11984
  this.autocompleteFields = this.autocompleteHelper.fields;
11973
11985
  }
11974
11986
  ngOnInit() {
11975
- // Will enable/Disable the delegating angular form
11987
+ // Set defaults
11988
+ this.errorTranslateOptions = this.errorTranslateOptions || { separator: ', ', pathTranslator: this }; // Can be override in subclasses constructors
11989
+ // Enable/disable delegate form
11976
11990
  if (this._enabled)
11977
11991
  this.enable();
11978
11992
  else
11979
11993
  this.disable();
11980
- this.formErrorTranslateOptions = this.formErrorTranslateOptions || {
11981
- pathTranslator: this,
11982
- };
11983
11994
  }
11984
11995
  ngOnDestroy() {
11985
11996
  this._subscription.unsubscribe();
@@ -12175,7 +12186,7 @@ class AppForm {
12175
12186
  }
12176
12187
  }
12177
12188
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AppForm, deps: [{ token: i0.Injector }, { token: i1$2.UntypedFormGroup }], target: i0.ɵɵFactoryTarget.Directive });
12178
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: AppForm, inputs: { debug: "debug", tabindex: "tabindex", formErrorTranslateOptions: "formErrorTranslateOptions", form: "form" }, outputs: { onCancel: "onCancel", onSubmit: "onSubmit" }, ngImport: i0 });
12189
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: AppForm, inputs: { debug: "debug", tabindex: "tabindex", errorTranslateOptions: "errorTranslateOptions", form: "form" }, outputs: { onCancel: "onCancel", onSubmit: "onSubmit" }, ngImport: i0 });
12179
12190
  }
12180
12191
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AppForm, decorators: [{
12181
12192
  type: Directive
@@ -12183,7 +12194,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
12183
12194
  type: Input
12184
12195
  }], tabindex: [{
12185
12196
  type: Input
12186
- }], formErrorTranslateOptions: [{
12197
+ }], errorTranslateOptions: [{
12187
12198
  type: Input
12188
12199
  }], form: [{
12189
12200
  type: Input