@smartsoft001-mobilems/angular 2.9.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, MsFile } 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
|
|
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>;
|
|
@@ -428,5 +595,5 @@ interface SearchQuery {
|
|
|
428
595
|
searchTitle: string;
|
|
429
596
|
}
|
|
430
597
|
|
|
431
|
-
export { AppComponent, COMPONENTS, ConfigsFacade, ConfigsService, CrudBaseService, DictionaryService, FiltersBaseComponent, FiltersContext, GameType, ImageBox, ListMode, PageComponent, SERVICES, ScrollTopComponent, SharedConfig, SharedModule, TRANSLATE_DATA_PL, environment, setTranslationsAndLang };
|
|
432
|
-
export type { ChangePasswordErrorMessage, FilterType, ForgotPasswordErrorMessage, IAudio, IDictionaryItem, IErrorMessages, IFilterItem, IFilterOne, IGame, IGameAnswer, IGameMemoConfig, IGamePuzzleConfig, IGameQuestion, IGameQuizConfig, IImages, ILoginResponse, IObjectGallery, IObjectGalleryItem, IObjectGallerySingleObject, IQuickMenu, ISingleObjectMultimedia, ITranslateData, IUser, IUserInfo, IUserModify, IUserQuery, IUserQueryList, IUserRegister, IVideo, ModifyUserErrorMessage, RegisterErrorMessage, SearchQuery };
|
|
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 };
|