@projectcaluma/ember-form 12.6.0 → 12.7.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -49,7 +49,7 @@
|
|
49
49
|
{{#if this.save.last.error}}
|
50
50
|
<div uk-dropdown="pos: bottom-left" class="uk-padding-small">
|
51
51
|
<div class="uk-alert uk-alert-danger uk-margin-small">
|
52
|
-
{{
|
52
|
+
{{this.errorIntroText}}
|
53
53
|
</div>
|
54
54
|
<p class="uk-text-meta uk-margin-small">
|
55
55
|
{{t "caluma.form.error.details"}}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { action } from "@ember/object";
|
2
|
+
import { service } from "@ember/service";
|
2
3
|
import { macroCondition, isTesting } from "@embroider/macros";
|
3
4
|
import Component from "@glimmer/component";
|
4
5
|
import { timeout, restartableTask } from "ember-concurrency";
|
@@ -18,6 +19,8 @@ import { hasQuestionType } from "@projectcaluma/ember-core/helpers/has-question-
|
|
18
19
|
* @argument {Field} field The field data model to render
|
19
20
|
*/
|
20
21
|
export default class CfFieldComponent extends Component {
|
22
|
+
@service intl;
|
23
|
+
|
21
24
|
@action
|
22
25
|
registerComponent() {
|
23
26
|
this.args.field._components.add(this);
|
@@ -55,6 +58,17 @@ export default class CfFieldComponent extends Component {
|
|
55
58
|
);
|
56
59
|
}
|
57
60
|
|
61
|
+
get errorIntroText() {
|
62
|
+
const _errors = this.save.last.error.errors ?? [];
|
63
|
+
if (_errors.some((e) => e?.code === "network_error")) {
|
64
|
+
return this.intl.t("caluma.form.error.offline");
|
65
|
+
}
|
66
|
+
if (_errors.some((e) => e?.message.includes("code='invalid'"))) {
|
67
|
+
return this.intl.t("caluma.form.error.invalid");
|
68
|
+
}
|
69
|
+
return this.intl.t("caluma.form.error.technical-error");
|
70
|
+
}
|
71
|
+
|
58
72
|
get saveIndicatorVisible() {
|
59
73
|
return !hasQuestionType(this.args.field?.question, "action-button");
|
60
74
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@projectcaluma/ember-form",
|
3
|
-
"version": "12.
|
3
|
+
"version": "12.7.0",
|
4
4
|
"description": "Ember addon for rendering Caluma forms.",
|
5
5
|
"keywords": [
|
6
6
|
"ember-addon"
|
@@ -9,67 +9,80 @@
|
|
9
9
|
"homepage": "https://docs.caluma.io/ember-caluma",
|
10
10
|
"repository": "github:projectcaluma/ember-caluma",
|
11
11
|
"dependencies": {
|
12
|
+
"@babel/core": "^7.23.6",
|
12
13
|
"@ember/string": "^3.1.1",
|
13
|
-
"@embroider/macros": "^1.13.
|
14
|
-
"@embroider/util": "^1.12.
|
14
|
+
"@embroider/macros": "^1.13.3",
|
15
|
+
"@embroider/util": "^1.12.1",
|
15
16
|
"@glimmer/component": "^1.1.2",
|
16
17
|
"@glimmer/tracking": "^1.1.2",
|
17
18
|
"ember-apollo-client": "~4.0.2",
|
18
|
-
"ember-auto-import": "^2.
|
19
|
+
"ember-auto-import": "^2.7.0",
|
19
20
|
"ember-autoresize-modifier": "^0.7.0",
|
20
|
-
"ember-cli-babel": "^
|
21
|
-
"ember-cli-htmlbars": "^6.
|
21
|
+
"ember-cli-babel": "^8.2.0",
|
22
|
+
"ember-cli-htmlbars": "^6.3.0",
|
22
23
|
"ember-cli-showdown": "^7.0.0",
|
23
24
|
"ember-composable-helpers": "^5.0.0",
|
24
|
-
"ember-concurrency": "^3.
|
25
|
+
"ember-concurrency": "^3.1.1",
|
25
26
|
"ember-fetch": "^8.1.2",
|
26
27
|
"ember-flatpickr": "^4.0.0",
|
27
28
|
"ember-in-viewport": "^4.1.0",
|
28
|
-
"ember-intl": "^
|
29
|
-
"ember-math-helpers": "^
|
30
|
-
"ember-power-select": "^7.
|
31
|
-
"ember-resources": "^6.4.
|
32
|
-
"ember-uikit": "^
|
29
|
+
"ember-intl": "^6.4.0",
|
30
|
+
"ember-math-helpers": "^4.0.0",
|
31
|
+
"ember-power-select": "^7.2.0",
|
32
|
+
"ember-resources": "^6.4.2",
|
33
|
+
"ember-uikit": "^9.0.0",
|
33
34
|
"ember-validators": "^4.1.2",
|
34
35
|
"graphql": "^15.8.0",
|
35
36
|
"jexl": "^2.3.0",
|
36
37
|
"lodash.isequal": "^4.5.0",
|
37
|
-
"luxon": "^3.
|
38
|
+
"luxon": "^3.4.4",
|
38
39
|
"tracked-toolbox": "^2.0.0",
|
39
|
-
"@projectcaluma/ember-core": "^12.
|
40
|
+
"@projectcaluma/ember-core": "^12.7.0"
|
40
41
|
},
|
41
42
|
"devDependencies": {
|
42
43
|
"@ember/optional-features": "2.0.0",
|
43
|
-
"@ember/test-helpers": "3.2.
|
44
|
-
"@embroider/test-setup": "3.0.
|
45
|
-
"@faker-js/faker": "8.
|
44
|
+
"@ember/test-helpers": "3.2.1",
|
45
|
+
"@embroider/test-setup": "3.0.3",
|
46
|
+
"@faker-js/faker": "8.3.1",
|
46
47
|
"broccoli-asset-rev": "3.0.0",
|
47
|
-
"ember-cli": "
|
48
|
-
"ember-cli-
|
48
|
+
"ember-cli": "5.5.0",
|
49
|
+
"ember-cli-clean-css": "3.0.0",
|
50
|
+
"ember-cli-code-coverage": "2.0.3",
|
49
51
|
"ember-cli-dependency-checker": "3.3.2",
|
50
52
|
"ember-cli-inject-live-reload": "2.1.0",
|
51
|
-
"ember-cli-mirage": "3.0.
|
53
|
+
"ember-cli-mirage": "3.0.2",
|
52
54
|
"ember-cli-sri": "2.1.1",
|
53
55
|
"ember-cli-terser": "4.0.2",
|
54
56
|
"ember-load-initializers": "2.1.2",
|
55
|
-
"ember-qunit": "
|
56
|
-
"ember-resolver": "11.0.
|
57
|
-
"ember-source": "
|
57
|
+
"ember-qunit": "8.0.2",
|
58
|
+
"ember-resolver": "11.0.1",
|
59
|
+
"ember-source": "5.5.0",
|
58
60
|
"ember-source-channel-url": "3.0.0",
|
59
|
-
"ember-try": "
|
61
|
+
"ember-try": "3.0.0",
|
60
62
|
"loader.js": "4.7.0",
|
61
|
-
"miragejs": "0.1.
|
62
|
-
"qunit": "2.
|
63
|
-
"qunit-dom": "
|
64
|
-
"uikit": "3.
|
65
|
-
"uuid": "9.0.
|
63
|
+
"miragejs": "0.1.48",
|
64
|
+
"qunit": "2.20.0",
|
65
|
+
"qunit-dom": "3.0.0",
|
66
|
+
"uikit": "3.17.11",
|
67
|
+
"uuid": "9.0.1",
|
66
68
|
"webpack": "5.89.0",
|
67
|
-
"@projectcaluma/ember-
|
68
|
-
"@projectcaluma/ember-
|
69
|
+
"@projectcaluma/ember-workflow": "12.7.0",
|
70
|
+
"@projectcaluma/ember-testing": "12.7.0"
|
69
71
|
},
|
70
72
|
"peerDependencies": {
|
71
73
|
"ember-source": "^4.0.0",
|
72
|
-
"@projectcaluma/ember-workflow": "^12.
|
74
|
+
"@projectcaluma/ember-workflow": "^12.7.0"
|
75
|
+
},
|
76
|
+
"dependenciesMeta": {
|
77
|
+
"@projectcaluma/ember-core": {
|
78
|
+
"injected": true
|
79
|
+
},
|
80
|
+
"@projectcaluma/ember-testing": {
|
81
|
+
"injected": true
|
82
|
+
},
|
83
|
+
"@projectcaluma/ember-workflow": {
|
84
|
+
"injected": true
|
85
|
+
}
|
73
86
|
},
|
74
87
|
"peerDependenciesMeta": {
|
75
88
|
"@projectcaluma/ember-workflow": {
|
@@ -77,7 +90,7 @@
|
|
77
90
|
}
|
78
91
|
},
|
79
92
|
"engines": {
|
80
|
-
"node": "
|
93
|
+
"node": ">= 18"
|
81
94
|
},
|
82
95
|
"ember": {
|
83
96
|
"edition": "octane"
|
package/translations/de.yaml
CHANGED
@@ -13,8 +13,10 @@ caluma:
|
|
13
13
|
info: "Mehr Informationen"
|
14
14
|
|
15
15
|
error:
|
16
|
-
intro: "Oh nein, auf unserer Seite ist etwas schief gelaufen. Ihre Antwort konnte nicht gespeichert werden."
|
17
16
|
details: "Technische Details:"
|
17
|
+
technical-error: "Oh nein, auf unserer Seite ist etwas schief gelaufen. Ihre Antwort konnte nicht gespeichert werden."
|
18
|
+
offline: "Ihre Antwort konnte nicht gespeichert werden, da Sie offline sind. Bitte überprüfen Sie Ihre Internetverbindung und versuchen Sie es erneut."
|
19
|
+
invalid: "Ihre Antwort konnte nicht gespeichert werden, weil die Validierung fehlgeschlagen ist. Bitte überprüfen Sie Ihre Eingaben und versuchen Sie es erneut."
|
18
20
|
|
19
21
|
navigation:
|
20
22
|
next: "Weiter"
|
package/translations/en.yaml
CHANGED
@@ -13,8 +13,10 @@ caluma:
|
|
13
13
|
info: "More information"
|
14
14
|
|
15
15
|
error:
|
16
|
-
intro: "Oh no, something went wrong on our side. Your answer could not be saved."
|
17
16
|
details: "Technical details:"
|
17
|
+
technical-error: "Oh no, something went wrong on our side. Your answer could not be saved."
|
18
|
+
offline: "Your answer could not be saved because you are offline. Please check your internet connection and try again."
|
19
|
+
invalid: "Your answer could not be saved because the validation failed. Please check your entries and try again."
|
18
20
|
|
19
21
|
navigation:
|
20
22
|
next: "Next"
|
package/translations/fr.yaml
CHANGED
@@ -13,8 +13,10 @@ caluma:
|
|
13
13
|
info: "Plus d'informations"
|
14
14
|
|
15
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
16
|
details: "Détails techniques :"
|
17
|
+
technical-error: "Oh non, quelque chose a mal tourné de notre côté. Votre réponse n'a pas pu être sauvegardée."
|
18
|
+
offline: "Votre réponse n'a pas pu être enregistrée car vous êtes hors ligne. Veuillez vérifier votre connexion Internet et réessayer."
|
19
|
+
invalid: "Votre réponse n'a pas pu être enregistrée car la validation a échoué. Veuillez vérifier vos saisies et réessayer."
|
18
20
|
|
19
21
|
navigation:
|
20
22
|
next: "suivante"
|