@ikas/storefront-model-functions 4.0.0-alpha.39 → 4.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront-model-functions",
3
- "version": "4.0.0-alpha.39",
3
+ "version": "4.0.0-alpha.4",
4
4
  "description": "Functions for ikas storefront models.",
5
5
  "author": "Umut Ozan Yıldırım",
6
6
  "license": "ISC",
@@ -16,8 +16,8 @@
16
16
  "build": "rm -rf build && rollup -c"
17
17
  },
18
18
  "devDependencies": {
19
- "@ikas/storefront-config": "^4.0.0-alpha.39",
20
- "@ikas/storefront-models": "^4.0.0-alpha.39",
19
+ "@ikas/storefront-config": "^4.0.0-alpha.4",
20
+ "@ikas/storefront-models": "^4.0.0-alpha.4",
21
21
  "@rollup/plugin-node-resolve": "^13.3.0",
22
22
  "@rollup/plugin-commonjs": "^22.0.0",
23
23
  "@types/lodash": "^4.14.182",
@@ -32,8 +32,8 @@
32
32
  "lodash": "^4.17.21"
33
33
  },
34
34
  "peerDependencies": {
35
- "@ikas/storefront-config": "^4.0.0-alpha.39",
36
- "@ikas/storefront-models": "^4.0.0-alpha.39",
35
+ "@ikas/storefront-config": "^4.0.0-alpha.4",
36
+ "@ikas/storefront-models": "^4.0.0-alpha.4",
37
37
  "lodash": "^4.17.21"
38
38
  }
39
39
  }
@@ -61,7 +61,7 @@ export function getValidationResult(
61
61
  country: !!address.country?.name,
62
62
  state: !!address.state,
63
63
  city: !!address.city?.name,
64
- district: isDistrictRequired ? !!address.district?.name : true,
64
+ district: isDistrictRequired ? !!address.district?.id : true,
65
65
  phone:
66
66
  checkoutSettings.phoneRequirement === IkasCheckoutRequirement.MANDATORY ||
67
67
  (checkoutSettings.phoneRequirement === IkasCheckoutRequirement.OPTIONAL &&
@@ -54,8 +54,6 @@ export function getDisplayedValues(filter: IkasProductFilter) {
54
54
  IkasProductFilterSortType.ALPHABETICAL_DESC,
55
55
  ].includes(sortType);
56
56
 
57
- const isCustomSort = sortType === IkasProductFilterSortType.CUSTOM_SORT;
58
-
59
57
  let _values = filter.values?.filter((v) =>
60
58
  v.resultCount === 0 ? v.isSelected : true
61
59
  );
@@ -65,13 +63,6 @@ export function getDisplayedValues(filter: IkasProductFilter) {
65
63
 
66
64
  if (isDesc) _values = _values?.reverse();
67
65
 
68
- if (isCustomSort) {
69
- const sortOrder = filter.settings?.customSortedValues || [];
70
- _values = _values.sort(function (a, b) {
71
- return sortOrder.indexOf(a.id) - sortOrder.indexOf(b.id);
72
- });
73
- }
74
-
75
66
  return _values;
76
67
  }
77
68