neo.mjs 5.18.0 → 6.0.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 (304) 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/fieldWithPrefix/MainContainer.mjs +151 -0
  7. package/examples/fieldWithPrefix/app.mjs +6 -0
  8. package/examples/fieldWithPrefix/index.html +11 -0
  9. package/examples/fieldWithPrefix/neo-config.json +7 -0
  10. package/examples/form/field/fileupload/MainContainer.mjs +1 -1
  11. package/examples/form/field/fileupload/server.mjs +2 -2
  12. package/package.json +2 -2
  13. package/resources/scss/src/Global.scss +7 -7
  14. package/resources/scss/src/apps/covid/HeaderContainer.scss +25 -25
  15. package/resources/scss/src/apps/covid/country/Gallery.scss +6 -6
  16. package/resources/scss/src/apps/covid/country/Helix.scss +8 -8
  17. package/resources/scss/src/apps/covid/country/LineChartComponent.scss +2 -2
  18. package/resources/scss/src/apps/docs/ContentTabContainer.scss +3 -3
  19. package/resources/scss/src/apps/docs/HeaderContainer.scss +8 -8
  20. package/resources/scss/src/apps/docs/MainContainer.scss +1 -1
  21. package/resources/scss/src/apps/docs/classdetails/HeaderComponent.scss +1 -1
  22. package/resources/scss/src/apps/docs/classdetails/MembersList.scss +16 -16
  23. package/resources/scss/src/apps/docs/classdetails/TutorialComponent.scss +3 -3
  24. package/resources/scss/src/apps/website/HeaderContainer.scss +9 -9
  25. package/resources/scss/src/apps/website/MainContainer.scss +3 -3
  26. package/resources/scss/src/apps/website/blog/Container.scss +3 -3
  27. package/resources/scss/src/apps/website/blog/List.scss +8 -8
  28. package/resources/scss/src/apps/website/examples/List.scss +7 -7
  29. package/resources/scss/src/apps/website/home/TabContainer.scss +5 -5
  30. package/resources/scss/src/button/Base.scss +101 -101
  31. package/resources/scss/src/button/Split.scss +3 -3
  32. package/resources/scss/src/calendar/view/EditEventContainer.scss +4 -4
  33. package/resources/scss/src/calendar/view/MainContainer.scss +46 -46
  34. package/resources/scss/src/calendar/view/SettingsContainer.scss +3 -3
  35. package/resources/scss/src/calendar/view/YearComponent.scss +13 -13
  36. package/resources/scss/src/calendar/view/calendars/EditContainer.scss +4 -4
  37. package/resources/scss/src/calendar/view/calendars/List.scss +7 -7
  38. package/resources/scss/src/calendar/view/month/Component.scss +15 -13
  39. package/resources/scss/src/calendar/view/week/Component.scss +12 -12
  40. package/resources/scss/src/calendar/view/week/TimeAxisComponent.scss +4 -4
  41. package/resources/scss/src/component/BoxLabel.scss +5 -5
  42. package/resources/scss/src/component/Chip.scss +13 -13
  43. package/resources/scss/src/component/Circle.scss +2 -2
  44. package/resources/scss/src/component/DateSelector.scss +28 -28
  45. package/resources/scss/src/component/Helix.scss +1 -1
  46. package/resources/scss/src/component/Process.scss +17 -17
  47. package/resources/scss/src/component/Progress.scss +2 -2
  48. package/resources/scss/src/component/Splitter.scss +6 -6
  49. package/resources/scss/src/component/StatusBadge.scss +21 -21
  50. package/resources/scss/src/component/Timer.scss +9 -9
  51. package/resources/scss/src/component/Toast.scss +10 -10
  52. package/resources/scss/src/component/Video.scss +5 -5
  53. package/resources/scss/src/container/Accordion.scss +3 -3
  54. package/resources/scss/src/container/AccordionItem.scss +15 -15
  55. package/resources/scss/src/container/Base.scss +3 -3
  56. package/resources/scss/src/container/Panel.scss +4 -4
  57. package/resources/scss/src/container/Viewport.scss +2 -2
  58. package/resources/scss/src/dialog/Base.scss +8 -8
  59. package/resources/scss/src/draggable/list/DragZone.scss +2 -2
  60. package/resources/scss/src/examples/ConfigurationPanel.scss +3 -3
  61. package/resources/scss/src/examples/calendar/basic/MainContainer.scss +2 -2
  62. package/resources/scss/src/examples/fieldWithPrefix/MainContainer.scss +25 -0
  63. package/resources/scss/src/examples/treeSelectionModel/MainContainer.scss +6 -6
  64. package/resources/scss/src/form/Fieldset.scss +4 -4
  65. package/resources/scss/src/form/field/CheckBox.scss +10 -10
  66. package/resources/scss/src/form/field/FileUpload.scss +25 -12
  67. package/resources/scss/src/form/field/Number.scss +5 -5
  68. package/resources/scss/src/form/field/Picker.scss +3 -3
  69. package/resources/scss/src/form/field/Range.scss +5 -5
  70. package/resources/scss/src/form/field/Search.scss +1 -1
  71. package/resources/scss/src/form/field/Select.scss +8 -8
  72. package/resources/scss/src/form/field/Switch.scss +6 -6
  73. package/resources/scss/src/form/field/Text.scss +78 -78
  74. package/resources/scss/src/form/field/TextArea.scss +1 -1
  75. package/resources/scss/src/form/field/trigger/Base.scss +6 -6
  76. package/resources/scss/src/form/field/trigger/Clear.scss +2 -2
  77. package/resources/scss/src/form/field/trigger/CopyToClipboard.scss +3 -3
  78. package/resources/scss/src/form/field/trigger/Time.scss +5 -5
  79. package/resources/scss/src/grid/Container.scss +6 -6
  80. package/resources/scss/src/grid/View.scss +11 -11
  81. package/resources/scss/src/grid/header/Button.scss +5 -5
  82. package/resources/scss/src/grid/header/Toolbar.scss +2 -2
  83. package/resources/scss/src/list/Base.scss +11 -11
  84. package/resources/scss/src/list/Chip.scss +3 -3
  85. package/resources/scss/src/list/Circle.scss +2 -2
  86. package/resources/scss/src/menu/List.scss +21 -21
  87. package/resources/scss/src/menu/Panel.scss +1 -1
  88. package/resources/scss/src/plugin/PrefixField.scss +5 -0
  89. package/resources/scss/src/sitemap/Component.scss +2 -2
  90. package/resources/scss/src/tab/Container.scss +1 -1
  91. package/resources/scss/src/tab/Strip.scss +7 -7
  92. package/resources/scss/src/tab/header/Button.scss +26 -26
  93. package/resources/scss/src/tab/header/Toolbar.scss +18 -18
  94. package/resources/scss/src/table/Container.scss +16 -16
  95. package/resources/scss/src/table/View.scss +11 -11
  96. package/resources/scss/src/table/header/Button.scss +5 -5
  97. package/resources/scss/src/toolbar/Base.scss +20 -20
  98. package/resources/scss/src/toolbar/Breadcrumb.scss +1 -1
  99. package/resources/scss/src/tree/List.scss +5 -5
  100. package/resources/scss/theme-dark/Global.scss +7 -17
  101. package/resources/scss/theme-dark/apps/covid/HeaderContainer.scss +10 -23
  102. package/resources/scss/theme-dark/apps/covid/country/Gallery.scss +7 -17
  103. package/resources/scss/theme-dark/apps/covid/country/Helix.scss +8 -19
  104. package/resources/scss/theme-dark/apps/covid/country/LineChartComponent.scss +3 -9
  105. package/resources/scss/theme-dark/apps/docs/ContentTabContainer.scss +4 -11
  106. package/resources/scss/theme-dark/apps/docs/HeaderContainer.scss +10 -23
  107. package/resources/scss/theme-dark/apps/docs/MainContainer.scss +3 -9
  108. package/resources/scss/theme-dark/apps/docs/classdetails/HeaderComponent.scss +4 -11
  109. package/resources/scss/theme-dark/apps/docs/classdetails/MembersList.scss +17 -37
  110. package/resources/scss/theme-dark/apps/docs/classdetails/TutorialComponent.scss +4 -11
  111. package/resources/scss/theme-dark/apps/website/HeaderContainer.scss +5 -13
  112. package/resources/scss/theme-dark/apps/website/MainContainer.scss +4 -11
  113. package/resources/scss/theme-dark/apps/website/blog/Container.scss +3 -9
  114. package/resources/scss/theme-dark/apps/website/home/TabContainer.scss +4 -11
  115. package/resources/scss/theme-dark/button/Base.scss +108 -219
  116. package/resources/scss/theme-dark/calendar/view/EditEventContainer.scss +4 -12
  117. package/resources/scss/theme-dark/calendar/view/MainContainer.scss +22 -48
  118. package/resources/scss/theme-dark/calendar/view/SettingsContainer.scss +4 -11
  119. package/resources/scss/theme-dark/calendar/view/YearComponent.scss +10 -23
  120. package/resources/scss/theme-dark/calendar/view/calendars/EditContainer.scss +4 -12
  121. package/resources/scss/theme-dark/calendar/view/calendars/List.scss +2 -8
  122. package/resources/scss/theme-dark/calendar/view/month/Component.scss +9 -22
  123. package/resources/scss/theme-dark/calendar/view/week/Component.scss +12 -28
  124. package/resources/scss/theme-dark/component/BoxLabel.scss +5 -13
  125. package/resources/scss/theme-dark/component/Chip.scss +14 -31
  126. package/resources/scss/theme-dark/component/DateSelector.scss +24 -52
  127. package/resources/scss/theme-dark/component/Process.scss +9 -21
  128. package/resources/scss/theme-dark/component/Progress.scss +3 -9
  129. package/resources/scss/theme-dark/component/Splitter.scss +4 -12
  130. package/resources/scss/theme-dark/component/StatusBadge.scss +19 -41
  131. package/resources/scss/theme-dark/component/Timer.scss +4 -13
  132. package/resources/scss/theme-dark/component/Toast.scss +8 -20
  133. package/resources/scss/theme-dark/component/Video.scss +3 -10
  134. package/resources/scss/theme-dark/container/Accordion.scss +5 -13
  135. package/resources/scss/theme-dark/container/AccordionItem.scss +10 -23
  136. package/resources/scss/theme-dark/container/Base.scss +4 -11
  137. package/resources/scss/theme-dark/container/Panel.scss +5 -13
  138. package/resources/scss/theme-dark/container/Viewport.scss +3 -9
  139. package/resources/scss/theme-dark/dialog/Base.scss +5 -13
  140. package/resources/scss/theme-dark/examples/ConfigurationPanel.scss +3 -9
  141. package/resources/scss/theme-dark/examples/calendar/basic/MainContainer.scss +3 -10
  142. package/resources/scss/theme-dark/form/Fieldset.scss +5 -14
  143. package/resources/scss/theme-dark/form/field/CheckBox.scss +7 -18
  144. package/resources/scss/theme-dark/form/field/FileUpload.scss +11 -26
  145. package/resources/scss/theme-dark/form/field/Picker.scss +5 -13
  146. package/resources/scss/theme-dark/form/field/Range.scss +4 -11
  147. package/resources/scss/theme-dark/form/field/Search.scss +3 -9
  148. package/resources/scss/theme-dark/form/field/Select.scss +8 -20
  149. package/resources/scss/theme-dark/form/field/Switch.scss +6 -16
  150. package/resources/scss/theme-dark/form/field/Text.scss +31 -66
  151. package/resources/scss/theme-dark/form/field/trigger/Base.scss +5 -14
  152. package/resources/scss/theme-dark/form/field/trigger/Time.scss +3 -10
  153. package/resources/scss/theme-dark/grid/Container.scss +6 -16
  154. package/resources/scss/theme-dark/grid/View.scss +12 -28
  155. package/resources/scss/theme-dark/grid/header/Button.scss +5 -14
  156. package/resources/scss/theme-dark/list/Base.scss +11 -26
  157. package/resources/scss/theme-dark/menu/List.scss +20 -44
  158. package/resources/scss/theme-dark/menu/Panel.scss +2 -8
  159. package/resources/scss/theme-dark/tab/Container.scss +3 -9
  160. package/resources/scss/theme-dark/tab/Strip.scss +5 -13
  161. package/resources/scss/theme-dark/tab/header/Button.scss +29 -62
  162. package/resources/scss/theme-dark/table/Container.scss +9 -22
  163. package/resources/scss/theme-dark/table/View.scss +13 -29
  164. package/resources/scss/theme-dark/table/header/Button.scss +6 -16
  165. package/resources/scss/theme-dark/toolbar/Base.scss +4 -11
  166. package/resources/scss/theme-dark/tree/List.scss +4 -11
  167. package/resources/scss/theme-light/Global.scss +7 -17
  168. package/resources/scss/theme-light/apps/covid/HeaderContainer.scss +10 -23
  169. package/resources/scss/theme-light/apps/covid/country/Gallery.scss +7 -17
  170. package/resources/scss/theme-light/apps/covid/country/Helix.scss +8 -19
  171. package/resources/scss/theme-light/apps/covid/country/LineChartComponent.scss +3 -9
  172. package/resources/scss/theme-light/apps/docs/ContentTabContainer.scss +4 -11
  173. package/resources/scss/theme-light/apps/docs/HeaderContainer.scss +10 -23
  174. package/resources/scss/theme-light/apps/docs/MainContainer.scss +3 -9
  175. package/resources/scss/theme-light/apps/docs/classdetails/HeaderComponent.scss +4 -11
  176. package/resources/scss/theme-light/apps/docs/classdetails/MembersList.scss +17 -37
  177. package/resources/scss/theme-light/apps/docs/classdetails/TutorialComponent.scss +4 -11
  178. package/resources/scss/theme-light/apps/website/HeaderContainer.scss +5 -13
  179. package/resources/scss/theme-light/apps/website/MainContainer.scss +4 -11
  180. package/resources/scss/theme-light/apps/website/blog/Container.scss +3 -9
  181. package/resources/scss/theme-light/apps/website/home/TabContainer.scss +4 -11
  182. package/resources/scss/theme-light/button/Base.scss +107 -218
  183. package/resources/scss/theme-light/calendar/view/EditEventContainer.scss +4 -12
  184. package/resources/scss/theme-light/calendar/view/MainContainer.scss +22 -48
  185. package/resources/scss/theme-light/calendar/view/SettingsContainer.scss +3 -11
  186. package/resources/scss/theme-light/calendar/view/YearComponent.scss +10 -23
  187. package/resources/scss/theme-light/calendar/view/calendars/EditContainer.scss +4 -12
  188. package/resources/scss/theme-light/calendar/view/calendars/List.scss +2 -8
  189. package/resources/scss/theme-light/calendar/view/month/Component.scss +10 -23
  190. package/resources/scss/theme-light/calendar/view/week/Component.scss +12 -28
  191. package/resources/scss/theme-light/component/BoxLabel.scss +5 -13
  192. package/resources/scss/theme-light/component/Chip.scss +14 -31
  193. package/resources/scss/theme-light/component/DateSelector.scss +24 -52
  194. package/resources/scss/theme-light/component/Process.scss +9 -21
  195. package/resources/scss/theme-light/component/Progress.scss +3 -9
  196. package/resources/scss/theme-light/component/Splitter.scss +4 -12
  197. package/resources/scss/theme-light/component/StatusBadge.scss +19 -41
  198. package/resources/scss/theme-light/component/Timer.scss +5 -14
  199. package/resources/scss/theme-light/component/Toast.scss +8 -20
  200. package/resources/scss/theme-light/component/Video.scss +3 -10
  201. package/resources/scss/theme-light/container/Accordion.scss +5 -13
  202. package/resources/scss/theme-light/container/AccordionItem.scss +10 -23
  203. package/resources/scss/theme-light/container/Base.scss +4 -11
  204. package/resources/scss/theme-light/container/Panel.scss +5 -13
  205. package/resources/scss/theme-light/container/Viewport.scss +3 -9
  206. package/resources/scss/theme-light/dialog/Base.scss +5 -13
  207. package/resources/scss/theme-light/examples/ConfigurationPanel.scss +3 -9
  208. package/resources/scss/theme-light/examples/calendar/basic/MainContainer.scss +3 -10
  209. package/resources/scss/theme-light/form/Fieldset.scss +5 -14
  210. package/resources/scss/theme-light/form/field/CheckBox.scss +7 -18
  211. package/resources/scss/theme-light/form/field/FileUpload.scss +11 -26
  212. package/resources/scss/theme-light/form/field/Picker.scss +5 -13
  213. package/resources/scss/theme-light/form/field/Range.scss +4 -11
  214. package/resources/scss/theme-light/form/field/Search.scss +3 -9
  215. package/resources/scss/theme-light/form/field/Select.scss +9 -21
  216. package/resources/scss/theme-light/form/field/Switch.scss +6 -16
  217. package/resources/scss/theme-light/form/field/Text.scss +31 -66
  218. package/resources/scss/theme-light/form/field/trigger/Base.scss +5 -14
  219. package/resources/scss/theme-light/form/field/trigger/Time.scss +3 -10
  220. package/resources/scss/theme-light/grid/Container.scss +6 -16
  221. package/resources/scss/theme-light/grid/View.scss +12 -28
  222. package/resources/scss/theme-light/grid/header/Button.scss +5 -14
  223. package/resources/scss/theme-light/list/Base.scss +12 -27
  224. package/resources/scss/theme-light/menu/List.scss +20 -44
  225. package/resources/scss/theme-light/menu/Panel.scss +2 -8
  226. package/resources/scss/theme-light/tab/Container.scss +3 -9
  227. package/resources/scss/theme-light/tab/Strip.scss +5 -13
  228. package/resources/scss/theme-light/tab/header/Button.scss +29 -62
  229. package/resources/scss/theme-light/table/Container.scss +9 -22
  230. package/resources/scss/theme-light/table/View.scss +13 -29
  231. package/resources/scss/theme-light/table/header/Button.scss +6 -16
  232. package/resources/scss/theme-light/toolbar/Base.scss +4 -11
  233. package/resources/scss/theme-light/tree/List.scss +4 -11
  234. package/src/DefaultConfig.mjs +2 -2
  235. package/src/component/Splitter.mjs +0 -1
  236. package/src/draggable/tab/header/toolbar/SortZone.mjs +3 -3
  237. package/src/form/field/FileUpload.mjs +32 -5
  238. package/src/form/field/Text.mjs +1 -1
  239. package/src/main/DomAccess.mjs +2 -2
  240. package/src/main/DomEvents.mjs +50 -12
  241. package/src/manager/DomEvent.mjs +1 -0
  242. package/src/plugin/PrefixField.mjs +304 -0
  243. package/src/tab/header/Toolbar.mjs +8 -8
  244. package/resources/scss/mixins/_all.scss +0 -31
  245. package/resources/scss/theme-dark/_all.scss +0 -15
  246. package/resources/scss/theme-dark/apps/_all.scss +0 -3
  247. package/resources/scss/theme-dark/apps/covid/_all.scss +0 -4
  248. package/resources/scss/theme-dark/apps/docs/ExamplesTreeList.scss +0 -0
  249. package/resources/scss/theme-dark/apps/docs/TutorialsTreeList.scss +0 -0
  250. package/resources/scss/theme-dark/apps/docs/_all.scss +0 -6
  251. package/resources/scss/theme-dark/apps/docs/classdetails/HierarchyTreeList.scss +0 -0
  252. package/resources/scss/theme-dark/apps/docs/classdetails/MainContainer.scss +0 -0
  253. package/resources/scss/theme-dark/apps/docs/classdetails/_all.scss +0 -5
  254. package/resources/scss/theme-dark/apps/website/_all.scss +0 -4
  255. package/resources/scss/theme-dark/button/_all.scss +0 -1
  256. package/resources/scss/theme-dark/calendar/_all.scss +0 -8
  257. package/resources/scss/theme-dark/component/Circle.scss +0 -0
  258. package/resources/scss/theme-dark/component/_all.scss +0 -5
  259. package/resources/scss/theme-dark/container/_all.scss +0 -3
  260. package/resources/scss/theme-dark/dialog/_all.scss +0 -1
  261. package/resources/scss/theme-dark/examples/_all.scss +0 -2
  262. package/resources/scss/theme-dark/form/_all.scss +0 -9
  263. package/resources/scss/theme-dark/form/field/trigger/Clear.scss +0 -0
  264. package/resources/scss/theme-dark/form/field/trigger/_all.scss +0 -3
  265. package/resources/scss/theme-dark/grid/_all.scss +0 -3
  266. package/resources/scss/theme-dark/grid/header/Toolbar.scss +0 -0
  267. package/resources/scss/theme-dark/grid/header/_all.scss +0 -2
  268. package/resources/scss/theme-dark/list/_all.scss +0 -1
  269. package/resources/scss/theme-dark/menu/_all.scss +0 -2
  270. package/resources/scss/theme-dark/tab/_all.scss +0 -3
  271. package/resources/scss/theme-dark/table/_all.scss +0 -3
  272. package/resources/scss/theme-dark/table/header/Toolbar.scss +0 -0
  273. package/resources/scss/theme-dark/table/header/_all.scss +0 -2
  274. package/resources/scss/theme-dark/tree/_all.scss +0 -1
  275. package/resources/scss/theme-light/_all.scss +0 -15
  276. package/resources/scss/theme-light/apps/_all.scss +0 -3
  277. package/resources/scss/theme-light/apps/covid/_all.scss +0 -4
  278. package/resources/scss/theme-light/apps/docs/ExamplesTreeList.scss +0 -0
  279. package/resources/scss/theme-light/apps/docs/TutorialsTreeList.scss +0 -0
  280. package/resources/scss/theme-light/apps/docs/_all.scss +0 -6
  281. package/resources/scss/theme-light/apps/docs/classdetails/HierarchyTreeList.scss +0 -0
  282. package/resources/scss/theme-light/apps/docs/classdetails/MainContainer.scss +0 -0
  283. package/resources/scss/theme-light/apps/docs/classdetails/_all.scss +0 -5
  284. package/resources/scss/theme-light/apps/website/_all.scss +0 -4
  285. package/resources/scss/theme-light/button/_all.scss +0 -1
  286. package/resources/scss/theme-light/calendar/_all.scss +0 -8
  287. package/resources/scss/theme-light/component/Circle.scss +0 -0
  288. package/resources/scss/theme-light/component/_all.scss +0 -5
  289. package/resources/scss/theme-light/container/_all.scss +0 -3
  290. package/resources/scss/theme-light/dialog/_all.scss +0 -1
  291. package/resources/scss/theme-light/examples/_all.scss +0 -2
  292. package/resources/scss/theme-light/form/_all.scss +0 -9
  293. package/resources/scss/theme-light/form/field/trigger/Clear.scss +0 -0
  294. package/resources/scss/theme-light/form/field/trigger/_all.scss +0 -3
  295. package/resources/scss/theme-light/grid/_all.scss +0 -3
  296. package/resources/scss/theme-light/grid/header/Toolbar.scss +0 -0
  297. package/resources/scss/theme-light/grid/header/_all.scss +0 -2
  298. package/resources/scss/theme-light/list/_all.scss +0 -1
  299. package/resources/scss/theme-light/menu/_all.scss +0 -2
  300. package/resources/scss/theme-light/tab/_all.scss +0 -3
  301. package/resources/scss/theme-light/table/_all.scss +0 -3
  302. package/resources/scss/theme-light/table/header/Toolbar.scss +0 -0
  303. package/resources/scss/theme-light/table/header/_all.scss +0 -2
  304. package/resources/scss/theme-light/tree/_all.scss +0 -1
@@ -0,0 +1,304 @@
1
+ import Base from './Base.mjs';
2
+
3
+ /**
4
+ * @class Neo.plugin.PrefixField
5
+ * @extends Neo.plugin.Base
6
+ *
7
+ * @example
8
+ *
9
+ * {
10
+ * module : TextField,
11
+ * labelText: 'Credit Card',
12
+ * plugins : [{
13
+ * module : PrefixPlugin, // import PrefixPlugin from '../../src/plugin/PrefixField.mjs';
14
+ * flag : 'prefix', // textField.getPlugins({flag: 'prefix'})
15
+ * pattern: 'dd/mm/yyyy',
16
+ * slots : 'dmy', // characters allowed to replace
17
+ * accept : /\d/ // either '[A-Z]' or regex or undefined
18
+ * }]
19
+ * }
20
+ */
21
+ class PrefixField extends Base {
22
+ static config = {
23
+ /**
24
+ * @member {String} className='Neo.plugin.PrefixField'
25
+ * @protected
26
+ */
27
+ className: 'Neo.plugin.PrefixField',
28
+ /**
29
+ * @member {String} ntype='plugin-prefixfield'
30
+ * @protected
31
+ */
32
+ ntype: 'plugin-prefixfield',
33
+
34
+ /**
35
+ * Custom cls added to the inputEl
36
+ * @member {String} inputCls='neo-prefixfield-input'
37
+ */
38
+ inputCls: 'neo-prefixfield-input',
39
+ /**
40
+ * Custom cls added to the inputEl
41
+ * @member {String} inputCls='neo-prefixfield-input'
42
+ */
43
+ labelCls: 'neo-prefixfield-label',
44
+ /**
45
+ * Custom cls to add to the owner component
46
+ * @member {String} ownerCls='neo-prefixfield'
47
+ */
48
+ ownerCls: 'neo-prefixfield',
49
+
50
+ /**
51
+ * regex to calculate if entered value is acceptable
52
+ * Preset to numbers only
53
+ *
54
+ * @member {regex|null} accept
55
+ */
56
+ accept_: null,
57
+ /**
58
+ * @member {String} pattern=null
59
+ */
60
+ pattern_: null,
61
+ /**
62
+ * Only add a String. A Set will be automatically created
63
+ * @member {String|Set|null} slots=null
64
+ */
65
+ slots_: null
66
+ }
67
+
68
+ /**
69
+ * First accepted place to enter a value
70
+ * @member {Number} first
71
+ * @protected
72
+ */
73
+ first = null;
74
+ /**
75
+ * Array of numbers, which shows the previous entry point
76
+ * @member {Array[]} prev
77
+ * @protected
78
+ */
79
+ prev = null;
80
+ /**
81
+ * Position of the cursor inside input element
82
+ * @member {Object} selection
83
+ * @protected
84
+ */
85
+ selection = null;
86
+
87
+ /**
88
+ * State if selection should be updated
89
+ * @member {Boolean} ignoreSelection
90
+ * @protected
91
+ */
92
+ ignoreSelection = false;
93
+ /**
94
+ * State if last entry was the back button
95
+ * @member {Boolean} back
96
+ * @protected
97
+ */
98
+ back = false;
99
+
100
+ /**
101
+ * @param {Object} config
102
+ */
103
+ construct(config) {
104
+ let me = this;
105
+
106
+ super.construct(config);
107
+
108
+ me.addListeners();
109
+ me.addCss();
110
+ }
111
+
112
+ /**
113
+ * Add a custom cls to the owner component
114
+ */
115
+ addCss() {
116
+ const me = this,
117
+ owner = me.owner,
118
+ inputEl = owner.getInputEl(),
119
+ labelEl = owner.getLabelEl();
120
+
121
+ owner .addCls(me.ownerCls);
122
+ inputEl.cls.push(me.inputCls);
123
+ labelEl.cls.push(me.labelCls);
124
+ }
125
+
126
+ /**
127
+ * Add listeners
128
+ * @protected
129
+ */
130
+ addListeners() {
131
+ const me = this;
132
+ let listenerId;
133
+
134
+ me.owner.addDomListeners([
135
+ {keydown : me.onFieldKeyDown , scope: me},
136
+ {focusin : me.onFieldFocus , scope: me},
137
+ {focusout : me.onFieldBlur , scope: me},
138
+ {selectionchange: me.onFieldSelectionChange, scope: me}
139
+ ]);
140
+
141
+ listenerId = me.owner.on('mounted', (test) => {
142
+ Neo.currentWorker.insertThemeFiles(me.owner.appName, me.__proto__);
143
+
144
+ me.owner.un('mounted', listenerId);
145
+ listenerId = null;
146
+ });
147
+ }
148
+
149
+
150
+ /**
151
+ * After setting accept format output
152
+ * @param {String} value
153
+ * @param {String} oldValue
154
+ * @protected
155
+ */
156
+ afterSetAccept(value, oldValue) {
157
+ if (this.owner.value) this.format();
158
+ }
159
+
160
+ /**
161
+ * After setting pattern recalc other values and set placeholder
162
+ * @param {Set} value
163
+ * @param {Set} oldValue
164
+ * @protected
165
+ */
166
+ afterSetPattern(value, oldValue) {
167
+ this.owner.placeholderText = value;
168
+ this.recalcFirstAndPref();
169
+ }
170
+
171
+ /**
172
+ * After setting slots recalc other values
173
+ * @param {Set} value
174
+ * @param {Set} oldValue
175
+ * @protected
176
+ */
177
+ afterSetSlots(value, oldValue) {
178
+ this.recalcFirstAndPref();
179
+ }
180
+
181
+ /**
182
+ * Before the new value for slots will be set we create a Set from the string
183
+ * @param {String} value
184
+ * @return {Set}
185
+ * @protected
186
+ */
187
+ beforeSetSlots(value) {
188
+ return new Set(value || "_");
189
+ }
190
+
191
+ /**
192
+ * Remove unwanted entries and limit length
193
+ * @param {String} input
194
+ * @returns {any[]}
195
+ * @protected
196
+ */
197
+ clean(input) {
198
+ const me = this,
199
+ accept = new RegExp(this.accept || "\\d", "g");
200
+
201
+ input = input.match(accept) || [];
202
+ input = Array.from(me.pattern, c =>
203
+ input[0] === c || me.slots.has(c) ? input.shift() || c : c
204
+ );
205
+
206
+ return input.slice(0, me.pattern.length);
207
+ }
208
+
209
+ /**
210
+ * Calculate position and output correct String to Field
211
+ * @protected
212
+ */
213
+ format() {
214
+ const me = this,
215
+ el = me.owner,
216
+ selection = me.selection,
217
+ prev = me.prev,
218
+ clean = me.clean.bind(me);
219
+ let value = el.value || '';
220
+
221
+ const [i, j] = [selection.start, selection.end].map(i => {
222
+ i = me.clean(value.slice(0, i)).findIndex(c => me.slots.has(c));
223
+ return i < 0 ? prev[prev.length - 1] : me.back ? prev[i - 1] || me.first : i;
224
+ });
225
+
226
+ el.value = clean(value).join``;
227
+ this.ignoreSelection = true;
228
+
229
+ Neo.main.DomAccess.selectNode({id: el.getInputElId(), start: i, end: j});
230
+ this.ignoreSelection = false;
231
+
232
+ this.back = false;
233
+ }
234
+
235
+ /**
236
+ * Event
237
+ * @param {Object} data
238
+ * @returns {false|string}
239
+ * @protected
240
+ */
241
+ onFieldBlur(data) {
242
+ const pattern = this.pattern,
243
+ el = this.owner;
244
+
245
+ return el.value === pattern && (el.value = "");
246
+ }
247
+
248
+ /**
249
+ * Event
250
+ * @param {Object} data
251
+ * @protected
252
+ */
253
+ onFieldFocus(data) {
254
+ this.format();
255
+ }
256
+
257
+ /**
258
+ * Event
259
+ * @param {Object} data
260
+ * @protected
261
+ */
262
+ onFieldKeyDown(data) {
263
+ this.back = (data.key === "Backspace");
264
+ }
265
+
266
+ /**
267
+ * Event
268
+ * @param {Object} data
269
+ * @protected
270
+ */
271
+ onFieldSelectionChange(data) {
272
+ let sel = this.selection,
273
+ dSel = data.selection;
274
+
275
+ // Do not run, if ignore state or same start and end data
276
+ if (this.ignoreSelection || (dSel.start === sel.start && dSel.end === sel.end)) {
277
+ return;
278
+ }
279
+
280
+ this.selection = dSel;
281
+ this.format();
282
+ }
283
+
284
+ /**
285
+ * Calc values for first and prev
286
+ * @protected
287
+ */
288
+ recalcFirstAndPref() {
289
+ const me = this,
290
+ pattern = me.pattern,
291
+ slots = me.slots;
292
+
293
+ me.prev = (j => Array.from(pattern, (c, i) => slots.has(c) ? j = i + 1 : j))(0);
294
+ me.first = [...pattern].findIndex(c => slots.has(c));
295
+
296
+ me.selection = {start: me.first, end: me.first};
297
+
298
+ if (me.owner.value) me.format();
299
+ }
300
+ }
301
+
302
+ Neo.applyClassConfig(PrefixField);
303
+
304
+ export default PrefixField;
@@ -43,8 +43,8 @@ class Toolbar extends BaseToolbar {
43
43
  boundaryContainerId: me.id,
44
44
  owner : me,
45
45
  ...me.sortZoneConfig
46
- });
47
- });
46
+ })
47
+ })
48
48
  }
49
49
  }
50
50
 
@@ -61,10 +61,10 @@ class Toolbar extends BaseToolbar {
61
61
  me.items.forEach(item => {
62
62
  // silent updates
63
63
  item._useActiveTabIndicator = value;
64
- item.updateUseActiveTabIndicator(true);
64
+ item.updateUseActiveTabIndicator(true)
65
65
  });
66
66
 
67
- me.update();
67
+ me.update()
68
68
  }
69
69
  }
70
70
 
@@ -78,7 +78,7 @@ class Toolbar extends BaseToolbar {
78
78
  defaults.useActiveTabIndicator = me.useActiveTabIndicator;
79
79
  me.itemDefaults = defaults;
80
80
 
81
- super.createItems();
81
+ super.createItems()
82
82
  }
83
83
 
84
84
  /**
@@ -116,7 +116,7 @@ class Toolbar extends BaseToolbar {
116
116
  break;
117
117
  }
118
118
 
119
- return layoutConfig;
119
+ return layoutConfig
120
120
  }
121
121
 
122
122
  /**
@@ -131,10 +131,10 @@ class Toolbar extends BaseToolbar {
131
131
  if (fromIndex !== toIndex) {
132
132
  this.items.forEach((item, index) => {
133
133
  item.index = index;
134
- });
134
+ })
135
135
  }
136
136
 
137
- return returnValue;
137
+ return returnValue
138
138
  }
139
139
  }
140
140
 
@@ -1,31 +0,0 @@
1
- @function neo($key) {
2
- @return map-get($neoMap, $key);
3
- }
4
-
5
- @function calcVar($name, $operator, $value) {
6
- @if($useCssVars) {
7
- @if ($operator == '+') {@return calc(#{v(#{$name})} + #{$value});}
8
- @else if ($operator == '-') {@return calc(#{v(#{$name})} - #{$value});}
9
- @else if ($operator == '*') {@return calc(#{v(#{$name})} * #{$value});}
10
- @else if ($operator == '/') {@return calc(#{v(#{$name})} / #{$value});}
11
- } @else {
12
- $var: neo($name);
13
-
14
- @if ($operator == '+') {@return calc(#{$var} + #{$value});}
15
- @else if ($operator == '-') {@return calc(#{$var} - #{$value});}
16
- @else if ($operator == '*') {@return calc(#{$var} * #{$value});}
17
- @else if ($operator == '/') {@return calc(#{$var} / #{$value});}
18
- }
19
- }
20
-
21
- @function v($name, $fallback: null) {
22
- @if($useCssVars) {
23
- @if($fallback) {
24
- @return var(--#{$name}, #{$fallback});
25
- } @else {
26
- @return var(--#{$name});
27
- }
28
- } @else {
29
- @return #{neo($name)};
30
- }
31
- }
@@ -1,15 +0,0 @@
1
- @import "Global";
2
-
3
- @import "apps/all";
4
- @import "button/all";
5
- @import "calendar/all";
6
- @import "component/all";
7
- @import "dialog/all";
8
- @import "container/all";
9
- @import "examples/all";
10
- @import "form/all";
11
- @import "list/all";
12
- @import "menu/all";
13
- @import "tab/all";
14
- @import "table/all";
15
- @import "tree/all";
@@ -1,3 +0,0 @@
1
- @import "covid/all";
2
- @import "docs/all";
3
- @import "website/all";
@@ -1,4 +0,0 @@
1
- @import "country/Gallery";
2
- @import "country/Helix";
3
- @import "country/LineChartComponent";
4
- @import "HeaderContainer";
@@ -1,6 +0,0 @@
1
- @import "classdetails/all";
2
- @import "ContentTabContainer";
3
- @import "ExamplesTreeList";
4
- @import "HeaderContainer";
5
- @import "MainContainer";
6
- @import "TutorialsTreeList";
@@ -1,5 +0,0 @@
1
- @import "HeaderComponent";
2
- @import "HierarchyTreeList";
3
- @import "MainContainer";
4
- @import "MembersList";
5
- @import "TutorialComponent";
@@ -1,4 +0,0 @@
1
- @import "blog/Container";
2
- @import "home/TabContainer";
3
- @import "HeaderContainer";
4
- @import "MainContainer";
@@ -1 +0,0 @@
1
- @import "Base";
@@ -1,8 +0,0 @@
1
- @import "view/calendars/EditContainer";
2
- @import "view/calendars/List";
3
- @import "view/month/Component";
4
- @import "view/week/Component";
5
- @import "view/EditEventContainer";
6
- @import "view/MainContainer";
7
- @import "view/SettingsContainer";
8
- @import "view/YearComponent";
File without changes
@@ -1,5 +0,0 @@
1
- @import "BoxLabel";
2
- @import "Chip";
3
- @import "Circle";
4
- @import "DateSelector";
5
- @import "Splitter";
@@ -1,3 +0,0 @@
1
- @import "Base";
2
- @import "Panel";
3
- @import "Viewport";
@@ -1 +0,0 @@
1
- @import "Base";
@@ -1,2 +0,0 @@
1
- @import "calendar/basic/MainContainer";
2
- @import "ConfigurationPanel";
@@ -1,9 +0,0 @@
1
- @import "field/trigger/all";
2
- @import "field/CheckBox";
3
- @import "field/Picker";
4
- @import "field/Range";
5
- @import "field/Search";
6
- @import "field/Select";
7
- @import "field/Text";
8
-
9
- @import "Fieldset";
@@ -1,3 +0,0 @@
1
- @import "Base";
2
- @import "Clear";
3
- @import "Time";
@@ -1,3 +0,0 @@
1
- @import "header/all";
2
- @import "Container";
3
- @import "View";
@@ -1,2 +0,0 @@
1
- @import "Button";
2
- @import "Toolbar";
@@ -1 +0,0 @@
1
- @import "Base";
@@ -1,2 +0,0 @@
1
- @import "List";
2
- @import "Panel";
@@ -1,3 +0,0 @@
1
- @import "Container";
2
- @import "header/Button";
3
- @import "Strip";
@@ -1,3 +0,0 @@
1
- @import "header/all";
2
- @import "Container";
3
- @import "View";
@@ -1,2 +0,0 @@
1
- @import "Button";
2
- @import "Toolbar";
@@ -1 +0,0 @@
1
- @import "List";
@@ -1,15 +0,0 @@
1
- @import "Global";
2
-
3
- @import "apps/all";
4
- @import "button/all";
5
- @import "calendar/all";
6
- @import "component/all";
7
- @import "container/all";
8
- @import "dialog/all";
9
- @import "examples/all";
10
- @import "form/all";
11
- @import "list/all";
12
- @import "menu/all";
13
- @import "tab/all";
14
- @import "table/all";
15
- @import "tree/all";
@@ -1,3 +0,0 @@
1
- @import "covid/all";
2
- @import "docs/all";
3
- @import "website/all";
@@ -1,4 +0,0 @@
1
- @import "country/Gallery";
2
- @import "country/Helix";
3
- @import "country/LineChartComponent";
4
- @import "HeaderContainer";
@@ -1,6 +0,0 @@
1
- @import "classdetails/all";
2
- @import "ContentTabContainer";
3
- @import "ExamplesTreeList";
4
- @import "HeaderContainer";
5
- @import "MainContainer";
6
- @import "TutorialsTreeList";
@@ -1,5 +0,0 @@
1
- @import "HeaderComponent";
2
- @import "HierarchyTreeList";
3
- @import "MainContainer";
4
- @import "MembersList";
5
- @import "TutorialComponent";
@@ -1,4 +0,0 @@
1
- @import "blog/Container";
2
- @import "home/TabContainer";
3
- @import "HeaderContainer";
4
- @import "MainContainer";
@@ -1 +0,0 @@
1
- @import "Base";
@@ -1,8 +0,0 @@
1
- @import "view/calendars/EditContainer";
2
- @import "view/calendars/List";
3
- @import "view/month/Component";
4
- @import "view/week/Component";
5
- @import "view/EditEventContainer";
6
- @import "view/MainContainer";
7
- @import "view/SettingsContainer";
8
- @import "view/YearComponent";
File without changes
@@ -1,5 +0,0 @@
1
- @import "BoxLabel";
2
- @import "Chip";
3
- @import "Circle";
4
- @import "DateSelector";
5
- @import "Splitter";
@@ -1,3 +0,0 @@
1
- @import "Base";
2
- @import "Panel";
3
- @import "Viewport";
@@ -1 +0,0 @@
1
- @import "Base";
@@ -1,2 +0,0 @@
1
- @import "calendar/basic/MainContainer";
2
- @import "ConfigurationPanel";
@@ -1,9 +0,0 @@
1
- @import "field/trigger/all";
2
- @import "field/CheckBox";
3
- @import "field/Picker";
4
- @import "field/Range";
5
- @import "field/Search";
6
- @import "field/Select";
7
- @import "field/Text";
8
-
9
- @import "Fieldset";
@@ -1,3 +0,0 @@
1
- @import "Base";
2
- @import "Clear";
3
- @import "Time";
@@ -1,3 +0,0 @@
1
- @import "header/all";
2
- @import "Container";
3
- @import "View";
@@ -1,2 +0,0 @@
1
- @import "Button";
2
- @import "Toolbar";