@smartsoft001-mobilems/angular 2.8.0 → 2.10.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
@@ -1,10 +1,11 @@
1
1
  import { TranslateService } from '@ngx-translate/core';
2
- import { Config, Page } from '@smartsoft001-mobilems/models';
2
+ import { Config, Page, IUser as IUser$1, MsFile } from '@smartsoft001-mobilems/models';
3
3
  import * as i0 from '@angular/core';
4
- import { ModuleWithProviders, Signal, AfterContentInit, TemplateRef } from '@angular/core';
4
+ import { ModuleWithProviders, ElementRef, Signal, AfterContentInit, TemplateRef } from '@angular/core';
5
5
  import * as i1 from '@angular/router';
6
6
  import { AppBaseComponent, PageBaseComponent, BaseComponent } from '@smartsoft001/angular';
7
- import { Observable } from 'rxjs';
7
+ import { Observable, Subscription } from 'rxjs';
8
+ import { MetaDefinition } from '@angular/platform-browser';
8
9
  import { CrudService, ICrudFilter, ICrudFilterQueryItem } from '@smartsoft001/crud-shell-angular';
9
10
  import { IEntity } from '@smartsoft001/domain-core';
10
11
 
@@ -17,6 +18,8 @@ declare const TRANSLATE_DATA_PL: ITranslateData;
17
18
  declare const environment: {
18
19
  production: boolean;
19
20
  apiUrl: string;
21
+ multimediaUrl: string;
22
+ mainLogoPath: string;
20
23
  };
21
24
 
22
25
  declare class ConfigsFacade {
@@ -32,6 +35,9 @@ declare class ConfigsFacade {
32
35
 
33
36
  declare class SharedConfig {
34
37
  apiUrl: string;
38
+ multimediaUrl: string;
39
+ mainLogoPath: string;
40
+ styleVariables?: Record<string, any>;
35
41
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedConfig, never>;
36
42
  static ɵprov: i0.ɵɵInjectableDeclaration<SharedConfig>;
37
43
  }
@@ -49,6 +55,16 @@ declare class SharedModule {
49
55
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedModule>;
50
56
  }
51
57
 
58
+ declare class AuthStorageService {
59
+ private readonly STORAGE_KEY;
60
+ setUser(user: IUser$1): void;
61
+ getUser(): IUser$1 | null;
62
+ removeUser(): void;
63
+ hasUser(): boolean;
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthStorageService, never>;
65
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthStorageService>;
66
+ }
67
+
52
68
  declare class ConfigsService {
53
69
  private readonly httpClient;
54
70
  private readonly config;
@@ -58,6 +74,20 @@ declare class ConfigsService {
58
74
  static ɵprov: i0.ɵɵInjectableDeclaration<ConfigsService>;
59
75
  }
60
76
 
77
+ declare class ContrastService {
78
+ private readonly platformId;
79
+ private readonly isBrowser;
80
+ readonly isActive: i0.WritableSignal<boolean>;
81
+ constructor();
82
+ changeTheme(active: boolean): void;
83
+ toggle(): void;
84
+ private applyContrast;
85
+ private setProperties;
86
+ private removeProperties;
87
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContrastService, never>;
88
+ static ɵprov: i0.ɵɵInjectableDeclaration<ContrastService>;
89
+ }
90
+
61
91
  interface IDictionaryItem {
62
92
  id: number;
63
93
  name: string;
@@ -80,6 +110,143 @@ declare class DictionaryService<T> {
80
110
  static ɵprov: i0.ɵɵInjectableDeclaration<DictionaryService<any>>;
81
111
  }
82
112
 
113
+ type FileUrlMode = 'cache' | 'big' | 'noCache';
114
+ declare class FileUrlService {
115
+ private readonly config;
116
+ get(fileOrPath?: MsFile | string, mode?: FileUrlMode, noImagePlaceholder?: string): string;
117
+ private getFileName;
118
+ private getPath;
119
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileUrlService, never>;
120
+ static ɵprov: i0.ɵɵInjectableDeclaration<FileUrlService>;
121
+ }
122
+
123
+ declare class GlobalService {
124
+ readonly showHeader: i0.WritableSignal<boolean>;
125
+ readonly showFooter: i0.WritableSignal<boolean>;
126
+ setHeaderVisibility(visible: boolean): void;
127
+ setFooterVisibility(visible: boolean): void;
128
+ hexToRgb(hex: string): number[] | null;
129
+ rgbToHex(r: number, g: number, b: number): string;
130
+ static ɵfac: i0.ɵɵFactoryDeclaration<GlobalService, never>;
131
+ static ɵprov: i0.ɵɵInjectableDeclaration<GlobalService>;
132
+ }
133
+
134
+ declare class MetaService {
135
+ private readonly meta;
136
+ private readonly title;
137
+ private readonly translationService;
138
+ private readonly router;
139
+ private readonly activatedRoute;
140
+ private readonly config;
141
+ private routerSubscription?;
142
+ constructor();
143
+ keepUpdatingPageTitle(onRouteChange: boolean): Subscription | void;
144
+ setPageMetadata(title?: string, description?: string): void;
145
+ setObjectMetadata(objectData: {
146
+ image?: MsFile;
147
+ title?: string;
148
+ description?: string;
149
+ type?: string;
150
+ }): void;
151
+ setImageMetadata(image: MsFile, imageAlt?: string, type?: string): void;
152
+ resetMetadata(): void;
153
+ updateTag(tag: MetaDefinition): void;
154
+ setTitle(titleText: string): void;
155
+ setDescription(description: string): void;
156
+ destroy(): void;
157
+ private buildImageUrl;
158
+ private removeHtmlTags;
159
+ private getRouteTitle;
160
+ static ɵfac: i0.ɵɵFactoryDeclaration<MetaService, never>;
161
+ static ɵprov: i0.ɵɵInjectableDeclaration<MetaService>;
162
+ }
163
+
164
+ declare class SeoService {
165
+ private readonly title;
166
+ private readonly meta;
167
+ updateTitle(titleText: string): void;
168
+ updateMetaTags(metaTags: MetaDefinition[]): void;
169
+ updateDescription(description: string): void;
170
+ updateOgTags(title?: string, description?: string, image?: string, url?: string): void;
171
+ private decodeHtml;
172
+ static ɵfac: i0.ɵɵFactoryDeclaration<SeoService, never>;
173
+ static ɵprov: i0.ɵɵInjectableDeclaration<SeoService>;
174
+ }
175
+
176
+ declare class SettingsService {
177
+ private readonly translationService;
178
+ private readonly config;
179
+ getMediaUrl(): string;
180
+ getBaseTitle(): string;
181
+ getCanLink(): boolean;
182
+ getMainLogo(): string;
183
+ static ɵfac: i0.ɵɵFactoryDeclaration<SettingsService, never>;
184
+ static ɵprov: i0.ɵɵInjectableDeclaration<SettingsService>;
185
+ }
186
+
187
+ declare class StyleService {
188
+ private readonly smartStyleService;
189
+ private readonly config;
190
+ init(elementRef: ElementRef, customVariables?: Record<string, any>): void;
191
+ static ɵfac: i0.ɵɵFactoryDeclaration<StyleService, never>;
192
+ static ɵprov: i0.ɵɵInjectableDeclaration<StyleService>;
193
+ }
194
+
195
+ interface ITranslationConfig {
196
+ language: string;
197
+ }
198
+ declare class TranslationService {
199
+ private readonly translateService;
200
+ private readonly _config;
201
+ readonly config: i0.Signal<ITranslationConfig>;
202
+ readonly config$: Observable<{
203
+ lang: string;
204
+ }>;
205
+ readonly currentLanguage: i0.Signal<string>;
206
+ private getInitialLanguage;
207
+ get(key: string, params?: any): string;
208
+ init(defaultLang?: string, availableLangs?: string[]): Promise<void>;
209
+ setLanguage(language: string): void;
210
+ private save;
211
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationService, never>;
212
+ static ɵprov: i0.ɵɵInjectableDeclaration<TranslationService>;
213
+ }
214
+
215
+ type WcagContrast = 'high' | 'normal' | 'grayscale';
216
+ type WcagText = 'small' | 'normal' | 'large';
217
+ type WcagLetterSpacing = 'small' | 'normal' | 'large';
218
+ type WcagWordSpacing = 'small' | 'normal' | 'large';
219
+ interface IWcagConfig {
220
+ contrast: WcagContrast;
221
+ text: WcagText;
222
+ letterSpacing: WcagLetterSpacing;
223
+ wordSpacing: WcagWordSpacing;
224
+ }
225
+ type WcagChangeType = 'setContrast' | 'setText' | 'setLetterSpacing' | 'setWordSpacing';
226
+ declare class WcagService {
227
+ private readonly translationService;
228
+ private readonly platformId;
229
+ private readonly isBrowser;
230
+ private readonly _config;
231
+ readonly config: i0.Signal<IWcagConfig>;
232
+ readonly wordSpacingValue: i0.Signal<number>;
233
+ readonly letterSpacingValue: i0.Signal<number>;
234
+ constructor();
235
+ init(): Promise<void>;
236
+ setContrast(value: WcagContrast): void;
237
+ setText(value: WcagText): void;
238
+ setLetterSpacing(value: WcagLetterSpacing): void;
239
+ setWordSpacing(value: WcagWordSpacing): void;
240
+ reset(): void;
241
+ private getSpacingValue;
242
+ private loadConfig;
243
+ private save;
244
+ private applyConfigToDOM;
245
+ private announceChange;
246
+ static ɵfac: i0.ɵɵFactoryDeclaration<WcagService, never>;
247
+ static ɵprov: i0.ɵɵInjectableDeclaration<WcagService>;
248
+ }
249
+
83
250
  declare abstract class CrudBaseService<T extends IEntity<string>> extends CrudService<T> {
84
251
  abstract getUrlNameForDetails(): string;
85
252
  abstract getUrlNameForList(): string;
@@ -99,7 +266,7 @@ declare abstract class CrudBaseService<T extends IEntity<string>> extends CrudSe
99
266
  protected getQueryType(type: '=' | '!=' | '>=' | '<=' | '<' | '>', isArray: boolean): "" | "[from]" | "[to]" | "[]";
100
267
  }
101
268
 
102
- declare const SERVICES: (typeof ConfigsService | typeof DictionaryService | typeof ConfigsFacade)[];
269
+ declare const SERVICES: (typeof ConfigsFacade | typeof StyleService | typeof ConfigsService | typeof AuthStorageService | typeof ContrastService | typeof FileUrlService | typeof GlobalService | typeof TranslationService | typeof MetaService | typeof SeoService | typeof SettingsService | typeof WcagService | typeof DictionaryService)[];
103
270
 
104
271
  declare class PageComponent extends PageBaseComponent {
105
272
  static ɵfac: i0.ɵɵFactoryDeclaration<PageComponent, never>;
@@ -186,7 +353,247 @@ declare abstract class FiltersBaseComponent<T extends IEntity<string>> implement
186
353
  static ɵdir: i0.ɵɵDirectiveDeclaration<FiltersBaseComponent<any>, "smart-mobilems-filters", never, {}, {}, ["contentTpl"], never, true, never>;
187
354
  }
188
355
 
356
+ declare class ScrollTopComponent {
357
+ private document;
358
+ windowScrolled: boolean;
359
+ constructor(document: Document);
360
+ onWindowScroll(): void;
361
+ scrollToTop(): void;
362
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScrollTopComponent, never>;
363
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollTopComponent, never, never, {}, {}, never, never, true, never>;
364
+ }
365
+
189
366
  declare const COMPONENTS: (typeof AppComponent)[];
190
367
 
191
- export { AppComponent, COMPONENTS, ConfigsFacade, ConfigsService, CrudBaseService, DictionaryService, FiltersBaseComponent, FiltersContext, PageComponent, SERVICES, SharedConfig, SharedModule, TRANSLATE_DATA_PL, environment, setTranslationsAndLang };
192
- export type { FilterType, IDictionaryItem, ITranslateData };
368
+ declare enum ListMode {
369
+ mobile = "mobile",
370
+ desktop = "desktop",
371
+ masonryGrid = "masonryGrid",
372
+ timeline = "timeline",
373
+ map = "map"
374
+ }
375
+ interface IQuickMenu {
376
+ elementId: string;
377
+ name: string;
378
+ }
379
+ interface IGame {
380
+ scores: any;
381
+ gameType: GameType;
382
+ difficulty: number;
383
+ puzzleImage: MsFile;
384
+ image: MsFile;
385
+ images: IImages[];
386
+ coverImage: MsFile;
387
+ questions?: IGameQuestion[];
388
+ objects: any[];
389
+ name: string;
390
+ description: string;
391
+ id: number;
392
+ published: boolean;
393
+ userId: number;
394
+ }
395
+ interface IGameQuestion {
396
+ question: string;
397
+ answers: IGameAnswer[];
398
+ file?: MsFile;
399
+ hint: string;
400
+ }
401
+ interface IGameAnswer {
402
+ userChoice?: boolean;
403
+ class?: string;
404
+ answer: string;
405
+ correct: boolean;
406
+ id?: number;
407
+ position?: number;
408
+ }
409
+ declare enum GameType {
410
+ puzzle = 1,
411
+ memo = 2,
412
+ quiz = 3
413
+ }
414
+ interface IObjectGallery {
415
+ id: number;
416
+ name: string;
417
+ items: IObjectGalleryItem[];
418
+ }
419
+ interface IObjectGalleryItem {
420
+ id: number;
421
+ position: number;
422
+ object: IObjectGallerySingleObject;
423
+ }
424
+ interface IObjectGallerySingleObject {
425
+ id: number;
426
+ inventoryNumber: string;
427
+ name: string;
428
+ multimedium: ISingleObjectMultimedia;
429
+ }
430
+ interface ISingleObjectMultimedia {
431
+ altTextEn: string;
432
+ extension: string;
433
+ altText: string;
434
+ filePath: string;
435
+ id: number;
436
+ }
437
+ interface IGameMemoConfig {
438
+ headerStyle: string;
439
+ boxStyle: string;
440
+ hiddenLabel?: boolean;
441
+ buttonStyle?: string;
442
+ gameNameStyle?: string;
443
+ textStyle: string;
444
+ mediaBaseUrl?: string;
445
+ }
446
+ interface IGamePuzzleConfig {
447
+ headerStyle: string;
448
+ boxStyle: string;
449
+ hiddenLabel: boolean;
450
+ startButtonStyle: string;
451
+ gameNameStyle: string;
452
+ imageStyle: string;
453
+ noImagePlaceholderSrc: string;
454
+ mediaBaseUrl?: string;
455
+ }
456
+ interface IGameQuizConfig {
457
+ headerStyle: string;
458
+ boxStyle: string;
459
+ hiddenLabel: boolean;
460
+ buttonStyle: string;
461
+ gameNameStyle: string;
462
+ answerStyle: string;
463
+ questionStyle: string;
464
+ textStyle: string;
465
+ progressStyle: string;
466
+ hintStyle: string;
467
+ noImagePlaceholderSrc: string;
468
+ mediaBaseUrl: string;
469
+ }
470
+ interface IImages {
471
+ file: MsFile;
472
+ id: number;
473
+ position: number;
474
+ }
475
+ declare class ImageBox {
476
+ xPos: string;
477
+ yPos: string;
478
+ index: string;
479
+ }
480
+ interface IAudio {
481
+ image?: MsFile;
482
+ audio?: MsFile;
483
+ title: string;
484
+ text: string;
485
+ }
486
+ interface IVideo {
487
+ image?: MsFile;
488
+ video?: MsFile;
489
+ title: string;
490
+ text: string;
491
+ }
492
+ interface IErrorMessages {
493
+ loginErrorMessage?: string | null;
494
+ forgotPasswordErrorMessage?: ForgotPasswordErrorMessage | null;
495
+ registerErrorMessage?: RegisterErrorMessage | null;
496
+ changePasswordErrorMessage?: ChangePasswordErrorMessage | null;
497
+ modifyUserErrorMessage?: ModifyUserErrorMessage | null;
498
+ }
499
+ interface ChangePasswordErrorMessage {
500
+ first: string;
501
+ second: string;
502
+ }
503
+ interface ForgotPasswordErrorMessage {
504
+ userNotFound: boolean;
505
+ }
506
+ interface ModifyUserErrorMessage {
507
+ authenticationError: {
508
+ email?: string;
509
+ login?: string;
510
+ avatar?: string;
511
+ };
512
+ }
513
+ interface RegisterErrorMessage {
514
+ email: string[] | null;
515
+ login: string[] | null;
516
+ password: {
517
+ first: string[] | null;
518
+ second: string[] | null;
519
+ };
520
+ status: number;
521
+ message: string;
522
+ }
523
+ interface IUserRegister {
524
+ username: string;
525
+ email: string;
526
+ password?: string;
527
+ password2?: string;
528
+ termsAcceptance: boolean;
529
+ }
530
+ interface IUser {
531
+ email: string;
532
+ password?: string;
533
+ userID: string;
534
+ token: string;
535
+ avatar?: string;
536
+ newsletterAcceptance?: boolean;
537
+ refreshToken?: string;
538
+ }
539
+ interface IUserInfo {
540
+ email: string;
541
+ userID: string;
542
+ avatar?: string;
543
+ newsletterAcceptance: boolean;
544
+ }
545
+ interface ILoginResponse {
546
+ /**
547
+ * JWTToken
548
+ */
549
+ token: string;
550
+ refresh_token: string;
551
+ }
552
+ interface ILoginResponse {
553
+ /**
554
+ * JWTToken
555
+ */
556
+ token: string;
557
+ refresh_token: string;
558
+ }
559
+ interface IUserModify {
560
+ email?: string;
561
+ username?: string;
562
+ }
563
+ interface IFilterOne {
564
+ active: boolean;
565
+ name: string;
566
+ desc: any;
567
+ value: any;
568
+ }
569
+ interface IFilterItem {
570
+ title: string;
571
+ searchText?: string;
572
+ value: string;
573
+ filter: IFilterOne;
574
+ }
575
+ interface IUserQuery {
576
+ id?: number;
577
+ createdAt?: string;
578
+ sortBy?: string;
579
+ filterList?: {
580
+ query?: IFilterItem[];
581
+ searchText?: string;
582
+ sortBy?: string;
583
+ };
584
+ jobs?: any[];
585
+ name: string;
586
+ type: string;
587
+ query: any;
588
+ }
589
+ interface IUserQueryList {
590
+ items: IUserQuery[];
591
+ }
592
+ interface SearchQuery {
593
+ deleteInProgress: boolean;
594
+ searchDate: string;
595
+ searchTitle: string;
596
+ }
597
+
598
+ export { AppComponent, AuthStorageService, COMPONENTS, ConfigsFacade, ConfigsService, ContrastService, CrudBaseService, DictionaryService, FileUrlService, FiltersBaseComponent, FiltersContext, GameType, GlobalService, ImageBox, ListMode, MetaService, PageComponent, SERVICES, ScrollTopComponent, SeoService, SettingsService, SharedConfig, SharedModule, StyleService, TRANSLATE_DATA_PL, TranslationService, WcagService, environment, setTranslationsAndLang };
599
+ export type { ChangePasswordErrorMessage, FileUrlMode, FilterType, ForgotPasswordErrorMessage, IAudio, IDictionaryItem, IErrorMessages, IFilterItem, IFilterOne, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartsoft001-mobilems/angular",
3
- "version": "2.8.0",
3
+ "version": "2.10.0",
4
4
  "module": "fesm2022/smartsoft001-mobilems-angular.mjs",
5
5
  "typings": "index.d.ts",
6
6
  "exports": {