neo.mjs 2.3.19 → 3.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 (119) hide show
  1. package/apps/covid/view/GalleryContainer.mjs +2 -2
  2. package/apps/covid/view/HelixContainer.mjs +2 -2
  3. package/apps/covid/view/TableContainer.mjs +2 -2
  4. package/apps/krausest/view/MainComponent.mjs +2 -2
  5. package/apps/krausest/view/TableComponent.mjs +2 -2
  6. package/apps/realworld/view/HomeComponent.mjs +2 -2
  7. package/apps/realworld/view/article/CommentComponent.mjs +2 -2
  8. package/apps/realworld/view/article/Component.mjs +2 -2
  9. package/apps/realworld/view/article/CreateCommentComponent.mjs +2 -2
  10. package/apps/realworld/view/article/CreateComponent.mjs +3 -3
  11. package/apps/realworld/view/article/PreviewComponent.mjs +2 -2
  12. package/apps/realworld/view/article/TagListComponent.mjs +2 -2
  13. package/apps/realworld/view/user/ProfileComponent.mjs +2 -2
  14. package/apps/realworld/view/user/SettingsComponent.mjs +2 -2
  15. package/apps/realworld/view/user/SignUpComponent.mjs +2 -2
  16. package/apps/realworld2/view/article/HelixContainer.mjs +2 -2
  17. package/apps/realworld2/view/article/PreviewComponent.mjs +2 -2
  18. package/apps/realworld2/view/article/TagListComponent.mjs +2 -2
  19. package/apps/realworld2/view/user/LoginFormContainer.mjs +2 -2
  20. package/apps/sharedcovid/view/GalleryContainer.mjs +2 -2
  21. package/apps/sharedcovid/view/HelixContainer.mjs +2 -2
  22. package/apps/sharedcovid/view/TableContainer.mjs +2 -2
  23. package/apps/sharedcovid/view/mapboxGl/Container.mjs +2 -2
  24. package/docs/app/view/ContentTabContainer.mjs +2 -2
  25. package/docs/app/view/MainContainer.mjs +2 -2
  26. package/docs/app/view/classdetails/SourceViewComponent.mjs +2 -2
  27. package/docs/app/view/classdetails/TutorialComponent.mjs +2 -2
  28. package/docs/tutorials/02_ClassSystem.html +3 -3
  29. package/docs/tutorials/02_ClassSystem.md +2 -2
  30. package/docs/tutorials/09_TodoList_version1.html +8 -8
  31. package/examples/calendar/weekview/MainContainer.mjs +2 -2
  32. package/examples/component/coronaGallery/MainContainer.mjs +2 -2
  33. package/examples/component/coronaHelix/MainContainer.mjs +2 -2
  34. package/examples/component/gallery/MainContainer.mjs +2 -2
  35. package/examples/component/helix/MainContainer.mjs +2 -2
  36. package/examples/core/config/MainContainer.mjs +2 -2
  37. package/examples/dialog/MainContainer.mjs +2 -2
  38. package/examples/list/animate/MainContainer.mjs +2 -2
  39. package/examples/model/multiWindow/ViewportController.mjs +2 -2
  40. package/examples/todoList/version1/MainComponent.mjs +3 -3
  41. package/examples/todoList/version2/MainContainer.mjs +3 -3
  42. package/package.json +1 -1
  43. package/src/Main.mjs +2 -2
  44. package/src/Neo.mjs +26 -25
  45. package/src/button/Split.mjs +2 -2
  46. package/src/calendar/view/EditEventContainer.mjs +2 -2
  47. package/src/calendar/view/MainContainer.mjs +2 -2
  48. package/src/calendar/view/MainContainerModel.mjs +2 -2
  49. package/src/calendar/view/SettingsContainer.mjs +2 -2
  50. package/src/calendar/view/YearComponent.mjs +2 -2
  51. package/src/calendar/view/calendars/EditContainer.mjs +2 -2
  52. package/src/calendar/view/month/Component.mjs +2 -2
  53. package/src/calendar/view/week/Component.mjs +2 -2
  54. package/src/calendar/view/week/TimeAxisComponent.mjs +2 -2
  55. package/src/calendar/view/week/plugin/DragDrop.mjs +2 -2
  56. package/src/collection/Base.mjs +2 -2
  57. package/src/component/Chip.mjs +2 -2
  58. package/src/component/Circle.mjs +2 -2
  59. package/src/component/DateSelector.mjs +2 -2
  60. package/src/component/Gallery.mjs +2 -2
  61. package/src/component/Helix.mjs +2 -2
  62. package/src/component/Splitter.mjs +2 -2
  63. package/src/component/mwc/Button.mjs +2 -2
  64. package/src/component/mwc/TextField.mjs +2 -2
  65. package/src/container/Panel.mjs +2 -2
  66. package/src/controller/Application.mjs +2 -2
  67. package/src/controller/Base.mjs +2 -2
  68. package/src/controller/Component.mjs +2 -2
  69. package/src/core/Base.mjs +25 -1
  70. package/src/core/IdGenerator.mjs +1 -1
  71. package/src/data/Store.mjs +2 -2
  72. package/src/dialog/Base.mjs +2 -2
  73. package/src/draggable/DragProxyComponent.mjs +2 -2
  74. package/src/draggable/DragZone.mjs +2 -2
  75. package/src/draggable/DropZone.mjs +2 -2
  76. package/src/draggable/list/DragZone.mjs +2 -2
  77. package/src/draggable/toolbar/DragZone.mjs +2 -2
  78. package/src/filter/ToggleOperatorsButton.mjs +2 -2
  79. package/src/form/field/CheckBox.mjs +2 -2
  80. package/src/form/field/Color.mjs +2 -2
  81. package/src/form/field/Date.mjs +2 -2
  82. package/src/form/field/Display.mjs +2 -2
  83. package/src/form/field/Range.mjs +2 -2
  84. package/src/form/field/Select.mjs +2 -2
  85. package/src/form/field/Text.mjs +2 -2
  86. package/src/form/field/Time.mjs +2 -2
  87. package/src/form/field/trigger/Base.mjs +2 -2
  88. package/src/form/field/trigger/Time.mjs +2 -2
  89. package/src/grid/Container.mjs +2 -2
  90. package/src/list/Base.mjs +2 -2
  91. package/src/list/plugin/Animate.mjs +2 -2
  92. package/src/main/DomAccess.mjs +2 -2
  93. package/src/main/DomEvents.mjs +2 -2
  94. package/src/main/addon/AmCharts.mjs +2 -2
  95. package/src/main/addon/AnalyticsByGoogle.mjs +2 -2
  96. package/src/main/addon/DragDrop.mjs +2 -2
  97. package/src/main/addon/HighlightJS.mjs +2 -2
  98. package/src/main/addon/MapboxGL.mjs +3 -2
  99. package/src/main/addon/Markdown.mjs +3 -3
  100. package/src/main/addon/Siesta.mjs +2 -2
  101. package/src/main/addon/Stylesheet.mjs +2 -2
  102. package/src/main/addon/WindowPosition.mjs +2 -2
  103. package/src/main/draggable/sensor/Mouse.mjs +2 -2
  104. package/src/main/draggable/sensor/Touch.mjs +2 -2
  105. package/src/manager/Component.mjs +2 -2
  106. package/src/manager/Instance.mjs +2 -2
  107. package/src/model/Component.mjs +2 -2
  108. package/src/plugin/Base.mjs +2 -2
  109. package/src/plugin/Resizable.mjs +2 -2
  110. package/src/selection/table/CellColumnModel.mjs +2 -2
  111. package/src/selection/table/CellColumnRowModel.mjs +2 -2
  112. package/src/selection/table/CellRowModel.mjs +2 -2
  113. package/src/table/Container.mjs +2 -2
  114. package/src/table/header/Button.mjs +2 -2
  115. package/src/util/Logger.mjs +2 -2
  116. package/src/worker/App.mjs +2 -2
  117. package/src/worker/Base.mjs +2 -2
  118. package/src/worker/Manager.mjs +2 -2
  119. package/test/siesta/tests/ClassConfigsAndFields.mjs +257 -19
package/src/Neo.mjs CHANGED
@@ -87,7 +87,7 @@ Neo = self.Neo = Object.assign({
87
87
 
88
88
  // only apply properties which have no setters inside the prototype chain
89
89
  // those will get applied on create (Neo.core.Base -> initConfig)
90
- else if (!hasPropertySetter(element, key)) {
90
+ else if (!Neo.hasPropertySetter(element, key)) {
91
91
  Object.defineProperty(element, key, {
92
92
  enumerable: true,
93
93
  value : value,
@@ -333,8 +333,9 @@ Neo = self.Neo = Object.assign({
333
333
  cls = Neo.ns(className);
334
334
  }
335
335
 
336
- instance = new cls(config);
336
+ instance = new cls();
337
337
 
338
+ instance.construct(config);
338
339
  instance.onConstructed();
339
340
  instance.onAfterConstructed();
340
341
  instance.init();
@@ -344,6 +345,28 @@ Neo = self.Neo = Object.assign({
344
345
 
345
346
  emptyFn() {},
346
347
 
348
+ /**
349
+ * Checks if there is a set method for a given property key inside the prototype chain
350
+ * @memberOf module:Neo
351
+ * @param {Neo.core.Base} proto The top level prototype of a class
352
+ * @param {String} key the property key to test
353
+ * @returns {Boolean}
354
+ */
355
+ hasPropertySetter(proto, key) {
356
+ let descriptor;
357
+
358
+ while (proto.__proto__) {
359
+ descriptor = Object.getOwnPropertyDescriptor(proto, key);
360
+
361
+ if (typeof descriptor === 'object' && typeof descriptor.set === 'function') {
362
+ return true;
363
+ }
364
+ proto = proto.__proto__;
365
+ }
366
+
367
+ return false;
368
+ },
369
+
347
370
  /**
348
371
  * Deep-merges a source object into a target object
349
372
  * @memberOf module:Neo
@@ -526,7 +549,7 @@ function applyMixins(cls, mixins) {
526
549
  * @tutorial 02_ClassSystem
527
550
  */
528
551
  function autoGenerateGetSet(proto, key) {
529
- if (hasPropertySetter(proto, key)) {
552
+ if (Neo.hasPropertySetter(proto, key)) {
530
553
  throw('Config ' + key + '_ (' + proto.className + ') already has a set method, use beforeGet, beforeSet & afterSet instead');
531
554
  }
532
555
 
@@ -622,28 +645,6 @@ function exists(className) {
622
645
  }
623
646
  }
624
647
 
625
- /**
626
- * Checks if there is a set method for a given property key inside the prototype chain
627
- * @param {Neo.core.Base} proto The top level prototype of a class
628
- * @param {String} key the property key to test
629
- * @returns {Boolean}
630
- * @private
631
- */
632
- function hasPropertySetter(proto, key) {
633
- let descriptor;
634
-
635
- while (proto.__proto__) {
636
- descriptor = Object.getOwnPropertyDescriptor(proto, key);
637
-
638
- if (typeof descriptor === 'object' && typeof descriptor.set === 'function') {
639
- return true;
640
- }
641
- proto = proto.__proto__;
642
- }
643
-
644
- return false;
645
- }
646
-
647
648
  /**
648
649
  *
649
650
  * @param {Neo.core.Base} proto
@@ -51,8 +51,8 @@ class Split extends Button {
51
51
  /**
52
52
  * @param {Object} config
53
53
  */
54
- constructor(config) {
55
- super(config);
54
+ construct(config) {
55
+ super.construct(config);
56
56
 
57
57
  let me = this,
58
58
  vdom = me.vdom;
@@ -77,8 +77,8 @@ class EditEventContainer extends FormContainer {
77
77
  /**
78
78
  * @param {Object} config
79
79
  */
80
- constructor(config) {
81
- super(config);
80
+ construct(config) {
81
+ super.construct(config);
82
82
 
83
83
  // focus trap, see: https://github.com/neomjs/neo/issues/2306
84
84
  this.vdom.tabIndex = -1;
@@ -171,8 +171,8 @@ class MainContainer extends Container {
171
171
  /**
172
172
  * @param {Object} config
173
173
  */
174
- constructor(config) {
175
- super(config);
174
+ construct(config) {
175
+ super.construct(config);
176
176
 
177
177
  let me = this;
178
178
 
@@ -107,8 +107,8 @@ class MainContainerModel extends Component {
107
107
  /**
108
108
  * @param {Object} config
109
109
  */
110
- constructor(config) {
111
- super(config);
110
+ construct(config) {
111
+ super.construct(config);
112
112
 
113
113
  let me = this,
114
114
  component = me.component;
@@ -36,8 +36,8 @@ class SettingsContainer extends Container {
36
36
  /**
37
37
  * @param {Object} config
38
38
  */
39
- constructor(config) {
40
- super(config);
39
+ construct(config) {
40
+ super.construct(config);
41
41
 
42
42
  let me = this;
43
43
 
@@ -175,8 +175,8 @@ class YearComponent extends Component {
175
175
  /**
176
176
  * @param config
177
177
  */
178
- constructor(config) {
179
- super(config);
178
+ construct(config) {
179
+ super.construct(config);
180
180
 
181
181
  let me = this,
182
182
  domListeners = me.domListeners;
@@ -48,8 +48,8 @@ class EditContainer extends FormContainer {
48
48
  /**
49
49
  * @param {Object} config
50
50
  */
51
- constructor(config) {
52
- super(config);
51
+ construct(config) {
52
+ super.construct(config);
53
53
 
54
54
  // focus trap, see: https://github.com/neomjs/neo/issues/2306
55
55
  this.vdom.tabIndex = -1;
@@ -157,8 +157,8 @@ class Component extends BaseComponent {
157
157
  /**
158
158
  * @param {Object} config
159
159
  */
160
- constructor(config) {
161
- super(config);
160
+ construct(config) {
161
+ super.construct(config);
162
162
 
163
163
  let me = this,
164
164
  domListeners = me.domListeners;
@@ -216,8 +216,8 @@ class Component extends BaseComponent {
216
216
  /**
217
217
  * @param {Object} config
218
218
  */
219
- constructor(config) {
220
- super(config);
219
+ construct(config) {
220
+ super.construct(config);
221
221
 
222
222
  let me = this,
223
223
  domListeners = me.domListeners;
@@ -64,8 +64,8 @@ class TimeAxisComponent extends Component {
64
64
  /**
65
65
  * @param {Object} config
66
66
  */
67
- constructor(config) {
68
- super(config);
67
+ construct(config) {
68
+ super.construct(config);
69
69
 
70
70
  let me = this;
71
71
 
@@ -24,8 +24,8 @@ class DragDrop extends Base {
24
24
  /**
25
25
  * @param {Object} config
26
26
  */
27
- constructor(config) {
28
- super(config);
27
+ construct(config) {
28
+ super.construct(config);
29
29
 
30
30
  let me = this,
31
31
  columnOpts = {scope: me, delegate: '.neo-c-w-column'},
@@ -108,8 +108,8 @@ class Base extends CoreBase {
108
108
  /**
109
109
  * @param config
110
110
  */
111
- constructor(config) {
112
- super(config);
111
+ construct(config) {
112
+ super.construct(config);
113
113
 
114
114
  let me = this,
115
115
  symbolConfig = {enumerable: false, writable: true};
@@ -60,8 +60,8 @@ class Chip extends Component {
60
60
  /**
61
61
  * @param {Object} config
62
62
  */
63
- constructor(config) {
64
- super(config);
63
+ construct(config) {
64
+ super.construct(config);
65
65
 
66
66
  let me = this,
67
67
  domListeners;
@@ -120,8 +120,8 @@ class Circle extends Component {
120
120
  /**
121
121
  * @param {Object} config
122
122
  */
123
- constructor(config) {
124
- super(config);
123
+ construct(config) {
124
+ super.construct(config);
125
125
 
126
126
  Neo.main.DomEvents.registerPreventDefaultTargets({
127
127
  name: 'contextmenu',
@@ -140,8 +140,8 @@ class DateSelector extends Component {
140
140
  /**
141
141
  * @param {Object} config
142
142
  */
143
- constructor(config) {
144
- super(config);
143
+ construct(config) {
144
+ super.construct(config);
145
145
 
146
146
  let me = this,
147
147
  domListeners = me.domListeners;
@@ -169,8 +169,8 @@ class Gallery extends Component {
169
169
  /**
170
170
  * @param {Object} config
171
171
  */
172
- constructor(config) {
173
- super(config);
172
+ construct(config) {
173
+ super.construct(config);
174
174
 
175
175
  let me = this,
176
176
  domListeners = Neo.clone(me.domListeners, true),
@@ -250,8 +250,8 @@ class Helix extends Component {
250
250
  /**
251
251
  * @param {Object} config
252
252
  */
253
- constructor(config) {
254
- super(config);
253
+ construct(config) {
254
+ super.construct(config);
255
255
 
256
256
  let me = this,
257
257
  domListeners = Neo.clone(me.domListeners, true);
@@ -71,8 +71,8 @@ class Splitter extends Component {
71
71
  /**
72
72
  * @param {Object} config
73
73
  */
74
- constructor(config) {
75
- super(config);
74
+ construct(config) {
75
+ super.construct(config);
76
76
 
77
77
  let me = this,
78
78
  domListeners = me.domListeners;
@@ -58,8 +58,8 @@ class Button extends Component {
58
58
  /**
59
59
  * @param {Object} config
60
60
  */
61
- constructor(config) {
62
- super(config);
61
+ construct(config) {
62
+ super.construct(config);
63
63
 
64
64
  if (!Neo.config.mainThreadAddons.includes('Mwc')) {
65
65
  console.error('Please include "Mwc" into the mainThreadAddons of your neo-config.json file.');
@@ -65,8 +65,8 @@ class TextField extends Component {
65
65
  /**
66
66
  * @param {Object} config
67
67
  */
68
- constructor(config) {
69
- super(config);
68
+ construct(config) {
69
+ super.construct(config);
70
70
 
71
71
  if (!Neo.config.mainThreadAddons.includes('Mwc')) {
72
72
  console.error('Please include "Mwc" into the mainThreadAddons of your neo-config.json file.');
@@ -50,8 +50,8 @@ class Panel extends Container {
50
50
  /**
51
51
  * @param {Object} config
52
52
  */
53
- constructor(config) {
54
- super(config);
53
+ construct(config) {
54
+ super.construct(config);
55
55
 
56
56
  let me = this;
57
57
 
@@ -48,13 +48,13 @@ class Application extends Base {
48
48
  /**
49
49
  * @param {Object} config
50
50
  */
51
- constructor(config) {
51
+ construct(config) {
52
52
  // to guarantee that the main view can access Neo.apps at any point,
53
53
  // we need to trigger its assignment at the end of the ctor.
54
54
  let mainView = config.mainView;
55
55
  delete config.mainView;
56
56
 
57
- super(config);
57
+ super.construct(config);
58
58
 
59
59
  let me = this;
60
60
 
@@ -30,8 +30,8 @@ class Base extends CoreBase {
30
30
  /**
31
31
  * @param {Object} config
32
32
  */
33
- constructor(config) {
34
- super(config);
33
+ construct(config) {
34
+ super.construct(config);
35
35
 
36
36
  HashHistory.on('change', this.onHashChange, this);
37
37
  }
@@ -38,8 +38,8 @@ class Component extends Base {
38
38
  /**
39
39
  * @param {Object} config
40
40
  */
41
- constructor(config) {
42
- super(config);
41
+ construct(config) {
42
+ super.construct(config);
43
43
 
44
44
  let me = this,
45
45
  component = me.component,
package/src/core/Base.mjs CHANGED
@@ -74,7 +74,7 @@ class Base {
74
74
  * Applies the observable mixin if needed, grants remote access if needed.
75
75
  * @param {Object} config={}
76
76
  */
77
- constructor(config={}) {
77
+ construct(config={}) {
78
78
  let me = this;
79
79
 
80
80
  Object.defineProperties(me, {
@@ -99,6 +99,9 @@ class Base {
99
99
 
100
100
  me.getStaticConfig('observable') && me.initObservable(config);
101
101
 
102
+ // assign class field values prior to configs
103
+ config = me.setFields(config);
104
+
102
105
  me.initConfig(config);
103
106
 
104
107
  Object.defineProperty(me, 'configsApplied', {
@@ -376,6 +379,8 @@ class Base {
376
379
  set(values={}) {
377
380
  let me = this;
378
381
 
382
+ values = me.setFields(values);
383
+
379
384
  // If the initial config processing is still running,
380
385
  // finish this one first before dropping new values into the configSymbol.
381
386
  // see: https://github.com/neomjs/neo/issues/2201
@@ -388,6 +393,25 @@ class Base {
388
393
  me.processConfigs(true);
389
394
  }
390
395
 
396
+ /**
397
+ * We want to assign class fields first and remove them from the config object,
398
+ * so that afterSet(), beforeGet() and beforeSet() methods can get the new values right away
399
+ * @param {Object} config
400
+ * @returns {Object}
401
+ */
402
+ setFields(config) {
403
+ let configNames = this.constructor.config;
404
+
405
+ Object.entries(config).forEach(([key, value]) => {
406
+ if (!configNames.hasOwnProperty(key) && !Neo.hasPropertySetter(this, key)) {
407
+ this[key] = value;
408
+ delete config[key];
409
+ }
410
+ });
411
+
412
+ return config;
413
+ }
414
+
391
415
  /**
392
416
  * Sets the value of a static config by a given key
393
417
  * @param {String} key The key of a staticConfig defined inside static getStaticConfig
@@ -42,7 +42,7 @@ class IdGenerator {
42
42
  /**
43
43
  * @param config
44
44
  */
45
- constructor(config) {
45
+ construct(config) {
46
46
  let me = this;
47
47
 
48
48
  me.idCounter = {};
@@ -79,8 +79,8 @@ class Store extends Base {
79
79
  /**
80
80
  * @param {Object} config
81
81
  */
82
- constructor(config) {
83
- super(config);
82
+ construct(config) {
83
+ super.construct(config);
84
84
 
85
85
  let me = this;
86
86
 
@@ -125,8 +125,8 @@ class Base extends Panel {
125
125
  /**
126
126
  * @param {Object} config
127
127
  */
128
- constructor(config) {
129
- super(config);
128
+ construct(config) {
129
+ super.construct(config);
130
130
 
131
131
  let me = this;
132
132
 
@@ -37,8 +37,8 @@ class DragProxyComponent extends Base {
37
37
  /**
38
38
  * @param {Object} config
39
39
  */
40
- constructor(config) {
41
- super(config);
40
+ construct(config) {
41
+ super.construct(config);
42
42
 
43
43
  let me = this;
44
44
 
@@ -152,8 +152,8 @@ class DragZone extends Base {
152
152
  /**
153
153
  * @param {Object} config
154
154
  */
155
- constructor(config) {
156
- super(config);
155
+ construct(config) {
156
+ super.construct(config);
157
157
 
158
158
  if (!Neo.main.addon.DragDrop) {
159
159
  console.error('You can not use Neo.draggable.DragZone without adding Neo.main.addon.DragDrop to the main thread addons', this.id);
@@ -25,8 +25,8 @@ class DropZone extends Base {
25
25
  /**
26
26
  * @param {Object} config
27
27
  */
28
- constructor(config) {
29
- super(config);
28
+ construct(config) {
29
+ super.construct(config);
30
30
 
31
31
  let me = this,
32
32
  owner = me.owner,
@@ -29,8 +29,8 @@ class DragZone extends BaseDragZone {
29
29
  /**
30
30
  * @param {Object} config
31
31
  */
32
- constructor(config) {
33
- super(config);
32
+ construct(config) {
33
+ super.construct(config);
34
34
 
35
35
  let me = this,
36
36
  owner = me.owner,
@@ -23,8 +23,8 @@ class DragZone extends BaseDragZone {
23
23
  /**
24
24
  * @param {Object} config
25
25
  */
26
- constructor(config) {
27
- super(config);
26
+ construct(config) {
27
+ super.construct(config);
28
28
 
29
29
  let me = this,
30
30
  owner = me.owner,
@@ -30,8 +30,8 @@ class ToggleOperatorsButton extends Button {
30
30
  /**
31
31
  * @param {Object} config
32
32
  */
33
- constructor(config) {
34
- super(config);
33
+ construct(config) {
34
+ super.construct(config);
35
35
 
36
36
  let me = this;
37
37
 
@@ -72,8 +72,8 @@ class CheckBox extends Base {
72
72
  /**
73
73
  * @param {Object} config
74
74
  */
75
- constructor(config) {
76
- super(config);
75
+ construct(config) {
76
+ super.construct(config);
77
77
 
78
78
  let me = this,
79
79
  domListeners = me.domListeners;
@@ -47,8 +47,8 @@ class Color extends Select {
47
47
  /**
48
48
  * @param {Object} config
49
49
  */
50
- constructor(config) {
51
- super(config);
50
+ construct(config) {
51
+ super.construct(config);
52
52
 
53
53
  let me = this,
54
54
  vdom = me.vdom,
@@ -62,8 +62,8 @@ class DateField extends Picker {
62
62
  /**
63
63
  * @param config
64
64
  */
65
- constructor(config) {
66
- super(config);
65
+ construct(config) {
66
+ super.construct(config);
67
67
 
68
68
  let me = this;
69
69
 
@@ -31,8 +31,8 @@ class Display extends Text {
31
31
  /**
32
32
  * @param {Object} config
33
33
  */
34
- constructor(config) {
35
- super(config);
34
+ construct(config) {
35
+ super.construct(config);
36
36
 
37
37
  let me = this,
38
38
  vdom = me.vdom,
@@ -48,8 +48,8 @@ class Range extends Number {
48
48
  /**
49
49
  * @param {Object} config
50
50
  */
51
- constructor(config) {
52
- super(config);
51
+ construct(config) {
52
+ super.construct(config);
53
53
 
54
54
  let me = this,
55
55
  domListeners = me.domListeners,
@@ -105,8 +105,8 @@ class Select extends Picker {
105
105
  /**
106
106
  * @param {Object} config
107
107
  */
108
- constructor(config) {
109
- super(config);
108
+ construct(config) {
109
+ super.construct(config);
110
110
 
111
111
  let me = this;
112
112
 
@@ -123,8 +123,8 @@ class Text extends Base {
123
123
  /**
124
124
  * @param {Object} config
125
125
  */
126
- constructor(config) {
127
- super(config);
126
+ construct(config) {
127
+ super.construct(config);
128
128
 
129
129
  let me = this,
130
130
  domListeners = me.domListeners;
@@ -84,8 +84,8 @@ class Time extends Picker {
84
84
  /**
85
85
  * @param {Object} config
86
86
  */
87
- constructor(config) {
88
- super(config);
87
+ construct(config) {
88
+ super.construct(config);
89
89
 
90
90
  let me = this,
91
91
  clearTrigger = me.getTrigger('clear');
@@ -82,8 +82,8 @@ class Base extends Component {
82
82
  /**
83
83
  * @param {Object} config
84
84
  */
85
- constructor(config) {
86
- super(config);
85
+ construct(config) {
86
+ super.construct(config);
87
87
 
88
88
  let me = this,
89
89
  domListeners = me.domListeners || [],