neo.mjs 6.17.1 → 6.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/apps/ServiceWorker.mjs +3 -5
  2. package/apps/colors/README.md +8 -0
  3. package/apps/colors/app.mjs +6 -0
  4. package/apps/colors/childapps/widget/app.mjs +7 -0
  5. package/apps/colors/childapps/widget/index.html +11 -0
  6. package/apps/colors/childapps/widget/neo-config.json +10 -0
  7. package/apps/colors/childapps/widget/view/Viewport.mjs +19 -0
  8. package/apps/colors/index.html +11 -0
  9. package/apps/colors/model/Color.mjs +43 -0
  10. package/apps/colors/neo-config.json +10 -0
  11. package/apps/colors/remotes-api.json +13 -0
  12. package/apps/colors/store/Colors.mjs +24 -0
  13. package/apps/colors/view/BarChartComponent.mjs +64 -0
  14. package/apps/colors/view/HeaderToolbar.mjs +95 -0
  15. package/apps/colors/view/PieChartComponent.mjs +58 -0
  16. package/apps/colors/view/TableContainer.mjs +91 -0
  17. package/apps/colors/view/Viewport.mjs +57 -0
  18. package/apps/colors/view/ViewportController.mjs +277 -0
  19. package/apps/colors/view/ViewportModel.mjs +53 -0
  20. package/apps/portal/Util.mjs +11 -0
  21. package/apps/portal/childapps/preview/neo-config.json +2 -2
  22. package/apps/portal/neo-config.json +2 -1
  23. package/apps/portal/remotes-api.json +13 -0
  24. package/apps/portal/view/HeaderToolbar.mjs +44 -27
  25. package/apps/portal/view/Viewport.mjs +12 -1
  26. package/apps/portal/view/ViewportController.mjs +89 -1
  27. package/apps/portal/view/home/MainContainer.mjs +27 -60
  28. package/apps/portal/view/home/parts/AfterMath.mjs +58 -0
  29. package/apps/portal/view/home/parts/Colors.mjs +74 -0
  30. package/apps/portal/view/home/parts/Features.mjs +52 -0
  31. package/apps/portal/view/home/parts/Helix.mjs +75 -0
  32. package/apps/portal/view/home/parts/HelloWorld.mjs +82 -0
  33. package/apps/portal/view/home/parts/MainNeo.mjs +55 -0
  34. package/apps/portal/view/home/preview/PageCodeContainer.mjs +55 -0
  35. package/apps/portal/view/learn/LivePreview.mjs +72 -29
  36. package/apps/portal/view/learn/MainContainerController.mjs +10 -90
  37. package/apps/realworld/api/Article.mjs +1 -3
  38. package/apps/realworld/api/Favorite.mjs +1 -3
  39. package/apps/realworld/api/Profile.mjs +1 -3
  40. package/apps/realworld/api/Tag.mjs +1 -3
  41. package/apps/realworld/api/User.mjs +1 -3
  42. package/apps/realworld2/api/Article.mjs +1 -3
  43. package/apps/realworld2/api/Favorite.mjs +1 -3
  44. package/apps/realworld2/api/Profile.mjs +1 -3
  45. package/apps/realworld2/api/Tag.mjs +1 -3
  46. package/apps/realworld2/api/User.mjs +1 -3
  47. package/apps/realworld2/view/article/HelixContainer.mjs +5 -5
  48. package/buildScripts/webpack/json/myApps.template.json +1 -0
  49. package/buildScripts/webpack/webpack.server.config.mjs +4 -1
  50. package/docs/app/view/MainContainer.mjs +5 -0
  51. package/docs/app/view/classdetails/MembersList.mjs +1 -1
  52. package/examples/ServiceWorker.mjs +3 -5
  53. package/examples/component/helix/Viewport.mjs +309 -0
  54. package/examples/component/helix/ViewportController.mjs +122 -0
  55. package/examples/component/helix/app.mjs +2 -2
  56. package/examples/component/helix/neo-config.json +0 -1
  57. package/examples/component/multiWindowHelix/Viewport.mjs +11 -3
  58. package/examples/component/multiWindowHelix/ViewportController.mjs +21 -9
  59. package/examples/component/multiWindowHelix/neo-config.json +0 -1
  60. package/examples/fieldWithPrefix/MainContainer.mjs +1 -6
  61. package/examples/list/animate/MainContainerController.mjs +1 -1
  62. package/examples/worker/task/MyTasks.mjs +1 -3
  63. package/package.json +5 -5
  64. package/resources/data/deck/learnneo/pages/GuideEvents.md +131 -0
  65. package/resources/data/deck/learnneo/pages/WhyNeo-Speed.md +1 -1
  66. package/resources/images/logo/neo_logo_primary.svg +6 -0
  67. package/resources/images/logo/neo_logo_secondary.svg +6 -0
  68. package/resources/images/logo/neo_logo_text_primary.svg +5 -0
  69. package/resources/images/logo/neo_logo_text_secondary.svg +5 -0
  70. package/resources/images/logo/neo_logo_white.svg +6 -0
  71. package/resources/scss/src/apps/colors/BarChartComponent.scss +3 -0
  72. package/resources/scss/src/apps/colors/HeaderToolbar.scss +11 -0
  73. package/resources/scss/src/apps/colors/PieChartComponent.scss +3 -0
  74. package/resources/scss/src/apps/colors/TableContainer.scss +64 -0
  75. package/resources/scss/src/apps/colors/Viewport.scss +9 -0
  76. package/resources/scss/src/apps/portal/HeaderToolbar.scss +189 -17
  77. package/resources/scss/src/apps/portal/home/MainContainer.scss +46 -20
  78. package/resources/scss/src/apps/portal/home/parts/Features.scss +3 -0
  79. package/resources/scss/src/apps/portal/home/preview/PageCodeContainer.scss +115 -0
  80. package/resources/scss/src/component/Base.scss +2 -0
  81. package/resources/scss/src/examples/component/multiWindowHelix/Viewport.scss +3 -0
  82. package/resources/scss/src/form/field/CheckBox.scss +1 -0
  83. package/resources/scss/src/tab/header/Button.scss +2 -1
  84. package/resources/scss/theme-dark/Global.scss +8 -0
  85. package/resources/scss/theme-dark/button/Base.scss +1 -1
  86. package/resources/scss/theme-dark/tab/header/Button.scss +1 -0
  87. package/resources/scss/theme-light/Global.scss +8 -0
  88. package/resources/scss/theme-light/button/Base.scss +1 -1
  89. package/resources/scss/theme-light/tab/header/Button.scss +1 -0
  90. package/resources/scss/theme-neo-light/Global.scss +53 -53
  91. package/resources/scss/theme-neo-light/button/Base.scss +3 -4
  92. package/resources/scss/theme-neo-light/tab/header/Button.scss +6 -8
  93. package/src/DefaultConfig.mjs +2 -2
  94. package/src/Fetch.mjs +1 -3
  95. package/src/Main.mjs +13 -11
  96. package/src/MicroLoader.mjs +2 -2
  97. package/src/Neo.mjs +27 -26
  98. package/src/Xhr.mjs +1 -3
  99. package/src/button/Base.mjs +6 -4
  100. package/src/button/Split.mjs +10 -9
  101. package/src/calendar/view/EditEventContainer.mjs +13 -12
  102. package/src/calendar/view/MainContainer.mjs +40 -40
  103. package/src/calendar/view/MainContainerModel.mjs +5 -5
  104. package/src/calendar/view/SettingsContainer.mjs +11 -11
  105. package/src/calendar/view/YearComponent.mjs +73 -75
  106. package/src/calendar/view/calendars/ColorsList.mjs +2 -2
  107. package/src/calendar/view/calendars/EditContainer.mjs +2 -2
  108. package/src/calendar/view/calendars/List.mjs +12 -13
  109. package/src/calendar/view/month/Component.mjs +72 -73
  110. package/src/calendar/view/settings/GeneralContainer.mjs +5 -5
  111. package/src/calendar/view/settings/MonthContainer.mjs +5 -5
  112. package/src/calendar/view/settings/WeekContainer.mjs +6 -6
  113. package/src/calendar/view/settings/YearContainer.mjs +4 -4
  114. package/src/calendar/view/week/Component.mjs +47 -57
  115. package/src/calendar/view/week/EventDragZone.mjs +43 -50
  116. package/src/calendar/view/week/TimeAxisComponent.mjs +21 -21
  117. package/src/calendar/view/week/plugin/DragDrop.mjs +53 -45
  118. package/src/calendar/view/week/plugin/EventResizable.mjs +8 -3
  119. package/src/collection/Base.mjs +15 -22
  120. package/src/collection/Filter.mjs +4 -9
  121. package/src/collection/Sorter.mjs +6 -7
  122. package/src/component/Base.mjs +149 -87
  123. package/src/component/Canvas.mjs +9 -9
  124. package/src/component/Carousel.mjs +31 -33
  125. package/src/component/Chip.mjs +9 -9
  126. package/src/component/Circle.mjs +84 -91
  127. package/src/component/Clock.mjs +8 -8
  128. package/src/component/DateSelector.mjs +14 -15
  129. package/src/component/Gallery.mjs +82 -80
  130. package/src/component/Helix.mjs +131 -126
  131. package/src/component/Iframe.mjs +1 -1
  132. package/src/component/Label.mjs +1 -1
  133. package/src/component/Legend.mjs +3 -3
  134. package/src/component/Process.mjs +39 -37
  135. package/src/component/Splitter.mjs +9 -11
  136. package/src/component/StatusBadge.mjs +2 -3
  137. package/src/component/Timer.mjs +62 -68
  138. package/src/component/Toast.mjs +11 -11
  139. package/src/component/Video.mjs +7 -8
  140. package/src/component/mwc/Button.mjs +10 -10
  141. package/src/component/mwc/TextField.mjs +17 -17
  142. package/src/component/wrapper/AmChart.mjs +5 -5
  143. package/src/component/wrapper/CesiumJS.mjs +11 -17
  144. package/src/component/wrapper/GoogleMaps.mjs +58 -35
  145. package/src/component/wrapper/MapboxGL.mjs +112 -79
  146. package/src/component/wrapper/MonacoEditor.mjs +1 -6
  147. package/src/container/Accordion.mjs +18 -20
  148. package/src/container/AccordionItem.mjs +12 -11
  149. package/src/container/Base.mjs +29 -28
  150. package/src/container/Panel.mjs +9 -9
  151. package/src/container/Viewport.mjs +30 -1
  152. package/src/controller/Base.mjs +12 -14
  153. package/src/controller/Component.mjs +60 -66
  154. package/src/core/Base.mjs +5 -8
  155. package/src/core/IdGenerator.mjs +1 -3
  156. package/src/core/Observable.mjs +17 -17
  157. package/src/core/Util.mjs +5 -5
  158. package/src/data/Model.mjs +3 -3
  159. package/src/data/RecordFactory.mjs +3 -6
  160. package/src/data/Store.mjs +34 -34
  161. package/src/data/connection/Fetch.mjs +3 -3
  162. package/src/data/connection/WebSocket.mjs +21 -25
  163. package/src/data/connection/Xhr.mjs +31 -28
  164. package/src/date/DayViewComponent.mjs +1 -1
  165. package/src/date/SelectorContainer.mjs +2 -2
  166. package/src/dialog/Base.mjs +27 -25
  167. package/src/dialog/header/Toolbar.mjs +5 -4
  168. package/src/draggable/DragProxyComponent.mjs +7 -4
  169. package/src/draggable/DragZone.mjs +30 -30
  170. package/src/draggable/DropZone.mjs +7 -7
  171. package/src/draggable/list/DragZone.mjs +18 -18
  172. package/src/draggable/tab/header/toolbar/SortZone.mjs +7 -7
  173. package/src/draggable/toolbar/DragZone.mjs +15 -15
  174. package/src/draggable/toolbar/SortZone.mjs +30 -31
  175. package/src/draggable/tree/DragZone.mjs +9 -9
  176. package/src/filter/BooleanContainer.mjs +3 -3
  177. package/src/filter/NumberContainer.mjs +5 -5
  178. package/src/filter/ToggleOperatorsButton.mjs +5 -5
  179. package/src/form/Fieldset.mjs +26 -26
  180. package/src/form/field/Base.mjs +1 -1
  181. package/src/form/field/CheckBox.mjs +15 -16
  182. package/src/form/field/Color.mjs +13 -15
  183. package/src/form/field/ComboBox.mjs +16 -24
  184. package/src/form/field/Country.mjs +1 -1
  185. package/src/form/field/Date.mjs +3 -4
  186. package/src/form/field/Display.mjs +1 -1
  187. package/src/form/field/Email.mjs +2 -2
  188. package/src/form/field/Number.mjs +51 -56
  189. package/src/form/field/Picker.mjs +2 -2
  190. package/src/form/field/Radio.mjs +1 -1
  191. package/src/form/field/Range.mjs +7 -6
  192. package/src/form/field/Text.mjs +29 -36
  193. package/src/form/field/TextArea.mjs +9 -9
  194. package/src/form/field/Time.mjs +30 -30
  195. package/src/form/field/trigger/Base.mjs +19 -13
  196. package/src/form/field/trigger/Clear.mjs +13 -13
  197. package/src/form/field/trigger/CopyToClipboard.mjs +7 -7
  198. package/src/form/field/trigger/Picker.mjs +2 -2
  199. package/src/form/field/trigger/SpinDown.mjs +1 -1
  200. package/src/form/field/trigger/SpinUp.mjs +1 -1
  201. package/src/form/field/trigger/SpinUpDown.mjs +3 -3
  202. package/src/form/field/trigger/Time.mjs +3 -3
  203. package/src/grid/Container.mjs +33 -33
  204. package/src/grid/View.mjs +20 -22
  205. package/src/grid/header/Button.mjs +12 -12
  206. package/src/grid/header/Toolbar.mjs +4 -4
  207. package/src/layout/Base.mjs +5 -4
  208. package/src/layout/Card.mjs +15 -16
  209. package/src/layout/Fit.mjs +22 -8
  210. package/src/layout/Flexbox.mjs +30 -29
  211. package/src/layout/Form.mjs +15 -15
  212. package/src/layout/Grid.mjs +2 -2
  213. package/src/layout/HBox.mjs +3 -2
  214. package/src/layout/VBox.mjs +3 -2
  215. package/src/list/Base.mjs +45 -47
  216. package/src/list/Chip.mjs +4 -4
  217. package/src/list/Circle.mjs +3 -3
  218. package/src/list/Color.mjs +4 -4
  219. package/src/list/Component.mjs +10 -10
  220. package/src/list/plugin/Animate.mjs +18 -13
  221. package/src/main/DomAccess.mjs +92 -56
  222. package/src/main/DomEvents.mjs +38 -39
  223. package/src/main/addon/AmCharts.mjs +37 -37
  224. package/src/main/addon/AnalyticsByGoogle.mjs +4 -4
  225. package/src/main/addon/CesiumJS.mjs +8 -8
  226. package/src/main/addon/CloneNode.mjs +5 -5
  227. package/src/main/addon/Cookie.mjs +4 -4
  228. package/src/main/addon/DragDrop.mjs +35 -34
  229. package/src/main/addon/GoogleMaps.mjs +19 -19
  230. package/src/main/addon/LocalStorage.mjs +3 -3
  231. package/src/main/addon/MapboxGL.mjs +40 -41
  232. package/src/main/addon/MonacoEditor.mjs +5 -5
  233. package/src/main/addon/Mwc.mjs +6 -6
  234. package/src/main/addon/Navigator.mjs +35 -39
  235. package/src/main/addon/Popover.mjs +5 -6
  236. package/src/main/addon/PrefixField.mjs +1 -2
  237. package/src/main/addon/ServiceWorker.mjs +9 -9
  238. package/src/main/addon/Siesta.mjs +3 -2
  239. package/src/main/addon/Stylesheet.mjs +37 -37
  240. package/src/main/addon/WebComponent.mjs +2 -3
  241. package/src/main/addon/WindowPosition.mjs +18 -18
  242. package/src/main/draggable/sensor/Base.mjs +2 -2
  243. package/src/main/draggable/sensor/Mouse.mjs +15 -15
  244. package/src/main/draggable/sensor/Touch.mjs +24 -23
  245. package/src/main/mixin/DeltaUpdates.mjs +10 -12
  246. package/src/main/mixin/TouchDomEvents.mjs +6 -6
  247. package/src/manager/Base.mjs +4 -4
  248. package/src/manager/Component.mjs +41 -41
  249. package/src/manager/DomEvent.mjs +52 -50
  250. package/src/manager/Focus.mjs +14 -16
  251. package/src/manager/Instance.mjs +2 -4
  252. package/src/manager/Store.mjs +4 -8
  253. package/src/manager/Task.mjs +20 -22
  254. package/src/manager/Toast.mjs +14 -16
  255. package/src/manager/rpc/Api.mjs +1 -3
  256. package/src/manager/rpc/Message.mjs +16 -18
  257. package/src/menu/List.mjs +16 -16
  258. package/src/menu/Panel.mjs +4 -4
  259. package/src/model/Component.mjs +5 -5
  260. package/src/plugin/Base.mjs +2 -0
  261. package/src/plugin/Popover.mjs +1 -1
  262. package/src/plugin/PrefixField.mjs +35 -45
  263. package/src/plugin/Resizable.mjs +86 -101
  264. package/src/plugin/Responsive.mjs +175 -0
  265. package/src/remotes/Api.mjs +4 -6
  266. package/src/selection/CircleModel.mjs +12 -16
  267. package/src/selection/DateSelectorModel.mjs +21 -23
  268. package/src/selection/GalleryModel.mjs +49 -63
  269. package/src/selection/HelixModel.mjs +35 -41
  270. package/src/selection/ListModel.mjs +9 -14
  271. package/src/selection/Model.mjs +31 -31
  272. package/src/selection/TreeAccordionModel.mjs +74 -80
  273. package/src/selection/grid/CellColumnModel.mjs +10 -10
  274. package/src/selection/grid/CellColumnRowModel.mjs +10 -10
  275. package/src/selection/grid/CellModel.mjs +26 -28
  276. package/src/selection/grid/CellRowModel.mjs +24 -24
  277. package/src/selection/grid/ColumnModel.mjs +16 -20
  278. package/src/selection/grid/RowModel.mjs +27 -29
  279. package/src/selection/menu/ListModel.mjs +2 -2
  280. package/src/selection/table/CellColumnModel.mjs +12 -12
  281. package/src/selection/table/CellColumnRowModel.mjs +12 -12
  282. package/src/selection/table/CellModel.mjs +26 -29
  283. package/src/selection/table/CellRowModel.mjs +19 -19
  284. package/src/selection/table/ColumnModel.mjs +18 -22
  285. package/src/selection/table/RowModel.mjs +27 -29
  286. package/src/sitemap/Component.mjs +20 -20
  287. package/src/sitemap/Store.mjs +1 -1
  288. package/src/tab/Container.mjs +15 -15
  289. package/src/tab/Strip.mjs +1 -1
  290. package/src/tab/header/Toolbar.mjs +4 -4
  291. package/src/table/Container.mjs +8 -10
  292. package/src/table/View.mjs +29 -34
  293. package/src/table/header/Button.mjs +18 -18
  294. package/src/table/header/Toolbar.mjs +2 -2
  295. package/src/toolbar/Base.mjs +14 -14
  296. package/src/toolbar/Breadcrumb.mjs +11 -11
  297. package/src/toolbar/Paging.mjs +18 -18
  298. package/src/tooltip/Base.mjs +20 -22
  299. package/src/tree/Accordion.mjs +69 -75
  300. package/src/tree/List.mjs +22 -25
  301. package/src/util/Array.mjs +19 -18
  302. package/src/util/ClassSystem.mjs +9 -9
  303. package/src/util/Css.mjs +2 -2
  304. package/src/util/Date.mjs +9 -9
  305. package/src/util/Function.mjs +2 -2
  306. package/src/util/HashHistory.mjs +3 -5
  307. package/src/util/KeyNavigation.mjs +17 -17
  308. package/src/util/Logger.mjs +9 -9
  309. package/src/util/Matrix.mjs +19 -19
  310. package/src/util/String.mjs +9 -9
  311. package/src/util/Style.mjs +11 -11
  312. package/src/util/VDom.mjs +12 -14
  313. package/src/util/VNode.mjs +29 -29
  314. package/src/vdom/Helper.mjs +84 -93
  315. package/src/vdom/VNode.mjs +1 -1
  316. package/src/worker/App.mjs +19 -16
  317. package/src/worker/Base.mjs +14 -15
  318. package/src/worker/Canvas.mjs +1 -3
  319. package/src/worker/Data.mjs +4 -8
  320. package/src/worker/Manager.mjs +27 -32
  321. package/src/worker/Message.mjs +1 -1
  322. package/src/worker/ServiceBase.mjs +38 -42
  323. package/src/worker/Task.mjs +1 -3
  324. package/src/worker/VDom.mjs +2 -4
  325. package/src/worker/mixin/RemoteMethodAccess.mjs +5 -6
  326. package/examples/component/helix/MainContainer.mjs +0 -340
  327. package/resources/images/Neo_Vector.svg +0 -3
  328. package/resources/images/logos/Github-logo-black.svg +0 -1
  329. package/resources/images/logos/Slack-logo-black.svg +0 -17
@@ -52,8 +52,8 @@ class Base extends CoreBase {
52
52
  * @member {Object|String} align_={edgeAlign:'t-b',constrainTo:'document.body'}
53
53
  */
54
54
  align_: {
55
- edgeAlign : 't-b',
56
- constrainTo : 'document.body'
55
+ edgeAlign : 't-b',
56
+ constrainTo: 'document.body'
57
57
  },
58
58
  /**
59
59
  * The name of the App this component belongs to
@@ -288,6 +288,13 @@ class Base extends CoreBase {
288
288
  * @protected
289
289
  */
290
290
  reference_: null,
291
+ /**
292
+ * Make the view Responsive by adding alternative configs.
293
+ * The definition happens via responsiveCfg
294
+ * @member {Object} responsive=null
295
+ * @protected
296
+ */
297
+ responsive_: null,
291
298
  /**
292
299
  * True in case the component is rendering the vnode
293
300
  * @member {Boolean} rendering_=false
@@ -300,6 +307,13 @@ class Base extends CoreBase {
300
307
  * @member {String|null} role_=null
301
308
  */
302
309
  role_: null,
310
+ /**
311
+ * Set this to true for style 'overflow:auto'.
312
+ * Set this to 'x' or 'y' to add style 'overflow-x' or 'overflow-y' to 'auto'
313
+ * Other than false this will add cls 'neo-scrollable'.
314
+ * @member {Boolean|"x"|"y"} scrollable_=false
315
+ */
316
+ scrollable_: false,
303
317
  /**
304
318
  * Set this to true for bulk updates. Ensure to set it back to false afterwards.
305
319
  * Internally the value will get saved as a number to ensure that child methods won't stop the silent mode too early.
@@ -408,7 +422,7 @@ class Base extends CoreBase {
408
422
  get parent() {
409
423
  let me = this;
410
424
 
411
- return me.parentComponent || me.parentId !== 'document.body' ? Neo.getComponent(me.parentId) : null
425
+ return me.parentComponent || me.parentId === 'document.body' ? null : Neo.getComponent(me.parentId)
412
426
  }
413
427
 
414
428
  /**
@@ -694,8 +708,8 @@ class Base extends CoreBase {
694
708
  */
695
709
  afterSetIsLoading(value, oldValue) {
696
710
  if (!(value === false && oldValue === undefined)) {
697
- let me = this,
698
- { cls, vdom } = me,
711
+ let me = this,
712
+ {cls, vdom} = me,
699
713
  maskIndex;
700
714
 
701
715
  if (oldValue !== undefined && vdom.cn) {
@@ -780,7 +794,8 @@ class Base extends CoreBase {
780
794
  */
781
795
  afterSetMounted(value, oldValue) {
782
796
  if (oldValue !== undefined) {
783
- let me = this;
797
+ let me = this,
798
+ {id, windowId} = me;
784
799
 
785
800
  if (value) {
786
801
  me.hasBeenMounted = true;
@@ -789,7 +804,7 @@ class Base extends CoreBase {
789
804
  // todo: the main thread reply of mount arrives after pushing the task into the queue which does not ensure the dom is mounted
790
805
  setTimeout(() => {
791
806
  DomEventManager.mountDomListeners(me)
792
- }, 100)
807
+ }, 150)
793
808
  }
794
809
 
795
810
  me.doResolveUpdateCache();
@@ -798,16 +813,12 @@ class Base extends CoreBase {
798
813
  me.alignTo();
799
814
 
800
815
  // Focus will be pushed into the first input field or other focusable item
801
- Neo.main.DomAccess.focus({
802
- id : this.id,
803
- children : true
804
- });
816
+ Neo.main.DomAccess.focus({id, children: true, windowId})
805
817
  }
806
818
 
807
819
  me.fire('mounted', me.id)
808
- }
809
- else {
810
- me.revertFocus();
820
+ } else {
821
+ me.revertFocus()
811
822
  }
812
823
  }
813
824
  }
@@ -822,6 +833,28 @@ class Base extends CoreBase {
822
833
  value && this.changeVdomRootKey('data-ref', value)
823
834
  }
824
835
 
836
+ /**
837
+ * Triggered after the responsive config got changed
838
+ * @param {Object} value
839
+ * @param {Object} oldValue
840
+ * @protected
841
+ */
842
+ async afterSetResponsive(value, oldValue) {
843
+ if (value && !this.getPlugin('responsive')) {
844
+ let me = this,
845
+ module = await import(`../../src/plugin/Responsive.mjs`),
846
+ plugins = me.plugins || [];
847
+
848
+ plugins.push({
849
+ module : module.default,
850
+ appName: me.appName,
851
+ value
852
+ });
853
+
854
+ me.plugins = plugins
855
+ }
856
+ }
857
+
825
858
  /**
826
859
  * Triggered after the role config got changed
827
860
  * @param {String|null} value
@@ -832,6 +865,45 @@ class Base extends CoreBase {
832
865
  this.changeVdomRootKey('role', value)
833
866
  }
834
867
 
868
+ /**
869
+ * Triggered after the scrollable config got changed
870
+ * @param {String|Boolean} value
871
+ * @param {String|Boolean|null} oldValue
872
+ * @protected
873
+ */
874
+ afterSetScrollable(value, oldValue) {
875
+ if (oldValue === undefined && !value) {
876
+ return
877
+ }
878
+
879
+ let me = this;
880
+
881
+ if (oldValue) {
882
+ let oldOverflowKey = 'overflow';
883
+
884
+ if (!Neo.isBoolean(oldValue)) {
885
+ oldOverflowKey += Neo.capitalize(oldValue)
886
+ }
887
+
888
+ me.removeStyle([oldOverflowKey])
889
+ }
890
+
891
+ if (!Neo.isEmpty(value)) {
892
+ let overflowKey = 'overflow';
893
+
894
+ if (value && !Neo.isBoolean(value)) {
895
+ overflowKey += Neo.capitalize(value)
896
+ }
897
+
898
+ if (value) {
899
+ me.addStyle(overflowKey + ':auto');
900
+ me.addCls('neo-scrollable')
901
+ } else {
902
+ me.removeCls('neo-scrollable')
903
+ }
904
+ }
905
+ }
906
+
835
907
  /**
836
908
  * Triggered after the style config got changed
837
909
  * @param {Object} value
@@ -1022,18 +1094,18 @@ class Base extends CoreBase {
1022
1094
  align = {
1023
1095
  ...me.align,
1024
1096
  ...spec,
1025
- id : me.id,
1026
- configuredFlex : me.configuredFlex,
1027
- configuredWidth : me.configuredWidth,
1028
- configuredHeight : me.configuredHeight,
1029
- configuredMinWidth : me.configuredMinWidth,
1030
- configuredMinHeight : me.configuredMinHeight,
1031
- configuredMaxWidth : me.configuredMaxWidth,
1032
- configuredMaxHeight : me.configuredMaxHeight
1097
+ id : me.id,
1098
+ configuredFlex : me.configuredFlex,
1099
+ configuredWidth : me.configuredWidth,
1100
+ configuredHeight : me.configuredHeight,
1101
+ configuredMinWidth : me.configuredMinWidth,
1102
+ configuredMinHeight: me.configuredMinHeight,
1103
+ configuredMaxWidth : me.configuredMaxWidth,
1104
+ configuredMaxHeight: me.configuredMaxHeight
1033
1105
  };
1034
1106
 
1035
1107
  if (align.target) {
1036
- await Neo.main.DomAccess.align(align);
1108
+ await Neo.main.DomAccess.align(align)
1037
1109
  }
1038
1110
  }
1039
1111
 
@@ -1057,15 +1129,6 @@ class Base extends CoreBase {
1057
1129
  return this.getModel().getHierarchyData()
1058
1130
  }
1059
1131
 
1060
- /**
1061
- * Triggered when accessing the parentComponent config
1062
- * @param {Object} value
1063
- * @protected
1064
- */
1065
- beforeParentComponent(value) {
1066
- return value || this.parent
1067
- }
1068
-
1069
1132
  /**
1070
1133
  * Triggered when accessing the style config
1071
1134
  * @param {Object} value
@@ -1081,7 +1144,7 @@ class Base extends CoreBase {
1081
1144
  * @protected
1082
1145
  */
1083
1146
  beforeGetWrapperCls(value) {
1084
- return value ? [...value]: []
1147
+ return value ? [...value] : []
1085
1148
  }
1086
1149
 
1087
1150
  /**
@@ -1168,7 +1231,7 @@ class Base extends CoreBase {
1168
1231
  * @returns {String}
1169
1232
  * @protected
1170
1233
  */
1171
- beforeSetHideMode(value, oldValue) {
1234
+ beforeSetHideMode(value, oldValue) {
1172
1235
  return this.beforeSetEnumValue(value, oldValue, 'hideMode')
1173
1236
  }
1174
1237
 
@@ -1185,8 +1248,8 @@ class Base extends CoreBase {
1185
1248
 
1186
1249
  if (value) {
1187
1250
  value = ClassSystemUtil.beforeSetInstance(value, KeyNavigation, {
1188
- keyDownEventBubble : true,
1189
- keys: value
1251
+ keyDownEventBubble: true,
1252
+ keys : value
1190
1253
  })
1191
1254
  }
1192
1255
 
@@ -1306,10 +1369,9 @@ class Base extends CoreBase {
1306
1369
  * todo: unregister events
1307
1370
  */
1308
1371
  destroy(updateParentVdom=false, silent=false) {
1309
- let me = this,
1310
- parentId = me.parentId,
1311
- parent = Neo.getComponent(parentId),
1312
- parentModel = parent?.getModel(),
1372
+ let me = this,
1373
+ {parent, parentId} = me,
1374
+ parentModel = parent?.getModel(),
1313
1375
  parentVdom;
1314
1376
 
1315
1377
  me.revertFocus();
@@ -1426,7 +1488,8 @@ class Base extends CoreBase {
1426
1488
  */
1427
1489
  focus(id=this.id) {
1428
1490
  Neo.main.DomAccess.focus({
1429
- id
1491
+ id,
1492
+ windowId: this.id
1430
1493
  }).catch(err => {
1431
1494
  console.log('Error attempting to receive focus for component', err, this)
1432
1495
  })
@@ -1447,7 +1510,7 @@ class Base extends CoreBase {
1447
1510
  }
1448
1511
 
1449
1512
  /**
1450
- * Find an instance stored inside a config via optionally passing an ntype.
1513
+ * Find an instance stored inside a config via optionally passing a ntype.
1451
1514
  * Returns this[configName] or the closest parent component with a match.
1452
1515
  * Used by getController() & getModel()
1453
1516
  * @param {String} configName
@@ -1455,9 +1518,9 @@ class Base extends CoreBase {
1455
1518
  * @returns {Neo.core.Base|null}
1456
1519
  */
1457
1520
  getConfigInstanceByNtype(configName, ntype) {
1458
- let me = this,
1459
- config = me[configName],
1460
- parentComponent = me.parentComponent;
1521
+ let me = this,
1522
+ config = me[configName],
1523
+ {parentComponent} = me;
1461
1524
 
1462
1525
  if (config && (!ntype || ntype === config.ntype)) {
1463
1526
  return config
@@ -1490,7 +1553,7 @@ class Base extends CoreBase {
1490
1553
  * @returns {Promise<Neo.util.Rectangle>}
1491
1554
  */
1492
1555
  async getDomRect(id=this.id, appName=this.appName) {
1493
- const result = await Neo.main.DomAccess.getBoundingClientRect({appName, id});
1556
+ const result = await Neo.main.DomAccess.getBoundingClientRect({appName, id, windowId: this.windowId});
1494
1557
 
1495
1558
  if (Array.isArray(result)) {
1496
1559
  return result.map(rect => Rectangle.clone(rect))
@@ -1562,7 +1625,13 @@ class Base extends CoreBase {
1562
1625
  * @returns {Neo.plugin.Base|null}
1563
1626
  */
1564
1627
  getPlugin(opts) {
1565
- opts = typeof opts !== 'string' ? opts : {id: opts};
1628
+ if (Neo.isString(opts)) {
1629
+ if (!opts.startsWith('plugin-')) {
1630
+ opts = 'plugin-' + opts
1631
+ }
1632
+
1633
+ opts = {ntype: opts}
1634
+ }
1566
1635
 
1567
1636
  let me = this,
1568
1637
  hasMatch;
@@ -1666,8 +1735,8 @@ class Base extends CoreBase {
1666
1735
  let me = this;
1667
1736
 
1668
1737
  if (me.hideMode !== 'visibility') {
1669
- let removeFn = function() {
1670
- if(me.parentId !== 'document.body') {
1738
+ let removeFn = function () {
1739
+ if (me.parentId !== 'document.body') {
1671
1740
  me.vdom.removeDom = true;
1672
1741
  me.parent.update()
1673
1742
  } else {
@@ -1735,7 +1804,7 @@ class Base extends CoreBase {
1735
1804
  resolve && me.resolveUpdateCache.push(resolve)
1736
1805
  return true
1737
1806
  } else {
1738
- return me.isParentVdomUpdating(parent.parentId)
1807
+ return me.isParentVdomUpdating(parent.parentId, resolve)
1739
1808
  }
1740
1809
  }
1741
1810
  }
@@ -1750,13 +1819,12 @@ class Base extends CoreBase {
1750
1819
  async measure(value) {
1751
1820
  if (value != null) {
1752
1821
  if (value.endsWith('px')) {
1753
- value = parseFloat(value);
1754
- }
1755
- else if (lengthRE.test(value)) {
1756
- value = await Neo.main.DomAccess.measure({ value, id : this.id });
1757
- }
1758
- else if (!isNaN(value)) {
1759
- value = parseFloat(value);
1822
+ value = parseFloat(value)
1823
+ } else if (lengthRE.test(value)) {
1824
+ let {id, windowId} = this;
1825
+ value = await Neo.main.DomAccess.measure({id, value, windowId})
1826
+ } else if (!isNaN(value)) {
1827
+ value = parseFloat(value)
1760
1828
  }
1761
1829
  }
1762
1830
 
@@ -1783,7 +1851,7 @@ class Base extends CoreBase {
1783
1851
 
1784
1852
  if (config.style) {
1785
1853
  // If we are passed an object, merge it with the class's own style
1786
- me.style = Neo.typeOf(config.style) === 'Object' ? { ...config.style, ...me.constructor.config.style } : config.style;
1854
+ me.style = Neo.typeOf(config.style) === 'Object' ? {...config.style, ...me.constructor.config.style} : config.style
1787
1855
  }
1788
1856
 
1789
1857
  me.wrapperStyle = Neo.clone(config.wrapperStyle, false);
@@ -1924,8 +1992,8 @@ class Base extends CoreBase {
1924
1992
  * @protected
1925
1993
  */
1926
1994
  onRender(data, autoMount) {
1927
- let me = this,
1928
- app = me.app;
1995
+ let me = this,
1996
+ {app} = me;
1929
1997
 
1930
1998
  me.rendering = false;
1931
1999
 
@@ -1933,15 +2001,15 @@ class Base extends CoreBase {
1933
2001
  if (app) {
1934
2002
  if (!app.rendered) {
1935
2003
  app.rendering = false;
1936
- app.rendered = true;
2004
+ app.rendered = true;
1937
2005
  app.fire('render')
1938
2006
  }
1939
2007
 
1940
2008
  me.vnode = data;
1941
2009
 
1942
- let childIds = ComponentManager.getChildIds(data),
1943
- i = 0,
1944
- len = childIds.length,
2010
+ let childIds = ComponentManager.getChildIds(data),
2011
+ i = 0,
2012
+ len = childIds.length,
1945
2013
  child;
1946
2014
 
1947
2015
  for (; i < len; i++) {
@@ -1974,7 +2042,7 @@ class Base extends CoreBase {
1974
2042
  * @param {Neo.vdom.VNode} vnode= this.vnode
1975
2043
  * @returns {Promise<any>}
1976
2044
  */
1977
- promiseUpdate(vdom=this.vdom, vnode=this.vnode) {
2045
+ promiseUpdate(vdom = this.vdom, vnode = this.vnode) {
1978
2046
  return new Promise((resolve, reject) => {
1979
2047
  this.updateVdom(vdom, vnode, resolve, reject)
1980
2048
  })
@@ -1999,8 +2067,8 @@ class Base extends CoreBase {
1999
2067
  value = [value];
2000
2068
  }
2001
2069
 
2002
- let me = this,
2003
- domListeners = me.domListeners,
2070
+ let me = this,
2071
+ {domListeners} = me,
2004
2072
  i, len;
2005
2073
 
2006
2074
  value.forEach(item => {
@@ -2024,14 +2092,14 @@ class Base extends CoreBase {
2024
2092
  * @returns {Object} all styles of this.el
2025
2093
  */
2026
2094
  removeStyle(value) {
2027
- if (typeof value === 'string') {
2028
- value = [value];
2095
+ if (!Array.isArray(value)) {
2096
+ value = [value]
2029
2097
  }
2030
2098
 
2031
- let style = this.style,
2099
+ let {style} = this,
2032
2100
  doUpdate = false;
2033
2101
 
2034
- Object.entries(style).forEach(key => {
2102
+ Object.keys(style).forEach(key => {
2035
2103
  if (value.indexOf(key) > -1) {
2036
2104
  delete style[key];
2037
2105
  doUpdate = true
@@ -2157,7 +2225,7 @@ class Base extends CoreBase {
2157
2225
  * Convenience shortcut calling set() with the silent flag
2158
2226
  * @param {Object} values={}
2159
2227
  */
2160
- setSilent(values={}) {
2228
+ setSilent(values = {}) {
2161
2229
  return this.set(values, true)
2162
2230
  }
2163
2231
 
@@ -2174,7 +2242,7 @@ class Base extends CoreBase {
2174
2242
 
2175
2243
  if (me.silentVdomUpdate) {
2176
2244
  me.needsVdomUpdate = true
2177
- } else if(me.parentId !== 'document.body') {
2245
+ } else if (me.parentId !== 'document.body') {
2178
2246
  me.parent.update()
2179
2247
  } else {
2180
2248
  !me.mounted && me.render(true)
@@ -2194,7 +2262,7 @@ class Base extends CoreBase {
2194
2262
  * @param {Object} [vdom=this.vdom]
2195
2263
  * @param {Boolean} force=false
2196
2264
  */
2197
- syncVdomIds(vnode=this.vnode, vdom=this.vdom, force=false) {
2265
+ syncVdomIds(vnode = this.vnode, vdom = this.vdom, force = false) {
2198
2266
  VDomUtil.syncVdomIds(vnode, vdom, force)
2199
2267
  }
2200
2268
 
@@ -2250,19 +2318,14 @@ class Base extends CoreBase {
2250
2318
  else if (index === 0 && me.vnode.outerHTML) {
2251
2319
  // console.log('dyn item', me.vnode, me.parentIndex);
2252
2320
  component.vnode.childNodes.splice(me.parentIndex || 0, 0, me.vnode)
2253
- }
2254
-
2255
- else if (!VNodeUtil.replaceChildVnode(component.vnode, me.vnode.id, me.vnode)) {
2321
+ } else if (!VNodeUtil.replaceChildVnode(component.vnode, me.vnode.id, me.vnode)) {
2256
2322
  // todo: can happen for dynamically inserted container items
2257
2323
  // console.warn('syncVnodeTree: Could not replace the parent vnode for', me.vnode.id, component);
2258
2324
  }
2259
2325
  }
2260
2326
  });
2261
2327
 
2262
- if (debug) {
2263
- let end = performance.now();
2264
- console.log('syncVnodeTree', me.id, end - start)
2265
- }
2328
+ debug && console.log('syncVnodeTree', me.id, performance.now() - start)
2266
2329
  }
2267
2330
 
2268
2331
  /**
@@ -2316,7 +2379,7 @@ class Base extends CoreBase {
2316
2379
  */
2317
2380
  updateCls(cls, oldCls, id=this.id) {
2318
2381
  let me = this,
2319
- vnode = me.vnode,
2382
+ {vnode} = me,
2320
2383
  vnodeTarget = vnode && VNodeUtil.findChildVnode(me.vnode, {id})?.vnode;
2321
2384
 
2322
2385
  if (vnode && !Neo.isEqual(cls, oldCls)) {
@@ -2396,9 +2459,8 @@ class Base extends CoreBase {
2396
2459
  * @protected
2397
2460
  */
2398
2461
  updateVdom(vdom=this.vdom, vnode=this.vnode, resolve, reject) {
2399
- let me = this,
2400
- app = me.app,
2401
- mounted = me.mounted,
2462
+ let me = this,
2463
+ {app, mounted, parentId} = me,
2402
2464
  listenerId;
2403
2465
 
2404
2466
  // It is important to keep the vdom tree stable to ensure that containers do not lose the references to their
@@ -2437,8 +2499,8 @@ class Base extends CoreBase {
2437
2499
  }
2438
2500
 
2439
2501
  if (
2440
- !me.needsParentUpdate(me.parentId, resolve)
2441
- && !me.isParentVdomUpdating(me.parentId, resolve)
2502
+ !me.needsParentUpdate(parentId, resolve)
2503
+ && !me.isParentVdomUpdating(parentId, resolve)
2442
2504
  && mounted
2443
2505
  && vnode
2444
2506
  ) {
@@ -42,10 +42,10 @@ class Canvas extends Component {
42
42
  afterSetMounted(value, oldValue) {
43
43
  super.afterSetMounted(value, oldValue);
44
44
 
45
- let me = this,
46
- id = me.getCanvasId(),
47
- offscreen = me.offscreen,
48
- worker = Neo.currentWorker;
45
+ let me = this,
46
+ id = me.getCanvasId(),
47
+ {offscreen} = me,
48
+ worker = Neo.currentWorker;
49
49
 
50
50
  if (value && offscreen) {
51
51
  worker.promiseMessage('main', {
@@ -58,11 +58,11 @@ class Canvas extends Component {
58
58
  node : data.offscreen,
59
59
  nodeId: id
60
60
  }, [data.offscreen]).then(() => {
61
- me.offscreenRegistered = true;
62
- });
63
- });
61
+ me.offscreenRegistered = true
62
+ })
63
+ })
64
64
  } else if (offscreen) {
65
- me.offscreenRegistered = false;
65
+ me.offscreenRegistered = false
66
66
  }
67
67
  }
68
68
 
@@ -71,7 +71,7 @@ class Canvas extends Component {
71
71
  * @returns {String}
72
72
  */
73
73
  getCanvasId() {
74
- return this.id;
74
+ return this.id
75
75
  }
76
76
  }
77
77