xref: /webtrees/resources/js/vendor.js (revision c8d78f19d0bdf4c0ec4728253bd37250d2e6cec4)
1/**
2 * webtrees: online genealogy
3 * Copyright (C) 2021 webtrees development team
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 */
15
16import $ from 'jquery';
17
18import '@popperjs/core';
19import 'bootstrap';
20import 'datatables.net';
21
22// Just import the subset of icons that we use in resources/views/icons/
23import { dom, library } from '@fortawesome/fontawesome-svg-core';
24import {
25  // For resources/views/icons/*
26  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
27  faMinusSquare, faPlusSquare, faStar, faStickyNote, faTrashAlt, faUser
28} from '@fortawesome/free-regular-svg-icons';
29import {
30  // For resources/views/icons/*
31  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars,
32  faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless,
33  faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList,
34  faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt,
35  faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt,
36  faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faTags, faThList, faThumbtack,
37  faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench,
38  // For the BeautifyMarker library
39  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
40} from '@fortawesome/free-solid-svg-icons';
41import 'corejs-typeahead';
42
43import 'datatables.net-bs5';
44
45import Sortable from 'sortablejs';
46
47import TomSelect from 'tom-select/dist/js/tom-select.base.js';
48TomSelect.define('dropdown_input', require('tom-select/dist/js/plugins/dropdown_input.js'));
49TomSelect.define('remove_button', require('tom-select/dist/js/plugins/remove_button.js'));
50TomSelect.define('virtual_scroll', require('tom-select/dist/js/plugins/virtual_scroll.js'));
51
52window.TomSelect = TomSelect;
53
54import 'hideshowpassword';
55
56import 'moment';
57
58import 'jquery-colorbox';
59import 'pinch-zoom-element';
60
61import 'leaflet';
62import 'leaflet.markercluster';
63import 'beautifymarker';
64import 'leaflet-control-geocoder';
65import 'leaflet.control.layers.tree';
66import 'leaflet-bing-layer';
67
68window.$ = window.jQuery = $;
69
70library.add(
71  // For resources/views/icons/*
72  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
73  faMap, faMinusSquare, faPlusSquare, faStar, faStickyNote, faTags, faTrashAlt, faUser
74);
75library.add(
76  // For resources/views/icons/*
77  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars,
78  faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless,
79  faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList,
80  faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt,
81  faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt,
82  faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faThList, faThumbtack,
83  faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench,
84  // For the BeautifyMarker library
85  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
86);
87dom.watch();
88
89window.Bloodhound = require('corejs-typeahead/dist/bloodhound.min.js');
90
91// See https://github.com/RubaXa/Sortable/issues/1229
92// window.Sortable = require('sortablejs');
93window.Sortable = Sortable;
94