neo.mjs 6.9.7 → 6.9.8
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/learnneo/neo-config.json +6 -6
- package/apps/learnneo/view/home/ContentTreeList.mjs +6 -8
- package/apps/learnneo/view/home/MainContainerController.mjs +22 -3
- package/docs/app/view/MainContainerController.mjs +12 -0
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/button/base/neo-config.json +2 -1
- package/package.json +1 -1
- package/resources/data/learnneo/content.json +27 -0
- package/resources/data/learnneo/p/2023-10-01T18-29-19-158Z.md +7 -1
- package/resources/data/learnneo/p/2023-10-07T19-18-28-517Z.md +23 -15
- package/resources/data/learnneo/p/2023-10-14T19-25-08-153Z.md +15 -12
- package/resources/images/Neo_Vector.svg +3 -0
- package/resources/scss/src/apps/learnneo/Viewport.scss +9 -3
- package/resources/scss/src/apps/newwebsite/MainContainer.css +33 -0
- package/resources/scss/theme-neo-light/Global.scss +7 -0
- package/resources/scss/theme-neo-light/apps/covid/HeaderContainer.scss +10 -0
- package/resources/scss/theme-neo-light/apps/covid/country/Gallery.scss +7 -0
- package/resources/scss/theme-neo-light/apps/covid/country/Helix.scss +8 -0
- package/resources/scss/theme-neo-light/apps/covid/country/LineChartComponent.scss +3 -0
- package/resources/scss/theme-neo-light/apps/docs/ContentTabContainer.scss +4 -0
- package/resources/scss/theme-neo-light/apps/docs/HeaderContainer.scss +10 -0
- package/resources/scss/theme-neo-light/apps/docs/MainContainer.scss +3 -0
- package/resources/scss/theme-neo-light/apps/docs/classdetails/HeaderComponent.scss +4 -0
- package/resources/scss/theme-neo-light/apps/docs/classdetails/MembersList.scss +17 -0
- package/resources/scss/theme-neo-light/apps/docs/classdetails/TutorialComponent.scss +4 -0
- package/resources/scss/theme-neo-light/apps/website/HeaderContainer.scss +5 -0
- package/resources/scss/theme-neo-light/apps/website/MainContainer.scss +4 -0
- package/resources/scss/theme-neo-light/apps/website/blog/Container.scss +3 -0
- package/resources/scss/theme-neo-light/apps/website/home/TabContainer.scss +4 -0
- package/resources/scss/theme-neo-light/button/Base.scss +117 -0
- package/resources/scss/theme-neo-light/calendar/view/EditEventContainer.scss +5 -0
- package/resources/scss/theme-neo-light/calendar/view/MainContainer.scss +23 -0
- package/resources/scss/theme-neo-light/calendar/view/SettingsContainer.scss +3 -0
- package/resources/scss/theme-neo-light/calendar/view/YearComponent.scss +10 -0
- package/resources/scss/theme-neo-light/calendar/view/calendars/EditContainer.scss +5 -0
- package/resources/scss/theme-neo-light/calendar/view/calendars/List.scss +3 -0
- package/resources/scss/theme-neo-light/calendar/view/month/Component.scss +10 -0
- package/resources/scss/theme-neo-light/calendar/view/week/Component.scss +13 -0
- package/resources/scss/theme-neo-light/component/Base.scss +6 -0
- package/resources/scss/theme-neo-light/component/BoxLabel.scss +5 -0
- package/resources/scss/theme-neo-light/component/Chip.scss +14 -0
- package/resources/scss/theme-neo-light/component/DateSelector.scss +24 -0
- package/resources/scss/theme-neo-light/component/Process.scss +9 -0
- package/resources/scss/theme-neo-light/component/Progress.scss +3 -0
- package/resources/scss/theme-neo-light/component/Splitter.scss +5 -0
- package/resources/scss/theme-neo-light/component/StatusBadge.scss +19 -0
- package/resources/scss/theme-neo-light/component/Timer.scss +6 -0
- package/resources/scss/theme-neo-light/component/Toast.scss +9 -0
- package/resources/scss/theme-neo-light/component/Video.scss +4 -0
- package/resources/scss/theme-neo-light/container/Accordion.scss +5 -0
- package/resources/scss/theme-neo-light/container/AccordionItem.scss +10 -0
- package/resources/scss/theme-neo-light/container/Base.scss +4 -0
- package/resources/scss/theme-neo-light/container/Panel.scss +5 -0
- package/resources/scss/theme-neo-light/container/Viewport.scss +3 -0
- package/resources/scss/theme-neo-light/design-tokens/Components.scss +3 -0
- package/resources/scss/theme-neo-light/dialog/Base.scss +5 -0
- package/resources/scss/theme-neo-light/examples/ConfigurationPanel.scss +3 -0
- package/resources/scss/theme-neo-light/examples/calendar/basic/MainContainer.scss +4 -0
- package/resources/scss/theme-neo-light/form/Fieldset.scss +6 -0
- package/resources/scss/theme-neo-light/form/field/CheckBox.scss +8 -0
- package/resources/scss/theme-neo-light/form/field/FileUpload.scss +12 -0
- package/resources/scss/theme-neo-light/form/field/Picker.scss +5 -0
- package/resources/scss/theme-neo-light/form/field/Range.scss +4 -0
- package/resources/scss/theme-neo-light/form/field/Search.scss +3 -0
- package/resources/scss/theme-neo-light/form/field/Select.scss +9 -0
- package/resources/scss/theme-neo-light/form/field/Switch.scss +17 -0
- package/resources/scss/theme-neo-light/form/field/Text.scss +32 -0
- package/resources/scss/theme-neo-light/form/field/trigger/Base.scss +6 -0
- package/resources/scss/theme-neo-light/form/field/trigger/Time.scss +4 -0
- package/resources/scss/theme-neo-light/grid/Container.scss +7 -0
- package/resources/scss/theme-neo-light/grid/View.scss +13 -0
- package/resources/scss/theme-neo-light/grid/header/Button.scss +6 -0
- package/resources/scss/theme-neo-light/list/Base.scss +12 -0
- package/resources/scss/theme-neo-light/menu/List.scss +21 -0
- package/resources/scss/theme-neo-light/menu/Panel.scss +3 -0
- package/resources/scss/theme-neo-light/tab/Container.scss +3 -0
- package/resources/scss/theme-neo-light/tab/Strip.scss +5 -0
- package/resources/scss/theme-neo-light/tab/header/Button.scss +30 -0
- package/resources/scss/theme-neo-light/table/Container.scss +10 -0
- package/resources/scss/theme-neo-light/table/View.scss +13 -0
- package/resources/scss/theme-neo-light/table/header/Button.scss +7 -0
- package/resources/scss/theme-neo-light/toolbar/Base.scss +4 -0
- package/resources/scss/theme-neo-light/tree/List.scss +4 -0
- package/src/DefaultConfig.mjs +2 -2
- package/src/form/field/FileUpload.mjs +10 -8
- package/src/form/field/Text.mjs +2 -2
- package/src/main/addon/HighlightJS.mjs +35 -10
- package/src/vdom/Helper.mjs +2 -1
@@ -0,0 +1,10 @@
|
|
1
|
+
:root .neo-theme-neo-light { // .neo-table-container
|
2
|
+
--table-container-border-color : #ddd;
|
3
|
+
--table-container-cell-background-color : #fff;
|
4
|
+
--table-container-cell-background-color-even: #f2f2f2;
|
5
|
+
--table-container-cell-border-bottom : 1px solid #ddd;
|
6
|
+
--table-container-cell-height : 32px;
|
7
|
+
--table-container-cell-padding : 2px 10px 2px;
|
8
|
+
--table-container-color : #666;
|
9
|
+
--table-container-header-cell-border-bottom : 1px solid #ddd;
|
10
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
:root .neo-theme-neo-light { // .neo-table-view
|
2
|
+
--table-cell-background-color-hover : #{lighten(#33343d, 70%)};
|
3
|
+
--table-cellmodel-selected-cell-background-color : #{lighten(#64B5F6, 22%)};
|
4
|
+
--table-cellmodel-selected-cell-color : #2b2b2b;
|
5
|
+
--table-cellmodel-selected-column-cell-background-color: #{lighten(#4f558a, 52%)};
|
6
|
+
--table-cellmodel-selected-column-cell-color : #2b2b2b;
|
7
|
+
--table-cellrowmodel-selected-cell-background-color : #{lighten(#64B5F6, 22%)};
|
8
|
+
--table-cellrowmodel-selected-cell-color : #2b2b2b;
|
9
|
+
--table-cellrowmodel-selected-row-cell-background-color: #{lighten(#4f558a, 52%)};
|
10
|
+
--table-cellrowmodel-selected-row-cell-color : #2b2b2b;
|
11
|
+
--table-rowmodel-selected-cell-background-color : #{lighten(#64B5F6, 22%)};
|
12
|
+
--table-rowmodel-selected-cell-color : #2b2b2b;
|
13
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
:root .neo-theme-neo-light { // .neo-table-header-button
|
2
|
+
--table-header-button-background-color : #5d83a7;
|
3
|
+
--table-header-button-background-image : none;
|
4
|
+
--table-header-button-color : #fff;
|
5
|
+
--table-header-button-glyph-color : #fff;
|
6
|
+
--table-header-button-ripple-background-color: #{darken(#5d83a7, 10%)};
|
7
|
+
}
|
package/src/DefaultConfig.mjs
CHANGED
@@ -236,12 +236,12 @@ const DefaultConfig = {
|
|
236
236
|
useVdomWorker: true,
|
237
237
|
/**
|
238
238
|
* buildScripts/injectPackageVersion.mjs will update this value
|
239
|
-
* @default '6.9.
|
239
|
+
* @default '6.9.8'
|
240
240
|
* @memberOf! module:Neo
|
241
241
|
* @name config.version
|
242
242
|
* @type String
|
243
243
|
*/
|
244
|
-
version: '6.9.
|
244
|
+
version: '6.9.8'
|
245
245
|
};
|
246
246
|
|
247
247
|
Object.assign(DefaultConfig, {
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import Base
|
2
|
-
import NeoArray
|
1
|
+
import Base from '../../form/field/Base.mjs';
|
2
|
+
import NeoArray from '../../util/Array.mjs';
|
3
|
+
import StringUtil from '../../util/String.mjs';
|
3
4
|
|
4
5
|
const
|
5
6
|
sizeRE = /^(\d+)(kb|mb|gb)?$/i,
|
@@ -404,15 +405,16 @@ class FileUpload extends Base {
|
|
404
405
|
const
|
405
406
|
file = files.item(0),
|
406
407
|
pointPos = file.name.lastIndexOf('.'),
|
407
|
-
type = pointPos > -1 ? file.name.slice(pointPos + 1) : ''
|
408
|
+
type = pointPos > -1 ? file.name.slice(pointPos + 1) : '',
|
409
|
+
escapedFileName = StringUtil.escapeHtml(file.name);
|
408
410
|
|
409
411
|
if (me.types && !types[type]) {
|
410
|
-
body.cn[0].innerHTML =
|
412
|
+
body.cn[0].innerHTML = escapedFileName;
|
411
413
|
body.cn[1].innerHTML = `${me.invalidFileFormat} (.${type}) ${me.formatSize(file.size)}`;
|
412
414
|
me.error = me.pleaseUseTheseTypes?.replace('{allowedFileTypes}', Object.keys(types).join(' .'))
|
413
415
|
}
|
414
416
|
else if (file.size > me.maxSize) {
|
415
|
-
body.cn[0].innerHTML =
|
417
|
+
body.cn[0].innerHTML = escapedFileName;
|
416
418
|
body.cn[1].innerHTML = me.formatSize(file.size);
|
417
419
|
me.error = me.fileSizeMoreThan?.replace('{allowedFileSize}', String(me._maxSize).toUpperCase());
|
418
420
|
}
|
@@ -444,8 +446,8 @@ class FileUpload extends Base {
|
|
444
446
|
// We have to wait for the DOM to have changed, and the action button to be visible
|
445
447
|
await new Promise(resolve => setTimeout(resolve, 100));
|
446
448
|
me.focus(me.vdom.cn[2].id);
|
447
|
-
|
448
|
-
me.vdom.cn[1].cn[0].innerHTML = file.name;
|
449
|
+
|
450
|
+
me.vdom.cn[1].cn[0].innerHTML = StringUtil.escapeHtml(file.name);
|
449
451
|
me.update();
|
450
452
|
me.state = 'uploading';
|
451
453
|
|
@@ -669,7 +671,7 @@ class FileUpload extends Base {
|
|
669
671
|
|
670
672
|
me.documentId = document.id;
|
671
673
|
me.fileSize = me.formatSize(document.size);
|
672
|
-
me.vdom.cn[1].cn[0].innerHTML = document.fileName;
|
674
|
+
me.vdom.cn[1].cn[0].innerHTML = StringUtil.escapeHtml(document.fileName);
|
673
675
|
me.state = me.documentStatusMap[document.status];
|
674
676
|
}
|
675
677
|
}
|
package/src/form/field/Text.mjs
CHANGED
@@ -1283,7 +1283,7 @@ class Text extends Base {
|
|
1283
1283
|
onInputValueChange(data) {
|
1284
1284
|
let me = this,
|
1285
1285
|
oldValue = me.value,
|
1286
|
-
value = data.value,
|
1286
|
+
value = data.value ? data.value.toString().trim() : me.emptyValue,
|
1287
1287
|
vnode = VNodeUtil.findChildVnode(me.vnode, {nodeName: 'input'});
|
1288
1288
|
|
1289
1289
|
if (vnode) {
|
@@ -1482,7 +1482,7 @@ class Text extends Base {
|
|
1482
1482
|
minLength = me.minLength,
|
1483
1483
|
required = me.required,
|
1484
1484
|
returnValue = true,
|
1485
|
-
value = me.value,
|
1485
|
+
value = me.value ? me.value.toString().trim() : me.emptyValue,
|
1486
1486
|
valueLength = value?.toString().length,
|
1487
1487
|
inputPattern = me.inputPattern,
|
1488
1488
|
isEmpty = value !== 0 && (!value || valueLength < 1),
|
@@ -32,6 +32,7 @@ class HighlightJS extends Base {
|
|
32
32
|
*/
|
33
33
|
remote: {
|
34
34
|
app: [
|
35
|
+
'loadLibrary',
|
35
36
|
'scrollIntoView',
|
36
37
|
'syntaxHighlight',
|
37
38
|
'switchTheme',
|
@@ -56,14 +57,26 @@ class HighlightJS extends Base {
|
|
56
57
|
*/
|
57
58
|
construct(config) {
|
58
59
|
super.construct(config);
|
60
|
+
}
|
61
|
+
|
62
|
+
/**
|
63
|
+
* @param {Object} data
|
64
|
+
* @returns {Boolean}
|
65
|
+
*/
|
66
|
+
async loadLibrary(data) {
|
67
|
+
delete data.appName;
|
59
68
|
|
60
69
|
let me = this;
|
61
70
|
|
62
|
-
|
71
|
+
me.set(data);
|
72
|
+
|
73
|
+
await DomAccess.loadScript(me.highlightJsPath).then(() => {
|
63
74
|
DomAccess.addScript({src: me.highlightJsLineNumbersPath});
|
64
75
|
});
|
65
76
|
|
66
77
|
Stylesheet.createStyleSheet(null, 'hljs-theme', me.themePath)
|
78
|
+
|
79
|
+
return true
|
67
80
|
}
|
68
81
|
|
69
82
|
/**
|
@@ -85,17 +98,14 @@ class HighlightJS extends Base {
|
|
85
98
|
|
86
99
|
/**
|
87
100
|
* @param {Object} data
|
88
|
-
* @
|
101
|
+
* @returns {Boolean}
|
89
102
|
*/
|
90
|
-
|
91
|
-
|
92
|
-
let node = document.getElementById(data.vnodeId);
|
103
|
+
setConfigs(data) {
|
104
|
+
delete data.appName;
|
93
105
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
console.error('highlight.js is not included inside the main thread.')
|
98
|
-
}
|
106
|
+
this.set(data);
|
107
|
+
|
108
|
+
return true
|
99
109
|
}
|
100
110
|
|
101
111
|
/**
|
@@ -114,6 +124,21 @@ class HighlightJS extends Base {
|
|
114
124
|
Stylesheet.createStyleSheet(null, 'hljs-theme', switchToTheme);
|
115
125
|
}
|
116
126
|
|
127
|
+
/**
|
128
|
+
* @param {Object} data
|
129
|
+
* @param {String} data.vnodeId
|
130
|
+
*/
|
131
|
+
syntaxHighlight(data) {
|
132
|
+
if (hljs) {
|
133
|
+
let node = document.getElementById(data.vnodeId);
|
134
|
+
|
135
|
+
hljs.highlightBlock(node);
|
136
|
+
hljs.lineNumbersBlock(node);
|
137
|
+
} else {
|
138
|
+
console.error('highlight.js is not included inside the main thread.')
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
117
142
|
/**
|
118
143
|
* @param {Object} data
|
119
144
|
*/
|
package/src/vdom/Helper.mjs
CHANGED