@projectcaluma/ember-form-builder 11.0.0-beta.9 → 11.0.0
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 +82 -0
- package/addon/components/cfb-code-editor.hbs +26 -10
- package/addon/components/cfb-code-editor.js +60 -11
- package/addon/components/cfb-form-editor/general.js +6 -7
- package/addon/components/cfb-form-editor/question/default.hbs +11 -9
- package/addon/components/cfb-form-editor/question/default.js +9 -4
- package/addon/components/cfb-form-editor/question/options.hbs +3 -3
- package/addon/components/cfb-form-editor/question/validation.hbs +15 -13
- package/addon/components/cfb-form-editor/question/validation.js +2 -2
- package/addon/components/cfb-form-editor/question-list/item.hbs +44 -38
- package/addon/components/cfb-form-editor/question-list.hbs +2 -2
- package/addon/components/cfb-form-editor/question-list.js +9 -7
- package/addon/components/cfb-form-editor/question.hbs +51 -90
- package/addon/components/cfb-form-editor/question.js +46 -34
- package/addon/components/cfb-form-list.hbs +7 -7
- package/addon/components/cfb-form-list.js +42 -15
- package/addon/controllers/index.js +6 -0
- package/addon/gql/mutations/add-form-question.graphql +1 -1
- package/addon/gql/mutations/remove-form-question.graphql +1 -1
- package/addon/gql/mutations/reorder-form-questions.graphql +1 -1
- package/addon/gql/mutations/save-calculated-float-question.graphql +1 -0
- package/addon/gql/mutations/save-choice-question.graphql +1 -0
- package/addon/gql/mutations/save-date-question.graphql +3 -0
- package/addon/gql/mutations/save-dynamic-choice-question.graphql +1 -0
- package/addon/gql/mutations/save-dynamic-multiple-choice-question.graphql +1 -0
- package/addon/gql/mutations/save-files-question.graphql +14 -0
- package/addon/gql/mutations/save-float-question.graphql +1 -0
- package/addon/gql/mutations/save-integer-question.graphql +1 -0
- package/addon/gql/mutations/save-multiple-choice-question.graphql +1 -0
- package/addon/gql/mutations/save-table-question.graphql +1 -0
- package/addon/gql/mutations/save-text-question.graphql +1 -0
- package/addon/gql/mutations/save-textarea-question.graphql +1 -0
- package/addon/gql/queries/check-form-slug.graphql +1 -1
- package/addon/gql/queries/check-question-slug.graphql +1 -1
- package/addon/gql/queries/form-editor-general.graphql +1 -1
- package/addon/gql/queries/form-editor-question.graphql +16 -2
- package/addon/gql/queries/search-form-question.graphql +3 -3
- package/addon/instance-initializers/form-builder-widget-overrides.js +15 -0
- package/addon/routes/edit/questions/edit.js +2 -1
- package/addon/routes/edit.js +1 -1
- package/addon/templates/index.hbs +8 -1
- package/addon/validations/question.js +13 -4
- package/addon/validators/gt-lt.js +17 -38
- package/addon/validators/jexl.js +49 -0
- package/app/instance-initializers/form-builder-widget-overrides.js +4 -0
- package/app/styles/@projectcaluma/ember-form-builder.scss +1 -1
- package/app/styles/_cfb-uikit-powerselect.scss +2 -0
- package/blueprints/@projectcaluma/ember-form-builder/index.js +1 -1
- package/config/environment.js +0 -7
- package/index.js +4 -2
- package/package.json +58 -48
- package/translations/de.yaml +5 -4
- package/translations/en.yaml +4 -3
- package/translations/fr.yaml +4 -4
- package/addon/components/cfb-float-input.hbs +0 -14
- package/addon/components/cfb-label.hbs +0 -12
- package/addon/gql/fragments/field.graphql +0 -247
- package/addon/gql/mutations/save-file-question.graphql +0 -11
- package/addon/modifiers/pikaday.js +0 -2
- package/app/components/cfb-float-input.js +0 -1
- package/app/components/cfb-label.js +0 -1
- package/app/styles/_cfb-powerselect.scss +0 -31
package/translations/de.yaml
CHANGED
|
@@ -21,9 +21,8 @@ caluma:
|
|
|
21
21
|
isArchived: "Archiviert"
|
|
22
22
|
widgetOverride: "Spezialelement"
|
|
23
23
|
isPublished: "Publiziert"
|
|
24
|
-
archived: "Archivierte"
|
|
25
24
|
draft: "Entwurf"
|
|
26
|
-
active: "
|
|
25
|
+
active: "Aktiv"
|
|
27
26
|
all: "Alle"
|
|
28
27
|
|
|
29
28
|
allForms: "Alle Formulare"
|
|
@@ -52,6 +51,7 @@ caluma:
|
|
|
52
51
|
isRequired: "Pflichtfeld"
|
|
53
52
|
staticContent: "Statischer Inhalt"
|
|
54
53
|
infoText: "Infotext"
|
|
54
|
+
hintText: "Hinweistext"
|
|
55
55
|
confirmationText: "Bestätigungstext"
|
|
56
56
|
placeholder: "Platzhalter"
|
|
57
57
|
isHidden: "Versteckt (JEXL)"
|
|
@@ -63,6 +63,7 @@ caluma:
|
|
|
63
63
|
dataSource: "Datenquelle"
|
|
64
64
|
formatValidators: "Validierung"
|
|
65
65
|
defaultValue: "Standardwert"
|
|
66
|
+
meta: "Metainformationen"
|
|
66
67
|
|
|
67
68
|
general: "Allgemein"
|
|
68
69
|
options: "Optionen"
|
|
@@ -73,7 +74,7 @@ caluma:
|
|
|
73
74
|
max-length: "Maximale Länge"
|
|
74
75
|
rowForm: "Formular für Tabelleneinträge"
|
|
75
76
|
subForm: "Formular für Einträge"
|
|
76
|
-
|
|
77
|
+
no-selection: "Keine Auswahl"
|
|
77
78
|
search-placeholder: "Hier tippen um zu suchen"
|
|
78
79
|
search-empty: "Keine Formulare gefunden"
|
|
79
80
|
columnsToDisplay: "Spalten zur Anzeige im Formular"
|
|
@@ -102,7 +103,7 @@ caluma:
|
|
|
102
103
|
TextareaQuestion: "Text (mehrzeilig)"
|
|
103
104
|
TableQuestion: "Tabelle"
|
|
104
105
|
FormQuestion: "Formular"
|
|
105
|
-
|
|
106
|
+
FilesQuestion: "Dateien"
|
|
106
107
|
StaticQuestion: "Nichtinteraktiver Inhalt"
|
|
107
108
|
DateQuestion: "Datum"
|
|
108
109
|
DynamicMultipleChoiceQuestion: "Dynamische Mehrfachauswahl"
|
package/translations/en.yaml
CHANGED
|
@@ -21,7 +21,6 @@ caluma:
|
|
|
21
21
|
isArchived: "Archived"
|
|
22
22
|
widgetOverride: "Custom widget"
|
|
23
23
|
isPublished: "Published"
|
|
24
|
-
archived: "Archived"
|
|
25
24
|
draft: "Draft"
|
|
26
25
|
active: "Active"
|
|
27
26
|
all: "All"
|
|
@@ -52,6 +51,7 @@ caluma:
|
|
|
52
51
|
isRequired: "Required"
|
|
53
52
|
staticContent: "Static content"
|
|
54
53
|
infoText: "Information text"
|
|
54
|
+
hintText: "Hint text"
|
|
55
55
|
confirmationText: "Confirmation text"
|
|
56
56
|
placeholder: "Placeholder"
|
|
57
57
|
isHidden: "Hidden (JEXL)"
|
|
@@ -63,6 +63,7 @@ caluma:
|
|
|
63
63
|
dataSource: "Data source"
|
|
64
64
|
formatValidators: "Validation"
|
|
65
65
|
defaultValue: "Default value"
|
|
66
|
+
meta: "Meta information"
|
|
66
67
|
|
|
67
68
|
general: "General"
|
|
68
69
|
options: "Options"
|
|
@@ -73,7 +74,7 @@ caluma:
|
|
|
73
74
|
max-length: "Maximum length"
|
|
74
75
|
rowForm: "Form to use for rows"
|
|
75
76
|
subForm: "Form to use for entries"
|
|
76
|
-
|
|
77
|
+
no-selection: "No selection"
|
|
77
78
|
search-placeholder: "Type here to search forms"
|
|
78
79
|
search-empty: "Search didn't match any forms"
|
|
79
80
|
columnsToDisplay: "Columns to be shown in the form"
|
|
@@ -102,7 +103,7 @@ caluma:
|
|
|
102
103
|
TextareaQuestion: "Textarea"
|
|
103
104
|
TableQuestion: "Table"
|
|
104
105
|
FormQuestion: "Form"
|
|
105
|
-
|
|
106
|
+
FilesQuestion: "Files"
|
|
106
107
|
StaticQuestion: "Non-interactive content"
|
|
107
108
|
DateQuestion: "Date"
|
|
108
109
|
DynamicMultipleChoiceQuestion: "Dynamic choices"
|
package/translations/fr.yaml
CHANGED
|
@@ -21,9 +21,8 @@ caluma:
|
|
|
21
21
|
isArchived: "Archivé"
|
|
22
22
|
widgetOverride: "Élément spécial"
|
|
23
23
|
isPublished: "Publié"
|
|
24
|
-
archived: "Archivés"
|
|
25
24
|
draft: "Brouillon"
|
|
26
|
-
active: "
|
|
25
|
+
active: "Actif"
|
|
27
26
|
all: "Tous"
|
|
28
27
|
|
|
29
28
|
allForms: "Tous les formulaires"
|
|
@@ -63,6 +62,7 @@ caluma:
|
|
|
63
62
|
dataSource: "Source des données"
|
|
64
63
|
formatValidators: "Validation"
|
|
65
64
|
defaultValue: "Valeur par défaut"
|
|
65
|
+
meta: "Méta-informations"
|
|
66
66
|
|
|
67
67
|
general: "Général"
|
|
68
68
|
options: "Options"
|
|
@@ -73,7 +73,7 @@ caluma:
|
|
|
73
73
|
max-length: "Longueur maximale"
|
|
74
74
|
rowForm: "Formulaire pour les entrées de tableau"
|
|
75
75
|
subForm: "Formulaire pour les entrées"
|
|
76
|
-
|
|
76
|
+
no-selection: "Aucune sélection"
|
|
77
77
|
search-placeholder: "Tapez ici pour rechercher"
|
|
78
78
|
search-empty: "Pas de formulaires trouvés"
|
|
79
79
|
columnsToDisplay: "Colonnes à afficher dans le formulaire"
|
|
@@ -102,7 +102,7 @@ caluma:
|
|
|
102
102
|
TextareaQuestion: "Texte (plusieurs lignes)"
|
|
103
103
|
TableQuestion: "Tableau"
|
|
104
104
|
FormQuestion: "Formulaire"
|
|
105
|
-
|
|
105
|
+
FilesQuestion: "Fichiers"
|
|
106
106
|
StaticQuestion: "Contenu non interactif"
|
|
107
107
|
DateQuestion: "Date"
|
|
108
108
|
DynamicMultipleChoiceQuestion: "Sélection multiple dynamique"
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<label
|
|
2
|
-
class="uk-form-label uk-flex uk-flex-between"
|
|
3
|
-
for={{@inputId}}
|
|
4
|
-
...attributes
|
|
5
|
-
>
|
|
6
|
-
{{yield}}{{@label}}
|
|
7
|
-
{{#unless @required}}
|
|
8
|
-
<span class="uk-text-muted uk-text-lowercase">
|
|
9
|
-
({{t "caluma.form-builder.global.optional"}})
|
|
10
|
-
</span>
|
|
11
|
-
{{/unless}}
|
|
12
|
-
</label>
|
|
@@ -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 +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";
|