@adyen/kyc-components 3.17.1 → 3.18.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 (55) hide show
  1. package/dist/es/adyen-kyc-components.es.js +230 -323
  2. package/dist/style.css +76 -195
  3. package/dist/types/components/BusinessTypeSelection/utils.d.ts +2 -2
  4. package/dist/types/components/CompanyBasics/component/CompanyBasicsComponent.d.ts +1 -1
  5. package/dist/types/components/CompanyOtherDetails/component/CompanyOtherDetailsComponent.d.ts +1 -1
  6. package/dist/types/components/EventEmitter.d.ts +3 -3
  7. package/dist/types/components/internal/Accordion/Accordion.d.ts +11 -3
  8. package/dist/types/components/internal/ContextGuidance/ContextGuidance.d.ts +1 -1
  9. package/dist/types/components/internal/FormFields/Field/Field.d.ts +1 -1
  10. package/dist/types/components/internal/FormFields/Field/types.d.ts +1 -0
  11. package/dist/types/components/internal/FormFields/InputRadio/InputRadio.d.ts +1 -1
  12. package/dist/types/components/internal/FormFields/MaskedInputText/MaskedInputText.d.ts +2 -1
  13. package/dist/types/components/internal/IdFieldTypeSelector/countryIdNumberTypes.d.ts +1 -1
  14. package/dist/types/components/internal/IdFieldTypeSelector/inferCompanyRegistrationNumberType.d.ts +1 -1
  15. package/dist/types/core/Context/ExperimentContext/types.d.ts +3 -1
  16. package/dist/types/core/Context/SettingsContext/useSetting.d.ts +2 -2
  17. package/dist/types/core/SDKValidation/index.d.ts +2 -2
  18. package/dist/types/core/Services/componentApi/delete-transferInstrument.d.ts +1 -1
  19. package/dist/types/core/Services/session.d.ts +1 -1
  20. package/dist/types/core/core.d.ts +4 -4
  21. package/dist/types/core/hooks/useAsyncValidator.d.ts +1 -1
  22. package/dist/types/core/hooks/useBankConfigurationHandlers.d.ts +1 -1
  23. package/dist/types/core/hooks/useForm/reducer.d.ts +5 -3
  24. package/dist/types/core/hooks/useForm/types.d.ts +3 -0
  25. package/dist/types/core/hooks/useIdVerificationToken.d.ts +2 -2
  26. package/dist/types/core/hooks/useInterval.d.ts +0 -1
  27. package/dist/types/core/hooks/useLocalStorage.d.ts +1 -5
  28. package/dist/types/core/hooks/useStaticValidator/useStaticValidator.d.ts +2 -2
  29. package/dist/types/core/models/errors/validation-error.d.ts +2 -1
  30. package/dist/types/core/models/field-configurations.d.ts +1 -1
  31. package/dist/types/utils/api/documentUtils.d.ts +1 -1
  32. package/dist/types/utils/company-util.d.ts +1 -1
  33. package/dist/types/utils/entriesOf.d.ts +2 -2
  34. package/dist/types/utils/mapping/mapping.d.ts +1 -1
  35. package/dist/types/utils/omitObscuredFieldsIfUnchanged.d.ts +1 -1
  36. package/dist/types/utils/regex/patternValidators.d.ts +1 -1
  37. package/dist/types/utils/trustMembers/handlers/addOrUpdateAssociatedTrustMember.d.ts +2 -2
  38. package/dist/types/utils/trustMembers/handlers/addOrUpdateUndefinedBeneficiary.d.ts +1 -1
  39. package/dist/types/utils/trustMembers/handlers/createExemptSettlor.d.ts +2 -2
  40. package/dist/types/utils/trustMembers/handlers/deleteAssociatedTrustMember.d.ts +1 -1
  41. package/dist/types/utils/trustMembers/handlers/deleteUndefinedBeneficiary.d.ts +1 -1
  42. package/dist/types/utils/trustMembers/handlers/updateExemptSettlorName.d.ts +2 -2
  43. package/dist/types/utils/validatorUtils.d.ts +3 -3
  44. package/dist/types/utils/verification/verificationUtils.d.ts +1 -1
  45. package/package.json +2 -2
  46. package/dist/types/components/internal/Accordion/AccordionContext.d.ts +0 -2
  47. package/dist/types/components/internal/Accordion/index.d.ts +0 -1
  48. package/dist/types/components/internal/Accordion/types.d.ts +0 -22
  49. package/dist/types/components/internal/AccordionItem/AccordionItem.d.ts +0 -3
  50. package/dist/types/components/internal/AccordionItem/index.d.ts +0 -1
  51. package/dist/types/components/internal/AccordionItem/types.d.ts +0 -15
  52. package/dist/types/components/internal/AccordionItem/useAccordionContext.d.ts +0 -1
  53. package/dist/types/components/internal/CollapsibleContainer/CollapsibleContainer.d.ts +0 -3
  54. package/dist/types/components/internal/CollapsibleContainer/index.d.ts +0 -1
  55. package/dist/types/components/internal/CollapsibleContainer/types.d.ts +0 -6
package/dist/style.css CHANGED
@@ -1102,6 +1102,10 @@ a.adyen-kyc-button:disabled, a.adyen-kyc-button.adyen-kyc-button--disabled {
1102
1102
  pointer-events: none;
1103
1103
  }
1104
1104
 
1105
+ .adyen-kyc-optional-label {
1106
+ color: #69778c;
1107
+ }
1108
+
1105
1109
  .adyen-kyc-label__text {
1106
1110
  color: #00112c;
1107
1111
  display: block;
@@ -2351,213 +2355,58 @@ a.adyen-kyc-button:disabled, a.adyen-kyc-button.adyen-kyc-button--disabled {
2351
2355
  /* #endregion */
2352
2356
  /* #region Inline components */
2353
2357
  /* #endregion */
2354
- /* stylelint-disable-line scss/dollar-variable-pattern */
2355
- /* stylelint-disable-line scss/dollar-variable-pattern */
2356
- /* stylelint-disable-line scss/dollar-variable-pattern */
2357
- /* stylelint-disable-line scss/dollar-variable-pattern */
2358
- .adyen-kyc-accordion {
2359
- color: #00112c;
2360
- font-family: fakt, -apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen, ubuntu, cantarell, "Open Sans", "Helvetica Neue", sans-serif;
2361
- font-size: 15px;
2362
- -webkit-font-smoothing: antialiased;
2363
- -moz-osx-font-smoothing: grayscale;
2364
- font-weight: 400;
2365
- line-height: 1.4;
2366
- }
2367
- .adyen-kyc-accordion *,
2368
- .adyen-kyc-accordion *::before,
2369
- .adyen-kyc-accordion *::after {
2370
- box-sizing: border-box;
2358
+ details,
2359
+ summary {
2360
+ background-color: var(--accordion-background-color);
2361
+ color: var(--accordion-text-color);
2362
+ border-radius: var(--accordion-border-radius);
2371
2363
  }
2372
2364
 
2373
- .adyen-kyc-accordion--container {
2374
- border: 1px solid #dce0e5;
2375
- border-radius: 6px;
2376
- }
2377
- .adyen-kyc-accordion--container .adyen-kyc-accordion__item:first-child {
2378
- border-top-color: transparent;
2379
- }
2380
- .adyen-kyc-accordion--container .adyen-kyc-accordion__item:first-child > .adyen-kyc-accordion__header {
2381
- border-radius: 4px 4px 0 0;
2382
- }
2383
- .adyen-kyc-accordion--container .adyen-kyc-accordion__item:last-child {
2384
- border-bottom-color: transparent;
2385
- }
2386
- .adyen-kyc-accordion--container .adyen-kyc-accordion__item:last-child:not(.adyen-kyc-accordion__item--open) > .adyen-kyc-accordion__header {
2387
- border-radius: 0 0 4px 4px;
2365
+ details {
2366
+ margin: var(--accordion-margin-x) 0;
2388
2367
  }
2389
2368
 
2390
- .adyen-kyc-accordion--guide {
2391
- margin: 8px 0;
2392
- padding-bottom: 16px;
2393
- }
2394
- .adyen-kyc-accordion--guide .adyen-kyc-accordion__item {
2395
- background-color: #f3f6f9;
2396
- border: 0;
2397
- border-radius: 4px;
2398
- padding: 4px 8px;
2399
- }
2400
- .adyen-kyc-accordion--guide .adyen-kyc-accordion__header {
2401
- padding: 0;
2402
- }
2403
- .adyen-kyc-accordion--guide .adyen-kyc-accordion__title {
2404
- color: #394962;
2405
- font-size: 13px;
2369
+ summary {
2370
+ display: flex;
2371
+ align-items: center;
2372
+ gap: var(--accordion-header-spacing);
2373
+ padding: var(--accordion-header-padding);
2406
2374
  font-weight: bold;
2407
2375
  }
2408
- .adyen-kyc-accordion--guide .adyen-kyc-accordion__content {
2409
- color: #394962;
2410
- font-size: 13px;
2411
- margin: 4px 24px;
2412
- padding: 0;
2413
- }
2414
- .adyen-kyc-accordion--guide .adyen-kyc-accordion__toggle {
2415
- color: #a5afbd;
2416
- margin: 2px 8px 0 4px;
2417
- }/* #region Spacing */
2418
- /* #endregion */
2419
- /* #region Colors */
2420
- /* #endregion */
2421
- /* #region Fonts */
2422
- /* #endregion */
2423
- /* #region Borders */
2424
- /* #endregion */
2425
- /* #region Box-shadow */
2426
- /* #endregion */
2427
- /* #region Shadows */
2428
- /* #endregion */
2429
- /* #region Z-index */
2430
- /* #endregion */
2431
- /* #region Transition */
2432
- /* #endregion */
2433
- /* #region Timing functions */
2434
- /* #endregion */
2435
- /* #region Focus ring */
2436
- /* #endregion */
2437
- /* #region Inline components */
2438
- /* #endregion */
2439
- /* stylelint-disable-line scss/dollar-variable-pattern */
2440
- /* stylelint-disable-line scss/dollar-variable-pattern */
2441
- /* stylelint-disable-line scss/dollar-variable-pattern */
2442
- /* stylelint-disable-line scss/dollar-variable-pattern */
2443
- .adyen-kyc-accordion__item {
2444
- border-bottom: 1px solid transparent;
2445
- border-top: 1px solid #dce0e5;
2446
- position: relative;
2447
- }
2448
- .adyen-kyc-accordion__item:last-child {
2449
- border-bottom-color: #dce0e5;
2450
- }
2451
2376
 
2452
- .adyen-kyc-accordion__item--open {
2453
- overflow: visible;
2454
- }
2455
-
2456
- .adyen-kyc-accordion__header {
2457
- color: #00112c;
2377
+ summary > .arrow {
2458
2378
  cursor: pointer;
2459
- display: flex;
2460
- padding: 16px;
2461
- transition-duration: 0.1s;
2462
- transition-property: margin, height, padding;
2463
- }
2464
- .adyen-kyc-accordion__header:hover {
2465
- background-color: #f3f6f9;
2466
- }
2467
- .adyen-kyc-accordion__header:active {
2468
- background-color: #dce0e5;
2469
- }
2470
- .adyen-kyc-accordion__header:focus {
2471
- box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(0, 102, 255, 0.4);
2472
- transition: 0.1s cubic-bezier(0.785, 0.135, 0.15, 0.86);
2473
- transition-property: box-shadow;
2474
- outline: none;
2379
+ height: 1em;
2475
2380
  }
2476
2381
 
2477
- .adyen-kyc-accordion__title-wrapper {
2478
- flex: 1;
2382
+ summary > .arrow-right {
2383
+ margin-left: auto;
2384
+ margin-right: var(--accordion-header-spacing);
2479
2385
  }
2480
2386
 
2481
- .adyen-kyc-accordion__title {
2482
- color: inherit;
2483
- font-weight: 600;
2387
+ details[open] > summary > .arrow {
2388
+ transform: rotate(-180deg);
2484
2389
  }
2485
2390
 
2486
- .adyen-kyc-accordion__subtitle {
2487
- color: #394962;
2488
- font-size: 13px;
2391
+ details summary::-webkit-details-marker {
2392
+ display: none;
2489
2393
  }
2490
2394
 
2491
- .adyen-kyc-accordion__toggle {
2492
- line-height: 1;
2493
- margin: 2px 16px 0 0;
2494
- padding: 0;
2495
- width: 12px;
2395
+ .content {
2396
+ margin: var(--accordion-content-margin-y) var(--accordion-content-margin-x);
2397
+ padding: var(--accordion-content-padding);
2496
2398
  }
2497
2399
 
2498
- .adyen-kyc-accordion__content {
2499
- box-sizing: border-box;
2500
- margin: 0 0 24px;
2501
- overflow-x: auto;
2502
- overflow-y: hidden;
2503
- padding: 0 16px 0 calc(32px + 12px);
2504
- transition-duration: 0.1s;
2505
- transition-property: margin, height, padding;
2506
- }
2507
- .adyen-kyc-accordion__item > .adyen-kyc-accordion__content {
2508
- margin: 0;
2509
- }
2510
- .adyen-kyc-accordion__item--open > .adyen-kyc-accordion__content {
2511
- margin: 0 0 24px;
2512
- }
2513
- .adyen-kyc-accordion--max-height-transition .adyen-kyc-accordion__item > .adyen-kyc-accordion__content {
2514
- max-height: 0;
2515
- transition-duration: 0.1s;
2516
- transition-property: margin, max-height;
2517
- }
2518
- .adyen-kyc-accordion--max-height-transition .adyen-kyc-accordion__item--open > .adyen-kyc-accordion__content {
2519
- max-height: 500px;
2520
- }/* #region Spacing */
2521
- /* #endregion */
2522
- /* #region Colors */
2523
- /* #endregion */
2524
- /* #region Fonts */
2525
- /* #endregion */
2526
- /* #region Borders */
2527
- /* #endregion */
2528
- /* #region Box-shadow */
2529
- /* #endregion */
2530
- /* #region Shadows */
2531
- /* #endregion */
2532
- /* #region Z-index */
2533
- /* #endregion */
2534
- /* #region Transition */
2535
- /* #endregion */
2536
- /* #region Timing functions */
2537
- /* #endregion */
2538
- /* #region Focus ring */
2539
- /* #endregion */
2540
- /* #region Inline components */
2541
- /* #endregion */
2542
- /* stylelint-disable-line scss/dollar-variable-pattern */
2543
- /* stylelint-disable-line scss/dollar-variable-pattern */
2544
- /* stylelint-disable-line scss/dollar-variable-pattern */
2545
- /* stylelint-disable-line scss/dollar-variable-pattern */
2546
- .adyen-collapsible-container {
2547
- color: #00112c;
2548
- font-family: fakt, -apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen, ubuntu, cantarell, "Open Sans", "Helvetica Neue", sans-serif;
2549
- font-size: 15px;
2550
- -webkit-font-smoothing: antialiased;
2551
- -moz-osx-font-smoothing: grayscale;
2552
- font-weight: 400;
2553
- line-height: 1.4;
2554
- overflow: hidden;
2555
- transition: height 0.2s cubic-bezier(0.785, 0.135, 0.15, 0.86);
2556
- }
2557
- .adyen-collapsible-container *,
2558
- .adyen-collapsible-container *::before,
2559
- .adyen-collapsible-container *::after {
2560
- box-sizing: border-box;
2400
+ details {
2401
+ --accordion-background-color: #f3f6f9;
2402
+ --accordion-text-color: #00112c;
2403
+ --accordion-margin-x: 8px;
2404
+ --accordion-border-radius: 8px;
2405
+ --accordion-header-padding: 8px;
2406
+ --accordion-header-spacing: 10px;
2407
+ --accordion-content-margin-x: 20px;
2408
+ --accordion-content-margin-y: 5px;
2409
+ --accordion-content-padding: 8px;
2561
2410
  }/* #region Spacing */
2562
2411
  /* #endregion */
2563
2412
  /* #region Colors */
@@ -3613,10 +3462,13 @@ a.adyen-kyc-button:disabled, a.adyen-kyc-button.adyen-kyc-button--disabled {
3613
3462
  font-weight: 600;
3614
3463
  }
3615
3464
 
3616
- .adyen-layout-md .adyen-kyc-field-verification-methods {
3465
+ .adyen-kyc-field-verification-methods {
3617
3466
  display: flex;
3618
3467
  gap: 12px;
3619
3468
  }
3469
+ .adyen-layout-xs-only .adyen-kyc-field-verification-methods {
3470
+ flex-direction: column;
3471
+ }
3620
3472
  .adyen-kyc-field-verification-methods__card {
3621
3473
  display: flex;
3622
3474
  }
@@ -5743,9 +5595,13 @@ a.adyen-kyc-button:disabled, a.adyen-kyc-button.adyen-kyc-button--disabled {
5743
5595
  }
5744
5596
 
5745
5597
  .adyen-kyc-dropin-container {
5598
+ box-sizing: border-box;
5746
5599
  background-color: #fff;
5747
5600
  padding: 32px;
5748
5601
  border-radius: 8px;
5602
+ }
5603
+ .adyen-layout-xs-only .adyen-kyc-dropin-container {
5604
+ padding: 8px;
5749
5605
  }/* #region Spacing */
5750
5606
  /* #endregion */
5751
5607
  /* #region Colors */
@@ -6116,10 +5972,17 @@ a.adyen-kyc-button:disabled, a.adyen-kyc-button.adyen-kyc-button--disabled {
6116
5972
  /* #endregion */
6117
5973
  /* #region Inline components */
6118
5974
  /* #endregion */
5975
+ /* stylelint-disable-line scss/dollar-variable-pattern */
5976
+ /* stylelint-disable-line scss/dollar-variable-pattern */
5977
+ /* stylelint-disable-line scss/dollar-variable-pattern */
5978
+ /* stylelint-disable-line scss/dollar-variable-pattern */
6119
5979
  .adyen-kyc-manage-ti-overview {
6120
5980
  padding: 0;
6121
5981
  }
6122
5982
  .adyen-kyc-manage-ti-overview__action {
5983
+ padding: 8px;
5984
+ }
5985
+ .adyen-layout-md .adyen-kyc-manage-ti-overview__action {
6123
5986
  padding: 16px;
6124
5987
  }/* #region Spacing */
6125
5988
  /* #endregion */
@@ -6143,19 +6006,37 @@ a.adyen-kyc-button:disabled, a.adyen-kyc-button.adyen-kyc-button--disabled {
6143
6006
  /* #endregion */
6144
6007
  /* #region Inline components */
6145
6008
  /* #endregion */
6146
- .adyen-kyc-manage-ti-overview-item .adl-accordion__content {
6147
- padding: 16px 16px;
6009
+ /* stylelint-disable-line scss/dollar-variable-pattern */
6010
+ /* stylelint-disable-line scss/dollar-variable-pattern */
6011
+ /* stylelint-disable-line scss/dollar-variable-pattern */
6012
+ /* stylelint-disable-line scss/dollar-variable-pattern */
6013
+ .adyen-kyc-manage-ti-overview-item__header {
6014
+ display: flex;
6015
+ flex-direction: column;
6148
6016
  }
6149
- .adyen-kyc-manage-ti-overview-item__heading {
6150
- align-items: baseline;
6017
+ .adyen-kyc-manage-ti-overview-item__title {
6151
6018
  display: flex;
6019
+ align-items: center;
6020
+ word-break: break-word;
6021
+ }
6022
+ .adyen-layout-md .adyen-kyc-manage-ti-overview-item__title {
6152
6023
  gap: 12px;
6153
6024
  }
6025
+ .adyen-kyc-manage-ti-overview-item__subtitle {
6026
+ font-weight: 400;
6027
+ font-size: 13px;
6028
+ color: #69778c;
6029
+ margin: 8px;
6030
+ }
6154
6031
  .adyen-kyc-manage-ti-overview-item__action {
6155
6032
  display: flex;
6156
- justify-content: space-between;
6033
+ flex-wrap: wrap;
6034
+ gap: 4px;
6157
6035
  margin-top: 8px;
6158
6036
  }
6037
+ .adyen-layout-md .adyen-kyc-manage-ti-overview-item__action {
6038
+ gap: 8px;
6039
+ }
6159
6040
  .adyen-kyc-manage-ti-overview-item__loader {
6160
6041
  min-height: 180px; /* setting a min height to show the transferInstrument once it loads asynchronously*/
6161
6042
  }/* #region Spacing */
@@ -20,7 +20,7 @@ import type { BusinessType, BusinessTypeModel, LegalArrangementModel, TrusteeTyp
20
20
  * @param companyTypesValue - the subtype of an organization see CompanyValuesType
21
21
  */
22
22
  export declare const organizationTypesToSkipCompanyStructureForm: string[];
23
- export declare const getBusinessType: (businessTypeItems: BusinessTypeModel[], country: CountryCode, accountHolder: AccountHolderOption | null, legalEntityType?: LegalEntityType, companyTypesValue?: CompanyTypesValue | '', capabilities?: CapabilityName[]) => BusinessTypeModel | undefined;
23
+ export declare const getBusinessType: (businessTypeItems: BusinessTypeModel[], country: CountryCode, accountHolder: AccountHolderOption | null, legalEntityType?: LegalEntityType, companyTypesValue?: CompanyTypesValue | "", capabilities?: CapabilityName[]) => BusinessTypeModel | undefined;
24
24
  export declare const businessTypes: readonly BusinessTypeModel[];
25
25
  export declare const businessTypeIcons: Record<BusinessType, IconName>;
26
26
  export declare const useSelectionOptions: (legalEntityResponse: ExistingLegalEntity) => {
@@ -31,6 +31,6 @@ export declare const useSelectionOptions: (legalEntityResponse: ExistingLegalEnt
31
31
  *
32
32
  */
33
33
  export declare const mapLegalArrangementOptionToCompanyTypesValue: (legalArrangement: LegalArrangementOption | undefined) => CompanyTypesValue | undefined;
34
- export declare const determineOrganizationTypeToUpdate: (defaultLegalArrangement?: LegalArrangementOption, targetLegalArrangement?: LegalArrangementOption, currentCompanyTypeValue?: CompanyTypesValue) => CompanyTypesValue | '' | undefined;
34
+ export declare const determineOrganizationTypeToUpdate: (defaultLegalArrangement?: LegalArrangementOption, targetLegalArrangement?: LegalArrangementOption, currentCompanyTypeValue?: CompanyTypesValue) => CompanyTypesValue | "" | undefined;
35
35
  export declare const getDefaultLegalArrangementOrSuborganizationType: (legalEntityResponse: ExistingLegalEntity | undefined, accountHolder: AccountHolderOption | null) => LegalArrangementOption | undefined;
36
36
  export declare const getTargetLegalEntityType: (businessType: BusinessType | undefined, legalArrangement: LegalArrangementOption | undefined, trusteeType: TrusteeType | undefined, currentLegalEntityType: LegalEntityType | undefined) => LegalEntityType;
@@ -3,6 +3,6 @@ import type { CompanySearchSchema } from '../../CompanySearch/types';
3
3
  import type { CompanyBasicsProps, CompanyBasicsSchema } from '../types';
4
4
  export declare const COMPANY_BASICS_FORM_ID: keyof CompanySearchSchema;
5
5
  export declare const companyBasicsFields: Array<keyof CompanyBasicsSchema>;
6
- declare function CompanyBasics({ data, labels, placeholders, helperText, heading, description, readOnly, shouldValidate, formVerificationErrors, fieldValidationErrors, requiredFields, obscuredFields, optionalFields, readOnlyFields, handleCompanyIndexSearch, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, country, companyType, isTopLevelEntity, baseTrackingPayload, kompanyVerifiedData, setKompanyAddress, setKompanyVerifiedData, }: CompanyBasicsProps): import("preact/compat").JSX.Element;
6
+ declare function CompanyBasics({ data, labels, placeholders, helperText, heading, description, readOnly, shouldValidate, formVerificationErrors, fieldValidationErrors, allFields, requiredFields, obscuredFields, optionalFields, readOnlyFields, handleCompanyIndexSearch, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, country, companyType, isTopLevelEntity, baseTrackingPayload, kompanyVerifiedData, setKompanyAddress, setKompanyVerifiedData, }: CompanyBasicsProps): import("preact/compat").JSX.Element;
7
7
  export declare const CompanyBasicsComponent: typeof CompanyBasics;
8
8
  export {};
@@ -3,6 +3,6 @@ import type { CompanySearchSchema } from '../../CompanySearch/types';
3
3
  import type { CompanyOtherDetailsProps, CompanyOtherDetailsSchema } from '../types';
4
4
  export declare const COMPANY_OTHER_DETAILS_FORM_ID: keyof CompanySearchSchema;
5
5
  export declare const companyOtherDetailsFields: Array<keyof CompanyOtherDetailsSchema>;
6
- declare function CompanyOtherDetails({ data, labels, placeholders, helperText, heading, description, readOnly, shouldValidate, formVerificationErrors, fieldValidationErrors, requiredFields, obscuredFields, optionalFields, readOnlyFields, country, legalCompanyName, companyType, kompanyVerifiedData, }: CompanyOtherDetailsProps): import("preact/compat").JSX.Element;
6
+ declare function CompanyOtherDetails({ data, labels, placeholders, helperText, heading, description, readOnly, shouldValidate, formVerificationErrors, fieldValidationErrors, allFields, requiredFields, obscuredFields, optionalFields, readOnlyFields, country, legalCompanyName, companyType, }: CompanyOtherDetailsProps): import("preact/compat").JSX.Element;
7
7
  export declare const CompanyOtherDetailsComponent: typeof CompanyOtherDetails;
8
8
  export {};
@@ -15,8 +15,8 @@ declare class EventEmitter {
15
15
  listeners: {
16
16
  [E in EventName]: Array<EventListenerTypeMap[E]>;
17
17
  };
18
- on: <E extends keyof EventListenerTypeMap>(eventName: E, listener: EventListenerTypeMap[E]) => void;
19
- off: <E extends keyof EventListenerTypeMap>(eventName: E, toRemove: EventListenerTypeMap[E]) => void;
20
- emit: <E extends keyof EventListenerTypeMap>(eventName: E, ...data: Parameters<EventListenerTypeMap[E]>) => void;
18
+ on: <E extends EventName>(eventName: E, listener: EventListenerTypeMap[E]) => void;
19
+ off: <E extends EventName>(eventName: E, toRemove: EventListenerTypeMap[E]) => void;
20
+ emit: <E extends EventName>(eventName: E, ...data: Parameters<EventListenerTypeMap[E]>) => void;
21
21
  }
22
22
  export default EventEmitter;
@@ -1,3 +1,11 @@
1
- import './_accordion.component.scss';
2
- import type { AccordionProps } from './types';
3
- export default function Accordion({ children, className, expand, type, onExpandSection, }: AccordionProps): import("preact").JSX.Element;
1
+ import './Accordion.scss';
2
+ import type { ComponentChild, JSX } from 'preact';
3
+ export interface AccordionProps {
4
+ title: string | JSX.Element;
5
+ children: ComponentChild;
6
+ icon?: JSX.Element;
7
+ expandOnLeft?: boolean;
8
+ onToggle: (state: 'close' | 'open') => void;
9
+ className?: string;
10
+ }
11
+ export declare const Accordion: ({ title, children, icon, expandOnLeft, onToggle, className, }: AccordionProps) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import type { GuidanceProps } from './types';
2
- export default function ContextGuidance({ page, title, content, titleId, contentId, onOpen, onClose, }: GuidanceProps): import("preact").JSX.Element;
2
+ export default function ContextGuidance({ page, title, content, titleId, contentId, }: GuidanceProps): import("preact").JSX.Element;
@@ -6,5 +6,5 @@ export type MaybeLabelElementProps = (ComponentProps<'label'> & {
6
6
  }) | (ComponentProps<'div'> & {
7
7
  useLabelElement: false;
8
8
  });
9
- declare const Field: ({ className, classNameModifiers, children, dataPlaceholder, disabled, errorMessage, filled, focused, helper, inputWrapperModifiers, isLoading, isValid, label, name, onBlur, onFieldBlur, onFocus, onFocusField, showErrorIconBottom, useLabelElement, helperPosition, wrapperRef, }: FieldProps) => JSX.Element;
9
+ declare const Field: ({ className, classNameModifiers, children, dataPlaceholder, disabled, optional, errorMessage, filled, focused, helper, inputWrapperModifiers, isLoading, isValid, label, name, onBlur, onFieldBlur, onFocus, onFocusField, showErrorIconBottom, useLabelElement, helperPosition, wrapperRef, }: FieldProps) => JSX.Element;
10
10
  export default Field;
@@ -14,6 +14,7 @@ export interface FieldProps {
14
14
  classNameModifiers?: string[];
15
15
  dataPlaceholder?: string;
16
16
  disabled?: boolean;
17
+ optional?: boolean;
17
18
  dualBrandingElements?: any;
18
19
  errorMessage?: string | boolean | JSX.Element | null;
19
20
  filled?: boolean;
@@ -1,6 +1,6 @@
1
1
  import './_input-radio.scss';
2
2
  import type { ComponentProps } from 'preact';
3
- export declare const InputRadio: ({ className, ...props }: import("preact").JSX.HTMLAttributes<HTMLInputElement> & {
3
+ export declare const InputRadio: ({ className, ...props }: ComponentProps<"input"> & {
4
4
  className?: string;
5
5
  }) => import("preact").JSX.Element;
6
6
  export default InputRadio;
@@ -16,10 +16,11 @@ export interface MaskedInputTextProps extends MaskSettings {
16
16
  placeholder?: string;
17
17
  readonly?: boolean;
18
18
  disabled?: boolean;
19
+ optional?: boolean;
19
20
  classNameModifiers?: {
20
21
  field?: string[];
21
22
  input?: string[];
22
23
  };
23
24
  acceptObscuredValue?: boolean;
24
25
  }
25
- export declare const MaskedInputText: ({ value, onInput, onBlur, onMismatch: onMismatchExternal, isValid: validationIsValid, errorMessage, shouldValidate, mask, name, label, placeholder, transformOnType, readonly, disabled, formatGuidance, classNameModifiers, acceptObscuredValue, }: MaskedInputTextProps) => JSX.Element;
26
+ export declare const MaskedInputText: ({ value, onInput, onBlur, onMismatch: onMismatchExternal, isValid: validationIsValid, errorMessage, shouldValidate, mask, name, label, placeholder, transformOnType, readonly, disabled, optional, formatGuidance, classNameModifiers, acceptObscuredValue, }: MaskedInputTextProps) => JSX.Element;
@@ -56,7 +56,7 @@ export declare const companyRegistrationNumberOptions: {
56
56
  readonly applicableOnlyFor: readonly [CompanyTypesValue.PRIVATE_COMPANY, CompanyTypesValue.PUBLIC_COMPANY, CompanyTypesValue.UNLISTED_PUBLIC_COMPANY];
57
57
  }];
58
58
  };
59
- export declare const getCompanyRegistrationNumberOptions: (country: CountryCode, companyType: CompanyTypesValue | 'trust' | undefined) => readonly CompanyRegistrationNumberOption[] | undefined;
59
+ export declare const getCompanyRegistrationNumberOptions: (country: CountryCode, companyType: CompanyTypesValue | "trust" | undefined) => readonly CompanyRegistrationNumberOption[] | undefined;
60
60
  export type CompanyRegistrationNumberType = (typeof companyRegistrationNumberOptions)[keyof typeof companyRegistrationNumberOptions][number]['id'];
61
61
  export declare const individualIdNumberOptions: {
62
62
  readonly ES: readonly [{
@@ -9,4 +9,4 @@ import type { CompanyRegistrationNumberType } from './countryIdNumberTypes';
9
9
  * @param country the country of the LE
10
10
  * @param companyType the company type, e.g. `nonProfit`
11
11
  */
12
- export declare const inferCompanyRegistrationNumberType: (registrationNumber: string, country: CountryCode, companyType: CompanyTypesValue | 'trust' | undefined) => CompanyRegistrationNumberType | undefined;
12
+ export declare const inferCompanyRegistrationNumberType: (registrationNumber: string, country: CountryCode, companyType: CompanyTypesValue | "trust" | undefined) => CompanyRegistrationNumberType | undefined;
@@ -12,7 +12,9 @@ export declare enum ExperimentNames {
12
12
  ShowUnsupportedEntityType = "ShowUnsupportedEntityType",
13
13
  ShowSingPassButtonForCompanies = "ShowSingPassButtonForCompanies",
14
14
  ShowExtraTaxExemptionReasons = "ShowExtraTaxExemptionReasons",
15
- EnableCountryOfGoverningLawForUKCompanies = "EnableCountryOfGoverningLawForUKCompanies"
15
+ EnableCountryOfGoverningLawForUKCompanies = "EnableCountryOfGoverningLawForUKCompanies",
16
+ HidePayoutAccountTask = "HidePayoutAccountTask",
17
+ HidePciTask = "HidePciTask"
16
18
  }
17
19
  export type ExperimentName = `${ExperimentNames}`;
18
20
  export type Experiments = {
@@ -1,2 +1,2 @@
1
- import type { Settings } from './types';
2
- export declare const useSetting: <S extends "acceptedCountries" | "allowBankAccountFormatSelection" | "allowIntraRegionCrossBorderPayout" | "changeLegalEntityType" | "editPrefilledCountry" | "requirePciSignEcommerce" | "requirePciSignPos" | "requirePciSignEcomMoto" | "requirePciSignPosMoto" | "hideOnboardingIntroductionIndividual" | "hideOnboardingIntroductionOrganization" | "hideOnboardingIntroductionTrust" | "hideOnboardingIntroductionSoleProprietor" | "transferInstrumentLimit" | "viewOnboardingGuidance">(settingName: S) => Settings[S];
1
+ import type { SettingName, Settings } from './types';
2
+ export declare const useSetting: <S extends SettingName>(settingName: S) => Settings[S];
@@ -1,4 +1,4 @@
1
- import type { ComponentOptions } from '../../components';
1
+ import type { ComponentMap, ComponentOptions } from '../../components';
2
2
  import type { CoreOptions } from '../types';
3
3
  export declare const validateCoreOptions: (coreOptions: CoreOptions) => void;
4
- export declare const validateForComponent: <Name extends "payoutAccount" | "pci" | "taskList" | "individualDropin" | "businessDetailsDropin" | "companyDropin" | "companySearchDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "manageTransferInstrumentComponent" | "onboardingDropinComponent" | "viewVerificationStatusComponent">(componentName: Name, options: ComponentOptions<Name>) => void;
4
+ export declare const validateForComponent: <Name extends keyof ComponentMap>(componentName: Name, options: ComponentOptions<Name>) => void;
@@ -1,3 +1,3 @@
1
1
  import type { ExistingTransferInstrument } from '../../models/api/transfer-instrument';
2
2
  import type { ComponentApiRequestContext } from '../types';
3
- export declare const deleteTransferInstrument: (context: ComponentApiRequestContext, transferInstrumentId: ExistingTransferInstrument['id']) => Promise<ExistingTransferInstrument>;
3
+ export declare const deleteTransferInstrument: (context: ComponentApiRequestContext, transferInstrumentId: ExistingTransferInstrument["id"]) => Promise<ExistingTransferInstrument>;
@@ -1,5 +1,5 @@
1
1
  import type { CoreOptions } from '../types';
2
2
  export declare const setSdkToken: (token: string) => void;
3
- export declare const setSdkTokenHandler: (handler: CoreOptions['getSdkToken']) => void;
3
+ export declare const setSdkTokenHandler: (handler: CoreOptions["getSdkToken"]) => void;
4
4
  export declare const getSdkToken: () => string;
5
5
  export declare const refreshSession: () => Promise<boolean>;
@@ -1,4 +1,4 @@
1
- import type { ComponentOptions } from '../components';
1
+ import type { ComponentMap, ComponentOptions } from '../components';
2
2
  import type { BaseElement } from '../components/BaseElement';
3
3
  import { UIElement } from '../components/UIElement';
4
4
  import type { CoreOptions } from './types';
@@ -8,15 +8,15 @@ export declare class Core {
8
8
  };
9
9
  components: UIElement[];
10
10
  constructor(coreOptions: CoreOptions);
11
- create: <Name extends "payoutAccount" | "pci" | "taskList" | "individualDropin" | "businessDetailsDropin" | "companyDropin" | "companySearchDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "manageTransferInstrumentComponent" | "onboardingDropinComponent" | "viewVerificationStatusComponent">(componentName: Name, componentOptions: ComponentOptions<Name>) => UIElement;
11
+ create: <Name extends keyof ComponentMap>(componentName: Name, componentOptions: ComponentOptions<Name>) => UIElement;
12
12
  /**
13
13
  * Updates global configurations, resets the internal state and remounts each element.
14
14
  * @param options - props to update
15
15
  * @returns this - the element instance
16
16
  */
17
17
  update: (options: Partial<CoreOptions>) => this;
18
- updateLocale: ({ locale }: Pick<CoreOptions, 'locale'>) => this;
19
- updateExpiry: ({ expiry }: Pick<CoreOptions, 'expiry'>) => this;
18
+ updateLocale: ({ locale }: Pick<CoreOptions, "locale">) => this;
19
+ updateExpiry: ({ expiry }: Pick<CoreOptions, "expiry">) => this;
20
20
  /**
21
21
  * Remove the reference of a component
22
22
  * @param component - reference to the component to be removed
@@ -8,4 +8,4 @@ export type UseAsyncValidator<FormSchema> = {
8
8
  triggerAsyncValidation: TriggerAsyncValidation<FormSchema>;
9
9
  clearAsyncValidationResults: () => void;
10
10
  };
11
- export declare const useAsyncValidator: <FormSchema>(asyncRules?: Partial<{ [field in keyof FormSchema]: import("../../utils/validation/types").AsyncValidatorRule<FormSchema[field], FormSchema>; }>) => UseAsyncValidator<FormSchema>;
11
+ export declare const useAsyncValidator: <FormSchema>(asyncRules?: AsyncValidatorRules<FormSchema>) => UseAsyncValidator<FormSchema>;
@@ -20,6 +20,6 @@ interface UseBankConfigurationHandlersProps {
20
20
  */
21
21
  export declare const useBankConfigurationHandlers: ({ isEmbeddedDropin, handleGetBankVerificationVendors, bankAccountCountry, getConfiguration, legalEntityType, capabilities, }: UseBankConfigurationHandlersProps) => {
22
22
  getConfigurationData: () => Promise<GetConfigurationResponse>;
23
- getBankVerificationVendorsHandler: (country: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "EL" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KP" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "SH" | "KN" | "LC" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW", openBankingPartnerConfigId?: string) => Promise<BankVerificationVendorsResponse>;
23
+ getBankVerificationVendorsHandler: (country: CountryCode, openBankingPartnerConfigId?: string) => Promise<BankVerificationVendorsResponse>;
24
24
  };
25
25
  export {};
@@ -9,13 +9,14 @@ export interface InitOptions<FormSchema> {
9
9
  asyncValidate: TriggerAsyncValidation<FormSchema>;
10
10
  defaultData?: FormSchema;
11
11
  obscuredFields?: (keyof FormSchema)[];
12
+ optionalFields?: (keyof FormSchema)[];
12
13
  fieldProblems?: Record<keyof FormSchema, boolean>;
13
14
  formatters?: FormatRules<FormSchema>;
14
15
  }
15
16
  /**
16
17
  * Processes default data and sets initial state
17
18
  */
18
- export declare function init<FormSchema>({ schema, defaultData, fieldProblems, obscuredFields, formatters, staticValidate, asyncValidate, }: InitOptions<FormSchema>): FormState<FormSchema>;
19
+ export declare function init<FormSchema>({ schema, defaultData, fieldProblems, obscuredFields, optionalFields, formatters, staticValidate, asyncValidate, }: InitOptions<FormSchema>): FormState<FormSchema>;
19
20
  export type ReducerActionType = 'setData' | 'setValid' | 'setErrors' | 'setFieldProblems' | 'updateField' | 'mergeForm' | 'setSchema' | 'validateForm';
20
21
  export interface ReducerAction<FormSchema> {
21
22
  type: ReducerActionType;
@@ -26,13 +27,14 @@ export interface ReducerAction<FormSchema> {
26
27
  defaultData?: FormSchema;
27
28
  formValue?: FormState<FormSchema>;
28
29
  selectedSchema?: (keyof FormSchema)[];
29
- obscuredFields?: (keyof FormSchema)[];
30
30
  fieldProblems?: Record<keyof FormSchema, boolean>;
31
31
  }
32
32
  export interface GetReducerOptions<FormSchema> {
33
33
  staticValidate: TriggerStaticValidation<FormSchema>;
34
34
  asyncValidate: TriggerAsyncValidation<FormSchema>;
35
+ obscuredFields?: (keyof FormSchema)[];
36
+ optionalFields?: (keyof FormSchema)[];
35
37
  formatters?: FormatRules<FormSchema>;
36
38
  }
37
39
  export type GetReducerResults<FormSchema> = Reducer<FormState<FormSchema>, ReducerAction<FormSchema>>;
38
- export declare function reducer<FormSchema>({ staticValidate, asyncValidate, formatters, }: GetReducerOptions<FormSchema>): GetReducerResults<FormSchema>;
40
+ export declare function reducer<FormSchema>({ staticValidate, asyncValidate, obscuredFields, optionalFields, formatters, }: GetReducerOptions<FormSchema>): GetReducerResults<FormSchema>;
@@ -30,6 +30,8 @@ export interface BaseFormFieldProps<FieldSchema> {
30
30
  errors: FieldErrors<FieldSchema>;
31
31
  labels: FieldLabels<FieldSchema>;
32
32
  readonly: boolean;
33
+ shouldValidate?: boolean;
34
+ optional?: boolean;
33
35
  mask?: MaskSettings;
34
36
  helperText?: Partial<Record<keyof FieldSchema, string>>;
35
37
  guidanceText?: Partial<Record<keyof FieldSchema, string>>;
@@ -48,6 +50,7 @@ export interface FormState<FormSchema> {
48
50
  valid: Record<keyof FormSchema, boolean>;
49
51
  fieldProblems: Record<keyof FormSchema, boolean>;
50
52
  obscuredFields?: Array<keyof FormSchema>;
53
+ optionalFields?: Array<keyof FormSchema>;
51
54
  isValid?: boolean;
52
55
  dataStoreId?: string;
53
56
  local?: FormState<FormSchema> | Partial<FormState<FormSchema>>;
@@ -4,8 +4,8 @@ import type { LoadingStatus } from '../../components/internal/LoaderWrapper/cons
4
4
  export declare const useIdVerificationToken: ({ userDetails, legalEntityId, handleGetIdVerificationToken, onIdVerificationError, }: {
5
5
  userDetails: UserDetails;
6
6
  legalEntityId?: string | undefined;
7
- handleGetIdVerificationToken: Required<DropinAPIHandlers>['handleGetIdVerificationToken'];
8
- onIdVerificationError: (error: any) => void;
7
+ handleGetIdVerificationToken: Required<DropinAPIHandlers>["handleGetIdVerificationToken"];
8
+ onIdVerificationError: ((error: any) => void) | undefined;
9
9
  }) => {
10
10
  sdkToken: string;
11
11
  loadingStatus: LoadingStatus;