@projectcaluma/ember-form-builder 11.0.0-beta.15 → 11.0.0-beta.24

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # [@projectcaluma/ember-form-builder-v11.0.0-beta.16](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-form-builder-v11.0.0-beta.15...@projectcaluma/ember-form-builder-v11.0.0-beta.16) (2022-08-05)
2
+
3
+
4
+ * feat!: add multi file upload (#2040) ([c4fd004](https://github.com/projectcaluma/ember-caluma/commit/c4fd0049654b2d2e5ea62e5909a45d89cb888b40)), closes [#2040](https://github.com/projectcaluma/ember-caluma/issues/2040)
5
+
6
+
7
+ ### BREAKING CHANGES
8
+
9
+ * This requires the caluma backend version v8.0.0-beta.12
10
+ or later.
11
+
1
12
  # [@projectcaluma/ember-form-builder-v11.0.0-beta.15](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-form-builder-v11.0.0-beta.14...@projectcaluma/ember-form-builder-v11.0.0-beta.15) (2022-08-02)
2
13
 
3
14
 
@@ -35,7 +35,7 @@ export default class ComponentsCfbFormEditorQuestionList extends Component {
35
35
  get questions() {
36
36
  return this.mode === "add"
37
37
  ? this.questionTaskValue
38
- : this.questionTaskValue.firstObject?.node.questions.edges;
38
+ : this.questionTaskValue[0]?.node.questions.edges;
39
39
  }
40
40
 
41
41
  // Use built in input component when it works instead of this getter and setter
@@ -26,7 +26,7 @@ import saveDefaultStringAnswerMutation from "@projectcaluma/ember-form-builder/g
26
26
  import saveDefaultTableAnswerMutation from "@projectcaluma/ember-form-builder/gql/mutations/save-default-table-answer.graphql";
27
27
  import saveDynamicChoiceQuestionMutation from "@projectcaluma/ember-form-builder/gql/mutations/save-dynamic-choice-question.graphql";
28
28
  import saveDynamicMultipleChoiceQuestionMutation from "@projectcaluma/ember-form-builder/gql/mutations/save-dynamic-multiple-choice-question.graphql";
29
- import saveFileQuestionMutation from "@projectcaluma/ember-form-builder/gql/mutations/save-file-question.graphql";
29
+ import saveFilesQuestionMutation from "@projectcaluma/ember-form-builder/gql/mutations/save-files-question.graphql";
30
30
  import saveFloatQuestionMutation from "@projectcaluma/ember-form-builder/gql/mutations/save-float-question.graphql";
31
31
  import saveFormQuestionMutation from "@projectcaluma/ember-form-builder/gql/mutations/save-form-question.graphql";
32
32
  import saveIntegerQuestionMutation from "@projectcaluma/ember-form-builder/gql/mutations/save-integer-question.graphql";
@@ -53,7 +53,7 @@ export const TYPES = {
53
53
  DynamicChoiceQuestion: saveDynamicChoiceQuestionMutation,
54
54
  TableQuestion: saveTableQuestionMutation,
55
55
  FormQuestion: saveFormQuestionMutation,
56
- FileQuestion: saveFileQuestionMutation,
56
+ FilesQuestion: saveFilesQuestionMutation,
57
57
  StaticQuestion: saveStaticQuestionMutation,
58
58
  DateQuestion: saveDateQuestionMutation,
59
59
  CalculatedFloatQuestion: saveCalculatedFloatQuestionMutation,
@@ -142,7 +142,9 @@ export default class CfbFormEditorQuestion extends Component {
142
142
  if (!forms.map) {
143
143
  return [];
144
144
  }
145
- return forms.mapBy("node").filter((form) => form.slug !== this.args.form);
145
+ return forms
146
+ .filter((edge) => edge.node.slug !== this.args.form)
147
+ .map((edge) => edge.node);
146
148
  }
147
149
 
148
150
  @restartableTask
@@ -189,7 +191,7 @@ export default class CfbFormEditorQuestion extends Component {
189
191
  }
190
192
 
191
193
  get model() {
192
- return this.data.lastSuccessful?.value?.firstObject?.node;
194
+ return this.data.lastSuccessful?.value?.[0]?.node;
193
195
  }
194
196
 
195
197
  get changeset() {
@@ -335,7 +337,7 @@ export default class CfbFormEditorQuestion extends Component {
335
337
  };
336
338
  }
337
339
 
338
- _getFileQuestionInput(changeset) {
340
+ _getFilesQuestionInput(changeset) {
339
341
  return {
340
342
  hintText: changeset.get("hintText"),
341
343
  };
@@ -99,7 +99,7 @@ fragment SimpleQuestion on Question {
99
99
  calcExpression
100
100
  hintText
101
101
  }
102
- ... on FileQuestion {
102
+ ... on FilesQuestion {
103
103
  hintText
104
104
  }
105
105
  ... on ActionButtonQuestion {
@@ -216,8 +216,8 @@ fragment SimpleAnswer on Answer {
216
216
  ... on ListAnswer {
217
217
  listValue: value
218
218
  }
219
- ... on FileAnswer {
220
- fileValue: value {
219
+ ... on FilesAnswer {
220
+ filesValue: value {
221
221
  id
222
222
  uploadUrl
223
223
  downloadUrl
@@ -1,11 +1,11 @@
1
1
  #import QuestionInfo from '../fragments/question-info.graphql'
2
2
 
3
- mutation SaveFileQuestion($input: SaveFileQuestionInput!) {
4
- saveFileQuestion(input: $input) {
3
+ mutation SaveFilesQuestion($input: SaveFilesQuestionInput!) {
4
+ saveFilesQuestion(input: $input) {
5
5
  question {
6
6
  id
7
7
  ...QuestionInfo
8
- ... on FileQuestion {
8
+ ... on FilesQuestion {
9
9
  hintText
10
10
  }
11
11
  }
@@ -163,7 +163,7 @@ query FormEditorQuestion($slug: String!) {
163
163
  calcExpression
164
164
  hintText
165
165
  }
166
- ... on FileQuestion {
166
+ ... on FilesQuestion {
167
167
  hintText
168
168
  }
169
169
  ... on ActionButtonQuestion {
@@ -19,7 +19,7 @@ export default {
19
19
  hintText: or(
20
20
  validateType("FormQuestion", true),
21
21
  validateType("StaticQuestion", true),
22
- validateType("FileQuestion", true),
22
+ validateType("FilesQuestion", true),
23
23
  validateLength({ max: 1024, allowBlank: true })
24
24
  ),
25
25
  integerMinValue: or(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-form-builder",
3
- "version": "11.0.0-beta.15",
3
+ "version": "11.0.0-beta.24",
4
4
  "description": "Ember engine for building Caluma forms.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -23,8 +23,8 @@
23
23
  "@embroider/macros": "^1.8.3",
24
24
  "@glimmer/component": "^1.1.2",
25
25
  "@glimmer/tracking": "^1.1.2",
26
- "@projectcaluma/ember-core": "^11.0.0-beta.8",
27
- "@projectcaluma/ember-form": "^11.0.0-beta.21",
26
+ "@projectcaluma/ember-core": "^11.0.0-beta.24",
27
+ "@projectcaluma/ember-form": "^11.0.0-beta.24",
28
28
  "codejar": "^3.6.0",
29
29
  "ember-apollo-client": "~4.0.2",
30
30
  "ember-auto-import": "^2.4.2",
@@ -33,14 +33,14 @@
33
33
  "ember-cli-babel": "^7.26.11",
34
34
  "ember-cli-htmlbars": "^6.1.0",
35
35
  "ember-composable-helpers": "^5.0.0",
36
- "ember-concurrency": "^2.2.1",
36
+ "ember-concurrency": "^2.3.2",
37
37
  "ember-engines-router-service": "^0.3.0",
38
- "ember-fetch": "^8.1.1",
38
+ "ember-fetch": "^8.1.2",
39
39
  "ember-intl": "^5.7.2",
40
40
  "ember-math-helpers": "^2.18.2",
41
41
  "ember-pikaday": "^4.0.0",
42
- "ember-power-select": "^5.0.4",
43
- "ember-resources": "^5.0.2",
42
+ "ember-power-select": "^6.0.1",
43
+ "ember-resources": "^5.2.1",
44
44
  "ember-test-selectors": "^6.0.0",
45
45
  "ember-uikit": "^5.1.3",
46
46
  "ember-validated-form": "^5.3.0",
@@ -60,8 +60,8 @@
60
60
  "@ember/optional-features": "2.0.0",
61
61
  "@ember/test-helpers": "2.8.1",
62
62
  "@embroider/test-setup": "1.8.3",
63
- "@faker-js/faker": "7.3.0",
64
- "@projectcaluma/ember-testing": "11.0.0-beta.9",
63
+ "@faker-js/faker": "7.4.0",
64
+ "@projectcaluma/ember-testing": "11.0.0-beta.24",
65
65
  "broccoli-asset-rev": "3.0.0",
66
66
  "ember-autoresize-modifier": "^0.5.0",
67
67
  "ember-cli": "3.28.5",
@@ -73,7 +73,7 @@
73
73
  "ember-cli-terser": "4.0.2",
74
74
  "ember-data": "3.28.10",
75
75
  "ember-disable-prototype-extensions": "1.1.3",
76
- "ember-engines": "0.8.22",
76
+ "ember-engines": "0.8.23",
77
77
  "ember-export-application-global": "2.0.1",
78
78
  "ember-load-initializers": "2.1.2",
79
79
  "ember-maybe-import-regenerator": "1.0.0",
@@ -87,7 +87,7 @@
87
87
  "npm-run-all": "4.1.5",
88
88
  "qunit": "2.19.1",
89
89
  "qunit-dom": "2.0.0",
90
- "webpack": "5.73.0"
90
+ "webpack": "5.74.0"
91
91
  },
92
92
  "engines": {
93
93
  "node": "12.* || 14.* || >= 16"
@@ -103,7 +103,7 @@ caluma:
103
103
  TextareaQuestion: "Text (mehrzeilig)"
104
104
  TableQuestion: "Tabelle"
105
105
  FormQuestion: "Formular"
106
- FileQuestion: "Datei"
106
+ FilesQuestion: "Dateien"
107
107
  StaticQuestion: "Nichtinteraktiver Inhalt"
108
108
  DateQuestion: "Datum"
109
109
  DynamicMultipleChoiceQuestion: "Dynamische Mehrfachauswahl"
@@ -103,7 +103,7 @@ caluma:
103
103
  TextareaQuestion: "Textarea"
104
104
  TableQuestion: "Table"
105
105
  FormQuestion: "Form"
106
- FileQuestion: "File"
106
+ FilesQuestion: "Files"
107
107
  StaticQuestion: "Non-interactive content"
108
108
  DateQuestion: "Date"
109
109
  DynamicMultipleChoiceQuestion: "Dynamic choices"
@@ -102,7 +102,7 @@ caluma:
102
102
  TextareaQuestion: "Texte (plusieurs lignes)"
103
103
  TableQuestion: "Tableau"
104
104
  FormQuestion: "Formulaire"
105
- FileQuestion: "Fichier"
105
+ FilesQuestion: "Fichiers"
106
106
  StaticQuestion: "Contenu non interactif"
107
107
  DateQuestion: "Date"
108
108
  DynamicMultipleChoiceQuestion: "Sélection multiple dynamique"