@ikas/storefront 2.0.20 → 2.0.21
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/build/__generated__/global-types.d.ts +5 -0
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy4.js +1 -1
- package/build/api/blog/__generated__/getBlog.d.ts +5 -1
- package/build/api/blog/__generated__/listBlog.d.ts +5 -1
- package/build/api/blog/__generated__/listBlogCategory.d.ts +5 -1
- package/build/api/blog/__generated__/listBlogMetaData.d.ts +5 -1
- package/build/api/cart/__generated__/getCart.d.ts +4 -2
- package/build/api/cart/__generated__/saveItemToCart.d.ts +4 -2
- package/build/api/checkout/__generated__/getCheckoutById.d.ts +4 -2
- package/build/api/checkout/__generated__/getOrder.d.ts +11 -5
- package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +11 -5
- package/build/api/customer/__generated__/customerLogin.d.ts +2 -1
- package/build/api/customer/__generated__/customerSocialLogin.d.ts +2 -1
- package/build/api/customer/__generated__/getCustomerOrders.d.ts +11 -5
- package/build/api/customer/__generated__/getMyCustomer.d.ts +2 -1
- package/build/api/customer/__generated__/registerCustomer.d.ts +2 -1
- package/build/api/customer/__generated__/saveMyCustomer.d.ts +2 -1
- package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +5 -1
- package/build/api/html-meta-data/__generated__/listHTMLMetaData.d.ts +10 -0
- package/build/api/html-meta-data/index.js +1 -1
- package/build/api/index.d.ts +1 -1
- package/build/api/{product-campanign → product-campaign}/__generated__/getProductCampaigns.d.ts +1 -0
- package/build/api/{product-campanign → product-campaign}/index.d.ts +0 -0
- package/build/api/product-campaign/index.js +1 -0
- package/build/api/raffle/__generated__/listRaffle.d.ts +5 -1
- package/build/api/variant-type/__generated__/listVariantType.d.ts +6 -2
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/model.js +1 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/ikas.js +1 -1
- package/build/models/data/product/variant/index.js +1 -1
- package/build/models/data/product-campaing/campaign/index.d.ts +1 -1
- package/build/models/data/product-campaing/campaign/index.js +1 -1
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/blog-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/product-detail/index.js +1 -1
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/index.js +1 -1
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/providers/helpers/raffles.js +1 -1
- package/build/providers/page-data-get.js +1 -1
- package/build/providers/page-data-next.js +1 -1
- package/build/providers/prop-value/attribute-list.js +1 -1
- package/build/providers/prop-value/attribute.js +1 -1
- package/build/providers/prop-value/blog-category.js +1 -1
- package/build/providers/prop-value/blog.js +1 -1
- package/build/providers/prop-value/brand.js +1 -1
- package/build/providers/prop-value/category.js +1 -1
- package/build/providers/prop-value/product-detail.js +1 -1
- package/build/providers/prop-value/raffle.js +1 -1
- package/build/store/base.js +1 -1
- package/build/store/cart.js +1 -1
- package/build/store/customer.js +1 -1
- package/package.json +1 -1
- package/build/api/product-campanign/index.js +0 -1
|
@@ -675,11 +675,16 @@ export interface SaveMyCustomerInput {
|
|
|
675
675
|
lastName: string;
|
|
676
676
|
phone?: string | null;
|
|
677
677
|
}
|
|
678
|
+
export interface SearchDynamicCurrencySettings {
|
|
679
|
+
roundingFormat?: string | null;
|
|
680
|
+
targetCurrencyCode: string;
|
|
681
|
+
}
|
|
678
682
|
export interface SearchInput {
|
|
679
683
|
barcodeList?: string[] | null;
|
|
680
684
|
brandId?: string | null;
|
|
681
685
|
brandIdList?: string[] | null;
|
|
682
686
|
categoryIdList?: string[] | null;
|
|
687
|
+
dynamicCurrencySettings?: SearchDynamicCurrencySettings | null;
|
|
683
688
|
facetList?: SearchInputFacetListInput[] | null;
|
|
684
689
|
filterList?: SearchInputFilterListInput[] | null;
|
|
685
690
|
locale?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from'../ext/split-on-first/index.js';export{default}from"../node_modules/split-on-first/index.js";
|
|
@@ -75,7 +75,11 @@ export interface getBlog_listBlog {
|
|
|
75
75
|
count: number;
|
|
76
76
|
data: getBlog_listBlog_data[];
|
|
77
77
|
/**
|
|
78
|
-
* In the records returned as Response, it shows whether there are any more
|
|
78
|
+
* In the records returned as Response, it shows whether there are any more
|
|
79
|
+
* records or not. For example, let's say our page field is three and our limit
|
|
80
|
+
* field is thirty. Records between 60 and 90 will be returned. If hasNext is
|
|
81
|
+
* `true` despite these records, **it means there are more records.** If hasNext
|
|
82
|
+
* is `false`, it means there are a total of **90 records.**
|
|
79
83
|
*/
|
|
80
84
|
hasNext: boolean;
|
|
81
85
|
/**
|
|
@@ -75,7 +75,11 @@ export interface listBlog_listBlog {
|
|
|
75
75
|
count: number;
|
|
76
76
|
data: listBlog_listBlog_data[];
|
|
77
77
|
/**
|
|
78
|
-
* In the records returned as Response, it shows whether there are any more
|
|
78
|
+
* In the records returned as Response, it shows whether there are any more
|
|
79
|
+
* records or not. For example, let's say our page field is three and our limit
|
|
80
|
+
* field is thirty. Records between 60 and 90 will be returned. If hasNext is
|
|
81
|
+
* `true` despite these records, **it means there are more records.** If hasNext
|
|
82
|
+
* is `false`, it means there are a total of **90 records.**
|
|
79
83
|
*/
|
|
80
84
|
hasNext: boolean;
|
|
81
85
|
/**
|
|
@@ -31,7 +31,11 @@ export interface listBlogCategory_listBlogCategory {
|
|
|
31
31
|
count: number;
|
|
32
32
|
data: listBlogCategory_listBlogCategory_data[];
|
|
33
33
|
/**
|
|
34
|
-
* In the records returned as Response, it shows whether there are any more
|
|
34
|
+
* In the records returned as Response, it shows whether there are any more
|
|
35
|
+
* records or not. For example, let's say our page field is three and our limit
|
|
36
|
+
* field is thirty. Records between 60 and 90 will be returned. If hasNext is
|
|
37
|
+
* `true` despite these records, **it means there are more records.** If hasNext
|
|
38
|
+
* is `false`, it means there are a total of **90 records.**
|
|
35
39
|
*/
|
|
36
40
|
hasNext: boolean;
|
|
37
41
|
/**
|
|
@@ -21,7 +21,11 @@ export interface listBlogMetaData_listBlogMetadata {
|
|
|
21
21
|
count: number;
|
|
22
22
|
data: listBlogMetaData_listBlogMetadata_data[];
|
|
23
23
|
/**
|
|
24
|
-
* In the records returned as Response, it shows whether there are any more
|
|
24
|
+
* In the records returned as Response, it shows whether there are any more
|
|
25
|
+
* records or not. For example, let's say our page field is three and our limit
|
|
26
|
+
* field is thirty. Records between 60 and 90 will be returned. If hasNext is
|
|
27
|
+
* `true` despite these records, **it means there are more records.** If hasNext
|
|
28
|
+
* is `false`, it means there are a total of **90 records.**
|
|
25
29
|
*/
|
|
26
30
|
hasNext: boolean;
|
|
27
31
|
/**
|
|
@@ -105,7 +105,8 @@ export interface getCart_getCart_items {
|
|
|
105
105
|
*/
|
|
106
106
|
discountPrice: number | null;
|
|
107
107
|
/**
|
|
108
|
-
* It is the final price of the order line item. If the discount price is less
|
|
108
|
+
* It is the final price of the order line item. If the discount price is less
|
|
109
|
+
* than the sell price, the final price is equal to the discount price.
|
|
109
110
|
*/
|
|
110
111
|
finalPrice: number | null;
|
|
111
112
|
id: string;
|
|
@@ -114,7 +115,8 @@ export interface getCart_getCart_items {
|
|
|
114
115
|
*/
|
|
115
116
|
options: getCart_getCart_items_options[] | null;
|
|
116
117
|
/**
|
|
117
|
-
* It is the original order line item id of the line item. If the line item is
|
|
118
|
+
* It is the original order line item id of the line item. If the line item is
|
|
119
|
+
* derived from another line item, this field is filled.
|
|
118
120
|
*/
|
|
119
121
|
originalOrderLineItemId: string | null;
|
|
120
122
|
/**
|
|
@@ -117,7 +117,8 @@ export interface saveItemToCart_saveItemToCart_items {
|
|
|
117
117
|
*/
|
|
118
118
|
discountPrice: number | null;
|
|
119
119
|
/**
|
|
120
|
-
* It is the final price of the order line item. If the discount price is less
|
|
120
|
+
* It is the final price of the order line item. If the discount price is less
|
|
121
|
+
* than the sell price, the final price is equal to the discount price.
|
|
121
122
|
*/
|
|
122
123
|
finalPrice: number | null;
|
|
123
124
|
id: string;
|
|
@@ -126,7 +127,8 @@ export interface saveItemToCart_saveItemToCart_items {
|
|
|
126
127
|
*/
|
|
127
128
|
options: saveItemToCart_saveItemToCart_items_options[] | null;
|
|
128
129
|
/**
|
|
129
|
-
* It is the original order line item id of the line item. If the line item is
|
|
130
|
+
* It is the original order line item id of the line item. If the line item is
|
|
131
|
+
* derived from another line item, this field is filled.
|
|
130
132
|
*/
|
|
131
133
|
originalOrderLineItemId: string | null;
|
|
132
134
|
/**
|
|
@@ -425,12 +425,14 @@ export interface getCheckoutById_getCheckoutById_cart_items {
|
|
|
425
425
|
*/
|
|
426
426
|
discountPrice: number | null;
|
|
427
427
|
/**
|
|
428
|
-
* It is the final price of the order line item. If the discount price is less
|
|
428
|
+
* It is the final price of the order line item. If the discount price is less
|
|
429
|
+
* than the sell price, the final price is equal to the discount price.
|
|
429
430
|
*/
|
|
430
431
|
finalPrice: number | null;
|
|
431
432
|
id: string;
|
|
432
433
|
/**
|
|
433
|
-
* It is the original order line item id of the line item. If the line item is
|
|
434
|
+
* It is the original order line item id of the line item. If the line item is
|
|
435
|
+
* derived from another line item, this field is filled.
|
|
434
436
|
*/
|
|
435
437
|
originalOrderLineItemId: string | null;
|
|
436
438
|
/**
|
|
@@ -276,12 +276,14 @@ export interface getOrder_getOrder_orderLineItems {
|
|
|
276
276
|
*/
|
|
277
277
|
discountPrice: number | null;
|
|
278
278
|
/**
|
|
279
|
-
* It is the final price of the order line item. If the discount price is less
|
|
279
|
+
* It is the final price of the order line item. If the discount price is less
|
|
280
|
+
* than the sell price, the final price is equal to the discount price.
|
|
280
281
|
*/
|
|
281
282
|
finalPrice: number | null;
|
|
282
283
|
id: string;
|
|
283
284
|
/**
|
|
284
|
-
* It is the original order line item id of the line item. If the line item is
|
|
285
|
+
* It is the original order line item id of the line item. If the line item is
|
|
286
|
+
* derived from another line item, this field is filled.
|
|
285
287
|
*/
|
|
286
288
|
originalOrderLineItemId: string | null;
|
|
287
289
|
/**
|
|
@@ -329,7 +331,8 @@ export interface getOrder_getOrder_orderPackages_trackingInfo {
|
|
|
329
331
|
*/
|
|
330
332
|
trackingLink: string | null;
|
|
331
333
|
/**
|
|
332
|
-
* Indicates whether the notification is sent to the customer after the cargo is
|
|
334
|
+
* Indicates whether the notification is sent to the customer after the cargo is
|
|
335
|
+
* delivered. **isSendNotification** returns true if the notification is sent.
|
|
333
336
|
*/
|
|
334
337
|
isSendNotification: boolean | null;
|
|
335
338
|
/**
|
|
@@ -534,7 +537,8 @@ export interface getOrder_getOrder {
|
|
|
534
537
|
*/
|
|
535
538
|
currencyRates: getOrder_getOrder_currencyRates[];
|
|
536
539
|
/**
|
|
537
|
-
* Information about the customer. The order does not have to be a customer
|
|
540
|
+
* Information about the customer. The order does not have to be a customer
|
|
541
|
+
* information. If the order was created by ikasPOS, the customer information may be null.
|
|
538
542
|
*/
|
|
539
543
|
customer: getOrder_getOrder_customer | null;
|
|
540
544
|
deleted: boolean | null;
|
|
@@ -597,7 +601,9 @@ export interface getOrder_getOrder {
|
|
|
597
601
|
*/
|
|
598
602
|
taxLines: getOrder_getOrder_taxLines[] | null;
|
|
599
603
|
/**
|
|
600
|
-
* The total final price of the order resulting from the apply of
|
|
604
|
+
* The total final price of the order resulting from the apply of
|
|
605
|
+
* `orderAdjustments` , `shippingLines`, and `giftPackageLines` pricing to the
|
|
606
|
+
* order total price.
|
|
601
607
|
*/
|
|
602
608
|
totalFinalPrice: number;
|
|
603
609
|
/**
|
|
@@ -250,12 +250,14 @@ export interface createOrderRefundRequest_createOrderRefundRequest_orderLineItem
|
|
|
250
250
|
*/
|
|
251
251
|
discountPrice: number | null;
|
|
252
252
|
/**
|
|
253
|
-
* It is the final price of the order line item. If the discount price is less
|
|
253
|
+
* It is the final price of the order line item. If the discount price is less
|
|
254
|
+
* than the sell price, the final price is equal to the discount price.
|
|
254
255
|
*/
|
|
255
256
|
finalPrice: number | null;
|
|
256
257
|
id: string;
|
|
257
258
|
/**
|
|
258
|
-
* It is the original order line item id of the line item. If the line item is
|
|
259
|
+
* It is the original order line item id of the line item. If the line item is
|
|
260
|
+
* derived from another line item, this field is filled.
|
|
259
261
|
*/
|
|
260
262
|
originalOrderLineItemId: string | null;
|
|
261
263
|
/**
|
|
@@ -299,7 +301,8 @@ export interface createOrderRefundRequest_createOrderRefundRequest_orderPackages
|
|
|
299
301
|
*/
|
|
300
302
|
trackingLink: string | null;
|
|
301
303
|
/**
|
|
302
|
-
* Indicates whether the notification is sent to the customer after the cargo is
|
|
304
|
+
* Indicates whether the notification is sent to the customer after the cargo is
|
|
305
|
+
* delivered. **isSendNotification** returns true if the notification is sent.
|
|
303
306
|
*/
|
|
304
307
|
isSendNotification: boolean | null;
|
|
305
308
|
/**
|
|
@@ -504,7 +507,8 @@ export interface createOrderRefundRequest_createOrderRefundRequest {
|
|
|
504
507
|
*/
|
|
505
508
|
currencyRates: createOrderRefundRequest_createOrderRefundRequest_currencyRates[];
|
|
506
509
|
/**
|
|
507
|
-
* Information about the customer. The order does not have to be a customer
|
|
510
|
+
* Information about the customer. The order does not have to be a customer
|
|
511
|
+
* information. If the order was created by ikasPOS, the customer information may be null.
|
|
508
512
|
*/
|
|
509
513
|
customer: createOrderRefundRequest_createOrderRefundRequest_customer | null;
|
|
510
514
|
deleted: boolean | null;
|
|
@@ -567,7 +571,9 @@ export interface createOrderRefundRequest_createOrderRefundRequest {
|
|
|
567
571
|
*/
|
|
568
572
|
taxLines: createOrderRefundRequest_createOrderRefundRequest_taxLines[] | null;
|
|
569
573
|
/**
|
|
570
|
-
* The total final price of the order resulting from the apply of
|
|
574
|
+
* The total final price of the order resulting from the apply of
|
|
575
|
+
* `orderAdjustments` , `shippingLines`, and `giftPackageLines` pricing to the
|
|
576
|
+
* order total price.
|
|
571
577
|
*/
|
|
572
578
|
totalFinalPrice: number;
|
|
573
579
|
/**
|
|
@@ -135,7 +135,8 @@ export interface customerLogin_customerLogin_customer {
|
|
|
135
135
|
*/
|
|
136
136
|
accountStatus: CustomerAccountStatusEnum | null;
|
|
137
137
|
/**
|
|
138
|
-
* The unique email address of the customer. Attempting to assign the same email
|
|
138
|
+
* The unique email address of the customer. Attempting to assign the same email
|
|
139
|
+
* address to multiple customers returns an error.
|
|
139
140
|
*/
|
|
140
141
|
email: string | null;
|
|
141
142
|
/**
|
|
@@ -135,7 +135,8 @@ export interface customerSocialLogin_customerSocialLogin_customer {
|
|
|
135
135
|
*/
|
|
136
136
|
accountStatus: CustomerAccountStatusEnum | null;
|
|
137
137
|
/**
|
|
138
|
-
* The unique email address of the customer. Attempting to assign the same email
|
|
138
|
+
* The unique email address of the customer. Attempting to assign the same email
|
|
139
|
+
* address to multiple customers returns an error.
|
|
139
140
|
*/
|
|
140
141
|
email: string | null;
|
|
141
142
|
/**
|
|
@@ -276,12 +276,14 @@ export interface getCustomerOrders_getCustomerOrders_orderLineItems {
|
|
|
276
276
|
*/
|
|
277
277
|
discountPrice: number | null;
|
|
278
278
|
/**
|
|
279
|
-
* It is the final price of the order line item. If the discount price is less
|
|
279
|
+
* It is the final price of the order line item. If the discount price is less
|
|
280
|
+
* than the sell price, the final price is equal to the discount price.
|
|
280
281
|
*/
|
|
281
282
|
finalPrice: number | null;
|
|
282
283
|
id: string;
|
|
283
284
|
/**
|
|
284
|
-
* It is the original order line item id of the line item. If the line item is
|
|
285
|
+
* It is the original order line item id of the line item. If the line item is
|
|
286
|
+
* derived from another line item, this field is filled.
|
|
285
287
|
*/
|
|
286
288
|
originalOrderLineItemId: string | null;
|
|
287
289
|
/**
|
|
@@ -329,7 +331,8 @@ export interface getCustomerOrders_getCustomerOrders_orderPackages_trackingInfo
|
|
|
329
331
|
*/
|
|
330
332
|
trackingLink: string | null;
|
|
331
333
|
/**
|
|
332
|
-
* Indicates whether the notification is sent to the customer after the cargo is
|
|
334
|
+
* Indicates whether the notification is sent to the customer after the cargo is
|
|
335
|
+
* delivered. **isSendNotification** returns true if the notification is sent.
|
|
333
336
|
*/
|
|
334
337
|
isSendNotification: boolean | null;
|
|
335
338
|
/**
|
|
@@ -534,7 +537,8 @@ export interface getCustomerOrders_getCustomerOrders {
|
|
|
534
537
|
*/
|
|
535
538
|
currencyRates: getCustomerOrders_getCustomerOrders_currencyRates[];
|
|
536
539
|
/**
|
|
537
|
-
* Information about the customer. The order does not have to be a customer
|
|
540
|
+
* Information about the customer. The order does not have to be a customer
|
|
541
|
+
* information. If the order was created by ikasPOS, the customer information may be null.
|
|
538
542
|
*/
|
|
539
543
|
customer: getCustomerOrders_getCustomerOrders_customer | null;
|
|
540
544
|
deleted: boolean | null;
|
|
@@ -597,7 +601,9 @@ export interface getCustomerOrders_getCustomerOrders {
|
|
|
597
601
|
*/
|
|
598
602
|
taxLines: getCustomerOrders_getCustomerOrders_taxLines[] | null;
|
|
599
603
|
/**
|
|
600
|
-
* The total final price of the order resulting from the apply of
|
|
604
|
+
* The total final price of the order resulting from the apply of
|
|
605
|
+
* `orderAdjustments` , `shippingLines`, and `giftPackageLines` pricing to the
|
|
606
|
+
* order total price.
|
|
601
607
|
*/
|
|
602
608
|
totalFinalPrice: number;
|
|
603
609
|
/**
|
|
@@ -127,7 +127,8 @@ export interface getMyCustomer_getMyCustomer {
|
|
|
127
127
|
*/
|
|
128
128
|
accountStatus: CustomerAccountStatusEnum | null;
|
|
129
129
|
/**
|
|
130
|
-
* The unique email address of the customer. Attempting to assign the same email
|
|
130
|
+
* The unique email address of the customer. Attempting to assign the same email
|
|
131
|
+
* address to multiple customers returns an error.
|
|
131
132
|
*/
|
|
132
133
|
email: string | null;
|
|
133
134
|
/**
|
|
@@ -131,7 +131,8 @@ export interface registerCustomer_registerCustomer_customer {
|
|
|
131
131
|
*/
|
|
132
132
|
accountStatus: CustomerAccountStatusEnum | null;
|
|
133
133
|
/**
|
|
134
|
-
* The unique email address of the customer. Attempting to assign the same email
|
|
134
|
+
* The unique email address of the customer. Attempting to assign the same email
|
|
135
|
+
* address to multiple customers returns an error.
|
|
135
136
|
*/
|
|
136
137
|
email: string | null;
|
|
137
138
|
/**
|
|
@@ -139,7 +139,8 @@ export interface saveMyCustomer_saveMyCustomer {
|
|
|
139
139
|
*/
|
|
140
140
|
accountStatus: CustomerAccountStatusEnum | null;
|
|
141
141
|
/**
|
|
142
|
-
* The unique email address of the customer. Attempting to assign the same email
|
|
142
|
+
* The unique email address of the customer. Attempting to assign the same email
|
|
143
|
+
* address to multiple customers returns an error.
|
|
143
144
|
*/
|
|
144
145
|
email: string | null;
|
|
145
146
|
/**
|
|
@@ -18,7 +18,11 @@ export interface listCustomerReviews_listCustomerReviews {
|
|
|
18
18
|
count: number;
|
|
19
19
|
data: listCustomerReviews_listCustomerReviews_data[];
|
|
20
20
|
/**
|
|
21
|
-
* In the records returned as Response, it shows whether there are any more
|
|
21
|
+
* In the records returned as Response, it shows whether there are any more
|
|
22
|
+
* records or not. For example, let's say our page field is three and our limit
|
|
23
|
+
* field is thirty. Records between 60 and 90 will be returned. If hasNext is
|
|
24
|
+
* `true` despite these records, **it means there are more records.** If hasNext
|
|
25
|
+
* is `false`, it means there are a total of **90 records.**
|
|
22
26
|
*/
|
|
23
27
|
hasNext: boolean;
|
|
24
28
|
/**
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { StringFilterInput, HTMLMetaDataTargetTypeEnumFilter, PaginationInput, HTMLMetaDataTargetTypeEnum } from "./../../../__generated__/global-types";
|
|
2
|
+
export interface listHTMLMetaData_listHTMLMetaData_translations {
|
|
3
|
+
__typename: "HTMLMetaDataTranslation";
|
|
4
|
+
description: string | null;
|
|
5
|
+
locale: string;
|
|
6
|
+
pageTitle: string | null;
|
|
7
|
+
}
|
|
2
8
|
export interface listHTMLMetaData_listHTMLMetaData {
|
|
3
9
|
__typename: "HTMLMetaData";
|
|
4
10
|
/**
|
|
@@ -16,6 +22,10 @@ export interface listHTMLMetaData_listHTMLMetaData {
|
|
|
16
22
|
targetId: string | null;
|
|
17
23
|
targetType: HTMLMetaDataTargetTypeEnum | null;
|
|
18
24
|
redirectTo: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* The translations information of the metadata.
|
|
27
|
+
*/
|
|
28
|
+
translations: listHTMLMetaData_listHTMLMetaData_translations[] | null;
|
|
19
29
|
}
|
|
20
30
|
export interface listHTMLMetaData {
|
|
21
31
|
listHTMLMetaData: listHTMLMetaData_listHTMLMetaData[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__makeTemplateObject as i}from'../../ext/tslib/tslib.es6.js';import o from'../../ext/graphql-tag/src/index.js';import{apollo as r}from"../apollo.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import{IkasHTMLMetaData as a}from"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";var d
|
|
1
|
+
import{__awaiter as t,__generator as e,__makeTemplateObject as i}from'../../ext/tslib/tslib.es6.js';import o from'../../ext/graphql-tag/src/index.js';import{apollo as r}from"../apollo.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import{IkasHTMLMetaData as a}from"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";var n,d=function(){function d(){}return d.listHTMLMetaData=function(d,s,m,l,p){return void 0===l&&(l=1),void 0===p&&(p=200),t(this,void 0,void 0,(function(){var t,u,g,c,j;return e(this,(function(e){switch(e.label){case 0:t=o(n||(n=i(["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n translations {\n description\n locale\n pageTitle\n }\n }\n }\n "],["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n translations {\n description\n locale\n pageTitle\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,r.getClient().query({query:t,variables:{slug:d?{eq:d}:void 0,targetId:s?{in:s}:void 0,targetType:m?{in:m}:void 0,pagination:{page:l,limit:p}}})];case 2:return u=e.sent(),g=u.data,(c=u.errors)&&c.length?[2,[]]:[2,g.listHTMLMetaData.map((function(t){return new a(t)}))];case 3:return j=e.sent(),console.log(j),[2,[]];case 4:return[2]}}))}))},d}();export{d as IkasHTMLMetaDataAPI};
|
package/build/api/index.d.ts
CHANGED
|
@@ -20,5 +20,5 @@ export { IkasProductOptionSetAPI } from "./product-option-set";
|
|
|
20
20
|
export { IkasRaffleAPI } from "./raffle";
|
|
21
21
|
export type { IkasListRaffleParams } from "./raffle";
|
|
22
22
|
export { IkasProductBackInStockReminderAPI } from "./back-in-stock-reminder";
|
|
23
|
-
export { IkasProductCampaignAPI } from "./product-
|
|
23
|
+
export { IkasProductCampaignAPI } from "./product-campaign";
|
|
24
24
|
export { apollo } from "./apollo";
|
package/build/api/{product-campanign → product-campaign}/__generated__/getProductCampaigns.d.ts
RENAMED
|
@@ -63,6 +63,7 @@ export interface getProductCampaigns_getProductCampaigns_campaign {
|
|
|
63
63
|
canCombineWithOtherCampaigns: boolean;
|
|
64
64
|
createdAt: any | null;
|
|
65
65
|
createdFor: CampaignCreatedForEnum | null;
|
|
66
|
+
currencyCodes: string[] | null;
|
|
66
67
|
dateRange: getProductCampaigns_getProductCampaigns_campaign_dateRange | null;
|
|
67
68
|
deleted: boolean | null;
|
|
68
69
|
fixedDiscount: getProductCampaigns_getProductCampaigns_campaign_fixedDiscount | null;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as n,__generator as t,__makeTemplateObject as e}from'../../ext/tslib/tslib.es6.js';import{IkasProductCampaign as a}from"../../models/data/product-campaing/index.js";import i from'../../ext/graphql-tag/src/index.js';import{apollo as r}from"../apollo.js";var u,s=function(){function s(){}return s.getProductCampaigns=function(s){return n(this,void 0,void 0,(function(){var n,o,d,p,c;return t(this,(function(t){switch(t.label){case 0:n=i(u||(u=e(["\n query getProductCampaigns($input: GetProductCampaignsInput!) {\n getProductCampaigns(input: $input) {\n campaign {\n applicableCustomerGroupIds\n applicableCustomerIds\n applicablePrice\n buyXThenGetY {\n buyX {\n amount\n applyByQuantity\n filter {\n idList\n type\n }\n }\n getY {\n amount\n discountRatio\n filter {\n idList\n type\n }\n }\n maxUsagePerOrder\n }\n canCombineWithOtherCampaigns\n createdAt\n createdFor\n currencyCodes\n dateRange {\n end\n start\n }\n deleted\n fixedDiscount {\n amount\n filters {\n idList\n type\n }\n lineItemQuantityRange {\n min\n max\n }\n priceRange {\n min\n max\n }\n }\n hasCoupon\n id\n includeDiscountedProducts\n salesChannelIds\n title\n type\n updatedAt\n usageCount\n usageLimit\n usageLimitPerCustomer\n }\n variantIds\n }\n }\n "],["\n query getProductCampaigns($input: GetProductCampaignsInput!) {\n getProductCampaigns(input: $input) {\n campaign {\n applicableCustomerGroupIds\n applicableCustomerIds\n applicablePrice\n buyXThenGetY {\n buyX {\n amount\n applyByQuantity\n filter {\n idList\n type\n }\n }\n getY {\n amount\n discountRatio\n filter {\n idList\n type\n }\n }\n maxUsagePerOrder\n }\n canCombineWithOtherCampaigns\n createdAt\n createdFor\n currencyCodes\n dateRange {\n end\n start\n }\n deleted\n fixedDiscount {\n amount\n filters {\n idList\n type\n }\n lineItemQuantityRange {\n min\n max\n }\n priceRange {\n min\n max\n }\n }\n hasCoupon\n id\n includeDiscountedProducts\n salesChannelIds\n title\n type\n updatedAt\n usageCount\n usageLimit\n usageLimitPerCustomer\n }\n variantIds\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,r.getClient().query({query:n,variables:{input:s}})];case 2:return o=t.sent(),d=o.data,(p=o.errors)&&p.length?[2,[]]:[2,d.getProductCampaigns?d.getProductCampaigns.map((function(n){return new a(n)})):null];case 3:return c=t.sent(),console.log(c),[3,4];case 4:return[2,[]]}}))}))},s}();export{s as IkasProductCampaignAPI};
|
|
@@ -45,7 +45,11 @@ export interface listRaffle_listRaffle {
|
|
|
45
45
|
*/
|
|
46
46
|
count: number;
|
|
47
47
|
/**
|
|
48
|
-
* In the records returned as Response, it shows whether there are any more
|
|
48
|
+
* In the records returned as Response, it shows whether there are any more
|
|
49
|
+
* records or not. For example, let's say our page field is three and our limit
|
|
50
|
+
* field is thirty. Records between 60 and 90 will be returned. If hasNext is
|
|
51
|
+
* `true` despite these records, **it means there are more records.** If hasNext
|
|
52
|
+
* is `false`, it means there are a total of **90 records.**
|
|
49
53
|
*/
|
|
50
54
|
hasNext: boolean;
|
|
51
55
|
/**
|
|
@@ -6,7 +6,9 @@ export interface listVariantType_listVariantType_values {
|
|
|
6
6
|
updatedAt: any | null;
|
|
7
7
|
deleted: boolean | null;
|
|
8
8
|
/**
|
|
9
|
-
* It is the name information of the values used in the Variant type. Value
|
|
9
|
+
* It is the name information of the values used in the Variant type. Value
|
|
10
|
+
* information of Variant type is unique according to name.It can be a maximum of
|
|
11
|
+
* 100 characters.
|
|
10
12
|
*/
|
|
11
13
|
name: string;
|
|
12
14
|
/**
|
|
@@ -56,7 +58,9 @@ export interface listVariantType_listVariantType {
|
|
|
56
58
|
*/
|
|
57
59
|
selectionType: VariantSelectionTypeEnum;
|
|
58
60
|
/**
|
|
59
|
-
* Variant values used in Variant type. ** For example, variant type: Size.
|
|
61
|
+
* Variant values used in Variant type. ** For example, variant type: Size.
|
|
62
|
+
* Variant values can be thought of as S, M, L, XL. **It is unique according to
|
|
63
|
+
* the value name.Values array size must have at least one element.
|
|
60
64
|
*/
|
|
61
65
|
values: listVariantType_listVariantType_values[];
|
|
62
66
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from'../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import"../../../../api/blog/index.js";import"../../../../api/brand/index.js";import"../../../../api/cart/index.js";import"../../../../api/category/index.js";import"../../../../api/checkout/index.js";import{IkasCityAPI as s}from"../../../../api/city/index.js";import{IkasCountryAPI as r}from"../../../../api/country/index.js";import"../../../../api/customer/index.js";import"../../../../api/customer-review/index.js";import{IkasDistrictAPI as o}from"../../../../api/district/index.js";import"../../../../api/html-meta-data/index.js";import"../../../../api/merchant/index.js";import"../../../../api/product-search/index.js";import"../../../../models/data/blog/index.js";import"../../../../models/data/brand/index.js";import"../../../../models/data/category/index.js";import"../../../../models/data/checkout/index.js";import"../../../../models/data/customer/address/index.js";import"../../../../models/data/customer/index.js";import"../../../../models/data/customer-review/index.js";import"../../../../models/data/html-meta-data/index.js";import"../../../../models/data/image/index.js";import"../../../../models/data/installment-info/index.js";import"../../../../models/data/order/index.js";import"../../../../models/data/order/line-item/index.js";import"../../../../api/product-option-file/index.js";import"../../../../models/data/product/index.js";import"../../../../models/data/variant-type/index.js";import"../../../../models/data/product/variant/index.js";import"../../../../models/data/product/variant/price/index.js";import"../../../../models/data/product-attribute/index.js";import"../../../../models/data/product/attribute-value/index.js";import"../../../../models/data/product-filter/index.js";import"../../../../models/data/variant-type/variant-value/index.js";import"../../../../models/data/order-transaction/index.js";import"../../../../models/data/product-option-set/index.js";import"../../../../models/data/raffle/index.js";import"../../../../models/data/product-campaing/campaign/index.js";import"../../../../models/theme/theme.js";import"../../../../models/theme/page/index.js";import"../../../../models/theme/component/prop/index.js";import"../../../../models/theme/page/component/prop-value/link.js";import"../../../../models/ui/brand-list/index.js";import"../../../../models/ui/blog-list/index.js";import"../../../../models/ui/blog-category-list/index.js";import"../../../../models/ui/category-list/index.js";import"../../../../models/ui/product-detail/index.js";import"../../../../models/ui/product-list/index.js";import"../../../../models/ui/product-attribute-detail/index.js";import"../../../../models/ui/product-attribute-list/index.js";import"../../../../models/ui/customer-review-list/index.js";import"../../../../models/ui/validator/index.js";import"../../../../models/ui/validator/rules/index.js";import"../../../../models/ui/validator/form/login.js";import"../../../../models/ui/validator/form/address.js";import"../../../../models/ui/validator/form/register.js";import"../../../../models/ui/validator/form/contact-form.js";import"../../../../models/ui/validator/form/forgot-password.js";import"../../../../models/ui/validator/form/recover-password.js";import"../../../../models/ui/validator/form/account-info.js";import"../../../../models/ui/validator/form/raffle-form.js";import"../../../../models/ui/validator/form/customer-review.js";import"../../../../models/ui/raffle-list/index.js";import"../../../../models/theme/settings/index.js";import"../../../../models/theme/custom-data/index.js";import"../../../../api/apollo.js";import"../../../../api/favorite-product/index.js";import"../../../../api/contact-form/index.js";import{IkasStateAPI as n}from"../../../../api/state/index.js";import"../../../../api/product-option-set/index.js";import"../../../../api/raffle/index.js";import"../../../../api/back-in-stock-reminder/index.js";import"../../../../api/product-campanign/index.js";import{stringSorter as a}from"../../../../utils/helper.js";import{IkasStorefrontConfig as d}from"../../../../storefront/index.js";import"../../../../utils/i18n.js";var l=function(){function l(a){var l=this;this.isCorporate=!1,this.isErrorsVisible=!1,this.allowedCountryIds=null,this.allowCorporateInfo=!1,this.allowTitleChange=!1,this.firstNameChangeCallback=null,this.lastNameChangeCallback=null,this.countries=[],this.states=[],this.cities=[],this.districts=[],this.myCountryCode=null,this.fillDropdownOptions=function(){return t(l,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.listCountries()];case 1:return t.sent(),[4,this.listStates()];case 2:return t.sent(),[4,this.listCities()];case 3:return t.sent(),[4,this.listDistricts()];case 4:return t.sent(),[2]}}))}))},this.listCountries=function(){return t(l,void 0,void 0,(function(){var t,e,s,o,n,a,l,u=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),this.myCountryCode?[3,2]:(t=this,[4,r.getMyCountry()]);case 1:t.myCountryCode=i.sent()||void 0,i.label=2;case 2:return[4,r.listCountries(void 0,(null===(a=this.allowedCountryIds)||void 0===a?void 0:a.length)?this.allowedCountryIds:void 0)];case 3:return e=i.sent(),s=d.routings.find((function(t){return t.id===d.storefrontRoutingId})),(null===(l=null==s?void 0:s.countryCodes)||void 0===l?void 0:l.length)?e=e.filter((function(t){var i;return t.iso2&&(null===(i=s.countryCodes)||void 0===i?void 0:i.includes(t.iso2))})):(o=d.routings.filter((function(t){return t.id!==d.storefrontRoutingId})),e=e.filter((function(t){return t.iso2&&!o.some((function(i){var e;return null===(e=i.countryCodes)||void 0===e?void 0:e.includes(t.iso2)}))}))),this.countries=e,1!==this.countries.length||this.country?this.myCountryCode&&!this.country&&(n=this.countries.find((function(t){return t.iso2===u.myCountryCode})))&&this.onCountryChange(n.id):this.onCountryChange(this.countries[0].id),[3,5];case 4:return i.sent(),[3,5];case 5:return[2]}}))}))},this.listStates=function(){return t(l,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(!(null===(e=this.country)||void 0===e?void 0:e.id))return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n.listStates(this.country.id)];case 2:return t=i.sent(),this.states=t,this.hasState||this.onStateChange(this.states[0].id),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},this.listCities=function(){return t(l,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(!(null===(e=this.state)||void 0===e?void 0:e.id))return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),t=this,[4,s.listCities(this.state.id,null===(r=this.country)||void 0===r?void 0:r.id)];case 2:return t.cities=i.sent(),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},this.listDistricts=function(){return t(l,void 0,void 0,(function(){var t,e,s;return i(this,(function(i){switch(i.label){case 0:if(!(null===(e=this.city)||void 0===e?void 0:e.id))return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),t=this,[4,o.listDistricts(this.city.id,null===(s=this.state)||void 0===s?void 0:s.id)];case 2:return t.districts=i.sent(),this.districts.length?this.address.isDistrictRequired=!0:this.address.isDistrictRequired=!1,[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},this.modelToOption=function(t){return{label:t.name,value:t.id+""}},this.onFirstNameChange=function(t){l.firstNameChangeCallback&&l.firstNameChangeCallback(t),l.address.firstName=t},this.onLastNameChange=function(t){l.lastNameChangeCallback&&l.lastNameChangeCallback(t),l.address.lastName=t},this.onPhoneChange=function(t){l.address.phone=t},this.onIdentityNumberChange=function(t){t?t.length<=11&&(l.address.identityNumber=t):l.address.identityNumber=""},this.onAddressTitleChange=function(t){l.address.title=t},this.onAddressLine1Change=function(t){l.address.addressLine1=t},this.onAddressLine2Change=function(t){l.address.addressLine2=t},this.onAddressPostalCodeChange=function(t){l.address.postalCode=t},this.onCountryChange=function(t){var i;if((null===(i=l.country)||void 0===i?void 0:i.id)!==t){var e=l.countries.find((function(i){return i.id===t}));l.address.country={id:null==e?void 0:e.id,name:null==e?void 0:e.name,code:null==e?void 0:e.iso3,iso2:null==e?void 0:e.iso2,iso3:null==e?void 0:e.iso3},l.address.state=void 0,l.address.city=void 0,l.address.district=void 0,l.states=[],l.cities=[],l.districts=[],l.listStates()}},this.onStateChange=function(t){var i;if((null===(i=l.state)||void 0===i?void 0:i.id)!==t){var e=l.states.find((function(i){return i.id===t}));l.address.state={id:e.id,name:null==e?void 0:e.name,code:null==e?void 0:e.stateCode},l.address.city=void 0,l.address.district=void 0,l.cities=[],l.districts=[],l.listCities()}},this.onCityChange=function(t){var i;if((null===(i=l.city)||void 0===i?void 0:i.id)!==t){var e=l.cities.find((function(i){return i.id===t}));l.address.city={id:e.id,name:e.name},l.address.district=void 0,l.districts=[],l.listDistricts()}},this.onDistrictChange=function(t){var i;if((null===(i=l.district)||void 0===i?void 0:i.id)!==t){var e=l.districts.find((function(i){return i.id===t}));l.address.district={id:e.id,name:e.name}}},this.onDistrictInputChange=function(t){l.address.district={id:void 0,name:t}},this.onCorporateChange=function(t){l.isCorporate=t,t||(l.address.company=null,l.address.taxNumber=null,l.address.taxOffice=null)},this.onCompanyChange=function(t){l.address.company=t},this.onTaxNumberChange=function(t){l.address.taxNumber=t},this.onTaxOfficeChange=function(t){l.address.taxOffice=t},this.address=a.address,this.isCorporate=a.isCorporate||!1,this.isErrorsVisible=a.isErrorsVisible||!1,this.isCustomerAddress=a.isCustomerAddress||!1,this.allowedCountryIds=a.allowedCountryIds,this.allowCorporateInfo=a.allowCorporateInfo||!1,this.allowTitleChange=a.allowTitleChange||!1,this.firstNameChangeCallback=a.firstNameChangeCallback||null,this.lastNameChangeCallback=a.lastNameChangeCallback||null,e(this,{firstNameChangeCallback:!1,lastNameChangeCallback:!1}),this.fillDropdownOptions()}return Object.defineProperty(l.prototype,"firstName",{get:function(){return this.address.firstName},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"lastName",{get:function(){return this.address.lastName},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"phone",{get:function(){return this.address.phone},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"identityNumber",{get:function(){return this.address.identityNumber},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"country",{get:function(){return this.address.country},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"state",{get:function(){return this.address.state},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"city",{get:function(){return this.address.city},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"district",{get:function(){return this.address.district},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"countryOptions",{get:function(){var t=this.countries.map(this.modelToOption);return t.sort((function(t,i){return a(t.label,i.label)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"stateOptions",{get:function(){var t=this.states.map(this.modelToOption);return t.sort((function(t,i){return a(t.label,i.label)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"cityOptions",{get:function(){var t=this.cities.map(this.modelToOption);return t.sort((function(t,i){return a(t.label,i.label)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"districtOptions",{get:function(){var t=this.districts.map(this.modelToOption);return t.sort((function(t,i){return a(t.label,i.label)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"hasState",{get:function(){return this.states.length>1},enumerable:!1,configurable:!0}),l}();export{l as default};
|
|
1
|
+
import{__awaiter as t,__generator as i}from'../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import"../../../../api/blog/index.js";import"../../../../api/brand/index.js";import"../../../../api/cart/index.js";import"../../../../api/category/index.js";import"../../../../api/checkout/index.js";import{IkasCityAPI as s}from"../../../../api/city/index.js";import{IkasCountryAPI as r}from"../../../../api/country/index.js";import"../../../../api/customer/index.js";import"../../../../api/customer-review/index.js";import{IkasDistrictAPI as o}from"../../../../api/district/index.js";import"../../../../api/html-meta-data/index.js";import"../../../../api/merchant/index.js";import"../../../../api/product-search/index.js";import"../../../../models/data/blog/index.js";import"../../../../models/data/brand/index.js";import"../../../../models/data/category/index.js";import"../../../../models/data/checkout/index.js";import"../../../../models/data/customer/address/index.js";import"../../../../models/data/customer/index.js";import"../../../../models/data/customer-review/index.js";import"../../../../models/data/html-meta-data/index.js";import"../../../../models/data/image/index.js";import"../../../../models/data/installment-info/index.js";import"../../../../models/data/order/index.js";import"../../../../models/data/order/line-item/index.js";import"../../../../api/product-option-file/index.js";import"../../../../models/data/product/index.js";import"../../../../models/data/variant-type/index.js";import"../../../../models/data/product/variant/index.js";import"../../../../models/data/product/variant/price/index.js";import"../../../../models/data/product-attribute/index.js";import"../../../../models/data/product/attribute-value/index.js";import"../../../../models/data/product-filter/index.js";import"../../../../models/data/variant-type/variant-value/index.js";import"../../../../models/data/order-transaction/index.js";import"../../../../models/data/product-option-set/index.js";import"../../../../models/data/raffle/index.js";import"../../../../models/data/product-campaing/campaign/index.js";import"../../../../models/theme/theme.js";import"../../../../models/theme/page/index.js";import"../../../../models/theme/component/prop/index.js";import"../../../../models/theme/page/component/prop-value/link.js";import"../../../../models/ui/brand-list/index.js";import"../../../../models/ui/blog-list/index.js";import"../../../../models/ui/blog-category-list/index.js";import"../../../../models/ui/category-list/index.js";import"../../../../models/ui/product-detail/index.js";import"../../../../models/ui/product-list/index.js";import"../../../../models/ui/product-attribute-detail/index.js";import"../../../../models/ui/product-attribute-list/index.js";import"../../../../models/ui/customer-review-list/index.js";import"../../../../models/ui/validator/index.js";import"../../../../models/ui/validator/rules/index.js";import"../../../../models/ui/validator/form/login.js";import"../../../../models/ui/validator/form/address.js";import"../../../../models/ui/validator/form/register.js";import"../../../../models/ui/validator/form/contact-form.js";import"../../../../models/ui/validator/form/forgot-password.js";import"../../../../models/ui/validator/form/recover-password.js";import"../../../../models/ui/validator/form/account-info.js";import"../../../../models/ui/validator/form/raffle-form.js";import"../../../../models/ui/validator/form/customer-review.js";import"../../../../models/ui/raffle-list/index.js";import"../../../../models/theme/settings/index.js";import"../../../../models/theme/custom-data/index.js";import"../../../../api/apollo.js";import"../../../../api/favorite-product/index.js";import"../../../../api/contact-form/index.js";import{IkasStateAPI as n}from"../../../../api/state/index.js";import"../../../../api/product-option-set/index.js";import"../../../../api/raffle/index.js";import"../../../../api/back-in-stock-reminder/index.js";import"../../../../api/product-campaign/index.js";import{stringSorter as a}from"../../../../utils/helper.js";import{IkasStorefrontConfig as d}from"../../../../storefront/index.js";import"../../../../utils/i18n.js";var l=function(){function l(a){var l=this;this.isCorporate=!1,this.isErrorsVisible=!1,this.allowedCountryIds=null,this.allowCorporateInfo=!1,this.allowTitleChange=!1,this.firstNameChangeCallback=null,this.lastNameChangeCallback=null,this.countries=[],this.states=[],this.cities=[],this.districts=[],this.myCountryCode=null,this.fillDropdownOptions=function(){return t(l,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.listCountries()];case 1:return t.sent(),[4,this.listStates()];case 2:return t.sent(),[4,this.listCities()];case 3:return t.sent(),[4,this.listDistricts()];case 4:return t.sent(),[2]}}))}))},this.listCountries=function(){return t(l,void 0,void 0,(function(){var t,e,s,o,n,a,l,u=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),this.myCountryCode?[3,2]:(t=this,[4,r.getMyCountry()]);case 1:t.myCountryCode=i.sent()||void 0,i.label=2;case 2:return[4,r.listCountries(void 0,(null===(a=this.allowedCountryIds)||void 0===a?void 0:a.length)?this.allowedCountryIds:void 0)];case 3:return e=i.sent(),s=d.routings.find((function(t){return t.id===d.storefrontRoutingId})),(null===(l=null==s?void 0:s.countryCodes)||void 0===l?void 0:l.length)?e=e.filter((function(t){var i;return t.iso2&&(null===(i=s.countryCodes)||void 0===i?void 0:i.includes(t.iso2))})):(o=d.routings.filter((function(t){return t.id!==d.storefrontRoutingId})),e=e.filter((function(t){return t.iso2&&!o.some((function(i){var e;return null===(e=i.countryCodes)||void 0===e?void 0:e.includes(t.iso2)}))}))),this.countries=e,1!==this.countries.length||this.country?this.myCountryCode&&!this.country&&(n=this.countries.find((function(t){return t.iso2===u.myCountryCode})))&&this.onCountryChange(n.id):this.onCountryChange(this.countries[0].id),[3,5];case 4:return i.sent(),[3,5];case 5:return[2]}}))}))},this.listStates=function(){return t(l,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(!(null===(e=this.country)||void 0===e?void 0:e.id))return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n.listStates(this.country.id)];case 2:return t=i.sent(),this.states=t,this.hasState||this.onStateChange(this.states[0].id),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},this.listCities=function(){return t(l,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(!(null===(e=this.state)||void 0===e?void 0:e.id))return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),t=this,[4,s.listCities(this.state.id,null===(r=this.country)||void 0===r?void 0:r.id)];case 2:return t.cities=i.sent(),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},this.listDistricts=function(){return t(l,void 0,void 0,(function(){var t,e,s;return i(this,(function(i){switch(i.label){case 0:if(!(null===(e=this.city)||void 0===e?void 0:e.id))return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),t=this,[4,o.listDistricts(this.city.id,null===(s=this.state)||void 0===s?void 0:s.id)];case 2:return t.districts=i.sent(),this.districts.length?this.address.isDistrictRequired=!0:this.address.isDistrictRequired=!1,[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},this.modelToOption=function(t){return{label:t.name,value:t.id+""}},this.onFirstNameChange=function(t){l.firstNameChangeCallback&&l.firstNameChangeCallback(t),l.address.firstName=t},this.onLastNameChange=function(t){l.lastNameChangeCallback&&l.lastNameChangeCallback(t),l.address.lastName=t},this.onPhoneChange=function(t){l.address.phone=t},this.onIdentityNumberChange=function(t){t?t.length<=11&&(l.address.identityNumber=t):l.address.identityNumber=""},this.onAddressTitleChange=function(t){l.address.title=t},this.onAddressLine1Change=function(t){l.address.addressLine1=t},this.onAddressLine2Change=function(t){l.address.addressLine2=t},this.onAddressPostalCodeChange=function(t){l.address.postalCode=t},this.onCountryChange=function(t){var i;if((null===(i=l.country)||void 0===i?void 0:i.id)!==t){var e=l.countries.find((function(i){return i.id===t}));l.address.country={id:null==e?void 0:e.id,name:null==e?void 0:e.name,code:null==e?void 0:e.iso3,iso2:null==e?void 0:e.iso2,iso3:null==e?void 0:e.iso3},l.address.state=void 0,l.address.city=void 0,l.address.district=void 0,l.states=[],l.cities=[],l.districts=[],l.listStates()}},this.onStateChange=function(t){var i;if((null===(i=l.state)||void 0===i?void 0:i.id)!==t){var e=l.states.find((function(i){return i.id===t}));l.address.state={id:e.id,name:null==e?void 0:e.name,code:null==e?void 0:e.stateCode},l.address.city=void 0,l.address.district=void 0,l.cities=[],l.districts=[],l.listCities()}},this.onCityChange=function(t){var i;if((null===(i=l.city)||void 0===i?void 0:i.id)!==t){var e=l.cities.find((function(i){return i.id===t}));l.address.city={id:e.id,name:e.name},l.address.district=void 0,l.districts=[],l.listDistricts()}},this.onDistrictChange=function(t){var i;if((null===(i=l.district)||void 0===i?void 0:i.id)!==t){var e=l.districts.find((function(i){return i.id===t}));l.address.district={id:e.id,name:e.name}}},this.onDistrictInputChange=function(t){l.address.district={id:void 0,name:t}},this.onCorporateChange=function(t){l.isCorporate=t,t||(l.address.company=null,l.address.taxNumber=null,l.address.taxOffice=null)},this.onCompanyChange=function(t){l.address.company=t},this.onTaxNumberChange=function(t){l.address.taxNumber=t},this.onTaxOfficeChange=function(t){l.address.taxOffice=t},this.address=a.address,this.isCorporate=a.isCorporate||!1,this.isErrorsVisible=a.isErrorsVisible||!1,this.isCustomerAddress=a.isCustomerAddress||!1,this.allowedCountryIds=a.allowedCountryIds,this.allowCorporateInfo=a.allowCorporateInfo||!1,this.allowTitleChange=a.allowTitleChange||!1,this.firstNameChangeCallback=a.firstNameChangeCallback||null,this.lastNameChangeCallback=a.lastNameChangeCallback||null,e(this,{firstNameChangeCallback:!1,lastNameChangeCallback:!1}),this.fillDropdownOptions()}return Object.defineProperty(l.prototype,"firstName",{get:function(){return this.address.firstName},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"lastName",{get:function(){return this.address.lastName},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"phone",{get:function(){return this.address.phone},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"identityNumber",{get:function(){return this.address.identityNumber},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"country",{get:function(){return this.address.country},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"state",{get:function(){return this.address.state},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"city",{get:function(){return this.address.city},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"district",{get:function(){return this.address.district},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"countryOptions",{get:function(){var t=this.countries.map(this.modelToOption);return t.sort((function(t,i){return a(t.label,i.label)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"stateOptions",{get:function(){var t=this.states.map(this.modelToOption);return t.sort((function(t,i){return a(t.label,i.label)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"cityOptions",{get:function(){var t=this.cities.map(this.modelToOption);return t.sort((function(t,i){return a(t.label,i.label)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"districtOptions",{get:function(){var t=this.districts.map(this.modelToOption);return t.sort((function(t,i){return a(t.label,i.label)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"hasState",{get:function(){return this.states.length>1},enumerable:!1,configurable:!0}),l}();export{l as default};
|