@projectcaluma/ember-form-builder 9.1.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 (59) hide show
  1. package/addon/components/cfb-form-editor/question/validation.js +1 -1
  2. package/addon/components/cfb-form-editor/question-list/item.hbs +4 -4
  3. package/addon/components/cfb-form-editor/question-list.hbs +2 -2
  4. package/addon/components/cfb-form-editor/question.hbs +34 -24
  5. package/addon/components/cfb-form-list.hbs +2 -2
  6. package/addon/components/cfb-navigation.hbs +1 -1
  7. package/addon/components/cfb-toggle-switch.hbs +1 -1
  8. package/addon/gql/fragments/{field-question.graphql → field.graphql} +83 -0
  9. package/addon/gql/fragments/form-info.graphql +1 -0
  10. package/addon/gql/fragments/question-info.graphql +1 -0
  11. package/addon/gql/mutations/add-form-question.graphql +4 -2
  12. package/addon/gql/mutations/remove-form-question.graphql +4 -2
  13. package/addon/gql/mutations/reorder-form-questions.graphql +4 -2
  14. package/addon/gql/mutations/save-action-button-question.graphql +2 -1
  15. package/addon/gql/mutations/save-calculated-float-question.graphql +2 -1
  16. package/addon/gql/mutations/save-choice-question.graphql +3 -1
  17. package/addon/gql/mutations/save-date-question.graphql +2 -1
  18. package/addon/gql/mutations/save-default-date-answer.graphql +2 -6
  19. package/addon/gql/mutations/save-default-float-answer.graphql +2 -6
  20. package/addon/gql/mutations/save-default-integer-answer.graphql +2 -6
  21. package/addon/gql/mutations/save-default-list-answer.graphql +2 -6
  22. package/addon/gql/mutations/save-default-string-answer.graphql +2 -6
  23. package/addon/gql/mutations/save-default-table-answer.graphql +2 -6
  24. package/addon/gql/mutations/save-dynamic-choice-question.graphql +2 -1
  25. package/addon/gql/mutations/save-dynamic-multiple-choice-question.graphql +2 -1
  26. package/addon/gql/mutations/save-file-question.graphql +2 -1
  27. package/addon/gql/mutations/save-float-question.graphql +2 -1
  28. package/addon/gql/mutations/save-form-question.graphql +3 -1
  29. package/addon/gql/mutations/save-form.graphql +2 -1
  30. package/addon/gql/mutations/save-integer-question.graphql +2 -1
  31. package/addon/gql/mutations/save-multiple-choice-question.graphql +3 -1
  32. package/addon/gql/mutations/save-option.graphql +1 -0
  33. package/addon/gql/mutations/save-static-question.graphql +2 -1
  34. package/addon/gql/mutations/save-table-question.graphql +3 -1
  35. package/addon/gql/mutations/save-text-question.graphql +2 -1
  36. package/addon/gql/mutations/save-textarea-question.graphql +2 -1
  37. package/addon/gql/queries/check-form-slug.graphql +1 -0
  38. package/addon/gql/queries/check-question-slug.graphql +1 -0
  39. package/addon/gql/queries/form-editor-general.graphql +2 -1
  40. package/addon/gql/queries/form-editor-question.graphql +9 -3
  41. package/addon/gql/queries/form-list.graphql +2 -1
  42. package/addon/gql/queries/search-form-question.graphql +5 -1
  43. package/addon/gql/queries/search-question.graphql +4 -1
  44. package/addon/routes/edit/questions/edit.js +1 -1
  45. package/addon/routes/edit.js +1 -1
  46. package/package.json +13 -13
  47. package/translations/de.yaml +1 -0
  48. package/translations/en.yaml +1 -0
  49. package/addon/gql/fragments/field-answer.graphql +0 -57
  50. package/addon/gql/mutations/archive-form.graphql +0 -5
  51. package/addon/gql/mutations/remove-document.graphql +0 -5
  52. package/addon/gql/queries/all-format-validators.graphql +0 -12
  53. package/addon/gql/queries/all-work-items.graphql +0 -9
  54. package/addon/gql/queries/data-source.graphql +0 -10
  55. package/addon/gql/queries/get-document-answers.graphql +0 -21
  56. package/addon/gql/queries/get-document-forms.graphql +0 -20
  57. package/addon/gql/queries/get-document-used-dynamic-options.graphql +0 -12
  58. package/addon/gql/queries/get-dynamic-options.graphql +0 -29
  59. package/addon/gql/queries/get-fileanswer-info.graphql +0 -13
@@ -3,7 +3,7 @@ import Component from "@glimmer/component";
3
3
  import { queryManager } from "ember-apollo-client";
4
4
  import { dropTask } from "ember-concurrency";
5
5
 
6
- import allFormatValidatorsQuery from "@projectcaluma/ember-form-builder/gql/queries/all-format-validators.graphql";
6
+ import allFormatValidatorsQuery from "@projectcaluma/ember-core/gql/queries/all-format-validators.graphql";
7
7
 
8
8
  export default class CfbFormEditorQuestionValidation extends Component {
9
9
  @queryManager apollo;
@@ -58,7 +58,7 @@
58
58
  {{/if}}
59
59
 
60
60
  <span
61
- class="{{if this.showFormLink "uk-width-auto" "uk-width-expand"}}
61
+ class="{{if this.showFormLink 'uk-width-auto' 'uk-width-expand'}}
62
62
  uk-margin-small-right uk-text-small uk-text-muted uk-text-truncate"
63
63
  >
64
64
  {{@question.label}}
@@ -83,13 +83,13 @@
83
83
  uk-tooltip="title: {{if
84
84
  this.hidden
85
85
  (t
86
- (concat "caluma.form-builder.question-list.hidden." this.hiddenType)
86
+ (concat 'caluma.form-builder.question-list.hidden.' this.hiddenType)
87
87
  )
88
88
  }}; pos: left"
89
89
  class="cfb-form-editor__question-list__item__type
90
90
  {{if
91
91
  this.hidden
92
- "cfb-form-editor__question-list__item__type--hidden"
92
+ 'cfb-form-editor__question-list__item__type--hidden'
93
93
  }}"
94
94
  @label={{t
95
95
  (concat "caluma.form-builder.question.types." @question.__typename)
@@ -105,7 +105,7 @@
105
105
  <span
106
106
  uk-tooltip="title: {{t
107
107
  (concat
108
- "caluma.form-builder.question-list.required." this.requiredType
108
+ 'caluma.form-builder.question-list.required.' this.requiredType
109
109
  )
110
110
  }}; pos: top-left"
111
111
  title={{t
@@ -42,8 +42,8 @@
42
42
  <input
43
43
  class="uk-search-input"
44
44
  type="search"
45
- placeholder="{{t "caluma.form-builder.global.search"}}..."
46
- aria-label="{{t "caluma.form-builder.global.search"}}"
45
+ placeholder="{{t 'caluma.form-builder.global.search'}}..."
46
+ aria-label="{{t 'caluma.form-builder.global.search'}}"
47
47
  value={{this.search}}
48
48
  {{on "input" (fn (mut this.search))}}
49
49
  />
@@ -136,25 +136,33 @@
136
136
  </div>
137
137
  {{/if}}
138
138
 
139
- <div class="uk-margin">
139
+ {{#if (has-question-type f.model "action-button")}}
140
140
  <f.input
141
- @label={{t "caluma.form-builder.question.infoText"}}
141
+ @label={{t "caluma.form-builder.question.confirmationText"}}
142
142
  @name="infoText"
143
- @renderComponent={{component
144
- "cfb-code-editor"
145
- language="markdown"
146
- className="uk-margin-remove-bottom"
147
- }}
143
+ @type="textarea"
148
144
  />
149
- <small class="uk-text-muted">
150
- {{t "caluma.form-builder.question.supportsMarkdownPrefix"}}
151
- <a
152
- target="_blank"
153
- rel="noopener noreferrer"
154
- href="https://www.markdownguide.org/basic-syntax"
155
- >{{t "caluma.form-builder.question.markdown"}}</a>
156
- </small>
157
- </div>
145
+ {{else}}
146
+ <div class="uk-margin">
147
+ <f.input
148
+ @label={{t "caluma.form-builder.question.infoText"}}
149
+ @name="infoText"
150
+ @renderComponent={{component
151
+ "cfb-code-editor"
152
+ language="markdown"
153
+ className="uk-margin-remove-bottom"
154
+ }}
155
+ />
156
+ <small class="uk-text-muted">
157
+ {{t "caluma.form-builder.question.supportsMarkdownPrefix"}}
158
+ <a
159
+ target="_blank"
160
+ rel="noopener noreferrer"
161
+ href="https://www.markdownguide.org/basic-syntax"
162
+ >{{t "caluma.form-builder.question.markdown"}}</a>
163
+ </small>
164
+ </div>
165
+ {{/if}}
158
166
 
159
167
  {{#if (has-question-type f.model "text" "textarea" "integer" "float")}}
160
168
  <f.input
@@ -295,14 +303,16 @@
295
303
  />
296
304
  {{/if}}
297
305
 
298
- <f.input
299
- @name="meta.hideLabel"
300
- @required={{true}}
301
- @label={{t "caluma.form-builder.question.hideLabel"}}
302
- @renderComponent={{component "cfb-toggle-switch" size="small"}}
303
- @on-update={{changeset-set f.model "meta.hideLabel"}}
304
- @value={{changeset-get f.model "meta.hideLabel"}}
305
- />
306
+ {{#if (not (has-question-type f.model "action-button"))}}
307
+ <f.input
308
+ @name="meta.hideLabel"
309
+ @required={{true}}
310
+ @label={{t "caluma.form-builder.question.hideLabel"}}
311
+ @renderComponent={{component "cfb-toggle-switch" size="small"}}
312
+ @on-update={{changeset-set f.model "meta.hideLabel"}}
313
+ @value={{changeset-get f.model "meta.hideLabel"}}
314
+ />
315
+ {{/if}}
306
316
 
307
317
  {{#if (has-question-type f.model "table")}}
308
318
  <div class="uk-margin">
@@ -31,8 +31,8 @@
31
31
  data-test-form-search-input
32
32
  class="uk-search-input"
33
33
  type="search"
34
- placeholder="{{t "caluma.form-builder.global.search"}}..."
35
- aria-label="{{t "caluma.form-builder.global.search"}}"
34
+ placeholder="{{t 'caluma.form-builder.global.search'}}..."
35
+ aria-label="{{t 'caluma.form-builder.global.search'}}"
36
36
  value={{this.search}}
37
37
  {{on "input" (fn this.setFilter "search")}}
38
38
  />
@@ -4,7 +4,7 @@
4
4
  <LinkTo
5
5
  @route={{crumb.routeName}}
6
6
  class="uk-text-large uk-text-truncate cfb-navigation__item__link
7
- {{if crumb.disabled "uk-disabled"}}"
7
+ {{if crumb.disabled 'uk-disabled'}}"
8
8
  >
9
9
  {{crumb.title}}
10
10
  </LinkTo>
@@ -1,4 +1,4 @@
1
- <div class="uk-flex uk-flex-column {{unless @noMargin "uk-margin"}}">
1
+ <div class="uk-flex uk-flex-column {{unless @noMargin 'uk-margin'}}">
2
2
  <@labelComponent />
3
3
 
4
4
  <div class="uk-form-controls" ...attributes>
@@ -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,4 +1,5 @@
1
1
  fragment FormInfo on Form {
2
+ id
2
3
  name
3
4
  slug
4
5
  description
@@ -1,4 +1,5 @@
1
1
  fragment QuestionInfo on Question {
2
+ id
2
3
  slug
3
4
  label
4
5
  isRequired
@@ -1,13 +1,15 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/form-info.graphql'
2
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import FormInfo from '../fragments/form-info.graphql'
2
+ #import QuestionInfo from '../fragments/question-info.graphql'
3
3
 
4
4
  mutation AddFormQuestion($input: AddFormQuestionInput!, $search: String) {
5
5
  addFormQuestion(input: $input) {
6
6
  form {
7
+ id
7
8
  ...FormInfo
8
9
  questions(search: $search) {
9
10
  edges {
10
11
  node {
12
+ id
11
13
  ...QuestionInfo
12
14
  }
13
15
  }
@@ -1,13 +1,15 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/form-info.graphql'
2
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import FormInfo from '../fragments/form-info.graphql'
2
+ #import QuestionInfo from '../fragments/question-info.graphql'
3
3
 
4
4
  mutation RemoveFormQuestion($input: RemoveFormQuestionInput!, $search: String) {
5
5
  removeFormQuestion(input: $input) {
6
6
  form {
7
+ id
7
8
  ...FormInfo
8
9
  questions(search: $search) {
9
10
  edges {
10
11
  node {
12
+ id
11
13
  ...QuestionInfo
12
14
  }
13
15
  }
@@ -1,5 +1,5 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/form-info.graphql'
2
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import FormInfo from '../fragments/form-info.graphql'
2
+ #import QuestionInfo from '../fragments/question-info.graphql'
3
3
 
4
4
  mutation ReorderFormQuestions(
5
5
  $input: ReorderFormQuestionsInput!
@@ -7,10 +7,12 @@ mutation ReorderFormQuestions(
7
7
  ) {
8
8
  reorderFormQuestions(input: $input) {
9
9
  form {
10
+ id
10
11
  ...FormInfo
11
12
  questions(search: $search) {
12
13
  edges {
13
14
  node {
15
+ id
14
16
  ...QuestionInfo
15
17
  }
16
18
  }
@@ -1,8 +1,9 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveActionButtonQuestion($input: SaveActionButtonQuestionInput!) {
4
4
  saveActionButtonQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on ActionButtonQuestion {
8
9
  action
@@ -1,10 +1,11 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveCalculatedFloatQuestion(
4
4
  $input: SaveCalculatedFloatQuestionInput!
5
5
  ) {
6
6
  saveCalculatedFloatQuestion(input: $input) {
7
7
  question {
8
+ id
8
9
  ...QuestionInfo
9
10
  ... on CalculatedFloatQuestion {
10
11
  calcExpression
@@ -1,13 +1,15 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveChoiceQuestion($input: SaveChoiceQuestionInput!) {
4
4
  saveChoiceQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on ChoiceQuestion {
8
9
  options {
9
10
  edges {
10
11
  node {
12
+ id
11
13
  label
12
14
  slug
13
15
  }
@@ -1,8 +1,9 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveDateQuestion($input: SaveDateQuestionInput!) {
4
4
  saveDateQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  }
8
9
  clientMutationId
@@ -1,9 +1,5 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/field-answer.graphql'
2
-
3
- mutation ($input: SaveDefaultDateAnswerInput!) {
1
+ mutation SaveDefaultDateAnswer($input: SaveDefaultDateAnswerInput!) {
4
2
  saveDefaultDateAnswer(input: $input) {
5
- answer {
6
- ...FieldAnswer
7
- }
3
+ clientMutationId
8
4
  }
9
5
  }
@@ -1,9 +1,5 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/field-answer.graphql'
2
-
3
- mutation ($input: SaveDefaultFloatAnswerInput!) {
1
+ mutation SaveDefaultFloatAnswer($input: SaveDefaultFloatAnswerInput!) {
4
2
  saveDefaultFloatAnswer(input: $input) {
5
- answer {
6
- ...FieldAnswer
7
- }
3
+ clientMutationId
8
4
  }
9
5
  }
@@ -1,9 +1,5 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/field-answer.graphql'
2
-
3
- mutation ($input: SaveDefaultIntegerAnswerInput!) {
1
+ mutation SaveDefaultIntegerAnswer($input: SaveDefaultIntegerAnswerInput!) {
4
2
  saveDefaultIntegerAnswer(input: $input) {
5
- answer {
6
- ...FieldAnswer
7
- }
3
+ clientMutationId
8
4
  }
9
5
  }
@@ -1,9 +1,5 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/field-answer.graphql'
2
-
3
- mutation ($input: SaveDefaultListAnswerInput!) {
1
+ mutation SaveDefaultListAnswer($input: SaveDefaultListAnswerInput!) {
4
2
  saveDefaultListAnswer(input: $input) {
5
- answer {
6
- ...FieldAnswer
7
- }
3
+ clientMutationId
8
4
  }
9
5
  }
@@ -1,9 +1,5 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/field-answer.graphql'
2
-
3
- mutation ($input: SaveDefaultStringAnswerInput!) {
1
+ mutation SaveDefaultStringAnswer($input: SaveDefaultStringAnswerInput!) {
4
2
  saveDefaultStringAnswer(input: $input) {
5
- answer {
6
- ...FieldAnswer
7
- }
3
+ clientMutationId
8
4
  }
9
5
  }
@@ -1,9 +1,5 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/field-answer.graphql'
2
-
3
- mutation ($input: SaveDefaultTableAnswerInput!) {
1
+ mutation SaveDefaultTableAnswer($input: SaveDefaultTableAnswerInput!) {
4
2
  saveDefaultTableAnswer(input: $input) {
5
- answer {
6
- ...FieldAnswer
7
- }
3
+ clientMutationId
8
4
  }
9
5
  }
@@ -1,8 +1,9 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveDynamicChoiceQuestion($input: SaveDynamicChoiceQuestionInput!) {
4
4
  saveDynamicChoiceQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on DynamicChoiceQuestion {
8
9
  dataSource
@@ -1,10 +1,11 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveDynamicMultipleChoiceQuestion(
4
4
  $input: SaveDynamicMultipleChoiceQuestionInput!
5
5
  ) {
6
6
  saveDynamicMultipleChoiceQuestion(input: $input) {
7
7
  question {
8
+ id
8
9
  ...QuestionInfo
9
10
  ... on DynamicMultipleChoiceQuestion {
10
11
  dataSource
@@ -1,8 +1,9 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveFileQuestion($input: SaveFileQuestionInput!) {
4
4
  saveFileQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  }
8
9
  clientMutationId
@@ -1,8 +1,9 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveFloatQuestion($input: SaveFloatQuestionInput!) {
4
4
  saveFloatQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on FloatQuestion {
8
9
  floatMinValue: minValue
@@ -1,11 +1,13 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveFormQuestion($input: SaveFormQuestionInput!) {
4
4
  saveFormQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on FormQuestion {
8
9
  subForm {
10
+ id
9
11
  slug
10
12
  }
11
13
  }
@@ -1,8 +1,9 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/form-info.graphql'
1
+ #import FormInfo from '../fragments/form-info.graphql'
2
2
 
3
3
  mutation SaveForm($input: SaveFormInput!) {
4
4
  saveForm(input: $input) {
5
5
  form {
6
+ id
6
7
  ...FormInfo
7
8
  }
8
9
  clientMutationId
@@ -1,8 +1,9 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveIntegerQuestion($input: SaveIntegerQuestionInput!) {
4
4
  saveIntegerQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on IntegerQuestion {
8
9
  integerMinValue: minValue
@@ -1,13 +1,15 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveMultipleChoiceQuestion($input: SaveMultipleChoiceQuestionInput!) {
4
4
  saveMultipleChoiceQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on MultipleChoiceQuestion {
8
9
  options {
9
10
  edges {
10
11
  node {
12
+ id
11
13
  label
12
14
  slug
13
15
  }
@@ -1,6 +1,7 @@
1
1
  mutation SaveOption($input: SaveOptionInput!) {
2
2
  saveOption(input: $input) {
3
3
  option {
4
+ id
4
5
  label
5
6
  slug
6
7
  }
@@ -1,8 +1,9 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveStaticQuestion($input: SaveStaticQuestionInput!) {
4
4
  saveStaticQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on StaticQuestion {
8
9
  staticContent
@@ -1,11 +1,13 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveTableQuestion($input: SaveTableQuestionInput!) {
4
4
  saveTableQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on TableQuestion {
8
9
  rowForm {
10
+ id
9
11
  slug
10
12
  }
11
13
  }
@@ -1,8 +1,9 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveTextQuestion($input: SaveTextQuestionInput!) {
4
4
  saveTextQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on TextQuestion {
8
9
  minLength
@@ -1,8 +1,9 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  mutation SaveTextareaQuestion($input: SaveTextareaQuestionInput!) {
4
4
  saveTextareaQuestion(input: $input) {
5
5
  question {
6
+ id
6
7
  ...QuestionInfo
7
8
  ... on TextareaQuestion {
8
9
  minLength
@@ -2,6 +2,7 @@ query CheckFormSlug($slug: String!) {
2
2
  allForms(filter: [{ slug: $slug }]) {
3
3
  edges {
4
4
  node {
5
+ id
5
6
  slug
6
7
  }
7
8
  }
@@ -2,6 +2,7 @@ query CheckQuestionSlug($slug: String!) {
2
2
  allQuestions(filter: [{ slug: $slug }]) {
3
3
  edges {
4
4
  node {
5
+ id
5
6
  slug
6
7
  }
7
8
  }
@@ -1,9 +1,10 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/form-info.graphql'
1
+ #import FormInfo from '../fragments/form-info.graphql'
2
2
 
3
3
  query FormEditorGeneral($slug: String!) {
4
4
  allForms(filter: [{ slug: $slug }]) {
5
5
  edges {
6
6
  node {
7
+ id
7
8
  ...FormInfo
8
9
  }
9
10
  }
@@ -1,11 +1,11 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
2
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/field-question.graphql'
3
- # import SimpleAnswer from '@projectcaluma/ember-form-builder/gql/fragments/field-answer.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
+ #import FieldQuestion, FieldTableQuestion, SimpleAnswer, SimpleQuestion from '../fragments/field.graphql'
4
3
 
5
4
  query FormEditorQuestion($slug: String!) {
6
5
  allQuestions(filter: [{ slug: $slug }]) {
7
6
  edges {
8
7
  node {
8
+ id
9
9
  ...QuestionInfo
10
10
  ... on IntegerQuestion {
11
11
  integerMaxValue: maxValue
@@ -53,6 +53,7 @@ query FormEditorQuestion($slug: String!) {
53
53
  options {
54
54
  edges {
55
55
  node {
56
+ id
56
57
  label
57
58
  slug
58
59
  isArchived
@@ -68,6 +69,7 @@ query FormEditorQuestion($slug: String!) {
68
69
  options {
69
70
  edges {
70
71
  node {
72
+ id
71
73
  label
72
74
  slug
73
75
  isArchived
@@ -87,10 +89,12 @@ query FormEditorQuestion($slug: String!) {
87
89
  }
88
90
  ... on TableQuestion {
89
91
  rowForm {
92
+ id
90
93
  slug
91
94
  questions {
92
95
  edges {
93
96
  node {
97
+ id
94
98
  slug
95
99
  label
96
100
  }
@@ -102,6 +106,7 @@ query FormEditorQuestion($slug: String!) {
102
106
  tableValue: value {
103
107
  id
104
108
  form {
109
+ id
105
110
  slug
106
111
  questions {
107
112
  edges {
@@ -123,6 +128,7 @@ query FormEditorQuestion($slug: String!) {
123
128
  }
124
129
  ... on FormQuestion {
125
130
  subForm {
131
+ id
126
132
  slug
127
133
  }
128
134
  }
@@ -1,9 +1,10 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/form-info.graphql'
1
+ #import FormInfo from '../fragments/form-info.graphql'
2
2
 
3
3
  query FormList($filter: [FormFilterSetType], $order: [FormOrderSetType]) {
4
4
  allForms(filter: $filter, order: $order) {
5
5
  edges {
6
6
  node {
7
+ id
7
8
  ...FormInfo
8
9
  }
9
10
  }
@@ -1,22 +1,26 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  query SearchFormQuestion($slug: String!, $search: String, $archived: Boolean) {
4
4
  allForms(filter: [{ slug: $slug }]) {
5
5
  edges {
6
6
  node {
7
+ id
7
8
  slug
8
9
  questions(search: $search, isArchived: $archived) {
9
10
  edges {
10
11
  node {
12
+ id
11
13
  ...QuestionInfo
12
14
  ... on FormQuestion {
13
15
  subForm {
16
+ id
14
17
  slug
15
18
  name
16
19
  }
17
20
  }
18
21
  ... on TableQuestion {
19
22
  rowForm {
23
+ id
20
24
  slug
21
25
  name
22
26
  }
@@ -1,4 +1,4 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/question-info.graphql'
1
+ #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
3
  query SearchQuestion(
4
4
  $search: String
@@ -22,15 +22,18 @@ query SearchQuestion(
22
22
  totalCount
23
23
  edges {
24
24
  node {
25
+ id
25
26
  ...QuestionInfo
26
27
  ... on FormQuestion {
27
28
  subForm {
29
+ id
28
30
  slug
29
31
  name
30
32
  }
31
33
  }
32
34
  ... on TableQuestion {
33
35
  rowForm {
36
+ id
34
37
  slug
35
38
  name
36
39
  }
@@ -2,7 +2,7 @@ import Route from "@ember/routing/route";
2
2
  import { inject as service } from "@ember/service";
3
3
  import { queryManager } from "ember-apollo-client";
4
4
  import { lastValue, dropTask } from "ember-concurrency-decorators";
5
- import gql from "graphql-tag";
5
+ import { gql } from "graphql-tag";
6
6
 
7
7
  import { navigationTitle } from "@projectcaluma/ember-form-builder/decorators";
8
8
 
@@ -2,7 +2,7 @@ import Route from "@ember/routing/route";
2
2
  import { inject as service } from "@ember/service";
3
3
  import { queryManager } from "ember-apollo-client";
4
4
  import { lastValue, dropTask } from "ember-concurrency-decorators";
5
- import gql from "graphql-tag";
5
+ import { gql } from "graphql-tag";
6
6
 
7
7
  import { navigationTitle } from "@projectcaluma/ember-form-builder/decorators";
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-form-builder",
3
- "version": "9.1.0",
3
+ "version": "10.0.3",
4
4
  "description": "Ember engine for building Caluma forms.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -15,18 +15,18 @@
15
15
  "test:ember-compatibility": "ember try:each"
16
16
  },
17
17
  "dependencies": {
18
- "@ember/render-modifiers": "^2.0.0",
18
+ "@ember/render-modifiers": "^2.0.2",
19
19
  "@glimmer/component": "^1.0.4",
20
20
  "@glimmer/tracking": "^1.0.4",
21
- "@projectcaluma/ember-core": "9.2.0",
22
- "@projectcaluma/ember-form": "9.3.0",
21
+ "@projectcaluma/ember-core": "^10.1.0",
22
+ "@projectcaluma/ember-form": "^10.0.3",
23
23
  "codejar": "^3.5.0",
24
24
  "ember-apollo-client": "^3.2.0",
25
25
  "ember-auto-import": "^2.2.3",
26
26
  "ember-changeset": "^3.15.0",
27
27
  "ember-changeset-validations": "^3.16.0",
28
28
  "ember-cli-babel": "^7.26.6",
29
- "ember-cli-htmlbars": "^6.0.0",
29
+ "ember-cli-htmlbars": "^6.0.1",
30
30
  "ember-composable-helpers": "^4.5.0",
31
31
  "ember-concurrency": "^2.2.0",
32
32
  "ember-concurrency-decorators": "^2.0.3",
@@ -34,7 +34,7 @@
34
34
  "ember-fetch": "^8.0.4",
35
35
  "ember-math-helpers": "^2.18.0",
36
36
  "ember-pikaday": "^3.0.0",
37
- "ember-power-select": "^4.1.6",
37
+ "ember-power-select": "^5.0.3",
38
38
  "ember-test-selectors": "^6.0.0",
39
39
  "ember-uikit": "^4.0.0",
40
40
  "ember-validated-form": "^5.0.0",
@@ -47,17 +47,17 @@
47
47
  "devDependencies": {
48
48
  "@ember/optional-features": "2.0.0",
49
49
  "@ember/test-helpers": "2.6.0",
50
- "@embroider/test-setup": "0.47.2",
51
- "@projectcaluma/ember-testing": "9.0.0",
50
+ "@embroider/test-setup": "0.48.1",
51
+ "@projectcaluma/ember-testing": "10.0.0",
52
52
  "broccoli-asset-rev": "3.0.0",
53
- "ember-cli": "3.28.3",
53
+ "ember-cli": "3.28.4",
54
54
  "ember-cli-code-coverage": "1.0.3",
55
55
  "ember-cli-dependency-checker": "3.2.0",
56
56
  "ember-cli-inject-live-reload": "2.1.0",
57
57
  "ember-cli-mirage": "2.2.0",
58
58
  "ember-cli-sri": "2.1.1",
59
59
  "ember-cli-terser": "4.0.2",
60
- "ember-data": "3.28.3",
60
+ "ember-data": "3.28.4",
61
61
  "ember-disable-prototype-extensions": "1.1.3",
62
62
  "ember-engines": "0.8.20",
63
63
  "ember-export-application-global": "2.0.1",
@@ -65,7 +65,7 @@
65
65
  "ember-maybe-import-regenerator": "1.0.0",
66
66
  "ember-qunit": "5.1.5",
67
67
  "ember-resolver": "8.0.3",
68
- "ember-source": "3.28.6",
68
+ "ember-source": "3.28.8",
69
69
  "ember-source-channel-url": "3.0.0",
70
70
  "ember-try": "2.0.0",
71
71
  "faker": "5.5.3",
@@ -73,10 +73,10 @@
73
73
  "npm-run-all": "4.1.5",
74
74
  "qunit": "2.17.2",
75
75
  "qunit-dom": "2.0.0",
76
- "webpack": "5.64.0"
76
+ "webpack": "5.65.0"
77
77
  },
78
78
  "engines": {
79
- "node": "10.* || >= 12"
79
+ "node": "12.* || 14.* || >= 16"
80
80
  },
81
81
  "ember": {
82
82
  "edition": "octane"
@@ -52,6 +52,7 @@ caluma:
52
52
  isRequired: "Pflichtfeld"
53
53
  staticContent: "Statischer Inhalt"
54
54
  infoText: "Infotext"
55
+ confirmationText: "Bestätigungstext"
55
56
  placeholder: "Platzhalter"
56
57
  isHidden: "Versteckt (JEXL)"
57
58
  widgetOverride: "Anzeigetyp"
@@ -52,6 +52,7 @@ caluma:
52
52
  isRequired: "Required"
53
53
  staticContent: "Static content"
54
54
  infoText: "Information text"
55
+ confirmationText: "Confirmation text"
55
56
  placeholder: "Placeholder"
56
57
  isHidden: "Hidden (JEXL)"
57
58
  widgetOverride: "Widget type"
@@ -1,57 +0,0 @@
1
- # import * from '@projectcaluma/ember-form-builder/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,5 +0,0 @@
1
- mutation ArchiveForm($input: ArchiveFormInput!) {
2
- archiveForm(input: $input) {
3
- clientMutationId
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- mutation RemoveDocument($input: RemoveDocumentInput!) {
2
- removeDocument(input: $input) {
3
- clientMutationId
4
- }
5
- }
@@ -1,12 +0,0 @@
1
- query AllFormatValidators {
2
- allFormatValidators {
3
- edges {
4
- node {
5
- slug
6
- name
7
- regex
8
- errorMsg
9
- }
10
- }
11
- }
12
- }
@@ -1,9 +0,0 @@
1
- query AllWorkItems($filter: [WorkItemFilterSetType]!) {
2
- allWorkItems(filter: $filter) {
3
- edges {
4
- node {
5
- id
6
- }
7
- }
8
- }
9
- }
@@ -1,10 +0,0 @@
1
- query DataSource($name: String!) {
2
- dataSource(filter: [{ name: $name }]) {
3
- edges {
4
- node {
5
- label
6
- slug
7
- }
8
- }
9
- }
10
- }
@@ -1,21 +0,0 @@
1
- # import * from '@projectcaluma/ember-form-builder/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
- answers {
12
- edges {
13
- node {
14
- ...FieldAnswer
15
- }
16
- }
17
- }
18
- }
19
- }
20
- }
21
- }
@@ -1,20 +0,0 @@
1
- # import * from '@projectcaluma/ember-form-builder/gql/fragments/field-question.graphql'
2
-
3
- query ($slug: String!) {
4
- allForms(filter: [{ slug: $slug }]) {
5
- edges {
6
- node {
7
- slug
8
- name
9
- meta
10
- questions {
11
- edges {
12
- node {
13
- ...FieldQuestion
14
- }
15
- }
16
- }
17
- }
18
- }
19
- }
20
- }
@@ -1,12 +0,0 @@
1
- query GetDocumentUsedDynamicOptions($document: ID!, $question: ID!) {
2
- allUsedDynamicOptions(
3
- filter: [{ document: $document }, { question: $question }]
4
- ) {
5
- edges {
6
- node {
7
- slug
8
- label
9
- }
10
- }
11
- }
12
- }
@@ -1,29 +0,0 @@
1
- query ($question: String!) {
2
- allQuestions(filter: [{ slug: $question }], first: 1) {
3
- edges {
4
- node {
5
- slug
6
- ... on DynamicChoiceQuestion {
7
- dynamicChoiceOptions: options {
8
- edges {
9
- node {
10
- slug
11
- label
12
- }
13
- }
14
- }
15
- }
16
- ... on DynamicMultipleChoiceQuestion {
17
- dynamicMultipleChoiceOptions: options {
18
- edges {
19
- node {
20
- slug
21
- label
22
- }
23
- }
24
- }
25
- }
26
- }
27
- }
28
- }
29
- }
@@ -1,13 +0,0 @@
1
- query getFileAnswerInfo($id: ID!) {
2
- node(id: $id) {
3
- id
4
- ... on FileAnswer {
5
- fileValue: value {
6
- uploadUrl
7
- downloadUrl
8
- metadata
9
- name
10
- }
11
- }
12
- }
13
- }