@ikas/storefront 0.1.20 → 0.1.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/index.css +0 -22
- package/build/index.es.css +0 -22
- package/build/index.es.js +10 -22
- package/build/index.js +10 -22
- package/package.json +1 -1
package/build/index.css
CHANGED
|
@@ -980,28 +980,6 @@
|
|
|
980
980
|
color: var(--checkout-secondary-text-color);
|
|
981
981
|
text-decoration: line-through;
|
|
982
982
|
margin-right: 8px; }
|
|
983
|
-
.style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 .style-module_DiscountIcon__39hOP {
|
|
984
|
-
margin-left: 8px;
|
|
985
|
-
position: relative;
|
|
986
|
-
display: flex;
|
|
987
|
-
align-items: center;
|
|
988
|
-
justify-content: center; }
|
|
989
|
-
.style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 .style-module_DiscountIcon__39hOP:hover .style-module_DiscountTooltip__2hO7z {
|
|
990
|
-
display: block; }
|
|
991
|
-
.style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 .style-module_DiscountIcon__39hOP .style-module_DiscountTooltip__2hO7z {
|
|
992
|
-
display: none;
|
|
993
|
-
position: absolute;
|
|
994
|
-
bottom: 120%;
|
|
995
|
-
margin: auto;
|
|
996
|
-
padding: 12px;
|
|
997
|
-
border-radius: 4px;
|
|
998
|
-
background-color: white;
|
|
999
|
-
box-shadow: 0px 4px 20px rgba(110, 113, 117, 0.12);
|
|
1000
|
-
width: 200px; }
|
|
1001
|
-
.style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 .style-module_DiscountIcon__39hOP .style-module_DiscountTooltip__2hO7z .style-module_DiscountAdjustment__3QUlC {
|
|
1002
|
-
margin-bottom: 4px; }
|
|
1003
|
-
.style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 .style-module_DiscountIcon__39hOP .style-module_DiscountTooltip__2hO7z .style-module_DiscountAdjustment__3QUlC:last-of-type {
|
|
1004
|
-
margin-bottom: 0; }
|
|
1005
983
|
|
|
1006
984
|
.style-module_TooltipContainer__1IW8v {
|
|
1007
985
|
width: 16px;
|
package/build/index.es.css
CHANGED
|
@@ -980,28 +980,6 @@
|
|
|
980
980
|
color: var(--checkout-secondary-text-color);
|
|
981
981
|
text-decoration: line-through;
|
|
982
982
|
margin-right: 8px; }
|
|
983
|
-
.style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 .style-module_DiscountIcon__39hOP {
|
|
984
|
-
margin-left: 8px;
|
|
985
|
-
position: relative;
|
|
986
|
-
display: flex;
|
|
987
|
-
align-items: center;
|
|
988
|
-
justify-content: center; }
|
|
989
|
-
.style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 .style-module_DiscountIcon__39hOP:hover .style-module_DiscountTooltip__2hO7z {
|
|
990
|
-
display: block; }
|
|
991
|
-
.style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 .style-module_DiscountIcon__39hOP .style-module_DiscountTooltip__2hO7z {
|
|
992
|
-
display: none;
|
|
993
|
-
position: absolute;
|
|
994
|
-
bottom: 120%;
|
|
995
|
-
margin: auto;
|
|
996
|
-
padding: 12px;
|
|
997
|
-
border-radius: 4px;
|
|
998
|
-
background-color: white;
|
|
999
|
-
box-shadow: 0px 4px 20px rgba(110, 113, 117, 0.12);
|
|
1000
|
-
width: 200px; }
|
|
1001
|
-
.style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 .style-module_DiscountIcon__39hOP .style-module_DiscountTooltip__2hO7z .style-module_DiscountAdjustment__3QUlC {
|
|
1002
|
-
margin-bottom: 4px; }
|
|
1003
|
-
.style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 .style-module_DiscountIcon__39hOP .style-module_DiscountTooltip__2hO7z .style-module_DiscountAdjustment__3QUlC:last-of-type {
|
|
1004
|
-
margin-bottom: 0; }
|
|
1005
983
|
|
|
1006
984
|
.style-module_TooltipContainer__1IW8v {
|
|
1007
985
|
width: 16px;
|
package/build/index.es.js
CHANGED
|
@@ -68376,9 +68376,6 @@ function (_React$Component) {
|
|
|
68376
68376
|
var FormItem = observer(function (props) {
|
|
68377
68377
|
var t = useTranslation().t;
|
|
68378
68378
|
var _a = useState(function () { return new FormItemViewModel(props); }), vm = _a[0], setVM = _a[1];
|
|
68379
|
-
if (props.type === FormItemType.TEL) {
|
|
68380
|
-
console.log("TEL form item.");
|
|
68381
|
-
}
|
|
68382
68379
|
useEffect(function () {
|
|
68383
68380
|
ReactTooltip.rebuild();
|
|
68384
68381
|
}, []);
|
|
@@ -68443,10 +68440,8 @@ var FormItem = observer(function (props) {
|
|
|
68443
68440
|
});
|
|
68444
68441
|
}, [props.onChange]);
|
|
68445
68442
|
useEffect(function () {
|
|
68446
|
-
console.log("currentCountry:", props.currentCountryCode);
|
|
68447
68443
|
if (!vm.country && props.currentCountryCode) {
|
|
68448
|
-
|
|
68449
|
-
vm.onPhoneChange(props.currentCountryCode);
|
|
68444
|
+
vm.onCountryChange(props.currentCountryCode);
|
|
68450
68445
|
}
|
|
68451
68446
|
}, [props.currentCountryCode]);
|
|
68452
68447
|
return (createElement("div", { className: vm.formItemStyle, style: props.style },
|
|
@@ -68454,7 +68449,7 @@ var FormItem = observer(function (props) {
|
|
|
68454
68449
|
createElement("div", { className: styles.FormItemInputWrapper },
|
|
68455
68450
|
createElement("label", { className: vm.labelStyle }, vm.label),
|
|
68456
68451
|
vm.type === FormItemType.TEXT && (createElement(Input$2, { vm: vm, autocomplete: props.autocomplete, name: props.name })),
|
|
68457
|
-
vm.type === FormItemType.TEL && (createElement(PhoneInput, { defaultCountry: props.currentCountryCode, placeholder: t("checkout-page:enterPhoneNumber"), value: vm.value ? vm.value : "", onChange: vm.onPhoneChange, international: true, addInternationalOption: false })),
|
|
68452
|
+
vm.type === FormItemType.TEL && (createElement(PhoneInput, { key: props.currentCountryCode || "1", defaultCountry: props.currentCountryCode, placeholder: t("checkout-page:enterPhoneNumber"), value: vm.value ? vm.value : "", onChange: vm.onPhoneChange, international: true, addInternationalOption: false })),
|
|
68458
68453
|
vm.type === FormItemType.TEXT_AREA && createElement(TextArea, { vm: vm }),
|
|
68459
68454
|
vm.type === FormItemType.SELECT && (createElement(Select, { vm: vm, autocomplete: props.autocomplete }))),
|
|
68460
68455
|
!!vm.hasError && (createElement("div", { className: styles.ErrorMsg }, vm.errorText || "")),
|
|
@@ -69719,16 +69714,7 @@ var InputWithButton = function (_a) {
|
|
|
69719
69714
|
};
|
|
69720
69715
|
var InputWithButton$1 = observer(InputWithButton);
|
|
69721
69716
|
|
|
69722
|
-
var styles$e = {"CheckoutItem":"style-module_CheckoutItem__2JjSt","ImageContainer":"style-module_ImageContainer__2K2RG","Image":"style-module_Image__w2Q_P","Right":"style-module_Right__2HN2l","Name":"style-module_Name__nPgw1","LightText":"style-module_LightText__2P69D","Price":"style-module_Price__1Vw31","GrayPrice":"style-module_GrayPrice__2wDyJ"
|
|
69723
|
-
|
|
69724
|
-
var SVGDiscount = function (_a) {
|
|
69725
|
-
var className = _a.className;
|
|
69726
|
-
return (createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className },
|
|
69727
|
-
createElement("circle", { cx: "8", cy: "8", r: "8", fill: "#CFCED3" }),
|
|
69728
|
-
createElement("path", { d: "M10.9167 5.08301L5.08334 10.9163", stroke: "white", "stroke-linecap": "square", "stroke-linejoin": "round" }),
|
|
69729
|
-
createElement("path", { d: "M5.70832 6.75033C6.28362 6.75033 6.74999 6.28396 6.74999 5.70866C6.74999 5.13336 6.28362 4.66699 5.70832 4.66699C5.13303 4.66699 4.66666 5.13336 4.66666 5.70866C4.66666 6.28396 5.13303 6.75033 5.70832 6.75033Z", fill: "white" }),
|
|
69730
|
-
createElement("path", { d: "M10.2917 11.3333C10.867 11.3333 11.3333 10.867 11.3333 10.2917C11.3333 9.71637 10.867 9.25 10.2917 9.25C9.71637 9.25 9.25 9.71637 9.25 10.2917C9.25 10.867 9.71637 11.3333 10.2917 11.3333Z", fill: "white" })));
|
|
69731
|
-
};
|
|
69717
|
+
var styles$e = {"CheckoutItem":"style-module_CheckoutItem__2JjSt","ImageContainer":"style-module_ImageContainer__2K2RG","Image":"style-module_Image__w2Q_P","Right":"style-module_Right__2HN2l","Name":"style-module_Name__nPgw1","LightText":"style-module_LightText__2P69D","Price":"style-module_Price__1Vw31","GrayPrice":"style-module_GrayPrice__2wDyJ"};
|
|
69732
69718
|
|
|
69733
69719
|
var CartItem = observer(function (_a) {
|
|
69734
69720
|
var _b, _c;
|
|
@@ -69738,6 +69724,7 @@ var CartItem = observer(function (_a) {
|
|
|
69738
69724
|
return a.appliedOrderLines &&
|
|
69739
69725
|
a.appliedOrderLines.some(function (aol) { return aol.orderLineId === cartItem.id; });
|
|
69740
69726
|
});
|
|
69727
|
+
var adjustmentTotal = (adjustments === null || adjustments === void 0 ? void 0 : adjustments.reduce(function (total, current) { return total + current.amount; }, 0)) || 0;
|
|
69741
69728
|
return (createElement("div", { className: styles$e.CheckoutItem },
|
|
69742
69729
|
createElement("div", { className: styles$e.ImageContainer },
|
|
69743
69730
|
createElement("img", { className: styles$e.Image, src: (_c = cartItem.variant.mainImage) === null || _c === void 0 ? void 0 : _c.thumbnailSrc })),
|
|
@@ -69748,11 +69735,12 @@ var CartItem = observer(function (_a) {
|
|
|
69748
69735
|
.map(function (vv) { return vv.variantValueName; })
|
|
69749
69736
|
.join(" / ")),
|
|
69750
69737
|
createElement("div", { className: styles$e.Price },
|
|
69751
|
-
!!cartItem.overridenPriceWithQuantity && (createElement("span", { className: styles$e.GrayPrice },
|
|
69752
|
-
|
|
69753
|
-
|
|
69754
|
-
|
|
69755
|
-
|
|
69738
|
+
!!cartItem.overridenPriceWithQuantity && (createElement("span", { className: styles$e.GrayPrice }, !!adjustmentTotal
|
|
69739
|
+
? formatMoney(cartItem.finalPriceWithQuantity, currencyCode)
|
|
69740
|
+
: formatMoney(cartItem.overridenPriceWithQuantity, currencyCode))),
|
|
69741
|
+
!!adjustmentTotal
|
|
69742
|
+
? formatMoney(cartItem.finalPriceWithQuantity - adjustmentTotal, currencyCode)
|
|
69743
|
+
: formatMoney(cartItem.finalPriceWithQuantity, currencyCode)))));
|
|
69756
69744
|
});
|
|
69757
69745
|
|
|
69758
69746
|
var styles$f = {"TooltipContainer":"style-module_TooltipContainer__1IW8v","Tooltip":"style-module_Tooltip__1Pxw6","TooltipArrow":"style-module_TooltipArrow__1l6q_","Top":"style-module_Top__1_7C6","Bottom":"style-module_Bottom__2qCpQ","Left":"style-module_Left__1T6gj","Right":"style-module_Right__uCMMF"};
|
package/build/index.js
CHANGED
|
@@ -68355,9 +68355,6 @@ function (_React$Component) {
|
|
|
68355
68355
|
var FormItem = mobxReactLite.observer(function (props) {
|
|
68356
68356
|
var t = useTranslation().t;
|
|
68357
68357
|
var _a = React.useState(function () { return new FormItemViewModel(props); }), vm = _a[0], setVM = _a[1];
|
|
68358
|
-
if (props.type === FormItemType.TEL) {
|
|
68359
|
-
console.log("TEL form item.");
|
|
68360
|
-
}
|
|
68361
68358
|
React.useEffect(function () {
|
|
68362
68359
|
ReactTooltip.rebuild();
|
|
68363
68360
|
}, []);
|
|
@@ -68422,10 +68419,8 @@ var FormItem = mobxReactLite.observer(function (props) {
|
|
|
68422
68419
|
});
|
|
68423
68420
|
}, [props.onChange]);
|
|
68424
68421
|
React.useEffect(function () {
|
|
68425
|
-
console.log("currentCountry:", props.currentCountryCode);
|
|
68426
68422
|
if (!vm.country && props.currentCountryCode) {
|
|
68427
|
-
|
|
68428
|
-
vm.onPhoneChange(props.currentCountryCode);
|
|
68423
|
+
vm.onCountryChange(props.currentCountryCode);
|
|
68429
68424
|
}
|
|
68430
68425
|
}, [props.currentCountryCode]);
|
|
68431
68426
|
return (React.createElement("div", { className: vm.formItemStyle, style: props.style },
|
|
@@ -68433,7 +68428,7 @@ var FormItem = mobxReactLite.observer(function (props) {
|
|
|
68433
68428
|
React.createElement("div", { className: styles.FormItemInputWrapper },
|
|
68434
68429
|
React.createElement("label", { className: vm.labelStyle }, vm.label),
|
|
68435
68430
|
vm.type === FormItemType.TEXT && (React.createElement(Input$2, { vm: vm, autocomplete: props.autocomplete, name: props.name })),
|
|
68436
|
-
vm.type === FormItemType.TEL && (React.createElement(PhoneInput, { defaultCountry: props.currentCountryCode, placeholder: t("checkout-page:enterPhoneNumber"), value: vm.value ? vm.value : "", onChange: vm.onPhoneChange, international: true, addInternationalOption: false })),
|
|
68431
|
+
vm.type === FormItemType.TEL && (React.createElement(PhoneInput, { key: props.currentCountryCode || "1", defaultCountry: props.currentCountryCode, placeholder: t("checkout-page:enterPhoneNumber"), value: vm.value ? vm.value : "", onChange: vm.onPhoneChange, international: true, addInternationalOption: false })),
|
|
68437
68432
|
vm.type === FormItemType.TEXT_AREA && React.createElement(TextArea, { vm: vm }),
|
|
68438
68433
|
vm.type === FormItemType.SELECT && (React.createElement(Select, { vm: vm, autocomplete: props.autocomplete }))),
|
|
68439
68434
|
!!vm.hasError && (React.createElement("div", { className: styles.ErrorMsg }, vm.errorText || "")),
|
|
@@ -69698,16 +69693,7 @@ var InputWithButton = function (_a) {
|
|
|
69698
69693
|
};
|
|
69699
69694
|
var InputWithButton$1 = mobxReactLite.observer(InputWithButton);
|
|
69700
69695
|
|
|
69701
|
-
var styles$e = {"CheckoutItem":"style-module_CheckoutItem__2JjSt","ImageContainer":"style-module_ImageContainer__2K2RG","Image":"style-module_Image__w2Q_P","Right":"style-module_Right__2HN2l","Name":"style-module_Name__nPgw1","LightText":"style-module_LightText__2P69D","Price":"style-module_Price__1Vw31","GrayPrice":"style-module_GrayPrice__2wDyJ"
|
|
69702
|
-
|
|
69703
|
-
var SVGDiscount = function (_a) {
|
|
69704
|
-
var className = _a.className;
|
|
69705
|
-
return (React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className },
|
|
69706
|
-
React.createElement("circle", { cx: "8", cy: "8", r: "8", fill: "#CFCED3" }),
|
|
69707
|
-
React.createElement("path", { d: "M10.9167 5.08301L5.08334 10.9163", stroke: "white", "stroke-linecap": "square", "stroke-linejoin": "round" }),
|
|
69708
|
-
React.createElement("path", { d: "M5.70832 6.75033C6.28362 6.75033 6.74999 6.28396 6.74999 5.70866C6.74999 5.13336 6.28362 4.66699 5.70832 4.66699C5.13303 4.66699 4.66666 5.13336 4.66666 5.70866C4.66666 6.28396 5.13303 6.75033 5.70832 6.75033Z", fill: "white" }),
|
|
69709
|
-
React.createElement("path", { d: "M10.2917 11.3333C10.867 11.3333 11.3333 10.867 11.3333 10.2917C11.3333 9.71637 10.867 9.25 10.2917 9.25C9.71637 9.25 9.25 9.71637 9.25 10.2917C9.25 10.867 9.71637 11.3333 10.2917 11.3333Z", fill: "white" })));
|
|
69710
|
-
};
|
|
69696
|
+
var styles$e = {"CheckoutItem":"style-module_CheckoutItem__2JjSt","ImageContainer":"style-module_ImageContainer__2K2RG","Image":"style-module_Image__w2Q_P","Right":"style-module_Right__2HN2l","Name":"style-module_Name__nPgw1","LightText":"style-module_LightText__2P69D","Price":"style-module_Price__1Vw31","GrayPrice":"style-module_GrayPrice__2wDyJ"};
|
|
69711
69697
|
|
|
69712
69698
|
var CartItem = mobxReactLite.observer(function (_a) {
|
|
69713
69699
|
var _b, _c;
|
|
@@ -69717,6 +69703,7 @@ var CartItem = mobxReactLite.observer(function (_a) {
|
|
|
69717
69703
|
return a.appliedOrderLines &&
|
|
69718
69704
|
a.appliedOrderLines.some(function (aol) { return aol.orderLineId === cartItem.id; });
|
|
69719
69705
|
});
|
|
69706
|
+
var adjustmentTotal = (adjustments === null || adjustments === void 0 ? void 0 : adjustments.reduce(function (total, current) { return total + current.amount; }, 0)) || 0;
|
|
69720
69707
|
return (React.createElement("div", { className: styles$e.CheckoutItem },
|
|
69721
69708
|
React.createElement("div", { className: styles$e.ImageContainer },
|
|
69722
69709
|
React.createElement("img", { className: styles$e.Image, src: (_c = cartItem.variant.mainImage) === null || _c === void 0 ? void 0 : _c.thumbnailSrc })),
|
|
@@ -69727,11 +69714,12 @@ var CartItem = mobxReactLite.observer(function (_a) {
|
|
|
69727
69714
|
.map(function (vv) { return vv.variantValueName; })
|
|
69728
69715
|
.join(" / ")),
|
|
69729
69716
|
React.createElement("div", { className: styles$e.Price },
|
|
69730
|
-
!!cartItem.overridenPriceWithQuantity && (React.createElement("span", { className: styles$e.GrayPrice },
|
|
69731
|
-
|
|
69732
|
-
|
|
69733
|
-
|
|
69734
|
-
|
|
69717
|
+
!!cartItem.overridenPriceWithQuantity && (React.createElement("span", { className: styles$e.GrayPrice }, !!adjustmentTotal
|
|
69718
|
+
? formatMoney(cartItem.finalPriceWithQuantity, currencyCode)
|
|
69719
|
+
: formatMoney(cartItem.overridenPriceWithQuantity, currencyCode))),
|
|
69720
|
+
!!adjustmentTotal
|
|
69721
|
+
? formatMoney(cartItem.finalPriceWithQuantity - adjustmentTotal, currencyCode)
|
|
69722
|
+
: formatMoney(cartItem.finalPriceWithQuantity, currencyCode)))));
|
|
69735
69723
|
});
|
|
69736
69724
|
|
|
69737
69725
|
var styles$f = {"TooltipContainer":"style-module_TooltipContainer__1IW8v","Tooltip":"style-module_Tooltip__1Pxw6","TooltipArrow":"style-module_TooltipArrow__1l6q_","Top":"style-module_Top__1_7C6","Bottom":"style-module_Bottom__2qCpQ","Left":"style-module_Left__1T6gj","Right":"style-module_Right__uCMMF"};
|