@qhealth-design-system/core 1.0.38

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 (503) hide show
  1. package/.babelrc +15 -0
  2. package/.browserslistrc +5 -0
  3. package/.editorconfig +19 -0
  4. package/.eslintignore +1 -0
  5. package/.eslintrc +25 -0
  6. package/.gitattributes +2 -0
  7. package/.github/workflows/release_package.yml +103 -0
  8. package/CHANGELOG.md +14 -0
  9. package/README.md +534 -0
  10. package/dist/api/service_finder/schemas.json +1 -0
  11. package/dist/component-abstract.html +884 -0
  12. package/dist/component-accordion.html +1157 -0
  13. package/dist/component-banner.html +928 -0
  14. package/dist/component-banner_advanced.html +1524 -0
  15. package/dist/component-banner_basic.html +1189 -0
  16. package/dist/component-banner_intermediate.html +1288 -0
  17. package/dist/component-body.html +919 -0
  18. package/dist/component-breadcrumbs.html +881 -0
  19. package/dist/component-btn.html +829 -0
  20. package/dist/component-callout.html +964 -0
  21. package/dist/component-card_feature.html +1805 -0
  22. package/dist/component-card_multi_action.html +1965 -0
  23. package/dist/component-card_no_action.html +1632 -0
  24. package/dist/component-card_single_action.html +1772 -0
  25. package/dist/component-code.html +928 -0
  26. package/dist/component-footer.html +1131 -0
  27. package/dist/component-forms.html +1297 -0
  28. package/dist/component-global-elements.html +1243 -0
  29. package/dist/component-global_alert.html +891 -0
  30. package/dist/component-header.html +1155 -0
  31. package/dist/component-in_page_navigation.html +920 -0
  32. package/dist/component-internal_navigation.html +1097 -0
  33. package/dist/component-left_hand_navigation.html +995 -0
  34. package/dist/component-main_navigation.html +999 -0
  35. package/dist/component-mega_main_navigation.html +1145 -0
  36. package/dist/component-multi_column.html +1116 -0
  37. package/dist/component-page_alert.html +911 -0
  38. package/dist/component-pagination.html +971 -0
  39. package/dist/component-tag_list.html +979 -0
  40. package/dist/component-updated_date.html +778 -0
  41. package/dist/component-widgets.html +851 -0
  42. package/dist/components/_global/import.xml +95 -0
  43. package/dist/components/_global/manifest.json +11 -0
  44. package/dist/components/_global/presentation.js +50 -0
  45. package/dist/components/_global/static.html +30 -0
  46. package/dist/components/_template/import.xml +299 -0
  47. package/dist/components/_template/manifest.json +40 -0
  48. package/dist/components/_template/presentation.js +12 -0
  49. package/dist/components/_template/static.html +4 -0
  50. package/dist/components/abstract/import.xml +231 -0
  51. package/dist/components/abstract/manifest.json +29 -0
  52. package/dist/components/abstract/presentation.js +33 -0
  53. package/dist/components/abstract/static.html +9 -0
  54. package/dist/components/accordion/import.xml +1929 -0
  55. package/dist/components/accordion/manifest.json +427 -0
  56. package/dist/components/accordion/presentation.js +112 -0
  57. package/dist/components/accordion/static.html +56 -0
  58. package/dist/components/banner/import.xml +95 -0
  59. package/dist/components/banner/manifest.json +11 -0
  60. package/dist/components/banner/presentation.js +138 -0
  61. package/dist/components/banner/static.html +39 -0
  62. package/dist/components/banner_advanced/import.xml +1969 -0
  63. package/dist/components/banner_advanced/manifest.json +1450 -0
  64. package/dist/components/banner_advanced/presentation.js +564 -0
  65. package/dist/components/banner_advanced/static.html +159 -0
  66. package/dist/components/banner_basic/import.xml +907 -0
  67. package/dist/components/banner_basic/manifest.json +151 -0
  68. package/dist/components/banner_basic/presentation.js +325 -0
  69. package/dist/components/banner_basic/static.html +86 -0
  70. package/dist/components/banner_intermediate/import.xml +1473 -0
  71. package/dist/components/banner_intermediate/manifest.json +248 -0
  72. package/dist/components/banner_intermediate/presentation.js +410 -0
  73. package/dist/components/banner_intermediate/static.html +102 -0
  74. package/dist/components/body/import.xml +343 -0
  75. package/dist/components/body/manifest.json +46 -0
  76. package/dist/components/body/presentation.js +37 -0
  77. package/dist/components/body/static.html +5 -0
  78. package/dist/components/breadcrumbs/import.xml +95 -0
  79. package/dist/components/breadcrumbs/manifest.json +9 -0
  80. package/dist/components/breadcrumbs/presentation.js +99 -0
  81. package/dist/components/breadcrumbs/static.html +21 -0
  82. package/dist/components/callout/import.xml +953 -0
  83. package/dist/components/callout/manifest.json +121 -0
  84. package/dist/components/callout/presentation.js +103 -0
  85. package/dist/components/callout/static.html +10 -0
  86. package/dist/components/card_feature/import.xml +2355 -0
  87. package/dist/components/card_feature/manifest.json +1390 -0
  88. package/dist/components/card_feature/presentation.js +365 -0
  89. package/dist/components/card_feature/static.html +80 -0
  90. package/dist/components/card_multi_action/import.xml +1539 -0
  91. package/dist/components/card_multi_action/manifest.json +1314 -0
  92. package/dist/components/card_multi_action/presentation.js +638 -0
  93. package/dist/components/card_multi_action/static.html +120 -0
  94. package/dist/components/card_no_action/import.xml +1449 -0
  95. package/dist/components/card_no_action/manifest.json +1264 -0
  96. package/dist/components/card_no_action/presentation.js +454 -0
  97. package/dist/components/card_no_action/static.html +94 -0
  98. package/dist/components/card_single_action/import.xml +1539 -0
  99. package/dist/components/card_single_action/manifest.json +1273 -0
  100. package/dist/components/card_single_action/presentation.js +498 -0
  101. package/dist/components/card_single_action/static.html +103 -0
  102. package/dist/components/code/import.xml +569 -0
  103. package/dist/components/code/manifest.json +112 -0
  104. package/dist/components/code/presentation.js +124 -0
  105. package/dist/components/code/static.html +15 -0
  106. package/dist/components/footer/import.xml +95 -0
  107. package/dist/components/footer/manifest.json +9 -0
  108. package/dist/components/footer/presentation.js +409 -0
  109. package/dist/components/footer/static.html +146 -0
  110. package/dist/components/global_alert/import.xml +95 -0
  111. package/dist/components/global_alert/manifest.json +9 -0
  112. package/dist/components/global_alert/presentation.js +81 -0
  113. package/dist/components/global_alert/static.html +26 -0
  114. package/dist/components/header/import.xml +95 -0
  115. package/dist/components/header/manifest.json +11 -0
  116. package/dist/components/header/presentation.js +190 -0
  117. package/dist/components/header/static.html +158 -0
  118. package/dist/components/horizontal_rule/import.xml +547 -0
  119. package/dist/components/horizontal_rule/manifest.json +69 -0
  120. package/dist/components/horizontal_rule/presentation.js +50 -0
  121. package/dist/components/horizontal_rule/static.html +4 -0
  122. package/dist/components/in_page_navigation/import.xml +253 -0
  123. package/dist/components/in_page_navigation/manifest.json +35 -0
  124. package/dist/components/in_page_navigation/presentation.js +14 -0
  125. package/dist/components/in_page_navigation/static.html +13 -0
  126. package/dist/components/internal_navigation/import.xml +95 -0
  127. package/dist/components/internal_navigation/manifest.json +11 -0
  128. package/dist/components/internal_navigation/presentation.js +165 -0
  129. package/dist/components/internal_navigation/static.html +130 -0
  130. package/dist/components/left_hand_navigation/import.xml +299 -0
  131. package/dist/components/left_hand_navigation/manifest.json +40 -0
  132. package/dist/components/left_hand_navigation/presentation.js +178 -0
  133. package/dist/components/left_hand_navigation/static.html +64 -0
  134. package/dist/components/main_navigation/import.xml +95 -0
  135. package/dist/components/main_navigation/manifest.json +11 -0
  136. package/dist/components/main_navigation/presentation.js +150 -0
  137. package/dist/components/main_navigation/static.html +80 -0
  138. package/dist/components/mega_main_navigation/import.xml +95 -0
  139. package/dist/components/mega_main_navigation/manifest.json +9 -0
  140. package/dist/components/mega_main_navigation/presentation.js +380 -0
  141. package/dist/components/mega_main_navigation/static.html +153 -0
  142. package/dist/components/multi_column/import.xml +1631 -0
  143. package/dist/components/multi_column/manifest.json +233 -0
  144. package/dist/components/multi_column/presentation.js +249 -0
  145. package/dist/components/multi_column/static.html +36 -0
  146. package/dist/components/page_alert/import.xml +479 -0
  147. package/dist/components/page_alert/manifest.json +63 -0
  148. package/dist/components/page_alert/presentation.js +67 -0
  149. package/dist/components/page_alert/static.html +8 -0
  150. package/dist/components/pagination/import.xml +95 -0
  151. package/dist/components/pagination/manifest.json +42 -0
  152. package/dist/components/pagination/presentation.js +84 -0
  153. package/dist/components/pagination/static.html +5 -0
  154. package/dist/components/updated_date/import.xml +95 -0
  155. package/dist/components/updated_date/manifest.json +9 -0
  156. package/dist/components/updated_date/presentation.js +34 -0
  157. package/dist/components/updated_date/static.html +6 -0
  158. package/dist/components/widgets/import.xml +95 -0
  159. package/dist/components/widgets/manifest.json +9 -0
  160. package/dist/components/widgets/presentation.js +40 -0
  161. package/dist/components/widgets/static.html +0 -0
  162. package/dist/components.html +790 -0
  163. package/dist/externals/componentPreview.js +101 -0
  164. package/dist/externals/dsComponentLoader.js +410 -0
  165. package/dist/externals/esri-leaflet-vector.js +5 -0
  166. package/dist/externals/esri-leaflet.js +12 -0
  167. package/dist/externals/fb-handlebars.min.js +29 -0
  168. package/dist/externals/fb-typeahead.bundle.min.js +6 -0
  169. package/dist/externals/funnelback.autocompletion-2.6.0.js +678 -0
  170. package/dist/externals/getPagination.js +62 -0
  171. package/dist/externals/handlebars.min-v4.7.6.js +29 -0
  172. package/dist/externals/leaflet.js +6 -0
  173. package/dist/externals/populateDatastoreSim.js +381 -0
  174. package/dist/externals/tinymce_classes.css +62 -0
  175. package/dist/home.html +694 -0
  176. package/dist/index.html +710 -0
  177. package/dist/inner-with-nav.html +1853 -0
  178. package/dist/inner.html +671 -0
  179. package/dist/js/helpers.js +892 -0
  180. package/dist/js/main.js +55 -0
  181. package/dist/js/main.js.map +1 -0
  182. package/dist/js/runtime.js +2 -0
  183. package/dist/js/runtime.js.map +1 -0
  184. package/dist/main.css +918 -0
  185. package/dist/main.css.map +1 -0
  186. package/dist/mysource_files/ajax-loader.gif +0 -0
  187. package/dist/mysource_files/favicons/favicon.ico +0 -0
  188. package/dist/mysource_files/img/100x100.jpg +0 -0
  189. package/dist/mysource_files/img/600x260.jpg +0 -0
  190. package/dist/mysource_files/img/Heart-Pattern-Dark.png +0 -0
  191. package/dist/mysource_files/img/Heart-Pattern.png +0 -0
  192. package/dist/mysource_files/img/banner-background--desktop.png +0 -0
  193. package/dist/mysource_files/img/banner-background--mobile.png +0 -0
  194. package/dist/mysource_files/img/banner-bg.png +0 -0
  195. package/dist/mysource_files/img/banner.png +0 -0
  196. package/dist/mysource_files/img/card--brand.png +0 -0
  197. package/dist/mysource_files/img/card--components.png +0 -0
  198. package/dist/mysource_files/img/card--content.png +0 -0
  199. package/dist/mysource_files/img/header-logo-agov.png +0 -0
  200. package/dist/mysource_files/img/header-logo-qgov--dark.svg +63 -0
  201. package/dist/mysource_files/img/header-logo-qgov--light.svg +56 -0
  202. package/dist/mysource_files/img/header-logo-qgov--pre-dark.svg +56 -0
  203. package/dist/mysource_files/img/header-search.svg +3 -0
  204. package/dist/mysource_files/img/layers-2x.png +0 -0
  205. package/dist/mysource_files/img/layers.png +0 -0
  206. package/dist/mysource_files/img/marker-icon.png +0 -0
  207. package/dist/mysource_files/img/svg-icons.svg +155 -0
  208. package/dist/mysource_files/img/video-play.svg +3 -0
  209. package/dist/mysource_files/slick.eot +0 -0
  210. package/dist/mysource_files/slick.svg +14 -0
  211. package/dist/mysource_files/slick.ttf +0 -0
  212. package/dist/mysource_files/slick.woff +0 -0
  213. package/package-lock.json +14276 -0
  214. package/package.json +79 -0
  215. package/scripts/add_component.sh +109 -0
  216. package/src/assets/favicons/favicon.ico +0 -0
  217. package/src/assets/img/100x100.jpg +0 -0
  218. package/src/assets/img/600x260.jpg +0 -0
  219. package/src/assets/img/Heart-Pattern-Dark.png +0 -0
  220. package/src/assets/img/Heart-Pattern.png +0 -0
  221. package/src/assets/img/banner-background--desktop.png +0 -0
  222. package/src/assets/img/banner-background--mobile.png +0 -0
  223. package/src/assets/img/banner-bg.png +0 -0
  224. package/src/assets/img/banner.png +0 -0
  225. package/src/assets/img/card--brand.png +0 -0
  226. package/src/assets/img/card--components.png +0 -0
  227. package/src/assets/img/card--content.png +0 -0
  228. package/src/assets/img/header-logo-agov.png +0 -0
  229. package/src/assets/img/header-logo-qgov--dark.svg +63 -0
  230. package/src/assets/img/header-logo-qgov--light.svg +56 -0
  231. package/src/assets/img/header-logo-qgov--pre-dark.svg +56 -0
  232. package/src/assets/img/header-search.svg +3 -0
  233. package/src/assets/img/layers-2x.png +0 -0
  234. package/src/assets/img/layers.png +0 -0
  235. package/src/assets/img/marker-icon.png +0 -0
  236. package/src/assets/img/svg-icons.svg +155 -0
  237. package/src/assets/img/video-play.svg +3 -0
  238. package/src/components/_global/css/admin/component.scss +71 -0
  239. package/src/components/_global/css/body/component.scss +897 -0
  240. package/src/components/_global/css/btn/component.scss +564 -0
  241. package/src/components/_global/css/cta_links/component.scss +121 -0
  242. package/src/components/_global/css/direction_links/component.scss +196 -0
  243. package/src/components/_global/css/example/component.scss +54 -0
  244. package/src/components/_global/css/forms/control_inputs/component.scss +349 -0
  245. package/src/components/_global/css/forms/general/component.scss +298 -0
  246. package/src/components/_global/css/forms/select/component.scss +230 -0
  247. package/src/components/_global/css/forms/text/component.scss +402 -0
  248. package/src/components/_global/css/global.scss +42 -0
  249. package/src/components/_global/css/grid-12/component.scss +331 -0
  250. package/src/components/_global/css/headings/component.scss +172 -0
  251. package/src/components/_global/css/icons/component.scss +29 -0
  252. package/src/components/_global/css/link_columns/component.scss +194 -0
  253. package/src/components/_global/css/link_list/component.scss +37 -0
  254. package/src/components/_global/css/modal/component.scss +182 -0
  255. package/src/components/_global/css/slick/component.scss +25 -0
  256. package/src/components/_global/css/table/component.scss +211 -0
  257. package/src/components/_global/css/tabs/component.scss +43 -0
  258. package/src/components/_global/css/tags/component.scss +272 -0
  259. package/src/components/_global/css/user_location/component.scss +38 -0
  260. package/src/components/_global/css/version/component.scss +47 -0
  261. package/src/components/_global/html/component.hbs +108 -0
  262. package/src/components/_global/html/ds_component.hbs +30 -0
  263. package/src/components/_global/html/head.html +63 -0
  264. package/src/components/_global/html/scripts.html +58 -0
  265. package/src/components/_global/js/_polyfills/global.js +18 -0
  266. package/src/components/_global/js/animate/global.js +324 -0
  267. package/src/components/_global/js/forms/global.js +182 -0
  268. package/src/components/_global/js/global.js +302 -0
  269. package/src/components/_global/js/manifest.json +11 -0
  270. package/src/components/_global/js/modal/global.js +236 -0
  271. package/src/components/_global/js/slick/global.js +153 -0
  272. package/src/components/_global/js/tabs/global.js +305 -0
  273. package/src/components/_global/js/user_location/global.js +116 -0
  274. package/src/components/_template/css/component.scss +22 -0
  275. package/src/components/_template/html/component-page.html +85 -0
  276. package/src/components/_template/html/component.hbs +4 -0
  277. package/src/components/_template/js/global.js +6 -0
  278. package/src/components/_template/js/manifest.json +40 -0
  279. package/src/components/abstract/css/component.scss +91 -0
  280. package/src/components/abstract/html/component.hbs +9 -0
  281. package/src/components/abstract/js/manifest.json +29 -0
  282. package/src/components/accordion/css/component.scss +329 -0
  283. package/src/components/accordion/html/accordion-group.html +157 -0
  284. package/src/components/accordion/html/component.hbs +46 -0
  285. package/src/components/accordion/html/default.html +92 -0
  286. package/src/components/accordion/js/global.js +413 -0
  287. package/src/components/accordion/js/manifest.json +427 -0
  288. package/src/components/banner/css/component.scss +664 -0
  289. package/src/components/banner/html/component.hbs +52 -0
  290. package/src/components/banner/js/manifest.json +11 -0
  291. package/src/components/banner_advanced/css/component.scss +7 -0
  292. package/src/components/banner_advanced/html/component.hbs +213 -0
  293. package/src/components/banner_advanced/js/global.js +6 -0
  294. package/src/components/banner_advanced/js/manifest.json +1450 -0
  295. package/src/components/banner_basic/css/component.scss +52 -0
  296. package/src/components/banner_basic/html/component.hbs +130 -0
  297. package/src/components/banner_basic/js/global.js +6 -0
  298. package/src/components/banner_basic/js/manifest.json +151 -0
  299. package/src/components/banner_intermediate/css/component.scss +276 -0
  300. package/src/components/banner_intermediate/html/component.hbs +165 -0
  301. package/src/components/banner_intermediate/js/global.js +6 -0
  302. package/src/components/banner_intermediate/js/manifest.json +248 -0
  303. package/src/components/body/css/component.scss +16 -0
  304. package/src/components/body/html/component.hbs +5 -0
  305. package/src/components/body/js/manifest.json +46 -0
  306. package/src/components/breadcrumbs/css/component.scss +236 -0
  307. package/src/components/breadcrumbs/html/component.hbs +29 -0
  308. package/src/components/breadcrumbs/js/manifest.json +9 -0
  309. package/src/components/callout/css/component.scss +146 -0
  310. package/src/components/callout/html/component.hbs +28 -0
  311. package/src/components/callout/js/manifest.json +121 -0
  312. package/src/components/card_feature/css/component.scss +224 -0
  313. package/src/components/card_feature/html/component.hbs +129 -0
  314. package/src/components/card_feature/js/manifest.json +1390 -0
  315. package/src/components/card_multi_action/css/component.scss +229 -0
  316. package/src/components/card_multi_action/html/component.hbs +192 -0
  317. package/src/components/card_multi_action/js/manifest.json +1314 -0
  318. package/src/components/card_no_action/css/component.scss +551 -0
  319. package/src/components/card_no_action/html/component.hbs +127 -0
  320. package/src/components/card_no_action/js/global.js +6 -0
  321. package/src/components/card_no_action/js/manifest.json +1264 -0
  322. package/src/components/card_single_action/css/component.scss +164 -0
  323. package/src/components/card_single_action/html/component.hbs +161 -0
  324. package/src/components/card_single_action/js/manifest.json +1273 -0
  325. package/src/components/code/css/component.scss +355 -0
  326. package/src/components/code/html/component.hbs +84 -0
  327. package/src/components/code/js/global.js +160 -0
  328. package/src/components/code/js/manifest.json +112 -0
  329. package/src/components/footer/css/component.scss +437 -0
  330. package/src/components/footer/html/component.hbs +177 -0
  331. package/src/components/footer/js/manifest.json +9 -0
  332. package/src/components/global_alert/css/component.scss +169 -0
  333. package/src/components/global_alert/html/component.hbs +38 -0
  334. package/src/components/global_alert/js/global.js +39 -0
  335. package/src/components/global_alert/js/manifest.json +9 -0
  336. package/src/components/header/css/component.scss +697 -0
  337. package/src/components/header/html/component.hbs +186 -0
  338. package/src/components/header/js/global.js +188 -0
  339. package/src/components/header/js/manifest.json +11 -0
  340. package/src/components/horizontal_rule/css/component.scss +37 -0
  341. package/src/components/horizontal_rule/html/component.hbs +6 -0
  342. package/src/components/horizontal_rule/js/manifest.json +69 -0
  343. package/src/components/in_page_navigation/css/component.scss +54 -0
  344. package/src/components/in_page_navigation/html/component.hbs +17 -0
  345. package/src/components/in_page_navigation/js/global.js +51 -0
  346. package/src/components/in_page_navigation/js/manifest.json +35 -0
  347. package/src/components/internal_navigation/css/component.scss +437 -0
  348. package/src/components/internal_navigation/html/component.hbs +57 -0
  349. package/src/components/internal_navigation/js/manifest.json +11 -0
  350. package/src/components/left_hand_navigation/css/component.scss +280 -0
  351. package/src/components/left_hand_navigation/html/component.hbs +77 -0
  352. package/src/components/left_hand_navigation/js/global.js +36 -0
  353. package/src/components/left_hand_navigation/js/manifest.json +40 -0
  354. package/src/components/main_navigation/css/component.scss +706 -0
  355. package/src/components/main_navigation/html/component.hbs +87 -0
  356. package/src/components/main_navigation/js/global.js +373 -0
  357. package/src/components/main_navigation/js/manifest.json +11 -0
  358. package/src/components/mega_main_navigation/css/component.scss +535 -0
  359. package/src/components/mega_main_navigation/html/component.hbs +157 -0
  360. package/src/components/mega_main_navigation/js/global.js +170 -0
  361. package/src/components/mega_main_navigation/js/manifest.json +9 -0
  362. package/src/components/multi_column/css/component.scss +11 -0
  363. package/src/components/multi_column/html/component.hbs +98 -0
  364. package/src/components/multi_column/js/manifest.json +233 -0
  365. package/src/components/page_alert/css/component.scss +132 -0
  366. package/src/components/page_alert/html/component.hbs +26 -0
  367. package/src/components/page_alert/js/manifest.json +63 -0
  368. package/src/components/pagination/css/component.scss +196 -0
  369. package/src/components/pagination/html/component.hbs +41 -0
  370. package/src/components/pagination/html/default.html +30 -0
  371. package/src/components/pagination/js/manifest.json +42 -0
  372. package/src/components/search_box/css/component.scss +48 -0
  373. package/src/components/search_box/html/component.html +11 -0
  374. package/src/components/search_box/js/manifest.json +73 -0
  375. package/src/components/updated_date/css/component.scss +0 -0
  376. package/src/components/updated_date/html/component.hbs +31 -0
  377. package/src/components/updated_date/js/manifest.json +9 -0
  378. package/src/components/widgets/css/component.scss +82 -0
  379. package/src/components/widgets/html/component.hbs +19 -0
  380. package/src/components/widgets/html/default.html +4 -0
  381. package/src/components/widgets/js/current.json +483 -0
  382. package/src/components/widgets/js/manifest.json +9 -0
  383. package/src/components/widgets/js/site.json +358 -0
  384. package/src/data/current.json +522 -0
  385. package/src/data/current_admin.json +305 -0
  386. package/src/data/model_component.js +14 -0
  387. package/src/data/site.json +762 -0
  388. package/src/externals/componentPreview.js +101 -0
  389. package/src/externals/dsComponentLoader.js +410 -0
  390. package/src/externals/esri-leaflet-vector.js +5 -0
  391. package/src/externals/esri-leaflet.js +12 -0
  392. package/src/externals/fb-handlebars.min.js +29 -0
  393. package/src/externals/fb-typeahead.bundle.min.js +6 -0
  394. package/src/externals/funnelback.autocompletion-2.6.0.js +678 -0
  395. package/src/externals/getPagination.js +62 -0
  396. package/src/externals/handlebars.min-v4.7.6.js +29 -0
  397. package/src/externals/leaflet.js +6 -0
  398. package/src/externals/populateDatastoreSim.js +381 -0
  399. package/src/externals/tinymce_classes.css +62 -0
  400. package/src/helpers/Handlebars/appendIf.js +6 -0
  401. package/src/helpers/Handlebars/arrayLength.js +3 -0
  402. package/src/helpers/Handlebars/arrayWith.js +13 -0
  403. package/src/helpers/Handlebars/capitaliseFirst.js +8 -0
  404. package/src/helpers/Handlebars/charMax.js +8 -0
  405. package/src/helpers/Handlebars/checkIf.js +20 -0
  406. package/src/helpers/Handlebars/columnWidth.js +39 -0
  407. package/src/helpers/Handlebars/contains.js +7 -0
  408. package/src/helpers/Handlebars/createMap.js +19 -0
  409. package/src/helpers/Handlebars/dsMapFromID.js +8 -0
  410. package/src/helpers/Handlebars/dsMapFromProp.js +8 -0
  411. package/src/helpers/Handlebars/eachByName.js +18 -0
  412. package/src/helpers/Handlebars/eachDS.js +7 -0
  413. package/src/helpers/Handlebars/eachFrom.js +13 -0
  414. package/src/helpers/Handlebars/eachUpTo.js +8 -0
  415. package/src/helpers/Handlebars/eachWhen.js +33 -0
  416. package/src/helpers/Handlebars/formatDate.js +62 -0
  417. package/src/helpers/Handlebars/generateDates.js +74 -0
  418. package/src/helpers/Handlebars/getDistance.js +40 -0
  419. package/src/helpers/Handlebars/getObject.js +3 -0
  420. package/src/helpers/Handlebars/getParamaterByName.js +11 -0
  421. package/src/helpers/Handlebars/getPossibleValues.js +13 -0
  422. package/src/helpers/Handlebars/getProp.js +3 -0
  423. package/src/helpers/Handlebars/getTags.js +20 -0
  424. package/src/helpers/Handlebars/getTitle.js +4 -0
  425. package/src/helpers/Handlebars/ifAny.js +9 -0
  426. package/src/helpers/Handlebars/ifArray.js +3 -0
  427. package/src/helpers/Handlebars/ifCond.js +31 -0
  428. package/src/helpers/Handlebars/ifEqualsOrChained.js +12 -0
  429. package/src/helpers/Handlebars/ifProp.js +3 -0
  430. package/src/helpers/Handlebars/if_eq.js +9 -0
  431. package/src/helpers/Handlebars/inArray.js +8 -0
  432. package/src/helpers/Handlebars/isPage.js +7 -0
  433. package/src/helpers/Handlebars/itemAt.js +11 -0
  434. package/src/helpers/Handlebars/jsonParse.js +8 -0
  435. package/src/helpers/Handlebars/jsonStringify.js +3 -0
  436. package/src/helpers/Handlebars/listAZ.js +51 -0
  437. package/src/helpers/Handlebars/listAZOptions.js +34 -0
  438. package/src/helpers/Handlebars/listByClosest.js +60 -0
  439. package/src/helpers/Handlebars/listByClosestWithOffset.js +63 -0
  440. package/src/helpers/Handlebars/math.js +11 -0
  441. package/src/helpers/Handlebars/newLineToBreak.js +6 -0
  442. package/src/helpers/Handlebars/nonBreakingSpaces.js +6 -0
  443. package/src/helpers/Handlebars/objectFromSelect.js +21 -0
  444. package/src/helpers/Handlebars/partialReplace.js +9 -0
  445. package/src/helpers/Handlebars/printAccordion.js +24 -0
  446. package/src/helpers/Handlebars/replace.js +8 -0
  447. package/src/helpers/Handlebars/replaceMany.js +5 -0
  448. package/src/helpers/Handlebars/sizeFormat.js +11 -0
  449. package/src/helpers/Handlebars/split.js +6 -0
  450. package/src/helpers/Handlebars/toUpperCase.js +7 -0
  451. package/src/helpers/Handlebars/urldecode.js +3 -0
  452. package/src/helpers/Handlebars/urlencode.js +3 -0
  453. package/src/helpers/Handlebars/withinObject.js +13 -0
  454. package/src/html/component-abstract.html +86 -0
  455. package/src/html/component-accordion.html +87 -0
  456. package/src/html/component-banner.html +84 -0
  457. package/src/html/component-banner_advanced.html +97 -0
  458. package/src/html/component-banner_basic.html +163 -0
  459. package/src/html/component-banner_intermediate.html +91 -0
  460. package/src/html/component-body.html +116 -0
  461. package/src/html/component-breadcrumbs.html +88 -0
  462. package/src/html/component-btn.html +117 -0
  463. package/src/html/component-callout.html +86 -0
  464. package/src/html/component-card_feature.html +631 -0
  465. package/src/html/component-card_multi_action.html +793 -0
  466. package/src/html/component-card_no_action.html +521 -0
  467. package/src/html/component-card_single_action.html +631 -0
  468. package/src/html/component-code.html +84 -0
  469. package/src/html/component-footer.html +87 -0
  470. package/src/html/component-forms.html +585 -0
  471. package/src/html/component-global-elements.html +531 -0
  472. package/src/html/component-global_alert.html +87 -0
  473. package/src/html/component-header.html +88 -0
  474. package/src/html/component-in_page_navigation.html +109 -0
  475. package/src/html/component-internal_navigation.html +87 -0
  476. package/src/html/component-left_hand_navigation.html +85 -0
  477. package/src/html/component-main_navigation.html +87 -0
  478. package/src/html/component-mega_main_navigation.html +88 -0
  479. package/src/html/component-multi_column.html +86 -0
  480. package/src/html/component-page_alert.html +86 -0
  481. package/src/html/component-pagination.html +86 -0
  482. package/src/html/component-tag_list.html +340 -0
  483. package/src/html/component-updated_date.html +88 -0
  484. package/src/html/component-widgets.html +90 -0
  485. package/src/html/components.html +136 -0
  486. package/src/html/home.html +126 -0
  487. package/src/html/index.html +142 -0
  488. package/src/html/inner-with-nav.html +1126 -0
  489. package/src/html/inner.html +107 -0
  490. package/src/index.js +12 -0
  491. package/src/styles/global.scss +120 -0
  492. package/src/styles/imports/figma.scss +0 -0
  493. package/src/styles/imports/functions.scss +519 -0
  494. package/src/styles/imports/mixins.scss +658 -0
  495. package/src/styles/imports/placeholders.scss +68 -0
  496. package/src/styles/imports/utilities.scss +185 -0
  497. package/src/styles/imports/variables.scss +484 -0
  498. package/src/styles/postcss.config.js +4 -0
  499. package/webpack/JsonMergePlugin.js +35 -0
  500. package/webpack/PrecompilePlugin.js +369 -0
  501. package/webpack/webpack.common.js +151 -0
  502. package/webpack/webpack.dev.js +54 -0
  503. package/webpack/webpack.prod.js +70 -0
@@ -0,0 +1,381 @@
1
+ function populateDatastore() {
2
+
3
+ // Store ids of created documents
4
+ var category_ids = [];
5
+ var service_ids = [];
6
+ var hhs_ids = [];
7
+ var facility_ids = [];
8
+
9
+ // Number of each data type to create
10
+ var categoryCount = 5;
11
+ var serviceCount = 15;
12
+ var hhsCount = 3;
13
+ var facilityCount = 10;
14
+
15
+ var testFacilityCoordinates = [
16
+ [-27.470125, 153.021072],
17
+ [-27.593294, 153.266418],
18
+ [-27.639168,153.109451],
19
+ [-27.566668,151.949997],
20
+ [-27.616667, 152.766663],
21
+ [-19.258965, 146.816956],
22
+ [-16.925491, 145.754120],
23
+ [-23.375000, 150.511673],
24
+ [-21.144337, 149.186813],
25
+ [-23.843138, 151.268356]
26
+ ];
27
+
28
+ var testHHSNames = {};
29
+
30
+ var testFacilityNames = [
31
+ 'Brisbane',
32
+ 'Redland City',
33
+ 'Logan City',
34
+ 'Toowoomba',
35
+ 'Ipswich',
36
+ 'Townsville',
37
+ 'Cairns',
38
+ 'Rockhampton',
39
+ 'Mackay',
40
+ 'Gladstone'
41
+ ];
42
+ var testFacilityPaths = [];
43
+
44
+ var testServiceNames = {};
45
+ var testServicePaths = {};
46
+
47
+ var topInHHS = {};
48
+ var topInFacilities = {};
49
+
50
+ // If serviceFinderData has been initialised on the page
51
+ if (typeof(serviceFinderData) !== 'undefined') {
52
+
53
+ var currentUser = serviceFinderData.jwt.getPayload();
54
+ var updatedBy = currentUser.fullName;
55
+
56
+ // Only continue if we have no data
57
+ serviceFinderData.collection('service-categories').get().then(function(response) {
58
+ if (response.length === 0) {
59
+ addServiceCategory(1);
60
+ }
61
+ });
62
+
63
+ function addServiceCategory(index) {
64
+ console.log('Adding service category ' + index);
65
+
66
+ serviceFinderData.collection('service-categories').add({
67
+ "name": "Category " + index,
68
+ "status": "active",
69
+ "updatedBy": updatedBy,
70
+ "updatedDate": Date.now()
71
+ }).then(function(response) {
72
+ category_ids.push(response.id);
73
+ if (index < categoryCount) {
74
+ addServiceCategory(index + 1);
75
+ } else {
76
+ addHHS(1);
77
+ }
78
+ });
79
+ }
80
+
81
+ function addHHS(index) {
82
+ console.log('Adding HHS ' + index);
83
+ var hhs_id = index === 1 ? 'darling-downs' : ('hhs-' + index);
84
+
85
+ serviceFinderData.collection('hhs').add({
86
+ "name": index === 1 ? "Darling Downs" : ("HHS " + index),
87
+ "abbrev": "HHS" + index,
88
+ "rsd_org_id": "123",
89
+ "top_services": [],
90
+ "status": "active",
91
+ "updatedBy": updatedBy,
92
+ "updatedDate": Date.now()
93
+ }, hhs_id).then(function(response) {
94
+ hhs_ids.push(response.id);
95
+ testHHSNames[response.id] = response.name;
96
+
97
+ if (index < hhsCount) {
98
+ addHHS(index + 1);
99
+ } else {
100
+ addFacility(1);
101
+ }
102
+ });
103
+ }
104
+
105
+ function addFacility(index) {
106
+ console.log('Adding facility ' + index);
107
+
108
+ var randomHHS = hhs_ids[Math.floor(Math.random() * hhsCount)];
109
+
110
+ serviceFinderData.collection('hhs').doc(randomHHS).get().then(function(response) {
111
+ var hhs_name = response.name;
112
+ var web_path = "facility-" + index;
113
+
114
+ serviceFinderData.collection('facilities').add({
115
+ "name": testFacilityNames[index-1],
116
+ "web_path": web_path,
117
+ "code": "123",
118
+ "abbrev": "F" + index,
119
+ "hhs_id": randomHHS,
120
+ "hhs_name": hhs_name,
121
+ "description": "This is the description of the facility",
122
+ "content": "<p>This is the content for the facility</p>",
123
+ "url": "",
124
+ "top_services": [],
125
+ "other_services": "",
126
+ "status": "active",
127
+ "building": "",
128
+ "physical_address_street": "Pechey Street",
129
+ "physical_address_suburb": "Toowoomba City",
130
+ "physical_address_postcode": "4350",
131
+ "location_details": "Extra details about the location",
132
+ "latitude": testFacilityCoordinates[index-1][0],
133
+ "longitude": testFacilityCoordinates[index-1][1],
134
+ "postal_address_street": "Pechey Street",
135
+ "postal_address_suburb": "Toowoomba City",
136
+ "postal_address_postcode": "4350",
137
+ "phone_number": "+61 7 4616 6000",
138
+ "fax_number": "+61 7 4616 6170",
139
+ "email_address": "DDHHS@health.qld.gov.au",
140
+ "updatedBy": updatedBy,
141
+ "updatedDate": Date.now()
142
+ }).then(function(response) {
143
+ facility_ids.push(response.id);
144
+ testFacilityPaths.push(response.web_path);
145
+
146
+ if (index < facilityCount) {
147
+ addFacility(index + 1);
148
+ } else {
149
+ addService(1);
150
+ }
151
+ });
152
+ });
153
+ }
154
+
155
+ function addService(index) {
156
+ console.log('Adding service ' + index);
157
+ var web_path = "service-" + index;
158
+
159
+ var numOfCategories = Math.floor(Math.random() * categoryCount) + 1;
160
+ var shuffledCategories = category_ids.sort(function() { 0.5 - Math.random()});
161
+ var selectedCategories = shuffledCategories.slice(0, numOfCategories);
162
+ var randomChar = String.fromCharCode(65+Math.floor(Math.random() * 26));
163
+
164
+ serviceFinderData.collection('services').add({
165
+ "name": randomChar + "Service " + index,
166
+ "web_path": web_path,
167
+ "categories": selectedCategories,
168
+ "description": "The description of this service",
169
+ "status": "active",
170
+ "top_in_hhs": [],
171
+ "top_in_facilities": [],
172
+ "tier_2_name": "",
173
+ "tier_2_code": "",
174
+ "updatedBy": updatedBy,
175
+ "updatedDate": Date.now()
176
+ }).then(function(response) {
177
+ service_ids.push(response.id);
178
+ testServiceNames[response.id] = response.name;
179
+ testServicePaths[response.id] = response.web_path;
180
+
181
+ if (index < serviceCount) {
182
+ addService(index + 1);
183
+ } else {
184
+ addServicesAtHHS(0);
185
+ }
186
+ });
187
+ }
188
+
189
+
190
+
191
+ function addServicesAtHHS(index) {
192
+ console.log('Adding services to HHS ' + (index + 1));
193
+ var hhs_id = hhs_ids[index];
194
+
195
+ var numOfServices = Math.floor(Math.random() * serviceCount) + 1;
196
+ var shuffledServices = service_ids.sort(function() { 0.5 - Math.random()});
197
+ var selectedServices = shuffledServices.slice(0, numOfServices);
198
+
199
+ var top_services = [];
200
+
201
+ selectedServices.forEach(function(service_id, service_index) {
202
+ serviceFinderData.collection('hhs-services').add({
203
+ "service_id": service_id,
204
+ "hhs_id": hhs_id,
205
+ "name": testServiceNames[service_id] + " - " + testHHSNames[hhs_id],
206
+ "content": `
207
+ <h3>Our services</h3>
208
+ <ul>
209
+ <li>Teeth, gums and mouth check ups</li>
210
+ <li>Fillings</li>
211
+ <li>Taking out damaged or decayed teeth</li>
212
+ <li>Fitting of plates and braces (orthodontics)</li>
213
+ <li>Artificial teeth or dentures</li>
214
+ <li>Emergency treatment</li>
215
+ <li>Advice on the best ways to keep your mouth, teeth and gums healthy.</li>
216
+ </ul>
217
+ <h3>Who can access this service?</h3>
218
+ <h4>Adults</h4>
219
+ <ul>
220
+ <li>Adults can get free dental care if they're a Queensland resident and have one of the following cards:</li>
221
+ <li>Pensioner Concession Card issued by the Department of Veteran's Affairs</li>
222
+ <li>Pensioner Concession Card issued by Centrelink</li>
223
+ <li>Health Care Card</li>
224
+ <li>Commonwealth Seniors Health Card</li>
225
+ <li>Queensland Seniors Card.</li>
226
+ </ul>
227
+
228
+ <h4>Children</h4>
229
+
230
+ <p>Children can get free dental care if they're:</p>
231
+ <ul>
232
+ <li>17 or younger</li>
233
+ <li>eligible for the Child Dental Benefits Schedule.</li>
234
+ </ul>
235
+ <p>The Child Dental Benefits Schedule doesn't include orthodontics or cosmetic dental work. Read more about the Child Dental Benefits Schedule on the Services Australia website.</p>
236
+ `,
237
+ "updatedBy": updatedBy,
238
+ "updatedDate": Date.now()
239
+ }).then(function() {
240
+
241
+ // 50/50 chance that this is a top service in the HHS
242
+ if (Math.floor(Math.random() * 2) === 1) {
243
+ top_services.push(service_id);
244
+ if (!topInHHS.hasOwnProperty(service_id)) {
245
+ topInHHS[service_id] = [];
246
+ }
247
+ topInHHS[service_id].push(hhs_id);
248
+ }
249
+
250
+ if (service_index === selectedServices.length - 1) {
251
+ serviceFinderData.collection('hhs').doc(hhs_id).get().then(function(hhs) {
252
+ hhs.top_services = top_services;
253
+ serviceFinderData.collection('hhs').doc(hhs_id).update(hhs).then(function() {
254
+ if (index < (hhsCount-1)) {
255
+ addServicesAtHHS(index + 1);
256
+ } else {
257
+ addServicesAtFacility(0);
258
+ }
259
+ });
260
+ });
261
+
262
+ }
263
+
264
+ });
265
+ });
266
+
267
+
268
+
269
+ }
270
+
271
+
272
+ function addServicesAtFacility(index) {
273
+ console.log('Adding services to facility ' + (index + 1));
274
+ var facility_id = facility_ids[index];
275
+
276
+ var numOfServices = Math.floor(Math.random() * serviceCount) + 1;
277
+ var shuffledServices = service_ids.sort(function() { 0.5 - Math.random()});
278
+ var selectedServices = shuffledServices.slice(0, numOfServices);
279
+
280
+ var top_services = [];
281
+
282
+ selectedServices.forEach(function(service_id, service_index) {
283
+ var web_path = testServicePaths[service_id] + '-' + testFacilityPaths[index];
284
+ serviceFinderData.collection('service-locations').add({
285
+ "service_id": service_id,
286
+ "facility_id": facility_id,
287
+ "name": testServiceNames[service_id] + " - " + testFacilityNames[index],
288
+ "web_path": web_path,
289
+ "facility_level": Math.floor(Math.random() * 2) === 1 ? 'major' : 'limited',
290
+ "rsd_service_id": "123",
291
+ "description": "This is the description of the service location",
292
+ "content": "This is the content for the service location",
293
+ "status": "active",
294
+ "building": "",
295
+ "physical_address_street": "Pechey Street",
296
+ "physical_address_suburb": "Toowoomba City",
297
+ "physical_address_postcode": "4350",
298
+ "location_details": "Extra details about the location",
299
+ "latitude": testFacilityCoordinates[index][0],
300
+ "longitude": testFacilityCoordinates[index][1],
301
+ "phone_number": "+61 7 4616 6000",
302
+ "fax_number": "+61 7 4616 6170",
303
+ "email_address": "DDHHS@health.qld.gov.au",
304
+ "contact_label": "Contact us",
305
+ "opening_hours": "<p>0800 - 1630</p>",
306
+ "updatedBy": updatedBy,
307
+ "updatedDate": Date.now()
308
+ }).then(function() {
309
+
310
+ // 50/50 chance that this is a top service in the facility
311
+ if (Math.floor(Math.random() * 2) === 1) {
312
+ top_services.push(service_id);
313
+ if (!topInFacilities.hasOwnProperty(service_id)) {
314
+ topInFacilities[service_id] = [];
315
+ }
316
+ topInFacilities[service_id].push(facility_id);
317
+ }
318
+
319
+ if (service_index === selectedServices.length - 1) {
320
+ serviceFinderData.collection('facilities').doc(facility_id).get().then(function(facility) {
321
+ facility.top_services = top_services;
322
+ serviceFinderData.collection('facilities').doc(facility_id).update(facility);
323
+
324
+ if (index < (facilityCount-1)) {
325
+ addServicesAtFacility(index + 1);
326
+ } else {
327
+ updateTopAttributes();
328
+ }
329
+ });
330
+
331
+ }
332
+ });
333
+ });
334
+
335
+
336
+ }
337
+
338
+ function updateTopAttributes() {
339
+ service_ids.forEach(function(service_id, service_index) {
340
+ serviceFinderData.collection('services').doc(service_id).get().then(function(service) {
341
+ if (topInHHS.hasOwnProperty(service.id)) {
342
+ service.top_in_hhs = topInHHS[service.id];
343
+ }
344
+ if (topInFacilities.hasOwnProperty(service.id)) {
345
+ service.top_in_facilities = topInFacilities[service.id];
346
+ }
347
+ serviceFinderData.collection('services').doc(service_id).update(service);
348
+ });
349
+ });
350
+ }
351
+
352
+ }
353
+ }
354
+
355
+
356
+ function clearDatastore() {
357
+
358
+ var collections = [
359
+ 'service-categories',
360
+ 'hhs',
361
+ 'facilities',
362
+ 'services',
363
+ 'hhs-services',
364
+ 'service-locations'
365
+ ];
366
+
367
+ collections.forEach(function(collection) {
368
+ emptyCollection(collection);
369
+ })
370
+
371
+ function emptyCollection(collection) {
372
+ serviceFinderData.collection(collection).get().then(function(documents) {
373
+ documents.forEach(function(doc) {
374
+ serviceFinderData.collection(collection).doc(doc.id).delete().then(function() {
375
+ console.log(doc.id + ' deleted');
376
+ });
377
+ });
378
+ });
379
+ }
380
+
381
+ }
@@ -0,0 +1,62 @@
1
+ .qhealth__abstract {
2
+ font-size: 24px;
3
+ font-size: 1.5rem;
4
+ line-height: 1.33333;
5
+ }
6
+
7
+ .qhealth__table {
8
+ font-size: 16px;
9
+ font-size: 1rem;
10
+ line-height: 1.5;
11
+ font-family: "Lato",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
12
+ width: 100%;
13
+ border-collapse: collapse;
14
+ border-spacing: 0;
15
+ }
16
+
17
+ .qhealth__table .qhealth__table__head {
18
+ display: table-header-group;
19
+ border-bottom: 4px solid #393939;
20
+ border-bottom: 0.25rem solid #393939;
21
+ }
22
+
23
+ .qhealth__table .qhealth__table__row {
24
+ display: table-row;
25
+ }
26
+
27
+ .qhealth__table.qhealth__table--striped .qhealth__table__body .qhealth__table__row:nth-last-child(odd) {
28
+ background-color: #f8f7f8;
29
+ }
30
+
31
+ .qhealth__table .qhealth__table__header {
32
+ padding: 12px;
33
+ padding: 0.75rem;
34
+ text-align: left;
35
+ border-bottom: 1px solid #393939;
36
+ font-weight: bold;
37
+ }
38
+
39
+ .qhealth__table .qhealth__table__head .qhealth__table__header {
40
+ text-align: left;
41
+ padding: 12px;
42
+ padding: 0.75rem;
43
+ }
44
+
45
+ .qhealth__table .qhealth__table__body {
46
+ display: table-row-group;
47
+ }
48
+
49
+ .qhealth__table .qhealth__table__row {
50
+ display: table-row;
51
+ }
52
+
53
+ .qhealth__table.qhealth__table--striped .qhealth__table__body .qhealth__table__row:nth-last-child(odd) {
54
+ background-color: #f8f7f8;
55
+ }
56
+
57
+ .qhealth__table .qhealth__table__cell {
58
+ padding: 12px;
59
+ padding: 0.75rem;
60
+ text-align: left;
61
+ border-bottom: 1px solid #393939;
62
+ }
@@ -0,0 +1,6 @@
1
+ module.exports = function (head, tail, options) {
2
+ if (options.hash.prepend === 'true') {
3
+ return !head ? '' : tail + head;
4
+ }
5
+ return !head ? '' : head + tail;
6
+ }
@@ -0,0 +1,3 @@
1
+ module.exports = function (json) {
2
+ return Object.keys(json).length;
3
+ }
@@ -0,0 +1,13 @@
1
+ module.exports = function(array,key,value,options) {
2
+ var childArray = []
3
+ for(var x = 0; x<array.length;x++) {
4
+ if(array[x][key] == value) {
5
+ childArray.push(array[x]);
6
+
7
+ }
8
+ }
9
+ if(childArray.length > 0){
10
+ return options.fn(childArray)
11
+ }
12
+
13
+ };
@@ -0,0 +1,8 @@
1
+ module.exports = function(str) {
2
+ var splitStr = str.toLowerCase().split(' ');
3
+ for (var i = 0; i < splitStr.length; i++) {
4
+ splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
5
+ }
6
+ return splitStr.join(' ');
7
+
8
+ };
@@ -0,0 +1,8 @@
1
+ module.exports = function (str, limit) {
2
+
3
+ if (str.length > limit) {
4
+ return str.substring(0, 160) + '...';
5
+ }else{
6
+ return str
7
+ }
8
+ }
@@ -0,0 +1,20 @@
1
+ module.exports = function (v1, o1, v2, mainOperator, v3, o2, v4, options) {
2
+ var operators = {
3
+ '==': function(a, b){ return a==b},
4
+ '===': function(a, b){ return a===b},
5
+ '!=': function(a, b){ return a!=b},
6
+ '!==': function(a, b){ return a!==b},
7
+ '<': function(a, b){ return a<b},
8
+ '<=': function(a, b){ return a<=b},
9
+ '>': function(a, b){ return a>b},
10
+ '>=': function(a, b){ return a>=b},
11
+ '&&': function(a, b){ return a&&b},
12
+ '||': function(a, b){ return a||b},
13
+ }
14
+
15
+ var a1 = operators[o1](v1,v2);
16
+ var a2 = operators[o2](v3,v4);
17
+ var isTrue = operators[mainOperator](a1, a2);
18
+
19
+ return isTrue ? options.fn(this) : options.inverse(this);
20
+ };
@@ -0,0 +1,39 @@
1
+ module.exports = function(target_col, data) {
2
+
3
+ var col_widths = [
4
+ data.col_1_width.value,
5
+ data.col_2_width.value,
6
+ data.col_3_width.value
7
+ ];
8
+
9
+ var col_num = Number(data.col_num.value);
10
+ target_col = Number(target_col);
11
+ var width = 12;
12
+
13
+ // Use width override if available
14
+ var width_override = Number(col_widths[target_col-1]);
15
+ if (width_override > 0) {
16
+ width = width_override;
17
+
18
+ // Else loop through columns and accumulate manual width
19
+ } else {
20
+
21
+ var width_acc = 0;
22
+ var auto_cols = 0;
23
+ for (var i = 0; i < col_num; i++) {
24
+ var col_width_override = Number(col_widths[i]);
25
+ if (col_width_override > 0) {
26
+ width_acc += col_width_override;
27
+ } else {
28
+ auto_cols++;
29
+ }
30
+
31
+ }
32
+
33
+ var width_available = 12 - width_acc;
34
+ width = width_available / auto_cols;
35
+ }
36
+
37
+ // Return bootstrap column class
38
+ return 'col-xs-12 col-lg-' + width;
39
+ };
@@ -0,0 +1,7 @@
1
+ module.exports = function(string, contains, options) {
2
+ if(string.indexOf(contains) !== -1) {
3
+ return options.fn(this);
4
+ }
5
+
6
+ return options.inverse(this);
7
+ }
@@ -0,0 +1,19 @@
1
+ module.exports = function(array, key, prop) {
2
+ Array.prototype.polyReduce = function(callbackFn, initialValue) {
3
+ var accumulator = initialValue;
4
+
5
+ for (var i = 0; i < this.length; i++) {
6
+ if (accumulator !== undefined) {
7
+ accumulator = callbackFn.call(undefined, accumulator, this[i], i, this);
8
+ } else {
9
+ accumulator = this[i];
10
+ }
11
+ }
12
+ return accumulator;
13
+ }
14
+
15
+ return array.polyReduce(function(acc,item) {
16
+ acc[item[key]] = item[prop];
17
+ return acc;
18
+ }, {});
19
+ };
@@ -0,0 +1,8 @@
1
+ module.exports = function(datastore, collection, key) {
2
+ return datastore[collection].reduce(function(acc,item) {
3
+ var id = item.id;
4
+ var value = item[key];
5
+ acc[id] = value;
6
+ return acc;
7
+ }, {});
8
+ };
@@ -0,0 +1,8 @@
1
+ module.exports = function(datastore, collection, property, key) {
2
+ return datastore[collection].reduce(function(acc,item) {
3
+ var prop = item[property];
4
+ var value = item[key];
5
+ acc[prop] = value;
6
+ return acc;
7
+ }, {});
8
+ };
@@ -0,0 +1,18 @@
1
+ module.exports = function(context,options) {
2
+ var output = "";
3
+ var sorted = context.sort(function(a, b){
4
+ if(a.name < b.name) { return -1; }
5
+ if(a.name > b.name) { return 1; }
6
+ return 0;
7
+ });
8
+
9
+ for(let item in sorted) {
10
+ let i = Object.keys(sorted).indexOf(item);
11
+
12
+ if(i >= 0) {
13
+ output += options.fn(sorted[item]);
14
+ }
15
+ };
16
+
17
+ return output;
18
+ }
@@ -0,0 +1,7 @@
1
+ module.exports = function(ds,context,options) {
2
+ var ret = "";
3
+ for (var i = 0, j = ds[context].length; i < j; i++) {
4
+ ret = ret + options.fn(ds[context][i]);
5
+ }
6
+ return ret;
7
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = function(context, count, options) {
2
+ var ret = "";
3
+
4
+ if (window.NodeList && !NodeList.prototype.forEach) {
5
+ NodeList.prototype.forEach = Array.prototype.forEach;
6
+ }
7
+
8
+ context.slice(count).forEach(function(elem) {
9
+ ret += options.fn(elem);
10
+ });
11
+
12
+ return ret;
13
+ }
@@ -0,0 +1,8 @@
1
+ module.exports = function (arr, max, options) {
2
+ var item = "";
3
+ var totalCount = max < arr.length ? max : arr.length;
4
+ for (var i = 0; i < totalCount; i++) {
5
+ item = item + options.fn(arr[i]);
6
+ }
7
+ return item;
8
+ };