@lookiero/checkout 12.5.0 → 12.5.2
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/src/ExpoRoot.js +0 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
- package/src/ExpoRoot.tsx +0 -1
- package/dist/public/public/assets/adaptive-icon.png +0 -0
- package/dist/public/public/assets/favicon.png +0 -0
- package/dist/public/public/assets/icon.png +0 -0
- package/dist/public/public/assets/splash.png +0 -0
- package/dist/public/public/images/not-found.png +0 -0
- package/dist/src/domain/checkoutItem/model/currency.d.ts +0 -6
- package/dist/src/domain/checkoutItem/model/currency.js +0 -7
- package/dist/src/domain/uiSetting/command/updateUiSetting.d.ts +0 -15
- package/dist/src/domain/uiSetting/command/updateUiSetting.js +0 -10
- package/dist/src/domain/uiSetting/model/uiSetting.d.ts +0 -9
- package/dist/src/domain/uiSetting/model/uiSetting.js +0 -11
- package/dist/src/domain/uiSetting/model/uiSettingUpdated.d.ts +0 -15
- package/dist/src/domain/uiSetting/model/uiSettingUpdated.js +0 -8
- package/dist/src/domain/uiSetting/model/uiSettings.d.ts +0 -7
- package/dist/src/domain/uiSetting/model/uiSettings.js +0 -1
- package/dist/src/infrastructure/domain/uiSetting/model/storageUiSettings.d.ts +0 -17
- package/dist/src/infrastructure/domain/uiSetting/model/storageUiSettings.js +0 -20
- package/dist/src/infrastructure/domain/uiSetting/react/useUpdateUiSetting.d.ts +0 -18
- package/dist/src/infrastructure/domain/uiSetting/react/useUpdateUiSetting.js +0 -22
- package/dist/src/infrastructure/integration/useRedirect.d.ts +0 -7
- package/dist/src/infrastructure/integration/useRedirect.js +0 -1
- package/dist/src/infrastructure/persistence/asyncStorageStorage.d.ts +0 -5
- package/dist/src/infrastructure/persistence/asyncStorageStorage.js +0 -7
- package/dist/src/infrastructure/persistence/uiSettingData.d.ts +0 -6
- package/dist/src/infrastructure/persistence/uiSettingData.js +0 -1
- package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +0 -3
- package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +0 -103
- package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.d.ts +0 -12
- package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.js +0 -10
- package/dist/src/infrastructure/projection/checkoutQuestion/react/useListCheckoutQuestionsByCheckoutId.d.ts +0 -10
- package/dist/src/infrastructure/projection/checkoutQuestion/react/useListCheckoutQuestionsByCheckoutId.js +0 -9
- package/dist/src/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.d.ts +0 -10
- package/dist/src/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.js +0 -11
- package/dist/src/infrastructure/projection/uiSetting/storageUiSettingByKeyView.d.ts +0 -13
- package/dist/src/infrastructure/projection/uiSetting/storageUiSettingByKeyView.js +0 -15
- package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.d.ts +0 -27
- package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.js +0 -97
- package/dist/src/infrastructure/ui/routing/useBasePath.d.ts +0 -8
- package/dist/src/infrastructure/ui/routing/useBasePath.js +0 -9
- package/dist/src/infrastructure/ui/settings/UISettings.d.ts +0 -3
- package/dist/src/infrastructure/ui/settings/UISettings.js +0 -4
- package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.d.ts +0 -12
- package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.js +0 -90
- package/dist/src/projection/checkoutQuestion/checkoutQuestion.d.ts +0 -18
- package/dist/src/projection/checkoutQuestion/checkoutQuestion.js +0 -10
- package/dist/src/projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId.d.ts +0 -25
- package/dist/src/projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId.js +0 -8
- package/dist/src/projection/uiSetting/viewUiSettingByKey.d.ts +0 -29
- package/dist/src/projection/uiSetting/viewUiSettingByKey.js +0 -8
package/dist/src/ExpoRoot.js
CHANGED
|
@@ -113,7 +113,6 @@ const ExpoRoot = () => {
|
|
|
113
113
|
["AreaNormal-Extrabold"]: require("@lookiero/aurora/build/assets/fonts/AreaNormal-Extrabold.otf"),
|
|
114
114
|
["OpenSans-Regular"]: require("@lookiero/aurora/build/assets/fonts/OpenSans-Regular.ttf"),
|
|
115
115
|
["OpenSans-Bold"]: require("@lookiero/aurora/build/assets/fonts/OpenSans-Bold.ttf"),
|
|
116
|
-
["DalaFloda-Bold"]: require("@lookiero/aurora/build/assets/fonts/DalaFloda-Bold.otf"),
|
|
117
116
|
auroraicons: require("@lookiero/aurora-iconfont/dist/auroraicons.ttf"),
|
|
118
117
|
});
|
|
119
118
|
const [isAccessible, setIsAccessible] = useState();
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "12.5.
|
|
1
|
+
export declare const VERSION = "12.5.2";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "12.5.
|
|
1
|
+
export const VERSION = "12.5.2";
|
package/package.json
CHANGED
package/src/ExpoRoot.tsx
CHANGED
|
@@ -136,7 +136,6 @@ const ExpoRoot: FC = () => {
|
|
|
136
136
|
["AreaNormal-Extrabold"]: require("@lookiero/aurora/build/assets/fonts/AreaNormal-Extrabold.otf"),
|
|
137
137
|
["OpenSans-Regular"]: require("@lookiero/aurora/build/assets/fonts/OpenSans-Regular.ttf"),
|
|
138
138
|
["OpenSans-Bold"]: require("@lookiero/aurora/build/assets/fonts/OpenSans-Bold.ttf"),
|
|
139
|
-
["DalaFloda-Bold"]: require("@lookiero/aurora/build/assets/fonts/DalaFloda-Bold.otf"),
|
|
140
139
|
auroraicons: require("@lookiero/aurora-iconfont/dist/auroraicons.ttf"),
|
|
141
140
|
});
|
|
142
141
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Command } from "@lookiero/messaging";
|
|
2
|
-
declare const UPDATE_UI_SETTING = "update_ui_setting";
|
|
3
|
-
interface UpdateUiSettingPayload {
|
|
4
|
-
readonly aggregateId: string;
|
|
5
|
-
readonly key: string;
|
|
6
|
-
readonly value: unknown;
|
|
7
|
-
}
|
|
8
|
-
interface UpdateUiSetting extends Command<typeof UPDATE_UI_SETTING>, UpdateUiSettingPayload {
|
|
9
|
-
}
|
|
10
|
-
interface UpdateUiSettingFunction {
|
|
11
|
-
(payload: UpdateUiSettingPayload): UpdateUiSetting;
|
|
12
|
-
}
|
|
13
|
-
declare const updateUiSetting: UpdateUiSettingFunction;
|
|
14
|
-
export type { UpdateUiSetting };
|
|
15
|
-
export { UPDATE_UI_SETTING, updateUiSetting };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { command } from "@lookiero/messaging";
|
|
2
|
-
const UPDATE_UI_SETTING = "update_ui_setting";
|
|
3
|
-
const updateUiSetting = ({ aggregateId, ...payload }) => ({
|
|
4
|
-
...command({
|
|
5
|
-
aggregateId,
|
|
6
|
-
name: UPDATE_UI_SETTING,
|
|
7
|
-
}),
|
|
8
|
-
...payload,
|
|
9
|
-
});
|
|
10
|
-
export { UPDATE_UI_SETTING, updateUiSetting };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AggregateRoot, CommandHandlerFunction } from "@lookiero/messaging";
|
|
2
|
-
import { UpdateUiSetting } from "../command/updateUiSetting";
|
|
3
|
-
interface UiSetting extends AggregateRoot {
|
|
4
|
-
readonly key: string;
|
|
5
|
-
readonly value: unknown;
|
|
6
|
-
}
|
|
7
|
-
declare const updateUiSettingHandler: CommandHandlerFunction<UpdateUiSetting, UiSetting>;
|
|
8
|
-
export type { UiSetting };
|
|
9
|
-
export { updateUiSettingHandler };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { uiSettingUpdated } from "./uiSettingUpdated";
|
|
2
|
-
const updateUiSettingHandler = () => async ({ aggregateRoot, command }) => {
|
|
3
|
-
const { aggregateId, key, value } = command;
|
|
4
|
-
return {
|
|
5
|
-
...aggregateRoot,
|
|
6
|
-
key,
|
|
7
|
-
value,
|
|
8
|
-
domainEvents: [uiSettingUpdated({ aggregateId, key })],
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export { updateUiSettingHandler };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DomainEvent, MessageName } from "@lookiero/messaging";
|
|
2
|
-
declare const UI_SETTING_UPDATED = "ui_setting_updated";
|
|
3
|
-
interface UiSettingUpdatedPayload {
|
|
4
|
-
readonly aggregateId: string;
|
|
5
|
-
readonly key: string;
|
|
6
|
-
}
|
|
7
|
-
interface UiSettingUpdated extends DomainEvent<typeof UI_SETTING_UPDATED>, UiSettingUpdatedPayload {
|
|
8
|
-
}
|
|
9
|
-
interface UiSettingUpdatedFunction {
|
|
10
|
-
(payload: UiSettingUpdatedPayload): UiSettingUpdated;
|
|
11
|
-
}
|
|
12
|
-
declare const uiSettingUpdated: UiSettingUpdatedFunction;
|
|
13
|
-
declare const isUiSettingUpdated: (event: DomainEvent<MessageName>) => event is UiSettingUpdated;
|
|
14
|
-
export type { UiSettingUpdated };
|
|
15
|
-
export { UI_SETTING_UPDATED, uiSettingUpdated, isUiSettingUpdated };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { domainEvent } from "@lookiero/messaging";
|
|
2
|
-
const UI_SETTING_UPDATED = "ui_setting_updated";
|
|
3
|
-
const uiSettingUpdated = ({ aggregateId, key }) => ({
|
|
4
|
-
...domainEvent({ aggregateId, name: UI_SETTING_UPDATED }),
|
|
5
|
-
key,
|
|
6
|
-
});
|
|
7
|
-
const isUiSettingUpdated = (event) => event.name === UI_SETTING_UPDATED;
|
|
8
|
-
export { UI_SETTING_UPDATED, uiSettingUpdated, isUiSettingUpdated };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RepositoryGetFunction, RepositoryGetFunctionArgs, RepositorySaveFunction, RepositorySaveFunctionArgs } from "@lookiero/messaging";
|
|
2
|
-
import { UiSetting } from "./uiSetting";
|
|
3
|
-
interface UiSettingGetFunction<UiSettingGetFunctionArgs extends RepositoryGetFunctionArgs> extends RepositoryGetFunction<UiSetting, UiSettingGetFunctionArgs> {
|
|
4
|
-
}
|
|
5
|
-
interface UiSettingSaveFunction<UiSettingSaveFunctionArgs extends RepositorySaveFunctionArgs> extends RepositorySaveFunction<UiSetting, UiSettingSaveFunctionArgs> {
|
|
6
|
-
}
|
|
7
|
-
export type { UiSettingGetFunction, UiSettingSaveFunction };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RepositoryGetFunctionArgs, RepositorySaveFunctionArgs } from "@lookiero/messaging";
|
|
2
|
-
import { UiSettingGetFunction, UiSettingSaveFunction } from "../../../../domain/uiSetting/model/uiSettings";
|
|
3
|
-
import { ReadFunction, WriteFunction } from "../../../persistence/storage";
|
|
4
|
-
import { UiSettingDto } from "../../../persistence/uiSettingData";
|
|
5
|
-
interface StorageUiSettingsGetFunctionArgs extends RepositoryGetFunctionArgs {
|
|
6
|
-
readonly read: ReadFunction<UiSettingDto>;
|
|
7
|
-
}
|
|
8
|
-
interface StorageUiSettingsGetFunction extends UiSettingGetFunction<StorageUiSettingsGetFunctionArgs> {
|
|
9
|
-
}
|
|
10
|
-
declare const getUiSetting: StorageUiSettingsGetFunction;
|
|
11
|
-
interface StorageUiSettingsSaveFunctionArgs extends RepositorySaveFunctionArgs {
|
|
12
|
-
readonly write: WriteFunction<UiSettingDto>;
|
|
13
|
-
}
|
|
14
|
-
interface StorageUiSettingsSaveFunction extends UiSettingSaveFunction<StorageUiSettingsSaveFunctionArgs> {
|
|
15
|
-
}
|
|
16
|
-
declare const saveUiSetting: StorageUiSettingsSaveFunction;
|
|
17
|
-
export { getUiSetting, saveUiSetting };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const toDomain = (uiSettingDto) => ({
|
|
2
|
-
aggregateId: uiSettingDto.id,
|
|
3
|
-
key: uiSettingDto.key,
|
|
4
|
-
value: uiSettingDto.value,
|
|
5
|
-
domainEvents: [],
|
|
6
|
-
});
|
|
7
|
-
const fromDomain = (uiSetting) => ({
|
|
8
|
-
id: uiSetting.aggregateId,
|
|
9
|
-
key: uiSetting.key,
|
|
10
|
-
value: uiSetting.value,
|
|
11
|
-
});
|
|
12
|
-
const getUiSetting = ({ read }) => async (uiSettingKey) => {
|
|
13
|
-
const uiSettingDto = await read(uiSettingKey);
|
|
14
|
-
if (!uiSettingDto) {
|
|
15
|
-
throw new Error(`UiSetting not found: ${uiSettingKey}`);
|
|
16
|
-
}
|
|
17
|
-
return toDomain(uiSettingDto);
|
|
18
|
-
};
|
|
19
|
-
const saveUiSetting = ({ write }) => async (aggregateRoot) => await write(aggregateRoot.key, fromDomain(aggregateRoot));
|
|
20
|
-
export { getUiSetting, saveUiSetting };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CommandStatus } from "@lookiero/messaging-react";
|
|
2
|
-
import { Logger } from "@lookiero/sty-psp-logging";
|
|
3
|
-
interface UpdateFunctionArgs {
|
|
4
|
-
readonly key: string;
|
|
5
|
-
readonly value: unknown;
|
|
6
|
-
}
|
|
7
|
-
interface UpdateFunction {
|
|
8
|
-
(args: UpdateFunctionArgs): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
type UseUpdateUiSetting = [update: UpdateFunction, status: CommandStatus];
|
|
11
|
-
interface UseUpdateUiSettingArgs {
|
|
12
|
-
readonly logger: Logger;
|
|
13
|
-
}
|
|
14
|
-
interface UseUpdateUiSettingFunction {
|
|
15
|
-
(args: UseUpdateUiSettingArgs): UseUpdateUiSetting;
|
|
16
|
-
}
|
|
17
|
-
declare const useUpdateUiSetting: UseUpdateUiSettingFunction;
|
|
18
|
-
export { useUpdateUiSetting };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useCallback } from "react";
|
|
2
|
-
import { v4 as uuid } from "uuid";
|
|
3
|
-
import { useCommand } from "@lookiero/messaging-react";
|
|
4
|
-
import { updateUiSetting } from "../../../../domain/uiSetting/command/updateUiSetting";
|
|
5
|
-
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
6
|
-
const useUpdateUiSetting = ({ logger }) => {
|
|
7
|
-
const [commandBus, status] = useCommand({ contextId: MESSAGING_CONTEXT_ID });
|
|
8
|
-
const update = useCallback(async ({ key, value }) => {
|
|
9
|
-
try {
|
|
10
|
-
await commandBus(updateUiSetting({
|
|
11
|
-
aggregateId: uuid(),
|
|
12
|
-
key,
|
|
13
|
-
value,
|
|
14
|
-
}));
|
|
15
|
-
}
|
|
16
|
-
catch (error) {
|
|
17
|
-
logger.captureException(error);
|
|
18
|
-
}
|
|
19
|
-
}, [commandBus, logger]);
|
|
20
|
-
return [update, status];
|
|
21
|
-
};
|
|
22
|
-
export { useUpdateUiSetting };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
2
|
-
const read = async (key) => {
|
|
3
|
-
const value = await AsyncStorage.getItem(key);
|
|
4
|
-
return value ? JSON.parse(value) : null;
|
|
5
|
-
};
|
|
6
|
-
const write = async (key, value) => AsyncStorage.setItem(key, JSON.stringify(value));
|
|
7
|
-
export { read, write };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { CheckoutQuestionType, } from "../../../projection/checkoutQuestion/checkoutQuestion";
|
|
2
|
-
const checkoutQuestions = [
|
|
3
|
-
{
|
|
4
|
-
id: "efe07b97-f6fb-4b6a-ba92-b68519320b2c",
|
|
5
|
-
name: "checkout_question.selection.question",
|
|
6
|
-
placeholder: "checkout_question.selection.placeholder",
|
|
7
|
-
type: CheckoutQuestionType.HOST_SELECT,
|
|
8
|
-
showCondition: [],
|
|
9
|
-
children: [
|
|
10
|
-
{
|
|
11
|
-
id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
|
|
12
|
-
name: "checkout_question.icon.bad",
|
|
13
|
-
placeholder: "",
|
|
14
|
-
type: CheckoutQuestionType.ICON,
|
|
15
|
-
showCondition: [],
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
id: "85e84a77-461c-41e6-8544-95b5294d0b80",
|
|
19
|
-
name: "checkout_question.icon.regular",
|
|
20
|
-
placeholder: "",
|
|
21
|
-
type: CheckoutQuestionType.ICON,
|
|
22
|
-
showCondition: [],
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
id: "29441d25-8d9f-471e-a13e-a03f61c88091",
|
|
26
|
-
name: "checkout_question.icon.good",
|
|
27
|
-
placeholder: "",
|
|
28
|
-
type: CheckoutQuestionType.ICON,
|
|
29
|
-
showCondition: [],
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: "6a6d3878-5561-412c-96f3-7ed79ee587bb",
|
|
35
|
-
name: "checkout_question.experience.question",
|
|
36
|
-
placeholder: "checkout_question.experience.placeholder",
|
|
37
|
-
type: CheckoutQuestionType.HOST_SELECT,
|
|
38
|
-
showCondition: [],
|
|
39
|
-
children: [
|
|
40
|
-
{
|
|
41
|
-
id: "a3d937b6-7499-4a3c-86bf-5c0af9ab2e23",
|
|
42
|
-
name: "checkout_question.icon.bad",
|
|
43
|
-
placeholder: "",
|
|
44
|
-
type: CheckoutQuestionType.ICON,
|
|
45
|
-
showCondition: [],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: "7970edd3-fb5c-42d3-afe3-ce31bcbb856c",
|
|
49
|
-
name: "checkout_question.icon.regular",
|
|
50
|
-
placeholder: "",
|
|
51
|
-
type: CheckoutQuestionType.ICON,
|
|
52
|
-
showCondition: [],
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: "bab3d4f9-0227-4550-a53f-3c125d68429c",
|
|
56
|
-
name: "checkout_question.icon.good",
|
|
57
|
-
placeholder: "",
|
|
58
|
-
type: CheckoutQuestionType.ICON,
|
|
59
|
-
showCondition: [],
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
id: "a1acdb2d-62c8-467f-b7cc-dc24d967290c",
|
|
65
|
-
name: "checkout_question.personalshopper.question",
|
|
66
|
-
placeholder: "checkout_question.personalshopper.placeholder",
|
|
67
|
-
type: CheckoutQuestionType.HOST_SELECT,
|
|
68
|
-
showCondition: ["68c0bb98-b00a-4b86-af43-528fe903cb69"],
|
|
69
|
-
children: [
|
|
70
|
-
{
|
|
71
|
-
id: "cce7851c-92c7-461b-8dcb-903c5de59ed1",
|
|
72
|
-
name: "checkout_question.personalshopper.yes",
|
|
73
|
-
placeholder: "",
|
|
74
|
-
type: CheckoutQuestionType.BUTTON,
|
|
75
|
-
showCondition: [],
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
id: "4bf8f27d-669b-4d36-8d39-b5599c671816",
|
|
79
|
-
name: "checkout_question.personalshopper.no",
|
|
80
|
-
placeholder: "",
|
|
81
|
-
type: CheckoutQuestionType.BUTTON,
|
|
82
|
-
showCondition: [],
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
id: "ce3e8d57-5eea-4dd3-bef4-2e811a143612",
|
|
88
|
-
name: "checkout_question.comment.question",
|
|
89
|
-
placeholder: "",
|
|
90
|
-
type: CheckoutQuestionType.HOST_TEXTAREA,
|
|
91
|
-
showCondition: [],
|
|
92
|
-
children: [
|
|
93
|
-
{
|
|
94
|
-
id: "1123a37d-bc00-43a4-9d28-cee1dfaf356c",
|
|
95
|
-
name: "checkout_question.comment.question",
|
|
96
|
-
placeholder: "checkout_question.comment.placeholder",
|
|
97
|
-
type: CheckoutQuestionType.TEXTAREA,
|
|
98
|
-
showCondition: [],
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
},
|
|
102
|
-
];
|
|
103
|
-
export { checkoutQuestions };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HttpPostFunction } from "@lookiero/sty-psp-http";
|
|
2
|
-
import { CheckoutQuestionsByCheckoutIdView } from "../../../projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId";
|
|
3
|
-
interface HttpCheckoutQuestionsByCheckoutIdView extends CheckoutQuestionsByCheckoutIdView {
|
|
4
|
-
}
|
|
5
|
-
interface HttpCheckoutQuestionsByCheckoutIdViewFunctionArgs {
|
|
6
|
-
readonly httpPost: HttpPostFunction;
|
|
7
|
-
}
|
|
8
|
-
interface HttpCheckoutQuestionsByCheckoutIdViewFunction {
|
|
9
|
-
(args: HttpCheckoutQuestionsByCheckoutIdViewFunctionArgs): HttpCheckoutQuestionsByCheckoutIdView;
|
|
10
|
-
}
|
|
11
|
-
declare const httpCheckoutQuestionsByCheckoutIdView: HttpCheckoutQuestionsByCheckoutIdViewFunction;
|
|
12
|
-
export { httpCheckoutQuestionsByCheckoutIdView };
|
package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const httpCheckoutQuestionsByCheckoutIdView = ({ httpPost }) => async ({ checkoutId, signal }) => await httpPost({
|
|
2
|
-
endpoint: "/list-checkout-questions-by-checkout-id",
|
|
3
|
-
body: { checkoutId },
|
|
4
|
-
signal,
|
|
5
|
-
result: {
|
|
6
|
-
error: null,
|
|
7
|
-
success: (response) => response.result,
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
export { httpCheckoutQuestionsByCheckoutIdView };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { UseQueryFunctionResult } from "@lookiero/messaging-react";
|
|
2
|
-
import { CheckoutQuestionProjection } from "../../../../projection/checkoutQuestion/checkoutQuestion";
|
|
3
|
-
interface UseListChckoutQuestionsByCheckoutIdFunctionArgs {
|
|
4
|
-
readonly checkoutId: string;
|
|
5
|
-
}
|
|
6
|
-
interface UseListChckoutQuestionsByCheckoutIdFunction {
|
|
7
|
-
(args: UseListChckoutQuestionsByCheckoutIdFunctionArgs): UseQueryFunctionResult<CheckoutQuestionProjection[]>;
|
|
8
|
-
}
|
|
9
|
-
declare const useListCheckoutQuestionsByCheckoutId: UseListChckoutQuestionsByCheckoutIdFunction;
|
|
10
|
-
export { useListCheckoutQuestionsByCheckoutId };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { useQuery } from "@lookiero/messaging-react";
|
|
2
|
-
import { listCheckoutQuestionsByCheckoutId } from "../../../../projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId";
|
|
3
|
-
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
4
|
-
const useListCheckoutQuestionsByCheckoutId = ({ checkoutId }) => useQuery({
|
|
5
|
-
query: listCheckoutQuestionsByCheckoutId({ checkoutId }),
|
|
6
|
-
contextId: MESSAGING_CONTEXT_ID,
|
|
7
|
-
options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
8
|
-
});
|
|
9
|
-
export { useListCheckoutQuestionsByCheckoutId };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { UseQueryFunctionResult } from "@lookiero/messaging-react";
|
|
2
|
-
import { UiSettingProjection } from "../../../../projection/uiSetting/viewUiSettingByKey";
|
|
3
|
-
interface UseViewUiSettingByKeyFunctionArgs {
|
|
4
|
-
readonly key: string;
|
|
5
|
-
}
|
|
6
|
-
interface UseViewUiSettingByKeyFunction {
|
|
7
|
-
(args: UseViewUiSettingByKeyFunctionArgs): UseQueryFunctionResult<UiSettingProjection>;
|
|
8
|
-
}
|
|
9
|
-
declare const useViewUiSettingByKey: UseViewUiSettingByKeyFunction;
|
|
10
|
-
export { useViewUiSettingByKey };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { useQuery } from "@lookiero/messaging-react";
|
|
2
|
-
import { isUiSettingUpdated } from "../../../../domain/uiSetting/model/uiSettingUpdated";
|
|
3
|
-
import { viewUiSettingByKey } from "../../../../projection/uiSetting/viewUiSettingByKey";
|
|
4
|
-
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
5
|
-
const useViewUiSettingByKey = ({ key }) => useQuery({
|
|
6
|
-
query: viewUiSettingByKey({ key }),
|
|
7
|
-
contextId: MESSAGING_CONTEXT_ID,
|
|
8
|
-
invalidation: isUiSettingUpdated,
|
|
9
|
-
options: { refetchOnMount: "always", staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
10
|
-
});
|
|
11
|
-
export { useViewUiSettingByKey };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { UiSettingByKeyView } from "../../../projection/uiSetting/viewUiSettingByKey";
|
|
2
|
-
import { ReadFunction } from "../../persistence/storage";
|
|
3
|
-
import { UiSettingDto } from "../../persistence/uiSettingData";
|
|
4
|
-
interface StorageUiSettingByKeyView extends UiSettingByKeyView {
|
|
5
|
-
}
|
|
6
|
-
interface StorageUiSettingByKeyViewFunctionArgs {
|
|
7
|
-
readonly read: ReadFunction<UiSettingDto>;
|
|
8
|
-
}
|
|
9
|
-
interface StorageUiSettingByKeyViewFunction {
|
|
10
|
-
(args: StorageUiSettingByKeyViewFunctionArgs): StorageUiSettingByKeyView;
|
|
11
|
-
}
|
|
12
|
-
declare const storageUiSettingByKeyView: StorageUiSettingByKeyViewFunction;
|
|
13
|
-
export { storageUiSettingByKeyView };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const toUiSettingProjection = (uiSettingDto) => ({
|
|
2
|
-
id: uiSettingDto.id,
|
|
3
|
-
key: uiSettingDto.key,
|
|
4
|
-
value: uiSettingDto.value,
|
|
5
|
-
});
|
|
6
|
-
const storageUiSettingByKeyView = ({ read }) => async ({ key }) => {
|
|
7
|
-
try {
|
|
8
|
-
const uiSettingDto = await read(key);
|
|
9
|
-
return uiSettingDto ? toUiSettingProjection(uiSettingDto) : null;
|
|
10
|
-
}
|
|
11
|
-
catch (ignored) {
|
|
12
|
-
throw new Error("Could not fetch the uiSetting");
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
export { storageUiSettingByKeyView };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
import { PaymentFlowRef } from "@lookiero/payments-front";
|
|
3
|
-
import { Logger } from "@lookiero/sty-psp-logging";
|
|
4
|
-
import { PaymentFlowPayloadProjection } from "../../../projection/payment/paymentFlowPayload";
|
|
5
|
-
type Status = "idle" | "loading" | "success" | "error";
|
|
6
|
-
interface SubmitCheckoutFunctionArgs {
|
|
7
|
-
readonly paymentFlowPayload: PaymentFlowPayloadProjection;
|
|
8
|
-
readonly sizeChangeEnabled: boolean;
|
|
9
|
-
}
|
|
10
|
-
interface SubmitCheckoutFunction {
|
|
11
|
-
(args: SubmitCheckoutFunctionArgs): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
type UseSubmitCheckoutResult = [submitCheckout: SubmitCheckoutFunction, status: Status];
|
|
14
|
-
interface UseSubmitCheckoutFunctionArgs {
|
|
15
|
-
readonly checkoutId: string;
|
|
16
|
-
readonly checkoutBookingId: string;
|
|
17
|
-
readonly paymentFlowRef: RefObject<PaymentFlowRef>;
|
|
18
|
-
readonly onError: () => void;
|
|
19
|
-
readonly onSuccess?: () => void;
|
|
20
|
-
readonly logger: Logger;
|
|
21
|
-
}
|
|
22
|
-
interface UseSubmitCheckoutFunction {
|
|
23
|
-
(args: UseSubmitCheckoutFunctionArgs): UseSubmitCheckoutResult;
|
|
24
|
-
}
|
|
25
|
-
declare const useSubmitCheckout: UseSubmitCheckoutFunction;
|
|
26
|
-
export type { Status, SubmitCheckoutFunction };
|
|
27
|
-
export { useSubmitCheckout };
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { useCallback, useMemo, useState } from "react";
|
|
2
|
-
import { CommandStatus } from "@lookiero/messaging-react";
|
|
3
|
-
import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
|
|
4
|
-
import { viewCheckoutBookingById, } from "../../../projection/checkoutBooking/viewCheckoutBookingById";
|
|
5
|
-
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
6
|
-
import { useSubmitCheckout as useSubmitCheckoutCommand } from "../../domain/checkout/react/useSubmitCheckout";
|
|
7
|
-
import { useBlockCheckoutBooking } from "../../domain/checkoutBooking/react/useBlockCheckoutBooking";
|
|
8
|
-
import { I18nMessages } from "../i18n/i18n";
|
|
9
|
-
import { useQueryBus } from "./useQueryBus";
|
|
10
|
-
var ChargeStatus;
|
|
11
|
-
(function (ChargeStatus) {
|
|
12
|
-
ChargeStatus["EXECUTED"] = "EXECUTED";
|
|
13
|
-
ChargeStatus["REQUIRES_ACTION"] = "REQUIRES_ACTION";
|
|
14
|
-
ChargeStatus["REQUIRED_ACTION_CANCELLED"] = "REQUIRED_ACTION_CANCELLED";
|
|
15
|
-
ChargeStatus["REJECTED"] = "REJECTED";
|
|
16
|
-
ChargeStatus["CANCELLED"] = "CANCELLED";
|
|
17
|
-
ChargeStatus["TO_CONFIRM"] = "TO_CONFIRM";
|
|
18
|
-
ChargeStatus["ERROR"] = "ERROR";
|
|
19
|
-
ChargeStatus["UNKNOWN"] = "UNKNOWN";
|
|
20
|
-
})(ChargeStatus || (ChargeStatus = {}));
|
|
21
|
-
const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onError, onSuccess, logger, }) => {
|
|
22
|
-
const queryBus = useQueryBus();
|
|
23
|
-
const [submitCheckoutCommand, submitCheckoutCommandStatus] = useSubmitCheckoutCommand({ checkoutId, logger });
|
|
24
|
-
const [blockCheckoutBooking, blockCheckoutBookingStatus] = useBlockCheckoutBooking({ checkoutBookingId, logger });
|
|
25
|
-
const [createNotification] = useCreateToastNotification({ contextId: MESSAGING_CONTEXT_ID, logger });
|
|
26
|
-
const [checkoutBookingExpired, setCheckoutBookingExpired] = useState(false);
|
|
27
|
-
const [startLegacyBoxCheckoutStatus, setStartLegacyBoxCheckoutStatus] = useState("idle");
|
|
28
|
-
const submitCheckout = useCallback(async ({ paymentFlowPayload, sizeChangeEnabled }) => {
|
|
29
|
-
try {
|
|
30
|
-
sizeChangeEnabled && (await blockCheckoutBooking());
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const checkoutBooking = await queryBus(viewCheckoutBookingById({ checkoutBookingId }));
|
|
36
|
-
if (checkoutBooking?.isExpired) {
|
|
37
|
-
setCheckoutBookingExpired(true);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
paymentFlowRef.current?.startLegacyBoxCheckout(
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
42
|
-
// @ts-ignore
|
|
43
|
-
paymentFlowPayload, async ({ status, toaster, final }) => {
|
|
44
|
-
setStartLegacyBoxCheckoutStatus("loading");
|
|
45
|
-
if (final) {
|
|
46
|
-
if (status === ChargeStatus.EXECUTED) {
|
|
47
|
-
setStartLegacyBoxCheckoutStatus("success");
|
|
48
|
-
await submitCheckoutCommand();
|
|
49
|
-
onSuccess?.();
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
createNotification({
|
|
53
|
-
level: NotificationLevel.ERROR,
|
|
54
|
-
bodyI18nKey: toaster?.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
|
|
55
|
-
});
|
|
56
|
-
setStartLegacyBoxCheckoutStatus("error");
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}, [
|
|
61
|
-
queryBus,
|
|
62
|
-
checkoutBookingId,
|
|
63
|
-
paymentFlowRef,
|
|
64
|
-
blockCheckoutBooking,
|
|
65
|
-
submitCheckoutCommand,
|
|
66
|
-
onSuccess,
|
|
67
|
-
createNotification,
|
|
68
|
-
]);
|
|
69
|
-
const status = useMemo(() => {
|
|
70
|
-
if (blockCheckoutBookingStatus === CommandStatus.LOADING ||
|
|
71
|
-
startLegacyBoxCheckoutStatus === "loading" ||
|
|
72
|
-
submitCheckoutCommandStatus === CommandStatus.LOADING) {
|
|
73
|
-
return "loading";
|
|
74
|
-
}
|
|
75
|
-
if (blockCheckoutBookingStatus === CommandStatus.SUCCESS &&
|
|
76
|
-
startLegacyBoxCheckoutStatus === "success" &&
|
|
77
|
-
submitCheckoutCommandStatus === CommandStatus.SUCCESS) {
|
|
78
|
-
return "success";
|
|
79
|
-
}
|
|
80
|
-
if (blockCheckoutBookingStatus === CommandStatus.ERROR ||
|
|
81
|
-
startLegacyBoxCheckoutStatus === "error" ||
|
|
82
|
-
submitCheckoutCommandStatus === CommandStatus.ERROR ||
|
|
83
|
-
checkoutBookingExpired) {
|
|
84
|
-
onError();
|
|
85
|
-
return "error";
|
|
86
|
-
}
|
|
87
|
-
return "idle";
|
|
88
|
-
}, [
|
|
89
|
-
blockCheckoutBookingStatus,
|
|
90
|
-
startLegacyBoxCheckoutStatus,
|
|
91
|
-
submitCheckoutCommandStatus,
|
|
92
|
-
checkoutBookingExpired,
|
|
93
|
-
onError,
|
|
94
|
-
]);
|
|
95
|
-
return [submitCheckout, status];
|
|
96
|
-
};
|
|
97
|
-
export { useSubmitCheckout };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { createContext, useContext } from "react";
|
|
2
|
-
import invariant from "tiny-invariant";
|
|
3
|
-
const BasePathContext = createContext(null);
|
|
4
|
-
export const BasePathProvider = ({ basePath, children }) => (React.createElement(BasePathContext.Provider, { value: basePath }, children));
|
|
5
|
-
export const useBasePath = () => {
|
|
6
|
-
const basePath = useContext(BasePathContext);
|
|
7
|
-
invariant(basePath !== null, "Your are trying to use the useBasePath hook without wrapping your app with the <BasePathProvider>.");
|
|
8
|
-
return basePath;
|
|
9
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import { Subscription } from "../../../../../../projection/subscription/subscription";
|
|
3
|
-
interface CheckoutPaymentModalProps {
|
|
4
|
-
readonly coupon: string | null;
|
|
5
|
-
readonly orderNumber: number;
|
|
6
|
-
readonly isFirstOrder: boolean;
|
|
7
|
-
readonly subscription: Subscription;
|
|
8
|
-
readonly getAuthToken: () => Promise<string>;
|
|
9
|
-
readonly onCheckoutSubmitted?: () => void;
|
|
10
|
-
}
|
|
11
|
-
declare const CheckoutPaymentModal: FC<CheckoutPaymentModalProps>;
|
|
12
|
-
export { CheckoutPaymentModal };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
-
import { useNavigate } from "react-router-native";
|
|
3
|
-
import { QueryStatus } from "@lookiero/messaging-react";
|
|
4
|
-
import { PaymentFlow } from "@lookiero/payments-front";
|
|
5
|
-
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
6
|
-
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
7
|
-
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
8
|
-
import { useViewIsSizeChangeEnabledByCheckoutId } from "../../../../../projection/checkout/react/useViewIsSizeChangeEnabledByCheckoutId";
|
|
9
|
-
import { useViewPaymentFlowPayloadByCheckoutId } from "../../../../../projection/payment/react/useViewPaymentFlowPayloadByCheckoutId";
|
|
10
|
-
import { useViewPricingByCheckoutId } from "../../../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
11
|
-
import { TrackingPage } from "../../../../../tracking/tracking";
|
|
12
|
-
import { useTrackCheckout } from "../../../../../tracking/useTrackCheckout";
|
|
13
|
-
import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
14
|
-
import { useSubmitCheckout } from "../../../../hooks/useSubmitCheckout";
|
|
15
|
-
import { Routes } from "../../../../routing/routes";
|
|
16
|
-
import { useBasePath } from "../../../../routing/useBasePath";
|
|
17
|
-
const CheckoutPaymentModal = ({ coupon, isFirstOrder, subscription, orderNumber, getAuthToken, onCheckoutSubmitted, }) => {
|
|
18
|
-
const paymentFlowRef = useRef(null);
|
|
19
|
-
const logger = useLogger();
|
|
20
|
-
const { customer: { customerId, country, segment }, } = useStaticInfo();
|
|
21
|
-
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
22
|
-
const [paymentFlowPayload] = useViewPaymentFlowPayloadByCheckoutId({
|
|
23
|
-
checkoutId: checkout?.id,
|
|
24
|
-
});
|
|
25
|
-
const [sizeChangeEnabled] = useViewIsSizeChangeEnabledByCheckoutId({ checkoutId: checkout?.id });
|
|
26
|
-
const [pricing] = useViewPricingByCheckoutId({
|
|
27
|
-
checkoutId: checkout?.id,
|
|
28
|
-
queryOptions: { refetchOnMount: true },
|
|
29
|
-
});
|
|
30
|
-
const [authToken, setAuthToken] = useState();
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
const loadAuthToken = async () => setAuthToken(await getAuthToken());
|
|
33
|
-
loadAuthToken();
|
|
34
|
-
}, [getAuthToken]);
|
|
35
|
-
const basePath = useBasePath();
|
|
36
|
-
const navigate = useNavigate();
|
|
37
|
-
const trackCheckout = useTrackCheckout({
|
|
38
|
-
page: TrackingPage.CHECKOUT,
|
|
39
|
-
checkoutId: checkout?.id,
|
|
40
|
-
country,
|
|
41
|
-
segment,
|
|
42
|
-
});
|
|
43
|
-
const handleOnSubmitCheckoutError = useCallback(() => navigate(`${basePath}/${Routes.CHECKOUT}`, { replace: true }), [basePath, navigate]);
|
|
44
|
-
const handleOnSubmitCheckoutSuccess = useCallback(() => {
|
|
45
|
-
const checkoutItemsKept = checkout?.items.filter((checkoutItem) => checkoutItem.status === CheckoutItemStatus.KEPT || checkoutItem.status === CheckoutItemStatus.REPLACED);
|
|
46
|
-
const totalReplacedFor = checkoutItemsKept?.filter(({ replacedFor }) => Boolean(replacedFor)).length || 0;
|
|
47
|
-
trackCheckout({
|
|
48
|
-
totalCheckoutItemsKept: checkoutItemsKept?.length || 0,
|
|
49
|
-
pendingToPay: pricing?.pendingToPay.amount / 100,
|
|
50
|
-
coupon,
|
|
51
|
-
currencyCode: pricing?.pendingToPay.currency,
|
|
52
|
-
isFirstOrder,
|
|
53
|
-
orderNumber,
|
|
54
|
-
totalReplacedFor,
|
|
55
|
-
subscription,
|
|
56
|
-
userId: customerId,
|
|
57
|
-
});
|
|
58
|
-
onCheckoutSubmitted?.();
|
|
59
|
-
}, [
|
|
60
|
-
checkout?.items,
|
|
61
|
-
coupon,
|
|
62
|
-
customerId,
|
|
63
|
-
isFirstOrder,
|
|
64
|
-
onCheckoutSubmitted,
|
|
65
|
-
orderNumber,
|
|
66
|
-
pricing?.pendingToPay.amount,
|
|
67
|
-
pricing?.pendingToPay.currency,
|
|
68
|
-
subscription,
|
|
69
|
-
trackCheckout,
|
|
70
|
-
]);
|
|
71
|
-
const [submitCheckout] = useSubmitCheckout({
|
|
72
|
-
checkoutId: checkout?.id,
|
|
73
|
-
checkoutBookingId: checkout?.checkoutBookingId,
|
|
74
|
-
paymentFlowRef,
|
|
75
|
-
onError: handleOnSubmitCheckoutError,
|
|
76
|
-
onSuccess: handleOnSubmitCheckoutSuccess,
|
|
77
|
-
logger,
|
|
78
|
-
});
|
|
79
|
-
useEffect(() => {
|
|
80
|
-
if (paymentFlowPayload && sizeChangeEnabled !== undefined && pricing !== undefined) {
|
|
81
|
-
submitCheckout({ paymentFlowPayload, sizeChangeEnabled });
|
|
82
|
-
}
|
|
83
|
-
}, [paymentFlowPayload, pricing, sizeChangeEnabled, submitCheckout]);
|
|
84
|
-
const dependenciesLoadedStatuses = [QueryStatus.ERROR, QueryStatus.SUCCESS];
|
|
85
|
-
const dependenciesLoaded = (dependenciesLoadedStatuses.includes(checkoutStatus) || checkout) && authToken;
|
|
86
|
-
if (!dependenciesLoaded)
|
|
87
|
-
return null;
|
|
88
|
-
return React.createElement(PaymentFlow, { ref: paymentFlowRef, token: authToken });
|
|
89
|
-
};
|
|
90
|
-
export { CheckoutPaymentModal };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare enum CheckoutQuestionType {
|
|
2
|
-
HOST_DEFAULT = "HOST_DEFAULT",
|
|
3
|
-
HOST_TEXTAREA = "HOST_TEXTAREA",
|
|
4
|
-
HOST_SELECT = "HOST_SELECT",
|
|
5
|
-
TEXTAREA = "TEXTAREA",
|
|
6
|
-
ICON = "ICON",
|
|
7
|
-
BUTTON = "BUTTON"
|
|
8
|
-
}
|
|
9
|
-
interface CheckoutQuestionProjection {
|
|
10
|
-
readonly id: string;
|
|
11
|
-
readonly name: string;
|
|
12
|
-
readonly placeholder: string;
|
|
13
|
-
readonly type: CheckoutQuestionType;
|
|
14
|
-
readonly children?: CheckoutQuestionProjection[];
|
|
15
|
-
readonly showCondition: string[];
|
|
16
|
-
}
|
|
17
|
-
export { CheckoutQuestionType };
|
|
18
|
-
export type { CheckoutQuestionProjection };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var CheckoutQuestionType;
|
|
2
|
-
(function (CheckoutQuestionType) {
|
|
3
|
-
CheckoutQuestionType["HOST_DEFAULT"] = "HOST_DEFAULT";
|
|
4
|
-
CheckoutQuestionType["HOST_TEXTAREA"] = "HOST_TEXTAREA";
|
|
5
|
-
CheckoutQuestionType["HOST_SELECT"] = "HOST_SELECT";
|
|
6
|
-
CheckoutQuestionType["TEXTAREA"] = "TEXTAREA";
|
|
7
|
-
CheckoutQuestionType["ICON"] = "ICON";
|
|
8
|
-
CheckoutQuestionType["BUTTON"] = "BUTTON";
|
|
9
|
-
})(CheckoutQuestionType || (CheckoutQuestionType = {}));
|
|
10
|
-
export { CheckoutQuestionType };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CancelableQueryViewArgs, Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
|
|
2
|
-
import { CheckoutQuestionProjection } from "./checkoutQuestion";
|
|
3
|
-
declare const LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID = "list_checkout_questions_by_checkout_id";
|
|
4
|
-
interface ListCheckoutQuestionsByCheckoutIdPayload {
|
|
5
|
-
readonly checkoutId: string;
|
|
6
|
-
}
|
|
7
|
-
interface ListCheckoutQuestionsByCheckoutId extends Query<typeof LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID>, ListCheckoutQuestionsByCheckoutIdPayload {
|
|
8
|
-
}
|
|
9
|
-
interface ListCheckoutQuestionsByCheckoutIdFunction {
|
|
10
|
-
(payload: ListCheckoutQuestionsByCheckoutIdPayload): ListCheckoutQuestionsByCheckoutId;
|
|
11
|
-
}
|
|
12
|
-
declare const listCheckoutQuestionsByCheckoutId: ListCheckoutQuestionsByCheckoutIdFunction;
|
|
13
|
-
type ListCheckoutQuestionsByCheckoutIdResult = CheckoutQuestionProjection[] | null;
|
|
14
|
-
interface CheckoutQuestionsByCheckoutIdViewArgs extends CancelableQueryViewArgs {
|
|
15
|
-
readonly checkoutId: string;
|
|
16
|
-
}
|
|
17
|
-
interface CheckoutQuestionsByCheckoutIdView {
|
|
18
|
-
(args: CheckoutQuestionsByCheckoutIdViewArgs): Promise<ListCheckoutQuestionsByCheckoutIdResult>;
|
|
19
|
-
}
|
|
20
|
-
interface ListCheckoutQuestionsByCheckoutIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
|
|
21
|
-
readonly view: CheckoutQuestionsByCheckoutIdView;
|
|
22
|
-
}
|
|
23
|
-
declare const listCheckoutQuestionsByCheckoutIdHandler: QueryHandlerFunction<ListCheckoutQuestionsByCheckoutId, ListCheckoutQuestionsByCheckoutIdResult, ListCheckoutQuestionsByCheckoutIdHandlerFunctionArgs>;
|
|
24
|
-
export type { ListCheckoutQuestionsByCheckoutId, CheckoutQuestionsByCheckoutIdView, ListCheckoutQuestionsByCheckoutIdResult, };
|
|
25
|
-
export { LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID, listCheckoutQuestionsByCheckoutId, listCheckoutQuestionsByCheckoutIdHandler, };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { query, } from "@lookiero/messaging";
|
|
2
|
-
const LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID = "list_checkout_questions_by_checkout_id";
|
|
3
|
-
const listCheckoutQuestionsByCheckoutId = (payload) => ({
|
|
4
|
-
...query({ name: LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID }),
|
|
5
|
-
...payload,
|
|
6
|
-
});
|
|
7
|
-
const listCheckoutQuestionsByCheckoutIdHandler = ({ view, signal }) => async ({ checkoutId }) => view({ checkoutId, signal });
|
|
8
|
-
export { LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID, listCheckoutQuestionsByCheckoutId, listCheckoutQuestionsByCheckoutIdHandler, };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
|
|
2
|
-
interface UiSettingProjection {
|
|
3
|
-
readonly id: string;
|
|
4
|
-
readonly key: string;
|
|
5
|
-
readonly value: unknown;
|
|
6
|
-
}
|
|
7
|
-
declare const VIEW_UI_SETTING_BY_KEY = "view_ui_setting_by_key";
|
|
8
|
-
interface ViewUiSettingByKeyPayload {
|
|
9
|
-
readonly key: string;
|
|
10
|
-
}
|
|
11
|
-
interface ViewUiSettingByKey extends Query<typeof VIEW_UI_SETTING_BY_KEY>, ViewUiSettingByKeyPayload {
|
|
12
|
-
}
|
|
13
|
-
interface ViewUiSettingByKeyFunction {
|
|
14
|
-
(payload: ViewUiSettingByKeyPayload): ViewUiSettingByKey;
|
|
15
|
-
}
|
|
16
|
-
declare const viewUiSettingByKey: ViewUiSettingByKeyFunction;
|
|
17
|
-
type ViewUiSettingByKeyResult = UiSettingProjection | null;
|
|
18
|
-
interface UiSettingByKeyViewArgs {
|
|
19
|
-
readonly key: string;
|
|
20
|
-
}
|
|
21
|
-
interface UiSettingByKeyView {
|
|
22
|
-
(args: UiSettingByKeyViewArgs): Promise<ViewUiSettingByKeyResult>;
|
|
23
|
-
}
|
|
24
|
-
interface ViewUiSettingByKeyHandlerFunctionArgs extends QueryHandlerFunctionArgs {
|
|
25
|
-
readonly view: UiSettingByKeyView;
|
|
26
|
-
}
|
|
27
|
-
declare const viewUiSettingByKeyHandler: QueryHandlerFunction<ViewUiSettingByKey, ViewUiSettingByKeyResult, ViewUiSettingByKeyHandlerFunctionArgs>;
|
|
28
|
-
export type { UiSettingProjection, UiSettingByKeyView };
|
|
29
|
-
export { VIEW_UI_SETTING_BY_KEY, viewUiSettingByKey, viewUiSettingByKeyHandler };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { query } from "@lookiero/messaging";
|
|
2
|
-
const VIEW_UI_SETTING_BY_KEY = "view_ui_setting_by_key";
|
|
3
|
-
const viewUiSettingByKey = (payload) => ({
|
|
4
|
-
...query({ name: VIEW_UI_SETTING_BY_KEY }),
|
|
5
|
-
...payload,
|
|
6
|
-
});
|
|
7
|
-
const viewUiSettingByKeyHandler = ({ view }) => async ({ key }) => view({ key });
|
|
8
|
-
export { VIEW_UI_SETTING_BY_KEY, viewUiSettingByKey, viewUiSettingByKeyHandler };
|