@adyen/kyc-components 2.17.0 → 2.17.1
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 +28 -24
- package/dist/style.css +4 -6
- package/dist/types/components/TaskList/component/TaskListItem.d.ts +1 -1
- package/dist/types/components/TaskList/types.d.ts +1 -0
- package/dist/types/components/internal/Card/Card.d.ts +1 -1
- package/dist/types/components/internal/Card/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -22371,8 +22371,8 @@ function useDataMissingRemediations({
|
|
|
22371
22371
|
i18n
|
|
22372
22372
|
} = useI18nContext();
|
|
22373
22373
|
const decisionMakersRemediationMessage = useMemo(() => {
|
|
22374
|
-
var _a, _b;
|
|
22375
|
-
const remediationCodes = (_b = (_a = problems[EntityType.LEGAL_ENTITY]) == null ? void 0 : _a[legalEntityId]) == null ? void 0 : _b.missingData.reduce((remediations, error) => {
|
|
22374
|
+
var _a, _b, _c;
|
|
22375
|
+
const remediationCodes = (_c = (_b = (_a = problems[EntityType.LEGAL_ENTITY]) == null ? void 0 : _a[legalEntityId]) == null ? void 0 : _b.missingData) == null ? void 0 : _c.reduce((remediations, error) => {
|
|
22376
22376
|
const remediation = DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING[error.code];
|
|
22377
22377
|
return remediation ? [...remediations, remediation] : remediations;
|
|
22378
22378
|
}, []);
|
|
@@ -22577,6 +22577,8 @@ function Card({
|
|
|
22577
22577
|
stateful,
|
|
22578
22578
|
active,
|
|
22579
22579
|
disabled,
|
|
22580
|
+
warning,
|
|
22581
|
+
warningMessage,
|
|
22580
22582
|
title,
|
|
22581
22583
|
subTitle,
|
|
22582
22584
|
onClick,
|
|
@@ -22613,6 +22615,11 @@ function Card({
|
|
|
22613
22615
|
}), jsx("main", {
|
|
22614
22616
|
className: "adl-card__body",
|
|
22615
22617
|
children
|
|
22618
|
+
}), warning && jsx(Alert, {
|
|
22619
|
+
className: "adl-card__warning",
|
|
22620
|
+
title: warningMessage,
|
|
22621
|
+
hasCloseButton: false,
|
|
22622
|
+
type: AlertTypes.WARNING
|
|
22616
22623
|
})]
|
|
22617
22624
|
});
|
|
22618
22625
|
}
|
|
@@ -22960,6 +22967,7 @@ const DecisionMakersComponent = ({
|
|
|
22960
22967
|
return mappedDecisionMakers2;
|
|
22961
22968
|
}, {});
|
|
22962
22969
|
const uniqueDecisionMakers = mappedDecisionMakers ? Object.values(mappedDecisionMakers) : [];
|
|
22970
|
+
const showWarning = Boolean(remediationMessages.DECISION_MAKER && uniqueDecisionMakers.length);
|
|
22963
22971
|
const uniqueDecisionMakersPerType = (roleType) => uniqueDecisionMakers.filter(({
|
|
22964
22972
|
types
|
|
22965
22973
|
}) => types.includes(roleType)).length;
|
|
@@ -23050,6 +23058,11 @@ const DecisionMakersComponent = ({
|
|
|
23050
23058
|
}),
|
|
23051
23059
|
titleId: "whatIsTheDifferenceBetweenTheseRoles",
|
|
23052
23060
|
contentId: "differenceBetweenAnOwnerControllingPersonAndSignatory"
|
|
23061
|
+
}), showWarning && jsx(Alert, {
|
|
23062
|
+
className: "adl-decision-makers__warning",
|
|
23063
|
+
title: remediationMessages.DECISION_MAKER,
|
|
23064
|
+
hasCloseButton: false,
|
|
23065
|
+
type: AlertTypes.WARNING
|
|
23053
23066
|
}), (uniqueDecisionMakers == null ? void 0 : uniqueDecisionMakers.length) > 0 ? jsx(CardGroup, {
|
|
23054
23067
|
children: uniqueDecisionMakers.map((decisionMaker2) => jsx(EntityAssociation, {
|
|
23055
23068
|
types: decisionMaker2.types,
|
|
@@ -23063,12 +23076,7 @@ const DecisionMakersComponent = ({
|
|
|
23063
23076
|
isRemoveDisabled,
|
|
23064
23077
|
handleIsRemoveDisabled: setIsRemoveDisabled
|
|
23065
23078
|
}, decisionMaker2.reference))
|
|
23066
|
-
}) : null,
|
|
23067
|
-
className: "adl-decision-makers__warning",
|
|
23068
|
-
title: remediationMessages.DECISION_MAKER,
|
|
23069
|
-
hasCloseButton: false,
|
|
23070
|
-
type: AlertTypes.WARNING
|
|
23071
|
-
}), jsx(Button, {
|
|
23079
|
+
}) : null, jsx(Button, {
|
|
23072
23080
|
secondary: true,
|
|
23073
23081
|
className: cx("adl-decision-makers__add", {
|
|
23074
23082
|
"adl-decision-makers__add--more": (uniqueDecisionMakers == null ? void 0 : uniqueDecisionMakers.length) > 0
|
|
@@ -23451,6 +23459,7 @@ const TaskListItem = ({
|
|
|
23451
23459
|
loading: loading2 = false,
|
|
23452
23460
|
showErrorAlerts = "onErrorStatus",
|
|
23453
23461
|
showWarningAlert = false,
|
|
23462
|
+
warningMessage,
|
|
23454
23463
|
removeEntity,
|
|
23455
23464
|
isRemoveDisabled = false,
|
|
23456
23465
|
handleIsRemoveDisabled
|
|
@@ -23459,11 +23468,11 @@ const TaskListItem = ({
|
|
|
23459
23468
|
const [isStatusRemoving, setIsStatusRemoving] = useState(false);
|
|
23460
23469
|
return jsx(Card, {
|
|
23461
23470
|
stateful: onNavigateToTask && !loading2 && !disabled,
|
|
23471
|
+
warning: showWarningAlert,
|
|
23472
|
+
warningMessage,
|
|
23462
23473
|
onClick: loading2 ? void 0 : onNavigateToTask,
|
|
23463
23474
|
onKeyDown: handleKeys(["Enter"], onNavigateToTask ?? noop),
|
|
23464
|
-
className:
|
|
23465
|
-
"adyen-task--warning": showWarningAlert
|
|
23466
|
-
}),
|
|
23475
|
+
className: "adyen-task",
|
|
23467
23476
|
disabled,
|
|
23468
23477
|
children: jsxs(LoaderWrapper, {
|
|
23469
23478
|
status: loading2 ? "loading" : "success",
|
|
@@ -23634,6 +23643,7 @@ function TaskListComponent({
|
|
|
23634
23643
|
const hasServiceAgreementSigners = legalEntityResponse.type === LegalEntityType.ORGANIZATION && getOwnSignatories(legalEntityResponse).length || legalEntityResponse.type === LegalEntityType.INDIVIDUAL && !!(legalEntityResponse == null ? void 0 : legalEntityResponse.individual);
|
|
23635
23644
|
const areServiceAgreementTasksDisabled = !hasServiceAgreementSigners;
|
|
23636
23645
|
const showContractTasks = hasContractTasks && (showPciTask || showServiceAgreementTask);
|
|
23646
|
+
const showDecisionMakersWarning = Boolean(getOwnDecisionMakersLegalEntityIds(legalEntityResponse).length && remediationMessages.DECISION_MAKER);
|
|
23637
23647
|
const handleOnNavigateToTaskReview = () => onNavigateToTask(TaskTypes.REVIEW);
|
|
23638
23648
|
const handleOnNavigateToTaskIndividual = () => onNavigateToTask(TaskTypes.INDIVIDUAL);
|
|
23639
23649
|
const handleOnNavigateToTaskCompany = () => onNavigateToTask(TaskTypes.COMPANY);
|
|
@@ -23700,19 +23710,13 @@ function TaskListComponent({
|
|
|
23700
23710
|
title: hasTrust ? i18n.get("companyTrusteeDetails") : i18n.get("companyDetails"),
|
|
23701
23711
|
status: getTaskStatus(EntityType.LEGAL_ENTITY, capabilityProblems, legalEntityResponse, [legalEntityResponse.id]),
|
|
23702
23712
|
problems: (_f = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _f[legalEntityResponse.id]
|
|
23703
|
-
}), tasks.includes(TaskTypes.DECISION_MAKER) &&
|
|
23704
|
-
|
|
23705
|
-
|
|
23706
|
-
|
|
23707
|
-
|
|
23708
|
-
|
|
23709
|
-
|
|
23710
|
-
}), remediationMessages.DECISION_MAKER && jsx(Alert, {
|
|
23711
|
-
className: "adyen-task-list__warning",
|
|
23712
|
-
title: remediationMessages.DECISION_MAKER,
|
|
23713
|
-
hasCloseButton: false,
|
|
23714
|
-
type: AlertTypes.WARNING
|
|
23715
|
-
})]
|
|
23713
|
+
}), tasks.includes(TaskTypes.DECISION_MAKER) && jsx(TaskListItem, {
|
|
23714
|
+
onNavigateToTask: handleOnNavigateToTaskDecisionMaker,
|
|
23715
|
+
icon: "decision-maker",
|
|
23716
|
+
title: i18n.get("decisionMakers"),
|
|
23717
|
+
status: hasMinRequiredDecisionMakerCount(legalEntityResponse) ? getTaskStatus(EntityType.LEGAL_ENTITY, capabilityProblems, legalEntityResponse, getOwnDecisionMakersLegalEntityIds(legalEntityResponse)) : TaskStatus.DETAILS_REQUIRED,
|
|
23718
|
+
showWarningAlert: showDecisionMakersWarning,
|
|
23719
|
+
warningMessage: remediationMessages[TaskTypes.DECISION_MAKER]
|
|
23716
23720
|
})]
|
|
23717
23721
|
}), hasTrust && jsxs(TaskListGroup, {
|
|
23718
23722
|
title: i18n.get("trustDetailsDescription"),
|
package/dist/style.css
CHANGED
|
@@ -76621,6 +76621,7 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
|
|
|
76621
76621
|
}
|
|
76622
76622
|
.adl-decision-makers__warning {
|
|
76623
76623
|
margin-bottom: 24px;
|
|
76624
|
+
border-radius: 4px;
|
|
76624
76625
|
}
|
|
76625
76626
|
.adl-decision-makers__add--more.adl-button.adl-button--secondary {
|
|
76626
76627
|
background-color: transparent;
|
|
@@ -84437,6 +84438,9 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
|
|
|
84437
84438
|
}
|
|
84438
84439
|
.adl-card__body + .adl-card__footer {
|
|
84439
84440
|
margin-top: -16px;
|
|
84441
|
+
}
|
|
84442
|
+
.adl-card__warning {
|
|
84443
|
+
border-radius: 0 0 4px 4px;
|
|
84440
84444
|
}/* #region Spacing */
|
|
84441
84445
|
/* #endregion */
|
|
84442
84446
|
/* #region Colors */
|
|
@@ -90297,17 +90301,11 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
|
|
|
90297
90301
|
.adl-card.adl-add-payout .adl-card__body {
|
|
90298
90302
|
display: inline-flex;
|
|
90299
90303
|
}
|
|
90300
|
-
.adyen-task--warning {
|
|
90301
|
-
border-radius: 0;
|
|
90302
|
-
}
|
|
90303
90304
|
.adyen-task-list__nav {
|
|
90304
90305
|
text-align: right;
|
|
90305
90306
|
padding: 16px;
|
|
90306
90307
|
padding-top: 0;
|
|
90307
90308
|
}
|
|
90308
|
-
.adyen-task-list__warning {
|
|
90309
|
-
border-radius: 0 0 8px 8px;
|
|
90310
|
-
}
|
|
90311
90309
|
.adyen-task-list__heading {
|
|
90312
90310
|
padding: 16px;
|
|
90313
90311
|
}/* #region Spacing */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../TaskListItem.scss';
|
|
2
2
|
import { TaskListItemProps } from '../types';
|
|
3
|
-
declare const TaskListItem: ({ title, tagline, icon, status, onNavigateToTask, disabled, problems, downloadHandler, info, loading, showErrorAlerts, showWarningAlert, removeEntity, isRemoveDisabled, handleIsRemoveDisabled, }: TaskListItemProps) => import("preact").JSX.Element;
|
|
3
|
+
declare const TaskListItem: ({ title, tagline, icon, status, onNavigateToTask, disabled, problems, downloadHandler, info, loading, showErrorAlerts, showWarningAlert, warningMessage, removeEntity, isRemoveDisabled, handleIsRemoveDisabled, }: TaskListItemProps) => import("preact").JSX.Element;
|
|
4
4
|
export default TaskListItem;
|
|
@@ -76,6 +76,7 @@ export interface TaskListItemProps extends TaskStatusProps {
|
|
|
76
76
|
loading?: boolean;
|
|
77
77
|
showErrorAlerts?: 'onErrorStatus' | 'always';
|
|
78
78
|
showWarningAlert?: boolean;
|
|
79
|
+
warningMessage?: string;
|
|
79
80
|
removeEntity?: () => void;
|
|
80
81
|
isRemoveDisabled?: boolean;
|
|
81
82
|
handleIsRemoveDisabled?: StateUpdater<boolean>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './_card.component.scss';
|
|
2
2
|
import { JSX } from 'preact';
|
|
3
3
|
import { CardProps } from './types';
|
|
4
|
-
export default function Card({ className, children, stateful, active, disabled, title, subTitle, onClick, onKeyDown, }: CardProps): JSX.Element;
|
|
4
|
+
export default function Card({ className, children, stateful, active, disabled, warning, warningMessage, title, subTitle, onClick, onKeyDown, }: CardProps): JSX.Element;
|