@projectcaluma/ember-form 10.0.2 → 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.
@@ -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
  /**
@@ -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
 
@@ -4,6 +4,7 @@
4
4
  # When changing this file the other must also receive the same changes.
5
5
 
6
6
  fragment SimpleQuestion on Question {
7
+ id
7
8
  slug
8
9
  label
9
10
  isRequired
@@ -14,6 +15,7 @@ fragment SimpleQuestion on Question {
14
15
  textMinLength: minLength
15
16
  textMaxLength: maxLength
16
17
  textDefaultAnswer: defaultAnswer {
18
+ id
17
19
  value
18
20
  }
19
21
  placeholder
@@ -22,6 +24,7 @@ fragment SimpleQuestion on Question {
22
24
  textareaMinLength: minLength
23
25
  textareaMaxLength: maxLength
24
26
  textareaDefaultAnswer: defaultAnswer {
27
+ id
25
28
  value
26
29
  }
27
30
  placeholder
@@ -30,6 +33,7 @@ fragment SimpleQuestion on Question {
30
33
  integerMinValue: minValue
31
34
  integerMaxValue: maxValue
32
35
  integerDefaultAnswer: defaultAnswer {
36
+ id
33
37
  value
34
38
  }
35
39
  placeholder
@@ -38,6 +42,7 @@ fragment SimpleQuestion on Question {
38
42
  floatMinValue: minValue
39
43
  floatMaxValue: maxValue
40
44
  floatDefaultAnswer: defaultAnswer {
45
+ id
41
46
  value
42
47
  }
43
48
  placeholder
@@ -46,6 +51,7 @@ fragment SimpleQuestion on Question {
46
51
  choiceOptions: options {
47
52
  edges {
48
53
  node {
54
+ id
49
55
  slug
50
56
  label
51
57
  isArchived
@@ -53,6 +59,7 @@ fragment SimpleQuestion on Question {
53
59
  }
54
60
  }
55
61
  choiceDefaultAnswer: defaultAnswer {
62
+ id
56
63
  value
57
64
  }
58
65
  }
@@ -60,6 +67,7 @@ fragment SimpleQuestion on Question {
60
67
  multipleChoiceOptions: options {
61
68
  edges {
62
69
  node {
70
+ id
63
71
  slug
64
72
  label
65
73
  isArchived
@@ -67,11 +75,13 @@ fragment SimpleQuestion on Question {
67
75
  }
68
76
  }
69
77
  multipleChoiceDefaultAnswer: defaultAnswer {
78
+ id
70
79
  value
71
80
  }
72
81
  }
73
82
  ... on DateQuestion {
74
83
  dateDefaultAnswer: defaultAnswer {
84
+ id
75
85
  value
76
86
  }
77
87
  }
@@ -89,8 +99,10 @@ fragment SimpleQuestion on Question {
89
99
  }
90
100
 
91
101
  fragment FieldTableQuestion on Question {
102
+ id
92
103
  ... on TableQuestion {
93
104
  rowForm {
105
+ id
94
106
  slug
95
107
  questions {
96
108
  edges {
@@ -101,6 +113,7 @@ fragment FieldTableQuestion on Question {
101
113
  }
102
114
  }
103
115
  tableDefaultAnswer: defaultAnswer {
116
+ id
104
117
  value {
105
118
  id
106
119
  answers {
@@ -108,6 +121,7 @@ fragment FieldTableQuestion on Question {
108
121
  node {
109
122
  id
110
123
  question {
124
+ id
111
125
  slug
112
126
  }
113
127
  ... on StringAnswer {
@@ -134,10 +148,12 @@ fragment FieldTableQuestion on Question {
134
148
  }
135
149
 
136
150
  fragment FieldQuestion on Question {
151
+ id
137
152
  ...SimpleQuestion
138
153
  ...FieldTableQuestion
139
154
  ... on FormQuestion {
140
155
  subForm {
156
+ id
141
157
  slug
142
158
  name
143
159
  questions {
@@ -145,10 +161,12 @@ fragment FieldQuestion on Question {
145
161
  node {
146
162
  # This part here limits our query to 2 level deep nested forms. This
147
163
  # has to be solved in another way!
164
+ id
148
165
  ...SimpleQuestion
149
166
  ...FieldTableQuestion
150
167
  ... on FormQuestion {
151
168
  subForm {
169
+ id
152
170
  slug
153
171
  name
154
172
  questions {
@@ -171,6 +189,7 @@ fragment FieldQuestion on Question {
171
189
  fragment SimpleAnswer on Answer {
172
190
  id
173
191
  question {
192
+ id
174
193
  slug
175
194
  }
176
195
  ... on StringAnswer {
@@ -187,6 +206,7 @@ fragment SimpleAnswer on Answer {
187
206
  }
188
207
  ... on FileAnswer {
189
208
  fileValue: value {
209
+ id
190
210
  uploadUrl
191
211
  downloadUrl
192
212
  metadata
@@ -199,11 +219,13 @@ fragment SimpleAnswer on Answer {
199
219
  }
200
220
 
201
221
  fragment FieldAnswer on Answer {
222
+ id
202
223
  ...SimpleAnswer
203
224
  ... on TableAnswer {
204
225
  tableValue: value {
205
226
  id
206
227
  form {
228
+ id
207
229
  slug
208
230
  questions {
209
231
  edges {
@@ -1,6 +1,6 @@
1
1
  #import * from '../fragments/field.graphql'
2
2
 
3
- mutation saveDocumentTableAnswer($input: SaveDocumentTableAnswerInput!) {
3
+ mutation SaveDocumentTableAnswer($input: SaveDocumentTableAnswerInput!) {
4
4
  saveDocumentTableAnswer(input: $input) {
5
5
  answer {
6
6
  ...FieldAnswer
@@ -12,6 +12,7 @@ mutation SaveDocument($input: SaveDocumentInput!) {
12
12
  }
13
13
  }
14
14
  form {
15
+ id
15
16
  slug
16
17
  questions {
17
18
  edges {
@@ -1,11 +1,12 @@
1
1
  #import * from '../fragments/field.graphql'
2
2
 
3
- query GetDocumentAnswers($id: ID!) {
3
+ query DocumentAnswers($id: ID!) {
4
4
  allDocuments(filter: [{ id: $id }]) {
5
5
  edges {
6
6
  node {
7
7
  id
8
8
  form {
9
+ id
9
10
  slug
10
11
  }
11
12
  workItem {
@@ -1,9 +1,10 @@
1
1
  #import FieldQuestion, FieldTableQuestion, SimpleQuestion from '../fragments/field.graphql'
2
2
 
3
- query GetDocumentForms($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 GetDynamicOptions($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
@@ -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,
@@ -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": "10.0.2",
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": "^10.0.2",
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.7",
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,9 +39,9 @@
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",
42
+ "@embroider/test-setup": "0.48.1",
43
43
  "@projectcaluma/ember-testing": "10.0.0",
44
- "@projectcaluma/ember-workflow": "10.0.1",
44
+ "@projectcaluma/ember-workflow": "10.0.2",
45
45
  "broccoli-asset-rev": "3.0.0",
46
46
  "ember-cli": "3.28.4",
47
47
  "ember-cli-code-coverage": "1.0.3",
@@ -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,7 +65,7 @@
65
65
  "qunit": "2.17.2",
66
66
  "qunit-dom": "2.0.0",
67
67
  "uuid": "8.3.2",
68
- "webpack": "5.64.1"
68
+ "webpack": "5.65.0"
69
69
  },
70
70
  "engines": {
71
71
  "node": "12.* || 14.* || >= 16"