@projectcaluma/ember-form-builder 11.0.0-beta.4 → 11.0.0-beta.40

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 (64) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/addon/components/cfb-code-editor.hbs +26 -9
  3. package/addon/components/cfb-code-editor.js +60 -11
  4. package/addon/components/cfb-form-editor/general.hbs +1 -3
  5. package/addon/components/cfb-form-editor/general.js +6 -7
  6. package/addon/components/cfb-form-editor/question/default.hbs +11 -9
  7. package/addon/components/cfb-form-editor/question/default.js +9 -4
  8. package/addon/components/cfb-form-editor/question/options.hbs +3 -3
  9. package/addon/components/cfb-form-editor/question/validation.hbs +16 -14
  10. package/addon/components/cfb-form-editor/question/validation.js +17 -13
  11. package/addon/components/cfb-form-editor/question-list/item.hbs +44 -38
  12. package/addon/components/cfb-form-editor/question-list.hbs +2 -2
  13. package/addon/components/cfb-form-editor/question-list.js +9 -3
  14. package/addon/components/cfb-form-editor/question.hbs +55 -96
  15. package/addon/components/cfb-form-editor/question.js +53 -34
  16. package/addon/components/cfb-form-list.hbs +7 -7
  17. package/addon/components/cfb-form-list.js +44 -11
  18. package/addon/controllers/index.js +6 -0
  19. package/addon/engine.js +1 -1
  20. package/addon/gql/mutations/add-form-question.graphql +1 -1
  21. package/addon/gql/mutations/remove-form-question.graphql +1 -1
  22. package/addon/gql/mutations/reorder-form-questions.graphql +1 -1
  23. package/addon/gql/mutations/save-calculated-float-question.graphql +1 -0
  24. package/addon/gql/mutations/save-choice-question.graphql +1 -0
  25. package/addon/gql/mutations/save-date-question.graphql +3 -0
  26. package/addon/gql/mutations/save-dynamic-choice-question.graphql +1 -0
  27. package/addon/gql/mutations/save-dynamic-multiple-choice-question.graphql +1 -0
  28. package/addon/gql/mutations/save-files-question.graphql +14 -0
  29. package/addon/gql/mutations/save-float-question.graphql +1 -0
  30. package/addon/gql/mutations/save-integer-question.graphql +1 -0
  31. package/addon/gql/mutations/save-multiple-choice-question.graphql +1 -0
  32. package/addon/gql/mutations/save-table-question.graphql +1 -0
  33. package/addon/gql/mutations/save-text-question.graphql +1 -0
  34. package/addon/gql/mutations/save-textarea-question.graphql +1 -0
  35. package/addon/gql/queries/all-format-validators.graphql +10 -0
  36. package/addon/gql/queries/check-form-slug.graphql +1 -1
  37. package/addon/gql/queries/check-question-slug.graphql +1 -1
  38. package/addon/gql/queries/form-editor-general.graphql +1 -1
  39. package/addon/gql/queries/form-editor-question.graphql +30 -2
  40. package/addon/gql/queries/search-form-question.graphql +3 -3
  41. package/addon/instance-initializers/form-builder-widget-overrides.js +15 -0
  42. package/addon/routes/edit/questions/edit.js +2 -1
  43. package/addon/routes/edit.js +1 -1
  44. package/addon/templates/index.hbs +8 -1
  45. package/addon/validations/question.js +13 -4
  46. package/addon/validators/gt-lt.js +17 -38
  47. package/addon/validators/jexl.js +49 -0
  48. package/app/instance-initializers/form-builder-widget-overrides.js +4 -0
  49. package/app/styles/@projectcaluma/ember-form-builder.scss +2 -2
  50. package/app/styles/_cfb-uikit-powerselect.scss +2 -0
  51. package/blueprints/@projectcaluma/ember-form-builder/index.js +1 -1
  52. package/config/environment.js +0 -7
  53. package/index.js +4 -2
  54. package/package.json +57 -46
  55. package/translations/de.yaml +7 -6
  56. package/translations/en.yaml +4 -3
  57. package/translations/fr.yaml +154 -1
  58. package/addon/components/cfb-float-input.hbs +0 -14
  59. package/addon/components/cfb-label.hbs +0 -12
  60. package/addon/gql/fragments/field.graphql +0 -247
  61. package/addon/gql/mutations/save-file-question.graphql +0 -11
  62. package/app/components/cfb-float-input.js +0 -1
  63. package/app/components/cfb-label.js +0 -1
  64. package/app/styles/_cfb-powerselect.scss +0 -31
@@ -1,247 +0,0 @@
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
-
6
- fragment SimpleQuestion on Question {
7
- id
8
- slug
9
- label
10
- isRequired
11
- isHidden
12
- meta
13
- infoText
14
- ... on TextQuestion {
15
- textMinLength: minLength
16
- textMaxLength: maxLength
17
- textDefaultAnswer: defaultAnswer {
18
- id
19
- value
20
- }
21
- placeholder
22
- }
23
- ... on TextareaQuestion {
24
- textareaMinLength: minLength
25
- textareaMaxLength: maxLength
26
- textareaDefaultAnswer: defaultAnswer {
27
- id
28
- value
29
- }
30
- placeholder
31
- }
32
- ... on IntegerQuestion {
33
- integerMinValue: minValue
34
- integerMaxValue: maxValue
35
- integerDefaultAnswer: defaultAnswer {
36
- id
37
- value
38
- }
39
- placeholder
40
- }
41
- ... on FloatQuestion {
42
- floatMinValue: minValue
43
- floatMaxValue: maxValue
44
- floatDefaultAnswer: defaultAnswer {
45
- id
46
- value
47
- }
48
- placeholder
49
- }
50
- ... on ChoiceQuestion {
51
- choiceOptions: options {
52
- edges {
53
- node {
54
- id
55
- slug
56
- label
57
- isArchived
58
- }
59
- }
60
- }
61
- choiceDefaultAnswer: defaultAnswer {
62
- id
63
- value
64
- }
65
- }
66
- ... on MultipleChoiceQuestion {
67
- multipleChoiceOptions: options {
68
- edges {
69
- node {
70
- id
71
- slug
72
- label
73
- isArchived
74
- }
75
- }
76
- }
77
- multipleChoiceDefaultAnswer: defaultAnswer {
78
- id
79
- value
80
- }
81
- }
82
- ... on DateQuestion {
83
- dateDefaultAnswer: defaultAnswer {
84
- id
85
- value
86
- }
87
- }
88
- ... on StaticQuestion {
89
- staticContent
90
- }
91
- ... on CalculatedFloatQuestion {
92
- calcExpression
93
- }
94
- ... on ActionButtonQuestion {
95
- action
96
- color
97
- validateOnEnter
98
- }
99
- }
100
-
101
- fragment FieldTableQuestion on Question {
102
- id
103
- ... on TableQuestion {
104
- rowForm {
105
- id
106
- slug
107
- questions {
108
- edges {
109
- node {
110
- ...SimpleQuestion
111
- }
112
- }
113
- }
114
- }
115
- tableDefaultAnswer: defaultAnswer {
116
- id
117
- value {
118
- id
119
- answers {
120
- edges {
121
- node {
122
- id
123
- question {
124
- id
125
- slug
126
- }
127
- ... on StringAnswer {
128
- stringValue: value
129
- }
130
- ... on IntegerAnswer {
131
- integerValue: value
132
- }
133
- ... on FloatAnswer {
134
- floatValue: value
135
- }
136
- ... on ListAnswer {
137
- listValue: value
138
- }
139
- ... on DateAnswer {
140
- dateValue: value
141
- }
142
- }
143
- }
144
- }
145
- }
146
- }
147
- }
148
- }
149
-
150
- fragment FieldQuestion on Question {
151
- id
152
- ...SimpleQuestion
153
- ...FieldTableQuestion
154
- ... on FormQuestion {
155
- subForm {
156
- id
157
- slug
158
- name
159
- questions {
160
- edges {
161
- node {
162
- # This part here limits our query to 2 level deep nested forms. This
163
- # has to be solved in another way!
164
- id
165
- ...SimpleQuestion
166
- ...FieldTableQuestion
167
- ... on FormQuestion {
168
- subForm {
169
- id
170
- slug
171
- name
172
- questions {
173
- edges {
174
- node {
175
- ...SimpleQuestion
176
- ...FieldTableQuestion
177
- }
178
- }
179
- }
180
- }
181
- }
182
- }
183
- }
184
- }
185
- }
186
- }
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,11 +0,0 @@
1
- #import QuestionInfo from '../fragments/question-info.graphql'
2
-
3
- mutation SaveFileQuestion($input: SaveFileQuestionInput!) {
4
- saveFileQuestion(input: $input) {
5
- question {
6
- id
7
- ...QuestionInfo
8
- }
9
- clientMutationId
10
- }
11
- }
@@ -1 +0,0 @@
1
- export { default } from "@projectcaluma/ember-form-builder/components/cfb-float-input";
@@ -1 +0,0 @@
1
- export { default } from "@projectcaluma/ember-form-builder/components/cfb-label";
@@ -1,31 +0,0 @@
1
- // Backgrounds
2
- $ember-power-select-selected-background: lighten(
3
- $global-secondary-background,
4
- 25%
5
- ) !default;
6
- $ember-power-select-highlighted-background: lighten(
7
- $ember-power-select-selected-background,
8
- 25%
9
- ) !default;
10
- $ember-power-select-multiple-selection-background-color: $ember-power-select-selected-background !default;
11
-
12
- // Texts
13
- $ember-power-select-highlighted-color: #ffffff !default;
14
- $ember-power-select-multiple-selection-color: #ffffff !default;
15
-
16
- .ember-power-select-option[aria-selected="true"] {
17
- color: $ember-power-select-highlighted-color;
18
- }
19
-
20
- // Borders
21
- $ember-power-select-focus-outline: 0 !default;
22
- $ember-power-select-border-color: $global-border !default;
23
- $ember-power-select-default-border-radius: 0 !default;
24
- $ember-power-select-multiple-option-border-color: $ember-power-select-border-color !default;
25
-
26
- // Other
27
- $ember-power-select-line-height: 38px !default;
28
- $ember-power-select-multiple-option-padding: 0 8px !default;
29
- $ember-power-select-multiple-option-line-height: 32px !default;
30
-
31
- @import "ember-power-select";