@redneckz/wildless-cms-uni-blocks 0.14.1024 → 0.14.1025
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 +11 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
- package/dist/ui-kit/UserSurveyDialog/UserSurveyDialog.js +8 -2
- package/dist/ui-kit/UserSurveyDialog/UserSurveyDialog.js.map +1 -1
- package/dist/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
- package/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +2 -2
- package/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
- package/lib/ui-kit/UserSurveyDialog/UserSurveyDialog.js +8 -2
- package/lib/ui-kit/UserSurveyDialog/UserSurveyDialog.js.map +1 -1
- package/lib/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
- package/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +2 -2
- package/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +11 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
- package/mobile/dist/ui-kit/UserSurveyDialog/UserSurveyDialog.js +8 -2
- package/mobile/dist/ui-kit/UserSurveyDialog/UserSurveyDialog.js.map +1 -1
- package/mobile/dist/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
- package/mobile/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +2 -2
- package/mobile/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
- package/mobile/lib/ui-kit/UserSurveyDialog/UserSurveyDialog.js +8 -2
- package/mobile/lib/ui-kit/UserSurveyDialog/UserSurveyDialog.js.map +1 -1
- package/mobile/lib/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
- package/mobile/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +2 -2
- package/mobile/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
- package/mobile/src/ui-kit/UserSurveyDialog/UserSurveyDialog.tsx +9 -2
- package/mobile/src/ui-kit/UserSurveyDialog/UserSurveyDialogContent.ts +1 -0
- package/mobile/src/ui-kit/UserSurveyDialog/useUserSurveyDialog.ts +2 -2
- package/package.json +1 -1
- package/src/ui-kit/UserSurveyDialog/UserSurveyDialog.tsx +9 -2
- package/src/ui-kit/UserSurveyDialog/UserSurveyDialogContent.ts +1 -0
- package/src/ui-kit/UserSurveyDialog/useUserSurveyDialog.ts +2 -2
package/bundle/bundle.umd.js
CHANGED
|
@@ -1923,7 +1923,7 @@
|
|
|
1923
1923
|
|
|
1924
1924
|
const STEPS$3 = [FirstStep, SecondStep, FinalStep];
|
|
1925
1925
|
const LAST_STEP_INDEX = 2;
|
|
1926
|
-
const UserSurveyDialog = UniBlock(({ onClose = noop, isAfterTargetAction = false, reasonsSource = {} }) => {
|
|
1926
|
+
const UserSurveyDialog = UniBlock(({ onClose = noop, isAfterTargetAction = false, reasonsSource = {}, onSkip = noop }) => {
|
|
1927
1927
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
1928
1928
|
const [currentRating, setCurrentRating] = useState(0);
|
|
1929
1929
|
const [currentReason, setCurrentReason] = useState();
|
|
@@ -1952,7 +1952,13 @@
|
|
|
1952
1952
|
};
|
|
1953
1953
|
setStep(LAST_STEP_INDEX);
|
|
1954
1954
|
}, [currentRating, currentReason]);
|
|
1955
|
-
|
|
1955
|
+
const handleClose = useCallback(() => {
|
|
1956
|
+
if (step !== LAST_STEP_INDEX) {
|
|
1957
|
+
onSkip();
|
|
1958
|
+
}
|
|
1959
|
+
onClose();
|
|
1960
|
+
}, [step]);
|
|
1961
|
+
return (jsx(Dialog, { maxWidth: "xl", onClose: handleClose, children: jsx(ActiveStep, { currentRating: currentRating, currentReason: currentReason, reasons: reasons, surveyType: surveyType, isSending: isSending, setCurrentReason: setCurrentReason, setCurrentRating: setCurrentRating, onSubmit: handleSubmit, onNextStep: handleNextStep }) }));
|
|
1956
1962
|
});
|
|
1957
1963
|
const getMessage = (currentReason, message) => {
|
|
1958
1964
|
if (currentReason?.text !== 'Другое') {
|
|
@@ -1984,7 +1990,7 @@
|
|
|
1984
1990
|
: 0;
|
|
1985
1991
|
const isShowSurvey = !isSurveySkipped &&
|
|
1986
1992
|
(!userSurveyStore.userSurvey || userSurveyStore.userSurvey?.nextDueAt <= Date.now());
|
|
1987
|
-
const
|
|
1993
|
+
const handleSkipSurvey = useCallback(() => {
|
|
1988
1994
|
sessionStore.isSurveySkipped = true;
|
|
1989
1995
|
}, []);
|
|
1990
1996
|
const openUserSurveyDialog = useCallback((isAfterTargetAction = false) => {
|
|
@@ -1993,7 +1999,7 @@
|
|
|
1993
1999
|
$ref: '/wcms-resources/user-survey-reasons.json',
|
|
1994
2000
|
},
|
|
1995
2001
|
isAfterTargetAction,
|
|
1996
|
-
|
|
2002
|
+
onSkip: handleSkipSurvey,
|
|
1997
2003
|
});
|
|
1998
2004
|
}, []);
|
|
1999
2005
|
const handleOpenSurveyAction = useCallback(() => {
|
|
@@ -14370,7 +14376,7 @@
|
|
|
14370
14376
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
14371
14377
|
});
|
|
14372
14378
|
|
|
14373
|
-
const packageVersion = "0.14.
|
|
14379
|
+
const packageVersion = "0.14.1024";
|
|
14374
14380
|
|
|
14375
14381
|
exports.Blocks = Blocks;
|
|
14376
14382
|
exports.ContentPage = ContentPage;
|