@projectcaluma/ember-distribution 14.14.2 → 14.15.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.
@@ -3,6 +3,6 @@
3
3
  {{if this.config.ui.small 'inquiry-divider--small' 'uk-margin'}}"
4
4
  >
5
5
  <div class="inquiry-divider__icon uk-flex uk-flex-center uk-flex-middle">
6
- <UkIcon @icon={{this.status.icon}} {{uk-tooltip this.status.label}} />
6
+ <CdInquiryStatusIcon @status={{this.status}} />
7
7
  </div>
8
8
  </div>
@@ -0,0 +1,9 @@
1
+ {{#if @status.iconComponent}}
2
+ <@status.iconComponent @status={{@status}} @tooltipPos={{@tooltipPos}} />
3
+ {{else}}
4
+ <UkIcon
5
+ @icon={{@status.icon}}
6
+ class="uk-text-{{@status.color}}"
7
+ {{uk-tooltip @status.label pos=@tooltipPos}}
8
+ />
9
+ {{/if}}
@@ -10,10 +10,9 @@
10
10
  {{/if}}
11
11
 
12
12
  <div class="uk-position-relative uk-flex uk-flex-middle">
13
- <UkIcon
14
- @icon={{this.status.icon}}
15
- class="uk-text-{{this.status.color}}"
16
- {{uk-tooltip this.status.label pos=(if this.config.ui.stack "left" "top")}}
13
+ <CdInquiryStatusIcon
14
+ @status={{this.status}}
15
+ @tooltipPos={{if this.config.ui.stack "left" "top"}}
17
16
  />
18
17
  {{#if this.showPendingIndicator}}
19
18
  <span
@@ -51,6 +51,7 @@ function decorator(
51
51
  }
52
52
 
53
53
  return {
54
+ iconComponent: null,
54
55
  ...config,
55
56
  label: this.intl.t(config.label),
56
57
  color: config.color[inquiryType] ?? config.color,
@@ -74,6 +75,11 @@ function decorator(
74
75
  ? INQUIRY_STATUS.SENT
75
76
  : this.config.inquiry.answer.statusMapping[answer.value];
76
77
 
78
+ assert(
79
+ "The status config must contain either `icon` or `iconComponent`",
80
+ statusConfig.icon || statusConfig.iconComponent,
81
+ );
82
+
77
83
  return {
78
84
  slug: statusConfig.slug,
79
85
  label:
@@ -82,6 +88,7 @@ function decorator(
82
88
  : this.intl.t(`caluma.distribution.status.${statusConfig.slug}`),
83
89
  color: statusConfig.color[inquiryType] ?? statusConfig.color,
84
90
  icon: statusConfig.icon,
91
+ iconComponent: statusConfig.iconComponent ?? null,
85
92
  };
86
93
  },
87
94
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-distribution",
3
- "version": "14.14.2",
3
+ "version": "14.15.0",
4
4
  "description": "Ember engine for the Caluma distribution module.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -35,9 +35,9 @@
35
35
  "luxon": "^3.5.0",
36
36
  "reactiveweb": "^1.3.0",
37
37
  "tracked-toolbox": "^2.0.0",
38
- "@projectcaluma/ember-core": "^14.14.2",
39
- "@projectcaluma/ember-workflow": "^14.14.2",
40
- "@projectcaluma/ember-form": "^14.14.2"
38
+ "@projectcaluma/ember-core": "^14.15.0",
39
+ "@projectcaluma/ember-form": "^14.15.0",
40
+ "@projectcaluma/ember-workflow": "^14.15.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@ember/optional-features": "3.0.0",
@@ -68,7 +68,7 @@
68
68
  "sass": "1.102.0",
69
69
  "uikit": "3.25.6",
70
70
  "webpack": "5.109.2",
71
- "@projectcaluma/ember-testing": "14.14.2"
71
+ "@projectcaluma/ember-testing": "14.15.0"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "ember-engines": "^0.11.0",