neo.mjs 6.10.10 → 6.10.11

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.
Files changed (79) hide show
  1. package/apps/ServiceWorker.mjs +2 -2
  2. package/apps/portal/view/learn/ContentTreeList.mjs +24 -12
  3. package/apps/portal/view/learn/LivePreview.mjs +28 -11
  4. package/buildScripts/createAppMinimal.mjs +391 -0
  5. package/examples/ServiceWorker.mjs +2 -2
  6. package/examples/button/base/neo-config.json +2 -1
  7. package/examples/list/chip/neo-config.json +1 -2
  8. package/package.json +72 -70
  9. package/resources/data/deck/learnneo/data/theBeatles.json +22 -0
  10. package/resources/data/deck/learnneo/p/2023-10-14T19-25-08-153Z.md +29 -20
  11. package/resources/data/deck/learnneo/p/ComponentModels.md +116 -1
  12. package/resources/data/deck/learnneo/p/Config.md +157 -0
  13. package/resources/data/deck/learnneo/p/DescribingTheUI.md +67 -1
  14. package/resources/data/deck/learnneo/p/Earthquakes.md +214 -0
  15. package/resources/data/deck/learnneo/p/Events.md +142 -1
  16. package/resources/data/deck/learnneo/p/Extending.md +116 -1
  17. package/resources/data/deck/learnneo/p/References.md +126 -0
  18. package/resources/data/deck/learnneo/p/TestLivePreview.md +28 -6
  19. package/resources/data/deck/learnneo/t.json +5 -6
  20. package/resources/data/deck/training/p/2022-12-27T21-55-30-948Z.md +1 -1
  21. package/resources/data/deck/training/p/2022-12-27T22-23-55-083Z.md +1 -1
  22. package/resources/data/deck/training/p/2022-12-29T16-00-13-223Z.md +1 -1
  23. package/resources/data/deck/training/p/2022-12-29T18-34-25-826Z.md +1 -1
  24. package/resources/data/deck/training/p/2022-12-29T18-36-56-893Z.md +1 -1
  25. package/resources/data/deck/training/p/2022-12-31T18-43-56-338Z.md +1 -1
  26. package/resources/data/deck/training/p/2022-12-31T18-51-50-682Z.md +1 -1
  27. package/resources/data/deck/training/p/2022-12-31T18-54-04-176Z.md +1 -1
  28. package/resources/data/deck/training/p/2023-01-01T17-49-18-429Z.md +1 -1
  29. package/resources/data/deck/training/p/2023-01-01T21-23-17-716Z.md +1 -1
  30. package/resources/data/deck/training/p/2023-01-06T23-21-31-685Z.md +1 -1
  31. package/resources/data/deck/training/p/2023-01-06T23-34-13-897Z.md +2 -2
  32. package/resources/data/deck/training/p/2023-01-06T23-46-36-687Z.md +1 -1
  33. package/resources/data/deck/training/p/2023-01-08T01-24-21-088Z.md +1 -1
  34. package/resources/data/deck/training/p/2023-01-08T02-11-26-333Z.md +2 -2
  35. package/resources/data/deck/training/p/2023-01-14T00-40-27-784Z.md +2 -2
  36. package/resources/data/deck/training/p/2023-07-31T00-37-21-927Z.md +2 -2
  37. package/resources/data/deck/training/p/2023-10-14T19-25-08-153Z.md +3 -3
  38. package/resources/scss/src/apps/newwebsite/Viewport.scss +32 -0
  39. package/resources/scss/src/apps/portal/learn/ContentView.scss +20 -4
  40. package/resources/scss/src/apps/portal/learn/LivePreview.scss +8 -0
  41. package/resources/scss/src/component/Base.scss +13 -4
  42. package/resources/scss/src/form/field/Select.scss +2 -5
  43. package/resources/scss/src/form/field/Text.scss +0 -1
  44. package/resources/scss/src/list/Base.scss +47 -2
  45. package/resources/scss/src/list/Chip.scss +10 -4
  46. package/resources/scss/theme-dark/list/Base.scss +11 -10
  47. package/resources/scss/theme-light/list/Base.scss +11 -10
  48. package/resources/scss/theme-neo-light/design-tokens/Components.scss +3 -0
  49. package/resources/scss/theme-neo-light/list/Base.scss +1 -0
  50. package/src/DefaultConfig.mjs +3 -3
  51. package/src/component/Base.mjs +7 -0
  52. package/src/container/Base.mjs +6 -12
  53. package/src/core/Base.mjs +5 -2
  54. package/src/data/Model.mjs +7 -0
  55. package/src/data/RecordFactory.mjs +5 -4
  56. package/src/form/field/Base.mjs +11 -0
  57. package/src/form/field/Picker.mjs +0 -1
  58. package/src/form/field/Select.mjs +208 -257
  59. package/src/form/field/Text.mjs +3 -3
  60. package/src/form/field/trigger/Base.mjs +5 -6
  61. package/src/layout/Flexbox.mjs +23 -31
  62. package/src/layout/HBox.mjs +1 -1
  63. package/src/layout/VBox.mjs +1 -1
  64. package/src/list/Base.mjs +64 -31
  65. package/src/main/DomAccess.mjs +55 -28
  66. package/src/main/DomEvents.mjs +2 -1
  67. package/src/main/DomUtils.mjs +66 -0
  68. package/src/main/addon/Navigator.mjs +332 -0
  69. package/src/manager/DomEvent.mjs +2 -1
  70. package/src/selection/ListModel.mjs +46 -82
  71. package/src/selection/Model.mjs +56 -33
  72. package/src/util/Array.mjs +5 -2
  73. package/src/util/Function.mjs +31 -0
  74. package/src/util/String.mjs +9 -0
  75. package/src/vdom/Helper.mjs +1 -2
  76. package/test/components/app.mjs +4 -3
  77. package/test/components/files/component/ChipList.mjs +125 -0
  78. package/test/components/files/form/field/Select.mjs +177 -2
  79. package/test/components/siesta.js +34 -1
@@ -1,4 +1,4 @@
1
1
  As a developer, your work is done in _neomjs-app-worker_. When you're debugging,
2
2
  choose that worker in the DevTools JavaScript context dropdown.
3
3
 
4
- <img height="400" src="resources/images/DevToolsJavaScriptContext.png">
4
+ <img height="400" src="https://s3.amazonaws.com/mjs.neo.learning.images/DevToolsJavaScriptContext.png">
@@ -18,7 +18,7 @@ From the workspace, run this command.
18
18
 
19
19
  Name the app _Starter_ and choose the default response for everything.
20
20
 
21
- <img src="resources/images/intro/NpmRunCreateApp.png"/>
21
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/intro/NpmRunCreateApp.png"/>
22
22
 
23
23
  <pre>
24
24
  </pre>
@@ -1,4 +1,4 @@
1
- <img style="float:left;margin-right:1em;" height="600" src="resources/images/intro/LookForSetters.png"/>
1
+ <img style="float:left;margin-right:1em;" height="600" src="https://s3.amazonaws.com/mjs.neo.learning.images/intro/LookForSetters.png"/>
2
2
 
3
3
  Once you find the component, expand it and scroll down until you see the grayed-out
4
4
  properties &mdash; those are the setter/getter properties.
@@ -1 +1 @@
1
- <img style="float:left;margin-right:1em;" height="600" src="resources/images/intro/ChangeText.png"/>
1
+ <img style="float:left;margin-right:1em;" height="600" src="https://s3.amazonaws.com/mjs.neo.learning.images/intro/ChangeText.png"/>
@@ -1,4 +1,4 @@
1
1
  You can run methods too. And since there's no transpiling, anything you can put in your
2
2
  code will run on the command line.
3
3
 
4
- <img height="480" src="resources/images/intro/Add.png"/>
4
+ <img height="480" src="https://s3.amazonaws.com/mjs.neo.learning.images/intro/Add.png"/>
@@ -1,3 +1,3 @@
1
1
  We can use DevTools and our debugging skills to inspect the store.
2
2
 
3
- <img height="400" src="resources/images/intro/InspectTheStore.png"/>
3
+ <img height="400" src="https://s3.amazonaws.com/mjs.neo.learning.images/intro/InspectTheStore.png"/>
@@ -1,7 +1,7 @@
1
1
  Internally, listeners are set up as a map, with event names as the key, and and array of
2
2
  function references as the value.
3
3
 
4
- <img src="resources/images/EventsInMemory.png"/>
4
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/EventsInMemory.png"/>
5
5
 
6
6
  <!--
7
7
  <table>
@@ -67,7 +67,7 @@ headers: [{
67
67
 
68
68
  When you run your app and enter a city you should see its value being logged from the main view.
69
69
 
70
- <img src="resources/images/yelp/OnCityChangeEvent.png"></pre>
70
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/yelp/OnCityChangeEvent.png"></pre>
71
71
 
72
72
  ??Fire _categoryChange_
73
73
 
@@ -44,7 +44,7 @@ Edit the main view and use the new banner:
44
44
 
45
45
  ??Get the Yelp logo
46
46
 
47
- Create the file `resources/images/yelp_logo.svg` with this content
47
+ Create the file `https://s3.amazonaws.com/mjs.neo.learning.images/yelp_logo.svg` with this content
48
48
 
49
49
  <pre class="runnable readonly text 200">
50
50
  &lt;svg width="1000" height="385" viewBox="0 0 1000 385" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -74,7 +74,7 @@ class Banner extends Base {
74
74
  height: 32,
75
75
  _vdom: {
76
76
  tag: 'img',
77
- src: '../../resources/images/yelp_logo.svg',
77
+ src: '../../https://s3.amazonaws.com/mjs.neo.learning.images/yelp_logo.svg',
78
78
  };
79
79
  }
80
80
  }
@@ -1 +1 @@
1
- <img src="resources/images/YelpAppSketch.png"></img>
1
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/YelpAppSketch.png"></img>
@@ -84,7 +84,7 @@ Then edit `MainContainerController` and in the `onTableSelect` method add this s
84
84
  Save your changes, then click on a few table rows &mdash; you should see the corresponding
85
85
  map marker become highlighted.
86
86
 
87
- <img src="resources/images/earthquakes/TableSyncsMap.png"></img>
87
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/earthquakes/TableSyncsMap.png"></img>
88
88
 
89
89
  ??To reiterate: Neo.findFirst should not be used in your app logic
90
90
 
@@ -10,11 +10,11 @@ In English there's an expression: _don't lose the forest for the trees_.
10
10
  <tr><td>&nbsp;</td></tr>
11
11
  <tr>
12
12
  <td style="text-align: center;">
13
- <img src="resources/images/MortonArboretumForest.jpg" width="400" />
13
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/MortonArboretumForest.jpg" width="400" />
14
14
  </td>
15
15
  <td>&nbsp;</td>
16
16
  <td style="text-align: center;">
17
- <img src="resources/images/MortonArboretumTrees.jpg" width="400" />
17
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/MortonArboretumTrees.jpg" width="400" />
18
18
  </td></tr>
19
19
 
20
20
  <tr><td>&nbsp;</td></tr>
@@ -26,7 +26,7 @@ Add a config _businesses_ in the `stores` config block
26
26
 
27
27
  Save and refresh then look in the debugger's Network tab. You should see the data being fetched.
28
28
 
29
- <img style="border: thin solid gray" src="resources/images/yelp/initialNetworkTraffic.png"></img>
29
+ <img style="border: thin solid gray" src="https://s3.amazonaws.com/mjs.neo.learning.images/yelp/initialNetworkTraffic.png"></img>
30
30
 
31
31
  ??Load the store procedurally
32
32
 
@@ -73,7 +73,7 @@ doFetchYelpData() {
73
73
  Test this by saving, refreshing, then changing the city a few times.
74
74
  With each city changes you should see a new call to the Yelp web service.
75
75
 
76
- <img style="border:thin solid gray" src="resources/images/yelp/CityChangesReflectedInTheFeed.png"></img>
76
+ <img style="border:thin solid gray" src="https://s3.amazonaws.com/mjs.neo.learning.images/yelp/CityChangesReflectedInTheFeed.png"></img>
77
77
 
78
78
  ??Add two fields to the store's model config
79
79
 
@@ -87,11 +87,11 @@ open a new browser window and enter (or copy-and-paste) that exact URL.
87
87
 
88
88
  Then select the "Shared workers" option on the left, then click on `inspect` by the entry for _neomjs-app-worker_.
89
89
 
90
- <img src="resources/images/debugging/ChromeDevToolsInspectWorkers.png"/>
90
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/debugging/ChromeDevToolsInspectWorkers.png"/>
91
91
 
92
92
  Clicking `inspect` opens a standard debug window, but with a single execution context.
93
93
 
94
- <img src="resources/images/debugging/ChromeDevToolsSharedWorkerContext.png"/>
94
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/debugging/ChromeDevToolsSharedWorkerContext.png"/>
95
95
 
96
96
  If you run the app and click on a map item, or a table row, you should see the
97
97
  console logs being run from your event handlers.
@@ -1,12 +1,12 @@
1
1
  If you haven't already done it, run `npx neo-app` to create a Neo.mjs workspace.
2
2
 
3
- <img src="resources/images/learn/NeoWorkspace.png" style="height: 400px;">
3
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/learn/NeoWorkspace.png" style="height: 400px;">
4
4
 
5
5
  As you can see, a Neo.mjs workspace is a conventional npm workspace. If you run
6
6
  the script `npm run server-start` from the workspace, Neo.mjs launches a web
7
7
  serve whose doc root is the workspace.
8
8
 
9
- <img src="resources/images/learn/ServerRoot.png" style="height: 400px;">
9
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/learn/ServerRoot.png" style="height: 400px;">
10
10
 
11
11
  If you drill down into the `src` directory you'll see your applications.
12
12
  The `docs` directory holds the Neo.mjs API docs. Examples are in the `examples` directory.
@@ -19,7 +19,7 @@ app. To do that, run this command from the workspace.
19
19
  At the first prompt, name the app `Foo`, and accept the default for everything else.
20
20
  The script creates an application structured as follows.
21
21
 
22
- <img src="resources/images/learn/FooFolder.png" style="height: 400px;">
22
+ <img src="https://s3.amazonaws.com/mjs.neo.learning.images/learn/FooFolder.png" style="height: 400px;">
23
23
 
24
24
  These files are part of the typical structure of a Neo.mjs application. The files `index.html`, `app.mjs`, `neo-config.json`, `view/Viewport.mjs` are rarely modified.
25
25
  You will, however, edit the main container, and its associated "controller" and "model",
@@ -0,0 +1,32 @@
1
+ .newwebsite-viewport {
2
+ align-items : center !important;
3
+ display : flex !important;
4
+ gap : 48px;
5
+ justify-content: center !important;
6
+ padding : 10% 15% 15% 15%;
7
+ }
8
+
9
+ .button-group {
10
+ display : flex !important;
11
+ flex-direction: row-reverse !important;
12
+ gap : 8px !important;
13
+ }
14
+
15
+ .neo-h1 {
16
+ font-size : 48px;
17
+ font-weight: 600;
18
+ text-align : center;
19
+ }
20
+
21
+ .vector {
22
+ background-image : url("../../../../../../resources/images/Neo_Vector.svg");
23
+ background-position: center center;
24
+ background-repeat : no-repeat;
25
+ background-size : contain;
26
+ height : 150px;
27
+ width : 100%;
28
+ }
29
+
30
+ .get-started-button {
31
+ cursor: not-allowed !important;
32
+ }
@@ -1,14 +1,14 @@
1
1
  .learn-content {
2
2
 
3
3
  background-color: white;
4
- border-radius : 8px;
5
- margin : 8px 8px 8px 0 ;
4
+ border-radius: 8px;
5
+ margin: 8px 8px 8px 0;
6
6
 
7
7
  letter-spacing: 1px;
8
8
  overflow: scroll;
9
9
  padding: 1em;
10
10
 
11
- pre[data-javascript]{
11
+ pre[data-javascript] {
12
12
  border-radius: 4px;
13
13
  padding: 12px;
14
14
  border: thin solid lightgray;
@@ -53,7 +53,7 @@
53
53
  details summary::before {
54
54
  color: #c4c4c4;
55
55
  font-family: var(--fa-style-family, "Font Awesome 6 Free");
56
- font-size: 1.3em;
56
+ font-size: 1em;
57
57
  font-weight: var(--fa-style, 900);
58
58
  margin: 0.4em 0.4em 0.4em 0;
59
59
  }
@@ -61,4 +61,20 @@
61
61
  summary::-webkit-details-marker {
62
62
  display: none;
63
63
  }
64
+
65
+ .lab {
66
+ /* Add shadows to create the "card" effect */
67
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
68
+ transition: 0.3s;
69
+ /* Add some padding inside the card container */
70
+ padding: 2px 16px;
71
+ font-size: 1em;
72
+ margin-bottom: 1em;
73
+ }
74
+
75
+ /* On mouse-over, add a deeper shadow */
76
+ .lab:hover {
77
+ box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
78
+ }
79
+
64
80
  }
@@ -0,0 +1,8 @@
1
+ .learn-live-preview {
2
+ textarea {
3
+ height: 100%;
4
+ font-family: monospace !important;
5
+ }
6
+
7
+ margin-bottom: 2em;
8
+ }
@@ -27,12 +27,17 @@
27
27
  }
28
28
 
29
29
  .neo-masked {
30
- position : relative;
30
+ font-family : inherit;
31
+ font-size : inherit;
32
+ font-weight : var(--button-text-font-weight);
33
+ position : relative;
34
+ color : var(--button-text-color);
31
35
 
32
36
  .neo-load-mask {
33
37
  position : absolute;
34
38
  inset : 0;
35
39
  background-color : inherit;
40
+ border-radius : inherit;
36
41
  z-index : 4;
37
42
  display : grid;
38
43
  justify-content : center;
@@ -40,10 +45,14 @@
40
45
  overflow : clip;
41
46
 
42
47
  .neo-load-mask-body {
43
- display : flex;
44
- flex-flow : row nowrap;
45
- gap : 0.7em;
48
+ align-items : center;
49
+ display : flex;
50
+ flex-flow : row nowrap;
51
+ gap : 0.7em;
46
52
 
53
+ .neo-loading-message {
54
+ color: inherit;
55
+ }
47
56
  .fa-spinner {
48
57
  width : 1em;
49
58
  height : 1em;
@@ -4,11 +4,8 @@
4
4
  position: relative;
5
5
 
6
6
  .neo-textfield-input, .neo-typeahead-input {
7
- height : 100% !important;
8
- left : 0;
9
- position: absolute;
10
- top : 0;
11
- width : 100% !important;
7
+ position : absolute;
8
+ inset : 0;
12
9
  }
13
10
 
14
11
  .neo-textfield-input {
@@ -231,7 +231,6 @@
231
231
  &.label-inline {
232
232
  display : block;
233
233
  font-size: 14px;
234
- height : inherit;
235
234
  position : relative;
236
235
 
237
236
  &.neo-focus {
@@ -54,16 +54,61 @@
54
54
  cursor: pointer;
55
55
 
56
56
  &:hover {
57
- background-color: var(--list-item-background-color-hover);
57
+ background-color: var(--list-item-background-color-hover) !important;
58
58
  color : var(--list-container-list-color);
59
59
  }
60
60
  &:active {
61
61
  background-color: var(--list-item-background-color-active);
62
62
  color : var(--list-container-list-color);
63
63
  }
64
+ &:active {
65
+ background-color: var(--list-item-background-color-active);
66
+ color : var(--list-container-list-color);
67
+ }
68
+ &:active {
69
+ background-color: var(--list-item-background-color-active);
70
+ color : var(--list-container-list-color);
71
+ }
72
+ &:active {
73
+ background-color: var(--list-item-background-color-active);
74
+ color : var(--list-container-list-color);
75
+ }
76
+ &:active {
77
+ background-color: var(--list-item-background-color-active);
78
+ color : var(--list-container-list-color);
79
+ }
80
+ &:active {
81
+ background-color: var(--list-item-background-color-active);
82
+ color : var(--list-container-list-color);
83
+ }
84
+ &:active {
85
+ background-color: var(--list-item-background-color-active);
86
+ color : var(--list-container-list-color);
87
+ }
88
+ &:active {
89
+ background-color: var(--list-item-background-color-active);
90
+ color : var(--list-container-list-color);
91
+ }
92
+ &:active {
93
+ background-color: var(--list-item-background-color-active);
94
+ color : var(--list-container-list-color);
95
+ }
96
+ &:active {
97
+ background-color: var(--list-item-background-color-active);
98
+ color : var(--list-container-list-color);
99
+ }
100
+ &:active {
101
+ background-color: var(--list-item-background-color-active);
102
+ color : var(--list-container-list-color);
103
+ }
104
+ }
105
+
106
+ &.neo-navigator-active-item {
107
+ outline : 1px solid var(--list-item-border-color-active);
108
+ outline-offset : -1px;
64
109
  }
65
110
 
66
- &.neo-selected {
111
+ &[aria-selected="true"] {
67
112
  background-color: var(--list-item-background-color-selected) !important;
68
113
  color : var(--list-item-color-selected) !important;
69
114
  cursor : default !important;
@@ -3,20 +3,26 @@
3
3
  overflow: auto;
4
4
 
5
5
  .neo-list-item {
6
- padding: 0;
6
+ padding : 0;
7
+ outline : 0 none !important; // TODO. Fix order so important can be removed
7
8
 
8
- &.neo-selected {
9
- background-color: inherit;
9
+ &[aria-selected="true"] {
10
+ background-color: inherit !important; // TODO. Fix order so important can be removed
10
11
  color : inherit;
12
+ outline : inherit;
11
13
 
12
14
  .neo-chip {
13
15
  background-color: var(--list-item-background-color-selected);
14
- border-color : var(--chip-border-color-focus);
15
16
  }
16
17
 
17
18
  .neo-chip-close-button {
18
19
  color: var(--chip-close-button-color-hover);
19
20
  }
20
21
  }
22
+ &.neo-navigator-active-item {
23
+ .neo-chip {
24
+ border-color : var(--list-item-border-color-active);
25
+ }
26
+ }
21
27
  }
22
28
  }
@@ -1,12 +1,13 @@
1
1
  :root .neo-theme-dark { // .neo-list-container
2
- --list-container-background-color : #33343d;
3
- --list-container-border : 1px solid #282829;
4
- --list-container-list-color : #bbb;
5
- --list-item-background-color : #33343d;
6
- --list-item-background-color-hover : #{lighten(#33343d, 10%)};
7
- --list-item-background-color-selected: #5a7082;
8
- --list-item-color-selected : #2b2b2b;
9
- --list-item-glyph-color : inherit;
10
- --list-item-highlight-search-color : #fff;
11
- --list-item-padding : 5px;
2
+ --list-container-background-color : #33343d;
3
+ --list-container-border : 1px solid #282829;
4
+ --list-container-list-color : #bbb;
5
+ --list-item-background-color : #33343d;
6
+ --list-item-background-color-hover : #{lighten(#33343d, 10%)};
7
+ --list-item-background-color-selected : #5a7082;
8
+ --list-item-color-selected : #2b2b2b;
9
+ --list-item-border-color-active : #f6d199;
10
+ --list-item-glyph-color : inherit;
11
+ --list-item-highlight-search-color : #fff;
12
+ --list-item-padding : 5px;
12
13
  }
@@ -1,12 +1,13 @@
1
1
  :root .neo-theme-light { // .neo-list-container
2
- --list-container-background-color : #fff;
3
- --list-container-border : 0;
4
- --list-container-list-color : #{lighten(#33343d, 20%)};
5
- --list-item-background-color : #fff;
6
- --list-item-background-color-hover : #{lighten(#33343d, 70%)};
7
- --list-item-background-color-selected: #{lighten(#64B5F6, 22%)};
8
- --list-item-color-selected : #2b2b2b;
9
- --list-item-glyph-color : #{lighten(#33343d, 20%)};
10
- --list-item-highlight-search-color : red;
11
- --list-item-padding : 5px;
2
+ --list-container-background-color : #fff;
3
+ --list-container-border : 0;
4
+ --list-container-list-color : #{lighten(#33343d, 20%)};
5
+ --list-item-background-color : #fff;
6
+ --list-item-background-color-hover : #{lighten(#33343d, 70%)};
7
+ --list-item-background-color-selected : #{lighten(#64B5F6, 22%)};
8
+ --list-item-color-selected : #2b2b2b;
9
+ --list-item-border-color-active : darkorange;
10
+ --list-item-glyph-color : #{lighten(#33343d, 20%)};
11
+ --list-item-highlight-search-color : red;
12
+ --list-item-padding : 5px;
12
13
  }
@@ -0,0 +1,3 @@
1
+ :root .neo-theme-neo-light {
2
+ --cmp-button-bg : blue;
3
+ }
@@ -7,6 +7,7 @@
7
7
  --list-item-background-color-active : var(--sem-color-bg-neutral-active);
8
8
  --list-item-background-color-selected: var(--sem-color-bg-primary-background);
9
9
  --list-item-color-selected : var(--sem-color-fg-neutral-contrast);
10
+ --list-item-border-color-active : #f6d199;
10
11
  --list-item-glyph-color : var(--sem-color-fg-neutral-default);
11
12
  --list-item-highlight-search-color : red;
12
13
  --list-item-padding : 5px;
@@ -131,7 +131,7 @@ const DefaultConfig = {
131
131
  * @name config.mainThreadAddons
132
132
  * @type String[]
133
133
  */
134
- mainThreadAddons: ['DragDrop', 'Stylesheet'],
134
+ mainThreadAddons: ['DragDrop', 'Stylesheet', 'Navigator'],
135
135
  /**
136
136
  * Pass the URL of a JSON-file, which contains the services and methods from your backend,
137
137
  * which you want to expose to the client.
@@ -236,12 +236,12 @@ const DefaultConfig = {
236
236
  useVdomWorker: true,
237
237
  /**
238
238
  * buildScripts/injectPackageVersion.mjs will update this value
239
- * @default '6.10.10'
239
+ * @default '6.10.11'
240
240
  * @memberOf! module:Neo
241
241
  * @name config.version
242
242
  * @type String
243
243
  */
244
- version: '6.10.10'
244
+ version: '6.10.11'
245
245
  };
246
246
 
247
247
  Object.assign(DefaultConfig, {
@@ -374,6 +374,13 @@ class Base extends CoreBase {
374
374
  return Neo.apps[this.appName] || null
375
375
  }
376
376
 
377
+ /**
378
+ * Returns true if this Component is fully visible, that is it is not hidden and has no hidden ancestors
379
+ */
380
+ get isVisible() {
381
+ return this.mounted && !this.hidden && (!this.parent || this.parent.isVisible);
382
+ }
383
+
377
384
  /**
378
385
  * Apply component based listeners
379
386
  * @member {Object} listeners={}
@@ -160,20 +160,14 @@ class Base extends Component {
160
160
  * @protected
161
161
  */
162
162
  afterSetMounted(value, oldValue) {
163
- super.afterSetMounted(value, oldValue);
164
-
165
163
  if (oldValue !== undefined) {
166
- setTimeout(() => {
167
- let items = this.items,
168
- i = 0,
169
- len = items?.length || 0;
170
-
171
- for (; i < len; i++) {
172
- if (!items[i].vdom.removeDom) {
173
- items[i].mounted = value
174
- }
164
+ super.afterSetMounted(value, oldValue);
165
+
166
+ for (let i = 0, { items } = this, { length } = items; i < length; i++) {
167
+ if (!items[i].vdom.removeDom) {
168
+ items[i].mounted = value
175
169
  }
176
- }, 1)
170
+ }
177
171
  }
178
172
  }
179
173
 
package/src/core/Base.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import {debounce, throttle} from '../util/Function.mjs';
1
+ import {debounce, throttle, buffer} from '../util/Function.mjs';
2
2
  import IdGenerator from './IdGenerator.mjs'
3
3
 
4
4
  const configSymbol = Symbol.for('configSymbol'),
@@ -192,7 +192,8 @@ class Base {
192
192
  if (value) {
193
193
  let map = {
194
194
  debounce() {me[key] = new debounce(me[key], me, value.timer)},
195
- throttle() {me[key] = new throttle(me[key], me, value.timer)}
195
+ throttle() {me[key] = new throttle(me[key], me, value.timer)},
196
+ buffer() {me[key] = new buffer(me[key], me, value.timer)}
196
197
  };
197
198
 
198
199
  map[value.type]?.()
@@ -342,8 +343,10 @@ class Base {
342
343
  initConfig(config, preventOriginalConfig) {
343
344
  let me = this;
344
345
 
346
+ me.isConfiguring = true;
345
347
  Object.assign(me[configSymbol], me.mergeConfig(config, preventOriginalConfig));
346
348
  me.processConfigs()
349
+ me.isConfiguring = false;
347
350
  }
348
351
 
349
352
  /**
@@ -38,6 +38,13 @@ class Model extends Base {
38
38
  trackModifiedFields: false
39
39
  }
40
40
 
41
+ /**
42
+ * A property set in all data records so that they are easily identifiable.
43
+ * @property {Boolean} isRecord=true
44
+ * @readonly
45
+ */
46
+ isRecord = true;
47
+
41
48
  /**
42
49
  * Finds a field config by a given field name
43
50
  * @param {String} name
@@ -56,13 +56,13 @@ class RecordFactory extends Base {
56
56
  if (model instanceof Model) {
57
57
  let className = `${this.recordNamespace}.${model.className}.${model.id}`,
58
58
  ns = Neo.ns(className),
59
- key, nsArray;
59
+ key, nsArray, cls;
60
60
 
61
61
  if (!ns) {
62
62
  nsArray = className.split('.');
63
63
  key = nsArray.pop();
64
- ns = Neo.ns(nsArray, true);
65
- ns[key] = class Record {
64
+ ns = Neo.ns(nsArray, true),
65
+ cls = ns[key] = class Record {
66
66
  constructor(config) {
67
67
  let me = this,
68
68
  properties;
@@ -151,7 +151,8 @@ class RecordFactory extends Base {
151
151
  }
152
152
  };
153
153
 
154
- ns[key].isClass = true;
154
+ Object.defineProperty(cls.prototype, 'isRecord', { value : true });
155
+ Object.defineProperty(cls, 'isClass', { vale : true });
155
156
 
156
157
  return ns[key];
157
158
  }
@@ -80,6 +80,17 @@ class Base extends Component {
80
80
  me.renderName && me.changeInputElKey('name', me.renderPath ? me.getPath() : value)
81
81
  }
82
82
 
83
+ /**
84
+ * Triggered after the role config got changed
85
+ * @param {String|null} value
86
+ * @param {String|null} oldValue
87
+ * @protected
88
+ */
89
+ afterSetRole(value, oldValue) {
90
+ this.getInputEl().role = value;
91
+ this.update();
92
+ }
93
+
83
94
  /**
84
95
  * Triggered after the value config got changed
85
96
  * @param {*} value
@@ -153,7 +153,6 @@ class Picker extends Text {
153
153
  items : pickerComponent ? [pickerComponent] : [],
154
154
  maxHeight: me.pickerMaxHeight,
155
155
  theme : me.theme,
156
- vdom : {cn: [], 'aria-activedescendant': me.id, tabIndex: -1},
157
156
  width : pickerWidth,
158
157
  ...me.pickerConfig,
159
158