neo.mjs 5.17.1 → 6.0.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 (293) hide show
  1. package/apps/ServiceWorker.mjs +2 -2
  2. package/buildScripts/buildThemes.mjs +89 -192
  3. package/buildScripts/createClass.mjs +13 -11
  4. package/buildScripts/watchThemes.mjs +41 -83
  5. package/examples/ServiceWorker.mjs +2 -2
  6. package/examples/component/statusbadge/MainContainer.mjs +160 -45
  7. package/examples/form/field/fileupload/server.mjs +17 -7
  8. package/package.json +2 -2
  9. package/resources/scss/src/Global.scss +7 -7
  10. package/resources/scss/src/apps/covid/HeaderContainer.scss +25 -25
  11. package/resources/scss/src/apps/covid/country/Gallery.scss +6 -6
  12. package/resources/scss/src/apps/covid/country/Helix.scss +8 -8
  13. package/resources/scss/src/apps/covid/country/LineChartComponent.scss +2 -2
  14. package/resources/scss/src/apps/docs/ContentTabContainer.scss +3 -3
  15. package/resources/scss/src/apps/docs/HeaderContainer.scss +8 -8
  16. package/resources/scss/src/apps/docs/MainContainer.scss +1 -1
  17. package/resources/scss/src/apps/docs/classdetails/HeaderComponent.scss +1 -1
  18. package/resources/scss/src/apps/docs/classdetails/MembersList.scss +16 -16
  19. package/resources/scss/src/apps/docs/classdetails/TutorialComponent.scss +3 -3
  20. package/resources/scss/src/apps/website/HeaderContainer.scss +9 -9
  21. package/resources/scss/src/apps/website/MainContainer.scss +3 -3
  22. package/resources/scss/src/apps/website/blog/Container.scss +3 -3
  23. package/resources/scss/src/apps/website/blog/List.scss +8 -8
  24. package/resources/scss/src/apps/website/examples/List.scss +7 -7
  25. package/resources/scss/src/apps/website/home/TabContainer.scss +5 -5
  26. package/resources/scss/src/button/Base.scss +101 -101
  27. package/resources/scss/src/button/Split.scss +3 -3
  28. package/resources/scss/src/calendar/view/EditEventContainer.scss +4 -4
  29. package/resources/scss/src/calendar/view/MainContainer.scss +46 -46
  30. package/resources/scss/src/calendar/view/SettingsContainer.scss +3 -3
  31. package/resources/scss/src/calendar/view/YearComponent.scss +13 -13
  32. package/resources/scss/src/calendar/view/calendars/EditContainer.scss +4 -4
  33. package/resources/scss/src/calendar/view/calendars/List.scss +7 -7
  34. package/resources/scss/src/calendar/view/month/Component.scss +15 -13
  35. package/resources/scss/src/calendar/view/week/Component.scss +12 -12
  36. package/resources/scss/src/calendar/view/week/TimeAxisComponent.scss +4 -4
  37. package/resources/scss/src/component/BoxLabel.scss +5 -5
  38. package/resources/scss/src/component/Chip.scss +13 -13
  39. package/resources/scss/src/component/Circle.scss +2 -2
  40. package/resources/scss/src/component/DateSelector.scss +28 -28
  41. package/resources/scss/src/component/Helix.scss +1 -1
  42. package/resources/scss/src/component/Process.scss +17 -17
  43. package/resources/scss/src/component/Progress.scss +2 -2
  44. package/resources/scss/src/component/Splitter.scss +6 -6
  45. package/resources/scss/src/component/StatusBadge.scss +42 -2
  46. package/resources/scss/src/component/Timer.scss +9 -9
  47. package/resources/scss/src/component/Toast.scss +10 -10
  48. package/resources/scss/src/component/Video.scss +5 -5
  49. package/resources/scss/src/container/Accordion.scss +3 -3
  50. package/resources/scss/src/container/AccordionItem.scss +15 -15
  51. package/resources/scss/src/container/Base.scss +3 -3
  52. package/resources/scss/src/container/Panel.scss +4 -4
  53. package/resources/scss/src/container/Viewport.scss +2 -2
  54. package/resources/scss/src/dialog/Base.scss +8 -8
  55. package/resources/scss/src/draggable/list/DragZone.scss +2 -2
  56. package/resources/scss/src/examples/ConfigurationPanel.scss +3 -3
  57. package/resources/scss/src/examples/calendar/basic/MainContainer.scss +2 -2
  58. package/resources/scss/src/examples/treeSelectionModel/MainContainer.scss +6 -6
  59. package/resources/scss/src/form/Fieldset.scss +4 -4
  60. package/resources/scss/src/form/field/CheckBox.scss +10 -10
  61. package/resources/scss/src/form/field/FileUpload.scss +4 -4
  62. package/resources/scss/src/form/field/Number.scss +5 -5
  63. package/resources/scss/src/form/field/Picker.scss +3 -3
  64. package/resources/scss/src/form/field/Range.scss +5 -5
  65. package/resources/scss/src/form/field/Search.scss +1 -1
  66. package/resources/scss/src/form/field/Select.scss +8 -8
  67. package/resources/scss/src/form/field/Switch.scss +6 -6
  68. package/resources/scss/src/form/field/Text.scss +78 -78
  69. package/resources/scss/src/form/field/TextArea.scss +1 -1
  70. package/resources/scss/src/form/field/trigger/Base.scss +6 -6
  71. package/resources/scss/src/form/field/trigger/Clear.scss +2 -2
  72. package/resources/scss/src/form/field/trigger/CopyToClipboard.scss +3 -3
  73. package/resources/scss/src/form/field/trigger/Time.scss +5 -5
  74. package/resources/scss/src/grid/Container.scss +6 -6
  75. package/resources/scss/src/grid/View.scss +11 -11
  76. package/resources/scss/src/grid/header/Button.scss +5 -5
  77. package/resources/scss/src/grid/header/Toolbar.scss +2 -2
  78. package/resources/scss/src/list/Base.scss +11 -11
  79. package/resources/scss/src/list/Chip.scss +3 -3
  80. package/resources/scss/src/list/Circle.scss +2 -2
  81. package/resources/scss/src/menu/List.scss +21 -21
  82. package/resources/scss/src/menu/Panel.scss +1 -1
  83. package/resources/scss/src/sitemap/Component.scss +2 -2
  84. package/resources/scss/src/tab/Container.scss +1 -1
  85. package/resources/scss/src/tab/Strip.scss +7 -7
  86. package/resources/scss/src/tab/header/Button.scss +26 -26
  87. package/resources/scss/src/tab/header/Toolbar.scss +18 -18
  88. package/resources/scss/src/table/Container.scss +16 -16
  89. package/resources/scss/src/table/View.scss +11 -11
  90. package/resources/scss/src/table/header/Button.scss +5 -5
  91. package/resources/scss/src/toolbar/Base.scss +20 -20
  92. package/resources/scss/src/toolbar/Breadcrumb.scss +1 -1
  93. package/resources/scss/src/tree/List.scss +5 -5
  94. package/resources/scss/theme-dark/Global.scss +7 -17
  95. package/resources/scss/theme-dark/apps/covid/HeaderContainer.scss +10 -23
  96. package/resources/scss/theme-dark/apps/covid/country/Gallery.scss +7 -17
  97. package/resources/scss/theme-dark/apps/covid/country/Helix.scss +8 -19
  98. package/resources/scss/theme-dark/apps/covid/country/LineChartComponent.scss +3 -9
  99. package/resources/scss/theme-dark/apps/docs/ContentTabContainer.scss +4 -11
  100. package/resources/scss/theme-dark/apps/docs/HeaderContainer.scss +10 -23
  101. package/resources/scss/theme-dark/apps/docs/MainContainer.scss +3 -9
  102. package/resources/scss/theme-dark/apps/docs/classdetails/HeaderComponent.scss +4 -11
  103. package/resources/scss/theme-dark/apps/docs/classdetails/MembersList.scss +17 -37
  104. package/resources/scss/theme-dark/apps/docs/classdetails/TutorialComponent.scss +4 -11
  105. package/resources/scss/theme-dark/apps/website/HeaderContainer.scss +5 -13
  106. package/resources/scss/theme-dark/apps/website/MainContainer.scss +4 -11
  107. package/resources/scss/theme-dark/apps/website/blog/Container.scss +3 -9
  108. package/resources/scss/theme-dark/apps/website/home/TabContainer.scss +4 -11
  109. package/resources/scss/theme-dark/button/Base.scss +108 -219
  110. package/resources/scss/theme-dark/calendar/view/EditEventContainer.scss +4 -12
  111. package/resources/scss/theme-dark/calendar/view/MainContainer.scss +22 -48
  112. package/resources/scss/theme-dark/calendar/view/SettingsContainer.scss +4 -11
  113. package/resources/scss/theme-dark/calendar/view/YearComponent.scss +10 -23
  114. package/resources/scss/theme-dark/calendar/view/calendars/EditContainer.scss +4 -12
  115. package/resources/scss/theme-dark/calendar/view/calendars/List.scss +2 -8
  116. package/resources/scss/theme-dark/calendar/view/month/Component.scss +9 -22
  117. package/resources/scss/theme-dark/calendar/view/week/Component.scss +12 -28
  118. package/resources/scss/theme-dark/component/BoxLabel.scss +5 -13
  119. package/resources/scss/theme-dark/component/Chip.scss +14 -31
  120. package/resources/scss/theme-dark/component/DateSelector.scss +24 -52
  121. package/resources/scss/theme-dark/component/Process.scss +9 -21
  122. package/resources/scss/theme-dark/component/Progress.scss +3 -9
  123. package/resources/scss/theme-dark/component/Splitter.scss +4 -12
  124. package/resources/scss/theme-dark/component/StatusBadge.scss +19 -0
  125. package/resources/scss/theme-dark/component/Timer.scss +4 -13
  126. package/resources/scss/theme-dark/component/Toast.scss +8 -20
  127. package/resources/scss/theme-dark/component/Video.scss +3 -10
  128. package/resources/scss/theme-dark/container/Accordion.scss +5 -13
  129. package/resources/scss/theme-dark/container/AccordionItem.scss +10 -23
  130. package/resources/scss/theme-dark/container/Base.scss +4 -11
  131. package/resources/scss/theme-dark/container/Panel.scss +5 -13
  132. package/resources/scss/theme-dark/container/Viewport.scss +3 -9
  133. package/resources/scss/theme-dark/dialog/Base.scss +5 -13
  134. package/resources/scss/theme-dark/examples/ConfigurationPanel.scss +3 -9
  135. package/resources/scss/theme-dark/examples/calendar/basic/MainContainer.scss +3 -10
  136. package/resources/scss/theme-dark/form/Fieldset.scss +5 -14
  137. package/resources/scss/theme-dark/form/field/CheckBox.scss +7 -18
  138. package/resources/scss/theme-dark/form/field/FileUpload.scss +11 -26
  139. package/resources/scss/theme-dark/form/field/Picker.scss +5 -13
  140. package/resources/scss/theme-dark/form/field/Range.scss +4 -11
  141. package/resources/scss/theme-dark/form/field/Search.scss +3 -9
  142. package/resources/scss/theme-dark/form/field/Select.scss +8 -20
  143. package/resources/scss/theme-dark/form/field/Switch.scss +6 -16
  144. package/resources/scss/theme-dark/form/field/Text.scss +31 -66
  145. package/resources/scss/theme-dark/form/field/trigger/Base.scss +5 -14
  146. package/resources/scss/theme-dark/form/field/trigger/Time.scss +3 -10
  147. package/resources/scss/theme-dark/grid/Container.scss +6 -16
  148. package/resources/scss/theme-dark/grid/View.scss +12 -28
  149. package/resources/scss/theme-dark/grid/header/Button.scss +5 -14
  150. package/resources/scss/theme-dark/list/Base.scss +11 -26
  151. package/resources/scss/theme-dark/menu/List.scss +20 -44
  152. package/resources/scss/theme-dark/menu/Panel.scss +2 -8
  153. package/resources/scss/theme-dark/tab/Container.scss +3 -9
  154. package/resources/scss/theme-dark/tab/Strip.scss +5 -13
  155. package/resources/scss/theme-dark/tab/header/Button.scss +29 -62
  156. package/resources/scss/theme-dark/table/Container.scss +9 -22
  157. package/resources/scss/theme-dark/table/View.scss +13 -29
  158. package/resources/scss/theme-dark/table/header/Button.scss +6 -16
  159. package/resources/scss/theme-dark/toolbar/Base.scss +4 -11
  160. package/resources/scss/theme-dark/tree/List.scss +4 -11
  161. package/resources/scss/theme-light/Global.scss +7 -17
  162. package/resources/scss/theme-light/apps/covid/HeaderContainer.scss +10 -23
  163. package/resources/scss/theme-light/apps/covid/country/Gallery.scss +7 -17
  164. package/resources/scss/theme-light/apps/covid/country/Helix.scss +8 -19
  165. package/resources/scss/theme-light/apps/covid/country/LineChartComponent.scss +3 -9
  166. package/resources/scss/theme-light/apps/docs/ContentTabContainer.scss +4 -11
  167. package/resources/scss/theme-light/apps/docs/HeaderContainer.scss +10 -23
  168. package/resources/scss/theme-light/apps/docs/MainContainer.scss +3 -9
  169. package/resources/scss/theme-light/apps/docs/classdetails/HeaderComponent.scss +4 -11
  170. package/resources/scss/theme-light/apps/docs/classdetails/MembersList.scss +17 -37
  171. package/resources/scss/theme-light/apps/docs/classdetails/TutorialComponent.scss +4 -11
  172. package/resources/scss/theme-light/apps/website/HeaderContainer.scss +5 -13
  173. package/resources/scss/theme-light/apps/website/MainContainer.scss +4 -11
  174. package/resources/scss/theme-light/apps/website/blog/Container.scss +3 -9
  175. package/resources/scss/theme-light/apps/website/home/TabContainer.scss +4 -11
  176. package/resources/scss/theme-light/button/Base.scss +107 -218
  177. package/resources/scss/theme-light/calendar/view/EditEventContainer.scss +4 -12
  178. package/resources/scss/theme-light/calendar/view/MainContainer.scss +22 -48
  179. package/resources/scss/theme-light/calendar/view/SettingsContainer.scss +3 -11
  180. package/resources/scss/theme-light/calendar/view/YearComponent.scss +10 -23
  181. package/resources/scss/theme-light/calendar/view/calendars/EditContainer.scss +4 -12
  182. package/resources/scss/theme-light/calendar/view/calendars/List.scss +2 -8
  183. package/resources/scss/theme-light/calendar/view/month/Component.scss +10 -23
  184. package/resources/scss/theme-light/calendar/view/week/Component.scss +12 -28
  185. package/resources/scss/theme-light/component/BoxLabel.scss +5 -13
  186. package/resources/scss/theme-light/component/Chip.scss +14 -31
  187. package/resources/scss/theme-light/component/DateSelector.scss +24 -52
  188. package/resources/scss/theme-light/component/Process.scss +9 -21
  189. package/resources/scss/theme-light/component/Progress.scss +3 -9
  190. package/resources/scss/theme-light/component/Splitter.scss +4 -12
  191. package/resources/scss/theme-light/component/StatusBadge.scss +19 -0
  192. package/resources/scss/theme-light/component/Timer.scss +5 -14
  193. package/resources/scss/theme-light/component/Toast.scss +8 -20
  194. package/resources/scss/theme-light/component/Video.scss +3 -10
  195. package/resources/scss/theme-light/container/Accordion.scss +5 -13
  196. package/resources/scss/theme-light/container/AccordionItem.scss +10 -23
  197. package/resources/scss/theme-light/container/Base.scss +4 -11
  198. package/resources/scss/theme-light/container/Panel.scss +5 -13
  199. package/resources/scss/theme-light/container/Viewport.scss +3 -9
  200. package/resources/scss/theme-light/dialog/Base.scss +5 -13
  201. package/resources/scss/theme-light/examples/ConfigurationPanel.scss +3 -9
  202. package/resources/scss/theme-light/examples/calendar/basic/MainContainer.scss +3 -10
  203. package/resources/scss/theme-light/form/Fieldset.scss +5 -14
  204. package/resources/scss/theme-light/form/field/CheckBox.scss +7 -18
  205. package/resources/scss/theme-light/form/field/FileUpload.scss +11 -26
  206. package/resources/scss/theme-light/form/field/Picker.scss +5 -13
  207. package/resources/scss/theme-light/form/field/Range.scss +4 -11
  208. package/resources/scss/theme-light/form/field/Search.scss +3 -9
  209. package/resources/scss/theme-light/form/field/Select.scss +9 -21
  210. package/resources/scss/theme-light/form/field/Switch.scss +6 -16
  211. package/resources/scss/theme-light/form/field/Text.scss +31 -66
  212. package/resources/scss/theme-light/form/field/trigger/Base.scss +5 -14
  213. package/resources/scss/theme-light/form/field/trigger/Time.scss +3 -10
  214. package/resources/scss/theme-light/grid/Container.scss +6 -16
  215. package/resources/scss/theme-light/grid/View.scss +12 -28
  216. package/resources/scss/theme-light/grid/header/Button.scss +5 -14
  217. package/resources/scss/theme-light/list/Base.scss +12 -27
  218. package/resources/scss/theme-light/menu/List.scss +20 -44
  219. package/resources/scss/theme-light/menu/Panel.scss +2 -8
  220. package/resources/scss/theme-light/tab/Container.scss +3 -9
  221. package/resources/scss/theme-light/tab/Strip.scss +5 -13
  222. package/resources/scss/theme-light/tab/header/Button.scss +29 -62
  223. package/resources/scss/theme-light/table/Container.scss +9 -22
  224. package/resources/scss/theme-light/table/View.scss +13 -29
  225. package/resources/scss/theme-light/table/header/Button.scss +6 -16
  226. package/resources/scss/theme-light/toolbar/Base.scss +4 -11
  227. package/resources/scss/theme-light/tree/List.scss +4 -11
  228. package/src/DefaultConfig.mjs +2 -2
  229. package/src/component/StatusBadge.mjs +434 -7
  230. package/src/form/field/FileUpload.mjs +9 -0
  231. package/src/main/DomAccess.mjs +2 -2
  232. package/src/main/DomEvents.mjs +50 -12
  233. package/resources/scss/mixins/_all.scss +0 -31
  234. package/resources/scss/theme-dark/_all.scss +0 -15
  235. package/resources/scss/theme-dark/apps/_all.scss +0 -3
  236. package/resources/scss/theme-dark/apps/covid/_all.scss +0 -4
  237. package/resources/scss/theme-dark/apps/docs/ExamplesTreeList.scss +0 -0
  238. package/resources/scss/theme-dark/apps/docs/TutorialsTreeList.scss +0 -0
  239. package/resources/scss/theme-dark/apps/docs/_all.scss +0 -6
  240. package/resources/scss/theme-dark/apps/docs/classdetails/HierarchyTreeList.scss +0 -0
  241. package/resources/scss/theme-dark/apps/docs/classdetails/MainContainer.scss +0 -0
  242. package/resources/scss/theme-dark/apps/docs/classdetails/_all.scss +0 -5
  243. package/resources/scss/theme-dark/apps/website/_all.scss +0 -4
  244. package/resources/scss/theme-dark/button/_all.scss +0 -1
  245. package/resources/scss/theme-dark/calendar/_all.scss +0 -8
  246. package/resources/scss/theme-dark/component/Circle.scss +0 -0
  247. package/resources/scss/theme-dark/component/_all.scss +0 -5
  248. package/resources/scss/theme-dark/container/_all.scss +0 -3
  249. package/resources/scss/theme-dark/dialog/_all.scss +0 -1
  250. package/resources/scss/theme-dark/examples/_all.scss +0 -2
  251. package/resources/scss/theme-dark/form/_all.scss +0 -9
  252. package/resources/scss/theme-dark/form/field/trigger/Clear.scss +0 -0
  253. package/resources/scss/theme-dark/form/field/trigger/_all.scss +0 -3
  254. package/resources/scss/theme-dark/grid/_all.scss +0 -3
  255. package/resources/scss/theme-dark/grid/header/Toolbar.scss +0 -0
  256. package/resources/scss/theme-dark/grid/header/_all.scss +0 -2
  257. package/resources/scss/theme-dark/list/_all.scss +0 -1
  258. package/resources/scss/theme-dark/menu/_all.scss +0 -2
  259. package/resources/scss/theme-dark/tab/_all.scss +0 -3
  260. package/resources/scss/theme-dark/table/_all.scss +0 -3
  261. package/resources/scss/theme-dark/table/header/Toolbar.scss +0 -0
  262. package/resources/scss/theme-dark/table/header/_all.scss +0 -2
  263. package/resources/scss/theme-dark/tree/_all.scss +0 -1
  264. package/resources/scss/theme-light/_all.scss +0 -15
  265. package/resources/scss/theme-light/apps/_all.scss +0 -3
  266. package/resources/scss/theme-light/apps/covid/_all.scss +0 -4
  267. package/resources/scss/theme-light/apps/docs/ExamplesTreeList.scss +0 -0
  268. package/resources/scss/theme-light/apps/docs/TutorialsTreeList.scss +0 -0
  269. package/resources/scss/theme-light/apps/docs/_all.scss +0 -6
  270. package/resources/scss/theme-light/apps/docs/classdetails/HierarchyTreeList.scss +0 -0
  271. package/resources/scss/theme-light/apps/docs/classdetails/MainContainer.scss +0 -0
  272. package/resources/scss/theme-light/apps/docs/classdetails/_all.scss +0 -5
  273. package/resources/scss/theme-light/apps/website/_all.scss +0 -4
  274. package/resources/scss/theme-light/button/_all.scss +0 -1
  275. package/resources/scss/theme-light/calendar/_all.scss +0 -8
  276. package/resources/scss/theme-light/component/Circle.scss +0 -0
  277. package/resources/scss/theme-light/component/_all.scss +0 -5
  278. package/resources/scss/theme-light/container/_all.scss +0 -3
  279. package/resources/scss/theme-light/dialog/_all.scss +0 -1
  280. package/resources/scss/theme-light/examples/_all.scss +0 -2
  281. package/resources/scss/theme-light/form/_all.scss +0 -9
  282. package/resources/scss/theme-light/form/field/trigger/Clear.scss +0 -0
  283. package/resources/scss/theme-light/form/field/trigger/_all.scss +0 -3
  284. package/resources/scss/theme-light/grid/_all.scss +0 -3
  285. package/resources/scss/theme-light/grid/header/Toolbar.scss +0 -0
  286. package/resources/scss/theme-light/grid/header/_all.scss +0 -2
  287. package/resources/scss/theme-light/list/_all.scss +0 -1
  288. package/resources/scss/theme-light/menu/_all.scss +0 -2
  289. package/resources/scss/theme-light/tab/_all.scss +0 -3
  290. package/resources/scss/theme-light/table/_all.scss +0 -3
  291. package/resources/scss/theme-light/table/header/Toolbar.scss +0 -0
  292. package/resources/scss/theme-light/table/header/_all.scss +0 -2
  293. package/resources/scss/theme-light/tree/_all.scss +0 -1
@@ -1,11 +1,4 @@
1
- $neoMap: map-merge($neoMap, (
2
- 'toolbar-background-color': #fff,
3
- 'toolbar-padding' : 5px
4
- ));
5
-
6
- @if $useCssVars == true {
7
- :root .neo-theme-light { // .neo-toolbar
8
- --toolbar-background-color: #{neo(toolbar-background-color)};
9
- --toolbar-padding : #{neo(toolbar-padding)};
10
- }
11
- }
1
+ :root .neo-theme-light { // .neo-toolbar
2
+ --toolbar-background-color: #fff;
3
+ --toolbar-padding : 5px;
4
+ }
@@ -1,11 +1,4 @@
1
- $neoMap: map-merge($neoMap, (
2
- 'tree-list-color' : #666,
3
- 'tree-list-menu-item-color': #1c60a0
4
- ));
5
-
6
- @if $useCssVars == true {
7
- :root .neo-theme-light { // .neo-tree-list
8
- --tree-list-color : #{neo(tree-list-color)};
9
- --tree-list-menu-item-color: #{neo(tree-list-menu-item-color)};
10
- }
11
- }
1
+ :root .neo-theme-light { // .neo-tree-list
2
+ --tree-list-color : #666;
3
+ --tree-list-menu-item-color: #1c60a0;
4
+ }
@@ -245,12 +245,12 @@ const DefaultConfig = {
245
245
  useVdomWorker: true,
246
246
  /**
247
247
  * buildScripts/injectPackageVersion.mjs will update this value
248
- * @default '5.17.1'
248
+ * @default '6.0.0'
249
249
  * @memberOf! module:Neo
250
250
  * @name config.version
251
251
  * @type String
252
252
  */
253
- version: '5.17.1'
253
+ version: '6.0.0'
254
254
  };
255
255
 
256
256
  Object.assign(DefaultConfig, {
@@ -1,4 +1,4 @@
1
- import Base from '../component/Base.mjs';
1
+ import Base from '../component/Base.mjs';
2
2
  import NeoArray from '../util/Array.mjs';
3
3
 
4
4
  /**
@@ -8,11 +8,11 @@ import NeoArray from '../util/Array.mjs';
8
8
  class StatusBadge extends Base {
9
9
  /**
10
10
  * Valid values for state
11
- * @member {String[]} states=['error','neutral','success']
11
+ * @member {String[]} states=['alert','error','info','neutral','success']
12
12
  * @protected
13
13
  * @static
14
14
  */
15
- static states = ['error', 'neutral', 'success']
15
+ static states = ['alert', 'error', 'info', 'neutral', 'success']
16
16
 
17
17
  static config = {
18
18
  /**
@@ -30,15 +30,297 @@ class StatusBadge extends Base {
30
30
  * @protected
31
31
  */
32
32
  baseCls: ['neo-status-badge'],
33
+ /**
34
+ * @member {String[]} currentStateIcon=null
35
+ */
36
+ _currentStateIcon: null,
37
+ /**
38
+ * @member {String[]} currentSideIcon=null
39
+ */
40
+ _currentSideIcon: null,
41
+ /**
42
+ * false calls Neo.Main.setRoute()
43
+ * @member {Boolean} deactivateStateIcons=false
44
+ */
45
+ deactivateStateIcons_: false,
46
+ /**
47
+ * false calls Neo.Main.setRoute()
48
+ * @member {Boolean} deactivateSideIcons=false
49
+ */
50
+ deactivateSideIcons_: false,
51
+
52
+ /**
53
+ * @member {String} iconAlert='fa-triangle-exclamation'
54
+ */
55
+ iconAlert_: 'fa fa-triangle-exclamation',
56
+ /**
57
+ * @member {String} iconError='fa-xmark'
58
+ */
59
+ iconError_: 'fa fa-xmark',
60
+ /**
61
+ * @member {String} iconInfo='fa-info'
62
+ */
63
+ iconInfo_: 'fa fa-info',
64
+ /**
65
+ * @member {String} iconNeutral='fa-circle'
66
+ */
67
+ iconNeutral_: 'fa fa-circle',
68
+ /**
69
+ * @member {String} iconSuccess='fa-check'
70
+ */
71
+ iconSuccess_: 'fa fa-check',
72
+
73
+ /**
74
+ * @member {String} sideIconAlert='fa fa-registered'
75
+ */
76
+ sideIconAlert_: 'fa fa-registered',
77
+ /**
78
+ * @member {String} sideIconError='fa fa-registered'
79
+ */
80
+ sideIconError_: 'fa fa-registered',
81
+ /**
82
+ * @member {String} sideIconInfo='fa fa-registered'
83
+ */
84
+ sideIconInfo_: 'fa fa-registered',
85
+ /**
86
+ * @member {String} sideIconNeutral='fa fa-registered'
87
+ */
88
+ sideIconNeutral_: 'fa fa-registered',
89
+ /**
90
+ * @member {String} sideIconSuccess='fa fa-registered'
91
+ */
92
+ sideIconSuccess_: 'fa fa-registered',
93
+
94
+
95
+
96
+ /**
97
+ * @member {String} labelAlert_='Alert'
98
+ */
99
+ labelAlert_: 'Alert',
100
+ /**
101
+ * @member {String} labelError_='Error'
102
+ */
103
+ labelError_: 'Error',
104
+ /**
105
+ * @member {String} labelInfo_='Info'
106
+ */
107
+ labelInfo_: 'Info',
108
+ /**
109
+ * @member {String} labelNeutral_='Neutral'
110
+ */
111
+ labelNeutral_: 'Neutral',
112
+ /**
113
+ * @member {String} labelSuccess_='Success'
114
+ */
115
+ labelSuccess_: 'Success',
116
+
117
+
33
118
  /**
34
119
  * @member {String} state_='neutral'
35
120
  */
36
121
  state_: 'neutral',
37
122
  /**
38
- * @member {Object} vdom
123
+ * @member {Object} _vdom
39
124
  */
40
- vdom:
41
- {}
125
+ _vdom:
126
+ {
127
+ tag: 'div', type: 'div', cn: [
128
+ { tag: 'span', cls: ['neo-state-glyph'] },
129
+ { tag: 'span', cls: ['neo-state-text'] },
130
+ { tag: 'span', cls: ['neo-state-glyph'] }
131
+ ]
132
+ }
133
+ }
134
+
135
+ /**
136
+ * Triggered after the deactivateStateIcons config got changed
137
+ * @param {String|null} value
138
+ * @param {String|null} oldValue
139
+ * @protected
140
+ */
141
+ afterSetDeactivateStateIcons(value, oldValue) {
142
+ this.updateStateIconNode(this._currentStateIcon);
143
+ }
144
+
145
+ /**
146
+ * Triggered after the deactivateSideIcons config got changed
147
+ * @param {String|null} value
148
+ * @param {String|null} oldValue
149
+ * @protected
150
+ */
151
+ afterSetDeactivateSideIcons(value, oldValue) {
152
+ this.updateSideIconNode(this._currentSideIcon);
153
+ }
154
+
155
+ /**
156
+ * Triggered after the labelAlert config got changed
157
+ * @param {String|null} value
158
+ * @param {String|null} oldValue
159
+ * @protected
160
+ */
161
+ afterSetLabelAlert(value, oldValue) {
162
+ if (this.state === 'alert') {
163
+ this.updateLabelNode(value);
164
+ }
165
+ }
166
+ /**
167
+ * Triggered after the iconAlert config got changed
168
+ * @param {String|null} value
169
+ * @param {String|null} oldValue
170
+ * @protected
171
+ */
172
+ afterSetIconAlert(value, oldValue) {
173
+ if (this.state === 'alert') {
174
+ this.updateStateIconNode(value);
175
+ }
176
+ }
177
+ /**
178
+ * Triggered after the sideIconAlert config got changed
179
+ * @param {String|null} value
180
+ * @param {String|null} oldValue
181
+ * @protected
182
+ */
183
+ afterSetSideIconAlert(value, oldValue) {
184
+ if (this.state === 'alert') {
185
+ this.updateSideIconNode(value);
186
+ }
187
+ }
188
+
189
+ /**
190
+ * Triggered after the labelError config got changed
191
+ * @param {String|null} value
192
+ * @param {String|null} oldValue
193
+ * @protected
194
+ */
195
+ afterSetLabelError(value, oldValue) {
196
+ if (this.state === 'error') {
197
+ this.updateLabelNode(value);
198
+ }
199
+ }
200
+ /**
201
+ * Triggered after the iconError config got changed
202
+ * @param {String|null} value
203
+ * @param {String|null} oldValue
204
+ * @protected
205
+ */
206
+ afterSetIconError(value, oldValue) {
207
+ if (this.state === 'error') {
208
+ this.updateStateIconNode(value);
209
+ }
210
+ }
211
+ /**
212
+ * Triggered after the sideIconError config got changed
213
+ * @param {String|null} value
214
+ * @param {String|null} oldValue
215
+ * @protected
216
+ */
217
+ afterSetSideIconError(value, oldValue) {
218
+ if (this.state === 'error') {
219
+ this.updateSideIconNode(value);
220
+ }
221
+ }
222
+
223
+
224
+ /**
225
+ * Triggered after the labelInfo config got changed
226
+ * @param {String|null} value
227
+ * @param {String|null} oldValue
228
+ * @protected
229
+ */
230
+ afterSetLabelInfo(value, oldValue) {
231
+ if (this.state === 'info') {
232
+ this.updateLabelNode(value);
233
+ }
234
+ }
235
+ /**
236
+ * Triggered after the iconInfo config got changed
237
+ * @param {String|null} value
238
+ * @param {String|null} oldValue
239
+ * @protected
240
+ */
241
+ afterSetIconInfo(value, oldValue) {
242
+ if (this.state === 'info') {
243
+ this.updateStateIconNode(value);
244
+ }
245
+ }
246
+ /**
247
+ * Triggered after the sideIconInfo config got changed
248
+ * @param {String|null} value
249
+ * @param {String|null} oldValue
250
+ * @protected
251
+ */
252
+ afterSetSideIconInfo(value, oldValue) {
253
+ if (this.state === 'info') {
254
+ this.updateSideIconNode(value);
255
+ }
256
+ }
257
+
258
+ /**
259
+ * Triggered after the labelNeutral config got changed
260
+ * @param {String|null} value
261
+ * @param {String|null} oldValue
262
+ * @protected
263
+ */
264
+ afterSetLabelNeutral(value, oldValue) {
265
+ if (this.state === 'neutral') {
266
+ this.updateLabelNode(value);
267
+ }
268
+ }
269
+ /**
270
+ * Triggered after the iconNeutral config got changed
271
+ * @param {String|null} value
272
+ * @param {String|null} oldValue
273
+ * @protected
274
+ */
275
+ afterSetIconNeutral(value, oldValue) {
276
+ if (this.state === 'neutral') {
277
+ this.updateStateIconNode(value);
278
+ }
279
+ }
280
+ /**
281
+ * Triggered after the sideIconNeutral config got changed
282
+ * @param {String|null} value
283
+ * @param {String|null} oldValue
284
+ * @protected
285
+ */
286
+ afterSetSideIconNeutral(value, oldValue) {
287
+ if (this.state === 'neutral') {
288
+ this.updateSideIconNode(value);
289
+ }
290
+ }
291
+
292
+ /**
293
+ * Triggered after the labelSuccess config got changed
294
+ * @param {String|null} value
295
+ * @param {String|null} oldValue
296
+ * @protected
297
+ */
298
+ afterSetLabelSuccess(value, oldValue) {
299
+ if (this.state === 'success') {
300
+ this.updateLabelNode(value);
301
+ }
302
+ }
303
+ /**
304
+ * Triggered after the iconSuccess config got changed
305
+ * @param {String|null} value
306
+ * @param {String|null} oldValue
307
+ * @protected
308
+ */
309
+ afterSetIconSuccess(value, oldValue) {
310
+ if (this.state === 'success') {
311
+ this.updateStateIconNode(value);
312
+ }
313
+ }
314
+ /**
315
+ * Triggered after the sideIconSuccess config got changed
316
+ * @param {String|null} value
317
+ * @param {String|null} oldValue
318
+ * @protected
319
+ */
320
+ afterSetSideIconSuccess(value, oldValue) {
321
+ if (this.state === 'success') {
322
+ this.updateSideIconNode(value);
323
+ }
42
324
  }
43
325
 
44
326
  /**
@@ -48,12 +330,58 @@ class StatusBadge extends Base {
48
330
  * @protected
49
331
  */
50
332
  afterSetState(value, oldValue) {
51
- let cls = this.cls;
333
+
334
+ let cls = this.cls,
335
+ me = this,
336
+ isEmpty = !value || value === '',
337
+ vdomRoot = me.getVdomRoot(),
338
+ labelNode = vdomRoot.cn[1];
52
339
 
53
340
  NeoArray.remove(cls, 'neo-state-' + oldValue);
54
341
  NeoArray.add(cls, 'neo-state-' + value);
55
342
 
56
343
  this.cls = cls
344
+
345
+ labelNode.removeDom = isEmpty;
346
+
347
+ if (!isEmpty) {
348
+ let showLabel = '';
349
+ let showStateIcon = '';
350
+ let showSideIcon = '';
351
+
352
+ switch (value) {
353
+ case 'alert':
354
+ showLabel = me.labelAlert;
355
+ showStateIcon = me.iconAlert;
356
+ showSideIcon = me.sideIconAlert;
357
+ break;
358
+ case 'error':
359
+ showLabel = me.labelError;
360
+ showStateIcon = me.iconError;
361
+ showSideIcon = me.sideIconError;
362
+ break;
363
+ case 'info':
364
+ showLabel = me.labelInfo;
365
+ showStateIcon = me.iconInfo;
366
+ showSideIcon = me.sideIconInfo;
367
+ break;
368
+ case 'neutral':
369
+ showLabel = me.labelNeutral;
370
+ showStateIcon = me.iconNeutral;
371
+ showSideIcon = me.sideIconNeutral;
372
+ break;
373
+ case 'success':
374
+ showLabel = me.labelSuccess;
375
+ showStateIcon = me.iconSuccess;
376
+ showSideIcon = me.sideIconSuccess;
377
+ break;
378
+ }
379
+ labelNode.innerHTML = showLabel;
380
+ this.updateStateIconNode(showStateIcon);
381
+ this.updateSideIconNode(showSideIcon);
382
+ }
383
+
384
+ me.update();
57
385
  }
58
386
 
59
387
  /**
@@ -66,6 +394,105 @@ class StatusBadge extends Base {
66
394
  beforeSetState(value, oldValue) {
67
395
  return this.beforeSetEnumValue(value, oldValue, 'state')
68
396
  }
397
+
398
+ /**
399
+ * Convenience shortcut
400
+ * @returns {Object}
401
+ */
402
+ updateLabelNode(value) {
403
+ let labelNode = this.getVdomRoot().cn[1];
404
+
405
+ labelNode.innerHTML = value;
406
+ labelNode.removeDom = !Boolean(value);
407
+
408
+ this.update();
409
+ }
410
+
411
+ /**
412
+ * Convenience shortcut
413
+ * @returns {Object}
414
+ */
415
+ updateStateIconNode(value) {
416
+ let iconNode = this.getStateIconNode();
417
+ let currentValue = this._currentStateIcon;
418
+
419
+ if (value && !Array.isArray(value)) {
420
+ value = value.split(' ').filter(Boolean);
421
+ }
422
+ if (currentValue && !Array.isArray(currentValue)) {
423
+ currentValue = value.split(' ').filter(Boolean);
424
+ }
425
+
426
+ NeoArray.remove(iconNode.cls, currentValue);
427
+ NeoArray.add(iconNode.cls, value);
428
+
429
+ iconNode.removeDom = !value || value === '' || this.deactivateStateIcons;
430
+
431
+ this._currentStateIcon = value;
432
+ this.update();
433
+ }
434
+
435
+ /**
436
+ * Convenience shortcut
437
+ * @returns {Object}
438
+ */
439
+ getStateIconNode() {
440
+ return this.getVdomRoot().cn[0]
441
+ }
442
+
443
+
444
+ /**
445
+ * Triggered after the StateIcon config got changed
446
+ * @param {String|null} value
447
+ * @param {String|null} oldValue
448
+ * @protected
449
+ */
450
+ afterSetStateIcon(value, oldValue) {
451
+ this.updateStateIconNode(value, oldValue);
452
+ }
453
+
454
+ /**
455
+ * Convenience shortcut
456
+ * @returns {Object}
457
+ */
458
+ updateSideIconNode(value) {
459
+ let iconNode = this.getSideIconNode();
460
+ let currentValue = this._currentSideIcon;
461
+
462
+ if (value && !Array.isArray(value)) {
463
+ value = value.split(' ').filter(Boolean);
464
+ }
465
+ if (currentValue && !Array.isArray(currentValue)) {
466
+ currentValue = value.split(' ').filter(Boolean);
467
+ }
468
+
469
+ NeoArray.remove(iconNode.cls, currentValue);
470
+ NeoArray.add(iconNode.cls, value);
471
+
472
+ iconNode.removeDom = !value || value === '' || this.deactivateSideIcons;
473
+
474
+ this._currentSideIcon = value;
475
+ this.update();
476
+ }
477
+
478
+ /**
479
+ * Convenience shortcut
480
+ * @returns {Object}
481
+ */
482
+ getSideIconNode() {
483
+ return this.getVdomRoot().cn[2]
484
+ }
485
+
486
+
487
+ /**
488
+ * Triggered after the StateIcon config got changed
489
+ * @param {String|null} value
490
+ * @param {String|null} oldValue
491
+ * @protected
492
+ */
493
+ afterSetSideIcon(value, oldValue) {
494
+ this.updateSideIconNode(value, oldValue);
495
+ }
69
496
  }
70
497
 
71
498
  Neo.applyClassConfig(StatusBadge);
@@ -281,6 +281,14 @@ class FileUpload extends Base {
281
281
  */
282
282
  documentDeleteUrl_ : null,
283
283
 
284
+ /**
285
+ * The HTTP method to use when requesting a document deletion using the {@link #member-documentDeleteUrl}.
286
+ *
287
+ * Defaults to `DELETE`.
288
+ * @member {String} documentDeleteMethod
289
+ */
290
+ documentDeleteMethod : 'DELETE',
291
+
284
292
  /**
285
293
  * @member {String} state_=null
286
294
  */
@@ -545,6 +553,7 @@ class FileUpload extends Base {
545
553
 
546
554
  // We ask the server to delete using our this.documentId
547
555
  const statusResponse = await fetch(me.documentDeleteUrl, {
556
+ method : me.documentDeleteMethod,
548
557
  headers
549
558
  });
550
559
 
@@ -509,8 +509,8 @@ class DomAccess extends Base {
509
509
  */
510
510
  selectNode(data) {
511
511
  let node = this.getElement(data.id),
512
- start = Neo.isNumber(data.start) || 0,
513
- end = Neo.isNumber(data.end) || 99999;
512
+ start = Neo.isNumber(data.start) ? data.start : 0,
513
+ end = Neo.isNumber(data.end) ? data.end : 99999;
514
514
 
515
515
  if (node) {
516
516
  node.select();
@@ -118,6 +118,7 @@ class DomEvents extends Base {
118
118
 
119
119
  let me = this;
120
120
 
121
+ document.addEventListener('selectionchange', me.onSelectionChange .bind(me));
121
122
  document.addEventListener('DOMContentLoaded', me.onDomContentLoaded.bind(me));
122
123
  window .addEventListener('hashchange', me.onHashChange .bind(me));
123
124
 
@@ -331,6 +332,16 @@ class DomEvents extends Base {
331
332
  return path
332
333
  }
333
334
 
335
+ getSelectionPath(path, target) {
336
+ if (target.parentNode && target.id.split('__').length > 1) {
337
+ path = this.getSelectionPath(path, target.parentNode);
338
+ }
339
+
340
+ path.push(this.getTargetData(target));
341
+
342
+ return path;
343
+ }
344
+
334
345
  /**
335
346
  * @param {Object} node
336
347
  * @returns {Object}
@@ -388,7 +399,7 @@ class DomEvents extends Base {
388
399
  let manager = Neo.worker.Manager;
389
400
 
390
401
  manager.appNames.forEach(appName => {
391
- manager.broadcast({action : 'disconnect', appName})
402
+ manager.broadcast({action: 'disconnect', appName})
392
403
  })
393
404
  }
394
405
 
@@ -401,11 +412,11 @@ class DomEvents extends Base {
401
412
  tagName = target.tagName,
402
413
  value = target.value,
403
414
 
404
- data = {
405
- ...me.getEventData(event),
406
- valid: target.checkValidity(),
407
- value: tagName === 'INPUT' ? StringUtil.escapeHtml(value) : tagName === 'TEXTAREA' ? me.stripHtml(value) : value
408
- };
415
+ data = {
416
+ ...me.getEventData(event),
417
+ valid: target.checkValidity(),
418
+ value: tagName === 'INPUT' ? StringUtil.escapeHtml(value) : tagName === 'TEXTAREA' ? me.stripHtml(value) : value
419
+ };
409
420
 
410
421
  // input and change events can pass a FileList for input type file
411
422
  if (target.files) {
@@ -489,8 +500,8 @@ class DomEvents extends Base {
489
500
  manager.sendMessage('app', {
490
501
  action: 'hashChange',
491
502
  data : {
492
- appNames : manager.appNames,
493
- hash : this.parseHash(hashString),
503
+ appNames: manager.appNames,
504
+ hash : this.parseHash(hashString),
494
505
  hashString
495
506
  }
496
507
  })
@@ -575,6 +586,33 @@ class DomEvents extends Base {
575
586
  })
576
587
  }
577
588
 
589
+ /**
590
+ * @param {Object} event
591
+ */
592
+ onSelectionChange(event) {
593
+ const me = this,
594
+ target = event.target.activeElement;
595
+
596
+ if (target.tagName === 'BODY') return;
597
+
598
+
599
+ const targetData = me.getTargetData(target),
600
+ path = me.getSelectionPath([], target),
601
+ outputEvent = {
602
+ selection: {
603
+ start : target.selectionStart,
604
+ end : target.selectionEnd,
605
+ direction: target.selectionDirection
606
+ },
607
+ path : path,
608
+ target : targetData,
609
+ timeStamp: event.timeStamp,
610
+ type : "selectionchange"
611
+ };
612
+
613
+ me.sendMessageToApp(outputEvent);
614
+ }
615
+
578
616
  /**
579
617
  * @param {Object} event
580
618
  */
@@ -599,7 +637,7 @@ class DomEvents extends Base {
599
637
  }
600
638
  }
601
639
 
602
- if (!preventUpdate) {
640
+ if (!preventUpdate) {
603
641
  let {deltaX, deltaY, deltaZ} = event;
604
642
 
605
643
  this.sendMessageToApp({
@@ -659,7 +697,7 @@ class DomEvents extends Base {
659
697
  parts.push('')
660
698
  }
661
699
 
662
- key = decodeURIComponent(parts[0]);
700
+ key = decodeURIComponent(parts[0]);
663
701
  value = decodeURIComponent(parts[1]);
664
702
 
665
703
  if (key.indexOf('[]') !== -1) {
@@ -770,10 +808,10 @@ class DomEvents extends Base {
770
808
  for (; i < len; i++) {
771
809
  node = path[i];
772
810
 
773
- for (j=0; j < countTargets; j++) {
811
+ for (j = 0; j < countTargets; j++) {
774
812
  if (node.classList?.contains(targetArray[j])) {
775
813
  return {
776
- cls : targetArray[j],
814
+ cls: targetArray[j],
777
815
  node
778
816
  };
779
817
  }