@swan-admin/swan-web-component 1.0.54 → 1.0.55

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.
@@ -0,0 +1,145 @@
1
+ import React$1 from 'react';
2
+
3
+ declare enum GenderType {
4
+ Male = "male",
5
+ Female = "female"
6
+ }
7
+ declare enum PreferredLanguage {
8
+ English = "English",
9
+ Hindi = "Hindi",
10
+ German = "German",
11
+ French = "French",
12
+ Spanish = "Spanish",
13
+ Arabic = "Arabic",
14
+ Italian = "Italian"
15
+ }
16
+
17
+ interface Step {
18
+ type: StepType;
19
+ value?: any;
20
+ order?: number;
21
+ isVisible?: boolean;
22
+ onStepComplete?: (value: any) => Promise<void> | void;
23
+ }
24
+ type Gender = "male" | "female";
25
+ type StepType = "email" | "name" | "height" | "gender";
26
+ interface StyleConfig {
27
+ base?: {
28
+ brandColor?: string;
29
+ backgroundColor?: string;
30
+ primaryColor?: string;
31
+ secondaryColor?: string;
32
+ baseTextColor?: string;
33
+ baseFontSize?: string;
34
+ baseFontFamily?: string;
35
+ };
36
+ logo?: {
37
+ logoWidth?: string;
38
+ logoHeight?: string;
39
+ };
40
+ heading?: {
41
+ headingColor?: string;
42
+ headingFontSize?: string;
43
+ headingFontWeight?: string;
44
+ headingFontFamily?: string;
45
+ };
46
+ subheading?: {
47
+ subheadingColor?: string;
48
+ subheadingFontSize?: string;
49
+ subheadingFontWeight?: string;
50
+ subheadingFontFamily?: string;
51
+ };
52
+ button?: {
53
+ buttonBackground?: string;
54
+ buttonDisabledBackground?: string;
55
+ buttonDisabledTextColor?: string;
56
+ buttonTextColor?: string;
57
+ buttonFontSize?: string;
58
+ buttonFontFamily?: string;
59
+ };
60
+ input?: {
61
+ inputBackgroundColor?: string;
62
+ inputTextColor?: string;
63
+ inputPlaceholderColor?: string;
64
+ inputBorderColor?: string;
65
+ inputFontSize?: string;
66
+ inputFontWeight?: string;
67
+ };
68
+ }
69
+ interface OnboardingProps {
70
+ steps: Step[];
71
+ config?: Config;
72
+ onComplete?: (values: Record<string, any>) => void;
73
+ }
74
+ interface Config {
75
+ style?: StyleConfig;
76
+ logo?: string;
77
+ loader?: string;
78
+ }
79
+ interface FocalLengthOuput {
80
+ brandName: string;
81
+ modelName: string;
82
+ focalLength: number;
83
+ }
84
+ interface FocalLengthProps {
85
+ onComplete?: (value: FocalLengthOuput) => Promise<void> | void;
86
+ initialValue?: any;
87
+ config?: Config;
88
+ }
89
+ interface sectionsType {
90
+ full: "full";
91
+ body: "body";
92
+ face: "face";
93
+ }
94
+ interface EducationalProps {
95
+ gender?: Gender;
96
+ sections?: sectionsType[keyof sectionsType][];
97
+ config?: any;
98
+ onComplete?: () => void;
99
+ }
100
+ interface BodyScanProps {
101
+ userDetails: UserDetails;
102
+ language?: PreferredLanguage;
103
+ config?: any;
104
+ onScanSuccess?: (data: any) => void;
105
+ onRetry?: () => void;
106
+ onComplete?: () => void;
107
+ onScanError: (errorDetails: any) => void;
108
+ }
109
+ interface UserDetails {
110
+ email: string;
111
+ userName?: string;
112
+ shopDomain: string;
113
+ gender: Gender;
114
+ heightInCm: number;
115
+ scanType: string;
116
+ deviceFocalLength: number;
117
+ deviceModelName: string;
118
+ callbackUrl?: string;
119
+ }
120
+ interface FaceScanMetaData {
121
+ email: string;
122
+ shopDomain: string;
123
+ gender: Gender;
124
+ deviceFocalLength: number;
125
+ callbackUrl?: string;
126
+ }
127
+ interface FaceScanProps {
128
+ userDetails: FaceScanMetaData;
129
+ onComplete?: (data: any) => void;
130
+ onScanError?: (data: any) => void;
131
+ onRetry?: () => void;
132
+ config?: any;
133
+ }
134
+
135
+ declare const Onboarding: React$1.FC<OnboardingProps>;
136
+
137
+ declare const FocalLength: React$1.FC<FocalLengthProps>;
138
+
139
+ declare const Educational: React.FC<EducationalProps>;
140
+
141
+ declare const BodyScan: React.FC<BodyScanProps>;
142
+
143
+ declare const FaceScan: React.FC<FaceScanProps>;
144
+
145
+ export { BodyScan, type BodyScanProps, Educational, type EducationalProps, FaceScan, type FaceScanProps, FocalLength, type FocalLengthProps, GenderType, Onboarding, type OnboardingProps, PreferredLanguage };
@@ -0,0 +1,145 @@
1
+ import React$1 from 'react';
2
+
3
+ declare enum GenderType {
4
+ Male = "male",
5
+ Female = "female"
6
+ }
7
+ declare enum PreferredLanguage {
8
+ English = "English",
9
+ Hindi = "Hindi",
10
+ German = "German",
11
+ French = "French",
12
+ Spanish = "Spanish",
13
+ Arabic = "Arabic",
14
+ Italian = "Italian"
15
+ }
16
+
17
+ interface Step {
18
+ type: StepType;
19
+ value?: any;
20
+ order?: number;
21
+ isVisible?: boolean;
22
+ onStepComplete?: (value: any) => Promise<void> | void;
23
+ }
24
+ type Gender = "male" | "female";
25
+ type StepType = "email" | "name" | "height" | "gender";
26
+ interface StyleConfig {
27
+ base?: {
28
+ brandColor?: string;
29
+ backgroundColor?: string;
30
+ primaryColor?: string;
31
+ secondaryColor?: string;
32
+ baseTextColor?: string;
33
+ baseFontSize?: string;
34
+ baseFontFamily?: string;
35
+ };
36
+ logo?: {
37
+ logoWidth?: string;
38
+ logoHeight?: string;
39
+ };
40
+ heading?: {
41
+ headingColor?: string;
42
+ headingFontSize?: string;
43
+ headingFontWeight?: string;
44
+ headingFontFamily?: string;
45
+ };
46
+ subheading?: {
47
+ subheadingColor?: string;
48
+ subheadingFontSize?: string;
49
+ subheadingFontWeight?: string;
50
+ subheadingFontFamily?: string;
51
+ };
52
+ button?: {
53
+ buttonBackground?: string;
54
+ buttonDisabledBackground?: string;
55
+ buttonDisabledTextColor?: string;
56
+ buttonTextColor?: string;
57
+ buttonFontSize?: string;
58
+ buttonFontFamily?: string;
59
+ };
60
+ input?: {
61
+ inputBackgroundColor?: string;
62
+ inputTextColor?: string;
63
+ inputPlaceholderColor?: string;
64
+ inputBorderColor?: string;
65
+ inputFontSize?: string;
66
+ inputFontWeight?: string;
67
+ };
68
+ }
69
+ interface OnboardingProps {
70
+ steps: Step[];
71
+ config?: Config;
72
+ onComplete?: (values: Record<string, any>) => void;
73
+ }
74
+ interface Config {
75
+ style?: StyleConfig;
76
+ logo?: string;
77
+ loader?: string;
78
+ }
79
+ interface FocalLengthOuput {
80
+ brandName: string;
81
+ modelName: string;
82
+ focalLength: number;
83
+ }
84
+ interface FocalLengthProps {
85
+ onComplete?: (value: FocalLengthOuput) => Promise<void> | void;
86
+ initialValue?: any;
87
+ config?: Config;
88
+ }
89
+ interface sectionsType {
90
+ full: "full";
91
+ body: "body";
92
+ face: "face";
93
+ }
94
+ interface EducationalProps {
95
+ gender?: Gender;
96
+ sections?: sectionsType[keyof sectionsType][];
97
+ config?: any;
98
+ onComplete?: () => void;
99
+ }
100
+ interface BodyScanProps {
101
+ userDetails: UserDetails;
102
+ language?: PreferredLanguage;
103
+ config?: any;
104
+ onScanSuccess?: (data: any) => void;
105
+ onRetry?: () => void;
106
+ onComplete?: () => void;
107
+ onScanError: (errorDetails: any) => void;
108
+ }
109
+ interface UserDetails {
110
+ email: string;
111
+ userName?: string;
112
+ shopDomain: string;
113
+ gender: Gender;
114
+ heightInCm: number;
115
+ scanType: string;
116
+ deviceFocalLength: number;
117
+ deviceModelName: string;
118
+ callbackUrl?: string;
119
+ }
120
+ interface FaceScanMetaData {
121
+ email: string;
122
+ shopDomain: string;
123
+ gender: Gender;
124
+ deviceFocalLength: number;
125
+ callbackUrl?: string;
126
+ }
127
+ interface FaceScanProps {
128
+ userDetails: FaceScanMetaData;
129
+ onComplete?: (data: any) => void;
130
+ onScanError?: (data: any) => void;
131
+ onRetry?: () => void;
132
+ config?: any;
133
+ }
134
+
135
+ declare const Onboarding: React$1.FC<OnboardingProps>;
136
+
137
+ declare const FocalLength: React$1.FC<FocalLengthProps>;
138
+
139
+ declare const Educational: React.FC<EducationalProps>;
140
+
141
+ declare const BodyScan: React.FC<BodyScanProps>;
142
+
143
+ declare const FaceScan: React.FC<FaceScanProps>;
144
+
145
+ export { BodyScan, type BodyScanProps, Educational, type EducationalProps, FaceScan, type FaceScanProps, FocalLength, type FocalLengthProps, GenderType, Onboarding, type OnboardingProps, PreferredLanguage };