neo.mjs 6.14.0 → 6.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/apps/ServiceWorker.mjs +2 -2
  2. package/apps/covid/view/HeaderContainer.mjs +2 -2
  3. package/apps/form/view/pages/Page10.mjs +2 -2
  4. package/apps/portal/view/learn/MainContainerController.mjs +33 -26
  5. package/apps/sharedcovid/view/HeaderContainer.mjs +2 -2
  6. package/apps/website/neo-config.json +1 -1
  7. package/docs/app/view/classdetails/MembersList.mjs +1 -0
  8. package/docs/app/view/classdetails/SourceViewComponent.mjs +1 -1
  9. package/docs/resources/highlightjs-custom-dark-theme.css +2 -2
  10. package/docs/resources/highlightjs-custom-github-theme.css +2 -2
  11. package/examples/ServiceWorker.mjs +2 -2
  12. package/examples/button/base/MainContainer.mjs +2 -2
  13. package/examples/button/split/MainContainer.mjs +2 -2
  14. package/examples/component/process/MainContainer.mjs +3 -3
  15. package/examples/component/process/realWorldExample/MainContainer.mjs +15 -15
  16. package/examples/component/toast/MainContainer.mjs +4 -4
  17. package/examples/dialog/DemoDialog.mjs +4 -4
  18. package/examples/fieldWithPrefix/MainContainer.mjs +4 -5
  19. package/examples/form/field/{select → combobox}/MainContainer.mjs +6 -9
  20. package/examples/form/field/{select → combobox}/MainModel.mjs +4 -4
  21. package/examples/form/field/{select → combobox}/MainStore.mjs +2 -2
  22. package/examples/form/field/{select → combobox}/app.mjs +1 -1
  23. package/examples/form/field/{select → combobox}/index.html +1 -1
  24. package/examples/form/field/{select → combobox}/neo-config.json +1 -1
  25. package/examples/tableFiltering/MainContainer.mjs +2 -2
  26. package/package.json +2 -2
  27. package/resources/scss/src/form/field/{Select.scss → ComboBox.scss} +8 -8
  28. package/resources/scss/theme-dark/form/field/ComboBox.scss +9 -0
  29. package/resources/scss/theme-light/form/field/ComboBox.scss +9 -0
  30. package/resources/scss/theme-neo-light/Global.scss +0 -19
  31. package/resources/scss/theme-neo-light/component/Splitter.scss +18 -1
  32. package/resources/scss/theme-neo-light/form/field/ComboBox.scss +9 -0
  33. package/src/DefaultConfig.mjs +2 -2
  34. package/src/container/Viewport.mjs +5 -2
  35. package/src/form/field/Chip.mjs +3 -3
  36. package/src/form/field/Color.mjs +3 -3
  37. package/src/form/field/{Select.mjs → ComboBox.mjs} +15 -15
  38. package/src/form/field/Country.mjs +3 -3
  39. package/src/form/field/_export.mjs +2 -2
  40. package/src/main/DomEvents.mjs +1 -1
  41. package/src/toolbar/Paging.mjs +2 -2
  42. package/src/worker/Base.mjs +8 -6
  43. package/test/components/app.mjs +1 -1
  44. package/test/components/files/form/field/{Select.mjs → ComboBox.mjs} +3 -3
  45. package/test/components/siesta.js +1 -1
  46. package/resources/scss/theme-dark/form/field/Select.scss +0 -9
  47. package/resources/scss/theme-light/form/field/Select.scss +0 -9
  48. package/resources/scss/theme-neo-light/form/field/Select.scss +0 -9
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='6.12.1'
23
+ * @member {String} version='6.15.1'
24
24
  */
25
- version: '6.12.1'
25
+ version: '6.15.1'
26
26
  }
27
27
 
28
28
  /**
@@ -1,6 +1,6 @@
1
+ import ComboBox from '../../../src/form/field/ComboBox.mjs';
1
2
  import Container from '../../../src/container/Base.mjs';
2
3
  import CountryStore from '../store/Countries.mjs';
3
- import SelectField from '../../../src/form/field/Select.mjs';
4
4
 
5
5
  /**
6
6
  * @class Covid.view.HeaderContainer
@@ -116,7 +116,7 @@ class HeaderContainer extends Container {
116
116
  },
117
117
 
118
118
  items : [{
119
- module : SelectField,
119
+ module : ComboBox,
120
120
  displayField : 'country',
121
121
  flex : 'none',
122
122
  height : 25,
@@ -1,5 +1,5 @@
1
+ import ComboBox from '../../../../src/form/field/ComboBox.mjs';
1
2
  import FormPageContainer from '../FormPageContainer.mjs';
2
- import SelectField from '../../../../src/form/field/Select.mjs';
3
3
 
4
4
  /**
5
5
  * @class Form.view.pages.Page10
@@ -16,7 +16,7 @@ class Page10 extends FormPageContainer {
16
16
  * @member {Object[]} items
17
17
  */
18
18
  items: [{
19
- module : SelectField,
19
+ module : ComboBox,
20
20
  editable : false,
21
21
  labelText: 'Page 10 Field 1',
22
22
  name : 'page10field1',
@@ -67,12 +67,13 @@ class MainContainerController extends Controller {
67
67
  /**
68
68
  * @param {Object} data
69
69
  * @param {String} data.appName
70
+ * @param {Number} data.windowId
70
71
  */
71
- async onAppConnect(data) {
72
+ async onAppConnect(data) {console.log(data);
72
73
  let me = this,
73
74
  app = Neo.apps[data.appName],
74
75
  mainView = app.mainView,
75
- windowId = mainView.windowId,
76
+ {windowId} = data,
76
77
  searchString = await Neo.Main.getByPath({path: 'location.search', windowId}),
77
78
  livePreviewId = me.decodeUri(searchString.substring(1)).id,
78
79
  livePreview = Neo.getComponent(livePreviewId),
@@ -91,32 +92,38 @@ class MainContainerController extends Controller {
91
92
  /**
92
93
  * @param {Object} data
93
94
  * @param {String} data.appName
95
+ * @param {Number} data.windowId
94
96
  */
95
97
  async onAppDisconnect(data) {
96
- let me = this,
97
- app = Neo.apps[data.appName],
98
- mainView = app.mainView,
99
- windowId = mainView.windowId,
100
- searchString = await Neo.Main.getByPath({path: 'location.search', windowId}),
101
- livePreviewId = me.decodeUri(searchString.substring(1)).id,
102
- livePreview = Neo.getComponent(livePreviewId),
103
- sourceContainer = livePreview.getReference('preview'),
104
- tabContainer = livePreview.tabContainer,
105
- sourceView = mainView.removeAt(0, false);
106
-
107
- console.log(data, me.connectedApps);
108
-
109
- livePreview.previewContainer = null;
110
- sourceContainer.add(sourceView);
111
-
112
- tabContainer.activeIndex = 1; // switch to the source view
113
-
114
- livePreview.getReference('popout-window-button').disabled = false;
115
- tabContainer.getTabAtIndex(1).disabled = false;
116
-
117
- /*Neo.Main.windowClose({
118
- names: me.connectedApps
119
- })*/
98
+ let me = this,
99
+ {appName, windowId} = data,
100
+ app = Neo.apps[appName],
101
+ mainView = app.mainView;
102
+
103
+ // Closing a code preview window needs to drop the preview back into the related main app
104
+ if (appName !== 'Portal') {
105
+ let searchString = await Neo.Main.getByPath({path: 'location.search', windowId}),
106
+ livePreviewId = me.decodeUri(searchString.substring(1)).id,
107
+ livePreview = Neo.getComponent(livePreviewId),
108
+ sourceContainer = livePreview.getReference('preview'),
109
+ tabContainer = livePreview.tabContainer,
110
+ sourceView = mainView.removeAt(0, false);
111
+
112
+ livePreview.previewContainer = null;
113
+ sourceContainer.add(sourceView);
114
+
115
+ tabContainer.activeIndex = 1; // switch to the source view
116
+
117
+ livePreview.getReference('popout-window-button').disabled = false;
118
+ tabContainer.getTabAtIndex(1).disabled = false
119
+ }
120
+ // Close popup windows when closing or reloading the main window
121
+ else {
122
+ Neo.Main.windowClose({
123
+ names: me.connectedApps,
124
+ windowId
125
+ })
126
+ }
120
127
  }
121
128
 
122
129
  /**
@@ -1,6 +1,6 @@
1
+ import ComboBox from '../../../src/form/field/ComboBox.mjs';
1
2
  import Container from '../../../src/container/Base.mjs';
2
3
  import CountryStore from '../store/Countries.mjs';
3
- import SelectField from '../../../src/form/field/Select.mjs';
4
4
 
5
5
  /**
6
6
  * @class SharedCovid.view.HeaderContainer
@@ -124,7 +124,7 @@ class HeaderContainer extends Container {
124
124
  },
125
125
 
126
126
  items : [{
127
- module : SelectField,
127
+ module : ComboBox,
128
128
  displayField : 'country',
129
129
  flex : 'none',
130
130
  height : 25,
@@ -3,5 +3,5 @@
3
3
  "basePath" : "../../",
4
4
  "environment" : "development",
5
5
  "mainPath" : "./Main.mjs",
6
- "mainThreadAddons": ["DragDrop", "Stylesheet"]
6
+ "mainThreadAddons": ["DragDrop", "Navigator", "Stylesheet"]
7
7
  }
@@ -306,6 +306,7 @@ class MembersList extends Base {
306
306
  item.examples.forEach(example => {
307
307
  itemConfig.cn.push({
308
308
  tag: 'pre',
309
+ cls: ['hljs'],
309
310
  cn : [{
310
311
  tag : 'code',
311
312
  html: example
@@ -47,7 +47,7 @@ class SourceViewComponent extends Component {
47
47
  */
48
48
  _vdom:
49
49
  {cn: [
50
- {tag: 'pre', cn: [
50
+ {tag: 'pre', cls: ['hljs'], cn: [
51
51
  {tag: 'code', class: 'language-javascript'}
52
52
  ]}
53
53
  ]}
@@ -17,7 +17,7 @@ code,
17
17
  display : block;
18
18
  font-size : 12px;
19
19
  overflow-x: auto;
20
- padding : 0.5em;
20
+ padding : 0;
21
21
  }
22
22
 
23
23
  .hljs,
@@ -117,4 +117,4 @@ code,
117
117
 
118
118
  .neo-highlighted-line {
119
119
  background-color: #3c3f41 !important;
120
- }
120
+ }
@@ -14,7 +14,7 @@ pre.hljs {
14
14
  display : block;
15
15
  font-size : 12px;
16
16
  overflow-x: auto;
17
- padding : 0.5em;
17
+ padding : 0;
18
18
  }
19
19
 
20
20
  .hljs-comment,
@@ -133,4 +133,4 @@ pre.hljs {
133
133
 
134
134
  .neo-highlighted-line {
135
135
  background-color: #cee8fc !important;
136
- }
136
+ }
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='6.12.1'
23
+ * @member {String} version='6.15.1'
24
24
  */
25
- version: '6.12.1'
25
+ version: '6.15.1'
26
26
  }
27
27
 
28
28
  /**
@@ -1,9 +1,9 @@
1
1
  import Button from '../../../src/button/Base.mjs';
2
2
  import CheckBox from '../../../src/form/field/CheckBox.mjs';
3
+ import ComboBox from '../../../src/form/field/ComboBox.mjs';
3
4
  import ConfigurationViewport from '../../ConfigurationViewport.mjs';
4
5
  import NumberField from '../../../src/form/field/Number.mjs';
5
6
  import Radio from '../../../src/form/field/Radio.mjs';
6
- import SelectField from '../../../src/form/field/Select.mjs';
7
7
  import TextField from '../../../src/form/field/Text.mjs';
8
8
 
9
9
  /**
@@ -137,7 +137,7 @@ class MainContainer extends ConfigurationViewport {
137
137
  style : {marginTop: '10px'},
138
138
  value : me.exampleComponent.text
139
139
  }, {
140
- module : SelectField,
140
+ module : ComboBox,
141
141
  forceSelection: true,
142
142
  labelText : 'ui',
143
143
  listeners : {change: me.onConfigChange.bind(me, 'ui')},
@@ -1,8 +1,8 @@
1
1
  import CheckBox from '../../../src/form/field/CheckBox.mjs';
2
+ import ComboBox from '../../../src/form/field/ComboBox.mjs';
2
3
  import ConfigurationViewport from '../../ConfigurationViewport.mjs';
3
4
  import Radio from '../../../src/form/field/Radio.mjs';
4
5
  import NumberField from '../../../src/form/field/Number.mjs';
5
- import SelectField from '../../../src/form/field/Select.mjs';
6
6
  import SplitButton from '../../../src/button/Split.mjs';
7
7
  import TextField from '../../../src/form/field/Text.mjs';
8
8
 
@@ -89,7 +89,7 @@ class MainContainer extends ConfigurationViewport {
89
89
  style : {marginTop: '10px'},
90
90
  value : me.exampleComponent.text
91
91
  }, {
92
- module : SelectField,
92
+ module : ComboBox,
93
93
  forceSelection: true,
94
94
  labelText : 'ui',
95
95
  listeners : {change: me.onConfigChange.bind(me, 'ui')},
@@ -1,8 +1,8 @@
1
+ import CheckBox from '../../../src/form/field/CheckBox.mjs';
2
+ import ColorField from '../../../src/form/field/Color.mjs';
1
3
  import ConfigurationViewport from '../../ConfigurationViewport.mjs';
2
- import Process from '../../../src/component/Process.mjs';
3
4
  import Container from '../../../src/container/Base.mjs';
4
- import CheckBox from "../../../src/form/field/CheckBox.mjs";
5
- import ColorField from "../../../src/form/field/Color.mjs"
5
+ import Process from '../../../src/component/Process.mjs';
6
6
 
7
7
  /**
8
8
  * @class Neo.examples.component.process.MainContainer
@@ -1,15 +1,15 @@
1
- import Button from "../../../../src/button/Base.mjs";
2
- import CheckBox from "../../../../src/form/field/CheckBox.mjs";
1
+ import Button from '../../../../src/button/Base.mjs';
2
+ import CheckBox from '../../../../src/form/field/CheckBox.mjs';
3
3
  import ConfigurationViewport from '../../../ConfigurationViewport.mjs';
4
+ import ComboBox from '../../../../src/form/field/ComboBox.mjs';
4
5
  import Component from '../../../../src/component/Base.mjs';
5
6
  import Container from '../../../../src/container/Base.mjs';
6
- import DisplayField from "../../../../src/form/field/Display.mjs"
7
- import Form from "../../../../src/form/Container.mjs"
8
- import NumberField from "../../../../src/form/field/Number.mjs"
7
+ import DisplayField from '../../../../src/form/field/Display.mjs';
8
+ import Form from '../../../../src/form/Container.mjs';
9
+ import NumberField from '../../../../src/form/field/Number.mjs';
9
10
  import Process from '../../../../src/component/Process.mjs';
10
- import RangeField from "../../../../src/form/field/Range.mjs"
11
- import SelectField from "../../../../src/form/field/Select.mjs";
12
- import TextField from "../../../../src/form/field/Text.mjs"
11
+ import RangeField from '../../../../src/form/field/Range.mjs';
12
+ import TextField from '../../../../src/form/field/Text.mjs';
13
13
  import Toast from '../../../../src/component/Toast.mjs';
14
14
 
15
15
  /**
@@ -188,22 +188,22 @@ class MainContainer extends ConfigurationViewport {
188
188
  value : 20
189
189
  },
190
190
  items : [{
191
- module : SelectField,
191
+ module : ComboBox,
192
192
  displayField: 'name',
193
193
  labelText : 'Fahrstil',
194
194
  value : 'normal',
195
195
 
196
196
  store: {
197
197
  data : [
198
- {style: 'sportStyle', name: 'sport', code: 'sportCode'},
199
- {style: 'nomalStyle', name: 'normal', code: 'normalCode'},
200
- {style: 'ecoStyle', name: 'eco', code: 'ecoCode'},
198
+ {style: 'sportStyle', name: 'sport', code: 'sportCode'},
199
+ {style: 'normalStyle', name: 'normal', code: 'normalCode'},
200
+ {style: 'ecoStyle', name: 'eco', code: 'ecoCode'},
201
201
  ],
202
202
  model: {
203
203
  fields: [
204
- {name: 'style', type: 'string'},
205
- {name: 'name', type: 'string'},
206
- {name: 'code', type: 'string'}
204
+ {name: 'style', type: 'String'},
205
+ {name: 'name', type: 'String'},
206
+ {name: 'code', type: 'String'}
207
207
  ]
208
208
  }
209
209
  }
@@ -1,10 +1,10 @@
1
1
  import Button from '../../../src/button/Base.mjs';
2
2
  import CheckBox from '../../../src/form/field/CheckBox.mjs';
3
+ import ComboBox from '../../../src/form/field/ComboBox.mjs';
3
4
  import Component from '../../../src/component/Base.mjs';
4
5
  import FormContainer from '../../../src/form/Container.mjs';
5
6
  import MainContainerController from './MainContainerController.mjs';
6
7
  import NumberField from '../../../src/form/field/Number.mjs';
7
- import SelectField from '../../../src/form/field/Select.mjs';
8
8
  import TextField from '../../../src/form/field/Text.mjs';
9
9
  import Viewport from '../../../src/container/Viewport.mjs';
10
10
 
@@ -51,19 +51,19 @@ class MainContainer extends Viewport {
51
51
  labelText: 'iconCls',
52
52
  name : 'iconCls'
53
53
  }, {
54
- module : SelectField,
54
+ module : ComboBox,
55
55
  labelText : 'position = tr',
56
56
  name : 'position',
57
57
  store : {data: [{name: 'tl'}, {name: 'tc'}, {name: 'tr'}, {name: 'bl'}, {name: 'bc'}, {name: 'br'}]},
58
58
  valueField: 'name'
59
59
  }, {
60
- module : SelectField,
60
+ module : ComboBox,
61
61
  labelText: 'slideDirection = right',
62
62
  name : 'slideDirection',
63
63
  store : {data: [{name: 'down'}, {name: 'up'}, {name: 'left'}, {name: 'right'}]},
64
64
  valueField: 'name'
65
65
  }, {
66
- module : SelectField,
66
+ module : ComboBox,
67
67
  labelText: 'ui = info',
68
68
  name : 'ui',
69
69
  store : {data: [{name: 'info'}, {name: 'danger'}, {name: 'success'}]},
@@ -1,6 +1,6 @@
1
- import Button from '../../src/button/Base.mjs';
2
- import Dialog from '../../src/dialog/Base.mjs';
3
- import SelectField from '../../src/form/field/Select.mjs';
1
+ import Button from '../../src/button/Base.mjs';
2
+ import ComboBox from '../../src/form/field/ComboBox.mjs';
3
+ import Dialog from '../../src/dialog/Base.mjs';
4
4
 
5
5
  /**
6
6
  * @class Neo.examples.dialog.DemoDialog
@@ -57,7 +57,7 @@ class DemoDialog extends Dialog {
57
57
  const me = this;
58
58
 
59
59
  me.items = [{
60
- module : SelectField,
60
+ module : ComboBox,
61
61
  labelText : 'Select',
62
62
  labelWidth: 80,
63
63
 
@@ -1,8 +1,7 @@
1
+ import ComboBox from '../../src/form/field/ComboBox.mjs';
1
2
  import ConfigurationViewport from '../ConfigurationViewport.mjs';
2
-
3
- import PrefixPlugin from '../../src/plugin/PrefixField.mjs';
4
- import SelectField from '../../src/form/field/Select.mjs';
5
- import TextField from '../../src/form/field/Text.mjs';
3
+ import PrefixPlugin from '../../src/plugin/PrefixField.mjs';
4
+ import TextField from '../../src/form/field/Text.mjs';
6
5
 
7
6
  /**
8
7
  * @class Neo.examples.fieldWithPrefix.MainContainer
@@ -50,7 +49,7 @@ class MainContainer extends ConfigurationViewport {
50
49
  value : '_',
51
50
  style : {marginTop: '10px'}
52
51
  }, {
53
- module: SelectField,
52
+ module: ComboBox,
54
53
  store : {
55
54
  model: {fields: [{name: 'id'}, {name: 'name'}, {name: 'value'}]},
56
55
  data : [
@@ -1,19 +1,18 @@
1
1
  import CheckBox from '../../../../src/form/field/CheckBox.mjs';
2
+ import ComboBox from '../../../../src/form/field/ComboBox.mjs';
2
3
  import ConfigurationViewport from '../../../ConfigurationViewport.mjs';
3
4
  import MainStore from './MainStore.mjs';
4
5
  import NumberField from '../../../../src/form/field/Number.mjs';
5
- import SelectField from '../../../../src/form/field/Select.mjs';
6
6
  import Radio from '../../../../src/form/field/Radio.mjs';
7
7
  import TextField from '../../../../src/form/field/Text.mjs';
8
8
 
9
9
  /**
10
- * @class Neo.examples.form.field.select.MainContainer
10
+ * @class Neo.examples.form.field.combobox.MainContainer
11
11
  * @extends Neo.examples.ConfigurationViewport
12
12
  */
13
13
  class MainContainer extends ConfigurationViewport {
14
14
  static config = {
15
- className : 'Neo.examples.form.field.select.MainContainer',
16
- autoMount : true,
15
+ className : 'Neo.examples.form.field.combobox.MainContainer',
17
16
  configItemLabelWidth : 160,
18
17
  exampleContainerConfig: {style: {position: 'relative'}}
19
18
  }
@@ -160,17 +159,15 @@ class MainContainer extends ConfigurationViewport {
160
159
 
161
160
  createExampleComponent() {
162
161
  return Neo.create({
163
- module : SelectField,
162
+ module : ComboBox,
164
163
  labelPosition: 'inline',
165
164
  labelText : 'US States',
166
165
  labelWidth : 80,
166
+ pickerConfig : {minHeight : '6em'},
167
167
  store : MainStore,
168
168
  value : 'AZ',
169
169
  valueField : 'abbreviation',
170
- width : '50%',
171
- pickerConfig : {
172
- minHeight : '6em'
173
- }
170
+ width : '50%'
174
171
  })
175
172
  }
176
173
  }
@@ -1,20 +1,20 @@
1
1
  import Model from '../../../../src/data/Model.mjs';
2
2
 
3
3
  /**
4
- * @class Neo.examples.form.field.select.MainModel
4
+ * @class Neo.examples.form.field.combobox.MainModel
5
5
  * @extends Neo.data.Model
6
6
  */
7
7
  class MainModel extends Model {
8
8
  static config = {
9
- className : 'Neo.examples.form.field.select.MainModel',
9
+ className : 'Neo.examples.form.field.combobox.MainModel',
10
10
  keyProperty: 'abbreviation',
11
11
 
12
12
  fields: [{
13
13
  name: 'abbreviation',
14
- type: 'string'
14
+ type: 'String'
15
15
  }, {
16
16
  name: 'name',
17
- type: 'string'
17
+ type: 'String'
18
18
  }]
19
19
  }
20
20
  }
@@ -2,12 +2,12 @@ import Store from '../../../../src/data/Store.mjs';
2
2
  import Model from './MainModel.mjs';
3
3
 
4
4
  /**
5
- * @class Neo.examples.form.field.select.MainStore
5
+ * @class Neo.examples.form.field.combobox.MainStore
6
6
  * @extends Neo.data.Store
7
7
  */
8
8
  class MainStore extends Store {
9
9
  static config = {
10
- className : 'Neo.examples.form.field.select.MainStore',
10
+ className : 'Neo.examples.form.field.combobox.MainStore',
11
11
  autoLoad : true,
12
12
  keyProperty: 'abbreviation',
13
13
  model : Model,
@@ -2,5 +2,5 @@ import MainContainer from './MainContainer.mjs';
2
2
 
3
3
  export const onStart = () => Neo.app({
4
4
  mainView: MainContainer,
5
- name : 'Neo.examples.form.field.select'
5
+ name : 'Neo.examples.form.field.combobox'
6
6
  });
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1">
5
5
  <meta charset="UTF-8">
6
- <title>Neo SelectField</title>
6
+ <title>Neo ComboBox</title>
7
7
  </head>
8
8
  <body>
9
9
  <script src="../../../../src/MicroLoader.mjs" type="module"></script>
@@ -1,5 +1,5 @@
1
1
  {
2
- "appPath" : "examples/form/field/select/app.mjs",
2
+ "appPath" : "examples/form/field/combobox/app.mjs",
3
3
  "basePath" : "../../../../",
4
4
  "environment": "development",
5
5
  "mainPath" : "./Main.mjs"
@@ -1,11 +1,11 @@
1
1
  import BooleanContainer from '../../src/filter/BooleanContainer.mjs';
2
2
  import CellModel from '../../src/selection/table/CellModel.mjs';
3
3
  import CheckBox from '../../src/form/field/CheckBox.mjs';
4
+ import ComboBox from '../../src/form/field/ComboBox.mjs';
4
5
  import DateContainer from '../../src/filter/DateContainer.mjs';
5
6
  import DateUtil from '../../src/util/Date.mjs';
6
7
  import MainStore from './MainStore.mjs';
7
8
  import NumberContainer from '../../src/filter/NumberContainer.mjs';
8
- import SelectField from '../../src/form/field/Select.mjs';
9
9
  import TableContainer from '../../src/table/Container.mjs';
10
10
  import Viewport from '../../src/container/Viewport.mjs';
11
11
 
@@ -64,7 +64,7 @@ class MainContainer extends Viewport {
64
64
  text : 'Country',
65
65
 
66
66
  editorConfig: {
67
- module: SelectField,
67
+ module: ComboBox,
68
68
 
69
69
  store: {
70
70
  autoLoad : true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "neo.mjs",
4
- "version": "6.14.0",
4
+ "version": "6.15.1",
5
5
  "description": "The webworkers driven UI framework",
6
6
  "type": "module",
7
7
  "repository": {
@@ -58,7 +58,7 @@
58
58
  "monaco-editor": "^0.47.0",
59
59
  "neo-jsdoc": "1.0.1",
60
60
  "neo-jsdoc-x": "1.0.5",
61
- "postcss": "^8.4.35",
61
+ "postcss": "^8.4.37",
62
62
  "sass": "^1.72.0",
63
63
  "siesta-lite": "5.5.2",
64
64
  "url": "^0.11.3",
@@ -1,4 +1,4 @@
1
- .neo-selectfield {
1
+ .neo-combobox {
2
2
  .neo-input-field-wrapper {
3
3
  flex : 1 1 30px;
4
4
  position: relative;
@@ -14,9 +14,9 @@
14
14
 
15
15
  .neo-typeahead-input {
16
16
  border-color: transparent;
17
- color : var(--selectfield-input-hint-color);
17
+ color : var(--combobox-input-hint-color);
18
18
  font : var(--textfield-input-font);
19
- opacity : var(--selectfield-input-hint-opacity);
19
+ opacity : var(--combobox-input-hint-opacity);
20
20
  }
21
21
  }
22
22
 
@@ -26,20 +26,20 @@
26
26
  text-align: left;
27
27
 
28
28
  .neo-highlight-search {
29
- background-color: var(--selectfield-list-search-background-color);
30
- color : var(--selectfield-list-search-color) !important;
29
+ background-color: var(--combobox-list-search-background-color);
30
+ color : var(--combobox-list-search-color) !important;
31
31
  }
32
32
 
33
33
  .neo-selected {
34
34
  .neo-highlight-search {
35
- color: var(--selectfield-list-search-color-selected) !important;
35
+ color: var(--combobox-list-search-color-selected) !important;
36
36
  }
37
37
  }
38
38
  }
39
39
 
40
40
  .neo-picker-container {
41
- border : var(--selectfield-picker-container-border);
42
- border-radius: var(--selectfield-picker-container-border-radius);
41
+ border : var(--combobox-picker-container-border);
42
+ border-radius: var(--combobox-picker-container-border-radius);
43
43
  font-weight : 400;
44
44
  }
45
45
  }
@@ -0,0 +1,9 @@
1
+ :root .neo-theme-dark { // .neo-combobox
2
+ --combobox-input-hint-color : #bbb;
3
+ --combobox-input-hint-opacity : 0.6;
4
+ --combobox-list-search-background-color : inherit;
5
+ --combobox-list-search-color : #fff;
6
+ --combobox-list-search-color-selected : #000;
7
+ --combobox-picker-container-border : 1px solid #bbb;
8
+ --combobox-picker-container-border-radius: 0;
9
+ }
@@ -0,0 +1,9 @@
1
+ :root .neo-theme-light { // .neo-combobox
2
+ --combobox-input-hint-color : #333;
3
+ --combobox-input-hint-opacity : 0.6;
4
+ --combobox-list-search-background-color : inherit;
5
+ --combobox-list-search-color : red;
6
+ --combobox-list-search-color-selected : red;
7
+ --combobox-picker-container-border : 1px solid #1c60a0;
8
+ --combobox-picker-container-border-radius: 3px;
9
+ }
@@ -56,22 +56,3 @@ mark {
56
56
  color : black;
57
57
  padding : 0.1em 0.2em;
58
58
  }
59
-
60
-
61
-
62
- .neo-splitter {
63
- opacity: 1;
64
- margin: 8px 2px;
65
- border-radius: 100px;
66
- border: unset !important;
67
-
68
- &:hover, &:active {
69
- background-color: #5595F5 !important;
70
- }
71
- }
72
-
73
- .neo-dragproxy {
74
- &.neo-splitter {
75
- background-color: #5595F5 !important;
76
- }
77
- }
@@ -1,5 +1,22 @@
1
1
  :root .neo-theme-neo-light { // .neo-splitter
2
2
  --splitter-background-color: #f2f2f2;
3
3
  --splitter-border : 1px solid #ddd;
4
- --splitter-hover-color : #5d83a7
4
+ --splitter-hover-color : #5d83a7;
5
+
6
+ .neo-splitter {
7
+ opacity: 1;
8
+ margin: 8px 2px;
9
+ border-radius: 100px;
10
+ border: unset !important;
11
+
12
+ &:hover, &:active {
13
+ background-color: #5595F5 !important;
14
+ }
15
+ }
16
+
17
+ .neo-dragproxy {
18
+ &.neo-splitter {
19
+ background-color: #5595F5 !important;
20
+ }
21
+ }
5
22
  }
@@ -0,0 +1,9 @@
1
+ :root .neo-theme-neo-light { // .neo-combobox
2
+ --combobox-input-hint-color : #333;
3
+ --combobox-input-hint-opacity : 0.6;
4
+ --combobox-list-search-background-color : inherit;
5
+ --combobox-list-search-color : red;
6
+ --combobox-list-search-color-selected : red;
7
+ --combobox-picker-container-border : 1px solid #1c60a0;
8
+ --combobox-picker-container-border-radius: 3px;
9
+ }
@@ -260,12 +260,12 @@ const DefaultConfig = {
260
260
  useVdomWorker: true,
261
261
  /**
262
262
  * buildScripts/injectPackageVersion.mjs will update this value
263
- * @default '6.12.1'
263
+ * @default '6.15.1'
264
264
  * @memberOf! module:Neo
265
265
  * @name config.version
266
266
  * @type String
267
267
  */
268
- version: '6.12.1'
268
+ version: '6.15.1'
269
269
  };
270
270
 
271
271
  Object.assign(DefaultConfig, {
@@ -39,9 +39,12 @@ class Viewport extends Container {
39
39
  onConstructed() {
40
40
  super.onConstructed();
41
41
 
42
+ let {appName, windowId} = this;
43
+
42
44
  this.applyBodyCls && Neo.main.DomAccess.applyBodyCls({
43
- appName: this.appName,
44
- cls : ['neo-body-viewport']
45
+ appName,
46
+ cls: ['neo-body-viewport'],
47
+ windowId
45
48
  })
46
49
  }
47
50
  }
@@ -1,10 +1,10 @@
1
- import Select from './Select.mjs';
1
+ import ComboBox from './ComboBox.mjs';
2
2
 
3
3
  /**
4
4
  * @class Neo.form.field.Chip
5
- * @extends Neo.form.field.Select
5
+ * @extends Neo.form.field.ComboBox
6
6
  */
7
- class Chip extends Select {
7
+ class Chip extends ComboBox {
8
8
  static config = {
9
9
  /**
10
10
  * @member {String} className='Neo.form.field.Chip'
@@ -1,12 +1,12 @@
1
1
  import ColorList from '../../list/Color.mjs'
2
- import Select from './Select.mjs';
2
+ import ComboBox from './ComboBox.mjs';
3
3
  import VDomUtil from '../../util/VDom.mjs';
4
4
 
5
5
  /**
6
6
  * @class Neo.form.field.Color
7
- * @extends Neo.form.field.Select
7
+ * @extends Neo.form.field.ComboBox
8
8
  */
9
- class Color extends Select {
9
+ class Color extends ComboBox {
10
10
  static config = {
11
11
  /**
12
12
  * @member {String} className='Neo.form.field.Color'
@@ -10,10 +10,10 @@ import VDomUtil from '../../util/VDom.mjs';
10
10
  * Provides a dropdown list to select one or multiple items.
11
11
  *
12
12
  * Conforms to ARIA accessibility standards outlines in https://www.w3.org/WAI/ARIA/apg/patterns/combobox/
13
- * @class Neo.form.field.Select
13
+ * @class Neo.form.field.ComboBox
14
14
  * @extends Neo.form.field.Picker
15
15
  */
16
- class Select extends Picker {
16
+ class ComboBox extends Picker {
17
17
  /**
18
18
  * Valid values for triggerAction
19
19
  * @member {String[]} triggerActions=['all','filtered']
@@ -24,23 +24,23 @@ class Select extends Picker {
24
24
 
25
25
  static config = {
26
26
  /**
27
- * @member {String} className='Neo.form.field.Select'
27
+ * @member {String} className='Neo.form.field.ComboBox'
28
28
  * @protected
29
29
  */
30
- className: 'Neo.form.field.Select',
30
+ className: 'Neo.form.field.ComboBox',
31
31
  /**
32
- * @member {String} ntype='selectfield'
32
+ * @member {String} ntype='combobox'
33
33
  * @protected
34
34
  */
35
- ntype: 'selectfield',
35
+ ntype: 'combobox',
36
36
  /**
37
37
  * @member {String|Number|null} activeRecordId=null
38
38
  */
39
39
  activeRecordId: null,
40
40
  /**
41
- * @member {String[]} baseCls=['neo-selectfield','neo-pickerfield','neo-textfield']
41
+ * @member {String[]} baseCls=['neo-combobox','neo-pickerfield','neo-textfield']
42
42
  */
43
- baseCls: ['neo-selectfield', 'neo-pickerfield', 'neo-textfield'],
43
+ baseCls: ['neo-combobox', 'neo-pickerfield', 'neo-textfield'],
44
44
  /**
45
45
  * @member {String} displayField='name'
46
46
  */
@@ -257,8 +257,8 @@ class Select extends Picker {
257
257
  // Simplest case is just picking string values.
258
258
  if (typeof v === 'string') {
259
259
  v = {
260
- [valueField] : v,
261
- [displayField] : v
260
+ [valueField] : v,
261
+ [displayField]: v
262
262
  }
263
263
  }
264
264
 
@@ -327,7 +327,7 @@ class Select extends Picker {
327
327
  } else {
328
328
  // store not loaded yet
329
329
  me.preStoreLoadValue = value;
330
- return null;
330
+ return null
331
331
  }
332
332
  }
333
333
 
@@ -366,7 +366,7 @@ class Select extends Picker {
366
366
  scope : me
367
367
  });
368
368
 
369
- return me.list;
369
+ return me.list
370
370
  }
371
371
 
372
372
  /**
@@ -565,7 +565,7 @@ class Select extends Picker {
565
565
 
566
566
  // Short delay to let selection DOM updates get applied.
567
567
  // Alternatively, we could hide the picker before the selection happen and limit updates to the vdom.
568
- //await me.timeout(20);
568
+ await me.timeout(20);
569
569
 
570
570
  await me.hidePicker()
571
571
  }
@@ -775,6 +775,6 @@ class Select extends Picker {
775
775
  * @returns {Object}
776
776
  */
777
777
 
778
- Neo.setupClass(Select);
778
+ Neo.setupClass(ComboBox);
779
779
 
780
- export default Select;
780
+ export default ComboBox;
@@ -1,10 +1,10 @@
1
- import Select from '../../form/field/Select.mjs';
1
+ import ComboBox from './ComboBox.mjs';
2
2
 
3
3
  /**
4
4
  * @class Neo.form.field.Country
5
- * @extends Neo.form.field.Select
5
+ * @extends Neo.form.field.ComboBox
6
6
  */
7
- class Country extends Select {
7
+ class Country extends ComboBox {
8
8
  static config = {
9
9
  /**
10
10
  * @member {String} className='Neo.form.field.Country'
@@ -1,6 +1,7 @@
1
1
  import Base from './Base.mjs';
2
2
  import CheckBox from './CheckBox.mjs';
3
3
  import Chip from './Chip.mjs';
4
+ import ComboBox from './ComboBox.mjs';
4
5
  import Date from './Date.mjs';
5
6
  import Display from './Display.mjs';
6
7
  import Email from './Email.mjs';
@@ -10,10 +11,9 @@ import Picker from './Picker.mjs';
10
11
  import Radio from './Radio.mjs';
11
12
  import Range from './Range.mjs';
12
13
  import Search from './Search.mjs';
13
- import Select from './Select.mjs';
14
14
  import Text from './Text.mjs';
15
15
  import TextArea from './TextArea.mjs';
16
16
  import Time from './Time.mjs';
17
17
  import Url from './Url.mjs';
18
18
 
19
- export {Base, CheckBox, Chip, Date, Display, Email, Number, Password, Picker, Radio, Range, Search, Select, Text, TextArea, Time, Url};
19
+ export {Base, CheckBox, Chip, ComboBox, Date, Display, Email, Number, Password, Picker, Radio, Range, Search, Text, TextArea, Time, Url};
@@ -412,7 +412,7 @@ class DomEvents extends Base {
412
412
  let manager = Neo.worker.Manager;
413
413
 
414
414
  manager.appNames.forEach(appName => {
415
- manager.broadcast({action: 'disconnect', appName})
415
+ manager.broadcast({action: 'disconnect', appName, windowId: manager.windowId})
416
416
  })
417
417
  }
418
418
 
@@ -1,5 +1,5 @@
1
1
  import ClassSystemUtil from '../util/ClassSystem.mjs';
2
- import SelectField from '../form/field/Select.mjs';
2
+ import ComboBox from '../form/field/ComboBox.mjs';
3
3
  import Toolbar from './Base.mjs';
4
4
 
5
5
  /**
@@ -75,7 +75,7 @@ class Paging extends Toolbar {
75
75
  text : 'Rows per page:'
76
76
  },
77
77
  rowsPerPage: {
78
- module : SelectField,
78
+ module : ComboBox,
79
79
  clearable : false,
80
80
  hideLabel : true,
81
81
  listConfig : {highlightFilterValue: false},
@@ -109,11 +109,12 @@ class Base extends CoreBase {
109
109
  * Only relevant for SharedWorkers
110
110
  * @param {Object} data
111
111
  */
112
- onConnect(data) {
112
+ async onConnect(data) {
113
113
  // short delay to ensure app VCs are in place
114
- setTimeout(() => {
115
- this.fire('connect', {appName: data.appName})
116
- }, 10)
114
+ await this.timeout(10);
115
+
116
+ let {appName, windowId} = data;
117
+ this.fire('connect', {appName, windowId})
117
118
  }
118
119
 
119
120
  /**
@@ -162,7 +163,8 @@ class Base extends CoreBase {
162
163
  * @param {Object} data
163
164
  */
164
165
  onDisconnect(data) {
165
- this.fire('disconnect', {appName: data.appName})
166
+ let {appName, windowId} = data;
167
+ this.fire('disconnect', {appName, windowId})
166
168
  }
167
169
 
168
170
  /**
@@ -212,7 +214,7 @@ class Base extends CoreBase {
212
214
  for (port of me.ports) {
213
215
  if (!port.appName) {
214
216
  port.appName = appName;
215
- me.onConnect({appName});
217
+ me.onConnect({appName, windowId: port.windowId});
216
218
  break
217
219
  }
218
220
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  import '../../src/button/Base.mjs';
5
5
  import '../../src/component/DateSelector.mjs';
6
+ import '../../src/form/field/ComboBox.mjs';
6
7
  import '../../src/list/Chip.mjs';
7
- import '../../src/form/field/Select.mjs';
8
8
 
9
9
  export const onStart = () => Neo.app({name: 'AppEmpty'})
@@ -3,7 +3,7 @@ StartTest(t => {
3
3
 
4
4
  async function setup(config = {}) {
5
5
  testId = await Neo.worker.App.createNeoInstance(Neo.merge({
6
- ntype : 'selectfield',
6
+ ntype : 'combobox',
7
7
  labelPosition: 'inline',
8
8
  labelText : 'US States',
9
9
  labelWidth : 80,
@@ -17,10 +17,10 @@ StartTest(t => {
17
17
  model: {
18
18
  fields: [{
19
19
  name: 'abbreviation',
20
- type: 'string'
20
+ type: 'String'
21
21
  }, {
22
22
  name: 'name',
23
- type: 'string'
23
+ type: 'String'
24
24
  }]
25
25
  }
26
26
  }
@@ -82,7 +82,7 @@ project.plan({
82
82
  items: [{
83
83
  group: 'field',
84
84
  items: [
85
- 'files/form/field/Select.mjs',
85
+ 'files/form/field/ComboBox.mjs',
86
86
  'files/form/field/Text.mjs'
87
87
  ]
88
88
  }]
@@ -1,9 +0,0 @@
1
- :root .neo-theme-dark { // .neo-selectfield
2
- --selectfield-input-hint-color : #bbb;
3
- --selectfield-input-hint-opacity : 0.6;
4
- --selectfield-list-search-background-color : inherit;
5
- --selectfield-list-search-color : #fff;
6
- --selectfield-list-search-color-selected : #000;
7
- --selectfield-picker-container-border : 1px solid #bbb;
8
- --selectfield-picker-container-border-radius: 0;
9
- }
@@ -1,9 +0,0 @@
1
- :root .neo-theme-light { // .neo-selectfield
2
- --selectfield-input-hint-color : #333;
3
- --selectfield-input-hint-opacity : 0.6;
4
- --selectfield-list-search-background-color : inherit;
5
- --selectfield-list-search-color : red;
6
- --selectfield-list-search-color-selected : red;
7
- --selectfield-picker-container-border : 1px solid #1c60a0;
8
- --selectfield-picker-container-border-radius: 3px;
9
- }
@@ -1,9 +0,0 @@
1
- :root .neo-theme-neo-light { // .neo-selectfield
2
- --selectfield-input-hint-color : #333;
3
- --selectfield-input-hint-opacity : 0.6;
4
- --selectfield-list-search-background-color : inherit;
5
- --selectfield-list-search-color : red;
6
- --selectfield-list-search-color-selected : red;
7
- --selectfield-picker-container-border : 1px solid #1c60a0;
8
- --selectfield-picker-container-border-radius: 3px;
9
- }