@sumaris-net/ngx-components 2.7.5-rc13 → 2.7.5-rc15

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.
@@ -151,6 +151,7 @@ import { Clipboard } from '@capacitor/clipboard';
151
151
  import { Geolocation } from '@capacitor/geolocation';
152
152
  import * as i2$8 from '@e-is/ngx-material-table';
153
153
  import { ValidatorService, TableDataSource, AsyncTableDataSource } from '@e-is/ngx-material-table';
154
+ import { Clipboard as Clipboard$1 } from '@angular/cdk/clipboard';
154
155
  import { RxState } from '@rx-angular/state';
155
156
 
156
157
  const ENVIRONMENT = new InjectionToken('ENV');
@@ -16560,7 +16561,7 @@ class BaseReferential extends Entity {
16560
16561
  super(__typename);
16561
16562
  }
16562
16563
  asObject(opts) {
16563
- if (opts && opts.minify) {
16564
+ if (opts?.minify) {
16564
16565
  return {
16565
16566
  id: this.id,
16566
16567
  entityName: (opts.keepEntityName && this.entityName) || undefined, // Don't keep by default
@@ -16569,10 +16570,12 @@ class BaseReferential extends Entity {
16569
16570
  }
16570
16571
  const target = super.asObject(opts);
16571
16572
  target.creationDate = toDateISOString(this.creationDate);
16572
- if (opts && opts.keepTypename === false)
16573
+ if (opts?.keepTypename === false)
16573
16574
  delete target.entityName;
16574
- if (opts && opts.keepIcon === false)
16575
+ if (opts?.keepIcon === false)
16575
16576
  delete target.icon;
16577
+ if (opts?.keepProperties === false)
16578
+ delete target.properties;
16576
16579
  return target;
16577
16580
  }
16578
16581
  fromObject(source, opts) {
@@ -16644,6 +16647,7 @@ const MINIFY_ENTITY_FOR_LOCAL_STORAGE = Object.freeze({
16644
16647
  keepEntityName: true,
16645
16648
  keepLocalId: true,
16646
16649
  keepIcon: true,
16650
+ keepProperties: true,
16647
16651
  });
16648
16652
  /**
16649
16653
  * Used to send an entity to a pod
@@ -16654,6 +16658,7 @@ const MINIFY_ENTITY_FOR_POD = Object.freeze({
16654
16658
  keepEntityName: false,
16655
16659
  keepLocalId: false,
16656
16660
  keepIcon: false,
16661
+ keepProperties: false,
16657
16662
  });
16658
16663
  // @dynamic
16659
16664
  let ReferentialRef = class ReferentialRef extends Entity {
@@ -16666,6 +16671,7 @@ let ReferentialRef = class ReferentialRef extends Entity {
16666
16671
  levelId;
16667
16672
  entityName;
16668
16673
  icon;
16674
+ properties;
16669
16675
  constructor() {
16670
16676
  super(ReferentialRef_1.TYPENAME);
16671
16677
  }
@@ -16682,6 +16688,8 @@ let ReferentialRef = class ReferentialRef extends Entity {
16682
16688
  delete target.entityName;
16683
16689
  if (opts && opts.keepIcon === false)
16684
16690
  delete target.icon;
16691
+ if (opts && opts.keepProperties === false)
16692
+ delete target.properties;
16685
16693
  return target;
16686
16694
  }
16687
16695
  fromObject(source, opts) {
@@ -16693,6 +16701,7 @@ let ReferentialRef = class ReferentialRef extends Entity {
16693
16701
  this.statusId = source.statusId;
16694
16702
  this.levelId = source.levelId;
16695
16703
  this.icon = source.icon;
16704
+ this.properties = (source.properties && { ...source.properties }) || undefined;
16696
16705
  }
16697
16706
  };
16698
16707
  ReferentialRef = ReferentialRef_1 = __decorate([
@@ -20897,11 +20906,11 @@ class ToolbarComponent {
20897
20906
  this.cd.markForCheck();
20898
20907
  }
20899
20908
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1$5.ActivatedRoute }, { token: i1$5.Router }, { token: i2$1.NavController }, { token: i2$1.IonRouterOutlet }, { token: i0.ChangeDetectorRef }, { token: APP_PROGRESS_BAR_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
20900
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.4", type: ToolbarComponent, selector: "app-toolbar", inputs: { progressBarMode: "progressBarMode", title: "title", color: "color", class: "class", backHref: "backHref", defaultBackHref: "defaultBackHref", hasValidate: "hasValidate", hasClose: "hasClose", hasSearch: "hasSearch", canGoBack: "canGoBack", canShowMenu: "canShowMenu" }, outputs: { onValidate: "onValidate", onClose: "onClose", onValidateAndClose: "onValidateAndClose", onBackClick: "onBackClick", onSearch: "onSearch" }, providers: [{ provide: ToolbarToken, useExisting: ToolbarComponent }], viewQueries: [{ propertyName: "searchbar", first: true, predicate: ["searchbar"], descendants: true, static: true }, { propertyName: "menuToggle", first: true, predicate: ["menuToggle"], descendants: true, static: true }], ngImport: i0, template: "<ion-header [class]=\"class\">\n <ion-toolbar [color]=\"color\">\n <ion-buttons slot=\"start\">\n <!-- back button -->\n @if (canGoBack) {\n <ion-button class=\"back-button\" (click)=\"doBackClick($event)\" routerDirection=\"back\">\n <ion-icon slot=\"icon-only\" name=\"arrow-back\"></ion-icon>\n </ion-button>\n }\n\n <!-- show menu button -->\n <ion-menu-toggle #menuToggle [menu]=\"'left'\" [class.cdk-visually-hidden]=\"canGoBack || !canShowMenu\">\n <ion-button>\n <ion-icon slot=\"icon-only\" name=\"menu\"></ion-icon>\n </ion-button>\n </ion-menu-toggle>\n\n <ng-content select=\"[slot=start]\"></ng-content>\n </ion-buttons>\n\n <ion-title [innerHTML]=\"title\"></ion-title>\n\n <ng-content select=\"ion-title, ion-segment\"></ng-content>\n\n <ng-content select=\"ion-buttons[slot=end]\"></ng-content>\n\n <ion-buttons slot=\"end\" collapse=\"true\">\n <ng-content select=\"[slot=end]\"></ng-content>\n\n <!-- search bar -->\n @if (hasSearch) {\n <ion-searchbar\n #searchbar\n animated\n type=\"search\"\n [class.cdk-visually-hidden]=\"!showSearchBar\"\n show-cancel-button=\"always\"\n (ionChange)=\"ionSearchBarChanged($event)\"\n (ionCancel)=\"toggleSearchBar()\"\n ></ion-searchbar>\n\n <!-- search button -->\n @if (!showSearchBar) {\n <ion-button (click)=\"toggleSearchBar()\">\n <ion-icon slot=\"icon-only\" name=\"search\"></ion-icon>\n </ion-button>\n }\n }\n\n <!-- close button -->\n @if (hasClose) {\n <ion-button (tap)=\"tapClose($event)\" class=\"visible-xs visible-sm visible-mobile\">\n <ion-icon slot=\"icon-only\" name=\"close\"></ion-icon>\n </ion-button>\n }\n\n <!-- validate button -->\n @if (hasValidate) {\n <ion-button (tap)=\"tapValidate($event)\" class=\"visible-xs visible-sm visible-mobile\">\n <ion-icon slot=\"icon-only\" name=\"save\"></ion-icon>\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n\n <!-- progress bar -->\n <mat-progress-bar [color]=\"color | matColor\" [mode]=\"$progressBarMode()\"></mat-progress-bar>\n</ion-header>\n", styles: [""], dependencies: [{ kind: "component", type: i2$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2$1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i2$1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i2$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2$1.IonMenuToggle, selector: "ion-menu-toggle", inputs: ["autoHide", "menu"] }, { kind: "component", type: i2$1.IonSearchbar, selector: "ion-searchbar", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "name", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }, { kind: "component", type: i2$1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i2$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "directive", type: i2$1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar,ion-range" }, { kind: "component", type: i3$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: MatColorPipe, name: "matColor" }] });
20909
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.4", type: ToolbarComponent, selector: "app-toolbar", inputs: { progressBarMode: "progressBarMode", title: "title", color: "color", class: "class", backHref: "backHref", defaultBackHref: "defaultBackHref", hasValidate: "hasValidate", hasClose: "hasClose", hasSearch: "hasSearch", canGoBack: "canGoBack", canShowMenu: "canShowMenu" }, outputs: { onValidate: "onValidate", onClose: "onClose", onValidateAndClose: "onValidateAndClose", onBackClick: "onBackClick", onSearch: "onSearch" }, providers: [{ provide: ToolbarToken, useExisting: ToolbarComponent }], viewQueries: [{ propertyName: "searchbar", first: true, predicate: ["searchbar"], descendants: true, static: true }, { propertyName: "menuToggle", first: true, predicate: ["menuToggle"], descendants: true, static: true }], ngImport: i0, template: "<ion-header [class]=\"class\">\n <ion-toolbar [color]=\"color\">\n <ion-buttons slot=\"start\">\n <!-- back button -->\n @if (canGoBack) {\n <ion-button class=\"back-button\" (click)=\"doBackClick($event)\" routerDirection=\"back\">\n <ion-icon slot=\"icon-only\" name=\"arrow-back\"></ion-icon>\n </ion-button>\n }\n\n <!-- show menu button -->\n <ion-menu-toggle #menuToggle [menu]=\"'left'\" [class.cdk-visually-hidden]=\"canGoBack || !canShowMenu\">\n <ion-button>\n <ion-icon slot=\"icon-only\" name=\"menu\"></ion-icon>\n </ion-button>\n </ion-menu-toggle>\n\n <ng-content select=\"[slot=start]\"></ng-content>\n </ion-buttons>\n\n <ion-title [innerHTML]=\"title\"></ion-title>\n\n <ng-content select=\"ion-title, ion-segment\"></ng-content>\n\n <ng-content select=\"ion-buttons[slot=end]\"></ng-content>\n\n <ion-buttons slot=\"end\" collapse=\"true\">\n <ng-content select=\"[slot=end]\"></ng-content>\n\n <!-- search bar -->\n @if (hasSearch) {\n <ion-searchbar\n #searchbar\n animated\n type=\"search\"\n [class.cdk-visually-hidden]=\"!showSearchBar\"\n show-cancel-button=\"always\"\n (ionChange)=\"ionSearchBarChanged($event)\"\n (ionCancel)=\"toggleSearchBar()\"\n ></ion-searchbar>\n\n <!-- search button -->\n @if (!showSearchBar) {\n <ion-button (click)=\"toggleSearchBar()\">\n <ion-icon slot=\"icon-only\" name=\"search\"></ion-icon>\n </ion-button>\n }\n }\n\n <!-- close button -->\n @if (hasClose) {\n <ion-button (tap)=\"tapClose($event)\" class=\"visible-xs visible-sm visible-mobile\">\n <ion-icon slot=\"icon-only\" name=\"close\"></ion-icon>\n </ion-button>\n }\n\n <!-- validate button -->\n @if (hasValidate) {\n <ion-button (tap)=\"tapValidate($event)\" class=\"visible-xs visible-sm visible-mobile\">\n <ion-icon slot=\"icon-only\" name=\"save\"></ion-icon>\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n\n <!-- progress bar -->\n <mat-progress-bar [color]=\"color | matColor\" [mode]=\"$progressBarMode()\"></mat-progress-bar>\n</ion-header>\n", styles: [""], dependencies: [{ kind: "component", type: i2$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2$1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i2$1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i2$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2$1.IonMenuToggle, selector: "ion-menu-toggle", inputs: ["autoHide", "menu"] }, { kind: "component", type: i2$1.IonSearchbar, selector: "ion-searchbar", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "name", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }, { kind: "component", type: i2$1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i2$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "directive", type: i2$1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar,ion-range" }, { kind: "component", type: i3$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: MatColorPipe, name: "matColor" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
20901
20910
  }
20902
20911
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ToolbarComponent, decorators: [{
20903
20912
  type: Component,
20904
- args: [{ selector: 'app-toolbar', providers: [{ provide: ToolbarToken, useExisting: ToolbarComponent }], template: "<ion-header [class]=\"class\">\n <ion-toolbar [color]=\"color\">\n <ion-buttons slot=\"start\">\n <!-- back button -->\n @if (canGoBack) {\n <ion-button class=\"back-button\" (click)=\"doBackClick($event)\" routerDirection=\"back\">\n <ion-icon slot=\"icon-only\" name=\"arrow-back\"></ion-icon>\n </ion-button>\n }\n\n <!-- show menu button -->\n <ion-menu-toggle #menuToggle [menu]=\"'left'\" [class.cdk-visually-hidden]=\"canGoBack || !canShowMenu\">\n <ion-button>\n <ion-icon slot=\"icon-only\" name=\"menu\"></ion-icon>\n </ion-button>\n </ion-menu-toggle>\n\n <ng-content select=\"[slot=start]\"></ng-content>\n </ion-buttons>\n\n <ion-title [innerHTML]=\"title\"></ion-title>\n\n <ng-content select=\"ion-title, ion-segment\"></ng-content>\n\n <ng-content select=\"ion-buttons[slot=end]\"></ng-content>\n\n <ion-buttons slot=\"end\" collapse=\"true\">\n <ng-content select=\"[slot=end]\"></ng-content>\n\n <!-- search bar -->\n @if (hasSearch) {\n <ion-searchbar\n #searchbar\n animated\n type=\"search\"\n [class.cdk-visually-hidden]=\"!showSearchBar\"\n show-cancel-button=\"always\"\n (ionChange)=\"ionSearchBarChanged($event)\"\n (ionCancel)=\"toggleSearchBar()\"\n ></ion-searchbar>\n\n <!-- search button -->\n @if (!showSearchBar) {\n <ion-button (click)=\"toggleSearchBar()\">\n <ion-icon slot=\"icon-only\" name=\"search\"></ion-icon>\n </ion-button>\n }\n }\n\n <!-- close button -->\n @if (hasClose) {\n <ion-button (tap)=\"tapClose($event)\" class=\"visible-xs visible-sm visible-mobile\">\n <ion-icon slot=\"icon-only\" name=\"close\"></ion-icon>\n </ion-button>\n }\n\n <!-- validate button -->\n @if (hasValidate) {\n <ion-button (tap)=\"tapValidate($event)\" class=\"visible-xs visible-sm visible-mobile\">\n <ion-icon slot=\"icon-only\" name=\"save\"></ion-icon>\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n\n <!-- progress bar -->\n <mat-progress-bar [color]=\"color | matColor\" [mode]=\"$progressBarMode()\"></mat-progress-bar>\n</ion-header>\n" }]
20913
+ args: [{ selector: 'app-toolbar', providers: [{ provide: ToolbarToken, useExisting: ToolbarComponent }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-header [class]=\"class\">\n <ion-toolbar [color]=\"color\">\n <ion-buttons slot=\"start\">\n <!-- back button -->\n @if (canGoBack) {\n <ion-button class=\"back-button\" (click)=\"doBackClick($event)\" routerDirection=\"back\">\n <ion-icon slot=\"icon-only\" name=\"arrow-back\"></ion-icon>\n </ion-button>\n }\n\n <!-- show menu button -->\n <ion-menu-toggle #menuToggle [menu]=\"'left'\" [class.cdk-visually-hidden]=\"canGoBack || !canShowMenu\">\n <ion-button>\n <ion-icon slot=\"icon-only\" name=\"menu\"></ion-icon>\n </ion-button>\n </ion-menu-toggle>\n\n <ng-content select=\"[slot=start]\"></ng-content>\n </ion-buttons>\n\n <ion-title [innerHTML]=\"title\"></ion-title>\n\n <ng-content select=\"ion-title, ion-segment\"></ng-content>\n\n <ng-content select=\"ion-buttons[slot=end]\"></ng-content>\n\n <ion-buttons slot=\"end\" collapse=\"true\">\n <ng-content select=\"[slot=end]\"></ng-content>\n\n <!-- search bar -->\n @if (hasSearch) {\n <ion-searchbar\n #searchbar\n animated\n type=\"search\"\n [class.cdk-visually-hidden]=\"!showSearchBar\"\n show-cancel-button=\"always\"\n (ionChange)=\"ionSearchBarChanged($event)\"\n (ionCancel)=\"toggleSearchBar()\"\n ></ion-searchbar>\n\n <!-- search button -->\n @if (!showSearchBar) {\n <ion-button (click)=\"toggleSearchBar()\">\n <ion-icon slot=\"icon-only\" name=\"search\"></ion-icon>\n </ion-button>\n }\n }\n\n <!-- close button -->\n @if (hasClose) {\n <ion-button (tap)=\"tapClose($event)\" class=\"visible-xs visible-sm visible-mobile\">\n <ion-icon slot=\"icon-only\" name=\"close\"></ion-icon>\n </ion-button>\n }\n\n <!-- validate button -->\n @if (hasValidate) {\n <ion-button (tap)=\"tapValidate($event)\" class=\"visible-xs visible-sm visible-mobile\">\n <ion-icon slot=\"icon-only\" name=\"save\"></ion-icon>\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n\n <!-- progress bar -->\n <mat-progress-bar [color]=\"color | matColor\" [mode]=\"$progressBarMode()\"></mat-progress-bar>\n</ion-header>\n" }]
20905
20914
  }], ctorParameters: () => [{ type: i1$5.ActivatedRoute }, { type: i1$5.Router }, { type: i2$1.NavController }, { type: i2$1.IonRouterOutlet }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
20906
20915
  type: Optional
20907
20916
  }, {
@@ -31963,9 +31972,9 @@ class NewTokenModal extends AppEntityEditorModal {
31963
31972
  tokenForm;
31964
31973
  tokenAppForm;
31965
31974
  tokenConfig;
31966
- copiedLabel;
31967
31975
  tokenScopes;
31968
31976
  existingNames;
31977
+ clipboard;
31969
31978
  constructor(injector, validator, accountService) {
31970
31979
  super(injector, UserToken, { tabCount: 1 });
31971
31980
  this.injector = injector;
@@ -31973,6 +31982,7 @@ class NewTokenModal extends AppEntityEditorModal {
31973
31982
  this.accountService = accountService;
31974
31983
  this.translate = injector.get(TranslateService);
31975
31984
  this.toastController = injector.get(ToastController);
31985
+ this.clipboard = injector.get(Clipboard$1);
31976
31986
  this.tokenForm = validator.getFormGroup();
31977
31987
  this.tokenAppForm = new AppForm(this.injector, this.tokenForm);
31978
31988
  }
@@ -32034,7 +32044,7 @@ class NewTokenModal extends AppEntityEditorModal {
32034
32044
  }
32035
32045
  async copy(event) {
32036
32046
  event?.stopPropagation();
32037
- await Clipboard.write({ string: this.form.value.token });
32047
+ this.clipboard.copy(this.form.value.token);
32038
32048
  await Toasts.show(this.toastController, this.translate, {
32039
32049
  type: 'info',
32040
32050
  message: 'ACCOUNT.TOKENS.CREATE.COPIED',