@infosoftas/s4-orders-js-sdk 0.1.21-3 → 0.2.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 (51) hide show
  1. package/.editorconfig +8 -8
  2. package/.release-it.json +10 -10
  3. package/README.md +565 -471
  4. package/package.json +62 -58
  5. package/src/App.completion.test.tsx +738 -0
  6. package/src/App.tsx +753 -639
  7. package/src/ErrorBoundary.tsx +41 -41
  8. package/src/api/InvoiceApi.ts +23 -23
  9. package/src/api/OrdersApi.ts +74 -59
  10. package/src/api/SubscribeApi.ts +18 -18
  11. package/src/bundle.ts +4 -4
  12. package/src/components/Alert/Alert.tsx +23 -23
  13. package/src/components/Button/Button.tsx +39 -39
  14. package/src/components/EHFForm/EHFForm.tsx +253 -253
  15. package/src/components/FormFields/AddressField.tsx +55 -55
  16. package/src/components/FormFields/EmailField.tsx +53 -53
  17. package/src/components/FormFields/FormFields.helper.ts +34 -34
  18. package/src/components/FormFields/FormFieldsMapper.ts +34 -34
  19. package/src/components/FormFields/InputField.tsx +52 -52
  20. package/src/components/FormFields/NameField.tsx +52 -52
  21. package/src/components/FormFields/PhoneField.tsx +53 -53
  22. package/src/components/FormFields/TermsCheckbox.tsx +70 -70
  23. package/src/components/FormFields/ToggleFiled.tsx +52 -52
  24. package/src/components/FormFields/fieldValidators.ts +71 -71
  25. package/src/components/MainIframe/MainIframe.tsx +42 -42
  26. package/src/components/OIOForm/OIOForm.tsx +307 -307
  27. package/src/components/OrderDenialModal/OrderDenialModal.tsx +102 -102
  28. package/src/components/OrderForm/ContactDetailsSection.tsx +71 -71
  29. package/src/components/OrderForm/OrderForm.tsx +420 -420
  30. package/src/components/OrderForm/PaymentMethodContent.tsx +62 -62
  31. package/src/components/OrderForm/PaymentMethodSection.tsx +79 -79
  32. package/src/components/OrderForm/SubmitConfirmationDialog.tsx +55 -55
  33. package/src/components/OrderForm/orderFormState.ts +171 -171
  34. package/src/components/OrderForm/useSlotElement.tsx +89 -89
  35. package/src/constants/index.ts +13 -13
  36. package/src/enums/api.ts +5 -5
  37. package/src/enums/general.ts +40 -40
  38. package/src/hooks/useIframe.tsx +59 -59
  39. package/src/hooks/useMessageEvent.tsx +194 -194
  40. package/src/hooks/useOrderForm.tsx +403 -403
  41. package/src/hooks/useQueryParams.ts +5 -5
  42. package/src/index.tsx +30 -30
  43. package/src/lib/utils.ts +1 -1
  44. package/src/types/api.ts +28 -28
  45. package/src/types/general.ts +154 -136
  46. package/src/types/order.ts +91 -70
  47. package/src/utils/fetcher.ts +131 -113
  48. package/src/utils/helper.ts +78 -78
  49. package/src/utils/order.helper.ts +272 -272
  50. package/src/utils/waitForOrderCompletion.ts +125 -0
  51. package/tsconfig.json +38 -38
package/tsconfig.json CHANGED
@@ -1,38 +1,38 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2022",
4
- "lib": ["dom", "dom.iterable", "esnext"],
5
- "allowJs": true,
6
- "checkJs": false,
7
- "skipLibCheck": true,
8
- "esModuleInterop": true,
9
- "allowSyntheticDefaultImports": true,
10
- "strict": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "noFallthroughCasesInSwitch": true,
13
- "module": "esnext",
14
- "resolveJsonModule": true,
15
- "isolatedModules": true,
16
- "verbatimModuleSyntax": true,
17
- "noEmit": false,
18
- "noImplicitAny": true,
19
- "jsx": "react-jsx",
20
- "sourceMap": true,
21
- "inlineSources": true,
22
- "sourceRoot": "/",
23
- "paths": {
24
- "@/*": ["./src/*"],
25
- "API": ["./src/api"],
26
- "API/*": ["./src/api/*"],
27
- "Component/*": ["./src/components/*"],
28
- "Utils/*": ["./src/utils/*"],
29
- "Hooks/*": ["./src/hooks/*"],
30
- "Models/*": ["./src/models/*"],
31
- "Types/*": ["./src/types/*"],
32
- "Enums/*": ["./src/enums/*"],
33
- "Constants/*": ["./src/constants/*"]
34
- }
35
- },
36
- "include": ["src"],
37
- "exclude": ["node_modules"]
38
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2022",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "checkJs": false,
7
+ "skipLibCheck": true,
8
+ "esModuleInterop": true,
9
+ "allowSyntheticDefaultImports": true,
10
+ "strict": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "noFallthroughCasesInSwitch": true,
13
+ "module": "esnext",
14
+ "resolveJsonModule": true,
15
+ "isolatedModules": true,
16
+ "verbatimModuleSyntax": true,
17
+ "noEmit": false,
18
+ "noImplicitAny": true,
19
+ "jsx": "react-jsx",
20
+ "sourceMap": true,
21
+ "inlineSources": true,
22
+ "sourceRoot": "/",
23
+ "paths": {
24
+ "@/*": ["./src/*"],
25
+ "API": ["./src/api"],
26
+ "API/*": ["./src/api/*"],
27
+ "Component/*": ["./src/components/*"],
28
+ "Utils/*": ["./src/utils/*"],
29
+ "Hooks/*": ["./src/hooks/*"],
30
+ "Models/*": ["./src/models/*"],
31
+ "Types/*": ["./src/types/*"],
32
+ "Enums/*": ["./src/enums/*"],
33
+ "Constants/*": ["./src/constants/*"]
34
+ }
35
+ },
36
+ "include": ["src"],
37
+ "exclude": ["node_modules"]
38
+ }