@voxket-ai/events-sdk 1.0.0 → 1.0.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/README.md +235 -55
- package/dist/api/ApiClient.d.ts +5 -1
- package/dist/components/AttendeePortal.d.ts +2 -0
- package/dist/components/DynamicForm.d.ts +1 -1
- package/dist/components/EventWidgetReact.d.ts +5 -1
- package/dist/events-sdk.js +1608 -22238
- package/dist/events-sdk.umd.cjs +5 -238
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +25 -1
- package/dist/utils/Logger.d.ts +1 -0
- package/dist/utils/formUtils.d.ts +13 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WidgetConfig } from './types';
|
|
3
|
-
export { type WidgetConfig } from './types';
|
|
3
|
+
export { type WidgetConfig, type WidgetPosition, type ThemeMode, type RegistrationSuccessPayload, type WidgetErrorPayload } from './types';
|
|
4
4
|
export declare const EventWidget: React.FC<{
|
|
5
5
|
config: WidgetConfig;
|
|
6
6
|
}>;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,14 +1,38 @@
|
|
|
1
|
+
export type WidgetPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'right-bottom' | 'left-bottom' | 'right-top' | 'left-top';
|
|
2
|
+
export type ThemeMode = 'light' | 'dark';
|
|
3
|
+
export interface RegistrationSuccessPayload {
|
|
4
|
+
registrationType: string | number;
|
|
5
|
+
payload: Record<string, any>;
|
|
6
|
+
response?: any;
|
|
7
|
+
paymentUrl?: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface WidgetErrorPayload {
|
|
10
|
+
type: 'submit_error' | 'schema_load' | 'login_error' | 'profile_update_error' | 'file_upload_error' | 'file_delete_error' | 'network_error' | string;
|
|
11
|
+
message: string;
|
|
12
|
+
error?: any;
|
|
13
|
+
}
|
|
1
14
|
export interface WidgetConfig {
|
|
2
15
|
eventSlug: string;
|
|
3
16
|
baseUrl: string;
|
|
4
17
|
displayMode?: 'popup' | 'widget' | 'fullscreen';
|
|
18
|
+
position?: WidgetPosition;
|
|
19
|
+
themeMode?: ThemeMode;
|
|
5
20
|
width?: string;
|
|
6
21
|
height?: string;
|
|
7
22
|
theme?: {
|
|
8
|
-
mode?: 'blue' | 'white' | 'custom';
|
|
23
|
+
mode?: 'light' | 'dark' | 'blue' | 'white' | 'custom';
|
|
9
24
|
primaryColor?: string;
|
|
10
25
|
fontFamily?: string;
|
|
11
26
|
};
|
|
12
27
|
debug?: boolean;
|
|
28
|
+
/** Request timeout in milliseconds. Defaults to 120000 (2 minutes). */
|
|
29
|
+
timeoutMs?: number;
|
|
30
|
+
/** Generic event listener for all internal events */
|
|
13
31
|
onEvent?: (eventName: string, payload: any) => void;
|
|
32
|
+
/** Fired when registration is successfully completed */
|
|
33
|
+
onRegister?: (data: RegistrationSuccessPayload) => void;
|
|
34
|
+
/** Alias for onRegister */
|
|
35
|
+
onRegistered?: (data: RegistrationSuccessPayload) => void;
|
|
36
|
+
/** Fired when an error occurs (e.g. submit error, schema load error, network failure) */
|
|
37
|
+
onError?: (error: WidgetErrorPayload) => void;
|
|
14
38
|
}
|
package/dist/utils/Logger.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for form schema and field key normalization.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Normalizes field keys when schema field IDs are auto-generated timestamps
|
|
6
|
+
* (e.g. `field_1785493567167`). Converts the field label to lowercase snake_case.
|
|
7
|
+
*
|
|
8
|
+
* Example:
|
|
9
|
+
* - id: "field_1785493567167", label: "College Name" -> "college_name"
|
|
10
|
+
* - id: "field_1785493567167", label: "State" -> "state"
|
|
11
|
+
* - id: "email", label: "Email Address" -> "email" (unchanged because id is already a standard key)
|
|
12
|
+
*/
|
|
13
|
+
export declare function normalizeFieldKey(id: string, label?: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voxket-ai/events-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Event registration and ticketing widget SDK",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
"typescript-eslint": "^8.69.0",
|
|
72
72
|
"vite": "^8.3.0"
|
|
73
73
|
}
|
|
74
|
-
}
|
|
74
|
+
}
|