move maskInputValue to rrweb-snapshot (#83)
More info: https://github.com/rrweb-io/rrweb/pull/602#discussion_r660434998
This commit is contained in:
4
typings/snapshot.d.ts
vendored
4
typings/snapshot.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { serializedNodeWithId, INode, idNodeMap, MaskInputOptions, SlimDOMOptions, MaskTextFn, KeepIframeSrcFn } from './types';
|
||||
import { serializedNodeWithId, INode, idNodeMap, MaskInputOptions, SlimDOMOptions, MaskTextFn, MaskInputFn, KeepIframeSrcFn } from './types';
|
||||
export declare const IGNORED_NODE = -2;
|
||||
export declare function absoluteToStylesheet(cssText: string | null, href: string): string;
|
||||
export declare function absoluteToDoc(doc: Document, attributeValue: string): string;
|
||||
@@ -16,6 +16,7 @@ export declare function serializeNodeWithId(n: Node | INode, options: {
|
||||
inlineStylesheet: boolean;
|
||||
maskInputOptions?: MaskInputOptions;
|
||||
maskTextFn: MaskTextFn | undefined;
|
||||
maskInputFn: MaskInputFn | undefined;
|
||||
slimDOMOptions: SlimDOMOptions;
|
||||
keepIframeSrcFn?: KeepIframeSrcFn;
|
||||
recordCanvas?: boolean;
|
||||
@@ -32,6 +33,7 @@ declare function snapshot(n: Document, options?: {
|
||||
inlineStylesheet?: boolean;
|
||||
maskAllInputs?: boolean | MaskInputOptions;
|
||||
maskTextFn?: MaskTextFn;
|
||||
maskInputFn?: MaskTextFn;
|
||||
slimDOM?: boolean | SlimDOMOptions;
|
||||
recordCanvas?: boolean;
|
||||
preserveWhiteSpace?: boolean;
|
||||
|
||||
1
typings/types.d.ts
vendored
1
typings/types.d.ts
vendored
@@ -88,4 +88,5 @@ export declare type SlimDOMOptions = Partial<{
|
||||
headMetaVerification: boolean;
|
||||
}>;
|
||||
export declare type MaskTextFn = (text: string) => string;
|
||||
export declare type MaskInputFn = (text: string) => string;
|
||||
export declare type KeepIframeSrcFn = (src: string) => boolean;
|
||||
|
||||
9
typings/utils.d.ts
vendored
9
typings/utils.d.ts
vendored
@@ -1,3 +1,10 @@
|
||||
import { INode } from './types';
|
||||
import { INode, MaskInputFn, MaskInputOptions } from './types';
|
||||
export declare function isElement(n: Node | INode): n is Element;
|
||||
export declare function isShadowRoot(n: Node): n is ShadowRoot;
|
||||
export declare function maskInputValue({ maskInputOptions, tagName, type, value, maskInputFn, }: {
|
||||
maskInputOptions: MaskInputOptions;
|
||||
tagName: string;
|
||||
type: string | number | boolean | null;
|
||||
value: string | null;
|
||||
maskInputFn?: MaskInputFn;
|
||||
}): string;
|
||||
|
||||
Reference in New Issue
Block a user