@lookiero/checkout 8.17.1-beta.0 → 8.18.0
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/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +3 -3
- package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +87 -66
- package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +261 -198
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +87 -66
- package/dist/pact.config.d.ts +0 -13
- package/dist/pact.config.js +0 -9
- 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/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.d.ts +0 -3
- package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.js +0 -27
- package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +0 -48
- package/dist/src/infrastructure/projection/checkout/checkout.mock.d.ts +0 -19
- package/dist/src/infrastructure/projection/checkout/checkout.mock.js +0 -21
- package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +0 -109
- package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +0 -49
- package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +0 -44
- package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +0 -44
- package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +0 -44
- package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.d.ts +0 -3
- package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.js +0 -6
- package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +0 -49
- package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.d.ts +0 -15
- package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.js +0 -43
- package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +0 -50
- 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.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +0 -48
- package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +0 -109
- package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.d.ts +0 -6
- package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.js +0 -183
- package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +0 -48
- package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +0 -9
- package/dist/src/infrastructure/projection/pricing/pricing.mock.js +0 -42
- package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +0 -48
- package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +0 -3
- package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.js +0 -400
- package/dist/src/infrastructure/ui/views/App.style.d.ts +0 -6
- package/dist/src/infrastructure/ui/views/App.style.js +0 -7
- package/dist/src/projection/returnQuestion/returnQuestion.constants.d.ts +0 -9
- package/dist/src/projection/returnQuestion/returnQuestion.constants.js +0 -10
- package/dist/src/projection/returnQuestion/returnQuestion.metadata.d.ts +0 -12
- package/dist/src/projection/returnQuestion/returnQuestion.metadata.js +0 -1
- package/dist/src/projection/returnQuestion/returnQuestion.typeguard.d.ts +0 -5
- package/dist/src/projection/returnQuestion/returnQuestion.typeguard.js +0 -10
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { MatchersV3, PactV3 } from "@pact-foundation/pact";
|
|
2
|
-
import { fetchHttpPost } from "@lookiero/sty-psp-http";
|
|
3
|
-
import { AUTH_TOKEN, DEFAULT_PACT_OPTIONS, DEFAULT_REQUEST_HEADERS, DEFAULT_RESPONSE_HEADERS, fromMockServerUrlToApiUrl, } from "../../../../pact.config";
|
|
4
|
-
import { httpPricingByCheckoutIdView } from "./httpPricingByCheckoutIdView";
|
|
5
|
-
import { pricing } from "./pricing.mock";
|
|
6
|
-
const provider = new PactV3({
|
|
7
|
-
...DEFAULT_PACT_OPTIONS,
|
|
8
|
-
consumer: "STY-BOX_CHECKOUT-FRONT",
|
|
9
|
-
provider: "STY-BOX_CHECKOUT-BACK_ViewPricingByCheckoutId",
|
|
10
|
-
});
|
|
11
|
-
const checkoutId = "6f720954-8039-4bed-9596-34fc5a02131b";
|
|
12
|
-
const pricingResponse = {
|
|
13
|
-
result: pricing(),
|
|
14
|
-
};
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
const EXPECTED_BODY = MatchersV3.like(pricingResponse);
|
|
18
|
-
describe("STY-BOX_CHECKOUT-BACK_ViewPricingByCheckoutId API", () => {
|
|
19
|
-
it("returns a valid pricing for the given checkout", () => {
|
|
20
|
-
provider
|
|
21
|
-
.given("a valid pricing for the given checkout")
|
|
22
|
-
.uponReceiving("pricing projection")
|
|
23
|
-
.withRequest({
|
|
24
|
-
method: "POST",
|
|
25
|
-
path: "/api/view-pricing-by-checkout-id",
|
|
26
|
-
headers: DEFAULT_REQUEST_HEADERS,
|
|
27
|
-
body: { checkoutId },
|
|
28
|
-
})
|
|
29
|
-
.willRespondWith({
|
|
30
|
-
status: 200,
|
|
31
|
-
headers: DEFAULT_RESPONSE_HEADERS,
|
|
32
|
-
body: EXPECTED_BODY,
|
|
33
|
-
});
|
|
34
|
-
return provider.executeTest(async (mockserver) => {
|
|
35
|
-
const httpPost = fetchHttpPost({
|
|
36
|
-
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
37
|
-
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
38
|
-
device: "web",
|
|
39
|
-
version: "1.0.0",
|
|
40
|
-
});
|
|
41
|
-
const response = await httpPricingByCheckoutIdView({ httpPost })({
|
|
42
|
-
checkoutId,
|
|
43
|
-
signal: undefined,
|
|
44
|
-
});
|
|
45
|
-
expect(response).toStrictEqual(pricingResponse.result);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PricingProjection } from "../../../projection/pricing/pricing";
|
|
2
|
-
interface PricingFunctionArgs {
|
|
3
|
-
readonly paidWithPromocode: boolean;
|
|
4
|
-
}
|
|
5
|
-
interface PricingFunction {
|
|
6
|
-
(args?: PricingFunctionArgs): PricingProjection;
|
|
7
|
-
}
|
|
8
|
-
declare const pricing: PricingFunction;
|
|
9
|
-
export { pricing };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Currency } from "../../../domain/checkoutItem/model/currency";
|
|
2
|
-
const pricing = ({ paidWithPromocode } = { paidWithPromocode: false }) => ({
|
|
3
|
-
orderTotal: {
|
|
4
|
-
amount: 18301,
|
|
5
|
-
currency: Currency.EUR,
|
|
6
|
-
},
|
|
7
|
-
pendingToPay: {
|
|
8
|
-
amount: 16301,
|
|
9
|
-
currency: Currency.EUR,
|
|
10
|
-
},
|
|
11
|
-
subtotal: {
|
|
12
|
-
amount: 21801,
|
|
13
|
-
currency: Currency.EUR,
|
|
14
|
-
},
|
|
15
|
-
discount: {
|
|
16
|
-
amount: -2500,
|
|
17
|
-
currency: Currency.EUR,
|
|
18
|
-
},
|
|
19
|
-
discountPercentage: 25,
|
|
20
|
-
balanceDiscount: {
|
|
21
|
-
amount: -2000,
|
|
22
|
-
currency: Currency.EUR,
|
|
23
|
-
},
|
|
24
|
-
service: {
|
|
25
|
-
reference: "LK-service",
|
|
26
|
-
originalPrice: {
|
|
27
|
-
amount: 10.0,
|
|
28
|
-
currency: Currency.EUR,
|
|
29
|
-
},
|
|
30
|
-
discount: {
|
|
31
|
-
amount: 0,
|
|
32
|
-
currency: Currency.EUR,
|
|
33
|
-
},
|
|
34
|
-
finalPrice: {
|
|
35
|
-
amount: -1000,
|
|
36
|
-
currency: Currency.EUR,
|
|
37
|
-
},
|
|
38
|
-
prepaid: true,
|
|
39
|
-
paidWithPromocode,
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
export { pricing };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { MatchersV3, PactV3 } from "@pact-foundation/pact";
|
|
2
|
-
import { fetchHttpPost } from "@lookiero/sty-psp-http";
|
|
3
|
-
import { AUTH_TOKEN, DEFAULT_PACT_OPTIONS, DEFAULT_REQUEST_HEADERS, DEFAULT_RESPONSE_HEADERS, fromMockServerUrlToApiUrl, } from "../../../../pact.config";
|
|
4
|
-
import { httpReturnQuestionsByCheckoutItemIdView } from "./httpReturnQuestionsByCheckoutItemIdView";
|
|
5
|
-
import { returnQuestions } from "./returnQuestions.mock";
|
|
6
|
-
const provider = new PactV3({
|
|
7
|
-
...DEFAULT_PACT_OPTIONS,
|
|
8
|
-
consumer: "STY-BOX_CHECKOUT-FRONT",
|
|
9
|
-
provider: "STY-BOX_CHECKOUT-BACK_ListReturnQuestionsByCheckoutItemId",
|
|
10
|
-
});
|
|
11
|
-
const checkoutItemId = "52440ae5-7a4c-498b-8b35-08ecfde15776";
|
|
12
|
-
const returnQuestionsResponse = {
|
|
13
|
-
result: returnQuestions,
|
|
14
|
-
};
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
const EXPECTED_BODY = MatchersV3.like(returnQuestionsResponse);
|
|
18
|
-
describe("STY-BOX_CHECKOUT-BACK_ListReturnQuestionsByCheckoutItemId API", () => {
|
|
19
|
-
it("returns a valid return questions for the given checkout item id", () => {
|
|
20
|
-
provider
|
|
21
|
-
.given("a valid return questions for the given checkout item id")
|
|
22
|
-
.uponReceiving("return questions projection")
|
|
23
|
-
.withRequest({
|
|
24
|
-
method: "POST",
|
|
25
|
-
path: "/api/list-return-questions-by-checkout-item-id",
|
|
26
|
-
headers: DEFAULT_REQUEST_HEADERS,
|
|
27
|
-
body: { checkoutItemId },
|
|
28
|
-
})
|
|
29
|
-
.willRespondWith({
|
|
30
|
-
status: 200,
|
|
31
|
-
headers: DEFAULT_RESPONSE_HEADERS,
|
|
32
|
-
body: EXPECTED_BODY,
|
|
33
|
-
});
|
|
34
|
-
return provider.executeTest(async (mockserver) => {
|
|
35
|
-
const httpPost = fetchHttpPost({
|
|
36
|
-
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
37
|
-
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
38
|
-
device: "web",
|
|
39
|
-
version: "1.0.0",
|
|
40
|
-
});
|
|
41
|
-
const response = await httpReturnQuestionsByCheckoutItemIdView({ httpPost })({
|
|
42
|
-
checkoutItemId,
|
|
43
|
-
signal: undefined,
|
|
44
|
-
});
|
|
45
|
-
expect(response).toStrictEqual(returnQuestionsResponse.result);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
});
|
|
@@ -1,400 +0,0 @@
|
|
|
1
|
-
import { ReturnQuestionType } from "../../../projection/returnQuestion/returnQuestion";
|
|
2
|
-
const returnQuestions = [
|
|
3
|
-
{
|
|
4
|
-
id: "efe07b97-f6fb-4b6a-ba92-b68519320b2c",
|
|
5
|
-
name: "main_title",
|
|
6
|
-
placeholder: "",
|
|
7
|
-
type: ReturnQuestionType.HOST_DEFAULT,
|
|
8
|
-
children: [
|
|
9
|
-
{
|
|
10
|
-
id: "ed396b68-1436-48ab-842f-fbfea996fad4",
|
|
11
|
-
name: "size",
|
|
12
|
-
placeholder: "size_placeholder",
|
|
13
|
-
type: ReturnQuestionType.HOST_SELECT,
|
|
14
|
-
children: [
|
|
15
|
-
{
|
|
16
|
-
id: "0ad1dba8-b02c-4121-a1e3-981f1c30800d",
|
|
17
|
-
name: "size_title",
|
|
18
|
-
placeholder: "",
|
|
19
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
20
|
-
children: [
|
|
21
|
-
{
|
|
22
|
-
id: "9251dc2c-d76a-484d-9299-346929af932f",
|
|
23
|
-
name: "size_large",
|
|
24
|
-
placeholder: "",
|
|
25
|
-
type: ReturnQuestionType.OPTION,
|
|
26
|
-
children: [
|
|
27
|
-
{
|
|
28
|
-
id: "542c4d24-e1da-484f-8c3a-7d89ee135adc",
|
|
29
|
-
name: "",
|
|
30
|
-
placeholder: "",
|
|
31
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
32
|
-
children: [
|
|
33
|
-
{
|
|
34
|
-
id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
|
|
35
|
-
name: "size_overall",
|
|
36
|
-
placeholder: "",
|
|
37
|
-
type: ReturnQuestionType.OPTION,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: "85e84a77-461c-41e6-8544-95b5294d0b80",
|
|
41
|
-
name: "size_trousers_too_long",
|
|
42
|
-
placeholder: "",
|
|
43
|
-
type: ReturnQuestionType.OPTION,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: "29441d25-8d9f-471e-a13e-a03f61c88091",
|
|
47
|
-
name: "size_fit_cut_does_not_fit",
|
|
48
|
-
placeholder: "",
|
|
49
|
-
type: ReturnQuestionType.OPTION,
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: "a081c3e9-1904-4a60-8899-b72c1a3a0291",
|
|
57
|
-
name: "size_correct",
|
|
58
|
-
placeholder: "",
|
|
59
|
-
type: ReturnQuestionType.OPTION,
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: "624cce3d-bd86-463a-b16b-c862ad73d5f3",
|
|
63
|
-
name: "size_small",
|
|
64
|
-
placeholder: "",
|
|
65
|
-
type: ReturnQuestionType.OPTION,
|
|
66
|
-
children: [
|
|
67
|
-
{
|
|
68
|
-
id: "58e5ae9a-bc0d-4d27-b267-854a51c2a79a",
|
|
69
|
-
name: "",
|
|
70
|
-
placeholder: "",
|
|
71
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
72
|
-
children: [
|
|
73
|
-
{
|
|
74
|
-
id: "6a3d11fc-570c-4085-a850-1967228cdd4c",
|
|
75
|
-
name: "size_overall",
|
|
76
|
-
placeholder: "",
|
|
77
|
-
type: ReturnQuestionType.OPTION,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: "c27e1936-deea-4dbe-a8f1-fe4fb8564deb",
|
|
81
|
-
name: "size_trousers_too_short",
|
|
82
|
-
placeholder: "",
|
|
83
|
-
type: ReturnQuestionType.OPTION,
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: "e77232ae-eeec-4722-b2d3-f5c0d34fd0ca",
|
|
87
|
-
name: "size_fit_cut_does_not_fit",
|
|
88
|
-
placeholder: "",
|
|
89
|
-
type: ReturnQuestionType.OPTION,
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
id: "6a6d3878-5561-412c-96f3-7ed79ee587bb",
|
|
101
|
-
name: "style",
|
|
102
|
-
placeholder: "style_placeholder",
|
|
103
|
-
type: ReturnQuestionType.HOST_SELECT,
|
|
104
|
-
children: [
|
|
105
|
-
{
|
|
106
|
-
id: "fd7ff4a0-78ed-4c0d-aa4d-64962739c322",
|
|
107
|
-
name: "style_title",
|
|
108
|
-
placeholder: "",
|
|
109
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
110
|
-
children: [
|
|
111
|
-
{
|
|
112
|
-
id: "56631448-d33d-49fb-b3f8-4486b68b60c3",
|
|
113
|
-
name: "style_i_love_it_but",
|
|
114
|
-
placeholder: "",
|
|
115
|
-
type: ReturnQuestionType.OPTION,
|
|
116
|
-
children: [
|
|
117
|
-
{
|
|
118
|
-
id: "90329d91-bd5d-4439-bb0a-b338caaeff2b",
|
|
119
|
-
name: "",
|
|
120
|
-
placeholder: "",
|
|
121
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
122
|
-
children: [
|
|
123
|
-
{
|
|
124
|
-
id: "a3d937b6-7499-4a3c-86bf-5c0af9ab2e23",
|
|
125
|
-
name: "style_i_already_have_something_similar",
|
|
126
|
-
placeholder: "",
|
|
127
|
-
type: ReturnQuestionType.OPTION,
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
id: "7970edd3-fb5c-42d3-afe3-ce31bcbb856c",
|
|
131
|
-
name: "style_very_basic_simple",
|
|
132
|
-
placeholder: "",
|
|
133
|
-
type: ReturnQuestionType.OPTION,
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: "bab3d4f9-0227-4550-a53f-3c125d68429c",
|
|
137
|
-
name: "style_i_dont_need_it_at_the_moment",
|
|
138
|
-
placeholder: "",
|
|
139
|
-
type: ReturnQuestionType.OPTION,
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
},
|
|
143
|
-
],
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
id: "5287d1df-a28a-42cd-9138-01f82aeea4c2",
|
|
147
|
-
name: "style_i_like_it_but",
|
|
148
|
-
placeholder: "",
|
|
149
|
-
type: ReturnQuestionType.OPTION,
|
|
150
|
-
children: [
|
|
151
|
-
{
|
|
152
|
-
id: "35b86395-6b6b-4a39-ab16-05511f58acdd",
|
|
153
|
-
name: "",
|
|
154
|
-
placeholder: "",
|
|
155
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
156
|
-
children: [
|
|
157
|
-
{
|
|
158
|
-
id: "e1f6ac53-f203-4b32-9ff0-782c028d9e95",
|
|
159
|
-
name: "style_i_already_have_something_similar",
|
|
160
|
-
placeholder: "",
|
|
161
|
-
type: ReturnQuestionType.OPTION,
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
id: "12875926-b67a-4ad3-852c-1608c7dcc558",
|
|
165
|
-
name: "style_very_basic_simple",
|
|
166
|
-
placeholder: "",
|
|
167
|
-
type: ReturnQuestionType.OPTION,
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
id: "a5eb96bf-73d4-4df5-8ad8-097410b24526",
|
|
171
|
-
name: "style_i_dont_need_it_at_the_moment",
|
|
172
|
-
placeholder: "",
|
|
173
|
-
type: ReturnQuestionType.OPTION,
|
|
174
|
-
},
|
|
175
|
-
],
|
|
176
|
-
},
|
|
177
|
-
],
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
id: "757107a9-8e2d-4194-a7fe-0d55cde49c11",
|
|
181
|
-
name: "style_not_bad_but",
|
|
182
|
-
placeholder: "",
|
|
183
|
-
type: ReturnQuestionType.OPTION,
|
|
184
|
-
children: [
|
|
185
|
-
{
|
|
186
|
-
id: "c6f75ee3-a445-4103-a682-f0c3a742108d",
|
|
187
|
-
name: "",
|
|
188
|
-
placeholder: "",
|
|
189
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
190
|
-
children: [
|
|
191
|
-
{
|
|
192
|
-
id: "4f46d4b1-b103-43b2-b669-be721ab46e03",
|
|
193
|
-
name: "style_i_dont_like_the_color",
|
|
194
|
-
placeholder: "",
|
|
195
|
-
type: ReturnQuestionType.OPTION,
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
id: "48412165-5e05-4806-8e21-ea59c41d0479",
|
|
199
|
-
name: "style_very_basic_simple",
|
|
200
|
-
placeholder: "",
|
|
201
|
-
type: ReturnQuestionType.OPTION,
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
id: "51262c01-eaa3-4d3a-aeb9-95dc8b0dd687",
|
|
205
|
-
name: "style_i_dont_like_the_fabric",
|
|
206
|
-
placeholder: "",
|
|
207
|
-
type: ReturnQuestionType.OPTION,
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
id: "9dea1c2b-4f8c-4192-a547-999df55e77e4",
|
|
211
|
-
name: "style_i_dont_like_the_print",
|
|
212
|
-
placeholder: "",
|
|
213
|
-
type: ReturnQuestionType.OPTION,
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
id: "b1277bf3-4bbb-487a-8e58-88efecc61c3f",
|
|
217
|
-
name: "style_not_my_style_in_general",
|
|
218
|
-
placeholder: "",
|
|
219
|
-
type: ReturnQuestionType.OPTION,
|
|
220
|
-
},
|
|
221
|
-
],
|
|
222
|
-
},
|
|
223
|
-
],
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
id: "8a9cd6f8-db4b-4904-8a48-3d9bbd6f7a69",
|
|
227
|
-
name: "style_i_dont_like",
|
|
228
|
-
placeholder: "",
|
|
229
|
-
type: ReturnQuestionType.OPTION,
|
|
230
|
-
children: [
|
|
231
|
-
{
|
|
232
|
-
id: "f604240d-c093-4a9e-ab85-4adc0744066a",
|
|
233
|
-
name: "",
|
|
234
|
-
placeholder: "",
|
|
235
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
236
|
-
children: [
|
|
237
|
-
{
|
|
238
|
-
id: "42dbbb93-7808-4ac3-8431-582f812cb314",
|
|
239
|
-
name: "style_i_dont_like_the_color",
|
|
240
|
-
placeholder: "",
|
|
241
|
-
type: ReturnQuestionType.OPTION,
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
id: "af1ade81-7b22-4f7e-a505-2ae275a6440f",
|
|
245
|
-
name: "style_very_basic_simple",
|
|
246
|
-
placeholder: "",
|
|
247
|
-
type: ReturnQuestionType.OPTION,
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
id: "26d073b4-2588-4391-9b4c-e8e4a8eba2a8",
|
|
251
|
-
name: "style_i_dont_like_the_fabric",
|
|
252
|
-
placeholder: "",
|
|
253
|
-
type: ReturnQuestionType.OPTION,
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
id: "ee50ab07-b7a6-415e-a04a-c9f350396185",
|
|
257
|
-
name: "style_i_dont_like_the_print",
|
|
258
|
-
placeholder: "",
|
|
259
|
-
type: ReturnQuestionType.OPTION,
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
id: "ce3227e4-851e-47b7-98c1-c63a402e8477",
|
|
263
|
-
name: "style_not_my_style_in_general",
|
|
264
|
-
placeholder: "",
|
|
265
|
-
type: ReturnQuestionType.OPTION,
|
|
266
|
-
},
|
|
267
|
-
],
|
|
268
|
-
},
|
|
269
|
-
],
|
|
270
|
-
},
|
|
271
|
-
],
|
|
272
|
-
},
|
|
273
|
-
],
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
id: "a1acdb2d-62c8-467f-b7cc-dc24d967290c",
|
|
277
|
-
name: "quality",
|
|
278
|
-
placeholder: "quality_placeholder",
|
|
279
|
-
type: ReturnQuestionType.HOST_SELECT,
|
|
280
|
-
children: [
|
|
281
|
-
{
|
|
282
|
-
id: "405de847-188f-46c1-b66d-941c22a6b7a9",
|
|
283
|
-
name: "quality_title",
|
|
284
|
-
placeholder: "",
|
|
285
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
286
|
-
children: [
|
|
287
|
-
{
|
|
288
|
-
id: "cce7851c-92c7-461b-8dcb-903c5de59ed1",
|
|
289
|
-
name: "quality_good",
|
|
290
|
-
placeholder: "",
|
|
291
|
-
type: ReturnQuestionType.OPTION,
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
id: "4bf8f27d-669b-4d36-8d39-b5599c671816",
|
|
295
|
-
name: "quality_regular",
|
|
296
|
-
placeholder: "",
|
|
297
|
-
type: ReturnQuestionType.OPTION,
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
id: "48bfe766-92c0-4ff5-a793-e107b60786ff",
|
|
301
|
-
name: "quality_bad",
|
|
302
|
-
placeholder: "",
|
|
303
|
-
type: ReturnQuestionType.OPTION,
|
|
304
|
-
},
|
|
305
|
-
],
|
|
306
|
-
},
|
|
307
|
-
],
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
id: "f25ccdcf-b648-479e-b4a1-86129e3e8c0b",
|
|
311
|
-
name: "price",
|
|
312
|
-
placeholder: "price_placeholder",
|
|
313
|
-
type: ReturnQuestionType.HOST_SELECT,
|
|
314
|
-
children: [
|
|
315
|
-
{
|
|
316
|
-
id: "b0e0463c-787f-4d6c-adf3-5151ab6fc959",
|
|
317
|
-
name: "price_title",
|
|
318
|
-
placeholder: "",
|
|
319
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
320
|
-
children: [
|
|
321
|
-
{
|
|
322
|
-
id: "9c59e396-4135-4255-9437-22555837d686",
|
|
323
|
-
name: "price_expensive",
|
|
324
|
-
placeholder: "",
|
|
325
|
-
type: ReturnQuestionType.OPTION,
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
id: "10db17f8-0982-49ee-9aeb-f752d953654c",
|
|
329
|
-
name: "price_cheap",
|
|
330
|
-
placeholder: "",
|
|
331
|
-
type: ReturnQuestionType.OPTION,
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
id: "acf64bb3-b91b-48e7-bba1-0541620ed1c5",
|
|
335
|
-
name: "price_fair",
|
|
336
|
-
placeholder: "",
|
|
337
|
-
type: ReturnQuestionType.OPTION,
|
|
338
|
-
},
|
|
339
|
-
],
|
|
340
|
-
},
|
|
341
|
-
],
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
id: "b7ad1665-5e54-4ee4-b455-e7189f33083c",
|
|
345
|
-
name: "others",
|
|
346
|
-
placeholder: "others_placeholder",
|
|
347
|
-
type: ReturnQuestionType.HOST_SELECT,
|
|
348
|
-
children: [
|
|
349
|
-
{
|
|
350
|
-
id: "32cd0ef9-78d7-4605-a279-556749b36d4a",
|
|
351
|
-
name: "others_title",
|
|
352
|
-
placeholder: "",
|
|
353
|
-
type: ReturnQuestionType.HOST_STACK,
|
|
354
|
-
children: [
|
|
355
|
-
{
|
|
356
|
-
id: "95c4fd13-9ca3-45a6-8795-23415bbd0a5e",
|
|
357
|
-
name: "others_i_dont_like_the_brand",
|
|
358
|
-
placeholder: "",
|
|
359
|
-
type: ReturnQuestionType.OPTION,
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
id: "f25c63bd-42d3-4242-9b81-927025aa9d67",
|
|
363
|
-
name: "others_different_from_preview",
|
|
364
|
-
placeholder: "",
|
|
365
|
-
type: ReturnQuestionType.OPTION,
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
id: "0e0b16c1-a721-4a14-aea6-e0cf5c262222",
|
|
369
|
-
name: "others_delivery_delay",
|
|
370
|
-
placeholder: "",
|
|
371
|
-
type: ReturnQuestionType.OPTION,
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
id: "11699ae8-325d-429c-9c05-ff2d6cc45d54",
|
|
375
|
-
name: "others_item_is_defective",
|
|
376
|
-
placeholder: "",
|
|
377
|
-
type: ReturnQuestionType.OPTION,
|
|
378
|
-
},
|
|
379
|
-
],
|
|
380
|
-
},
|
|
381
|
-
],
|
|
382
|
-
},
|
|
383
|
-
],
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
id: "ce3e8d57-5eea-4dd3-bef4-2e811a143612",
|
|
387
|
-
name: "comment_title",
|
|
388
|
-
placeholder: "",
|
|
389
|
-
type: ReturnQuestionType.HOST_TEXTAREA,
|
|
390
|
-
children: [
|
|
391
|
-
{
|
|
392
|
-
id: "1123a37d-bc00-43a4-9d28-cee1dfaf356c",
|
|
393
|
-
name: "comment_textarea",
|
|
394
|
-
placeholder: "comment_textarea_placeholder",
|
|
395
|
-
type: ReturnQuestionType.TEXTAREA,
|
|
396
|
-
},
|
|
397
|
-
],
|
|
398
|
-
},
|
|
399
|
-
];
|
|
400
|
-
export { returnQuestions };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var ReturnQuestionType;
|
|
2
|
-
(function (ReturnQuestionType) {
|
|
3
|
-
ReturnQuestionType["HOST_DEFAULT"] = "HOST_DEFAULT";
|
|
4
|
-
ReturnQuestionType["HOST_TEXTAREA"] = "HOST_TEXTAREA";
|
|
5
|
-
ReturnQuestionType["HOST_SELECT"] = "HOST_SELECT";
|
|
6
|
-
ReturnQuestionType["HOST_STACK"] = "HOST_STACK";
|
|
7
|
-
ReturnQuestionType["TEXTAREA"] = "TEXTAREA";
|
|
8
|
-
ReturnQuestionType["OPTION"] = "OPTION";
|
|
9
|
-
})(ReturnQuestionType || (ReturnQuestionType = {}));
|
|
10
|
-
export { ReturnQuestionType };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { EmptyObject } from "@lookiero/sty-psp-typescript";
|
|
2
|
-
import { ReturnQuestionType } from "./returnQuestion.constants";
|
|
3
|
-
interface ComponentPlaceholder {
|
|
4
|
-
readonly placeholder: string;
|
|
5
|
-
}
|
|
6
|
-
type MetadataDictionary = Record<ReturnQuestionType, EmptyObject>;
|
|
7
|
-
type ComponentMetadata = MetadataDictionary & {
|
|
8
|
-
[ReturnQuestionType.HOST_SELECT]: ComponentPlaceholder;
|
|
9
|
-
[ReturnQuestionType.TEXTAREA]: ComponentPlaceholder;
|
|
10
|
-
};
|
|
11
|
-
type Metadata<RQT extends ReturnQuestionType> = ComponentMetadata[RQT];
|
|
12
|
-
export type { Metadata };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import { ReturnQuestionType } from "./returnQuestion.constants";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ReturnQuestionProjection, ReturnQuestionTypesWithChildren } from "./returnQuestion";
|
|
2
|
-
import { ReturnQuestionType } from "./returnQuestion.constants";
|
|
3
|
-
declare const returnQuestionWithTranslationKey: (question: ReturnQuestionProjection) => question is ReturnQuestionProjection<ReturnQuestionType.HOST_DEFAULT | ReturnQuestionType.HOST_TEXTAREA | ReturnQuestionType.HOST_SELECT | ReturnQuestionType.TEXTAREA | ReturnQuestionType.OPTION>;
|
|
4
|
-
declare const returnQuestionHasChildren: (question: ReturnQuestionProjection) => question is ReturnQuestionProjection<ReturnQuestionTypesWithChildren>;
|
|
5
|
-
export { returnQuestionWithTranslationKey, returnQuestionHasChildren };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ReturnQuestionType } from "./returnQuestion.constants";
|
|
2
|
-
const returnQuestionWithTranslationKey = (question) => Boolean(question.translationKey);
|
|
3
|
-
const returnQuestionHasChildren = (question) => [
|
|
4
|
-
ReturnQuestionType.HOST_DEFAULT,
|
|
5
|
-
ReturnQuestionType.HOST_SELECT,
|
|
6
|
-
ReturnQuestionType.HOST_STACK,
|
|
7
|
-
ReturnQuestionType.HOST_TEXTAREA,
|
|
8
|
-
ReturnQuestionType.OPTION,
|
|
9
|
-
].includes(question.type);
|
|
10
|
-
export { returnQuestionWithTranslationKey, returnQuestionHasChildren };
|