@smartsoft001-mobilems/angular 2.13.0 → 2.15.0

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/index.d.ts CHANGED
@@ -2,12 +2,14 @@ import { TranslateService } from '@ngx-translate/core';
2
2
  import * as _smartsoft001_mobilems_models from '@smartsoft001-mobilems/models';
3
3
  import { Config, Page, IUser as IUser$1, MsFile, ConfigPageType, ConfigMenuItem } from '@smartsoft001-mobilems/models';
4
4
  import * as i0 from '@angular/core';
5
- import { ModuleWithProviders, ElementRef, Signal, AfterContentInit, TemplateRef, OnInit } from '@angular/core';
5
+ import { ModuleWithProviders, TemplateRef, ElementRef, Signal, AfterContentInit, OnInit } from '@angular/core';
6
6
  import * as i1 from '@angular/router';
7
7
  import { CanActivateFn } from '@angular/router';
8
8
  import { AppBaseComponent, PageBaseComponent, BaseComponent } from '@smartsoft001/angular';
9
+ import * as rxjs from 'rxjs';
9
10
  import { Observable, Subscription } from 'rxjs';
10
11
  import { MetaDefinition } from '@angular/platform-browser';
12
+ import * as dist_packages_shared_models_src from 'dist/packages/shared/models/src';
11
13
  import { CrudService, ICrudFilter, ICrudFilterQueryItem } from '@smartsoft001/crud-shell-angular';
12
14
  import { IEntity } from '@smartsoft001/domain-core';
13
15
 
@@ -163,6 +165,54 @@ declare class MetaService {
163
165
  static ɵprov: i0.ɵɵInjectableDeclaration<MetaService>;
164
166
  }
165
167
 
168
+ /**
169
+ * Reference to an opened modal.
170
+ * Provides methods to close the modal and observe its lifecycle.
171
+ */
172
+ declare class ModalRef {
173
+ private readonly closeCallback;
174
+ private readonly _afterClosed;
175
+ /**
176
+ * Observable that emits when the modal has been closed.
177
+ * Completes after emission.
178
+ */
179
+ readonly afterClosed$: rxjs.Observable<void>;
180
+ constructor(closeCallback: () => void);
181
+ /**
182
+ * Closes the modal and triggers cleanup.
183
+ * Safe to call multiple times.
184
+ */
185
+ close(): void;
186
+ }
187
+
188
+ /**
189
+ * Service for managing modal dialogs.
190
+ * Provides methods to open, close, and manage modal instances.
191
+ */
192
+ declare class ModalService {
193
+ private readonly appRef;
194
+ private readonly injector;
195
+ private readonly document;
196
+ private activeModals;
197
+ /**
198
+ * Opens a modal with the provided template.
199
+ * @param template TemplateRef to render inside the modal
200
+ * @returns ModalRef instance for controlling the modal
201
+ */
202
+ open(template: TemplateRef<any>): ModalRef;
203
+ /**
204
+ * Closes a specific modal instance.
205
+ * @param componentRef Component reference to close
206
+ */
207
+ private closeModal;
208
+ /**
209
+ * Closes all currently open modals.
210
+ */
211
+ closeAll(): void;
212
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
213
+ static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
214
+ }
215
+
166
216
  declare class SeoService {
167
217
  private readonly title;
168
218
  private readonly meta;
@@ -268,7 +318,7 @@ declare abstract class CrudBaseService<T extends IEntity<string>> extends CrudSe
268
318
  protected getQueryType(type: '=' | '!=' | '>=' | '<=' | '<' | '>', isArray: boolean): "" | "[from]" | "[to]" | "[]";
269
319
  }
270
320
 
271
- declare const SERVICES: (typeof AuthStorageService | typeof ConfigsService | typeof ContrastService | typeof DictionaryService | typeof FileUrlService | typeof GlobalService | typeof TranslationService | typeof MetaService | typeof SeoService | typeof SettingsService | typeof StyleService | typeof WcagService | typeof ConfigsFacade)[];
321
+ declare const SERVICES: (typeof AuthStorageService | typeof ConfigsService | typeof ContrastService | typeof DictionaryService | typeof FileUrlService | typeof GlobalService | typeof TranslationService | typeof MetaService | typeof ModalService | typeof SeoService | typeof SettingsService | typeof StyleService | typeof WcagService | typeof ConfigsFacade)[];
272
322
 
273
323
  declare class PageComponent extends PageBaseComponent {
274
324
  static ɵfac: i0.ɵɵFactoryDeclaration<PageComponent, never>;
@@ -365,6 +415,32 @@ declare class ScrollTopComponent {
365
415
  static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollTopComponent, never, never, {}, {}, never, never, true, never>;
366
416
  }
367
417
 
418
+ /**
419
+ * Container component for modal overlay and content.
420
+ * Handles backdrop clicks and ESC key press.
421
+ */
422
+ declare class ModalContainerComponent {
423
+ /**
424
+ * Template to render inside the modal content area.
425
+ */
426
+ contentTemplate: i0.InputSignal<TemplateRef<any>>;
427
+ /**
428
+ * Emits when backdrop is clicked or ESC key is pressed.
429
+ */
430
+ backdropClick: i0.OutputEmitterRef<void>;
431
+ /**
432
+ * Listens for ESC key press on document level.
433
+ */
434
+ onEscapeKey(): void;
435
+ /**
436
+ * Handles backdrop click event.
437
+ * @param _event Mouse click event
438
+ */
439
+ onBackdropClick(_event: MouseEvent): void;
440
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalContainerComponent, never>;
441
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalContainerComponent, "smart-mobilems-modal-container", never, { "contentTemplate": { "alias": "contentTemplate"; "required": true; "isSignal": true; }; }, { "backdropClick": "backdropClick"; }, never, never, true, never>;
442
+ }
443
+
368
444
  interface IFooterStaticPage {
369
445
  type: ConfigPageType.static;
370
446
  title: string;
@@ -395,6 +471,61 @@ declare class FooterComponent {
395
471
  static ɵcmp: i0.ɵɵComponentDeclaration<FooterComponent, "smart-mobilems-footer", never, {}, {}, never, never, true, never>;
396
472
  }
397
473
 
474
+ interface IHeaderUser {
475
+ userID: string;
476
+ [key: string]: unknown;
477
+ }
478
+ interface IHeaderConfig {
479
+ theme?: {
480
+ header?: {
481
+ showWcagConfig?: boolean;
482
+ showSearch?: boolean;
483
+ showLocalCollection?: boolean;
484
+ showLanguageSelector?: boolean;
485
+ showUserAccount?: boolean;
486
+ };
487
+ };
488
+ }
489
+ declare class HeaderComponent {
490
+ private configsFacade;
491
+ private router;
492
+ private platformId;
493
+ readonly config: i0.Signal<dist_packages_shared_models_src.Config | null>;
494
+ readonly isMobile: i0.Signal<boolean>;
495
+ readonly showWcagConfig: i0.WritableSignal<boolean>;
496
+ readonly showSearchPanel: i0.WritableSignal<boolean>;
497
+ readonly user: i0.WritableSignal<IHeaderUser | null>;
498
+ readonly localCollectionCount: i0.WritableSignal<number>;
499
+ readonly headerConfig: i0.Signal<{
500
+ header?: {
501
+ showWcagConfig?: boolean;
502
+ showSearch?: boolean;
503
+ showLocalCollection?: boolean;
504
+ showLanguageSelector?: boolean;
505
+ showUserAccount?: boolean;
506
+ };
507
+ }>;
508
+ readonly isWcagVisible: i0.Signal<boolean>;
509
+ readonly isSearchVisible: i0.Signal<boolean>;
510
+ readonly isLocalCollectionVisible: i0.Signal<boolean>;
511
+ readonly isLanguageSelectorVisible: i0.Signal<boolean>;
512
+ readonly isUserAccountVisible: i0.Signal<boolean>;
513
+ toggleWcagConfig(): void;
514
+ toggleSearchPanel(): void;
515
+ onWcagCloseButtonEvent(closed: boolean): void;
516
+ onSearchPanelButtonEvent(opened: boolean): void;
517
+ routeToLogin(): void;
518
+ routeToUserAccount(): void;
519
+ routeToLocalCollection(): void;
520
+ setUser(user: IHeaderUser | null): void;
521
+ setLocalCollectionCount(count: number): void;
522
+ getUser(): IHeaderUser | null;
523
+ getLocalCollectionCount(): number;
524
+ updateConfig(): void;
525
+ static ɵfac: i0.ɵɵFactoryDeclaration<HeaderComponent, never>;
526
+ static ɵcmp: i0.ɵɵComponentDeclaration<HeaderComponent, "smart-mobilems-header", never, {}, {}, never, never, true, never>;
527
+ }
528
+
398
529
  declare const COMPONENTS: (typeof AppComponent)[];
399
530
 
400
531
  declare enum ListMode {
@@ -717,5 +848,5 @@ declare const authenticationGuard: CanActivateFn;
717
848
 
718
849
  declare const unauthorizedGuard: CanActivateFn;
719
850
 
720
- export { AppComponent, AuthStorageService, COMPONENTS, ConfigsFacade, ConfigsService, ContrastService, CrudBaseService, DIRECTIVES, DictionaryService, FileUrlService, FiltersBaseComponent, FiltersContext, FooterComponent, GameType, GlobalService, HoverDirective, ImageBox, ListMode, MetaService, PageComponent, SERVICES, ScrollTopComponent, ScrollableDirective, SeoService, SettingsService, SharedConfig, SharedModule, StyleService, TRANSLATE_DATA_PL, TranslationService, WcagService, authenticationGuard, environment, setTranslationsAndLang, unauthorizedGuard };
721
- export type { ChangePasswordErrorMessage, FileUrlMode, FilterType, ForgotPasswordErrorMessage, IAudio, IDictionaryItem, IErrorMessages, IFilterItem, IFilterOne, IFooterConfig, IFooterStaticPage, IGame, IGameAnswer, IGameMemoConfig, IGamePuzzleConfig, IGameQuestion, IGameQuizConfig, IImages, ILoginResponse, IObjectGallery, IObjectGalleryItem, IObjectGallerySingleObject, IQuickMenu, ISingleObjectMultimedia, ITranslateData, ITranslationConfig, IUser, IUserInfo, IUserModify, IUserQuery, IUserQueryList, IUserRegister, IVideo, IWcagConfig, ModifyUserErrorMessage, RegisterErrorMessage, SearchQuery, WcagChangeType, WcagContrast, WcagLetterSpacing, WcagText, WcagWordSpacing };
851
+ export { AppComponent, AuthStorageService, COMPONENTS, ConfigsFacade, ConfigsService, ContrastService, CrudBaseService, DIRECTIVES, DictionaryService, FileUrlService, FiltersBaseComponent, FiltersContext, FooterComponent, GameType, GlobalService, HeaderComponent, HoverDirective, ImageBox, ListMode, MetaService, ModalContainerComponent, ModalRef, ModalService, PageComponent, SERVICES, ScrollTopComponent, ScrollableDirective, SeoService, SettingsService, SharedConfig, SharedModule, StyleService, TRANSLATE_DATA_PL, TranslationService, WcagService, authenticationGuard, environment, setTranslationsAndLang, unauthorizedGuard };
852
+ export type { ChangePasswordErrorMessage, FileUrlMode, FilterType, ForgotPasswordErrorMessage, IAudio, IDictionaryItem, IErrorMessages, IFilterItem, IFilterOne, IFooterConfig, IFooterStaticPage, IGame, IGameAnswer, IGameMemoConfig, IGamePuzzleConfig, IGameQuestion, IGameQuizConfig, IHeaderConfig, IHeaderUser, IImages, ILoginResponse, IObjectGallery, IObjectGalleryItem, IObjectGallerySingleObject, IQuickMenu, ISingleObjectMultimedia, ITranslateData, ITranslationConfig, IUser, IUserInfo, IUserModify, IUserQuery, IUserQueryList, IUserRegister, IVideo, IWcagConfig, ModifyUserErrorMessage, RegisterErrorMessage, SearchQuery, WcagChangeType, WcagContrast, WcagLetterSpacing, WcagText, WcagWordSpacing };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartsoft001-mobilems/angular",
3
- "version": "2.13.0",
3
+ "version": "2.15.0",
4
4
  "module": "fesm2022/smartsoft001-mobilems-angular.mjs",
5
5
  "typings": "index.d.ts",
6
6
  "exports": {