@sumaris-net/ngx-components 18.25.20 → 18.26.1

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.
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": "18.25.20",
4
+ "version": "18.26.1",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
package/public_api.d.ts CHANGED
@@ -35,6 +35,10 @@ export * from './src/app/shared/material/badge/badge.module';
35
35
  export * from './src/app/shared/material/badge/badge.directive';
36
36
  export * from './src/app/core/form/text/text-form.component';
37
37
  export * from './src/app/core/form/text/text-form.module';
38
+ export * from './src/app/core/icon/icon-selector.field';
39
+ export * from './src/app/core/icon/icon-selector.modal';
40
+ export * from './src/app/core/icon/icon-selector.module';
41
+ export * from './src/app/core/icon/icon-selector.service';
38
42
  export * from './src/app/shared/inputs';
39
43
  export { AppFormField } from './src/app/shared/form/field.component';
40
44
  export * from './src/app/shared/form/loading-spinner';
@@ -339,6 +343,8 @@ export * from './src/app/shared/audio/audio.testing';
339
343
  export * from './src/app/shared/audio/audio.testing.module';
340
344
  export * from './src/app/shared/markdown/testing/markdown.test';
341
345
  export * from './src/app/shared/markdown/testing/markdown.testing.module';
346
+ export * from './src/app/shared/named-filter/testing/named-filter-selector.testing';
347
+ export * from './src/app/shared/named-filter/testing/named-filter.testing.module';
342
348
  export * from './src/app/core/core.testing.module';
343
349
  export * from './src/app/core/services/testing/referential-filter.model';
344
350
  export * from './src/app/core/services/testing/referential.validator';
@@ -357,8 +363,8 @@ export * from './src/app/core/menu/testing/menu.testing.module';
357
363
  export * from './src/app/core/menu/testing/menu-other.testing';
358
364
  export * from './src/app/core/form/array/testing/form-array.test';
359
365
  export * from './src/app/core/form/array/testing/form-array-test.module';
360
- export * from './src/app/shared/named-filter/testing/named-filter-selector.testing';
361
- export * from './src/app/shared/named-filter/testing/named-filter.testing.module';
366
+ export * from './src/app/core/icon/testing/icon-selector.test';
367
+ export * from './src/app/core/icon/testing/icon-selector.testing.module';
362
368
  export * from './src/app/social/social.testing.module';
363
369
  export * from './src/app/social/user-event/testing/user-event.testing.module';
364
370
  export * from './src/app/social/user-event/testing/user-event.testing';
@@ -20,9 +20,10 @@ import * as i17 from "./install/install-upgrade-card.module";
20
20
  import * as i18 from "./offline/update-offline-mode-card.module";
21
21
  import * as i19 from "./services/pipes/pipes.module";
22
22
  import * as i20 from "./account/password/change-password.module";
23
+ import * as i21 from "./icon/icon-selector.module";
23
24
  export declare class CoreModule {
24
25
  static forRoot(): ModuleWithProviders<CoreModule>;
25
26
  static ɵfac: i0.ɵɵFactoryDeclaration<CoreModule, never>;
26
- static ɵmod: i0.ɵɵNgModuleDeclaration<CoreModule, never, [typeof i1.SharedModule, typeof i2.RouterModule, typeof i3.CacheModule, typeof i4.IonicStorageModule, typeof i5.AppGraphQLModule, typeof i6.AppMenuModule, typeof i7.AppIconModule, typeof i8.AppAccountModule, typeof i9.AppRegisterModule, typeof i10.AppAuthModule, typeof i11.AppHomePageModule, typeof i12.AppAboutModalModule, typeof i13.AppSettingsPageModule, typeof i14.AppSelectPeerModule, typeof i15.AppFormModule, typeof i16.AppTableModule, typeof i17.AppInstallUpgradeCardModule, typeof i18.AppUpdateOfflineModeCardModule, typeof i19.CorePipesModule], [typeof i1.SharedModule, typeof i2.RouterModule, typeof i5.AppGraphQLModule, typeof i6.AppMenuModule, typeof i9.AppRegisterModule, typeof i20.AppChangePasswordModule, typeof i10.AppAuthModule, typeof i11.AppHomePageModule, typeof i12.AppAboutModalModule, typeof i13.AppSettingsPageModule, typeof i7.AppIconModule, typeof i14.AppSelectPeerModule, typeof i15.AppFormModule, typeof i16.AppTableModule, typeof i17.AppInstallUpgradeCardModule, typeof i18.AppUpdateOfflineModeCardModule, typeof i19.CorePipesModule]>;
27
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CoreModule, never, [typeof i1.SharedModule, typeof i2.RouterModule, typeof i3.CacheModule, typeof i4.IonicStorageModule, typeof i5.AppGraphQLModule, typeof i6.AppMenuModule, typeof i7.AppIconModule, typeof i8.AppAccountModule, typeof i9.AppRegisterModule, typeof i10.AppAuthModule, typeof i11.AppHomePageModule, typeof i12.AppAboutModalModule, typeof i13.AppSettingsPageModule, typeof i14.AppSelectPeerModule, typeof i15.AppFormModule, typeof i16.AppTableModule, typeof i17.AppInstallUpgradeCardModule, typeof i18.AppUpdateOfflineModeCardModule, typeof i19.CorePipesModule], [typeof i1.SharedModule, typeof i2.RouterModule, typeof i5.AppGraphQLModule, typeof i6.AppMenuModule, typeof i9.AppRegisterModule, typeof i20.AppChangePasswordModule, typeof i10.AppAuthModule, typeof i11.AppHomePageModule, typeof i12.AppAboutModalModule, typeof i13.AppSettingsPageModule, typeof i7.AppIconModule, typeof i21.AppIconSelectorModule, typeof i14.AppSelectPeerModule, typeof i15.AppFormModule, typeof i16.AppTableModule, typeof i17.AppInstallUpgradeCardModule, typeof i18.AppUpdateOfflineModeCardModule, typeof i19.CorePipesModule]>;
27
28
  static ɵinj: i0.ɵɵInjectorDeclaration<CoreModule>;
28
29
  }
@@ -8,9 +8,10 @@ import * as i5 from "./form/text/testing/text-form.testing.module";
8
8
  import * as i6 from "./form/text-popover/testing/text-popover.testing.module";
9
9
  import * as i7 from "./form/properties/testing/properties-form.testing.module";
10
10
  import * as i8 from "./form/array/testing/form-array-test.module";
11
+ import * as i9 from "./icon/testing/icon-selector.testing.module";
11
12
  export declare const CORE_TESTING_PAGES: TestingPage[];
12
13
  export declare class CoreTestingModule {
13
14
  static ɵfac: i0.ɵɵFactoryDeclaration<CoreTestingModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<CoreTestingModule, never, [typeof i1.CommonModule, typeof i2.TranslateModule, typeof i3.RouterModule, typeof i4.TableTestingModule, typeof i5.TextFormTestingModule, typeof i6.TextPopoverTestingModule, typeof i7.PropertiesFormTestingModule, typeof i8.FormArrayTestModule], [typeof i3.RouterModule, typeof i4.TableTestingModule, typeof i5.TextFormTestingModule, typeof i6.TextPopoverTestingModule, typeof i7.PropertiesFormTestingModule, typeof i8.FormArrayTestModule]>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CoreTestingModule, never, [typeof i1.CommonModule, typeof i2.TranslateModule, typeof i3.RouterModule, typeof i4.TableTestingModule, typeof i5.TextFormTestingModule, typeof i6.TextPopoverTestingModule, typeof i7.PropertiesFormTestingModule, typeof i8.FormArrayTestModule, typeof i9.IconSelectorTestingModule], [typeof i3.RouterModule, typeof i4.TableTestingModule, typeof i5.TextFormTestingModule, typeof i6.TextPopoverTestingModule, typeof i7.PropertiesFormTestingModule, typeof i8.FormArrayTestModule, typeof i9.IconSelectorTestingModule]>;
15
16
  static ɵinj: i0.ɵɵInjectorDeclaration<CoreTestingModule>;
16
17
  }
@@ -0,0 +1,28 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { ControlValueAccessor, UntypedFormControl } from '@angular/forms';
3
+ import { AppFloatLabelType, IconRef } from '../../shared/types';
4
+ import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field';
5
+ import * as i0 from "@angular/core";
6
+ export declare class AppIconSelectorField implements OnInit, ControlValueAccessor {
7
+ private _onChange;
8
+ private _onTouched;
9
+ private modalCtrl;
10
+ private formGroupDir;
11
+ protected value: IconRef | null;
12
+ disabled: boolean;
13
+ formControl: UntypedFormControl;
14
+ formControlName: string;
15
+ placeholder: string;
16
+ floatLabel: AppFloatLabelType;
17
+ appearance: MatFormFieldAppearance;
18
+ subscriptSizing: SubscriptSizing;
19
+ ngOnInit(): void;
20
+ writeValue(obj: IconRef | null): void;
21
+ registerOnChange(fn: (value: IconRef | null) => void): void;
22
+ registerOnTouched(fn: () => void): void;
23
+ setDisabledState(isDisabled: boolean): void;
24
+ openSelector(): Promise<void>;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppIconSelectorField, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppIconSelectorField, "app-icon-selector-field", never, { "disabled": { "alias": "disabled"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; }, {}, never, never, false, never>;
27
+ static ngAcceptInputType_disabled: unknown;
28
+ }
@@ -0,0 +1,23 @@
1
+ import { IconEntry } from './icon-selector.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AppIconSelectorModal {
4
+ title: string;
5
+ protected readonly ionicTabIndex = 0;
6
+ protected readonly materialTabIndex = 1;
7
+ protected searchText: string;
8
+ protected ionicFiltered: IconEntry[];
9
+ protected materialFiltered: IconEntry[];
10
+ protected selectedIndex: number;
11
+ protected loading: boolean;
12
+ private searchSubject;
13
+ private iconService;
14
+ private viewCtrl;
15
+ private cdr;
16
+ constructor();
17
+ private loadIcons;
18
+ onSearchChange(value: string): void;
19
+ selectIcon(entry: IconEntry, origin: 'ionic' | 'material'): void;
20
+ cancel(): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppIconSelectorModal, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppIconSelectorModal, "app-icon-selector-modal", never, { "title": { "alias": "title"; "required": false; }; }, {}, never, never, false, never>;
23
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./icon-selector.modal";
3
+ import * as i2 from "./icon-selector.field";
4
+ import * as i3 from "../../shared/shared.module";
5
+ import * as i4 from "@ngx-translate/core";
6
+ import * as i5 from "./icon.module";
7
+ import * as i6 from "@angular/forms";
8
+ export declare class AppIconSelectorModule {
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppIconSelectorModule, never>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AppIconSelectorModule, [typeof i1.AppIconSelectorModal, typeof i2.AppIconSelectorField], [typeof i3.SharedModule, typeof i4.TranslateModule, typeof i5.AppIconModule, typeof i6.FormsModule], [typeof i1.AppIconSelectorModal, typeof i2.AppIconSelectorField, typeof i5.AppIconModule]>;
11
+ static ɵinj: i0.ɵɵInjectorDeclaration<AppIconSelectorModule>;
12
+ }
@@ -0,0 +1,40 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { IconRef } from '../../shared/types';
3
+ import * as i0 from "@angular/core";
4
+ export interface IconEntry {
5
+ name: string;
6
+ label: string;
7
+ keywords: string[];
8
+ }
9
+ export interface IconsRefJson {
10
+ generatedAt: string;
11
+ ionic: IconEntry[];
12
+ material: IconEntry[];
13
+ }
14
+ /**
15
+ * Service de chargement et de filtrage des icônes disponibles.
16
+ * Charge le fichier assets/icons-ref.json en lazy (une seule fois).
17
+ */
18
+ export declare class IconSelectorService {
19
+ private http;
20
+ private _ionic;
21
+ private _material;
22
+ private _ready;
23
+ private _readyPromise;
24
+ readonly ionicIcons: import("@angular/core").Signal<IconEntry[]>;
25
+ readonly materialIcons: import("@angular/core").Signal<IconEntry[]>;
26
+ constructor(http: HttpClient);
27
+ ready(): Promise<void>;
28
+ /**
29
+ * Convertit un IconEntry en IconRef selon son origine.
30
+ */
31
+ toIconRef(entry: IconEntry, origin: 'ionic' | 'material'): IconRef;
32
+ /**
33
+ * Filtre les icônes par texte de recherche.
34
+ * Cherche dans le nom, le label, et les mots-clés.
35
+ * Insensible à la casse.
36
+ */
37
+ search(searchText: string, origin: 'ionic' | 'material'): IconEntry[];
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconSelectorService, never>;
39
+ static ɵprov: i0.ɵɵInjectableDeclaration<IconSelectorService>;
40
+ }
@@ -0,0 +1,19 @@
1
+ import { ChangeDetectorRef } from '@angular/core';
2
+ import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
3
+ import { IconRef } from '../../../shared/types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class IconSelectorTestPage {
6
+ protected formBuilder: UntypedFormBuilder;
7
+ protected cd: ChangeDetectorRef;
8
+ form: UntypedFormGroup;
9
+ selectedIcon: IconRef | null;
10
+ disabled: boolean;
11
+ constructor(formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef);
12
+ toggleDisabled(): void;
13
+ stringify: {
14
+ (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
15
+ (value: any, replacer?: (string | number)[], space?: string | number): string;
16
+ };
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconSelectorTestPage, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<IconSelectorTestPage, "app-icon-selector-test", never, {}, {}, never, never, false, never>;
19
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./icon-selector.test";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@ionic/angular";
5
+ import * as i4 from "@angular/router";
6
+ import * as i5 from "../../../shared/shared.module";
7
+ import * as i6 from "../icon-selector.module";
8
+ export declare class IconSelectorTestingModule {
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconSelectorTestingModule, never>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<IconSelectorTestingModule, [typeof i1.IconSelectorTestPage], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.RouterModule, typeof i5.SharedModule, typeof i6.AppIconSelectorModule], [typeof i4.RouterModule, typeof i1.IconSelectorTestPage]>;
11
+ static ɵinj: i0.ɵɵInjectorDeclaration<IconSelectorTestingModule>;
12
+ }
@@ -151,7 +151,9 @@
151
151
  "LOAD_FAILED": "Failed to load filter",
152
152
  "IMPORT_FAILED": "Failed to import filter",
153
153
  "NOT_FOUND": "Filter not found"
154
- }
154
+ },
155
+ "SEARCH": "Search",
156
+ "SEARCH_PLACEHOLDER": "Search an icon…"
155
157
  },
156
158
  "CONFIGURATION": {
157
159
  "OPTIONS": {
@@ -814,5 +816,10 @@
814
816
  "GROUP_2": "Group 2",
815
817
  "STATUS_ID": "Status"
816
818
  }
819
+ },
820
+ "ICON_SELECTOR": {
821
+ "TITLE": "Select an icon",
822
+ "TAB_IONIC": "Ionic",
823
+ "TAB_MATERIAL": "Material"
817
824
  }
818
- }
825
+ }
@@ -151,7 +151,9 @@
151
151
  "LOAD_FAILED": "Failed to load filter",
152
152
  "IMPORT_FAILED": "Failed to import filter",
153
153
  "NOT_FOUND": "Filter not found"
154
- }
154
+ },
155
+ "SEARCH": "Search",
156
+ "SEARCH_PLACEHOLDER": "Search an icon..."
155
157
  },
156
158
  "CONFIGURATION": {
157
159
  "OPTIONS": {
@@ -814,5 +816,10 @@
814
816
  "GROUP_2": "Group 2",
815
817
  "STATUS_ID": "Status"
816
818
  }
819
+ },
820
+ "ICON_SELECTOR": {
821
+ "TITLE": "Select an icon",
822
+ "TAB_IONIC": "Ionic",
823
+ "TAB_MATERIAL": "Material"
817
824
  }
818
- }
825
+ }
@@ -151,7 +151,9 @@
151
151
  "LOAD_FAILED": "Échec du chargement du filtre",
152
152
  "IMPORT_FAILED": "Échec de l'import du filtre",
153
153
  "NOT_FOUND": "Filtre non trouvé"
154
- }
154
+ },
155
+ "SEARCH": "Rechercher",
156
+ "SEARCH_PLACEHOLDER": "Rechercher une icône..."
155
157
  },
156
158
  "CONFIGURATION": {
157
159
  "OPTIONS": {
@@ -816,5 +818,10 @@
816
818
  "GROUP_2": "Groupe 2",
817
819
  "STATUS_ID": "Etat de saisie"
818
820
  }
821
+ },
822
+ "ICON_SELECTOR": {
823
+ "TITLE": "Sélectionner une icône",
824
+ "TAB_IONIC": "Ionic",
825
+ "TAB_MATERIAL": "Material"
819
826
  }
820
- }
827
+ }