xref: /webtrees/resources/js/vendor.js (revision 55ea0389265044fcb3160ddbc1c79c969b53d093)
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';
1945ed5d1dSGreg Roachimport { Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip } from 'bootstrap';
2045ed5d1dSGreg Roachwindow.bootstrap = {
2145ed5d1dSGreg Roach  Alert: Alert,
2245ed5d1dSGreg Roach  Button: Button,
2345ed5d1dSGreg Roach  Carousel: Carousel,
2445ed5d1dSGreg Roach  Collapse: Collapse,
2545ed5d1dSGreg Roach  Dropdown: Dropdown,
2645ed5d1dSGreg Roach  Modal: Modal,
2745ed5d1dSGreg Roach  Offcanvas: Offcanvas,
2845ed5d1dSGreg Roach  Popover: Popover,
2945ed5d1dSGreg Roach  ScrollSpy: ScrollSpy,
3045ed5d1dSGreg Roach  Tab: Tab,
3145ed5d1dSGreg Roach  Toast: Toast,
3245ed5d1dSGreg Roach  Tooltip: Tooltip,
3345ed5d1dSGreg Roach};
3445ed5d1dSGreg 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/*
46*55ea0389SGreg Roach  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars, faCalendar,
47*55ea0389SGreg Roach  faCaretDown, faCaretUp, faCheck, faCodeBranch, faCompress, faDownload, faExclamationTriangle,
48*55ea0389SGreg Roach  faExpand, faGenderless, faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage,
49*55ea0389SGreg Roach  faLink, faList, faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause,
50*55ea0389SGreg Roach  faPencilAlt, faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation,
51*55ea0389SGreg Roach  faSearchMinus, faSearchPlus, faShareAlt, faSitemap, faSortAmountDown, faStepForward, faStop,
52*55ea0389SGreg Roach  faSyncAlt, faTags, faThList, faThumbtack, faTimes, faTransgender, faTree, faUndo, faUniversity,
53*55ea0389SGreg Roach  faUnlink, faUpload, faUsers, faVenus, faWrench,
54efd89170SGreg Roach  // For the BeautifyMarker library
55efd89170SGreg Roach  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
56efd89170SGreg Roach} from '@fortawesome/free-solid-svg-icons';
57efd89170SGreg Roachimport 'corejs-typeahead';
58efd89170SGreg Roach
5946ee5208SJonathan Jaubartimport 'datatables.net-bs5';
60efd89170SGreg Roach
61efd89170SGreg Roachimport Sortable from 'sortablejs';
62efd89170SGreg Roach
63c8d78f19SGreg Roachimport TomSelect from 'tom-select/dist/js/tom-select.base.js';
645cf3b11fSGreg RoachTomSelect.define('caret_position', require('tom-select/dist/js/plugins/caret_position.js'));
65e1530f04SGreg RoachTomSelect.define('clear_button', require('tom-select/dist/js/plugins/clear_button.js'));
66c8d78f19SGreg RoachTomSelect.define('dropdown_input', require('tom-select/dist/js/plugins/dropdown_input.js'));
67c8d78f19SGreg RoachTomSelect.define('remove_button', require('tom-select/dist/js/plugins/remove_button.js'));
68c8d78f19SGreg RoachTomSelect.define('virtual_scroll', require('tom-select/dist/js/plugins/virtual_scroll.js'));
69efd89170SGreg Roach
70c8d78f19SGreg Roachwindow.TomSelect = TomSelect;
71efd89170SGreg Roach
72efd89170SGreg Roachimport 'hideshowpassword';
73efd89170SGreg Roach
74efd89170SGreg Roachimport 'moment';
75efd89170SGreg Roach
76efd89170SGreg Roachimport 'jquery-colorbox';
773cf811e8SGreg Roachimport 'pinch-zoom-element';
78efd89170SGreg Roach
79efd89170SGreg Roachimport 'leaflet';
80efd89170SGreg Roachimport 'leaflet.markercluster';
81efd89170SGreg Roachimport 'beautifymarker';
82caa53803SDavid Druryimport 'leaflet-control-geocoder';
83c9c6f2ecSGreg Roachimport 'leaflet.control.layers.tree';
84c9c6f2ecSGreg Roachimport 'leaflet-bing-layer';
85efd89170SGreg Roach
86efd89170SGreg Roachwindow.$ = window.jQuery = $;
87efd89170SGreg Roach
8808362db4SGreg Roachlibrary.add(
8980993423SGreg Roach  // For resources/views/icons/*
9008362db4SGreg Roach  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
917d70e4a7SGreg Roach  faMap, faMinusSquare, faPlusSquare, faStar, faStickyNote, faTags, faTrashAlt, faUser
9208362db4SGreg Roach);
9308362db4SGreg Roachlibrary.add(
9480993423SGreg Roach  // For resources/views/icons/*
95*55ea0389SGreg Roach  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars, faCalendar,
96*55ea0389SGreg Roach  faCaretDown, faCaretUp, faCheck, faCodeBranch, faCompress, faDownload, faExclamationTriangle,
97*55ea0389SGreg Roach  faExpand, faGenderless, faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage,
98*55ea0389SGreg Roach  faLink, faList, faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause,
99*55ea0389SGreg Roach  faPencilAlt, faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation,
100*55ea0389SGreg Roach  faSearchMinus, faSearchPlus, faShareAlt, faSitemap, faSortAmountDown, faStepForward, faStop,
101*55ea0389SGreg Roach  faSyncAlt, faTags, faThList, faThumbtack, faTimes, faTransgender, faTree, faUndo, faUniversity,
102*55ea0389SGreg Roach  faUnlink, faUpload, faUsers, faVenus, faWrench,
10380993423SGreg Roach  // For the BeautifyMarker library
104efd89170SGreg Roach  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
10508362db4SGreg Roach);
10608362db4SGreg Roachdom.watch();
10708362db4SGreg Roach
108efd89170SGreg Roachwindow.Bloodhound = require('corejs-typeahead/dist/bloodhound.min.js');
10971239cb6SGreg Roach
11071239cb6SGreg Roach// See https://github.com/RubaXa/Sortable/issues/1229
11175b444f7SGreg Roach// window.Sortable = require('sortablejs');
11275b444f7SGreg Roachwindow.Sortable = Sortable;
113