@ikas/storefront 0.0.6 → 0.0.8

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.
@@ -2,8 +2,8 @@ import { ApolloClient, NormalizedCacheObject } from "@apollo/client";
2
2
  declare class Apollo {
3
3
  private _client?;
4
4
  static customerToken?: string;
5
- createApolloClient: (apiKey?: string) => void;
6
- setCustomerToken: (customerToken?: string) => void;
5
+ createApolloClient: (apiKey?: string | undefined) => void;
6
+ setCustomerToken: (customerToken?: string | undefined) => void;
7
7
  getClient: () => ApolloClient<NormalizedCacheObject>;
8
8
  }
9
9
  export declare const apollo: Apollo;
@@ -6,10 +6,10 @@ export declare class IkasCheckoutAPI {
6
6
  static getCheckoutId(cartId: string): Promise<string | undefined>;
7
7
  static getCheckoutById(id: string): Promise<IkasCheckout | undefined>;
8
8
  static saveCheckout(checkout: IkasCheckout): Promise<string | undefined>;
9
- static createSaleTransactionWithCheckout(checkoutId: string, paymentGatewayId: string, paymentMethodDetail?: IkasPaymentMethodDetail): Promise<SaleTransactionTypes.createSaleTransactionWithCheckout_createSaleTransactionWithCheckout>;
10
- static listPaymentGateway(): Promise<IkasPaymentGateway[]>;
11
- static retrieveInstallmentInfo(input: IkasInstallmentInfoInput): Promise<IkasInstallmentInfo>;
12
- static checkStocks(lines: CheckStocksLineInput[]): Promise<CheckStocksTypes.checkStocks_checkStocks>;
9
+ static createSaleTransactionWithCheckout(checkoutId: string, paymentGatewayId: string, paymentMethodDetail?: IkasPaymentMethodDetail): Promise<SaleTransactionTypes.createSaleTransactionWithCheckout_createSaleTransactionWithCheckout | undefined>;
10
+ static listPaymentGateway(): Promise<IkasPaymentGateway[] | undefined>;
11
+ static retrieveInstallmentInfo(input: IkasInstallmentInfoInput): Promise<IkasInstallmentInfo | undefined>;
12
+ static checkStocks(lines: CheckStocksLineInput[]): Promise<CheckStocksTypes.checkStocks_checkStocks | undefined>;
13
13
  }
14
14
  declare type CheckStocksLineInput = {
15
15
  quantity: number;
@@ -6,20 +6,20 @@ export declare class IkasCustomerAPI {
6
6
  __typename: "CustomerLoginResponse";
7
7
  token: string;
8
8
  tokenExpiry: number;
9
- }>;
9
+ } | undefined>;
10
10
  static register(email: string, password: string, firstName: string, lastName: string): Promise<{
11
11
  customer: IkasCustomer;
12
12
  __typename: "CustomerLoginResponse";
13
13
  token: string;
14
14
  tokenExpiry: number;
15
- }>;
16
- static refreshToken(token: string): Promise<RefreshTokenTypes.customerRefreshToken_customerRefreshToken>;
15
+ } | undefined>;
16
+ static refreshToken(token: string): Promise<RefreshTokenTypes.customerRefreshToken_customerRefreshToken | undefined>;
17
17
  static forgotPassword(email: string): Promise<boolean>;
18
18
  static recoverPassword(password: string, passwordAgain: string, token: string): Promise<boolean>;
19
19
  static checkEmail(email: string): Promise<boolean>;
20
- static getCustomer(): Promise<IkasCustomer>;
21
- static saveCustomer(customer: IkasCustomer): Promise<IkasCustomer>;
22
- static getOrders(id?: string): Promise<IkasOrder[]>;
20
+ static getCustomer(): Promise<IkasCustomer | undefined>;
21
+ static saveCustomer(customer: IkasCustomer): Promise<IkasCustomer | undefined>;
22
+ static getOrders(id?: string): Promise<IkasOrder[] | undefined>;
23
23
  static getOrderTransactions(params?: {
24
24
  checkoutId?: string;
25
25
  id?: string;
@@ -1,4 +1,4 @@
1
1
  import * as ListProductStockLocationTypes from "./__generated__/listProductStockLocation";
2
2
  export declare class IkasProductStockLocationAPI {
3
- static listProductStockLocation(stockLocationIdList: string[], variantIdList: string[]): Promise<ListProductStockLocationTypes.listProductStockLocation_listProductStockLocation[]>;
3
+ static listProductStockLocation(stockLocationIdList: string[], variantIdList: string[]): Promise<ListProductStockLocationTypes.listProductStockLocation_listProductStockLocation[] | undefined>;
4
4
  }
@@ -1,4 +1,4 @@
1
1
  import * as ListStockLocationTypes from "./__generated__/listStockLocation";
2
2
  export declare class IkasStockLocationAPI {
3
- static listStockLocation(): Promise<ListStockLocationTypes.listStockLocation_listStockLocation>;
3
+ static listStockLocation(): Promise<ListStockLocationTypes.listStockLocation_listStockLocation | undefined>;
4
4
  }
@@ -9,29 +9,29 @@ export default class AddressFormViewModel {
9
9
  districts: IkasDistrict[];
10
10
  allowedCountryIds?: string[];
11
11
  constructor(data: AddressFormViewModelParams);
12
- get firstName(): string;
13
- get lastName(): string;
14
- get phone(): string;
12
+ get firstName(): string | null | undefined;
13
+ get lastName(): string | null | undefined;
14
+ get phone(): string | null | undefined;
15
15
  get country(): {
16
- id?: string;
17
- name?: string;
18
- code?: string;
19
- };
16
+ id?: string | undefined;
17
+ name?: string | undefined;
18
+ code?: string | undefined;
19
+ } | null | undefined;
20
20
  get state(): {
21
- id?: string;
22
- name?: string;
23
- code?: string;
24
- };
21
+ id?: string | undefined;
22
+ name?: string | undefined;
23
+ code?: string | undefined;
24
+ } | null | undefined;
25
25
  get city(): {
26
- id?: string;
27
- name?: string;
28
- code?: string;
29
- };
26
+ id?: string | undefined;
27
+ name?: string | undefined;
28
+ code?: string | undefined;
29
+ } | null | undefined;
30
30
  get district(): {
31
- id?: string;
32
- name?: string;
33
- code?: string;
34
- };
31
+ id?: string | undefined;
32
+ name?: string | undefined;
33
+ code?: string | undefined;
34
+ } | null | undefined;
35
35
  get countryOptions(): {
36
36
  label: string;
37
37
  value: string;
@@ -30,8 +30,8 @@ export default class CheckoutViewModel {
30
30
  error?: CheckoutError | null;
31
31
  constructor(checkout: IkasCheckout, queryParams: ParsedUrlQuery, router: NextRouter);
32
32
  init: (queryParams: ParsedUrlQuery) => Promise<void>;
33
- get cart(): import("../../models/data/cart/index").IkasCart;
34
- get storefrontRegion(): import("../../models/data/storefront/storefront-region/index").IkasStorefrontRegion;
33
+ get cart(): import("../../models/data/cart/index").IkasCart | null | undefined;
34
+ get storefrontRegion(): import("../../models/data/storefront/storefront-region/index").IkasStorefrontRegion | undefined;
35
35
  get selectedPaymentGatewayIndex(): number;
36
36
  get selectedInstallmentIndex(): number;
37
37
  get checkoutUrl(): string;
@@ -39,8 +39,8 @@ export default class CheckoutViewModel {
39
39
  label: string;
40
40
  value: string;
41
41
  }[];
42
- get installmentPrice(): number;
43
- get installmentExtraPrice(): number;
42
+ get installmentPrice(): number | null | undefined;
43
+ get installmentExtraPrice(): number | undefined;
44
44
  get canProceedToShipping(): boolean;
45
45
  get canProceedToPayment(): boolean;
46
46
  get canPerformPayment(): boolean;
@@ -3,7 +3,7 @@ import { CheckoutStep } from "../checkout/model";
3
3
  export declare function GTMPageView(url: string): {
4
4
  event: string;
5
5
  page: string;
6
- };
6
+ } | undefined;
7
7
  export declare function GTMProductView(productDetail: IkasProductDetail): {
8
8
  event: string;
9
9
  ecommerce: {
@@ -23,7 +23,7 @@ export declare function GTMProductView(productDetail: IkasProductDetail): {
23
23
  quantity: number;
24
24
  }[];
25
25
  };
26
- };
26
+ } | undefined;
27
27
  export declare function GTMAddToCart(item: IkasProductDetail | IkasOrderLineItem, quantity: number): {
28
28
  event: string;
29
29
  ecommerce: {
@@ -57,7 +57,7 @@ export declare function GTMAddToCart(item: IkasProductDetail | IkasOrderLineItem
57
57
  quantity: number;
58
58
  })[];
59
59
  };
60
- };
60
+ } | undefined;
61
61
  export declare function GTMRemoveFromCart(item: IkasProductDetail | IkasOrderLineItem, quantity: number): {
62
62
  event: string;
63
63
  ecommerce: {
@@ -91,7 +91,7 @@ export declare function GTMRemoveFromCart(item: IkasProductDetail | IkasOrderLin
91
91
  quantity: number;
92
92
  })[];
93
93
  };
94
- };
94
+ } | undefined;
95
95
  export declare function GTMBeginCheckout(checkout: IkasCheckout): {
96
96
  event: string;
97
97
  ecommerce: {
@@ -109,9 +109,9 @@ export declare function GTMBeginCheckout(checkout: IkasCheckout): {
109
109
  item_list_id: string;
110
110
  index: number;
111
111
  quantity: number;
112
- }[];
112
+ }[] | undefined;
113
113
  };
114
- };
114
+ } | undefined;
115
115
  export declare function GTMPurchase(checkout: IkasCheckout, orderId: string): {
116
116
  event: string;
117
117
  ecommerce: {
@@ -121,8 +121,8 @@ export declare function GTMPurchase(checkout: IkasCheckout, orderId: string): {
121
121
  value: string;
122
122
  tax: string;
123
123
  shipping: string;
124
- currency: string;
125
- coupon: string;
124
+ currency: string | undefined;
125
+ coupon: string | null | undefined;
126
126
  items: {
127
127
  item_name: string;
128
128
  item_id: string;
@@ -137,10 +137,10 @@ export declare function GTMPurchase(checkout: IkasCheckout, orderId: string): {
137
137
  item_list_id: string;
138
138
  index: number;
139
139
  quantity: number;
140
- }[];
140
+ }[] | undefined;
141
141
  };
142
142
  };
143
- };
143
+ } | undefined;
144
144
  export declare function GTMCheckoutStep(checkout: IkasCheckout, step: CheckoutStep): {
145
145
  event: string;
146
146
  ecommerce: {
@@ -158,7 +158,7 @@ export declare function GTMCheckoutStep(checkout: IkasCheckout, step: CheckoutSt
158
158
  item_list_id: string;
159
159
  index: number;
160
160
  quantity: number;
161
- }[];
161
+ }[] | undefined;
162
162
  };
163
- };
163
+ } | undefined;
164
164
  export declare function GTMDisableHTML(): void;
@@ -14,8 +14,8 @@ export default class PageViewModel {
14
14
  pageDataProvider?: IkasPageDataProvider | null;
15
15
  router: NextRouter;
16
16
  constructor(router: NextRouter);
17
- get selectedPageComponent(): IkasThemePageComponent;
18
- get selectedComponent(): IkasThemeComponent;
17
+ get selectedPageComponent(): IkasThemePageComponent | undefined;
18
+ get selectedComponent(): IkasThemeComponent | undefined;
19
19
  startMessaging: () => void;
20
20
  onMessage: (event: MessageEvent) => Promise<void>;
21
21
  onClick: (id: string) => void;
package/build/index.es.js CHANGED
@@ -10870,7 +10870,7 @@ var IkasStorefrontConfig = /** @class */ (function () {
10870
10870
  IkasStorefrontConfig.components = components;
10871
10871
  IkasStorefrontConfig.config = config;
10872
10872
  IkasStorefrontConfig.localTheme = localTheme;
10873
- IkasStorefrontConfig.apiUrlOverride = apiUrlOverride;
10873
+ IkasStorefrontConfig.apiUrlOverride = apiUrlOverride || null;
10874
10874
  };
10875
10875
  IkasStorefrontConfig.components = {};
10876
10876
  IkasStorefrontConfig.config = {};
@@ -10894,9 +10894,10 @@ var Apollo = /** @class */ (function () {
10894
10894
  });
10895
10895
  var hostname = typeof window !== "undefined" ? window.location.hostname : null;
10896
10896
  var httpLink = createHttpLink({
10897
- uri: hostname && hostname !== "localhost"
10898
- ? "https://" + hostname + "/api/sf/graphql"
10899
- : process.env.NEXT_PUBLIC_GQL_URL,
10897
+ uri: IkasStorefrontConfig.apiUrlOverride ||
10898
+ (hostname && hostname !== "localhost"
10899
+ ? "https://" + hostname + "/api/sf/graphql"
10900
+ : process.env.NEXT_PUBLIC_GQL_URL),
10900
10901
  });
10901
10902
  _this._client = new ApolloClient({
10902
10903
  link: authLink.concat(httpLink),
@@ -11699,7 +11700,7 @@ var IkasLinkPropValueProvider = /** @class */ (function () {
11699
11700
  IkasThemePageType.BRAND,
11700
11701
  IkasThemePageType.CATEGORY,
11701
11702
  ].includes(linkPropValue.pageType)) return [3 /*break*/, 11];
11702
- return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, linkPropValue.itemId)];
11703
+ return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, linkPropValue.itemId || undefined)];
11703
11704
  case 10:
11704
11705
  metaDataList = _d.sent();
11705
11706
  if (metaDataList.length) {
@@ -12110,7 +12111,9 @@ var IkasPageDataProvider = /** @class */ (function () {
12110
12111
  };
12111
12112
  IkasPageDataProvider.initLinkPropValue = function (prop, propValue, pageComponentPropValue) {
12112
12113
  if (Array.isArray(propValue)) {
12113
- pageComponentPropValue.propValues[prop.name] = propValue.map(function (p) { return new IkasNavigationLink(p.href, p.label, p.subLinks, p.isExternal); });
12114
+ pageComponentPropValue.propValues[prop.name] = propValue.map(function (p) {
12115
+ return new IkasNavigationLink(p.href, p.label, p.subLinks, p.isExternal || undefined);
12116
+ });
12114
12117
  }
12115
12118
  else if (propValue) {
12116
12119
  pageComponentPropValue.propValues[prop.name] = new IkasNavigationLink(propValue.href, propValue.label, propValue.subLinks, propValue.isExternal);
@@ -13354,7 +13357,9 @@ var IkasBrandList = /** @class */ (function () {
13354
13357
  case 1:
13355
13358
  _a.trys.push([1, 3, 4, 5]);
13356
13359
  return [4 /*yield*/, IkasBrandAPI.listBrands({
13357
- idList: this.isStatic ? this._brandListPropValue.brandIds : undefined,
13360
+ idList: this.isStatic
13361
+ ? this._brandListPropValue.brandIds || undefined
13362
+ : undefined,
13358
13363
  page: this.isStatic ? undefined : this.page,
13359
13364
  limit: this.isStatic ? undefined : this.limit,
13360
13365
  })];
@@ -20808,7 +20813,7 @@ var CheckoutViewModel = /** @class */ (function () {
20808
20813
  this.changeStep(CheckoutStep.SUCCESS);
20809
20814
  }
20810
20815
  else if (transactionStatus === IkasTransactionStatusEnum.PENDING &&
20811
- response.returnSlug) {
20816
+ !!(response === null || response === void 0 ? void 0 : response.returnSlug)) {
20812
20817
  window.location.href =
20813
20818
  process.env.NEXT_PUBLIC_BASE_URL + response.returnSlug;
20814
20819
  }
@@ -21669,7 +21674,7 @@ var CheckoutStepInfo = observer(function (_a) {
21669
21674
  createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedShippingAddressId, onChange: vm.onSelectedShippingAddressIdChange, options: vm.customerAddressOptions }))),
21670
21675
  createElement(AddressForm, { address: vm.checkout.shippingAddress, customer: vm.checkout.customer && vm.checkout.customer.id
21671
21676
  ? undefined
21672
- : vm.checkout.customer, isErrorsVisible: vm.isErrorsVisible, allowedCountryIds: vm.shippingCountryIds, validationResult: vm.checkout.shippingAddress.validationResult }),
21677
+ : vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, allowedCountryIds: vm.shippingCountryIds, validationResult: vm.checkout.shippingAddress.validationResult }),
21673
21678
  !!vm.customerStore.customer && vm.selectedShippingAddressId === "-1" && (createElement("div", { style: { marginTop: "12px" } },
21674
21679
  createElement(Checkbox, { value: vm.shouldSaveAddress, label: "Bir sonraki i\u015Flem i\u00E7in bu bilgileri kaydet", onChange: vm.setShouldSaveAddress }),
21675
21680
  vm.shouldSaveAddress && (createElement("div", { style: { marginTop: "8px" } },
@@ -21882,7 +21887,7 @@ var BillingAddress = observer(function (_a) {
21882
21887
  !!vm.customerStore.customer &&
21883
21888
  !!vm.customerStore.customer.addresses.length && (createElement("div", { className: styles$2.RowPB },
21884
21889
  createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedBillingAddressId, onChange: vm.onSelectedBillingAddressIdChange, options: vm.customerAddressOptions }))),
21885
- createElement(AddressForm, { address: vm.checkout.billingAddress, customer: vm.checkout.customer, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult }))),
21890
+ createElement(AddressForm, { address: vm.checkout.billingAddress, customer: vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult }))),
21886
21891
  },
21887
21892
  ]; });
21888
21893
  return (createElement(Fragment, null,
@@ -22982,7 +22987,7 @@ var PageViewModel = /** @class */ (function () {
22982
22987
  this.pageParams = data.pageParams;
22983
22988
  this.queryParams = data.queryParams;
22984
22989
  this.apiKey = data.apiKey;
22985
- apollo.createApolloClient(this.apiKey);
22990
+ apollo.createApolloClient(this.apiKey || undefined);
22986
22991
  window.editorApiKey = data.apiKey;
22987
22992
  return [4 /*yield*/, this.getPagePropValues()];
22988
22993
  case 1:
package/build/index.js CHANGED
@@ -10883,7 +10883,7 @@ var IkasStorefrontConfig = /** @class */ (function () {
10883
10883
  IkasStorefrontConfig.components = components;
10884
10884
  IkasStorefrontConfig.config = config;
10885
10885
  IkasStorefrontConfig.localTheme = localTheme;
10886
- IkasStorefrontConfig.apiUrlOverride = apiUrlOverride;
10886
+ IkasStorefrontConfig.apiUrlOverride = apiUrlOverride || null;
10887
10887
  };
10888
10888
  IkasStorefrontConfig.components = {};
10889
10889
  IkasStorefrontConfig.config = {};
@@ -10907,9 +10907,10 @@ var Apollo = /** @class */ (function () {
10907
10907
  });
10908
10908
  var hostname = typeof window !== "undefined" ? window.location.hostname : null;
10909
10909
  var httpLink = createHttpLink({
10910
- uri: hostname && hostname !== "localhost"
10911
- ? "https://" + hostname + "/api/sf/graphql"
10912
- : process.env.NEXT_PUBLIC_GQL_URL,
10910
+ uri: IkasStorefrontConfig.apiUrlOverride ||
10911
+ (hostname && hostname !== "localhost"
10912
+ ? "https://" + hostname + "/api/sf/graphql"
10913
+ : process.env.NEXT_PUBLIC_GQL_URL),
10913
10914
  });
10914
10915
  _this._client = new ApolloClient({
10915
10916
  link: authLink.concat(httpLink),
@@ -11711,7 +11712,7 @@ var IkasLinkPropValueProvider = /** @class */ (function () {
11711
11712
  exports.IkasThemePageType.BRAND,
11712
11713
  exports.IkasThemePageType.CATEGORY,
11713
11714
  ].includes(linkPropValue.pageType)) return [3 /*break*/, 11];
11714
- return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, linkPropValue.itemId)];
11715
+ return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, linkPropValue.itemId || undefined)];
11715
11716
  case 10:
11716
11717
  metaDataList = _d.sent();
11717
11718
  if (metaDataList.length) {
@@ -12122,7 +12123,9 @@ var IkasPageDataProvider = /** @class */ (function () {
12122
12123
  };
12123
12124
  IkasPageDataProvider.initLinkPropValue = function (prop, propValue, pageComponentPropValue) {
12124
12125
  if (Array.isArray(propValue)) {
12125
- pageComponentPropValue.propValues[prop.name] = propValue.map(function (p) { return new IkasNavigationLink(p.href, p.label, p.subLinks, p.isExternal); });
12126
+ pageComponentPropValue.propValues[prop.name] = propValue.map(function (p) {
12127
+ return new IkasNavigationLink(p.href, p.label, p.subLinks, p.isExternal || undefined);
12128
+ });
12126
12129
  }
12127
12130
  else if (propValue) {
12128
12131
  pageComponentPropValue.propValues[prop.name] = new IkasNavigationLink(propValue.href, propValue.label, propValue.subLinks, propValue.isExternal);
@@ -13344,7 +13347,9 @@ var IkasBrandList = /** @class */ (function () {
13344
13347
  case 1:
13345
13348
  _a.trys.push([1, 3, 4, 5]);
13346
13349
  return [4 /*yield*/, IkasBrandAPI.listBrands({
13347
- idList: this.isStatic ? this._brandListPropValue.brandIds : undefined,
13350
+ idList: this.isStatic
13351
+ ? this._brandListPropValue.brandIds || undefined
13352
+ : undefined,
13348
13353
  page: this.isStatic ? undefined : this.page,
13349
13354
  limit: this.isStatic ? undefined : this.limit,
13350
13355
  })];
@@ -20794,7 +20799,7 @@ var CheckoutViewModel = /** @class */ (function () {
20794
20799
  this.changeStep(CheckoutStep.SUCCESS);
20795
20800
  }
20796
20801
  else if (transactionStatus === exports.IkasTransactionStatusEnum.PENDING &&
20797
- response.returnSlug) {
20802
+ !!(response === null || response === void 0 ? void 0 : response.returnSlug)) {
20798
20803
  window.location.href =
20799
20804
  process.env.NEXT_PUBLIC_BASE_URL + response.returnSlug;
20800
20805
  }
@@ -21655,7 +21660,7 @@ var CheckoutStepInfo = mobxReactLite.observer(function (_a) {
21655
21660
  React.createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedShippingAddressId, onChange: vm.onSelectedShippingAddressIdChange, options: vm.customerAddressOptions }))),
21656
21661
  React.createElement(AddressForm, { address: vm.checkout.shippingAddress, customer: vm.checkout.customer && vm.checkout.customer.id
21657
21662
  ? undefined
21658
- : vm.checkout.customer, isErrorsVisible: vm.isErrorsVisible, allowedCountryIds: vm.shippingCountryIds, validationResult: vm.checkout.shippingAddress.validationResult }),
21663
+ : vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, allowedCountryIds: vm.shippingCountryIds, validationResult: vm.checkout.shippingAddress.validationResult }),
21659
21664
  !!vm.customerStore.customer && vm.selectedShippingAddressId === "-1" && (React.createElement("div", { style: { marginTop: "12px" } },
21660
21665
  React.createElement(Checkbox, { value: vm.shouldSaveAddress, label: "Bir sonraki i\u015Flem i\u00E7in bu bilgileri kaydet", onChange: vm.setShouldSaveAddress }),
21661
21666
  vm.shouldSaveAddress && (React.createElement("div", { style: { marginTop: "8px" } },
@@ -21868,7 +21873,7 @@ var BillingAddress = mobxReactLite.observer(function (_a) {
21868
21873
  !!vm.customerStore.customer &&
21869
21874
  !!vm.customerStore.customer.addresses.length && (React.createElement("div", { className: styles$2.RowPB },
21870
21875
  React.createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedBillingAddressId, onChange: vm.onSelectedBillingAddressIdChange, options: vm.customerAddressOptions }))),
21871
- React.createElement(AddressForm, { address: vm.checkout.billingAddress, customer: vm.checkout.customer, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult }))),
21876
+ React.createElement(AddressForm, { address: vm.checkout.billingAddress, customer: vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult }))),
21872
21877
  },
21873
21878
  ]; });
21874
21879
  return (React.createElement(React.Fragment, null,
@@ -22968,7 +22973,7 @@ var PageViewModel = /** @class */ (function () {
22968
22973
  this.pageParams = data.pageParams;
22969
22974
  this.queryParams = data.queryParams;
22970
22975
  this.apiKey = data.apiKey;
22971
- apollo.createApolloClient(this.apiKey);
22976
+ apollo.createApolloClient(this.apiKey || undefined);
22972
22977
  window.editorApiKey = data.apiKey;
22973
22978
  return [4 /*yield*/, this.getPagePropValues()];
22974
22979
  case 1:
@@ -11,7 +11,7 @@ export declare class IkasOrderLineVariant {
11
11
  variantValues: IkasOrderLineVariantVariantValue[];
12
12
  mainImage?: IkasImage | null;
13
13
  constructor(data?: Partial<IkasOrderLineVariant>);
14
- get href(): string;
14
+ get href(): string | undefined;
15
15
  }
16
16
  export declare class IkasOrderLineVariantVariantValue {
17
17
  order: number;
@@ -19,7 +19,7 @@ export declare class IkasProduct {
19
19
  variantTypes: IkasProductVariantType[];
20
20
  constructor(data?: Partial<IkasProduct>);
21
21
  get hasVariant(): boolean;
22
- get mainVariantType(): import("../index").IkasVariantType;
22
+ get mainVariantType(): import("../index").IkasVariantType | undefined;
23
23
  get href(): string;
24
24
  }
25
25
  export declare enum IkasProductType {
@@ -12,5 +12,5 @@ export declare class IkasProductVariant {
12
12
  price: IkasProductPrice;
13
13
  stock: number;
14
14
  constructor(data?: Partial<IkasProductVariant>);
15
- get mainImage(): IkasImage;
15
+ get mainImage(): IkasImage | undefined;
16
16
  }
@@ -7,5 +7,5 @@ export declare class IkasVariantValue {
7
7
  variantTypeId: string;
8
8
  constructor(data: Partial<IkasVariantValue>);
9
9
  get slug(): string;
10
- get thumbnailImage(): IkasImage;
10
+ get thumbnailImage(): IkasImage | undefined;
11
11
  }
@@ -5,6 +5,6 @@ export declare class IkasTheme {
5
5
  components: IkasThemeComponent[];
6
6
  pages: IkasThemePage[];
7
7
  constructor(data?: Partial<IkasTheme>);
8
- get headerComponent(): IkasThemeComponent;
9
- get footerComponent(): IkasThemeComponent;
8
+ get headerComponent(): IkasThemeComponent | undefined;
9
+ get footerComponent(): IkasThemeComponent | undefined;
10
10
  }
@@ -33,7 +33,7 @@ export declare class IkasBrandList {
33
33
  page: number;
34
34
  count: number;
35
35
  initialized: boolean;
36
- minPage: number;
36
+ minPage: number | null | undefined;
37
37
  brandListPropValue: IkasBrandListPropValue;
38
38
  };
39
39
  }
@@ -6,7 +6,7 @@ export declare class IkasProductDetail {
6
6
  private usePageData?;
7
7
  private router?;
8
8
  constructor(product: IkasProduct, selectedVariantValues: IkasVariantValue[], usePageData?: boolean, router?: NextRouter);
9
- get mainVariantValue(): IkasVariantValue;
9
+ get mainVariantValue(): IkasVariantValue | undefined;
10
10
  get selectedVariant(): import("../../index").IkasProductVariant;
11
11
  get href(): string;
12
12
  selectVariantValue(variantValue: IkasVariantValue): void;
@@ -39,9 +39,9 @@ export declare class IkasProductList {
39
39
  page: number;
40
40
  count: number;
41
41
  initialized: boolean;
42
- minPage: number;
43
- filters: IkasProductListFilter;
44
- recommendFor: string;
42
+ minPage: number | null | undefined;
43
+ filters: IkasProductListFilter | null | undefined;
44
+ recommendFor: string | null | undefined;
45
45
  productListPropValue: IkasProductListPropValue;
46
46
  };
47
47
  }
@@ -13,8 +13,8 @@ export declare class IkasCartStore {
13
13
  get isBrowser(): boolean;
14
14
  get isLoadingCart(): boolean;
15
15
  get cartLoadFinished(): boolean;
16
- get checkoutId(): string;
17
- get checkoutUrl(): string;
16
+ get checkoutId(): string | null | undefined;
17
+ get checkoutUrl(): string | undefined;
18
18
  private getCart;
19
19
  private setCart;
20
20
  addItem: (variant: IkasProductVariant, product: IkasProduct, initialQuantity?: number) => Promise<void>;
@@ -15,8 +15,8 @@ export declare class IkasCustomerStore {
15
15
  recoverPassword: (password: string, passwordAgain: string, token: string) => Promise<boolean>;
16
16
  logout: () => void;
17
17
  saveCustomer: (customer: IkasCustomer) => Promise<boolean>;
18
- getOrders: () => Promise<import("../models/index").IkasOrder[]>;
19
- getOrder: (id: string) => Promise<import("../models/index").IkasOrder>;
18
+ getOrders: () => Promise<import("../models/index").IkasOrder[] | undefined>;
19
+ getOrder: (id: string) => Promise<import("../models/index").IkasOrder | null>;
20
20
  getOrderTransactions: (params?: {
21
21
  checkoutId?: string;
22
22
  id?: string;
@@ -11,10 +11,10 @@ export declare class IkasPageDataProvider {
11
11
  get nextPageData(): {
12
12
  props: {
13
13
  propValuesStr: string;
14
- page: IkasThemePage;
14
+ page: IkasThemePage | null;
15
15
  };
16
16
  };
17
- get isStaticPage(): boolean;
17
+ get isStaticPage(): boolean | null | undefined;
18
18
  getPageData(): Promise<void>;
19
19
  getPageSpecificData(): Promise<void>;
20
20
  getPageComponentPropValues(pageComponent: IkasThemePageComponent): Promise<IkasPageComponentPropValue>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",