neo.mjs 8.0.0-alpha.2 → 8.0.0-beta.2
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/.github/CODING_GUIDELINES.md +5 -5
- package/.github/CONCEPT.md +10 -10
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/colors/view/Viewport.mjs +9 -9
- package/apps/colors/view/ViewportController.mjs +13 -13
- package/apps/colors/view/{ViewportModel.mjs → ViewportStateProvider.mjs} +8 -8
- package/apps/covid/view/MainContainer.mjs +22 -22
- package/apps/covid/view/MainContainerController.mjs +8 -10
- package/apps/covid/view/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +7 -7
- package/apps/covid/view/TableContainer.mjs +2 -2
- package/apps/covid/view/TableContainerController.mjs +1 -1
- package/apps/form/view/FormContainerController.mjs +2 -2
- package/apps/form/view/SideNavList.mjs +3 -3
- package/apps/form/view/Viewport.mjs +7 -7
- package/apps/form/view/ViewportController.mjs +4 -4
- package/apps/form/view/{ViewportModel.mjs → ViewportStateProvider.mjs} +8 -8
- package/apps/portal/index.html +1 -1
- package/apps/portal/resources/data/examples_devmode.json +3 -3
- package/apps/portal/resources/data/examples_dist_dev.json +3 -3
- package/apps/portal/resources/data/examples_dist_prod.json +3 -3
- package/apps/portal/view/Viewport.mjs +12 -12
- package/apps/portal/view/ViewportController.mjs +2 -2
- package/apps/portal/view/ViewportStateProvider.mjs +27 -0
- package/apps/portal/view/examples/TabContainer.mjs +11 -11
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/portal/view/home/parts/MainNeo.mjs +6 -2
- package/apps/portal/view/learn/ContentComponent.mjs +2 -2
- package/apps/portal/view/learn/ContentTreeList.mjs +1 -1
- package/apps/portal/view/learn/MainContainer.mjs +9 -9
- package/apps/portal/view/learn/MainContainerController.mjs +12 -12
- package/apps/portal/view/learn/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +7 -7
- package/apps/portal/view/learn/PageSectionsList.mjs +1 -1
- package/apps/realworld/view/article/CreateComponent.mjs +1 -1
- package/apps/realworld2/view/HomeContainer.mjs +7 -7
- package/apps/sharedcovid/view/GalleryContainer.mjs +2 -2
- package/apps/sharedcovid/view/HelixContainer.mjs +2 -2
- package/apps/sharedcovid/view/MainContainer.mjs +25 -25
- package/apps/sharedcovid/view/MainContainerController.mjs +10 -11
- package/apps/sharedcovid/view/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +8 -8
- package/apps/sharedcovid/view/TableContainer.mjs +2 -2
- package/apps/sharedcovid/view/TableContainerController.mjs +1 -1
- package/apps/sharedcovid/view/mapboxGl/Container.mjs +2 -2
- package/buildScripts/createApp.mjs +2 -2
- package/buildScripts/createClass.mjs +15 -17
- package/buildScripts/createComponent.mjs +4 -4
- package/docs/app/view/ContentTabContainer.mjs +1 -1
- package/docs/app/view/MainContainer.mjs +3 -3
- package/docs/app/view/MainContainerController.mjs +15 -15
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/component/mwc/buttons/MainContainer.mjs +2 -2
- package/examples/component/mwc/textFields/MainContainer.mjs +2 -2
- package/examples/fields/MainContainer.mjs +197 -228
- package/examples/preloadingAssets/view/MainContainer.mjs +2 -2
- package/examples/{model → stateProvider}/advanced/MainContainer.mjs +12 -12
- package/examples/{model → stateProvider}/advanced/MainContainerController.mjs +10 -10
- package/examples/stateProvider/advanced/app.mjs +6 -0
- package/examples/{model/dialog → stateProvider/advanced}/index.html +1 -1
- package/examples/{model/inline → stateProvider/advanced}/neo-config.json +1 -1
- package/examples/{model → stateProvider}/dialog/EditUserDialog.mjs +3 -3
- package/examples/{model → stateProvider}/dialog/EditUserDialogController.mjs +5 -5
- package/examples/{model → stateProvider}/dialog/MainContainer.mjs +7 -7
- package/examples/{model → stateProvider}/dialog/MainContainerController.mjs +5 -5
- package/examples/{model → stateProvider}/dialog/app.mjs +1 -1
- package/examples/{model/multiWindow2 → stateProvider/dialog}/index.html +1 -1
- package/examples/{model → stateProvider}/dialog/neo-config.json +1 -1
- package/examples/{model → stateProvider}/extendedClass/MainContainer.mjs +13 -13
- package/examples/{model/inline → stateProvider/extendedClass}/MainContainerController.mjs +7 -7
- package/examples/stateProvider/extendedClass/MainContainerStateProvider.mjs +24 -0
- package/examples/stateProvider/extendedClass/app.mjs +6 -0
- package/examples/stateProvider/extendedClass/index.html +11 -0
- package/examples/stateProvider/extendedClass/neo-config.json +7 -0
- package/examples/{model → stateProvider}/inline/MainContainer.mjs +10 -10
- package/examples/{model/extendedClass → stateProvider/inline}/MainContainerController.mjs +7 -7
- package/examples/{model/extendedClass → stateProvider/inline}/app.mjs +1 -1
- package/examples/{model/extendedClass → stateProvider/inline}/index.html +1 -1
- package/examples/{model/extendedClass → stateProvider/inline}/neo-config.json +1 -1
- package/examples/{model/inlineNoModel → stateProvider/inlineNoStateProvider}/MainContainer.mjs +4 -4
- package/examples/{model/inlineNoModel → stateProvider/inlineNoStateProvider}/MainContainerController.mjs +3 -3
- package/examples/stateProvider/inlineNoStateProvider/README.md +8 -0
- package/examples/stateProvider/inlineNoStateProvider/app.mjs +6 -0
- package/examples/{model/inline → stateProvider/inlineNoStateProvider}/index.html +1 -1
- package/examples/stateProvider/inlineNoStateProvider/neo-config.json +7 -0
- package/examples/{model → stateProvider}/multiWindow/EditUserDialog.mjs +3 -3
- package/examples/{model → stateProvider}/multiWindow/EditUserDialogController.mjs +5 -5
- package/examples/{model → stateProvider}/multiWindow/MainContainer.mjs +3 -3
- package/examples/{model → stateProvider}/multiWindow/MainContainerController.mjs +6 -6
- package/examples/{model → stateProvider}/multiWindow/Viewport.mjs +3 -3
- package/examples/{model → stateProvider}/multiWindow/ViewportController.mjs +14 -14
- package/examples/{model/multiWindow2 → stateProvider/multiWindow}/app.mjs +1 -1
- package/examples/{model/advanced → stateProvider/multiWindow}/index.html +1 -1
- package/examples/{model → stateProvider}/multiWindow/neo-config.json +1 -1
- package/examples/{model → stateProvider}/multiWindow2/Viewport.mjs +3 -3
- package/examples/{model/multiWindow → stateProvider/multiWindow2}/app.mjs +1 -1
- package/examples/{model/multiWindow → stateProvider/multiWindow2}/index.html +1 -1
- package/examples/{model → stateProvider}/multiWindow2/neo-config.json +1 -1
- package/examples/{model → stateProvider}/nestedData/MainContainer.mjs +9 -9
- package/examples/{model → stateProvider}/nestedData/MainContainerController.mjs +7 -7
- package/examples/stateProvider/nestedData/app.mjs +6 -0
- package/examples/stateProvider/nestedData/index.html +11 -0
- package/examples/stateProvider/nestedData/neo-config.json +7 -0
- package/examples/{model → stateProvider}/table/MainContainer.mjs +8 -8
- package/examples/stateProvider/table/MainContainerStateProvider.mjs +24 -0
- package/examples/{model → stateProvider}/table/MainModel.mjs +2 -2
- package/examples/{model → stateProvider}/table/MainStore.mjs +2 -2
- package/examples/{model/advanced → stateProvider/table}/app.mjs +1 -1
- package/examples/{model/advanced → stateProvider/table}/neo-config.json +1 -1
- package/examples/{model → stateProvider}/twoWay/MainContainer.mjs +9 -9
- package/examples/{model/inline → stateProvider/twoWay}/app.mjs +1 -1
- package/examples/stateProvider/twoWay/index.html +11 -0
- package/examples/{model → stateProvider}/twoWay/neo-config.json +1 -1
- package/examples/tab/container/MainContainer.mjs +7 -9
- package/examples/table/nestedRecordFields/EditUserDialog.mjs +3 -3
- package/examples/table/nestedRecordFields/MainContainer.mjs +8 -8
- package/examples/table/nestedRecordFields/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +10 -10
- package/examples/tabs/MainContainer.mjs +3 -3
- package/examples/tabs/MainContainer2.mjs +4 -4
- package/examples/toolbar/paging/view/MainContainer.mjs +7 -7
- package/examples/toolbar/paging/view/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +8 -8
- package/examples/treeAccordion/MainContainer.mjs +2 -2
- package/examples/videoMove/MainContainer.mjs +14 -7
- package/examples/viewport/MainContainer.mjs +3 -3
- package/package.json +6 -6
- package/resources/data/deck/learnneo/pages/benefits/FormsEngine.md +13 -13
- package/resources/data/deck/learnneo/pages/guides/{ViewModels.md → StateProviders.md} +52 -58
- package/resources/data/deck/learnneo/tree.json +46 -46
- package/resources/data/deck/training/pages/2022-12-27T21-55-23-144Z.md +2 -2
- package/resources/data/deck/training/pages/2022-12-28T17-11-34-653Z.md +6 -6
- package/resources/data/deck/training/pages/2022-12-29T18-36-08-226Z.md +2 -2
- package/resources/data/deck/training/pages/2022-12-29T18-36-56-893Z.md +2 -2
- package/resources/data/deck/training/pages/2022-12-29T20-37-08-919Z.md +2 -2
- package/resources/data/deck/training/pages/2022-12-29T20-37-20-344Z.md +2 -2
- package/resources/data/deck/training/pages/2023-01-01T21-11-58-025Z.md +3 -3
- package/resources/data/deck/training/pages/2023-01-16T20-24-09-690Z.md +4 -4
- package/resources/data/deck/training/pages/2023-02-05T17-44-53-815Z.md +3 -3
- package/resources/data/deck/training/pages/2023-02-05T17-45-40-114Z.md +1 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/button/Base.mjs +7 -7
- package/src/calendar/view/EditEventContainer.mjs +3 -3
- package/src/calendar/view/MainContainer.mjs +27 -27
- package/src/calendar/view/{MainContainerModel.mjs → MainContainerStateProvider.mjs} +7 -7
- package/src/calendar/view/SettingsContainer.mjs +13 -28
- package/src/calendar/view/YearComponent.mjs +5 -5
- package/src/calendar/view/calendars/ColorsList.mjs +5 -0
- package/src/calendar/view/calendars/EditContainer.mjs +1 -1
- package/src/calendar/view/calendars/List.mjs +1 -1
- package/src/calendar/view/month/Component.mjs +6 -6
- package/src/calendar/view/settings/GeneralContainer.mjs +2 -2
- package/src/calendar/view/week/Component.mjs +10 -10
- package/src/calendar/view/week/EventDragZone.mjs +1 -1
- package/src/code/LivePreview.mjs +10 -10
- package/src/component/Base.mjs +123 -105
- package/src/container/Base.mjs +4 -4
- package/src/controller/Component.mjs +29 -12
- package/src/core/Base.mjs +0 -1
- package/src/core/Compare.mjs +128 -83
- package/src/date/SelectorContainer.mjs +12 -12
- package/src/date/{SelectorContainerModel.mjs → SelectorContainerStateProvider.mjs} +7 -7
- package/src/form/field/Text.mjs +1 -1
- package/src/form/field/Time.mjs +5 -3
- package/src/form/field/trigger/Time.mjs +2 -1
- package/src/layout/Base.mjs +6 -6
- package/src/list/Base.mjs +7 -1
- package/src/list/Color.mjs +3 -3
- package/src/main/DomEvents.mjs +1 -1
- package/src/main/DomUtils.mjs +39 -36
- package/src/{model/Component.mjs → state/Provider.mjs} +67 -69
- package/src/tab/Container.mjs +3 -5
- package/src/toolbar/Base.mjs +26 -8
- package/src/tree/Accordion.mjs +15 -13
- package/src/util/VNode.mjs +6 -8
- package/src/worker/App.mjs +2 -2
- package/apps/portal/view/ViewportModel.mjs +0 -27
- package/examples/model/extendedClass/MainContainerModel.mjs +0 -24
- package/examples/model/inlineNoModel/README.md +0 -8
- package/examples/model/inlineNoModel/app.mjs +0 -6
- package/examples/model/inlineNoModel/index.html +0 -11
- package/examples/model/inlineNoModel/neo-config.json +0 -7
- package/examples/model/nestedData/app.mjs +0 -6
- package/examples/model/nestedData/index.html +0 -11
- package/examples/model/nestedData/neo-config.json +0 -7
- package/examples/model/table/MainContainerModel.mjs +0 -24
- package/examples/model/table/app.mjs +0 -6
- package/examples/model/table/neo-config.json +0 -7
- package/examples/model/twoWay/app.mjs +0 -6
- package/examples/model/twoWay/index.html +0 -11
- /package/examples/{model → stateProvider}/table/index.html +0 -0
@@ -1,48 +1,48 @@
|
|
1
1
|
{"data": [
|
2
|
-
{"name": "Welcome!",
|
3
|
-
{"name": "Benefits",
|
4
|
-
{"name": "Introduction ",
|
5
|
-
{"name": "Off the Main Thread",
|
6
|
-
{"name": "Extreme Speed",
|
7
|
-
{"name": "Multi-Window Applications",
|
8
|
-
{"name": "Quick Application Development",
|
9
|
-
{"name": "Complexity and Effort",
|
10
|
-
{"name": "Forms Engine",
|
11
|
-
{"name": "Features and Benefits Summary",
|
12
|
-
{"name": "Getting Started",
|
13
|
-
{"name": "Setup",
|
14
|
-
{"name": "Workspaces and Applications",
|
15
|
-
{"name": "Describing a View",
|
16
|
-
{"name": "Events",
|
17
|
-
{"name": "Component References",
|
18
|
-
{"name": "Extending Classes",
|
19
|
-
{"name": "Config",
|
20
|
-
{"name": "Shared Bindable Data",
|
21
|
-
{"name": "Tutorials",
|
22
|
-
{"name": "Rock Scissors Paper",
|
23
|
-
{"name": "Earthquakes",
|
24
|
-
{"name": "Todo List",
|
25
|
-
{"name": "Guides",
|
26
|
-
{"name": "Instance Lifecycle",
|
27
|
-
{"name": "User Input (Forms)",
|
28
|
-
{"name": "Component and Container Basics",
|
29
|
-
{"name": "Layouts",
|
30
|
-
{"name": "Shared Bindable Data (
|
31
|
-
{"name": "Custom Components",
|
32
|
-
{"name": "Events",
|
33
|
-
{"name": "Custom Events",
|
34
|
-
{"name": "DOM Events",
|
35
|
-
{"name": "Portal App",
|
36
|
-
{"name": "Tables (Stores)",
|
37
|
-
{"name": "Multi-Window Applications",
|
38
|
-
{"name": "Main Thread Addons",
|
39
|
-
{"name": "Introduction",
|
40
|
-
{"name": "Example",
|
41
|
-
{"name": "Mixins",
|
42
|
-
{"name": "JavaScript Classes",
|
43
|
-
{"name": "Classes, Properties, and Methods",
|
44
|
-
{"name": "Overriding Methods",
|
45
|
-
{"name": "Other JavaScript Class Features",
|
46
|
-
{"name": "Super",
|
47
|
-
{"name": "New Node",
|
2
|
+
{"name": "Welcome!", "parentId": null, "id": "Welcome" },
|
3
|
+
{"name": "Benefits", "parentId": null, "isLeaf": false, "id": "Benefits"},
|
4
|
+
{"name": "Introduction ", "parentId": "Benefits", "id": "benefits.Introduction"},
|
5
|
+
{"name": "Off the Main Thread", "parentId": "Benefits", "id": "benefits.Multi-Threading"},
|
6
|
+
{"name": "Extreme Speed", "parentId": "Benefits", "id": "benefits.Speed"},
|
7
|
+
{"name": "Multi-Window Applications", "parentId": "Benefits", "id": "benefits.Multi-Window"},
|
8
|
+
{"name": "Quick Application Development", "parentId": "Benefits", "id": "benefits.Quick"},
|
9
|
+
{"name": "Complexity and Effort", "parentId": "Benefits", "id": "benefits.Effort"},
|
10
|
+
{"name": "Forms Engine", "parentId": "Benefits", "id": "benefits.FormsEngine"},
|
11
|
+
{"name": "Features and Benefits Summary", "parentId": "Benefits", "id": "benefits.Features"},
|
12
|
+
{"name": "Getting Started", "parentId": null, "isLeaf": false, "id": "GettingStarted", "collapsed": true},
|
13
|
+
{"name": "Setup", "parentId": "GettingStarted", "id": "gettingstarted.Setup"},
|
14
|
+
{"name": "Workspaces and Applications", "parentId": "GettingStarted", "id": "gettingstarted.Workspaces"},
|
15
|
+
{"name": "Describing a View", "parentId": "GettingStarted", "id": "gettingstarted.DescribingTheUI"},
|
16
|
+
{"name": "Events", "parentId": "GettingStarted", "id": "gettingstarted.Events"},
|
17
|
+
{"name": "Component References", "parentId": "GettingStarted", "id": "gettingstarted.References"},
|
18
|
+
{"name": "Extending Classes", "parentId": "GettingStarted", "id": "gettingstarted.Extending"},
|
19
|
+
{"name": "Config", "parentId": "GettingStarted", "id": "gettingstarted.Config"},
|
20
|
+
{"name": "Shared Bindable Data", "parentId": "GettingStarted", "id": "gettingstarted.ComponentModels"},
|
21
|
+
{"name": "Tutorials", "parentId": null, "isLeaf": false, "id": "Tutorials", "collapsed": true},
|
22
|
+
{"name": "Rock Scissors Paper", "parentId": "Tutorials", "id": "tutorials.RSP", "hidden": true},
|
23
|
+
{"name": "Earthquakes", "parentId": "Tutorials", "id": "tutorials.Earthquakes"},
|
24
|
+
{"name": "Todo List", "parentId": "Tutorials", "id": "tutorials.TodoList"},
|
25
|
+
{"name": "Guides", "parentId": null, "isLeaf": false, "id": "InDepth", "collapsed": true},
|
26
|
+
{"name": "Instance Lifecycle", "parentId": "InDepth", "id": "guides.InstanceLifecycle", "hidden": true},
|
27
|
+
{"name": "User Input (Forms)", "parentId": "InDepth", "id": "guides.Forms", "hidden": true},
|
28
|
+
{"name": "Component and Container Basics", "parentId": "InDepth", "id": "guides.ComponentsAndContainers"},
|
29
|
+
{"name": "Layouts", "parentId": "InDepth", "isLeaf": false, "id": "guides.Layouts", "hidden": true},
|
30
|
+
{"name": "Shared Bindable Data (State Providers)", "parentId": "InDepth", "id": "guides.StateProviders"},
|
31
|
+
{"name": "Custom Components", "parentId": "InDepth", "id": "guides.CustomComponents", "hidden": true},
|
32
|
+
{"name": "Events", "parentId": "InDepth", "isLeaf": false, "id": "GuideEvents"},
|
33
|
+
{"name": "Custom Events", "parentId": "GuideEvents", "id": "guides.events.CustomEvents"},
|
34
|
+
{"name": "DOM Events", "parentId": "GuideEvents", "id": "guides.events.DomEvents"},
|
35
|
+
{"name": "Portal App", "parentId": "InDepth", "id": "guides.PortalApp"},
|
36
|
+
{"name": "Tables (Stores)", "parentId": "InDepth", "id": "guides.Tables", "hidden": true},
|
37
|
+
{"name": "Multi-Window Applications", "parentId": "InDepth", "id": "guides.MultiWindow", "hidden": true},
|
38
|
+
{"name": "Main Thread Addons", "parentId": "InDepth", "isLeaf": false, "id": "MainThreadAddons", "hidden": true},
|
39
|
+
{"name": "Introduction", "parentId": "MainThreadAddons", "id": "guides.MainThreadAddonIntro"},
|
40
|
+
{"name": "Example", "parentId": "MainThreadAddons", "id": "guides.MainThreadAddonExample"},
|
41
|
+
{"name": "Mixins", "parentId": "InDepth", "id": "guides.Mixins", "hidden": true},
|
42
|
+
{"name": "JavaScript Classes", "parentId": null, "isLeaf": false, "id": "JavaScript", "hidden": true},
|
43
|
+
{"name": "Classes, Properties, and Methods", "parentId": "JavaScript", "id": "javascript.Classes"},
|
44
|
+
{"name": "Overriding Methods", "parentId": "JavaScript", "id": "javascript.Overrides"},
|
45
|
+
{"name": "Other JavaScript Class Features", "parentId": "JavaScript", "id": "javascript.ClassFeatures"},
|
46
|
+
{"name": "Super", "parentId": "JavaScript", "id": "javascript.Super"},
|
47
|
+
{"name": "New Node", "parentId": "JavaScript", "id": "javascript.NewNode"}
|
48
48
|
]}
|
@@ -23,13 +23,13 @@ class MainContainer extends Viewport {
|
|
23
23
|
style: { padding: '20px' }
|
24
24
|
},
|
25
25
|
items: [{
|
26
|
-
|
26
|
+
header: {
|
27
27
|
iconCls: 'fa fa-home',
|
28
28
|
text: 'Tab 1'
|
29
29
|
},
|
30
30
|
vdom: { innerHTML: 'Welcome to your new Neo App.' }
|
31
31
|
}, {
|
32
|
-
|
32
|
+
header: {
|
33
33
|
iconCls: 'fa fa-play-circle',
|
34
34
|
text: 'Tab 2'
|
35
35
|
},
|
@@ -13,18 +13,18 @@ Give it the `ntype:'yelp-businesses-tabs',`.
|
|
13
13
|
|
14
14
|
It needs *two* tabs, with the tab button text set to 'Map' and 'Table'.
|
15
15
|
|
16
|
-
Remember that a tab is configured with the `
|
16
|
+
Remember that a tab is configured with the `header`, and you'll use the
|
17
17
|
`html` config as a placeholder to indicate that a map and a table will eventually
|
18
18
|
be used. The generated class already has two tabs.
|
19
19
|
|
20
|
-
The first tab
|
20
|
+
The first tab should end up looking like this.
|
21
21
|
|
22
22
|
{
|
23
|
-
ntype: 'component',
|
24
|
-
html: 'The map goes here',
|
25
|
-
|
23
|
+
ntype : 'component',
|
24
|
+
html : 'The map goes here',
|
25
|
+
header: {
|
26
26
|
text: 'Map'
|
27
|
-
}
|
27
|
+
}
|
28
28
|
}
|
29
29
|
|
30
30
|
|
@@ -33,7 +33,7 @@ to inspect it, and run methods on it.
|
|
33
33
|
Now add a new tab:
|
34
34
|
|
35
35
|
tabContainer.add({
|
36
|
-
|
36
|
+
header: {
|
37
37
|
iconCls: 'fa fa-home',
|
38
38
|
text: 'Hi there!'
|
39
39
|
},
|
@@ -103,4 +103,4 @@ and change the value.
|
|
103
103
|
Clear the console and do another _Ctrl-right-click_, then right-click on the button component logged in
|
104
104
|
the console and choose _Store object as global variable_. It'll use a value like _temp1_.
|
105
105
|
|
106
|
-
Rather than drilling-down, assign a new text value by entering `temp1.text = 'hi there'`.
|
106
|
+
Rather than drilling-down, assign a new text value by entering `temp1.text = 'hi there'`.
|
@@ -80,7 +80,7 @@ class MainContainer extends Viewport {
|
|
80
80
|
},
|
81
81
|
|
82
82
|
items: [{
|
83
|
-
|
83
|
+
header: {
|
84
84
|
iconCls: 'fa fa-home',
|
85
85
|
text: 'Tab 1'
|
86
86
|
},
|
@@ -88,7 +88,7 @@ class MainContainer extends Viewport {
|
|
88
88
|
innerHTML: 'Welcome to your new Neo App.'
|
89
89
|
}
|
90
90
|
}, {
|
91
|
-
|
91
|
+
header: {
|
92
92
|
iconCls: 'fa fa-play-circle',
|
93
93
|
text: 'Tab 2'
|
94
94
|
},
|
@@ -26,13 +26,13 @@ class MainContainer extends Viewport {
|
|
26
26
|
style: { padding: '20px' }
|
27
27
|
},
|
28
28
|
items: [{
|
29
|
-
|
29
|
+
header: {
|
30
30
|
iconCls: 'fa fa-home',
|
31
31
|
text: 'Tab 1'
|
32
32
|
},
|
33
33
|
vdom: { innerHTML: 'Welcome to your new Neo App.' }
|
34
34
|
}, {
|
35
|
-
|
35
|
+
header: {
|
36
36
|
iconCls: 'fa fa-play-circle',
|
37
37
|
text: 'Tab 2'
|
38
38
|
},
|
@@ -23,13 +23,13 @@ class MainContainer extends Viewport {
|
|
23
23
|
style: { padding: '20px' }
|
24
24
|
},
|
25
25
|
items: [{
|
26
|
-
|
26
|
+
header: {
|
27
27
|
iconCls: 'fa fa-home',
|
28
28
|
text: 'Tab 1'
|
29
29
|
},
|
30
30
|
vdom: { innerHTML: 'Welcome to your new Neo App.' }
|
31
31
|
}, {
|
32
|
-
|
32
|
+
header: {
|
33
33
|
iconCls: 'fa fa-play-circle',
|
34
34
|
text: 'Tab 2'
|
35
35
|
},
|
@@ -14,12 +14,12 @@ class Simple extends Base {
|
|
14
14
|
items: [{
|
15
15
|
module: Simple
|
16
16
|
|
17
|
-
|
17
|
+
header: {iconCls: 'fa fa-home', text: 'Simple'},
|
18
18
|
|
19
19
|
}, {
|
20
20
|
module: Simple
|
21
21
|
foo: 2, // This value is used for the instance
|
22
22
|
|
23
|
-
|
23
|
+
header: {iconCls: 'fa fa-home', text: 'Simple'},
|
24
24
|
}],
|
25
|
-
</pre>
|
25
|
+
</pre>
|
@@ -1,23 +1,23 @@
|
|
1
1
|
A tab container is a card-layout container with a tab bar and styled buttons.
|
2
2
|
Do not specify a `layout` for tab containers.
|
3
3
|
|
4
|
-
The buttons are configured via `
|
4
|
+
The buttons are configured via `header`
|
5
5
|
|
6
6
|
activeIndex: 2,
|
7
7
|
tabBarPosition: 'left', // top, right, bottom, left
|
8
8
|
itemDefaults: { module: Button },
|
9
9
|
items: [{
|
10
|
-
|
10
|
+
header: {
|
11
11
|
iconCls: 'fa fa-home',
|
12
12
|
text: 'Tab 1'
|
13
13
|
}
|
14
14
|
}, {
|
15
|
-
|
15
|
+
header: {
|
16
16
|
iconCls: 'fa fa-play-circle',
|
17
17
|
text: 'Tab 2'
|
18
18
|
}
|
19
19
|
}, {
|
20
|
-
|
20
|
+
header: {
|
21
21
|
iconCls: 'fa fa-bell',
|
22
22
|
text: 'Tab 3'
|
23
23
|
}
|
@@ -19,7 +19,7 @@ in the `afterSetBusiness()` method.
|
|
19
19
|
items: [{
|
20
20
|
module: Component,
|
21
21
|
reference: 'view',
|
22
|
-
|
22
|
+
header: {
|
23
23
|
text: 'View'
|
24
24
|
},
|
25
25
|
style: {
|
@@ -33,7 +33,7 @@ in the `afterSetBusiness()` method.
|
|
33
33
|
}
|
34
34
|
}, {
|
35
35
|
reference: 'form',
|
36
|
-
|
36
|
+
header: {
|
37
37
|
text: 'Edit'
|
38
38
|
}
|
39
39
|
}]
|
@@ -192,4 +192,4 @@ Here's one way to code it. How does this compare to your solution?
|
|
192
192
|
|
193
193
|
The view tab will become more and more complicated as we add content.
|
194
194
|
It should be refactored into its own view class to isolate that complexity.
|
195
|
-
We won't bother, but on a project that would be the right thing to do.
|
195
|
+
We won't bother, but on a project that would be the right thing to do.
|
package/src/DefaultConfig.mjs
CHANGED
@@ -262,12 +262,12 @@ const DefaultConfig = {
|
|
262
262
|
useVdomWorker: true,
|
263
263
|
/**
|
264
264
|
* buildScripts/injectPackageVersion.mjs will update this value
|
265
|
-
* @default '8.0.0-
|
265
|
+
* @default '8.0.0-beta.2'
|
266
266
|
* @memberOf! module:Neo
|
267
267
|
* @name config.version
|
268
268
|
* @type String
|
269
269
|
*/
|
270
|
-
version: '8.0.0-
|
270
|
+
version: '8.0.0-beta.2'
|
271
271
|
};
|
272
272
|
|
273
273
|
Object.assign(DefaultConfig, {
|
package/src/button/Base.mjs
CHANGED
@@ -272,11 +272,11 @@ class Base extends Component {
|
|
272
272
|
afterSetMenu(value, oldValue) {
|
273
273
|
if (value) {
|
274
274
|
import('../menu/List.mjs').then(module => {
|
275
|
-
let me
|
276
|
-
isArray
|
277
|
-
items
|
278
|
-
menuConfig
|
279
|
-
|
275
|
+
let me = this,
|
276
|
+
isArray = Array.isArray(value),
|
277
|
+
items = isArray ? value : value.items,
|
278
|
+
menuConfig = isArray ? {} : value,
|
279
|
+
stateProvider = me.getStateProvider(),
|
280
280
|
{appName, theme, windowId} = me,
|
281
281
|
|
282
282
|
config = Neo.merge({
|
@@ -295,8 +295,8 @@ class Base extends Component {
|
|
295
295
|
config.items = items
|
296
296
|
}
|
297
297
|
|
298
|
-
if (
|
299
|
-
config.
|
298
|
+
if (stateProvider) {
|
299
|
+
config.stateProvider = {parent: stateProvider}
|
300
300
|
}
|
301
301
|
|
302
302
|
me.menuList = Neo.create(config)
|
@@ -45,7 +45,7 @@ class EditEventContainer extends FormContainer {
|
|
45
45
|
*/
|
46
46
|
endTimeFieldConfig: null,
|
47
47
|
/**
|
48
|
-
* Bound to the
|
48
|
+
* Bound to the state provider.
|
49
49
|
* @member {Intl.DateTimeFormat|null} intlFormat_time=null
|
50
50
|
* @protected
|
51
51
|
*/
|
@@ -177,7 +177,7 @@ class EditEventContainer extends FormContainer {
|
|
177
177
|
|
178
178
|
store: {
|
179
179
|
module : CalendarStore,
|
180
|
-
sourceId: me.
|
180
|
+
sourceId: me.stateProvider.getStore('calendars').id
|
181
181
|
},
|
182
182
|
|
183
183
|
...me.calendarFieldConfig
|
@@ -250,7 +250,7 @@ class EditEventContainer extends FormContainer {
|
|
250
250
|
onDeleteButtonClick(data) {
|
251
251
|
let me = this;
|
252
252
|
|
253
|
-
me.
|
253
|
+
me.getStateProvider().getStore('events').remove(me.record);
|
254
254
|
me.unmount()
|
255
255
|
}
|
256
256
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import CalendarsContainer
|
2
|
-
import Container
|
3
|
-
import DateSelector
|
4
|
-
import DateUtil
|
5
|
-
import EditCalendarContainer
|
6
|
-
import EditEventContainer
|
7
|
-
import
|
8
|
-
import Toolbar
|
1
|
+
import CalendarsContainer from './calendars/Container.mjs';
|
2
|
+
import Container from '../../container/Base.mjs';
|
3
|
+
import DateSelector from '../../component/DateSelector.mjs';
|
4
|
+
import DateUtil from '../../util/Date.mjs';
|
5
|
+
import EditCalendarContainer from './calendars/EditContainer.mjs';
|
6
|
+
import EditEventContainer from './EditEventContainer.mjs';
|
7
|
+
import MainContainerStateProvider from './MainContainerStateProvider.mjs';
|
8
|
+
import Toolbar from '../../toolbar/Base.mjs';
|
9
9
|
|
10
10
|
const todayDate = new Date();
|
11
11
|
|
@@ -102,10 +102,6 @@ class MainContainer extends Container {
|
|
102
102
|
* @protected
|
103
103
|
*/
|
104
104
|
layout: {ntype: 'vbox', align: 'stretch'},
|
105
|
-
/**
|
106
|
-
* @member {Neo.calendar.view.MainContainerModel} model=MainContainerModel
|
107
|
-
*/
|
108
|
-
model: MainContainerModel,
|
109
105
|
/**
|
110
106
|
* @member {Neo.calendar.view.Component|null} monthComponent=null
|
111
107
|
*/
|
@@ -139,6 +135,10 @@ class MainContainer extends Container {
|
|
139
135
|
* @member {Number} sideBarWidth=220
|
140
136
|
*/
|
141
137
|
sideBarWidth: 220,
|
138
|
+
/**
|
139
|
+
* @member {Neo.calendar.view.MainContainerStateProvider} stateProvider=MainContainerStateProvider
|
140
|
+
*/
|
141
|
+
stateProvider: MainContainerStateProvider,
|
142
142
|
/**
|
143
143
|
* @member {Boolean} useSettingsContainer_=true
|
144
144
|
*/
|
@@ -326,12 +326,12 @@ class MainContainer extends Container {
|
|
326
326
|
let me = this;
|
327
327
|
|
328
328
|
me._editCalendarContainer = value = Neo.create({
|
329
|
-
module
|
330
|
-
appName
|
331
|
-
|
332
|
-
|
333
|
-
width
|
334
|
-
windowId: me.windowId,
|
329
|
+
module : EditCalendarContainer,
|
330
|
+
appName : me.appName,
|
331
|
+
owner : me,
|
332
|
+
stateProvider: {parent: me.getStateProvider()},
|
333
|
+
width : 250,
|
334
|
+
windowId : me.windowId,
|
335
335
|
...me.editCalendarContainerConfig
|
336
336
|
})
|
337
337
|
}
|
@@ -349,12 +349,12 @@ class MainContainer extends Container {
|
|
349
349
|
let me = this;
|
350
350
|
|
351
351
|
me._editEventContainer = value = Neo.create({
|
352
|
-
module
|
353
|
-
appName
|
354
|
-
|
355
|
-
|
356
|
-
width
|
357
|
-
windowId: me.windowId,
|
352
|
+
module : EditEventContainer,
|
353
|
+
appName : me.appName,
|
354
|
+
owner : me,
|
355
|
+
stateProvider: {parent: me.getStateProvider()},
|
356
|
+
width : 250,
|
357
|
+
windowId : me.windowId,
|
358
358
|
...me.editEventContainerConfig
|
359
359
|
})
|
360
360
|
}
|
@@ -600,7 +600,7 @@ class MainContainer extends Container {
|
|
600
600
|
* @param {String} data.value
|
601
601
|
*/
|
602
602
|
onDateSelectorChange(data) {
|
603
|
-
data.oldValue !== undefined && this.
|
603
|
+
data.oldValue !== undefined && this.setState('currentDate', new Date(`${data.value}T00:00:00.000Z`))
|
604
604
|
}
|
605
605
|
|
606
606
|
/**
|
@@ -621,7 +621,7 @@ class MainContainer extends Container {
|
|
621
621
|
* @param data
|
622
622
|
*/
|
623
623
|
onTodayButtonClick(data) {
|
624
|
-
this.
|
624
|
+
this.stateProvider.setData({
|
625
625
|
currentDate: todayDate
|
626
626
|
})
|
627
627
|
}
|
@@ -656,7 +656,7 @@ class MainContainer extends Container {
|
|
656
656
|
|
657
657
|
map[me.activeView]();
|
658
658
|
|
659
|
-
me.
|
659
|
+
me.stateProvider.setData({currentDate})
|
660
660
|
}
|
661
661
|
}
|
662
662
|
|
@@ -1,21 +1,21 @@
|
|
1
1
|
import CalendarsStore from '../store/Calendars.mjs';
|
2
2
|
import ColorsStore from '../store/Colors.mjs';
|
3
3
|
import EventsStore from '../store/Events.mjs';
|
4
|
-
import
|
4
|
+
import StateProvider from '../../../src/state/Provider.mjs';
|
5
5
|
|
6
6
|
const todayDate = new Date();
|
7
7
|
|
8
8
|
/**
|
9
|
-
* @class Neo.calendar.view.
|
10
|
-
* @extends Neo.
|
9
|
+
* @class Neo.calendar.view.MainContainerStateProvider
|
10
|
+
* @extends Neo.state.Provider
|
11
11
|
*/
|
12
|
-
class
|
12
|
+
class MainContainerStateProvider extends StateProvider {
|
13
13
|
static config = {
|
14
14
|
/**
|
15
|
-
* @member {String} className='Neo.calendar.view.
|
15
|
+
* @member {String} className='Neo.calendar.view.MainContainerStateProvider'
|
16
16
|
* @protected
|
17
17
|
*/
|
18
|
-
className: 'Neo.calendar.view.
|
18
|
+
className: 'Neo.calendar.view.MainContainerStateProvider',
|
19
19
|
/**
|
20
20
|
* @member {Object} data
|
21
21
|
*/
|
@@ -168,4 +168,4 @@ class MainContainerModel extends Component {
|
|
168
168
|
}
|
169
169
|
}
|
170
170
|
|
171
|
-
export default Neo.setupClass(
|
171
|
+
export default Neo.setupClass(MainContainerStateProvider);
|
@@ -89,44 +89,29 @@ class SettingsContainer extends Container {
|
|
89
89
|
items: [{
|
90
90
|
module: () => import('./settings/GeneralContainer.mjs'),
|
91
91
|
flag : 'general',
|
92
|
-
|
93
|
-
|
94
|
-
tabButtonConfig: {
|
95
|
-
text: 'General'
|
96
|
-
}
|
92
|
+
header: {text: 'General'},
|
93
|
+
style : {padding: '20px'}
|
97
94
|
}, {
|
98
|
-
ntype: 'component',
|
99
|
-
flag
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
tabButtonConfig: {
|
104
|
-
text: 'Day'
|
105
|
-
}
|
95
|
+
ntype : 'component',
|
96
|
+
flag : 'day',
|
97
|
+
header: {text: 'Day'},
|
98
|
+
html : 'Day',
|
99
|
+
style : {padding: '20px'}
|
106
100
|
}, {
|
107
101
|
module: () => import('./settings/WeekContainer.mjs'),
|
108
102
|
flag : 'week',
|
109
|
-
|
110
|
-
|
111
|
-
tabButtonConfig: {
|
112
|
-
text: 'Week'
|
113
|
-
}
|
103
|
+
header: {text: 'Week'},
|
104
|
+
style : {padding: '20px'}
|
114
105
|
}, {
|
115
106
|
module: () => import('./settings/MonthContainer.mjs'),
|
116
107
|
flag : 'month',
|
117
|
-
|
118
|
-
|
119
|
-
tabButtonConfig: {
|
120
|
-
text: 'Month'
|
121
|
-
}
|
108
|
+
header: {text: 'Month'},
|
109
|
+
style : {padding: '20px'}
|
122
110
|
}, {
|
123
111
|
module: () => import('./settings/YearContainer.mjs'),
|
124
112
|
flag : 'year',
|
125
|
-
|
126
|
-
|
127
|
-
tabButtonConfig: {
|
128
|
-
text: 'Year'
|
129
|
-
}
|
113
|
+
header: {text: 'Year'},
|
114
|
+
style : {padding: '20px'}
|
130
115
|
}],
|
131
116
|
|
132
117
|
listeners: {
|
@@ -44,7 +44,7 @@ class YearComponent extends Component {
|
|
44
44
|
*/
|
45
45
|
cachedUpdate: null,
|
46
46
|
/**
|
47
|
-
* Bound to the
|
47
|
+
* Bound to the state provider.
|
48
48
|
* @member {Neo.calendar.store.Calendars|null} calendarStore_=null
|
49
49
|
*/
|
50
50
|
calendarStore_: null,
|
@@ -73,7 +73,7 @@ class YearComponent extends Component {
|
|
73
73
|
*/
|
74
74
|
eventIndicatorMedium_: 2,
|
75
75
|
/**
|
76
|
-
* Bound to the
|
76
|
+
* Bound to the state provider.
|
77
77
|
* @member {Neo.calendar.store.Events|null} eventStore_=null
|
78
78
|
*/
|
79
79
|
eventStore_: null,
|
@@ -94,7 +94,7 @@ class YearComponent extends Component {
|
|
94
94
|
*/
|
95
95
|
isUpdating_: false,
|
96
96
|
/**
|
97
|
-
* Bound to the
|
97
|
+
* Bound to the state provider.
|
98
98
|
* @member {String} locale_=Neo.config.locale
|
99
99
|
*/
|
100
100
|
locale_: Neo.config.locale,
|
@@ -131,7 +131,7 @@ class YearComponent extends Component {
|
|
131
131
|
*/
|
132
132
|
showDisabledDays_: true,
|
133
133
|
/**
|
134
|
-
* Bound to the
|
134
|
+
* Bound to the state provider.
|
135
135
|
* @member {Boolean} showWeekends_=true
|
136
136
|
*/
|
137
137
|
showWeekends_: true,
|
@@ -166,7 +166,7 @@ class YearComponent extends Component {
|
|
166
166
|
]},
|
167
167
|
/**
|
168
168
|
* 0-6 => Sun-Sat
|
169
|
-
* Bound to the
|
169
|
+
* Bound to the state provider.
|
170
170
|
* @member {Number} weekStartDay_=0
|
171
171
|
*/
|
172
172
|
weekStartDay_: 0
|
@@ -21,6 +21,11 @@ class ColorsList extends List {
|
|
21
21
|
bind: {
|
22
22
|
store: 'stores.colors'
|
23
23
|
},
|
24
|
+
/**
|
25
|
+
* Set this to true in case a keyboard navigation should immediately select the focussed item
|
26
|
+
* @member {Boolean} selectOnFocus=true
|
27
|
+
*/
|
28
|
+
selectOnFocus: true,
|
24
29
|
/**
|
25
30
|
* @member {Boolean} useWrapperNode=false
|
26
31
|
*/
|