@projectcaluma/ember-distribution 11.0.0-beta.38 → 11.0.0-beta.39
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/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:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
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:
|
|
104
|
-
icon:
|
|
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.
|
|
3
|
+
"version": "11.0.0-beta.39",
|
|
4
4
|
"description": "Ember engine for the Caluma distribution module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@ember/legacy-built-in-components": "^0.4.1",
|
|
22
22
|
"@ember/string": "^3.0.0",
|
|
23
|
-
"@embroider/macros": "^1.
|
|
23
|
+
"@embroider/macros": "^1.10.0",
|
|
24
24
|
"@glimmer/component": "^1.1.2",
|
|
25
25
|
"@glimmer/tracking": "^1.1.2",
|
|
26
|
-
"@projectcaluma/ember-core": "^11.0.0-beta.
|
|
27
|
-
"@projectcaluma/ember-form": "^11.0.0-beta.
|
|
28
|
-
"@projectcaluma/ember-workflow": "^11.0.0-beta.
|
|
26
|
+
"@projectcaluma/ember-core": "^11.0.0-beta.39",
|
|
27
|
+
"@projectcaluma/ember-form": "^11.0.0-beta.39",
|
|
28
|
+
"@projectcaluma/ember-workflow": "^11.0.0-beta.39",
|
|
29
29
|
"ember-apollo-client": "~4.0.2",
|
|
30
30
|
"ember-auto-import": "^2.4.3",
|
|
31
31
|
"ember-can": "^4.2.0",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@ember/optional-features": "2.0.0",
|
|
51
51
|
"@ember/test-helpers": "2.7.0",
|
|
52
|
-
"@embroider/test-setup": "
|
|
52
|
+
"@embroider/test-setup": "2.0.0",
|
|
53
53
|
"@faker-js/faker": "7.6.0",
|
|
54
|
-
"@projectcaluma/ember-testing": "11.0.0-beta.
|
|
54
|
+
"@projectcaluma/ember-testing": "11.0.0-beta.39",
|
|
55
55
|
"broccoli-asset-rev": "3.0.0",
|
|
56
56
|
"ember-cli": "4.8.0",
|
|
57
57
|
"ember-cli-code-coverage": "1.0.3",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"ember-cli-sri": "2.1.1",
|
|
63
63
|
"ember-cli-terser": "4.0.2",
|
|
64
64
|
"ember-disable-prototype-extensions": "1.1.3",
|
|
65
|
-
"ember-engines": "0.
|
|
65
|
+
"ember-engines": "0.9.0",
|
|
66
66
|
"ember-load-initializers": "2.1.2",
|
|
67
67
|
"ember-qunit": "6.0.0",
|
|
68
68
|
"ember-resolver": "8.0.3",
|