@simplr-ai/web-components 1.0.0
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 +21 -0
- package/README.md +202 -0
- package/dist/index.cjs +573 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +211 -0
- package/dist/index.d.ts +211 -0
- package/dist/index.js +506 -0
- package/dist/index.js.map +1 -0
- package/dist/simplr-web-components.global.js +6 -0
- package/dist/simplr-web-components.global.js.map +1 -0
- package/package.json +62 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { SimplrFraudConfig, SimplrFlagsConfig, SimplrProfilesConfig, SimplrRUMConfig, AIDelegationConfig, SimplrFraud, SimplrFlags, SimplrProfiles, simplrRUM, SimplrAI, CollectedSignals, DeviceSignals, BehaviorSignals, EvalContext } from '@simplr-ai/js';
|
|
2
|
+
export { AIDelegationConfig, BehaviorSignals, BindingMode, CollectedSignals, CreateDelegationOptions, DelegationInfo, DelegationResult, DelegationStats, DeviceSignals, EvalContext, FlagDefinition, FlagRule, IdentifyOptions, KeystrokeMetrics, MouseMetrics, ProfileIdentifyResult, ProfileOrderFraudResult, ProfileOrderInput, ProfileRiskResult, RUMActionType, RUMEvent, RUMEventType, RUMLogLevel, SimplrAI, SimplrFlags, SimplrFlagsConfig, SimplrFraud, SimplrFraudConfig, SimplrProfiles, SimplrProfilesConfig, SimplrRUM, SimplrRUMConfig, TouchMetrics, ValidationResult, clearDeviceId, createFingerprintHash, createSimplrAI, createSimplrProfiles, getDeviceId, murmurHash3, sha256, simplrFlags, simplrRUM } from '@simplr-ai/js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* SimplrElements — the shared imperative controller / singleton.
|
|
6
|
+
*
|
|
7
|
+
* Builds and holds the configured `@simplr-ai/js` core instances
|
|
8
|
+
* (SimplrFraud + SimplrFlags + SimplrProfiles + SimplrRUM + SimplrAI) so that
|
|
9
|
+
* every custom element AND non-HTML consumers share ONE configured client.
|
|
10
|
+
*
|
|
11
|
+
* This is a THIN adapter — it never reimplements features. `check()` and
|
|
12
|
+
* `submitOrder()` POST to the documented public-key endpoints (`/v1/check`,
|
|
13
|
+
* `/v1/orders`) exactly as specified in the Simplr API contract, attaching the
|
|
14
|
+
* device + behavior signals collected by the core fraud client.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** POST /v1/check input (public-key client ingestion). */
|
|
18
|
+
interface CheckInput {
|
|
19
|
+
email?: string;
|
|
20
|
+
phone?: string;
|
|
21
|
+
device?: Record<string, unknown>;
|
|
22
|
+
behavior?: Record<string, unknown>;
|
|
23
|
+
event_type?: string;
|
|
24
|
+
event_id?: string;
|
|
25
|
+
metadata?: Record<string, unknown>;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
type RiskLevel = "low" | "medium" | "high" | "critical";
|
|
29
|
+
/** POST /v1/check result. */
|
|
30
|
+
interface CheckResult {
|
|
31
|
+
type?: string;
|
|
32
|
+
risk_score: number;
|
|
33
|
+
risk_level: RiskLevel;
|
|
34
|
+
signals?: Record<string, unknown>;
|
|
35
|
+
email?: string;
|
|
36
|
+
phone_number?: string;
|
|
37
|
+
fingerprint_hash?: string;
|
|
38
|
+
checked_at?: string;
|
|
39
|
+
is_sandbox?: boolean;
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}
|
|
42
|
+
/** Configuration accepted by {@link SimplrController.configure}. */
|
|
43
|
+
interface SimplrConfig {
|
|
44
|
+
/** Public API key (`pk_*`) — safe for the client. */
|
|
45
|
+
apiKey: string;
|
|
46
|
+
/** API base URL override (default `https://api.simplr.sh`). */
|
|
47
|
+
baseUrl?: string;
|
|
48
|
+
/** Whether to auto-start biometric tracking on configure (default true). */
|
|
49
|
+
autoStart?: boolean;
|
|
50
|
+
/** Whether to collect behavioral biometrics (default true). */
|
|
51
|
+
collectBiometrics?: boolean;
|
|
52
|
+
/** Core fraud / device-signal config overrides. */
|
|
53
|
+
fraud?: SimplrFraudConfig;
|
|
54
|
+
/** Feature-flags config. `true` = enable with defaults, object = customise, omit/false = skip. */
|
|
55
|
+
flags?: Partial<SimplrFlagsConfig> | boolean;
|
|
56
|
+
/** Profiles config. `true` = enable with the shared key/baseUrl, object = customise. */
|
|
57
|
+
profiles?: Partial<SimplrProfilesConfig> | boolean;
|
|
58
|
+
/** RUM config — requires at least `applicationId`. Omit to skip RUM. */
|
|
59
|
+
rum?: SimplrRUMConfig;
|
|
60
|
+
/** AI delegation config. `true` = enable with the shared key, object = customise. */
|
|
61
|
+
ai?: Partial<AIDelegationConfig> | boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The Simplr controller. A single shared instance ({@link SimplrElements}) is
|
|
65
|
+
* exported; call `.configure()` once and every element + helper reads from it.
|
|
66
|
+
*/
|
|
67
|
+
declare class SimplrController {
|
|
68
|
+
private _config;
|
|
69
|
+
private _baseUrl;
|
|
70
|
+
/** Core device-fingerprint + behavioral-biometrics client. */
|
|
71
|
+
fraud: SimplrFraud | null;
|
|
72
|
+
/** Feature flags (local eval + murmurhash bucketing). */
|
|
73
|
+
flags: SimplrFlags | null;
|
|
74
|
+
/** Anonymous profiles + order fraud monitoring. */
|
|
75
|
+
profiles: SimplrProfiles | null;
|
|
76
|
+
/** Real User Monitoring (shared core singleton). */
|
|
77
|
+
rum: typeof simplrRUM | null;
|
|
78
|
+
/** AI delegation (OAuth-like). */
|
|
79
|
+
ai: SimplrAI | null;
|
|
80
|
+
private readyResolvers;
|
|
81
|
+
private _ready;
|
|
82
|
+
/** True once {@link configure} has built the core clients. */
|
|
83
|
+
get isConfigured(): boolean;
|
|
84
|
+
/** The resolved public API key, or undefined if not configured. */
|
|
85
|
+
get apiKey(): string | undefined;
|
|
86
|
+
/** The resolved API base URL. */
|
|
87
|
+
get baseUrl(): string;
|
|
88
|
+
/**
|
|
89
|
+
* Configure the shared client. Idempotent: if already configured with the
|
|
90
|
+
* same key it is a no-op, so multiple `<simplr-provider>` mounts are safe.
|
|
91
|
+
*/
|
|
92
|
+
configure(config: SimplrConfig): SimplrController;
|
|
93
|
+
/** Resolves once the controller has been configured. */
|
|
94
|
+
ready(): Promise<void>;
|
|
95
|
+
private requireFraud;
|
|
96
|
+
/** Collect device fingerprint + behavioral biometrics together. */
|
|
97
|
+
collect(): Promise<CollectedSignals>;
|
|
98
|
+
/** Collect device fingerprint signals only. */
|
|
99
|
+
getDeviceSignals(): Promise<DeviceSignals>;
|
|
100
|
+
/** Collect behavioral biometric signals only (sync). */
|
|
101
|
+
getBehaviorSignals(): BehaviorSignals;
|
|
102
|
+
/** Input tracking handlers/attrs for a named field (keystroke biometrics). */
|
|
103
|
+
trackInput(fieldName: string): {
|
|
104
|
+
onKeyDown: (e: KeyboardEvent) => void;
|
|
105
|
+
onKeyUp: (e: KeyboardEvent) => void;
|
|
106
|
+
onPaste: () => void;
|
|
107
|
+
"data-simplr-field": string;
|
|
108
|
+
};
|
|
109
|
+
/** Reset collected behavioral data. */
|
|
110
|
+
reset(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Run a fraud/identity check (POST `/v1/check`). Device + behavior signals
|
|
113
|
+
* are auto-collected and merged into the request unless already on `input`.
|
|
114
|
+
*/
|
|
115
|
+
check(input?: CheckInput): Promise<CheckResult>;
|
|
116
|
+
private request;
|
|
117
|
+
/** Evaluate a feature flag locally. Returns false if flags aren't enabled. */
|
|
118
|
+
isFeatureEnabled(key: string, ctx?: EvalContext): boolean;
|
|
119
|
+
/** Tear down timers / trackers (useful for tests + SPA teardown). */
|
|
120
|
+
dispose(): void;
|
|
121
|
+
}
|
|
122
|
+
/** The shared controller singleton every element + helper reads from. */
|
|
123
|
+
declare const SimplrElements: SimplrController;
|
|
124
|
+
/**
|
|
125
|
+
* Imperative feature-flag helper mirroring the core local-eval contract.
|
|
126
|
+
* Reads from the shared controller.
|
|
127
|
+
*/
|
|
128
|
+
declare function isFeatureEnabled(key: string, ctx?: EvalContext): boolean;
|
|
129
|
+
|
|
130
|
+
/** Map of tag name → element constructor for every Simplr custom element. */
|
|
131
|
+
declare const SIMPLR_ELEMENTS: Record<string, CustomElementConstructor>;
|
|
132
|
+
/**
|
|
133
|
+
* Register all Simplr custom elements with the browser's CustomElementRegistry.
|
|
134
|
+
* No-op (and safe) when there is no `customElements` (e.g. SSR / Node). Already
|
|
135
|
+
* registered tags are skipped, so calling this twice is harmless.
|
|
136
|
+
*/
|
|
137
|
+
declare function defineSimplrElements(): void;
|
|
138
|
+
|
|
139
|
+
declare global {
|
|
140
|
+
interface Window {
|
|
141
|
+
SIMPLR_CONFIG?: {
|
|
142
|
+
apiKey?: string;
|
|
143
|
+
publicKey?: string;
|
|
144
|
+
baseUrl?: string;
|
|
145
|
+
autoStart?: boolean;
|
|
146
|
+
appId?: string;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
declare class SimplrProviderElement extends HTMLElement {
|
|
151
|
+
static get observedAttributes(): string[];
|
|
152
|
+
connectedCallback(): void;
|
|
153
|
+
attributeChangedCallback(): void;
|
|
154
|
+
private tryConfigure;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare class SimplrProtectedFormElement extends HTMLElement {
|
|
158
|
+
private form;
|
|
159
|
+
private onSubmit;
|
|
160
|
+
connectedCallback(): void;
|
|
161
|
+
disconnectedCallback(): void;
|
|
162
|
+
/** Field name used for the hidden signals input. */
|
|
163
|
+
get fieldName(): string;
|
|
164
|
+
private handleSubmit;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare class SimplrProtectedInputElement extends HTMLElement {
|
|
168
|
+
static get observedAttributes(): string[];
|
|
169
|
+
private input;
|
|
170
|
+
private handlers;
|
|
171
|
+
private bound;
|
|
172
|
+
get field(): string;
|
|
173
|
+
connectedCallback(): void;
|
|
174
|
+
disconnectedCallback(): void;
|
|
175
|
+
attributeChangedCallback(): void;
|
|
176
|
+
private attach;
|
|
177
|
+
private detach;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
declare class SimplrFeatureFlagElement extends HTMLElement {
|
|
181
|
+
static get observedAttributes(): string[];
|
|
182
|
+
private onConfigured;
|
|
183
|
+
private poll;
|
|
184
|
+
connectedCallback(): void;
|
|
185
|
+
disconnectedCallback(): void;
|
|
186
|
+
attributeChangedCallback(): void;
|
|
187
|
+
/** The flag key. */
|
|
188
|
+
get key(): string;
|
|
189
|
+
/** Whether this flag currently evaluates to enabled. */
|
|
190
|
+
get enabled(): boolean;
|
|
191
|
+
private evaluate;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
declare class SimplrRumViewElement extends HTMLElement {
|
|
195
|
+
static get observedAttributes(): string[];
|
|
196
|
+
get viewName(): string;
|
|
197
|
+
connectedCallback(): void;
|
|
198
|
+
attributeChangedCallback(_n: string, oldV: string | null, newV: string | null): void;
|
|
199
|
+
private track;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare class SimplrAiDelegationElement extends HTMLElement {
|
|
203
|
+
private trigger;
|
|
204
|
+
private onClick;
|
|
205
|
+
connectedCallback(): void;
|
|
206
|
+
disconnectedCallback(): void;
|
|
207
|
+
get userId(): string;
|
|
208
|
+
private run;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export { type CheckInput, type CheckResult, type RiskLevel, SIMPLR_ELEMENTS, SimplrAiDelegationElement, type SimplrConfig, SimplrController, SimplrElements, SimplrFeatureFlagElement, SimplrProtectedFormElement, SimplrProtectedInputElement, SimplrProviderElement, SimplrRumViewElement, defineSimplrElements, isFeatureEnabled };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { SimplrFraudConfig, SimplrFlagsConfig, SimplrProfilesConfig, SimplrRUMConfig, AIDelegationConfig, SimplrFraud, SimplrFlags, SimplrProfiles, simplrRUM, SimplrAI, CollectedSignals, DeviceSignals, BehaviorSignals, EvalContext } from '@simplr-ai/js';
|
|
2
|
+
export { AIDelegationConfig, BehaviorSignals, BindingMode, CollectedSignals, CreateDelegationOptions, DelegationInfo, DelegationResult, DelegationStats, DeviceSignals, EvalContext, FlagDefinition, FlagRule, IdentifyOptions, KeystrokeMetrics, MouseMetrics, ProfileIdentifyResult, ProfileOrderFraudResult, ProfileOrderInput, ProfileRiskResult, RUMActionType, RUMEvent, RUMEventType, RUMLogLevel, SimplrAI, SimplrFlags, SimplrFlagsConfig, SimplrFraud, SimplrFraudConfig, SimplrProfiles, SimplrProfilesConfig, SimplrRUM, SimplrRUMConfig, TouchMetrics, ValidationResult, clearDeviceId, createFingerprintHash, createSimplrAI, createSimplrProfiles, getDeviceId, murmurHash3, sha256, simplrFlags, simplrRUM } from '@simplr-ai/js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* SimplrElements — the shared imperative controller / singleton.
|
|
6
|
+
*
|
|
7
|
+
* Builds and holds the configured `@simplr-ai/js` core instances
|
|
8
|
+
* (SimplrFraud + SimplrFlags + SimplrProfiles + SimplrRUM + SimplrAI) so that
|
|
9
|
+
* every custom element AND non-HTML consumers share ONE configured client.
|
|
10
|
+
*
|
|
11
|
+
* This is a THIN adapter — it never reimplements features. `check()` and
|
|
12
|
+
* `submitOrder()` POST to the documented public-key endpoints (`/v1/check`,
|
|
13
|
+
* `/v1/orders`) exactly as specified in the Simplr API contract, attaching the
|
|
14
|
+
* device + behavior signals collected by the core fraud client.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** POST /v1/check input (public-key client ingestion). */
|
|
18
|
+
interface CheckInput {
|
|
19
|
+
email?: string;
|
|
20
|
+
phone?: string;
|
|
21
|
+
device?: Record<string, unknown>;
|
|
22
|
+
behavior?: Record<string, unknown>;
|
|
23
|
+
event_type?: string;
|
|
24
|
+
event_id?: string;
|
|
25
|
+
metadata?: Record<string, unknown>;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
type RiskLevel = "low" | "medium" | "high" | "critical";
|
|
29
|
+
/** POST /v1/check result. */
|
|
30
|
+
interface CheckResult {
|
|
31
|
+
type?: string;
|
|
32
|
+
risk_score: number;
|
|
33
|
+
risk_level: RiskLevel;
|
|
34
|
+
signals?: Record<string, unknown>;
|
|
35
|
+
email?: string;
|
|
36
|
+
phone_number?: string;
|
|
37
|
+
fingerprint_hash?: string;
|
|
38
|
+
checked_at?: string;
|
|
39
|
+
is_sandbox?: boolean;
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}
|
|
42
|
+
/** Configuration accepted by {@link SimplrController.configure}. */
|
|
43
|
+
interface SimplrConfig {
|
|
44
|
+
/** Public API key (`pk_*`) — safe for the client. */
|
|
45
|
+
apiKey: string;
|
|
46
|
+
/** API base URL override (default `https://api.simplr.sh`). */
|
|
47
|
+
baseUrl?: string;
|
|
48
|
+
/** Whether to auto-start biometric tracking on configure (default true). */
|
|
49
|
+
autoStart?: boolean;
|
|
50
|
+
/** Whether to collect behavioral biometrics (default true). */
|
|
51
|
+
collectBiometrics?: boolean;
|
|
52
|
+
/** Core fraud / device-signal config overrides. */
|
|
53
|
+
fraud?: SimplrFraudConfig;
|
|
54
|
+
/** Feature-flags config. `true` = enable with defaults, object = customise, omit/false = skip. */
|
|
55
|
+
flags?: Partial<SimplrFlagsConfig> | boolean;
|
|
56
|
+
/** Profiles config. `true` = enable with the shared key/baseUrl, object = customise. */
|
|
57
|
+
profiles?: Partial<SimplrProfilesConfig> | boolean;
|
|
58
|
+
/** RUM config — requires at least `applicationId`. Omit to skip RUM. */
|
|
59
|
+
rum?: SimplrRUMConfig;
|
|
60
|
+
/** AI delegation config. `true` = enable with the shared key, object = customise. */
|
|
61
|
+
ai?: Partial<AIDelegationConfig> | boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The Simplr controller. A single shared instance ({@link SimplrElements}) is
|
|
65
|
+
* exported; call `.configure()` once and every element + helper reads from it.
|
|
66
|
+
*/
|
|
67
|
+
declare class SimplrController {
|
|
68
|
+
private _config;
|
|
69
|
+
private _baseUrl;
|
|
70
|
+
/** Core device-fingerprint + behavioral-biometrics client. */
|
|
71
|
+
fraud: SimplrFraud | null;
|
|
72
|
+
/** Feature flags (local eval + murmurhash bucketing). */
|
|
73
|
+
flags: SimplrFlags | null;
|
|
74
|
+
/** Anonymous profiles + order fraud monitoring. */
|
|
75
|
+
profiles: SimplrProfiles | null;
|
|
76
|
+
/** Real User Monitoring (shared core singleton). */
|
|
77
|
+
rum: typeof simplrRUM | null;
|
|
78
|
+
/** AI delegation (OAuth-like). */
|
|
79
|
+
ai: SimplrAI | null;
|
|
80
|
+
private readyResolvers;
|
|
81
|
+
private _ready;
|
|
82
|
+
/** True once {@link configure} has built the core clients. */
|
|
83
|
+
get isConfigured(): boolean;
|
|
84
|
+
/** The resolved public API key, or undefined if not configured. */
|
|
85
|
+
get apiKey(): string | undefined;
|
|
86
|
+
/** The resolved API base URL. */
|
|
87
|
+
get baseUrl(): string;
|
|
88
|
+
/**
|
|
89
|
+
* Configure the shared client. Idempotent: if already configured with the
|
|
90
|
+
* same key it is a no-op, so multiple `<simplr-provider>` mounts are safe.
|
|
91
|
+
*/
|
|
92
|
+
configure(config: SimplrConfig): SimplrController;
|
|
93
|
+
/** Resolves once the controller has been configured. */
|
|
94
|
+
ready(): Promise<void>;
|
|
95
|
+
private requireFraud;
|
|
96
|
+
/** Collect device fingerprint + behavioral biometrics together. */
|
|
97
|
+
collect(): Promise<CollectedSignals>;
|
|
98
|
+
/** Collect device fingerprint signals only. */
|
|
99
|
+
getDeviceSignals(): Promise<DeviceSignals>;
|
|
100
|
+
/** Collect behavioral biometric signals only (sync). */
|
|
101
|
+
getBehaviorSignals(): BehaviorSignals;
|
|
102
|
+
/** Input tracking handlers/attrs for a named field (keystroke biometrics). */
|
|
103
|
+
trackInput(fieldName: string): {
|
|
104
|
+
onKeyDown: (e: KeyboardEvent) => void;
|
|
105
|
+
onKeyUp: (e: KeyboardEvent) => void;
|
|
106
|
+
onPaste: () => void;
|
|
107
|
+
"data-simplr-field": string;
|
|
108
|
+
};
|
|
109
|
+
/** Reset collected behavioral data. */
|
|
110
|
+
reset(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Run a fraud/identity check (POST `/v1/check`). Device + behavior signals
|
|
113
|
+
* are auto-collected and merged into the request unless already on `input`.
|
|
114
|
+
*/
|
|
115
|
+
check(input?: CheckInput): Promise<CheckResult>;
|
|
116
|
+
private request;
|
|
117
|
+
/** Evaluate a feature flag locally. Returns false if flags aren't enabled. */
|
|
118
|
+
isFeatureEnabled(key: string, ctx?: EvalContext): boolean;
|
|
119
|
+
/** Tear down timers / trackers (useful for tests + SPA teardown). */
|
|
120
|
+
dispose(): void;
|
|
121
|
+
}
|
|
122
|
+
/** The shared controller singleton every element + helper reads from. */
|
|
123
|
+
declare const SimplrElements: SimplrController;
|
|
124
|
+
/**
|
|
125
|
+
* Imperative feature-flag helper mirroring the core local-eval contract.
|
|
126
|
+
* Reads from the shared controller.
|
|
127
|
+
*/
|
|
128
|
+
declare function isFeatureEnabled(key: string, ctx?: EvalContext): boolean;
|
|
129
|
+
|
|
130
|
+
/** Map of tag name → element constructor for every Simplr custom element. */
|
|
131
|
+
declare const SIMPLR_ELEMENTS: Record<string, CustomElementConstructor>;
|
|
132
|
+
/**
|
|
133
|
+
* Register all Simplr custom elements with the browser's CustomElementRegistry.
|
|
134
|
+
* No-op (and safe) when there is no `customElements` (e.g. SSR / Node). Already
|
|
135
|
+
* registered tags are skipped, so calling this twice is harmless.
|
|
136
|
+
*/
|
|
137
|
+
declare function defineSimplrElements(): void;
|
|
138
|
+
|
|
139
|
+
declare global {
|
|
140
|
+
interface Window {
|
|
141
|
+
SIMPLR_CONFIG?: {
|
|
142
|
+
apiKey?: string;
|
|
143
|
+
publicKey?: string;
|
|
144
|
+
baseUrl?: string;
|
|
145
|
+
autoStart?: boolean;
|
|
146
|
+
appId?: string;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
declare class SimplrProviderElement extends HTMLElement {
|
|
151
|
+
static get observedAttributes(): string[];
|
|
152
|
+
connectedCallback(): void;
|
|
153
|
+
attributeChangedCallback(): void;
|
|
154
|
+
private tryConfigure;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare class SimplrProtectedFormElement extends HTMLElement {
|
|
158
|
+
private form;
|
|
159
|
+
private onSubmit;
|
|
160
|
+
connectedCallback(): void;
|
|
161
|
+
disconnectedCallback(): void;
|
|
162
|
+
/** Field name used for the hidden signals input. */
|
|
163
|
+
get fieldName(): string;
|
|
164
|
+
private handleSubmit;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare class SimplrProtectedInputElement extends HTMLElement {
|
|
168
|
+
static get observedAttributes(): string[];
|
|
169
|
+
private input;
|
|
170
|
+
private handlers;
|
|
171
|
+
private bound;
|
|
172
|
+
get field(): string;
|
|
173
|
+
connectedCallback(): void;
|
|
174
|
+
disconnectedCallback(): void;
|
|
175
|
+
attributeChangedCallback(): void;
|
|
176
|
+
private attach;
|
|
177
|
+
private detach;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
declare class SimplrFeatureFlagElement extends HTMLElement {
|
|
181
|
+
static get observedAttributes(): string[];
|
|
182
|
+
private onConfigured;
|
|
183
|
+
private poll;
|
|
184
|
+
connectedCallback(): void;
|
|
185
|
+
disconnectedCallback(): void;
|
|
186
|
+
attributeChangedCallback(): void;
|
|
187
|
+
/** The flag key. */
|
|
188
|
+
get key(): string;
|
|
189
|
+
/** Whether this flag currently evaluates to enabled. */
|
|
190
|
+
get enabled(): boolean;
|
|
191
|
+
private evaluate;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
declare class SimplrRumViewElement extends HTMLElement {
|
|
195
|
+
static get observedAttributes(): string[];
|
|
196
|
+
get viewName(): string;
|
|
197
|
+
connectedCallback(): void;
|
|
198
|
+
attributeChangedCallback(_n: string, oldV: string | null, newV: string | null): void;
|
|
199
|
+
private track;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare class SimplrAiDelegationElement extends HTMLElement {
|
|
203
|
+
private trigger;
|
|
204
|
+
private onClick;
|
|
205
|
+
connectedCallback(): void;
|
|
206
|
+
disconnectedCallback(): void;
|
|
207
|
+
get userId(): string;
|
|
208
|
+
private run;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export { type CheckInput, type CheckResult, type RiskLevel, SIMPLR_ELEMENTS, SimplrAiDelegationElement, type SimplrConfig, SimplrController, SimplrElements, SimplrFeatureFlagElement, SimplrProtectedFormElement, SimplrProtectedInputElement, SimplrProviderElement, SimplrRumViewElement, defineSimplrElements, isFeatureEnabled };
|