@projectcaluma/ember-form 12.14.0 → 12.15.0
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 =
|
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
|
-
|
20
|
+
...CaseFormAndWorkflow
|
17
21
|
workItems {
|
18
22
|
edges {
|
19
23
|
node {
|
package/addon/lib/document.js
CHANGED
@@ -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
|
);
|
package/addon/lib/field.js
CHANGED
@@ -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
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@projectcaluma/ember-form",
|
3
|
-
"version": "12.
|
3
|
+
"version": "12.15.0",
|
4
4
|
"description": "Ember addon for rendering Caluma forms.",
|
5
5
|
"keywords": [
|
6
6
|
"ember-addon"
|
@@ -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.
|
42
|
+
"@projectcaluma/ember-core": "^12.15.0"
|
43
43
|
},
|
44
44
|
"devDependencies": {
|
45
45
|
"@ember/optional-features": "2.1.0",
|
@@ -68,12 +68,12 @@
|
|
68
68
|
"uikit": "3.19.2",
|
69
69
|
"uuid": "9.0.1",
|
70
70
|
"webpack": "5.91.0",
|
71
|
-
"@projectcaluma/ember-
|
72
|
-
"@projectcaluma/ember-
|
71
|
+
"@projectcaluma/ember-testing": "12.15.0",
|
72
|
+
"@projectcaluma/ember-workflow": "12.15.0"
|
73
73
|
},
|
74
74
|
"peerDependencies": {
|
75
75
|
"ember-source": "^4.0.0",
|
76
|
-
"@projectcaluma/ember-workflow": "^12.
|
76
|
+
"@projectcaluma/ember-workflow": "^12.15.0"
|
77
77
|
},
|
78
78
|
"dependenciesMeta": {
|
79
79
|
"@projectcaluma/ember-core": {
|