@sumaris-net/ngx-components 18.2.34 → 18.2.35-alpha2

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.
@@ -8161,7 +8161,7 @@ class MatAutocompleteField {
8161
8161
  this.cd.markForCheck();
8162
8162
  }
8163
8163
  focus() {
8164
- if (this.mobile) {
8164
+ if (this.matSelect) {
8165
8165
  this.matSelect.focus();
8166
8166
  }
8167
8167
  else {
@@ -8312,14 +8312,13 @@ class MatAutocompleteField {
8312
8312
  this._subscription.add(this._openedSubscription);
8313
8313
  }
8314
8314
  get isOpen() {
8315
- return (!this.mobile && this.autocomplete?.isOpen) || this.matSelect?.panelOpen || false;
8315
+ return this.autocomplete?.isOpen || this.matSelect?.panelOpen || false;
8316
8316
  }
8317
8317
  closePanel() {
8318
8318
  if (this.autocomplete?.isOpen) {
8319
8319
  this.autocompleteTrigger?.closePanel();
8320
- return;
8321
8320
  }
8322
- if (this.matSelect?.panelOpen) {
8321
+ else if (this.matSelect?.panelOpen) {
8323
8322
  this.matSelect?.close();
8324
8323
  }
8325
8324
  }
@@ -36833,7 +36832,8 @@ class AppEditor extends AppFormContainer {
36833
36832
  toolbar = null;
36834
36833
  formButtonsBar = null;
36835
36834
  content;
36836
- constructor(route, router, navController, alertCtrl, translate) {
36835
+ constructor(route, // Modal editor give 'null'
36836
+ router, navController, alertCtrl, translate) {
36837
36837
  super();
36838
36838
  this.route = route;
36839
36839
  this.router = router;
@@ -37048,12 +37048,14 @@ class AppEditor extends AppFormContainer {
37048
37048
  throw new Error("Missing toastController in component's constructor");
37049
37049
  await Toasts.show(this.toastController, this.translate, opts);
37050
37050
  }
37051
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: AppEditor, deps: [{ token: i1$5.ActivatedRoute }, { token: i1$5.Router }, { token: i2$1.NavController }, { token: i2$1.AlertController }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Directive });
37051
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: AppEditor, deps: [{ token: i1$5.ActivatedRoute, optional: true }, { token: i1$5.Router }, { token: i2$1.NavController }, { token: i2$1.AlertController }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Directive });
37052
37052
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: AppEditor, viewQueries: [{ propertyName: "toolbar", first: true, predicate: ToolbarToken, descendants: true }, { propertyName: "formButtonsBar", first: true, predicate: FormButtonsBarToken, descendants: true, static: true }, { propertyName: "content", first: true, predicate: IonContent, descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
37053
37053
  }
37054
37054
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: AppEditor, decorators: [{
37055
37055
  type: Directive
37056
- }], ctorParameters: () => [{ type: i1$5.ActivatedRoute }, { type: i1$5.Router }, { type: i2$1.NavController }, { type: i2$1.AlertController }, { type: i1$1.TranslateService }], propDecorators: { toolbar: [{
37056
+ }], ctorParameters: () => [{ type: i1$5.ActivatedRoute, decorators: [{
37057
+ type: Optional
37058
+ }] }, { type: i1$5.Router }, { type: i2$1.NavController }, { type: i2$1.AlertController }, { type: i1$1.TranslateService }], propDecorators: { toolbar: [{
37057
37059
  type: ViewChild,
37058
37060
  args: [ToolbarToken]
37059
37061
  }], formButtonsBar: [{
@@ -37080,11 +37082,6 @@ class AppTabEditorOptions {
37080
37082
  }
37081
37083
  // eslint-disable-next-line @angular-eslint/directive-class-suffix
37082
37084
  class AppTabEditor extends AppEditor {
37083
- route;
37084
- router;
37085
- navController;
37086
- alertCtrl;
37087
- translate;
37088
37085
  _selectedTabIndex = 0;
37089
37086
  // Editor options
37090
37087
  tabCount;
@@ -37102,11 +37099,6 @@ class AppTabEditor extends AppEditor {
37102
37099
  constructor(route, // Modal editor give 'null'
37103
37100
  router, navController, alertCtrl, translate, options) {
37104
37101
  super(route, router, navController, alertCtrl, translate);
37105
- this.route = route;
37106
- this.router = router;
37107
- this.navController = navController;
37108
- this.alertCtrl = alertCtrl;
37109
- this.translate = translate;
37110
37102
  options = {
37111
37103
  tabCount: 1,
37112
37104
  enableSwipe: true,
@@ -37176,10 +37168,11 @@ class AppTabEditor extends AppEditor {
37176
37168
  if (queryTabIndexParamName === 'tab' && isNotNil(this.queryParams['subtab'])) {
37177
37169
  delete this.queryParams.subtab; // clean subtab
37178
37170
  }
37171
+ // Update queryParam only (not the path)
37179
37172
  this.router.navigate(['.'], {
37180
37173
  relativeTo: this.route,
37174
+ replaceUrl: false, // Avoid to change the URL (e.g. to avoid restoring '/:id' by '/new' if changed silently)
37181
37175
  queryParams: this.queryParams,
37182
- replaceUrl: true,
37183
37176
  state: { animated: false },
37184
37177
  });
37185
37178
  return true;
@@ -39330,6 +39323,7 @@ class AppEntityEditor extends AppTabEditor {
39330
39323
  console.debug('[entity-editor] Updating route using queryParams: ', queryParams);
39331
39324
  return await this.router.navigate(['.'], {
39332
39325
  relativeTo: this.route,
39326
+ replaceUrl: false,
39333
39327
  queryParams: this.queryParams,
39334
39328
  state: { animated: false },
39335
39329
  });
@@ -39338,6 +39332,8 @@ class AppEntityEditor extends AppTabEditor {
39338
39332
  else {
39339
39333
  // Current route was '/new' => change to '/new?id=:id' (to allow CustomReuseStrategy to detect that route can be reused)
39340
39334
  if (currId === 'new') {
39335
+ if (this.debug)
39336
+ console.debug('[entity-editor] Updating route /new into /:id, using queryParams: ', queryParams);
39341
39337
  const res = await this.router.navigate(['.'], {
39342
39338
  relativeTo: this.route,
39343
39339
  replaceUrl: true,