@ikas/storefront 0.2.0-alpha.10 → 0.2.0-alpha.11

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.
@@ -18,6 +18,8 @@ export interface getCheckoutById_getCheckoutById_billingAddress_country {
18
18
  code: string | null;
19
19
  id: string | null;
20
20
  name: string;
21
+ iso2: string | null;
22
+ iso3: string | null;
21
23
  }
22
24
  export interface getCheckoutById_getCheckoutById_billingAddress_district {
23
25
  __typename: "OrderAddressDistrict";
@@ -69,6 +71,8 @@ export interface getCheckoutById_getCheckoutById_shippingAddress_country {
69
71
  id: string | null;
70
72
  code: string | null;
71
73
  name: string;
74
+ iso2: string | null;
75
+ iso3: string | null;
72
76
  }
73
77
  export interface getCheckoutById_getCheckoutById_shippingAddress_district {
74
78
  __typename: "OrderAddressDistrict";
@@ -14,7 +14,7 @@ export interface listPaymentGateway_listPaymentGateway_additionalPrices {
14
14
  export interface listPaymentGateway_listPaymentGateway_translations {
15
15
  __typename: "PaymentGatewayTranslation";
16
16
  description: string | null;
17
- locale: string;
17
+ locale: string | null;
18
18
  name: string | null;
19
19
  }
20
20
  export interface listPaymentGateway_listPaymentGateway {
@@ -30,6 +30,8 @@ export interface listPaymentGateway_listPaymentGateway {
30
30
  logoUrl: string | null;
31
31
  additionalPrices: listPaymentGateway_listPaymentGateway_additionalPrices[] | null;
32
32
  translations: listPaymentGateway_listPaymentGateway_translations[] | null;
33
+ supportedCurrencies: string[] | null;
34
+ availableCountries: string[] | null;
33
35
  }
34
36
  export interface listPaymentGateway {
35
37
  listPaymentGateway: listPaymentGateway_listPaymentGateway[];
@@ -3,4 +3,5 @@ export interface customerForgotPassword {
3
3
  }
4
4
  export interface customerForgotPasswordVariables {
5
5
  email: string;
6
+ locale: string;
6
7
  }
@@ -68,4 +68,5 @@ export interface registerCustomerVariables {
68
68
  firstName: string;
69
69
  lastName: string;
70
70
  isAcceptMarketing?: boolean | null;
71
+ locale?: string | null;
71
72
  }
@@ -12,7 +12,6 @@ export declare type IkasPageProps = {
12
12
  configJson: Record<string, any>;
13
13
  reInitOnBrowser?: boolean;
14
14
  addOgpMetas?: boolean;
15
- components?: Record<string, any>;
16
15
  };
17
16
  export declare const IkasPage: React.FC<IkasPageProps>;
18
17
  export declare const renderComponent: (pageComponentPropValue: IkasPageComponentPropValue, settings: IkasThemeSettings, index: number) => JSX.Element;
package/build/index.es.js CHANGED
@@ -10952,8 +10952,9 @@ function setContext(setter) {
10952
10952
  var IkasStorefrontConfig = /** @class */ (function () {
10953
10953
  function IkasStorefrontConfig() {
10954
10954
  }
10955
- IkasStorefrontConfig.init = function (store, config, apiUrlOverride) {
10955
+ IkasStorefrontConfig.init = function (store, components, config, apiUrlOverride) {
10956
10956
  IkasStorefrontConfig.store = store;
10957
+ IkasStorefrontConfig.components = components;
10957
10958
  IkasStorefrontConfig.config = config;
10958
10959
  IkasStorefrontConfig.apiUrlOverride = apiUrlOverride || null;
10959
10960
  if (process.env.NEXT_PUBLIC_ENV === "local") {
@@ -11000,6 +11001,7 @@ var IkasStorefrontConfig = /** @class */ (function () {
11000
11001
  : null,
11001
11002
  };
11002
11003
  };
11004
+ IkasStorefrontConfig.components = {};
11003
11005
  IkasStorefrontConfig.config = {};
11004
11006
  IkasStorefrontConfig.apiUrlOverride = null;
11005
11007
  IkasStorefrontConfig.routings = [];
@@ -12092,15 +12094,194 @@ function tryForEach(items, callback, printErrors) {
12092
12094
  });
12093
12095
  }
12094
12096
 
12097
+ /**
12098
+ *
12099
+ * @param price Price to format
12100
+ * @param currency Code for the currency, USD, EUR, TRY, etc..
12101
+ */
12095
12102
  var formatMoney = function (price, currency) {
12096
- var locale = typeof navigator !== "undefined"
12097
- ? navigator.languages
12098
- : "en-GB";
12099
- var formatter = new Intl.NumberFormat(locale, {
12103
+ var formatter = new Intl.NumberFormat(IkasStorefrontConfig.getCurrentLocale(), {
12100
12104
  style: "currency",
12101
12105
  currency: currency || "TRY",
12102
12106
  });
12103
12107
  return formatter.format(price);
12108
+ };
12109
+ function getCurrencySymbol(currencyCode) {
12110
+ return CURRENCIES[currencyCode] || currencyCode;
12111
+ }
12112
+ var CURRENCIES = {
12113
+ TRY: "₺",
12114
+ USD: "$",
12115
+ EUR: "€",
12116
+ AZN: "₼",
12117
+ AED: "د.إ.",
12118
+ AFN: "؋",
12119
+ ALL: "L",
12120
+ AMD: "դր",
12121
+ ANG: "ƒ",
12122
+ AOA: "Kz",
12123
+ ARS: "$",
12124
+ AUD: "$",
12125
+ AWG: "ƒ",
12126
+ BAM: "КМ",
12127
+ BBD: "$",
12128
+ BDT: "৳",
12129
+ BGN: "лв.",
12130
+ BHD: "د.ب.",
12131
+ BIF: "FBu",
12132
+ BMD: "$",
12133
+ BND: "$",
12134
+ BOB: "Bs.",
12135
+ BRL: "R$",
12136
+ BSD: "$",
12137
+ BTN: "Nu.",
12138
+ BWP: "P",
12139
+ BYN: "руб.",
12140
+ BZD: "$",
12141
+ CAD: "$",
12142
+ CDF: "₣",
12143
+ CHF: "₣",
12144
+ CKD: "$",
12145
+ CLP: "$",
12146
+ CNY: "¥元",
12147
+ COP: "$",
12148
+ CRC: "₡",
12149
+ CUC: "$",
12150
+ CUP: "₱",
12151
+ CVE: "$",
12152
+ CZK: "Kč",
12153
+ DJF: "ف.ج.",
12154
+ DKK: "kr.",
12155
+ DOP: "$",
12156
+ DZD: "د.ج.",
12157
+ EGP: "ج.م.",
12158
+ EHP: "Ptas.",
12159
+ ERN: "ناكفا",
12160
+ ETB: "ብር",
12161
+ FJD: "$",
12162
+ FKP: "£",
12163
+ FOK: "kr",
12164
+ GBP: "£",
12165
+ GEL: "₾",
12166
+ GGP: "£",
12167
+ GHS: "₵",
12168
+ GIP: "£",
12169
+ GMD: "D",
12170
+ GNF: "FG",
12171
+ GTQ: "$",
12172
+ GYD: "$",
12173
+ HKD: "$",
12174
+ HNL: "L",
12175
+ HRK: "kn",
12176
+ HTG: "G",
12177
+ HUF: "Ft",
12178
+ IDR: "Rp",
12179
+ ILS: "₪",
12180
+ IMP: "£",
12181
+ INR: "₹",
12182
+ IQD: "د.ع.",
12183
+ IRR: "﷼",
12184
+ ISK: "kr",
12185
+ JEP: "£",
12186
+ JMD: "$",
12187
+ JOD: "د.أ.",
12188
+ JPY: "¥",
12189
+ KES: "KSh",
12190
+ KGS: "с",
12191
+ KHR: "៛",
12192
+ KID: "$",
12193
+ KMF: "CF",
12194
+ KPW: "₩",
12195
+ KRW: "₩",
12196
+ KWD: "د.ك.",
12197
+ KYD: "$",
12198
+ KZT: "₸",
12199
+ LAK: "₭",
12200
+ LBP: "ل.ل.",
12201
+ LKR: "රු or ரூ",
12202
+ LRD: "$",
12203
+ LSL: "L",
12204
+ LYD: "ل.د.",
12205
+ MAD: "د.م.",
12206
+ MDL: "L",
12207
+ MGA: "Ar",
12208
+ MKD: "ден",
12209
+ MMK: "Ks",
12210
+ MNT: "₮",
12211
+ MOP: "MOP$",
12212
+ MRU: "أ.م.",
12213
+ MUR: "रु ",
12214
+ MVR: ".ރ",
12215
+ MWK: "MK",
12216
+ MXN: "$",
12217
+ MYR: "RM",
12218
+ MZN: "MT",
12219
+ NAD: "$",
12220
+ NGN: "₦",
12221
+ NIO: "C$",
12222
+ NOK: "kr",
12223
+ NPR: "रू",
12224
+ NZD: "$",
12225
+ OMR: "ر.ع.",
12226
+ PAB: "B/.",
12227
+ PEN: "S/.",
12228
+ PGK: "K",
12229
+ PHP: "₱",
12230
+ PKR: "Rs",
12231
+ PLN: "zł",
12232
+ PND: "$",
12233
+ PRB: "р.",
12234
+ PYG: "₲",
12235
+ QAR: "ر.ق.",
12236
+ RON: "L",
12237
+ RSD: "дин",
12238
+ RUB: "₽",
12239
+ RWF: "R₣",
12240
+ SAR: "ر.س.",
12241
+ SBD: "$",
12242
+ SCR: "Rs",
12243
+ SDG: "ج.س.",
12244
+ SEK: "kr",
12245
+ SGD: "$",
12246
+ SHP: "£",
12247
+ SLL: "Le",
12248
+ SLS: "Sl",
12249
+ SOS: "Ssh",
12250
+ SRD: "$",
12251
+ SSP: "SS£",
12252
+ STN: "Db",
12253
+ SVC: "₡",
12254
+ SYP: "ل.س.",
12255
+ SZL: "L",
12256
+ THB: "฿",
12257
+ TJS: "SM",
12258
+ TMT: "T",
12259
+ TND: "د.ت.",
12260
+ TOP: "PT",
12261
+ TTD: "$",
12262
+ TVD: "$",
12263
+ TWD: "圓",
12264
+ TZS: "TSh",
12265
+ UAH: "грн",
12266
+ UGX: "Sh",
12267
+ UYU: "$",
12268
+ UZS: "сум",
12269
+ VED: "Bs.",
12270
+ VES: "Bs.F",
12271
+ VND: "₫",
12272
+ VUV: "VT",
12273
+ WST: "ST",
12274
+ XAF: "Fr.",
12275
+ XCD: "$",
12276
+ XOF: "₣",
12277
+ XPF: "₣",
12278
+ YER: "ر.ي.",
12279
+ ZAR: "R",
12280
+ ZMW: "ZK",
12281
+ ZWB: "",
12282
+ ZWL: "$",
12283
+ Abkhazia: "",
12284
+ Artsakh: "դր.",
12104
12285
  };
12105
12286
 
12106
12287
  /** `Object#toString` result references. */
@@ -19682,6 +19863,7 @@ var IkasOrderLineItem = /** @class */ (function () {
19682
19863
  this.orderedAt = data.orderedAt || 0;
19683
19864
  this.deleted = data.deleted || false;
19684
19865
  this.currencyCode = data.currencyCode || "";
19866
+ this.currencySymbol = getCurrencySymbol(this.currencyCode);
19685
19867
  this.discount = data.discount
19686
19868
  ? new IkasOrderLineDiscount(data.discount)
19687
19869
  : undefined;
@@ -19792,6 +19974,7 @@ var IkasCart = /** @class */ (function () {
19792
19974
  this.updatedAt = data.updatedAt || "";
19793
19975
  this.dueDate = data.dueDate;
19794
19976
  this.currencyCode = data.currencyCode || "";
19977
+ this.currencySymbol = getCurrencySymbol(this.currencyCode);
19795
19978
  this.customerId = data.customerId;
19796
19979
  this.itemCount = data.itemCount || 0;
19797
19980
  this.items = data.items
@@ -19812,7 +19995,6 @@ var IkasCart = /** @class */ (function () {
19812
19995
  get: function () {
19813
19996
  var _a;
19814
19997
  return (((_a = this.taxLines) === null || _a === void 0 ? void 0 : _a.reduce(function (total, current) { return total + current.price; }, 0)) || 0);
19815
- // return this.items.reduce((total, current) => total + current.tax, 0);
19816
19998
  },
19817
19999
  enumerable: false,
19818
20000
  configurable: true
@@ -20401,6 +20583,7 @@ var IkasOrder = /** @class */ (function () {
20401
20583
  // this.totalDiscountPrice = data.totalDiscountPrice;
20402
20584
  // this.totalWeight = data.totalWeight;
20403
20585
  this.currencyCode = data.currencyCode;
20586
+ this.currencySymbol = getCurrencySymbol(this.currencyCode);
20404
20587
  this.orderedAt = data.orderedAt;
20405
20588
  this.cancelledAt = data.cancelledAt;
20406
20589
  this.status = data.status;
@@ -20570,6 +20753,7 @@ var IkasProductPrice = /** @class */ (function () {
20570
20753
  this.discountPrice =
20571
20754
  data.discountPrice !== undefined ? data.discountPrice : null;
20572
20755
  this.currency = data.currency || "";
20756
+ this.currencySymbol = getCurrencySymbol(this.currency);
20573
20757
  makeAutoObservable(this);
20574
20758
  }
20575
20759
  Object.defineProperty(IkasProductPrice.prototype, "finalPrice", {
@@ -23752,6 +23936,9 @@ var IkasOrderTransaction = /** @class */ (function () {
23752
23936
  this.checkoutId = data.checkoutId || null;
23753
23937
  this.createdAt = data.createdAt || null;
23754
23938
  this.currencyCode = data.currencyCode || null;
23939
+ this.currencySymbol = this.currencyCode
23940
+ ? getCurrencySymbol(this.currencyCode)
23941
+ : null;
23755
23942
  this.customerId = data.customerId || null;
23756
23943
  this.error = data.error || null;
23757
23944
  this.id = data.id || null;
@@ -27326,7 +27513,9 @@ var StorefrontEventPageType;
27326
27513
  StorefrontEventPageType[StorefrontEventPageType["BLOG_CATEGORY"] = 20] = "BLOG_CATEGORY";
27327
27514
  StorefrontEventPageType[StorefrontEventPageType["CHECKOUT"] = 21] = "CHECKOUT";
27328
27515
  })(StorefrontEventPageType || (StorefrontEventPageType = {}));
27329
- var ANALYTICS_URL = "https://0.myikas.dev/sendEvent";
27516
+ var ANALYTICS_URL = process.env.NEXT_PUBLIC_ANALYTICS_URL
27517
+ ? process.env.NEXT_PUBLIC_ANALYTICS_URL + "/sendEvent"
27518
+ : "https://0.myikas.dev/sendEvent";
27330
27519
  var IkasAnalytics = /** @class */ (function () {
27331
27520
  function IkasAnalytics() {
27332
27521
  }
@@ -41960,7 +42149,7 @@ var IkasCustomerAPI = /** @class */ (function () {
41960
42149
  return __generator(this, function (_b) {
41961
42150
  switch (_b.label) {
41962
42151
  case 0:
41963
- MUTATION = src(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "], ["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "])));
42152
+ MUTATION = src(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n $locale: String\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n locale: $locale\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "], ["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n $locale: String\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n locale: $locale\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "])));
41964
42153
  _b.label = 1;
41965
42154
  case 1:
41966
42155
  _b.trys.push([1, 3, , 4]);
@@ -41974,6 +42163,7 @@ var IkasCustomerAPI = /** @class */ (function () {
41974
42163
  firstName: firstName,
41975
42164
  lastName: lastName,
41976
42165
  isAcceptMarketing: isAcceptMarketing,
42166
+ locale: IkasStorefrontConfig.getCurrentLocale(),
41977
42167
  },
41978
42168
  })];
41979
42169
  case 2:
@@ -42034,7 +42224,7 @@ var IkasCustomerAPI = /** @class */ (function () {
42034
42224
  return __generator(this, function (_b) {
42035
42225
  switch (_b.label) {
42036
42226
  case 0:
42037
- MUTATION = src(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n mutation customerForgotPassword($email: String!) {\n customerForgotPassword(email: $email)\n }\n "], ["\n mutation customerForgotPassword($email: String!) {\n customerForgotPassword(email: $email)\n }\n "])));
42227
+ MUTATION = src(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n mutation customerForgotPassword($email: String!, $locale: String!) {\n customerForgotPassword(email: $email, locale: $locale)\n }\n "], ["\n mutation customerForgotPassword($email: String!, $locale: String!) {\n customerForgotPassword(email: $email, locale: $locale)\n }\n "])));
42038
42228
  _b.label = 1;
42039
42229
  case 1:
42040
42230
  _b.trys.push([1, 3, , 4]);
@@ -42044,6 +42234,7 @@ var IkasCustomerAPI = /** @class */ (function () {
42044
42234
  mutation: MUTATION,
42045
42235
  variables: {
42046
42236
  email: email,
42237
+ locale: IkasStorefrontConfig.getCurrentLocale(),
42047
42238
  },
42048
42239
  })];
42049
42240
  case 2:
@@ -45598,7 +45789,7 @@ var IkasPageDataInit = /** @class */ (function () {
45598
45789
 
45599
45790
  var ThemeComponent = observer(function (_a) {
45600
45791
  var pageComponentPropValue = _a.pageComponentPropValue, index = _a.index, settings = _a.settings;
45601
- var store = IkasStorefrontConfig.store, currentPageComponents = IkasStorefrontConfig.currentPageComponents;
45792
+ var store = IkasStorefrontConfig.store, components = IkasStorefrontConfig.components;
45602
45793
  var pageComponent = pageComponentPropValue.pageComponent;
45603
45794
  var propValues = pageComponentPropValue.propValues;
45604
45795
  var hasNullValue = computed(function () {
@@ -45609,14 +45800,9 @@ var ThemeComponent = observer(function (_a) {
45609
45800
  }
45610
45801
  });
45611
45802
  });
45612
- if (!currentPageComponents) {
45613
- console.error("Components for the page not found.");
45614
- return null;
45615
- }
45616
- var Component = currentPageComponents[pageComponent.componentId];
45803
+ var Component = components[pageComponent.componentId];
45617
45804
  if (!Component) {
45618
- console.error("COMPONENT NOT FOUND!", JSON.stringify(pageComponentPropValue.component, null, 2));
45619
- return null;
45805
+ console.error("COMPONENT NOT FOUND!", pageComponent.id, pageComponent.componentId, components ? Object.keys(components) : []);
45620
45806
  }
45621
45807
  return (createElement("div", { id: index + "" }, hasNullValue.get() ? null : (createElement(Component, __assign({ key: pageComponent.id }, propValues, { settings: settings, store: store, pageSpecificData: IkasPageDataInit.pageSpecificData })))));
45622
45808
  });
@@ -45832,9 +46018,8 @@ function createCategoryBreadcrumbSchema(category) {
45832
46018
  }
45833
46019
 
45834
46020
  var IkasPage = observer(function (_a) {
45835
- var propValuesStr = _a.propValuesStr, pageType = _a.pageType, pageTitle = _a.pageTitle, pageDescription = _a.pageDescription, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettingsStr = _a.merchantSettingsStr, configJson = _a.configJson, reInitOnBrowser = _a.reInitOnBrowser, addOgpMetas = _a.addOgpMetas, components = _a.components;
46021
+ var propValuesStr = _a.propValuesStr, pageType = _a.pageType, pageTitle = _a.pageTitle, pageDescription = _a.pageDescription, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettingsStr = _a.merchantSettingsStr, configJson = _a.configJson, reInitOnBrowser = _a.reInitOnBrowser, addOgpMetas = _a.addOgpMetas;
45836
46022
  IkasStorefrontConfig.initWithJson(configJson);
45837
- IkasStorefrontConfig.currentPageComponents = components;
45838
46023
  var store = IkasStorefrontConfig.store;
45839
46024
  store.currentPageType = pageType;
45840
46025
  var router = useRouter();
@@ -69042,7 +69227,7 @@ var AddressFormViewModel = /** @class */ (function () {
69042
69227
  });
69043
69228
  }); };
69044
69229
  this.listCountries = function () { return __awaiter(_this, void 0, void 0, function () {
69045
- var _a, countries, currentRouting_1, currentCountry;
69230
+ var _a, countries, currentRouting_1, otherRoutings_1, currentCountry;
69046
69231
  var _this = this;
69047
69232
  var _b, _c;
69048
69233
  return __generator(this, function (_d) {
@@ -69062,6 +69247,13 @@ var AddressFormViewModel = /** @class */ (function () {
69062
69247
  if ((_c = currentRouting_1 === null || currentRouting_1 === void 0 ? void 0 : currentRouting_1.countryCodes) === null || _c === void 0 ? void 0 : _c.length) {
69063
69248
  countries = countries.filter(function (c) { var _a; return c.iso2 && ((_a = currentRouting_1.countryCodes) === null || _a === void 0 ? void 0 : _a.includes(c.iso2)); });
69064
69249
  }
69250
+ else {
69251
+ otherRoutings_1 = IkasStorefrontConfig.routings.filter(function (r) { return r.id !== IkasStorefrontConfig.storefrontRoutingId; });
69252
+ countries = countries.filter(function (c) {
69253
+ return c.iso2 &&
69254
+ !otherRoutings_1.some(function (otherRouting) { var _a; return (_a = otherRouting.countryCodes) === null || _a === void 0 ? void 0 : _a.includes(c.iso2); });
69255
+ });
69256
+ }
69065
69257
  this.countries = countries;
69066
69258
  if (this.countries.length === 1 && !this.country)
69067
69259
  this.onCountryChange(this.countries[0].id);
@@ -71194,7 +71386,7 @@ var ThemeEditorComponent = observer(function (_a) {
71194
71386
  var _b, _c, _d;
71195
71387
  var vm = _a.vm, pageComponent = _a.pageComponent;
71196
71388
  var ref = useRef(null);
71197
- var store = IkasStorefrontConfig.store, currentPageComponents = IkasStorefrontConfig.currentPageComponents;
71389
+ var store = IkasStorefrontConfig.store, components = IkasStorefrontConfig.components;
71198
71390
  useEffect(function () {
71199
71391
  vm.setComponentRef(ref.current, pageComponent);
71200
71392
  }, []);
@@ -71210,11 +71402,7 @@ var ThemeEditorComponent = observer(function (_a) {
71210
71402
  var propValues = (_c = pageComponentPropValue.get()) === null || _c === void 0 ? void 0 : _c.propValues;
71211
71403
  if (!propValues)
71212
71404
  return null;
71213
- if (!currentPageComponents) {
71214
- console.error("Components for the page not found.");
71215
- return null;
71216
- }
71217
- var Component = currentPageComponents[pageComponent.componentId];
71405
+ var Component = components[pageComponent.componentId];
71218
71406
  if (((_d = vm.page) === null || _d === void 0 ? void 0 : _d.type) === IkasThemePageType.CHECKOUT) {
71219
71407
  //@ts-ignore
71220
71408
  Component = IkasCheckoutPage$1;
@@ -71223,7 +71411,7 @@ var ThemeEditorComponent = observer(function (_a) {
71223
71411
  cart: new IkasCart({
71224
71412
  items: [
71225
71413
  new IkasOrderLineItem({
71226
- currencyCode: "",
71414
+ currencyCode: "TRY",
71227
71415
  finalPrice: 100,
71228
71416
  finalPriceWithQuantity: 100,
71229
71417
  price: 100,
@@ -72082,13 +72270,10 @@ var cart$1 = /*#__PURE__*/Object.freeze({
72082
72270
 
72083
72271
  var IkasPageEditor$1 = dynamic(function () { return Promise.resolve().then(function () { return index; }).then(function (mod) { return mod.IkasPageEditor; }); }, { ssr: false });
72084
72272
  var Page$c = function (_a) {
72085
- var configJson = _a.configJson, components = _a.components;
72273
+ var configJson = _a.configJson;
72086
72274
  if (configJson) {
72087
72275
  IkasStorefrontConfig.initWithJson(configJson);
72088
72276
  }
72089
- if (components) {
72090
- IkasStorefrontConfig.currentPageComponents = components;
72091
- }
72092
72277
  return createElement(IkasPageEditor$1, null);
72093
72278
  };
72094
72279
  var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -73528,4 +73713,4 @@ var en$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Ob
73528
73713
  'default': en
73529
73714
  }));
73530
73715
 
73531
- export { AccountInfoForm, index$4 as AccountPage, AddressForm, addresses$1 as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$8 as BlogPage, _slug_$3 as BlogSlugPage, cart$1 as CartPage, checkout$1 as CheckoutPage, ContactForm, _slug_$1 as CustomPage, CustomerReviewForm, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts$1 as FavoriteProductsPage, ForgotPasswordForm, forgotPassword$1 as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasAttributeDetail, IkasAttributeList, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogCategoryList, IkasBlogCategoryListPropValue, IkasBlogCategoryListType, IkasBlogCategoryPropValue, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogTag, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPath, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutCustomer, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasCustomerReview, IkasCustomerReviewAPI, IkasCustomerReviewList, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasFilterCategory, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderRefundSettings, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeType, IkasProductAttributeValue, IkasProductBackInStockReminderAPI, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductOption, IkasProductOptionDateSettings, IkasProductOptionFileSettings, IkasProductOptionSelectSettings, IkasProductOptionSelectType, IkasProductOptionSelectValue, IkasProductOptionSelectValueTranslations, IkasProductOptionSet, IkasProductOptionSetAPI, IkasProductOptionSetTranslations, IkasProductOptionTextSettings, IkasProductOptionTranslations, IkasProductOptionType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home$1 as IndexPage, LessThanRule, LoginForm, login$1 as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$1 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$6 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword$1 as RecoverPasswordPage, RegisterForm, register$1 as RegisterPage, RequiredRule, search$1 as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, createTranslationInputData, decodeBase64, findAllIndexes, formatDate, formatMoney, parseRangeStr, pascalCase, stringSorter, stringToSlug, tryForEach, useTranslation, validatePhoneNumber };
73716
+ export { AccountInfoForm, index$4 as AccountPage, AddressForm, addresses$1 as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$8 as BlogPage, _slug_$3 as BlogSlugPage, cart$1 as CartPage, checkout$1 as CheckoutPage, ContactForm, _slug_$1 as CustomPage, CustomerReviewForm, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts$1 as FavoriteProductsPage, ForgotPasswordForm, forgotPassword$1 as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasAttributeDetail, IkasAttributeList, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogCategoryList, IkasBlogCategoryListPropValue, IkasBlogCategoryListType, IkasBlogCategoryPropValue, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogTag, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutCustomer, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasCustomerReview, IkasCustomerReviewAPI, IkasCustomerReviewList, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderRefundSettings, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeType, IkasProductAttributeValue, IkasProductBackInStockReminderAPI, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductOption, IkasProductOptionDateSettings, IkasProductOptionFileSettings, IkasProductOptionSelectSettings, IkasProductOptionSelectType, IkasProductOptionSelectValue, IkasProductOptionSelectValueTranslations, IkasProductOptionSet, IkasProductOptionSetAPI, IkasProductOptionSetTranslations, IkasProductOptionTextSettings, IkasProductOptionTranslations, IkasProductOptionType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home$1 as IndexPage, LessThanRule, LoginForm, login$1 as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$1 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$6 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword$1 as RecoverPasswordPage, RegisterForm, register$1 as RegisterPage, RequiredRule, search$1 as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, createTranslationInputData, decodeBase64, findAllIndexes, formatDate, formatMoney, getCurrencySymbol, parseRangeStr, pascalCase, stringSorter, stringToSlug, tryForEach, useTranslation, validatePhoneNumber };
package/build/index.js CHANGED
@@ -10969,8 +10969,9 @@ function setContext(setter) {
10969
10969
  var IkasStorefrontConfig = /** @class */ (function () {
10970
10970
  function IkasStorefrontConfig() {
10971
10971
  }
10972
- IkasStorefrontConfig.init = function (store, config, apiUrlOverride) {
10972
+ IkasStorefrontConfig.init = function (store, components, config, apiUrlOverride) {
10973
10973
  IkasStorefrontConfig.store = store;
10974
+ IkasStorefrontConfig.components = components;
10974
10975
  IkasStorefrontConfig.config = config;
10975
10976
  IkasStorefrontConfig.apiUrlOverride = apiUrlOverride || null;
10976
10977
  if (process.env.NEXT_PUBLIC_ENV === "local") {
@@ -11017,6 +11018,7 @@ var IkasStorefrontConfig = /** @class */ (function () {
11017
11018
  : null,
11018
11019
  };
11019
11020
  };
11021
+ IkasStorefrontConfig.components = {};
11020
11022
  IkasStorefrontConfig.config = {};
11021
11023
  IkasStorefrontConfig.apiUrlOverride = null;
11022
11024
  IkasStorefrontConfig.routings = [];
@@ -12109,15 +12111,194 @@ function tryForEach(items, callback, printErrors) {
12109
12111
  });
12110
12112
  }
12111
12113
 
12114
+ /**
12115
+ *
12116
+ * @param price Price to format
12117
+ * @param currency Code for the currency, USD, EUR, TRY, etc..
12118
+ */
12112
12119
  var formatMoney = function (price, currency) {
12113
- var locale = typeof navigator !== "undefined"
12114
- ? navigator.languages
12115
- : "en-GB";
12116
- var formatter = new Intl.NumberFormat(locale, {
12120
+ var formatter = new Intl.NumberFormat(IkasStorefrontConfig.getCurrentLocale(), {
12117
12121
  style: "currency",
12118
12122
  currency: currency || "TRY",
12119
12123
  });
12120
12124
  return formatter.format(price);
12125
+ };
12126
+ function getCurrencySymbol(currencyCode) {
12127
+ return CURRENCIES[currencyCode] || currencyCode;
12128
+ }
12129
+ var CURRENCIES = {
12130
+ TRY: "₺",
12131
+ USD: "$",
12132
+ EUR: "€",
12133
+ AZN: "₼",
12134
+ AED: "د.إ.",
12135
+ AFN: "؋",
12136
+ ALL: "L",
12137
+ AMD: "դր",
12138
+ ANG: "ƒ",
12139
+ AOA: "Kz",
12140
+ ARS: "$",
12141
+ AUD: "$",
12142
+ AWG: "ƒ",
12143
+ BAM: "КМ",
12144
+ BBD: "$",
12145
+ BDT: "৳",
12146
+ BGN: "лв.",
12147
+ BHD: "د.ب.",
12148
+ BIF: "FBu",
12149
+ BMD: "$",
12150
+ BND: "$",
12151
+ BOB: "Bs.",
12152
+ BRL: "R$",
12153
+ BSD: "$",
12154
+ BTN: "Nu.",
12155
+ BWP: "P",
12156
+ BYN: "руб.",
12157
+ BZD: "$",
12158
+ CAD: "$",
12159
+ CDF: "₣",
12160
+ CHF: "₣",
12161
+ CKD: "$",
12162
+ CLP: "$",
12163
+ CNY: "¥元",
12164
+ COP: "$",
12165
+ CRC: "₡",
12166
+ CUC: "$",
12167
+ CUP: "₱",
12168
+ CVE: "$",
12169
+ CZK: "Kč",
12170
+ DJF: "ف.ج.",
12171
+ DKK: "kr.",
12172
+ DOP: "$",
12173
+ DZD: "د.ج.",
12174
+ EGP: "ج.م.",
12175
+ EHP: "Ptas.",
12176
+ ERN: "ناكفا",
12177
+ ETB: "ብር",
12178
+ FJD: "$",
12179
+ FKP: "£",
12180
+ FOK: "kr",
12181
+ GBP: "£",
12182
+ GEL: "₾",
12183
+ GGP: "£",
12184
+ GHS: "₵",
12185
+ GIP: "£",
12186
+ GMD: "D",
12187
+ GNF: "FG",
12188
+ GTQ: "$",
12189
+ GYD: "$",
12190
+ HKD: "$",
12191
+ HNL: "L",
12192
+ HRK: "kn",
12193
+ HTG: "G",
12194
+ HUF: "Ft",
12195
+ IDR: "Rp",
12196
+ ILS: "₪",
12197
+ IMP: "£",
12198
+ INR: "₹",
12199
+ IQD: "د.ع.",
12200
+ IRR: "﷼",
12201
+ ISK: "kr",
12202
+ JEP: "£",
12203
+ JMD: "$",
12204
+ JOD: "د.أ.",
12205
+ JPY: "¥",
12206
+ KES: "KSh",
12207
+ KGS: "с",
12208
+ KHR: "៛",
12209
+ KID: "$",
12210
+ KMF: "CF",
12211
+ KPW: "₩",
12212
+ KRW: "₩",
12213
+ KWD: "د.ك.",
12214
+ KYD: "$",
12215
+ KZT: "₸",
12216
+ LAK: "₭",
12217
+ LBP: "ل.ل.",
12218
+ LKR: "රු or ரூ",
12219
+ LRD: "$",
12220
+ LSL: "L",
12221
+ LYD: "ل.د.",
12222
+ MAD: "د.م.",
12223
+ MDL: "L",
12224
+ MGA: "Ar",
12225
+ MKD: "ден",
12226
+ MMK: "Ks",
12227
+ MNT: "₮",
12228
+ MOP: "MOP$",
12229
+ MRU: "أ.م.",
12230
+ MUR: "रु ",
12231
+ MVR: ".ރ",
12232
+ MWK: "MK",
12233
+ MXN: "$",
12234
+ MYR: "RM",
12235
+ MZN: "MT",
12236
+ NAD: "$",
12237
+ NGN: "₦",
12238
+ NIO: "C$",
12239
+ NOK: "kr",
12240
+ NPR: "रू",
12241
+ NZD: "$",
12242
+ OMR: "ر.ع.",
12243
+ PAB: "B/.",
12244
+ PEN: "S/.",
12245
+ PGK: "K",
12246
+ PHP: "₱",
12247
+ PKR: "Rs",
12248
+ PLN: "zł",
12249
+ PND: "$",
12250
+ PRB: "р.",
12251
+ PYG: "₲",
12252
+ QAR: "ر.ق.",
12253
+ RON: "L",
12254
+ RSD: "дин",
12255
+ RUB: "₽",
12256
+ RWF: "R₣",
12257
+ SAR: "ر.س.",
12258
+ SBD: "$",
12259
+ SCR: "Rs",
12260
+ SDG: "ج.س.",
12261
+ SEK: "kr",
12262
+ SGD: "$",
12263
+ SHP: "£",
12264
+ SLL: "Le",
12265
+ SLS: "Sl",
12266
+ SOS: "Ssh",
12267
+ SRD: "$",
12268
+ SSP: "SS£",
12269
+ STN: "Db",
12270
+ SVC: "₡",
12271
+ SYP: "ل.س.",
12272
+ SZL: "L",
12273
+ THB: "฿",
12274
+ TJS: "SM",
12275
+ TMT: "T",
12276
+ TND: "د.ت.",
12277
+ TOP: "PT",
12278
+ TTD: "$",
12279
+ TVD: "$",
12280
+ TWD: "圓",
12281
+ TZS: "TSh",
12282
+ UAH: "грн",
12283
+ UGX: "Sh",
12284
+ UYU: "$",
12285
+ UZS: "сум",
12286
+ VED: "Bs.",
12287
+ VES: "Bs.F",
12288
+ VND: "₫",
12289
+ VUV: "VT",
12290
+ WST: "ST",
12291
+ XAF: "Fr.",
12292
+ XCD: "$",
12293
+ XOF: "₣",
12294
+ XPF: "₣",
12295
+ YER: "ر.ي.",
12296
+ ZAR: "R",
12297
+ ZMW: "ZK",
12298
+ ZWB: "",
12299
+ ZWL: "$",
12300
+ Abkhazia: "",
12301
+ Artsakh: "դր.",
12121
12302
  };
12122
12303
 
12123
12304
  /** `Object#toString` result references. */
@@ -19697,6 +19878,7 @@ var IkasOrderLineItem = /** @class */ (function () {
19697
19878
  this.orderedAt = data.orderedAt || 0;
19698
19879
  this.deleted = data.deleted || false;
19699
19880
  this.currencyCode = data.currencyCode || "";
19881
+ this.currencySymbol = getCurrencySymbol(this.currencyCode);
19700
19882
  this.discount = data.discount
19701
19883
  ? new IkasOrderLineDiscount(data.discount)
19702
19884
  : undefined;
@@ -19807,6 +19989,7 @@ var IkasCart = /** @class */ (function () {
19807
19989
  this.updatedAt = data.updatedAt || "";
19808
19990
  this.dueDate = data.dueDate;
19809
19991
  this.currencyCode = data.currencyCode || "";
19992
+ this.currencySymbol = getCurrencySymbol(this.currencyCode);
19810
19993
  this.customerId = data.customerId;
19811
19994
  this.itemCount = data.itemCount || 0;
19812
19995
  this.items = data.items
@@ -19827,7 +20010,6 @@ var IkasCart = /** @class */ (function () {
19827
20010
  get: function () {
19828
20011
  var _a;
19829
20012
  return (((_a = this.taxLines) === null || _a === void 0 ? void 0 : _a.reduce(function (total, current) { return total + current.price; }, 0)) || 0);
19830
- // return this.items.reduce((total, current) => total + current.tax, 0);
19831
20013
  },
19832
20014
  enumerable: false,
19833
20015
  configurable: true
@@ -20408,6 +20590,7 @@ var IkasOrder = /** @class */ (function () {
20408
20590
  // this.totalDiscountPrice = data.totalDiscountPrice;
20409
20591
  // this.totalWeight = data.totalWeight;
20410
20592
  this.currencyCode = data.currencyCode;
20593
+ this.currencySymbol = getCurrencySymbol(this.currencyCode);
20411
20594
  this.orderedAt = data.orderedAt;
20412
20595
  this.cancelledAt = data.cancelledAt;
20413
20596
  this.status = data.status;
@@ -20569,6 +20752,7 @@ var IkasProductPrice = /** @class */ (function () {
20569
20752
  this.discountPrice =
20570
20753
  data.discountPrice !== undefined ? data.discountPrice : null;
20571
20754
  this.currency = data.currency || "";
20755
+ this.currencySymbol = getCurrencySymbol(this.currency);
20572
20756
  mobx.makeAutoObservable(this);
20573
20757
  }
20574
20758
  Object.defineProperty(IkasProductPrice.prototype, "finalPrice", {
@@ -23745,6 +23929,9 @@ var IkasOrderTransaction = /** @class */ (function () {
23745
23929
  this.checkoutId = data.checkoutId || null;
23746
23930
  this.createdAt = data.createdAt || null;
23747
23931
  this.currencyCode = data.currencyCode || null;
23932
+ this.currencySymbol = this.currencyCode
23933
+ ? getCurrencySymbol(this.currencyCode)
23934
+ : null;
23748
23935
  this.customerId = data.customerId || null;
23749
23936
  this.error = data.error || null;
23750
23937
  this.id = data.id || null;
@@ -27306,7 +27493,9 @@ var StorefrontEventPageType;
27306
27493
  StorefrontEventPageType[StorefrontEventPageType["BLOG_CATEGORY"] = 20] = "BLOG_CATEGORY";
27307
27494
  StorefrontEventPageType[StorefrontEventPageType["CHECKOUT"] = 21] = "CHECKOUT";
27308
27495
  })(StorefrontEventPageType || (StorefrontEventPageType = {}));
27309
- var ANALYTICS_URL = "https://0.myikas.dev/sendEvent";
27496
+ var ANALYTICS_URL = process.env.NEXT_PUBLIC_ANALYTICS_URL
27497
+ ? process.env.NEXT_PUBLIC_ANALYTICS_URL + "/sendEvent"
27498
+ : "https://0.myikas.dev/sendEvent";
27310
27499
  var IkasAnalytics = /** @class */ (function () {
27311
27500
  function IkasAnalytics() {
27312
27501
  }
@@ -41937,7 +42126,7 @@ var IkasCustomerAPI = /** @class */ (function () {
41937
42126
  return __generator(this, function (_b) {
41938
42127
  switch (_b.label) {
41939
42128
  case 0:
41940
- MUTATION = src(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "], ["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "])));
42129
+ MUTATION = src(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n $locale: String\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n locale: $locale\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "], ["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n $locale: String\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n locale: $locale\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "])));
41941
42130
  _b.label = 1;
41942
42131
  case 1:
41943
42132
  _b.trys.push([1, 3, , 4]);
@@ -41951,6 +42140,7 @@ var IkasCustomerAPI = /** @class */ (function () {
41951
42140
  firstName: firstName,
41952
42141
  lastName: lastName,
41953
42142
  isAcceptMarketing: isAcceptMarketing,
42143
+ locale: IkasStorefrontConfig.getCurrentLocale(),
41954
42144
  },
41955
42145
  })];
41956
42146
  case 2:
@@ -42011,7 +42201,7 @@ var IkasCustomerAPI = /** @class */ (function () {
42011
42201
  return __generator(this, function (_b) {
42012
42202
  switch (_b.label) {
42013
42203
  case 0:
42014
- MUTATION = src(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n mutation customerForgotPassword($email: String!) {\n customerForgotPassword(email: $email)\n }\n "], ["\n mutation customerForgotPassword($email: String!) {\n customerForgotPassword(email: $email)\n }\n "])));
42204
+ MUTATION = src(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n mutation customerForgotPassword($email: String!, $locale: String!) {\n customerForgotPassword(email: $email, locale: $locale)\n }\n "], ["\n mutation customerForgotPassword($email: String!, $locale: String!) {\n customerForgotPassword(email: $email, locale: $locale)\n }\n "])));
42015
42205
  _b.label = 1;
42016
42206
  case 1:
42017
42207
  _b.trys.push([1, 3, , 4]);
@@ -42021,6 +42211,7 @@ var IkasCustomerAPI = /** @class */ (function () {
42021
42211
  mutation: MUTATION,
42022
42212
  variables: {
42023
42213
  email: email,
42214
+ locale: IkasStorefrontConfig.getCurrentLocale(),
42024
42215
  },
42025
42216
  })];
42026
42217
  case 2:
@@ -45575,7 +45766,7 @@ var IkasPageDataInit = /** @class */ (function () {
45575
45766
 
45576
45767
  var ThemeComponent = mobxReactLite.observer(function (_a) {
45577
45768
  var pageComponentPropValue = _a.pageComponentPropValue, index = _a.index, settings = _a.settings;
45578
- var store = IkasStorefrontConfig.store, currentPageComponents = IkasStorefrontConfig.currentPageComponents;
45769
+ var store = IkasStorefrontConfig.store, components = IkasStorefrontConfig.components;
45579
45770
  var pageComponent = pageComponentPropValue.pageComponent;
45580
45771
  var propValues = pageComponentPropValue.propValues;
45581
45772
  var hasNullValue = mobx.computed(function () {
@@ -45586,14 +45777,9 @@ var ThemeComponent = mobxReactLite.observer(function (_a) {
45586
45777
  }
45587
45778
  });
45588
45779
  });
45589
- if (!currentPageComponents) {
45590
- console.error("Components for the page not found.");
45591
- return null;
45592
- }
45593
- var Component = currentPageComponents[pageComponent.componentId];
45780
+ var Component = components[pageComponent.componentId];
45594
45781
  if (!Component) {
45595
- console.error("COMPONENT NOT FOUND!", JSON.stringify(pageComponentPropValue.component, null, 2));
45596
- return null;
45782
+ console.error("COMPONENT NOT FOUND!", pageComponent.id, pageComponent.componentId, components ? Object.keys(components) : []);
45597
45783
  }
45598
45784
  return (React.createElement("div", { id: index + "" }, hasNullValue.get() ? null : (React.createElement(Component, __assign({ key: pageComponent.id }, propValues, { settings: settings, store: store, pageSpecificData: IkasPageDataInit.pageSpecificData })))));
45599
45785
  });
@@ -45809,9 +45995,8 @@ function createCategoryBreadcrumbSchema(category) {
45809
45995
  }
45810
45996
 
45811
45997
  var IkasPage = mobxReactLite.observer(function (_a) {
45812
- var propValuesStr = _a.propValuesStr, pageType = _a.pageType, pageTitle = _a.pageTitle, pageDescription = _a.pageDescription, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettingsStr = _a.merchantSettingsStr, configJson = _a.configJson, reInitOnBrowser = _a.reInitOnBrowser, addOgpMetas = _a.addOgpMetas, components = _a.components;
45998
+ var propValuesStr = _a.propValuesStr, pageType = _a.pageType, pageTitle = _a.pageTitle, pageDescription = _a.pageDescription, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettingsStr = _a.merchantSettingsStr, configJson = _a.configJson, reInitOnBrowser = _a.reInitOnBrowser, addOgpMetas = _a.addOgpMetas;
45813
45999
  IkasStorefrontConfig.initWithJson(configJson);
45814
- IkasStorefrontConfig.currentPageComponents = components;
45815
46000
  var store = IkasStorefrontConfig.store;
45816
46001
  store.currentPageType = pageType;
45817
46002
  var router$1 = router.useRouter();
@@ -69019,7 +69204,7 @@ var AddressFormViewModel = /** @class */ (function () {
69019
69204
  });
69020
69205
  }); };
69021
69206
  this.listCountries = function () { return __awaiter(_this, void 0, void 0, function () {
69022
- var _a, countries, currentRouting_1, currentCountry;
69207
+ var _a, countries, currentRouting_1, otherRoutings_1, currentCountry;
69023
69208
  var _this = this;
69024
69209
  var _b, _c;
69025
69210
  return __generator(this, function (_d) {
@@ -69039,6 +69224,13 @@ var AddressFormViewModel = /** @class */ (function () {
69039
69224
  if ((_c = currentRouting_1 === null || currentRouting_1 === void 0 ? void 0 : currentRouting_1.countryCodes) === null || _c === void 0 ? void 0 : _c.length) {
69040
69225
  countries = countries.filter(function (c) { var _a; return c.iso2 && ((_a = currentRouting_1.countryCodes) === null || _a === void 0 ? void 0 : _a.includes(c.iso2)); });
69041
69226
  }
69227
+ else {
69228
+ otherRoutings_1 = IkasStorefrontConfig.routings.filter(function (r) { return r.id !== IkasStorefrontConfig.storefrontRoutingId; });
69229
+ countries = countries.filter(function (c) {
69230
+ return c.iso2 &&
69231
+ !otherRoutings_1.some(function (otherRouting) { var _a; return (_a = otherRouting.countryCodes) === null || _a === void 0 ? void 0 : _a.includes(c.iso2); });
69232
+ });
69233
+ }
69042
69234
  this.countries = countries;
69043
69235
  if (this.countries.length === 1 && !this.country)
69044
69236
  this.onCountryChange(this.countries[0].id);
@@ -71171,7 +71363,7 @@ var ThemeEditorComponent = mobxReactLite.observer(function (_a) {
71171
71363
  var _b, _c, _d;
71172
71364
  var vm = _a.vm, pageComponent = _a.pageComponent;
71173
71365
  var ref = React.useRef(null);
71174
- var store = IkasStorefrontConfig.store, currentPageComponents = IkasStorefrontConfig.currentPageComponents;
71366
+ var store = IkasStorefrontConfig.store, components = IkasStorefrontConfig.components;
71175
71367
  React.useEffect(function () {
71176
71368
  vm.setComponentRef(ref.current, pageComponent);
71177
71369
  }, []);
@@ -71187,11 +71379,7 @@ var ThemeEditorComponent = mobxReactLite.observer(function (_a) {
71187
71379
  var propValues = (_c = pageComponentPropValue.get()) === null || _c === void 0 ? void 0 : _c.propValues;
71188
71380
  if (!propValues)
71189
71381
  return null;
71190
- if (!currentPageComponents) {
71191
- console.error("Components for the page not found.");
71192
- return null;
71193
- }
71194
- var Component = currentPageComponents[pageComponent.componentId];
71382
+ var Component = components[pageComponent.componentId];
71195
71383
  if (((_d = vm.page) === null || _d === void 0 ? void 0 : _d.type) === exports.IkasThemePageType.CHECKOUT) {
71196
71384
  //@ts-ignore
71197
71385
  Component = IkasCheckoutPage$1;
@@ -71200,7 +71388,7 @@ var ThemeEditorComponent = mobxReactLite.observer(function (_a) {
71200
71388
  cart: new IkasCart({
71201
71389
  items: [
71202
71390
  new IkasOrderLineItem({
71203
- currencyCode: "",
71391
+ currencyCode: "TRY",
71204
71392
  finalPrice: 100,
71205
71393
  finalPriceWithQuantity: 100,
71206
71394
  price: 100,
@@ -72059,13 +72247,10 @@ var cart$1 = /*#__PURE__*/Object.freeze({
72059
72247
 
72060
72248
  var IkasPageEditor$1 = dynamic__default['default'](function () { return Promise.resolve().then(function () { return index; }).then(function (mod) { return mod.IkasPageEditor; }); }, { ssr: false });
72061
72249
  var Page$c = function (_a) {
72062
- var configJson = _a.configJson, components = _a.components;
72250
+ var configJson = _a.configJson;
72063
72251
  if (configJson) {
72064
72252
  IkasStorefrontConfig.initWithJson(configJson);
72065
72253
  }
72066
- if (components) {
72067
- IkasStorefrontConfig.currentPageComponents = components;
72068
- }
72069
72254
  return React.createElement(IkasPageEditor$1, null);
72070
72255
  };
72071
72256
  var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -73552,7 +73737,6 @@ exports.IkasCategory = IkasCategory;
73552
73737
  exports.IkasCategoryAPI = IkasCategoryAPI;
73553
73738
  exports.IkasCategoryList = IkasCategoryList;
73554
73739
  exports.IkasCategoryListPropValue = IkasCategoryListPropValue;
73555
- exports.IkasCategoryPath = IkasCategoryPath;
73556
73740
  exports.IkasCategoryPropValue = IkasCategoryPropValue;
73557
73741
  exports.IkasCheckout = IkasCheckout;
73558
73742
  exports.IkasCheckoutAPI = IkasCheckoutAPI;
@@ -73571,7 +73755,6 @@ exports.IkasCustomerReviewList = IkasCustomerReviewList;
73571
73755
  exports.IkasDistrictAPI = IkasDistrictAPI;
73572
73756
  exports.IkasFavoriteProduct = IkasFavoriteProduct;
73573
73757
  exports.IkasFavoriteProductAPI = IkasFavoriteProductAPI;
73574
- exports.IkasFilterCategory = IkasFilterCategory;
73575
73758
  exports.IkasHTMLMetaData = IkasHTMLMetaData;
73576
73759
  exports.IkasHTMLMetaDataAPI = IkasHTMLMetaDataAPI;
73577
73760
  exports.IkasImage = IkasImage;
@@ -73652,6 +73835,7 @@ exports.decodeBase64 = decodeBase64;
73652
73835
  exports.findAllIndexes = findAllIndexes;
73653
73836
  exports.formatDate = formatDate;
73654
73837
  exports.formatMoney = formatMoney;
73838
+ exports.getCurrencySymbol = getCurrencySymbol;
73655
73839
  exports.parseRangeStr = parseRangeStr;
73656
73840
  exports.pascalCase = pascalCase;
73657
73841
  exports.stringSorter = stringSorter;
@@ -5,6 +5,7 @@ export declare class IkasCart {
5
5
  updatedAt: string;
6
6
  dueDate?: string | null;
7
7
  currencyCode: string;
8
+ currencySymbol: string;
8
9
  customerId?: string | null;
9
10
  itemCount: number;
10
11
  items: IkasOrderLineItem[];
@@ -1,6 +1,6 @@
1
1
  export * from "./blog/index";
2
2
  export { IkasBrand } from "./brand/index";
3
- export { IkasCategory, IkasFilterCategory, IkasCategoryPath } from "./category/index";
3
+ export { IkasCategory } from "./category/index";
4
4
  export * from "./checkout/index";
5
5
  export type { IkasCity } from "./city/index";
6
6
  export * from "./customer/address/index";
@@ -8,6 +8,7 @@ export declare class IkasOrder {
8
8
  totalPrice: number | null;
9
9
  totalFinalPrice: number | null;
10
10
  currencyCode: string;
11
+ currencySymbol: string;
11
12
  orderedAt: number;
12
13
  cancelledAt: number | null;
13
14
  status: IkasOrderStatus;
@@ -7,6 +7,7 @@ export declare class IkasOrderLineItem {
7
7
  orderedAt: number;
8
8
  deleted: boolean;
9
9
  currencyCode: string;
10
+ currencySymbol: string;
10
11
  discount?: IkasOrderLineDiscount | null;
11
12
  discountPrice?: number | null;
12
13
  finalPrice: number;
@@ -3,6 +3,7 @@ export declare class IkasOrderTransaction {
3
3
  checkoutId: string | null;
4
4
  createdAt: number | null;
5
5
  currencyCode: string | null;
6
+ currencySymbol: string | null;
6
7
  customerId: string | null;
7
8
  error: IkasTransactionError | null;
8
9
  id: string | null;
@@ -2,6 +2,7 @@ export declare class IkasProductPrice {
2
2
  sellPrice: number;
3
3
  discountPrice: number | null;
4
4
  currency: string;
5
+ currencySymbol: string;
5
6
  constructor(data?: Partial<IkasProductPrice>);
6
7
  get finalPrice(): number;
7
8
  get hasDiscount(): boolean;
@@ -1,4 +1,4 @@
1
- import { IkasImage } from "../image/index";
1
+ import { IkasImage } from "../../../index";
2
2
  export declare enum IkasProductOptionType {
3
3
  CHOICE = "CHOICE",
4
4
  TEXT = "TEXT",
@@ -2,7 +2,6 @@ import * as React from "react";
2
2
  import { GetStaticProps } from "next";
3
3
  declare type Props = {
4
4
  configJson: Record<string, any>;
5
- components?: Record<string, any>;
6
5
  };
7
6
  export declare const getStaticProps: GetStaticProps;
8
7
  declare const _default: React.FunctionComponent<Props>;
@@ -1,19 +1,20 @@
1
- export * as IndexPage from "./home";
2
- export * as SlugPage from "./[slug]/index";
3
- export * as CustomPage from "./pages/[slug]";
4
- export * as CheckoutPage from "./checkout";
5
- export * as AccountPage from "./account/index";
6
- export * as AddressesPage from "./account/addresses";
7
- export * as OrdersPage from "./account/orders/index";
8
- export * as OrderDetailPage from "./account/orders/[id]";
9
- export * as LoginPage from "./account/login";
10
- export * as RegisterPage from "./account/register";
11
- export * as ForgotPasswordPage from "./account/forgot-password";
12
- export * as RecoverPasswordPage from "./account/recover-password";
13
- export * as CartPage from "./cart";
14
- export * as EditorPage from "./editor";
15
- export * as FavoriteProductsPage from "./account/favorite-products";
16
- export * as SearchPage from "./search";
17
- export * as NotFoundPage from "./404";
18
- export * as BlogPage from "./blog/index";
19
- export * as BlogSlugPage from "./blog/[slug]";
1
+ import * as IndexPage from "./home";
2
+ import * as SlugPage from "./[slug]/index";
3
+ import * as CustomPage from "./pages/[slug]";
4
+ import * as CheckoutPage from "./checkout";
5
+ import * as AccountPage from "./account/index";
6
+ import * as AddressesPage from "./account/addresses";
7
+ import * as OrdersPage from "./account/orders/index";
8
+ import * as OrderDetailPage from "./account/orders/[id]";
9
+ import * as LoginPage from "./account/login";
10
+ import * as RegisterPage from "./account/register";
11
+ import * as ForgotPasswordPage from "./account/forgot-password";
12
+ import * as RecoverPasswordPage from "./account/recover-password";
13
+ import * as CartPage from "./cart";
14
+ import * as EditorPage from "./editor";
15
+ import * as FavoriteProductsPage from "./account/favorite-products";
16
+ import * as SearchPage from "./search";
17
+ import * as NotFoundPage from "./404";
18
+ import * as BlogPage from "./blog/index";
19
+ import * as BlogSlugPage from "./blog/[slug]";
20
+ export { IndexPage, SlugPage, CustomPage, CheckoutPage, AccountPage, AddressesPage, OrdersPage, OrderDetailPage, LoginPage, RegisterPage, ForgotPasswordPage, RecoverPasswordPage, CartPage, EditorPage, FavoriteProductsPage, SearchPage, NotFoundPage, BlogPage, BlogSlugPage, };
@@ -3,7 +3,7 @@ import { IkasCategoryListParams } from "../models/ui/category-list/index";
3
3
  import { IkasAttributeList } from "../models/ui/product-attribute-list/index";
4
4
  import { IkasProductListParams } from "../models/ui/product-list/index";
5
5
  import { NextRouter } from "next/router";
6
- import { IkasThemeSettings, IkasThemeComponentProp, IkasBrandListParams, IkasBrandList, IkasCategoryList, IkasProductList, IkasProductDetail, IkasAttributeDetail, IkasNavigationLink, IkasImage, IkasThemeCustomData, IkasComponentRenderer, IkasBlogListParams, IkasBlogList, IkasBlogCategoryListParams, IkasBlogCategoryList } from "../models/index";
6
+ import { IkasThemeSettings, IkasThemeComponentProp, IkasBrandListParams, IkasBrandList, IkasCategoryList, IkasProductList, IkasProductDetail, IkasAttributeDetail, IkasNavigationLink, IkasImage, IkasThemeCustomData, IkasComponentRenderer, IkasBlogListParams, IkasBlogList, IkasBlogCategoryListParams, IkasBlogCategoryList } from "../index";
7
7
  import { IkasPageComponentPropValue } from "./page-data-get";
8
8
  import { IkasAttributePropValueData } from "./prop-value/attribute";
9
9
  import { IkasAttributeListPropValueData } from "./prop-value/attribute-list";
@@ -0,0 +1,4 @@
1
+ import { IkasCheckout } from "../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasCheckoutPropValueProvider implements IkasPropValueProvider<IkasCheckout | null> {
4
+ }
@@ -7,6 +7,7 @@ import { IkasBaseStore } from "../store/index";
7
7
  import { IkasCustomerReviewSettings } from "../models/index";
8
8
  export declare class IkasStorefrontConfig {
9
9
  static store: IkasBaseStore;
10
+ static components: any;
10
11
  static config: Record<string, any>;
11
12
  static apiUrlOverride: string | null;
12
13
  static domain: string;
@@ -27,8 +28,7 @@ export declare class IkasStorefrontConfig {
27
28
  static isEditor: boolean;
28
29
  static customerReviewSettings: IkasCustomerReviewSettings | null;
29
30
  static productBackInStockSettings: IkasProductBackInStockSettings | null;
30
- static currentPageComponents?: Record<string, any>;
31
- static init(store: IkasBaseStore, config: Record<string, any>, apiUrlOverride?: string): void;
31
+ static init(store: IkasBaseStore, components: any, config: Record<string, any>, apiUrlOverride?: string): void;
32
32
  static initWithJson(json: Record<string, any>): void;
33
33
  static getCurrentLocale(): string;
34
34
  static getJson(): {
@@ -1 +1,7 @@
1
+ /**
2
+ *
3
+ * @param price Price to format
4
+ * @param currency Code for the currency, USD, EUR, TRY, etc..
5
+ */
1
6
  export declare const formatMoney: (price: number, currency: string) => string;
7
+ export declare function getCurrencySymbol(currencyCode: string): string;
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.2.0-alpha.10",
3
+ "version": "0.2.0-alpha.11",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",
7
7
  "license": "ISC",
8
- "sideEffects": false,
9
8
  "files": [
10
9
  "/build"
11
10
  ],
12
11
  "scripts": {
13
- "build": "rm -rf build && rollup -c",
12
+ "build": "rm -rf ./build && rollup -c",
14
13
  "prepare": "npm run build",
15
14
  "lint": "eslint 'src/**/*.{js,ts,tsx}' --quiet --fix",
16
15
  "test": "jest",
@@ -40,7 +39,6 @@
40
39
  "@babel/core": "^7.11.6",
41
40
  "@rollup/plugin-commonjs": "^17.1.0",
42
41
  "@rollup/plugin-json": "^4.1.0",
43
- "@rollup/plugin-multi-entry": "^4.1.0",
44
42
  "@rollup/plugin-node-resolve": "^11.1.1",
45
43
  "@testing-library/jest-dom": "^5.11.4",
46
44
  "@testing-library/react": "^11.0.4",
@@ -82,7 +80,6 @@
82
80
  "rollup-plugin-peer-deps-external": "^2.2.4",
83
81
  "rollup-plugin-postcss": "^4.0.0",
84
82
  "rollup-plugin-sass": "^1.2.2",
85
- "rollup-plugin-terser": "^7.0.2",
86
83
  "rollup-plugin-typescript": "^1.0.1",
87
84
  "rollup-plugin-typescript2": "^0.29.0",
88
85
  "rollup-watch": "^4.3.1",