xref: /webtrees/resources/js/vendor.js (revision 2342bacd006740235a2ce44445bc7c1b16f38a39)
171239cb6SGreg Roach/**
271239cb6SGreg Roach * webtrees: online genealogy
3d11be702SGreg Roach * Copyright (C) 2023 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
3508362db4SGreg Roach// Just import the subset of icons that we use in resources/views/icons/
36efd89170SGreg Roachimport { dom, library } from '@fortawesome/fontawesome-svg-core';
3708362db4SGreg Roachimport {
3880993423SGreg Roach  // For resources/views/icons/*
3908362db4SGreg Roach  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
40efd89170SGreg Roach  faMinusSquare, faPlusSquare, faStar, faStickyNote, faTrashAlt, faUser
41efd89170SGreg Roach} from '@fortawesome/free-regular-svg-icons';
42efd89170SGreg Roachimport {
43efd89170SGreg Roach  // For resources/views/icons/*
4455ea0389SGreg Roach  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars, faCalendar,
4528281361SGreg Roach  faCaretDown, faCaretUp, faCheck, faCodeBranch, faCompress, faDatabase, faDownload, faExclamationTriangle,
4655ea0389SGreg Roach  faExpand, faGenderless, faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage,
4755ea0389SGreg Roach  faLink, faList, faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause,
4855ea0389SGreg Roach  faPencilAlt, faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation,
4928281361SGreg Roach  faSearchMinus, faSearchPlus, faServer, faShareAlt, faSitemap, faSortAmountDown, faStepForward, faStop,
5055ea0389SGreg Roach  faSyncAlt, faTags, faThList, faThumbtack, faTimes, faTransgender, faTree, faUndo, faUniversity,
5155ea0389SGreg Roach  faUnlink, faUpload, faUsers, faVenus, faWrench,
52efd89170SGreg Roach  // For the BeautifyMarker library
53efd89170SGreg Roach  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
54efd89170SGreg Roach} from '@fortawesome/free-solid-svg-icons';
55efd89170SGreg Roachimport 'corejs-typeahead';
56efd89170SGreg Roach
57*2342bacdSGreg Roachimport DataTable from 'datatables.net';
5846ee5208SJonathan Jaubartimport 'datatables.net-bs5';
59*2342bacdSGreg Roachwindow.DataTable = DataTable;
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/*
9555ea0389SGreg Roach  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars, faCalendar,
9628281361SGreg Roach  faCaretDown, faCaretUp, faCheck, faCodeBranch, faCompress, faDatabase, faDownload, faExclamationTriangle,
9755ea0389SGreg Roach  faExpand, faGenderless, faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage,
9855ea0389SGreg Roach  faLink, faList, faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause,
9955ea0389SGreg Roach  faPencilAlt, faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation,
10028281361SGreg Roach  faSearchMinus, faSearchPlus, faServer, faShareAlt, faSitemap, faSortAmountDown, faStepForward, faStop,
10155ea0389SGreg Roach  faSyncAlt, faTags, faThList, faThumbtack, faTimes, faTransgender, faTree, faUndo, faUniversity,
10255ea0389SGreg 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