@adyen/kyc-components 2.67.0 → 2.68.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.
- package/dist/es/adyen-kyc-components.es.js +42 -50
- package/dist/style.css +137 -123
- package/dist/types/components/TaskList/component/TaskListItem.d.ts +1 -1
- package/dist/types/components/TaskList/types.d.ts +0 -1
- package/dist/types/components/internal/Card/Card.d.ts +1 -1
- package/dist/types/components/internal/Card/types.d.ts +0 -1
- package/dist/types/core/hooks/useAnalytics.d.ts +3 -4
- package/dist/types/core/user-events.d.ts +17 -10
- package/package.json +1 -1
|
@@ -21,10 +21,7 @@ class UserEvents {
|
|
|
21
21
|
};
|
|
22
22
|
this.baseTrackingPayload = {
|
|
23
23
|
category: "onboarding",
|
|
24
|
-
subCategory: "hosted onboarding"
|
|
25
|
-
countryCode: void 0,
|
|
26
|
-
capabilities: void 0,
|
|
27
|
-
task: void 0
|
|
24
|
+
subCategory: "hosted onboarding"
|
|
28
25
|
};
|
|
29
26
|
this.sharedEventProperties = {};
|
|
30
27
|
}
|
|
@@ -42,7 +39,7 @@ class UserEvents {
|
|
|
42
39
|
*/
|
|
43
40
|
addEvent(eventName, properties) {
|
|
44
41
|
const completeEvent = { ...this.baseTrackingPayload, ...properties };
|
|
45
|
-
this.add({ type: "add_event", name: eventName, properties:
|
|
42
|
+
this.add({ type: "add_event", name: eventName, properties: completeEvent });
|
|
46
43
|
this.notifySubscribers();
|
|
47
44
|
}
|
|
48
45
|
/**
|
|
@@ -99,7 +96,9 @@ class UserEvents {
|
|
|
99
96
|
subscribe(callback) {
|
|
100
97
|
this.subscriptions.add(callback);
|
|
101
98
|
}
|
|
102
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Sets params that are sent on every event
|
|
101
|
+
* */
|
|
103
102
|
updateBaseTrackingPayload(baseTrackingPayload) {
|
|
104
103
|
this.baseTrackingPayload = { ...this.baseTrackingPayload, ...baseTrackingPayload };
|
|
105
104
|
}
|
|
@@ -2554,6 +2553,23 @@ const Button = ({
|
|
|
2554
2553
|
);
|
|
2555
2554
|
};
|
|
2556
2555
|
const Divider = () => /* @__PURE__ */ jsx("hr", { className: "adyen-kyc-divider" });
|
|
2556
|
+
const Typography = ({
|
|
2557
|
+
el = "p",
|
|
2558
|
+
variant = "body",
|
|
2559
|
+
color = "primary",
|
|
2560
|
+
className,
|
|
2561
|
+
children,
|
|
2562
|
+
...props
|
|
2563
|
+
}) => {
|
|
2564
|
+
const TypographyElement = el;
|
|
2565
|
+
const classNames = cx(
|
|
2566
|
+
className,
|
|
2567
|
+
"adyen-kyc-typography",
|
|
2568
|
+
`adyen-kyc-typography--${color}`,
|
|
2569
|
+
`adyen-kyc-typography--${variant}`
|
|
2570
|
+
);
|
|
2571
|
+
return /* @__PURE__ */ jsx(TypographyElement, { ...props, className: classNames, children });
|
|
2572
|
+
};
|
|
2557
2573
|
const Accordion = ({
|
|
2558
2574
|
title,
|
|
2559
2575
|
children,
|
|
@@ -2580,7 +2596,7 @@ const Accordion = ({
|
|
|
2580
2596
|
/* @__PURE__ */ jsxs("summary", { className: "adyen-kyc-accordion__summary", children: [
|
|
2581
2597
|
expandOnLeft && /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: "adyen-kyc-accordion__arrow" }),
|
|
2582
2598
|
icon,
|
|
2583
|
-
title,
|
|
2599
|
+
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", children: title }),
|
|
2584
2600
|
!expandOnLeft && /* @__PURE__ */ jsx(
|
|
2585
2601
|
Icon,
|
|
2586
2602
|
{
|
|
@@ -2589,7 +2605,7 @@ const Accordion = ({
|
|
|
2589
2605
|
}
|
|
2590
2606
|
)
|
|
2591
2607
|
] }),
|
|
2592
|
-
/* @__PURE__ */ jsx("
|
|
2608
|
+
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-accordion__content", children })
|
|
2593
2609
|
]
|
|
2594
2610
|
}
|
|
2595
2611
|
);
|
|
@@ -2650,7 +2666,7 @@ const Alert = ({
|
|
|
2650
2666
|
children: [
|
|
2651
2667
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-alert__header", children: [
|
|
2652
2668
|
renderedIcon,
|
|
2653
|
-
title && /* @__PURE__ */ jsx("
|
|
2669
|
+
title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: "adyen-kyc-alert__title", children: title }),
|
|
2654
2670
|
!!actions && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-alert__actions", children: actions })
|
|
2655
2671
|
] }),
|
|
2656
2672
|
!!children && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-alert__explanation", children })
|
|
@@ -2669,7 +2685,7 @@ const Alert = ({
|
|
|
2669
2685
|
children: [
|
|
2670
2686
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-alert__header", children: [
|
|
2671
2687
|
renderedIcon,
|
|
2672
|
-
title && /* @__PURE__ */ jsx("
|
|
2688
|
+
title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: "adyen-kyc-alert__title", children: title }),
|
|
2673
2689
|
type === "dismissible" && /* @__PURE__ */ jsx(
|
|
2674
2690
|
Button,
|
|
2675
2691
|
{
|
|
@@ -4025,23 +4041,6 @@ const SelectButtonContentSingle = ({
|
|
|
4025
4041
|
] });
|
|
4026
4042
|
};
|
|
4027
4043
|
const SelectButtonContentMulti = ({ active, placeholder }) => active && active.length > 0 ? /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropdown-selected-items", children: active.map((item) => /* @__PURE__ */ jsx(Tag, { className: item.className, variant: "grey", children: (item == null ? void 0 : item.selectedOptionName) || (item == null ? void 0 : item.name) || placeholder }, item.id)) }) : /* @__PURE__ */ jsx("span", { className: "adyen-kyc-dropdown-button__text adyen-kyc-dropdown-button__text--placeholder", children: placeholder });
|
|
4028
|
-
const Typography = ({
|
|
4029
|
-
el = "p",
|
|
4030
|
-
variant = "body",
|
|
4031
|
-
color = "primary",
|
|
4032
|
-
className,
|
|
4033
|
-
children,
|
|
4034
|
-
...props
|
|
4035
|
-
}) => {
|
|
4036
|
-
const TypographyElement = el;
|
|
4037
|
-
const classNames = cx(
|
|
4038
|
-
className,
|
|
4039
|
-
"adyen-kyc-typography",
|
|
4040
|
-
`adyen-kyc-typography--${color}`,
|
|
4041
|
-
`adyen-kyc-typography--${variant}`
|
|
4042
|
-
);
|
|
4043
|
-
return /* @__PURE__ */ jsx(TypographyElement, { ...props, className: classNames, children });
|
|
4044
|
-
};
|
|
4045
4044
|
function Checkbox({
|
|
4046
4045
|
classNameModifiers = [],
|
|
4047
4046
|
label,
|
|
@@ -15143,7 +15142,7 @@ const mapLegalEntityToSoleProp = (legalEntity) => {
|
|
|
15143
15142
|
return solePropCompData;
|
|
15144
15143
|
};
|
|
15145
15144
|
const mapSolePropToLegalEntity = (data) => {
|
|
15146
|
-
var _a, _b;
|
|
15145
|
+
var _a, _b, _c, _d;
|
|
15147
15146
|
const requestObj = {
|
|
15148
15147
|
...formatObject(data, solePropApiKeyMapping)
|
|
15149
15148
|
};
|
|
@@ -15164,6 +15163,7 @@ const mapSolePropToLegalEntity = (data) => {
|
|
|
15164
15163
|
delete requestObj.soleProprietorship.vatNumber;
|
|
15165
15164
|
delete requestObj.soleProprietorship.registrationNumber;
|
|
15166
15165
|
}
|
|
15166
|
+
requestObj.soleProprietorship.doingBusinessAs = ((_c = data.solePropRegistrationDetails) == null ? void 0 : _c.dbaName) || ((_d = data.solePropRegistrationDetails) == null ? void 0 : _d.tradingName) || "";
|
|
15167
15167
|
requestObj.type = LegalEntityType.SOLE_PROPRIETORSHIP;
|
|
15168
15168
|
return requestObj;
|
|
15169
15169
|
};
|
|
@@ -21569,7 +21569,6 @@ function Card({
|
|
|
21569
21569
|
active,
|
|
21570
21570
|
disabled,
|
|
21571
21571
|
fetching,
|
|
21572
|
-
warning,
|
|
21573
21572
|
warningMessage,
|
|
21574
21573
|
title,
|
|
21575
21574
|
subTitle,
|
|
@@ -21618,7 +21617,7 @@ function Card({
|
|
|
21618
21617
|
headerButton && headerButton
|
|
21619
21618
|
] }),
|
|
21620
21619
|
children && /* @__PURE__ */ jsx("div", { role: "region", className: "adyen-kyc-card__body", children }),
|
|
21621
|
-
|
|
21620
|
+
!!warningMessage && /* @__PURE__ */ jsx(Alert, { className: "adyen-kyc-card__warning", title: warningMessage, variant: "warning" })
|
|
21622
21621
|
]
|
|
21623
21622
|
}
|
|
21624
21623
|
);
|
|
@@ -23159,7 +23158,7 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
23159
23158
|
Alert,
|
|
23160
23159
|
{
|
|
23161
23160
|
variant: "info",
|
|
23162
|
-
title:
|
|
23161
|
+
title: i18n.get("makeSureToHaveYourTrustDeed"),
|
|
23163
23162
|
className: "adyen-kyc-u-margin-bottom-16"
|
|
23164
23163
|
}
|
|
23165
23164
|
),
|
|
@@ -31634,7 +31633,6 @@ const TaskListItem = ({
|
|
|
31634
31633
|
info,
|
|
31635
31634
|
loading = false,
|
|
31636
31635
|
showErrorAlerts = "onErrorStatus",
|
|
31637
|
-
showWarningAlert = false,
|
|
31638
31636
|
warningMessage,
|
|
31639
31637
|
removeEntity,
|
|
31640
31638
|
isRemoveDisabled = false,
|
|
@@ -31660,7 +31658,6 @@ const TaskListItem = ({
|
|
|
31660
31658
|
Card,
|
|
31661
31659
|
{
|
|
31662
31660
|
stateful: onNavigateToTask && !loading && !disabled,
|
|
31663
|
-
warning: showWarningAlert,
|
|
31664
31661
|
warningMessage,
|
|
31665
31662
|
onClick: loading ? void 0 : handleNavigateToTask,
|
|
31666
31663
|
onKeyDown: handleKeys(["Enter"], handleNavigateToTask ?? noop),
|
|
@@ -31976,7 +31973,6 @@ function TaskListComponent({
|
|
|
31976
31973
|
legalEntityResponse,
|
|
31977
31974
|
getOwnDecisionMakersLegalEntityIds(legalEntityResponse)
|
|
31978
31975
|
) : TaskStatus.DETAILS_REQUIRED,
|
|
31979
|
-
showWarningAlert: showDecisionMakersWarning,
|
|
31980
31976
|
warningMessage: remediationMessages[TaskTypes.DECISION_MAKER]
|
|
31981
31977
|
}
|
|
31982
31978
|
)
|
|
@@ -39321,12 +39317,8 @@ const convertToEmbeddedEvent = (eventQueueItem, sessionData) => {
|
|
|
39321
39317
|
...sessionData
|
|
39322
39318
|
};
|
|
39323
39319
|
};
|
|
39324
|
-
const useAnalytics =
|
|
39325
|
-
|
|
39326
|
-
legalEntityId,
|
|
39327
|
-
sdkVersion,
|
|
39328
|
-
componentName
|
|
39329
|
-
}) => {
|
|
39320
|
+
const useAnalytics = ({ onUserEvent, legalEntityId, componentName }) => {
|
|
39321
|
+
const sdkVersion = "2.68.0";
|
|
39330
39322
|
const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
|
|
39331
39323
|
const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
|
|
39332
39324
|
useEffect(() => {
|
|
@@ -39352,10 +39344,7 @@ const useAnalytics = async ({
|
|
|
39352
39344
|
}
|
|
39353
39345
|
} else if (onUserEvent) {
|
|
39354
39346
|
userEvents.subscribe((data) => {
|
|
39355
|
-
onUserEvent(
|
|
39356
|
-
...data,
|
|
39357
|
-
properties: { ...sessionData, ...data.properties || {} }
|
|
39358
|
-
});
|
|
39347
|
+
onUserEvent(data);
|
|
39359
39348
|
});
|
|
39360
39349
|
}
|
|
39361
39350
|
})();
|
|
@@ -39655,11 +39644,9 @@ const ConfigurationApiProvider = ({
|
|
|
39655
39644
|
}) => {
|
|
39656
39645
|
const authContext = useAuthContext();
|
|
39657
39646
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
39658
|
-
const sdkVersion = "2.67.0";
|
|
39659
39647
|
useAnalytics({
|
|
39660
39648
|
onUserEvent,
|
|
39661
39649
|
legalEntityId: rootLegalEntityId,
|
|
39662
|
-
sdkVersion,
|
|
39663
39650
|
componentName
|
|
39664
39651
|
});
|
|
39665
39652
|
const contextValue = useMemo(
|
|
@@ -39673,7 +39660,7 @@ const ConfigurationApiProvider = ({
|
|
|
39673
39660
|
[authContext, rootLegalEntityId]
|
|
39674
39661
|
);
|
|
39675
39662
|
return /* @__PURE__ */ jsxs(ConfigurationApiContext.Provider, { value: contextValue, children: [
|
|
39676
|
-
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children:
|
|
39663
|
+
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "2.68.0" }),
|
|
39677
39664
|
children
|
|
39678
39665
|
] });
|
|
39679
39666
|
};
|
|
@@ -40289,7 +40276,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40289
40276
|
};
|
|
40290
40277
|
const copyToClipboard = async () => {
|
|
40291
40278
|
const toCopy = {
|
|
40292
|
-
sdkVersion: "2.
|
|
40279
|
+
sdkVersion: "2.68.0",
|
|
40293
40280
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40294
40281
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40295
40282
|
};
|
|
@@ -40354,7 +40341,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40354
40341
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
40355
40342
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40356
40343
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
|
|
40357
|
-
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.
|
|
40344
|
+
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.68.0" })
|
|
40358
40345
|
] }) }),
|
|
40359
40346
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40360
40347
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
|
|
@@ -40496,7 +40483,12 @@ class UIElement extends BaseElement {
|
|
|
40496
40483
|
const baseTracking = getBaseTracking(
|
|
40497
40484
|
this.props.componentProps
|
|
40498
40485
|
);
|
|
40499
|
-
userEvents.updateBaseTrackingPayload(
|
|
40486
|
+
userEvents.updateBaseTrackingPayload({
|
|
40487
|
+
...baseTracking,
|
|
40488
|
+
componentName: this.props.componentName,
|
|
40489
|
+
sdkVersion: "2.68.0",
|
|
40490
|
+
userAgent: navigator.userAgent
|
|
40491
|
+
});
|
|
40500
40492
|
return /* @__PURE__ */ jsx(SettingsProvider, { settings: this.props.settings, children: /* @__PURE__ */ jsx(
|
|
40501
40493
|
AuthProvider,
|
|
40502
40494
|
{
|
package/dist/style.css
CHANGED
|
@@ -256,9 +256,9 @@ button[disabled]:hover {
|
|
|
256
256
|
}
|
|
257
257
|
.adyen-kyc-link:focus {
|
|
258
258
|
box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-color-background-primary, #ffffff), 0 0 0 var(--adyen-sdk-focus-ring-outline, 3px) var(--adyen-sdk-focus-ring-color, rgba(0, 112, 245, 0.8));
|
|
259
|
-
border-radius: var(--adyen-sdk-border-radius-xs, 2px);
|
|
260
259
|
transition: var(--adyen-sdk-animation-duration-fast, 100ms) var(--adyen-sdk-animation-easing-standard, cubic-bezier(0.2, 0, 0.4, 0.9));
|
|
261
260
|
transition-property: box-shadow;
|
|
261
|
+
border-radius: var(--adyen-sdk-border-radius-xs, 2px);
|
|
262
262
|
}
|
|
263
263
|
.adyen-kyc-link:visited {
|
|
264
264
|
color: var(--adyen-sdk-color-link-primary, #00112c);
|
|
@@ -460,11 +460,7 @@ button[disabled]:hover {
|
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
.adyen-kyc-alert__title {
|
|
463
|
-
color: var(--adyen-sdk-color-label-primary, #00112c);
|
|
464
463
|
flex-grow: 1;
|
|
465
|
-
font-size: var(--adyen-sdk-text-body-font-size, 14px);
|
|
466
|
-
font-weight: var(--adyen-sdk-text-body-strongest-font-weight, 600);
|
|
467
|
-
line-height: var(--adyen-sdk-text-body-line-height, 20px);
|
|
468
464
|
margin-left: var(--adyen-sdk-spacer-070, 16px);
|
|
469
465
|
}
|
|
470
466
|
|
|
@@ -559,6 +555,131 @@ button[disabled]:hover {
|
|
|
559
555
|
.adyen-kyc-accordion[open] summary {
|
|
560
556
|
margin-bottom: var(--adyen-sdk-spacer-020, 4px);
|
|
561
557
|
user-select: auto;
|
|
558
|
+
}/* #region Borders */
|
|
559
|
+
/* #endregion */
|
|
560
|
+
/* for container queries */
|
|
561
|
+
/* #region Z-index */
|
|
562
|
+
/* #endregion */
|
|
563
|
+
/* #region Timing functions */
|
|
564
|
+
/* #endregion */
|
|
565
|
+
/* #region Inline components */
|
|
566
|
+
/* #endregion */
|
|
567
|
+
.adyen-kyc-typography {
|
|
568
|
+
color: var(--adyen-sdk-color-label-primary, #00112c);
|
|
569
|
+
font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
570
|
+
font-size: var(--adyen-sdk-text-body-font-size, 14px);
|
|
571
|
+
font-weight: var(--adyen-sdk-text-body-font-weight, 400);
|
|
572
|
+
line-height: var(--adyen-sdk-text-body-line-height, 20px);
|
|
573
|
+
-webkit-font-smoothing: antialiased;
|
|
574
|
+
-moz-osx-font-smoothing: grayscale;
|
|
575
|
+
display: block;
|
|
576
|
+
margin: var(--adyen-sdk-spacer-000, 0px);
|
|
577
|
+
}
|
|
578
|
+
.adyen-kyc-typography--body {
|
|
579
|
+
font-size: var(--adyen-sdk-text-body-font-size, 14px);
|
|
580
|
+
font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
581
|
+
line-height: var(--adyen-sdk-text-body-line-height, 20px);
|
|
582
|
+
letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
|
|
583
|
+
font-weight: var(--adyen-sdk-text-body-font-weight, 400);
|
|
584
|
+
}
|
|
585
|
+
.adyen-kyc-typography--body-stronger {
|
|
586
|
+
font-size: var(--adyen-sdk-text-body-font-size, 14px);
|
|
587
|
+
font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
588
|
+
line-height: var(--adyen-sdk-text-body-line-height, 20px);
|
|
589
|
+
letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
|
|
590
|
+
font-weight: var(--adyen-sdk-text-body-stronger-font-weight, 500);
|
|
591
|
+
}
|
|
592
|
+
.adyen-kyc-typography--body-strongest {
|
|
593
|
+
font-size: var(--adyen-sdk-text-body-font-size, 14px);
|
|
594
|
+
font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
595
|
+
line-height: var(--adyen-sdk-text-body-line-height, 20px);
|
|
596
|
+
letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
|
|
597
|
+
font-weight: var(--adyen-sdk-text-body-strongest-font-weight, 600);
|
|
598
|
+
}
|
|
599
|
+
.adyen-kyc-typography--caption {
|
|
600
|
+
font-size: var(--adyen-sdk-text-caption-font-size, 12px);
|
|
601
|
+
font-family: var(--adyen-sdk-text-caption-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
602
|
+
font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
|
|
603
|
+
line-height: var(--adyen-sdk-text-caption-line-height, 18px);
|
|
604
|
+
letter-spacing: var(--adyen-sdk-text-caption-letter-spacing, 0);
|
|
605
|
+
font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
|
|
606
|
+
}
|
|
607
|
+
.adyen-kyc-typography--caption-stronger {
|
|
608
|
+
font-size: var(--adyen-sdk-text-caption-font-size, 12px);
|
|
609
|
+
font-family: var(--adyen-sdk-text-caption-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
610
|
+
font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
|
|
611
|
+
line-height: var(--adyen-sdk-text-caption-line-height, 18px);
|
|
612
|
+
letter-spacing: var(--adyen-sdk-text-caption-letter-spacing, 0);
|
|
613
|
+
font-weight: var(--adyen-sdk-text-caption-stronger-font-weight, 500);
|
|
614
|
+
}
|
|
615
|
+
.adyen-kyc-typography--title {
|
|
616
|
+
font-size: var(--adyen-sdk-text-title-font-size, 16px);
|
|
617
|
+
font-family: var(--adyen-sdk-text-title-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
618
|
+
font-weight: var(--adyen-sdk-text-title-font-weight, 600);
|
|
619
|
+
line-height: var(--adyen-sdk-text-title-line-height, 26px);
|
|
620
|
+
letter-spacing: var(--adyen-sdk-text-title-letter-spacing, 0);
|
|
621
|
+
}
|
|
622
|
+
@container main (max-width: 680px) {
|
|
623
|
+
.adyen-kyc-typography--title {
|
|
624
|
+
font-size: var(--adyen-sdk-text-title-mobile-font-size, 16px);
|
|
625
|
+
line-height: var(--adyen-sdk-text-title-mobile-line-height, 26px);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
.adyen-kyc-typography--title-m {
|
|
629
|
+
font-size: var(--adyen-sdk-text-title-m-font-size, 20px);
|
|
630
|
+
font-family: var(--adyen-sdk-text-title-m-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
631
|
+
font-weight: var(--adyen-sdk-text-title-m-font-weight, 600);
|
|
632
|
+
line-height: var(--adyen-sdk-text-title-m-line-height, 30px);
|
|
633
|
+
letter-spacing: var(--adyen-sdk-text-title-m-letter-spacing, 0);
|
|
634
|
+
}
|
|
635
|
+
@container main (max-width: 680px) {
|
|
636
|
+
.adyen-kyc-typography--title-m {
|
|
637
|
+
font-size: var(--adyen-sdk-text-title-m-mobile-font-size, 18px);
|
|
638
|
+
line-height: var(--adyen-sdk-text-title-m-mobile-line-height, 28px);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
.adyen-kyc-typography--title-l {
|
|
642
|
+
font-size: var(--adyen-sdk-text-title-l-font-size, 24px);
|
|
643
|
+
font-family: var(--adyen-sdk-text-title-l-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
644
|
+
font-weight: var(--adyen-sdk-text-title-l-font-weight, 600);
|
|
645
|
+
line-height: var(--adyen-sdk-text-title-l-line-height, 34px);
|
|
646
|
+
letter-spacing: var(--adyen-sdk-text-title-l-letter-spacing, 0);
|
|
647
|
+
}
|
|
648
|
+
@container main (max-width: 680px) {
|
|
649
|
+
.adyen-kyc-typography--title-l {
|
|
650
|
+
font-size: var(--adyen-sdk-text-title-l-mobile-font-size, 20px);
|
|
651
|
+
line-height: var(--adyen-sdk-text-title-l-mobile-line-height, 30px);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
.adyen-kyc-typography--primary {
|
|
655
|
+
color: var(--adyen-sdk-color-label-primary, #00112c);
|
|
656
|
+
}
|
|
657
|
+
.adyen-kyc-typography--secondary {
|
|
658
|
+
color: var(--adyen-sdk-color-label-secondary, #5c687c);
|
|
659
|
+
}
|
|
660
|
+
.adyen-kyc-typography--tertiary {
|
|
661
|
+
color: var(--adyen-sdk-color-label-tertiary, #8d95a3);
|
|
662
|
+
}
|
|
663
|
+
.adyen-kyc-typography--disabled {
|
|
664
|
+
color: var(--adyen-sdk-color-label-disabled, #8d95a3);
|
|
665
|
+
}
|
|
666
|
+
.adyen-kyc-typography--success {
|
|
667
|
+
color: var(--adyen-sdk-color-label-success, #07893c);
|
|
668
|
+
}
|
|
669
|
+
.adyen-kyc-typography--warning {
|
|
670
|
+
color: var(--adyen-sdk-color-label-warning, #b06300);
|
|
671
|
+
}
|
|
672
|
+
.adyen-kyc-typography--critical {
|
|
673
|
+
color: var(--adyen-sdk-color-label-critical, #e22d2d);
|
|
674
|
+
}
|
|
675
|
+
.adyen-kyc-typography--highlight {
|
|
676
|
+
color: var(--adyen-sdk-color-label-highlight, #0070f5);
|
|
677
|
+
}
|
|
678
|
+
.adyen-kyc-typography--inverse-primary {
|
|
679
|
+
color: var(--adyen-sdk-color-label-inverse-primary, #ffffff);
|
|
680
|
+
}
|
|
681
|
+
.adyen-kyc-typography--inverse-secondary {
|
|
682
|
+
color: var(--adyen-sdk-color-label-inverse-secondary, #9ea6b1);
|
|
562
683
|
}.adyen-kyc-individual .adyen-kyc-form {
|
|
563
684
|
margin-bottom: var(--adyen-sdk-spacer-070, 16px);
|
|
564
685
|
}.adyen-kyc-field {
|
|
@@ -1015,123 +1136,7 @@ button[disabled]:hover {
|
|
|
1015
1136
|
/* #endregion */
|
|
1016
1137
|
/* #region Inline components */
|
|
1017
1138
|
/* #endregion */
|
|
1018
|
-
.adyen-kyc-
|
|
1019
|
-
color: var(--adyen-sdk-color-label-primary, #00112c);
|
|
1020
|
-
font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
1021
|
-
font-size: var(--adyen-sdk-text-body-font-size, 14px);
|
|
1022
|
-
font-weight: var(--adyen-sdk-text-body-font-weight, 400);
|
|
1023
|
-
line-height: var(--adyen-sdk-text-body-line-height, 20px);
|
|
1024
|
-
-webkit-font-smoothing: antialiased;
|
|
1025
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1026
|
-
display: block;
|
|
1027
|
-
margin: var(--adyen-sdk-spacer-000, 0px);
|
|
1028
|
-
}
|
|
1029
|
-
.adyen-kyc-typography--body {
|
|
1030
|
-
font-size: var(--adyen-sdk-text-body-font-size, 14px);
|
|
1031
|
-
font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
1032
|
-
line-height: var(--adyen-sdk-text-body-line-height, 20px);
|
|
1033
|
-
letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
|
|
1034
|
-
font-weight: var(--adyen-sdk-text-body-font-weight, 400);
|
|
1035
|
-
}
|
|
1036
|
-
.adyen-kyc-typography--body-stronger {
|
|
1037
|
-
font-size: var(--adyen-sdk-text-body-font-size, 14px);
|
|
1038
|
-
font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
1039
|
-
line-height: var(--adyen-sdk-text-body-line-height, 20px);
|
|
1040
|
-
letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
|
|
1041
|
-
font-weight: var(--adyen-sdk-text-body-stronger-font-weight, 500);
|
|
1042
|
-
}
|
|
1043
|
-
.adyen-kyc-typography--body-strongest {
|
|
1044
|
-
font-size: var(--adyen-sdk-text-body-font-size, 14px);
|
|
1045
|
-
font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
1046
|
-
line-height: var(--adyen-sdk-text-body-line-height, 20px);
|
|
1047
|
-
letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
|
|
1048
|
-
font-weight: var(--adyen-sdk-text-body-strongest-font-weight, 600);
|
|
1049
|
-
}
|
|
1050
|
-
.adyen-kyc-typography--caption {
|
|
1051
|
-
font-size: var(--adyen-sdk-text-caption-font-size, 12px);
|
|
1052
|
-
font-family: var(--adyen-sdk-text-caption-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
1053
|
-
font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
|
|
1054
|
-
line-height: var(--adyen-sdk-text-caption-line-height, 18px);
|
|
1055
|
-
letter-spacing: var(--adyen-sdk-text-caption-letter-spacing, 0);
|
|
1056
|
-
font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
|
|
1057
|
-
}
|
|
1058
|
-
.adyen-kyc-typography--caption-stronger {
|
|
1059
|
-
font-size: var(--adyen-sdk-text-caption-font-size, 12px);
|
|
1060
|
-
font-family: var(--adyen-sdk-text-caption-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
1061
|
-
font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
|
|
1062
|
-
line-height: var(--adyen-sdk-text-caption-line-height, 18px);
|
|
1063
|
-
letter-spacing: var(--adyen-sdk-text-caption-letter-spacing, 0);
|
|
1064
|
-
font-weight: var(--adyen-sdk-text-caption-stronger-font-weight, 500);
|
|
1065
|
-
}
|
|
1066
|
-
.adyen-kyc-typography--title {
|
|
1067
|
-
font-size: var(--adyen-sdk-text-title-font-size, 16px);
|
|
1068
|
-
font-family: var(--adyen-sdk-text-title-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
1069
|
-
font-weight: var(--adyen-sdk-text-title-font-weight, 600);
|
|
1070
|
-
line-height: var(--adyen-sdk-text-title-line-height, 26px);
|
|
1071
|
-
letter-spacing: var(--adyen-sdk-text-title-letter-spacing, 0);
|
|
1072
|
-
}
|
|
1073
|
-
@container main (max-width: 680px) {
|
|
1074
|
-
.adyen-kyc-typography--title {
|
|
1075
|
-
font-size: var(--adyen-sdk-text-title-mobile-font-size, 16px);
|
|
1076
|
-
line-height: var(--adyen-sdk-text-title-mobile-line-height, 26px);
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
.adyen-kyc-typography--title-m {
|
|
1080
|
-
font-size: var(--adyen-sdk-text-title-m-font-size, 20px);
|
|
1081
|
-
font-family: var(--adyen-sdk-text-title-m-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
1082
|
-
font-weight: var(--adyen-sdk-text-title-m-font-weight, 600);
|
|
1083
|
-
line-height: var(--adyen-sdk-text-title-m-line-height, 30px);
|
|
1084
|
-
letter-spacing: var(--adyen-sdk-text-title-m-letter-spacing, 0);
|
|
1085
|
-
}
|
|
1086
|
-
@container main (max-width: 680px) {
|
|
1087
|
-
.adyen-kyc-typography--title-m {
|
|
1088
|
-
font-size: var(--adyen-sdk-text-title-m-mobile-font-size, 18px);
|
|
1089
|
-
line-height: var(--adyen-sdk-text-title-m-mobile-line-height, 28px);
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
.adyen-kyc-typography--title-l {
|
|
1093
|
-
font-size: var(--adyen-sdk-text-title-l-font-size, 24px);
|
|
1094
|
-
font-family: var(--adyen-sdk-text-title-l-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
|
|
1095
|
-
font-weight: var(--adyen-sdk-text-title-l-font-weight, 600);
|
|
1096
|
-
line-height: var(--adyen-sdk-text-title-l-line-height, 34px);
|
|
1097
|
-
letter-spacing: var(--adyen-sdk-text-title-l-letter-spacing, 0);
|
|
1098
|
-
}
|
|
1099
|
-
@container main (max-width: 680px) {
|
|
1100
|
-
.adyen-kyc-typography--title-l {
|
|
1101
|
-
font-size: var(--adyen-sdk-text-title-l-mobile-font-size, 20px);
|
|
1102
|
-
line-height: var(--adyen-sdk-text-title-l-mobile-line-height, 30px);
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
.adyen-kyc-typography--primary {
|
|
1106
|
-
color: var(--adyen-sdk-color-label-primary, #00112c);
|
|
1107
|
-
}
|
|
1108
|
-
.adyen-kyc-typography--secondary {
|
|
1109
|
-
color: var(--adyen-sdk-color-label-secondary, #5c687c);
|
|
1110
|
-
}
|
|
1111
|
-
.adyen-kyc-typography--tertiary {
|
|
1112
|
-
color: var(--adyen-sdk-color-label-tertiary, #8d95a3);
|
|
1113
|
-
}
|
|
1114
|
-
.adyen-kyc-typography--disabled {
|
|
1115
|
-
color: var(--adyen-sdk-color-label-disabled, #8d95a3);
|
|
1116
|
-
}
|
|
1117
|
-
.adyen-kyc-typography--success {
|
|
1118
|
-
color: var(--adyen-sdk-color-label-success, #07893c);
|
|
1119
|
-
}
|
|
1120
|
-
.adyen-kyc-typography--warning {
|
|
1121
|
-
color: var(--adyen-sdk-color-label-warning, #b06300);
|
|
1122
|
-
}
|
|
1123
|
-
.adyen-kyc-typography--critical {
|
|
1124
|
-
color: var(--adyen-sdk-color-label-critical, #e22d2d);
|
|
1125
|
-
}
|
|
1126
|
-
.adyen-kyc-typography--highlight {
|
|
1127
|
-
color: var(--adyen-sdk-color-label-highlight, #0070f5);
|
|
1128
|
-
}
|
|
1129
|
-
.adyen-kyc-typography--inverse-primary {
|
|
1130
|
-
color: var(--adyen-sdk-color-label-inverse-primary, #ffffff);
|
|
1131
|
-
}
|
|
1132
|
-
.adyen-kyc-typography--inverse-secondary {
|
|
1133
|
-
color: var(--adyen-sdk-color-label-inverse-secondary, #9ea6b1);
|
|
1134
|
-
}.adyen-kyc-checkbox {
|
|
1139
|
+
.adyen-kyc-checkbox {
|
|
1135
1140
|
display: block;
|
|
1136
1141
|
}
|
|
1137
1142
|
.adyen-kyc-checkbox__label {
|
|
@@ -1160,6 +1165,11 @@ button[disabled]:hover {
|
|
|
1160
1165
|
/* Check */
|
|
1161
1166
|
/* Box */
|
|
1162
1167
|
}
|
|
1168
|
+
.adyen-kyc-checkbox__input:focus-visible + .adyen-kyc-checkbox__label::after {
|
|
1169
|
+
box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-color-background-primary, #ffffff), 0 0 0 var(--adyen-sdk-focus-ring-outline, 3px) var(--adyen-sdk-focus-ring-color, rgba(0, 112, 245, 0.8));
|
|
1170
|
+
transition: var(--adyen-sdk-animation-duration-fast, 100ms) var(--adyen-sdk-animation-easing-standard, cubic-bezier(0.2, 0, 0.4, 0.9));
|
|
1171
|
+
transition-property: box-shadow;
|
|
1172
|
+
}
|
|
1163
1173
|
.adyen-kyc-checkbox__input:hover + .adyen-kyc-checkbox__label::after {
|
|
1164
1174
|
background-color: var(--adyen-sdk-color-background-primary-hover, #f7f7f8);
|
|
1165
1175
|
}
|
|
@@ -1498,7 +1508,6 @@ button[disabled]:hover {
|
|
|
1498
1508
|
}
|
|
1499
1509
|
.adyen-kyc-input-radio__input:focus {
|
|
1500
1510
|
box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-color-background-primary, #ffffff), 0 0 0 var(--adyen-sdk-focus-ring-outline, 3px) var(--adyen-sdk-focus-ring-color, rgba(0, 112, 245, 0.8));
|
|
1501
|
-
border-radius: var(--adyen-sdk-border-radius-xs, 2px);
|
|
1502
1511
|
transition: var(--adyen-sdk-animation-duration-fast, 100ms) var(--adyen-sdk-animation-easing-standard, cubic-bezier(0.2, 0, 0.4, 0.9));
|
|
1503
1512
|
transition-property: box-shadow;
|
|
1504
1513
|
}
|
|
@@ -2323,6 +2332,11 @@ fieldset {
|
|
|
2323
2332
|
z-index: 2;
|
|
2324
2333
|
box-shadow: var(--adyen-sdk-shadow-medium, 0px 6px 12px rgba(0, 17, 44, 0.08), 0px 2px 4px rgba(0, 17, 44, 0.04));
|
|
2325
2334
|
}
|
|
2335
|
+
.adyen-kyc-card.adyen-kyc-card--stateful:focus-visible {
|
|
2336
|
+
box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-color-background-primary, #ffffff), 0 0 0 var(--adyen-sdk-focus-ring-outline, 3px) var(--adyen-sdk-focus-ring-color, rgba(0, 112, 245, 0.8));
|
|
2337
|
+
transition: var(--adyen-sdk-animation-duration-fast, 100ms) var(--adyen-sdk-animation-easing-standard, cubic-bezier(0.2, 0, 0.4, 0.9));
|
|
2338
|
+
transition-property: box-shadow;
|
|
2339
|
+
}
|
|
2326
2340
|
|
|
2327
2341
|
.adyen-kyc-card.adyen-kyc-card--active {
|
|
2328
2342
|
border-color: var(--adyen-sdk-color-outline-primary, #dbdee2);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../TaskListItem.scss';
|
|
2
2
|
import type { TaskListItemProps } from '../types';
|
|
3
|
-
declare const TaskListItem: ({ titleKey, title, icon, status, statusLabel, onNavigateToTask, disabled, problems, downloadHandler, info, loading, showErrorAlerts,
|
|
3
|
+
declare const TaskListItem: ({ titleKey, title, icon, status, statusLabel, onNavigateToTask, disabled, problems, downloadHandler, info, loading, showErrorAlerts, warningMessage, removeEntity, isRemoveDisabled, handleIsRemoveDisabled, testId, enableTracking, }: TaskListItemProps) => import("preact").JSX.Element;
|
|
4
4
|
export default TaskListItem;
|
|
@@ -85,7 +85,6 @@ export interface TaskListItemProps extends TaskStatusProps {
|
|
|
85
85
|
onNavigateToTask?: () => void;
|
|
86
86
|
loading?: boolean;
|
|
87
87
|
showErrorAlerts?: 'onErrorStatus' | 'always';
|
|
88
|
-
showWarningAlert?: boolean;
|
|
89
88
|
warningMessage?: string;
|
|
90
89
|
removeEntity?: () => void;
|
|
91
90
|
isRemoveDisabled?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './_card.component.scss';
|
|
2
2
|
import type { JSX } from 'preact';
|
|
3
3
|
import type { CardProps } from './types';
|
|
4
|
-
export declare function Card({ className, children, stateful, active, disabled, fetching,
|
|
4
|
+
export declare function Card({ className, children, stateful, active, disabled, fetching, warningMessage, title, subTitle, headerButton, background, onClick, onKeyDown, }: CardProps): JSX.Element;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import type { ComponentMap } from '../../components';
|
|
2
2
|
import type { EmbeddedAnalyticsSessionRequest } from '../models/api/analytics';
|
|
3
|
-
import type { AnalyticsEventPayload,
|
|
3
|
+
import type { AnalyticsEventPayload, EventQueueItem, EventType, MixpanelProperty, UserEventCallback } from '../user-events';
|
|
4
4
|
export type UseAnalyticsProps = {
|
|
5
5
|
legalEntityId: string;
|
|
6
6
|
onUserEvent?: UserEventCallback;
|
|
7
|
-
sdkVersion: string;
|
|
8
7
|
componentName: keyof ComponentMap;
|
|
9
8
|
};
|
|
10
9
|
type EmbeddedEventItem = {
|
|
11
10
|
eventType: EventType;
|
|
12
11
|
eventName: string;
|
|
13
|
-
eventData: AnalyticsEventPayload | Record<string,
|
|
12
|
+
eventData: AnalyticsEventPayload | Record<string, MixpanelProperty>;
|
|
14
13
|
};
|
|
15
14
|
export declare const convertToEmbeddedEvent: (eventQueueItem: EventQueueItem, sessionData: EmbeddedAnalyticsSessionRequest) => EmbeddedEventItem & EmbeddedAnalyticsSessionRequest;
|
|
16
|
-
export declare const useAnalytics: ({ onUserEvent, legalEntityId,
|
|
15
|
+
export declare const useAnalytics: ({ onUserEvent, legalEntityId, componentName }: UseAnalyticsProps) => void;
|
|
17
16
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SetOptional } from 'type-fest';
|
|
2
2
|
import type { TaskTypes } from '../components/TaskList/types';
|
|
3
3
|
import type { LegalEntityType } from './models/api/legal-entity-type';
|
|
4
|
-
export type
|
|
4
|
+
export type MixpanelProperty = string | number | boolean | any[] | null | undefined;
|
|
5
5
|
/**
|
|
6
6
|
* Level of the funnel that is relevant for this event
|
|
7
7
|
*/
|
|
@@ -13,14 +13,17 @@ export type ActionType = 'start' | 'submit' | 'save' | 'add' | 'edit' | 'remove'
|
|
|
13
13
|
/**
|
|
14
14
|
* The base event properties that are sent with every event
|
|
15
15
|
*/
|
|
16
|
-
type BaseEventProperties = {
|
|
16
|
+
export type BaseEventProperties = {
|
|
17
17
|
category: 'onboarding';
|
|
18
18
|
subCategory: 'hosted onboarding';
|
|
19
|
-
countryCode?: string;
|
|
20
19
|
capabilities?: string[];
|
|
20
|
+
componentName?: string;
|
|
21
|
+
countryCode?: string;
|
|
21
22
|
entityType?: LegalEntityType;
|
|
22
|
-
task?: TaskTypes;
|
|
23
23
|
locale?: string;
|
|
24
|
+
sdkVersion?: string;
|
|
25
|
+
task?: TaskTypes;
|
|
26
|
+
userAgent?: string;
|
|
24
27
|
};
|
|
25
28
|
/**
|
|
26
29
|
* Additional event properties
|
|
@@ -34,14 +37,14 @@ export interface AdditionalEventProperties {
|
|
|
34
37
|
returnType?: 'backend' | 'validation' | (string & {});
|
|
35
38
|
returnValue?: string | string[];
|
|
36
39
|
label?: string;
|
|
37
|
-
[key: string]:
|
|
40
|
+
[key: string]: MixpanelProperty;
|
|
38
41
|
}
|
|
39
42
|
/**
|
|
40
43
|
* Name of the tracked event
|
|
41
44
|
* Can be either a custom name or one of the pre-defined values
|
|
42
45
|
*/
|
|
43
46
|
export type EventName = 'Clicked button' | 'Clicked accordion' | 'Success' | 'Encountered error' | 'Landed on page' | 'Interacted with form field' | (string & {});
|
|
44
|
-
export type AnalyticsEventPayload = BaseEventProperties & AdditionalEventProperties;
|
|
47
|
+
export type AnalyticsEventPayload = Required<BaseEventProperties> & AdditionalEventProperties;
|
|
45
48
|
export type EventType = 'add_event' | 'start_event';
|
|
46
49
|
export type EventQueueItem = {
|
|
47
50
|
type: EventType;
|
|
@@ -57,7 +60,7 @@ declare class UserEvents {
|
|
|
57
60
|
/** properties not set with every event but that may be shared between some events
|
|
58
61
|
* ex. `page` value for `Interacted with form field` events
|
|
59
62
|
*/
|
|
60
|
-
sharedEventProperties
|
|
63
|
+
private sharedEventProperties;
|
|
61
64
|
constructor();
|
|
62
65
|
protected add(...args: EventQueueItem[]): void;
|
|
63
66
|
protected notifySubscribers(): void;
|
|
@@ -99,10 +102,14 @@ declare class UserEvents {
|
|
|
99
102
|
* ```
|
|
100
103
|
*/
|
|
101
104
|
subscribe(callback: UserEventCallback): void;
|
|
102
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* Sets params that are sent on every event
|
|
107
|
+
* */
|
|
103
108
|
updateBaseTrackingPayload(baseTrackingPayload: Partial<BaseEventProperties>): void;
|
|
104
|
-
/**
|
|
105
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Sets params that may be shared between events
|
|
111
|
+
* */
|
|
112
|
+
updateSharedEventProperties: (props: Record<string, MixpanelProperty>) => void;
|
|
106
113
|
/**
|
|
107
114
|
* Removes a subscribed callback
|
|
108
115
|
*/
|