neo.mjs 6.17.1 → 6.18.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 +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 +44 -27
- package/apps/portal/view/Viewport.mjs +12 -1
- package/apps/portal/view/ViewportController.mjs +89 -1
- package/apps/portal/view/home/MainContainer.mjs +27 -60
- package/apps/portal/view/home/parts/AfterMath.mjs +58 -0
- package/apps/portal/view/home/parts/Colors.mjs +74 -0
- package/apps/portal/view/home/parts/Features.mjs +52 -0
- package/apps/portal/view/home/parts/Helix.mjs +75 -0
- package/apps/portal/view/home/parts/HelloWorld.mjs +82 -0
- package/apps/portal/view/home/parts/MainNeo.mjs +55 -0
- package/apps/portal/view/home/preview/PageCodeContainer.mjs +55 -0
- package/apps/portal/view/learn/LivePreview.mjs +72 -29
- 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/buildScripts/webpack/webpack.server.config.mjs +4 -1
- 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 +5 -5
- package/resources/data/deck/learnneo/pages/GuideEvents.md +131 -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_secondary.svg +6 -0
- package/resources/images/logo/neo_logo_text_primary.svg +5 -0
- package/resources/images/logo/neo_logo_text_secondary.svg +5 -0
- package/resources/images/logo/neo_logo_white.svg +6 -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 +189 -17
- package/resources/scss/src/apps/portal/home/MainContainer.scss +46 -20
- package/resources/scss/src/apps/portal/home/parts/Features.scss +3 -0
- package/resources/scss/src/apps/portal/home/preview/PageCodeContainer.scss +115 -0
- package/resources/scss/src/component/Base.scss +2 -0
- 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 +149 -87
- 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/component/wrapper/MonacoEditor.mjs +1 -6
- package/src/container/Accordion.mjs +18 -20
- package/src/container/AccordionItem.mjs +12 -11
- package/src/container/Base.mjs +29 -28
- package/src/container/Panel.mjs +9 -9
- package/src/container/Viewport.mjs +30 -1
- 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 +17 -17
- 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/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 +52 -50
- 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 +5 -5
- 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 +175 -0
- 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/examples/component/helix/MainContainer.mjs +0 -340
- package/resources/images/Neo_Vector.svg +0 -3
- package/resources/images/logos/Github-logo-black.svg +0 -1
- package/resources/images/logos/Slack-logo-black.svg +0 -17
package/src/grid/Container.mjs
CHANGED
@@ -101,7 +101,7 @@ class Container extends BaseContainer {
|
|
101
101
|
|
102
102
|
me.vdom.id = me.id + 'wrapper';
|
103
103
|
|
104
|
-
me.createColumns(me.columns)
|
104
|
+
me.createColumns(me.columns)
|
105
105
|
}
|
106
106
|
|
107
107
|
/**
|
@@ -111,7 +111,7 @@ class Container extends BaseContainer {
|
|
111
111
|
* @protected
|
112
112
|
*/
|
113
113
|
afterSetSelectionModel(value, oldValue) {
|
114
|
-
this.rendered && value.register(this)
|
114
|
+
this.rendered && value.register(this)
|
115
115
|
}
|
116
116
|
|
117
117
|
/**
|
@@ -122,10 +122,10 @@ class Container extends BaseContainer {
|
|
122
122
|
*/
|
123
123
|
beforeSetColumns(value, oldValue) {
|
124
124
|
if (this.configsApplied) {
|
125
|
-
return this.createColumns(value)
|
125
|
+
return this.createColumns(value)
|
126
126
|
}
|
127
127
|
|
128
|
-
return value
|
128
|
+
return value
|
129
129
|
}
|
130
130
|
|
131
131
|
/**
|
@@ -137,7 +137,7 @@ class Container extends BaseContainer {
|
|
137
137
|
beforeSetSelectionModel(value, oldValue) {
|
138
138
|
oldValue?.destroy();
|
139
139
|
|
140
|
-
return ClassSystemUtil.beforeSetInstance(value, RowModel)
|
140
|
+
return ClassSystemUtil.beforeSetInstance(value, RowModel)
|
141
141
|
}
|
142
142
|
|
143
143
|
/**
|
@@ -161,20 +161,20 @@ class Container extends BaseContainer {
|
|
161
161
|
|
162
162
|
if (value instanceof Store) {
|
163
163
|
value.on(listeners);
|
164
|
-
value.getCount() > 0 && me.onStoreLoad(value.items)
|
164
|
+
value.getCount() > 0 && me.onStoreLoad(value.items)
|
165
165
|
} else {
|
166
166
|
value = ClassSystemUtil.beforeSetInstance(value, Store, {
|
167
167
|
listeners
|
168
|
-
})
|
168
|
+
})
|
169
169
|
}
|
170
170
|
|
171
171
|
// in case we dynamically change the store, the view needs to get the new reference
|
172
172
|
if (me.view) {
|
173
|
-
me.view.store = value
|
173
|
+
me.view.store = value
|
174
174
|
}
|
175
175
|
}
|
176
176
|
|
177
|
-
return value
|
177
|
+
return value
|
178
178
|
}
|
179
179
|
|
180
180
|
/**
|
@@ -182,13 +182,13 @@ class Container extends BaseContainer {
|
|
182
182
|
* @returns {*}
|
183
183
|
*/
|
184
184
|
createColumns(columns) {
|
185
|
-
let me
|
186
|
-
columnDefaults = me
|
187
|
-
sorters
|
185
|
+
let me = this,
|
186
|
+
{columnDefaults} = me,
|
187
|
+
sorters = me.store?.sorters,
|
188
188
|
renderer;
|
189
189
|
|
190
190
|
if (!columns || !columns.length) {
|
191
|
-
Neo.logError('Attempting to create a grid.Container without defined columns', me.id)
|
191
|
+
Neo.logError('Attempting to create a grid.Container without defined columns', me.id)
|
192
192
|
}
|
193
193
|
|
194
194
|
columns.forEach(column => {
|
@@ -197,35 +197,35 @@ class Container extends BaseContainer {
|
|
197
197
|
columnDefaults && Neo.assignDefaults(column, columnDefaults);
|
198
198
|
|
199
199
|
if (column.dock && !column.width) {
|
200
|
-
Neo.logError('Attempting to create a docked column without a defined width', column, me.id)
|
200
|
+
Neo.logError('Attempting to create a docked column without a defined width', column, me.id)
|
201
201
|
}
|
202
202
|
|
203
203
|
if (renderer && Neo.isString(renderer) && me[renderer]) {
|
204
|
-
column.renderer = me[renderer]
|
204
|
+
column.renderer = me[renderer]
|
205
205
|
}
|
206
206
|
|
207
207
|
if (sorters?.[0]) {
|
208
208
|
if (column.field === sorters[0].property) {
|
209
|
-
column.isSorted = sorters[0].direction
|
209
|
+
column.isSorted = sorters[0].direction
|
210
210
|
}
|
211
211
|
}
|
212
212
|
|
213
213
|
column.listeners = {
|
214
214
|
sort : me.onSortColumn,
|
215
215
|
scope: me
|
216
|
-
}
|
216
|
+
}
|
217
217
|
});
|
218
218
|
|
219
219
|
me.items[0].items = columns;
|
220
220
|
|
221
|
-
return columns
|
221
|
+
return columns
|
222
222
|
}
|
223
223
|
|
224
224
|
/**
|
225
225
|
* @param {Object[]} inputData
|
226
226
|
*/
|
227
227
|
createViewData(inputData) {
|
228
|
-
this.getView().createViewData(inputData)
|
228
|
+
this.getView().createViewData(inputData)
|
229
229
|
}
|
230
230
|
|
231
231
|
/**
|
@@ -233,21 +233,21 @@ class Container extends BaseContainer {
|
|
233
233
|
* @returns {*}
|
234
234
|
*/
|
235
235
|
getVdomRoot() {
|
236
|
-
return this.vdom.cn[0]
|
236
|
+
return this.vdom.cn[0]
|
237
237
|
}
|
238
238
|
|
239
239
|
/**
|
240
240
|
* @returns {Object[]} The new vdom items root
|
241
241
|
*/
|
242
242
|
getVdomItemsRoot() {
|
243
|
-
return this.vdom.cn[0]
|
243
|
+
return this.vdom.cn[0]
|
244
244
|
}
|
245
245
|
|
246
246
|
/**
|
247
247
|
* @returns {Neo.grid.View}
|
248
248
|
*/
|
249
249
|
getView() {
|
250
|
-
return Neo.getComponent(this.viewId) || Neo.get(this.viewId)
|
250
|
+
return Neo.getComponent(this.viewId) || Neo.get(this.viewId)
|
251
251
|
}
|
252
252
|
|
253
253
|
/**
|
@@ -255,7 +255,7 @@ class Container extends BaseContainer {
|
|
255
255
|
* @returns {Neo.vdom.VNode}
|
256
256
|
*/
|
257
257
|
getVnodeRoot() {
|
258
|
-
return this.vnode.childNodes[0]
|
258
|
+
return this.vnode.childNodes[0]
|
259
259
|
}
|
260
260
|
|
261
261
|
/**
|
@@ -263,7 +263,7 @@ class Container extends BaseContainer {
|
|
263
263
|
*/
|
264
264
|
onConstructed() {
|
265
265
|
super.onConstructed();
|
266
|
-
this.selectionModel?.register(this)
|
266
|
+
this.selectionModel?.register(this)
|
267
267
|
}
|
268
268
|
|
269
269
|
/**
|
@@ -277,14 +277,14 @@ class Container extends BaseContainer {
|
|
277
277
|
|
278
278
|
me.store.sort(opts);
|
279
279
|
me.removeSortingCss(opts.property);
|
280
|
-
me.onStoreLoad(me.store.items)
|
280
|
+
me.onStoreLoad(me.store.items)
|
281
281
|
}
|
282
282
|
|
283
283
|
/**
|
284
284
|
*
|
285
285
|
*/
|
286
286
|
onStoreFilter() {
|
287
|
-
this.onStoreLoad(this.store.items)
|
287
|
+
this.onStoreLoad(this.store.items)
|
288
288
|
}
|
289
289
|
|
290
290
|
/**
|
@@ -299,15 +299,15 @@ class Container extends BaseContainer {
|
|
299
299
|
me.createViewData(data);
|
300
300
|
|
301
301
|
if (me.store.sorters.length < 1) {
|
302
|
-
me.removeSortingCss()
|
302
|
+
me.removeSortingCss()
|
303
303
|
}
|
304
304
|
} else {
|
305
305
|
listenerId = me.on('rendered', () => {
|
306
306
|
me.un('rendered', listenerId);
|
307
307
|
setTimeout(() => {
|
308
|
-
me.createViewData(data)
|
309
|
-
}, 50)
|
310
|
-
})
|
308
|
+
me.createViewData(data)
|
309
|
+
}, 50)
|
310
|
+
})
|
311
311
|
}
|
312
312
|
}
|
313
313
|
|
@@ -322,7 +322,7 @@ class Container extends BaseContainer {
|
|
322
322
|
* @param {*} opts.value
|
323
323
|
*/
|
324
324
|
onStoreRecordChange(opts) {
|
325
|
-
this.getView().onStoreRecordChange(opts)
|
325
|
+
this.getView().onStoreRecordChange(opts)
|
326
326
|
}
|
327
327
|
|
328
328
|
/**
|
@@ -331,8 +331,8 @@ class Container extends BaseContainer {
|
|
331
331
|
*/
|
332
332
|
removeSortingCss(field) {
|
333
333
|
this.items[0].items.forEach(column => {
|
334
|
-
column.field !== field && column.removeSortingCss()
|
335
|
-
})
|
334
|
+
column.field !== field && column.removeSortingCss()
|
335
|
+
})
|
336
336
|
}
|
337
337
|
}
|
338
338
|
|
package/src/grid/View.mjs
CHANGED
@@ -34,16 +34,14 @@ class View extends Component {
|
|
34
34
|
colCount = columns.length,
|
35
35
|
data = [],
|
36
36
|
i = 0,
|
37
|
-
vdom
|
37
|
+
{vdom} = me,
|
38
38
|
cellCls, cellStyle, config, column, dockLeftMargin, dockRightMargin, id, index, j, rendererOutput,
|
39
39
|
record, rendererValue, selectedRows, trCls;
|
40
40
|
|
41
41
|
me.recordVnodeMap = {}; // remove old data
|
42
42
|
|
43
|
-
// console.log('createViewData', me.id, inputData);
|
44
|
-
|
45
43
|
if (container.selectionModel?.ntype === 'selection-grid-rowmodel') {
|
46
|
-
selectedRows = container.selectionModel.items || []
|
44
|
+
selectedRows = container.selectionModel.items || []
|
47
45
|
}
|
48
46
|
|
49
47
|
for (; i < amountRows; i++) {
|
@@ -59,7 +57,7 @@ class View extends Component {
|
|
59
57
|
|
60
58
|
Neo.getComponent(me.containerId).fire('select', {
|
61
59
|
record
|
62
|
-
})
|
60
|
+
})
|
63
61
|
}
|
64
62
|
|
65
63
|
data.push({
|
@@ -79,7 +77,7 @@ class View extends Component {
|
|
79
77
|
rendererValue = record[column.field];
|
80
78
|
|
81
79
|
if (rendererValue === undefined) {
|
82
|
-
rendererValue = ''
|
80
|
+
rendererValue = ''
|
83
81
|
}
|
84
82
|
|
85
83
|
rendererOutput = column.renderer.call(column.rendererScope || container, {
|
@@ -93,20 +91,20 @@ class View extends Component {
|
|
93
91
|
cellCls = rendererOutput?.cls || ['neo-grid-cell'];
|
94
92
|
|
95
93
|
if (column.align !== 'left') {
|
96
|
-
cellCls.push('neo-' + column.align)
|
94
|
+
cellCls.push('neo-' + column.align)
|
97
95
|
}
|
98
96
|
|
99
97
|
if (!Neo.isObject(rendererOutput)) {
|
100
98
|
rendererOutput = {
|
101
99
|
cls : cellCls,
|
102
100
|
html: rendererOutput?.toString()
|
103
|
-
}
|
101
|
+
}
|
104
102
|
}
|
105
103
|
|
106
104
|
cellStyle = rendererOutput.style || {};
|
107
105
|
|
108
106
|
if (column.width) {
|
109
|
-
cellStyle.minWidth = `${column.width}px
|
107
|
+
cellStyle.minWidth = `${column.width}px`
|
110
108
|
}
|
111
109
|
|
112
110
|
config = {
|
@@ -122,15 +120,15 @@ class View extends Component {
|
|
122
120
|
|
123
121
|
if (column.dock === 'left') {
|
124
122
|
config.style.left = dockLeftMargin + 'px';
|
125
|
-
dockLeftMargin += column.width
|
123
|
+
dockLeftMargin += column.width
|
126
124
|
}
|
127
125
|
}
|
128
126
|
|
129
127
|
if (column.flex) {
|
130
|
-
config.style.width = '100%'
|
128
|
+
config.style.width = '100%'
|
131
129
|
}
|
132
130
|
|
133
|
-
data[i].cn.push(config)
|
131
|
+
data[i].cn.push(config)
|
134
132
|
}
|
135
133
|
|
136
134
|
j = 0;
|
@@ -141,7 +139,7 @@ class View extends Component {
|
|
141
139
|
|
142
140
|
if (column.dock === 'right') {
|
143
141
|
data[i].cn[index].style.right = dockRightMargin + 'px';
|
144
|
-
dockRightMargin += (column.width + 1)
|
142
|
+
dockRightMargin += (column.width + 1) // todo: borders fix
|
145
143
|
}
|
146
144
|
}
|
147
145
|
}
|
@@ -168,7 +166,7 @@ class View extends Component {
|
|
168
166
|
*/
|
169
167
|
destroy(updateParentVdom, silent) {
|
170
168
|
this.store = null;
|
171
|
-
super.destroy(updateParentVdom, silent)
|
169
|
+
super.destroy(updateParentVdom, silent)
|
172
170
|
}
|
173
171
|
|
174
172
|
/**
|
@@ -177,7 +175,7 @@ class View extends Component {
|
|
177
175
|
* @returns {String}
|
178
176
|
*/
|
179
177
|
getCellId(record, field) {
|
180
|
-
return this.id + '__' + record[this.store.keyProperty] + '__' + field
|
178
|
+
return this.id + '__' + record[this.store.keyProperty] + '__' + field
|
181
179
|
}
|
182
180
|
|
183
181
|
/**
|
@@ -191,7 +189,7 @@ class View extends Component {
|
|
191
189
|
node, parentNodes;
|
192
190
|
|
193
191
|
if (record) {
|
194
|
-
return record
|
192
|
+
return record
|
195
193
|
}
|
196
194
|
|
197
195
|
parentNodes = VDomUtil.getParentNodes(me.vdom, nodeId);
|
@@ -200,11 +198,11 @@ class View extends Component {
|
|
200
198
|
record = me.getRecordByRowId(node.id);
|
201
199
|
|
202
200
|
if (record) {
|
203
|
-
return record
|
201
|
+
return record
|
204
202
|
}
|
205
203
|
}
|
206
204
|
|
207
|
-
return null
|
205
|
+
return null
|
208
206
|
}
|
209
207
|
|
210
208
|
/**
|
@@ -212,7 +210,7 @@ class View extends Component {
|
|
212
210
|
* @returns {Object}
|
213
211
|
*/
|
214
212
|
getRecordByRowId(rowId) {
|
215
|
-
return this.store.getAt(this.recordVnodeMap[rowId])
|
213
|
+
return this.store.getAt(this.recordVnodeMap[rowId])
|
216
214
|
}
|
217
215
|
|
218
216
|
/**
|
@@ -221,7 +219,7 @@ class View extends Component {
|
|
221
219
|
* @returns {String}
|
222
220
|
*/
|
223
221
|
getRowId(record, index) {
|
224
|
-
return `${this.id}__tr__${record[this.store.keyProperty]}
|
222
|
+
return `${this.id}__tr__${record[this.store.keyProperty]}`
|
225
223
|
}
|
226
224
|
|
227
225
|
/**
|
@@ -231,7 +229,7 @@ class View extends Component {
|
|
231
229
|
* @returns {String[]}
|
232
230
|
*/
|
233
231
|
getTrClass(record, rowIndex) {
|
234
|
-
return ['neo-grid-row']
|
232
|
+
return ['neo-grid-row']
|
235
233
|
}
|
236
234
|
|
237
235
|
/**
|
@@ -259,7 +257,7 @@ class View extends Component {
|
|
259
257
|
})
|
260
258
|
});
|
261
259
|
|
262
|
-
deltas.length > 0 && Neo.applyDeltas(me.appName, deltas)
|
260
|
+
deltas.length > 0 && Neo.applyDeltas(me.appName, deltas)
|
263
261
|
}
|
264
262
|
}
|
265
263
|
|
@@ -71,7 +71,7 @@ class Button extends BaseButton {
|
|
71
71
|
me.addDomListeners({
|
72
72
|
click: me.onButtonClick,
|
73
73
|
scope: me
|
74
|
-
})
|
74
|
+
})
|
75
75
|
}
|
76
76
|
|
77
77
|
/**
|
@@ -81,8 +81,8 @@ class Button extends BaseButton {
|
|
81
81
|
* @protected
|
82
82
|
*/
|
83
83
|
afterSetIsSorted(value, oldValue) {
|
84
|
-
let me
|
85
|
-
cls = me
|
84
|
+
let me = this,
|
85
|
+
{cls} = me;
|
86
86
|
|
87
87
|
switch(value) {
|
88
88
|
case null:
|
@@ -105,7 +105,7 @@ class Button extends BaseButton {
|
|
105
105
|
me.mounted && me.fire('sort', {
|
106
106
|
direction: value,
|
107
107
|
property : me.field
|
108
|
-
})
|
108
|
+
})
|
109
109
|
}
|
110
110
|
|
111
111
|
/**
|
@@ -115,7 +115,7 @@ class Button extends BaseButton {
|
|
115
115
|
* @protected
|
116
116
|
*/
|
117
117
|
beforeSetCellAlign(value, oldValue) {
|
118
|
-
return this.beforeSetEnumValue(value, oldValue, 'cellAlign', 'cellAlignValues')
|
118
|
+
return this.beforeSetEnumValue(value, oldValue, 'cellAlign', 'cellAlignValues')
|
119
119
|
}
|
120
120
|
|
121
121
|
/**
|
@@ -130,29 +130,29 @@ class Button extends BaseButton {
|
|
130
130
|
ASC : null,
|
131
131
|
DESC: 'ASC',
|
132
132
|
null: 'DESC'
|
133
|
-
}
|
133
|
+
}
|
134
134
|
} else {
|
135
135
|
map = {
|
136
136
|
ASC : 'DESC',
|
137
137
|
DESC: null,
|
138
138
|
null: 'ASC'
|
139
|
-
}
|
139
|
+
}
|
140
140
|
}
|
141
141
|
|
142
|
-
me.isSorted = map[me.isSorted + '']
|
142
|
+
me.isSorted = map[me.isSorted + '']
|
143
143
|
}
|
144
144
|
|
145
145
|
/**
|
146
146
|
* @protected
|
147
147
|
*/
|
148
148
|
removeSortingCss() {
|
149
|
-
let me
|
150
|
-
cls = me
|
149
|
+
let me = this,
|
150
|
+
{cls} = me;
|
151
151
|
|
152
152
|
NeoArray.add(cls, 'neo-sort-hidden');
|
153
153
|
|
154
154
|
me.cls = cls;
|
155
|
-
me._isSorted = null
|
155
|
+
me._isSorted = null
|
156
156
|
}
|
157
157
|
|
158
158
|
/**
|
@@ -164,7 +164,7 @@ class Button extends BaseButton {
|
|
164
164
|
* @returns {*}
|
165
165
|
*/
|
166
166
|
renderer(data) {
|
167
|
-
return data.value
|
167
|
+
return data.value
|
168
168
|
}
|
169
169
|
}
|
170
170
|
|
@@ -57,10 +57,10 @@ class Toolbar extends BaseToolbar {
|
|
57
57
|
item.vdom.cls.push('neo-locked');
|
58
58
|
|
59
59
|
if (item.dock === 'left') {
|
60
|
-
style.left = dockLeftWidth + 'px'
|
60
|
+
style.left = dockLeftWidth + 'px'
|
61
61
|
}
|
62
62
|
|
63
|
-
dockLeftWidth += (item.width + 1)
|
63
|
+
dockLeftWidth += (item.width + 1) // todo: borders fix
|
64
64
|
}
|
65
65
|
|
66
66
|
item.wrapperStyle = style;
|
@@ -74,11 +74,11 @@ class Toolbar extends BaseToolbar {
|
|
74
74
|
|
75
75
|
item.wrapperStyle = style;
|
76
76
|
|
77
|
-
dockRightWidth += (item.width + 1)
|
77
|
+
dockRightWidth += (item.width + 1) // todo: borders fix
|
78
78
|
}
|
79
79
|
});
|
80
80
|
|
81
|
-
me.update()
|
81
|
+
me.update()
|
82
82
|
}
|
83
83
|
}
|
84
84
|
|
package/src/layout/Base.mjs
CHANGED
@@ -55,15 +55,16 @@ class Base extends CoreBase {
|
|
55
55
|
* @protected
|
56
56
|
*/
|
57
57
|
afterSetAppName(value, oldValue) {
|
58
|
-
value && Neo.currentWorker.insertThemeFiles(value, this.container.windowId, this.__proto__)
|
58
|
+
value && Neo.currentWorker.insertThemeFiles(value, this.container.windowId, this.__proto__)
|
59
59
|
}
|
60
60
|
|
61
61
|
/**
|
62
62
|
* Placeholder method
|
63
63
|
* @param {Neo.component.Base} item
|
64
|
+
* @param {Number} index
|
64
65
|
* @protected
|
65
66
|
*/
|
66
|
-
applyChildAttributes(item) {}
|
67
|
+
applyChildAttributes(item, index) {}
|
67
68
|
|
68
69
|
/**
|
69
70
|
* Placeholder method
|
@@ -88,7 +89,7 @@ class Base extends CoreBase {
|
|
88
89
|
* @returns {Neo.model.Component|null}
|
89
90
|
*/
|
90
91
|
getModel(ntype) {
|
91
|
-
return this.container.getModel()
|
92
|
+
return this.container.getModel()
|
92
93
|
}
|
93
94
|
|
94
95
|
/**
|
@@ -101,7 +102,7 @@ class Base extends CoreBase {
|
|
101
102
|
|
102
103
|
let me = this;
|
103
104
|
|
104
|
-
me.bind && me.container.getModel()?.parseConfig(me)
|
105
|
+
me.bind && me.container.getModel()?.parseConfig(me)
|
105
106
|
}
|
106
107
|
|
107
108
|
/**
|
package/src/layout/Card.mjs
CHANGED
@@ -71,13 +71,12 @@ class Card extends Base {
|
|
71
71
|
* @protected
|
72
72
|
*/
|
73
73
|
async afterSetActiveIndex(value, oldValue) {
|
74
|
-
let me
|
75
|
-
containerId
|
76
|
-
container
|
77
|
-
sCfg
|
78
|
-
needsTransition
|
79
|
-
needsUpdate
|
80
|
-
removeInactiveCards = me.removeInactiveCards,
|
74
|
+
let me = this,
|
75
|
+
{containerId, removeInactiveCards} = me,
|
76
|
+
container = Neo.getComponent(containerId) || Neo.get(containerId), // the instance might not be registered yet
|
77
|
+
sCfg = me.constructor,
|
78
|
+
needsTransition = me.slideDirection && oldValue !== undefined,
|
79
|
+
needsUpdate = false,
|
81
80
|
i, isActiveIndex, item, items, len, module, wrapperCls;
|
82
81
|
|
83
82
|
if (Neo.isNumber(value) && container) {
|
@@ -123,7 +122,7 @@ class Card extends Base {
|
|
123
122
|
}
|
124
123
|
}
|
125
124
|
|
126
|
-
item.wrapperCls = wrapperCls
|
125
|
+
item.wrapperCls = wrapperCls
|
127
126
|
}
|
128
127
|
}
|
129
128
|
|
@@ -146,7 +145,7 @@ class Card extends Base {
|
|
146
145
|
isActiveIndex = me.activeIndex === index,
|
147
146
|
sCfg = me.constructor,
|
148
147
|
childCls = item.wrapperCls,
|
149
|
-
vdom
|
148
|
+
{vdom} = item;
|
150
149
|
|
151
150
|
NeoArray.add(childCls, sCfg.itemCls);
|
152
151
|
NeoArray.add(childCls, isActiveIndex ? sCfg.activeItemCls : sCfg.inactiveItemCls);
|
@@ -195,13 +194,13 @@ class Card extends Base {
|
|
195
194
|
* @returns {Neo.component.Base}
|
196
195
|
*/
|
197
196
|
async loadModule(item, index) {
|
198
|
-
let me
|
199
|
-
containerId = me
|
200
|
-
container
|
201
|
-
items
|
202
|
-
sCfg
|
203
|
-
vdom = container
|
204
|
-
module = item
|
197
|
+
let me = this,
|
198
|
+
{containerId} = me,
|
199
|
+
container = Neo.getComponent(containerId) || Neo.get(containerId), // the instance might not be registered yet
|
200
|
+
items = container.items,
|
201
|
+
sCfg = me.constructor,
|
202
|
+
{vdom} = container,
|
203
|
+
{module} = item,
|
205
204
|
proto, wrapperCls;
|
206
205
|
|
207
206
|
if (!Neo.isNumber(index)) {
|
package/src/layout/Fit.mjs
CHANGED
@@ -21,12 +21,12 @@ class Fit extends Base {
|
|
21
21
|
|
22
22
|
/**
|
23
23
|
* Initially sets the CSS classes of the container items this layout is bound to.
|
24
|
-
* @param {Neo.component.Base}
|
24
|
+
* @param {Neo.component.Base} item
|
25
25
|
* @param {Number} index
|
26
26
|
*/
|
27
|
-
applyChildAttributes(
|
28
|
-
if (!
|
29
|
-
|
27
|
+
applyChildAttributes(item, index) {
|
28
|
+
if (!item.ignoreLayout) {
|
29
|
+
item.wrapperCls = NeoArray.union(item.wrapperCls, 'neo-layout-fit-item')
|
30
30
|
}
|
31
31
|
}
|
32
32
|
|
@@ -39,12 +39,26 @@ class Fit extends Base {
|
|
39
39
|
wrapperCls = container?.wrapperCls || [];
|
40
40
|
|
41
41
|
if (!container) {
|
42
|
-
Neo.logError('layout.Fit: applyRenderAttributes -> container not yet created', me.containerId)
|
42
|
+
Neo.logError('layout.Fit: applyRenderAttributes -> container not yet created', me.containerId)
|
43
43
|
}
|
44
44
|
|
45
45
|
NeoArray.add(wrapperCls, 'neo-layout-fit');
|
46
46
|
|
47
|
-
container.wrapperCls = wrapperCls
|
47
|
+
container.wrapperCls = wrapperCls
|
48
|
+
}
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Removes all CSS rules from a container item this layout is bound to.
|
52
|
+
* Gets called when switching to a different layout.
|
53
|
+
* @param {Neo.component.Base} item
|
54
|
+
*/
|
55
|
+
removeChildAttributes(item) {
|
56
|
+
if (!item.ignoreLayout) {
|
57
|
+
let wrapperCls = item.wrapperCls;
|
58
|
+
|
59
|
+
NeoArray.remove(wrapperCls, 'neo-layout-fit-item');
|
60
|
+
item.wrapperCls = wrapperCls
|
61
|
+
}
|
48
62
|
}
|
49
63
|
|
50
64
|
/**
|
@@ -57,12 +71,12 @@ class Fit extends Base {
|
|
57
71
|
wrapperCls = container?.wrapperCls || [];
|
58
72
|
|
59
73
|
if (!container) {
|
60
|
-
Neo.logError('layout.Fit: removeRenderAttributes -> container not yet created', me.containerId)
|
74
|
+
Neo.logError('layout.Fit: removeRenderAttributes -> container not yet created', me.containerId)
|
61
75
|
}
|
62
76
|
|
63
77
|
NeoArray.remove(wrapperCls, 'neo-layout-fit');
|
64
78
|
|
65
|
-
container.wrapperCls = wrapperCls
|
79
|
+
container.wrapperCls = wrapperCls
|
66
80
|
}
|
67
81
|
}
|
68
82
|
|