@projectcaluma/ember-distribution 11.0.0-beta.38 → 11.0.0-beta.40

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,6 +38,7 @@
38
38
  <tr
39
39
  role="checkbox"
40
40
  data-test-group={{group.identifier}}
41
+ aria-checked={{includes group.identifier @selectedGroups}}
41
42
  {{on "click" (fn this.updateSelectedGroups group.identifier)}}
42
43
  >
43
44
  <td class="uk-padding-remove-right">
package/addon/config.js CHANGED
@@ -3,13 +3,21 @@ import merge from "lodash.merge";
3
3
  import { cached } from "tracked-toolbox";
4
4
 
5
5
  export const INQUIRY_STATUS = {
6
- DRAFT: "draft",
7
- SKIPPED: "skipped",
8
- SENT: "sent",
9
- IN_PROGRESS: "in-progress",
10
- POSITIVE: "positive",
11
- NEGATIVE: "negative",
12
- NEEDS_INTERACTION: "needs-interaction",
6
+ DRAFT: { slug: "draft", icon: "commenting", color: "muted" },
7
+ SKIPPED: { slug: "skipped", icon: "lock", color: "muted" },
8
+ SENT: { slug: "sent", icon: "comment", color: "emphasis" },
9
+ IN_PROGRESS: {
10
+ slug: "in-progress",
11
+ icon: "file-edit",
12
+ color: { addressed: "muted", controlling: "emphasis" },
13
+ },
14
+ POSITIVE: { slug: "positive", icon: "check", color: "success" },
15
+ NEGATIVE: { slug: "negative", icon: "close", color: "danger" },
16
+ NEEDS_INTERACTION: {
17
+ slug: "needs-interaction",
18
+ icon: "file-text",
19
+ color: "warning",
20
+ },
13
21
  };
14
22
 
15
23
  export default function config(target, property) {
@@ -4,26 +4,6 @@ import { get } from "@ember/object";
4
4
  import { createDecorator } from "@projectcaluma/ember-distribution/-private/decorator";
5
5
  import { INQUIRY_STATUS } from "@projectcaluma/ember-distribution/config";
6
6
 
7
- export const ICON_MAP = {
8
- [INQUIRY_STATUS.DRAFT]: "commenting",
9
- [INQUIRY_STATUS.SKIPPED]: "lock",
10
- [INQUIRY_STATUS.SENT]: "comment",
11
- [INQUIRY_STATUS.IN_PROGRESS]: "file-edit",
12
- [INQUIRY_STATUS.POSITIVE]: "check",
13
- [INQUIRY_STATUS.NEGATIVE]: "close",
14
- [INQUIRY_STATUS.NEEDS_INTERACTION]: "file-text",
15
- };
16
-
17
- export const COLOR_MAP = {
18
- [INQUIRY_STATUS.DRAFT]: "muted",
19
- [INQUIRY_STATUS.SKIPPED]: "muted",
20
- [INQUIRY_STATUS.SENT]: "emphasis",
21
- [INQUIRY_STATUS.IN_PROGRESS]: { addressed: "muted", controlling: "emphasis" },
22
- [INQUIRY_STATUS.POSITIVE]: "success",
23
- [INQUIRY_STATUS.NEGATIVE]: "danger",
24
- [INQUIRY_STATUS.NEEDS_INTERACTION]: "warning",
25
- };
26
-
27
7
  function decorator(
28
8
  target,
29
9
  key,
@@ -84,7 +64,7 @@ function decorator(
84
64
  }
85
65
 
86
66
  const answer = inquiry.childCase?.document.status.edges[0]?.node;
87
- const slug = isSkipped
67
+ const statusConfig = isSkipped
88
68
  ? INQUIRY_STATUS.SKIPPED
89
69
  : isInProgress
90
70
  ? INQUIRY_STATUS.IN_PROGRESS
@@ -95,13 +75,13 @@ function decorator(
95
75
  : this.config.inquiry.answer.statusMapping[answer.value];
96
76
 
97
77
  return {
98
- slug,
78
+ slug: statusConfig.slug,
99
79
  label:
100
80
  !isSkipped && !isDraft && !isSent
101
81
  ? answer?.selectedOption.label
102
- : this.intl.t(`caluma.distribution.status.${slug}`),
103
- color: COLOR_MAP[slug][inquiryType] ?? COLOR_MAP[slug],
104
- icon: ICON_MAP[slug],
82
+ : this.intl.t(`caluma.distribution.status.${statusConfig.slug}`),
83
+ color: statusConfig.color[inquiryType] ?? statusConfig.color,
84
+ icon: statusConfig.icon,
105
85
  };
106
86
  },
107
87
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-distribution",
3
- "version": "11.0.0-beta.38",
3
+ "version": "11.0.0-beta.40",
4
4
  "description": "Ember engine for the Caluma distribution module.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -10,24 +10,25 @@
10
10
  "homepage": "https://docs.caluma.io/ember-caluma",
11
11
  "repository": "github:projectcaluma/ember-caluma",
12
12
  "scripts": {
13
- "test": "npm-run-all --print-name \"lint\" \"test:*\"",
13
+ "test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
14
14
  "test:ember": "ember test",
15
15
  "test:ember-compatibility": "ember try:each"
16
16
  },
17
17
  "peerDependencies": {
18
- "ember-engines": ">= 0.8"
18
+ "ember-engines": ">= 0.8",
19
+ "ember-source": "^3.28.0 || ^4.0.0"
19
20
  },
20
21
  "dependencies": {
21
22
  "@ember/legacy-built-in-components": "^0.4.1",
22
23
  "@ember/string": "^3.0.0",
23
- "@embroider/macros": "^1.9.0",
24
+ "@embroider/macros": "^1.10.0",
24
25
  "@glimmer/component": "^1.1.2",
25
26
  "@glimmer/tracking": "^1.1.2",
26
- "@projectcaluma/ember-core": "^11.0.0-beta.38",
27
- "@projectcaluma/ember-form": "^11.0.0-beta.38",
28
- "@projectcaluma/ember-workflow": "^11.0.0-beta.38",
27
+ "@projectcaluma/ember-core": "^11.0.0-beta.40",
28
+ "@projectcaluma/ember-form": "^11.0.0-beta.40",
29
+ "@projectcaluma/ember-workflow": "^11.0.0-beta.40",
29
30
  "ember-apollo-client": "~4.0.2",
30
- "ember-auto-import": "^2.4.3",
31
+ "ember-auto-import": "^2.5.0",
31
32
  "ember-can": "^4.2.0",
32
33
  "ember-cli-babel": "^7.26.11",
33
34
  "ember-cli-htmlbars": "^6.1.1",
@@ -43,17 +44,18 @@
43
44
  "graphql": "^15.8.0",
44
45
  "graphql-tag": "^2.12.6",
45
46
  "lodash.merge": "^4.6.2",
46
- "luxon": "^3.1.0",
47
+ "luxon": "^3.1.1",
47
48
  "tracked-toolbox": "^1.2.3"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@ember/optional-features": "2.0.0",
51
52
  "@ember/test-helpers": "2.7.0",
52
- "@embroider/test-setup": "1.8.3",
53
+ "@embroider/test-setup": "2.0.2",
53
54
  "@faker-js/faker": "7.6.0",
54
- "@projectcaluma/ember-testing": "11.0.0-beta.38",
55
+ "@projectcaluma/ember-testing": "11.0.0-beta.40",
55
56
  "broccoli-asset-rev": "3.0.0",
56
- "ember-cli": "4.8.0",
57
+ "concurrently": "7.6.0",
58
+ "ember-cli": "4.9.2",
57
59
  "ember-cli-code-coverage": "1.0.3",
58
60
  "ember-cli-dependency-checker": "3.3.1",
59
61
  "ember-cli-inject-live-reload": "2.1.0",
@@ -61,20 +63,18 @@
61
63
  "ember-cli-sass": "11.0.1",
62
64
  "ember-cli-sri": "2.1.1",
63
65
  "ember-cli-terser": "4.0.2",
64
- "ember-disable-prototype-extensions": "1.1.3",
65
66
  "ember-engines": "0.8.23",
66
67
  "ember-load-initializers": "2.1.2",
67
- "ember-qunit": "6.0.0",
68
+ "ember-qunit": "6.1.1",
68
69
  "ember-resolver": "8.0.3",
69
- "ember-source": "4.8.2",
70
+ "ember-source": "4.9.3",
70
71
  "ember-source-channel-url": "3.0.0",
71
72
  "ember-try": "2.0.0",
72
73
  "loader.js": "4.7.0",
73
74
  "miragejs": "0.1.46",
74
- "npm-run-all": "4.1.5",
75
75
  "qunit": "2.19.3",
76
76
  "qunit-dom": "2.0.0",
77
- "sass": "1.56.1",
77
+ "sass": "1.57.1",
78
78
  "webpack": "5.75.0"
79
79
  },
80
80
  "engines": {