xref: /webtrees/resources/js/vendor.js (revision 6612c384f7d79aa0f86b473c59e91988d6adbf5d)
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('clear_button', require('tom-select/dist/js/plugins/clear_button.js'));
49TomSelect.define('dropdown_input', require('tom-select/dist/js/plugins/dropdown_input.js'));
50TomSelect.define('remove_button', require('tom-select/dist/js/plugins/remove_button.js'));
51TomSelect.define('virtual_scroll', require('tom-select/dist/js/plugins/virtual_scroll.js'));
52
53window.TomSelect = TomSelect;
54
55import 'hideshowpassword';
56
57import 'moment';
58
59import 'jquery-colorbox';
60import 'pinch-zoom-element';
61
62import 'leaflet';
63import 'leaflet.markercluster';
64import 'beautifymarker';
65import 'leaflet-control-geocoder';
66import 'leaflet.control.layers.tree';
67import 'leaflet-bing-layer';
68
69window.$ = window.jQuery = $;
70
71library.add(
72  // For resources/views/icons/*
73  faBell, faCopy, faEnvelope, faFile, faFileAlt, faFileImage, faFolder, faKeyboard,
74  faMap, faMinusSquare, faPlusSquare, faStar, faStickyNote, faTags, faTrashAlt, faUser
75);
76library.add(
77  // For resources/views/icons/*
78  faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsAltV, faBan, faBars,
79  faCalendar, faCaretDown, faCaretUp, faCheck, faCodeBranch, faDownload, faExclamationTriangle, faGenderless,
80  faGripHorizontal, faGripLines, faHistory, faInfoCircle, faLanguage, faLink, faList,
81  faLock, faMagic, faMap, faMapMarkerAlt, faMars, faMedkit, faPaintBrush, faPause, faPencilAlt,
82  faPlay, faPlus, faPuzzlePiece, faQuestionCircle, faRedo, faSearch, faSearchLocation, faSearchMinus, faSearchPlus, faShareAlt,
83  faSitemap, faSortAmountDown, faStepForward, faStop, faSyncAlt, faThList, faThumbtack,
84  faTimes, faTransgender, faTree, faUniversity, faUnlink, faUpload, faUsers, faVenus, faWrench,
85  // For the BeautifyMarker library
86  faBabyCarriage, faBullseye, faHome, faIndustry, faInfinity, faStarOfDavid, faWater
87);
88dom.watch();
89
90window.Bloodhound = require('corejs-typeahead/dist/bloodhound.min.js');
91
92// See https://github.com/RubaXa/Sortable/issues/1229
93// window.Sortable = require('sortablejs');
94window.Sortable = Sortable;
95