neo.mjs 6.17.2 → 6.18.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/apps/ServiceWorker.mjs +3 -5
- package/apps/colors/README.md +8 -0
- package/apps/colors/app.mjs +6 -0
- package/apps/colors/childapps/widget/app.mjs +7 -0
- package/apps/colors/childapps/widget/index.html +11 -0
- package/apps/colors/childapps/widget/neo-config.json +10 -0
- package/apps/colors/childapps/widget/view/Viewport.mjs +19 -0
- package/apps/colors/index.html +11 -0
- package/apps/colors/model/Color.mjs +43 -0
- package/apps/colors/neo-config.json +10 -0
- package/apps/colors/remotes-api.json +13 -0
- package/apps/colors/store/Colors.mjs +24 -0
- package/apps/colors/view/BarChartComponent.mjs +64 -0
- package/apps/colors/view/HeaderToolbar.mjs +95 -0
- package/apps/colors/view/PieChartComponent.mjs +58 -0
- package/apps/colors/view/TableContainer.mjs +91 -0
- package/apps/colors/view/Viewport.mjs +57 -0
- package/apps/colors/view/ViewportController.mjs +277 -0
- package/apps/colors/view/ViewportModel.mjs +53 -0
- package/apps/portal/Util.mjs +11 -0
- package/apps/portal/childapps/preview/neo-config.json +2 -2
- package/apps/portal/neo-config.json +2 -1
- package/apps/portal/remotes-api.json +13 -0
- package/apps/portal/view/HeaderToolbar.mjs +1 -1
- package/apps/portal/view/ViewportController.mjs +89 -1
- package/apps/portal/view/home/MainContainer.mjs +34 -6
- package/apps/portal/view/home/parts/AfterMath.mjs +1 -1
- package/apps/portal/view/home/parts/Colors.mjs +98 -0
- package/apps/portal/view/home/parts/Helix.mjs +114 -0
- package/apps/portal/view/home/parts/HelloWorld.mjs +6 -3
- package/apps/portal/view/home/parts/How.mjs +66 -0
- package/apps/portal/view/home/parts/MainNeo.mjs +4 -3
- package/apps/portal/view/learn/LivePreview.mjs +56 -15
- package/apps/portal/view/learn/MainContainerController.mjs +10 -90
- package/apps/realworld/api/Article.mjs +1 -3
- package/apps/realworld/api/Favorite.mjs +1 -3
- package/apps/realworld/api/Profile.mjs +1 -3
- package/apps/realworld/api/Tag.mjs +1 -3
- package/apps/realworld/api/User.mjs +1 -3
- package/apps/realworld2/api/Article.mjs +1 -3
- package/apps/realworld2/api/Favorite.mjs +1 -3
- package/apps/realworld2/api/Profile.mjs +1 -3
- package/apps/realworld2/api/Tag.mjs +1 -3
- package/apps/realworld2/api/User.mjs +1 -3
- package/apps/realworld2/view/article/HelixContainer.mjs +5 -5
- package/buildScripts/webpack/json/myApps.template.json +1 -0
- package/docs/app/view/MainContainer.mjs +5 -0
- package/docs/app/view/classdetails/MembersList.mjs +1 -1
- package/examples/ServiceWorker.mjs +3 -5
- package/examples/component/helix/Viewport.mjs +309 -0
- package/examples/component/helix/ViewportController.mjs +122 -0
- package/examples/component/helix/app.mjs +2 -2
- package/examples/component/helix/neo-config.json +0 -1
- package/examples/component/multiWindowHelix/Viewport.mjs +11 -3
- package/examples/component/multiWindowHelix/ViewportController.mjs +21 -9
- package/examples/component/multiWindowHelix/neo-config.json +0 -1
- package/examples/fieldWithPrefix/MainContainer.mjs +1 -6
- package/examples/list/animate/MainContainerController.mjs +1 -1
- package/examples/worker/task/MyTasks.mjs +1 -3
- package/package.json +2 -2
- package/resources/data/deck/learnneo/pages/Events.md +15 -9
- package/resources/data/deck/learnneo/pages/GuideEvents.md +254 -0
- package/resources/data/deck/learnneo/pages/WhyNeo-Speed.md +1 -1
- package/resources/images/logo/neo_logo_primary.svg +6 -0
- package/resources/images/logo/neo_logo_text_primary.svg +5 -0
- package/resources/scss/src/apps/colors/BarChartComponent.scss +3 -0
- package/resources/scss/src/apps/colors/HeaderToolbar.scss +11 -0
- package/resources/scss/src/apps/colors/PieChartComponent.scss +3 -0
- package/resources/scss/src/apps/colors/TableContainer.scss +64 -0
- package/resources/scss/src/apps/colors/Viewport.scss +9 -0
- package/resources/scss/src/apps/portal/HeaderToolbar.scss +142 -124
- package/resources/scss/src/apps/portal/home/MainContainer.scss +9 -22
- package/resources/scss/src/apps/portal/home/parts/MainNeo.scss +22 -0
- package/resources/scss/src/apps/portal/home/preview/PageCodeContainer.scss +1 -1
- package/resources/scss/src/examples/component/multiWindowHelix/Viewport.scss +3 -0
- package/resources/scss/src/form/field/CheckBox.scss +1 -0
- package/resources/scss/src/tab/header/Button.scss +2 -1
- package/resources/scss/theme-dark/Global.scss +8 -0
- package/resources/scss/theme-dark/button/Base.scss +1 -1
- package/resources/scss/theme-dark/tab/header/Button.scss +1 -0
- package/resources/scss/theme-light/Global.scss +8 -0
- package/resources/scss/theme-light/button/Base.scss +1 -1
- package/resources/scss/theme-light/tab/header/Button.scss +1 -0
- package/resources/scss/theme-neo-light/Global.scss +53 -53
- package/resources/scss/theme-neo-light/button/Base.scss +3 -4
- package/resources/scss/theme-neo-light/tab/header/Button.scss +6 -8
- package/src/DefaultConfig.mjs +2 -2
- package/src/Fetch.mjs +1 -3
- package/src/Main.mjs +13 -11
- package/src/MicroLoader.mjs +2 -2
- package/src/Neo.mjs +27 -26
- package/src/Xhr.mjs +1 -3
- package/src/button/Base.mjs +6 -4
- package/src/button/Split.mjs +10 -9
- package/src/calendar/view/EditEventContainer.mjs +13 -12
- package/src/calendar/view/MainContainer.mjs +40 -40
- package/src/calendar/view/MainContainerModel.mjs +5 -5
- package/src/calendar/view/SettingsContainer.mjs +11 -11
- package/src/calendar/view/YearComponent.mjs +73 -75
- package/src/calendar/view/calendars/ColorsList.mjs +2 -2
- package/src/calendar/view/calendars/EditContainer.mjs +2 -2
- package/src/calendar/view/calendars/List.mjs +12 -13
- package/src/calendar/view/month/Component.mjs +72 -73
- package/src/calendar/view/settings/GeneralContainer.mjs +5 -5
- package/src/calendar/view/settings/MonthContainer.mjs +5 -5
- package/src/calendar/view/settings/WeekContainer.mjs +6 -6
- package/src/calendar/view/settings/YearContainer.mjs +4 -4
- package/src/calendar/view/week/Component.mjs +47 -57
- package/src/calendar/view/week/EventDragZone.mjs +43 -50
- package/src/calendar/view/week/TimeAxisComponent.mjs +21 -21
- package/src/calendar/view/week/plugin/DragDrop.mjs +53 -45
- package/src/calendar/view/week/plugin/EventResizable.mjs +8 -3
- package/src/collection/Base.mjs +15 -22
- package/src/collection/Filter.mjs +4 -9
- package/src/collection/Sorter.mjs +6 -7
- package/src/component/Base.mjs +73 -41
- package/src/component/Canvas.mjs +9 -9
- package/src/component/Carousel.mjs +31 -33
- package/src/component/Chip.mjs +9 -9
- package/src/component/Circle.mjs +84 -91
- package/src/component/Clock.mjs +8 -8
- package/src/component/DateSelector.mjs +14 -15
- package/src/component/Gallery.mjs +82 -80
- package/src/component/Helix.mjs +131 -126
- package/src/component/Iframe.mjs +1 -1
- package/src/component/Label.mjs +1 -1
- package/src/component/Legend.mjs +3 -3
- package/src/component/Process.mjs +39 -37
- package/src/component/Splitter.mjs +9 -11
- package/src/component/StatusBadge.mjs +2 -3
- package/src/component/Timer.mjs +62 -68
- package/src/component/Toast.mjs +11 -11
- package/src/component/Video.mjs +7 -8
- package/src/component/mwc/Button.mjs +10 -10
- package/src/component/mwc/TextField.mjs +17 -17
- package/src/component/wrapper/AmChart.mjs +5 -5
- package/src/component/wrapper/CesiumJS.mjs +11 -17
- package/src/component/wrapper/GoogleMaps.mjs +58 -35
- package/src/component/wrapper/MapboxGL.mjs +112 -79
- package/src/container/Accordion.mjs +18 -20
- package/src/container/AccordionItem.mjs +12 -11
- package/src/container/Base.mjs +24 -23
- package/src/container/Panel.mjs +9 -9
- package/src/controller/Base.mjs +12 -14
- package/src/controller/Component.mjs +60 -66
- package/src/core/Base.mjs +5 -8
- package/src/core/IdGenerator.mjs +1 -3
- package/src/core/Observable.mjs +40 -24
- package/src/core/Util.mjs +5 -5
- package/src/data/Model.mjs +3 -3
- package/src/data/RecordFactory.mjs +3 -6
- package/src/data/Store.mjs +34 -34
- package/src/data/connection/Fetch.mjs +3 -3
- package/src/data/connection/WebSocket.mjs +21 -25
- package/src/data/connection/Xhr.mjs +31 -28
- package/src/date/DayViewComponent.mjs +1 -1
- package/src/date/SelectorContainer.mjs +2 -2
- package/src/dialog/Base.mjs +27 -25
- package/src/dialog/header/Toolbar.mjs +5 -4
- package/src/draggable/DragProxyComponent.mjs +7 -4
- package/src/draggable/DragZone.mjs +30 -30
- package/src/draggable/DropZone.mjs +7 -7
- package/src/draggable/list/DragZone.mjs +18 -18
- package/src/draggable/tab/header/toolbar/SortZone.mjs +7 -7
- package/src/draggable/toolbar/DragZone.mjs +15 -15
- package/src/draggable/toolbar/SortZone.mjs +30 -31
- package/src/draggable/tree/DragZone.mjs +9 -9
- package/src/filter/BooleanContainer.mjs +3 -3
- package/src/filter/NumberContainer.mjs +5 -5
- package/src/filter/ToggleOperatorsButton.mjs +5 -5
- package/src/form/Fieldset.mjs +26 -26
- package/src/form/field/Base.mjs +1 -1
- package/src/form/field/CheckBox.mjs +15 -16
- package/src/form/field/Color.mjs +13 -15
- package/src/form/field/ComboBox.mjs +16 -24
- package/src/form/field/Country.mjs +1 -1
- package/src/form/field/Date.mjs +3 -4
- package/src/form/field/Display.mjs +1 -1
- package/src/form/field/Email.mjs +2 -2
- package/src/form/field/Number.mjs +51 -56
- package/src/form/field/Picker.mjs +2 -2
- package/src/form/field/Radio.mjs +1 -1
- package/src/form/field/Range.mjs +7 -6
- package/src/form/field/Text.mjs +29 -36
- package/src/form/field/TextArea.mjs +9 -9
- package/src/form/field/Time.mjs +30 -30
- package/src/form/field/trigger/Base.mjs +19 -13
- package/src/form/field/trigger/Clear.mjs +13 -13
- package/src/form/field/trigger/CopyToClipboard.mjs +7 -7
- package/src/form/field/trigger/Picker.mjs +2 -2
- package/src/form/field/trigger/SpinDown.mjs +1 -1
- package/src/form/field/trigger/SpinUp.mjs +1 -1
- package/src/form/field/trigger/SpinUpDown.mjs +3 -3
- package/src/form/field/trigger/Time.mjs +3 -3
- package/src/grid/Container.mjs +33 -33
- package/src/grid/View.mjs +20 -22
- package/src/grid/header/Button.mjs +12 -12
- package/src/grid/header/Toolbar.mjs +4 -4
- package/src/layout/Base.mjs +5 -4
- package/src/layout/Card.mjs +15 -16
- package/src/layout/Fit.mjs +22 -8
- package/src/layout/Flexbox.mjs +30 -29
- package/src/layout/Form.mjs +15 -15
- package/src/layout/Grid.mjs +2 -2
- package/src/layout/HBox.mjs +3 -2
- package/src/layout/VBox.mjs +3 -2
- package/src/list/Base.mjs +45 -47
- package/src/list/Chip.mjs +4 -4
- package/src/list/Circle.mjs +3 -3
- package/src/list/Color.mjs +4 -4
- package/src/list/Component.mjs +10 -10
- package/src/list/plugin/Animate.mjs +18 -13
- package/src/main/DomAccess.mjs +92 -56
- package/src/main/DomEvents.mjs +38 -39
- package/src/main/addon/AmCharts.mjs +37 -37
- package/src/main/addon/AnalyticsByGoogle.mjs +4 -4
- package/src/main/addon/CesiumJS.mjs +8 -8
- package/src/main/addon/CloneNode.mjs +5 -5
- package/src/main/addon/Cookie.mjs +4 -4
- package/src/main/addon/DragDrop.mjs +35 -34
- package/src/main/addon/GoogleMaps.mjs +19 -19
- package/src/main/addon/IntersectionObserver.mjs +20 -1
- package/src/main/addon/LocalStorage.mjs +3 -3
- package/src/main/addon/MapboxGL.mjs +40 -41
- package/src/main/addon/MonacoEditor.mjs +5 -5
- package/src/main/addon/Mwc.mjs +6 -6
- package/src/main/addon/Navigator.mjs +35 -39
- package/src/main/addon/Popover.mjs +5 -6
- package/src/main/addon/PrefixField.mjs +1 -2
- package/src/main/addon/ServiceWorker.mjs +9 -9
- package/src/main/addon/Siesta.mjs +3 -2
- package/src/main/addon/Stylesheet.mjs +37 -37
- package/src/main/addon/WebComponent.mjs +2 -3
- package/src/main/addon/WindowPosition.mjs +18 -18
- package/src/main/draggable/sensor/Base.mjs +2 -2
- package/src/main/draggable/sensor/Mouse.mjs +15 -15
- package/src/main/draggable/sensor/Touch.mjs +24 -23
- package/src/main/mixin/DeltaUpdates.mjs +10 -12
- package/src/main/mixin/TouchDomEvents.mjs +6 -6
- package/src/manager/Base.mjs +4 -4
- package/src/manager/Component.mjs +41 -41
- package/src/manager/DomEvent.mjs +41 -44
- package/src/manager/Focus.mjs +14 -16
- package/src/manager/Instance.mjs +2 -4
- package/src/manager/Store.mjs +4 -8
- package/src/manager/Task.mjs +20 -22
- package/src/manager/Toast.mjs +14 -16
- package/src/manager/rpc/Api.mjs +1 -3
- package/src/manager/rpc/Message.mjs +16 -18
- package/src/menu/List.mjs +16 -16
- package/src/menu/Panel.mjs +4 -4
- package/src/model/Component.mjs +16 -14
- package/src/plugin/Base.mjs +2 -0
- package/src/plugin/Popover.mjs +1 -1
- package/src/plugin/PrefixField.mjs +35 -45
- package/src/plugin/Resizable.mjs +86 -101
- package/src/plugin/Responsive.mjs +1 -1
- package/src/remotes/Api.mjs +4 -6
- package/src/selection/CircleModel.mjs +12 -16
- package/src/selection/DateSelectorModel.mjs +21 -23
- package/src/selection/GalleryModel.mjs +49 -63
- package/src/selection/HelixModel.mjs +35 -41
- package/src/selection/ListModel.mjs +9 -14
- package/src/selection/Model.mjs +31 -31
- package/src/selection/TreeAccordionModel.mjs +74 -80
- package/src/selection/grid/CellColumnModel.mjs +10 -10
- package/src/selection/grid/CellColumnRowModel.mjs +10 -10
- package/src/selection/grid/CellModel.mjs +26 -28
- package/src/selection/grid/CellRowModel.mjs +24 -24
- package/src/selection/grid/ColumnModel.mjs +16 -20
- package/src/selection/grid/RowModel.mjs +27 -29
- package/src/selection/menu/ListModel.mjs +2 -2
- package/src/selection/table/CellColumnModel.mjs +12 -12
- package/src/selection/table/CellColumnRowModel.mjs +12 -12
- package/src/selection/table/CellModel.mjs +26 -29
- package/src/selection/table/CellRowModel.mjs +19 -19
- package/src/selection/table/ColumnModel.mjs +18 -22
- package/src/selection/table/RowModel.mjs +27 -29
- package/src/sitemap/Component.mjs +20 -20
- package/src/sitemap/Store.mjs +1 -1
- package/src/tab/Container.mjs +15 -15
- package/src/tab/Strip.mjs +1 -1
- package/src/tab/header/Toolbar.mjs +4 -4
- package/src/table/Container.mjs +8 -10
- package/src/table/View.mjs +29 -34
- package/src/table/header/Button.mjs +18 -18
- package/src/table/header/Toolbar.mjs +2 -2
- package/src/toolbar/Base.mjs +14 -14
- package/src/toolbar/Breadcrumb.mjs +11 -11
- package/src/toolbar/Paging.mjs +18 -18
- package/src/tooltip/Base.mjs +20 -22
- package/src/tree/Accordion.mjs +69 -75
- package/src/tree/List.mjs +22 -25
- package/src/util/Array.mjs +19 -18
- package/src/util/ClassSystem.mjs +9 -9
- package/src/util/Css.mjs +2 -2
- package/src/util/Date.mjs +9 -9
- package/src/util/Function.mjs +2 -2
- package/src/util/HashHistory.mjs +3 -5
- package/src/util/KeyNavigation.mjs +17 -17
- package/src/util/Logger.mjs +9 -9
- package/src/util/Matrix.mjs +19 -19
- package/src/util/String.mjs +9 -9
- package/src/util/Style.mjs +11 -11
- package/src/util/VDom.mjs +12 -14
- package/src/util/VNode.mjs +29 -29
- package/src/vdom/Helper.mjs +84 -93
- package/src/vdom/VNode.mjs +1 -1
- package/src/worker/App.mjs +19 -16
- package/src/worker/Base.mjs +14 -15
- package/src/worker/Canvas.mjs +1 -3
- package/src/worker/Data.mjs +4 -8
- package/src/worker/Manager.mjs +27 -32
- package/src/worker/Message.mjs +1 -1
- package/src/worker/ServiceBase.mjs +38 -42
- package/src/worker/Task.mjs +1 -3
- package/src/worker/VDom.mjs +2 -4
- package/src/worker/mixin/RemoteMethodAccess.mjs +5 -6
- package/apps/portal/view/home/parts/CoolStuff.mjs +0 -82
- package/examples/component/helix/MainContainer.mjs +0 -340
- /package/resources/images/{Neo_Logo_Blue.svg → logo/neo_logo_secondary.svg} +0 -0
- /package/resources/images/{Neo_Logo_Text.svg → logo/neo_logo_text_secondary.svg} +0 -0
- /package/resources/images/{Neo_Logo_White.svg → logo/neo_logo_white.svg} +0 -0
package/src/util/Date.mjs
CHANGED
@@ -40,7 +40,7 @@ class DateUtil extends Base {
|
|
40
40
|
* @returns {Date|null} the cloned date object
|
41
41
|
*/
|
42
42
|
static clone(date) {
|
43
|
-
return date && new Date(date.valueOf()) || null
|
43
|
+
return date && new Date(date.valueOf()) || null
|
44
44
|
}
|
45
45
|
|
46
46
|
/**
|
@@ -49,7 +49,7 @@ class DateUtil extends Base {
|
|
49
49
|
* @returns {String} the yyyy-mm-dd formatted date
|
50
50
|
*/
|
51
51
|
static convertToyyyymmdd(date) {
|
52
|
-
return new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString().split('T')[0]
|
52
|
+
return new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString().split('T')[0]
|
53
53
|
}
|
54
54
|
|
55
55
|
/**
|
@@ -58,7 +58,7 @@ class DateUtil extends Base {
|
|
58
58
|
* @returns {Number} days inside the month
|
59
59
|
*/
|
60
60
|
static getDaysInMonth(date) {
|
61
|
-
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate()
|
61
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate()
|
62
62
|
}
|
63
63
|
|
64
64
|
/**
|
@@ -70,7 +70,7 @@ class DateUtil extends Base {
|
|
70
70
|
let firstDayInMonth = DateUtil.getFirstDayOfMonth(date),
|
71
71
|
firstDayOffset = firstDayInMonth - weekStartDay;
|
72
72
|
|
73
|
-
return firstDayOffset < 0 ? firstDayOffset + 7 : firstDayOffset
|
73
|
+
return firstDayOffset < 0 ? firstDayOffset + 7 : firstDayOffset
|
74
74
|
}
|
75
75
|
|
76
76
|
/**
|
@@ -79,7 +79,7 @@ class DateUtil extends Base {
|
|
79
79
|
* @returns {Number} 0-6 (Sun-Sat)
|
80
80
|
*/
|
81
81
|
static getFirstDayOfMonth(date) {
|
82
|
-
return new Date(date.getFullYear(), date.getMonth(), 1).getDay()
|
82
|
+
return new Date(date.getFullYear(), date.getMonth(), 1).getDay()
|
83
83
|
}
|
84
84
|
|
85
85
|
/**
|
@@ -98,10 +98,10 @@ class DateUtil extends Base {
|
|
98
98
|
date.setUTCMonth(0, 1);
|
99
99
|
|
100
100
|
if (date.getUTCDay() !== 4) {
|
101
|
-
date.setUTCMonth(0, 1 + ((4 - date.getUTCDay()) + 7) % 7)
|
101
|
+
date.setUTCMonth(0, 1 + ((4 - date.getUTCDay()) + 7) % 7)
|
102
102
|
}
|
103
103
|
|
104
|
-
return Math.ceil((firstThursday - date) / (7 * 24 * 3600 * 1000)) + 1
|
104
|
+
return Math.ceil((firstThursday - date) / (7 * 24 * 3600 * 1000)) + 1
|
105
105
|
}
|
106
106
|
|
107
107
|
/**
|
@@ -113,7 +113,7 @@ class DateUtil extends Base {
|
|
113
113
|
let daysInMonth = DateUtil.getDaysInMonth(date),
|
114
114
|
firstDayOffset = DateUtil.getFirstDayOffset(date, weekStartDay);
|
115
115
|
|
116
|
-
return (daysInMonth + firstDayOffset) / 7 > 5 ? 6 : 5
|
116
|
+
return (daysInMonth + firstDayOffset) / 7 > 5 ? 6 : 5
|
117
117
|
}
|
118
118
|
|
119
119
|
/**
|
@@ -125,7 +125,7 @@ class DateUtil extends Base {
|
|
125
125
|
static matchDate(date1, date2) {
|
126
126
|
return date1.getFullYear() === date2.getFullYear() &&
|
127
127
|
date1.getMonth() === date2.getMonth() &&
|
128
|
-
date1.getDate() === date2.getDate()
|
128
|
+
date1.getDate() === date2.getDate()
|
129
129
|
}
|
130
130
|
}
|
131
131
|
|
package/src/util/Function.mjs
CHANGED
@@ -32,7 +32,7 @@ export function buffer(callback, scope, delay=300) {
|
|
32
32
|
timeoutId = 0;
|
33
33
|
wrapper.isPending = false;
|
34
34
|
callback.apply(scope, args)
|
35
|
-
}, delay)
|
35
|
+
}, delay)
|
36
36
|
};
|
37
37
|
|
38
38
|
wrapper.cancel = () => {
|
@@ -71,7 +71,7 @@ export function createSequence(target, methodName, fn, scope) {
|
|
71
71
|
|
72
72
|
return (target[methodName] = function() {
|
73
73
|
method.apply(this, arguments);
|
74
|
-
return fn.apply(scope || this, arguments)
|
74
|
+
return fn.apply(scope || this, arguments)
|
75
75
|
})
|
76
76
|
}
|
77
77
|
|
package/src/util/HashHistory.mjs
CHANGED
@@ -59,8 +59,8 @@ class HashHistory extends Base {
|
|
59
59
|
* @param {Number} data.windowId
|
60
60
|
*/
|
61
61
|
push(data) {
|
62
|
-
let me
|
63
|
-
stack = me
|
62
|
+
let me = this,
|
63
|
+
{stack} = me;
|
64
64
|
|
65
65
|
if (stack[0]?.hashString !== data.hashString) {
|
66
66
|
stack.unshift(data);
|
@@ -81,6 +81,4 @@ class HashHistory extends Base {
|
|
81
81
|
}
|
82
82
|
}
|
83
83
|
|
84
|
-
|
85
|
-
|
86
|
-
export default instance;
|
84
|
+
export default Neo.setupClass(HashHistory);
|
@@ -34,7 +34,7 @@ class KeyNavigation extends Base {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
add(value) {
|
37
|
-
this._keys.push(...this.parseKeys(value))
|
37
|
+
this._keys.push(...this.parseKeys(value))
|
38
38
|
}
|
39
39
|
|
40
40
|
/**
|
@@ -42,7 +42,7 @@ class KeyNavigation extends Base {
|
|
42
42
|
* @returns {Neo.component.Base}
|
43
43
|
*/
|
44
44
|
beforeGetComponent() {
|
45
|
-
return Neo.getComponent(this._component)
|
45
|
+
return Neo.getComponent(this._component)
|
46
46
|
}
|
47
47
|
|
48
48
|
/**
|
@@ -51,7 +51,7 @@ class KeyNavigation extends Base {
|
|
51
51
|
* @returns {String} the component id
|
52
52
|
*/
|
53
53
|
beforeSetComponent(value) {
|
54
|
-
return value?.id
|
54
|
+
return value?.id
|
55
55
|
}
|
56
56
|
|
57
57
|
/**
|
@@ -59,7 +59,7 @@ class KeyNavigation extends Base {
|
|
59
59
|
*/
|
60
60
|
destroy() {
|
61
61
|
this.unregister();
|
62
|
-
super.destroy()
|
62
|
+
super.destroy()
|
63
63
|
}
|
64
64
|
|
65
65
|
/**
|
@@ -78,9 +78,9 @@ class KeyNavigation extends Base {
|
|
78
78
|
scope = Neo.get(key.scope);
|
79
79
|
|
80
80
|
if (key.key.toUpperCase() === upperCaseKey) {
|
81
|
-
scope[key.fn]?.apply(scope, [data])
|
81
|
+
scope[key.fn]?.apply(scope, [data])
|
82
82
|
}
|
83
|
-
})
|
83
|
+
})
|
84
84
|
}
|
85
85
|
}
|
86
86
|
|
@@ -102,11 +102,11 @@ class KeyNavigation extends Base {
|
|
102
102
|
})
|
103
103
|
});
|
104
104
|
|
105
|
-
value = keyArray
|
105
|
+
value = keyArray
|
106
106
|
}
|
107
107
|
}
|
108
108
|
|
109
|
-
return value
|
109
|
+
return value
|
110
110
|
}
|
111
111
|
|
112
112
|
/**
|
@@ -119,22 +119,22 @@ class KeyNavigation extends Base {
|
|
119
119
|
switch (key) {
|
120
120
|
case ' ':
|
121
121
|
key = 'SPACE';
|
122
|
-
break
|
122
|
+
break
|
123
123
|
case 'ARROWDOWN':
|
124
124
|
key = 'DOWN';
|
125
|
-
break
|
125
|
+
break
|
126
126
|
case 'ARROWLEFT':
|
127
127
|
key = 'LEFT';
|
128
|
-
break
|
128
|
+
break
|
129
129
|
case 'ARROWRIGHT':
|
130
130
|
key = 'RIGHT';
|
131
|
-
break
|
131
|
+
break
|
132
132
|
case 'ARROWUP':
|
133
133
|
key = 'UP';
|
134
|
-
break
|
134
|
+
break
|
135
135
|
}
|
136
136
|
|
137
|
-
return key
|
137
|
+
return key
|
138
138
|
}
|
139
139
|
|
140
140
|
/**
|
@@ -152,7 +152,7 @@ class KeyNavigation extends Base {
|
|
152
152
|
fn : me.onKeyDown,
|
153
153
|
scope : me
|
154
154
|
}
|
155
|
-
})
|
155
|
+
})
|
156
156
|
}
|
157
157
|
|
158
158
|
/**
|
@@ -171,7 +171,7 @@ class KeyNavigation extends Base {
|
|
171
171
|
|
172
172
|
if (Neo.isEqual(key, config)) {
|
173
173
|
NeoArray.remove(keys, key);
|
174
|
-
break
|
174
|
+
break
|
175
175
|
}
|
176
176
|
}
|
177
177
|
}
|
@@ -181,7 +181,7 @@ class KeyNavigation extends Base {
|
|
181
181
|
* @param {Array} items
|
182
182
|
*/
|
183
183
|
removeKeys(items) {
|
184
|
-
Array.isArray(items) && items.forEach(item => this.removeKey(item))
|
184
|
+
Array.isArray(items) && items.forEach(item => this.removeKey(item))
|
185
185
|
}
|
186
186
|
|
187
187
|
/**
|
package/src/util/Logger.mjs
CHANGED
@@ -129,7 +129,7 @@ class Logger extends Base {
|
|
129
129
|
// get the part after the last /
|
130
130
|
caller_path = line.match(/([^\/]+)$/)[1].match(/([^ ]+)$/)[1];
|
131
131
|
|
132
|
-
break
|
132
|
+
break
|
133
133
|
}
|
134
134
|
}
|
135
135
|
}
|
@@ -165,7 +165,7 @@ class Logger extends Base {
|
|
165
165
|
* @param {Object} data
|
166
166
|
*/
|
167
167
|
onContextMenu(data) {
|
168
|
-
let config = Neo
|
168
|
+
let {config} = Neo;
|
169
169
|
|
170
170
|
if (
|
171
171
|
data.ctrlKey
|
@@ -199,8 +199,8 @@ class Logger extends Base {
|
|
199
199
|
* @protected
|
200
200
|
*/
|
201
201
|
resolveArgs(...args) {
|
202
|
-
|
203
|
-
|
202
|
+
let identifier = args[0],
|
203
|
+
argsObject = {};
|
204
204
|
|
205
205
|
if (args.length === 1) {
|
206
206
|
if (Neo.isString(identifier)) {
|
@@ -210,7 +210,7 @@ class Logger extends Base {
|
|
210
210
|
}
|
211
211
|
} else if (args.length > 2) {
|
212
212
|
argsObject.msg = args[0];
|
213
|
-
argsObject.data = args.slice(1)
|
213
|
+
argsObject.data = args.slice(1)
|
214
214
|
}
|
215
215
|
|
216
216
|
return argsObject
|
@@ -236,7 +236,9 @@ class Logger extends Base {
|
|
236
236
|
if (me.beforeSetLevel(level) < me.level) {
|
237
237
|
return
|
238
238
|
}
|
239
|
-
|
239
|
+
|
240
|
+
console.log('#', args.msg, level);
|
241
|
+
|
240
242
|
let logColor = me.logColors[level],
|
241
243
|
logChar = me.logChars[level],
|
242
244
|
bg = `background-color:${logColor}; color: white; font-weight: 900;`,
|
@@ -253,6 +255,4 @@ console.log('#', args.msg, level)
|
|
253
255
|
}
|
254
256
|
}
|
255
257
|
|
256
|
-
|
257
|
-
|
258
|
-
export default instance;
|
258
|
+
export default Neo.setupClass(Logger);
|
package/src/util/Matrix.mjs
CHANGED
@@ -23,7 +23,7 @@ class Matrix extends Base {
|
|
23
23
|
* shortcut for getElement
|
24
24
|
*/
|
25
25
|
e(i, j) {
|
26
|
-
return this.getElement(i, j)
|
26
|
+
return this.getElement(i, j)
|
27
27
|
}
|
28
28
|
|
29
29
|
/**
|
@@ -36,10 +36,10 @@ class Matrix extends Base {
|
|
36
36
|
let items = this.items;
|
37
37
|
|
38
38
|
if (i < 1 || i > items.length || j < 1 || j > items[0].length) {
|
39
|
-
return null
|
39
|
+
return null
|
40
40
|
}
|
41
41
|
|
42
|
-
return items[i - 1][j - 1]
|
42
|
+
return items[i - 1][j - 1]
|
43
43
|
}
|
44
44
|
|
45
45
|
/**
|
@@ -57,7 +57,7 @@ class Matrix extends Base {
|
|
57
57
|
s += `${me.e(4,1).toFixed(p)},${me.e(4,2).toFixed(p)},${me.e(4,3).toFixed(p)},${me.e(4,4).toFixed(p)}`;
|
58
58
|
s += ')';
|
59
59
|
|
60
|
-
return s
|
60
|
+
return s
|
61
61
|
}
|
62
62
|
|
63
63
|
/**
|
@@ -66,14 +66,14 @@ class Matrix extends Base {
|
|
66
66
|
* @returns {*}
|
67
67
|
*/
|
68
68
|
multiply(matrix) {
|
69
|
-
let me
|
70
|
-
M
|
71
|
-
items = me
|
72
|
-
ni
|
73
|
-
ki
|
74
|
-
kj
|
75
|
-
cols
|
76
|
-
els
|
69
|
+
let me = this,
|
70
|
+
M = matrix.items || matrix,
|
71
|
+
{items} = me,
|
72
|
+
ni = items.length,
|
73
|
+
ki = ni,
|
74
|
+
kj = M[0].length,
|
75
|
+
cols = items[0].length,
|
76
|
+
els = [],
|
77
77
|
c, i, j, nc, nj, sum;
|
78
78
|
|
79
79
|
do {
|
@@ -87,15 +87,15 @@ class Matrix extends Base {
|
|
87
87
|
|
88
88
|
do {
|
89
89
|
c = cols - nc;
|
90
|
-
sum += items[i][c] * M[c][j]
|
90
|
+
sum += items[i][c] * M[c][j]
|
91
91
|
} while (--nc);
|
92
|
-
els[i][j] = sum
|
92
|
+
els[i][j] = sum
|
93
93
|
} while (--nj);
|
94
94
|
} while (--ni);
|
95
95
|
|
96
96
|
matrix.items = els;
|
97
97
|
|
98
|
-
return matrix
|
98
|
+
return matrix
|
99
99
|
}
|
100
100
|
|
101
101
|
/**
|
@@ -111,7 +111,7 @@ class Matrix extends Base {
|
|
111
111
|
[0, c, -s, 0],
|
112
112
|
[0, s, c, 0],
|
113
113
|
[0, 0, 0, 1]
|
114
|
-
]
|
114
|
+
]
|
115
115
|
}
|
116
116
|
|
117
117
|
/**
|
@@ -127,7 +127,7 @@ class Matrix extends Base {
|
|
127
127
|
[0, 1, 0, 0],
|
128
128
|
[s, 0, c, 0],
|
129
129
|
[0, 0, 0, 1]
|
130
|
-
]
|
130
|
+
]
|
131
131
|
}
|
132
132
|
|
133
133
|
/**
|
@@ -143,14 +143,14 @@ class Matrix extends Base {
|
|
143
143
|
[s, c, 0, 0],
|
144
144
|
[0, 0, 1, 0],
|
145
145
|
[0, 0, 0, 1]
|
146
|
-
]
|
146
|
+
]
|
147
147
|
}
|
148
148
|
|
149
149
|
/**
|
150
150
|
* shortcut for multiply
|
151
151
|
*/
|
152
152
|
x(matrix) {
|
153
|
-
return this.multiply(matrix)
|
153
|
+
return this.multiply(matrix)
|
154
154
|
}
|
155
155
|
}
|
156
156
|
|
package/src/util/String.mjs
CHANGED
@@ -45,11 +45,11 @@ class StringUtil extends Base {
|
|
45
45
|
static escapeHtml(value) {
|
46
46
|
let me = this; // inside a static method, we are pointing to the class prototype
|
47
47
|
|
48
|
-
if (Neo.
|
49
|
-
return value
|
48
|
+
if (!Neo.isString(value)) {
|
49
|
+
return value
|
50
50
|
}
|
51
51
|
|
52
|
-
return value.replace(me.charPattern, me.getEntityFromChar.bind(me))
|
52
|
+
return value.replace(me.charPattern, me.getEntityFromChar.bind(me))
|
53
53
|
}
|
54
54
|
|
55
55
|
/**
|
@@ -57,8 +57,8 @@ class StringUtil extends Base {
|
|
57
57
|
* @param {String} entity
|
58
58
|
*/
|
59
59
|
static getCharFromEntity(entity) {
|
60
|
-
|
61
|
-
return mappedChar || entity
|
60
|
+
let mappedChar = Object.keys(this.charEntityMap).find(key => this.charEntityMap[key] === entity);
|
61
|
+
return mappedChar || entity
|
62
62
|
}
|
63
63
|
|
64
64
|
/**
|
@@ -66,7 +66,7 @@ class StringUtil extends Base {
|
|
66
66
|
* @param {String} char
|
67
67
|
*/
|
68
68
|
static getEntityFromChar(char) {
|
69
|
-
return this.charEntityMap[char] || char
|
69
|
+
return this.charEntityMap[char] || char
|
70
70
|
}
|
71
71
|
|
72
72
|
/**
|
@@ -76,11 +76,11 @@ class StringUtil extends Base {
|
|
76
76
|
static unescapeHtml(value) {
|
77
77
|
let me = this; // inside a static method, we are pointing to the class prototype
|
78
78
|
|
79
|
-
if (Neo.
|
80
|
-
return value
|
79
|
+
if (!Neo.isString(value)) {
|
80
|
+
return value
|
81
81
|
}
|
82
82
|
|
83
|
-
return value.replace(me.entityPattern, me.getCharFromEntity.bind(me))
|
83
|
+
return value.replace(me.entityPattern, me.getCharFromEntity.bind(me))
|
84
84
|
}
|
85
85
|
|
86
86
|
/**
|
package/src/util/Style.mjs
CHANGED
@@ -25,39 +25,39 @@ class Style extends Base {
|
|
25
25
|
let styles = {};
|
26
26
|
|
27
27
|
if (Neo.isString(newStyle)) {
|
28
|
-
newStyle = Neo.
|
28
|
+
newStyle = Neo.createStyleObject(newStyle)
|
29
29
|
}
|
30
30
|
|
31
31
|
if (Neo.isString(oldStyle)) {
|
32
|
-
oldStyle = Neo.
|
32
|
+
oldStyle = Neo.createStyleObject(oldStyle)
|
33
33
|
}
|
34
34
|
|
35
35
|
if (!newStyle && !oldStyle) {
|
36
|
-
return null
|
36
|
+
return null
|
37
37
|
} else if (!oldStyle) {
|
38
|
-
return Neo.clone(newStyle)
|
38
|
+
return Neo.clone(newStyle)
|
39
39
|
} else if (!newStyle) {
|
40
40
|
Object.keys(oldStyle).forEach(function(style) {
|
41
|
-
styles[style] = null
|
41
|
+
styles[style] = null
|
42
42
|
});
|
43
43
|
} else {
|
44
|
-
Object.keys(newStyle).forEach(
|
44
|
+
Object.keys(newStyle).forEach(style => {
|
45
45
|
if (!oldStyle.hasOwnProperty(style) || oldStyle[style] !== newStyle[style]) {
|
46
|
-
styles[style] = newStyle[style]
|
46
|
+
styles[style] = newStyle[style]
|
47
47
|
}
|
48
48
|
});
|
49
49
|
|
50
|
-
Object.keys(oldStyle).forEach(
|
50
|
+
Object.keys(oldStyle).forEach(style => {
|
51
51
|
if (!newStyle.hasOwnProperty(style)) {
|
52
|
-
styles[style] = null
|
52
|
+
styles[style] = null
|
53
53
|
}
|
54
54
|
});
|
55
55
|
|
56
56
|
if (Object.keys(styles).length > 0) {
|
57
|
-
return styles
|
57
|
+
return styles
|
58
58
|
}
|
59
59
|
|
60
|
-
return null
|
60
|
+
return null
|
61
61
|
}
|
62
62
|
}
|
63
63
|
}
|
package/src/util/VDom.mjs
CHANGED
@@ -19,7 +19,7 @@ class VDom extends Base {
|
|
19
19
|
* @returns {Object} cloned vdom
|
20
20
|
*/
|
21
21
|
static clone(vdom, removeIds=true) {
|
22
|
-
|
22
|
+
let clone = Neo.clone(vdom, true);
|
23
23
|
|
24
24
|
if (removeIds) {
|
25
25
|
delete clone.id
|
@@ -47,7 +47,7 @@ class VDom extends Base {
|
|
47
47
|
*/
|
48
48
|
static findVdomChild(vdom, opts, index, parentNode) {
|
49
49
|
index = index || 0;
|
50
|
-
opts =
|
50
|
+
opts = !Neo.isString(opts) ? opts : {id: opts};
|
51
51
|
|
52
52
|
let child = null,
|
53
53
|
matchArray = [],
|
@@ -74,7 +74,7 @@ class VDom extends Base {
|
|
74
74
|
// todo: either search the vdom array for all keys or compare if the arrays are equal.
|
75
75
|
throw new Error('findVdomChild: cls matching not supported for target & source types of Arrays')
|
76
76
|
}
|
77
|
-
break
|
77
|
+
break
|
78
78
|
case 'style':
|
79
79
|
if (typeof value === 'string' && typeof vdom[key] === 'string') {
|
80
80
|
if (vdom[key] === value) {
|
@@ -93,18 +93,18 @@ class VDom extends Base {
|
|
93
93
|
} else {
|
94
94
|
throw new Error('findVdomChild: style matching not supported for mixed target & source types (Object VS String)')
|
95
95
|
}
|
96
|
-
break
|
96
|
+
break
|
97
97
|
default:
|
98
98
|
if (vdom[key] === value) {
|
99
99
|
matchArray.push(true)
|
100
100
|
}
|
101
|
-
break
|
101
|
+
break
|
102
102
|
}
|
103
103
|
}
|
104
104
|
});
|
105
105
|
|
106
106
|
if (matchArray.length === optsLength) {
|
107
|
-
return {index, parentNode, vdom}
|
107
|
+
return {index, parentNode, vdom}
|
108
108
|
}
|
109
109
|
|
110
110
|
if (vdom.cn) {
|
@@ -134,7 +134,7 @@ class VDom extends Base {
|
|
134
134
|
* @returns {Object} vdom
|
135
135
|
*/
|
136
136
|
static getByFlag(vdom, flag) {
|
137
|
-
let node = VDom.findVdomChild(vdom, {flag
|
137
|
+
let node = VDom.findVdomChild(vdom, {flag});
|
138
138
|
return node?.vdom
|
139
139
|
}
|
140
140
|
|
@@ -166,13 +166,11 @@ class VDom extends Base {
|
|
166
166
|
static getColumnNodes(vdom, index) {
|
167
167
|
let columnNodes = [];
|
168
168
|
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
})
|
175
|
-
}
|
169
|
+
vdom.cn?.forEach(row => {
|
170
|
+
if (row.cn?.[index]) {
|
171
|
+
columnNodes.push(row.cn[index])
|
172
|
+
}
|
173
|
+
})
|
176
174
|
|
177
175
|
return columnNodes
|
178
176
|
}
|