mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Make import paths ES6-compatible
This commit is contained in:
parent
1a635e2f81
commit
bfb8c7c1f6
245 changed files with 2073 additions and 1995 deletions
|
@ -1,10 +1,9 @@
|
|||
import dom from 'dom';
|
||||
import layoutManager from 'layoutManager';
|
||||
import shell from 'shell';
|
||||
import appRouter from 'appRouter';
|
||||
import appHost from 'apphost';
|
||||
import 'css!./emby-button';
|
||||
import 'webcomponents';
|
||||
import { removeEventListener, addEventListener } from '../../scripts/dom';
|
||||
import layoutManager from '../../components/layoutManager';
|
||||
import shell from '../../scripts/shell';
|
||||
import appRouter from '../../components/appRouter';
|
||||
import appHost from '../../components/apphost';
|
||||
import './emby-button.css';
|
||||
|
||||
const EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
|
||||
const EmbyLinkButtonPrototype = Object.create(HTMLAnchorElement.prototype);
|
||||
|
@ -30,7 +29,7 @@ EmbyButtonPrototype.createdCallback = function () {
|
|||
return;
|
||||
}
|
||||
|
||||
this.classList.add('emby-button');
|
||||
this.classList.add('../../elements/emby-button/emby-button');
|
||||
// TODO replace all instances of element-showfocus with this method
|
||||
if (layoutManager.tv) {
|
||||
// handles all special css for tv layout
|
||||
|
@ -41,8 +40,8 @@ EmbyButtonPrototype.createdCallback = function () {
|
|||
|
||||
EmbyButtonPrototype.attachedCallback = function () {
|
||||
if (this.tagName === 'A') {
|
||||
dom.removeEventListener(this, 'click', onAnchorClick, {});
|
||||
dom.addEventListener(this, 'click', onAnchorClick, {});
|
||||
removeEventListener(this, 'click', onAnchorClick, {});
|
||||
addEventListener(this, 'click', onAnchorClick, {});
|
||||
|
||||
if (this.getAttribute('data-autohide') === 'true') {
|
||||
if (appHost.supports('externallinks')) {
|
||||
|
@ -55,13 +54,13 @@ EmbyButtonPrototype.attachedCallback = function () {
|
|||
};
|
||||
|
||||
EmbyButtonPrototype.detachedCallback = function () {
|
||||
dom.removeEventListener(this, 'click', onAnchorClick, {});
|
||||
removeEventListener(this, 'click', onAnchorClick, {});
|
||||
};
|
||||
|
||||
EmbyLinkButtonPrototype.createdCallback = EmbyButtonPrototype.createdCallback;
|
||||
EmbyLinkButtonPrototype.attachedCallback = EmbyButtonPrototype.attachedCallback;
|
||||
|
||||
document.registerElement('emby-button', {
|
||||
document.registerElement('../../elements/emby-button/emby-button', {
|
||||
prototype: EmbyButtonPrototype,
|
||||
extends: 'button'
|
||||
});
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import layoutManager from 'layoutManager';
|
||||
import 'css!./emby-button';
|
||||
import 'webcomponents';
|
||||
import layoutManager from '../../components/layoutManager';
|
||||
import './emby-button.css';
|
||||
import 'webcomponents.js';
|
||||
|
||||
const EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
|
||||
|
||||
EmbyButtonPrototype.createdCallback = function () {
|
||||
this.classList.add('paper-icon-button-light');
|
||||
this.classList.add('../../elements/emby-button/paper-icon-button-light');
|
||||
|
||||
if (layoutManager.tv) {
|
||||
this.classList.add('show-focus');
|
||||
}
|
||||
};
|
||||
|
||||
document.registerElement('paper-icon-button-light', {
|
||||
document.registerElement('../../elements/emby-button/paper-icon-button-light', {
|
||||
prototype: EmbyButtonPrototype,
|
||||
extends: 'button'
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import browser from 'browser';
|
||||
import dom from 'dom';
|
||||
import 'css!./emby-checkbox';
|
||||
import 'webcomponents';
|
||||
import browser from '../../scripts/browser';
|
||||
import dom from '../../scripts/dom';
|
||||
import './emby-checkbox.css';
|
||||
import 'webcomponents.js';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'css!./emby-collapse';
|
||||
import 'webcomponents';
|
||||
import 'emby-button';
|
||||
import './emby-collapse';
|
||||
import 'webcomponents.js';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import browser from 'browser';
|
||||
import dom from 'dom';
|
||||
import 'css!./emby-input';
|
||||
import 'webcomponents';
|
||||
import browser from '../../scripts/browser';
|
||||
import dom from '../../scripts/dom';
|
||||
import './emby-input.css';
|
||||
import 'webcomponents.js';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import EmbyProgressRing from 'emby-progressring';
|
||||
import dom from 'dom';
|
||||
import serverNotifications from 'serverNotifications';
|
||||
import events from 'events';
|
||||
import 'webcomponents';
|
||||
import EmbyProgressRing from '../emby-progressring/emby-progressring';
|
||||
import dom from '../../scripts/dom';
|
||||
import serverNotifications from '../../scripts/serverNotifications';
|
||||
import events from 'jellyfin-apiclient';
|
||||
import 'webcomponents.js';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
import itemShortcuts from 'itemShortcuts';
|
||||
import inputManager from 'inputManager';
|
||||
import playbackManager from 'playbackManager';
|
||||
import imageLoader from 'imageLoader';
|
||||
import layoutManager from 'layoutManager';
|
||||
import browser from 'browser';
|
||||
import dom from 'dom';
|
||||
import loading from 'loading';
|
||||
import focusManager from 'focusManager';
|
||||
import serverNotifications from 'serverNotifications';
|
||||
import events from 'events';
|
||||
import 'webcomponents';
|
||||
|
||||
import itemShortcuts from '../../components/shortcuts';
|
||||
import inputManager from '../../scripts/inputManager';
|
||||
import connectionManager from 'jellyfin-apiclient';
|
||||
import playbackManager from '../../components/playback/playbackmanager';
|
||||
import imageLoader from '../../components/images/imageLoader';
|
||||
import layoutManager from '../../components/layoutManager';
|
||||
import browser from '../../scripts/browser';
|
||||
import dom from '../../scripts/dom';
|
||||
import loading from '../../components/loading/loading';
|
||||
import focusManager from '../../components/focusManager';
|
||||
import serverNotifications from '../../scripts/serverNotifications';
|
||||
import events from 'jellyfin-apiclient';
|
||||
import 'webcomponents.js';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -72,7 +74,7 @@ import 'webcomponents';
|
|||
}
|
||||
|
||||
const self = this;
|
||||
import('multiSelect').then(({default: MultiSelect}) => {
|
||||
import('../../components/multiSelect/multiSelect').then((MultiSelect) => {
|
||||
self.multiSelect = new MultiSelect({
|
||||
container: self,
|
||||
bindOnClick: false
|
||||
|
@ -132,7 +134,7 @@ import 'webcomponents';
|
|||
}
|
||||
|
||||
const self = this;
|
||||
import('sortable').then(({default: Sortable}) => {
|
||||
import('sortablejs').then((Sortable) => {
|
||||
self.sortable = new Sortable(self, {
|
||||
draggable: '.listItem',
|
||||
handle: '.listViewDragHandle',
|
||||
|
@ -148,7 +150,7 @@ import 'webcomponents';
|
|||
function onUserDataChanged(e, apiClient, userData) {
|
||||
const itemsContainer = this;
|
||||
|
||||
import('cardBuilder').then(({default: cardBuilder}) => {
|
||||
import('../../components/cardbuilder/cardBuilder').then((cardBuilder) => {
|
||||
cardBuilder.onUserDataChanged(userData, itemsContainer);
|
||||
});
|
||||
|
||||
|
@ -183,7 +185,7 @@ import 'webcomponents';
|
|||
// This could be null, not supported by all tv providers
|
||||
const newTimerId = data.Id;
|
||||
|
||||
import('cardBuilder').then(({default: cardBuilder}) => {
|
||||
import('../../components/cardbuilder/cardBuilder').then((cardBuilder) => {
|
||||
cardBuilder.onTimerCreated(programId, newTimerId, itemsContainer);
|
||||
});
|
||||
}
|
||||
|
@ -203,7 +205,7 @@ import 'webcomponents';
|
|||
return;
|
||||
}
|
||||
|
||||
import('cardBuilder').then(({default: cardBuilder}) => {
|
||||
import('../../components/cardbuilder/cardBuilder').then((cardBuilder) => {
|
||||
cardBuilder.onTimerCancelled(data.Id, itemsContainer);
|
||||
});
|
||||
}
|
||||
|
@ -215,7 +217,7 @@ import 'webcomponents';
|
|||
return;
|
||||
}
|
||||
|
||||
import('cardBuilder').then(({default: cardBuilder}) => {
|
||||
import('../../components/cardbuilder/cardBuilder').then((cardBuilder) => {
|
||||
cardBuilder.onSeriesTimerCancelled(data.Id, itemsContainer);
|
||||
});
|
||||
}
|
||||
|
@ -482,7 +484,7 @@ import 'webcomponents';
|
|||
focusManager.autoFocus(itemsContainer);
|
||||
}
|
||||
|
||||
document.registerElement('emby-itemscontainer', {
|
||||
document.registerElement('../../elements/emby-itemscontainer/emby-itemscontainer', {
|
||||
prototype: ItemsContainerPrototype,
|
||||
extends: 'div'
|
||||
});
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import serverNotifications from 'serverNotifications';
|
||||
import events from 'events';
|
||||
import globalize from 'globalize';
|
||||
import EmbyButtonPrototype from 'emby-button';
|
||||
import connectionManager from 'jellyfin-apiclient';
|
||||
import serverNotifications from '../../scripts/serverNotifications';
|
||||
import events from 'jellyfin-apiclient';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import EmbyButtonPrototype from '../../elements/emby-button/emby-button';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'css!./emby-progressring';
|
||||
import 'webcomponents';
|
||||
import './emby-progressring';
|
||||
import 'webcomponents.js';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -9,7 +9,7 @@ import 'webcomponents';
|
|||
this.classList.add('progressring');
|
||||
const instance = this;
|
||||
|
||||
import('text!./emby-progressring.template.html').then(({default: template}) => {
|
||||
import('./emby-progressring.template.html').then(({default: template}) => {
|
||||
instance.innerHTML = template;
|
||||
|
||||
if (window.MutationObserver) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import layoutManager from 'layoutManager';
|
||||
import 'css!./emby-radio';
|
||||
import 'webcomponents';
|
||||
import browser from 'browser';
|
||||
import layoutManager from '../../components/layoutManager';
|
||||
import browser from '../../scripts/browser';
|
||||
import 'webcomponents.js';
|
||||
import './emby-radio.css';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import serverNotifications from 'serverNotifications';
|
||||
import events from 'events';
|
||||
import globalize from 'globalize';
|
||||
import EmbyButtonPrototype from 'emby-button';
|
||||
import connectionManager from 'jellyfin-apiclient';
|
||||
import serverNotifications from '../../scripts/serverNotifications';
|
||||
import events from 'jellyfin-apiclient';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import EmbyButtonPrototype from '../emby-button/emby-button';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'css!./emby-scrollbuttons';
|
||||
import 'webcomponents';
|
||||
import 'paper-icon-button-light';
|
||||
import './emby-scrollbuttons';
|
||||
import 'webcomponents.js';
|
||||
import '../../elements/emby-button/paper-icon-button-light';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import scroller from 'scroller';
|
||||
import dom from 'dom';
|
||||
import layoutManager from 'layoutManager';
|
||||
import inputManager from 'inputManager';
|
||||
import focusManager from 'focusManager';
|
||||
import browser from 'browser';
|
||||
import 'webcomponents';
|
||||
import 'css!./emby-scroller';
|
||||
import scroller from '../../libraries/scroller';
|
||||
import dom from '../../scripts/dom';
|
||||
import layoutManager from '../../components/layoutManager';
|
||||
import inputManager from '../../scripts/inputManager';
|
||||
import focusManager from '../../components/focusManager';
|
||||
import browser from '../../scripts/browser';
|
||||
import 'webcomponents.js';
|
||||
import './emby-scroller.css';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
const ScrollerPrototype = Object.create(HTMLDivElement.prototype);
|
||||
|
||||
ScrollerPrototype.createdCallback = function () {
|
||||
this.classList.add('emby-scroller');
|
||||
this.classList.add('../../elements/emby-scroller/emby-scroller');
|
||||
};
|
||||
|
||||
function initCenterFocus(elem, scrollerInstance) {
|
||||
|
@ -156,7 +156,7 @@ import 'css!./emby-scroller';
|
|||
};
|
||||
|
||||
function loadScrollButtons(scroller) {
|
||||
import('emby-scrollbuttons').then(() => {
|
||||
import('../emby-scrollbuttons/emby-scrollbuttons').then(() => {
|
||||
scroller.insertAdjacentHTML('beforebegin', '<div is="emby-scrollbuttons" class="emby-scrollbuttons padded-right"></div>');
|
||||
});
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ import 'css!./emby-scroller';
|
|||
}
|
||||
};
|
||||
|
||||
document.registerElement('emby-scroller', {
|
||||
document.registerElement('../../elements/emby-scroller/emby-scroller', {
|
||||
prototype: ScrollerPrototype,
|
||||
extends: 'div'
|
||||
});
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import layoutManager from 'layoutManager';
|
||||
import browser from 'browser';
|
||||
import actionsheet from 'actionsheet';
|
||||
import 'css!./emby-select';
|
||||
import 'webcomponents';
|
||||
|
||||
import layoutManager from '../../components/layoutManager';
|
||||
import browser from '../../scripts/browser';
|
||||
import actionsheet from '../../components/actionSheet/actionSheet';
|
||||
import './emby-select.css';
|
||||
import 'webcomponents.js';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import browser from 'browser';
|
||||
import dom from 'dom';
|
||||
import layoutManager from 'layoutManager';
|
||||
import keyboardnavigation from 'keyboardnavigation';
|
||||
import 'css!./emby-slider';
|
||||
import 'webcomponents';
|
||||
import 'emby-input';
|
||||
import browser from '../../scripts/browser';
|
||||
import dom from '../../scripts/dom';
|
||||
import layoutManager from '../../components/layoutManager';
|
||||
import keyboardnavigation from '../../scripts/keyboardNavigation';
|
||||
import './emby-slider.css';
|
||||
import 'webcomponents.js';
|
||||
import '../emby-input/emby-input';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import dom from 'dom';
|
||||
import scroller from 'scroller';
|
||||
import browser from 'browser';
|
||||
import focusManager from 'focusManager';
|
||||
import 'webcomponents';
|
||||
import 'css!./emby-tabs';
|
||||
import 'scrollStyles';
|
||||
import dom from '../../scripts/dom';
|
||||
import scroller from '../../libraries/scroller';
|
||||
import browser from '../../scripts/browser';
|
||||
import focusManager from '../../components/focusManager';
|
||||
import 'webcomponents.js';
|
||||
import './emby-tabs.css';
|
||||
import '../../assets/css/scrollstyles.css';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'css!./emby-textarea';
|
||||
import 'webcomponents';
|
||||
import 'emby-input';
|
||||
import './emby-textarea.css';
|
||||
import 'webcomponents.js';
|
||||
import '../emby-input/emby-input';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'css!./emby-toggle';
|
||||
import 'webcomponents';
|
||||
import './emby-toggle';
|
||||
import 'webcomponents.js';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue