@projectcaluma/ember-form-builder 12.5.0 → 12.7.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.
@@ -16,7 +16,7 @@ hljs.registerLanguage("jexl", jexl);
16
16
  export default class CfbCodeEditorComponent extends Component {
17
17
  _editor = null;
18
18
  _cursor = null;
19
- _lastValue = null;
19
+ _lastValue = this.args.value;
20
20
 
21
21
  get value() {
22
22
  const value = this.args.value;
@@ -48,7 +48,9 @@ export default class CfbCodeEditorComponent extends Component {
48
48
 
49
49
  @action
50
50
  updateCode() {
51
- this._editor.updateCode(this.value);
51
+ if (this._lastValue === this.value) return;
52
+
53
+ this._editor.updateCode(this.value, false);
52
54
 
53
55
  if (this._cursor) {
54
56
  this._editor.restore(this._cursor);
@@ -58,10 +60,16 @@ export default class CfbCodeEditorComponent extends Component {
58
60
 
59
61
  @action
60
62
  didInsertNode(element) {
61
- this._editor = CodeJar(element, (editor) => hljs.highlightElement(editor));
62
- this._editor.onUpdate(this.onUpdate);
63
+ this._editor = CodeJar(element, (editor) => {
64
+ editor.removeAttribute("data-highlighted");
65
+ hljs.highlightElement(editor);
66
+ });
63
67
 
64
- this.updateCode();
68
+ // set initial value
69
+ this._editor.updateCode(this.value);
70
+
71
+ // register update method
72
+ this._editor.onUpdate(this.onUpdate);
65
73
 
66
74
  // eslint-disable-next-line ember/no-observers
67
75
  addObserver(this.args, "value", this, "updateCode");
@@ -23,8 +23,8 @@ export default class CfbFormEditorQuestionListItem extends Component {
23
23
  return required === true
24
24
  ? "required"
25
25
  : required
26
- ? "conditional"
27
- : "not-required";
26
+ ? "conditional"
27
+ : "not-required";
28
28
  }
29
29
 
30
30
  get hidden() {
@@ -42,8 +42,8 @@ export default class ComponentsCfbFormListComponent extends Component {
42
42
  this.args.category === "active"
43
43
  ? { isArchived: false }
44
44
  : this.args.category === "archived"
45
- ? { isArchived: true }
46
- : null;
45
+ ? { isArchived: true }
46
+ : null;
47
47
 
48
48
  const search = this.args.search ? { search: this.args.search } : null;
49
49
 
@@ -51,8 +51,8 @@ export default class ComponentsCfbFormListComponent extends Component {
51
51
  this.args.category === "unpublished"
52
52
  ? { isPublished: false }
53
53
  : this.args.category === "published"
54
- ? { isPublished: true }
55
- : null;
54
+ ? { isPublished: true }
55
+ : null;
56
56
 
57
57
  return [isArchived, isPublished, search].filter(Boolean) || null;
58
58
  }
@@ -1,6 +1,5 @@
1
1
  import Route from "@ember/routing/route";
2
2
  import { inject as service } from "@ember/service";
3
- import { t } from "ember-intl";
4
3
 
5
4
  import { navigationTitle } from "@projectcaluma/ember-form-builder/decorators";
6
5
 
@@ -8,6 +7,7 @@ export default class ApplicationRoute extends Route {
8
7
  @service intl;
9
8
 
10
9
  @navigationTitle
11
- @t("caluma.form-builder.form.allForms")
12
- title;
10
+ get title() {
11
+ return this.intl.t("caluma.form-builder.form.allForms");
12
+ }
13
13
  }
@@ -1,6 +1,5 @@
1
1
  import Route from "@ember/routing/route";
2
2
  import { inject as service } from "@ember/service";
3
- import { t } from "ember-intl";
4
3
 
5
4
  import { navigationTitle } from "@projectcaluma/ember-form-builder/decorators";
6
5
 
@@ -8,8 +7,9 @@ export default class EditQuestionsNewRoute extends Route {
8
7
  @service intl;
9
8
 
10
9
  @navigationTitle
11
- @t("caluma.form-builder.question.new")
12
- title;
10
+ get title() {
11
+ return this.intl.t("caluma.form-builder.question.new");
12
+ }
13
13
 
14
14
  model() {
15
15
  return this.modelFor("edit");
@@ -1,6 +1,5 @@
1
1
  import Route from "@ember/routing/route";
2
2
  import { inject as service } from "@ember/service";
3
- import { t } from "ember-intl";
4
3
 
5
4
  import { navigationTitle } from "@projectcaluma/ember-form-builder/decorators";
6
5
 
@@ -8,6 +7,7 @@ export default class NewRoute extends Route {
8
7
  @service intl;
9
8
 
10
9
  @navigationTitle
11
- @t("caluma.form-builder.form.new")
12
- title;
10
+ get title() {
11
+ return this.intl.t("caluma.form-builder.form.new");
12
+ }
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-form-builder",
3
- "version": "12.5.0",
3
+ "version": "12.7.0",
4
4
  "description": "Ember engine for building Caluma forms.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -10,39 +10,40 @@
10
10
  "homepage": "https://docs.caluma.io/ember-caluma",
11
11
  "repository": "github:projectcaluma/ember-caluma",
12
12
  "dependencies": {
13
- "@ember/legacy-built-in-components": "^0.4.2",
13
+ "@babel/core": "^7.23.6",
14
+ "@ember/legacy-built-in-components": "^0.5.0",
14
15
  "@ember/render-modifiers": "^2.1.0",
15
16
  "@ember/string": "^3.1.1",
16
- "@embroider/macros": "^1.13.0",
17
+ "@embroider/macros": "^1.13.3",
17
18
  "@glimmer/component": "^1.1.2",
18
19
  "@glimmer/tracking": "^1.1.2",
19
- "codejar": "^3.7.0",
20
+ "codejar": "^4.2.0",
20
21
  "ember-apollo-client": "~4.0.2",
21
- "ember-auto-import": "^2.6.3",
22
+ "ember-auto-import": "^2.7.0",
22
23
  "ember-changeset": "^4.1.2",
23
24
  "ember-changeset-validations": "^4.1.1",
24
- "ember-cli-babel": "^7.26.11",
25
- "ember-cli-htmlbars": "^6.2.0",
25
+ "ember-cli-babel": "^8.2.0",
26
+ "ember-cli-htmlbars": "^6.3.0",
26
27
  "ember-composable-helpers": "^5.0.0",
27
- "ember-concurrency": "^3.0.0",
28
- "ember-engines-router-service": "^0.3.0",
28
+ "ember-concurrency": "^3.1.1",
29
+ "ember-engines-router-service": "^0.5.0",
29
30
  "ember-fetch": "^8.1.2",
30
31
  "ember-flatpickr": "^4.0.0",
31
- "ember-intl": "^5.7.2",
32
- "ember-math-helpers": "^3.0.0",
33
- "ember-power-select": "^7.1.0",
34
- "ember-resources": "^6.4.0",
32
+ "ember-intl": "^6.4.0",
33
+ "ember-math-helpers": "^4.0.0",
34
+ "ember-power-select": "^7.2.0",
35
+ "ember-resources": "^6.4.2",
35
36
  "ember-test-selectors": "^6.0.0",
36
- "ember-uikit": "^8.0.0",
37
- "ember-validated-form": "^6.2.0",
37
+ "ember-uikit": "^9.0.0",
38
+ "ember-validated-form": "^7.0.0",
38
39
  "graphql": "^15.8.0",
39
40
  "graphql-tag": "^2.12.6",
40
- "highlight.js": "^11.8.0",
41
+ "highlight.js": "^11.9.0",
41
42
  "highlightjs-jexl": "^0.0.5",
42
43
  "jexl": "^2.3.0",
43
- "uikit": "^3.16.26",
44
- "@projectcaluma/ember-core": "^12.5.0",
45
- "@projectcaluma/ember-form": "^12.5.0"
44
+ "uikit": "^3.17.11",
45
+ "@projectcaluma/ember-core": "^12.7.0",
46
+ "@projectcaluma/ember-form": "^12.7.0"
46
47
  },
47
48
  "//": [
48
49
  "TODO: remove obsolete dependency to `ember-data` which is only necessary",
@@ -52,39 +53,51 @@
52
53
  ],
53
54
  "devDependencies": {
54
55
  "@ember/optional-features": "2.0.0",
55
- "@ember/test-helpers": "3.2.0",
56
- "@embroider/test-setup": "3.0.1",
57
- "@faker-js/faker": "8.0.2",
56
+ "@ember/test-helpers": "3.2.1",
57
+ "@embroider/test-setup": "3.0.3",
58
+ "@faker-js/faker": "8.3.1",
58
59
  "broccoli-asset-rev": "3.0.0",
59
60
  "ember-autoresize-modifier": "0.7.0",
60
- "ember-cli": "4.12.2",
61
- "ember-cli-code-coverage": "2.0.0",
61
+ "ember-cli": "5.5.0",
62
+ "ember-cli-clean-css": "3.0.0",
63
+ "ember-cli-code-coverage": "2.0.3",
62
64
  "ember-cli-dependency-checker": "3.3.2",
63
65
  "ember-cli-inject-live-reload": "2.1.0",
64
- "ember-cli-mirage": "3.0.0-alpha.3",
66
+ "ember-cli-mirage": "3.0.2",
65
67
  "ember-cli-sri": "2.1.1",
66
68
  "ember-cli-terser": "4.0.2",
67
- "ember-data": "4.12.3",
69
+ "ember-data": "5.3.0",
68
70
  "ember-engines": "0.9.0",
69
71
  "ember-load-initializers": "2.1.2",
70
- "ember-qunit": "7.0.0",
71
- "ember-resolver": "11.0.0",
72
- "ember-source": "4.12.3",
72
+ "ember-qunit": "8.0.2",
73
+ "ember-resolver": "11.0.1",
74
+ "ember-source": "5.5.0",
73
75
  "ember-source-channel-url": "3.0.0",
74
- "ember-try": "2.0.0",
76
+ "ember-try": "3.0.0",
75
77
  "loader.js": "4.7.0",
76
- "miragejs": "0.1.47",
77
- "qunit": "2.19.4",
78
- "qunit-dom": "2.0.0",
79
- "webpack": "5.88.2",
80
- "@projectcaluma/ember-testing": "12.5.0"
78
+ "miragejs": "0.1.48",
79
+ "qunit": "2.20.0",
80
+ "qunit-dom": "3.0.0",
81
+ "webpack": "5.89.0",
82
+ "@projectcaluma/ember-testing": "12.7.0"
81
83
  },
82
84
  "peerDependencies": {
83
85
  "ember-engines": "^0.9.0",
84
86
  "ember-source": "^4.0.0"
85
87
  },
88
+ "dependenciesMeta": {
89
+ "@projectcaluma/ember-core": {
90
+ "injected": true
91
+ },
92
+ "@projectcaluma/ember-form": {
93
+ "injected": true
94
+ },
95
+ "@projectcaluma/ember-testing": {
96
+ "injected": true
97
+ }
98
+ },
86
99
  "engines": {
87
- "node": "14.* || 16.* || >= 18"
100
+ "node": ">= 18"
88
101
  },
89
102
  "ember": {
90
103
  "edition": "octane"
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "declarationDir": "declarations",
5
+ "emitDeclarationOnly": true,
6
+ "noEmit": false,
7
+ "rootDir": "."
8
+ },
9
+ "include": ["addon", "addon-test-support"]
10
+ }