@projectcaluma/ember-distribution 1.0.0-beta.2 → 1.0.0-beta.3

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [@projectcaluma/ember-distribution-v1.0.0-beta.3](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-distribution-v1.0.0-beta.2...@projectcaluma/ember-distribution-v1.0.0-beta.3) (2022-02-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** remove moment altogether and update ember-pikday ([b2f7fa2](https://github.com/projectcaluma/ember-caluma/commit/b2f7fa28fa076897addd36e5964c926c671508ff))
7
+ * **distribution:** replace moment with luxon ([80f6b9a](https://github.com/projectcaluma/ember-caluma/commit/80f6b9a984113a5870a1a9ffbcc8e1700cb33190))
8
+
9
+
10
+ ### BREAKING CHANGES
11
+
12
+ * **deps:** The host app now needs to opt-in to use the default
13
+ pikaday styles: https://github.com/adopted-ember-addons/ember-pikaday#styles
14
+
1
15
  # [@projectcaluma/ember-distribution-v1.0.0-beta.2](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-distribution-v1.0.0-beta.1...@projectcaluma/ember-distribution-v1.0.0-beta.2) (2022-02-01)
2
16
 
3
17
 
@@ -20,7 +20,6 @@
20
20
  </div>
21
21
  <div>
22
22
  <UkButton
23
- @color="default"
24
23
  @label={{t "caluma.distribution.new.reset"}}
25
24
  @onClick={{this.clearSelectedGroups}}
26
25
  data-test-reset
@@ -1,3 +1,4 @@
1
+ import { getOwner } from "@ember/application";
1
2
  import { action } from "@ember/object";
2
3
  import { inject as service } from "@ember/service";
3
4
  import Component from "@glimmer/component";
@@ -62,7 +63,12 @@ export default class InquiryNewFormComponent extends Component {
62
63
  *updateSearch(e) {
63
64
  e.preventDefault();
64
65
 
65
- yield timeout(500);
66
+ const { environment } =
67
+ getOwner(this).resolveRegistration("config:environment");
68
+
69
+ if (environment !== "test") {
70
+ yield timeout(500);
71
+ }
66
72
 
67
73
  this.args.onChangeSearch(e.target.value);
68
74
  }
@@ -1,6 +1,6 @@
1
1
  import { assert } from "@ember/debug";
2
2
  import { get } from "@ember/object";
3
- import moment from "moment";
3
+ import { DateTime } from "luxon";
4
4
 
5
5
  import { createDecorator } from "@projectcaluma/ember-distribution/-private/decorator";
6
6
 
@@ -21,13 +21,12 @@ function decorator(
21
21
  const value = inquiry.document?.deadline.edges[0]?.node.value;
22
22
  const isAnswered = inquiry.status === "COMPLETED";
23
23
 
24
- const deadline = moment.utc(value);
25
- const now = moment.utc();
24
+ const deadline = DateTime.fromISO(value).startOf("day");
25
+ const now = DateTime.now().startOf("day");
26
26
 
27
- const isOverdue = !isAnswered && now.isAfter(deadline, "day");
27
+ const isOverdue = !isAnswered && now > deadline;
28
28
  const isWarning =
29
- !isAnswered &&
30
- now.add(this.config.warningPeriod, "days").isAfter(deadline, "day");
29
+ !isAnswered && now.plus({ days: this.config.warningPeriod }) > deadline;
31
30
 
32
31
  return {
33
32
  value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-distribution",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.3",
4
4
  "description": "Ember engine for the Caluma distribution module.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@glimmer/component": "^1.0.4",
22
22
  "@glimmer/tracking": "^1.0.4",
23
- "@projectcaluma/ember-core": "^11.0.0-beta.2",
24
- "@projectcaluma/ember-form": "^11.0.0-beta.3",
25
- "@projectcaluma/ember-workflow": "^11.0.0-beta.2",
23
+ "@projectcaluma/ember-core": "^11.0.0-beta.4",
24
+ "@projectcaluma/ember-form": "^11.0.0-beta.9",
25
+ "@projectcaluma/ember-workflow": "^11.0.0-beta.4",
26
26
  "ember-apollo-client": "^3.2.0",
27
27
  "ember-auto-import": "^2.4.0",
28
28
  "ember-can": "^4.1.0",
@@ -32,22 +32,22 @@
32
32
  "ember-engines-router-service": "^0.3.0",
33
33
  "ember-fetch": "^8.1.1",
34
34
  "ember-intl": "^5.7.2",
35
- "ember-resources": "^4.1.3",
35
+ "ember-resources": "^4.3.1",
36
36
  "ember-svg-jar": "^2.3.4",
37
37
  "ember-test-selectors": "^6.0.0",
38
- "ember-uikit": "^5.0.0-beta.3",
38
+ "ember-uikit": "^5.0.0",
39
39
  "graphql": "^15.8.0",
40
40
  "ionicons": "^6.0.1",
41
41
  "lodash.merge": "^4.6.2",
42
- "moment": "^2.29.1",
42
+ "luxon": "^2.3.0",
43
43
  "tracked-toolbox": "^1.2.3"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@ember/optional-features": "2.0.0",
47
47
  "@ember/test-helpers": "2.6.0",
48
48
  "@embroider/test-setup": "1.0.0",
49
- "@faker-js/faker": "6.0.0-alpha.3",
50
- "@projectcaluma/ember-testing": "10.2.0-beta.2",
49
+ "@faker-js/faker": "6.0.0-alpha.5",
50
+ "@projectcaluma/ember-testing": "11.0.0-beta.2",
51
51
  "broccoli-asset-rev": "3.0.0",
52
52
  "ember-cli": "3.28.5",
53
53
  "ember-cli-dependency-checker": "3.2.0",
@@ -71,8 +71,8 @@
71
71
  "npm-run-all": "4.1.5",
72
72
  "qunit": "2.17.2",
73
73
  "qunit-dom": "2.0.0",
74
- "sass": "1.49.0",
75
- "webpack": "5.67.0"
74
+ "sass": "1.49.7",
75
+ "webpack": "5.68.0"
76
76
  },
77
77
  "engines": {
78
78
  "node": "12.* || 14.* || >= 16"