neo.mjs 2.3.17 → 3.0.1
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/README.md +9 -0
- package/apps/covid/Util.mjs +1 -3
- package/apps/covid/view/GalleryContainer.mjs +2 -3
- package/apps/covid/view/GalleryContainerController.mjs +1 -5
- package/apps/covid/view/HelixContainer.mjs +2 -3
- package/apps/covid/view/HelixContainerController.mjs +1 -4
- package/apps/covid/view/MainContainerController.mjs +0 -7
- package/apps/covid/view/MainContainerModel.mjs +0 -1
- package/apps/covid/view/TableContainer.mjs +2 -3
- package/apps/covid/view/TableContainerController.mjs +0 -3
- package/apps/covid/view/WorldMapComponent.mjs +1 -2
- package/apps/covid/view/WorldMapContainerController.mjs +0 -2
- package/apps/covid/view/country/Gallery.mjs +0 -2
- package/apps/covid/view/country/Helix.mjs +0 -3
- package/apps/covid/view/mapboxGl/Container.mjs +1 -1
- package/apps/covid/view/mapboxGl/ContainerController.mjs +1 -6
- package/apps/krausest/TableCollection.mjs +0 -1
- package/apps/krausest/view/MainComponent.mjs +2 -3
- package/apps/krausest/view/MainComponentController.mjs +0 -1
- package/apps/krausest/view/TableComponent.mjs +2 -4
- package/apps/realworld/api/Article.mjs +1 -4
- package/apps/realworld/api/Base.mjs +0 -5
- package/apps/realworld/api/Favorite.mjs +1 -3
- package/apps/realworld/api/Profile.mjs +1 -3
- package/apps/realworld/view/HeaderComponent.mjs +1 -2
- package/apps/realworld/view/HomeComponent.mjs +2 -11
- package/apps/realworld/view/MainContainerController.mjs +0 -13
- package/apps/realworld/view/article/CommentComponent.mjs +3 -5
- package/apps/realworld/view/article/Component.mjs +2 -7
- package/apps/realworld/view/article/CreateCommentComponent.mjs +3 -7
- package/apps/realworld/view/article/CreateComponent.mjs +3 -3
- package/apps/realworld/view/article/PreviewComponent.mjs +3 -5
- package/apps/realworld/view/article/TagListComponent.mjs +3 -7
- package/apps/realworld/view/user/ProfileComponent.mjs +2 -8
- package/apps/realworld/view/user/SettingsComponent.mjs +3 -7
- package/apps/realworld/view/user/SignUpComponent.mjs +2 -3
- package/apps/realworld2/api/Article.mjs +1 -4
- package/apps/realworld2/api/Base.mjs +0 -5
- package/apps/realworld2/api/Favorite.mjs +1 -3
- package/apps/realworld2/api/Profile.mjs +1 -3
- package/apps/realworld2/view/HeaderToolbarController.mjs +1 -2
- package/apps/realworld2/view/HomeContainer.mjs +1 -2
- package/apps/realworld2/view/MainContainerController.mjs +1 -14
- package/apps/realworld2/view/article/Gallery.mjs +1 -3
- package/apps/realworld2/view/article/GalleryContainer.mjs +1 -2
- package/apps/realworld2/view/article/Helix.mjs +1 -3
- package/apps/realworld2/view/article/HelixContainer.mjs +3 -5
- package/apps/realworld2/view/article/PreviewComponent.mjs +3 -5
- package/apps/realworld2/view/article/TagListComponent.mjs +3 -7
- package/apps/realworld2/view/user/LoginFormContainer.mjs +3 -4
- package/apps/sharedcovid/Util.mjs +1 -3
- package/apps/sharedcovid/view/GalleryContainer.mjs +2 -3
- package/apps/sharedcovid/view/GalleryContainerController.mjs +1 -5
- package/apps/sharedcovid/view/HelixContainer.mjs +2 -3
- package/apps/sharedcovid/view/HelixContainerController.mjs +1 -4
- package/apps/sharedcovid/view/MainContainerController.mjs +12 -16
- package/apps/sharedcovid/view/MainContainerModel.mjs +0 -1
- package/apps/sharedcovid/view/TableContainer.mjs +2 -3
- package/apps/sharedcovid/view/TableContainerController.mjs +0 -3
- package/apps/sharedcovid/view/WorldMapComponent.mjs +1 -2
- package/apps/sharedcovid/view/WorldMapContainerController.mjs +0 -2
- package/apps/sharedcovid/view/country/Gallery.mjs +0 -2
- package/apps/sharedcovid/view/country/Helix.mjs +0 -3
- package/apps/sharedcovid/view/mapboxGl/Container.mjs +2 -3
- package/apps/sharedcovid/view/mapboxGl/ContainerController.mjs +1 -5
- package/apps/shareddialog/view/MainContainerController.mjs +0 -18
- package/apps/shareddialog2/view/MainContainerController.mjs +1 -2
- package/apps/website/data/blog.json +13 -0
- package/apps/website/view/MainContainerController.mjs +0 -4
- package/docs/app/view/ContentTabContainer.mjs +2 -2
- package/docs/app/view/MainContainer.mjs +2 -2
- package/docs/app/view/classdetails/SourceViewComponent.mjs +2 -2
- package/docs/app/view/classdetails/TutorialComponent.mjs +2 -2
- package/docs/tutorials/02_ClassSystem.html +3 -3
- package/docs/tutorials/02_ClassSystem.md +2 -2
- package/docs/tutorials/09_TodoList_version1.html +8 -8
- package/examples/ConfigurationViewport.mjs +0 -4
- package/examples/calendar/basic/MainContainerController.mjs +0 -1
- package/examples/calendar/weekview/MainContainer.mjs +2 -2
- package/examples/component/coronaGallery/CountryGallery.mjs +1 -4
- package/examples/component/coronaGallery/MainContainer.mjs +2 -4
- package/examples/component/coronaHelix/CountryHelix.mjs +0 -4
- package/examples/component/coronaHelix/MainContainer.mjs +2 -4
- package/examples/component/gallery/MainContainer.mjs +2 -4
- package/examples/component/helix/MainContainer.mjs +2 -4
- package/examples/component/splitter/MainContainer.mjs +0 -2
- package/examples/core/config/MainContainer.mjs +3 -5
- package/examples/dialog/MainContainer.mjs +3 -7
- package/examples/list/animate/MainContainer.mjs +2 -2
- package/examples/model/advanced/MainContainerController.mjs +0 -12
- package/examples/model/dialog/EditUserDialogController.mjs +1 -3
- package/examples/model/dialog/MainContainerController.mjs +1 -2
- package/examples/model/extendedClass/MainContainerController.mjs +0 -7
- package/examples/model/inline/MainContainerController.mjs +0 -7
- package/examples/model/inlineNoModel/MainContainerController.mjs +1 -6
- package/examples/model/multiWindow/EditUserDialogController.mjs +1 -3
- package/examples/model/multiWindow/MainContainerController.mjs +1 -3
- package/examples/model/multiWindow/ViewportController.mjs +3 -5
- package/examples/model/nestedData/MainContainerController.mjs +1 -8
- package/examples/tab/container/MainContainer.mjs +1 -6
- package/examples/todoList/version1/MainComponent.mjs +3 -3
- package/examples/todoList/version2/MainContainer.mjs +3 -3
- package/examples/todoList/version2/TodoList.mjs +1 -1
- package/examples/tree/MainContainer.mjs +0 -2
- package/package.json +7 -7
- package/src/Main.mjs +9 -18
- package/src/Neo.mjs +26 -26
- package/src/button/Menu.mjs +0 -1
- package/src/button/Split.mjs +2 -6
- package/src/calendar/store/Events.mjs +0 -1
- package/src/calendar/view/DayComponent.mjs +0 -1
- package/src/calendar/view/EditEventContainer.mjs +2 -9
- package/src/calendar/view/MainContainer.mjs +2 -17
- package/src/calendar/view/MainContainerModel.mjs +2 -4
- package/src/calendar/view/SettingsContainer.mjs +2 -6
- package/src/calendar/view/YearComponent.mjs +3 -14
- package/src/calendar/view/calendars/Container.mjs +0 -1
- package/src/calendar/view/calendars/EditContainer.mjs +2 -7
- package/src/calendar/view/calendars/List.mjs +0 -5
- package/src/calendar/view/month/Component.mjs +3 -17
- package/src/calendar/view/settings/GeneralContainer.mjs +0 -3
- package/src/calendar/view/settings/MonthContainer.mjs +0 -3
- package/src/calendar/view/settings/WeekContainer.mjs +0 -5
- package/src/calendar/view/settings/YearContainer.mjs +0 -3
- package/src/calendar/view/week/Component.mjs +3 -22
- package/src/calendar/view/week/EventDragZone.mjs +1 -6
- package/src/calendar/view/week/TimeAxisComponent.mjs +2 -3
- package/src/calendar/view/week/plugin/DragDrop.mjs +2 -12
- package/src/calendar/view/week/plugin/EventResizable.mjs +0 -3
- package/src/collection/Base.mjs +3 -22
- package/src/collection/Filter.mjs +0 -1
- package/src/collection/Sorter.mjs +0 -3
- package/src/component/Base.mjs +14 -3
- package/src/component/Chip.mjs +2 -4
- package/src/component/Circle.mjs +2 -20
- package/src/component/DateSelector.mjs +4 -21
- package/src/component/Gallery.mjs +2 -14
- package/src/component/Helix.mjs +2 -16
- package/src/component/Splitter.mjs +3 -8
- package/src/component/mwc/Button.mjs +2 -2
- package/src/component/mwc/TextField.mjs +2 -3
- package/src/component/wrapper/AmChart.mjs +1 -1
- package/src/component/wrapper/MapboxGL.mjs +0 -5
- package/src/container/Base.mjs +1 -7
- package/src/container/Panel.mjs +2 -5
- package/src/controller/Application.mjs +2 -3
- package/src/controller/Base.mjs +2 -3
- package/src/controller/Component.mjs +3 -6
- package/src/core/Base.mjs +26 -3
- package/src/core/Compare.mjs +0 -1
- package/src/core/IdGenerator.mjs +2 -4
- package/src/core/Observable.mjs +0 -3
- package/src/core/Util.mjs +0 -1
- package/src/core/_export.mjs +1 -2
- package/src/data/RecordFactory.mjs +1 -6
- package/src/data/Store.mjs +2 -12
- package/src/data/connection/Xhr.mjs +0 -6
- package/src/dialog/Base.mjs +5 -24
- package/src/draggable/DragProxyComponent.mjs +3 -5
- package/src/draggable/DragZone.mjs +2 -8
- package/src/draggable/DropZone.mjs +3 -9
- package/src/draggable/list/DragZone.mjs +3 -9
- package/src/draggable/tab/header/toolbar/SortZone.mjs +1 -3
- package/src/draggable/toolbar/DragZone.mjs +3 -7
- package/src/draggable/toolbar/SortZone.mjs +1 -8
- package/src/draggable/tree/DragZone.mjs +1 -4
- package/src/filter/BooleanContainer.mjs +0 -1
- package/src/filter/NumberContainer.mjs +0 -2
- package/src/filter/ToggleOperatorsButton.mjs +3 -5
- package/src/form/Container.mjs +0 -2
- package/src/form/Fieldset.mjs +0 -1
- package/src/form/field/Base.mjs +0 -2
- package/src/form/field/CheckBox.mjs +2 -7
- package/src/form/field/Color.mjs +2 -5
- package/src/form/field/Date.mjs +2 -6
- package/src/form/field/Display.mjs +2 -3
- package/src/form/field/Picker.mjs +1 -12
- package/src/form/field/Range.mjs +2 -3
- package/src/form/field/Select.mjs +24 -22
- package/src/form/field/Text.mjs +3 -20
- package/src/form/field/Time.mjs +2 -9
- package/src/form/field/trigger/Base.mjs +2 -4
- package/src/form/field/trigger/Clear.mjs +0 -3
- package/src/form/field/trigger/CopyToClipboard.mjs +0 -3
- package/src/form/field/trigger/Picker.mjs +0 -1
- package/src/form/field/trigger/SpinDown.mjs +0 -1
- package/src/form/field/trigger/SpinUp.mjs +0 -1
- package/src/form/field/trigger/SpinUpDown.mjs +0 -1
- package/src/form/field/trigger/Time.mjs +2 -3
- package/src/grid/Container.mjs +3 -6
- package/src/grid/header/Toolbar.mjs +1 -5
- package/src/list/Base.mjs +2 -2
- package/src/list/Color.mjs +0 -3
- package/src/list/Component.mjs +0 -3
- package/src/list/plugin/Animate.mjs +3 -6
- package/src/main/DomAccess.mjs +9 -24
- package/src/main/DomEvents.mjs +44 -77
- package/src/main/addon/AmCharts.mjs +3 -12
- package/src/main/addon/AnalyticsByGoogle.mjs +3 -4
- package/src/main/addon/CloneNode.mjs +0 -2
- package/src/main/addon/Cookie.mjs +0 -3
- package/src/main/addon/DragDrop.mjs +2 -11
- package/src/main/addon/HighlightJS.mjs +3 -7
- package/src/main/addon/MapboxGL.mjs +4 -16
- package/src/main/addon/Markdown.mjs +3 -3
- package/src/main/addon/Mwc.mjs +0 -2
- package/src/main/addon/Siesta.mjs +2 -3
- package/src/main/addon/Stylesheet.mjs +2 -6
- package/src/main/addon/WindowPosition.mjs +3 -8
- package/src/main/draggable/sensor/Mouse.mjs +2 -6
- package/src/main/draggable/sensor/Touch.mjs +2 -6
- package/src/main/mixin/DeltaUpdates.mjs +0 -8
- package/src/main/mixin/TouchDomEvents.mjs +1 -7
- package/src/manager/Base.mjs +0 -2
- package/src/manager/Component.mjs +2 -5
- package/src/manager/DomEvent.mjs +1 -6
- package/src/manager/Focus.mjs +0 -7
- package/src/manager/Instance.mjs +2 -3
- package/src/manager/Store.mjs +0 -4
- package/src/menu/List.mjs +4 -18
- package/src/model/Component.mjs +2 -3
- package/src/plugin/Base.mjs +2 -3
- package/src/plugin/Resizable.mjs +4 -15
- package/src/selection/CircleModel.mjs +1 -5
- package/src/selection/DateSelectorModel.mjs +1 -9
- package/src/selection/GalleryModel.mjs +0 -9
- package/src/selection/HelixModel.mjs +0 -9
- package/src/selection/ListModel.mjs +0 -8
- package/src/selection/Model.mjs +0 -8
- package/src/selection/menu/ListModel.mjs +0 -2
- package/src/selection/table/CellColumnModel.mjs +2 -6
- package/src/selection/table/CellColumnRowModel.mjs +2 -6
- package/src/selection/table/CellModel.mjs +0 -8
- package/src/selection/table/CellRowModel.mjs +2 -8
- package/src/selection/table/ColumnModel.mjs +0 -6
- package/src/selection/table/RowModel.mjs +0 -5
- package/src/tab/Container.mjs +0 -6
- package/src/tab/Strip.mjs +1 -3
- package/src/tab/header/Button.mjs +1 -2
- package/src/tab/header/Toolbar.mjs +0 -1
- package/src/table/Container.mjs +2 -10
- package/src/table/View.mjs +0 -4
- package/src/table/header/Button.mjs +2 -8
- package/src/table/header/Toolbar.mjs +1 -2
- package/src/tree/List.mjs +0 -4
- package/src/util/Css.mjs +0 -1
- package/src/util/Date.mjs +0 -2
- package/src/util/Function.mjs +0 -2
- package/src/util/HashHistory.mjs +0 -3
- package/src/util/KeyNavigation.mjs +0 -5
- package/src/{core → util}/Logger.mjs +7 -19
- package/src/util/Matrix.mjs +0 -3
- package/src/util/VDom.mjs +0 -5
- package/src/util/_export.mjs +2 -1
- package/src/vdom/Helper.mjs +0 -3
- package/src/vdom/VNode.mjs +0 -1
- package/src/worker/App.mjs +2 -9
- package/src/worker/Base.mjs +2 -8
- package/src/worker/Canvas.mjs +0 -2
- package/src/worker/Manager.mjs +3 -5
- package/src/worker/Message.mjs +0 -1
- package/src/worker/mixin/RemoteMethodAccess.mjs +0 -3
- package/test/siesta/siesta.js +2 -1
- package/test/siesta/tests/ClassConfigsAndFields.mjs +307 -0
- package/test/siesta/tests/ClassSystem.mjs +1 -1
|
@@ -43,7 +43,6 @@ class Toolbar extends BaseToolbar {
|
|
|
43
43
|
}}
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
46
|
* @param {Array} items
|
|
48
47
|
*/
|
|
49
48
|
createItems(items) {
|
|
@@ -73,7 +72,6 @@ class Toolbar extends BaseToolbar {
|
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
/**
|
|
76
|
-
*
|
|
77
75
|
* @param dock
|
|
78
76
|
* @returns {String} layoutConfig
|
|
79
77
|
* @override
|
|
@@ -83,7 +81,6 @@ class Toolbar extends BaseToolbar {
|
|
|
83
81
|
}
|
|
84
82
|
|
|
85
83
|
/**
|
|
86
|
-
*
|
|
87
84
|
* @returns {Object}
|
|
88
85
|
*/
|
|
89
86
|
getVdomRoot() {
|
|
@@ -91,7 +88,6 @@ class Toolbar extends BaseToolbar {
|
|
|
91
88
|
}
|
|
92
89
|
|
|
93
90
|
/**
|
|
94
|
-
*
|
|
95
91
|
* @returns {Object}
|
|
96
92
|
*/
|
|
97
93
|
getVnodeRoot() {
|
|
@@ -101,4 +97,4 @@ class Toolbar extends BaseToolbar {
|
|
|
101
97
|
|
|
102
98
|
Neo.applyClassConfig(Toolbar);
|
|
103
99
|
|
|
104
|
-
export {Toolbar as default};
|
|
100
|
+
export {Toolbar as default};
|
package/src/list/Base.mjs
CHANGED
package/src/list/Color.mjs
CHANGED
|
@@ -66,7 +66,6 @@ class Color extends Base {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
70
69
|
* @param {Number|String} recordId
|
|
71
70
|
* @returns {String}
|
|
72
71
|
*/
|
|
@@ -75,7 +74,6 @@ class Color extends Base {
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
/**
|
|
78
|
-
*
|
|
79
77
|
* @param {Number|String} recordId
|
|
80
78
|
* @returns {String}
|
|
81
79
|
*/
|
|
@@ -84,7 +82,6 @@ class Color extends Base {
|
|
|
84
82
|
}
|
|
85
83
|
|
|
86
84
|
/**
|
|
87
|
-
*
|
|
88
85
|
* @param {String[]} items
|
|
89
86
|
*/
|
|
90
87
|
onSelect(items) {
|
package/src/list/Component.mjs
CHANGED
|
@@ -53,7 +53,6 @@ class Component extends Base {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
56
|
* @param {Number} index
|
|
58
57
|
* @returns {String}
|
|
59
58
|
*/
|
|
@@ -62,7 +61,6 @@ class Component extends Base {
|
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
/**
|
|
65
|
-
*
|
|
66
64
|
* @param {Number|String} recordId
|
|
67
65
|
* @returns {String}
|
|
68
66
|
*/
|
|
@@ -71,7 +69,6 @@ class Component extends Base {
|
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
/**
|
|
74
|
-
*
|
|
75
72
|
* @param {String} vnodeId
|
|
76
73
|
* @returns {String|Number} itemId
|
|
77
74
|
*/
|
|
@@ -45,8 +45,8 @@ class Animate extends Base {
|
|
|
45
45
|
/**
|
|
46
46
|
* @param {Object} config
|
|
47
47
|
*/
|
|
48
|
-
|
|
49
|
-
super(config);
|
|
48
|
+
construct(config) {
|
|
49
|
+
super.construct(config);
|
|
50
50
|
|
|
51
51
|
let me = this;
|
|
52
52
|
|
|
@@ -71,7 +71,6 @@ class Animate extends Base {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
75
74
|
* @param {Neo.list.plugin.Animate} me
|
|
76
75
|
* @param {Object} record
|
|
77
76
|
* @param {Number} index
|
|
@@ -119,9 +118,7 @@ class Animate extends Base {
|
|
|
119
118
|
onOwnerMounted() {
|
|
120
119
|
let me = this;
|
|
121
120
|
|
|
122
|
-
|
|
123
|
-
id: me.owner.id
|
|
124
|
-
}).then(rect => {
|
|
121
|
+
me.owner.getDomRect().then(rect => {
|
|
125
122
|
Object.assign(me, {
|
|
126
123
|
columns : Math.floor(rect.width / me.itemWidth),
|
|
127
124
|
ownerRect: rect,
|
package/src/main/DomAccess.mjs
CHANGED
|
@@ -76,11 +76,10 @@ class DomAccess extends Base {
|
|
|
76
76
|
}}
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
80
79
|
* @param {Object} config
|
|
81
80
|
*/
|
|
82
|
-
|
|
83
|
-
super(config);
|
|
81
|
+
construct(config) {
|
|
82
|
+
super.construct(config);
|
|
84
83
|
|
|
85
84
|
let me = this,
|
|
86
85
|
node;
|
|
@@ -99,14 +98,13 @@ class DomAccess extends Base {
|
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
/**
|
|
102
|
-
*
|
|
103
101
|
* @param {Object} data
|
|
104
102
|
* @param {Boolean} data.async
|
|
105
103
|
* @param {Boolean} [data.defer=false]
|
|
106
104
|
* @param {String} [data.src=true]
|
|
107
105
|
*/
|
|
108
106
|
addScript(data) {
|
|
109
|
-
|
|
107
|
+
let script = document.createElement('script');
|
|
110
108
|
|
|
111
109
|
if (!data.hasOwnProperty('async')) {
|
|
112
110
|
data.async = true;
|
|
@@ -118,17 +116,15 @@ class DomAccess extends Base {
|
|
|
118
116
|
}
|
|
119
117
|
|
|
120
118
|
/**
|
|
121
|
-
*
|
|
122
119
|
* @param {Object} data
|
|
123
120
|
* @param {String[]} data.cls
|
|
124
121
|
*/
|
|
125
122
|
applyBodyCls(data) {
|
|
126
|
-
|
|
123
|
+
let cls = data.cls || [];
|
|
127
124
|
document.body.classList.add(...cls);
|
|
128
125
|
}
|
|
129
126
|
|
|
130
127
|
/**
|
|
131
|
-
*
|
|
132
128
|
* @param {Object} data
|
|
133
129
|
* @param {String} data.command
|
|
134
130
|
* @returns {Object} data
|
|
@@ -237,7 +233,6 @@ class DomAccess extends Base {
|
|
|
237
233
|
}
|
|
238
234
|
|
|
239
235
|
/**
|
|
240
|
-
*
|
|
241
236
|
* @param {String} nodeId
|
|
242
237
|
* @returns {HTMLElement}
|
|
243
238
|
* @protected
|
|
@@ -251,7 +246,6 @@ class DomAccess extends Base {
|
|
|
251
246
|
}
|
|
252
247
|
|
|
253
248
|
/**
|
|
254
|
-
*
|
|
255
249
|
* @param {String} [nodeId='document.body']
|
|
256
250
|
* @returns {HTMLElement}
|
|
257
251
|
* @protected
|
|
@@ -277,10 +271,10 @@ class DomAccess extends Base {
|
|
|
277
271
|
script = document.createElement('script');
|
|
278
272
|
|
|
279
273
|
Object.assign(script, {
|
|
280
|
-
async
|
|
274
|
+
async,
|
|
281
275
|
onerror: reject,
|
|
282
276
|
onload : resolve,
|
|
283
|
-
src
|
|
277
|
+
src
|
|
284
278
|
});
|
|
285
279
|
|
|
286
280
|
document.head.appendChild(script);
|
|
@@ -299,7 +293,7 @@ class DomAccess extends Base {
|
|
|
299
293
|
link = document.createElement('link');
|
|
300
294
|
|
|
301
295
|
Object.assign(link, {
|
|
302
|
-
href
|
|
296
|
+
href,
|
|
303
297
|
onerror: reject,
|
|
304
298
|
onload : resolve,
|
|
305
299
|
rel : 'stylesheet',
|
|
@@ -332,14 +326,13 @@ class DomAccess extends Base {
|
|
|
332
326
|
|
|
333
327
|
Neo.worker.Manager.sendMessage(data.origin, {
|
|
334
328
|
action : 'reply',
|
|
335
|
-
data
|
|
329
|
+
data,
|
|
336
330
|
replyId: data.id,
|
|
337
331
|
success: true
|
|
338
332
|
}, [offscreen]);
|
|
339
333
|
}
|
|
340
334
|
|
|
341
335
|
/**
|
|
342
|
-
*
|
|
343
336
|
* @param {Object} data
|
|
344
337
|
* @param {String[]} data.attributes
|
|
345
338
|
* @param {Array} data.functions An array containing strings and/or objects
|
|
@@ -398,14 +391,13 @@ class DomAccess extends Base {
|
|
|
398
391
|
|
|
399
392
|
Neo.worker.Manager.sendMessage(data.origin, {
|
|
400
393
|
action : 'reply',
|
|
401
|
-
data
|
|
394
|
+
data,
|
|
402
395
|
replyId: data.id,
|
|
403
396
|
success: true
|
|
404
397
|
});
|
|
405
398
|
}
|
|
406
399
|
|
|
407
400
|
/**
|
|
408
|
-
*
|
|
409
401
|
* @param {Object} data
|
|
410
402
|
* @protected
|
|
411
403
|
*/
|
|
@@ -416,7 +408,6 @@ class DomAccess extends Base {
|
|
|
416
408
|
}
|
|
417
409
|
|
|
418
410
|
/**
|
|
419
|
-
*
|
|
420
411
|
* @param {Object} data
|
|
421
412
|
* @param {String} data.direction left, top
|
|
422
413
|
* @param {String} data.id
|
|
@@ -434,7 +425,6 @@ class DomAccess extends Base {
|
|
|
434
425
|
}
|
|
435
426
|
|
|
436
427
|
/**
|
|
437
|
-
*
|
|
438
428
|
* @param {Object} data
|
|
439
429
|
* @param {String} data.id
|
|
440
430
|
* @param {String} [data.behavior='smooth']
|
|
@@ -457,7 +447,6 @@ class DomAccess extends Base {
|
|
|
457
447
|
}
|
|
458
448
|
|
|
459
449
|
/**
|
|
460
|
-
*
|
|
461
450
|
* @param {Object} data
|
|
462
451
|
* @param {String} data.direction left, top
|
|
463
452
|
* @param {String} data.id
|
|
@@ -475,7 +464,6 @@ class DomAccess extends Base {
|
|
|
475
464
|
}
|
|
476
465
|
|
|
477
466
|
/**
|
|
478
|
-
*
|
|
479
467
|
* @param {Object} data
|
|
480
468
|
* @param {String} data.id
|
|
481
469
|
* @param {String} [data.behavior='smooth']
|
|
@@ -501,7 +489,6 @@ class DomAccess extends Base {
|
|
|
501
489
|
}
|
|
502
490
|
|
|
503
491
|
/**
|
|
504
|
-
*
|
|
505
492
|
* @param {Object} data
|
|
506
493
|
* @param {String} data.id
|
|
507
494
|
* @param {Number} [data.start=0]
|
|
@@ -557,7 +544,6 @@ class DomAccess extends Base {
|
|
|
557
544
|
}
|
|
558
545
|
|
|
559
546
|
/**
|
|
560
|
-
*
|
|
561
547
|
* @param {Object} data
|
|
562
548
|
* @param {String} [data.behavior='smooth'] // auto or smooth
|
|
563
549
|
* @param {String} [data.left=0]
|
|
@@ -572,7 +558,6 @@ class DomAccess extends Base {
|
|
|
572
558
|
}
|
|
573
559
|
|
|
574
560
|
/**
|
|
575
|
-
*
|
|
576
561
|
* @param {Object} data
|
|
577
562
|
* @protected
|
|
578
563
|
*/
|
package/src/main/DomEvents.mjs
CHANGED
|
@@ -108,11 +108,10 @@ class DomEvents extends Base {
|
|
|
108
108
|
}}
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
112
111
|
* @param {Object} config
|
|
113
112
|
*/
|
|
114
|
-
|
|
115
|
-
super(config);
|
|
113
|
+
construct(config) {
|
|
114
|
+
super.construct(config);
|
|
116
115
|
|
|
117
116
|
let me = this;
|
|
118
117
|
|
|
@@ -125,7 +124,6 @@ class DomEvents extends Base {
|
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
/**
|
|
128
|
-
*
|
|
129
127
|
* @param {Object} data
|
|
130
128
|
*/
|
|
131
129
|
addDomListener(data) {
|
|
@@ -156,7 +154,7 @@ class DomEvents extends Base {
|
|
|
156
154
|
|
|
157
155
|
Neo.worker.Manager.sendMessage(data.origin, {
|
|
158
156
|
action : 'reply',
|
|
159
|
-
data
|
|
157
|
+
data,
|
|
160
158
|
replyId: data.id,
|
|
161
159
|
success: true
|
|
162
160
|
});
|
|
@@ -249,7 +247,6 @@ class DomEvents extends Base {
|
|
|
249
247
|
}
|
|
250
248
|
|
|
251
249
|
/**
|
|
252
|
-
*
|
|
253
250
|
* @param {Object} event
|
|
254
251
|
* @returns {Object}
|
|
255
252
|
*/
|
|
@@ -265,52 +262,49 @@ class DomEvents extends Base {
|
|
|
265
262
|
}
|
|
266
263
|
|
|
267
264
|
/**
|
|
268
|
-
*
|
|
269
265
|
* @param {Object} event
|
|
270
266
|
* @returns {Object}
|
|
271
267
|
*/
|
|
272
268
|
getKeyboardEventData(event) {
|
|
273
|
-
|
|
269
|
+
let {altKey, code, ctrlKey, key, keyCode, metaKey, shiftKey} = event;
|
|
274
270
|
|
|
275
271
|
return {
|
|
276
272
|
...this.getEventData(event),
|
|
277
|
-
altKey
|
|
278
|
-
code
|
|
279
|
-
ctrlKey
|
|
280
|
-
key
|
|
281
|
-
keyCode
|
|
282
|
-
metaKey
|
|
283
|
-
shiftKey
|
|
273
|
+
altKey,
|
|
274
|
+
code,
|
|
275
|
+
ctrlKey,
|
|
276
|
+
key,
|
|
277
|
+
keyCode,
|
|
278
|
+
metaKey,
|
|
279
|
+
shiftKey
|
|
284
280
|
};
|
|
285
281
|
}
|
|
286
282
|
|
|
287
283
|
/**
|
|
288
|
-
*
|
|
289
284
|
* @param {Object} event
|
|
290
285
|
* @returns {Object}
|
|
291
286
|
*/
|
|
292
287
|
getMouseEventData(event) {
|
|
293
|
-
|
|
288
|
+
let {altKey, clientX, clientY, ctrlKey, metaKey, offsetX, offsetY, pageX, pageY, screenX, screenY, shiftKey} = event;
|
|
294
289
|
|
|
295
290
|
return {
|
|
296
291
|
...this.getEventData(event),
|
|
297
|
-
altKey
|
|
298
|
-
clientX
|
|
299
|
-
clientY
|
|
300
|
-
ctrlKey
|
|
301
|
-
metaKey
|
|
302
|
-
offsetX
|
|
303
|
-
offsetY
|
|
304
|
-
pageX
|
|
305
|
-
pageY
|
|
306
|
-
screenX
|
|
307
|
-
screenY
|
|
308
|
-
shiftKey
|
|
292
|
+
altKey,
|
|
293
|
+
clientX,
|
|
294
|
+
clientY,
|
|
295
|
+
ctrlKey,
|
|
296
|
+
metaKey,
|
|
297
|
+
offsetX,
|
|
298
|
+
offsetY,
|
|
299
|
+
pageX,
|
|
300
|
+
pageY,
|
|
301
|
+
screenX,
|
|
302
|
+
screenY,
|
|
303
|
+
shiftKey
|
|
309
304
|
};
|
|
310
305
|
}
|
|
311
306
|
|
|
312
307
|
/**
|
|
313
|
-
*
|
|
314
308
|
* @param {Element} element
|
|
315
309
|
* @returns {Element[]}
|
|
316
310
|
*/
|
|
@@ -330,7 +324,6 @@ class DomEvents extends Base {
|
|
|
330
324
|
}
|
|
331
325
|
|
|
332
326
|
/**
|
|
333
|
-
*
|
|
334
327
|
* @param {Object} node
|
|
335
328
|
* @returns {Object}
|
|
336
329
|
*/
|
|
@@ -397,18 +390,17 @@ class DomEvents extends Base {
|
|
|
397
390
|
* @param {Object} event
|
|
398
391
|
*/
|
|
399
392
|
onBeforeUnload(event) {
|
|
400
|
-
let
|
|
393
|
+
let manager = Neo.worker.Manager;
|
|
401
394
|
|
|
402
|
-
|
|
403
|
-
|
|
395
|
+
manager.appNames.forEach(appName => {
|
|
396
|
+
manager.broadcast({
|
|
404
397
|
action : 'disconnect',
|
|
405
|
-
appName
|
|
398
|
+
appName
|
|
406
399
|
});
|
|
407
400
|
})
|
|
408
401
|
}
|
|
409
402
|
|
|
410
403
|
/**
|
|
411
|
-
*
|
|
412
404
|
* @param {Object} event
|
|
413
405
|
*/
|
|
414
406
|
onChange(event) {
|
|
@@ -420,7 +412,6 @@ class DomEvents extends Base {
|
|
|
420
412
|
}
|
|
421
413
|
|
|
422
414
|
/**
|
|
423
|
-
*
|
|
424
415
|
* @param {Object} event
|
|
425
416
|
*/
|
|
426
417
|
onClick(event) {
|
|
@@ -428,13 +419,10 @@ class DomEvents extends Base {
|
|
|
428
419
|
|
|
429
420
|
me.sendMessageToApp(me.getMouseEventData(event));
|
|
430
421
|
|
|
431
|
-
|
|
432
|
-
event.preventDefault();
|
|
433
|
-
}
|
|
422
|
+
me.testPathInclusion(event, preventClickTargets) && event.preventDefault();
|
|
434
423
|
}
|
|
435
424
|
|
|
436
425
|
/**
|
|
437
|
-
*
|
|
438
426
|
* @param {Object} event
|
|
439
427
|
*/
|
|
440
428
|
onContextMenu(event) {
|
|
@@ -442,9 +430,7 @@ class DomEvents extends Base {
|
|
|
442
430
|
|
|
443
431
|
me.sendMessageToApp(me.getMouseEventData(event));
|
|
444
432
|
|
|
445
|
-
|
|
446
|
-
event.preventDefault();
|
|
447
|
-
}
|
|
433
|
+
me.testPathInclusion(event, preventContextmenuTargets) && event.preventDefault();
|
|
448
434
|
}
|
|
449
435
|
|
|
450
436
|
/**
|
|
@@ -456,7 +442,6 @@ class DomEvents extends Base {
|
|
|
456
442
|
}
|
|
457
443
|
|
|
458
444
|
/**
|
|
459
|
-
*
|
|
460
445
|
* @param {Object} event
|
|
461
446
|
*/
|
|
462
447
|
onDoubleClick(event) {
|
|
@@ -464,13 +449,10 @@ class DomEvents extends Base {
|
|
|
464
449
|
|
|
465
450
|
me.sendMessageToApp(me.getMouseEventData(event));
|
|
466
451
|
|
|
467
|
-
|
|
468
|
-
event.preventDefault();
|
|
469
|
-
}
|
|
452
|
+
me.testPathInclusion(event, preventClickTargets) && event.preventDefault();
|
|
470
453
|
}
|
|
471
454
|
|
|
472
455
|
/**
|
|
473
|
-
*
|
|
474
456
|
* @param {Object} event
|
|
475
457
|
*/
|
|
476
458
|
onDragOver(event) {
|
|
@@ -479,7 +461,6 @@ class DomEvents extends Base {
|
|
|
479
461
|
}
|
|
480
462
|
|
|
481
463
|
/**
|
|
482
|
-
*
|
|
483
464
|
* @param {Object} event
|
|
484
465
|
*/
|
|
485
466
|
onFocusIn(event) {
|
|
@@ -487,7 +468,6 @@ class DomEvents extends Base {
|
|
|
487
468
|
}
|
|
488
469
|
|
|
489
470
|
/**
|
|
490
|
-
*
|
|
491
471
|
* @param {Object} event
|
|
492
472
|
*/
|
|
493
473
|
onFocusOut(event) {
|
|
@@ -498,21 +478,20 @@ class DomEvents extends Base {
|
|
|
498
478
|
*
|
|
499
479
|
*/
|
|
500
480
|
onHashChange() {
|
|
501
|
-
|
|
502
|
-
|
|
481
|
+
let manager = Neo.worker.Manager,
|
|
482
|
+
hashString = location.hash.substr(1);
|
|
503
483
|
|
|
504
|
-
|
|
484
|
+
manager.sendMessage('app', {
|
|
505
485
|
action: 'hashChange',
|
|
506
486
|
data : {
|
|
507
|
-
appNames :
|
|
487
|
+
appNames : manager.appNames,
|
|
508
488
|
hash : this.parseHash(hashString),
|
|
509
|
-
hashString
|
|
489
|
+
hashString
|
|
510
490
|
}
|
|
511
491
|
});
|
|
512
492
|
}
|
|
513
493
|
|
|
514
494
|
/**
|
|
515
|
-
*
|
|
516
495
|
* @param {Object} event
|
|
517
496
|
*/
|
|
518
497
|
onKeyDown(event) {
|
|
@@ -526,7 +505,6 @@ class DomEvents extends Base {
|
|
|
526
505
|
}
|
|
527
506
|
|
|
528
507
|
/**
|
|
529
|
-
*
|
|
530
508
|
* @param {Object} event
|
|
531
509
|
*/
|
|
532
510
|
onKeyUp(event) {
|
|
@@ -534,7 +512,6 @@ class DomEvents extends Base {
|
|
|
534
512
|
}
|
|
535
513
|
|
|
536
514
|
/**
|
|
537
|
-
*
|
|
538
515
|
* @param {Object} event
|
|
539
516
|
*/
|
|
540
517
|
onMouseDown(event) {
|
|
@@ -542,7 +519,6 @@ class DomEvents extends Base {
|
|
|
542
519
|
}
|
|
543
520
|
|
|
544
521
|
/**
|
|
545
|
-
*
|
|
546
522
|
* @param {Object} event
|
|
547
523
|
*/
|
|
548
524
|
onMouseEnter(event) {
|
|
@@ -554,7 +530,6 @@ class DomEvents extends Base {
|
|
|
554
530
|
}
|
|
555
531
|
|
|
556
532
|
/**
|
|
557
|
-
*
|
|
558
533
|
* @param {Object} event
|
|
559
534
|
*/
|
|
560
535
|
onMouseLeave(event) {
|
|
@@ -566,7 +541,6 @@ class DomEvents extends Base {
|
|
|
566
541
|
}
|
|
567
542
|
|
|
568
543
|
/**
|
|
569
|
-
*
|
|
570
544
|
* @param {Object} event
|
|
571
545
|
*/
|
|
572
546
|
onMouseUp(event) {
|
|
@@ -574,7 +548,6 @@ class DomEvents extends Base {
|
|
|
574
548
|
}
|
|
575
549
|
|
|
576
550
|
/**
|
|
577
|
-
*
|
|
578
551
|
* @param {Object} event
|
|
579
552
|
*/
|
|
580
553
|
onWheel(event) {
|
|
@@ -592,22 +565,22 @@ class DomEvents extends Base {
|
|
|
592
565
|
preventUpdate = true;
|
|
593
566
|
} else {
|
|
594
567
|
Object.assign(lastWheelEvent, {
|
|
595
|
-
date
|
|
568
|
+
date,
|
|
596
569
|
target: targetCls
|
|
597
570
|
});
|
|
598
571
|
}
|
|
599
572
|
}
|
|
600
573
|
|
|
601
574
|
if (!preventUpdate) {
|
|
602
|
-
|
|
575
|
+
let {deltaX, deltaY, deltaZ} = event;
|
|
603
576
|
|
|
604
577
|
this.sendMessageToApp({
|
|
605
578
|
...this.getEventData(event),
|
|
606
579
|
clientHeight: target.node.clientHeight,
|
|
607
580
|
clientWidth : target.node.clientWidth,
|
|
608
|
-
deltaX
|
|
609
|
-
deltaY
|
|
610
|
-
deltaZ
|
|
581
|
+
deltaX,
|
|
582
|
+
deltaY,
|
|
583
|
+
deltaZ,
|
|
611
584
|
scrollLeft : target.node.scrollLeft,
|
|
612
585
|
scrollTop : target.node.scrollTop
|
|
613
586
|
});
|
|
@@ -678,7 +651,6 @@ class DomEvents extends Base {
|
|
|
678
651
|
}
|
|
679
652
|
|
|
680
653
|
/**
|
|
681
|
-
*
|
|
682
654
|
* @param {Object} data
|
|
683
655
|
* @param {Array|String} data.cls
|
|
684
656
|
* @param {String} data.name
|
|
@@ -700,9 +672,7 @@ class DomEvents extends Base {
|
|
|
700
672
|
}
|
|
701
673
|
|
|
702
674
|
data.cls.forEach(cls => {
|
|
703
|
-
|
|
704
|
-
preventArray.push(cls);
|
|
705
|
-
}
|
|
675
|
+
!preventArray.includes(cls) && preventArray.push(cls);
|
|
706
676
|
});
|
|
707
677
|
}
|
|
708
678
|
|
|
@@ -715,14 +685,11 @@ class DomEvents extends Base {
|
|
|
715
685
|
Neo.worker.Manager.sendMessage('app', {
|
|
716
686
|
action : 'domEvent',
|
|
717
687
|
eventName: data.type,
|
|
718
|
-
data
|
|
688
|
+
data
|
|
719
689
|
});
|
|
720
690
|
}
|
|
721
691
|
|
|
722
|
-
|
|
723
|
-
|
|
724
692
|
/**
|
|
725
|
-
*
|
|
726
693
|
* @param {Object} event
|
|
727
694
|
* @param {Object} targetArray
|
|
728
695
|
* @returns {Object|Boolean} target cls & node if found, false otherwise
|
|
@@ -741,7 +708,7 @@ class DomEvents extends Base {
|
|
|
741
708
|
if (node.classList?.contains(targetArray[j])) {
|
|
742
709
|
return {
|
|
743
710
|
cls : targetArray[j],
|
|
744
|
-
node
|
|
711
|
+
node
|
|
745
712
|
};
|
|
746
713
|
}
|
|
747
714
|
}
|