@usermaven/sdk-js 1.4.1-rc.62 → 1.4.2
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/LICENSE +23 -0
- package/README.md +36 -149
- package/dist/npm/usermaven.cjs.js +2682 -0
- package/dist/npm/usermaven.d.ts +546 -0
- package/dist/npm/usermaven.es.js +2675 -0
- package/dist/web/lib.js +1 -0
- package/package.json +49 -48
- package/dist/core/client.d.ts +0 -57
- package/dist/core/config.d.ts +0 -37
- package/dist/core/types.d.ts +0 -38
- package/dist/extensions/rage-click.d.ts +0 -15
- package/dist/extensions/scroll-depth.d.ts +0 -19
- package/dist/index.d.ts +0 -6
- package/dist/lib.js +0 -2
- package/dist/persistence/local-storage.d.ts +0 -13
- package/dist/persistence/memory.d.ts +0 -8
- package/dist/tracking/autocapture.d.ts +0 -29
- package/dist/tracking/form-tracking.d.ts +0 -27
- package/dist/tracking/pageviews.d.ts +0 -11
- package/dist/transport/beacon.d.ts +0 -10
- package/dist/transport/fetch.d.ts +0 -13
- package/dist/transport/https.d.ts +0 -11
- package/dist/transport/transport.d.ts +0 -3
- package/dist/transport/xhr.d.ts +0 -12
- package/dist/usermaven.cjs.js +0 -2
- package/dist/usermaven.es.js +0 -1325
- package/dist/utils/autocapture-utils.d.ts +0 -13
- package/dist/utils/common.d.ts +0 -27
- package/dist/utils/cookie.d.ts +0 -14
- package/dist/utils/helpers.d.ts +0 -9
- package/dist/utils/logger.d.ts +0 -15
- package/dist/utils/queue.d.ts +0 -23
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare function getClassName(el: Element): string;
|
|
2
|
-
export declare function getSafeText(el: Element): string;
|
|
3
|
-
export declare function isElementNode(el: Element | undefined | null): el is HTMLElement;
|
|
4
|
-
export declare function isTag(el: Element | undefined | null, tag: string): el is HTMLElement;
|
|
5
|
-
export declare function isTextNode(el: Element | undefined | null): el is HTMLElement;
|
|
6
|
-
export declare function isDocumentFragment(el: Element | ParentNode | undefined | null): el is DocumentFragment;
|
|
7
|
-
export declare const usefulElements: string[];
|
|
8
|
-
export declare function shouldCaptureDomEvent(el: Element, event: Event): boolean;
|
|
9
|
-
export declare function shouldCaptureElement(el: Element | null | undefined): boolean;
|
|
10
|
-
export declare function isSensitiveElement(el: Element): boolean;
|
|
11
|
-
export declare function shouldCaptureValue(value: string): boolean;
|
|
12
|
-
export declare function isAngularStyleAttr(attributeName: string): boolean;
|
|
13
|
-
export declare function loadScript(scriptUrlToLoad: string, callback: (event: Event) => void): void;
|
package/dist/utils/common.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export type Breaker = {};
|
|
2
|
-
export type EventHandler = (event: Event) => boolean | void;
|
|
3
|
-
export declare const _isArray: (arg: any) => arg is any[];
|
|
4
|
-
export declare function _eachArray<E = any>(obj: E[] | null | undefined, iterator: (value: E, key: number) => void | Breaker, thisArg?: any): void;
|
|
5
|
-
export declare const _trim: (str: string) => string;
|
|
6
|
-
export declare const _bind_instance_methods: (obj: Record<string, any>) => void;
|
|
7
|
-
/**
|
|
8
|
-
* @param {*=} obj
|
|
9
|
-
* @param {function(...*)=} iterator
|
|
10
|
-
* @param {Object=} thisArg
|
|
11
|
-
*/
|
|
12
|
-
export declare function _each(obj: any, iterator: (value: any, key: any) => void | Breaker, thisArg?: any): void;
|
|
13
|
-
export declare const _extend: (obj: Record<string, any>, ...args: Record<string, any>[]) => Record<string, any>;
|
|
14
|
-
export declare function _includes<T = any>(str: T[] | string, needle: T): boolean;
|
|
15
|
-
export declare const _isFunction: (f: any) => f is (...args: any[]) => any;
|
|
16
|
-
export declare const _isUndefined: (obj: any) => obj is undefined;
|
|
17
|
-
export declare const _register_event: (element: Element | Window | Document | Node, type: string, handler: EventHandler, oldSchool?: boolean, useCapture?: boolean) => void;
|
|
18
|
-
export declare const _safewrap: <F extends (...args: any[]) => any = (...args: any[]) => any>(f: F) => F;
|
|
19
|
-
export declare const _safewrap_instance_methods: (obj: Record<string, any>) => void;
|
|
20
|
-
export declare function _copyAndTruncateStrings<T extends Record<string, any> = Record<string, any>>(object: T, maxStringLength: number | null): T;
|
|
21
|
-
export declare const _isBlockedUA: (ua: string) => boolean;
|
|
22
|
-
export declare function _findClosestLink(element: HTMLElement | null): HTMLElement | null;
|
|
23
|
-
export declare function _cleanObject(obj: Record<string, any>): Record<string, any>;
|
|
24
|
-
export declare function isWindowAvailable(): boolean;
|
|
25
|
-
export declare function generateRandom(length?: number): string;
|
|
26
|
-
export declare function toCamelCase(str: string): string;
|
|
27
|
-
export declare function convertKeysToCamelCase(obj: Record<string, any>): Record<string, any>;
|
package/dist/utils/cookie.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare class CookieManager {
|
|
2
|
-
private domain?;
|
|
3
|
-
private cookieDomain;
|
|
4
|
-
constructor(domain?: string | undefined);
|
|
5
|
-
set(name: string, value: string, expirationDays?: number, secure?: boolean, httpOnly?: boolean): void;
|
|
6
|
-
get(name: string): string | null;
|
|
7
|
-
delete(name: string, path?: string): void;
|
|
8
|
-
private getCookieDomain;
|
|
9
|
-
private extractRoot;
|
|
10
|
-
private isIpAddress;
|
|
11
|
-
private extractHostname;
|
|
12
|
-
private extractRootDomain;
|
|
13
|
-
private extractTopLevelDomain;
|
|
14
|
-
}
|
package/dist/utils/helpers.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LogLevel } from '../utils/logger';
|
|
2
|
-
export declare function generateId(): string;
|
|
3
|
-
export declare function isValidEmail(email: string): boolean;
|
|
4
|
-
export declare function debounce<T extends (...args: P) => any, P extends any[]>(func: T, wait: number): (...args: P) => void;
|
|
5
|
-
export declare function getUtmParams(): Record<string, string>;
|
|
6
|
-
export declare function parseQueryString(queryString: string): Record<string, string>;
|
|
7
|
-
export declare function isString(value: any): boolean;
|
|
8
|
-
export declare function isObject(value: any): boolean;
|
|
9
|
-
export declare function parseLogLevel(value: string | null): LogLevel;
|
package/dist/utils/logger.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare enum LogLevel {
|
|
2
|
-
DEBUG = 0,
|
|
3
|
-
INFO = 1,
|
|
4
|
-
WARN = 2,
|
|
5
|
-
ERROR = 3
|
|
6
|
-
}
|
|
7
|
-
export declare class Logger {
|
|
8
|
-
private level;
|
|
9
|
-
constructor(level: LogLevel);
|
|
10
|
-
debug(message: string, ...args: any[]): void;
|
|
11
|
-
info(message: string, ...args: any[]): void;
|
|
12
|
-
warn(message: string, ...args: any[]): void;
|
|
13
|
-
error(message: string, ...args: any[]): void;
|
|
14
|
-
}
|
|
15
|
-
export declare function getLogger(level?: LogLevel): Logger;
|
package/dist/utils/queue.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Transport } from '../core/types';
|
|
2
|
-
import { Logger } from '../utils/logger';
|
|
3
|
-
export declare class RetryQueue {
|
|
4
|
-
private transport;
|
|
5
|
-
private maxRetries;
|
|
6
|
-
private retryInterval;
|
|
7
|
-
private batchSize;
|
|
8
|
-
private batchInterval;
|
|
9
|
-
private logger;
|
|
10
|
-
private queue;
|
|
11
|
-
private processing;
|
|
12
|
-
private batchTimeoutId;
|
|
13
|
-
private persistence;
|
|
14
|
-
private isOnline;
|
|
15
|
-
constructor(transport: Transport, maxRetries?: number, retryInterval?: number, batchSize?: number, batchInterval?: number, logger?: Logger);
|
|
16
|
-
add(payload: any): void;
|
|
17
|
-
private initNetworkListeners;
|
|
18
|
-
private scheduleBatch;
|
|
19
|
-
private processBatch;
|
|
20
|
-
private handleBatchFailure;
|
|
21
|
-
private loadQueueFromStorage;
|
|
22
|
-
private saveQueueToStorage;
|
|
23
|
-
}
|