@qssolutions/ssas-registration-form 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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +216 -0
  3. package/dist/components/FormComponentRenderer.d.ts +31 -0
  4. package/dist/components/FormComponentRenderer.d.ts.map +1 -0
  5. package/dist/components/LowerFormSection.d.ts +17 -0
  6. package/dist/components/LowerFormSection.d.ts.map +1 -0
  7. package/dist/components/SSASRegistrationForm.d.ts +18 -0
  8. package/dist/components/SSASRegistrationForm.d.ts.map +1 -0
  9. package/dist/components/UpperFormSection.d.ts +31 -0
  10. package/dist/components/UpperFormSection.d.ts.map +1 -0
  11. package/dist/components/common/SSASCheckbox.d.ts +11 -0
  12. package/dist/components/common/SSASCheckbox.d.ts.map +1 -0
  13. package/dist/components/common/SSASPrimaryButton.d.ts +12 -0
  14. package/dist/components/common/SSASPrimaryButton.d.ts.map +1 -0
  15. package/dist/components/common/index.d.ts +3 -0
  16. package/dist/components/common/index.d.ts.map +1 -0
  17. package/dist/components/form-fields/ControlledCheckbox.d.ts +7 -0
  18. package/dist/components/form-fields/ControlledCheckbox.d.ts.map +1 -0
  19. package/dist/components/form-fields/ControlledComboBox.d.ts +5 -0
  20. package/dist/components/form-fields/ControlledComboBox.d.ts.map +1 -0
  21. package/dist/components/form-fields/ControlledDropdown.d.ts +5 -0
  22. package/dist/components/form-fields/ControlledDropdown.d.ts.map +1 -0
  23. package/dist/components/form-fields/ControlledTextField.d.ts +5 -0
  24. package/dist/components/form-fields/ControlledTextField.d.ts.map +1 -0
  25. package/dist/components/form-fields/ControlledTextFieldAsync.d.ts +23 -0
  26. package/dist/components/form-fields/ControlledTextFieldAsync.d.ts.map +1 -0
  27. package/dist/components/form-fields/HookFormProps.d.ts +16 -0
  28. package/dist/components/form-fields/HookFormProps.d.ts.map +1 -0
  29. package/dist/components/form-fields/index.d.ts +7 -0
  30. package/dist/components/form-fields/index.d.ts.map +1 -0
  31. package/dist/hooks/useFormConfig.d.ts +6 -0
  32. package/dist/hooks/useFormConfig.d.ts.map +1 -0
  33. package/dist/index.d.ts +12 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.esm.js +22823 -0
  36. package/dist/index.esm.js.map +1 -0
  37. package/dist/index.js +22852 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/models/config.d.ts +37 -0
  40. package/dist/models/config.d.ts.map +1 -0
  41. package/dist/models/form-data.d.ts +7 -0
  42. package/dist/models/form-data.d.ts.map +1 -0
  43. package/dist/models/index.d.ts +160 -0
  44. package/dist/models/index.d.ts.map +1 -0
  45. package/dist/services/ApiService.d.ts +46 -0
  46. package/dist/services/ApiService.d.ts.map +1 -0
  47. package/dist/styles/defaultStyles.d.ts +142 -0
  48. package/dist/styles/defaultStyles.d.ts.map +1 -0
  49. package/dist/utils/constants.d.ts +73 -0
  50. package/dist/utils/constants.d.ts.map +1 -0
  51. package/dist/utils/form-utils.d.ts +3 -0
  52. package/dist/utils/form-utils.d.ts.map +1 -0
  53. package/dist/utils/helpers.d.ts +9 -0
  54. package/dist/utils/helpers.d.ts.map +1 -0
  55. package/dist/web-component-standalone.d.ts +7 -0
  56. package/dist/web-component-standalone.d.ts.map +1 -0
  57. package/dist/web-component.d.ts +26 -0
  58. package/dist/web-component.d.ts.map +1 -0
  59. package/dist/web-component.js +50122 -0
  60. package/dist/web-component.js.map +1 -0
  61. package/dist/web-component.min.js +29 -0
  62. package/dist/web-component.min.js.map +1 -0
  63. package/package.json +83 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,216 @@
1
+ # SSAS Registration Form Library
2
+
3
+ Reusable registration form library for SSAS scenarios, with:
4
+
5
+ - React component usage (`SSASRegistrationForm`)
6
+ - Framework-agnostic Web Component usage (`<ssas-registration-form>`)
7
+ - Configurable theme and feature flags
8
+ - Built-in API integration for partner lookup, localization, and registration
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install @ssas/registration-form
14
+ ```
15
+
16
+ ### Peer dependencies
17
+
18
+ ```bash
19
+ npm install react react-dom react-hook-form @fluentui/react react-i18next i18next react-google-recaptcha
20
+ ```
21
+
22
+ ## Quick start (React)
23
+
24
+ ```tsx
25
+ import React from 'react';
26
+ import { SSASRegistrationForm, FormLibraryConfig } from '@ssas/registration-form';
27
+
28
+ const config: FormLibraryConfig = {
29
+ partnerName: 'Microsoft',
30
+ apiBaseUrl: 'https://portal.selfserviceassessment.com',
31
+ theme: {
32
+ primaryColor: '#00BAE4',
33
+ },
34
+ features: {
35
+ enablePartnerMode: true,
36
+ requireTermsAcceptance: true,
37
+ requirePrivacyAcceptance: true,
38
+ },
39
+ onSuccess: (email) => {
40
+ console.log('Registration successful for', email);
41
+ },
42
+ onError: (error) => {
43
+ console.error('Registration failed:', error);
44
+ },
45
+ };
46
+
47
+ export default function App() {
48
+ return <SSASRegistrationForm config={config} />;
49
+ }
50
+ ```
51
+
52
+ ## Quick start (Web Component)
53
+
54
+ Use the browser bundle directly:
55
+
56
+ ```html
57
+ <script src="https://unpkg.com/@ssas/registration-form/dist/web-component.min.js"></script>
58
+ <ssas-registration-form id="registrationForm"></ssas-registration-form>
59
+ <script>
60
+ const form = document.getElementById('registrationForm');
61
+ form.config = {
62
+ partnerName: 'Microsoft',
63
+ apiBaseUrl: 'https://portal.selfserviceassessment.com',
64
+ onSuccess: (email) => console.log('Success:', email),
65
+ onError: (error) => console.error('Error:', error),
66
+ };
67
+
68
+ form.addEventListener('ssas-form-ready', (event) => {
69
+ console.log('Form ready', event.detail);
70
+ });
71
+ </script>
72
+ ```
73
+
74
+ ## Configuration
75
+
76
+ `FormLibraryConfig`:
77
+
78
+ ```ts
79
+ type SupportedLanguage =
80
+ | 'en' | 'fr' | 'de' | 'it' | 'ja' | 'ko' | 'pt' | 'es' | 'nl'
81
+ | 'ar' | 'he' | 'pt-br' | 'tr' | 'id' | 'th' | 'vi' | 'pl';
82
+
83
+ interface FormLibraryConfig {
84
+ // Required for partner-based initialization
85
+ partnerName: string;
86
+
87
+ // Optional base URL used for initial partner lookup
88
+ // Default fallback: https://portal.selfserviceassessment.com
89
+ apiBaseUrl?: string;
90
+
91
+ // Visual customization
92
+ theme?: {
93
+ primaryColor?: string;
94
+ backgroundColor?: string;
95
+ fonts?: {
96
+ family?: string;
97
+ sizes?: {
98
+ heading?: number;
99
+ subheading?: number;
100
+ body?: number;
101
+ };
102
+ };
103
+ };
104
+
105
+ // Inline style overrides
106
+ customStyles?: {
107
+ topWrapper?: React.CSSProperties;
108
+ formWrapper?: React.CSSProperties;
109
+ };
110
+
111
+ // Feature flags
112
+ features?: {
113
+ enablePartnerMode?: boolean;
114
+ requireTermsAcceptance?: boolean;
115
+ requirePrivacyAcceptance?: boolean;
116
+ };
117
+
118
+ // Optional callbacks
119
+ onSubmit?: (data: IUser) => Promise<void>;
120
+ onValidateEmail?: (email: string, signal?: AbortSignal) => Promise<boolean>;
121
+ onSuccess?: (email: string) => void;
122
+ onError?: (error: string) => void;
123
+ onNavigate?: (path: string) => void;
124
+
125
+ // Optional custom policy links
126
+ termsAndConditionsUrl?: string;
127
+ privacyNoticeUrl?: string;
128
+ }
129
+ ```
130
+
131
+ ### Default behavior
132
+
133
+ - Default fonts: `Proxima Nova, sans-serif`
134
+ - Default primary color fallback in styles: `#00BAE4`
135
+ - Default feature flags:
136
+ - `enablePartnerMode: true`
137
+ - `requireTermsAcceptance: true`
138
+ - `requirePrivacyAcceptance: true`
139
+
140
+ ## Runtime flow
141
+
142
+ The component resolves runtime data in this order:
143
+
144
+ 1. Fetch partner by `partnerName`
145
+ 2. Build partner-specific API base (`https://{partner.domain}`)
146
+ 3. Fetch countries, org sizes, industries, and localization
147
+ 4. Submit registration via `/user/add-from-partner`
148
+
149
+ On submit lifecycle:
150
+
151
+ - Success calls `onSuccess(email)`
152
+ - Failures call `onError(message)`
153
+
154
+ ## Web Component event
155
+
156
+ Currently emitted event:
157
+
158
+ - `ssas-form-ready` — fired after the React form is mounted inside the custom element
159
+
160
+ ## Build outputs
161
+
162
+ Generated in `dist/`:
163
+
164
+ - `index.js` (CJS)
165
+ - `index.esm.js` (ESM)
166
+ - `index.d.ts` (types)
167
+ - `web-component.js` (IIFE)
168
+ - `web-component.min.js` (IIFE, minified)
169
+
170
+ ## Scripts
171
+
172
+ - `npm run build` — build library + web component bundles
173
+ - `npm run build:lib` — build React/library bundles
174
+ - `npm run build:webcomponent` — build browser web-component bundles
175
+ - `npm run watch` — watch library build
176
+ - `npm run watch:webcomponent` — watch web-component build
177
+ - `npm run dev` — build and open example react demo on port 8080
178
+ - `npm run dev:watch` — watch web-component bundle and serve examples
179
+ - `npm run serve` — serve project root at `http://localhost:8080`
180
+ - `npm run lint` — run ESLint on `src`
181
+
182
+ ## Example pages
183
+
184
+ - `example/index.html` — vanilla web-component demo
185
+ - `example/react-example.html` — integration-style demo page
186
+
187
+ Run locally:
188
+
189
+ ```bash
190
+ npm install
191
+ npm run build
192
+ npm run serve
193
+ ```
194
+
195
+ Then open:
196
+
197
+ - `http://localhost:8080/example/index.html`
198
+ - `http://localhost:8080/example/react-example.html`
199
+
200
+ ## Public exports
201
+
202
+ Main entry exports include:
203
+
204
+ - `SSASRegistrationForm`
205
+ - `SSASFormElement`
206
+ - `FormLibraryConfig`, `SupportedLanguage`
207
+ - Model types (`IUser`, `IPartnerModel`, etc.)
208
+ - `FormModel`, `FormType`
209
+ - `FormDataModels`
210
+ - `ApiService`
211
+ - `useFormConfig`
212
+ - Style helpers (`createFormStyles`, `textFieldStyles`, `choiceGroupStyles`)
213
+
214
+ ## License
215
+
216
+ MIT
@@ -0,0 +1,31 @@
1
+ import { FC } from "react";
2
+ import { Control, FieldErrors, UseFormClearErrors, UseFormSetError, UseFormSetValue, UseFormTrigger, UseFormWatch } from "react-hook-form";
3
+ import { IUser, FormModel, IFormScreenTranslate, IPartnerModel } from "../models/index";
4
+ import { IComboBoxOption, IDropdownOption } from "@fluentui/react";
5
+ import { FormLibraryConfig } from "../models/config";
6
+ import { ApiService } from "../services/ApiService";
7
+ type FormComponentRendererProps = {
8
+ formModels: (FormModel | boolean)[];
9
+ isRegistering: boolean;
10
+ control: Control<any>;
11
+ setValue: UseFormSetValue<IUser>;
12
+ setError: UseFormSetError<IUser>;
13
+ clearErrors: UseFormClearErrors<IUser>;
14
+ errors: FieldErrors;
15
+ trigger: UseFormTrigger<IUser>;
16
+ performByPartner: boolean;
17
+ watchFormField: UseFormWatch<IUser>;
18
+ translation: IFormScreenTranslate;
19
+ config: FormLibraryConfig;
20
+ apiService: ApiService;
21
+ styles: any;
22
+ countryOptions?: IComboBoxOption[];
23
+ orgSizingOptions?: IComboBoxOption[];
24
+ orgIndustryOptions?: IComboBoxOption[];
25
+ hearAboutOptions?: IDropdownOption[];
26
+ partnerData?: IPartnerModel;
27
+ primaryColor?: string;
28
+ };
29
+ export declare const FormComponentRenderer: FC<FormComponentRendererProps>;
30
+ export {};
31
+ //# sourceMappingURL=FormComponentRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormComponentRenderer.d.ts","sourceRoot":"","sources":["../../src/components/FormComponentRenderer.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAC5C,OAAO,EACH,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,YAAY,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,SAAS,EAA4B,oBAAoB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIlH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAW,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIpD,KAAK,0BAA0B,GAAG;IAC9B,UAAU,EAAE,CAAC,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACtB,QAAQ,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IACjC,QAAQ,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IACjC,WAAW,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IACpC,WAAW,EAAE,oBAAoB,CAAC;IAClC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,GAAG,CAAC;IACZ,cAAc,CAAC,EAAE,eAAe,EAAE,CAAC;IACnC,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,kBAAkB,CAAC,EAAE,eAAe,EAAE,CAAC;IACvC,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAkNhE,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { FC } from "react";
2
+ import { IUser, IFormScreenTranslate, IPartnerModel } from "../models/index";
3
+ import { FieldErrors, UseFormSetValue } from "react-hook-form";
4
+ import { FormLibraryConfig } from "../models/config";
5
+ type LowerFormSectionProps = {
6
+ setValue: UseFormSetValue<IUser>;
7
+ isRegistering: boolean;
8
+ errors: FieldErrors<IUser>;
9
+ translation: IFormScreenTranslate;
10
+ config: FormLibraryConfig;
11
+ submissionError?: string;
12
+ primaryColor?: string;
13
+ partnerData?: IPartnerModel;
14
+ };
15
+ export declare const LowerFormSection: FC<LowerFormSectionProps>;
16
+ export {};
17
+ //# sourceMappingURL=LowerFormSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LowerFormSection.d.ts","sourceRoot":"","sources":["../../src/components/LowerFormSection.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAa,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAI/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,KAAK,qBAAqB,GAAG;IACzB,QAAQ,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,WAAW,EAAE,oBAAoB,CAAC;IAClC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAkJtD,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { FC } from "react";
2
+ import { FormLibraryConfig } from "../models/config";
3
+ export declare const SettingKeys: {
4
+ ColorWidget: string;
5
+ LogoSetting: string;
6
+ PrivacySetting: string;
7
+ KnownProductFrom: string;
8
+ };
9
+ interface SSASRegistrationFormProps {
10
+ config: FormLibraryConfig;
11
+ }
12
+ /**
13
+ * Main Registration Form Component
14
+ * This is the entry point for the library
15
+ */
16
+ export declare const SSASRegistrationForm: FC<SSASRegistrationFormProps>;
17
+ export {};
18
+ //# sourceMappingURL=SSASRegistrationForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SSASRegistrationForm.d.ts","sourceRoot":"","sources":["../../src/components/SSASRegistrationForm.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAA;AAY/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAWpD,eAAO,MAAM,WAAW;;;;;CAKvB,CAAA;AAED,UAAU,yBAAyB;IAC/B,MAAM,EAAE,iBAAiB,CAAA;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA0hB9D,CAAA"}
@@ -0,0 +1,31 @@
1
+ import React, { FC } from "react";
2
+ import { IComboBoxOption, IDropdownOption } from "@fluentui/react";
3
+ import { Control, FieldErrors, UseFormClearErrors, UseFormSetError, UseFormSetValue, UseFormTrigger, UseFormWatch } from "react-hook-form";
4
+ import { IUser, IFormScreenTranslate, IPartnerModel } from "../models/index";
5
+ import { FormLibraryConfig } from "../models/config";
6
+ import { ApiService } from "../services/ApiService";
7
+ type UpperFormSectionProps = {
8
+ isRegistering: boolean;
9
+ performByPartner: boolean;
10
+ setPerformByPartner: React.Dispatch<React.SetStateAction<boolean>>;
11
+ setValue: UseFormSetValue<IUser>;
12
+ setError: UseFormSetError<IUser>;
13
+ clearErrors: UseFormClearErrors<IUser>;
14
+ control: Control<IUser, any>;
15
+ errors: FieldErrors<IUser>;
16
+ trigger: UseFormTrigger<IUser>;
17
+ watch: UseFormWatch<IUser>;
18
+ translation: IFormScreenTranslate;
19
+ config: FormLibraryConfig;
20
+ apiService: ApiService;
21
+ styles: any;
22
+ countryOptions?: IComboBoxOption[];
23
+ orgSizingOptions?: IComboBoxOption[];
24
+ orgIndustryOptions?: IComboBoxOption[];
25
+ hearAboutOptions?: IDropdownOption[];
26
+ partnerData?: IPartnerModel;
27
+ primaryColor?: string;
28
+ };
29
+ export declare const UpperFormSection: FC<UpperFormSectionProps>;
30
+ export {};
31
+ //# sourceMappingURL=UpperFormSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpperFormSection.d.ts","sourceRoot":"","sources":["../../src/components/UpperFormSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAmC,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpG,OAAO,EACH,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,YAAY,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,EAAa,oBAAoB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAKpD,KAAK,qBAAqB,GAAG;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,QAAQ,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IACjC,QAAQ,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IACjC,WAAW,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACvC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC7B,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,OAAO,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/B,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IAC3B,WAAW,EAAE,oBAAoB,CAAC;IAClC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,GAAG,CAAC;IACZ,cAAc,CAAC,EAAE,eAAe,EAAE,CAAC;IACnC,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,kBAAkB,CAAC,EAAE,eAAe,EAAE,CAAC;IACvC,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA8FtD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { ICheckboxProps } from "@fluentui/react";
2
+ import React from "react";
3
+ import { FontConfig } from "../../styles/defaultStyles";
4
+ interface ISSASCheckboxProps extends ICheckboxProps {
5
+ description?: string;
6
+ primaryColor?: string;
7
+ fonts?: FontConfig;
8
+ }
9
+ export declare const SSASCheckbox: (props: ISSASCheckboxProps) => React.JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=SSASCheckbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SSASCheckbox.d.ts","sourceRoot":"","sources":["../../../src/components/common/SSASCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,cAAc,EAAwC,MAAM,iBAAiB,CAAC;AACjG,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,UAAU,kBAAmB,SAAQ,cAAc;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,UAAU,CAAC;CACtB;AA8CD,eAAO,MAAM,YAAY,GAAI,OAAO,kBAAkB,sBAiBrD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { IButtonProps } from "@fluentui/react";
3
+ interface ISSASPrimaryButtonProps extends IButtonProps {
4
+ primaryColor?: string;
5
+ noShadow?: boolean;
6
+ noIcon?: boolean;
7
+ loadingIcon?: boolean;
8
+ iconName?: string;
9
+ }
10
+ export declare const SSASPrimaryButton: React.FC<ISSASPrimaryButtonProps>;
11
+ export {};
12
+ //# sourceMappingURL=SSASPrimaryButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SSASPrimaryButton.d.ts","sourceRoot":"","sources":["../../../src/components/common/SSASPrimaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiB,YAAY,EAAuC,MAAM,iBAAiB,CAAC;AA6CnG,UAAU,uBAAwB,SAAQ,YAAY;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAMD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAuB/D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './SSASCheckbox';
2
+ export * from './SSASPrimaryButton';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ import { ICheckboxProps } from "@fluentui/react";
3
+ import { HookFormProps } from "./HookFormProps";
4
+ export declare const ControlledCheckbox: FC<HookFormProps & ICheckboxProps & {
5
+ primaryColor?: string;
6
+ }>;
7
+ //# sourceMappingURL=ControlledCheckbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlledCheckbox.d.ts","sourceRoot":"","sources":["../../../src/components/form-fields/ControlledCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAY,cAAc,EAAwC,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,aAAa,GAAG,cAAc,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CA+C7F,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from "react";
2
+ import { IComboBoxProps } from "@fluentui/react";
3
+ import { HookFormProps } from "./HookFormProps";
4
+ export declare const ControlledCombobox: FC<HookFormProps & IComboBoxProps>;
5
+ //# sourceMappingURL=ControlledComboBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlledComboBox.d.ts","sourceRoot":"","sources":["../../../src/components/form-fields/ControlledComboBox.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAY,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,aAAa,GAAG,cAAc,CAsCjE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from "react";
2
+ import { IDropdownProps } from "@fluentui/react";
3
+ import { HookFormProps } from "./HookFormProps";
4
+ export declare const ControlledDropdown: FC<HookFormProps & IDropdownProps>;
5
+ //# sourceMappingURL=ControlledDropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlledDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/form-fields/ControlledDropdown.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAY,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,aAAa,GAAG,cAAc,CA4CjE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from "react";
2
+ import { HookFormProps } from "./HookFormProps";
3
+ import { ITextFieldProps } from "@fluentui/react";
4
+ export declare const ControlledTextField: FC<HookFormProps & ITextFieldProps>;
5
+ //# sourceMappingURL=ControlledTextField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlledTextField.d.ts","sourceRoot":"","sources":["../../../src/components/form-fields/ControlledTextField.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAa,MAAM,iBAAiB,CAAC;AAE7D,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,aAAa,GAAG,eAAe,CA6BnE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import React, { FC } from "react";
2
+ import { ITextFieldProps } from "@fluentui/react";
3
+ import { FormLibraryConfig } from "../../models/config";
4
+ import { IFormScreenTranslate } from "../../models/index";
5
+ import { ApiService } from "../../services/ApiService";
6
+ interface ControlledTextFieldAsyncProps extends ITextFieldProps {
7
+ name: string;
8
+ control: any;
9
+ rules?: any;
10
+ defaultValue?: any;
11
+ setValue?: any;
12
+ setError?: any;
13
+ clearErrors?: any;
14
+ trigger?: any;
15
+ setIsValidating?: React.Dispatch<React.SetStateAction<boolean>>;
16
+ translation?: IFormScreenTranslate;
17
+ validateEmail?: (email: string, signal?: AbortSignal) => Promise<boolean>;
18
+ config?: FormLibraryConfig;
19
+ apiService?: ApiService;
20
+ }
21
+ export declare const ControlledTextFieldAsync: FC<ControlledTextFieldAsyncProps>;
22
+ export {};
23
+ //# sourceMappingURL=ControlledTextFieldAsync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlledTextFieldAsync.d.ts","sourceRoot":"","sources":["../../../src/components/form-fields/ControlledTextFieldAsync.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAyB,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAa,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,6BAA8B,SAAQ,eAAe;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,eAAe,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1E,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B;AAED,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAkGtE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { IUser } from "../../models/index";
2
+ import { Control, RegisterOptions, UseFormClearErrors, UseFormSetError, UseFormSetValue, UseFormTrigger } from "react-hook-form";
3
+ import { IFormScreenTranslate } from "../../models/index";
4
+ export interface HookFormProps {
5
+ control: Control<any>;
6
+ name: string;
7
+ rules?: RegisterOptions;
8
+ defaultValue?: any;
9
+ trigger?: UseFormTrigger<IUser>;
10
+ setValue?: UseFormSetValue<any>;
11
+ setError?: UseFormSetError<IUser>;
12
+ clearErrors?: UseFormClearErrors<IUser>;
13
+ setIsValidating?: React.Dispatch<React.SetStateAction<boolean>>;
14
+ translation?: IFormScreenTranslate;
15
+ }
16
+ //# sourceMappingURL=HookFormProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HookFormProps.d.ts","sourceRoot":"","sources":["../../../src/components/form-fields/HookFormProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACH,OAAO,EACP,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,OAAO,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAClC,WAAW,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACxC,eAAe,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACtC"}
@@ -0,0 +1,7 @@
1
+ export * from './ControlledTextField';
2
+ export * from './ControlledTextFieldAsync';
3
+ export * from './ControlledCheckbox';
4
+ export * from './ControlledDropdown';
5
+ export * from './ControlledComboBox';
6
+ export * from './HookFormProps';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form-fields/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { FormLibraryConfig } from '../models/config';
2
+ /**
3
+ * Hook to merge user config with default config
4
+ */
5
+ export declare const useFormConfig: (userConfig: FormLibraryConfig) => FormLibraryConfig;
6
+ //# sourceMappingURL=useFormConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useFormConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,kBAAkB,CAAC;AAGpE;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,YAAY,iBAAiB,KAAG,iBAI7D,CAAC"}
@@ -0,0 +1,12 @@
1
+ export { SSASRegistrationForm } from './components/SSASRegistrationForm';
2
+ export { SSASFormElement } from './web-component';
3
+ export type { FormLibraryConfig, SupportedLanguage } from './models/config';
4
+ export type { IUser, IPartnerModel, IPartnerSetting, ICountry, IOrgSize, IIndustry, IFormScreenTranslate, IFormComponent, } from './models/index';
5
+ export { FormModel, FormType } from './models/index';
6
+ export { FormDataModels } from './models/form-data';
7
+ export { ApiService } from './services/ApiService';
8
+ export { EMAIL_PATTERN, LANGUAGE_OPTIONS, DEFAULT_TRANSLATIONS } from './utils/constants';
9
+ export { useFormConfig } from './hooks/useFormConfig';
10
+ export { createFormStyles, textFieldStyles, choiceGroupStyles } from './styles/defaultStyles';
11
+ export type { FontConfig } from './styles/defaultStyles';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,YAAY,EACR,KAAK,EACL,aAAa,EACb,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,oBAAoB,EACpB,cAAc,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC9F,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC"}