@stemy/ngx-utils 19.5.1 → 19.5.3

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.
@@ -55,6 +55,7 @@ export interface ILanguageSettings {
55
55
  export interface ILanguageService {
56
56
  currentLanguage: string;
57
57
  editLanguage: string;
58
+ enableTranslations: boolean;
58
59
  disableTranslations: boolean;
59
60
  defaultLanguage: string;
60
61
  dictionary: ITranslations;
@@ -65,8 +65,8 @@ import { UnorderedListComponent } from "./components/unordered-list/unordered-li
65
65
  import { UploadComponent } from "./components/upload/upload.component";
66
66
  export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe)[];
67
67
  export declare const directives: (typeof AsyncMethodBase | typeof BackgroundDirective | typeof ComponentLoaderDirective | typeof DynamicTableTemplateDirective | typeof GlobalTemplateDirective | typeof IconDirective | typeof NgxTemplateOutletDirective | typeof PaginationDirective | typeof PaginationItemDirective | typeof ResourceIfDirective | typeof StickyDirective | typeof StickyClassDirective | typeof DropdownDirective | typeof DropdownContentDirective | typeof DropdownToggleDirective | typeof UnorderedListItemDirective | typeof UnorderedListTemplateDirective)[];
68
- export declare const components: (typeof ChipsComponent | typeof DropListComponent | typeof DynamicTableComponent | typeof FakeModuleComponent | typeof InteractiveCanvasComponent | typeof InteractiveCircleComponent | typeof InteractiveRectComponent | typeof PaginationMenuComponent | typeof UnorderedListComponent | typeof UploadComponent)[];
69
- export declare const providers: (typeof BaseHttpService | typeof BaseHttpClient | typeof StorageService | typeof UniversalService | typeof StateService | typeof AuthGuard | typeof WasmService | typeof AclService | typeof StaticAuthService | typeof ConfigService | typeof BaseDialogService | typeof ErrorHandlerService | typeof EventsService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof BaseToasterService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof PromiseService | typeof SocketService | typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe | typeof DeviceDetectorService | {
68
+ export declare const components: (typeof ChipsComponent | typeof DropListComponent | typeof DynamicTableComponent | typeof FakeModuleComponent | typeof PaginationMenuComponent | typeof InteractiveCanvasComponent | typeof InteractiveCircleComponent | typeof InteractiveRectComponent | typeof UnorderedListComponent | typeof UploadComponent)[];
69
+ export declare const providers: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe | typeof BaseHttpClient | typeof BaseHttpService | typeof AuthGuard | typeof AclService | typeof StaticAuthService | typeof ConfigService | typeof BaseDialogService | typeof ErrorHandlerService | typeof EventsService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof PromiseService | typeof SocketService | typeof StateService | typeof StorageService | typeof BaseToasterService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof UniversalService | typeof WasmService | typeof DeviceDetectorService | {
70
70
  provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
71
71
  useClass: typeof DragDropEventPlugin;
72
72
  multi: boolean;
@@ -5,7 +5,7 @@ export declare class TranslatePipe implements PipeTransform {
5
5
  readonly cdr: ChangeDetectorRef;
6
6
  readonly language: ILanguageService;
7
7
  private lang;
8
- private disabled;
8
+ private enabled;
9
9
  private query;
10
10
  private args;
11
11
  private params;
@@ -4,6 +4,7 @@ export declare class EventsService {
4
4
  readonly eventForwarded: EventEmitter<Event>;
5
5
  readonly stickyUpdated: EventEmitter<boolean>;
6
6
  readonly languageChanged: EventEmitter<string>;
7
+ readonly translationsEnabled: EventEmitter<boolean>;
7
8
  private sticky;
8
9
  get isSticky(): boolean;
9
10
  constructor();
@@ -12,9 +12,8 @@ export declare class LanguageService extends StaticLanguageService {
12
12
  get $settings(): Observable<ILanguageSetting>;
13
13
  protected initService(): void;
14
14
  initFromSettings(): Promise<any>;
15
- getTranslation(key: string, params?: any): Promise<string>;
16
15
  protected useLanguage(lang: string): Promise<ITranslations>;
17
- protected loadDictionary(): Promise<any>;
16
+ protected loadDictionary(): Promise<ITranslations>;
18
17
  protected loadSettings(): Promise<ILanguageSettings>;
19
18
  static ɵfac: i0.ɵɵFactoryDeclaration<LanguageService, never>;
20
19
  static ɵprov: i0.ɵɵInjectableDeclaration<LanguageService>;
@@ -19,6 +19,8 @@ export declare class StaticLanguageService implements ILanguageService {
19
19
  set currentLanguage(lang: string);
20
20
  get editLanguage(): string;
21
21
  set editLanguage(lang: string);
22
+ get enableTranslations(): boolean;
23
+ set enableTranslations(value: boolean);
22
24
  get disableTranslations(): boolean;
23
25
  set disableTranslations(value: boolean);
24
26
  get httpClient(): HttpClient;
@@ -26,7 +28,7 @@ export declare class StaticLanguageService implements ILanguageService {
26
28
  get universal(): UniversalService;
27
29
  protected editLang: string;
28
30
  protected currentLang: string;
29
- protected disableTrans: boolean;
31
+ protected enableTrans: boolean;
30
32
  protected languageList: string[];
31
33
  protected readonly translations: ITranslations;
32
34
  constructor(events: EventsService, storage: StorageService, configs: IConfigService, promises: IPromiseService, client: BaseHttpClient);
@@ -34,10 +36,12 @@ export declare class StaticLanguageService implements ILanguageService {
34
36
  replaceLanguages(languages: string[]): void;
35
37
  addLanguages(languages: string[]): void;
36
38
  getTranslationSync(key: string, params?: Object): string;
37
- getTranslation(key: string, params?: Object): Promise<string>;
39
+ getTranslation(key: string, params?: any): Promise<string>;
38
40
  getTranslations(...keys: string[]): Promise<ITranslations>;
39
41
  getTranslationFromObject(translations: ITranslations, params?: any, lang?: string): string;
40
42
  getTranslationFromArray(translations: ITranslation[], params?: any, lang?: string): string;
43
+ protected loadDictionary(): Promise<ITranslations>;
44
+ protected setDictionary(lang: string, dictionary: ITranslations): ITranslations;
41
45
  protected interpolate(expr: string | Function, params?: Object): string;
42
46
  protected interpolateString(expr: string, params?: Object): string;
43
47
  protected getDefaultLanguage(): string;
@@ -0,0 +1,4 @@
1
+ export declare class ForbiddenZone {
2
+ static isForbidden(name: string): boolean;
3
+ static run<T>(name: string, cb: () => T): T;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "19.5.1",
3
+ "version": "19.5.3",
4
4
  "license": "MIT",
5
5
  "public": true,
6
6
  "repository": "https://github.com/stemyke/ngx-utils.git",
@@ -21,6 +21,7 @@
21
21
  "invokable": "^1.0.3",
22
22
  "ngx-device-detector": "^9.0.0",
23
23
  "@floating-ui/dom": "^1.7.1",
24
+ "zone.js": "^0.15.1",
24
25
  "json5": "^2.2.3"
25
26
  },
26
27
  "main": "dist/bundles/stemy-ngx-utils.umd.js",
package/public_api.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import "zone.js";
1
2
  export { MaybePromise, MaybeArray, StringKeys } from "./ngx-utils/helper-types";
2
3
  export { DurationUnit, TypedFactoryProvider, TypedValueProvider, CachedProvider, CachedFactory, OPTIONS_TOKEN, IResolveFactory, CanvasColor, IIconService, ICON_SERVICE, ITranslation, ITranslations, ILanguageSetting, ILanguageSettings, ILanguageService, LANGUAGE_SERVICE, IAuthService, RouteValidator, IRouteData, IRoute, AUTH_SERVICE, IAclComponent, IDialogButtonConfig, IDialogConfig, IConfirmDialogConfig, IDialogService, DIALOG_SERVICE, IPromiseService, PROMISE_SERVICE, IWasi, IWasmExports, IWasm, IWasmAsync, WASI_IMPLEMENTATION, IRouteStateInfo, NavigationUrlParam, StorageMode, ToastType, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, DropdownAttachTo, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, UploadType, IFileUploadResult, IFileUploadProcess, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, ILoadableElement, ILoaderPromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IPoint, IShape, CanvasItemShape, CanvasItemDirection, InteractiveCanvas, InteractiveCanvasItem, InteractiveDrawFn, InteractivePanEvent, InteractiveCanvasPointer, IHttpHeaders, IHttpParams, IRequestOptions, IIssueContext, IProgress, ProgressListener, PromiseExecutor, HttpPromise, IHttpService, EXPRESS_REQUEST, IApiService, API_SERVICE, IOpenApiSchemaProperty, IOpenApiSchema, IOpenApiSchemas, TableFilterType, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataLoader, DragDropEvent, DragEventHandler, ITableDragEvent, DynamicTableDragHandler, ResourceIfContext, CssSelector, CssSelectorList, DynamicComponentLocation, DynamicModuleInfo, DynamicEntryComponents, APP_BASE_URL, IConfiguration, IConfigService, CONFIG_SERVICE, BASE_CONFIG, SCRIPT_PARAMS, ROOT_ELEMENT, RESIZE_DELAY, ResizeEventStrategy, RESIZE_STRATEGY, ErrorHandlerCallback, ERROR_HANDLER, GlobalComponentModifier, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
3
4
  export { AjaxRequestHandler } from "./ngx-utils/utils/ajax-request-handler";
@@ -7,6 +8,7 @@ export { cachedFactory } from "./ngx-utils/utils/cached-factory";
7
8
  export { CanvasUtils } from "./ngx-utils/utils/canvas.utils";
8
9
  export { DateUtils } from "./ngx-utils/utils/date.utils";
9
10
  export { FileUtils } from "./ngx-utils/utils/file.utils";
11
+ export { ForbiddenZone } from "./ngx-utils/utils/forbidden-zone";
10
12
  export { GenericValue } from "./ngx-utils/utils/generic-value";
11
13
  export { FileSystemEntryOpenResult, FileSystemEntryOpenCb, FileSystemEntry } from "./ngx-utils/utils/file-system";
12
14
  export { Rect, Circle, Point } from "./ngx-utils/utils/geometry";