neo.mjs 7.9.1 → 7.10.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.
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/dialog/MainContainer.mjs +17 -5
- package/package.json +1 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/controller/Application.mjs +0 -3
- package/src/manager/DomEvent.mjs +3 -1
- package/src/util/Logger.mjs +1 -16
package/apps/ServiceWorker.mjs
CHANGED
@@ -50,7 +50,7 @@ class MainContainer extends Viewport {
|
|
50
50
|
checked : true,
|
51
51
|
hideLabel : true,
|
52
52
|
hideValueLabel: false,
|
53
|
-
listeners : {change: me.
|
53
|
+
listeners : {change: me.onBoundaryContainerIdChange.bind(me)},
|
54
54
|
style : {marginLeft: '3em'},
|
55
55
|
valueLabelText: 'Limit Drag&Drop to the document.body'
|
56
56
|
}, {
|
@@ -58,6 +58,7 @@ class MainContainer extends Viewport {
|
|
58
58
|
checked : true,
|
59
59
|
hideLabel : true,
|
60
60
|
hideValueLabel: false,
|
61
|
+
listeners : {change: me.onConfigChange.bind(me, 'animated')},
|
61
62
|
style : {marginLeft: '3em'},
|
62
63
|
valueLabelText: 'Animated'
|
63
64
|
}, {
|
@@ -65,6 +66,7 @@ class MainContainer extends Viewport {
|
|
65
66
|
checked : true,
|
66
67
|
hideLabel : true,
|
67
68
|
hideValueLabel: false,
|
69
|
+
listeners : {change: me.onConfigChange.bind(me, 'modal')},
|
68
70
|
style : {marginLeft: '1em'},
|
69
71
|
valueLabelText: 'Modal'
|
70
72
|
}, '->', {
|
@@ -100,17 +102,27 @@ class MainContainer extends Viewport {
|
|
100
102
|
}
|
101
103
|
|
102
104
|
/**
|
103
|
-
* @param {String} config
|
104
105
|
* @param {Object} opts
|
105
106
|
*/
|
106
|
-
|
107
|
+
onBoundaryContainerIdChange(opts) {
|
107
108
|
let me = this,
|
109
|
+
{dialog} = me,
|
108
110
|
boundaryContainerId = opts.value ? 'document.body' : null;
|
109
111
|
|
110
112
|
me.boundaryContainerId = boundaryContainerId
|
111
113
|
|
112
|
-
if (
|
113
|
-
|
114
|
+
if (dialog) {
|
115
|
+
dialog.boundaryContainerId = boundaryContainerId
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
/**
|
120
|
+
* @param {String} config
|
121
|
+
* @param {Object} opts
|
122
|
+
*/
|
123
|
+
onConfigChange(config, opts) {
|
124
|
+
if (this.dialog) {
|
125
|
+
this.dialog[config] = opts.value
|
114
126
|
}
|
115
127
|
}
|
116
128
|
|
package/package.json
CHANGED
package/src/DefaultConfig.mjs
CHANGED
@@ -262,12 +262,12 @@ const DefaultConfig = {
|
|
262
262
|
useVdomWorker: true,
|
263
263
|
/**
|
264
264
|
* buildScripts/injectPackageVersion.mjs will update this value
|
265
|
-
* @default '7.
|
265
|
+
* @default '7.10.0'
|
266
266
|
* @memberOf! module:Neo
|
267
267
|
* @name config.version
|
268
268
|
* @type String
|
269
269
|
*/
|
270
|
-
version: '7.
|
270
|
+
version: '7.10.0'
|
271
271
|
};
|
272
272
|
|
273
273
|
Object.assign(DefaultConfig, {
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import Base from './Base.mjs';
|
2
2
|
import ClassSystemUtil from '../util/ClassSystem.mjs';
|
3
|
-
import Logger from '../util/Logger.mjs';
|
4
3
|
|
5
4
|
/**
|
6
5
|
* @class Neo.controller.Application
|
@@ -101,8 +100,6 @@ class Application extends Base {
|
|
101
100
|
// short delay to ensure changes from onHashChange() got applied
|
102
101
|
await me.timeout(Neo.config.hash ? 200 : 10);
|
103
102
|
|
104
|
-
Logger.addContextMenuListener(me.mainView);
|
105
|
-
|
106
103
|
await value.render(true)
|
107
104
|
}
|
108
105
|
}
|
package/src/manager/DomEvent.mjs
CHANGED
@@ -172,7 +172,9 @@ class DomEvent extends Base {
|
|
172
172
|
}
|
173
173
|
}
|
174
174
|
|
175
|
-
if (eventName
|
175
|
+
if (eventName === 'contextmenu' && data.ctrlKey) {
|
176
|
+
Neo.util?.Logger?.onContextMenu(data)
|
177
|
+
} else if (eventName.startsWith('drop')) {
|
176
178
|
let dragZone = data.dragZoneId && Neo.get(data.dragZoneId);
|
177
179
|
|
178
180
|
if (dragZone) {
|
package/src/util/Logger.mjs
CHANGED
@@ -77,17 +77,6 @@ class Logger extends Base {
|
|
77
77
|
})
|
78
78
|
}
|
79
79
|
|
80
|
-
/**
|
81
|
-
* Ctrl-Right-Click will show the current component
|
82
|
-
* @param {Neo.component.Base} view
|
83
|
-
*/
|
84
|
-
addContextMenuListener(view) {
|
85
|
-
view.addDomListeners({
|
86
|
-
contextmenu: this.onContextMenu,
|
87
|
-
scope : this
|
88
|
-
})
|
89
|
-
}
|
90
|
-
|
91
80
|
/**
|
92
81
|
* Set level to number based on position in logLevels
|
93
82
|
* @param {String} value
|
@@ -169,11 +158,7 @@ class Logger extends Base {
|
|
169
158
|
onContextMenu(data) {
|
170
159
|
let {config} = Neo;
|
171
160
|
|
172
|
-
if (
|
173
|
-
data.ctrlKey
|
174
|
-
&& config.enableComponentLogger
|
175
|
-
&& !(config.env === 'dist/production' && config.enableLogsInProduction)
|
176
|
-
) {
|
161
|
+
if (config.enableComponentLogger && !(config.env === 'dist/production' && config.enableLogsInProduction)) {
|
177
162
|
let isGroupSet = false,
|
178
163
|
component;
|
179
164
|
|