@ikas/storefront 0.0.161-alpha.3 → 0.0.161-alpha.5

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.
@@ -221,6 +221,7 @@ export declare enum ProductFilterDisplayTypeEnum {
221
221
  export declare enum ProductFilterSortTypeEnum {
222
222
  ALPHABETICAL_ASC = "ALPHABETICAL_ASC",
223
223
  ALPHABETICAL_DESC = "ALPHABETICAL_DESC",
224
+ CUSTOM_SORT = "CUSTOM_SORT",
224
225
  PRODUCT_COUNT_ASC = "PRODUCT_COUNT_ASC",
225
226
  PRODUCT_COUNT_DESC = "PRODUCT_COUNT_DESC"
226
227
  }
@@ -262,6 +263,7 @@ export declare enum SortByDirectionEnum {
262
263
  export declare enum SortByTypeEnum {
263
264
  CREATED_AT = "CREATED_AT",
264
265
  DISCOUNT_RATIO = "DISCOUNT_RATIO",
266
+ MANUAL_SORT = "MANUAL_SORT",
265
267
  NAME = "NAME",
266
268
  PRICE = "PRICE"
267
269
  }
@@ -67,4 +67,5 @@ export interface registerCustomerVariables {
67
67
  password: string;
68
68
  firstName: string;
69
69
  lastName: string;
70
+ isAcceptMarketing?: boolean | null;
70
71
  }
@@ -9,7 +9,7 @@ export declare class IkasCustomerAPI {
9
9
  token: string;
10
10
  tokenExpiry: number;
11
11
  } | undefined>;
12
- static register(email: string, password: string, firstName: string, lastName: string): Promise<{
12
+ static register(email: string, password: string, firstName: string, lastName: string, isAcceptMarketing?: boolean): Promise<{
13
13
  customer: IkasCustomer;
14
14
  __typename: "CustomerLoginResponse";
15
15
  token: string;
package/build/index.es.js CHANGED
@@ -23548,11 +23548,11 @@ var IkasCustomerStore = /** @class */ (function () {
23548
23548
  }
23549
23549
  });
23550
23550
  }); };
23551
- this.register = function (firstName, lastName, email, password) { return __awaiter(_this, void 0, void 0, function () {
23551
+ this.register = function (firstName, lastName, email, password, isMarketingAccepted) { return __awaiter(_this, void 0, void 0, function () {
23552
23552
  var response;
23553
23553
  return __generator(this, function (_a) {
23554
23554
  switch (_a.label) {
23555
- case 0: return [4 /*yield*/, IkasCustomerAPI.register(email, password, firstName, lastName)];
23555
+ case 0: return [4 /*yield*/, IkasCustomerAPI.register(email, password, firstName, lastName, isMarketingAccepted)];
23556
23556
  case 1:
23557
23557
  response = _a.sent();
23558
23558
  if (response) {
@@ -27626,6 +27626,7 @@ var ProductFilterSortTypeEnum;
27626
27626
  (function (ProductFilterSortTypeEnum) {
27627
27627
  ProductFilterSortTypeEnum["ALPHABETICAL_ASC"] = "ALPHABETICAL_ASC";
27628
27628
  ProductFilterSortTypeEnum["ALPHABETICAL_DESC"] = "ALPHABETICAL_DESC";
27629
+ ProductFilterSortTypeEnum["CUSTOM_SORT"] = "CUSTOM_SORT";
27629
27630
  ProductFilterSortTypeEnum["PRODUCT_COUNT_ASC"] = "PRODUCT_COUNT_ASC";
27630
27631
  ProductFilterSortTypeEnum["PRODUCT_COUNT_DESC"] = "PRODUCT_COUNT_DESC";
27631
27632
  })(ProductFilterSortTypeEnum || (ProductFilterSortTypeEnum = {}));
@@ -27672,6 +27673,7 @@ var SortByTypeEnum;
27672
27673
  (function (SortByTypeEnum) {
27673
27674
  SortByTypeEnum["CREATED_AT"] = "CREATED_AT";
27674
27675
  SortByTypeEnum["DISCOUNT_RATIO"] = "DISCOUNT_RATIO";
27676
+ SortByTypeEnum["MANUAL_SORT"] = "MANUAL_SORT";
27675
27677
  SortByTypeEnum["NAME"] = "NAME";
27676
27678
  SortByTypeEnum["PRICE"] = "PRICE";
27677
27679
  })(SortByTypeEnum || (SortByTypeEnum = {}));
@@ -29674,6 +29676,7 @@ var RegisterForm = /** @class */ (function () {
29674
29676
  lastName: "",
29675
29677
  email: "",
29676
29678
  password: "",
29679
+ isMarketingAccepted: false,
29677
29680
  };
29678
29681
  this.onFirstNameChange = function (value) {
29679
29682
  _this.firstName = value;
@@ -29773,6 +29776,16 @@ var RegisterForm = /** @class */ (function () {
29773
29776
  enumerable: false,
29774
29777
  configurable: true
29775
29778
  });
29779
+ Object.defineProperty(RegisterForm.prototype, "isMarketingAccepted", {
29780
+ get: function () {
29781
+ return this.model.isMarketingAccepted;
29782
+ },
29783
+ set: function (value) {
29784
+ this.model.isMarketingAccepted = value;
29785
+ },
29786
+ enumerable: false,
29787
+ configurable: true
29788
+ });
29776
29789
  Object.defineProperty(RegisterForm.prototype, "hasError", {
29777
29790
  get: function () {
29778
29791
  return this.validator.hasError;
@@ -29838,7 +29851,7 @@ var RegisterForm = /** @class */ (function () {
29838
29851
  _b.label = 2;
29839
29852
  case 2:
29840
29853
  _b.trys.push([2, 4, , 5]);
29841
- return [4 /*yield*/, this.store.customerStore.register(this.model.firstName, this.model.lastName, this.model.email, this.model.password)];
29854
+ return [4 /*yield*/, this.store.customerStore.register(this.model.firstName, this.model.lastName, this.model.email, this.model.password, this.model.isMarketingAccepted)];
29842
29855
  case 3:
29843
29856
  isRegisterSuccess = _b.sent();
29844
29857
  if (isRegisterSuccess) {
@@ -34353,13 +34366,13 @@ var IkasCustomerAPI = /** @class */ (function () {
34353
34366
  });
34354
34367
  });
34355
34368
  };
34356
- IkasCustomerAPI.register = function (email, password, firstName, lastName) {
34369
+ IkasCustomerAPI.register = function (email, password, firstName, lastName, isAcceptMarketing) {
34357
34370
  return __awaiter(this, void 0, void 0, function () {
34358
34371
  var MUTATION, _a, data, errors, err_2;
34359
34372
  return __generator(this, function (_b) {
34360
34373
  switch (_b.label) {
34361
34374
  case 0:
34362
- 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 ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\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 ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\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 "])));
34375
+ 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 "])));
34363
34376
  _b.label = 1;
34364
34377
  case 1:
34365
34378
  _b.trys.push([1, 3, , 4]);
@@ -34372,6 +34385,7 @@ var IkasCustomerAPI = /** @class */ (function () {
34372
34385
  password: password,
34373
34386
  firstName: firstName,
34374
34387
  lastName: lastName,
34388
+ isAcceptMarketing: isAcceptMarketing,
34375
34389
  },
34376
34390
  })];
34377
34391
  case 2:
@@ -37906,7 +37920,7 @@ var SettingsHelper = /** @class */ (function () {
37906
37920
  id: storefront.salesChannelId,
37907
37921
  }),
37908
37922
  routing: storefront.routings.length
37909
- ? storefront.routings.find(function (r) { return r.locale === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37923
+ ? storefront.routings.find(function (r) { return r.locale === locale || r.id === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37910
37924
  storefront.routings[0]
37911
37925
  : new IkasStorefrontRouting({}),
37912
37926
  favicon: localTheme.settings.favicon,
package/build/index.js CHANGED
@@ -23554,11 +23554,11 @@ var IkasCustomerStore = /** @class */ (function () {
23554
23554
  }
23555
23555
  });
23556
23556
  }); };
23557
- this.register = function (firstName, lastName, email, password) { return __awaiter(_this, void 0, void 0, function () {
23557
+ this.register = function (firstName, lastName, email, password, isMarketingAccepted) { return __awaiter(_this, void 0, void 0, function () {
23558
23558
  var response;
23559
23559
  return __generator(this, function (_a) {
23560
23560
  switch (_a.label) {
23561
- case 0: return [4 /*yield*/, IkasCustomerAPI.register(email, password, firstName, lastName)];
23561
+ case 0: return [4 /*yield*/, IkasCustomerAPI.register(email, password, firstName, lastName, isMarketingAccepted)];
23562
23562
  case 1:
23563
23563
  response = _a.sent();
23564
23564
  if (response) {
@@ -27607,6 +27607,7 @@ var ProductFilterSortTypeEnum;
27607
27607
  (function (ProductFilterSortTypeEnum) {
27608
27608
  ProductFilterSortTypeEnum["ALPHABETICAL_ASC"] = "ALPHABETICAL_ASC";
27609
27609
  ProductFilterSortTypeEnum["ALPHABETICAL_DESC"] = "ALPHABETICAL_DESC";
27610
+ ProductFilterSortTypeEnum["CUSTOM_SORT"] = "CUSTOM_SORT";
27610
27611
  ProductFilterSortTypeEnum["PRODUCT_COUNT_ASC"] = "PRODUCT_COUNT_ASC";
27611
27612
  ProductFilterSortTypeEnum["PRODUCT_COUNT_DESC"] = "PRODUCT_COUNT_DESC";
27612
27613
  })(ProductFilterSortTypeEnum || (ProductFilterSortTypeEnum = {}));
@@ -27653,6 +27654,7 @@ var SortByTypeEnum;
27653
27654
  (function (SortByTypeEnum) {
27654
27655
  SortByTypeEnum["CREATED_AT"] = "CREATED_AT";
27655
27656
  SortByTypeEnum["DISCOUNT_RATIO"] = "DISCOUNT_RATIO";
27657
+ SortByTypeEnum["MANUAL_SORT"] = "MANUAL_SORT";
27656
27658
  SortByTypeEnum["NAME"] = "NAME";
27657
27659
  SortByTypeEnum["PRICE"] = "PRICE";
27658
27660
  })(SortByTypeEnum || (SortByTypeEnum = {}));
@@ -29652,6 +29654,7 @@ var RegisterForm = /** @class */ (function () {
29652
29654
  lastName: "",
29653
29655
  email: "",
29654
29656
  password: "",
29657
+ isMarketingAccepted: false,
29655
29658
  };
29656
29659
  this.onFirstNameChange = function (value) {
29657
29660
  _this.firstName = value;
@@ -29751,6 +29754,16 @@ var RegisterForm = /** @class */ (function () {
29751
29754
  enumerable: false,
29752
29755
  configurable: true
29753
29756
  });
29757
+ Object.defineProperty(RegisterForm.prototype, "isMarketingAccepted", {
29758
+ get: function () {
29759
+ return this.model.isMarketingAccepted;
29760
+ },
29761
+ set: function (value) {
29762
+ this.model.isMarketingAccepted = value;
29763
+ },
29764
+ enumerable: false,
29765
+ configurable: true
29766
+ });
29754
29767
  Object.defineProperty(RegisterForm.prototype, "hasError", {
29755
29768
  get: function () {
29756
29769
  return this.validator.hasError;
@@ -29816,7 +29829,7 @@ var RegisterForm = /** @class */ (function () {
29816
29829
  _b.label = 2;
29817
29830
  case 2:
29818
29831
  _b.trys.push([2, 4, , 5]);
29819
- return [4 /*yield*/, this.store.customerStore.register(this.model.firstName, this.model.lastName, this.model.email, this.model.password)];
29832
+ return [4 /*yield*/, this.store.customerStore.register(this.model.firstName, this.model.lastName, this.model.email, this.model.password, this.model.isMarketingAccepted)];
29820
29833
  case 3:
29821
29834
  isRegisterSuccess = _b.sent();
29822
29835
  if (isRegisterSuccess) {
@@ -34330,13 +34343,13 @@ var IkasCustomerAPI = /** @class */ (function () {
34330
34343
  });
34331
34344
  });
34332
34345
  };
34333
- IkasCustomerAPI.register = function (email, password, firstName, lastName) {
34346
+ IkasCustomerAPI.register = function (email, password, firstName, lastName, isAcceptMarketing) {
34334
34347
  return __awaiter(this, void 0, void 0, function () {
34335
34348
  var MUTATION, _a, data, errors, err_2;
34336
34349
  return __generator(this, function (_b) {
34337
34350
  switch (_b.label) {
34338
34351
  case 0:
34339
- 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 ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\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 ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\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 "])));
34352
+ 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 "])));
34340
34353
  _b.label = 1;
34341
34354
  case 1:
34342
34355
  _b.trys.push([1, 3, , 4]);
@@ -34349,6 +34362,7 @@ var IkasCustomerAPI = /** @class */ (function () {
34349
34362
  password: password,
34350
34363
  firstName: firstName,
34351
34364
  lastName: lastName,
34365
+ isAcceptMarketing: isAcceptMarketing,
34352
34366
  },
34353
34367
  })];
34354
34368
  case 2:
@@ -37883,7 +37897,7 @@ var SettingsHelper = /** @class */ (function () {
37883
37897
  id: storefront.salesChannelId,
37884
37898
  }),
37885
37899
  routing: storefront.routings.length
37886
- ? storefront.routings.find(function (r) { return r.locale === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37900
+ ? storefront.routings.find(function (r) { return r.locale === locale || r.id === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37887
37901
  storefront.routings[0]
37888
37902
  : new IkasStorefrontRouting({}),
37889
37903
  favicon: localTheme.settings.favicon,
@@ -12,6 +12,7 @@ declare type RegisterFormModel = {
12
12
  lastName: string;
13
13
  email: string;
14
14
  password: string;
15
+ isMarketingAccepted?: boolean;
15
16
  };
16
17
  export declare class RegisterForm {
17
18
  private model;
@@ -26,6 +27,8 @@ export declare class RegisterForm {
26
27
  set email(value: string);
27
28
  get password(): string;
28
29
  set password(value: string);
30
+ get isMarketingAccepted(): boolean | undefined;
31
+ set isMarketingAccepted(value: boolean | undefined);
29
32
  get hasError(): boolean;
30
33
  get firstNameErrorMessage(): string | undefined;
31
34
  get lastNameErrorMessage(): string | undefined;
@@ -15,7 +15,7 @@ export declare class IkasCustomerStore {
15
15
  get canCreateEmailSubscription(): boolean;
16
16
  get customerConsentGranted(): boolean;
17
17
  login: (email: string, password: string) => Promise<boolean>;
18
- register: (firstName: string, lastName: string, email: string, password: string) => Promise<boolean>;
18
+ register: (firstName: string, lastName: string, email: string, password: string, isMarketingAccepted?: boolean | undefined) => Promise<boolean>;
19
19
  saveContactForm: (input: SaveContactForm) => Promise<boolean | undefined>;
20
20
  checkEmail: (email: string) => Promise<boolean>;
21
21
  forgotPassword: (email: string) => Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.161-alpha.3",
3
+ "version": "0.0.161-alpha.5",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",