xref: /webtrees/resources/js/vendor.js (revision e1530f04d01c7f32fea6f1b6c90dbc657e1715f4)
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
47c8d78f19SGreg Roachimport TomSelect from 'tom-select/dist/js/tom-select.base.js';
48*e1530f04SGreg RoachTomSelect.define('clear_button', require('tom-select/dist/js/plugins/clear_button.js'));
49c8d78f19SGreg RoachTomSelect.define('dropdown_input', require('tom-select/dist/js/plugins/dropdown_input.js'));
50c8d78f19SGreg RoachTomSelect.define('remove_button', require('tom-select/dist/js/plugins/remove_button.js'));
51c8d78f19SGreg RoachTomSelect.define('virtual_scroll', require('tom-select/dist/js/plugins/virtual_scroll.js'));
52efd89170SGreg Roach
53c8d78f19SGreg Roachwindow.TomSelect = TomSelect;
54efd89170SGreg Roach
55efd89170SGreg Roachimport 'hideshowpassword';
56efd89170SGreg Roach
57efd89170SGreg Roachimport 'moment';
58efd89170SGreg Roach
59efd89170SGreg Roachimport 'jquery-colorbox';
603cf811e8SGreg Roachimport 'pinch-zoom-element';
61efd89170SGreg Roach
62efd89170SGreg Roachimport 'leaflet';
63efd89170SGreg Roachimport 'leaflet.markercluster';
64efd89170SGreg Roachimport 'beautifymarker';
65caa53803SDavid Druryimport 'leaflet-control-geocoder';
66c9c6f2ecSGreg Roachimport 'leaflet.control.layers.tree';
67c9c6f2ecSGreg Roachimport 'leaflet-bing-layer';
68efd89170SGreg Roach
69efd89170SGreg Roachwindow.$ = window.jQuery = $;
70efd89170SGreg Roach
7108362db4SGreg Roachlibrary.add(
7280993423SGreg Roach  // For resources/views/icons/*
7308362db4SGreg Roach  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
747d70e4a7SGreg Roach  faMap, faMinusSquare, faPlusSquare, faStar, faStickyNote, faTags, faTrashAlt, faUser
7508362db4SGreg Roach);
7608362db4SGreg Roachlibrary.add(
7780993423SGreg Roach  // For resources/views/icons/*
7808362db4SGreg Roach  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars,
79f221c7f7SGreg Roach  faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless,
8008362db4SGreg Roach  faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList,
81bae49aecSGreg Roach  faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt,
82c9c6f2ecSGreg Roach  faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt,
8308362db4SGreg Roach  faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faThList, faThumbtack,
8480993423SGreg Roach  faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench,
8580993423SGreg Roach  // For the BeautifyMarker library
86efd89170SGreg Roach  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
8708362db4SGreg Roach);
8808362db4SGreg Roachdom.watch();
8908362db4SGreg Roach
90efd89170SGreg Roachwindow.Bloodhound = require('corejs-typeahead/dist/bloodhound.min.js');
9171239cb6SGreg Roach
9271239cb6SGreg Roach// See https://github.com/RubaXa/Sortable/issues/1229
9375b444f7SGreg Roach// window.Sortable = require('sortablejs');
9475b444f7SGreg Roachwindow.Sortable = Sortable;
95