@projectcaluma/ember-form 9.3.0 → 10.0.3

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.
Files changed (32) hide show
  1. package/addon/components/cf-content.js +2 -2
  2. package/addon/components/cf-field/input/action-button.hbs +1 -1
  3. package/addon/components/cf-field/input/action-button.js +7 -0
  4. package/addon/components/cf-field/input/checkbox.hbs +1 -1
  5. package/addon/components/cf-field/input/file.js +1 -1
  6. package/addon/components/cf-field/input/float.hbs +2 -2
  7. package/addon/components/cf-field/input/integer.hbs +2 -2
  8. package/addon/components/cf-field/input/text.hbs +2 -2
  9. package/addon/components/cf-field/input/textarea.hbs +2 -2
  10. package/addon/components/cf-field-value.js +1 -1
  11. package/addon/components/cf-navigation-item.hbs +2 -2
  12. package/addon/components/document-validity.js +3 -5
  13. package/addon/gql/fragments/{field-question.graphql → field.graphql} +83 -0
  14. package/addon/gql/mutations/save-document-date-answer.graphql +2 -2
  15. package/addon/gql/mutations/save-document-file-answer.graphql +2 -2
  16. package/addon/gql/mutations/save-document-float-answer.graphql +2 -2
  17. package/addon/gql/mutations/save-document-integer-answer.graphql +2 -2
  18. package/addon/gql/mutations/save-document-list-answer.graphql +2 -2
  19. package/addon/gql/mutations/save-document-string-answer.graphql +2 -2
  20. package/addon/gql/mutations/save-document-table-answer.graphql +2 -2
  21. package/addon/gql/mutations/save-document.graphql +3 -2
  22. package/addon/gql/queries/document-answers.graphql +38 -0
  23. package/addon/gql/queries/{get-document-forms.graphql → document-forms.graphql} +3 -2
  24. package/addon/gql/queries/{get-document-used-dynamic-options.graphql → document-used-dynamic-options.graphql} +2 -1
  25. package/addon/gql/queries/{get-dynamic-options.graphql → dynamic-options.graphql} +2 -1
  26. package/addon/gql/queries/{get-fileanswer-info.graphql → fileanswer-info.graphql} +2 -1
  27. package/addon/lib/document.js +16 -4
  28. package/addon/lib/field.js +2 -2
  29. package/addon/lib/question.js +1 -1
  30. package/package.json +12 -12
  31. package/addon/gql/fragments/field-answer.graphql +0 -57
  32. package/addon/gql/queries/get-document-answers.graphql +0 -24
@@ -5,8 +5,8 @@ import Component from "@glimmer/component";
5
5
  import { queryManager } from "ember-apollo-client";
6
6
  import { dropTask } from "ember-concurrency-decorators";
7
7
 
8
- import getDocumentAnswersQuery from "@projectcaluma/ember-form/gql/queries/get-document-answers.graphql";
9
- import getDocumentFormsQuery from "@projectcaluma/ember-form/gql/queries/get-document-forms.graphql";
8
+ import getDocumentAnswersQuery from "@projectcaluma/ember-form/gql/queries/document-answers.graphql";
9
+ import getDocumentFormsQuery from "@projectcaluma/ember-form/gql/queries/document-forms.graphql";
10
10
  import { parseDocument } from "@projectcaluma/ember-form/lib/parsers";
11
11
 
12
12
  /**
@@ -5,7 +5,7 @@
5
5
  as |isValid validate|
6
6
  >
7
7
  <WorkItemButton
8
- @workItemId={{@field.document.workItemUuid}}
8
+ @workItemId={{this.workItem}}
9
9
  @mutation={{this.action}}
10
10
  @label={{@field.question.label}}
11
11
  @disabled={{and (not-eq isValid null) (not isValid)}}
@@ -23,6 +23,13 @@ export default class CfFieldInputActionButtonComponent extends Component {
23
23
  );
24
24
  }
25
25
 
26
+ get workItem() {
27
+ return (
28
+ this.args.context?.actionButtonWorkItemId ||
29
+ this.args.field.document.workItemUuid
30
+ );
31
+ }
32
+
26
33
  get action() {
27
34
  return this.args.field.question.action.toLowerCase();
28
35
  }
@@ -1,6 +1,6 @@
1
1
  {{#each @field.options as |option i|}}
2
2
  {{#if (gt i 0)}}<br />{{/if}}
3
- <label class="cf-checkbox_label {{if @field.isInvalid "uk-form-danger"}}">
3
+ <label class="cf-checkbox_label {{if @field.isInvalid 'uk-form-danger'}}">
4
4
  <input
5
5
  class="uk-checkbox uk-margin-small-right"
6
6
  type="checkbox"
@@ -4,7 +4,7 @@ import Component from "@glimmer/component";
4
4
  import { queryManager } from "ember-apollo-client";
5
5
 
6
6
  import removeAnswerMutation from "@projectcaluma/ember-form/gql/mutations/remove-answer.graphql";
7
- import getFileAnswerInfoQuery from "@projectcaluma/ember-form/gql/queries/get-fileanswer-info.graphql";
7
+ import getFileAnswerInfoQuery from "@projectcaluma/ember-form/gql/queries/fileanswer-info.graphql";
8
8
 
9
9
  export default class CfFieldInputFileComponent extends Component {
10
10
  @service intl;
@@ -2,8 +2,8 @@
2
2
  type="number"
3
3
  step="0.001"
4
4
  class="uk-input
5
- {{if @field.isInvalid "uk-form-danger"}}
6
- {{if this.disabled "uk-disabled"}}"
5
+ {{if @field.isInvalid 'uk-form-danger'}}
6
+ {{if this.disabled 'uk-disabled'}}"
7
7
  readonly={{this.disabled}}
8
8
  name={{@field.pk}}
9
9
  id={{@field.pk}}
@@ -2,8 +2,8 @@
2
2
  type="number"
3
3
  step="1"
4
4
  class="uk-input
5
- {{if @field.isInvalid "uk-form-danger"}}
6
- {{if @disabled "uk-disabled"}}"
5
+ {{if @field.isInvalid 'uk-form-danger'}}
6
+ {{if @disabled 'uk-disabled'}}"
7
7
  name={{@field.pk}}
8
8
  id={{@field.pk}}
9
9
  value={{@field.answer.value}}
@@ -1,8 +1,8 @@
1
1
  <input
2
2
  type="text"
3
3
  class="uk-input
4
- {{if @field.isInvalid "uk-form-danger"}}
5
- {{if @disabled "uk-disabled"}}"
4
+ {{if @field.isInvalid 'uk-form-danger'}}
5
+ {{if @disabled 'uk-disabled'}}"
6
6
  name={{@field.pk}}
7
7
  id={{@field.pk}}
8
8
  value={{@field.answer.value}}
@@ -1,7 +1,7 @@
1
1
  <textarea
2
2
  class="uk-textarea
3
- {{if @field.isInvalid "uk-form-danger"}}
4
- {{if @disabled "uk-disabled"}}"
3
+ {{if @field.isInvalid 'uk-form-danger'}}
4
+ {{if @disabled 'uk-disabled'}}"
5
5
  name={{@field.pk}}
6
6
  id={{@field.pk}}
7
7
  placeholder={{@field.question.placeholder}}
@@ -3,7 +3,7 @@ import Component from "@glimmer/component";
3
3
  import { queryManager } from "ember-apollo-client";
4
4
  import moment from "moment";
5
5
 
6
- import getFileAnswerInfoQuery from "@projectcaluma/ember-form/gql/queries/get-fileanswer-info.graphql";
6
+ import getFileAnswerInfoQuery from "@projectcaluma/ember-form/gql/queries/fileanswer-info.graphql";
7
7
 
8
8
  export default class CfFieldValueComponent extends Component {
9
9
  @queryManager apollo;
@@ -1,6 +1,6 @@
1
1
  <li
2
2
  class="cf-navigation__item uk-width-auto
3
- {{if (or @item.active @item.childrenActive) "uk-active"}}"
3
+ {{if (or @item.active @item.childrenActive) 'uk-active'}}"
4
4
  >
5
5
  <LinkTo @query={{hash displayedForm=@item.slug}}>
6
6
  {{#if (and @useAsHeading this.active)}}
@@ -19,7 +19,7 @@
19
19
  {{/if}}
20
20
  <span
21
21
  class="cf-navigation__item__icon cf-navigation__item__icon--{{@item.state}}
22
- {{if @item.dirty "cf-navigation__item__icon--dirty"}}"
22
+ {{if @item.dirty 'cf-navigation__item__icon--dirty'}}"
23
23
  ></span>
24
24
  </LinkTo>
25
25
 
@@ -37,11 +37,9 @@ export default class DocumentValidity extends Component {
37
37
 
38
38
  @restartableTask
39
39
  *_validate() {
40
- yield Promise.all(
41
- this.args.document.fields.map((field) => {
42
- return field.validate.linked().perform();
43
- })
44
- );
40
+ for (const field of this.args.document.fields) {
41
+ yield field.validate.linked().perform();
42
+ }
45
43
 
46
44
  if (this.isValid) {
47
45
  this.args.onValid?.();
@@ -1,4 +1,10 @@
1
+ # We can not symlink this file so an exact copy exists in another package:
2
+ # packages/form-builder/addon/gql/fragments/field.graphql
3
+ #
4
+ # When changing this file the other must also receive the same changes.
5
+
1
6
  fragment SimpleQuestion on Question {
7
+ id
2
8
  slug
3
9
  label
4
10
  isRequired
@@ -9,6 +15,7 @@ fragment SimpleQuestion on Question {
9
15
  textMinLength: minLength
10
16
  textMaxLength: maxLength
11
17
  textDefaultAnswer: defaultAnswer {
18
+ id
12
19
  value
13
20
  }
14
21
  placeholder
@@ -17,6 +24,7 @@ fragment SimpleQuestion on Question {
17
24
  textareaMinLength: minLength
18
25
  textareaMaxLength: maxLength
19
26
  textareaDefaultAnswer: defaultAnswer {
27
+ id
20
28
  value
21
29
  }
22
30
  placeholder
@@ -25,6 +33,7 @@ fragment SimpleQuestion on Question {
25
33
  integerMinValue: minValue
26
34
  integerMaxValue: maxValue
27
35
  integerDefaultAnswer: defaultAnswer {
36
+ id
28
37
  value
29
38
  }
30
39
  placeholder
@@ -33,6 +42,7 @@ fragment SimpleQuestion on Question {
33
42
  floatMinValue: minValue
34
43
  floatMaxValue: maxValue
35
44
  floatDefaultAnswer: defaultAnswer {
45
+ id
36
46
  value
37
47
  }
38
48
  placeholder
@@ -41,6 +51,7 @@ fragment SimpleQuestion on Question {
41
51
  choiceOptions: options {
42
52
  edges {
43
53
  node {
54
+ id
44
55
  slug
45
56
  label
46
57
  isArchived
@@ -48,6 +59,7 @@ fragment SimpleQuestion on Question {
48
59
  }
49
60
  }
50
61
  choiceDefaultAnswer: defaultAnswer {
62
+ id
51
63
  value
52
64
  }
53
65
  }
@@ -55,6 +67,7 @@ fragment SimpleQuestion on Question {
55
67
  multipleChoiceOptions: options {
56
68
  edges {
57
69
  node {
70
+ id
58
71
  slug
59
72
  label
60
73
  isArchived
@@ -62,11 +75,13 @@ fragment SimpleQuestion on Question {
62
75
  }
63
76
  }
64
77
  multipleChoiceDefaultAnswer: defaultAnswer {
78
+ id
65
79
  value
66
80
  }
67
81
  }
68
82
  ... on DateQuestion {
69
83
  dateDefaultAnswer: defaultAnswer {
84
+ id
70
85
  value
71
86
  }
72
87
  }
@@ -84,8 +99,10 @@ fragment SimpleQuestion on Question {
84
99
  }
85
100
 
86
101
  fragment FieldTableQuestion on Question {
102
+ id
87
103
  ... on TableQuestion {
88
104
  rowForm {
105
+ id
89
106
  slug
90
107
  questions {
91
108
  edges {
@@ -96,6 +113,7 @@ fragment FieldTableQuestion on Question {
96
113
  }
97
114
  }
98
115
  tableDefaultAnswer: defaultAnswer {
116
+ id
99
117
  value {
100
118
  id
101
119
  answers {
@@ -103,6 +121,7 @@ fragment FieldTableQuestion on Question {
103
121
  node {
104
122
  id
105
123
  question {
124
+ id
106
125
  slug
107
126
  }
108
127
  ... on StringAnswer {
@@ -129,10 +148,12 @@ fragment FieldTableQuestion on Question {
129
148
  }
130
149
 
131
150
  fragment FieldQuestion on Question {
151
+ id
132
152
  ...SimpleQuestion
133
153
  ...FieldTableQuestion
134
154
  ... on FormQuestion {
135
155
  subForm {
156
+ id
136
157
  slug
137
158
  name
138
159
  questions {
@@ -140,10 +161,12 @@ fragment FieldQuestion on Question {
140
161
  node {
141
162
  # This part here limits our query to 2 level deep nested forms. This
142
163
  # has to be solved in another way!
164
+ id
143
165
  ...SimpleQuestion
144
166
  ...FieldTableQuestion
145
167
  ... on FormQuestion {
146
168
  subForm {
169
+ id
147
170
  slug
148
171
  name
149
172
  questions {
@@ -162,3 +185,63 @@ fragment FieldQuestion on Question {
162
185
  }
163
186
  }
164
187
  }
188
+
189
+ fragment SimpleAnswer on Answer {
190
+ id
191
+ question {
192
+ id
193
+ slug
194
+ }
195
+ ... on StringAnswer {
196
+ stringValue: value
197
+ }
198
+ ... on IntegerAnswer {
199
+ integerValue: value
200
+ }
201
+ ... on FloatAnswer {
202
+ floatValue: value
203
+ }
204
+ ... on ListAnswer {
205
+ listValue: value
206
+ }
207
+ ... on FileAnswer {
208
+ fileValue: value {
209
+ id
210
+ uploadUrl
211
+ downloadUrl
212
+ metadata
213
+ name
214
+ }
215
+ }
216
+ ... on DateAnswer {
217
+ dateValue: value
218
+ }
219
+ }
220
+
221
+ fragment FieldAnswer on Answer {
222
+ id
223
+ ...SimpleAnswer
224
+ ... on TableAnswer {
225
+ tableValue: value {
226
+ id
227
+ form {
228
+ id
229
+ slug
230
+ questions {
231
+ edges {
232
+ node {
233
+ ...FieldQuestion
234
+ }
235
+ }
236
+ }
237
+ }
238
+ answers {
239
+ edges {
240
+ node {
241
+ ...SimpleAnswer
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ }
@@ -1,6 +1,6 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-answer.graphql'
1
+ #import * from '../fragments/field.graphql'
2
2
 
3
- mutation ($input: SaveDocumentDateAnswerInput!) {
3
+ mutation SaveDocumentDateAnswer($input: SaveDocumentDateAnswerInput!) {
4
4
  saveDocumentDateAnswer(input: $input) {
5
5
  answer {
6
6
  ...FieldAnswer
@@ -1,6 +1,6 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-answer.graphql'
1
+ #import * from '../fragments/field.graphql'
2
2
 
3
- mutation ($input: SaveDocumentFileAnswerInput!) {
3
+ mutation SaveDocumentFileAnswer($input: SaveDocumentFileAnswerInput!) {
4
4
  saveDocumentFileAnswer(input: $input) {
5
5
  answer {
6
6
  ...FieldAnswer
@@ -1,6 +1,6 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-answer.graphql'
1
+ #import * from '../fragments/field.graphql'
2
2
 
3
- mutation ($input: SaveDocumentFloatAnswerInput!) {
3
+ mutation SaveDocumentFloatAnswer($input: SaveDocumentFloatAnswerInput!) {
4
4
  saveDocumentFloatAnswer(input: $input) {
5
5
  answer {
6
6
  ...FieldAnswer
@@ -1,6 +1,6 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-answer.graphql'
1
+ #import * from '../fragments/field.graphql'
2
2
 
3
- mutation ($input: SaveDocumentIntegerAnswerInput!) {
3
+ mutation SaveDocumentIntegerAnswer($input: SaveDocumentIntegerAnswerInput!) {
4
4
  saveDocumentIntegerAnswer(input: $input) {
5
5
  answer {
6
6
  ...FieldAnswer
@@ -1,6 +1,6 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-answer.graphql'
1
+ #import * from '../fragments/field.graphql'
2
2
 
3
- mutation ($input: SaveDocumentListAnswerInput!) {
3
+ mutation SaveDocumentListAnswer($input: SaveDocumentListAnswerInput!) {
4
4
  saveDocumentListAnswer(input: $input) {
5
5
  answer {
6
6
  ...FieldAnswer
@@ -1,6 +1,6 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-answer.graphql'
1
+ #import * from '../fragments/field.graphql'
2
2
 
3
- mutation ($input: SaveDocumentStringAnswerInput!) {
3
+ mutation SaveDocumentStringAnswer($input: SaveDocumentStringAnswerInput!) {
4
4
  saveDocumentStringAnswer(input: $input) {
5
5
  answer {
6
6
  ...FieldAnswer
@@ -1,6 +1,6 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-answer.graphql'
1
+ #import * from '../fragments/field.graphql'
2
2
 
3
- mutation ($input: SaveDocumentTableAnswerInput!) {
3
+ mutation SaveDocumentTableAnswer($input: SaveDocumentTableAnswerInput!) {
4
4
  saveDocumentTableAnswer(input: $input) {
5
5
  answer {
6
6
  ...FieldAnswer
@@ -1,6 +1,6 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-answer.graphql'
1
+ #import * from '../fragments/field.graphql'
2
2
 
3
- mutation ($input: SaveDocumentInput!) {
3
+ mutation SaveDocument($input: SaveDocumentInput!) {
4
4
  saveDocument(input: $input) {
5
5
  document {
6
6
  id
@@ -12,6 +12,7 @@ mutation ($input: SaveDocumentInput!) {
12
12
  }
13
13
  }
14
14
  form {
15
+ id
15
16
  slug
16
17
  questions {
17
18
  edges {
@@ -0,0 +1,38 @@
1
+ #import * from '../fragments/field.graphql'
2
+
3
+ query DocumentAnswers($id: ID!) {
4
+ allDocuments(filter: [{ id: $id }]) {
5
+ edges {
6
+ node {
7
+ id
8
+ form {
9
+ id
10
+ slug
11
+ }
12
+ workItem {
13
+ id
14
+ }
15
+ case {
16
+ id
17
+ workItems {
18
+ edges {
19
+ node {
20
+ id
21
+ task {
22
+ id
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ answers {
29
+ edges {
30
+ node {
31
+ ...FieldAnswer
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
@@ -1,9 +1,10 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-question.graphql'
1
+ #import FieldQuestion, FieldTableQuestion, SimpleQuestion from '../fragments/field.graphql'
2
2
 
3
- query ($slug: String!) {
3
+ query DocumentForms($slug: String!) {
4
4
  allForms(filter: [{ slug: $slug }]) {
5
5
  edges {
6
6
  node {
7
+ id
7
8
  slug
8
9
  name
9
10
  meta
@@ -1,9 +1,10 @@
1
- query GetDocumentUsedDynamicOptions($document: ID!, $question: ID!) {
1
+ query DocumentUsedDynamicOptions($document: ID!, $question: ID!) {
2
2
  allUsedDynamicOptions(
3
3
  filter: [{ document: $document }, { question: $question }]
4
4
  ) {
5
5
  edges {
6
6
  node {
7
+ id
7
8
  slug
8
9
  label
9
10
  }
@@ -1,7 +1,8 @@
1
- query ($question: String!) {
1
+ query DynamicOptions($question: String!) {
2
2
  allQuestions(filter: [{ slug: $question }], first: 1) {
3
3
  edges {
4
4
  node {
5
+ id
5
6
  slug
6
7
  ... on DynamicChoiceQuestion {
7
8
  dynamicChoiceOptions: options {
@@ -1,8 +1,9 @@
1
- query getFileAnswerInfo($id: ID!) {
1
+ query FileAnswerInfo($id: ID!) {
2
2
  node(id: $id) {
3
3
  id
4
4
  ... on FileAnswer {
5
5
  fileValue: value {
6
+ id
6
7
  uploadUrl
7
8
  downloadUrl
8
9
  metadata
@@ -83,9 +83,21 @@ export default Base.extend({
83
83
  return decodeId(this.raw.id);
84
84
  }),
85
85
 
86
- workItemUuid: computed("raw.workItem.id", function () {
87
- return this.raw.workItem ? decodeId(this.raw.workItem.id) : null;
88
- }),
86
+ workItemUuid: computed(
87
+ "raw.{workItem.id,case.workItems.edges.[]}",
88
+ function () {
89
+ // The document is either directly attached to a work item (via
90
+ // CompleteTaskFormTask) or it's the case document and therefore
91
+ // indirectly attached to a work item (via CompleteWorkflowFormTask)
92
+ const rawId =
93
+ this.raw.workItem?.id ||
94
+ this.raw.case?.workItems.edges.find(
95
+ (edge) => edge.node.task.__typename === "CompleteWorkflowFormTask"
96
+ )?.node.id;
97
+
98
+ return rawId ? decodeId(rawId) : null;
99
+ }
100
+ ),
89
101
 
90
102
  /**
91
103
  * The root form of this document
@@ -234,7 +246,7 @@ export default Base.extend({
234
246
  }
235
247
 
236
248
  if (field.hidden || [undefined, null].includes(field.value)) {
237
- return field.question.isMultipleChoice ? [] : null;
249
+ return defaultValue ?? field.question.isMultipleChoice ? [] : null;
238
250
  }
239
251
 
240
252
  if (field.question.__typename === "TableQuestion") {
@@ -19,7 +19,7 @@ import saveDocumentIntegerAnswerMutation from "@projectcaluma/ember-form/gql/mut
19
19
  import saveDocumentListAnswerMutation from "@projectcaluma/ember-form/gql/mutations/save-document-list-answer.graphql";
20
20
  import saveDocumentStringAnswerMutation from "@projectcaluma/ember-form/gql/mutations/save-document-string-answer.graphql";
21
21
  import saveDocumentTableAnswerMutation from "@projectcaluma/ember-form/gql/mutations/save-document-table-answer.graphql";
22
- import getDocumentUsedDynamicOptionsQuery from "@projectcaluma/ember-form/gql/queries/get-document-used-dynamic-options.graphql";
22
+ import getDocumentUsedDynamicOptionsQuery from "@projectcaluma/ember-form/gql/queries/document-used-dynamic-options.graphql";
23
23
  import Base from "@projectcaluma/ember-form/lib/base";
24
24
  import {
25
25
  nestedDependencyParents,
@@ -564,7 +564,7 @@ export default Base.extend({
564
564
  "fieldset.field.hidden",
565
565
  "jexlContext",
566
566
  "optionalDependencies.@each.{hidden,value}",
567
- "question.isRequired",
567
+ "question.{__typename,isRequired}",
568
568
  "pk",
569
569
  function () {
570
570
  if (
@@ -5,7 +5,7 @@ import { camelize } from "@ember/string";
5
5
  import { queryManager } from "ember-apollo-client";
6
6
  import { task } from "ember-concurrency";
7
7
 
8
- import getDynamicOptions from "@projectcaluma/ember-form/gql/queries/get-dynamic-options.graphql";
8
+ import getDynamicOptions from "@projectcaluma/ember-form/gql/queries/dynamic-options.graphql";
9
9
  import Base from "@projectcaluma/ember-form/lib/base";
10
10
 
11
11
  const getValue = (answer) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-form",
3
- "version": "9.3.0",
3
+ "version": "10.0.3",
4
4
  "description": "Ember addon for rendering Caluma forms.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -16,19 +16,19 @@
16
16
  "dependencies": {
17
17
  "@glimmer/component": "^1.0.4",
18
18
  "@glimmer/tracking": "^1.0.4",
19
- "@projectcaluma/ember-core": "9.2.0",
19
+ "@projectcaluma/ember-core": "^10.1.0",
20
20
  "ember-apollo-client": "^3.2.0",
21
21
  "ember-auto-import": "^2.2.3",
22
22
  "ember-cli-babel": "^7.26.6",
23
- "ember-cli-htmlbars": "^6.0.0",
23
+ "ember-cli-htmlbars": "^6.0.1",
24
24
  "ember-cli-showdown": "^6.0.0",
25
25
  "ember-composable-helpers": "^4.5.0",
26
26
  "ember-fetch": "^8.0.4",
27
- "ember-in-viewport": "^3.10.3",
27
+ "ember-in-viewport": "^4.0.0",
28
28
  "ember-intl": "^5.7.0",
29
29
  "ember-math-helpers": "^2.18.0",
30
30
  "ember-pikaday": "^3.0.0",
31
- "ember-power-select": "^4.1.6",
31
+ "ember-power-select": "^5.0.3",
32
32
  "ember-uikit": "^4.0.0",
33
33
  "graphql": "^15.6.1",
34
34
  "jexl": "^2.3.0",
@@ -39,11 +39,11 @@
39
39
  "devDependencies": {
40
40
  "@ember/optional-features": "2.0.0",
41
41
  "@ember/test-helpers": "2.6.0",
42
- "@embroider/test-setup": "0.47.2",
43
- "@projectcaluma/ember-testing": "9.0.0",
44
- "@projectcaluma/ember-workflow": "9.0.3",
42
+ "@embroider/test-setup": "0.48.1",
43
+ "@projectcaluma/ember-testing": "10.0.0",
44
+ "@projectcaluma/ember-workflow": "10.0.2",
45
45
  "broccoli-asset-rev": "3.0.0",
46
- "ember-cli": "3.28.3",
46
+ "ember-cli": "3.28.4",
47
47
  "ember-cli-code-coverage": "1.0.3",
48
48
  "ember-cli-dependency-checker": "3.2.0",
49
49
  "ember-cli-inject-live-reload": "2.1.0",
@@ -56,7 +56,7 @@
56
56
  "ember-maybe-import-regenerator": "1.0.0",
57
57
  "ember-qunit": "5.1.5",
58
58
  "ember-resolver": "8.0.3",
59
- "ember-source": "3.28.6",
59
+ "ember-source": "3.28.8",
60
60
  "ember-source-channel-url": "3.0.0",
61
61
  "ember-try": "2.0.0",
62
62
  "faker": "5.5.3",
@@ -65,10 +65,10 @@
65
65
  "qunit": "2.17.2",
66
66
  "qunit-dom": "2.0.0",
67
67
  "uuid": "8.3.2",
68
- "webpack": "5.64.0"
68
+ "webpack": "5.65.0"
69
69
  },
70
70
  "engines": {
71
- "node": "10.* || >= 12"
71
+ "node": "12.* || 14.* || >= 16"
72
72
  },
73
73
  "ember": {
74
74
  "edition": "octane"
@@ -1,57 +0,0 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-question.graphql'
2
-
3
- fragment SimpleAnswer on Answer {
4
- id
5
- question {
6
- slug
7
- }
8
- ... on StringAnswer {
9
- stringValue: value
10
- }
11
- ... on IntegerAnswer {
12
- integerValue: value
13
- }
14
- ... on FloatAnswer {
15
- floatValue: value
16
- }
17
- ... on ListAnswer {
18
- listValue: value
19
- }
20
- ... on FileAnswer {
21
- fileValue: value {
22
- uploadUrl
23
- downloadUrl
24
- metadata
25
- name
26
- }
27
- }
28
- ... on DateAnswer {
29
- dateValue: value
30
- }
31
- }
32
-
33
- fragment FieldAnswer on Answer {
34
- ...SimpleAnswer
35
- ... on TableAnswer {
36
- tableValue: value {
37
- id
38
- form {
39
- slug
40
- questions {
41
- edges {
42
- node {
43
- ...FieldQuestion
44
- }
45
- }
46
- }
47
- }
48
- answers {
49
- edges {
50
- node {
51
- ...SimpleAnswer
52
- }
53
- }
54
- }
55
- }
56
- }
57
- }
@@ -1,24 +0,0 @@
1
- # import * from '@projectcaluma/ember-form/gql/fragments/field-answer.graphql'
2
-
3
- query ($id: ID!) {
4
- allDocuments(filter: [{ id: $id }]) {
5
- edges {
6
- node {
7
- id
8
- form {
9
- slug
10
- }
11
- workItem {
12
- id
13
- }
14
- answers {
15
- edges {
16
- node {
17
- ...FieldAnswer
18
- }
19
- }
20
- }
21
- }
22
- }
23
- }
24
- }