-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.ts
More file actions
94 lines (82 loc) · 2.5 KB
/
index.ts
File metadata and controls
94 lines (82 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
Copyright (c) 2022 Skyflow, Inc.
*/
import { CardMetadata } from 'skyflow-js';
import CollectContainer from 'skyflow-js/types/core/external/collect/collect-container'
import ComposableContainer from 'skyflow-js/types/core/external/collect/compose-collect-container'
import RevealContainer from 'skyflow-js/types/core/external/reveal/reveal-container'
import { IValidationRule, RedactionType } from 'skyflow-js/types/utils/common'
import { ElementClassesConfig, CollectElementState } from '../common'
import EventEmitter from '../utils/event-emitter'
export const FileRenderElements = {};
export const CollectElements = {};
export const ComposableElements = {};
export interface SkyflowCollectElementProps {
container: CollectContainer | ComposableContainer
table: string
column: string
id?: string
label?: string
placeholder?: string
errorText?: string
validations?: IValidationRule[] | undefined
classes?: ElementClassesConfig
options?: ICollectElementOptions
onChange?: (state: CollectElementState) => void
onFocus?: (state: CollectElementState) => void
onBlur?: (state: CollectElementState) => void
onReady?: (state: CollectElementState) => void
eventEmitter?: EventEmitter
skyflowID?:string
ref?: {current: SkyflowCollectElementRef | null};
// TODO ref
}
export interface SkyflowCollectElementRef {
setErrorOverride: (errorMessage: string) => void;
}
export interface SkyflowRevealElementProps {
container: RevealContainer
token: string
id?: string
label?: string
altText?: string
classes?: ElementClassesConfig
options?: IRevealOptions
redaction?: RedactionType
ref?: {current: SkyflowRevealElementRef | null}
}
export interface SkyflowRevealElementRef {
setErrorOverride: (errorMessage: string) => void;
}
export interface SkyflowRenderElementProps {
container: RevealContainer
id: string
altText?: string
classes?: ElementClassesConfig
skyflowID:string
table: string
column: string
ref?: {current: SkyflowRenderElementRef | null};
}
export interface SkyflowRenderElementRef {
setErrorOverride: (errorMessage: string) => void;
}
export interface ICollectElementOptions {
required?: boolean
enableCardIcon?: boolean
format?: string
enableCopy?: boolean
allowedFileType?: string[]
preserveFileName?: boolean
cardMetadata ?: CardMetadata
masking?: boolean
maskingChar?: string
blockEmptyFiles?: boolean
}
export type IRevealOptions = {
enableCopy?: boolean;
format?:string
}
// export type ICardMetadata = {
// scheme?: typeof CardType[]
// }