@projectcaluma/ember-form 14.11.1 → 14.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  fragment CaseFormAndWorkflow on Case {
2
2
  id
3
+ meta
3
4
  workflow {
4
5
  id
5
6
  slug
@@ -13,6 +14,7 @@ fragment CaseFormAndWorkflow on Case {
13
14
  }
14
15
  family {
15
16
  id
17
+ meta
16
18
  workflow {
17
19
  id
18
20
  slug
@@ -12,6 +12,10 @@ query DocumentAnswers($id: ID!) {
12
12
  }
13
13
  workItem {
14
14
  id
15
+ meta
16
+ task {
17
+ slug
18
+ }
15
19
  case {
16
20
  ...CaseFormAndWorkflow
17
21
  }
@@ -232,7 +232,9 @@ export default class Document extends Base {
232
232
  * @property {Object} jexlContext
233
233
  */
234
234
  get jexlContext() {
235
- const _case = this.raw.workItem?.case ?? this.raw.case;
235
+ const workItem = this.raw.workItem;
236
+ const _case = workItem?.case ?? this.raw.case;
237
+
236
238
  return (
237
239
  this.parentDocument?.jexlContext ?? {
238
240
  // JEXL interprets null in an expression as variable instead of a
@@ -244,14 +246,24 @@ export default class Document extends Base {
244
246
  form: this.rootForm.slug,
245
247
  formMeta: this.rootForm.raw.meta,
246
248
  },
247
- case: {
248
- form: _case?.document?.form.slug,
249
- workflow: _case?.workflow.slug,
250
- root: {
251
- form: _case?.family.document?.form.slug,
252
- workflow: _case?.family.workflow.slug,
253
- },
254
- },
249
+ case: _case
250
+ ? {
251
+ form: _case.document?.form.slug,
252
+ workflow: _case.workflow.slug,
253
+ meta: _case.meta,
254
+ root: {
255
+ form: _case.family.document?.form.slug,
256
+ workflow: _case.family.workflow.slug,
257
+ meta: _case.family.meta,
258
+ },
259
+ }
260
+ : null,
261
+ workItem: workItem
262
+ ? {
263
+ task: workItem.task.slug,
264
+ meta: workItem.meta,
265
+ }
266
+ : null,
255
267
  },
256
268
  }
257
269
  );
@@ -554,13 +554,17 @@ export default class Field extends Base {
554
554
  * - `info.formMeta`: The meta of the form this question is attached to.
555
555
  * - `info.parent.form`: The parent form if applicable.
556
556
  * - `info.parent.formMeta`: The parent form meta if applicable.
557
- * - `info.parent.question`: The parent field question if applicable.
557
+ * - `info.parent.question`: The parent question (table or form question)
558
558
  * - `info.root.form`: The new property for the root form.
559
559
  * - `info.root.formMeta`: The new property for the root form meta.
560
560
  * - `info.case.form`: The cases' form (works for task forms and case forms).
561
561
  * - `info.case.workflow`: The cases' workflow (works for task forms and case forms).
562
+ * - `info.case.meta`: The cases' meta (works for task forms and case forms).
562
563
  * - `info.case.root.form`: The _root_ cases' form (works for task forms and case forms).
563
564
  * - `info.case.root.workflow`: The _root_ cases' workflow (works for task forms and case forms).
565
+ * - `info.case.root.meta`: The _root_ cases' meta (works for task forms and case forms).
566
+ * - `info.workItem.task`: The task slug of the work item
567
+ * - `info.workItem.meta`: The meta of the work item
564
568
  *
565
569
  * @property {Object} jexlContext
566
570
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-form",
3
- "version": "14.11.1",
3
+ "version": "14.12.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.5.0",
40
40
  "reactiveweb": "^1.3.0",
41
41
  "tracked-toolbox": "^2.0.0",
42
- "@projectcaluma/ember-core": "^14.11.1"
42
+ "@projectcaluma/ember-core": "^14.12.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@ember/optional-features": "2.3.0",
@@ -74,12 +74,12 @@
74
74
  "uikit": "3.25.6",
75
75
  "uuid": "13.0.0",
76
76
  "webpack": "5.104.1",
77
- "@projectcaluma/ember-testing": "14.11.1",
78
- "@projectcaluma/ember-workflow": "14.11.1"
77
+ "@projectcaluma/ember-testing": "14.12.0",
78
+ "@projectcaluma/ember-workflow": "14.12.0"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "ember-source": ">= 4.0.0",
82
- "@projectcaluma/ember-workflow": "^14.11.1"
82
+ "@projectcaluma/ember-workflow": "^14.12.0"
83
83
  },
84
84
  "dependenciesMeta": {
85
85
  "@projectcaluma/ember-core": {