@projectcaluma/ember-form 12.15.4 → 13.0.0-beta.1
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/addon/components/cf-field/input/files.js +4 -1
- package/addon/components/cf-field/input/table.hbs +23 -12
- package/addon/components/cf-field/input/table.js +3 -1
- package/addon/lib/document.js +1 -1
- package/app/styles/_uikit-overwrites.scss +4 -2
- package/package.json +27 -26
- package/translations/de.yaml +1 -0
- package/translations/en.yaml +1 -0
- package/translations/fr.yaml +1 -0
- package/tsconfig.declarations.json +0 -10
@@ -1,5 +1,6 @@
|
|
1
1
|
import { action } from "@ember/object";
|
2
2
|
import { inject as service } from "@ember/service";
|
3
|
+
import { waitForPromise } from "@ember/test-waiters";
|
3
4
|
import { macroCondition, isTesting } from "@embroider/macros";
|
4
5
|
import Component from "@glimmer/component";
|
5
6
|
import { queryManager } from "ember-apollo-client";
|
@@ -86,7 +87,9 @@ export default class CfFieldInputFilesComponent extends Component {
|
|
86
87
|
};
|
87
88
|
|
88
89
|
// upload the actual file to data storage
|
89
|
-
await Promise.all(
|
90
|
+
await Promise.all(
|
91
|
+
newFiles.map((file) => waitForPromise(uploadFunction(file))),
|
92
|
+
);
|
90
93
|
|
91
94
|
this.args.field.answer.value = savedAnswerValue;
|
92
95
|
} catch (error) {
|
@@ -25,17 +25,28 @@
|
|
25
25
|
class="uk-animation-fade uk-text-danger"
|
26
26
|
/>
|
27
27
|
{{/if}}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
28
|
+
{{#if @disabled}}
|
29
|
+
<UkButton
|
30
|
+
@color="link"
|
31
|
+
@onClick={{fn this.edit document}}
|
32
|
+
title={{t "caluma.form.view"}}
|
33
|
+
class="uk-flex-inline uk-margin-small-left table-controls"
|
34
|
+
data-test-edit-row
|
35
|
+
>
|
36
|
+
<UkIcon @icon="eye" />
|
37
|
+
<span hidden>{{t "caluma.form.view"}}</span>
|
38
|
+
</UkButton>
|
39
|
+
{{else}}
|
40
|
+
<UkButton
|
41
|
+
@color="link"
|
42
|
+
@onClick={{fn this.edit document}}
|
43
|
+
title={{t "caluma.form.edit"}}
|
44
|
+
class="uk-flex-inline uk-margin-small-left table-controls"
|
45
|
+
data-test-edit-row
|
46
|
+
>
|
47
|
+
<UkIcon @icon="pencil" />
|
48
|
+
<span hidden>{{t "caluma.form.edit"}}</span>
|
49
|
+
</UkButton>
|
39
50
|
<UkButton
|
40
51
|
@color="link"
|
41
52
|
@onClick={{fn (perform this.delete) document}}
|
@@ -46,7 +57,7 @@
|
|
46
57
|
<UkIcon @icon="trash" />
|
47
58
|
<span hidden>{{t "caluma.form.delete"}}</span>
|
48
59
|
</UkButton>
|
49
|
-
{{/
|
60
|
+
{{/if}}
|
50
61
|
</div>
|
51
62
|
</td>
|
52
63
|
</tr>
|
@@ -126,7 +126,9 @@ export default class CfFieldInputTableComponent extends Component {
|
|
126
126
|
this.documentToEditIsNew = false;
|
127
127
|
}
|
128
128
|
|
129
|
-
|
129
|
+
if (!this.args.disabled) {
|
130
|
+
yield this.args.field.validate.perform();
|
131
|
+
}
|
130
132
|
|
131
133
|
this.showAddModal = false;
|
132
134
|
this.documentToEdit = null;
|
package/addon/lib/document.js
CHANGED
@@ -269,7 +269,7 @@ export default class Document extends Base {
|
|
269
269
|
}
|
270
270
|
|
271
271
|
if (field.hidden || [undefined, null].includes(field.value)) {
|
272
|
-
return defaultValue ?? field.question.isMultipleChoice ? [] : null;
|
272
|
+
return (defaultValue ?? field.question.isMultipleChoice) ? [] : null;
|
273
273
|
}
|
274
274
|
|
275
275
|
if (field.question.isTable) {
|
@@ -1,3 +1,5 @@
|
|
1
|
+
@use "sass:meta";
|
2
|
+
|
1
3
|
/* UIkit overwrites
|
2
4
|
* ----------------
|
3
5
|
* These styles amend UIkit so that disabled form elements can be styled as
|
@@ -12,7 +14,7 @@
|
|
12
14
|
background-color: $form-disabled-background;
|
13
15
|
color: $form-disabled-color;
|
14
16
|
|
15
|
-
@if mixin-exists(hook-form-disabled) {
|
17
|
+
@if meta.mixin-exists(hook-form-disabled) {
|
16
18
|
@include hook-form-disabled;
|
17
19
|
}
|
18
20
|
}
|
@@ -30,7 +32,7 @@
|
|
30
32
|
cursor: default;
|
31
33
|
background-color: $form-radio-disabled-background;
|
32
34
|
|
33
|
-
@if mixin-exists(hook-form-radio-disabled) {
|
35
|
+
@if meta.mixin-exists(hook-form-radio-disabled) {
|
34
36
|
@include hook-form-radio-disabled;
|
35
37
|
}
|
36
38
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@projectcaluma/ember-form",
|
3
|
-
"version": "
|
3
|
+
"version": "13.0.0-beta.1",
|
4
4
|
"description": "Ember addon for rendering Caluma forms.",
|
5
5
|
"keywords": [
|
6
6
|
"ember-addon"
|
@@ -9,15 +9,16 @@
|
|
9
9
|
"homepage": "https://docs.caluma.io/ember-caluma",
|
10
10
|
"repository": "github:projectcaluma/ember-caluma",
|
11
11
|
"dependencies": {
|
12
|
-
"@babel/core": "^7.
|
13
|
-
"@ember/string": "^
|
14
|
-
"@embroider/macros": "^1.
|
15
|
-
"@embroider/util": "^1.13.
|
12
|
+
"@babel/core": "^7.25.2",
|
13
|
+
"@ember/string": "^4.0.0",
|
14
|
+
"@embroider/macros": "^1.16.5",
|
15
|
+
"@embroider/util": "^1.13.2",
|
16
16
|
"@glimmer/component": "^1.1.2",
|
17
17
|
"@glimmer/tracking": "^1.1.2",
|
18
18
|
"ember-apollo-client": "~4.0.2",
|
19
|
-
"ember-auto-import": "^2.7.
|
19
|
+
"ember-auto-import": "^2.7.4",
|
20
20
|
"ember-autoresize-modifier": "^0.7.0",
|
21
|
+
"ember-basic-dropdown": "^8.1.0",
|
21
22
|
"ember-cli-babel": "^8.2.0",
|
22
23
|
"ember-cli-htmlbars": "^6.3.0",
|
23
24
|
"ember-cli-showdown": "^9.0.1",
|
@@ -26,28 +27,28 @@
|
|
26
27
|
"ember-fetch": "^8.1.2",
|
27
28
|
"ember-flatpickr": "^8.0.0",
|
28
29
|
"ember-in-viewport": "^4.1.0",
|
29
|
-
"ember-intl": "^
|
30
|
+
"ember-intl": "^7.0.4",
|
30
31
|
"ember-math-helpers": "^4.0.0",
|
31
|
-
"ember-power-select": "^
|
32
|
+
"ember-power-select": "^8.2.0",
|
32
33
|
"ember-truth-helpers": "^4.0.3",
|
33
34
|
"ember-uikit": "^9.1.2",
|
34
35
|
"ember-validators": "^4.1.2",
|
35
36
|
"flatpickr": "^4.6.13",
|
36
|
-
"graphql": "^15.
|
37
|
+
"graphql": "^15.9.0",
|
37
38
|
"jexl": "^2.3.0",
|
38
39
|
"lodash.isequal": "^4.5.0",
|
39
40
|
"luxon": "^3.4.4",
|
40
|
-
"reactiveweb": "^1.
|
41
|
+
"reactiveweb": "^1.3.0",
|
41
42
|
"tracked-toolbox": "^2.0.0",
|
42
|
-
"@projectcaluma/ember-core": "^
|
43
|
+
"@projectcaluma/ember-core": "^13.0.0-beta.1"
|
43
44
|
},
|
44
45
|
"devDependencies": {
|
45
46
|
"@ember/optional-features": "2.1.0",
|
46
|
-
"@ember/test-helpers": "3.3.
|
47
|
+
"@ember/test-helpers": "3.3.1",
|
47
48
|
"@embroider/test-setup": "4.0.0",
|
48
49
|
"@faker-js/faker": "8.4.1",
|
49
50
|
"broccoli-asset-rev": "3.0.0",
|
50
|
-
"ember-cli": "5.
|
51
|
+
"ember-cli": "5.10.0",
|
51
52
|
"ember-cli-clean-css": "3.0.0",
|
52
53
|
"ember-cli-code-coverage": "3.0.0",
|
53
54
|
"ember-cli-dependency-checker": "3.3.2",
|
@@ -57,25 +58,25 @@
|
|
57
58
|
"ember-cli-sri": "2.1.1",
|
58
59
|
"ember-cli-terser": "4.0.2",
|
59
60
|
"ember-load-initializers": "2.1.2",
|
60
|
-
"ember-qunit": "8.0
|
61
|
-
"ember-resolver": "
|
62
|
-
"ember-source": "5.
|
61
|
+
"ember-qunit": "8.1.0",
|
62
|
+
"ember-resolver": "12.0.1",
|
63
|
+
"ember-source": "5.10.1",
|
63
64
|
"ember-source-channel-url": "3.0.0",
|
64
65
|
"ember-try": "3.0.0",
|
65
66
|
"loader.js": "4.7.0",
|
66
67
|
"miragejs": "0.1.48",
|
67
|
-
"qunit": "2.
|
68
|
-
"qunit-dom": "3.
|
69
|
-
"
|
70
|
-
"
|
71
|
-
"uuid": "
|
72
|
-
"webpack": "5.
|
73
|
-
"@projectcaluma/ember-testing": "12.15.
|
74
|
-
"@projectcaluma/ember-workflow": "12.15.
|
68
|
+
"qunit": "2.21.1",
|
69
|
+
"qunit-dom": "3.2.0",
|
70
|
+
"sass": "1.77.8",
|
71
|
+
"uikit": "3.21.8",
|
72
|
+
"uuid": "10.0.0",
|
73
|
+
"webpack": "5.93.0",
|
74
|
+
"@projectcaluma/ember-testing": "12.15.5",
|
75
|
+
"@projectcaluma/ember-workflow": "12.15.5"
|
75
76
|
},
|
76
77
|
"peerDependencies": {
|
77
|
-
"ember-source": "
|
78
|
-
"@projectcaluma/ember-workflow": "^12.15.
|
78
|
+
"ember-source": ">= 4.0.0",
|
79
|
+
"@projectcaluma/ember-workflow": "^12.15.5"
|
79
80
|
},
|
80
81
|
"dependenciesMeta": {
|
81
82
|
"@projectcaluma/ember-core": {
|
package/translations/de.yaml
CHANGED
package/translations/en.yaml
CHANGED
package/translations/fr.yaml
CHANGED