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
@@ -21,27 +21,6 @@ import NeoArray from '../util/Array.mjs';
|
|
21
21
|
* }
|
22
22
|
*/
|
23
23
|
class Process extends Base {
|
24
|
-
/**
|
25
|
-
* Each item gets an arrow and the content, which gets filled with an item.
|
26
|
-
* The slit allows to fade out the sidebar.
|
27
|
-
*
|
28
|
-
* @member {Object} itemLayout={cls: 'process-step', cn: [{cls: ['arrow', 'white']},{cls: ['slit']},{cls: ['arrow', 'yellow']},{cls: 'process-content', cn: [{cls: ['process-step-icon']},{tag: 'h2', cls: ['process-step-header']},{cls: ['process-step-text']}]}]}
|
29
|
-
*/
|
30
|
-
itemLayout = {
|
31
|
-
cls: 'process-step', cn: [
|
32
|
-
{cls: ['arrow', 'white']},
|
33
|
-
{cls: ['slit']},
|
34
|
-
{cls: ['arrow', 'yellow']},
|
35
|
-
{
|
36
|
-
cls: 'process-content', cn: [
|
37
|
-
{cls: ['process-step-icon']},
|
38
|
-
{tag: 'h2', cls: ['process-step-header']},
|
39
|
-
{cls: ['process-step-text']}
|
40
|
-
]
|
41
|
-
}
|
42
|
-
]
|
43
|
-
}
|
44
|
-
|
45
24
|
static config = {
|
46
25
|
/**
|
47
26
|
* @member {String} className='Neo.component.Process'
|
@@ -108,18 +87,39 @@ class Process extends Base {
|
|
108
87
|
vdom: {cn: []}
|
109
88
|
}
|
110
89
|
|
90
|
+
/**
|
91
|
+
* Each item gets an arrow and the content, which gets filled with an item.
|
92
|
+
* The slit allows to fade out the sidebar.
|
93
|
+
*
|
94
|
+
* @member {Object} itemLayout={cls: 'process-step', cn: [{cls: ['arrow', 'white']},{cls: ['slit']},{cls: ['arrow', 'yellow']},{cls: 'process-content', cn: [{cls: ['process-step-icon']},{tag: 'h2', cls: ['process-step-header']},{cls: ['process-step-text']}]}]}
|
95
|
+
*/
|
96
|
+
itemLayout = {
|
97
|
+
cls: 'process-step', cn: [
|
98
|
+
{cls: ['arrow', 'white']},
|
99
|
+
{cls: ['slit']},
|
100
|
+
{cls: ['arrow', 'yellow']},
|
101
|
+
{
|
102
|
+
cls: 'process-content', cn: [
|
103
|
+
{cls: ['process-step-icon']},
|
104
|
+
{tag: 'h2', cls: ['process-step-header']},
|
105
|
+
{cls: ['process-step-text']}
|
106
|
+
]
|
107
|
+
}
|
108
|
+
]
|
109
|
+
}
|
110
|
+
|
111
111
|
/**
|
112
112
|
* Triggered after arrowColor config got changed
|
113
113
|
* @param {String} newValue
|
114
114
|
* @protected
|
115
115
|
*/
|
116
116
|
afterSetArrowColor(newValue) {
|
117
|
-
if (newValue
|
118
|
-
|
119
|
-
let style = this.style;
|
117
|
+
if (newValue !== null) {
|
118
|
+
let style = this.style;
|
120
119
|
|
121
|
-
|
122
|
-
|
120
|
+
style['--process-arrow-color'] = newValue + '!important';
|
121
|
+
this.style = style
|
122
|
+
}
|
123
123
|
}
|
124
124
|
|
125
125
|
/**
|
@@ -128,14 +128,14 @@ class Process extends Base {
|
|
128
128
|
* @protected
|
129
129
|
*/
|
130
130
|
afterSetHorizontal(isHorizontal) {
|
131
|
-
let cls
|
131
|
+
let {cls} = this,
|
132
132
|
positionCls = isHorizontal ? 'neo-process-horizontal' : 'neo-process-vertical',
|
133
133
|
removeCls = !isHorizontal ? 'neo-process-horizontal' : 'neo-process-vertical';
|
134
134
|
|
135
135
|
NeoArray.add(cls, positionCls);
|
136
136
|
NeoArray.remove(cls, removeCls);
|
137
137
|
|
138
|
-
this.cls = cls
|
138
|
+
this.cls = cls
|
139
139
|
}
|
140
140
|
|
141
141
|
/**
|
@@ -144,12 +144,13 @@ class Process extends Base {
|
|
144
144
|
* @protected
|
145
145
|
*/
|
146
146
|
afterSetIconColor(newValue) {
|
147
|
-
if (newValue
|
148
|
-
|
147
|
+
if (newValue !== null) {
|
148
|
+
let {style} = this;
|
149
149
|
|
150
|
-
|
150
|
+
style['--process-icon-color'] = newValue + '!important';
|
151
151
|
|
152
|
-
|
152
|
+
this.style = style
|
153
|
+
}
|
153
154
|
}
|
154
155
|
|
155
156
|
/**
|
@@ -164,18 +165,19 @@ class Process extends Base {
|
|
164
165
|
}
|
165
166
|
|
166
167
|
let vdomRoot = this.vdom,
|
167
|
-
itemLayout = this.itemLayout
|
168
|
+
itemLayout = this.itemLayout,
|
169
|
+
curItem, content;
|
168
170
|
|
169
171
|
items.forEach((newItem) => {
|
170
|
-
|
171
|
-
|
172
|
+
curItem = Neo.clone(itemLayout, true),
|
173
|
+
content = curItem.cn[3];
|
172
174
|
|
173
175
|
content.cn[0].cls.push(newItem.iconCls);
|
174
176
|
content.cn[1].innerHTML = newItem.title;
|
175
177
|
content.cn[2].innerHTML = newItem.text;
|
176
178
|
|
177
|
-
NeoArray.add(vdomRoot.cn, curItem)
|
178
|
-
})
|
179
|
+
NeoArray.add(vdomRoot.cn, curItem)
|
180
|
+
})
|
179
181
|
}
|
180
182
|
}
|
181
183
|
|
@@ -87,10 +87,10 @@ class Splitter extends Component {
|
|
87
87
|
* @protected
|
88
88
|
*/
|
89
89
|
afterSetDirection(value, oldValue) {
|
90
|
-
let me
|
91
|
-
cls
|
92
|
-
height
|
93
|
-
width
|
90
|
+
let me = this,
|
91
|
+
{cls, size} = me,
|
92
|
+
height = value === 'vertical' ? null : size,
|
93
|
+
width = value !== 'vertical' ? null : size;
|
94
94
|
|
95
95
|
NeoArray.add(cls, `neo-${value}`);
|
96
96
|
|
@@ -143,12 +143,10 @@ class Splitter extends Component {
|
|
143
143
|
* @param {Object} data
|
144
144
|
*/
|
145
145
|
onDragEnd(data) {
|
146
|
-
let me
|
147
|
-
style
|
148
|
-
parent
|
149
|
-
|
150
|
-
resizeNext = me.resizeTarget === 'next',
|
151
|
-
size = me.size,
|
146
|
+
let me = this,
|
147
|
+
style = me.style || {},
|
148
|
+
{parent, parentId, size} = me,
|
149
|
+
resizeNext = me.resizeTarget === 'next',
|
152
150
|
index, newSize, sibling;
|
153
151
|
|
154
152
|
parent.disabled = false;
|
@@ -189,7 +187,7 @@ class Splitter extends Component {
|
|
189
187
|
|
190
188
|
newSize = Math.min(Math.max(newSize, 0), parentRect.height - size);
|
191
189
|
|
192
|
-
style.height = `${newSize}px
|
190
|
+
style.height = `${newSize}px`
|
193
191
|
}
|
194
192
|
|
195
193
|
sibling.style = style
|
@@ -283,9 +283,8 @@ class StatusBadge extends Base {
|
|
283
283
|
* @protected
|
284
284
|
*/
|
285
285
|
afterSetState(value, oldValue) {
|
286
|
-
|
287
286
|
let me = this,
|
288
|
-
cls
|
287
|
+
{cls} = me,
|
289
288
|
isEmpty = !value || value === '',
|
290
289
|
vdomRoot = me.getVdomRoot(),
|
291
290
|
labelNode = vdomRoot.cn[1];
|
@@ -333,7 +332,7 @@ class StatusBadge extends Base {
|
|
333
332
|
labelNode.innerHTML = showLabel;
|
334
333
|
|
335
334
|
me.updateStateIconNode(showStateIcon);
|
336
|
-
me.updateSideIconNode(showSideIcon)
|
335
|
+
me.updateSideIconNode(showSideIcon)
|
337
336
|
}
|
338
337
|
|
339
338
|
me.update()
|
package/src/component/Timer.mjs
CHANGED
@@ -60,27 +60,26 @@ class Timer extends Component {
|
|
60
60
|
* The vdom markup for this component.
|
61
61
|
* @member {Object} vdom={}
|
62
62
|
*/
|
63
|
-
vdom:
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
]}
|
80
|
-
]}
|
63
|
+
vdom:
|
64
|
+
{cn: [
|
65
|
+
{cls: 'countdown', cn: [
|
66
|
+
{tag: 'svg', cls: 'clock', viewBox: '-50 -50 100 100', strokeWidth: '10', cn: [
|
67
|
+
{tag: 'circle', r: 45},
|
68
|
+
{tag: 'circle', r: 45, pathLength: 1}
|
69
|
+
]},
|
70
|
+
{cls: ['flip-card'], cn : [
|
71
|
+
{cls: 'flip-card-inner enter-mask', cn : [
|
72
|
+
{cls: 'flip-card-front', cn : [
|
73
|
+
{tag: 'input', cls: 'enter-time'},
|
74
|
+
{tag: 'button',cls: 'fa fa-play'}
|
75
|
+
]},
|
76
|
+
{cls: 'flip-card-back', cn : [
|
77
|
+
{cls: 'runner', html: '00:00'}
|
78
|
+
]}
|
81
79
|
]}
|
82
|
-
|
83
|
-
|
80
|
+
]}
|
81
|
+
]}
|
82
|
+
]}
|
84
83
|
}
|
85
84
|
|
86
85
|
/**
|
@@ -92,12 +91,12 @@ class Timer extends Component {
|
|
92
91
|
let me = this;
|
93
92
|
|
94
93
|
me.addDomListeners([
|
95
|
-
{click: me.onTimerClick,
|
96
|
-
{click: me.onTimerClick,
|
97
|
-
{input: me.onTimerInput,
|
98
|
-
{focusout: me.onTimerInput,
|
99
|
-
{keydown: me.onFieldKeyDown, delegate: 'enter-time'}
|
100
|
-
])
|
94
|
+
{click : me.onTimerClick, delegate: 'flip-card-back'},
|
95
|
+
{click : me.onTimerClick, delegate: 'fa fa-play'},
|
96
|
+
{input : me.onTimerInput, delegate: 'enter-time'},
|
97
|
+
{focusout: me.onTimerInput, delegate: 'enter-time'},
|
98
|
+
{keydown : me.onFieldKeyDown, delegate: 'enter-time'}
|
99
|
+
])
|
101
100
|
}
|
102
101
|
|
103
102
|
/**
|
@@ -108,9 +107,10 @@ class Timer extends Component {
|
|
108
107
|
*/
|
109
108
|
afterSetDimensions(value, oldValue) {
|
110
109
|
if (typeof value === 'number') {
|
111
|
-
value = value + 'px'
|
110
|
+
value = value + 'px'
|
112
111
|
}
|
113
|
-
|
112
|
+
|
113
|
+
this.updateProperties({dimensions: value})
|
114
114
|
}
|
115
115
|
|
116
116
|
/**
|
@@ -120,8 +120,7 @@ class Timer extends Component {
|
|
120
120
|
* @protected
|
121
121
|
*/
|
122
122
|
afterSetColorStart(value, oldValue) {
|
123
|
-
|
124
|
-
this.updateProperties({colorStart: value});
|
123
|
+
value && this.updateProperties({colorStart: value})
|
125
124
|
}
|
126
125
|
|
127
126
|
/**
|
@@ -131,34 +130,35 @@ class Timer extends Component {
|
|
131
130
|
* @protected
|
132
131
|
*/
|
133
132
|
afterSetColorEnd(value, oldValue) {
|
134
|
-
|
135
|
-
this.updateProperties({colorEnd: value});
|
133
|
+
value && this.updateProperties({colorEnd: value})
|
136
134
|
}
|
137
135
|
|
138
136
|
/**
|
139
137
|
* Triggered before the duration config got changed
|
140
138
|
* @param {Number|String} value
|
141
139
|
* @param {Number|String} oldValue
|
140
|
+
* @returns {Number}
|
142
141
|
* @protected
|
143
142
|
*/
|
144
143
|
beforeSetDuration(value, oldValue) {
|
145
|
-
|
144
|
+
let me = this,
|
145
|
+
durationType;
|
146
146
|
|
147
147
|
me.updateInputField(value)
|
148
148
|
|
149
|
-
if (
|
150
|
-
|
149
|
+
if (Neo.isString(value)) {
|
150
|
+
durationType = value.at(-1);
|
151
151
|
|
152
152
|
if (durationType === 'm') {
|
153
|
-
value = value.split('m')[0] * 60 * 1000
|
153
|
+
value = value.split('m')[0] * 60 * 1000
|
154
154
|
} else if (durationType === 's') {
|
155
|
-
value = value.split('s')[0] * 1000
|
155
|
+
value = value.split('s')[0] * 1000
|
156
156
|
}
|
157
157
|
}
|
158
158
|
|
159
159
|
me.updateProperties({full: value});
|
160
160
|
|
161
|
-
return value
|
161
|
+
return value
|
162
162
|
}
|
163
163
|
|
164
164
|
/**
|
@@ -166,11 +166,11 @@ class Timer extends Component {
|
|
166
166
|
* @param {Object} data
|
167
167
|
*/
|
168
168
|
onFieldKeyDown(data) {
|
169
|
-
|
169
|
+
let me = this;
|
170
170
|
|
171
171
|
if (data.key === 'Enter') {
|
172
172
|
me.duration = me.timer.entry;
|
173
|
-
me.onTimerClick()
|
173
|
+
me.onTimerClick()
|
174
174
|
}
|
175
175
|
}
|
176
176
|
|
@@ -178,12 +178,12 @@ class Timer extends Component {
|
|
178
178
|
* Click on Play or Timer
|
179
179
|
*/
|
180
180
|
onTimerClick() {
|
181
|
-
|
181
|
+
let me = this;
|
182
182
|
|
183
183
|
// If the timer is running, stop and clear it
|
184
184
|
if (me.timer.intervalId) {
|
185
185
|
me.toggleTimer(false);
|
186
|
-
me.resetTimer()
|
186
|
+
me.resetTimer()
|
187
187
|
} else {
|
188
188
|
// prepare
|
189
189
|
me.timer.startTime = new Date().getTime();
|
@@ -196,7 +196,7 @@ class Timer extends Component {
|
|
196
196
|
|
197
197
|
if (curTime > endTime) {
|
198
198
|
me.toggleTimer(false);
|
199
|
-
me.resetTimer()
|
199
|
+
me.resetTimer()
|
200
200
|
} else {
|
201
201
|
const milliseconds = endTime - curTime,
|
202
202
|
secondsLeft = Math.floor(milliseconds / 1000);
|
@@ -212,10 +212,10 @@ class Timer extends Component {
|
|
212
212
|
|
213
213
|
me.updateTimer(`${minutesNow}:${secondsNow}`);
|
214
214
|
me.updateProperties({current: milliseconds});
|
215
|
-
me.toggleTimer(true)
|
215
|
+
me.toggleTimer(true)
|
216
216
|
}
|
217
217
|
}
|
218
|
-
}, 100)
|
218
|
+
}, 100)
|
219
219
|
}
|
220
220
|
}
|
221
221
|
|
@@ -224,12 +224,12 @@ class Timer extends Component {
|
|
224
224
|
* @param {Object} data
|
225
225
|
*/
|
226
226
|
onTimerInput(data) {
|
227
|
-
|
227
|
+
let me = this;
|
228
228
|
|
229
229
|
if (data.value) {
|
230
230
|
me.timer.entry = data.value
|
231
231
|
} else {
|
232
|
-
me.duration = me.timer.entry
|
232
|
+
me.duration = me.timer.entry
|
233
233
|
}
|
234
234
|
}
|
235
235
|
|
@@ -237,13 +237,13 @@ class Timer extends Component {
|
|
237
237
|
* Reset the properties, timer and remove Interval
|
238
238
|
*/
|
239
239
|
resetTimer() {
|
240
|
-
|
240
|
+
let me = this;
|
241
241
|
|
242
242
|
me.updateProperties({current: ''});
|
243
243
|
me.updateTimer('00:00');
|
244
244
|
|
245
245
|
clearInterval(me.timer.intervalId);
|
246
|
-
delete me.timer.intervalId
|
246
|
+
delete me.timer.intervalId
|
247
247
|
}
|
248
248
|
|
249
249
|
/**
|
@@ -254,16 +254,14 @@ class Timer extends Component {
|
|
254
254
|
if(this.running === doShow) return;
|
255
255
|
|
256
256
|
let me = this,
|
257
|
-
|
258
|
-
vdom = me.vdom,
|
259
|
-
flipCard = vdom.cn[0].cn[1];
|
257
|
+
flipCard = me.vdom.cn[0].cn[1];
|
260
258
|
|
261
259
|
me.running = doShow;
|
262
260
|
|
263
261
|
flipCard.cls = flipCard.cls || [];
|
264
262
|
|
265
|
-
NeoArray[
|
266
|
-
me.
|
263
|
+
NeoArray[doShow ? 'add' : 'remove'](flipCard.cls, 'turn');
|
264
|
+
me.update()
|
267
265
|
}
|
268
266
|
|
269
267
|
/**
|
@@ -272,8 +270,7 @@ class Timer extends Component {
|
|
272
270
|
*/
|
273
271
|
updateInputField(value) {
|
274
272
|
let me = this,
|
275
|
-
|
276
|
-
inputField = vdom.cn[0].cn[1].cn[0].cn[0].cn[0];
|
273
|
+
inputField = me.vdom.cn[0].cn[1].cn[0].cn[0].cn[0];
|
277
274
|
|
278
275
|
inputField.value = value;
|
279
276
|
}
|
@@ -284,11 +281,10 @@ class Timer extends Component {
|
|
284
281
|
*/
|
285
282
|
updateTimer(value) {
|
286
283
|
let me = this,
|
287
|
-
|
288
|
-
timer = vdom.cn[0].cn[1].cn[0].cn[1].cn[0];
|
284
|
+
timer = me.vdom.cn[0].cn[1].cn[0].cn[1].cn[0];
|
289
285
|
|
290
286
|
timer.innerHTML = value;
|
291
|
-
me.
|
287
|
+
me.update()
|
292
288
|
}
|
293
289
|
|
294
290
|
/**
|
@@ -299,27 +295,25 @@ class Timer extends Component {
|
|
299
295
|
* @param {Object} properties
|
300
296
|
*/
|
301
297
|
updateProperties(properties) {
|
302
|
-
|
303
|
-
let me = this,
|
304
|
-
style = me.style;
|
298
|
+
let {style} = this;
|
305
299
|
|
306
300
|
if (properties.current !== undefined) {
|
307
|
-
style['--neo-timer-current'] = `${properties.current}!important
|
301
|
+
style['--neo-timer-current'] = `${properties.current}!important`
|
308
302
|
}
|
309
303
|
if (properties.full !== undefined) {
|
310
|
-
style['--neo-timer-full'] = `${properties.full}!important
|
304
|
+
style['--neo-timer-full'] = `${properties.full}!important`
|
311
305
|
}
|
312
306
|
if (properties.colorEnd !== undefined) {
|
313
|
-
style['--timer-color-end'] = `${properties.colorEnd}!important
|
307
|
+
style['--timer-color-end'] = `${properties.colorEnd}!important`
|
314
308
|
}
|
315
309
|
if (properties.colorStart !== undefined) {
|
316
|
-
style['--timer-color-start'] = `${properties.colorStart}!important
|
310
|
+
style['--timer-color-start'] = `${properties.colorStart}!important`
|
317
311
|
}
|
318
312
|
if (properties.dimensions !== undefined) {
|
319
|
-
style['--timer-dimension'] = `${properties.dimensions}!important
|
313
|
+
style['--timer-dimension'] = `${properties.dimensions}!important`
|
320
314
|
}
|
321
315
|
|
322
|
-
|
316
|
+
this.style = style
|
323
317
|
}
|
324
318
|
}
|
325
319
|
|
package/src/component/Toast.mjs
CHANGED
@@ -139,7 +139,7 @@ class Toast extends Base {
|
|
139
139
|
{click: {fn: me.destroy, delegate: '.neo-toast-close', scope: me}}
|
140
140
|
]);
|
141
141
|
|
142
|
-
ToastManager.register(me)
|
142
|
+
ToastManager.register(me)
|
143
143
|
}
|
144
144
|
|
145
145
|
/**
|
@@ -149,7 +149,7 @@ class Toast extends Base {
|
|
149
149
|
afterSetClosable(value, oldValue) {
|
150
150
|
let vdom = this.getVdomInner().cn[2];
|
151
151
|
|
152
|
-
vdom.removeDom = !value
|
152
|
+
vdom.removeDom = !value
|
153
153
|
}
|
154
154
|
|
155
155
|
/**
|
@@ -158,10 +158,10 @@ class Toast extends Base {
|
|
158
158
|
*/
|
159
159
|
afterSetIconCls(value, oldValue) {
|
160
160
|
let vdom = this.getVdomInner().cn[0],
|
161
|
-
cls
|
161
|
+
{cls} = vdom;
|
162
162
|
|
163
163
|
vdom.removeDom = Neo.isEmpty(value);
|
164
|
-
NeoArray[value ? 'add' : 'remove'](cls, value)
|
164
|
+
NeoArray[value ? 'add' : 'remove'](cls, value)
|
165
165
|
}
|
166
166
|
|
167
167
|
/**
|
@@ -174,7 +174,7 @@ class Toast extends Base {
|
|
174
174
|
afterSetMsg(value, oldValue) {
|
175
175
|
let vdom = this.getTextRootVdom().cn[1];
|
176
176
|
|
177
|
-
vdom.innerHTML = value
|
177
|
+
vdom.innerHTML = value
|
178
178
|
}
|
179
179
|
|
180
180
|
/**
|
@@ -207,7 +207,7 @@ class Toast extends Base {
|
|
207
207
|
|
208
208
|
if (!me.closable && value) {
|
209
209
|
setTimeout(() => {
|
210
|
-
this.destroy(true)
|
210
|
+
this.destroy(true)
|
211
211
|
}, me.timeout)
|
212
212
|
}
|
213
213
|
}
|
@@ -221,7 +221,7 @@ class Toast extends Base {
|
|
221
221
|
|
222
222
|
vdom.removeDom = Neo.isEmpty(value);
|
223
223
|
vdom.innerHTML = value;
|
224
|
-
NeoArray[value ? 'add' : 'remove'](vdom.cls, 'neo-toast-has-title')
|
224
|
+
NeoArray[value ? 'add' : 'remove'](vdom.cls, 'neo-toast-has-title')
|
225
225
|
}
|
226
226
|
|
227
227
|
/**
|
@@ -231,7 +231,7 @@ class Toast extends Base {
|
|
231
231
|
* @protected
|
232
232
|
*/
|
233
233
|
beforeSetPosition(value, oldValue) {
|
234
|
-
return this.beforeSetEnumValue(value, oldValue, 'position')
|
234
|
+
return this.beforeSetEnumValue(value, oldValue, 'position')
|
235
235
|
}
|
236
236
|
|
237
237
|
/**
|
@@ -241,7 +241,7 @@ class Toast extends Base {
|
|
241
241
|
* @protected
|
242
242
|
*/
|
243
243
|
beforeSetSlideDirection(value, oldValue) {
|
244
|
-
return this.beforeSetEnumValue(value, oldValue, 'slideDirection')
|
244
|
+
return this.beforeSetEnumValue(value, oldValue, 'slideDirection')
|
245
245
|
}
|
246
246
|
|
247
247
|
/**
|
@@ -267,7 +267,7 @@ class Toast extends Base {
|
|
267
267
|
* @returns {Object} vdom
|
268
268
|
*/
|
269
269
|
getTextRootVdom() {
|
270
|
-
return this.getVdomInner().cn[1]
|
270
|
+
return this.getVdomInner().cn[1]
|
271
271
|
}
|
272
272
|
|
273
273
|
/**
|
@@ -275,7 +275,7 @@ class Toast extends Base {
|
|
275
275
|
* @returns {Object} vdom
|
276
276
|
*/
|
277
277
|
getVdomInner() {
|
278
|
-
return this.vdom.cn[0]
|
278
|
+
return this.vdom.cn[0]
|
279
279
|
}
|
280
280
|
}
|
281
281
|
|
package/src/component/Video.mjs
CHANGED
@@ -99,14 +99,14 @@ class Video extends BaseComponent {
|
|
99
99
|
* @param {Boolean} oldValue
|
100
100
|
*/
|
101
101
|
afterSetPlaying(value, oldValue) {
|
102
|
-
let vdom
|
103
|
-
media
|
104
|
-
ghost
|
102
|
+
let {vdom} = this,
|
103
|
+
media = VDomUtil.getFlags(vdom, 'media')[0],
|
104
|
+
ghost = VDomUtil.getFlags(vdom, 'ghost')[0];
|
105
105
|
|
106
106
|
ghost.removeDom = value;
|
107
107
|
media.removeDom = !value;
|
108
108
|
|
109
|
-
this.
|
109
|
+
this.update()
|
110
110
|
}
|
111
111
|
|
112
112
|
/**
|
@@ -121,9 +121,8 @@ class Video extends BaseComponent {
|
|
121
121
|
return
|
122
122
|
}
|
123
123
|
|
124
|
-
|
125
|
-
|
126
|
-
media = vdom.cn[1];
|
124
|
+
let me = this,
|
125
|
+
media = me.vdom.cn[1];
|
127
126
|
|
128
127
|
media.cn = [{
|
129
128
|
tag : 'source',
|
@@ -131,7 +130,7 @@ class Video extends BaseComponent {
|
|
131
130
|
type: me.type
|
132
131
|
}];
|
133
132
|
|
134
|
-
me.
|
133
|
+
me.update()
|
135
134
|
}
|
136
135
|
|
137
136
|
/**
|