generator-white-label 3.0.0 → 5.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 (334) hide show
  1. package/README.md +140 -81
  2. package/app/404.hbs +20 -0
  3. package/app/README.md +19 -0
  4. package/app/assets/data/view/toolkit/colors.json +17 -0
  5. package/app/assets/data/view/toolkit/components.json +39 -0
  6. package/app/assets/data/view/toolkit/elements.json +119 -0
  7. package/app/assets/data/view/toolkit/grids.json +17 -0
  8. package/app/assets/data/view/toolkit/icons.json +17 -0
  9. package/app/assets/data/view/toolkit/index.json +17 -0
  10. package/app/assets/data/view/toolkit/type.json +17 -0
  11. package/app/assets/font/opensans/stylesheet.css +20 -60
  12. package/app/assets/image/demo/fallback.avif +0 -0
  13. package/app/assets/image/demo/fallback.jpg +0 -0
  14. package/app/assets/image/demo/fallback.webp +0 -0
  15. package/app/assets/image/demo/large.avif +0 -0
  16. package/app/assets/image/demo/large.webp +0 -0
  17. package/app/assets/image/demo/small.avif +0 -0
  18. package/app/assets/image/demo/small.webp +0 -0
  19. package/app/assets/markup/element/a.hbs +29 -0
  20. package/app/assets/markup/element/button.hbs +30 -0
  21. package/app/assets/markup/element/div.hbs +11 -0
  22. package/app/assets/markup/element/head.hbs +78 -0
  23. package/app/assets/markup/element/iframe.hbs +20 -0
  24. package/app/assets/markup/element/img.hbs +30 -0
  25. package/app/assets/markup/element/input.hbs +43 -0
  26. package/app/assets/markup/element/label.hbs +14 -0
  27. package/app/assets/markup/element/legend.hbs +5 -0
  28. package/app/assets/markup/element/meta.hbs +11 -0
  29. package/app/assets/markup/element/nav.hbs +13 -0
  30. package/app/assets/markup/element/p.hbs +8 -0
  31. package/app/assets/markup/element/picture.hbs +58 -0
  32. package/app/assets/markup/element/script.hbs +3 -0
  33. package/app/assets/markup/element/select.hbs +35 -0
  34. package/app/assets/markup/element/span.hbs +8 -0
  35. package/app/assets/markup/element/svg.hbs +11 -0
  36. package/app/assets/markup/element/table.hbs +50 -0
  37. package/app/assets/markup/element/textarea.hbs +24 -0
  38. package/app/assets/markup/element/ul.hbs +13 -0
  39. package/app/assets/markup/modal/modal-example-1.handlebars +8 -0
  40. package/app/assets/markup/toolkit/accessibility-skip-to-element-1.handlebars +1 -0
  41. package/app/assets/markup/toolkit/accessibility-speaker-1.handlebars +1 -0
  42. package/app/assets/markup/toolkit/anchor-1.handlebars +1 -0
  43. package/app/assets/markup/toolkit/button-1.handlebars +1 -0
  44. package/app/assets/markup/toolkit/footer-1.handlebars +3 -0
  45. package/app/assets/markup/toolkit/header-1.handlebars +1 -0
  46. package/app/assets/markup/toolkit/heading-1.handlebars +1 -0
  47. package/app/assets/markup/toolkit/heading-2.handlebars +1 -0
  48. package/app/assets/markup/toolkit/heading-3.handlebars +1 -0
  49. package/app/assets/markup/toolkit/heading-4.handlebars +1 -0
  50. package/app/assets/markup/toolkit/image-1.handlebars +1 -0
  51. package/app/assets/markup/toolkit/input-checkbox-1.handlebars +1 -0
  52. package/app/assets/markup/toolkit/input-error-1.handlebars +8 -0
  53. package/app/assets/markup/toolkit/input-radio-1.handlebars +1 -0
  54. package/app/assets/markup/toolkit/input-text-1.handlebars +1 -0
  55. package/app/assets/markup/toolkit/label-1.handlebars +1 -0
  56. package/app/assets/markup/toolkit/legend-1.handlebars +1 -0
  57. package/app/assets/markup/toolkit/list-1.handlebars +1 -0
  58. package/app/assets/markup/toolkit/modal-1.handlebars +4 -0
  59. package/app/assets/markup/toolkit/nav-1.handlebars +1 -0
  60. package/app/assets/markup/toolkit/picture-1.handlebars +1 -0
  61. package/app/assets/markup/toolkit/select-1.handlebars +1 -0
  62. package/app/assets/markup/toolkit/table-1.handlebars +1 -0
  63. package/app/assets/markup/toolkit/text-1.handlebars +1 -0
  64. package/app/assets/markup/toolkit/textarea-1.handlebars +1 -0
  65. package/app/assets/markup/toolkit/youtube-player-1.handlebars +1 -0
  66. package/app/assets/script/api/facebook.ts +41 -0
  67. package/app/assets/script/api/youtube.ts +22 -0
  68. package/app/assets/script/index.ts +2 -0
  69. package/app/assets/script/mediator/global.ts +4 -0
  70. package/app/assets/script/model/singletons/countries.ts +5 -0
  71. package/app/assets/script/model/singletons/global.ts +5 -0
  72. package/app/assets/script/model/singletons/states.ts +5 -0
  73. package/app/assets/script/model/user.ts +4 -0
  74. package/app/assets/script/toolkit.ts +11 -0
  75. package/app/assets/script/types.d.ts +16 -0
  76. package/app/assets/script/utility/ajax.ts +15 -0
  77. package/app/assets/script/utility/form.ts +119 -0
  78. package/app/assets/script/utility/{regex.js → regex.ts} +15 -6
  79. package/app/assets/script/utility/share.ts +77 -0
  80. package/app/assets/script/utility/string.ts +148 -0
  81. package/app/assets/script/view/default.tsx +14 -0
  82. package/app/assets/script/view/toolkit/youtube-player-1.ts +31 -0
  83. package/app/assets/style/base/_toolkit.scss +31 -15
  84. package/app/assets/style/base/components/_modal-1.scss +80 -0
  85. package/app/assets/style/base/components/_sticky-1.scss +19 -0
  86. package/app/assets/style/base/components/_tabpanel-1.scss +115 -0
  87. package/app/assets/style/base/components/_tabpanel-2.scss +64 -0
  88. package/app/assets/style/base/components/_tabpanel-base-1.scss +13 -0
  89. package/app/assets/style/base/components/_youtube-player-1.scss +16 -0
  90. package/app/assets/style/base/elements/_anchors.scss +12 -0
  91. package/app/assets/style/base/elements/_buttons.scss +15 -0
  92. package/app/assets/style/base/elements/_fieldsets.scss +9 -0
  93. package/app/assets/style/base/elements/_images.scss +6 -2
  94. package/app/assets/style/base/elements/_inputs.scss +70 -0
  95. package/app/assets/style/base/elements/_labels.scss +8 -0
  96. package/app/assets/style/base/elements/_landmarks.scss +3 -0
  97. package/app/assets/style/base/elements/_legends.scss +11 -0
  98. package/app/assets/style/base/elements/_lists.scss +8 -1
  99. package/app/assets/style/base/elements/_tables.scss +32 -1
  100. package/app/assets/style/base/layouts/_staggered-1.scss +29 -0
  101. package/app/assets/style/base/type/_fonts.scss +39 -1
  102. package/app/assets/style/base/type/_headings.scss +29 -0
  103. package/app/assets/style/base/type/_text.scss +2 -0
  104. package/app/assets/style/base/utilities/_accessibility.scss +5 -2
  105. package/app/assets/style/base/utilities/_functions.scss +62 -9
  106. package/app/assets/style/global.scss +108 -10
  107. package/app/assets/style/print.scss +2 -3
  108. package/app/assets/style/toolkit.scss +387 -0
  109. package/app/index.hbs +21 -0
  110. package/app/package.json +1 -0
  111. package/app/toolkit/colors.hbs +102 -0
  112. package/app/toolkit/components.hbs +261 -0
  113. package/app/toolkit/elements.hbs +497 -0
  114. package/app/toolkit/grids.hbs +413 -0
  115. package/app/toolkit/icons.hbs +87 -0
  116. package/app/toolkit/index.hbs +144 -0
  117. package/app/toolkit/type.hbs +120 -0
  118. package/dist/app/assets/data/coutries.json +992 -0
  119. package/dist/app/assets/data/states.json +204 -0
  120. package/dist/app/assets/script/api/facebook.d.ts +8 -0
  121. package/dist/app/assets/script/api/facebook.js +42 -0
  122. package/dist/app/assets/script/api/facebook.js.map +1 -0
  123. package/dist/app/assets/script/api/youtube.d.ts +8 -0
  124. package/dist/app/assets/script/api/youtube.js +22 -0
  125. package/dist/app/assets/script/api/youtube.js.map +1 -0
  126. package/dist/app/assets/script/index.d.ts +2 -0
  127. package/dist/app/assets/script/index.js +2 -0
  128. package/dist/app/assets/script/index.js.map +1 -0
  129. package/dist/app/assets/script/mediator/global.d.ts +4 -0
  130. package/dist/app/assets/script/mediator/global.js +4 -0
  131. package/dist/app/assets/script/mediator/global.js.map +1 -0
  132. package/dist/app/assets/script/model/singletons/countries.d.ts +20 -0
  133. package/dist/app/assets/script/model/singletons/countries.js +5 -0
  134. package/dist/app/assets/script/model/singletons/countries.js.map +1 -0
  135. package/dist/app/assets/script/model/singletons/global.d.ts +20 -0
  136. package/dist/app/assets/script/model/singletons/global.js +5 -0
  137. package/dist/app/assets/script/model/singletons/global.js.map +1 -0
  138. package/dist/app/assets/script/model/singletons/states.d.ts +20 -0
  139. package/dist/app/assets/script/model/singletons/states.js +5 -0
  140. package/dist/app/assets/script/model/singletons/states.js.map +1 -0
  141. package/dist/app/assets/script/model/user.d.ts +4 -0
  142. package/dist/app/assets/script/model/user.js +6 -0
  143. package/dist/app/assets/script/model/user.js.map +1 -0
  144. package/dist/app/assets/script/toolkit.d.ts +1 -0
  145. package/dist/app/assets/script/toolkit.js +7 -0
  146. package/dist/app/assets/script/toolkit.js.map +1 -0
  147. package/dist/app/assets/script/utility/ajax.d.ts +8 -0
  148. package/dist/app/assets/script/utility/ajax.js +17 -0
  149. package/dist/app/assets/script/utility/ajax.js.map +1 -0
  150. package/dist/app/assets/script/utility/form.d.ts +64 -0
  151. package/dist/app/assets/script/utility/form.js +111 -0
  152. package/dist/app/assets/script/utility/form.js.map +1 -0
  153. package/dist/app/assets/script/utility/regex.d.ts +14 -0
  154. package/dist/app/assets/script/utility/regex.js +27 -0
  155. package/dist/app/assets/script/utility/regex.js.map +1 -0
  156. package/dist/app/assets/script/utility/share.d.ts +68 -0
  157. package/dist/app/assets/script/utility/share.js +81 -0
  158. package/dist/app/assets/script/utility/share.js.map +1 -0
  159. package/dist/app/assets/script/utility/string.d.ts +64 -0
  160. package/dist/app/assets/script/utility/string.js +135 -0
  161. package/dist/app/assets/script/utility/string.js.map +1 -0
  162. package/dist/app/assets/script/view/default.d.ts +11 -0
  163. package/dist/app/assets/script/view/default.js +15 -0
  164. package/dist/app/assets/script/view/default.js.map +1 -0
  165. package/dist/app/assets/script/view/toolkit/youtube-player-1.d.ts +23 -0
  166. package/dist/app/assets/script/view/toolkit/youtube-player-1.js +32 -0
  167. package/dist/app/assets/script/view/toolkit/youtube-player-1.js.map +1 -0
  168. package/dist/generators/app/index.d.ts +18 -0
  169. package/dist/generators/app/index.js +59 -0
  170. package/dist/generators/app/index.js.map +1 -0
  171. package/dist/scripts/build.d.ts +22 -0
  172. package/dist/scripts/build.js +158 -0
  173. package/dist/scripts/build.js.map +1 -0
  174. package/generators/app/index.js +2 -43
  175. package/generators/app/index.ts +61 -0
  176. package/package.json +78 -109
  177. package/scripts/build.ts +175 -0
  178. package/tsconfig.site.json +26 -0
  179. package/.babelrc +0 -7
  180. package/.editorconfig +0 -13
  181. package/.eslintrc +0 -64
  182. package/.htmllintrc +0 -6
  183. package/.npmignore +0 -12
  184. package/.sass-lint.yml +0 -16
  185. package/.travis.yml +0 -18
  186. package/app/assets/font/opensans/generator_config.txt +0 -5
  187. package/app/assets/font/opensans/opensans-bold-webfont.eot +0 -0
  188. package/app/assets/font/opensans/opensans-bold-webfont.svg +0 -1824
  189. package/app/assets/font/opensans/opensans-bold-webfont.ttf +0 -0
  190. package/app/assets/font/opensans/opensans-bold-webfont.woff +0 -0
  191. package/app/assets/font/opensans/opensans-bolditalic-webfont.eot +0 -0
  192. package/app/assets/font/opensans/opensans-bolditalic-webfont.svg +0 -1824
  193. package/app/assets/font/opensans/opensans-bolditalic-webfont.ttf +0 -0
  194. package/app/assets/font/opensans/opensans-bolditalic-webfont.woff +0 -0
  195. package/app/assets/font/opensans/opensans-extrabold-webfont.eot +0 -0
  196. package/app/assets/font/opensans/opensans-extrabold-webfont.svg +0 -1824
  197. package/app/assets/font/opensans/opensans-extrabold-webfont.ttf +0 -0
  198. package/app/assets/font/opensans/opensans-extrabold-webfont.woff +0 -0
  199. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.eot +0 -0
  200. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.svg +0 -1824
  201. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.ttf +0 -0
  202. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.woff +0 -0
  203. package/app/assets/font/opensans/opensans-italic-webfont.eot +0 -0
  204. package/app/assets/font/opensans/opensans-italic-webfont.svg +0 -1824
  205. package/app/assets/font/opensans/opensans-italic-webfont.ttf +0 -0
  206. package/app/assets/font/opensans/opensans-italic-webfont.woff +0 -0
  207. package/app/assets/font/opensans/opensans-light-webfont.eot +0 -0
  208. package/app/assets/font/opensans/opensans-light-webfont.svg +0 -1824
  209. package/app/assets/font/opensans/opensans-light-webfont.ttf +0 -0
  210. package/app/assets/font/opensans/opensans-light-webfont.woff +0 -0
  211. package/app/assets/font/opensans/opensans-lightitalic-webfont.eot +0 -0
  212. package/app/assets/font/opensans/opensans-lightitalic-webfont.svg +0 -1824
  213. package/app/assets/font/opensans/opensans-lightitalic-webfont.ttf +0 -0
  214. package/app/assets/font/opensans/opensans-lightitalic-webfont.woff +0 -0
  215. package/app/assets/font/opensans/opensans-regular-webfont.eot +0 -0
  216. package/app/assets/font/opensans/opensans-regular-webfont.svg +0 -1824
  217. package/app/assets/font/opensans/opensans-regular-webfont.ttf +0 -0
  218. package/app/assets/font/opensans/opensans-regular-webfont.woff +0 -0
  219. package/app/assets/font/opensans/opensans-semibold-webfont.eot +0 -0
  220. package/app/assets/font/opensans/opensans-semibold-webfont.svg +0 -1824
  221. package/app/assets/font/opensans/opensans-semibold-webfont.ttf +0 -0
  222. package/app/assets/font/opensans/opensans-semibold-webfont.woff +0 -0
  223. package/app/assets/font/opensans/opensans-semibolditalic-webfont.eot +0 -0
  224. package/app/assets/font/opensans/opensans-semibolditalic-webfont.svg +0 -1824
  225. package/app/assets/font/opensans/opensans-semibolditalic-webfont.ttf +0 -0
  226. package/app/assets/font/opensans/opensans-semibolditalic-webfont.woff +0 -0
  227. package/app/assets/font/opensans/specimen_files/grid_12-825-55-15.css +0 -129
  228. package/app/assets/font/opensans/specimen_files/specimen_stylesheet.css +0 -396
  229. package/app/assets/script/index.js +0 -11
  230. package/app/assets/script/mediator/global.js +0 -5
  231. package/app/assets/script/model/singletons/countries.js +0 -6
  232. package/app/assets/script/model/singletons/global.js +0 -6
  233. package/app/assets/script/model/singletons/states.js +0 -6
  234. package/app/assets/script/model/user.js +0 -5
  235. package/app/assets/script/utility/form.js +0 -86
  236. package/app/assets/script/utility/share.js +0 -52
  237. package/app/assets/script/utility/string.js +0 -70
  238. package/app/assets/script/view/default.js +0 -11
  239. package/app/assets/style/base/vendor/_foundation.scss +0 -2
  240. package/app/assets/test/spec/shareSpec.js +0 -137
  241. package/app/index.html +0 -43
  242. package/app/report/istanbul/base.css +0 -213
  243. package/app/report/istanbul/index.html +0 -93
  244. package/app/report/istanbul/prettify.css +0 -1
  245. package/app/report/istanbul/prettify.js +0 -1
  246. package/app/report/istanbul/sort-arrow-sprite.png +0 -0
  247. package/app/report/istanbul/sorter.js +0 -158
  248. package/app/report/istanbul/utility/form.js.html +0 -524
  249. package/app/report/istanbul/utility/index.html +0 -132
  250. package/app/report/istanbul/utility/regex.js.html +0 -203
  251. package/app/report/istanbul/utility/share.js.html +0 -401
  252. package/app/report/istanbul/utility/string.js.html +0 -446
  253. package/app/report/jsdoc/DragEvent.html +0 -303
  254. package/app/report/jsdoc/Event.html +0 -773
  255. package/app/report/jsdoc/EventPropagators.html +0 -336
  256. package/app/report/jsdoc/FocusEvent.html +0 -303
  257. package/app/report/jsdoc/ForEachBookKeeping.html +0 -425
  258. package/app/report/jsdoc/KeyboardEvent.html +0 -303
  259. package/app/report/jsdoc/MapBookKeeping.html +0 -457
  260. package/app/report/jsdoc/MouseEvent.html +0 -303
  261. package/app/report/jsdoc/ReactClass.html +0 -330
  262. package/app/report/jsdoc/ReactClassInterface.html +0 -311
  263. package/app/report/jsdoc/ReactDOMComponent.html +0 -349
  264. package/app/report/jsdoc/ReactDOMTextComponent.html +0 -348
  265. package/app/report/jsdoc/ReactMountReady.html +0 -340
  266. package/app/report/jsdoc/ReactMultiChild.html +0 -330
  267. package/app/report/jsdoc/ReactOwner.html +0 -351
  268. package/app/report/jsdoc/ReactReconcileTransaction.html +0 -342
  269. package/app/report/jsdoc/ReactServerRenderingTransaction.html +0 -376
  270. package/app/report/jsdoc/ReactServerUpdateQueue.html +0 -382
  271. package/app/report/jsdoc/TouchEvent.html +0 -303
  272. package/app/report/jsdoc/Transaction.html +0 -459
  273. package/app/report/jsdoc/UIEvent.html +0 -303
  274. package/app/report/jsdoc/WheelEvent.html +0 -303
  275. package/app/report/jsdoc/classes.list.html +0 -339
  276. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.eot +0 -0
  277. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.svg +0 -288
  278. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.ttf +0 -0
  279. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.woff +0 -0
  280. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.woff2 +0 -0
  281. package/app/report/jsdoc/global.html +0 -1653
  282. package/app/report/jsdoc/img/glyphicons-halflings-white.png +0 -0
  283. package/app/report/jsdoc/img/glyphicons-halflings.png +0 -0
  284. package/app/report/jsdoc/index.html +0 -236
  285. package/app/report/jsdoc/interfaces.list.html +0 -339
  286. package/app/report/jsdoc/quicksearch.html +0 -31
  287. package/app/report/jsdoc/scripts/docstrap.lib.js +0 -11
  288. package/app/report/jsdoc/scripts/fulltext-search-ui.js +0 -89
  289. package/app/report/jsdoc/scripts/fulltext-search.js +0 -36
  290. package/app/report/jsdoc/scripts/lunr.min.js +0 -6
  291. package/app/report/jsdoc/scripts/prettify/Apache-License-2.0.txt +0 -202
  292. package/app/report/jsdoc/scripts/prettify/jquery.min.js +0 -6
  293. package/app/report/jsdoc/scripts/prettify/lang-css.js +0 -21
  294. package/app/report/jsdoc/scripts/prettify/prettify.js +0 -496
  295. package/app/report/jsdoc/scripts/sunlight.js +0 -1157
  296. package/app/report/jsdoc/scripts/toc.js +0 -203
  297. package/app/report/jsdoc/styles/darkstrap.css +0 -960
  298. package/app/report/jsdoc/styles/prettify-tomorrow.css +0 -132
  299. package/app/report/jsdoc/styles/site.cerulean.css +0 -7008
  300. package/app/report/jsdoc/styles/site.cosmo.css +0 -7061
  301. package/app/report/jsdoc/styles/site.cyborg.css +0 -7048
  302. package/app/report/jsdoc/styles/site.darkly.css +0 -7171
  303. package/app/report/jsdoc/styles/site.darkstrap.css +0 -5638
  304. package/app/report/jsdoc/styles/site.dibs-bootstrap.css +0 -5899
  305. package/app/report/jsdoc/styles/site.flatly.css +0 -7147
  306. package/app/report/jsdoc/styles/site.journal.css +0 -6973
  307. package/app/report/jsdoc/styles/site.lumen.css +0 -7298
  308. package/app/report/jsdoc/styles/site.paper.css +0 -7623
  309. package/app/report/jsdoc/styles/site.readable.css +0 -6997
  310. package/app/report/jsdoc/styles/site.sandstone.css +0 -7035
  311. package/app/report/jsdoc/styles/site.simplex.css +0 -7023
  312. package/app/report/jsdoc/styles/site.slate.css +0 -7343
  313. package/app/report/jsdoc/styles/site.spacelab.css +0 -7055
  314. package/app/report/jsdoc/styles/site.superhero.css +0 -7131
  315. package/app/report/jsdoc/styles/site.united.css +0 -6895
  316. package/app/report/jsdoc/styles/site.yeti.css +0 -7195
  317. package/app/report/jsdoc/styles/sunlight.dark.css +0 -345
  318. package/app/report/jsdoc/styles/sunlight.default.css +0 -344
  319. package/gulp/config.js +0 -207
  320. package/gulp/tasks/accessibility.js +0 -34
  321. package/gulp/tasks/build.js +0 -18
  322. package/gulp/tasks/clean.js +0 -18
  323. package/gulp/tasks/data.js +0 -22
  324. package/gulp/tasks/default.js +0 -9
  325. package/gulp/tasks/deploy.js +0 -222
  326. package/gulp/tasks/documentation.js +0 -28
  327. package/gulp/tasks/markup.js +0 -26
  328. package/gulp/tasks/script.js +0 -92
  329. package/gulp/tasks/style.js +0 -42
  330. package/gulp/tasks/unit.js +0 -38
  331. package/gulp/tasks/watch.js +0 -77
  332. package/gulpfile.js +0 -8
  333. package/jsdoc.json +0 -23
  334. package/karma.conf.js +0 -58
@@ -0,0 +1,111 @@
1
+ 'use strict';
2
+ export default class {
3
+ /**
4
+ * Return the values of selected options in document order.
5
+ * @param element - Select element to inspect.
6
+ * @returns Selected option values in document order.
7
+ */
8
+ multiselectGetSelectedValues(element) {
9
+ let values = [];
10
+ element.querySelectorAll(':checked').forEach((item) => {
11
+ values.push(item.value);
12
+ });
13
+ return values;
14
+ }
15
+ /**
16
+ * Mutate option selection flags so only the matching value remains selected.
17
+ * @param data - Data supplied by the caller; validation follows the method contract.
18
+ * @param value - Value to find or format.
19
+ * @returns The same option array with updated selection flags.
20
+ */
21
+ selectMenuSelectOption(data, value) {
22
+ data.forEach((item) => {
23
+ if (item.value === value) {
24
+ item.selected = true;
25
+ }
26
+ else {
27
+ item.selected = false;
28
+ }
29
+ });
30
+ return data;
31
+ }
32
+ /**
33
+ * Return the last option matching a value, or false when none matches.
34
+ * @param data - Data supplied by the caller; validation follows the method contract.
35
+ * @param value - Value to find or format.
36
+ * @returns The matching option or false.
37
+ */
38
+ selectMenuReturnOption(data, value) {
39
+ let itemMatch = false;
40
+ data.forEach((item) => {
41
+ if (item.value === value) {
42
+ itemMatch = item;
43
+ }
44
+ });
45
+ return itemMatch;
46
+ }
47
+ /**
48
+ * Add stable field IDs and readable labels to metadata entries in place.
49
+ * @param metaData - Metadata array to decorate or divide.
50
+ * @returns The same metadata array with IDs and labels.
51
+ */
52
+ normalizeMetaData(metaData) {
53
+ let i = 0;
54
+ metaData.forEach((item) => {
55
+ item.keyID = 'meta-field-key-' + i;
56
+ item.keyTitle = 'Field Name:';
57
+ item.valueID = 'meta-field-value-' + i;
58
+ item.valueTitle = 'Field Value: ' + item.key;
59
+ i++;
60
+ });
61
+ return metaData;
62
+ }
63
+ /**
64
+ * Move the latter half of metadata into a second group, mutating the supplied array.
65
+ * @param metaData - Metadata array to decorate or divide.
66
+ * @returns Two groups; group-1 retains the mutated input array.
67
+ */
68
+ splitMetaData(metaData) {
69
+ let secondRowCount = Math.floor(metaData.length / 2);
70
+ return {
71
+ 'group-1': metaData,
72
+ 'group-2': metaData.splice(metaData.length - secondRowCount, secondRowCount)
73
+ };
74
+ }
75
+ /**
76
+ * Create display options from named records and mark the requested selections.
77
+ * @param arr - Records used to build select options.
78
+ * @param selected - Selected ID or IDs.
79
+ * @returns New options containing names, values, and selection flags.
80
+ */
81
+ buildOptions(arr, selected) {
82
+ const options = [];
83
+ let option;
84
+ arr.forEach((obj) => {
85
+ let name = 'not specified';
86
+ if (obj.first_name && obj.last_name) {
87
+ name = obj.first_name + ' ' + obj.last_name;
88
+ }
89
+ else if (obj.name) {
90
+ name = obj.name;
91
+ }
92
+ option = {
93
+ name: name,
94
+ value: obj.id
95
+ };
96
+ if (selected === obj.id) {
97
+ option.selected = true;
98
+ }
99
+ else if (Array.isArray(selected) && selected.indexOf(obj.id) !== -1) {
100
+ option.selected = true;
101
+ }
102
+ else {
103
+ option.selected = false;
104
+ }
105
+ options.push(option);
106
+ });
107
+ return options;
108
+ }
109
+ }
110
+ ;
111
+ //# sourceMappingURL=form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../../app/assets/script/utility/form.ts"],"names":[],"mappings":"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","sourcesContent":["/** Select option data used by the generated form examples. */\ninterface Option {value: string | number; selected?: boolean; name?: string}\ninterface Metadata {key: string; keyID?: string; keyTitle?: string; valueID?: string; valueTitle?: string}\ninterface OptionInput {id: string | number; first_name?: string; last_name?: string; name?: string}\n'use strict';\n export default class {\n /**\n * Return the values of selected options in document order.\n * @param element - Select element to inspect.\n * @returns Selected option values in document order.\n */\n multiselectGetSelectedValues(element: HTMLSelectElement) {\n let values: string[] = [];\n element.querySelectorAll<HTMLOptionElement>(':checked').forEach((item) => {\n values.push(item.value);\n });\n return values;\n }\n /**\n * Mutate option selection flags so only the matching value remains selected.\n * @param data - Data supplied by the caller; validation follows the method contract.\n * @param value - Value to find or format.\n * @returns The same option array with updated selection flags.\n */\n selectMenuSelectOption(data: Option[], value: string | number) {\n data.forEach ((item) => {\n if (item.value === value) {\n item.selected = true;\n } else {\n item.selected = false;\n }\n });\n return data;\n }\n /**\n * Return the last option matching a value, or false when none matches.\n * @param data - Data supplied by the caller; validation follows the method contract.\n * @param value - Value to find or format.\n * @returns The matching option or false.\n */\n selectMenuReturnOption(data: Option[], value: string | number) {\n let itemMatch: Option | false = false;\n data.forEach((item) => {\n if (item.value === value) {\n itemMatch = item;\n }\n });\n return itemMatch;\n }\n /**\n * Add stable field IDs and readable labels to metadata entries in place.\n * @param metaData - Metadata array to decorate or divide.\n * @returns The same metadata array with IDs and labels.\n */\n normalizeMetaData(metaData: Metadata[]) {\n let i = 0;\n metaData.forEach((item) => {\n item.keyID = 'meta-field-key-' + i;\n item.keyTitle = 'Field Name:';\n item.valueID = 'meta-field-value-' + i;\n item.valueTitle = 'Field Value: ' + item.key;\n i++;\n });\n\n return metaData;\n }\n /**\n * Move the latter half of metadata into a second group, mutating the supplied array.\n * @param metaData - Metadata array to decorate or divide.\n * @returns Two groups; group-1 retains the mutated input array.\n */\n splitMetaData(metaData: Metadata[]) {\n let secondRowCount = Math.floor(metaData.length / 2);\n return {\n 'group-1': metaData,\n 'group-2': metaData.splice(metaData.length - secondRowCount, secondRowCount)\n }\n }\n /**\n * Create display options from named records and mark the requested selections.\n * @param arr - Records used to build select options.\n * @param selected - Selected ID or IDs.\n * @returns New options containing names, values, and selection flags.\n */\n buildOptions(arr: OptionInput[], selected: string | number | Array<string | number>) {\n\n const options: Option[] = [];\n let option: Option;\n\n arr.forEach((obj) => {\n\n let name = 'not specified';\n\n if (obj.first_name && obj.last_name) {\n name = obj.first_name + ' ' + obj.last_name;\n } else if (obj.name) {\n name = obj.name;\n }\n\n option = {\n name: name,\n value: obj.id\n };\n\n if (selected === obj.id) {\n option.selected = true;\n } else if (Array.isArray(selected) && selected.indexOf(obj.id) !== -1) {\n option.selected = true;\n } else {\n option.selected = false;\n }\n\n options.push(option);\n\n });\n\n return options;\n }\n };\n"]}
@@ -0,0 +1,14 @@
1
+ export default class {
2
+ date: RegExp;
3
+ password: RegExp;
4
+ phone: RegExp;
5
+ phoneEXT: RegExp;
6
+ zip: RegExp;
7
+ characters2: RegExp;
8
+ characters25: RegExp;
9
+ currency: RegExp;
10
+ /**
11
+ * Create an instance with its own state and listener references.
12
+ */
13
+ constructor();
14
+ }
@@ -0,0 +1,27 @@
1
+ /** @module app/assets/script/utility/regex */
2
+ 'use strict';
3
+ export default class {
4
+ date;
5
+ password;
6
+ phone;
7
+ phoneEXT;
8
+ zip;
9
+ characters2;
10
+ characters25;
11
+ currency;
12
+ /**
13
+ * Create an instance with its own state and listener references.
14
+ */
15
+ constructor() {
16
+ this.date = /^\$?(20|30)\d\d[- \/.](0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])?$/g;
17
+ this.password = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{5,15}$/m;
18
+ this.phone = /^(\+?\d[ -\.])?([\\(]{0,1}([0-9]){3}[\\\.\-)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-\.]?[ ]?([0-9]){4})|(\d{10})$/m;
19
+ this.phoneEXT = /^(\+?\d[ -\.])?([\\(]{0,1}([0-9]){3}[\\\.\-)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-\.]?[ ]?([0-9]){4}[ ]*((x|ext|ext ){0,1}([0-9]){1,5}){0,1})|(\d{10})$/m;
20
+ this.zip = /^\d{5}$/m;
21
+ this.characters2 = /^.{2,500}$/m;
22
+ this.characters25 = /^.{25,500}$/m;
23
+ this.currency = /^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$/m;
24
+ }
25
+ }
26
+ ;
27
+ //# sourceMappingURL=regex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regex.js","sourceRoot":"","sources":["../../../../../app/assets/script/utility/regex.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,YAAY,CAAC;AACT,MAAM,CAAC,OAAO;IACd,IAAI,CAAS;IACb,QAAQ,CAAS;IACjB,KAAK,CAAS;IACd,QAAQ,CAAS;IACjB,GAAG,CAAS;IACZ,WAAW,CAAS;IACpB,YAAY,CAAS;IACrB,QAAQ,CAAS;IAEb;;OAEG;IACH;QACI,IAAI,CAAC,IAAI,GAAI,yEAAyE,CAAC;QACvF,IAAI,CAAC,QAAQ,GAAG,0CAA0C,CAAC;QAC3D,IAAI,CAAC,KAAK,GAAG,iHAAiH,CAAC;QAC/H,IAAI,CAAC,QAAQ,GAAG,yJAAyJ,CAAC;QAC1K,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,cAAc,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,8DAA8D,CAAC;IACnF,CAAC;CACJ;AAAA,CAAC","sourcesContent":["/** @module app/assets/script/utility/regex */\n'use strict';\n export default class {\n date: RegExp;\n password: RegExp;\n phone: RegExp;\n phoneEXT: RegExp;\n zip: RegExp;\n characters2: RegExp;\n characters25: RegExp;\n currency: RegExp;\n\n /**\n * Create an instance with its own state and listener references.\n */\n constructor() {\n this.date =  /^\\$?(20|30)\\d\\d[- \\/.](0[1-9]|1[012])[- \\/.](0[1-9]|[12][0-9]|3[01])?$/g;\n this.password = /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{5,15}$/m;\n this.phone = /^(\\+?\\d[ -\\.])?([\\\\(]{0,1}([0-9]){3}[\\\\\\.\\-)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-\\.]?[ ]?([0-9]){4})|(\\d{10})$/m;\n this.phoneEXT = /^(\\+?\\d[ -\\.])?([\\\\(]{0,1}([0-9]){3}[\\\\\\.\\-)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-\\.]?[ ]?([0-9]){4}[ ]*((x|ext|ext ){0,1}([0-9]){1,5}){0,1})|(\\d{10})$/m;\n this.zip = /^\\d{5}$/m;\n this.characters2 = /^.{2,500}$/m;\n this.characters25 = /^.{25,500}$/m;\n this.currency = /^\\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$/m;\n }\n };\n"]}
@@ -0,0 +1,68 @@
1
+ export default class {
2
+ /**
3
+ * Build an encoded Facebook share URL.
4
+ * @param params - Request parameters required by this operation.
5
+ * @returns An encoded Facebook share URL.
6
+ */
7
+ shareFacebookUrl(params: {
8
+ url?: string;
9
+ text?: string;
10
+ title?: string;
11
+ summary?: string;
12
+ subject?: string;
13
+ body?: string;
14
+ }): string;
15
+ /**
16
+ * Build the legacy Twitter intent URL for messages of at most 140 characters.
17
+ * @param params - Request parameters required by this operation.
18
+ * @returns An encoded intent URL, or false for missing or overlong text.
19
+ */
20
+ shareTwitterUrl(params: {
21
+ url?: string;
22
+ text?: string;
23
+ title?: string;
24
+ summary?: string;
25
+ subject?: string;
26
+ body?: string;
27
+ }): string | false;
28
+ /**
29
+ * Build a legacy Google Plus URL for compatibility; the external service is discontinued.
30
+ * @param params - Request parameters required by this operation.
31
+ * @returns The legacy share URL, or false when no URL is supplied.
32
+ * @deprecated Retained only to avoid silently changing older callers.
33
+ */
34
+ shareGooglePlusUrl(params: {
35
+ url?: string;
36
+ text?: string;
37
+ title?: string;
38
+ summary?: string;
39
+ subject?: string;
40
+ body?: string;
41
+ }): string | false;
42
+ /**
43
+ * Build an encoded LinkedIn share URL with optional title and summary.
44
+ * @param params - Request parameters required by this operation.
45
+ * @returns An encoded share URL, or false when no URL is supplied.
46
+ */
47
+ shareLinkedInUrl(params: {
48
+ url?: string;
49
+ text?: string;
50
+ title?: string;
51
+ summary?: string;
52
+ subject?: string;
53
+ body?: string;
54
+ }): string | false;
55
+ /**
56
+ * Build a mailto link only when both subject and body are supplied.
57
+ * @param params - Request parameters required by this operation.
58
+ * @returns An encoded mailto link, or false when subject or body is missing.
59
+ */
60
+ shareEmailUrl(params: {
61
+ url?: string;
62
+ text?: string;
63
+ title?: string;
64
+ summary?: string;
65
+ subject?: string;
66
+ body?: string;
67
+ }): string | false;
68
+ }
@@ -0,0 +1,81 @@
1
+ /** @module app/assets/script/utility/share */
2
+ 'use strict';
3
+ export default class {
4
+ /**
5
+ * Build an encoded Facebook share URL.
6
+ * @param params - Request parameters required by this operation.
7
+ * @returns An encoded Facebook share URL.
8
+ */
9
+ shareFacebookUrl(params) {
10
+ return 'https://www.facebook.com/sharer.php?u=' + encodeURIComponent(params.url || '');
11
+ }
12
+ /**
13
+ * Build the legacy Twitter intent URL for messages of at most 140 characters.
14
+ * @param params - Request parameters required by this operation.
15
+ * @returns An encoded intent URL, or false for missing or overlong text.
16
+ */
17
+ shareTwitterUrl(params) {
18
+ //check if the message is the right size and that a message is definded
19
+ if (params.text && params.text.length <= 140) {
20
+ var url = 'https://twitter.com/intent/tweet?text=' + encodeURIComponent(params.text);
21
+ // check if they passed in an url along with the message
22
+ if (params.url) {
23
+ url = url + '&url=' + encodeURIComponent(params.url);
24
+ }
25
+ // return back the full share url
26
+ return url;
27
+ }
28
+ else {
29
+ return false;
30
+ }
31
+ }
32
+ /**
33
+ * Build a legacy Google Plus URL for compatibility; the external service is discontinued.
34
+ * @param params - Request parameters required by this operation.
35
+ * @returns The legacy share URL, or false when no URL is supplied.
36
+ * @deprecated Retained only to avoid silently changing older callers.
37
+ */
38
+ shareGooglePlusUrl(params) {
39
+ if (!params.url) {
40
+ return false;
41
+ }
42
+ return 'https://plus.google.com/share?url=' + encodeURIComponent(params.url);
43
+ }
44
+ /**
45
+ * Build an encoded LinkedIn share URL with optional title and summary.
46
+ * @param params - Request parameters required by this operation.
47
+ * @returns An encoded share URL, or false when no URL is supplied.
48
+ */
49
+ shareLinkedInUrl(params) {
50
+ // check it an url is defined
51
+ if (params.url) {
52
+ var url = 'https://www.linkedin.com/shareArticle?url=' + encodeURIComponent(params.url);
53
+ // if a title is passed add it to the share url
54
+ if (params.title) {
55
+ url = url + '&title=' + encodeURIComponent(params.title);
56
+ }
57
+ if (params.summary) {
58
+ // if a summary is passed add it to the share url
59
+ url = url + '&summary=' + encodeURIComponent(params.summary);
60
+ }
61
+ // return back the full share url
62
+ return url;
63
+ }
64
+ else {
65
+ return false;
66
+ }
67
+ }
68
+ /**
69
+ * Build a mailto link only when both subject and body are supplied.
70
+ * @param params - Request parameters required by this operation.
71
+ * @returns An encoded mailto link, or false when subject or body is missing.
72
+ */
73
+ shareEmailUrl(params) {
74
+ if (!params.subject || !params.body) {
75
+ return false;
76
+ }
77
+ return 'mailto:?subject=' + encodeURIComponent(params.subject) + '&body=' + encodeURIComponent(params.body);
78
+ }
79
+ }
80
+ ;
81
+ //# sourceMappingURL=share.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share.js","sourceRoot":"","sources":["../../../../../app/assets/script/utility/share.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,YAAY,CAAC;AACT,MAAM,CAAC,OAAO;IACV;;;;OAIG;IACH,gBAAgB,CAAC,MAAwG;QACrH,OAAO,wCAAwC,GAAG,kBAAkB,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;IAC3F,CAAC;IACD;;;;OAIG;IACH,eAAe,CAAC,MAAwG;QACpH,uEAAuE;QACvE,IAAI,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;YAC3C,IAAI,GAAG,GAAG,wCAAwC,GAAG,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACrF,wDAAwD;YACxD,IAAI,MAAM,CAAC,GAAG,EAAE,CAAC;gBACb,GAAG,GAAG,GAAG,GAAG,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YACxD,CAAC;YACD,iCAAiC;YACjC,OAAO,GAAG,CAAC;QACf,CAAC;aAAM,CAAC;YACJ,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IACD;;;;;OAKG;IACH,kBAAkB,CAAC,MAAwG;QACvH,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,oCAAoC,GAAG,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjF,CAAC;IACD;;;;OAIG;IACH,gBAAgB,CAAC,MAAwG;QACrH,6BAA6B;QAC7B,IAAI,MAAM,CAAC,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,GAAG,4CAA4C,GAAG,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACxF,+CAA+C;YAC/C,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;gBACf,GAAG,GAAG,GAAG,GAAG,SAAS,GAAG,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC7D,CAAC;YACD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACjB,iDAAiD;gBACjD,GAAG,GAAG,GAAG,GAAG,WAAW,GAAG,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACjE,CAAC;YACD,iCAAiC;YACjC,OAAO,GAAG,CAAC;QACf,CAAC;aAAM,CAAC;YACJ,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IACD;;;;OAIG;IACH,aAAa,CAAC,MAAwG;QAClH,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAClC,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,QAAQ,GAAG,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChH,CAAC;CACJ;AAAA,CAAC","sourcesContent":["/** @module app/assets/script/utility/share */\n'use strict';\n export default class {\n /**\n * Build an encoded Facebook share URL.\n * @param params - Request parameters required by this operation.\n * @returns An encoded Facebook share URL.\n */\n shareFacebookUrl(params: {url?: string; text?: string; title?: string; summary?: string; subject?: string; body?: string}) {\n return 'https://www.facebook.com/sharer.php?u=' + encodeURIComponent(params.url || '');\n }\n /**\n * Build the legacy Twitter intent URL for messages of at most 140 characters.\n * @param params - Request parameters required by this operation.\n * @returns An encoded intent URL, or false for missing or overlong text.\n */\n shareTwitterUrl(params: {url?: string; text?: string; title?: string; summary?: string; subject?: string; body?: string}) {\n //check if the message is the right size and that a message is definded\n if (params.text && params.text.length <= 140) {\n var url = 'https://twitter.com/intent/tweet?text=' + encodeURIComponent(params.text);\n // check if they passed in an url along with the message\n if (params.url) {\n url = url + '&url=' + encodeURIComponent(params.url)\n }\n // return back the full share url\n return url;\n } else {\n return false;\n }\n }\n /**\n * Build a legacy Google Plus URL for compatibility; the external service is discontinued.\n * @param params - Request parameters required by this operation.\n * @returns The legacy share URL, or false when no URL is supplied.\n * @deprecated Retained only to avoid silently changing older callers.\n */\n shareGooglePlusUrl(params: {url?: string; text?: string; title?: string; summary?: string; subject?: string; body?: string}) {\n if (!params.url) {\n return false;\n }\n return 'https://plus.google.com/share?url=' + encodeURIComponent(params.url);\n }\n /**\n * Build an encoded LinkedIn share URL with optional title and summary.\n * @param params - Request parameters required by this operation.\n * @returns An encoded share URL, or false when no URL is supplied.\n */\n shareLinkedInUrl(params: {url?: string; text?: string; title?: string; summary?: string; subject?: string; body?: string}) {\n // check it an url is defined\n if (params.url) {\n var url = 'https://www.linkedin.com/shareArticle?url=' + encodeURIComponent(params.url);\n // if a title is passed add it to the share url\n if (params.title) {\n url = url + '&title=' + encodeURIComponent(params.title);\n }\n if (params.summary) {\n // if a summary is passed add it to the share url\n url = url + '&summary=' + encodeURIComponent(params.summary);\n }\n // return back the full share url\n return url;\n } else {\n return false;\n }\n }\n /**\n * Build a mailto link only when both subject and body are supplied.\n * @param params - Request parameters required by this operation.\n * @returns An encoded mailto link, or false when subject or body is missing.\n */\n shareEmailUrl(params: {url?: string; text?: string; title?: string; summary?: string; subject?: string; body?: string}) {\n if (!params.subject || !params.body) {\n return false;\n }\n return 'mailto:?subject=' + encodeURIComponent(params.subject) + '&body=' + encodeURIComponent(params.body);\n }\n };\n"]}
@@ -0,0 +1,64 @@
1
+ export default class {
2
+ /**
3
+ * Parse trusted HTML and clone its first root node; reject empty markup.
4
+ * @param string - Trusted HTML containing at least one root node.
5
+ * @returns A clone of the first parsed root node.
6
+ * @throws When input does not satisfy the documented contract.
7
+ */
8
+ toElement(string: string): Node;
9
+ /**
10
+ * Read and decode a query value, returning null when absent and an empty string when valueless.
11
+ * @param name - Resource, field, or parameter name.
12
+ * @param url - URL or optional adapter argument.
13
+ * @returns The decoded value, an empty string, or null when absent.
14
+ */
15
+ getQueryStringParamater(name: string, url: string): string | null;
16
+ /**
17
+ * Format a local calendar date as YYYY-MM-DD or return Invalid date.
18
+ * @param unformattedDate - Date input to format.
19
+ * @returns A local YYYY-MM-DD string or Invalid date.
20
+ */
21
+ formatDate(unformattedDate: string | number | Date): string;
22
+ /**
23
+ * Format a calendar date using the legacy API noon timestamp convention.
24
+ * @param unformattedDate - Date input to format.
25
+ * @returns A YYYY-MM-DDT12:00 string or Invalid date.
26
+ */
27
+ formatDateAPI(unformattedDate: string): string;
28
+ /**
29
+ * Format a rounded number using en-US grouping.
30
+ * @param unformattedNumber - Numeric input to format.
31
+ * @returns The grouped and rounded number string.
32
+ */
33
+ formatNumber(unformattedNumber: number | string): string;
34
+ /**
35
+ * Parse a base-ten integer using the existing parseInt behavior.
36
+ * @param formattedNumber - Integer text to parse.
37
+ * @returns The parsed integer, or NaN when no integer can be read.
38
+ */
39
+ unformatNumber(formattedNumber: string): number;
40
+ /**
41
+ * Format a numeric value as US dollars with two decimal places.
42
+ * @param unformattedCurrency - Numeric currency input.
43
+ * @returns The value formatted as US dollars.
44
+ */
45
+ formatCurrency(unformattedCurrency: number | string): string;
46
+ /**
47
+ * Remove currency decoration and return two decimal places, falling back to 0.00 for invalid input.
48
+ * @param formattedCurrency - Decorated currency text or number.
49
+ * @returns An undecorated decimal string with two places.
50
+ */
51
+ unformatCurrency(formattedCurrency: number | string): string;
52
+ /**
53
+ * Create a telephone link using only the supplied digits.
54
+ * @param unformattedPhoneNumber - Phone number containing optional formatting.
55
+ * @returns A tel link containing only digits.
56
+ */
57
+ formatPhoneLink(unformattedPhoneNumber: string): string;
58
+ /**
59
+ * Create a mailto link from the supplied email address.
60
+ * @param unformattedEmailAddress - Email address to place in the link.
61
+ * @returns A mailto link.
62
+ */
63
+ formatEmailLink(unformattedEmailAddress: string): string;
64
+ }
@@ -0,0 +1,135 @@
1
+ /** @module app/assets/script/utility/string */
2
+ const parser = new DOMParser();
3
+ const integerFormatter = new Intl.NumberFormat('en-US', {
4
+ maximumFractionDigits: 0
5
+ });
6
+ const currencyFormatter = new Intl.NumberFormat('en-US', {
7
+ currency: 'USD',
8
+ minimumFractionDigits: 2,
9
+ style: 'currency'
10
+ });
11
+ /**
12
+ * Format a numeric date component with at least two digits.
13
+ * @param number - Numeric value to inspect or format.
14
+ * @returns A string containing at least two digits.
15
+ */
16
+ function pad(number) {
17
+ return String(number).padStart(2, '0');
18
+ }
19
+ /**
20
+ * Format a valid date using local calendar components, or return null for invalid input.
21
+ * @param value - Value to find or format.
22
+ * @returns YYYY-MM-DD in local time, or null for invalid input.
23
+ */
24
+ function dateParts(value) {
25
+ const date = new Date(value);
26
+ if (Number.isNaN(date.getTime())) {
27
+ return null;
28
+ }
29
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
30
+ }
31
+ 'use strict';
32
+ export default class {
33
+ //turn a string of html tags into a dom object
34
+ /**
35
+ * Parse trusted HTML and clone its first root node; reject empty markup.
36
+ * @param string - Trusted HTML containing at least one root node.
37
+ * @returns A clone of the first parsed root node.
38
+ * @throws When input does not satisfy the documented contract.
39
+ */
40
+ toElement(string) {
41
+ const element = parser.parseFromString(string, 'text/html').body.firstChild;
42
+ if (!element)
43
+ throw new TypeError('HTML must contain a root node');
44
+ return element.cloneNode(true);
45
+ }
46
+ //qet data from url query string
47
+ /**
48
+ * Read and decode a query value, returning null when absent and an empty string when valueless.
49
+ * @param name - Resource, field, or parameter name.
50
+ * @param url - URL or optional adapter argument.
51
+ * @returns The decoded value, an empty string, or null when absent.
52
+ */
53
+ getQueryStringParamater(name, url) {
54
+ name = name.replace(/[[\]]/g, '\\$&');
55
+ let regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');
56
+ let results = regex.exec(url);
57
+ if (!results) {
58
+ return null;
59
+ }
60
+ if (!results[2]) {
61
+ return '';
62
+ }
63
+ return decodeURIComponent(results[2].replace(/\+/g, ' '));
64
+ }
65
+ // 2014-11-10
66
+ /**
67
+ * Format a local calendar date as YYYY-MM-DD or return Invalid date.
68
+ * @param unformattedDate - Date input to format.
69
+ * @returns A local YYYY-MM-DD string or Invalid date.
70
+ */
71
+ formatDate(unformattedDate) {
72
+ return dateParts(unformattedDate) || 'Invalid date';
73
+ }
74
+ //format the api accepts back
75
+ /**
76
+ * Format a calendar date using the legacy API noon timestamp convention.
77
+ * @param unformattedDate - Date input to format.
78
+ * @returns A YYYY-MM-DDT12:00 string or Invalid date.
79
+ */
80
+ formatDateAPI(unformattedDate) {
81
+ const formattedDate = dateParts(`${unformattedDate}T00:00:00`);
82
+ return formattedDate ? `${formattedDate}T12:00` : 'Invalid date';
83
+ }
84
+ /**
85
+ * Format a rounded number using en-US grouping.
86
+ * @param unformattedNumber - Numeric input to format.
87
+ * @returns The grouped and rounded number string.
88
+ */
89
+ formatNumber(unformattedNumber) {
90
+ return integerFormatter.format(Number(unformattedNumber));
91
+ }
92
+ /**
93
+ * Parse a base-ten integer using the existing parseInt behavior.
94
+ * @param formattedNumber - Integer text to parse.
95
+ * @returns The parsed integer, or NaN when no integer can be read.
96
+ */
97
+ unformatNumber(formattedNumber) {
98
+ return parseInt(formattedNumber, 10);
99
+ }
100
+ /**
101
+ * Format a numeric value as US dollars with two decimal places.
102
+ * @param unformattedCurrency - Numeric currency input.
103
+ * @returns The value formatted as US dollars.
104
+ */
105
+ formatCurrency(unformattedCurrency) {
106
+ return currencyFormatter.format(Number(unformattedCurrency));
107
+ }
108
+ /**
109
+ * Remove currency decoration and return two decimal places, falling back to 0.00 for invalid input.
110
+ * @param formattedCurrency - Decorated currency text or number.
111
+ * @returns An undecorated decimal string with two places.
112
+ */
113
+ unformatCurrency(formattedCurrency) {
114
+ const number = Number(String(formattedCurrency).replace(/[^0-9.-]/g, ''));
115
+ return Number.isFinite(number) ? number.toFixed(2) : '0.00';
116
+ }
117
+ /**
118
+ * Create a telephone link using only the supplied digits.
119
+ * @param unformattedPhoneNumber - Phone number containing optional formatting.
120
+ * @returns A tel link containing only digits.
121
+ */
122
+ formatPhoneLink(unformattedPhoneNumber) {
123
+ return 'tel:' + unformattedPhoneNumber.replace(/\D/g, '');
124
+ }
125
+ /**
126
+ * Create a mailto link from the supplied email address.
127
+ * @param unformattedEmailAddress - Email address to place in the link.
128
+ * @returns A mailto link.
129
+ */
130
+ formatEmailLink(unformattedEmailAddress) {
131
+ return 'mailto:' + unformattedEmailAddress;
132
+ }
133
+ }
134
+ ;
135
+ //# sourceMappingURL=string.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.js","sourceRoot":"","sources":["../../../../../app/assets/script/utility/string.ts"],"names":[],"mappings":"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","sourcesContent":["/** @module app/assets/script/utility/string */\nconst parser = new DOMParser();\n\nconst integerFormatter = new Intl.NumberFormat('en-US', {\n maximumFractionDigits: 0\n});\nconst currencyFormatter = new Intl.NumberFormat('en-US', {\n currency: 'USD',\n minimumFractionDigits: 2,\n style: 'currency'\n});\n\n/**\n * Format a numeric date component with at least two digits.\n * @param number - Numeric value to inspect or format.\n * @returns A string containing at least two digits.\n */\nfunction pad(number: number) {\n return String(number).padStart(2, '0');\n}\n\n/**\n * Format a valid date using local calendar components, or return null for invalid input.\n * @param value - Value to find or format.\n * @returns YYYY-MM-DD in local time, or null for invalid input.\n */\nfunction dateParts(value: string | number | Date) {\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) {\n return null;\n }\n return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\n}\n\n'use strict';\n\n export default class {\n\n //turn a string of html tags into a dom object\n /**\n * Parse trusted HTML and clone its first root node; reject empty markup.\n * @param string - Trusted HTML containing at least one root node.\n * @returns A clone of the first parsed root node.\n * @throws When input does not satisfy the documented contract.\n */\n toElement(string: string) {\n const element = parser.parseFromString(string, 'text/html').body.firstChild;\n if (!element) throw new TypeError('HTML must contain a root node');\n return element.cloneNode(true);\n }\n\n //qet data from url query string\n /**\n * Read and decode a query value, returning null when absent and an empty string when valueless.\n * @param name - Resource, field, or parameter name.\n * @param url - URL or optional adapter argument.\n * @returns The decoded value, an empty string, or null when absent.\n */\n getQueryStringParamater(name: string, url: string) {\n name = name.replace(/[[\\]]/g, '\\\\$&');\n let regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');\n let results = regex.exec(url);\n if (!results) {\n return null;\n }\n if (!results[2]) {\n return '';\n }\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\n }\n\n // 2014-11-10\n /**\n * Format a local calendar date as YYYY-MM-DD or return Invalid date.\n * @param unformattedDate - Date input to format.\n * @returns A local YYYY-MM-DD string or Invalid date.\n */\n formatDate(unformattedDate: string | number | Date) {\n return dateParts(unformattedDate) || 'Invalid date';\n }\n\n //format the api accepts back\n /**\n * Format a calendar date using the legacy API noon timestamp convention.\n * @param unformattedDate - Date input to format.\n * @returns A YYYY-MM-DDT12:00 string or Invalid date.\n */\n formatDateAPI(unformattedDate: string) {\n const formattedDate = dateParts(`${unformattedDate}T00:00:00`);\n return formattedDate ? `${formattedDate}T12:00` : 'Invalid date';\n }\n\n /**\n * Format a rounded number using en-US grouping.\n * @param unformattedNumber - Numeric input to format.\n * @returns The grouped and rounded number string.\n */\n formatNumber(unformattedNumber: number | string) {\n return integerFormatter.format(Number(unformattedNumber));\n }\n\n /**\n * Parse a base-ten integer using the existing parseInt behavior.\n * @param formattedNumber - Integer text to parse.\n * @returns The parsed integer, or NaN when no integer can be read.\n */\n unformatNumber(formattedNumber: string) {\n return parseInt(formattedNumber, 10);\n }\n\n /**\n * Format a numeric value as US dollars with two decimal places.\n * @param unformattedCurrency - Numeric currency input.\n * @returns The value formatted as US dollars.\n */\n formatCurrency(unformattedCurrency: number | string) {\n return currencyFormatter.format(Number(unformattedCurrency));\n }\n\n /**\n * Remove currency decoration and return two decimal places, falling back to 0.00 for invalid input.\n * @param formattedCurrency - Decorated currency text or number.\n * @returns An undecorated decimal string with two places.\n */\n unformatCurrency(formattedCurrency: number | string) {\n const number = Number(String(formattedCurrency).replace(/[^0-9.-]/g, ''));\n return Number.isFinite(number) ? number.toFixed(2) : '0.00';\n }\n\n /**\n * Create a telephone link using only the supplied digits.\n * @param unformattedPhoneNumber - Phone number containing optional formatting.\n * @returns A tel link containing only digits.\n */\n formatPhoneLink(unformattedPhoneNumber: string) {\n return 'tel:' + unformattedPhoneNumber.replace(/\\D/g,'');\n }\n\n /**\n * Create a mailto link from the supplied email address.\n * @param unformattedEmailAddress - Email address to place in the link.\n * @returns A mailto link.\n */\n formatEmailLink(unformattedEmailAddress: string) {\n return 'mailto:' + unformattedEmailAddress;\n }\n\n };\n"]}
@@ -0,0 +1,11 @@
1
+ /** @module app/assets/script/view/default */
2
+ import React from 'react';
3
+ export default class HelloMessage extends React.Component<{
4
+ name: string;
5
+ }> {
6
+ /**
7
+ * Render the greeting from the component name prop.
8
+ * @returns The greeting React element.
9
+ */
10
+ render(): React.JSX.Element;
11
+ }
@@ -0,0 +1,15 @@
1
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ /** @module app/assets/script/view/default */
3
+ import React from 'react';
4
+ 'use strict';
5
+ export default class HelloMessage extends React.Component {
6
+ /**
7
+ * Render the greeting from the component name prop.
8
+ * @returns The greeting React element.
9
+ */
10
+ render() {
11
+ return _jsxs("div", { children: ["Hello ", this.props.name] });
12
+ }
13
+ }
14
+ ;
15
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../../../app/assets/script/view/default.tsx"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,YAAY,CAAC;AACT,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,SAAyB;IACrE;;;OAGG;IACH,MAAM;QACF,OAAO,oCAAY,IAAI,CAAC,KAAK,CAAC,IAAI,IAAO,CAAC;IAC9C,CAAC;CACJ;AAAA,CAAC","sourcesContent":["/** @module app/assets/script/view/default */\nimport React from 'react';\n\n\n'use strict';\n export default class HelloMessage extends React.Component<{name: string}> {\n /**\n * Render the greeting from the component name prop.\n * @returns The greeting React element.\n */\n render() {\n return <div>Hello {this.props.name}</div>;\n }\n };\n"]}
@@ -0,0 +1,23 @@
1
+ /** @module app/assets/script/view/toolkit/youtube-player-1 */
2
+ import View from 'white-label-view';
3
+ export default class extends View {
4
+ /**
5
+ * Create an instance with its own state and listener references.
6
+ */
7
+ constructor();
8
+ /**
9
+ * Extension hook for initializing a concrete YouTube player implementation.
10
+ * @returns No value.
11
+ */
12
+ initialize(): void;
13
+ /**
14
+ * Lifecycle hook for attaching listeners owned by a subclass.
15
+ * @returns No value.
16
+ */
17
+ addListeners(): void;
18
+ /**
19
+ * Legacy misspelled extension hook retained for compatibility with existing sample subclasses.
20
+ * @returns No value.
21
+ */
22
+ removeListners(): void;
23
+ }
@@ -0,0 +1,32 @@
1
+ /** @module app/assets/script/view/toolkit/youtube-player-1 */
2
+ import View from 'white-label-view';
3
+ 'use strict';
4
+ export default class extends View {
5
+ /**
6
+ * Create an instance with its own state and listener references.
7
+ */
8
+ constructor() {
9
+ super();
10
+ this.parentElement = document.querySelector('body') || undefined;
11
+ }
12
+ /**
13
+ * Extension hook for initializing a concrete YouTube player implementation.
14
+ * @returns No value.
15
+ */
16
+ initialize() {
17
+ }
18
+ /**
19
+ * Lifecycle hook for attaching listeners owned by a subclass.
20
+ * @returns No value.
21
+ */
22
+ addListeners() {
23
+ }
24
+ /**
25
+ * Legacy misspelled extension hook retained for compatibility with existing sample subclasses.
26
+ * @returns No value.
27
+ */
28
+ removeListners() {
29
+ }
30
+ }
31
+ ;
32
+ //# sourceMappingURL=youtube-player-1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"youtube-player-1.js","sourceRoot":"","sources":["../../../../../../app/assets/script/view/toolkit/youtube-player-1.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAEpC,YAAY,CAAC;AACT,MAAM,CAAC,OAAO,MAAO,SAAQ,IAAI;IAC7B;;OAEG;IACH;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC;IACrE,CAAC;IACD;;;OAGG;IACH,UAAU;IACV,CAAC;IACD;;;OAGG;IACH,YAAY;IACZ,CAAC;IACD;;;OAGG;IACH,cAAc;IACd,CAAC;CACJ;AAAA,CAAC","sourcesContent":["/** @module app/assets/script/view/toolkit/youtube-player-1 */\nimport View from 'white-label-view';\n\n'use strict';\n export default class extends View {\n /**\n * Create an instance with its own state and listener references.\n */\n constructor() {\n super();\n this.parentElement = document.querySelector('body') || undefined;\n }\n /**\n * Extension hook for initializing a concrete YouTube player implementation.\n * @returns No value.\n */\n initialize() {\n }\n /**\n * Lifecycle hook for attaching listeners owned by a subclass.\n * @returns No value.\n */\n addListeners() {\n }\n /**\n * Legacy misspelled extension hook retained for compatibility with existing sample subclasses.\n * @returns No value.\n */\n removeListners() {\n }\n };\n"]}