neo.mjs 6.15.1 → 6.15.3
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/model/ContentSection.mjs +3 -0
- package/apps/portal/view/learn/ContentView.mjs +19 -12
- package/apps/portal/view/learn/MainContainer.mjs +8 -6
- package/apps/portal/view/learn/MainContainerController.mjs +3 -6
- package/apps/portal/view/learn/MainContainerModel.mjs +1 -24
- package/apps/portal/view/learn/PageContainer.mjs +4 -8
- package/apps/portal/view/learn/PageSectionsList.mjs +80 -0
- package/apps/portal/view/learn/PageSectionsPanel.mjs +21 -50
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/calendar/basic/neo-config.json +4 -5
- package/examples/calendar/weekview/neo-config.json +4 -5
- package/examples/component/timer/neo-config.json +4 -5
- package/examples/component/toast/MainContainerController.mjs +1 -0
- package/examples/component/toast/neo-config.json +1 -1
- package/examples/component/video/neo-config.json +4 -5
- package/examples/core/config/neo-config.json +5 -6
- package/examples/grid/container/neo-config.json +4 -5
- package/examples/grid/covid/neo-config.json +5 -6
- package/examples/list/animate/neo-config.json +4 -5
- package/examples/list/color/neo-config.json +4 -5
- package/examples/menu/list/neo-config.json +4 -5
- package/examples/menu/panel/neo-config.json +4 -5
- package/examples/model/advanced/neo-config.json +5 -6
- package/examples/model/extendedClass/neo-config.json +5 -6
- package/examples/model/inline/neo-config.json +5 -6
- package/examples/model/inlineNoModel/neo-config.json +5 -6
- package/examples/model/nestedData/neo-config.json +5 -6
- package/examples/model/table/neo-config.json +5 -6
- package/examples/panel/MainContainer.mjs +1 -2
- package/examples/panel/neo-config.json +5 -6
- package/examples/popover/neo-config.json +6 -10
- package/examples/table/container/neo-config.json +4 -5
- package/examples/table/covid/neo-config.json +5 -6
- package/examples/tableFiltering/neo-config.json +4 -5
- package/examples/tablePerformance/neo-config.json +5 -6
- package/examples/tableStore/neo-config.json +4 -5
- package/examples/tabs/neo-config.json +5 -6
- package/examples/todoList/version1/neo-config.json +5 -6
- package/examples/todoList/version2/neo-config.json +5 -6
- package/package.json +6 -6
- package/resources/data/deck/learnneo/pages/Earthquakes.md +1 -1
- package/resources/scss/src/apps/portal/learn/ContentView.scss +1 -1
- package/resources/scss/src/apps/portal/learn/PageContainer.scss +1 -0
- package/resources/scss/src/apps/portal/learn/PageSectionsList.scss +23 -0
- package/resources/scss/src/apps/portal/learn/PageSectionsPanel.scss +28 -4
- package/resources/scss/theme-neo-light/Global.scss +9 -0
- package/src/DefaultConfig.mjs +2 -2
- package/src/form/field/ComboBox.mjs +6 -7
- package/src/list/Base.mjs +7 -0
package/apps/ServiceWorker.mjs
CHANGED
@@ -4,7 +4,9 @@ import {marked} from '../../../../node_modules/marked/lib/marked.esm.js';
|
|
4
4
|
|
5
5
|
const
|
6
6
|
labCloseRegex = /<!--\s*\/lab\s*-->/g,
|
7
|
-
labOpenRegex = /<!--\s*lab\s*-->/g
|
7
|
+
labOpenRegex = /<!--\s*lab\s*-->/g,
|
8
|
+
preJsRegex = /<pre\s+data-javascript\s*>([\s\S]*?)<\/pre>/g,
|
9
|
+
preNeoRegex = /<pre\s+data-neo\s*>([\s\S]*?)<\/pre>/g;
|
8
10
|
|
9
11
|
/**
|
10
12
|
* @class Portal.view.learn.ContentView
|
@@ -147,13 +149,10 @@ class ContentView extends Component {
|
|
147
149
|
// 1. Replace <pre data-neo> with <div id='neo-preview-2'/>
|
148
150
|
// and update map with key/value pairs, where the key is the ID and the value is the <pre> contents.
|
149
151
|
|
150
|
-
// Define a regular expression to match <pre data-javascript> tags
|
151
|
-
const preRegex = /<pre\s+data-neo\s*>([\s\S]*?)<\/pre>/g;
|
152
|
-
|
153
152
|
let count = 0;
|
154
153
|
|
155
154
|
// Replace the content with tokens, and create a promise to update the corresponding content
|
156
|
-
return htmlString.replace(
|
155
|
+
return htmlString.replace(preNeoRegex, (match, preContent) => {
|
157
156
|
const key = `pre-live-preview-${Neo.core.IdGenerator.getId()}-${count++}`;
|
158
157
|
map[key] = preContent;
|
159
158
|
return `<div id="${key}"></div>`
|
@@ -182,15 +181,12 @@ class ContentView extends Component {
|
|
182
181
|
|
183
182
|
// Note that if we were to import HighlightJS directly, we wouldn't need all this async code.
|
184
183
|
|
185
|
-
// Define a regular expression to match <pre data-javascript> tags
|
186
|
-
const preRegex = /<pre\s+data-javascript\s*>([\s\S]*?)<\/pre>/g;
|
187
|
-
|
188
184
|
// Create an array to store promises for each replacement
|
189
185
|
const replacementPromises = [];
|
190
186
|
let count = 0;
|
191
187
|
|
192
188
|
// Replace the content with tokens, and create a promise to update the corresponding content
|
193
|
-
let updatedHtml = htmlString.replace(
|
189
|
+
let updatedHtml = htmlString.replace(preJsRegex, (match, preContent) => {
|
194
190
|
const token = `__NEO-PRE-TOKEN-${++count}__`;
|
195
191
|
replacementPromises.push(this.getHighlightPromise(preContent, token, `pre-preview-${Neo.core.IdGenerator.getId()}`));
|
196
192
|
return token
|
@@ -247,15 +243,26 @@ class ContentView extends Component {
|
|
247
243
|
let me = this,
|
248
244
|
contentArray = content.split('\n'),
|
249
245
|
i = 1,
|
250
|
-
storeData = []
|
246
|
+
storeData = [],
|
247
|
+
tag;
|
251
248
|
|
252
249
|
contentArray.forEach((line, index) => {
|
250
|
+
tag = null;
|
251
|
+
|
253
252
|
if (line.startsWith('##') && line.charAt(2) !== '#') {
|
254
253
|
line = line.substring(2).trim();
|
254
|
+
tag = 'h2';
|
255
|
+
}
|
256
|
+
|
257
|
+
else if (line.startsWith('###') && line.charAt(3) !== '#') {
|
258
|
+
line = line.substring(3).trim();
|
259
|
+
tag = 'h3';
|
260
|
+
}
|
255
261
|
|
256
|
-
|
262
|
+
if (tag) {
|
263
|
+
storeData.push({id: i, name: line, sourceId: me.id, tag});
|
257
264
|
|
258
|
-
contentArray[index] =
|
265
|
+
contentArray[index] = `<${tag} class="neo-${tag}" data-record-id="${i}">${line}</${tag}>`;
|
259
266
|
|
260
267
|
i++
|
261
268
|
}
|
@@ -46,14 +46,16 @@ class MainContainer extends Container {
|
|
46
46
|
size : 3
|
47
47
|
}, {
|
48
48
|
module: PageContainer
|
49
|
-
},
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
},
|
50
|
+
// {
|
51
|
+
// module: Splitter,
|
52
|
+
// cls : ['main-content-splitter'],
|
53
|
+
// size : 3
|
54
|
+
// },
|
55
|
+
{
|
54
56
|
module : PageSectionsPanel,
|
55
57
|
reference: 'page-sections-panel',
|
56
|
-
width :
|
58
|
+
width : 250
|
57
59
|
}],
|
58
60
|
/**
|
59
61
|
* @member {Object} layout={ntype:'hbox',align:'stretch'}
|
@@ -69,7 +69,7 @@ class MainContainerController extends Controller {
|
|
69
69
|
* @param {String} data.appName
|
70
70
|
* @param {Number} data.windowId
|
71
71
|
*/
|
72
|
-
async onAppConnect(data) {
|
72
|
+
async onAppConnect(data) {
|
73
73
|
let me = this,
|
74
74
|
app = Neo.apps[data.appName],
|
75
75
|
mainView = app.mainView,
|
@@ -119,10 +119,7 @@ class MainContainerController extends Controller {
|
|
119
119
|
}
|
120
120
|
// Close popup windows when closing or reloading the main window
|
121
121
|
else {
|
122
|
-
Neo.Main.windowClose({
|
123
|
-
names: me.connectedApps,
|
124
|
-
windowId
|
125
|
-
})
|
122
|
+
Neo.Main.windowClose({names: me.connectedApps, windowId})
|
126
123
|
}
|
127
124
|
}
|
128
125
|
|
@@ -191,7 +188,7 @@ class MainContainerController extends Controller {
|
|
191
188
|
list = panel.list,
|
192
189
|
recordId = parseInt(data.data.recordId);
|
193
190
|
|
194
|
-
if (!
|
191
|
+
if (!list.isAnimating) {
|
195
192
|
list.selectionModel.select(list.store.get(recordId))
|
196
193
|
}
|
197
194
|
}
|
@@ -47,12 +47,7 @@ class MainContainerModel extends Component {
|
|
47
47
|
* The record which gets shown as the content page
|
48
48
|
* @member {Object} data.previousPageRecord=null
|
49
49
|
*/
|
50
|
-
previousPageRecord: null
|
51
|
-
/**
|
52
|
-
* Merging the direct parent text
|
53
|
-
* @member {String|null} data.previousPageText=null
|
54
|
-
*/
|
55
|
-
previousPageText: null
|
50
|
+
previousPageRecord: null
|
56
51
|
},
|
57
52
|
/**
|
58
53
|
* @member {Object} stores
|
@@ -67,22 +62,6 @@ class MainContainerModel extends Component {
|
|
67
62
|
}
|
68
63
|
}
|
69
64
|
|
70
|
-
/**
|
71
|
-
* Combines the record parent node name (if available) with the record name
|
72
|
-
* @param {Object} record
|
73
|
-
* @param {Neo.data.Store} store
|
74
|
-
* @returns {String|null}
|
75
|
-
*/
|
76
|
-
getRecordTreeName(record, store) {
|
77
|
-
let parentText = record.name;
|
78
|
-
|
79
|
-
if (record.parentId !== null) {
|
80
|
-
parentText = store.get(record.parentId).name + ': ' + parentText
|
81
|
-
}
|
82
|
-
|
83
|
-
return parentText
|
84
|
-
}
|
85
|
-
|
86
65
|
/**
|
87
66
|
* @param {String} key
|
88
67
|
* @param {*} value
|
@@ -111,7 +90,6 @@ class MainContainerModel extends Component {
|
|
111
90
|
|
112
91
|
if (record.isLeaf && !me.recordIsHidden(record, store)) {
|
113
92
|
previousPageRecord = record;
|
114
|
-
previousPageText = me.getRecordTreeName(record, store);
|
115
93
|
break
|
116
94
|
}
|
117
95
|
}
|
@@ -124,7 +102,6 @@ class MainContainerModel extends Component {
|
|
124
102
|
|
125
103
|
if (record.isLeaf && !me.recordIsHidden(record, store)) {
|
126
104
|
nextPageRecord = record;
|
127
|
-
nextPageText = me.getRecordTreeName(record, store);
|
128
105
|
break
|
129
106
|
}
|
130
107
|
}
|
@@ -89,12 +89,10 @@ class PageContainer extends Container {
|
|
89
89
|
*/
|
90
90
|
afterSetNextPageRecord(value, oldValue) {
|
91
91
|
if (oldValue !== undefined) {
|
92
|
-
let me = this;
|
93
|
-
|
94
92
|
if (value) {
|
95
|
-
|
93
|
+
this.nextPageButton.set({hidden: false, text: value.name})
|
96
94
|
} else {
|
97
|
-
|
95
|
+
this.nextPageButton.hidden = true
|
98
96
|
}
|
99
97
|
}
|
100
98
|
}
|
@@ -106,12 +104,10 @@ class PageContainer extends Container {
|
|
106
104
|
*/
|
107
105
|
afterSetPreviousPageRecord(value, oldValue) {
|
108
106
|
if (oldValue !== undefined) {
|
109
|
-
let me = this;
|
110
|
-
|
111
107
|
if (value) {
|
112
|
-
|
108
|
+
this.prevPageButton.set({hidden: false, text: value.name})
|
113
109
|
} else {
|
114
|
-
|
110
|
+
this.prevPageButton.hidden = true
|
115
111
|
}
|
116
112
|
}
|
117
113
|
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import List from '../../../../src/list/Base.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Portal.view.learn.PageSectionsList
|
5
|
+
* @extends Neo.list.Base
|
6
|
+
*/
|
7
|
+
class PageSectionsList extends List {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Portal.view.learn.PageSectionsList'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Portal.view.learn.PageSectionsList',
|
14
|
+
/**
|
15
|
+
* @member {Object} bind
|
16
|
+
*/
|
17
|
+
bind: {
|
18
|
+
store: 'stores.contentSections'
|
19
|
+
},
|
20
|
+
/**
|
21
|
+
* @member {String[]} cls=['portal-page-sections-list','topics-tree']
|
22
|
+
*/
|
23
|
+
cls: ['portal-page-sections-list', 'topics-tree']
|
24
|
+
}
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Internal flag to indicate that node.scrollIntoView() is running with an animation
|
28
|
+
* @member {Boolean} isAnimating=false
|
29
|
+
*/
|
30
|
+
isAnimating = false
|
31
|
+
|
32
|
+
/**
|
33
|
+
* @param {Object} record
|
34
|
+
* @param {Number} index
|
35
|
+
* @returns {Object|Object[]|String} Either a config object to assign to the item, a vdom cn array or a html string
|
36
|
+
*/
|
37
|
+
createItemContent(record, index) {
|
38
|
+
return {
|
39
|
+
cls : `neo-${record.tag}`,
|
40
|
+
html: record[this.displayField]
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
/**
|
45
|
+
*
|
46
|
+
*/
|
47
|
+
onConstructed() {
|
48
|
+
super.onConstructed();
|
49
|
+
|
50
|
+
let me = this;
|
51
|
+
|
52
|
+
me.on('itemClick', me.onSelectionChange, me)
|
53
|
+
}
|
54
|
+
|
55
|
+
/**
|
56
|
+
* @param {Object} data
|
57
|
+
*/
|
58
|
+
async onSelectionChange(data) {
|
59
|
+
let me = this,
|
60
|
+
record = data.record;
|
61
|
+
|
62
|
+
if (record) {
|
63
|
+
me.isAnimating = true;
|
64
|
+
|
65
|
+
await Neo.main.DomAccess.scrollIntoView({
|
66
|
+
querySelector: `[data-record-id='${record.id}']`,
|
67
|
+
windowId : me.windowId
|
68
|
+
});
|
69
|
+
|
70
|
+
// better safe than sorry
|
71
|
+
await me.timeout(200);
|
72
|
+
|
73
|
+
me.isAnimating = false
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
Neo.setupClass(PageSectionsList);
|
79
|
+
|
80
|
+
export default PageSectionsList;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import Panel
|
1
|
+
import PageSectionsList from './PageSectionsList.mjs';
|
2
|
+
import Panel from '../../../../src/container/Panel.mjs';
|
3
3
|
|
4
4
|
/**
|
5
5
|
* @class Portal.view.learn.PageSectionsPanel
|
@@ -19,68 +19,39 @@ class PageSectionsPanel extends Panel {
|
|
19
19
|
/**
|
20
20
|
* @member {Object[]} headers
|
21
21
|
*/
|
22
|
-
headers: [{
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
// headers: [{
|
23
|
+
// dock : 'top',
|
24
|
+
// items: [{
|
25
|
+
// ntype: 'label',
|
26
|
+
// text : 'On this page'
|
27
|
+
// }, '->', {
|
28
|
+
// iconCls: 'fas fa-chevron-right',
|
29
|
+
// ui : 'secondary',
|
30
|
+
// tooltip: 'Collapse Sections'
|
31
|
+
// }]
|
32
|
+
// }],
|
26
33
|
/**
|
27
34
|
* @member {Object[]} items
|
28
35
|
*/
|
29
36
|
items: [{
|
30
|
-
|
31
|
-
|
32
|
-
|
37
|
+
vdom:
|
38
|
+
{ cn: [
|
39
|
+
{ tag: 'h3', html: 'On this page' },
|
40
|
+
]}
|
41
|
+
|
42
|
+
},{
|
43
|
+
module : PageSectionsList,
|
33
44
|
reference: 'list'
|
34
45
|
}]
|
35
46
|
}
|
36
47
|
|
37
|
-
/**
|
38
|
-
* Internal flag to indicate that node.scrollIntoView() is running with an animation
|
39
|
-
* @member {Boolean} isAnimating=false
|
40
|
-
*/
|
41
|
-
isAnimating = false
|
42
|
-
|
43
48
|
/**
|
44
49
|
* Convenience shortcut
|
45
|
-
* @member {
|
50
|
+
* @member {Portal.view.learn.PageSectionsList} list
|
46
51
|
*/
|
47
52
|
get list() {
|
48
53
|
return this.getReference('list')
|
49
54
|
}
|
50
|
-
|
51
|
-
/**
|
52
|
-
*
|
53
|
-
*/
|
54
|
-
onConstructed() {
|
55
|
-
super.onConstructed();
|
56
|
-
|
57
|
-
let me = this;
|
58
|
-
|
59
|
-
// me.getReference('list').on('selectionChange', me.onSelectionChange, me) // todo
|
60
|
-
me.getReference('list').on('itemClick', me.onSelectionChange, me)
|
61
|
-
}
|
62
|
-
|
63
|
-
/**
|
64
|
-
* @param {Object} data
|
65
|
-
*/
|
66
|
-
async onSelectionChange(data) {
|
67
|
-
let me = this,
|
68
|
-
record = data.record;
|
69
|
-
|
70
|
-
if (record) {
|
71
|
-
me.isAnimating = true;
|
72
|
-
|
73
|
-
await Neo.main.DomAccess.scrollIntoView({
|
74
|
-
querySelector: `[data-record-id='${record.id}']`,
|
75
|
-
windowId : me.windowId
|
76
|
-
});
|
77
|
-
|
78
|
-
// better safe than sorry
|
79
|
-
await me.timeout(200);
|
80
|
-
|
81
|
-
me.isAnimating = false
|
82
|
-
}
|
83
|
-
}
|
84
55
|
}
|
85
56
|
|
86
57
|
Neo.setupClass(PageSectionsPanel);
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["DragDrop", "Stylesheet"]
|
2
|
+
"appPath" : "examples/calendar/basic/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["DragDrop", "Stylesheet"]
|
2
|
+
"appPath" : "examples/calendar/weekview/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["Stylesheet"]
|
2
|
+
"appPath" : "examples/component/timer/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["Stylesheet"]
|
2
|
+
"appPath" : "examples/component/video/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark"]
|
2
|
+
"appPath" : "examples/core/config/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark"]
|
8
7
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["Stylesheet"]
|
2
|
+
"appPath" : "examples/grid/container/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark", "neo-theme-light"]
|
2
|
+
"appPath" : "examples/grid/covid/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark", "neo-theme-light"]
|
8
7
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["Stylesheet"]
|
2
|
+
"appPath" : "examples/list/animate/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["Stylesheet"]
|
2
|
+
"appPath" : "examples/list/color/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["Stylesheet"]
|
2
|
+
"appPath" : "examples/menu/list/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["Stylesheet"]
|
2
|
+
"appPath" : "examples/menu/panel/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark"]
|
2
|
+
"appPath" : "examples/model/advanced/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark"]
|
8
7
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark"]
|
2
|
+
"appPath" : "examples/model/extendedClass/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark"]
|
8
7
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark"]
|
2
|
+
"appPath" : "examples/model/inline/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark"]
|
8
7
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark"]
|
2
|
+
"appPath" : "examples/model/inlineNoModel/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark"]
|
8
7
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark"]
|
2
|
+
"appPath" : "examples/model/nestedData/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark"]
|
8
7
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark"]
|
2
|
+
"appPath" : "examples/model/table/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark"]
|
8
7
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark"]
|
2
|
+
"appPath" : "examples/panel/app.mjs",
|
3
|
+
"basePath" : "../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark"]
|
8
7
|
}
|
@@ -1,12 +1,8 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment": "development",
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"
|
8
|
-
"DragDrop",
|
9
|
-
"Stylesheet",
|
10
|
-
"Popover"
|
11
|
-
]
|
2
|
+
"appPath" : "examples/popover/app.mjs",
|
3
|
+
"basePath" : "../../",
|
4
|
+
"environment" : "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"mainThreadAddons": ["DragDrop", "Navigator", "Popover", "Stylesheet"],
|
7
|
+
"themes" : ["neo-theme-dark", "neo-theme-light"]
|
12
8
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["Stylesheet"]
|
2
|
+
"appPath" : "examples/table/container/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark", "neo-theme-light"]
|
2
|
+
"appPath" : "examples/table/covid/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark", "neo-theme-light"]
|
8
7
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["Stylesheet"]
|
2
|
+
"appPath" : "examples/tableFiltering/app.mjs",
|
3
|
+
"basePath" : "../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark", "neo-theme-light"]
|
2
|
+
"appPath" : "examples/tablePerformance/app.mjs",
|
3
|
+
"basePath" : "../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark", "neo-theme-light"]
|
8
7
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"mainThreadAddons": ["Stylesheet"]
|
2
|
+
"appPath" : "examples/tableStore/app.mjs",
|
3
|
+
"basePath" : "../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs"
|
7
6
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-dark"]
|
2
|
+
"appPath" : "examples/tabs/app.mjs",
|
3
|
+
"basePath" : "../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-dark"]
|
8
7
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-light"]
|
2
|
+
"appPath" : "examples/todoList/version1/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-light"]
|
8
7
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"appPath"
|
3
|
-
"basePath"
|
4
|
-
"environment"
|
5
|
-
"mainPath"
|
6
|
-
"
|
7
|
-
"themes" : ["neo-theme-light"]
|
2
|
+
"appPath" : "examples/todoList/version2/app.mjs",
|
3
|
+
"basePath" : "../../../",
|
4
|
+
"environment": "development",
|
5
|
+
"mainPath" : "./Main.mjs",
|
6
|
+
"themes" : ["neo-theme-light"]
|
8
7
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
{
|
3
3
|
"name": "neo.mjs",
|
4
|
-
"version": "6.15.
|
4
|
+
"version": "6.15.3",
|
5
5
|
"description": "The webworkers driven UI framework",
|
6
6
|
"type": "module",
|
7
7
|
"repository": {
|
@@ -45,11 +45,11 @@
|
|
45
45
|
"homepage": "https://neomjs.github.io/pages/",
|
46
46
|
"devDependencies": {
|
47
47
|
"@fortawesome/fontawesome-free": "^6.5.1",
|
48
|
-
"autoprefixer": "^10.4.
|
48
|
+
"autoprefixer": "^10.4.19",
|
49
49
|
"chalk": "^5.3.0",
|
50
50
|
"clean-webpack-plugin": "^4.0.0",
|
51
51
|
"commander": "^12.0.0",
|
52
|
-
"cssnano": "^6.1.
|
52
|
+
"cssnano": "^6.1.1",
|
53
53
|
"envinfo": "^7.11.1",
|
54
54
|
"fs-extra": "^11.2.0",
|
55
55
|
"highlightjs-line-numbers.js": "^2.8.0",
|
@@ -58,13 +58,13 @@
|
|
58
58
|
"monaco-editor": "^0.47.0",
|
59
59
|
"neo-jsdoc": "1.0.1",
|
60
60
|
"neo-jsdoc-x": "1.0.5",
|
61
|
-
"postcss": "^8.4.
|
61
|
+
"postcss": "^8.4.38",
|
62
62
|
"sass": "^1.72.0",
|
63
63
|
"siesta-lite": "5.5.2",
|
64
64
|
"url": "^0.11.3",
|
65
|
-
"webpack": "^5.
|
65
|
+
"webpack": "^5.91.0",
|
66
66
|
"webpack-cli": "^5.1.4",
|
67
|
-
"webpack-dev-server": "^4.15.
|
67
|
+
"webpack-dev-server": "^4.15.2",
|
68
68
|
"webpack-hook-plugin": "^1.0.7",
|
69
69
|
"webpack-node-externals": "^3.0.0"
|
70
70
|
},
|
@@ -588,7 +588,7 @@ The app logic
|
|
588
588
|
|
589
589
|
Let's review the code and see what it's doing.
|
590
590
|
|
591
|
-
### The
|
591
|
+
### The Store
|
592
592
|
|
593
593
|
A store is a collection of records. A record is described in the `model` and the model's `fields`.
|
594
594
|
Here's the config for the store.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
.portal-page-sections-list.neo-list {
|
4
|
+
.neo-h3 {
|
5
|
+
margin-left: 1.5em;
|
6
|
+
}
|
7
|
+
|
8
|
+
.neo-list-item {
|
9
|
+
color : var(--sem-color-text-neutral-subdued);
|
10
|
+
height : unset;
|
11
|
+
white-space: normal;
|
12
|
+
padding: 8px 0 8px 8px !important;
|
13
|
+
|
14
|
+
&[aria-selected=true] {
|
15
|
+
background-color: transparent !important;
|
16
|
+
color : var(--list-item-color-selected) !important;
|
17
|
+
font-weight : 600 !important;
|
18
|
+
cursor : default !important;
|
19
|
+
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
@@ -1,16 +1,40 @@
|
|
1
1
|
.portal-page-sections-panel.neo-panel {
|
2
2
|
border: none; // reset the default 1px
|
3
3
|
|
4
|
-
|
4
|
+
|
5
|
+
background-color: transparent;
|
6
|
+
display: block;
|
7
|
+
width: 250px;
|
8
|
+
flex-shrink: 0;
|
9
|
+
z-index: 1;
|
10
|
+
position: fixed;
|
11
|
+
top: 80px;
|
12
|
+
right: 0px;
|
13
|
+
bottom: 0px;
|
14
|
+
|
15
|
+
@media only screen and (max-width: 1100px) {
|
5
16
|
display: none;
|
6
17
|
}
|
7
18
|
|
8
|
-
|
9
|
-
|
19
|
+
h3 {
|
20
|
+
margin-left: 16px;
|
10
21
|
}
|
11
22
|
|
12
23
|
.neo-panel-header-toolbar {
|
13
24
|
border : none; // reset the default 1px
|
14
|
-
border-bottom: 1px solid #f2f2f2
|
25
|
+
border-bottom: 1px solid #f2f2f2;
|
26
|
+
|
27
|
+
.neo-button {
|
28
|
+
// todo: we need styling for toolbar buttons within neo-theme-neo-light
|
29
|
+
border-radius: 4px;
|
30
|
+
height : inherit;
|
31
|
+
min-width : inherit;
|
32
|
+
padding : 5px 12px;
|
33
|
+
|
34
|
+
.neo-button-glyph {
|
35
|
+
color: var(--panel-header-text-color);
|
36
|
+
}
|
37
|
+
}
|
15
38
|
}
|
39
|
+
|
16
40
|
}
|
@@ -26,6 +26,15 @@ h2 {
|
|
26
26
|
line-height : var(--core-lineheight-headline);
|
27
27
|
}
|
28
28
|
|
29
|
+
h3 {
|
30
|
+
color : var(--sem-color-fg-neutral-contrast);
|
31
|
+
font-family : var(--core-fontfamily-sans);
|
32
|
+
font-size : var(--core-fontsize-h3);
|
33
|
+
font-weight : var(--core-fontweight-semibold);
|
34
|
+
letter-spacing : -0.02em;
|
35
|
+
line-height : var(--core-lineheight-headline);
|
36
|
+
}
|
37
|
+
|
29
38
|
p {
|
30
39
|
color : var(--sem-color-fg-neutral-contrast);
|
31
40
|
font-family : var(--core-fontfamily-sans);
|
package/src/DefaultConfig.mjs
CHANGED
@@ -260,12 +260,12 @@ const DefaultConfig = {
|
|
260
260
|
useVdomWorker: true,
|
261
261
|
/**
|
262
262
|
* buildScripts/injectPackageVersion.mjs will update this value
|
263
|
-
* @default '6.15.
|
263
|
+
* @default '6.15.3'
|
264
264
|
* @memberOf! module:Neo
|
265
265
|
* @name config.version
|
266
266
|
* @type String
|
267
267
|
*/
|
268
|
-
version: '6.15.
|
268
|
+
version: '6.15.3'
|
269
269
|
};
|
270
270
|
|
271
271
|
Object.assign(DefaultConfig, {
|
@@ -48,9 +48,9 @@ class ComboBox extends Picker {
|
|
48
48
|
/**
|
49
49
|
* The millisecond time to delay between input field mutation and applying the input field's
|
50
50
|
* new value to the filter
|
51
|
-
* @member {Number} filterDelay=
|
51
|
+
* @member {Number} filterDelay=50
|
52
52
|
*/
|
53
|
-
filterDelay :
|
53
|
+
filterDelay : 50,
|
54
54
|
/**
|
55
55
|
* @member {String} filterOperator_='like'
|
56
56
|
*/
|
@@ -141,7 +141,7 @@ class ComboBox extends Picker {
|
|
141
141
|
let me = this;
|
142
142
|
|
143
143
|
// Create buffered function to respond to input field mutation
|
144
|
-
|
144
|
+
me.filterOnInput = buffer(me.filterOnInput, me, me.filterDelay);
|
145
145
|
|
146
146
|
me.typeAhead && me.updateTypeAhead()
|
147
147
|
}
|
@@ -206,10 +206,11 @@ class ComboBox extends Picker {
|
|
206
206
|
* @protected
|
207
207
|
*/
|
208
208
|
afterSetValue(value, oldValue) {
|
209
|
-
super.afterSetValue(value, oldValue);
|
210
|
-
|
211
209
|
let me = this;
|
212
210
|
|
211
|
+
// input value changes (super call) need a flag to prevent showing the picker
|
212
|
+
me.programmaticValueChange = true;
|
213
|
+
super.afterSetValue(value, oldValue);
|
213
214
|
me.programmaticValueChange = false;
|
214
215
|
|
215
216
|
if (me._picker?.isVisible) {
|
@@ -304,8 +305,6 @@ class ComboBox extends Picker {
|
|
304
305
|
store = me.store,
|
305
306
|
record;
|
306
307
|
|
307
|
-
me.programmaticValueChange = true;
|
308
|
-
|
309
308
|
// getting a record, nothing to do
|
310
309
|
if (Neo.isObject(value)) {
|
311
310
|
return value
|
package/src/list/Base.mjs
CHANGED
@@ -486,6 +486,12 @@ class Base extends Component {
|
|
486
486
|
}
|
487
487
|
|
488
488
|
case 'Object': {
|
489
|
+
// We want a merge for custom cls rules
|
490
|
+
if (itemContent.cls) {
|
491
|
+
NeoArray.add(item.cls, itemContent.cls);
|
492
|
+
delete itemContent.cls
|
493
|
+
}
|
494
|
+
|
489
495
|
Object.assign(item, itemContent);
|
490
496
|
break;
|
491
497
|
}
|
@@ -493,6 +499,7 @@ class Base extends Component {
|
|
493
499
|
case 'Number':
|
494
500
|
case 'String': {
|
495
501
|
item.html = itemContent;
|
502
|
+
break;
|
496
503
|
}
|
497
504
|
}
|
498
505
|
|