@redneckz/wildless-cms-uni-blocks 0.14.620 → 0.14.621
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/api/RetailAPI/feedbackById.d.ts +1 -1
- package/bundle/bundle.umd.js +20 -18
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/dist/api/RetailAPI/feedbackById.d.ts +1 -1
- package/dist/api/RetailAPI/feedbackById.js +2 -2
- package/dist/api/RetailAPI/feedbackById.js.map +1 -1
- package/dist/components/ApplicationLeadForm/consents.js +8 -8
- package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/dist/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/dist/ui-kit/Checkbox/getDocument.js +2 -2
- package/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/dist/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/dist/ui-kit/DialogManager/openDocument.js +3 -3
- package/dist/ui-kit/DialogManager/openDocument.js.map +1 -1
- package/lib/api/RetailAPI/feedbackById.d.ts +1 -1
- package/lib/api/RetailAPI/feedbackById.js +2 -2
- package/lib/api/RetailAPI/feedbackById.js.map +1 -1
- package/lib/components/ApplicationLeadForm/consents.js +8 -8
- package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/lib/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/lib/ui-kit/Checkbox/getDocument.js +2 -2
- package/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/lib/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/lib/ui-kit/DialogManager/openDocument.js +3 -3
- package/lib/ui-kit/DialogManager/openDocument.js.map +1 -1
- package/mobile/bundle/api/RetailAPI/feedbackById.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +20 -18
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/mobile/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/mobile/dist/api/RetailAPI/feedbackById.d.ts +1 -1
- package/mobile/dist/api/RetailAPI/feedbackById.js +2 -2
- package/mobile/dist/api/RetailAPI/feedbackById.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/consents.js +8 -8
- package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/mobile/dist/ui-kit/Checkbox/getDocument.js +2 -2
- package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/mobile/dist/ui-kit/DialogManager/openDocument.js +3 -3
- package/mobile/dist/ui-kit/DialogManager/openDocument.js.map +1 -1
- package/mobile/lib/api/RetailAPI/feedbackById.d.ts +1 -1
- package/mobile/lib/api/RetailAPI/feedbackById.js +2 -2
- package/mobile/lib/api/RetailAPI/feedbackById.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/consents.js +8 -8
- package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/mobile/lib/ui-kit/Checkbox/getDocument.js +2 -2
- package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/mobile/lib/ui-kit/DialogManager/openDocument.js +3 -3
- package/mobile/lib/ui-kit/DialogManager/openDocument.js.map +1 -1
- package/mobile/src/api/RetailAPI/feedbackById.ts +5 -2
- package/mobile/src/components/ApplicationLeadForm/consents.ts +8 -8
- package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +6 -1
- package/mobile/src/ui-kit/Checkbox/getDocument.ts +2 -2
- package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +3 -1
- package/mobile/src/ui-kit/DialogManager/openDocument.tsx +11 -3
- package/package.json +2 -2
- package/src/api/RetailAPI/feedbackById.ts +5 -2
- package/src/components/ApplicationLeadForm/consents.ts +8 -8
- package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +6 -1
- package/src/ui-kit/Checkbox/getDocument.ts +2 -2
- package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +3 -1
- package/src/ui-kit/DialogManager/openDocument.tsx +11 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { useMobileMode } from '../../hooks/useMobileMode';
|
|
3
4
|
import { noop } from '../../utils/noop';
|
|
4
5
|
import { Button } from '../Button/Button';
|
|
5
6
|
import { Dialog } from '../DialogManager/Dialog';
|
|
@@ -30,6 +31,7 @@ export const ConsentBkiDialog = JSX<ConsentBkiDialogProps>(function ({
|
|
|
30
31
|
const [confirmStatus, setConfirmStatus] = useState('');
|
|
31
32
|
const [showRefuceContent, setShowRefuceContent] = useState(false);
|
|
32
33
|
const { open, close } = useDialogManager();
|
|
34
|
+
const isMobile = useMobileMode();
|
|
33
35
|
const handleClose = useCallback(() => {
|
|
34
36
|
close();
|
|
35
37
|
handleSubmit(confirmStatus);
|
|
@@ -46,7 +48,7 @@ export const ConsentBkiDialog = JSX<ConsentBkiDialogProps>(function ({
|
|
|
46
48
|
return (
|
|
47
49
|
<Dialog className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg" onClose={onClose}>
|
|
48
50
|
<div className="flex flex-col gap-lg items-center">
|
|
49
|
-
<div role="button" onClick={() => openDocument(CONSENT_BKI_ID,
|
|
51
|
+
<div role="button" onClick={() => openDocument(open, CONSENT_BKI_ID, isMobile)}>
|
|
50
52
|
<Heading className="text-center text-balance" title={consentText.title} />
|
|
51
53
|
</div>
|
|
52
54
|
<Paragraph align="text-center">{consentText.description}</Paragraph>
|
|
@@ -2,12 +2,20 @@ import { type VNode } from '../../model/VNode';
|
|
|
2
2
|
import { getDocument } from '../Checkbox/getDocument';
|
|
3
3
|
import { Dialog } from './Dialog';
|
|
4
4
|
|
|
5
|
-
export const openDocument = async (
|
|
6
|
-
|
|
5
|
+
export const openDocument = async (
|
|
6
|
+
open: (dialog: VNode) => void,
|
|
7
|
+
id: number,
|
|
8
|
+
convertToPng = false,
|
|
9
|
+
) => {
|
|
10
|
+
const document = await getDocument(id, convertToPng);
|
|
7
11
|
|
|
8
12
|
open(
|
|
9
13
|
<Dialog className="my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0">
|
|
10
|
-
|
|
14
|
+
{convertToPng ? (
|
|
15
|
+
<img src={document} />
|
|
16
|
+
) : (
|
|
17
|
+
<iframe src={`${document}#toolbar=0`} className="w-full h-[80vh]" id="iframe-dialog" />
|
|
18
|
+
)}
|
|
11
19
|
</Dialog>,
|
|
12
20
|
);
|
|
13
21
|
};
|