@redneckz/wildless-cms-uni-blocks 0.14.1041 → 0.14.1043
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/bundle/bundle.umd.js +22 -6
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/bundle/retail/components/DraftDialog/DraftDialogContent.d.ts +10 -0
- package/bundle/retail/components/DraftDialog/creditProgramCodes.d.ts +2 -0
- package/dist/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/dist/retail/components/DraftDialog/DraftDialog.js +3 -8
- package/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/dist/retail/components/DraftDialog/DraftDialogContent.d.ts +10 -0
- package/dist/retail/components/DraftDialog/DraftDialogContent.js +11 -0
- package/dist/retail/components/DraftDialog/DraftDialogContent.js.map +1 -0
- package/dist/retail/components/DraftDialog/creditProgramCodes.d.ts +2 -0
- package/dist/retail/components/DraftDialog/creditProgramCodes.js +17 -1
- package/dist/retail/components/DraftDialog/creditProgramCodes.js.map +1 -1
- package/lib/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/lib/retail/components/DraftDialog/DraftDialog.js +5 -10
- package/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/lib/retail/components/DraftDialog/DraftDialogContent.d.ts +10 -0
- package/lib/retail/components/DraftDialog/DraftDialogContent.js +9 -0
- package/lib/retail/components/DraftDialog/DraftDialogContent.js.map +1 -0
- package/lib/retail/components/DraftDialog/creditProgramCodes.d.ts +2 -0
- package/lib/retail/components/DraftDialog/creditProgramCodes.js +15 -0
- package/lib/retail/components/DraftDialog/creditProgramCodes.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +22 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/mobile/bundle/retail/components/DraftDialog/DraftDialogContent.d.ts +10 -0
- package/mobile/bundle/retail/components/DraftDialog/creditProgramCodes.d.ts +2 -0
- package/mobile/dist/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/mobile/dist/retail/components/DraftDialog/DraftDialog.js +3 -8
- package/mobile/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/DraftDialogContent.d.ts +10 -0
- package/mobile/dist/retail/components/DraftDialog/DraftDialogContent.js +11 -0
- package/mobile/dist/retail/components/DraftDialog/DraftDialogContent.js.map +1 -0
- package/mobile/dist/retail/components/DraftDialog/creditProgramCodes.d.ts +2 -0
- package/mobile/dist/retail/components/DraftDialog/creditProgramCodes.js +17 -1
- package/mobile/dist/retail/components/DraftDialog/creditProgramCodes.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/mobile/lib/retail/components/DraftDialog/DraftDialog.js +5 -10
- package/mobile/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/DraftDialogContent.d.ts +10 -0
- package/mobile/lib/retail/components/DraftDialog/DraftDialogContent.js +9 -0
- package/mobile/lib/retail/components/DraftDialog/DraftDialogContent.js.map +1 -0
- package/mobile/lib/retail/components/DraftDialog/creditProgramCodes.d.ts +2 -0
- package/mobile/lib/retail/components/DraftDialog/creditProgramCodes.js +15 -0
- package/mobile/lib/retail/components/DraftDialog/creditProgramCodes.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +5 -1
- package/mobile/src/retail/components/DraftDialog/DraftDialog.tsx +14 -39
- package/mobile/src/retail/components/DraftDialog/DraftDialogContent.tsx +49 -0
- package/mobile/src/retail/components/DraftDialog/creditProgramCodes.ts +24 -0
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.example.json +5 -1
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +5 -1
- package/src/icons/IconName.ts +4 -4
- package/src/retail/components/DraftDialog/DraftDialog.tsx +14 -39
- package/src/retail/components/DraftDialog/DraftDialogContent.tsx +49 -0
- package/src/retail/components/DraftDialog/creditProgramCodes.ts +24 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -7231,9 +7231,28 @@
|
|
|
7231
7231
|
...cardCodesToProgrammIdMap,
|
|
7232
7232
|
...debitCardCodesToProgrammIdMap,
|
|
7233
7233
|
};
|
|
7234
|
+
const getCreditProgramTaskType = (creditProgramCode, isDebit) => {
|
|
7235
|
+
if (isDebit || (creditProgramCode && creditProgramCode in debitCardCodesToProgrammIdMap)) {
|
|
7236
|
+
return 'debit';
|
|
7237
|
+
}
|
|
7238
|
+
if (!creditProgramCode) {
|
|
7239
|
+
return undefined;
|
|
7240
|
+
}
|
|
7241
|
+
if (creditProgramCode in creditCodesToProgrammIdMap) {
|
|
7242
|
+
return 'credit';
|
|
7243
|
+
}
|
|
7244
|
+
if (creditProgramCode in cardCodesToProgrammIdMap) {
|
|
7245
|
+
return 'card';
|
|
7246
|
+
}
|
|
7247
|
+
return undefined;
|
|
7248
|
+
};
|
|
7234
7249
|
|
|
7235
7250
|
const DraftActionButton = JSX(({ title, icon, description, name, onClick = noop }) => (jsxs("button", { className: "flex gap-lg items-center border border-gray/30 rounded-xl cursor-pointer p-4 hover:border-green", type: "button", onClick: onClick, "data-test-id": name, children: [jsx(Img, { image: { icon, iconVersion: 'normal' }, width: "78", height: "78" }), jsxs("div", { className: "flex flex-col items-start gap-xs md:w-72 md:mr-lg", children: [title ? (jsx(Text, { font: "font-medium", size: "text-s", children: title })) : null, description ? (jsx(Text, { color: "text-secondary-text", size: "text-xs", children: description })) : null] })] })));
|
|
7236
7251
|
|
|
7252
|
+
const DraftDialogContent = JSX(function ({ createdDate, productData, isFromLead, handleGoToDraft, handleGoToNewTask, onClose, }) {
|
|
7253
|
+
return (jsxs("div", { className: "flex flex-col gap-lg items-center mt-xs mx-6xl", children: [jsx(Heading, { className: "whitespace-pre-wrap text-center", title: "\u041D\u0430\u0448\u043B\u0438 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u044F\u0432\u043A\u0438", headingType: "h5" }), jsxs("div", { className: "flex flex-col gap-m max-w-lg", children: [jsx(DraftActionButton, { title: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430", icon: "BankColorIcon", description: createdDate ? `Черновик от ${formatDate(new Date(createdDate))}` : '', onClick: handleGoToDraft, name: "go-to-draft-button" }), jsx(DraftActionButton, { title: isFromLead ? 'Продолжить заполнение текущей заявки' : 'Создать новую заявку', icon: "NewLoanIcon", description: productData.description, onClick: isFromLead ? onClose : handleGoToNewTask, name: "go-to-current-task-button" })] })] }));
|
|
7254
|
+
});
|
|
7255
|
+
|
|
7237
7256
|
const fieldsNamesToContactKeysMap = {
|
|
7238
7257
|
email: 'EMAIL',
|
|
7239
7258
|
phone: 'MAIN_PHONE',
|
|
@@ -7476,16 +7495,13 @@
|
|
|
7476
7495
|
};
|
|
7477
7496
|
};
|
|
7478
7497
|
|
|
7479
|
-
const getTaskTypeOrDebit = (taskType, isDebit) => {
|
|
7480
|
-
return taskType || (isDebit ? 'debit' : undefined);
|
|
7481
|
-
};
|
|
7482
7498
|
const DraftDialog = JSX(function ({ task, taskType, isDebit, isFromLead = false, sendAspects = noop, onClose = noop, }) {
|
|
7483
7499
|
const retailFormStore = useRetailFormStore();
|
|
7484
7500
|
const navigator = locationNavigator();
|
|
7485
7501
|
const isNewMicroservice = checkNewMicroservice();
|
|
7486
7502
|
const { participants, participant, creditProgram, createdDate = '', id: taskId } = task;
|
|
7487
7503
|
const programmId = creditProgramCodeToProductIdMap[creditProgram.code];
|
|
7488
|
-
const productData = getProductData(
|
|
7504
|
+
const productData = getProductData(taskType ?? getCreditProgramTaskType(task.creditProgram.code, isDebit));
|
|
7489
7505
|
const currentParticipant = participant || participants?.[0];
|
|
7490
7506
|
const { id: participantId, profile } = currentParticipant || {};
|
|
7491
7507
|
const handleGoToDraft = useCallback(() => {
|
|
@@ -7515,7 +7531,7 @@
|
|
|
7515
7531
|
}
|
|
7516
7532
|
navigator.assign(productData.newTaskLink);
|
|
7517
7533
|
}, [task.id, productData.newTaskLink, isNewMicroservice]);
|
|
7518
|
-
return (jsx(Dialog, { onClose: onClose, children:
|
|
7534
|
+
return (jsx(Dialog, { onClose: onClose, children: jsx(DraftDialogContent, { createdDate: createdDate, productData: productData, isFromLead: isFromLead, handleGoToDraft: handleGoToDraft, handleGoToNewTask: handleGoToNewTask, onClose: onClose }) }));
|
|
7519
7535
|
});
|
|
7520
7536
|
|
|
7521
7537
|
const EmptyDraftDialog = JSX(function ({ taskType, isDebit, onClose = noop, }) {
|
|
@@ -14734,7 +14750,7 @@
|
|
|
14734
14750
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
14735
14751
|
});
|
|
14736
14752
|
|
|
14737
|
-
const packageVersion = "0.14.
|
|
14753
|
+
const packageVersion = "0.14.1042";
|
|
14738
14754
|
|
|
14739
14755
|
exports.Blocks = Blocks;
|
|
14740
14756
|
exports.ContentPage = ContentPage;
|