@projectcaluma/ember-form 12.3.0 → 12.4.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.
@@ -1,5 +1,6 @@
1
1
  import { action } from "@ember/object";
2
2
  import Component from "@glimmer/component";
3
+ import { tracked } from "@glimmer/tracking";
3
4
 
4
5
  /**
5
6
  * Input component for the checkbox question type
@@ -8,6 +9,8 @@ import Component from "@glimmer/component";
8
9
  * @argument {Field} field The field for this input type
9
10
  */
10
11
  export default class CfFieldInputCheckboxComponent extends Component {
12
+ @tracked selected = this.args.field.value;
13
+
11
14
  /**
12
15
  * Update the value of the field with the slugs of the currently checked
13
16
  * boxes.
@@ -16,7 +19,7 @@ export default class CfFieldInputCheckboxComponent extends Component {
16
19
  */
17
20
  @action
18
21
  update({ target: { value, checked } }) {
19
- const valueSet = new Set(this.args.field.value);
22
+ const valueSet = new Set(this.selected);
20
23
 
21
24
  if (checked) {
22
25
  valueSet.add(value);
@@ -24,6 +27,7 @@ export default class CfFieldInputCheckboxComponent extends Component {
24
27
  valueSet.delete(value);
25
28
  }
26
29
 
27
- this.args.onSave([...valueSet]);
30
+ this.selected = [...valueSet];
31
+ this.args.onSave(this.selected);
28
32
  }
29
33
  }
@@ -1,12 +1,14 @@
1
1
  <div class="uk-inline uk-width-1-1">
2
- <a
3
- class="uk-form-icon uk-form-icon-flip"
4
- href="#"
5
- {{uk-tooltip (t "caluma.form.delete")}}
6
- {{on "click" this.clearCalendar}}
7
- >
8
- <UkIcon @icon="close" />
9
- </a>
2
+ {{#unless @disabled}}
3
+ <a
4
+ class="uk-form-icon uk-form-icon-flip"
5
+ href="#"
6
+ {{uk-tooltip (t "caluma.form.delete")}}
7
+ {{on "click" this.clearCalendar}}
8
+ >
9
+ <UkIcon @icon="close" />
10
+ </a>
11
+ {{/unless}}
10
12
  <EmberFlatpickr
11
13
  id={{@field.pk}}
12
14
  name={{@field.pk}}
@@ -119,6 +119,7 @@ fragment SimpleQuestion on Question {
119
119
  action
120
120
  color
121
121
  validateOnEnter
122
+ showValidation
122
123
  }
123
124
  }
124
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-form",
3
- "version": "12.3.0",
3
+ "version": "12.4.0",
4
4
  "description": "Ember addon for rendering Caluma forms.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -28,7 +28,7 @@
28
28
  "ember-intl": "^5.7.2",
29
29
  "ember-math-helpers": "^3.0.0",
30
30
  "ember-power-select": "^7.1.0",
31
- "ember-resources": "^6.3.1",
31
+ "ember-resources": "^6.4.0",
32
32
  "ember-uikit": "^8.0.0",
33
33
  "ember-validators": "^4.1.2",
34
34
  "graphql": "^15.8.0",
@@ -36,7 +36,7 @@
36
36
  "lodash.isequal": "^4.5.0",
37
37
  "luxon": "^3.3.0",
38
38
  "tracked-toolbox": "^2.0.0",
39
- "@projectcaluma/ember-core": "^12.3.0"
39
+ "@projectcaluma/ember-core": "^12.4.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@ember/optional-features": "2.0.0",
@@ -44,7 +44,7 @@
44
44
  "@embroider/test-setup": "3.0.1",
45
45
  "@faker-js/faker": "8.0.2",
46
46
  "broccoli-asset-rev": "3.0.0",
47
- "ember-cli": "4.12.1",
47
+ "ember-cli": "4.12.2",
48
48
  "ember-cli-code-coverage": "2.0.0",
49
49
  "ember-cli-dependency-checker": "3.3.2",
50
50
  "ember-cli-inject-live-reload": "2.1.0",
@@ -61,15 +61,15 @@
61
61
  "miragejs": "0.1.47",
62
62
  "qunit": "2.19.4",
63
63
  "qunit-dom": "2.0.0",
64
- "uikit": "3.16.23",
64
+ "uikit": "3.16.26",
65
65
  "uuid": "9.0.0",
66
66
  "webpack": "5.88.2",
67
- "@projectcaluma/ember-testing": "12.3.0",
68
- "@projectcaluma/ember-workflow": "12.3.0"
67
+ "@projectcaluma/ember-testing": "12.4.0",
68
+ "@projectcaluma/ember-workflow": "12.4.0"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "ember-source": "^4.0.0",
72
- "@projectcaluma/ember-workflow": "^12.3.0"
72
+ "@projectcaluma/ember-workflow": "^12.4.0"
73
73
  },
74
74
  "peerDependenciesMeta": {
75
75
  "@projectcaluma/ember-workflow": {