not-bulma 1.0.32 → 1.0.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-bulma",
3
- "version": "1.0.32",
3
+ "version": "1.0.35",
4
4
  "description": "not-* family UI components on Bulma CSS Framework",
5
5
  "main": "src/index.js",
6
6
  "svelte": "src/index.js",
@@ -9,7 +9,7 @@
9
9
  export let align = 'left';
10
10
 
11
11
  let size2;
12
- $: size2 = subsize?subsize:(size<6?size+1:size);
12
+ $: size2 = subsize?subsize:(parseInt(size)<6?parseInt(size)+1:size);
13
13
  $: spacedStyle = (spaced?'is-spaced':'');
14
14
 
15
15
  $: resultTitle = `<h${size} style="text-align: ${align};" class="title ${spacedStyle} is-${size}">${$LOCALE[title]}</h${size}>`;
@@ -1,225 +1,226 @@
1
- import {
2
- Runner
3
- } from 'not-validation';
1
+ import { Runner } from "not-validation";
4
2
 
5
- import {VARIANTS} from '../../LIB.js';
6
- import Lib from '../../lib.js';
7
- import notCommon from '../../common';
8
- import notBase from '../../base';
3
+ import { VARIANTS } from "../../LIB.js";
4
+ import Lib from "../../lib.js";
5
+ import notCommon from "../../common";
6
+ import notBase from "../../base";
9
7
 
10
- import UICommon from '../../../elements/common.js';
11
- import FormHelpers from './form.helpers.js';
12
- import UIFormComponent from './form.svelte';
8
+ import UICommon from "../../../elements/common.js";
9
+ import FormHelpers from "./form.helpers.js";
10
+ import UIFormComponent from "./form.svelte";
13
11
 
14
- import {
15
- DEFAULT_STATUS_SUCCESS,
16
- DEFAULT_STATUS_ERROR
17
- } from '../../const';
12
+ import { DEFAULT_STATUS_SUCCESS, DEFAULT_STATUS_ERROR } from "../../const";
18
13
 
19
- const DEFAULT_CONTAINER_SELECTOR = '.form';
20
- const DEFAULT_ACTION_NAME = 'default';
21
- const DEFAULT_VARIANT_NAME = 'noname';
14
+ const DEFAULT_CONTAINER_SELECTOR = ".form";
15
+ const DEFAULT_ACTION_NAME = "default";
16
+ const DEFAULT_VARIANT_NAME = "noname";
22
17
 
23
18
  class notForm extends notBase {
24
- //UI renderer component class constructor
25
- #uiComponent = null;
26
- //form validation
27
- #validationRunner = null;
28
- //ui component
29
- #form = null;
30
- //model.action
31
- #action = DEFAULT_ACTION_NAME;
32
- //fields schemas
33
- #fields = new Lib(); //fields of UI
34
- //variants sets for select menus and so on
35
- #variants = null; //variants for UI
36
-
37
- constructor({
38
- target = null,
39
- name = 'Default',
40
- options = {},
41
- working = {},
42
- data = {},
43
- ui = UIFormComponent, //default UI
44
- }) {
45
- super({
46
- working: {
47
- name: `${name}Form`,
48
- ...working,
49
- },
50
- options,
51
- data
52
- });
53
- this.#variants = new Lib(VARIANTS.getContent());
54
- if(target){
55
- this.setOptions('target', target);
56
- }
57
- this.#uiComponent = ui;
58
- if (notCommon.objHas(options, 'action')) {
59
- this.#action = options.action;
60
- }
61
- this.initForm();
62
- }
63
-
64
- initForm() {
65
- if (this.getOptions('autoInit', true)) {
66
- this.initLibs();
67
- }
68
- if (this.getOptions('autoRender', true)) {
69
- this.initUI();
70
- }
71
- }
72
-
73
- initLibs() {
74
- this.initFields();
75
- this.initVariants();
76
- this.initValidator();
77
- }
78
-
79
- reInit() {
80
- this.initLibs();
81
- this.updateUI();
82
- this.resetLoading();
83
- }
84
-
85
- initFields() {
86
- const manifest = this.getFormManifest();
87
- if (notCommon.objHas(manifest, 'fields') && this.#fields.isEmpty()) {
88
- this.#fields.import(manifest.fields); //all fields available in model manifest
89
- }
90
- }
91
-
92
- initVariants() {
93
- if (this.getOptions('variants')) {
94
- this.#variants.import(this.getOptions('variants'));
95
- }
96
- }
97
-
98
- //creating validators runner for this specific form
99
- initValidator() {
100
- this.#validationRunner = Runner(this.getFormValidators());
101
- }
102
-
103
- initUI() {
104
- try {
105
- const props = this.#getFormProps({
106
- manifest: this.getFormManifest(),
107
- formOptions: this.getFormOptions(),
108
- data: this.getFormData(),
109
- });
110
- const target = this.getFormTargetEl();
111
- while(target.children.length) target.removeChild(target.firstChild);
112
- this.#form = new this.#uiComponent({
113
- target,
114
- props
115
- });
116
- this.#bindUIEvents();
117
- this.validateForm();
118
- } catch (e) {
119
- this.error(e);
120
- }
121
- }
122
-
123
- updateUI() {
124
- try {
125
- const props = this.#getFormProps({
126
- manifest: this.getFormManifest(),
127
- formOptions: this.getFormOptions(),
128
- data: this.getFormData(),
129
- });
130
- this.#form.$set(props);
131
- this.validateForm();
132
- } catch (e) {
133
- this.error(e);
134
- }
135
- }
136
-
137
- #bindUIEvents() {
138
- this.#form.$on('change', () => this.validateForm());
139
- this.#form.$on('change',
140
- (ev) => {
141
- this.emit('change', ev.detail);
142
- this.emit(`change.${ev.detail.field}`, ev.detail.value);
143
- }
144
- );
145
- this.#form.$on('submit', (ev) => this.submit(ev.detail));
146
- this.#form.$on('reject', () => this.reject());
147
- this.#form.$on('error', ({
148
- detail
149
- }) => this.emit('error', detail));
150
- }
151
-
152
- async validateForm() {
153
- try {
154
- const validationResult = await this.#validationRunner(this.#form.collectData(), this.getFormAction());
155
- this.#form.updateFormValidationStatus(validationResult.getReport());
156
- if (!validationResult.clean) {
157
- this.emit('error', validationResult.getReport());
158
- }
159
- } catch (e) {
160
- const report = {
161
- form: [UICommon.ERROR_DEFAULT, e.message]
162
- };
163
- this.#form && this.#form.updateFormValidationStatus(report);
164
- this.emit('error', report);
165
- notCommon.report(e);
166
- }
167
- }
168
-
169
- submit(data) {
170
- this.emit('submit', data);
171
- }
172
-
173
- reject() {
174
- this.emit('reject');
175
- }
176
-
177
- setLoading() {
178
- this.emit('loading');
179
- this.#form.setLoading();
180
- }
181
-
182
- resetLoading() {
183
- this.emit('loaded');
184
- this.#form.resetLoading();
185
- }
186
-
187
- destroy() {
188
- this.emit('destroy');
189
- if (this.#form){
190
- this.#form.$destroy && this.#form.$destroy();
191
- this.#form.destroy && this.#form.destroy();
192
- this.#form = null;
193
- }
194
- this.#validationRunner = null;
195
- this.#action = null;
196
- this.#fields = null;
197
- this.#variants = null;
198
- this.setOptions(null);
199
- this.setWorking(null);
200
- this.setData(null);
201
- }
202
-
203
- #getFormProps({
204
- manifest, //model manifest
205
- formOptions = {
206
- ui: {},
207
- fields: {}
208
- }, //some options
209
- data = null //initial data for form
210
- }) {
211
- const action = this.#action;
212
- if (typeof formOptions === 'undefined' || formOptions === null) {
213
- formOptions = {
214
- ui: {},
215
- fields: {}
216
- };
217
- }
218
-
219
- const form = FormHelpers.initFormByField(
220
- //form seed object
221
- {},
222
- /*
19
+ //UI renderer component class constructor
20
+ #uiComponent = null;
21
+ //form validation
22
+ #validationRunner = null;
23
+ //ui component
24
+ #form = null;
25
+ //model.action
26
+ #action = DEFAULT_ACTION_NAME;
27
+ //fields schemas
28
+ #fields = new Lib(); //fields of UI
29
+ //variants sets for select menus and so on
30
+ #variants = null; //variants for UI
31
+
32
+ constructor({
33
+ target = null,
34
+ name = "Default",
35
+ options = {},
36
+ working = {},
37
+ data = {},
38
+ ui = UIFormComponent, //default UI
39
+ }) {
40
+ super({
41
+ working: {
42
+ name: `${name}Form`,
43
+ ...working,
44
+ },
45
+ options,
46
+ data,
47
+ });
48
+ this.#variants = new Lib(VARIANTS.getContent());
49
+ if (target) {
50
+ this.setOptions("target", target);
51
+ }
52
+ this.#uiComponent = ui;
53
+ if (notCommon.objHas(options, "action")) {
54
+ this.#action = options.action;
55
+ }
56
+ this.initForm();
57
+ }
58
+
59
+ initForm() {
60
+ if (this.getOptions("autoInit", true)) {
61
+ this.initLibs();
62
+ }
63
+ if (this.getOptions("autoRender", true)) {
64
+ this.initUI();
65
+ }
66
+ }
67
+
68
+ initLibs() {
69
+ this.initFields();
70
+ this.initVariants();
71
+ this.initValidator();
72
+ }
73
+
74
+ reInit() {
75
+ this.initLibs();
76
+ this.updateUI();
77
+ this.resetLoading();
78
+ }
79
+
80
+ initFields() {
81
+ const manifest = this.getFormManifest();
82
+ if (notCommon.objHas(manifest, "fields") && this.#fields.isEmpty()) {
83
+ this.#fields.import(manifest.fields); //all fields available in model manifest
84
+ }
85
+ }
86
+
87
+ initVariants() {
88
+ if (this.getOptions("variants")) {
89
+ this.#variants.import(this.getOptions("variants"));
90
+ }
91
+ }
92
+
93
+ //creating validators runner for this specific form
94
+ initValidator() {
95
+ this.#validationRunner = Runner(this.getFormValidators());
96
+ }
97
+
98
+ initUI() {
99
+ try {
100
+ const props = this.#getFormProps({
101
+ manifest: this.getFormManifest(),
102
+ formOptions: this.getFormOptions(),
103
+ data: this.getFormData(),
104
+ injectedProps: this.getFormInjectedProps(),
105
+ });
106
+ const target = this.getFormTargetEl();
107
+ while (target.children.length)
108
+ target.removeChild(target.firstChild);
109
+ this.#form = new this.#uiComponent({
110
+ target,
111
+ props,
112
+ });
113
+ this.#bindUIEvents();
114
+ this.validateForm();
115
+ } catch (e) {
116
+ this.error(e);
117
+ }
118
+ }
119
+
120
+ updateUI() {
121
+ try {
122
+ const props = this.#getFormProps({
123
+ manifest: this.getFormManifest(),
124
+ formOptions: this.getFormOptions(),
125
+ data: this.getFormData(),
126
+ injectedProps: this.getFormInjectedProps(),
127
+ });
128
+ this.#form.$set(props);
129
+ this.validateForm();
130
+ } catch (e) {
131
+ this.error(e);
132
+ }
133
+ }
134
+
135
+ #bindUIEvents() {
136
+ this.#form.$on("change", () => this.validateForm());
137
+ this.#form.$on("change", (ev) => {
138
+ this.emit("change", ev.detail);
139
+ this.emit(`change.${ev.detail.field}`, ev.detail.value);
140
+ });
141
+ this.#form.$on("submit", (ev) => this.submit(ev.detail));
142
+ this.#form.$on("reject", () => this.reject());
143
+ this.#form.$on("error", ({ detail }) => this.emit("error", detail));
144
+ }
145
+
146
+ async validateForm() {
147
+ if (this.getOptions("readonly", false)) {
148
+ return;
149
+ }
150
+ try {
151
+ const validationResult = await this.#validationRunner(
152
+ this.#form.collectData(),
153
+ this.getFormAction()
154
+ );
155
+ this.#form.updateFormValidationStatus(validationResult.getReport());
156
+ if (!validationResult.clean) {
157
+ this.emit("error", validationResult.getReport());
158
+ }
159
+ } catch (e) {
160
+ const report = {
161
+ form: [UICommon.ERROR_DEFAULT, e.message],
162
+ };
163
+ this.#form && this.#form.updateFormValidationStatus(report);
164
+ this.emit("error", report);
165
+ notCommon.report(e);
166
+ }
167
+ }
168
+
169
+ submit(data) {
170
+ this.emit("submit", data);
171
+ }
172
+
173
+ reject() {
174
+ this.emit("reject");
175
+ }
176
+
177
+ setLoading() {
178
+ this.emit("loading");
179
+ this.#form.setLoading();
180
+ }
181
+
182
+ resetLoading() {
183
+ this.emit("loaded");
184
+ this.#form.resetLoading();
185
+ }
186
+
187
+ destroy() {
188
+ this.emit("destroy");
189
+ if (this.#form) {
190
+ this.#form.$destroy && this.#form.$destroy();
191
+ this.#form.destroy && this.#form.destroy();
192
+ this.#form = null;
193
+ }
194
+ this.#validationRunner = null;
195
+ this.#action = null;
196
+ this.#fields = null;
197
+ this.#variants = null;
198
+ this.setOptions(null);
199
+ this.setWorking(null);
200
+ this.setData(null);
201
+ }
202
+
203
+ #getFormProps({
204
+ manifest, //model manifest
205
+ formOptions = {
206
+ ui: {},
207
+ fields: {},
208
+ }, //some options
209
+ data = null, //initial data for form
210
+ injectedProps = {},
211
+ }) {
212
+ const action = this.#action;
213
+ if (typeof formOptions === "undefined" || formOptions === null) {
214
+ formOptions = {
215
+ ui: {},
216
+ fields: {},
217
+ };
218
+ }
219
+
220
+ const form = FormHelpers.initFormByField(
221
+ //form seed object
222
+ {},
223
+ /*
223
224
  Form structure
224
225
  [
225
226
  //each item is line of form
@@ -230,195 +231,205 @@ class notForm extends notBase {
230
231
  [email, telephone]
231
232
  ]
232
233
  */
233
- manifest.actions[action].fields, //form fields structure
234
- this.#variants, //variants library
235
- this.#fields, //fields library
236
- formOptions.fields, //form wide fields options
237
- data
238
- );
239
-
240
- return {
241
- //if no auto init of form structure, set to loading state
242
- loading: !this.getOptions('autoInit', true),
243
- title: manifest.actions[action].title,
244
- description: manifest.actions[action].description,
245
- fields: manifest.actions[action].fields,
246
- form,
247
- //injecting options to UI from top level input
248
- ...formOptions.ui, //form UI options
249
- };
250
- }
251
-
252
- getName() {
253
- return this.getWorking('name');
254
- }
255
-
256
- getFormAction() {
257
- return this.#action;
258
- }
259
-
260
- setFormAction(val) {
261
- if (val && val !== this.#action) {
262
- this.#action = val;
263
- this.#form && this.#form.$destroy();
264
- this.initForm();
265
- }
266
- }
267
-
268
- processResult(result) {
269
- if (result.status === DEFAULT_STATUS_SUCCESS) {
270
- this.setFormSuccess();
271
- return true;
272
- } else {
273
- this.setFormErrors(result);
274
- return false;
275
- }
276
- }
277
-
278
- /**
279
- * Form validation result
280
- **/
281
- setFormSuccess() {
282
- this.#form.showSuccess();
283
- this.emit('success');
284
- }
285
-
286
- setFormErrors(result) {
287
- const status = {
288
- form: [],
289
- fields: {}
290
- };
291
- if (result.message) {
292
- status.form.push(result.message);
293
- }
294
- if (result.errors && Object.keys(result.errors).length > 0) {
295
- status.fields = { ...result.errors
296
- };
297
- }
298
- this.#form.updateFormValidationStatus(status);
299
- this.emit('error', status);
300
- }
301
-
302
- /**
303
- * Returns variant by collection name and item id
304
- * @param {string} name name of the variants collection
305
- * @param {string|number} id item identificator
306
- * @returns {object} item
307
- **/
308
- getVariant(name, id) {
309
- let lib = this.#variants.get(name);
310
- let result = lib.find(item => item.id === id);
311
- if (result) {
312
- return result;
313
- }
314
- return null;
315
- }
316
-
317
- /***
318
- * Redefinable getters
319
- **/
320
-
321
- getFormTargetEl() {
322
- const targetEl = this.getOptions(
323
- 'target',
324
- DEFAULT_CONTAINER_SELECTOR
325
- );
326
- if (targetEl instanceof HTMLElement) {
327
- return targetEl;
328
- } else if (typeof targetEl === 'string') {
329
- return document.querySelector(targetEl);
330
- } else {
331
- throw new Error('Form parent element is not defined');
332
- }
333
- }
334
-
335
- getFormValidators() {
336
- if (this.getOptions('validators')) {
337
- return this.getOptions('validators', {});
338
- } else {
339
- this.#missingOverrideWarning('validators');
340
- return {};
341
- }
342
- }
343
-
344
- getFormManifest() {
345
- const modelName = this.getModelName();
346
- if (modelName && notCommon.getApp()) {
347
- return notCommon.getApp().getInterfaceManifest(modelName);
348
- }
349
- if (this.getOptions('manifest', undefined)) {
350
- return this.getOptions('manifest', {});
351
- } else {
352
- this.#missingOverrideWarning('manifest');
353
- return {};
354
- }
355
- }
356
-
357
- getFormData() {
358
- if (this.getData()) {
359
- return this.getData();
360
- } else {
361
- this.#missingOverrideWarning('data');
362
- return {};
363
- }
364
- }
365
-
366
- getFormOptions() {
367
- if (this.getOptions('ui', undefined) || this.getOptions('fields', undefined)) {
368
- return {
369
- ui: this.getOptions('ui', {}),
370
- fields: this.getOptions('fields', {}),
371
- };
372
- } else {
373
- this.#missingOverrideWarning('options');
374
- return {
375
- ui: {},
376
- fields: {},
377
- };
378
- }
379
- }
380
-
381
- /**
382
- * Override empty message
383
- **/
384
- #missingOverrideWarning(missing) {
385
- this.error(`${missing} for ${this.getWorking('name')} form is not defined`);
386
- }
387
-
388
- /**
389
- * Form operations
390
- **/
391
- collectData() {
392
- const data = this.#form.collectData();
393
- this.setData({ ...data
394
- }); //update in inner store
395
- return data;
396
- }
397
-
398
- updateField(fieldName, props){
399
- this.#form.updateField(fieldName, props);
400
- }
401
-
402
- getModel(name, data){
403
- if(typeof name === 'string'){
404
- return this.getInterface(name)(data || {});
405
- }else{
406
- return this.getInterface()(name || {});
407
- }
408
- }
409
-
410
- getInterface(name = false){
411
- return notCommon.getApp().getInterface(name || this.getModelName());
412
- }
413
-
414
- /**
415
- * Returns current model name
416
- * @return {string}
417
- */
418
- getModelName() {
419
- return this.getOptions('model');
420
- }
234
+ manifest.actions[action].fields, //form fields structure
235
+ this.#variants, //variants library
236
+ this.#fields, //fields library
237
+ formOptions.fields, //form wide fields options
238
+ data
239
+ );
240
+
241
+ return {
242
+ //if no auto init of form structure, set to loading state
243
+ loading: !this.getOptions("autoInit", true),
244
+ title: manifest.actions[action].title,
245
+ description: manifest.actions[action].description,
246
+ fields: manifest.actions[action].fields,
247
+ form,
248
+ //injecting options to UI from top level input
249
+ ...formOptions.ui, //form UI options
250
+ ...injectedProps,
251
+ };
252
+ }
253
+
254
+ getName() {
255
+ return this.getWorking("name");
256
+ }
421
257
 
258
+ getFormAction() {
259
+ return this.#action;
260
+ }
261
+
262
+ setFormAction(val) {
263
+ if (val && val !== this.#action) {
264
+ this.#action = val;
265
+ this.#form && this.#form.$destroy();
266
+ this.initForm();
267
+ }
268
+ }
269
+
270
+ processResult(result) {
271
+ if (result.status === DEFAULT_STATUS_SUCCESS) {
272
+ this.setFormSuccess();
273
+ return true;
274
+ } else {
275
+ this.setFormErrors(result);
276
+ return false;
277
+ }
278
+ }
279
+
280
+ /**
281
+ * Form validation result
282
+ **/
283
+ setFormSuccess() {
284
+ this.#form.showSuccess();
285
+ this.emit("success");
286
+ }
287
+
288
+ setFormErrors(result) {
289
+ if (this.getOptions("readonly", false)) {
290
+ return;
291
+ }
292
+ const status = {
293
+ form: [],
294
+ fields: {},
295
+ };
296
+ if (result.message) {
297
+ status.form.push(result.message);
298
+ }
299
+ if (result.errors && Object.keys(result.errors).length > 0) {
300
+ status.fields = { ...result.errors };
301
+ }
302
+ this.#form.updateFormValidationStatus(status);
303
+ this.emit("error", status);
304
+ }
305
+
306
+ /**
307
+ * Returns variant by collection name and item id
308
+ * @param {string} name name of the variants collection
309
+ * @param {string|number} id item identificator
310
+ * @returns {object} item
311
+ **/
312
+ getVariant(name, id) {
313
+ let lib = this.#variants.get(name);
314
+ let result = lib.find((item) => item.id === id);
315
+ if (result) {
316
+ return result;
317
+ }
318
+ return null;
319
+ }
320
+
321
+ /***
322
+ * Redefinable getters
323
+ **/
324
+
325
+ getFormTargetEl() {
326
+ const targetEl = this.getOptions("target", DEFAULT_CONTAINER_SELECTOR);
327
+ if (targetEl instanceof HTMLElement) {
328
+ return targetEl;
329
+ } else if (typeof targetEl === "string") {
330
+ return document.querySelector(targetEl);
331
+ } else {
332
+ throw new Error("Form parent element is not defined");
333
+ }
334
+ }
335
+
336
+ getFormValidators() {
337
+ if (this.getOptions("validators")) {
338
+ return this.getOptions("validators", {});
339
+ } else {
340
+ this.#missingOverrideWarning("validators");
341
+ return {};
342
+ }
343
+ }
344
+
345
+ getFormManifest() {
346
+ const modelName = this.getModelName();
347
+ if (modelName && notCommon.getApp()) {
348
+ return notCommon.getApp().getInterfaceManifest(modelName);
349
+ }
350
+ if (this.getOptions("manifest", undefined)) {
351
+ return this.getOptions("manifest", {});
352
+ } else {
353
+ this.#missingOverrideWarning("manifest");
354
+ return {};
355
+ }
356
+ }
357
+
358
+ getFormData() {
359
+ if (this.getData()) {
360
+ return this.getData();
361
+ } else {
362
+ this.#missingOverrideWarning("data");
363
+ return {};
364
+ }
365
+ }
366
+
367
+ getFormOptions() {
368
+ if (
369
+ this.getOptions("ui", undefined) ||
370
+ this.getOptions("fields", undefined)
371
+ ) {
372
+ return {
373
+ ui: this.getOptions("ui", {}),
374
+ fields: this.getOptions("fields", {}),
375
+ };
376
+ } else {
377
+ this.#missingOverrideWarning("options");
378
+ return {
379
+ ui: {},
380
+ fields: {},
381
+ };
382
+ }
383
+ }
384
+
385
+ getFormInjectedProps() {
386
+ return this.getOptions("injected", {});
387
+ }
388
+
389
+ /**
390
+ * Override empty message
391
+ **/
392
+ #missingOverrideWarning(missing) {
393
+ this.error(
394
+ `${missing} for ${this.getWorking("name")} form is not defined`
395
+ );
396
+ }
397
+
398
+ /**
399
+ * Form operations
400
+ **/
401
+ collectData() {
402
+ if (this.getOptions("readonly", false)) {
403
+ return this.getData();
404
+ }
405
+ const data = this.#form.collectData();
406
+ this.setData({ ...data }); //update in inner store
407
+ return data;
408
+ }
409
+
410
+ updateField(fieldName, props) {
411
+ this.#form.updateField(fieldName, props);
412
+ }
413
+
414
+ getModel(name, data) {
415
+ if (typeof name === "string") {
416
+ return this.getInterface(name)(data || {});
417
+ } else {
418
+ return this.getInterface()(name || {});
419
+ }
420
+ }
421
+
422
+ getInterface(name = false) {
423
+ return notCommon.getApp().getInterface(name || this.getModelName());
424
+ }
425
+
426
+ /**
427
+ * Returns current model name
428
+ * @return {string}
429
+ */
430
+ getModelName() {
431
+ return this.getOptions("model");
432
+ }
422
433
  }
423
434
 
424
435
  export default notForm;