@projectcaluma/ember-form 13.0.2 → 13.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,5 @@
1
1
  import { action } from "@ember/object";
2
2
  import { inject as service } from "@ember/service";
3
- import { waitForPromise } from "@ember/test-waiters";
4
3
  import { macroCondition, isTesting } from "@embroider/macros";
5
4
  import Component from "@glimmer/component";
6
5
  import { queryManager } from "ember-apollo-client";
@@ -87,9 +86,7 @@ export default class CfFieldInputFilesComponent extends Component {
87
86
  };
88
87
 
89
88
  // upload the actual file to data storage
90
- await Promise.all(
91
- newFiles.map((file) => waitForPromise(uploadFunction(file))),
92
- );
89
+ await Promise.all(newFiles.map((file) => uploadFunction(file)));
93
90
 
94
91
  this.args.field.answer.value = savedAnswerValue;
95
92
  } catch (error) {
@@ -11,7 +11,7 @@ export default class CfFieldInputNumberSeparatorComponent extends Component {
11
11
  }
12
12
 
13
13
  get displayValue() {
14
- if (!this.args.field.value) {
14
+ if (isNaN(parseFloat(this.args.field.value))) {
15
15
  return "";
16
16
  }
17
17
 
@@ -188,6 +188,17 @@ export default class Document extends Base {
188
188
  });
189
189
  documentJexl.addTransform("stringify", (input) => JSON.stringify(input));
190
190
  documentJexl.addTransform("flatten", flatten);
191
+ documentJexl.addTransform("length", (input) => {
192
+ if (input?.length !== undefined) {
193
+ // strings, arrays
194
+ return input.length;
195
+ } else if (input instanceof Object) {
196
+ // objects
197
+ return Object.keys(input).length;
198
+ }
199
+
200
+ return null;
201
+ });
191
202
 
192
203
  return documentJexl;
193
204
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-form",
3
- "version": "13.0.2",
3
+ "version": "13.1.0",
4
4
  "description": "Ember addon for rendering Caluma forms.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -18,16 +18,16 @@
18
18
  "ember-apollo-client": "~4.0.2",
19
19
  "ember-auto-import": "^2.7.4",
20
20
  "ember-autoresize-modifier": "^0.7.0",
21
- "ember-basic-dropdown": "^8.2.0",
21
+ "ember-basic-dropdown": "^8.3.0",
22
22
  "ember-cli-babel": "^8.2.0",
23
23
  "ember-cli-htmlbars": "^6.3.0",
24
24
  "ember-cli-showdown": "^9.0.1",
25
25
  "ember-composable-helpers": "^5.0.0",
26
26
  "ember-concurrency": "^4.0.2",
27
27
  "ember-fetch": "^8.1.2",
28
- "ember-flatpickr": "^8.0.0",
28
+ "ember-flatpickr": "^8.0.1",
29
29
  "ember-in-viewport": "^4.1.0",
30
- "ember-intl": "^7.0.4",
30
+ "ember-intl": "^7.0.5",
31
31
  "ember-math-helpers": "^4.0.0",
32
32
  "ember-power-select": "^8.3.0",
33
33
  "ember-truth-helpers": "^4.0.3",
@@ -40,7 +40,7 @@
40
40
  "luxon": "^3.5.0",
41
41
  "reactiveweb": "^1.3.0",
42
42
  "tracked-toolbox": "^2.0.0",
43
- "@projectcaluma/ember-core": "^13.0.2"
43
+ "@projectcaluma/ember-core": "^13.1.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@ember/optional-features": "2.1.0",
@@ -48,9 +48,9 @@
48
48
  "@embroider/test-setup": "4.0.0",
49
49
  "@faker-js/faker": "8.4.1",
50
50
  "broccoli-asset-rev": "3.0.0",
51
- "ember-cli": "5.10.0",
51
+ "ember-cli": "5.11.0",
52
52
  "ember-cli-clean-css": "3.0.0",
53
- "ember-cli-code-coverage": "3.0.0",
53
+ "ember-cli-code-coverage": "3.0.1",
54
54
  "ember-cli-dependency-checker": "3.3.2",
55
55
  "ember-cli-inject-live-reload": "2.1.0",
56
56
  "ember-cli-mirage": "3.0.3",
@@ -60,23 +60,23 @@
60
60
  "ember-load-initializers": "2.1.2",
61
61
  "ember-qunit": "8.1.0",
62
62
  "ember-resolver": "12.0.1",
63
- "ember-source": "5.10.1",
63
+ "ember-source": "5.11.0",
64
64
  "ember-source-channel-url": "3.0.0",
65
65
  "ember-try": "3.0.0",
66
66
  "loader.js": "4.7.0",
67
67
  "miragejs": "0.1.48",
68
- "qunit": "2.21.1",
68
+ "qunit": "2.22.0",
69
69
  "qunit-dom": "3.2.0",
70
70
  "sass": "1.77.8",
71
- "uikit": "3.21.9",
71
+ "uikit": "3.21.10",
72
72
  "uuid": "10.0.0",
73
- "webpack": "5.93.0",
74
- "@projectcaluma/ember-testing": "13.0.2",
75
- "@projectcaluma/ember-workflow": "13.0.2"
73
+ "webpack": "5.94.0",
74
+ "@projectcaluma/ember-testing": "13.1.0",
75
+ "@projectcaluma/ember-workflow": "13.1.0"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "ember-source": ">= 4.0.0",
79
- "@projectcaluma/ember-workflow": "^13.0.2"
79
+ "@projectcaluma/ember-workflow": "^13.1.0"
80
80
  },
81
81
  "dependenciesMeta": {
82
82
  "@projectcaluma/ember-core": {