@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.
- package/.babelrc +15 -0
- package/.browserslistrc +5 -0
- package/.editorconfig +19 -0
- package/.eslintignore +1 -0
- package/.eslintrc +25 -0
- package/.gitattributes +2 -0
- package/.github/workflows/release_package.yml +103 -0
- package/CHANGELOG.md +14 -0
- package/README.md +534 -0
- package/dist/api/service_finder/schemas.json +1 -0
- package/dist/component-abstract.html +884 -0
- package/dist/component-accordion.html +1157 -0
- package/dist/component-banner.html +928 -0
- package/dist/component-banner_advanced.html +1524 -0
- package/dist/component-banner_basic.html +1189 -0
- package/dist/component-banner_intermediate.html +1288 -0
- package/dist/component-body.html +919 -0
- package/dist/component-breadcrumbs.html +881 -0
- package/dist/component-btn.html +829 -0
- package/dist/component-callout.html +964 -0
- package/dist/component-card_feature.html +1805 -0
- package/dist/component-card_multi_action.html +1965 -0
- package/dist/component-card_no_action.html +1632 -0
- package/dist/component-card_single_action.html +1772 -0
- package/dist/component-code.html +928 -0
- package/dist/component-footer.html +1131 -0
- package/dist/component-forms.html +1297 -0
- package/dist/component-global-elements.html +1243 -0
- package/dist/component-global_alert.html +891 -0
- package/dist/component-header.html +1155 -0
- package/dist/component-in_page_navigation.html +920 -0
- package/dist/component-internal_navigation.html +1097 -0
- package/dist/component-left_hand_navigation.html +995 -0
- package/dist/component-main_navigation.html +999 -0
- package/dist/component-mega_main_navigation.html +1145 -0
- package/dist/component-multi_column.html +1116 -0
- package/dist/component-page_alert.html +911 -0
- package/dist/component-pagination.html +971 -0
- package/dist/component-tag_list.html +979 -0
- package/dist/component-updated_date.html +778 -0
- package/dist/component-widgets.html +851 -0
- package/dist/components/_global/import.xml +95 -0
- package/dist/components/_global/manifest.json +11 -0
- package/dist/components/_global/presentation.js +50 -0
- package/dist/components/_global/static.html +30 -0
- package/dist/components/_template/import.xml +299 -0
- package/dist/components/_template/manifest.json +40 -0
- package/dist/components/_template/presentation.js +12 -0
- package/dist/components/_template/static.html +4 -0
- package/dist/components/abstract/import.xml +231 -0
- package/dist/components/abstract/manifest.json +29 -0
- package/dist/components/abstract/presentation.js +33 -0
- package/dist/components/abstract/static.html +9 -0
- package/dist/components/accordion/import.xml +1929 -0
- package/dist/components/accordion/manifest.json +427 -0
- package/dist/components/accordion/presentation.js +112 -0
- package/dist/components/accordion/static.html +56 -0
- package/dist/components/banner/import.xml +95 -0
- package/dist/components/banner/manifest.json +11 -0
- package/dist/components/banner/presentation.js +138 -0
- package/dist/components/banner/static.html +39 -0
- package/dist/components/banner_advanced/import.xml +1969 -0
- package/dist/components/banner_advanced/manifest.json +1450 -0
- package/dist/components/banner_advanced/presentation.js +564 -0
- package/dist/components/banner_advanced/static.html +159 -0
- package/dist/components/banner_basic/import.xml +907 -0
- package/dist/components/banner_basic/manifest.json +151 -0
- package/dist/components/banner_basic/presentation.js +325 -0
- package/dist/components/banner_basic/static.html +86 -0
- package/dist/components/banner_intermediate/import.xml +1473 -0
- package/dist/components/banner_intermediate/manifest.json +248 -0
- package/dist/components/banner_intermediate/presentation.js +410 -0
- package/dist/components/banner_intermediate/static.html +102 -0
- package/dist/components/body/import.xml +343 -0
- package/dist/components/body/manifest.json +46 -0
- package/dist/components/body/presentation.js +37 -0
- package/dist/components/body/static.html +5 -0
- package/dist/components/breadcrumbs/import.xml +95 -0
- package/dist/components/breadcrumbs/manifest.json +9 -0
- package/dist/components/breadcrumbs/presentation.js +99 -0
- package/dist/components/breadcrumbs/static.html +21 -0
- package/dist/components/callout/import.xml +953 -0
- package/dist/components/callout/manifest.json +121 -0
- package/dist/components/callout/presentation.js +103 -0
- package/dist/components/callout/static.html +10 -0
- package/dist/components/card_feature/import.xml +2355 -0
- package/dist/components/card_feature/manifest.json +1390 -0
- package/dist/components/card_feature/presentation.js +365 -0
- package/dist/components/card_feature/static.html +80 -0
- package/dist/components/card_multi_action/import.xml +1539 -0
- package/dist/components/card_multi_action/manifest.json +1314 -0
- package/dist/components/card_multi_action/presentation.js +638 -0
- package/dist/components/card_multi_action/static.html +120 -0
- package/dist/components/card_no_action/import.xml +1449 -0
- package/dist/components/card_no_action/manifest.json +1264 -0
- package/dist/components/card_no_action/presentation.js +454 -0
- package/dist/components/card_no_action/static.html +94 -0
- package/dist/components/card_single_action/import.xml +1539 -0
- package/dist/components/card_single_action/manifest.json +1273 -0
- package/dist/components/card_single_action/presentation.js +498 -0
- package/dist/components/card_single_action/static.html +103 -0
- package/dist/components/code/import.xml +569 -0
- package/dist/components/code/manifest.json +112 -0
- package/dist/components/code/presentation.js +124 -0
- package/dist/components/code/static.html +15 -0
- package/dist/components/footer/import.xml +95 -0
- package/dist/components/footer/manifest.json +9 -0
- package/dist/components/footer/presentation.js +409 -0
- package/dist/components/footer/static.html +146 -0
- package/dist/components/global_alert/import.xml +95 -0
- package/dist/components/global_alert/manifest.json +9 -0
- package/dist/components/global_alert/presentation.js +81 -0
- package/dist/components/global_alert/static.html +26 -0
- package/dist/components/header/import.xml +95 -0
- package/dist/components/header/manifest.json +11 -0
- package/dist/components/header/presentation.js +190 -0
- package/dist/components/header/static.html +158 -0
- package/dist/components/horizontal_rule/import.xml +547 -0
- package/dist/components/horizontal_rule/manifest.json +69 -0
- package/dist/components/horizontal_rule/presentation.js +50 -0
- package/dist/components/horizontal_rule/static.html +4 -0
- package/dist/components/in_page_navigation/import.xml +253 -0
- package/dist/components/in_page_navigation/manifest.json +35 -0
- package/dist/components/in_page_navigation/presentation.js +14 -0
- package/dist/components/in_page_navigation/static.html +13 -0
- package/dist/components/internal_navigation/import.xml +95 -0
- package/dist/components/internal_navigation/manifest.json +11 -0
- package/dist/components/internal_navigation/presentation.js +165 -0
- package/dist/components/internal_navigation/static.html +130 -0
- package/dist/components/left_hand_navigation/import.xml +299 -0
- package/dist/components/left_hand_navigation/manifest.json +40 -0
- package/dist/components/left_hand_navigation/presentation.js +178 -0
- package/dist/components/left_hand_navigation/static.html +64 -0
- package/dist/components/main_navigation/import.xml +95 -0
- package/dist/components/main_navigation/manifest.json +11 -0
- package/dist/components/main_navigation/presentation.js +150 -0
- package/dist/components/main_navigation/static.html +80 -0
- package/dist/components/mega_main_navigation/import.xml +95 -0
- package/dist/components/mega_main_navigation/manifest.json +9 -0
- package/dist/components/mega_main_navigation/presentation.js +380 -0
- package/dist/components/mega_main_navigation/static.html +153 -0
- package/dist/components/multi_column/import.xml +1631 -0
- package/dist/components/multi_column/manifest.json +233 -0
- package/dist/components/multi_column/presentation.js +249 -0
- package/dist/components/multi_column/static.html +36 -0
- package/dist/components/page_alert/import.xml +479 -0
- package/dist/components/page_alert/manifest.json +63 -0
- package/dist/components/page_alert/presentation.js +67 -0
- package/dist/components/page_alert/static.html +8 -0
- package/dist/components/pagination/import.xml +95 -0
- package/dist/components/pagination/manifest.json +42 -0
- package/dist/components/pagination/presentation.js +84 -0
- package/dist/components/pagination/static.html +5 -0
- package/dist/components/updated_date/import.xml +95 -0
- package/dist/components/updated_date/manifest.json +9 -0
- package/dist/components/updated_date/presentation.js +34 -0
- package/dist/components/updated_date/static.html +6 -0
- package/dist/components/widgets/import.xml +95 -0
- package/dist/components/widgets/manifest.json +9 -0
- package/dist/components/widgets/presentation.js +40 -0
- package/dist/components/widgets/static.html +0 -0
- package/dist/components.html +790 -0
- package/dist/externals/componentPreview.js +101 -0
- package/dist/externals/dsComponentLoader.js +410 -0
- package/dist/externals/esri-leaflet-vector.js +5 -0
- package/dist/externals/esri-leaflet.js +12 -0
- package/dist/externals/fb-handlebars.min.js +29 -0
- package/dist/externals/fb-typeahead.bundle.min.js +6 -0
- package/dist/externals/funnelback.autocompletion-2.6.0.js +678 -0
- package/dist/externals/getPagination.js +62 -0
- package/dist/externals/handlebars.min-v4.7.6.js +29 -0
- package/dist/externals/leaflet.js +6 -0
- package/dist/externals/populateDatastoreSim.js +381 -0
- package/dist/externals/tinymce_classes.css +62 -0
- package/dist/home.html +694 -0
- package/dist/index.html +710 -0
- package/dist/inner-with-nav.html +1853 -0
- package/dist/inner.html +671 -0
- package/dist/js/helpers.js +892 -0
- package/dist/js/main.js +55 -0
- package/dist/js/main.js.map +1 -0
- package/dist/js/runtime.js +2 -0
- package/dist/js/runtime.js.map +1 -0
- package/dist/main.css +918 -0
- package/dist/main.css.map +1 -0
- package/dist/mysource_files/ajax-loader.gif +0 -0
- package/dist/mysource_files/favicons/favicon.ico +0 -0
- package/dist/mysource_files/img/100x100.jpg +0 -0
- package/dist/mysource_files/img/600x260.jpg +0 -0
- package/dist/mysource_files/img/Heart-Pattern-Dark.png +0 -0
- package/dist/mysource_files/img/Heart-Pattern.png +0 -0
- package/dist/mysource_files/img/banner-background--desktop.png +0 -0
- package/dist/mysource_files/img/banner-background--mobile.png +0 -0
- package/dist/mysource_files/img/banner-bg.png +0 -0
- package/dist/mysource_files/img/banner.png +0 -0
- package/dist/mysource_files/img/card--brand.png +0 -0
- package/dist/mysource_files/img/card--components.png +0 -0
- package/dist/mysource_files/img/card--content.png +0 -0
- package/dist/mysource_files/img/header-logo-agov.png +0 -0
- package/dist/mysource_files/img/header-logo-qgov--dark.svg +63 -0
- package/dist/mysource_files/img/header-logo-qgov--light.svg +56 -0
- package/dist/mysource_files/img/header-logo-qgov--pre-dark.svg +56 -0
- package/dist/mysource_files/img/header-search.svg +3 -0
- package/dist/mysource_files/img/layers-2x.png +0 -0
- package/dist/mysource_files/img/layers.png +0 -0
- package/dist/mysource_files/img/marker-icon.png +0 -0
- package/dist/mysource_files/img/svg-icons.svg +155 -0
- package/dist/mysource_files/img/video-play.svg +3 -0
- package/dist/mysource_files/slick.eot +0 -0
- package/dist/mysource_files/slick.svg +14 -0
- package/dist/mysource_files/slick.ttf +0 -0
- package/dist/mysource_files/slick.woff +0 -0
- package/package-lock.json +14276 -0
- package/package.json +79 -0
- package/scripts/add_component.sh +109 -0
- package/src/assets/favicons/favicon.ico +0 -0
- package/src/assets/img/100x100.jpg +0 -0
- package/src/assets/img/600x260.jpg +0 -0
- package/src/assets/img/Heart-Pattern-Dark.png +0 -0
- package/src/assets/img/Heart-Pattern.png +0 -0
- package/src/assets/img/banner-background--desktop.png +0 -0
- package/src/assets/img/banner-background--mobile.png +0 -0
- package/src/assets/img/banner-bg.png +0 -0
- package/src/assets/img/banner.png +0 -0
- package/src/assets/img/card--brand.png +0 -0
- package/src/assets/img/card--components.png +0 -0
- package/src/assets/img/card--content.png +0 -0
- package/src/assets/img/header-logo-agov.png +0 -0
- package/src/assets/img/header-logo-qgov--dark.svg +63 -0
- package/src/assets/img/header-logo-qgov--light.svg +56 -0
- package/src/assets/img/header-logo-qgov--pre-dark.svg +56 -0
- package/src/assets/img/header-search.svg +3 -0
- package/src/assets/img/layers-2x.png +0 -0
- package/src/assets/img/layers.png +0 -0
- package/src/assets/img/marker-icon.png +0 -0
- package/src/assets/img/svg-icons.svg +155 -0
- package/src/assets/img/video-play.svg +3 -0
- package/src/components/_global/css/admin/component.scss +71 -0
- package/src/components/_global/css/body/component.scss +897 -0
- package/src/components/_global/css/btn/component.scss +564 -0
- package/src/components/_global/css/cta_links/component.scss +121 -0
- package/src/components/_global/css/direction_links/component.scss +196 -0
- package/src/components/_global/css/example/component.scss +54 -0
- package/src/components/_global/css/forms/control_inputs/component.scss +349 -0
- package/src/components/_global/css/forms/general/component.scss +298 -0
- package/src/components/_global/css/forms/select/component.scss +230 -0
- package/src/components/_global/css/forms/text/component.scss +402 -0
- package/src/components/_global/css/global.scss +42 -0
- package/src/components/_global/css/grid-12/component.scss +331 -0
- package/src/components/_global/css/headings/component.scss +172 -0
- package/src/components/_global/css/icons/component.scss +29 -0
- package/src/components/_global/css/link_columns/component.scss +194 -0
- package/src/components/_global/css/link_list/component.scss +37 -0
- package/src/components/_global/css/modal/component.scss +182 -0
- package/src/components/_global/css/slick/component.scss +25 -0
- package/src/components/_global/css/table/component.scss +211 -0
- package/src/components/_global/css/tabs/component.scss +43 -0
- package/src/components/_global/css/tags/component.scss +272 -0
- package/src/components/_global/css/user_location/component.scss +38 -0
- package/src/components/_global/css/version/component.scss +47 -0
- package/src/components/_global/html/component.hbs +108 -0
- package/src/components/_global/html/ds_component.hbs +30 -0
- package/src/components/_global/html/head.html +63 -0
- package/src/components/_global/html/scripts.html +58 -0
- package/src/components/_global/js/_polyfills/global.js +18 -0
- package/src/components/_global/js/animate/global.js +324 -0
- package/src/components/_global/js/forms/global.js +182 -0
- package/src/components/_global/js/global.js +302 -0
- package/src/components/_global/js/manifest.json +11 -0
- package/src/components/_global/js/modal/global.js +236 -0
- package/src/components/_global/js/slick/global.js +153 -0
- package/src/components/_global/js/tabs/global.js +305 -0
- package/src/components/_global/js/user_location/global.js +116 -0
- package/src/components/_template/css/component.scss +22 -0
- package/src/components/_template/html/component-page.html +85 -0
- package/src/components/_template/html/component.hbs +4 -0
- package/src/components/_template/js/global.js +6 -0
- package/src/components/_template/js/manifest.json +40 -0
- package/src/components/abstract/css/component.scss +91 -0
- package/src/components/abstract/html/component.hbs +9 -0
- package/src/components/abstract/js/manifest.json +29 -0
- package/src/components/accordion/css/component.scss +329 -0
- package/src/components/accordion/html/accordion-group.html +157 -0
- package/src/components/accordion/html/component.hbs +46 -0
- package/src/components/accordion/html/default.html +92 -0
- package/src/components/accordion/js/global.js +413 -0
- package/src/components/accordion/js/manifest.json +427 -0
- package/src/components/banner/css/component.scss +664 -0
- package/src/components/banner/html/component.hbs +52 -0
- package/src/components/banner/js/manifest.json +11 -0
- package/src/components/banner_advanced/css/component.scss +7 -0
- package/src/components/banner_advanced/html/component.hbs +213 -0
- package/src/components/banner_advanced/js/global.js +6 -0
- package/src/components/banner_advanced/js/manifest.json +1450 -0
- package/src/components/banner_basic/css/component.scss +52 -0
- package/src/components/banner_basic/html/component.hbs +130 -0
- package/src/components/banner_basic/js/global.js +6 -0
- package/src/components/banner_basic/js/manifest.json +151 -0
- package/src/components/banner_intermediate/css/component.scss +276 -0
- package/src/components/banner_intermediate/html/component.hbs +165 -0
- package/src/components/banner_intermediate/js/global.js +6 -0
- package/src/components/banner_intermediate/js/manifest.json +248 -0
- package/src/components/body/css/component.scss +16 -0
- package/src/components/body/html/component.hbs +5 -0
- package/src/components/body/js/manifest.json +46 -0
- package/src/components/breadcrumbs/css/component.scss +236 -0
- package/src/components/breadcrumbs/html/component.hbs +29 -0
- package/src/components/breadcrumbs/js/manifest.json +9 -0
- package/src/components/callout/css/component.scss +146 -0
- package/src/components/callout/html/component.hbs +28 -0
- package/src/components/callout/js/manifest.json +121 -0
- package/src/components/card_feature/css/component.scss +224 -0
- package/src/components/card_feature/html/component.hbs +129 -0
- package/src/components/card_feature/js/manifest.json +1390 -0
- package/src/components/card_multi_action/css/component.scss +229 -0
- package/src/components/card_multi_action/html/component.hbs +192 -0
- package/src/components/card_multi_action/js/manifest.json +1314 -0
- package/src/components/card_no_action/css/component.scss +551 -0
- package/src/components/card_no_action/html/component.hbs +127 -0
- package/src/components/card_no_action/js/global.js +6 -0
- package/src/components/card_no_action/js/manifest.json +1264 -0
- package/src/components/card_single_action/css/component.scss +164 -0
- package/src/components/card_single_action/html/component.hbs +161 -0
- package/src/components/card_single_action/js/manifest.json +1273 -0
- package/src/components/code/css/component.scss +355 -0
- package/src/components/code/html/component.hbs +84 -0
- package/src/components/code/js/global.js +160 -0
- package/src/components/code/js/manifest.json +112 -0
- package/src/components/footer/css/component.scss +437 -0
- package/src/components/footer/html/component.hbs +177 -0
- package/src/components/footer/js/manifest.json +9 -0
- package/src/components/global_alert/css/component.scss +169 -0
- package/src/components/global_alert/html/component.hbs +38 -0
- package/src/components/global_alert/js/global.js +39 -0
- package/src/components/global_alert/js/manifest.json +9 -0
- package/src/components/header/css/component.scss +697 -0
- package/src/components/header/html/component.hbs +186 -0
- package/src/components/header/js/global.js +188 -0
- package/src/components/header/js/manifest.json +11 -0
- package/src/components/horizontal_rule/css/component.scss +37 -0
- package/src/components/horizontal_rule/html/component.hbs +6 -0
- package/src/components/horizontal_rule/js/manifest.json +69 -0
- package/src/components/in_page_navigation/css/component.scss +54 -0
- package/src/components/in_page_navigation/html/component.hbs +17 -0
- package/src/components/in_page_navigation/js/global.js +51 -0
- package/src/components/in_page_navigation/js/manifest.json +35 -0
- package/src/components/internal_navigation/css/component.scss +437 -0
- package/src/components/internal_navigation/html/component.hbs +57 -0
- package/src/components/internal_navigation/js/manifest.json +11 -0
- package/src/components/left_hand_navigation/css/component.scss +280 -0
- package/src/components/left_hand_navigation/html/component.hbs +77 -0
- package/src/components/left_hand_navigation/js/global.js +36 -0
- package/src/components/left_hand_navigation/js/manifest.json +40 -0
- package/src/components/main_navigation/css/component.scss +706 -0
- package/src/components/main_navigation/html/component.hbs +87 -0
- package/src/components/main_navigation/js/global.js +373 -0
- package/src/components/main_navigation/js/manifest.json +11 -0
- package/src/components/mega_main_navigation/css/component.scss +535 -0
- package/src/components/mega_main_navigation/html/component.hbs +157 -0
- package/src/components/mega_main_navigation/js/global.js +170 -0
- package/src/components/mega_main_navigation/js/manifest.json +9 -0
- package/src/components/multi_column/css/component.scss +11 -0
- package/src/components/multi_column/html/component.hbs +98 -0
- package/src/components/multi_column/js/manifest.json +233 -0
- package/src/components/page_alert/css/component.scss +132 -0
- package/src/components/page_alert/html/component.hbs +26 -0
- package/src/components/page_alert/js/manifest.json +63 -0
- package/src/components/pagination/css/component.scss +196 -0
- package/src/components/pagination/html/component.hbs +41 -0
- package/src/components/pagination/html/default.html +30 -0
- package/src/components/pagination/js/manifest.json +42 -0
- package/src/components/search_box/css/component.scss +48 -0
- package/src/components/search_box/html/component.html +11 -0
- package/src/components/search_box/js/manifest.json +73 -0
- package/src/components/updated_date/css/component.scss +0 -0
- package/src/components/updated_date/html/component.hbs +31 -0
- package/src/components/updated_date/js/manifest.json +9 -0
- package/src/components/widgets/css/component.scss +82 -0
- package/src/components/widgets/html/component.hbs +19 -0
- package/src/components/widgets/html/default.html +4 -0
- package/src/components/widgets/js/current.json +483 -0
- package/src/components/widgets/js/manifest.json +9 -0
- package/src/components/widgets/js/site.json +358 -0
- package/src/data/current.json +522 -0
- package/src/data/current_admin.json +305 -0
- package/src/data/model_component.js +14 -0
- package/src/data/site.json +762 -0
- package/src/externals/componentPreview.js +101 -0
- package/src/externals/dsComponentLoader.js +410 -0
- package/src/externals/esri-leaflet-vector.js +5 -0
- package/src/externals/esri-leaflet.js +12 -0
- package/src/externals/fb-handlebars.min.js +29 -0
- package/src/externals/fb-typeahead.bundle.min.js +6 -0
- package/src/externals/funnelback.autocompletion-2.6.0.js +678 -0
- package/src/externals/getPagination.js +62 -0
- package/src/externals/handlebars.min-v4.7.6.js +29 -0
- package/src/externals/leaflet.js +6 -0
- package/src/externals/populateDatastoreSim.js +381 -0
- package/src/externals/tinymce_classes.css +62 -0
- package/src/helpers/Handlebars/appendIf.js +6 -0
- package/src/helpers/Handlebars/arrayLength.js +3 -0
- package/src/helpers/Handlebars/arrayWith.js +13 -0
- package/src/helpers/Handlebars/capitaliseFirst.js +8 -0
- package/src/helpers/Handlebars/charMax.js +8 -0
- package/src/helpers/Handlebars/checkIf.js +20 -0
- package/src/helpers/Handlebars/columnWidth.js +39 -0
- package/src/helpers/Handlebars/contains.js +7 -0
- package/src/helpers/Handlebars/createMap.js +19 -0
- package/src/helpers/Handlebars/dsMapFromID.js +8 -0
- package/src/helpers/Handlebars/dsMapFromProp.js +8 -0
- package/src/helpers/Handlebars/eachByName.js +18 -0
- package/src/helpers/Handlebars/eachDS.js +7 -0
- package/src/helpers/Handlebars/eachFrom.js +13 -0
- package/src/helpers/Handlebars/eachUpTo.js +8 -0
- package/src/helpers/Handlebars/eachWhen.js +33 -0
- package/src/helpers/Handlebars/formatDate.js +62 -0
- package/src/helpers/Handlebars/generateDates.js +74 -0
- package/src/helpers/Handlebars/getDistance.js +40 -0
- package/src/helpers/Handlebars/getObject.js +3 -0
- package/src/helpers/Handlebars/getParamaterByName.js +11 -0
- package/src/helpers/Handlebars/getPossibleValues.js +13 -0
- package/src/helpers/Handlebars/getProp.js +3 -0
- package/src/helpers/Handlebars/getTags.js +20 -0
- package/src/helpers/Handlebars/getTitle.js +4 -0
- package/src/helpers/Handlebars/ifAny.js +9 -0
- package/src/helpers/Handlebars/ifArray.js +3 -0
- package/src/helpers/Handlebars/ifCond.js +31 -0
- package/src/helpers/Handlebars/ifEqualsOrChained.js +12 -0
- package/src/helpers/Handlebars/ifProp.js +3 -0
- package/src/helpers/Handlebars/if_eq.js +9 -0
- package/src/helpers/Handlebars/inArray.js +8 -0
- package/src/helpers/Handlebars/isPage.js +7 -0
- package/src/helpers/Handlebars/itemAt.js +11 -0
- package/src/helpers/Handlebars/jsonParse.js +8 -0
- package/src/helpers/Handlebars/jsonStringify.js +3 -0
- package/src/helpers/Handlebars/listAZ.js +51 -0
- package/src/helpers/Handlebars/listAZOptions.js +34 -0
- package/src/helpers/Handlebars/listByClosest.js +60 -0
- package/src/helpers/Handlebars/listByClosestWithOffset.js +63 -0
- package/src/helpers/Handlebars/math.js +11 -0
- package/src/helpers/Handlebars/newLineToBreak.js +6 -0
- package/src/helpers/Handlebars/nonBreakingSpaces.js +6 -0
- package/src/helpers/Handlebars/objectFromSelect.js +21 -0
- package/src/helpers/Handlebars/partialReplace.js +9 -0
- package/src/helpers/Handlebars/printAccordion.js +24 -0
- package/src/helpers/Handlebars/replace.js +8 -0
- package/src/helpers/Handlebars/replaceMany.js +5 -0
- package/src/helpers/Handlebars/sizeFormat.js +11 -0
- package/src/helpers/Handlebars/split.js +6 -0
- package/src/helpers/Handlebars/toUpperCase.js +7 -0
- package/src/helpers/Handlebars/urldecode.js +3 -0
- package/src/helpers/Handlebars/urlencode.js +3 -0
- package/src/helpers/Handlebars/withinObject.js +13 -0
- package/src/html/component-abstract.html +86 -0
- package/src/html/component-accordion.html +87 -0
- package/src/html/component-banner.html +84 -0
- package/src/html/component-banner_advanced.html +97 -0
- package/src/html/component-banner_basic.html +163 -0
- package/src/html/component-banner_intermediate.html +91 -0
- package/src/html/component-body.html +116 -0
- package/src/html/component-breadcrumbs.html +88 -0
- package/src/html/component-btn.html +117 -0
- package/src/html/component-callout.html +86 -0
- package/src/html/component-card_feature.html +631 -0
- package/src/html/component-card_multi_action.html +793 -0
- package/src/html/component-card_no_action.html +521 -0
- package/src/html/component-card_single_action.html +631 -0
- package/src/html/component-code.html +84 -0
- package/src/html/component-footer.html +87 -0
- package/src/html/component-forms.html +585 -0
- package/src/html/component-global-elements.html +531 -0
- package/src/html/component-global_alert.html +87 -0
- package/src/html/component-header.html +88 -0
- package/src/html/component-in_page_navigation.html +109 -0
- package/src/html/component-internal_navigation.html +87 -0
- package/src/html/component-left_hand_navigation.html +85 -0
- package/src/html/component-main_navigation.html +87 -0
- package/src/html/component-mega_main_navigation.html +88 -0
- package/src/html/component-multi_column.html +86 -0
- package/src/html/component-page_alert.html +86 -0
- package/src/html/component-pagination.html +86 -0
- package/src/html/component-tag_list.html +340 -0
- package/src/html/component-updated_date.html +88 -0
- package/src/html/component-widgets.html +90 -0
- package/src/html/components.html +136 -0
- package/src/html/home.html +126 -0
- package/src/html/index.html +142 -0
- package/src/html/inner-with-nav.html +1126 -0
- package/src/html/inner.html +107 -0
- package/src/index.js +12 -0
- package/src/styles/global.scss +120 -0
- package/src/styles/imports/figma.scss +0 -0
- package/src/styles/imports/functions.scss +519 -0
- package/src/styles/imports/mixins.scss +658 -0
- package/src/styles/imports/placeholders.scss +68 -0
- package/src/styles/imports/utilities.scss +185 -0
- package/src/styles/imports/variables.scss +484 -0
- package/src/styles/postcss.config.js +4 -0
- package/webpack/JsonMergePlugin.js +35 -0
- package/webpack/PrecompilePlugin.js +369 -0
- package/webpack/webpack.common.js +151 -0
- package/webpack/webpack.dev.js +54 -0
- package/webpack/webpack.prod.js +70 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
|
|
3
|
+
var previewDelay = previewDelay ? previewDelay : 50;
|
|
4
|
+
|
|
5
|
+
// Component Page Handlers
|
|
6
|
+
window.addEventListener('DOMContentLoaded', function () {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Local module for Handlebars live updates
|
|
10
|
+
*
|
|
11
|
+
* @module componentPreview
|
|
12
|
+
*/
|
|
13
|
+
var componentPreview = {
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Initialise the componentPreview module (including event listeners)
|
|
17
|
+
*
|
|
18
|
+
* @memberof module:componentPreview
|
|
19
|
+
*/
|
|
20
|
+
'init': function() {
|
|
21
|
+
|
|
22
|
+
//Remove Base64 Headers
|
|
23
|
+
var componentClean = window.atob(component.replace('export default "data:text/x-handlebars-template;charset=utf-8;base64,','').replace('"',''));
|
|
24
|
+
|
|
25
|
+
//Remove ./?a
|
|
26
|
+
componentPreview.componentClean = componentClean.replace(/\.\/\?a=/g,'');
|
|
27
|
+
|
|
28
|
+
//Event Listeners
|
|
29
|
+
document.querySelectorAll(".qld__model_field").forEach(function(e) {
|
|
30
|
+
|
|
31
|
+
e.addEventListener('change',function() {
|
|
32
|
+
componentPreview.updateHB(e.name,e.value)
|
|
33
|
+
},false);
|
|
34
|
+
|
|
35
|
+
e.addEventListener('keyup',function() {
|
|
36
|
+
componentPreview.updateHB(e.name,e.value)
|
|
37
|
+
},false);
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Re-render the Handlebars template with new data
|
|
43
|
+
*
|
|
44
|
+
* @memberof module:componentPreview
|
|
45
|
+
*/
|
|
46
|
+
'updateHB': QLD.utils.debounce(function(prop,value) {
|
|
47
|
+
if(typeof componentModel.component.data.metadata[prop].value != 'undefined') {
|
|
48
|
+
|
|
49
|
+
// Update value
|
|
50
|
+
componentModel.component.data.metadata[prop].value = value;
|
|
51
|
+
|
|
52
|
+
// Compile the template
|
|
53
|
+
var compiled = Handlebars.compile(componentPreview.componentClean);
|
|
54
|
+
var output = compiled({
|
|
55
|
+
"component": componentModel.component,
|
|
56
|
+
"current": current,
|
|
57
|
+
"site": site,
|
|
58
|
+
"content":"Lorem Ipsum"
|
|
59
|
+
}).replace(/\.\/\?a=/g, '');
|
|
60
|
+
|
|
61
|
+
// Set the main component preview
|
|
62
|
+
document.querySelector("#cp-tab--body.component_output").innerHTML = output
|
|
63
|
+
|
|
64
|
+
// Set the Raw HTML component output
|
|
65
|
+
document.querySelector(".qld__example__html .component_output").innerText = output;
|
|
66
|
+
|
|
67
|
+
// Run callback
|
|
68
|
+
if (renderCallback.length > 0) {
|
|
69
|
+
componentPreview.executeFunctionByName(renderCallback, window);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
QLD.code.init();
|
|
73
|
+
}
|
|
74
|
+
}, previewDelay),
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Execute a nested namespace function given the name as a string
|
|
78
|
+
*
|
|
79
|
+
* @memberof module:componentPreview
|
|
80
|
+
*
|
|
81
|
+
* @param {string} functionName
|
|
82
|
+
* @param {object} context
|
|
83
|
+
*/
|
|
84
|
+
'executeFunctionByName': function(functionName, context /*, args */) {
|
|
85
|
+
var args = Array.prototype.slice.call(arguments, 2);
|
|
86
|
+
var namespaces = functionName.split(".");
|
|
87
|
+
var func = namespaces.pop();
|
|
88
|
+
for(var i = 0; i < namespaces.length; i++) {
|
|
89
|
+
context = context[namespaces[i]];
|
|
90
|
+
}
|
|
91
|
+
context[func].apply(context, args);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
if (typeof(component) !== 'undefined') {
|
|
96
|
+
componentPreview.init();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
}());
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
|
|
3
|
+
window.addEventListener('DOMContentLoaded', function () {
|
|
4
|
+
try {
|
|
5
|
+
/**
|
|
6
|
+
* Module for rendering Service Finder Datastore components
|
|
7
|
+
*
|
|
8
|
+
* @module serviceFinder
|
|
9
|
+
*/
|
|
10
|
+
var serviceFinder = {
|
|
11
|
+
|
|
12
|
+
'datastore': {},
|
|
13
|
+
'userLocation': null,
|
|
14
|
+
'document': null,
|
|
15
|
+
'collection': null,
|
|
16
|
+
'webPath': null,
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Initialise the serviceFinder module
|
|
20
|
+
*
|
|
21
|
+
* @memberof module:serviceFinder
|
|
22
|
+
*/
|
|
23
|
+
'init': function() {
|
|
24
|
+
if (serviceFinder.userLocation === null) {
|
|
25
|
+
serviceFinder.getLocation();
|
|
26
|
+
|
|
27
|
+
} else {
|
|
28
|
+
serviceFinder.getCurrentDocument();
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get the location of the user, set in variable
|
|
34
|
+
* and re-init module
|
|
35
|
+
*
|
|
36
|
+
* @memberof module:serviceFinder
|
|
37
|
+
*/
|
|
38
|
+
'getLocation': function() {
|
|
39
|
+
|
|
40
|
+
// Get location for local storage
|
|
41
|
+
var userLocation = QLD.utils.getLocalStorage('qld_user_location');
|
|
42
|
+
if (userLocation !== null) {
|
|
43
|
+
serviceFinder.userLocation = JSON.parse(userLocation);
|
|
44
|
+
serviceFinder.getCurrentDocument();
|
|
45
|
+
|
|
46
|
+
// If there is no location in local storage
|
|
47
|
+
} else {
|
|
48
|
+
var location = {};
|
|
49
|
+
|
|
50
|
+
// If there is a site-wide HHS configured
|
|
51
|
+
var hhsDiv = document.getElementById('qld__hhs');
|
|
52
|
+
if (hhsDiv !== null) {
|
|
53
|
+
location.hhs_id = hhsDiv.getAttribute('data-hhs');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Set location and re-init
|
|
57
|
+
serviceFinder.userLocation = location;
|
|
58
|
+
serviceFinder.getCurrentDocument();
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Get the current Service Finder Document. This
|
|
64
|
+
* can be explicity set in the 'document' query
|
|
65
|
+
* param, or calculated from the 'path' param
|
|
66
|
+
*
|
|
67
|
+
* @memberof module:serviceFinder
|
|
68
|
+
*/
|
|
69
|
+
'getCurrentDocument': function() {
|
|
70
|
+
|
|
71
|
+
// Get params
|
|
72
|
+
var dsParams = document.getElementById('qld__ds-params');
|
|
73
|
+
var collection = dsParams ? dsParams.getAttribute('data-collection') : serviceFinder.getParameterByName('collection');
|
|
74
|
+
var webPath = dsParams ? dsParams.getAttribute('data-path') : serviceFinder.getParameterByName('path');
|
|
75
|
+
var documentParam = dsParams ? dsParams.getAttribute('data-document') : serviceFinder.getParameterByName('document');
|
|
76
|
+
|
|
77
|
+
var mdParams = typeof mdSchema !== 'undefined' ? mdSchema : {};
|
|
78
|
+
|
|
79
|
+
// Local testing.
|
|
80
|
+
// mdParams.collection = 'facilities';
|
|
81
|
+
// mdParams.document = '18a3124f-ae6b-41db-95f7-1f3616091f13';
|
|
82
|
+
|
|
83
|
+
if(typeof mdParams !== 'undefined' && mdParams) {
|
|
84
|
+
collection = mdParams.collection ? mdParams.collection : collection;
|
|
85
|
+
documentParam = mdParams.document ? mdParams.document : documentParam;
|
|
86
|
+
webPath = mdParams.webPath ? mdParams.webPath : webPath;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Set these in datastore
|
|
90
|
+
serviceFinder.datastore.collection = collection;
|
|
91
|
+
|
|
92
|
+
// Use document id from query param if it exists
|
|
93
|
+
if (documentParam !== null && documentParam.length > 0) {
|
|
94
|
+
serviceFinder.document = documentParam;
|
|
95
|
+
serviceFinder.getAllData();
|
|
96
|
+
|
|
97
|
+
// Else check for web path
|
|
98
|
+
} else if (webPath !== null && collection !== null && webPath.length > 0 && collection.length > 0) {
|
|
99
|
+
serviceFinderData.collection(collection).where('web_path', '===', webPath).get().then(function(response) {
|
|
100
|
+
serviceFinder.document = response[0].id;
|
|
101
|
+
}).catch(function(e) {
|
|
102
|
+
console.log(e);
|
|
103
|
+
}).then(function() {
|
|
104
|
+
serviceFinder.getAllData();
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Else there is no document
|
|
108
|
+
} else {
|
|
109
|
+
serviceFinder.getAllData();
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Loop through all dsComponents and get their data
|
|
115
|
+
*
|
|
116
|
+
* @memberof module:serviceFinder
|
|
117
|
+
*/
|
|
118
|
+
'getAllData': function() {
|
|
119
|
+
dsComponents.forEach(function(dsComponent) {
|
|
120
|
+
serviceFinder.getComponentData(dsComponent);
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Get all data for a specified component, based on
|
|
126
|
+
* the 'dsQueries' array defined in its manifest file
|
|
127
|
+
*
|
|
128
|
+
* @memberof module:serviceFinder
|
|
129
|
+
*/
|
|
130
|
+
'getComponentData': function(dsComponent) {
|
|
131
|
+
|
|
132
|
+
var index = 0;
|
|
133
|
+
var dsQueries = dsComponent.manifest.component.ds_queries;
|
|
134
|
+
|
|
135
|
+
// Proceed if there are dsQueries
|
|
136
|
+
if (typeof(dsQueries) !== 'undefined') {
|
|
137
|
+
var queryCount = dsQueries.length;
|
|
138
|
+
|
|
139
|
+
// Get the data for the first 'ds_query'
|
|
140
|
+
datastoreGet(index);
|
|
141
|
+
|
|
142
|
+
// Get the relevant data for the corresponding 'ds_query'
|
|
143
|
+
function datastoreGet(query_index) {
|
|
144
|
+
|
|
145
|
+
var dsQuery = dsQueries[query_index];
|
|
146
|
+
var datastore = serviceFinder.datastore;
|
|
147
|
+
|
|
148
|
+
// Only get the data if we haven't already got it
|
|
149
|
+
if (!datastore.hasOwnProperty(dsQuery.name)) {
|
|
150
|
+
|
|
151
|
+
var collection = replaceDynamicParams(dsQuery.collection);
|
|
152
|
+
var data = serviceFinderData.collection(collection);
|
|
153
|
+
|
|
154
|
+
// If we are looking for a specific document
|
|
155
|
+
if (dsQuery.hasOwnProperty('document')) {
|
|
156
|
+
var documentId = replaceDynamicParams(dsQuery.document);
|
|
157
|
+
data = data.doc(documentId);
|
|
158
|
+
|
|
159
|
+
// Else if we are filtering the collection
|
|
160
|
+
} else if (dsQuery.hasOwnProperty('filters')) {
|
|
161
|
+
dsQuery.filters.forEach(function(filter, filter_index) {
|
|
162
|
+
var val1 = replaceDynamicParams(filter.val1);
|
|
163
|
+
var val2 = replaceDynamicParams(filter.val2);
|
|
164
|
+
var operator = filter.operator;
|
|
165
|
+
|
|
166
|
+
if (filter_index === 0) {
|
|
167
|
+
data.where(val1, operator, val2);
|
|
168
|
+
} else {
|
|
169
|
+
data.and(val1, operator, val2);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Get the data and store it
|
|
175
|
+
data.get().then(function(response) {
|
|
176
|
+
datastore[dsQuery.name] = response;
|
|
177
|
+
|
|
178
|
+
// If something goes wrong, store null
|
|
179
|
+
}).catch(function(e) {
|
|
180
|
+
datastore[dsQuery.name] = null;
|
|
181
|
+
|
|
182
|
+
// Then, move to next 'ds_query', or render component
|
|
183
|
+
}).then(function() {
|
|
184
|
+
index++;
|
|
185
|
+
if (index < queryCount) {
|
|
186
|
+
datastoreGet(index);
|
|
187
|
+
} else {
|
|
188
|
+
serviceFinder.renderComponent(dsComponent);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
// If we already have this data, move on
|
|
193
|
+
} else {
|
|
194
|
+
index++;
|
|
195
|
+
if (index < queryCount) {
|
|
196
|
+
datastoreGet(index);
|
|
197
|
+
} else {
|
|
198
|
+
serviceFinder.renderComponent(dsComponent);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
} else {
|
|
203
|
+
serviceFinder.renderComponent(dsComponent);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function replaceDynamicParams(string) {
|
|
207
|
+
|
|
208
|
+
// Replace hhs param
|
|
209
|
+
var hhsId = serviceFinder.userLocation ? serviceFinder.userLocation.hhs_id : document.getElementById('qld__hhs').getAttribute('data-hhs');
|
|
210
|
+
string = string.replace('<hhs>', hhsId);
|
|
211
|
+
|
|
212
|
+
// Replace collection param
|
|
213
|
+
string = string.replace('<collection>', serviceFinder.datastore.collection);
|
|
214
|
+
|
|
215
|
+
// Replace document param
|
|
216
|
+
string = string.replace('<document>', serviceFinder.document);
|
|
217
|
+
|
|
218
|
+
// Return the string
|
|
219
|
+
return string;
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Render the Handlebars template
|
|
225
|
+
*
|
|
226
|
+
* @memberof module:serviceFinder
|
|
227
|
+
*/
|
|
228
|
+
'renderComponent': function(dsComponent) {
|
|
229
|
+
|
|
230
|
+
//Remove Base64 Headers
|
|
231
|
+
if (typeof(dsComponent.component) !== 'undefined' && dsComponent.component.length > 0) {
|
|
232
|
+
var componentClean = window.atob(dsComponent.component.replace('export default "data:text/x-handlebars-template;charset=utf-8;base64,','').replace('"',''));
|
|
233
|
+
componentClean = componentClean.replace(/\.\/\?a=/g,'');
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
var datastore = serviceFinder.datastore;
|
|
237
|
+
|
|
238
|
+
// Template data
|
|
239
|
+
var data = {
|
|
240
|
+
"component": dsComponent.manifest.component,
|
|
241
|
+
"datastore": datastore,
|
|
242
|
+
"userLocation": serviceFinder.userLocation,
|
|
243
|
+
"current": current,
|
|
244
|
+
"site": site,
|
|
245
|
+
"userData": userData,
|
|
246
|
+
"content":"Lorem Ipsum"
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
if(dsComponent.templateData) {
|
|
250
|
+
data.component.data = dsComponent.templateData;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
if(typeof(search) !== 'undefined') {
|
|
254
|
+
data.resultPacket = search.resultPacket;
|
|
255
|
+
data.resultsSummary = search.resultsSummary;
|
|
256
|
+
data.facets = search.facets;
|
|
257
|
+
data.facetExtras = search.facetExtras;
|
|
258
|
+
data.placeQuery = search.placeQuery;
|
|
259
|
+
data.pagination = search.pagination;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Add collection and schema for sf admin
|
|
263
|
+
var collection = datastore.collection ? datastore.collection.replace(/_/g, '-') : null;
|
|
264
|
+
var serviceId = serviceFinder.getParameterByName('service_id');
|
|
265
|
+
if (dsComponent.type === 'admin') {
|
|
266
|
+
data.collection = collection;
|
|
267
|
+
data.schema = dsComponent.schema ? dsComponent.schema : dsComponent.schemas[collection];
|
|
268
|
+
data.parentService = serviceId;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Front End URLs
|
|
272
|
+
if (typeof(sfLinks) !== 'undefined') {
|
|
273
|
+
data.links = sfLinks;
|
|
274
|
+
} else {
|
|
275
|
+
data.links = {
|
|
276
|
+
"home": "/sf_service_finder.html",
|
|
277
|
+
"serviceDetails": "/sf_service_page.html",
|
|
278
|
+
"serviceLocation": "/sf_service_location_page.html",
|
|
279
|
+
"facilityLocation": "/sf_facility_page.html",
|
|
280
|
+
"servicesAtoZ": "/sf_services_a-z.html",
|
|
281
|
+
"servicesSearch": "/sf_service_search.html"
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Admin URLs
|
|
286
|
+
if (typeof(sfAdminLinks) !== 'undefined') {
|
|
287
|
+
data.adminLinks = sfAdminLinks;
|
|
288
|
+
} else {
|
|
289
|
+
data.adminLinks = {
|
|
290
|
+
"list": "/sf_admin_list.html",
|
|
291
|
+
"form": "/sf_admin_form.html",
|
|
292
|
+
"view": "/sf_admin_details.html",
|
|
293
|
+
"topService": "/sf_admin_top_services_form.html",
|
|
294
|
+
"tinymceStyles": "/externals/tinymce_classes.css"
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// LOCAL - Compile the template and get output
|
|
299
|
+
var output = null;
|
|
300
|
+
if (typeof(componentClean) !== 'undefined') {
|
|
301
|
+
var compiled = Handlebars.compile(componentClean);
|
|
302
|
+
output = compiled(data).replace(/\.\/\?a=/g, '');
|
|
303
|
+
|
|
304
|
+
// PROD - Else use precompiled template
|
|
305
|
+
} else if (typeof(dsComponent.template) !== 'undefined') {
|
|
306
|
+
output = dsComponent.template(data);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Replace div with Handlebars output
|
|
310
|
+
document.getElementById("ds_component_" + dsComponent.id).outerHTML = output;
|
|
311
|
+
|
|
312
|
+
// Run callback(s)
|
|
313
|
+
if ($('.qld__service-finder-admin__list').length > 0) {
|
|
314
|
+
QLD.adminList.init();
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if ($('.qld__service_finder_admin_form form').length > 0) {
|
|
318
|
+
QLD.adminForm.init();
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if ($('.sf-admin__top-services-form form').length > 0) {
|
|
322
|
+
QLD.topServicesForm.init();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if ($(".qld__update-location-input").length > 0) {
|
|
326
|
+
QLD.userLocationFinder.init();
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if ($('.qld__open-modal').length > 0) {
|
|
330
|
+
QLD.Modal.init();
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if($('.qld__service-finder').length > 0) {
|
|
334
|
+
QLD.servicesSearchForm.init();
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if ($('.qld__service_search__facets').length > 0) {
|
|
338
|
+
QLD.servicesSearchFacets.init();
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
if($('.js-map-embed-facility').length > 0) {
|
|
342
|
+
QLD.facilityMap.init();
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if($('.qld__content-tabs').length > 0) {
|
|
346
|
+
QLD.tabs.init();
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
if($('.qld__service_search__facets .js-qld__accordion').length > 0) {
|
|
350
|
+
QLD.accordion.init();
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (location.hash) {
|
|
354
|
+
var requested_hash = location.hash.slice(1);
|
|
355
|
+
location.hash = '';
|
|
356
|
+
location.hash = requested_hash;
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Get the value of a param by name, given a URL string
|
|
362
|
+
*
|
|
363
|
+
* @memberof module:serviceFinder
|
|
364
|
+
*
|
|
365
|
+
* @param {string} name
|
|
366
|
+
* @param {string} url
|
|
367
|
+
*
|
|
368
|
+
* @returns {string}
|
|
369
|
+
*/
|
|
370
|
+
'getParameterByName': function(name, url) {
|
|
371
|
+
url = url ? url : window.location.href;
|
|
372
|
+
name = name.replace(/[\[\]]/g, '\\$&');
|
|
373
|
+
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
|
|
374
|
+
results = regex.exec(url);
|
|
375
|
+
if (!results) return null;
|
|
376
|
+
if (!results[2]) return '';
|
|
377
|
+
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
378
|
+
},
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Execute a nested namespace function given the name as a string
|
|
382
|
+
*
|
|
383
|
+
* @memberof module:serviceFinder
|
|
384
|
+
*
|
|
385
|
+
* @param {string} functionName
|
|
386
|
+
* @param {object} context
|
|
387
|
+
*/
|
|
388
|
+
'executeFunctionByName': function(functionName, context /*, args */) {
|
|
389
|
+
var args = Array.prototype.slice.call(arguments, 2);
|
|
390
|
+
var namespaces = functionName.split(".");
|
|
391
|
+
var func = namespaces.pop();
|
|
392
|
+
for(var i = 0; i < namespaces.length; i++) {
|
|
393
|
+
context = context[namespaces[i]];
|
|
394
|
+
}
|
|
395
|
+
context[func].apply(context, args);
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
} catch(e) {
|
|
399
|
+
console.log(e);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
window.serviceFinder = serviceFinder;
|
|
403
|
+
|
|
404
|
+
if (typeof(dsComponents) !== 'undefined') {
|
|
405
|
+
serviceFinder.init();
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
}());
|