neo.mjs 6.9.10 → 6.9.12

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 (245) hide show
  1. package/apps/ServiceWorker.mjs +2 -2
  2. package/apps/learnneo/index.html +4 -3
  3. package/apps/learnneo/neo-config.json +2 -1
  4. package/apps/learnneo/store/Content.mjs +1 -1
  5. package/apps/learnneo/view/Viewport.mjs +18 -0
  6. package/apps/learnneo/view/ViewportController.mjs +2 -2
  7. package/apps/learnneo/view/home/ContentTreeList.mjs +22 -14
  8. package/apps/learnneo/view/home/ContentView.mjs +60 -0
  9. package/apps/learnneo/view/home/MainContainer.mjs +14 -6
  10. package/apps/learnneo/view/home/MainContainerController.mjs +57 -18
  11. package/apps/learnneo/view/home/MainContainerModel.mjs +3 -5
  12. package/apps/newwebsite/app.mjs +6 -0
  13. package/apps/newwebsite/index.html +13 -0
  14. package/apps/newwebsite/neo-config.json +7 -0
  15. package/apps/newwebsite/view/MainContainer.mjs +59 -0
  16. package/buildScripts/convertDesignTokens.mjs +173 -0
  17. package/buildScripts/webpack/json/myApps.template.json +1 -0
  18. package/examples/ConfigurationViewport.mjs +12 -9
  19. package/examples/ServiceWorker.mjs +2 -2
  20. package/package.json +3 -2
  21. package/resources/data/{learnneo → deck/learnneo}/p/2023-10-01T18-29-19-158Z.md +3 -6
  22. package/resources/data/deck/learnneo/p/2023-10-08T20-20-37-336Z.md +36 -0
  23. package/resources/data/deck/learnneo/p/stylesheet.md +58 -0
  24. package/resources/data/{learnneo → deck/learnneo}/t.json +19 -2
  25. package/resources/data/deck/training/p/2022-12-27T21-54-52-300Z.md +11 -0
  26. package/resources/data/deck/training/p/2022-12-27T21-55-23-144Z.md +43 -0
  27. package/resources/data/deck/training/p/2022-12-27T21-55-30-948Z.md +1 -0
  28. package/resources/data/deck/training/p/2022-12-27T21-55-43-542Z.md +84 -0
  29. package/resources/data/deck/training/p/2022-12-27T22-23-55-083Z.md +1 -0
  30. package/resources/data/deck/training/p/2022-12-27T22-24-07-886Z.md +8 -0
  31. package/resources/data/deck/training/p/2022-12-27T22-24-52-295Z.md +8 -0
  32. package/resources/data/deck/training/p/2022-12-27T22-25-03-853Z.md +5 -0
  33. package/resources/data/deck/training/p/2022-12-27T22-43-58-924Z.md +10 -0
  34. package/resources/data/deck/training/p/2022-12-27T22-44-28-881Z.md +3 -0
  35. package/resources/data/deck/training/p/2022-12-27T22-44-41-791Z.md +4 -0
  36. package/resources/data/deck/training/p/2022-12-27T22-45-21-032Z.md +7 -0
  37. package/resources/data/deck/training/p/2022-12-27T22-49-22-078Z.md +4 -0
  38. package/resources/data/deck/training/p/2022-12-27T22-50-20-626Z.md +4 -0
  39. package/resources/data/deck/training/p/2022-12-28T16-58-47-786Z.md +0 -0
  40. package/resources/data/deck/training/p/2022-12-28T16-58-55-192Z.md +9 -0
  41. package/resources/data/deck/training/p/2022-12-28T17-10-18-058Z.md +15 -0
  42. package/resources/data/deck/training/p/2022-12-28T17-10-42-296Z.md +40 -0
  43. package/resources/data/deck/training/p/2022-12-28T17-11-34-653Z.md +41 -0
  44. package/resources/data/deck/training/p/2022-12-28T17-13-09-994Z.md +0 -0
  45. package/resources/data/deck/training/p/2022-12-28T21-32-14-420Z.md +0 -0
  46. package/resources/data/deck/training/p/2022-12-29T01-43-32-431Z.md +7 -0
  47. package/resources/data/deck/training/p/2022-12-29T15-56-54-485Z.md +7 -0
  48. package/resources/data/deck/training/p/2022-12-29T15-57-11-499Z.md +7 -0
  49. package/resources/data/deck/training/p/2022-12-29T16-00-13-223Z.md +7 -0
  50. package/resources/data/deck/training/p/2022-12-29T18-34-25-826Z.md +4 -0
  51. package/resources/data/deck/training/p/2022-12-29T18-36-08-226Z.md +106 -0
  52. package/resources/data/deck/training/p/2022-12-29T18-36-56-893Z.md +112 -0
  53. package/resources/data/deck/training/p/2022-12-29T19-31-30-507Z.md +31 -0
  54. package/resources/data/deck/training/p/2022-12-29T19-31-55-091Z.md +14 -0
  55. package/resources/data/deck/training/p/2022-12-29T20-03-42-628Z.md +9 -0
  56. package/resources/data/deck/training/p/2022-12-29T20-21-20-669Z.md +7 -0
  57. package/resources/data/deck/training/p/2022-12-29T20-37-08-919Z.md +46 -0
  58. package/resources/data/deck/training/p/2022-12-29T20-37-20-344Z.md +43 -0
  59. package/resources/data/deck/training/p/2022-12-30T19-04-30-990Z.md +8 -0
  60. package/resources/data/deck/training/p/2022-12-31T18-43-56-338Z.md +7 -0
  61. package/resources/data/deck/training/p/2022-12-31T18-51-50-682Z.md +1 -0
  62. package/resources/data/deck/training/p/2022-12-31T18-54-04-176Z.md +4 -0
  63. package/resources/data/deck/training/p/2022-12-31T22-11-55-555Z.md +112 -0
  64. package/resources/data/deck/training/p/2022-12-31T23-00-41-222Z.md +6 -0
  65. package/resources/data/deck/training/p/2022-12-31T23-18-55-655Z.md +69 -0
  66. package/resources/data/deck/training/p/2022-12-31T23-25-40-735Z.md +21 -0
  67. package/resources/data/deck/training/p/2022-12-31T23-25-51-014Z.md +7 -0
  68. package/resources/data/deck/training/p/2023-01-01T17-49-18-429Z.md +3 -0
  69. package/resources/data/deck/training/p/2023-01-01T18-44-07-034Z.md +34 -0
  70. package/resources/data/deck/training/p/2023-01-01T18-47-39-766Z.md +15 -0
  71. package/resources/data/deck/training/p/2023-01-01T19-04-22-830Z.md +4 -0
  72. package/resources/data/deck/training/p/2023-01-01T21-11-58-025Z.md +25 -0
  73. package/resources/data/deck/training/p/2023-01-01T21-12-37-340Z.md +23 -0
  74. package/resources/data/deck/training/p/2023-01-01T21-13-13-880Z.md +8 -0
  75. package/resources/data/deck/training/p/2023-01-01T21-14-45-740Z.md +98 -0
  76. package/resources/data/deck/training/p/2023-01-01T21-18-23-886Z.md +26 -0
  77. package/resources/data/deck/training/p/2023-01-01T21-18-31-316Z.md +19 -0
  78. package/resources/data/deck/training/p/2023-01-01T21-18-42-290Z.md +23 -0
  79. package/resources/data/deck/training/p/2023-01-01T21-19-57-020Z.md +24 -0
  80. package/resources/data/deck/training/p/2023-01-01T21-22-31-184Z.md +13 -0
  81. package/resources/data/deck/training/p/2023-01-01T21-22-38-317Z.md +17 -0
  82. package/resources/data/deck/training/p/2023-01-01T21-22-47-693Z.md +20 -0
  83. package/resources/data/deck/training/p/2023-01-01T21-23-17-716Z.md +39 -0
  84. package/resources/data/deck/training/p/2023-01-01T21-23-28-532Z.md +22 -0
  85. package/resources/data/deck/training/p/2023-01-01T21-25-23-899Z.md +3 -0
  86. package/resources/data/deck/training/p/2023-01-01T21-25-59-742Z.md +1 -0
  87. package/resources/data/deck/training/p/2023-01-01T21-26-53-748Z.md +12 -0
  88. package/resources/data/deck/training/p/2023-01-01T23-38-42-863Z.md +2 -0
  89. package/resources/data/deck/training/p/2023-01-03T02-07-19-014Z.md +143 -0
  90. package/resources/data/deck/training/p/2023-01-04T01-52-23-454Z.md +76 -0
  91. package/resources/data/deck/training/p/2023-01-06T23-21-12-009Z.md +127 -0
  92. package/resources/data/deck/training/p/2023-01-06T23-21-31-685Z.md +81 -0
  93. package/resources/data/deck/training/p/2023-01-06T23-21-59-596Z.md +36 -0
  94. package/resources/data/deck/training/p/2023-01-06T23-34-13-897Z.md +87 -0
  95. package/resources/data/deck/training/p/2023-01-06T23-44-02-340Z.md +0 -0
  96. package/resources/data/deck/training/p/2023-01-06T23-46-36-687Z.md +1 -0
  97. package/resources/data/deck/training/p/2023-01-06T23-46-45-783Z.md +33 -0
  98. package/resources/data/deck/training/p/2023-01-08T00-45-11-144Z.md +50 -0
  99. package/resources/data/deck/training/p/2023-01-08T01-06-31-267Z.md +41 -0
  100. package/resources/data/deck/training/p/2023-01-08T01-24-21-088Z.md +95 -0
  101. package/resources/data/deck/training/p/2023-01-08T01-25-12-557Z.md +11 -0
  102. package/resources/data/deck/training/p/2023-01-08T01-46-50-723Z.md +25 -0
  103. package/resources/data/deck/training/p/2023-01-08T02-09-07-802Z.md +18 -0
  104. package/resources/data/deck/training/p/2023-01-08T02-09-19-678Z.md +66 -0
  105. package/resources/data/deck/training/p/2023-01-08T02-11-26-333Z.md +29 -0
  106. package/resources/data/deck/training/p/2023-01-08T17-22-48-841Z.md +14 -0
  107. package/resources/data/deck/training/p/2023-01-08T20-46-11-806Z.md +5 -0
  108. package/resources/data/deck/training/p/2023-01-08T20-47-23-682Z.md +5 -0
  109. package/resources/data/deck/training/p/2023-01-08T20-47-32-064Z.md +13 -0
  110. package/resources/data/deck/training/p/2023-01-08T20-47-57-045Z.md +0 -0
  111. package/resources/data/deck/training/p/2023-01-08T20-48-03-791Z.md +18 -0
  112. package/resources/data/deck/training/p/2023-01-08T20-48-32-466Z.md +9 -0
  113. package/resources/data/deck/training/p/2023-01-08T20-48-51-322Z.md +20 -0
  114. package/resources/data/deck/training/p/2023-01-08T20-49-52-741Z.md +0 -0
  115. package/resources/data/deck/training/p/2023-01-08T20-52-03-556Z.md +0 -0
  116. package/resources/data/deck/training/p/2023-01-08T20-57-36-333Z.md +2 -0
  117. package/resources/data/deck/training/p/2023-01-08T20-57-51-136Z.md +5 -0
  118. package/resources/data/deck/training/p/2023-01-09T00-07-37-951Z.md +0 -0
  119. package/resources/data/deck/training/p/2023-01-09T00-35-40-671Z.md +3 -0
  120. package/resources/data/deck/training/p/2023-01-10T01-29-38-148Z.md +10 -0
  121. package/resources/data/deck/training/p/2023-01-10T01-43-12-166Z.md +31 -0
  122. package/resources/data/deck/training/p/2023-01-10T02-21-54-303Z.md +10 -0
  123. package/resources/data/deck/training/p/2023-01-12T01-50-54-617Z.md +74 -0
  124. package/resources/data/deck/training/p/2023-01-13T19-55-24-735Z.md +14 -0
  125. package/resources/data/deck/training/p/2023-01-13T20-08-27-068Z.md +28 -0
  126. package/resources/data/deck/training/p/2023-01-13T20-23-38-411Z.md +25 -0
  127. package/resources/data/deck/training/p/2023-01-13T20-37-06-267Z.md +13 -0
  128. package/resources/data/deck/training/p/2023-01-13T21-05-57-708Z.md +8 -0
  129. package/resources/data/deck/training/p/2023-01-13T21-48-17-258Z.md +20 -0
  130. package/resources/data/deck/training/p/2023-01-13T22-05-05-799Z.md +14 -0
  131. package/resources/data/deck/training/p/2023-01-13T22-08-30-863Z.md +17 -0
  132. package/resources/data/deck/training/p/2023-01-13T23-01-50-449Z.md +4 -0
  133. package/resources/data/deck/training/p/2023-01-14T00-33-05-958Z.md +62 -0
  134. package/resources/data/deck/training/p/2023-01-14T00-40-27-784Z.md +229 -0
  135. package/resources/data/deck/training/p/2023-01-14T00-41-59-081Z.md +153 -0
  136. package/resources/data/deck/training/p/2023-01-14T13-50-28-199Z.md +19 -0
  137. package/resources/data/deck/training/p/2023-01-14T13-59-20-275Z.md +6 -0
  138. package/resources/data/deck/training/p/2023-01-14T14-03-29-456Z.md +3 -0
  139. package/resources/data/deck/training/p/2023-01-14T14-27-57-678Z.md +7 -0
  140. package/resources/data/deck/training/p/2023-01-14T17-30-18-228Z.md +33 -0
  141. package/resources/data/deck/training/p/2023-01-14T18-28-39-316Z.md +1 -0
  142. package/resources/data/deck/training/p/2023-01-14T18-28-44-115Z.md +4 -0
  143. package/resources/data/deck/training/p/2023-01-14T18-28-49-548Z.md +18 -0
  144. package/resources/data/deck/training/p/2023-01-14T18-40-13-758Z.md +10 -0
  145. package/resources/data/deck/training/p/2023-01-14T19-29-15-291Z.md +12 -0
  146. package/resources/data/deck/training/p/2023-01-15T18-51-52-134Z.md +83 -0
  147. package/resources/data/deck/training/p/2023-01-15T20-03-30-073Z.md +11 -0
  148. package/resources/data/deck/training/p/2023-01-15T22-07-52-073Z.md +16 -0
  149. package/resources/data/deck/training/p/2023-01-15T22-22-13-517Z.md +12 -0
  150. package/resources/data/deck/training/p/2023-01-15T22-28-57-508Z.md +131 -0
  151. package/resources/data/deck/training/p/2023-01-15T22-36-30-913Z.md +115 -0
  152. package/resources/data/deck/training/p/2023-01-16T16-03-40-770Z.md +12 -0
  153. package/resources/data/deck/training/p/2023-01-16T20-21-56-859Z.md +5 -0
  154. package/resources/data/deck/training/p/2023-01-16T20-24-09-690Z.md +24 -0
  155. package/resources/data/deck/training/p/2023-01-20T12-51-22-646Z.md +21 -0
  156. package/resources/data/deck/training/p/2023-01-20T13-06-46-614Z.md +9 -0
  157. package/resources/data/deck/training/p/2023-01-20T13-08-51-600Z.md +7 -0
  158. package/resources/data/deck/training/p/2023-01-20T15-20-13-363Z.md +26 -0
  159. package/resources/data/deck/training/p/2023-01-20T15-34-58-813Z.md +75 -0
  160. package/resources/data/deck/training/p/2023-01-21T16-33-20-458Z.md +33 -0
  161. package/resources/data/deck/training/p/2023-01-21T16-45-28-263Z.md +28 -0
  162. package/resources/data/deck/training/p/2023-01-21T16-56-25-452Z.md +3 -0
  163. package/resources/data/deck/training/p/2023-01-21T17-28-31-493Z.md +6 -0
  164. package/resources/data/deck/training/p/2023-01-21T19-49-51-918Z.md +13 -0
  165. package/resources/data/deck/training/p/2023-01-21T20-08-24-452Z.md +15 -0
  166. package/resources/data/deck/training/p/2023-01-21T20-35-54-947Z.md +20 -0
  167. package/resources/data/deck/training/p/2023-01-21T20-54-47-603Z.md +39 -0
  168. package/resources/data/deck/training/p/2023-01-21T20-56-28-184Z.md +25 -0
  169. package/resources/data/deck/training/p/2023-01-21T20-57-32-927Z.md +4 -0
  170. package/resources/data/deck/training/p/2023-01-21T23-13-33-394Z.md +6 -0
  171. package/resources/data/deck/training/p/2023-01-28T19-11-37-464Z.md +24 -0
  172. package/resources/data/deck/training/p/2023-01-28T20-43-41-188Z.md +9 -0
  173. package/resources/data/deck/training/p/2023-01-28T20-53-56-476Z.md +8 -0
  174. package/resources/data/deck/training/p/2023-01-28T20-58-43-776Z.md +10 -0
  175. package/resources/data/deck/training/p/2023-01-28T22-18-41-259Z.md +33 -0
  176. package/resources/data/deck/training/p/2023-01-28T22-24-34-808Z.md +24 -0
  177. package/resources/data/deck/training/p/2023-01-29T16-25-24-528Z.md +44 -0
  178. package/resources/data/deck/training/p/2023-01-29T21-14-32-588Z.md +12 -0
  179. package/resources/data/deck/training/p/2023-01-31T19-24-53-504Z.md +8 -0
  180. package/resources/data/deck/training/p/2023-01-31T20-33-55-855Z.md +11 -0
  181. package/resources/data/deck/training/p/2023-01-31T20-34-30-261Z.md +7 -0
  182. package/resources/data/deck/training/p/2023-01-31T20-52-53-367Z.md +43 -0
  183. package/resources/data/deck/training/p/2023-02-04T15-18-35-682Z.md +20 -0
  184. package/resources/data/deck/training/p/2023-02-04T15-49-47-597Z.md +14 -0
  185. package/resources/data/deck/training/p/2023-02-04T18-58-57-808Z.md +1 -0
  186. package/resources/data/deck/training/p/2023-02-04T20-07-11-288Z.md +1 -0
  187. package/resources/data/deck/training/p/2023-02-04T20-09-50-169Z.md +1 -0
  188. package/resources/data/deck/training/p/2023-02-04T20-19-42-740Z.md +8 -0
  189. package/resources/data/deck/training/p/2023-02-04T20-23-56-013Z.md +12 -0
  190. package/resources/data/deck/training/p/2023-02-04T20-28-12-391Z.md +20 -0
  191. package/resources/data/deck/training/p/2023-02-05T00-20-32-554Z.md +16 -0
  192. package/resources/data/deck/training/p/2023-02-05T00-35-56-282Z.md +13 -0
  193. package/resources/data/deck/training/p/2023-02-05T15-36-57-182Z.md +24 -0
  194. package/resources/data/deck/training/p/2023-02-05T17-39-51-712Z.md +70 -0
  195. package/resources/data/deck/training/p/2023-02-05T17-44-53-815Z.md +195 -0
  196. package/resources/data/deck/training/p/2023-02-05T17-45-40-114Z.md +92 -0
  197. package/resources/data/deck/training/p/2023-02-05T18-12-14-489Z.md +60 -0
  198. package/resources/data/deck/training/p/2023-02-06T00-14-54-457Z.md +9 -0
  199. package/resources/data/deck/training/p/2023-06-28T18-03-14-313Z.md +8 -0
  200. package/resources/data/deck/training/p/2023-06-28T18-26-17-290Z.md +7 -0
  201. package/resources/data/deck/training/p/2023-06-28T21-16-24-034Z.md +40 -0
  202. package/resources/data/deck/training/p/2023-06-28T21-16-34-972Z.md +16 -0
  203. package/resources/data/deck/training/p/2023-06-28T21-28-28-379Z.md +4 -0
  204. package/resources/data/deck/training/p/2023-06-29T23-15-10-411Z.md +5 -0
  205. package/resources/data/deck/training/p/2023-07-01T15-42-45-193Z.md +433 -0
  206. package/resources/data/deck/training/p/2023-07-01T21-54-31-329Z.md +6 -0
  207. package/resources/data/deck/training/p/2023-07-02T16-14-06-970Z.md +14 -0
  208. package/resources/data/deck/training/p/2023-07-31T00-26-03-842Z.md +4 -0
  209. package/resources/data/deck/training/p/2023-07-31T00-31-51-933Z.md +10 -0
  210. package/resources/data/deck/training/p/2023-07-31T00-37-21-927Z.md +205 -0
  211. package/resources/data/deck/training/p/2023-10-01T18-29-19-158Z.md +76 -0
  212. package/resources/data/deck/training/p/2023-10-07T19-18-28-517Z.md +102 -0
  213. package/resources/data/deck/training/p/2023-10-08T20-20-07-934Z.md +75 -0
  214. package/resources/data/deck/training/p/2023-10-08T20-37-30-658Z.md +0 -0
  215. package/resources/data/deck/training/p/2023-10-08T21-58-25-809Z.md +68 -0
  216. package/resources/data/deck/training/p/2023-10-08T22-22-11-013Z.md +0 -0
  217. package/resources/data/deck/training/p/2023-10-14T19-25-08-153Z.md +119 -0
  218. package/resources/data/deck/training/t.json +1276 -0
  219. package/resources/design-tokens/json/component.json +288 -0
  220. package/resources/design-tokens/json/core.json +352 -0
  221. package/resources/design-tokens/json/semantic.json +231 -0
  222. package/resources/scss/src/apps/learnneo/Viewport.scss +3 -0
  223. package/resources/scss/src/apps/learnneo/home/ContentTreeList.scss +60 -13
  224. package/resources/scss/src/apps/learnneo/home/ContentView.scss +58 -0
  225. package/resources/scss/src/apps/newwebsite/MainContainer.scss +32 -0
  226. package/resources/scss/src/list/Base.scss +1 -1
  227. package/resources/scss/theme-neo-light/Global.scss +65 -1
  228. package/resources/scss/theme-neo-light/design-tokens/Component.scss +64 -0
  229. package/resources/scss/theme-neo-light/design-tokens/Core.scss +67 -0
  230. package/resources/scss/theme-neo-light/design-tokens/Semantic.scss +61 -0
  231. package/resources/scss/theme-neo-light/design-tokens/_all.scss +4 -0
  232. package/resources/scss/theme-neo-light/list/Base.scss +29 -6
  233. package/src/DefaultConfig.mjs +4 -4
  234. package/src/controller/Base.mjs +31 -23
  235. package/src/data/connection/Xhr.mjs +1 -1
  236. /package/resources/data/{learnneo → deck/learnneo}/p/2023-10-07T19-18-28-517Z.md +0 -0
  237. /package/resources/data/{learnneo → deck/learnneo}/p/2023-10-08T20-20-07-934Z.md +0 -0
  238. /package/resources/data/{learnneo → deck/learnneo}/p/2023-10-08T20-37-30-658Z.md +0 -0
  239. /package/resources/data/{learnneo → deck/learnneo}/p/2023-10-08T21-58-25-809Z.md +0 -0
  240. /package/resources/data/{learnneo → deck/learnneo}/p/2023-10-08T22-22-11-013Z.md +0 -0
  241. /package/resources/data/{learnneo → deck/learnneo}/p/2023-10-14T19-25-08-153Z.md +0 -0
  242. /package/resources/data/{learnneo → deck/learnneo}/pages/whyneo.md +0 -0
  243. /package/resources/data/{learnneo → deck/learnneo}/tree.json +0 -0
  244. /package/resources/data/{learnneo → deck/training}/p/2023-10-08T20-20-37-336Z.md +0 -0
  245. /package/resources/{deck → data/deck}/whyneo.md +0 -0
@@ -0,0 +1,20 @@
1
+
2
+ <pre>
3
+ model: {
4
+ fields: [{
5
+ name: 'humanReadableLocation'
6
+ }, {
7
+ name: 'size',
8
+ <s>ntype: 'data-field-float'</s>, // Not supported yet
9
+ }, {
10
+ name: 'timestamp',
11
+ type: 'Date'
12
+ }, {
13
+ name: 'title',
14
+ mapping: 'humanReadableLocation'
15
+ }, {
16
+ name: 'position',
17
+ calculate: (rec, field, data) => ({lat: data.latitude, lng: data.longitude })
18
+ }]
19
+ },
20
+ </pre>
@@ -0,0 +1,39 @@
1
+ In <a href="https://nameless-tundra-27404.herokuapp.com/go/?fn=yelp&latitude=43.084&longitude=-89.546&term=pizza&limit=1" target="_blank">the Yelp data feed</a> the array of values is nested in _businesses_.
2
+
3
+ The url has three query fields we'll change dynamically.
4
+
5
+ latitude=43.084&longitude=-89.546&term=pizza
6
+ <div class="expander" caption="Data">
7
+ <pre style='color:lightgray'>
8
+ {
9
+ "id": "nsw3tlB-hwz4KbPYcuaSww",
10
+ <span style="color:firebrick">"name": "Novanta"</span>,
11
+ <span style="color:firebrick">"image_url": "https://s3-media1.fl.yelpcdn.com/bphoto/2QtMzHr1ZNoflLzXKRza9A/o.jpg"</span>,
12
+ <span style="color:firebrick">"coordinates": {"latitude": 43.0753733442932,"longitude": -89.5296266588608}</span>,
13
+ <span style="color:firebrick">"rating": 4.5</span>,
14
+ "location": {
15
+ <span style="color:firebrick">"display_address": [ "8452 Old Sauk Rd", "Madison, WI 53562" ]</span>,
16
+ "address1": "8452 Old Sauk Rd",
17
+ "address2": "",
18
+ "address3": "",
19
+ "city": "Madison",
20
+ "zip_code": "53562",
21
+ "country": "US",
22
+ "state": "WI"
23
+ },
24
+ "is_closed": false,
25
+ "url": "https://www.yelp.com/biz/novanta-madison?adjust_creative=hAlq2S6c7S0nxZcdmjtkhA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hAlq2S6c7S0nxZcdmjtkhA",
26
+ "review_count": 329,
27
+ "categories": [
28
+ {"alias": "pizza", "title": "Pizza"},{"alias": "italian","title": "Italian"},
29
+ {"alias": "mediterranean","title": "Mediterranean"}
30
+ ],
31
+ "transactions": ["pickup","delivery"],
32
+ "price": "$$",
33
+ "phone": "+16088317740",
34
+ "display_phone": "(608) 831-7740",
35
+ "distance": 1639.6643113166895,
36
+ "alias": "novanta-madison"
37
+ }
38
+ </pre>
39
+ </div>
@@ -0,0 +1,25 @@
1
+ `responseRoot` specifies the value in the feed that holds the array of items
2
+ used to populate the store.
3
+
4
+ For example, the Yelp feed returns a single object which contains a _businesses_
5
+ property whose value is the array of businesses. Therefore, the store that reads
6
+ it should specify
7
+
8
+ `responseRoot: businesses`.
9
+
10
+ {
11
+ "businesses": [
12
+ {
13
+ "id": "nsw3tlB-hwz4KbPYcuaSww",
14
+ "alias": "novanta-madison",
15
+ "name": "Novanta",
16
+ "image_url": "https://s3-media1.fl.yelpcdn.com/bphoto/2QtMzHr1ZNoflLzXKRza9A/o.jpg",
17
+ "is_closed": false,
18
+ "url": "https://www.yelp.com/biz/novanta-madison?adjust_creative=hAlq2S6c7S0nxZcdmjtkhA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=hAlq2S6c7S0nxZcdmjtkhA",
19
+ "review_count": 329,
20
+ "categories": [
21
+ {
22
+ "alias": "pizza",
23
+ "title": "Pizza"
24
+ },
25
+ ...
@@ -0,0 +1,4 @@
1
+
2
+ - `url`
3
+ - `autoLoad`
4
+ - `responseRoot`
@@ -0,0 +1,6 @@
1
+ We've done a lot of talking, but the resulting code is pretty simple.
2
+
3
+ - Fewer than 20 (yes, twenty) lines of procedural code
4
+ - A simple store config, with two fields
5
+ - A well-encapsulated `Filter` class
6
+ - A simple, declaratively defined, main view and tabs
@@ -0,0 +1,24 @@
1
+ Grids show a store's data as a table of rows and columns.
2
+
3
+ <pre style="font-size: 14pt;color:gray;">
4
+ items: [{
5
+ module: Table,
6
+ store: {
7
+ module: Store,
8
+ model: {
9
+ fields: [{ name: <span style="color:blue;">'name'</span> }, { name: <span style="color:blue;">'hp'</span> }, { name: <span style="color:blue;">'attack'</span> }, { name: <span style="color:blue;">'defense'</span> }]
10
+ },
11
+ data: [
12
+ { <span style="color:blue;">"name"</span>: "Bulbasaur" , "pokedex": 1 , <span style="color:blue;">"hp"</span>: 45 , <span style="color:blue;">"defense"</span>: 49 , <span style="color:blue;">"attack"</span>: 49 , <span style="color:blue;">"speed"</span>: 45 },
13
+ { <span style="color:blue;">"name"</span>: "Ivysaur" , "pokedex": 2 , <span style="color:blue;">"hp"</span>: 60 , <span style="color:blue;">"defense"</span>: 63 , <span style="color:blue;">"attack"</span>: 62 , <span style="color:blue;">"speed"</span>: 60 },
14
+ { <span style="color:blue;">"name"</span>: "Venusaur" , "pokedex": 3 , <span style="color:blue;">"hp"</span>: 80 , <span style="color:blue;">"defense"</span>: 83 , <span style="color:blue;">"attack"</span>: 82 , <span style="color:blue;">"speed"</span>: 80 },
15
+ ]
16
+ },
17
+ columns: [
18
+ { dataField: <span style="color:blue;">'name'</span> , text: 'Name' },
19
+ { dataField: <span style="color:blue;">'hp'</span> , text: 'HP' },
20
+ { dataField: <span style="color:blue;">'attack'</span> , text: 'Attack' },
21
+ { dataField: <span style="color:blue;">'defense'</span>, text: 'Defense' },
22
+ ],
23
+ }]
24
+ </pre>
@@ -0,0 +1,9 @@
1
+ Neo implements Tables as a `Neo.table.header.Toolbar` followed by a `Neo.table.View`.
2
+
3
+ You don't reference these directly &mdash; they are created automatically using
4
+ the configs you provide for the table.
5
+
6
+ If needed, you can provide header configs via `headerToolbarConfig`
7
+
8
+
9
+ And you can provide view configuration via `viewConfig`.
@@ -0,0 +1,8 @@
1
+ Each item in `columns:[]` configures a column.
2
+
3
+ - `text` &mdash; the column title
4
+ - `dataField` &mdash; the record value
5
+ - `width`
6
+ - `align`
7
+
8
+ - `renderer`
@@ -0,0 +1,10 @@
1
+
2
+ By default, Neo simply shows the `dataField` value for the record, but you can provide
3
+ your own value by configuring a `renderer` function.
4
+
5
+ An object is passed to the function.
6
+
7
+ - dataField
8
+ - index
9
+ - record
10
+ - value &mdash; the `record[dataField]` value
@@ -0,0 +1,33 @@
1
+ <pre style="font-size: 13pt; color: gray; ">
2
+ {
3
+ module: Table,
4
+ store: {
5
+ module: Store,
6
+ model: { fields: [{ name: 'timestamp', type: 'Date' }, { name: 'humanReadableLocation' }, { name: 'quality' }] },
7
+ data: [
8
+ { "timestamp": "2017-10-13T12:07:24.000Z", "latitude": 63.976, "longitude": -21.949, "depth": 1.1, "size": 0.6, "quality": 58.73, "humanReadableLocation": "6,1 km SV af Helgafelli" },
9
+ { "timestamp": "2017-10-13T09:50:50.000Z", "latitude": 65.124, "longitude": -16.288, "depth": 7.2, "size": 0.9, "quality": 78.51, "humanReadableLocation": "6,1 km NA af Herðubreiðartöglum" },
10
+ ]
11
+ },
12
+ columns: [
13
+ { dataField: 'humanReadableLocation', text: 'Location' },
14
+ {
15
+ dataField: 'timestamp',
16
+ text: 'Date',
17
+ <span style="font-weight: bold; color: #b91010">renderer: data => new Intl.DateTimeFormat('en-US', {
18
+ year: 'numeric', month: 'long', day: 'numeric', weekday: 'long',
19
+ hour: 'numeric', minute: 'numeric', second: 'numeric',
20
+ hour12: false,
21
+ timeZone: 'America/Los_Angeles'
22
+ }).format(data.value)</span>
23
+ },
24
+ {
25
+ dataField: 'quality',
26
+ text: 'quality',
27
+ <span style="font-weight: bold; color: #b91010">renderer: data => new Intl.NumberFormat('en-US', {
28
+ minimumFractionDigits: 3
29
+ }).format(data.value)</span>
30
+ },
31
+ ]
32
+ }
33
+ </pre>
@@ -0,0 +1,24 @@
1
+ You can use the _record_ reference to include other values from the record.
2
+
3
+ <pre style="font-size: 14pt; color: gray; ">
4
+ {
5
+ module: Table,
6
+ store: {
7
+ module: Store,
8
+ model: {
9
+ fields: [{ name: 'name' }, { name: 'hp' }, { name: 'attack' }, { name: 'defense' }, { name: 'pokedex' }]
10
+ },
11
+ data: [
12
+ { "name": "Bulbasaur", "pokedex": 1, "hp": 45, "defense": 49, "attack": 49, "speed": 45 },
13
+ { "name": "Ivysaur", "pokedex": 2, "hp": 60, "defense": 63, "attack": 62, "speed": 60 },
14
+ { "name": "Venusaur", "pokedex": 3, "hp": 80, "defense": 83, "attack": 82, "speed": 80 },
15
+ ]
16
+ },
17
+ columns: [
18
+ { text: 'Name', <span style="font-weight: bold; color: #b91010">renderer: data => `${data.record.name} (${data.record.pokedex})`</span> }, // Ivysaur (2)
19
+ { dataField: 'hp', text: 'HP' },
20
+ { dataField: 'attack', text: 'Attack' },
21
+ { dataField: 'defense', text: 'Defense' }
22
+ ]
23
+ }
24
+ </pre>
@@ -0,0 +1,44 @@
1
+ <table>
2
+ <tr>
3
+ <td><ul>
4
+ <li>RowModel (default)
5
+ <li>CellModel
6
+ <li>ColumnModel
7
+ </ul></td>
8
+ <td><ul>
9
+ <li>CellRowModel
10
+ <li>CellColumnModel
11
+ <li>CellColumnRowModel
12
+ </ul></td>
13
+ <td>
14
+ </tr>
15
+ </table>
16
+
17
+ <pre style="font-size:13pt; color: gray">
18
+ {
19
+ module: Table,
20
+ store: {
21
+ module: Store,
22
+ model: {
23
+ fields: [{ name: 'name' }, { name: 'hp' }, { name: 'attack' }, { name: 'defense' }, { name: 'pokedex' }]
24
+ },
25
+ data: [
26
+ { "name": "Bulbasaur", "pokedex": 1, "hp": 45, "defense": 49, "attack": 49, "speed": 45 },
27
+ { "name": "Ivysaur", "pokedex": 2, "hp": 60, "defense": 63, "attack": 62, "speed": 60 },
28
+ ]
29
+ },
30
+ <span style="font-weight: bold; color: #b91010">selectionModel: {
31
+ module: CellModel
32
+ },</span>
33
+ columns: [
34
+ { text: 'Name', renderer: data => `${data.record.name} (${data.record.pokedex})` },
35
+ { dataField: 'hp', text: 'HP' },
36
+ { dataField: 'attack', text: 'Attack' },
37
+ { dataField: 'defense', text: 'Defense' }
38
+ ],
39
+ }
40
+ </pre>
41
+
42
+
43
+
44
+
@@ -0,0 +1,12 @@
1
+ The selection model has an `items[]` property that holds the
2
+ _row id_ for each record.
3
+
4
+ Call the table's view `getRecordByRowId()` method to get the corresponding record.
5
+
6
+ onSelectedItemsClick(data) {
7
+ const table = this.getReference('table');
8
+ const view = table.getView();
9
+ const records = table.selectionModel.items
10
+ .map(rowId => view.getRecordByRowId(rowId));
11
+ console.log(records);
12
+ }
@@ -0,0 +1,8 @@
1
+ A form container is a simple container with some convenience methods for gathering
2
+ field values and testing validation.
3
+
4
+ - `getFields()`
5
+ - `getField()` &mdash; get a field using its id or name
6
+ - `getValues()`
7
+ - `isValid()`
8
+ - `reset()`
@@ -0,0 +1,11 @@
1
+ Conceptually, a field represents a name/value pair that can be sent to
2
+ the backend via a form submit or Ajax call.
3
+
4
+ {
5
+ module: Text,
6
+ labelText: 'First Name',
7
+
8
+ name: 'fname', // Typically, the name sent to the backend
9
+ value: 'Homer',
10
+
11
+ },
@@ -0,0 +1,7 @@
1
+ A `Neo.form.Container` is a simple container that can hold any
2
+ component, including fields
3
+
4
+ Fields are input components, such as text fields, checkboxes, and select fields.
5
+
6
+ A form has convenience methods for setting and getting field values, and testing validation.
7
+
@@ -0,0 +1,43 @@
1
+ <div class="expander" caption="config">
2
+ <p>
3
+ <kbd>name </kbd><br>
4
+ <kbd>value\_ </kbd><br>
5
+ <br>
6
+ <kbd>labelText\_ </kbd><br>
7
+ <kbd>subLabelText\_ </kbd><br>
8
+ <kbd>labelPosition\_ </kbd><br>
9
+ <kbd>placeholderText\_ </kbd><br>
10
+ <br>
11
+ <kbd>clearable\_ </kbd><br>
12
+ <br>
13
+ <kbd>maxLength\_ </kbd><br>
14
+ <kbd>minLength\_ </kbd><br>
15
+ <br>
16
+ <kbd>readOnly\_ </kbd><br>
17
+ <kbd>required\_ </kbd><br>
18
+ <br>
19
+ <kbd>inputPattern\_ </kbd>&mdash; A regular expression that limits keyboard input<br>
20
+ <kbd>validator </kbd><br>
21
+ </p>
22
+ </div>
23
+
24
+
25
+ <div class="expander" caption="Methods">
26
+ <p>
27
+ <kbd>clearToOriginalValue()</kbd><br>
28
+ <kbd>isEmpty() </kbd><br>
29
+ <kbd>isValid() </kbd><br>
30
+ <kbd>validate() </kbd><br>
31
+
32
+ </p>
33
+ </div>
34
+
35
+ <div class="expander" caption="Events">
36
+ <p>
37
+ <i>change</i><br>
38
+ <i>clear</i><br>
39
+ <i>changeClearToOriginalValue</i><br>
40
+
41
+ </p>
42
+ </div>
43
+
@@ -0,0 +1,20 @@
1
+ The `Clear` and `CopyToClipboard` triggers might be used directly,
2
+ but the others are used via the corresponding pre-configured
3
+ component.<small><sup>*</sup></small>
4
+
5
+ `Neo.form.field.trigger.*`
6
+
7
+
8
+ - `Clear`
9
+ - `CopyToClipboard`
10
+
11
+
12
+ - `Date`
13
+ - `Search`
14
+ - `SpinDown`
15
+ - `SpinUp`
16
+ - `Time`
17
+
18
+
19
+ <br><br>
20
+ <small>* Many triggers require setting up trigger click event handlers.</small>
@@ -0,0 +1,14 @@
1
+ Most validation configs have a corresponding message
2
+ which is used when the validation fails.
3
+
4
+
5
+ | Validation Config | Validation Error |
6
+ | ------------------- | -------------------------- |
7
+ | `maxLength` | `errorTextMaxLength`<small><sup>*</sup></small>|
8
+ | `minLength` | `errorTextMinLength` |
9
+ | `required` | `errorTextRequired` |
10
+ | `validator` | |
11
+
12
+ <br>
13
+ <br>
14
+ <small>* Text is limited to the max length.</small>
@@ -0,0 +1 @@
1
+ <iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="1000" height="600" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2F2Xzb3mL9nwSprFN3lMweja%2FNeo.form.field-Hierarchy%3Fnode-id%3D0%253A1%26t%3DxfeBL4RWaRZGyAic-1%2Fhide-ui" allowfullscreen></iframe>
@@ -0,0 +1 @@
1
+ <iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="1000" height="600" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FVz2o2oFk8mFdwJ7nQIzmK0%2FNeo.form.field.Picker%3Fnode-id%3D0%253A1%26t%3DlAG8QtmPJatN3LP2-1" allowfullscreen></iframe>
@@ -0,0 +1 @@
1
+ <iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="1000" height="600" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FW4rsTDe84bUaVe9Fa8HuRV%2FNeo.form.field.*%3Fnode-id%3D0%253A1%26t%3D7Y1XOS0oVKMWmYnI-1" allowfullscreen></iframe>
@@ -0,0 +1,8 @@
1
+ | Config | Methods | Events |
2
+ | ------------------- | -------------------------- | -------------------|
3
+ | `name` | `isValid()` | _change_ |
4
+ | `value_` | `reset()` | |
5
+ | &nbsp; | `validate()` | |
6
+ | | | |
7
+
8
+
@@ -0,0 +1,12 @@
1
+ {
2
+ module: TextField,
3
+ labelText: 'First Name',
4
+ name: 'fname',
5
+ },
6
+
7
+
8
+ Text fields let the user type input.
9
+
10
+ The `Neo.form.field.Text` class is an important base class. There
11
+ are many kinds of field, including search fields, passwords fields,
12
+ and many others.
@@ -0,0 +1,20 @@
1
+ Use the _validator_ config function for non-trivial validation.
2
+
3
+ The function receives a reference to the field.
4
+ Return `true` for a valid field, or an error string for an invalid field.
5
+
6
+
7
+ The function can be in-line, or a string which names a controller method.
8
+
9
+ {
10
+ module: Text,
11
+ labelText: 'Name',
12
+ validator: field => field.value.match(/^\w+$/)?true:'Special characters are not allowed',
13
+ },
14
+
15
+
16
+ {
17
+ module: Text,
18
+ labelText: 'Name',
19
+ validator: 'nameValidator'
20
+ },
@@ -0,0 +1,16 @@
1
+ - `Neo.form.field.Date`
2
+ - `Neo.form.field.Time`
3
+ - `Neo.form.field.Select`
4
+ - `Neo.form.field.Chip`
5
+ - `Neo.form.field.Color`
6
+
7
+ A picker is a base class that introduces a `tigger:[]` config.
8
+
9
+ A trigger is a widget docked on the right of a field. A text
10
+ field can configure any set of triggers that are needed.
11
+ (A _clearable_ text field is just a text field with a `Clear` trigger
12
+ dynamically added.)
13
+
14
+ Picker sub-classes are components that are pre-configured to use
15
+ one of the `Neo.form.field.trigger.*` triggers.
16
+
@@ -0,0 +1,13 @@
1
+ ##ntype:'selectfield'
2
+
3
+ {
4
+ module: SelectField,
5
+ labelText: 'Select field',
6
+ store: {
7
+ data: [ { name: 'Munich', id: '9031' }, { name: 'Nuremberg', id: '6524' }, { name: 'Augsburg', id: '8456' }, { name: 'Regensburg', id: '5826' }, { name: 'Ingolstadt', id: '3492' } { name: 'Würzburg', id: '8892' } ]
8
+ },
9
+ listeners: {
10
+ select: data=>console.log('select', data),
11
+ change: data=>console.log('change', data)
12
+ }
13
+ }
@@ -0,0 +1,24 @@
1
+
2
+
3
+ | Config | Description |
4
+ | -------------- | --------------------------------------- |
5
+ | `store_` | The store providing the dropdown values |
6
+ | `displayField` | The record property displayed to the user |
7
+ | `valueField` | The record property reflected by `value` |
8
+ | `forceSelection` | `value` is only change via record selection |
9
+ | `triggerActions` | Dropdown shows _all_ or values _filtered_ by typed value. |
10
+
11
+ <br>
12
+
13
+ | Methods | Description |
14
+ | -------------- | --------------------------------------- |
15
+ | `selectListItem()` | Selects the specified record or record index |
16
+
17
+
18
+ <br>
19
+
20
+ | Events | Description |
21
+ | -------------- | --------------------------------------- |
22
+ | _change_ | Any change to the input field value |
23
+ | _select_ | The selected record |
24
+
@@ -0,0 +1,70 @@
1
+ #Introduction
2
+
3
+ In this lab you'll add a _business_ property to the businesses tab panel.
4
+
5
+ #Steps
6
+
7
+ ??Plan your work
8
+
9
+ The main view needs to detect when a business is selected, and pass that
10
+ value to the detail panel.
11
+
12
+ The map and table could detect business selection and update the detail
13
+ panel directly. But that would break principles of encapsulation and
14
+ coupling. A given view should have no knowledge of other views that
15
+ may be in the app, and only communicates to the app via property
16
+ binding and event handling.
17
+
18
+ The rule of thumb is that the container that creates views is responsible
19
+ for coordinating how information is passed between the views.
20
+
21
+ Following those guidelines, in Yelp we need to do a few things:
22
+
23
+ - Define a `business_` property on the tab panel class, along with an event
24
+ - Have the main view detect the business change event and pass the record to the detail panel
25
+
26
+ ??Add `business` as a tab panel property
27
+
28
+ Add a `business_:null` config property to `Yelp.view.businesses.Tabs`.
29
+
30
+ Add an `afterSetBusiness(business)` method that logs the business.
31
+
32
+ You can test this by saving, refreshing, then on the console update the property.
33
+
34
+ Neo.findFirst({ntype: 'yelp-businesses-tabs'}).business = {name: 'Some business'}
35
+
36
+ You should see the data being logged.
37
+
38
+
39
+ ??Detect changes to the map selection
40
+
41
+ Set up an event handler to detect the map's _markerChange_ event.
42
+
43
+ listeners: {
44
+ markerClick: data => data.data.component
45
+ .up({ntype: 'yelp-businesses-tabs'}).business = data.data.record
46
+ }
47
+
48
+ Save and refresh, then verify that as you click on map markers the
49
+ corresponding record is being logged.
50
+
51
+ ??Fire a _businessChange_ event
52
+
53
+ Update the `afterSetBusiness` method to fire the event. Note the
54
+ addition of the first statement that ignores empty values. We don't
55
+ need the `console.log` statement any more.
56
+
57
+ afterSetBusiness (business){
58
+ if (!business) return;
59
+ this.fire('businessChange', {component: this, business});
60
+ }
61
+
62
+
63
+ ??Detect the event in the main view
64
+
65
+ Add an `onBusinessChange` event handler in the main view. It should log the business.
66
+
67
+ Then in the main view, configure the _businessChange_ listener to use that handler.
68
+
69
+ Save and refresh. As you choose map markers you should see the log emanating from
70
+ the main view controller.