xref: /webtrees/resources/js/vendor.js (revision 45ed5d1da4c96dfa127d64310f69874a59da5921)
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';
19*45ed5d1dSGreg Roachimport { Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip } from 'bootstrap';
20*45ed5d1dSGreg Roachwindow.bootstrap = {
21*45ed5d1dSGreg Roach  Alert: Alert,
22*45ed5d1dSGreg Roach  Button: Button,
23*45ed5d1dSGreg Roach  Carousel: Carousel,
24*45ed5d1dSGreg Roach  Collapse: Collapse,
25*45ed5d1dSGreg Roach  Dropdown: Dropdown,
26*45ed5d1dSGreg Roach  Modal: Modal,
27*45ed5d1dSGreg Roach  Offcanvas: Offcanvas,
28*45ed5d1dSGreg Roach  Popover: Popover,
29*45ed5d1dSGreg Roach  ScrollSpy: ScrollSpy,
30*45ed5d1dSGreg Roach  Tab: Tab,
31*45ed5d1dSGreg Roach  Toast: Toast,
32*45ed5d1dSGreg Roach  Tooltip: Tooltip,
33*45ed5d1dSGreg Roach};
34*45ed5d1dSGreg Roach
35efd89170SGreg Roachimport 'datatables.net';
3671239cb6SGreg Roach
3708362db4SGreg Roach// Just import the subset of icons that we use in resources/views/icons/
38efd89170SGreg Roachimport { dom, library } from '@fortawesome/fontawesome-svg-core';
3908362db4SGreg Roachimport {
4080993423SGreg Roach  // For resources/views/icons/*
4108362db4SGreg Roach  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
42efd89170SGreg Roach  faMinusSquare, faPlusSquare, faStar, faStickyNote, faTrashAlt, faUser
43efd89170SGreg Roach} from '@fortawesome/free-regular-svg-icons';
44efd89170SGreg Roachimport {
45efd89170SGreg Roach  // For resources/views/icons/*
46efd89170SGreg Roach  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars,
47f221c7f7SGreg Roach  faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless,
48efd89170SGreg Roach  faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList,
49efd89170SGreg Roach  faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt,
50c9c6f2ecSGreg Roach  faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt,
517d70e4a7SGreg Roach  faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faTags, faThList, faThumbtack,
52efd89170SGreg Roach  faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench,
53efd89170SGreg Roach  // For the BeautifyMarker library
54efd89170SGreg Roach  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
55efd89170SGreg Roach} from '@fortawesome/free-solid-svg-icons';
56efd89170SGreg Roachimport 'corejs-typeahead';
57efd89170SGreg Roach
5846ee5208SJonathan Jaubartimport 'datatables.net-bs5';
59efd89170SGreg Roach
60efd89170SGreg Roachimport Sortable from 'sortablejs';
61efd89170SGreg Roach
62c8d78f19SGreg Roachimport TomSelect from 'tom-select/dist/js/tom-select.base.js';
635cf3b11fSGreg RoachTomSelect.define('caret_position', require('tom-select/dist/js/plugins/caret_position.js'));
64e1530f04SGreg RoachTomSelect.define('clear_button', require('tom-select/dist/js/plugins/clear_button.js'));
65c8d78f19SGreg RoachTomSelect.define('dropdown_input', require('tom-select/dist/js/plugins/dropdown_input.js'));
66c8d78f19SGreg RoachTomSelect.define('remove_button', require('tom-select/dist/js/plugins/remove_button.js'));
67c8d78f19SGreg RoachTomSelect.define('virtual_scroll', require('tom-select/dist/js/plugins/virtual_scroll.js'));
68efd89170SGreg Roach
69c8d78f19SGreg Roachwindow.TomSelect = TomSelect;
70efd89170SGreg Roach
71efd89170SGreg Roachimport 'hideshowpassword';
72efd89170SGreg Roach
73efd89170SGreg Roachimport 'moment';
74efd89170SGreg Roach
75efd89170SGreg Roachimport 'jquery-colorbox';
763cf811e8SGreg Roachimport 'pinch-zoom-element';
77efd89170SGreg Roach
78efd89170SGreg Roachimport 'leaflet';
79efd89170SGreg Roachimport 'leaflet.markercluster';
80efd89170SGreg Roachimport 'beautifymarker';
81caa53803SDavid Druryimport 'leaflet-control-geocoder';
82c9c6f2ecSGreg Roachimport 'leaflet.control.layers.tree';
83c9c6f2ecSGreg Roachimport 'leaflet-bing-layer';
84efd89170SGreg Roach
85efd89170SGreg Roachwindow.$ = window.jQuery = $;
86efd89170SGreg Roach
8708362db4SGreg Roachlibrary.add(
8880993423SGreg Roach  // For resources/views/icons/*
8908362db4SGreg Roach  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
907d70e4a7SGreg Roach  faMap, faMinusSquare, faPlusSquare, faStar, faStickyNote, faTags, faTrashAlt, faUser
9108362db4SGreg Roach);
9208362db4SGreg Roachlibrary.add(
9380993423SGreg Roach  // For resources/views/icons/*
9408362db4SGreg Roach  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars,
95f221c7f7SGreg Roach  faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless,
9608362db4SGreg Roach  faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList,
97bae49aecSGreg Roach  faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt,
98c9c6f2ecSGreg Roach  faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt,
9908362db4SGreg Roach  faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faThList, faThumbtack,
10080993423SGreg Roach  faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench,
10180993423SGreg Roach  // For the BeautifyMarker library
102efd89170SGreg Roach  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
10308362db4SGreg Roach);
10408362db4SGreg Roachdom.watch();
10508362db4SGreg Roach
106efd89170SGreg Roachwindow.Bloodhound = require('corejs-typeahead/dist/bloodhound.min.js');
10771239cb6SGreg Roach
10871239cb6SGreg Roach// See https://github.com/RubaXa/Sortable/issues/1229
10975b444f7SGreg Roach// window.Sortable = require('sortablejs');
11075b444f7SGreg Roachwindow.Sortable = Sortable;
111