@stemy/ngx-utils 12.2.10 → 12.2.12
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/bundles/stemy-ngx-utils.umd.js +34 -20
- package/bundles/stemy-ngx-utils.umd.js.map +1 -1
- package/esm2015/ngx-utils/common-types.js +1 -1
- package/esm2015/ngx-utils/services/formatter.service.js +4 -3
- package/esm2015/ngx-utils/services/language.service.js +16 -4
- package/esm2015/public_api.js +1 -1
- package/esm2020/ngx-utils/common-types.mjs +3 -1
- package/esm2020/ngx-utils/components/dynamic-table/dynamic-table.component.mjs +3 -3
- package/esm2020/ngx-utils/components/pagination-menu/pagination-menu.component.mjs +3 -3
- package/esm2020/ngx-utils/components/unordered-list/unordered-list.component.mjs +3 -3
- package/esm2020/ngx-utils/directives/async-method.base.mjs +3 -3
- package/esm2020/ngx-utils/directives/async-method.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/background.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/dynamic-table-template.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/global-template.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/icon.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/ngx-template-outlet.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/pagination-item.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/pagination.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/resource-if.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/sticky-class.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/sticky.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/unordered-list-item.directive.mjs +3 -3
- package/esm2020/ngx-utils/directives/unordered-list-template.directive.mjs +3 -3
- package/esm2020/ngx-utils/ngx-utils.imports.mjs +5 -1
- package/esm2020/ngx-utils/ngx-utils.module.mjs +15 -6
- package/esm2020/ngx-utils/pipes/chunk.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/entries.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/extra-item-properties.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/filter.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/find.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/format-number.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/get-offset.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/get-type.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/global-template.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/group-by.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/is-type.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/join.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/keys.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/map.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/max.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/min.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/pop.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/reduce.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/remap.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/replace.pipe.mjs +6 -5
- package/esm2020/ngx-utils/pipes/reverse.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/round.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/safe-html.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/shift.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/split.pipe.mjs +3 -3
- package/esm2020/ngx-utils/pipes/translate.pipe.mjs +4 -4
- package/esm2020/ngx-utils/pipes/values.pipe.mjs +3 -3
- package/esm2020/ngx-utils/plugins/resize-event.plugin.mjs +24 -9
- package/esm2020/ngx-utils/plugins/scroll-event.plugin.mjs +3 -3
- package/esm2020/ngx-utils/services/acl.service.mjs +3 -3
- package/esm2020/ngx-utils/services/api.service.mjs +3 -3
- package/esm2020/ngx-utils/services/base-http.client.mjs +3 -3
- package/esm2020/ngx-utils/services/base-http.service.mjs +12 -8
- package/esm2020/ngx-utils/services/config.service.mjs +3 -3
- package/esm2020/ngx-utils/services/error-handler.service.mjs +3 -3
- package/esm2020/ngx-utils/services/events.service.mjs +3 -3
- package/esm2020/ngx-utils/services/formatter.service.mjs +7 -6
- package/esm2020/ngx-utils/services/global-template.service.mjs +3 -3
- package/esm2020/ngx-utils/services/icon.service.mjs +3 -3
- package/esm2020/ngx-utils/services/language.service.mjs +3 -3
- package/esm2020/ngx-utils/services/local-http.service.mjs +47 -0
- package/esm2020/ngx-utils/services/open-api.service.mjs +3 -3
- package/esm2020/ngx-utils/services/promise.service.mjs +3 -3
- package/esm2020/ngx-utils/services/state.service.mjs +5 -5
- package/esm2020/ngx-utils/services/static-language.service.mjs +3 -3
- package/esm2020/ngx-utils/services/storage.service.mjs +3 -3
- package/esm2020/ngx-utils/services/toaster.service.mjs +3 -3
- package/esm2020/ngx-utils/services/translated-url.serializer.mjs +3 -3
- package/esm2020/ngx-utils/services/universal.service.mjs +5 -5
- package/esm2020/ngx-utils/services/wasm.service.mjs +46 -0
- package/esm2020/ngx-utils/utils/auth.guard.mjs +3 -3
- package/esm2020/ngx-utils/utils/date.utils.mjs +5 -4
- package/esm2020/ngx-utils/utils/jsonfn.mjs +45 -0
- package/esm2020/ngx-utils/utils/object.utils.mjs +3 -3
- package/esm2020/ngx-utils/utils/wasi.mjs +159 -0
- package/esm2020/ngx-utils/utils/wasm-worker-proxy.mjs +99 -0
- package/esm2020/public_api.mjs +5 -2
- package/fesm2015/stemy-ngx-utils.js +18 -5
- package/fesm2015/stemy-ngx-utils.js.map +1 -1
- package/fesm2015/stemy-ngx-utils.mjs +705 -288
- package/fesm2015/stemy-ngx-utils.mjs.map +1 -1
- package/fesm2020/stemy-ngx-utils.mjs +699 -286
- package/fesm2020/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +7 -1
- package/ngx-utils/services/formatter.service.d.ts +1 -1
- package/ngx-utils/services/language.service.d.ts +3 -3
- package/ngx-utils/services/local-http.service.d.ts +14 -0
- package/ngx-utils/services/wasm.service.d.ts +25 -0
- package/ngx-utils/utils/jsonfn.d.ts +6 -0
- package/ngx-utils/utils/wasi.d.ts +26 -0
- package/ngx-utils/utils/wasm-worker-proxy.d.ts +17 -0
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
- package/stemy-ngx-utils.metadata.json +1 -1
|
@@ -27,11 +27,17 @@ export interface ITranslation {
|
|
|
27
27
|
export interface ITranslations {
|
|
28
28
|
[key: string]: any;
|
|
29
29
|
}
|
|
30
|
+
export interface ILanguageSetting {
|
|
31
|
+
unavailable?: string;
|
|
32
|
+
[key: string]: string | boolean | number;
|
|
33
|
+
}
|
|
30
34
|
export interface ILanguageSettings {
|
|
31
35
|
languages: string[];
|
|
32
36
|
devLanguages: string[];
|
|
33
37
|
defaultLanguage: string;
|
|
34
|
-
settings?:
|
|
38
|
+
settings?: {
|
|
39
|
+
[lang: string]: ILanguageSetting;
|
|
40
|
+
};
|
|
35
41
|
}
|
|
36
42
|
export interface ILanguageService {
|
|
37
43
|
currentLanguage: string;
|
|
@@ -6,7 +6,7 @@ export declare class FormatterService {
|
|
|
6
6
|
get defaultDivider(): number;
|
|
7
7
|
constructor(language: ILanguageService);
|
|
8
8
|
roundNumber(value: number, precision?: number, divider?: number): number;
|
|
9
|
-
formatNumber(value: number | string, format?: string, precision?: number, divider?: number): string;
|
|
9
|
+
formatNumber(value: number | string, format?: string, precision?: number, divider?: number, minDigits?: number): string;
|
|
10
10
|
formatMillimeter(value: number, precision?: number, divider?: number): string;
|
|
11
11
|
protected getPrecision(precision: number): number;
|
|
12
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BehaviorSubject, Observable } from "rxjs";
|
|
2
|
-
import { ILanguageSettings, ITranslations } from "../common-types";
|
|
2
|
+
import { ILanguageSetting, ILanguageSettings, ITranslations } from "../common-types";
|
|
3
3
|
import { StaticLanguageService } from "./static-language.service";
|
|
4
4
|
export declare class LanguageService extends StaticLanguageService {
|
|
5
5
|
protected translationRequests: ITranslations;
|
|
@@ -7,8 +7,8 @@ export declare class LanguageService extends StaticLanguageService {
|
|
|
7
7
|
protected languageSettings: BehaviorSubject<ILanguageSettings>;
|
|
8
8
|
get currentLanguage(): string;
|
|
9
9
|
set currentLanguage(lang: string);
|
|
10
|
-
get settings():
|
|
11
|
-
get $settings(): Observable<
|
|
10
|
+
get settings(): ILanguageSetting;
|
|
11
|
+
get $settings(): Observable<ILanguageSetting>;
|
|
12
12
|
protected initService(): void;
|
|
13
13
|
initFromSettings(): Promise<any>;
|
|
14
14
|
getTranslation(key: string, params?: any): Promise<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IRequestOptions } from "../common-types";
|
|
2
|
+
import { BaseHttpService } from "./base-http.service";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class LocalHttpService extends BaseHttpService {
|
|
5
|
+
private images;
|
|
6
|
+
get name(): string;
|
|
7
|
+
protected get withCredentials(): boolean;
|
|
8
|
+
protected initService(): void;
|
|
9
|
+
url(url: string): string;
|
|
10
|
+
get(url: string, options?: IRequestOptions): Promise<any>;
|
|
11
|
+
getImage(url: string): Promise<HTMLImageElement>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocalHttpService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LocalHttpService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Type } from "@angular/core";
|
|
2
|
+
import { IWasi, IWasm, IWasmAsync } from "../common-types";
|
|
3
|
+
import { UniversalService } from "./universal.service";
|
|
4
|
+
import { LocalHttpService } from "./local-http.service";
|
|
5
|
+
import { Wasi } from "../utils/wasi";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Use this service to load WebAssembly modules
|
|
9
|
+
*/
|
|
10
|
+
export declare class WasmService {
|
|
11
|
+
protected universal: UniversalService;
|
|
12
|
+
protected http: LocalHttpService;
|
|
13
|
+
protected wasi: Type<Wasi>;
|
|
14
|
+
protected modules: {
|
|
15
|
+
[url: string]: Promise<any>;
|
|
16
|
+
};
|
|
17
|
+
protected workerModules: {
|
|
18
|
+
[url: string]: any;
|
|
19
|
+
};
|
|
20
|
+
constructor(universal: UniversalService, http: LocalHttpService, wasi: IWasi);
|
|
21
|
+
getModule<T = IWasm>(name: string): Promise<T>;
|
|
22
|
+
getWorkerModule<T = IWasmAsync>(name: string): T;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WasmService, never>;
|
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WasmService>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IWasi, IWasmExports } from "../common-types";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class Wasi implements IWasi {
|
|
4
|
+
protected env: {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
};
|
|
7
|
+
protected instantiated: boolean;
|
|
8
|
+
protected wasi: any;
|
|
9
|
+
protected wasm: IWasmExports;
|
|
10
|
+
protected envStrings: string[];
|
|
11
|
+
constructor();
|
|
12
|
+
instantiate(bytes: ArrayBuffer): Promise<IWasmExports>;
|
|
13
|
+
protected updateMemoryViews(): void;
|
|
14
|
+
protected getEnvStrings(): string[];
|
|
15
|
+
protected stringToAscii(str: any, buffer: any): void;
|
|
16
|
+
emscripten_notify_memory_growth(memoryIndex: number): void;
|
|
17
|
+
proc_exit(rval: number): void;
|
|
18
|
+
environ_get(environ: number, environ_buf: number): number;
|
|
19
|
+
environ_sizes_get(penviron_count: number, penviron_buf_size: number): number;
|
|
20
|
+
fd_close(fd: number): number;
|
|
21
|
+
fd_write(fd: number, iovs: number, iovs_len: number, nwritten: number): number;
|
|
22
|
+
fd_read(fd: number, iovs: number, iovs_len: number, nread: number): number;
|
|
23
|
+
fd_seek(fd: number, offset: number, whence: number, newOffset: number): number;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Wasi, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Wasi>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IWasi } from "../common-types";
|
|
2
|
+
import { Type } from "@angular/core";
|
|
3
|
+
interface IPromiseExecutor {
|
|
4
|
+
resolve: (value?: any) => void;
|
|
5
|
+
reject: (reason?: any) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function workerFunction(JSONfn: any, logTimes: boolean): void;
|
|
8
|
+
export declare class WasmWorkerProxy {
|
|
9
|
+
protected methods: Promise<string[]>;
|
|
10
|
+
protected onMethods: (methods: string[]) => void;
|
|
11
|
+
protected worker: Worker;
|
|
12
|
+
protected promises: Map<string, IPromiseExecutor>;
|
|
13
|
+
constructor(wasmPath: string, wasi: Type<IWasi>, logTimes?: boolean);
|
|
14
|
+
onMessage(e: MessageEvent): void;
|
|
15
|
+
call(method: string, args: any[]): Promise<any>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { IResolveFactory, CanvasColor, IIconService, ICON_SERVICE, ITranslation, ITranslations, ILanguageSettings, ILanguageService, LANGUAGE_SERVICE, IAuthService, RouteValidator, IRouteData, IRoute, AUTH_SERVICE, IAclComponent, IPromiseService, PROMISE_SERVICE, IRouteStateInfo, NavigationUrlParam, StorageMode, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, UnorederedListTemplate, UnorderedListTemplates, UnorderedListStyle, IAjaxRequestDetails, AjaxRequestCallback, IScriptPromises, IStylePromises, ISearchObservable, FactoryDependencies, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IHttpHeaders, IHttpParams, IRequestOptions, IIssueContext, IProgress, ProgressListener, PromiseExecutor, HttpPromise, IHttpService, EXPRESS_REQUEST, IApiService, API_SERVICE, IOpenApiSchemaProperty, IOpenApiSchema, IOpenApiSchemas, ITableColumns, ITableTemplate, ITableTemplates, TableDataLoader, ResourceIfContext, IConfiguration, IConfigService, CONFIG_SERVICE, BASE_CONFIG, SCRIPT_PARAMS, ROOT_ELEMENT, ErrorHandlerCallback, ERROR_HANDLER, GlobalComponentModifier, IGlobalTemplates, GLOBAL_TEMPLATES, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
|
|
1
|
+
export { IResolveFactory, CanvasColor, IIconService, ICON_SERVICE, ITranslation, ITranslations, ILanguageSetting, ILanguageSettings, ILanguageService, LANGUAGE_SERVICE, IAuthService, RouteValidator, IRouteData, IRoute, AUTH_SERVICE, IAclComponent, IPromiseService, PROMISE_SERVICE, IRouteStateInfo, NavigationUrlParam, StorageMode, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, UnorederedListTemplate, UnorderedListTemplates, UnorderedListStyle, IAjaxRequestDetails, AjaxRequestCallback, IScriptPromises, IStylePromises, ISearchObservable, FactoryDependencies, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IHttpHeaders, IHttpParams, IRequestOptions, IIssueContext, IProgress, ProgressListener, PromiseExecutor, HttpPromise, IHttpService, EXPRESS_REQUEST, IApiService, API_SERVICE, IOpenApiSchemaProperty, IOpenApiSchema, IOpenApiSchemas, ITableColumns, ITableTemplate, ITableTemplates, TableDataLoader, ResourceIfContext, IConfiguration, IConfigService, CONFIG_SERVICE, BASE_CONFIG, SCRIPT_PARAMS, ROOT_ELEMENT, ErrorHandlerCallback, ERROR_HANDLER, GlobalComponentModifier, IGlobalTemplates, GLOBAL_TEMPLATES, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
|
|
2
2
|
export { AjaxRequestHandler } from "./ngx-utils/utils/ajax-request-handler";
|
|
3
3
|
export { ObjectUtils } from "./ngx-utils/utils/object.utils";
|
|
4
4
|
export { DateUtils } from "./ngx-utils/utils/date.utils";
|