@stemy/ngx-utils 19.5.5 → 19.5.7
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.
|
@@ -3,3 +3,8 @@ export type MaybeArray<T> = T | T[];
|
|
|
3
3
|
export type StringKeys<Context extends {
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
}> = Extract<keyof Context, string>;
|
|
6
|
+
export type CapitalizeFirst<S extends string> = S extends `${infer F}${infer R}` ? `${Uppercase<F>}${R}` : S;
|
|
7
|
+
export type CamelJoin<Prefix extends string, Key extends string> = `${Prefix}${CapitalizeFirst<Key>}`;
|
|
8
|
+
export type PrefixedPick<T extends object, Prefix extends string, K extends keyof T & string> = {
|
|
9
|
+
[P in keyof T as P extends K ? CamelJoin<Prefix, P> : never]: T[P];
|
|
10
|
+
};
|
|
@@ -7,3 +7,10 @@ export declare class StringUtils {
|
|
|
7
7
|
static isObjectId(id: string): boolean;
|
|
8
8
|
static parseDomain(baseUrl: string): string;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Returns a hash code from a string
|
|
12
|
+
* @param {String} str The string to hash.
|
|
13
|
+
* @return {Number} A 32bit integer
|
|
14
|
+
* @see http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/
|
|
15
|
+
*/
|
|
16
|
+
export declare function hashCode(str: string): number;
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "zone.js";
|
|
2
|
-
export { MaybePromise, MaybeArray, StringKeys } from "./ngx-utils/helper-types";
|
|
2
|
+
export { MaybePromise, MaybeArray, StringKeys, CapitalizeFirst, CamelJoin, PrefixedPick } from "./ngx-utils/helper-types";
|
|
3
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";
|
|
4
4
|
export { AjaxRequestHandler } from "./ngx-utils/utils/ajax-request-handler";
|
|
5
5
|
export { ArrayUtils } from "./ngx-utils/utils/array.utils";
|
|
@@ -21,7 +21,7 @@ export { checkTransitions, getComponentDef, parseSelector, selectorMatchesList,
|
|
|
21
21
|
export { ObjectUtils } from "./ngx-utils/utils/object.utils";
|
|
22
22
|
export { ObservableUtils, ISubscriberInfo } from "./ngx-utils/utils/observable.utils";
|
|
23
23
|
export { CancelablePromise, cancelablePromise, impatientPromise } from "./ngx-utils/utils/promise.utils";
|
|
24
|
-
export { StringUtils } from "./ngx-utils/utils/string.utils";
|
|
24
|
+
export { StringUtils, hashCode } from "./ngx-utils/utils/string.utils";
|
|
25
25
|
export { SetUtils } from "./ngx-utils/utils/set.utils";
|
|
26
26
|
export { SocketFactory, SocketData, SocketDataValue, SocketDataObj, SocketClient } from "./ngx-utils/utils/socket-client";
|
|
27
27
|
export { TimerUtils } from "./ngx-utils/utils/timer.utils";
|