@projectcaluma/ember-form 13.0.2 → 13.1.1

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.1",
4
4
  "description": "Ember addon for rendering Caluma forms.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -9,27 +9,27 @@
9
9
  "homepage": "https://docs.caluma.io/ember-caluma",
10
10
  "repository": "github:projectcaluma/ember-caluma",
11
11
  "dependencies": {
12
- "@babel/core": "^7.25.2",
12
+ "@babel/core": "^7.25.7",
13
13
  "@ember/string": "^4.0.0",
14
- "@embroider/macros": "^1.16.5",
14
+ "@embroider/macros": "^1.16.6",
15
15
  "@embroider/util": "^1.13.2",
16
16
  "@glimmer/component": "^1.1.2",
17
17
  "@glimmer/tracking": "^1.1.2",
18
18
  "ember-apollo-client": "~4.0.2",
19
- "ember-auto-import": "^2.7.4",
19
+ "ember-auto-import": "^2.8.1",
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
- "ember-power-select": "^8.3.0",
32
+ "ember-power-select": "^8.3.1",
33
33
  "ember-truth-helpers": "^4.0.3",
34
34
  "ember-uikit": "^9.1.2",
35
35
  "ember-validators": "^4.1.2",
@@ -40,43 +40,43 @@
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.1"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@ember/optional-features": "2.1.0",
47
47
  "@ember/test-helpers": "3.3.1",
48
48
  "@embroider/test-setup": "4.0.0",
49
- "@faker-js/faker": "8.4.1",
49
+ "@faker-js/faker": "9.0.3",
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.1.0",
54
54
  "ember-cli-dependency-checker": "3.3.2",
55
55
  "ember-cli-inject-live-reload": "2.1.0",
56
- "ember-cli-mirage": "3.0.3",
56
+ "ember-cli-mirage": "3.0.4",
57
57
  "ember-cli-sass": "11.0.1",
58
58
  "ember-cli-sri": "2.1.1",
59
59
  "ember-cli-terser": "4.0.2",
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",
69
- "qunit-dom": "3.2.0",
70
- "sass": "1.77.8",
71
- "uikit": "3.21.9",
68
+ "qunit": "2.22.0",
69
+ "qunit-dom": "3.2.1",
70
+ "sass": "1.79.4",
71
+ "uikit": "3.21.13",
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.95.0",
74
+ "@projectcaluma/ember-workflow": "13.1.1",
75
+ "@projectcaluma/ember-testing": "13.1.1"
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.1"
80
80
  },
81
81
  "dependenciesMeta": {
82
82
  "@projectcaluma/ember-core": {