@projectcaluma/ember-core 12.0.1 → 12.2.0

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.
@@ -14,7 +14,7 @@ export default class WorkItemModel extends CalumaQueryModel {
14
14
 
15
15
  get status() {
16
16
  return this.intl.t(
17
- `caluma.caluma-query.work-item.status.${this.raw.status}`
17
+ `caluma.caluma-query.work-item.status.${this.raw.status}`,
18
18
  );
19
19
  }
20
20
 
@@ -43,7 +43,7 @@ export default class BaseQuery {
43
43
 
44
44
  get modelClass() {
45
45
  const factory = getOwner(this).factoryFor(
46
- `caluma-query-model:${this.modelName}`
46
+ `caluma-query-model:${this.modelName}`,
47
47
  );
48
48
 
49
49
  return factory.class;
@@ -67,7 +67,7 @@ export default class BaseQuery {
67
67
 
68
68
  get value() {
69
69
  const Model = getOwner(this).factoryFor(
70
- `caluma-query-model:${this.modelName}`
70
+ `caluma-query-model:${this.modelName}`,
71
71
  ).class;
72
72
 
73
73
  return this.items.map((item) => {
@@ -127,7 +127,7 @@ export default class BaseQuery {
127
127
  this.items = yield this.processAll([
128
128
  ...this.items,
129
129
  ...(yield this.processNew(
130
- data[this.dataKey].edges.map(({ node }) => node)
130
+ data[this.dataKey].edges.map(({ node }) => node),
131
131
  )),
132
132
  ]);
133
133
 
@@ -42,7 +42,7 @@ export default class PrivateResolver extends Helper {
42
42
  // options service once. We pass a resolve function to run after the
43
43
  // possibly asynchronous resolve method.
44
44
  this.scheduler.resolveOnce(identifier, this.resolverType, (value) =>
45
- run(this, "resolve", value)
45
+ run(this, "resolve", value),
46
46
  );
47
47
 
48
48
  // Return the default value (`null`) if the value is not computed yet
@@ -13,5 +13,5 @@ export function hasQuestionType(obj, ...expected) {
13
13
  }
14
14
 
15
15
  export default helper(([obj, ...expected]) =>
16
- hasQuestionType(obj, ...expected)
16
+ hasQuestionType(obj, ...expected),
17
17
  );
@@ -27,9 +27,9 @@ function typeResolver(type) {
27
27
  (identifier) =>
28
28
  !cached
29
29
  .map((resolved) =>
30
- String(resolved[this.calumaOptions[`${type}IdentifierProperty`]])
30
+ String(resolved[this.calumaOptions[`${type}IdentifierProperty`]]),
31
31
  )
32
- .includes(String(identifier))
32
+ .includes(String(identifier)),
33
33
  );
34
34
 
35
35
  const methodName = camelize(`resolve-${pluralize(type)}`);
@@ -77,8 +77,8 @@ export default class PrivateSchedulerService extends Service {
77
77
  result.find(
78
78
  (obj) =>
79
79
  String(obj[this.calumaOptions[`${type}IdentifierProperty`]]) ===
80
- String(identifier)
81
- )
80
+ String(identifier),
81
+ ),
82
82
  );
83
83
  };
84
84
 
@@ -93,7 +93,7 @@ export default class PrivateSchedulerService extends Service {
93
93
 
94
94
  assert(
95
95
  `${typeResolverName} needs to be defined on the scheduler service`,
96
- typeResolverName in this
96
+ typeResolverName in this,
97
97
  );
98
98
 
99
99
  once(this[typeResolverName], "perform");
@@ -98,7 +98,7 @@ export default class CalumaOptionsService extends Service {
98
98
 
99
99
  fetchTypedGroups(/* types, search */) {
100
100
  assert(
101
- "`fetchTypedGroups` must be implemented on the Caluma options service"
101
+ "`fetchTypedGroups` must be implemented on the Caluma options service",
102
102
  );
103
103
  }
104
104
  }
@@ -7,10 +7,18 @@ export const mapby = (arr, ...keys) => {
7
7
  }
8
8
 
9
9
  return arr.map((obj) =>
10
- keys.length > 1 ? keys.map((key) => obj[key]) : obj[keys[0]]
10
+ keys.length > 1 ? keys.map((key) => obj[key]) : obj[keys[0]],
11
11
  );
12
12
  };
13
13
 
14
+ export const flatten = (array) => {
15
+ if (!Array.isArray(array)) {
16
+ return null;
17
+ }
18
+
19
+ return array.flat();
20
+ };
21
+
14
22
  /**
15
23
  * Transform a JEXL expression into it's AST
16
24
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-core",
3
- "version": "12.0.1",
3
+ "version": "12.2.0",
4
4
  "description": "Ember core addon for working with Caluma.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -9,18 +9,18 @@
9
9
  "homepage": "https://docs.caluma.io/ember-caluma",
10
10
  "repository": "github:projectcaluma/ember-caluma",
11
11
  "dependencies": {
12
- "@apollo/client": "^3.7.15",
12
+ "@apollo/client": "^3.7.17",
13
13
  "@ember/string": "^3.1.1",
14
14
  "@glimmer/tracking": "^1.1.2",
15
15
  "ember-apollo-client": "~4.0.2",
16
16
  "ember-auto-import": "^2.6.3",
17
17
  "ember-cli-babel": "^7.26.11",
18
18
  "ember-cli-htmlbars": "^6.2.0",
19
- "ember-concurrency": "^2.3.7",
19
+ "ember-concurrency": "^3.0.0",
20
20
  "ember-fetch": "^8.1.2",
21
21
  "ember-inflector": "^4.0.2",
22
22
  "ember-intl": "^5.7.2",
23
- "ember-resources": "^5.6.4",
23
+ "ember-resources": "^6.2.2",
24
24
  "ember-uikit": "^8.0.0",
25
25
  "graphql": "^15.8.0",
26
26
  "graphql-tag": "^2.12.6",
@@ -31,9 +31,9 @@
31
31
  "devDependencies": {
32
32
  "@ember/optional-features": "2.0.0",
33
33
  "@ember/render-modifiers": "2.1.0",
34
- "@ember/test-helpers": "3.1.0",
34
+ "@ember/test-helpers": "3.2.0",
35
35
  "@embroider/test-setup": "3.0.1",
36
- "@embroider/util": "1.11.1",
36
+ "@embroider/util": "1.11.2",
37
37
  "@faker-js/faker": "8.0.2",
38
38
  "@glimmer/component": "1.1.2",
39
39
  "broccoli-asset-rev": "3.0.0",
@@ -47,15 +47,15 @@
47
47
  "ember-load-initializers": "2.1.2",
48
48
  "ember-qunit": "7.0.0",
49
49
  "ember-resolver": "10.1.1",
50
- "ember-source": "4.12.0",
50
+ "ember-source": "4.12.3",
51
51
  "ember-source-channel-url": "3.0.0",
52
52
  "ember-try": "2.0.0",
53
53
  "loader.js": "4.7.0",
54
54
  "qunit": "2.19.4",
55
55
  "qunit-dom": "2.0.0",
56
- "uikit": "3.16.21",
57
- "webpack": "5.87.0",
58
- "@projectcaluma/ember-testing": "12.0.1"
56
+ "uikit": "3.16.22",
57
+ "webpack": "5.88.2",
58
+ "@projectcaluma/ember-testing": "12.2.0"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "ember-source": "^4.0.0"