@sumaris-net/ngx-components 2.18.0-beta5 → 2.18.0-beta7

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.
Files changed (51) hide show
  1. package/esm2022/public_api.mjs +2 -1
  2. package/esm2022/src/app/core/account/account.page.mjs +1 -2
  3. package/esm2022/src/app/core/auth/auth.form.mjs +1 -2
  4. package/esm2022/src/app/core/form/array/testing/form-array.test.mjs +1 -2
  5. package/esm2022/src/app/core/form/entity/entity-editor-modal.class.mjs +1 -2
  6. package/esm2022/src/app/core/form/entity/entity-editor.class.mjs +1 -2
  7. package/esm2022/src/app/core/form/entity/tab-editor.class.mjs +1 -2
  8. package/esm2022/src/app/core/form/properties/properties.utils.mjs +60 -0
  9. package/esm2022/src/app/core/form/text-popover/text-popover.component.mjs +1 -2
  10. package/esm2022/src/app/core/menu/menu.component.mjs +1 -2
  11. package/esm2022/src/app/core/menu/menu.service.mjs +1 -2
  12. package/esm2022/src/app/core/services/account.service.mjs +3 -3
  13. package/esm2022/src/app/core/services/config.service.mjs +1 -2
  14. package/esm2022/src/app/core/services/model/entity.model.mjs +3 -9
  15. package/esm2022/src/app/core/services/model/peer.model.mjs +11 -2
  16. package/esm2022/src/app/core/services/network.service.mjs +4 -3
  17. package/esm2022/src/app/core/services/platform.service.mjs +1 -2
  18. package/esm2022/src/app/core/services/validator/local-settings.validator.mjs +8 -7
  19. package/esm2022/src/app/core/settings/settings.page.mjs +5 -5
  20. package/esm2022/src/app/core/table/async-table.class.mjs +1 -2
  21. package/esm2022/src/app/core/table/entities-table-datasource.class.mjs +1 -2
  22. package/esm2022/src/app/core/table/table.class.mjs +1 -2
  23. package/esm2022/src/app/shared/form/field.component.mjs +1 -2
  24. package/esm2022/src/app/shared/functions.mjs +1 -2
  25. package/esm2022/src/app/shared/hotkeys/dialog/hotkeys-dialog.component.mjs +3 -3
  26. package/esm2022/src/app/shared/hotkeys/hotkeys.service.mjs +37 -9
  27. package/esm2022/src/app/shared/image/gallery/image-gallery.component.mjs +1 -2
  28. package/esm2022/src/app/shared/material/autocomplete/material.autocomplete.mjs +1 -2
  29. package/esm2022/src/app/shared/material/boolean/material.boolean.mjs +1 -2
  30. package/esm2022/src/app/shared/material/datetime/material.date.mjs +1 -2
  31. package/esm2022/src/app/shared/material/datetime/material.dateshort.mjs +4 -3
  32. package/esm2022/src/app/shared/material/datetime/material.datetime.mjs +1 -2
  33. package/esm2022/src/app/shared/material/duration/material.duration.mjs +1 -2
  34. package/esm2022/src/app/shared/material/latlong/testing/latlong.test.mjs +1 -2
  35. package/esm2022/src/app/shared/material/swipe/material.swipe.mjs +1 -2
  36. package/esm2022/src/app/shared/toolbar/toolbar.mjs +1 -2
  37. package/esm2022/src/app/shared/upload-file/testing/upload-file.testing.mjs +1 -2
  38. package/esm2022/src/app/shared/validator/validators.mjs +1 -2
  39. package/esm2022/src/app/social/job/progression/job-progression.icon.mjs +1 -2
  40. package/esm2022/src/app/social/message/message.modal.mjs +1 -2
  41. package/esm2022/src/app/social/user-event/notification/user-event-notification.icon.mjs +1 -2
  42. package/fesm2022/sumaris-net.ngx-components.mjs +180 -89
  43. package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
  44. package/package.json +2 -2
  45. package/public_api.d.ts +1 -0
  46. package/src/app/core/form/properties/properties.utils.d.ts +27 -0
  47. package/src/app/core/services/model/entity.model.d.ts +3 -2
  48. package/src/app/core/services/model/peer.model.d.ts +1 -0
  49. package/src/app/shared/hotkeys/hotkeys.service.d.ts +16 -2
  50. package/src/app/shared/inputs.d.ts +1 -1
  51. package/src/assets/manifest.json +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "2.18.0-beta5",
4
+ "version": "2.18.0-beta7",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -35,7 +35,7 @@
35
35
  "d3": "~7.6.1",
36
36
  "localforage": "~1.10.0",
37
37
  "rxjs": "~7.8.1",
38
- "zone.js": "0.15.0"
38
+ "zone.js": "~0.14.10"
39
39
  },
40
40
  "optionalDependencies": {
41
41
  "@awesome-cordova-plugins/core": "~6.4.0",
package/public_api.d.ts CHANGED
@@ -187,6 +187,7 @@ export * from './src/app/core/form/entity/entity.module';
187
187
  export * from './src/app/core/form/list/list.form';
188
188
  export * from './src/app/core/form/list/list.module';
189
189
  export * from './src/app/core/form/properties/properties.form';
190
+ export * from './src/app/core/form/properties/properties.utils';
190
191
  export * from './src/app/core/form/properties/properties.table';
191
192
  export * from './src/app/core/form/properties/properties.module';
192
193
  export * from './src/app/core/form/text-popover/text-popover.component';
@@ -0,0 +1,27 @@
1
+ import { PropertiesMap, Property } from '../../../shared/types';
2
+ export declare class AppPropertiesUtils {
3
+ /**
4
+ * Converts an array of Property objects to an object map.
5
+ *
6
+ * @param {Property[]} [sources] - The array of Property objects to convert.
7
+ * @param {Object} [opts] - Options for the conversion.
8
+ * @param {boolean} [opts.omitNilOrBlank] - If set to true, properties with nil or blank values will be omitted from the resulting object.
9
+ * @return {PropertiesMap} The resulting object map where keys are property keys and values are property values.
10
+ */
11
+ static arrayAsObject(sources?: Property[], opts?: {
12
+ omitNilOrBlank: boolean;
13
+ }): PropertiesMap;
14
+ /**
15
+ * Converts an object into an array of properties.
16
+ *
17
+ * @param {PropertiesMap} [source] - The source object containing properties to convert.
18
+ * @return {Property[]} An array of properties derived from the source object.
19
+ */
20
+ static arrayFromObject<T = any>(source?: PropertiesMap): Property[];
21
+ }
22
+ export declare class AppPropertyUtils {
23
+ static asObject(source: Property | any): {
24
+ key: string;
25
+ value: string;
26
+ } | undefined;
27
+ }
@@ -1,9 +1,10 @@
1
1
  import { Moment } from 'moment';
2
2
  import { getPropertyByPath } from '../../../shared/functions';
3
- import { FilterFn, ObjectMap, ObjectMapEntry, PropertiesArray, PropertiesMap } from '../../../shared/types';
3
+ import { FilterFn, ObjectMap, ObjectMapEntry } from '../../../shared/types';
4
4
  import { StoreObject } from '@apollo/client/core';
5
5
  import { TreeItemEntityUtils } from './tree-item-entity.model';
6
6
  import { SortDirection } from '@angular/material/sort';
7
+ import { AppPropertiesUtils } from '../../form/properties/properties.utils';
7
8
  export declare interface Cloneable<T> {
8
9
  clone(): T;
9
10
  }
@@ -49,7 +50,7 @@ export declare abstract class EntityUtils {
49
50
  static getPropertyByPath: typeof getPropertyByPath;
50
51
  static getArrayAsMap<T = any>(source?: ObjectMapEntry<T>[]): ObjectMap<T>;
51
52
  static getMapAsArray<T = any>(source?: ObjectMap<T>): ObjectMapEntry<T>[];
52
- static getPropertyArrayAsObject(source?: PropertiesArray): PropertiesMap;
53
+ static getPropertyArrayAsObject: typeof AppPropertiesUtils.arrayAsObject;
53
54
  static copyIdAndUpdateDate<T extends Entity<any, any, any>>(source: T, target: T): void;
54
55
  static fillLocalIds<T extends IEntity<T>>(items: T[], sequenceFactory: (firstEntity: T, incrementSize: number) => Promise<number>): Promise<void>;
55
56
  static cleanIdAndUpdateDate<T extends IEntity<T>>(source: T): void;
@@ -3,6 +3,7 @@ export declare class Peer extends Entity<Peer> implements Cloneable<Peer> {
3
3
  static fromObject: (source: any, opts?: any) => Peer;
4
4
  static parseUrl(peerUrl: string): Peer;
5
5
  static path(peer: Peer, ...paths: string[]): string;
6
+ static equals(p1: Peer, p2: Peer): boolean;
6
7
  dns: string;
7
8
  ipv4: string;
8
9
  ipv6: string;
@@ -1,3 +1,4 @@
1
+ import { InjectionToken } from '@angular/core';
1
2
  import { EventManager } from '@angular/platform-browser';
2
3
  import { Observable } from 'rxjs';
3
4
  import { ModalController, PopoverController } from '@ionic/angular';
@@ -10,6 +11,17 @@ interface Options {
10
11
  keys: string;
11
12
  preventDefault: boolean;
12
13
  }
14
+ export interface HotKeysConfig {
15
+ /**
16
+ * Shortcut to open the hotkeys help modal
17
+ */
18
+ openHelpModalShortcut: string;
19
+ /**
20
+ * Enable the hotkeys help modal
21
+ */
22
+ enableHelpModal: boolean;
23
+ }
24
+ export declare const APP_HOTKEYS_CONFIG: InjectionToken<Partial<HotKeysConfig>>;
13
25
  export declare class Hotkeys {
14
26
  private eventManager;
15
27
  private dialog;
@@ -19,10 +31,12 @@ export declare class Hotkeys {
19
31
  private _hotkeys;
20
32
  private _document;
21
33
  private _defaults;
22
- constructor(eventManager: EventManager, dialog: MatDialog, modalController: ModalController, popoverController: PopoverController);
34
+ private _dialogRef;
35
+ private _config;
36
+ constructor(eventManager: EventManager, dialog: MatDialog, modalController: ModalController, popoverController: PopoverController, config?: Partial<HotKeysConfig>);
23
37
  addShortcut(options: Partial<Options>): Observable<KeyboardEvent>;
24
38
  openHelpModal(): void;
25
- static ɵfac: i0.ɵɵFactoryDeclaration<Hotkeys, never>;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<Hotkeys, [null, null, null, null, { optional: true; }]>;
26
40
  static ɵprov: i0.ɵɵInjectableDeclaration<Hotkeys>;
27
41
  }
28
42
  export {};
@@ -16,7 +16,7 @@ export interface InputElement extends FocusableElement {
16
16
  }
17
17
  export declare function isInputElement(object: any): object is InputElement;
18
18
  export declare function asInputElement<T = any>(object: ElementRef<T>): InputElement | undefined;
19
- export declare function tabindexComparator(a: InputElement, b: InputElement): 1 | -1 | 0;
19
+ export declare function tabindexComparator(a: InputElement, b: InputElement): 0 | 1 | -1;
20
20
  export interface CanGainFocusOptions {
21
21
  minTabindex?: number;
22
22
  maxTabindex?: number;
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "2.18.0-beta5",
5
+ "version": "2.18.0-beta7",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{