@projectcaluma/ember-form 11.0.0-beta.2 → 11.0.0-beta.20
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +190 -0
- package/addon/components/cf-content.hbs +37 -37
- package/addon/components/cf-content.js +2 -2
- package/addon/components/cf-field/hint.hbs +5 -0
- package/addon/components/cf-field/info.hbs +2 -2
- package/addon/components/cf-field/info.js +0 -15
- package/addon/components/cf-field/input/action-button.hbs +8 -4
- package/addon/components/cf-field/input/action-button.js +60 -59
- package/addon/components/cf-field/input/checkbox.hbs +3 -4
- package/addon/components/cf-field/input/date.hbs +10 -5
- package/addon/components/cf-field/input/date.js +40 -10
- package/addon/components/cf-field/input/file.hbs +2 -2
- package/addon/components/cf-field/input/file.js +2 -2
- package/addon/components/cf-field/input/powerselect.hbs +27 -29
- package/addon/components/cf-field/input/powerselect.js +8 -2
- package/addon/components/cf-field/input/radio.hbs +2 -2
- package/addon/components/cf-field/input/static.hbs +1 -1
- package/addon/components/cf-field/input/table.hbs +25 -24
- package/addon/components/cf-field/input/table.js +1 -11
- package/addon/components/cf-field/input.hbs +8 -21
- package/addon/components/cf-field/input.js +32 -14
- package/addon/components/cf-field/label.hbs +4 -2
- package/addon/components/cf-field-value.hbs +22 -7
- package/addon/components/cf-field-value.js +8 -33
- package/addon/components/cf-field.hbs +39 -6
- package/addon/components/cf-field.js +37 -17
- package/addon/components/cf-form-wrapper.hbs +3 -1
- package/addon/components/document-validity.js +16 -1
- package/addon/gql/fragments/field.graphql +30 -0
- package/addon/helpers/format-graphql-error.js +21 -0
- package/addon/helpers/get-widget.js +16 -2
- package/addon/instance-initializers/form-widget-overrides.js +52 -0
- package/addon/lib/field.js +73 -46
- package/addon/lib/navigation.js +3 -1
- package/addon/lib/question.js +12 -4
- package/addon/modifiers/autoresize.js +16 -0
- package/app/components/cf-field/hint.js +1 -0
- package/app/helpers/format-graphql-error.js +1 -0
- package/app/helpers/get-widget.js +1 -4
- package/app/instance-initializers/form-widget-overrides.js +4 -0
- package/app/modifiers/autoresize.js +1 -0
- package/app/styles/@projectcaluma/ember-form.scss +3 -15
- package/package.json +37 -25
- package/translations/de.yaml +6 -2
- package/translations/en.yaml +6 -2
- package/translations/fr.yaml +6 -2
- package/addon/components/cf-field/label.js +0 -11
- package/addon/instance-initializers/setup-pikaday-i18n.js +0 -35
package/translations/en.yaml
CHANGED
@@ -12,6 +12,10 @@ caluma:
|
|
12
12
|
optionNotAvailable: "This option is not available anymore"
|
13
13
|
info: "More information"
|
14
14
|
|
15
|
+
error:
|
16
|
+
intro: "Oh no, something went wrong on our side. Your answer could not be saved."
|
17
|
+
details: "Technical details:"
|
18
|
+
|
15
19
|
navigation:
|
16
20
|
next: "Next"
|
17
21
|
previous: "Previous"
|
@@ -34,7 +38,6 @@ caluma:
|
|
34
38
|
options-empty: "No options available"
|
35
39
|
search-placeholder: "Type here to search options"
|
36
40
|
search-empty: "Search didn't match any options"
|
37
|
-
null: "No selection"
|
38
41
|
|
39
42
|
validation:
|
40
43
|
blank: "This field can't be blank"
|
@@ -43,7 +46,8 @@ caluma:
|
|
43
46
|
greaterThanOrEqualTo: "The value of this field must be greater than or equal to {gte}"
|
44
47
|
lessThanOrEqualTo: "The value of this field must be less than or equal to {lte}"
|
45
48
|
notAnInteger: "The value of this field must be an integer"
|
46
|
-
inclusion: "
|
49
|
+
inclusion: '"{label}" is not a valid value for this field'
|
50
|
+
deleteFailed: "An error occured during deletion."
|
47
51
|
uploadFailed: "An error occured during upload."
|
48
52
|
format: "{errorMsg}"
|
49
53
|
table: "At least one row of the table was not filled in correctly"
|
package/translations/fr.yaml
CHANGED
@@ -12,6 +12,10 @@ caluma:
|
|
12
12
|
optionNotAvailable: "Cette option n'est plus disponible"
|
13
13
|
info: "Plus d'informations"
|
14
14
|
|
15
|
+
error:
|
16
|
+
intro: "Oh non, quelque chose a mal tourné de notre côté. Votre réponse n'a pas pu être sauvegardée."
|
17
|
+
details: "Détails techniques :"
|
18
|
+
|
15
19
|
navigation:
|
16
20
|
next: "suivante"
|
17
21
|
previous: "précédente"
|
@@ -34,7 +38,6 @@ caluma:
|
|
34
38
|
options-empty: "Pas d'options disponibles"
|
35
39
|
search-placeholder: "Tapez ici pour rechercher"
|
36
40
|
search-empty: "Pas d'options trouvées"
|
37
|
-
null: "Aucune sélection"
|
38
41
|
|
39
42
|
validation:
|
40
43
|
blank: "Ce champ ne doit pas être laissé vide"
|
@@ -43,7 +46,8 @@ caluma:
|
|
43
46
|
greaterThanOrEqualTo: "La valeur indiquée dans ce champ ne doit pas être inférieure à {gte} "
|
44
47
|
lessThanOrEqualTo: "L'entrée dans ce champ ne doit pas être supérieure à {lte} "
|
45
48
|
notAnInteger: "Veuillez entrer un nombre entier"
|
46
|
-
inclusion: "
|
49
|
+
inclusion: '"{label}" n''est pas une valeur valide pour ce champ'
|
50
|
+
deleteFailed: "Une erreur est survenue lors de la suppression."
|
47
51
|
uploadFailed: "Une erreur s'est produite pendant le téléchargement."
|
48
52
|
format: "{errorMsg}"
|
49
53
|
table: "Au moins une ligne du tableau n'a pas été remplie correctement"
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import EmberObject from "@ember/object";
|
2
|
-
import { inject as service } from "@ember/service";
|
3
|
-
import moment from "moment";
|
4
|
-
|
5
|
-
class Translations extends EmberObject {
|
6
|
-
@service intl;
|
7
|
-
|
8
|
-
get previousMonth() {
|
9
|
-
return this.intl.t("caluma.form.pikaday.month-previous");
|
10
|
-
}
|
11
|
-
|
12
|
-
get nextMonth() {
|
13
|
-
return this.intl.t("caluma.form.pikaday.month-next");
|
14
|
-
}
|
15
|
-
|
16
|
-
months = moment.localeData().months();
|
17
|
-
weekdays = moment.localeData().weekdays();
|
18
|
-
weekdaysShort = moment.localeData().weekdaysShort();
|
19
|
-
}
|
20
|
-
|
21
|
-
export function initialize(applicationInstance) {
|
22
|
-
applicationInstance.register("pikaday-i18n:main", Translations, {
|
23
|
-
singleton: true,
|
24
|
-
});
|
25
|
-
applicationInstance.inject(
|
26
|
-
"component:pikaday-input",
|
27
|
-
"i18n",
|
28
|
-
"pikaday-i18n:main"
|
29
|
-
);
|
30
|
-
}
|
31
|
-
|
32
|
-
export default {
|
33
|
-
name: "setup-pikaday-i18n",
|
34
|
-
initialize,
|
35
|
-
};
|