@projectcaluma/ember-form 12.14.0 → 12.15.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,7 +35,7 @@ export default class CfFieldInputNumberSeparatorComponent extends Component {
35
35
  // We need to remove the thousand separator and replace the decimal
36
36
  // separator with a dot in order to parse it into a number. Which character
37
37
  // those are is determined per locale in the getters above.
38
- const serialized = Number(
38
+ const serialized = parseFloat(
39
39
  value
40
40
  .replace(new RegExp(`\\${this.thousandSeparator}`, "g"), "")
41
41
  .replace(new RegExp(`\\${this.decimalSeparator}`), "."),
@@ -0,0 +1,28 @@
1
+ fragment CaseFormAndWorkflow on Case {
2
+ id
3
+ workflow {
4
+ id
5
+ slug
6
+ }
7
+ document {
8
+ id
9
+ form {
10
+ id
11
+ slug
12
+ }
13
+ }
14
+ family {
15
+ id
16
+ workflow {
17
+ id
18
+ slug
19
+ }
20
+ document {
21
+ id
22
+ form {
23
+ id
24
+ slug
25
+ }
26
+ }
27
+ }
28
+ }
@@ -1,4 +1,5 @@
1
1
  #import * from '../fragments/field.graphql'
2
+ #import * from '../fragments/case-form-and-workflow.graphql'
2
3
 
3
4
  query DocumentAnswers($id: ID!) {
4
5
  allDocuments(filter: [{ id: $id }]) {
@@ -11,9 +12,12 @@ query DocumentAnswers($id: ID!) {
11
12
  }
12
13
  workItem {
13
14
  id
15
+ case {
16
+ ...CaseFormAndWorkflow
17
+ }
14
18
  }
15
19
  case {
16
- id
20
+ ...CaseFormAndWorkflow
17
21
  workItems {
18
22
  edges {
19
23
  node {
@@ -198,6 +198,7 @@ export default class Document extends Base {
198
198
  * @property {Object} jexlContext
199
199
  */
200
200
  get jexlContext() {
201
+ const _case = this.raw.workItem?.case ?? this.raw.case;
201
202
  return (
202
203
  this.parentDocument?.jexlContext ?? {
203
204
  // JEXL interprets null in an expression as variable instead of a
@@ -209,6 +210,14 @@ export default class Document extends Base {
209
210
  form: this.rootForm.slug,
210
211
  formMeta: this.rootForm.raw.meta,
211
212
  },
213
+ case: {
214
+ form: _case?.document?.form.slug,
215
+ workflow: _case?.workflow.slug,
216
+ root: {
217
+ form: _case?.family.document?.form.slug,
218
+ workflow: _case?.family.workflow.slug,
219
+ },
220
+ },
212
221
  },
213
222
  }
214
223
  );
@@ -417,6 +417,10 @@ export default class Field extends Base {
417
417
  * - `info.parent.formMeta`: The parent form meta if applicable.
418
418
  * - `info.root.form`: The new property for the root form.
419
419
  * - `info.root.formMeta`: The new property for the root form meta.
420
+ * - `info.case.form`: The cases' form (works for task forms and case forms).
421
+ * - `info.case.workflow`: The cases' workflow (works for task forms and case forms).
422
+ * - `info.case.root.form`: The _root_ cases' form (works for task forms and case forms).
423
+ * - `info.case.root.workflow`: The _root_ cases' workflow (works for task forms and case forms).
420
424
  *
421
425
  * @property {Object} jexlContext
422
426
  */
@@ -8,15 +8,6 @@ $flatpickr-selected-color: $global-primary-background;
8
8
  span.flatpickr-day {
9
9
  font-weight: $base-body-font-weight;
10
10
 
11
- &.today:not(.selected) {
12
- border-bottom-color: $flatpickr-today-color;
13
-
14
- &:hover {
15
- background: $flatpickr-today-color;
16
- border-color: $flatpickr-today-color;
17
- }
18
- }
19
-
20
11
  &.selected {
21
12
  background: $flatpickr-selected-color;
22
13
  border-color: $flatpickr-selected-color;
@@ -27,6 +18,15 @@ span.flatpickr-day {
27
18
  border-color: color.adjust($flatpickr-selected-color, $lightness: -10%);
28
19
  }
29
20
  }
21
+
22
+ &.today:not(.selected) {
23
+ border-bottom-color: $flatpickr-today-color;
24
+
25
+ &:hover {
26
+ background: $flatpickr-today-color;
27
+ border-color: $flatpickr-today-color;
28
+ }
29
+ }
30
30
  }
31
31
 
32
32
  .flatpickr-months {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-form",
3
- "version": "12.14.0",
3
+ "version": "12.15.1",
4
4
  "description": "Ember addon for rendering Caluma forms.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -9,10 +9,10 @@
9
9
  "homepage": "https://docs.caluma.io/ember-caluma",
10
10
  "repository": "github:projectcaluma/ember-caluma",
11
11
  "dependencies": {
12
- "@babel/core": "^7.24.3",
12
+ "@babel/core": "^7.24.7",
13
13
  "@ember/string": "^3.1.1",
14
14
  "@embroider/macros": "^1.15.0",
15
- "@embroider/util": "^1.13.0",
15
+ "@embroider/util": "^1.13.1",
16
16
  "@glimmer/component": "^1.1.2",
17
17
  "@glimmer/tracking": "^1.1.2",
18
18
  "ember-apollo-client": "~4.0.2",
@@ -39,7 +39,7 @@
39
39
  "luxon": "^3.4.4",
40
40
  "reactiveweb": "^1.2.3",
41
41
  "tracked-toolbox": "^2.0.0",
42
- "@projectcaluma/ember-core": "^12.14.0"
42
+ "@projectcaluma/ember-core": "^12.15.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@ember/optional-features": "2.1.0",
@@ -49,10 +49,11 @@
49
49
  "broccoli-asset-rev": "3.0.0",
50
50
  "ember-cli": "5.7.0",
51
51
  "ember-cli-clean-css": "3.0.0",
52
- "ember-cli-code-coverage": "2.1.1",
52
+ "ember-cli-code-coverage": "3.0.0",
53
53
  "ember-cli-dependency-checker": "3.3.2",
54
54
  "ember-cli-inject-live-reload": "2.1.0",
55
55
  "ember-cli-mirage": "3.0.3",
56
+ "ember-cli-sass": "11.0.1",
56
57
  "ember-cli-sri": "2.1.1",
57
58
  "ember-cli-terser": "4.0.2",
58
59
  "ember-load-initializers": "2.1.2",
@@ -65,15 +66,16 @@
65
66
  "miragejs": "0.1.48",
66
67
  "qunit": "2.20.1",
67
68
  "qunit-dom": "3.1.2",
68
- "uikit": "3.19.2",
69
+ "uikit": "3.21.5",
70
+ "sass": "1.70.0",
69
71
  "uuid": "9.0.1",
70
72
  "webpack": "5.91.0",
71
- "@projectcaluma/ember-workflow": "12.14.0",
72
- "@projectcaluma/ember-testing": "12.14.0"
73
+ "@projectcaluma/ember-testing": "12.15.1",
74
+ "@projectcaluma/ember-workflow": "12.15.1"
73
75
  },
74
76
  "peerDependencies": {
75
77
  "ember-source": "^4.0.0",
76
- "@projectcaluma/ember-workflow": "^12.14.0"
78
+ "@projectcaluma/ember-workflow": "^12.15.1"
77
79
  },
78
80
  "dependenciesMeta": {
79
81
  "@projectcaluma/ember-core": {