xref: /webtrees/resources/js/vendor.js (revision c8d78f19d0bdf4c0ec4728253bd37250d2e6cec4)
171239cb6SGreg Roach/**
271239cb6SGreg Roach * webtrees: online genealogy
3cd1ec0d0SGreg Roach * Copyright (C) 2021 webtrees development team
471239cb6SGreg Roach * This program is free software: you can redistribute it and/or modify
571239cb6SGreg Roach * it under the terms of the GNU General Public License as published by
671239cb6SGreg Roach * the Free Software Foundation, either version 3 of the License, or
771239cb6SGreg Roach * (at your option) any later version.
871239cb6SGreg Roach * This program is distributed in the hope that it will be useful,
971239cb6SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
1071239cb6SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1171239cb6SGreg Roach * GNU General Public License for more details.
1271239cb6SGreg Roach * You should have received a copy of the GNU General Public License
1371239cb6SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
1471239cb6SGreg Roach */
1571239cb6SGreg Roach
16efd89170SGreg Roachimport $ from 'jquery';
1771239cb6SGreg Roach
18315eb316SGreg Roachimport '@popperjs/core';
19efd89170SGreg Roachimport 'bootstrap';
20efd89170SGreg Roachimport 'datatables.net';
2171239cb6SGreg Roach
2208362db4SGreg Roach// Just import the subset of icons that we use in resources/views/icons/
23efd89170SGreg Roachimport { dom, library } from '@fortawesome/fontawesome-svg-core';
2408362db4SGreg Roachimport {
2580993423SGreg Roach  // For resources/views/icons/*
2608362db4SGreg Roach  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
27efd89170SGreg Roach  faMinusSquare, faPlusSquare, faStar, faStickyNote, faTrashAlt, faUser
28efd89170SGreg Roach} from '@fortawesome/free-regular-svg-icons';
29efd89170SGreg Roachimport {
30efd89170SGreg Roach  // For resources/views/icons/*
31efd89170SGreg Roach  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars,
32f221c7f7SGreg Roach  faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless,
33efd89170SGreg Roach  faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList,
34efd89170SGreg Roach  faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt,
35c9c6f2ecSGreg Roach  faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt,
367d70e4a7SGreg Roach  faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faTags, faThList, faThumbtack,
37efd89170SGreg Roach  faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench,
38efd89170SGreg Roach  // For the BeautifyMarker library
39efd89170SGreg Roach  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
40efd89170SGreg Roach} from '@fortawesome/free-solid-svg-icons';
41efd89170SGreg Roachimport 'corejs-typeahead';
42efd89170SGreg Roach
4346ee5208SJonathan Jaubartimport 'datatables.net-bs5';
44efd89170SGreg Roach
45efd89170SGreg Roachimport Sortable from 'sortablejs';
46efd89170SGreg Roach
47*c8d78f19SGreg Roachimport TomSelect from 'tom-select/dist/js/tom-select.base.js';
48*c8d78f19SGreg RoachTomSelect.define('dropdown_input', require('tom-select/dist/js/plugins/dropdown_input.js'));
49*c8d78f19SGreg RoachTomSelect.define('remove_button', require('tom-select/dist/js/plugins/remove_button.js'));
50*c8d78f19SGreg RoachTomSelect.define('virtual_scroll', require('tom-select/dist/js/plugins/virtual_scroll.js'));
51efd89170SGreg Roach
52*c8d78f19SGreg Roachwindow.TomSelect = TomSelect;
53efd89170SGreg Roach
54efd89170SGreg Roachimport 'hideshowpassword';
55efd89170SGreg Roach
56efd89170SGreg Roachimport 'moment';
57efd89170SGreg Roach
58efd89170SGreg Roachimport 'jquery-colorbox';
593cf811e8SGreg Roachimport 'pinch-zoom-element';
60efd89170SGreg Roach
61efd89170SGreg Roachimport 'leaflet';
62efd89170SGreg Roachimport 'leaflet.markercluster';
63efd89170SGreg Roachimport 'beautifymarker';
64caa53803SDavid Druryimport 'leaflet-control-geocoder';
65c9c6f2ecSGreg Roachimport 'leaflet.control.layers.tree';
66c9c6f2ecSGreg Roachimport 'leaflet-bing-layer';
67efd89170SGreg Roach
68efd89170SGreg Roachwindow.$ = window.jQuery = $;
69efd89170SGreg Roach
7008362db4SGreg Roachlibrary.add(
7180993423SGreg Roach  // For resources/views/icons/*
7208362db4SGreg Roach  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
737d70e4a7SGreg Roach  faMap, faMinusSquare, faPlusSquare, faStar, faStickyNote, faTags, faTrashAlt, faUser
7408362db4SGreg Roach);
7508362db4SGreg Roachlibrary.add(
7680993423SGreg Roach  // For resources/views/icons/*
7708362db4SGreg Roach  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars,
78f221c7f7SGreg Roach  faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless,
7908362db4SGreg Roach  faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList,
80bae49aecSGreg Roach  faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt,
81c9c6f2ecSGreg Roach  faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt,
8208362db4SGreg Roach  faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faThList, faThumbtack,
8380993423SGreg Roach  faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench,
8480993423SGreg Roach  // For the BeautifyMarker library
85efd89170SGreg Roach  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
8608362db4SGreg Roach);
8708362db4SGreg Roachdom.watch();
8808362db4SGreg Roach
89efd89170SGreg Roachwindow.Bloodhound = require('corejs-typeahead/dist/bloodhound.min.js');
9071239cb6SGreg Roach
9171239cb6SGreg Roach// See https://github.com/RubaXa/Sortable/issues/1229
9275b444f7SGreg Roach// window.Sortable = require('sortablejs');
9375b444f7SGreg Roachwindow.Sortable = Sortable;
94