xref: /webtrees/resources/js/vendor.js (revision 5cf3b11faf191d83ec5e7576aa8e8fe3fd2ba15d)
171239cb6SGreg Roach/**
271239cb6SGreg Roach * webtrees: online genealogy
35bfc6897SGreg Roach * Copyright (C) 2022 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*5cf3b11fSGreg RoachTomSelect.define('caret_position', require('tom-select/dist/js/plugins/caret_position.js'));
49e1530f04SGreg RoachTomSelect.define('clear_button', require('tom-select/dist/js/plugins/clear_button.js'));
50c8d78f19SGreg RoachTomSelect.define('dropdown_input', require('tom-select/dist/js/plugins/dropdown_input.js'));
51c8d78f19SGreg RoachTomSelect.define('remove_button', require('tom-select/dist/js/plugins/remove_button.js'));
52c8d78f19SGreg RoachTomSelect.define('virtual_scroll', require('tom-select/dist/js/plugins/virtual_scroll.js'));
53efd89170SGreg Roach
54c8d78f19SGreg Roachwindow.TomSelect = TomSelect;
55efd89170SGreg Roach
56efd89170SGreg Roachimport 'hideshowpassword';
57efd89170SGreg Roach
58efd89170SGreg Roachimport 'moment';
59efd89170SGreg Roach
60efd89170SGreg Roachimport 'jquery-colorbox';
613cf811e8SGreg Roachimport 'pinch-zoom-element';
62efd89170SGreg Roach
63efd89170SGreg Roachimport 'leaflet';
64efd89170SGreg Roachimport 'leaflet.markercluster';
65efd89170SGreg Roachimport 'beautifymarker';
66caa53803SDavid Druryimport 'leaflet-control-geocoder';
67c9c6f2ecSGreg Roachimport 'leaflet.control.layers.tree';
68c9c6f2ecSGreg Roachimport 'leaflet-bing-layer';
69efd89170SGreg Roach
70efd89170SGreg Roachwindow.$ = window.jQuery = $;
71efd89170SGreg Roach
7208362db4SGreg Roachlibrary.add(
7380993423SGreg Roach  // For resources/views/icons/*
7408362db4SGreg Roach  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
757d70e4a7SGreg Roach  faMap, faMinusSquare, faPlusSquare, faStar, faStickyNote, faTags, faTrashAlt, faUser
7608362db4SGreg Roach);
7708362db4SGreg Roachlibrary.add(
7880993423SGreg Roach  // For resources/views/icons/*
7908362db4SGreg Roach  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars,
80f221c7f7SGreg Roach  faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless,
8108362db4SGreg Roach  faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList,
82bae49aecSGreg Roach  faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt,
83c9c6f2ecSGreg Roach  faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt,
8408362db4SGreg Roach  faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faThList, faThumbtack,
8580993423SGreg Roach  faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench,
8680993423SGreg Roach  // For the BeautifyMarker library
87efd89170SGreg Roach  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
8808362db4SGreg Roach);
8908362db4SGreg Roachdom.watch();
9008362db4SGreg Roach
91efd89170SGreg Roachwindow.Bloodhound = require('corejs-typeahead/dist/bloodhound.min.js');
9271239cb6SGreg Roach
9371239cb6SGreg Roach// See https://github.com/RubaXa/Sortable/issues/1229
9475b444f7SGreg Roach// window.Sortable = require('sortablejs');
9575b444f7SGreg Roachwindow.Sortable = Sortable;
96