@projectcaluma/ember-form-builder 9.0.5 → 10.0.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/addon/components/cfb-float-input.hbs +14 -0
  3. package/addon/components/cfb-float-input.js +10 -4
  4. package/addon/components/cfb-form-editor/general.hbs +90 -86
  5. package/addon/components/cfb-form-editor/general.js +43 -45
  6. package/addon/components/cfb-form-editor/question/default.hbs +11 -9
  7. package/addon/components/cfb-form-editor/question/default.js +19 -29
  8. package/addon/components/cfb-form-editor/question/options.hbs +80 -82
  9. package/addon/components/cfb-form-editor/question/options.js +116 -105
  10. package/addon/components/cfb-form-editor/question/validation.hbs +14 -12
  11. package/addon/components/cfb-form-editor/question/validation.js +22 -31
  12. package/addon/components/cfb-form-editor/question-list/item.js +2 -4
  13. package/addon/components/cfb-form-editor/question.hbs +455 -380
  14. package/addon/components/cfb-form-editor/question.js +162 -138
  15. package/addon/components/cfb-form-list.hbs +1 -1
  16. package/addon/components/cfb-jexl-boolean-toggle-switch.hbs +12 -10
  17. package/addon/components/cfb-jexl-boolean-toggle-switch.js +11 -10
  18. package/addon/components/cfb-label.hbs +12 -4
  19. package/addon/components/cfb-toggle-switch.hbs +14 -12
  20. package/addon/gql/mutations/add-form-question.graphql +2 -2
  21. package/addon/gql/mutations/remove-form-question.graphql +2 -2
  22. package/addon/gql/mutations/reorder-form-questions.graphql +2 -2
  23. package/addon/gql/mutations/save-action-button-question.graphql +15 -0
  24. package/addon/gql/mutations/save-calculated-float-question.graphql +1 -1
  25. package/addon/gql/mutations/save-choice-question.graphql +1 -1
  26. package/addon/gql/mutations/save-date-question.graphql +1 -1
  27. package/addon/gql/mutations/save-default-date-answer.graphql +2 -6
  28. package/addon/gql/mutations/save-default-float-answer.graphql +2 -6
  29. package/addon/gql/mutations/save-default-integer-answer.graphql +2 -6
  30. package/addon/gql/mutations/save-default-list-answer.graphql +2 -6
  31. package/addon/gql/mutations/save-default-string-answer.graphql +2 -6
  32. package/addon/gql/mutations/save-default-table-answer.graphql +2 -6
  33. package/addon/gql/mutations/save-dynamic-choice-question.graphql +1 -1
  34. package/addon/gql/mutations/save-dynamic-multiple-choice-question.graphql +1 -1
  35. package/addon/gql/mutations/save-file-question.graphql +1 -1
  36. package/addon/gql/mutations/save-float-question.graphql +1 -1
  37. package/addon/gql/mutations/save-form-question.graphql +1 -1
  38. package/addon/gql/mutations/save-form.graphql +1 -1
  39. package/addon/gql/mutations/save-integer-question.graphql +1 -1
  40. package/addon/gql/mutations/save-multiple-choice-question.graphql +1 -1
  41. package/addon/gql/mutations/save-static-question.graphql +1 -1
  42. package/addon/gql/mutations/save-table-question.graphql +1 -1
  43. package/addon/gql/mutations/save-text-question.graphql +1 -1
  44. package/addon/gql/mutations/save-textarea-question.graphql +1 -1
  45. package/addon/gql/queries/form-editor-general.graphql +1 -1
  46. package/addon/gql/queries/form-editor-question.graphql +7 -3
  47. package/addon/gql/queries/form-list.graphql +1 -1
  48. package/addon/gql/queries/search-form-question.graphql +1 -1
  49. package/addon/gql/queries/search-question.graphql +1 -1
  50. package/addon/routes/edit/questions/edit.js +1 -1
  51. package/addon/routes/edit.js +1 -1
  52. package/package.json +21 -21
  53. package/translations/de.yaml +18 -4
  54. package/translations/en.yaml +18 -4
  55. package/addon/components/cfb-float-input/input.js +0 -12
  56. package/addon/components/cfb-label.js +0 -5
  57. package/addon/gql/fragments/field-answer.graphql +0 -57
  58. package/addon/gql/fragments/field-question.graphql +0 -159
  59. package/addon/gql/mutations/archive-form.graphql +0 -5
  60. package/addon/gql/mutations/remove-document.graphql +0 -5
  61. package/addon/gql/queries/all-format-validators.graphql +0 -12
  62. package/addon/gql/queries/all-work-items.graphql +0 -9
  63. package/addon/gql/queries/data-source.graphql +0 -10
  64. package/addon/gql/queries/get-document-answers.graphql +0 -21
  65. package/addon/gql/queries/get-document-forms.graphql +0 -20
  66. package/addon/gql/queries/get-document-used-dynamic-options.graphql +0 -12
  67. package/addon/gql/queries/get-dynamic-options.graphql +0 -29
  68. package/addon/gql/queries/get-fileanswer-info.graphql +0 -13
  69. package/app/components/cfb-float-input/input.js +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # [@projectcaluma/ember-form-builder-v10.0.0](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-form-builder-v9.1.0...@projectcaluma/ember-form-builder-v10.0.0) (2021-11-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **action-button:** hide unnecessary field and improve naming of confirm text ([b722d96](https://github.com/projectcaluma/ember-caluma/commit/b722d9605407bd79bcebfc3f9d3bbefa846841e2))
7
+
8
+
9
+ ### chore
10
+
11
+ * **deps:** update dependencies and drop support for node 10 ([51d6dee](https://github.com/projectcaluma/ember-caluma/commit/51d6deeda9811518622ba0cefd8d3876651dab4f))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * **deps:** Remove support for node v10
@@ -0,0 +1,14 @@
1
+ {{component @labelComponent}}
2
+
3
+ <input
4
+ class="uk-input"
5
+ name={{@name}}
6
+ ...attributes
7
+ step="any"
8
+ type="number"
9
+ value={{@value}}
10
+ {{on "change" this.onUpdate}}
11
+ />
12
+
13
+ {{component @hintComponent}}
14
+ {{component @errorComponent}}
@@ -1,5 +1,11 @@
1
- import RenderComponent from "ember-validated-form/components/validated-input/-themes/uikit/render";
1
+ import { action } from "@ember/object";
2
+ import Component from "@glimmer/component";
2
3
 
3
- export default RenderComponent.extend({
4
- inputComponent: "cfb-float-input/input",
5
- });
4
+ export default class CfbFloatInput extends Component {
5
+ @action
6
+ onUpdate(event) {
7
+ event.preventDefault();
8
+ this.args.update(event.target.value);
9
+ this.args.setDirty();
10
+ }
11
+ }
@@ -1,94 +1,98 @@
1
- {{#if data.isRunning}}
2
- <div class="uk-flex uk-flex-center uk-flex-middle uk-height-small">
3
- {{uk-spinner ratio=2}}
4
- </div>
5
- {{else}}
6
- {{#with data.lastSuccessful.value.firstObject.node as |model|}}
7
- <ValidatedForm
8
- @model={{changeset model validations}}
9
- @on-submit={{perform submit}}
10
- as |f|
11
- >
12
- {{f.input
13
- type="text"
14
- label=(t "caluma.form-builder.form.name")
15
- name="name"
16
- required=true
17
- on-update=(action "updateName")
18
- }}
19
-
20
- {{#if (or slug (not prefix))}}
21
- {{f.input
22
- type="text"
23
- label=(t "caluma.form-builder.form.slug")
24
- name="slug"
25
- required=true
26
- disabled=slug
27
- on-update=(action "updateSlug")
28
- }}
29
- {{else}}
1
+ <div
2
+ {{did-insert (perform this.data)}}
3
+ {{did-update (perform this.data) @slug}}
4
+ >
5
+ {{#if this.data.isRunning}}
6
+ <div class="uk-flex uk-flex-center uk-flex-middle uk-height-small">
7
+ <UkSpinner ratio="2" />
8
+ </div>
9
+ {{else}}
10
+ {{#with this.data.lastSuccessful.value.firstObject.node as |model|}}
11
+ <ValidatedForm
12
+ @model={{changeset model this.Validations}}
13
+ @on-submit={{perform this.submit}}
14
+ as |f|
15
+ >
30
16
  <f.input
31
- @name="slug"
17
+ @type="text"
18
+ @label={{t "caluma.form-builder.form.name"}}
19
+ @name="name"
32
20
  @required={{true}}
33
- @disabled={{slug}}
34
- @label={{t "caluma.form-builder.question.slug"}}
35
- @on-update={{action "updateSlug" value="target.value"}}
36
- as |fi|
37
- >
38
- <div class="cfb-prefixed">
39
- <span class="cfb-prefixed-slug">{{prefix}}</span>
21
+ @on-update={{this.updateName}}
22
+ />
40
23
 
41
- {{validated-input/types/-themes/uikit/input
42
- type="text"
43
- model=fi.model
44
- name=fi.name
45
- value=fi.value
46
- update=fi.update
47
- setDirty=fi.setDirty
48
- inputId=fi.inputId
49
- isValid=fi.isValid
50
- isInvalid=fi.isInvalid
51
- }}
52
- </div>
53
- </f.input>
54
- {{/if}}
24
+ {{#if (or @slug (not this.prefix))}}
25
+ <f.input
26
+ @type="text"
27
+ @name="slug"
28
+ @label={{t "caluma.form-builder.form.slug"}}
29
+ @required={{true}}
30
+ @disabled={{@slug}}
31
+ @on-update={{this.updateSlug}}
32
+ />
33
+ {{else}}
34
+ <f.input
35
+ @name="slug"
36
+ @required={{true}}
37
+ @disabled={{@slug}}
38
+ @label={{t "caluma.form-builder.question.slug"}}
39
+ @on-update={{this.updateSlug value="target.value"}}
40
+ as |fi|
41
+ >
42
+ <div class="cfb-prefixed">
43
+ <span class="cfb-prefixed-slug">{{this.prefix}}</span>
44
+ <f.input
45
+ @type="text"
46
+ @model={{fi.model}}
47
+ @name={{fi.name}}
48
+ @value={{fi.value}}
49
+ @update={{fi.update}}
50
+ @setDirty={{fi.setDirty}}
51
+ @inputId={{fi.inputId}}
52
+ @isValid={{fi.isValid}}
53
+ @isInvalid={{fi.isInvalid}}
54
+ />
55
+ </div>
56
+ </f.input>
57
+ {{/if}}
55
58
 
56
- {{f.input
57
- type="textarea"
58
- label=(t "caluma.form-builder.form.description")
59
- name="description"
60
- rows=4
61
- }}
59
+ <f.input
60
+ @name="description"
61
+ @type="textarea"
62
+ @label={{t "caluma.form-builder.form.description"}}
63
+ @rows="4"
64
+ />
62
65
 
63
- {{f.input
64
- name="isArchived"
65
- label=(t "caluma.form-builder.form.isArchived")
66
- required=true
67
- renderComponent=(component "cfb-toggle-switch" size="small")
68
- class="uk-flex uk-flex-between uk-flex-column"
69
- }}
66
+ <f.input
67
+ class="uk-flex uk-flex-between uk-flex-column"
68
+ @name="isArchived"
69
+ @label={{t "caluma.form-builder.form.isArchived"}}
70
+ @required={{true}}
71
+ @renderComponent={{component "cfb-toggle-switch" size="small"}}
72
+ />
70
73
 
71
- {{f.input
72
- name="isPublished"
73
- label=(t "caluma.form-builder.form.isPublished")
74
- required=true
75
- renderComponent=(component "cfb-toggle-switch" size="small")
76
- class="uk-flex uk-flex-between uk-flex-column"
77
- }}
74
+ <f.input
75
+ class="uk-flex uk-flex-between uk-flex-column"
76
+ @name="isPublished"
77
+ @label={{t "caluma.form-builder.form.isPublished"}}
78
+ @required={{true}}
79
+ @renderComponent={{component "cfb-toggle-switch" size="small"}}
80
+ />
78
81
 
79
- <div class="uk-text-right">
80
- {{f.submit
81
- disabled=(or f.loading f.model.isInvalid)
82
- label=(t "caluma.form-builder.global.save")
83
- }}
82
+ <div class="uk-text-right">
83
+ <f.submit
84
+ @disabled={{or f.loading f.model.isInvalid}}
85
+ @label={{t "caluma.form-builder.global.save"}}
86
+ />
87
+ </div>
88
+ </ValidatedForm>
89
+ {{else}}
90
+ <div
91
+ class="uk-text-center uk-text-muted uk-padding uk-padding-remove-horizontal"
92
+ >
93
+ {{uk-icon "bolt" ratio=5}}
94
+ <p>{{t "caluma.form-builder.form.not-found" slug=@slug}}</p>
84
95
  </div>
85
- </ValidatedForm>
86
- {{else}}
87
- <div
88
- class="uk-text-center uk-text-muted uk-padding uk-padding-remove-horizontal"
89
- >
90
- {{uk-icon "bolt" ratio=5}}
91
- <p>{{t "caluma.form-builder.form.not-found" slug=slug}}</p>
92
- </div>
93
- {{/with}}
94
- {{/if}}
96
+ {{/with}}
97
+ {{/if}}
98
+ </div>
@@ -1,35 +1,30 @@
1
1
  import { getOwner } from "@ember/application";
2
2
  import { A } from "@ember/array";
3
- import Component from "@ember/component";
4
- import { computed } from "@ember/object";
3
+ import { action } from "@ember/object";
5
4
  import { inject as service } from "@ember/service";
5
+ import Component from "@glimmer/component";
6
6
  import { queryManager } from "ember-apollo-client";
7
7
  import { optional } from "ember-composable-helpers/helpers/optional";
8
- import { task, timeout } from "ember-concurrency";
8
+ import { timeout, restartableTask, dropTask } from "ember-concurrency";
9
9
 
10
- import validations from "../../validations/form";
10
+ import FormValidations from "../../validations/form";
11
11
 
12
12
  import slugify from "@projectcaluma/ember-core/utils/slugify";
13
13
  import saveFormMutation from "@projectcaluma/ember-form-builder/gql/mutations/save-form.graphql";
14
14
  import checkFormSlugQuery from "@projectcaluma/ember-form-builder/gql/queries/check-form-slug.graphql";
15
15
  import formEditorGeneralQuery from "@projectcaluma/ember-form-builder/gql/queries/form-editor-general.graphql";
16
16
 
17
- export default Component.extend({
18
- validations,
17
+ export default class CfbFormEditorGeneral extends Component {
18
+ @service notification;
19
+ @service intl;
20
+ @service calumaOptions;
21
+ @queryManager apollo;
19
22
 
20
- notification: service(),
21
- intl: service(),
22
- calumaOptions: service(),
23
+ Validations = FormValidations;
23
24
 
24
- apollo: queryManager(),
25
-
26
- didReceiveAttrs() {
27
- this._super();
28
- this.data.perform();
29
- },
30
-
31
- data: task(function* () {
32
- if (!this.slug) {
25
+ @restartableTask
26
+ *data() {
27
+ if (!this.args.slug) {
33
28
  return A([
34
29
  {
35
30
  node: {
@@ -45,22 +40,24 @@ export default Component.extend({
45
40
  return yield this.apollo.watchQuery(
46
41
  {
47
42
  query: formEditorGeneralQuery,
48
- variables: { slug: this.slug },
43
+ variables: { slug: this.args.slug },
49
44
  fetchPolicy: "cache-and-network",
50
45
  },
51
46
  "allForms.edges"
52
47
  );
53
- }).restartable(),
48
+ }
54
49
 
55
- prefix: computed("calumaOptions.namespace", function () {
50
+ get prefix() {
56
51
  return this.calumaOptions.namespace
57
52
  ? `${this.calumaOptions.namespace}-`
58
53
  : "";
59
- }),
54
+ }
60
55
 
61
- submit: task(function* (changeset) {
56
+ @dropTask
57
+ *submit(changeset) {
62
58
  try {
63
- const slug = ((!this.slug && this.prefix) || "") + changeset.get("slug");
59
+ const slug =
60
+ ((!this.args.slug && this.prefix) || "") + changeset.get("slug");
64
61
 
65
62
  const form = yield this.apollo.mutate(
66
63
  {
@@ -81,24 +78,25 @@ export default Component.extend({
81
78
  this.notification.success(
82
79
  this.intl.t(
83
80
  `caluma.form-builder.notification.form.${
84
- this.slug ? "save" : "create"
81
+ this.args.slug ? "save" : "create"
85
82
  }.success`
86
83
  )
87
84
  );
88
85
 
89
- optional([this.get("on-after-submit")])(form);
86
+ optional([this.args["on-after-submit"]])(form);
90
87
  } catch (e) {
91
88
  this.notification.danger(
92
89
  this.intl.t(
93
90
  `caluma.form-builder.notification.form.${
94
- this.slug ? "save" : "create"
91
+ this.args.slug ? "save" : "create"
95
92
  }.error`
96
93
  )
97
94
  );
98
95
  }
99
- }).drop(),
96
+ }
100
97
 
101
- validateSlug: task(function* (slug, changeset) {
98
+ @restartableTask
99
+ *validateSlug(slug, changeset) {
102
100
  /* istanbul ignore next */
103
101
  if (
104
102
  getOwner(this).resolveRegistration("config:environment").environment !==
@@ -121,24 +119,24 @@ export default Component.extend({
121
119
  this.intl.t("caluma.form-builder.validations.form.slug")
122
120
  );
123
121
  }
124
- }).restartable(),
122
+ }
125
123
 
126
- actions: {
127
- updateName(value, changeset) {
128
- changeset.set("name", value);
124
+ @action
125
+ updateName(value, changeset) {
126
+ changeset.set("name", value);
129
127
 
130
- if (!this.slug) {
131
- const slug = slugify(value, { locale: this.intl.primaryLocale });
132
- changeset.set("slug", slug);
128
+ if (!this.args.slug) {
129
+ const slug = slugify(value, { locale: this.intl.primaryLocale });
130
+ changeset.set("slug", slug);
133
131
 
134
- this.validateSlug.perform(this.prefix + slug, changeset);
135
- }
136
- },
132
+ this.validateSlug.perform(this.prefix + slug, changeset);
133
+ }
134
+ }
137
135
 
138
- updateSlug(value, changeset) {
139
- changeset.set("slug", value);
136
+ @action
137
+ updateSlug(value, changeset) {
138
+ changeset.set("slug", value);
140
139
 
141
- this.validateSlug.perform(this.prefix + value, changeset);
142
- },
143
- },
144
- });
140
+ this.validateSlug.perform(this.prefix + value, changeset);
141
+ }
142
+ }
@@ -1,11 +1,13 @@
1
- {{component labelComponent}}
1
+ <div class="uk-margin">
2
+ {{component @labelComponent}}
2
3
 
3
- {{component
4
- (get-widget this.field.question)
5
- field=this.field
6
- disabled=false
7
- onSave=this.onUpdate
8
- }}
4
+ {{component
5
+ (get-widget this.field.question)
6
+ field=this.field
7
+ disabled=false
8
+ onSave=this.onUpdate
9
+ }}
9
10
 
10
- {{component hintComponent}}
11
- {{component errorComponent}}
11
+ {{component @hintComponent}}
12
+ {{component @errorComponent}}
13
+ </div>
@@ -1,19 +1,17 @@
1
1
  import { getOwner } from "@ember/application";
2
- // eslint-disable-next-line ember/no-computed-properties-in-native-classes
3
- import { action, computed, get, set } from "@ember/object";
2
+ import { action } from "@ember/object";
4
3
  import { inject as service } from "@ember/service";
5
- import RenderComponent from "ember-validated-form/components/validated-input/-themes/uikit/render";
4
+ import Component from "@glimmer/component";
6
5
 
7
6
  import { TYPE_MAP } from "@projectcaluma/ember-form/lib/field";
8
7
 
9
- export default class CfbFormEditorQuestionDefault extends RenderComponent {
8
+ export default class CfbFormEditorQuestionDefault extends Component {
10
9
  @service router;
11
10
 
12
- @computed("model.{id,__typename}")
13
11
  get question() {
14
12
  const raw = {
15
- ...this.model.get("data"),
16
- ...this.model.get("change"),
13
+ ...this.args.model.get("data"),
14
+ ...this.args.model.get("change"),
17
15
  // While we want the real value, typename, etc. of the question,
18
16
  // the question should never be required or hidden in the form-builder.
19
17
  // We need to set a value here as no value will lead to a Jexl error.
@@ -31,13 +29,13 @@ export default class CfbFormEditorQuestionDefault extends RenderComponent {
31
29
 
32
30
  if (
33
31
  ["ChoiceQuestion", "MultipleChoiceQuestion"].includes(
34
- this.model.__typename
32
+ this.args.model.__typename
35
33
  )
36
34
  ) {
37
35
  // Use Power Select for choice questions to save space.
38
36
  raw.meta = { widgetOverride: "cf-field/input/powerselect" };
39
37
 
40
- const key = this.model.__typename
38
+ const key = this.args.model.__typename
41
39
  .replace(/^./, (match) => match.toLowerCase())
42
40
  .replace("Question", "Options");
43
41
 
@@ -45,42 +43,33 @@ export default class CfbFormEditorQuestionDefault extends RenderComponent {
45
43
  delete raw.options;
46
44
  }
47
45
 
48
- if (this.model.__typename === "TableQuestion") {
46
+ if (this.args.model.__typename === "TableQuestion") {
49
47
  raw.meta = { widgetOverride: "cfb-form-editor/question/default/table" };
50
48
  }
51
49
 
52
50
  return raw;
53
51
  }
54
52
 
55
- // This @computed decorator is important. Otherwise, Ember will - under some
56
- // circumstances - enter the getter method multiple times and throw an error.
57
- @computed(
58
- "model.{__typename,slug}",
59
- "question",
60
- "question.slug",
61
- "router.currentRoute.attributes.formSlug",
62
- "value.content"
63
- )
64
53
  get field() {
65
54
  const rootForm = {
66
55
  slug:
67
56
  // There is no currentRoute in the integration tests.
68
- get(this, "router.currentRoute.attributes.formSlug") || "dv-form",
57
+ this.router?.currentRoute?.attributes?.formSlug || "dv-form",
69
58
  meta: {},
70
59
  questions: [this.question],
71
60
  __typename: "Form",
72
61
  };
73
62
 
74
63
  const newAnswer = {
75
- id: btoa(`Answer:dv-answer-${this.model.slug}`),
76
- __typename: TYPE_MAP[this.model.__typename],
64
+ id: btoa(`Answer:dv-answer-${this.args.model.slug}`),
65
+ __typename: TYPE_MAP[this.args.model.__typename],
77
66
  };
78
67
 
79
68
  // The value depends on where it comes from. If there is a default value
80
69
  // present on load the `value.content` will be set. After an update through
81
70
  // this component the value will be a POJO on `value`.
82
71
  const answer = {
83
- ...(this.value?.content || this.value || newAnswer),
72
+ ...(this.args._value?.content || this.args._value || newAnswer),
84
73
  question: this.question,
85
74
  };
86
75
 
@@ -108,7 +97,7 @@ export default class CfbFormEditorQuestionDefault extends RenderComponent {
108
97
  .factoryFor("caluma-model:document")
109
98
  .create({
110
99
  raw: {
111
- id: btoa(`Document:dv-document-${this.model.slug}`),
100
+ id: btoa(`Document:dv-document-${this.args.model.slug}`),
112
101
  rootForm,
113
102
  forms: [rootForm],
114
103
  answers: [answer],
@@ -119,12 +108,13 @@ export default class CfbFormEditorQuestionDefault extends RenderComponent {
119
108
  return document.findField(this.question.slug);
120
109
  }
121
110
 
122
- @action async onUpdate(value) {
123
- set(this, "field.answer.value", value);
111
+ @action
112
+ async onUpdate(value) {
113
+ this.field.answer.value = value;
124
114
 
125
115
  await this.field.validate.perform();
126
116
 
127
- this.update({
117
+ this.args.update({
128
118
  [this.field.answer._valueKey]: this.field.answer.serializedValue,
129
119
  __typename: this.field.answer.__typename,
130
120
  id: this.field.answer.id,
@@ -132,9 +122,9 @@ export default class CfbFormEditorQuestionDefault extends RenderComponent {
132
122
 
133
123
  if (this.field.errors.length > 0) {
134
124
  // The errors must be pushed after calling update.
135
- this.model.pushErrors(this.name, ...this.field.errors);
125
+ this.args.model.pushErrors(this.args.name, ...this.field.errors);
136
126
  }
137
127
 
138
- this.setDirty();
128
+ this.args.setDirty();
139
129
  }
140
130
  }