@alviere/ui 0.12.1 → 0.13.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/index.js +17 -10
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/web-components.js +1 -1
- package/dist/web-components.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -14461,7 +14461,6 @@ function CreateAccount($$anchor, $$props) {
|
|
|
14461
14461
|
};
|
|
14462
14462
|
(_e2 = (_d2 = baseForm.state.alviereCore) === null || _d2 === void 0 ? void 0 : _d2.getLogger()) === null || _e2 === void 0 ? void 0 : _e2.info(`🔍 Updating ${updateAccountType} account using AlviereCore...`);
|
|
14463
14463
|
const response2 = await accountsService.updateAccount(get$1(accountToUpdate).account_uuid, updateRequest);
|
|
14464
|
-
dispatchAccountEvent(response2.account.account_uuid, response2.account.status);
|
|
14465
14464
|
const addressPayload = buildAddressPayload(formData);
|
|
14466
14465
|
const hasAddressUpdateFields = get$1(missingRequiredFields).some((key) => ADDRESS_FIELD_KEYS2.includes(key));
|
|
14467
14466
|
const shouldUpsertAddress = addressPayload && (hasAddressUpdateFields || !(existingAddress === null || existingAddress === void 0 ? void 0 : existingAddress.address_uuid));
|
|
@@ -14479,23 +14478,31 @@ function CreateAccount($$anchor, $$props) {
|
|
|
14479
14478
|
}
|
|
14480
14479
|
}
|
|
14481
14480
|
}
|
|
14482
|
-
const
|
|
14481
|
+
const shouldResumeOnboarding = !!get$1(pendingUserReason);
|
|
14482
|
+
let statusResponse = response2;
|
|
14483
|
+
if (shouldResumeOnboarding && response2.account.account_uuid) {
|
|
14484
|
+
uiLogger.info("🔄 Pending user action update completed, calling RESUME_ONBOARDING...");
|
|
14485
|
+
await accountsService.manageOnboarding(response2.account.account_uuid, "RESUME_ONBOARDING");
|
|
14486
|
+
statusResponse = await accountsService.getAccount(response2.account.account_uuid);
|
|
14487
|
+
}
|
|
14488
|
+
dispatchAccountEvent(statusResponse.account.account_uuid, statusResponse.account.status);
|
|
14489
|
+
const statusKind2 = statusGuard.evaluateStatus(statusResponse.account.status);
|
|
14483
14490
|
const shouldPoll2 = (get$1(pollingConfig) === null || get$1(pollingConfig) === void 0 ? void 0 : get$1(pollingConfig).enabled) === true;
|
|
14484
14491
|
if (statusKind2 === "barrier") {
|
|
14485
|
-
statusGuard.notifyBarrier(
|
|
14486
|
-
return
|
|
14492
|
+
statusGuard.notifyBarrier(statusResponse.account.account_uuid, statusResponse.account.status);
|
|
14493
|
+
return statusResponse;
|
|
14487
14494
|
}
|
|
14488
|
-
if (statusKind2 === "allowed" || !shouldPoll2 || !
|
|
14495
|
+
if (statusKind2 === "allowed" || !shouldPoll2 || !statusResponse.account.account_uuid) {
|
|
14489
14496
|
if (statusKind2 === "action_required") {
|
|
14490
|
-
handlePendingUserAction(
|
|
14491
|
-
return
|
|
14497
|
+
handlePendingUserAction(statusResponse.account, getAccountStatusReason(statusResponse.account), { emitSuccess: true });
|
|
14498
|
+
return statusResponse;
|
|
14492
14499
|
}
|
|
14493
|
-
dispatchUpdateFormSuccessEvent(
|
|
14494
|
-
return
|
|
14500
|
+
dispatchUpdateFormSuccessEvent(statusResponse.account);
|
|
14501
|
+
return statusResponse;
|
|
14495
14502
|
}
|
|
14496
14503
|
baseForm.actions.setPolling(true);
|
|
14497
14504
|
try {
|
|
14498
|
-
const outcome = await statusGuard.pollAccountStatus(
|
|
14505
|
+
const outcome = await statusGuard.pollAccountStatus(statusResponse.account.account_uuid, { allowActionRequired: true });
|
|
14499
14506
|
if (outcome.kind === "action_required") {
|
|
14500
14507
|
handlePendingUserAction(outcome.response.account, outcome.statusReason, { emitSuccess: true });
|
|
14501
14508
|
baseForm.actions.setPolling(false);
|