@redneckz/wildless-cms-uni-blocks 0.14.1088 → 0.14.1090
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 +19 -9
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -1
- package/dist/retail/utils/getBaseUrl.js +14 -4
- package/dist/retail/utils/getBaseUrl.js.map +1 -1
- package/dist/ui-kit/UserSurveyDialog/FirstStep.js +2 -2
- package/dist/ui-kit/UserSurveyDialog/UserSurveyDialog.js +2 -2
- package/dist/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -1
- package/lib/retail/utils/getBaseUrl.js +14 -4
- package/lib/retail/utils/getBaseUrl.js.map +1 -1
- package/lib/ui-kit/UserSurveyDialog/FirstStep.js +2 -2
- package/lib/ui-kit/UserSurveyDialog/UserSurveyDialog.js +2 -2
- package/lib/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +19 -9
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -1
- package/mobile/dist/retail/utils/getBaseUrl.js +14 -4
- package/mobile/dist/retail/utils/getBaseUrl.js.map +1 -1
- package/mobile/dist/ui-kit/UserSurveyDialog/FirstStep.js +2 -2
- package/mobile/dist/ui-kit/UserSurveyDialog/UserSurveyDialog.js +2 -2
- package/mobile/dist/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -1
- package/mobile/lib/retail/utils/getBaseUrl.js +14 -4
- package/mobile/lib/retail/utils/getBaseUrl.js.map +1 -1
- package/mobile/lib/ui-kit/UserSurveyDialog/FirstStep.js +2 -2
- package/mobile/lib/ui-kit/UserSurveyDialog/UserSurveyDialog.js +2 -2
- package/mobile/lib/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -1
- package/mobile/src/retail/utils/getBaseUrl.ts +15 -4
- package/mobile/src/ui-kit/UserSurveyDialog/FirstStep.tsx +2 -2
- package/mobile/src/ui-kit/UserSurveyDialog/UserSurveyDialog.tsx +2 -2
- package/mobile/src/ui-kit/UserSurveyDialog/UserSurveyDialogContent.ts +1 -1
- package/package.json +1 -1
- package/src/retail/utils/getBaseUrl.ts +15 -4
- package/src/ui-kit/UserSurveyDialog/FirstStep.tsx +2 -2
- package/src/ui-kit/UserSurveyDialog/UserSurveyDialog.tsx +2 -2
- package/src/ui-kit/UserSurveyDialog/UserSurveyDialogContent.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
2
2
|
import { type OnCloseProps } from '../../model/OnCloseProps';
|
|
3
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
4
|
-
export declare type UserSurveyType = '
|
|
4
|
+
export declare type UserSurveyType = 'nps' | 'csi';
|
|
5
5
|
export declare type UserSurveyStoreSlice = {
|
|
6
6
|
userSurvey: {
|
|
7
7
|
lastShownType: UserSurveyType;
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.getBaseUrl = void 0;
|
|
3
3
|
const apiBaseUrl_1 = require("../api/apiBaseUrl");
|
|
4
|
+
const getProductType = () => {
|
|
5
|
+
const raw = globalThis.localStorage?.getItem('productType');
|
|
6
|
+
if (!raw) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
return JSON.parse(raw);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
4
16
|
const getBaseUrl = () => {
|
|
5
17
|
const isNewMicroservice = globalThis.sessionStorage?.getItem('isNewMicroservice');
|
|
6
|
-
const productType =
|
|
7
|
-
const newRetailApi = productType === '
|
|
8
|
-
? apiBaseUrl_1.NEW_RETAIL_CREDIT_API_BASE_URI
|
|
9
|
-
: apiBaseUrl_1.NEW_RETAIL_CREDIT_CARD_API_BASE_URI;
|
|
18
|
+
const productType = getProductType();
|
|
19
|
+
const newRetailApi = productType === 'credit' ? apiBaseUrl_1.NEW_RETAIL_CREDIT_API_BASE_URI : apiBaseUrl_1.NEW_RETAIL_CREDIT_CARD_API_BASE_URI;
|
|
10
20
|
return isNewMicroservice ? newRetailApi : apiBaseUrl_1.RETAIL_API_BASE_URI;
|
|
11
21
|
};
|
|
12
22
|
exports.getBaseUrl = getBaseUrl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBaseUrl.js","sourceRoot":"","sources":["../../../src/retail/utils/getBaseUrl.ts"],"names":[],"mappings":";;AAAA,kDAI2B;
|
|
1
|
+
{"version":3,"file":"getBaseUrl.js","sourceRoot":"","sources":["../../../src/retail/utils/getBaseUrl.ts"],"names":[],"mappings":";;AAAA,kDAI2B;AAG3B,MAAM,cAAc,GAAG,GAAuB,EAAE;IAC9C,MAAM,GAAG,GAAG,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5D,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,IAAI,CAAC;KACb;IACD,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KACxB;IAAC,MAAM;QACN,OAAO,IAAI,CAAC;KACb;AACH,CAAC,CAAC;AAEK,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,iBAAiB,GAAG,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClF,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IAErC,MAAM,YAAY,GAChB,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,2CAA8B,CAAC,CAAC,CAAC,gDAAmC,CAAC;IAElG,OAAO,iBAAiB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gCAAmB,CAAC;AAChE,CAAC,CAAC;AARW,QAAA,UAAU,cAQrB"}
|
|
@@ -8,8 +8,8 @@ const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
|
8
8
|
const Star_1 = require("./Star");
|
|
9
9
|
const stars = Array.from('12345', () => Star_1.Star);
|
|
10
10
|
const TITLE = {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
nps: 'Оцените, пожалуйста, от 1 до 5,\nнасколько вероятно, что вы порекомендуете Россельхозбанк коллегам, друзьям и знакомым?',
|
|
12
|
+
csi: 'Оцените, пожалуйста, удовлетворённость пользования сайтом',
|
|
13
13
|
};
|
|
14
14
|
exports.FirstStep = (0, uni_jsx_1.JSX)(({ currentRating, surveyType, isSending, setCurrentRating, onNextStep, onSubmit }) => {
|
|
15
15
|
const [currentHover, setCurrentHover] = (0, hooks_1.useState)();
|
|
@@ -61,8 +61,8 @@ const getTimeAfter30days = () => Date.now() + 30 * 24 * 60 * 60 * 1000;
|
|
|
61
61
|
// Если пользователь проходил опрос то показываем другой, иначе показываем случайный тип опроса
|
|
62
62
|
const getUserSurveyType = (lastShownType) => {
|
|
63
63
|
if (lastShownType) {
|
|
64
|
-
return lastShownType === '
|
|
64
|
+
return lastShownType === 'nps' ? 'csi' : 'nps';
|
|
65
65
|
}
|
|
66
|
-
return ['
|
|
66
|
+
return ['nps', 'csi'][Date.now() % 2];
|
|
67
67
|
};
|
|
68
68
|
//# sourceMappingURL=UserSurveyDialog.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
2
2
|
import { type OnCloseProps } from '../../model/OnCloseProps';
|
|
3
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
4
|
-
export declare type UserSurveyType = '
|
|
4
|
+
export declare type UserSurveyType = 'nps' | 'csi';
|
|
5
5
|
export declare type UserSurveyStoreSlice = {
|
|
6
6
|
userSurvey: {
|
|
7
7
|
lastShownType: UserSurveyType;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { NEW_RETAIL_CREDIT_API_BASE_URI, NEW_RETAIL_CREDIT_CARD_API_BASE_URI, RETAIL_API_BASE_URI, } from '../api/apiBaseUrl.js';
|
|
2
|
+
const getProductType = () => {
|
|
3
|
+
const raw = globalThis.localStorage?.getItem('productType');
|
|
4
|
+
if (!raw) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
try {
|
|
8
|
+
return JSON.parse(raw);
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
2
14
|
export const getBaseUrl = () => {
|
|
3
15
|
const isNewMicroservice = globalThis.sessionStorage?.getItem('isNewMicroservice');
|
|
4
|
-
const productType =
|
|
5
|
-
const newRetailApi = productType === '
|
|
6
|
-
? NEW_RETAIL_CREDIT_API_BASE_URI
|
|
7
|
-
: NEW_RETAIL_CREDIT_CARD_API_BASE_URI;
|
|
16
|
+
const productType = getProductType();
|
|
17
|
+
const newRetailApi = productType === 'credit' ? NEW_RETAIL_CREDIT_API_BASE_URI : NEW_RETAIL_CREDIT_CARD_API_BASE_URI;
|
|
8
18
|
return isNewMicroservice ? newRetailApi : RETAIL_API_BASE_URI;
|
|
9
19
|
};
|
|
10
20
|
//# sourceMappingURL=getBaseUrl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBaseUrl.js","sourceRoot":"","sources":["../../../src/retail/utils/getBaseUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,mCAAmC,EACnC,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"getBaseUrl.js","sourceRoot":"","sources":["../../../src/retail/utils/getBaseUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,mCAAmC,EACnC,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,cAAc,GAAG,GAAuB,EAAE;IAC9C,MAAM,GAAG,GAAG,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5D,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,IAAI,CAAC;KACb;IACD,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KACxB;IAAC,MAAM;QACN,OAAO,IAAI,CAAC;KACb;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,iBAAiB,GAAG,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClF,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IAErC,MAAM,YAAY,GAChB,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,mCAAmC,CAAC;IAElG,OAAO,iBAAiB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC;AAChE,CAAC,CAAC"}
|
|
@@ -6,8 +6,8 @@ import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
|
6
6
|
import { Star } from './Star.js';
|
|
7
7
|
const stars = Array.from('12345', () => Star);
|
|
8
8
|
const TITLE = {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
nps: 'Оцените, пожалуйста, от 1 до 5,\nнасколько вероятно, что вы порекомендуете Россельхозбанк коллегам, друзьям и знакомым?',
|
|
10
|
+
csi: 'Оцените, пожалуйста, удовлетворённость пользования сайтом',
|
|
11
11
|
};
|
|
12
12
|
export const FirstStep = JSX(({ currentRating, surveyType, isSending, setCurrentRating, onNextStep, onSubmit }) => {
|
|
13
13
|
const [currentHover, setCurrentHover] = useState();
|
|
@@ -59,8 +59,8 @@ const getTimeAfter30days = () => Date.now() + 30 * 24 * 60 * 60 * 1000;
|
|
|
59
59
|
// Если пользователь проходил опрос то показываем другой, иначе показываем случайный тип опроса
|
|
60
60
|
const getUserSurveyType = (lastShownType) => {
|
|
61
61
|
if (lastShownType) {
|
|
62
|
-
return lastShownType === '
|
|
62
|
+
return lastShownType === 'nps' ? 'csi' : 'nps';
|
|
63
63
|
}
|
|
64
|
-
return ['
|
|
64
|
+
return ['nps', 'csi'][Date.now() % 2];
|
|
65
65
|
};
|
|
66
66
|
//# sourceMappingURL=UserSurveyDialog.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
2
2
|
import { type OnCloseProps } from '../../model/OnCloseProps';
|
|
3
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
4
|
-
export declare type UserSurveyType = '
|
|
4
|
+
export declare type UserSurveyType = 'nps' | 'csi';
|
|
5
5
|
export declare type UserSurveyStoreSlice = {
|
|
6
6
|
userSurvey: {
|
|
7
7
|
lastShownType: UserSurveyType;
|
|
@@ -1843,8 +1843,8 @@
|
|
|
1843
1843
|
|
|
1844
1844
|
const stars$1 = Array.from('12345', () => Star);
|
|
1845
1845
|
const TITLE$1 = {
|
|
1846
|
-
|
|
1847
|
-
|
|
1846
|
+
nps: 'Оцените, пожалуйста, от 1 до 5,\nнасколько вероятно, что вы порекомендуете Россельхозбанк коллегам, друзьям и знакомым?',
|
|
1847
|
+
csi: 'Оцените, пожалуйста, удовлетворённость пользования сайтом',
|
|
1848
1848
|
};
|
|
1849
1849
|
const FirstStep = JSX(({ currentRating, surveyType, isSending, setCurrentRating, onNextStep, onSubmit }) => {
|
|
1850
1850
|
const [currentHover, setCurrentHover] = useState();
|
|
@@ -2034,9 +2034,9 @@
|
|
|
2034
2034
|
// Если пользователь проходил опрос то показываем другой, иначе показываем случайный тип опроса
|
|
2035
2035
|
const getUserSurveyType = (lastShownType) => {
|
|
2036
2036
|
if (lastShownType) {
|
|
2037
|
-
return lastShownType === '
|
|
2037
|
+
return lastShownType === 'nps' ? 'csi' : 'nps';
|
|
2038
2038
|
}
|
|
2039
|
-
return ['
|
|
2039
|
+
return ['nps', 'csi'][Date.now() % 2];
|
|
2040
2040
|
};
|
|
2041
2041
|
|
|
2042
2042
|
const DELAY = 5 * 60 * 1000;
|
|
@@ -4463,12 +4463,22 @@
|
|
|
4463
4463
|
const NEW_RETAIL_CREDIT_API_BASE_URI = '/api/credit-application';
|
|
4464
4464
|
const NEW_RETAIL_CREDIT_CARD_API_BASE_URI = '/api/creditcard-application';
|
|
4465
4465
|
|
|
4466
|
+
const getProductType = () => {
|
|
4467
|
+
const raw = globalThis.localStorage?.getItem('productType');
|
|
4468
|
+
if (!raw) {
|
|
4469
|
+
return null;
|
|
4470
|
+
}
|
|
4471
|
+
try {
|
|
4472
|
+
return JSON.parse(raw);
|
|
4473
|
+
}
|
|
4474
|
+
catch {
|
|
4475
|
+
return null;
|
|
4476
|
+
}
|
|
4477
|
+
};
|
|
4466
4478
|
const getBaseUrl = () => {
|
|
4467
4479
|
const isNewMicroservice = globalThis.sessionStorage?.getItem('isNewMicroservice');
|
|
4468
|
-
const productType =
|
|
4469
|
-
const newRetailApi = productType === '
|
|
4470
|
-
? NEW_RETAIL_CREDIT_API_BASE_URI
|
|
4471
|
-
: NEW_RETAIL_CREDIT_CARD_API_BASE_URI;
|
|
4480
|
+
const productType = getProductType();
|
|
4481
|
+
const newRetailApi = productType === 'credit' ? NEW_RETAIL_CREDIT_API_BASE_URI : NEW_RETAIL_CREDIT_CARD_API_BASE_URI;
|
|
4472
4482
|
return isNewMicroservice ? newRetailApi : RETAIL_API_BASE_URI;
|
|
4473
4483
|
};
|
|
4474
4484
|
|
|
@@ -14949,7 +14959,7 @@
|
|
|
14949
14959
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
14950
14960
|
});
|
|
14951
14961
|
|
|
14952
|
-
const packageVersion = "0.14.
|
|
14962
|
+
const packageVersion = "0.14.1089";
|
|
14953
14963
|
|
|
14954
14964
|
exports.Blocks = Blocks;
|
|
14955
14965
|
exports.ContentPage = ContentPage;
|