@stemy/ngx-utils 19.7.23 → 19.7.25

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.
@@ -602,6 +602,7 @@ export declare class IConfiguration {
602
602
  [key: string]: any;
603
603
  }
604
604
  export interface IConfigService {
605
+ readonly http: IBaseHttpClient;
605
606
  readonly config: IConfiguration;
606
607
  readonly injector: Injector;
607
608
  readonly load: () => Promise<IConfiguration>;
@@ -44,6 +44,7 @@ export declare class BaseHttpService implements IHttpService {
44
44
  protected handleUnauthorizedError(absoluteUrl: string, options: HttpClientRequestOptions, reject: () => void): void;
45
45
  protected toastWarning(message: string, issueContext: IIssueContext, reason: any, options: HttpClientRequestOptions): void;
46
46
  protected toastError(message: string, issueContext: IIssueContext, reason: any, options: HttpClientRequestOptions): void;
47
+ protected makeCacheKey(url: string, read: string, options: HttpRequestOptions): string;
47
48
  protected toPromise(url: string, requestOptions: HttpRequestOptions, listener?: ProgressListener): Promise<any>;
48
49
  protected getUserTokenTime(): number;
49
50
  protected pushFailedRequest(url: string, options: HttpClientRequestOptions, req: () => void): boolean;
@@ -1,10 +1,10 @@
1
1
  import { Injector } from "@angular/core";
2
- import { HttpClient } from "@angular/common/http";
3
2
  import { UniversalService } from "./universal.service";
4
3
  import { IConfigService, IConfiguration } from "../common-types";
4
+ import { BaseHttpClient } from "./base-http.client";
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class ConfigService implements IConfigService {
7
- readonly http: HttpClient;
7
+ readonly http: BaseHttpClient;
8
8
  readonly universal: UniversalService;
9
9
  readonly injector: Injector;
10
10
  readonly rootElement: HTMLElement;
@@ -17,7 +17,7 @@ export declare class ConfigService implements IConfigService {
17
17
  get load(): () => Promise<IConfiguration>;
18
18
  get config(): IConfiguration;
19
19
  get configUrl(): string;
20
- constructor(http: HttpClient, universal: UniversalService, injector: Injector, rootElement: HTMLElement, baseUrl: string, baseConfig?: IConfiguration, scriptParams?: any);
20
+ constructor(http: BaseHttpClient, universal: UniversalService, injector: Injector, rootElement: HTMLElement, baseUrl: string, baseConfig?: IConfiguration, scriptParams?: any);
21
21
  protected initService(): void;
22
22
  protected loadJson(): Promise<IConfiguration>;
23
23
  protected prepareConfig(config: IConfiguration): Promise<IConfiguration>;
@@ -8,9 +8,10 @@ export declare class RequestBag {
8
8
  get requestParams(): Readonly<HttpRequestQuery>;
9
9
  constructor(source?: RequestBag);
10
10
  makeHeaders(headersObj?: HttpRequestHeaders | HttpHeaders, withCredentials?: boolean): HttpHeaders;
11
- makeParams(paramsObj?: HttpRequestQuery): HttpParams;
11
+ makeParams(paramsObj?: HttpParams | HttpRequestQuery): HttpParams;
12
12
  setHeader(name: string, value?: string | string[]): void;
13
13
  getHeader(name: string): string;
14
14
  setParam(name: string, value?: any): void;
15
- protected convertHeaders(headers: HttpHeaders): HttpRequestHeaders;
15
+ convertHeaders(headers: HttpHeaders | HttpRequestHeaders): HttpRequestHeaders;
16
+ convertParams(params: HttpParams | HttpRequestQuery): HttpRequestQuery;
16
17
  }
@@ -0,0 +1 @@
1
+ export declare function md5(input: string | Record<string, any>): string;
@@ -0,0 +1,2 @@
1
+ export type JsonReplacer = (key: string, value: any) => any;
2
+ export declare function stringify(value: any, replacer?: JsonReplacer, spaces?: number, cycleReplacer?: JsonReplacer): string;
@@ -7,12 +7,6 @@ export declare function isBrowser(): boolean;
7
7
  * @return {DocumentOrShadowRoot} The document or the elements shadow root
8
8
  */
9
9
  export declare function getRoot(elem: HTMLElement): DocumentOrShadowRoot;
10
- /**
11
- * Returns a hash code from anything
12
- * @param {string} obj The object to hash.
13
- * @return {number} A 32bit integer
14
- */
15
- export declare function hashCode(obj: any): number;
16
10
  export declare function switchClass(elem: HTMLElement, className: string, status?: boolean): void;
17
11
  export declare function getCssVariables(elem: HTMLElement): Record<string, string>;
18
12
  export declare function checkTransitions(el: HTMLElement, cb: () => any): void;
@@ -17,7 +17,6 @@ export declare class ObjectUtils {
17
17
  static filter(obj: any, predicate: FilterPredicate): any;
18
18
  static copy<T>(obj: T): T;
19
19
  static assign<T>(target: T, source: any, predicate?: FilterPredicate): T;
20
- static hashCode(obj: any): number;
21
20
  static getType(obj: any): string;
22
21
  static isPrimitive(value: any): boolean;
23
22
  static isObject(value: any): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "19.7.23",
3
+ "version": "19.7.25",
4
4
  "license": "MIT",
5
5
  "public": true,
6
6
  "repository": "https://github.com/stemyke/ngx-utils.git",
package/public_api.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  import "zone.js";
2
2
  export { MaybePromise, MaybeArray, KeysOfType, ObjOfType, StringKeys, CapitalizeFirst, CamelJoin, PrefixedPick } from "./ngx-utils/helper-types";
3
- export { DurationUnit, TypedFactoryProvider, TypedValueProvider, TypedExistingProvider, TypedClassProvider, TypedTokenProvider, TypedProvider, CachedFactory, ResolveFactory, IResolveFactory, CanvasColor, IIconService, ITranslation, ITranslations, ILanguageSetting, ILanguageSettings, ILanguageService, IUserData, IAuthService, RouteValidator, IRouteData, IRoute, IAclComponent, IDialogButtonConfig, IDialogConfig, IConfirmMessageConfig, IConfirmDialogConfig, IDialogService, IPromiseService, IRouteStateInfo, NavigationUrlParam, StorageMode, ToastType, IToasterService, IAsyncMessage, AsyncMethod, IconMap, IconProps, ButtonType, ButtonSize, ButtonProps, TabValue, TabOption, ChipValue, ChipStatus, ChipOption, DropdownAttachTo, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, UploadType, IFileUploadResult, IFileUploadProcess, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, ILoadableElement, ILoaderPromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IPoint, ShapeIntersection, ShapeDistance, IShape, CanvasResizeMode, CanvasItemDirection, CanvasPaintFunc, RangeCoords, RectCoords, Frame, InteractiveCanvasParams, InteractiveCanvasItem, InteractiveCanvasItems, InteractiveCanvas, InteractiveCanvasRenderer, InteractivePanEvent, InteractiveCanvasPointer, HttpRequestHeaders, HttpRequestQuery, HttpClientRequestOptions, HttpRequestOptions, UploadData, IIssueContext, IProgress, ProgressListener, CacheExpireMode, IHttpService, SvgSourceModifier, IApiService, DynamicSchemaRef, OpenApiSchemaProperty, OpenApiSchema, OpenApiSchemas, TableFilterType, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataItems, TableDataLoader, DragDropEvent, DragEventHandler, ITableDragEvent, DynamicTableDragHandler, ResourceIfContext, CssSelector, CssSelectorList, DynamicComponentLocation, DynamicModuleInfo, DynamicEntryComponents, IConfiguration, IConfigService, ResizeEventStrategy, ErrorHandlerCallback, GlobalComponentModifier, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
3
+ export { DurationUnit, TypedFactoryProvider, TypedValueProvider, TypedExistingProvider, TypedClassProvider, TypedTokenProvider, TypedProvider, CachedFactory, ResolveFactory, IResolveFactory, CanvasColor, IIconService, ITranslation, ITranslations, ILanguageSetting, ILanguageSettings, ILanguageService, IUserData, IAuthService, RouteValidator, IRouteData, IRoute, IAclComponent, IDialogButtonConfig, IDialogConfig, IConfirmMessageConfig, IConfirmDialogConfig, IDialogService, IPromiseService, IRouteStateInfo, NavigationUrlParam, StorageMode, ToastType, IToasterService, IAsyncMessage, AsyncMethod, IconMap, IconProps, ButtonType, ButtonSize, ButtonProps, TabValue, TabOption, ChipValue, ChipStatus, ChipOption, DropdownAttachTo, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, UploadType, IFileUploadResult, IFileUploadProcess, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, ILoadableElement, ILoaderPromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IPoint, ShapeIntersection, ShapeDistance, IShape, CanvasResizeMode, CanvasItemDirection, CanvasPaintFunc, RangeCoords, RectCoords, Frame, InteractiveCanvasParams, InteractiveCanvasItem, InteractiveCanvasItems, InteractiveCanvas, InteractiveCanvasRenderer, InteractivePanEvent, InteractiveCanvasPointer, HttpRequestHeaders, HttpRequestQuery, HttpClientRequestOptions, HttpRequestOptions, UploadData, IIssueContext, IProgress, ProgressListener, CacheExpireMode, IHttpService, SvgSourceModifier, IBaseHttpClient, IApiService, DynamicSchemaRef, OpenApiSchemaProperty, OpenApiSchema, OpenApiSchemas, TableFilterType, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataItems, TableDataLoader, DragDropEvent, DragEventHandler, ITableDragEvent, DynamicTableDragHandler, ResourceIfContext, CssSelector, CssSelectorList, DynamicComponentLocation, DynamicModuleInfo, DynamicEntryComponents, IConfiguration, IConfigService, ResizeEventStrategy, ErrorHandlerCallback, GlobalComponentModifier, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
4
4
  export { ICON_TYPE, ICON_MAP, BUTTON_TYPE, ERROR_HANDLER, STATIC_SCHEMAS, RESIZE_STRATEGY, RESIZE_DELAY, ROOT_ELEMENT, SCRIPT_PARAMS, BASE_CONFIG, CONFIG_SERVICE, APP_BASE_URL, API_SERVICE, EXPRESS_REQUEST, PROMISE_SERVICE, DIALOG_SERVICE, TOASTER_SERVICE, AUTH_SERVICE, LANGUAGE_SERVICE, ICON_SERVICE, OPTIONS_TOKEN } from "./ngx-utils/tokens";
5
5
  export { AjaxRequestHandler } from "./ngx-utils/utils/ajax-request-handler";
6
6
  export { ArrayUtils } from "./ngx-utils/utils/array.utils";
7
7
  export { AuthGuard } from "./ngx-utils/utils/auth.guard";
8
8
  export { createTypedProvider, cachedFactory } from "./ngx-utils/utils/cached-factory";
9
9
  export { CanvasUtils } from "./ngx-utils/utils/canvas";
10
+ export { md5 } from "./ngx-utils/utils/crypto.utils";
10
11
  export { DateUtils } from "./ngx-utils/utils/date.utils";
11
12
  export { FileUtils } from "./ngx-utils/utils/file.utils";
12
13
  export { ForbiddenZone } from "./ngx-utils/utils/forbidden-zone";
@@ -16,11 +17,11 @@ export { ExclusionsRenderer } from "./ngx-utils/utils/canvas-renderers/exclusion
16
17
  export { RulerCanvasRenderer } from "./ngx-utils/utils/canvas-renderers/ruler-canvas.renderer";
17
18
  export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, lerpPts, lengthOfPt, multiplyPts, dividePts, subPts, rotateDeg, rotateRad, toDegrees, toRadians, gjkDistance, gjkIntersection, Point, Rect, Oval, Circle } from "./ngx-utils/utils/geometry";
18
19
  export { Initializer } from "./ngx-utils/utils/initializer";
19
- export { JSONfn } from "./ngx-utils/utils/jsonfn";
20
+ export { stringify } from "./ngx-utils/utils/json.utils";
20
21
  export { ReflectUtils } from "./ngx-utils/utils/reflect.utils";
21
22
  export { LoaderUtils } from "./ngx-utils/utils/loader.utils";
22
23
  export { EPSILON, normalizeRange, clamp, overflow, MathUtils } from "./ngx-utils/utils/math.utils";
23
- export { isBrowser, getRoot, hashCode, switchClass, getCssVariables, checkTransitions, getComponentDef, parseSelector, selectorMatchesList, provideEntryComponents, provideOptions, provideWithOptions, injectOptions } from "./ngx-utils/utils/misc";
24
+ export { isBrowser, getRoot, switchClass, getCssVariables, checkTransitions, getComponentDef, parseSelector, selectorMatchesList, provideEntryComponents, provideOptions, provideWithOptions, injectOptions } from "./ngx-utils/utils/misc";
24
25
  export { ObjectUtils } from "./ngx-utils/utils/object.utils";
25
26
  export { ObservableUtils, ISubscriberInfo } from "./ngx-utils/utils/observable.utils";
26
27
  export { CancelablePromise, cancelablePromise, impatientPromise } from "./ngx-utils/utils/promise.utils";
@@ -1,6 +0,0 @@
1
- export declare class JSONfn {
2
- static parse(text: string): any;
3
- static stringify(obj: any): string;
4
- static reviver(key: string, value: any): any;
5
- static replacer(key: string, value: any): any;
6
- }