1/** 2 * webtrees: online genealogy 3 * Copyright (C) 2022 webtrees development team 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * You should have received a copy of the GNU General Public License 13 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 */ 15 16import $ from 'jquery'; 17 18import '@popperjs/core'; 19import 'bootstrap'; 20import 'datatables.net'; 21 22// Just import the subset of icons that we use in resources/views/icons/ 23import { dom, library } from '@fortawesome/fontawesome-svg-core'; 24import { 25 // For resources/views/icons/* 26 faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard, 27 faMinusSquare, faPlusSquare, faStar, faStickyNote, faTrashAlt, faUser 28} from '@fortawesome/free-regular-svg-icons'; 29import { 30 // For resources/views/icons/* 31 faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars, 32 faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless, 33 faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList, 34 faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt, 35 faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt, 36 faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faTags, faThList, faThumbtack, 37 faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench, 38 // For the BeautifyMarker library 39 faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater 40} from '@fortawesome/free-solid-svg-icons'; 41import 'corejs-typeahead'; 42 43import 'datatables.net-bs5'; 44 45import Sortable from 'sortablejs'; 46 47import TomSelect from 'tom-select/dist/js/tom-select.base.js'; 48TomSelect.define('caret_position', require('tom-select/dist/js/plugins/caret_position.js')); 49TomSelect.define('clear_button', require('tom-select/dist/js/plugins/clear_button.js')); 50TomSelect.define('dropdown_input', require('tom-select/dist/js/plugins/dropdown_input.js')); 51TomSelect.define('remove_button', require('tom-select/dist/js/plugins/remove_button.js')); 52TomSelect.define('virtual_scroll', require('tom-select/dist/js/plugins/virtual_scroll.js')); 53 54window.TomSelect = TomSelect; 55 56import 'hideshowpassword'; 57 58import 'moment'; 59 60import 'jquery-colorbox'; 61import 'pinch-zoom-element'; 62 63import 'leaflet'; 64import 'leaflet.markercluster'; 65import 'beautifymarker'; 66import 'leaflet-control-geocoder'; 67import 'leaflet.control.layers.tree'; 68import 'leaflet-bing-layer'; 69 70window.$ = window.jQuery = $; 71 72library.add( 73 // For resources/views/icons/* 74 faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard, 75 faMap, faMinusSquare, faPlusSquare, faStar, faStickyNote, faTags, faTrashAlt, faUser 76); 77library.add( 78 // For resources/views/icons/* 79 faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars, 80 faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless, 81 faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList, 82 faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt, 83 faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt, 84 faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faThList, faThumbtack, 85 faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench, 86 // For the BeautifyMarker library 87 faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater 88); 89dom.watch(); 90 91window.Bloodhound = require('corejs-typeahead/dist/bloodhound.min.js'); 92 93// See https://github.com/RubaXa/Sortable/issues/1229 94// window.Sortable = require('sortablejs'); 95window.Sortable = Sortable; 96