Organize the shared folder a bit

This commit is contained in:
Travis Ralston 2017-12-14 23:46:17 -07:00
parent 86a4d8dac2
commit e8f1167ec2
23 changed files with 39 additions and 54 deletions

View File

@ -8,20 +8,19 @@ import { routing } from "./app.routing";
import { createNewHosts, removeNgStyles } from "@angularclass/hmr"; import { createNewHosts, removeNgStyles } from "@angularclass/hmr";
import { NgbModule } from "@ng-bootstrap/ng-bootstrap"; import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
import { RiotComponent } from "./riot/riot.component"; import { RiotComponent } from "./riot/riot.component";
import { ApiService } from "./shared/api.service"; import { ApiService } from "./shared/services/api.service";
import { UiSwitchModule } from "angular2-ui-switch"; import { UiSwitchModule } from "angular2-ui-switch";
import { ScalarService } from "./shared/scalar.service"; import { ScalarService } from "./shared/services/scalar.service";
import { ToasterModule } from "angular2-toaster"; import { ToasterModule } from "angular2-toaster";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { IntegrationComponent } from "./integration/integration.component"; import { IntegrationComponent } from "./integration/integration.component";
import { ScalarCloseComponent } from "./riot/scalar-close/scalar-close.component"; import { ScalarCloseComponent } from "./riot/scalar-close/scalar-close.component";
import { IntegrationService } from "./shared/integration.service"; import { IntegrationService } from "./shared/services/integration.service";
import { BootstrapModalModule } from "ngx-modialog/plugins/bootstrap"; import { BootstrapModalModule } from "ngx-modialog/plugins/bootstrap";
import { ModalModule } from "ngx-modialog"; import { ModalModule } from "ngx-modialog";
import { IrcApiService } from "./shared/irc-api.service"; import { IrcApiService } from "./shared/services/irc-api.service";
import { MyFilterPipe } from "./shared/my-filter.pipe";
import { GenericWidgetWrapperComponent } from "./widget_wrappers/generic/generic.component"; import { GenericWidgetWrapperComponent } from "./widget_wrappers/generic/generic.component";
import { ToggleFullscreenDirective } from "./shared/toggle-fullscreen.directive"; import { ToggleFullscreenDirective } from "./shared/directives/toggle-fullscreen.directive";
import { FullscreenButtonComponent } from "./fullscreen-button/fullscreen-button.component"; import { FullscreenButtonComponent } from "./fullscreen-button/fullscreen-button.component";
import { VideoWidgetWrapperComponent } from "./widget_wrappers/video/video.component"; import { VideoWidgetWrapperComponent } from "./widget_wrappers/video/video.component";
import { JitsiWidgetWrapperComponent } from "./widget_wrappers/jitsi/jitsi.component"; import { JitsiWidgetWrapperComponent } from "./widget_wrappers/jitsi/jitsi.component";
@ -56,7 +55,6 @@ const WIDGET_CONFIGURATION_COMPONENTS: any[] = IntegrationService.getAllConfigCo
PageHeaderComponent, PageHeaderComponent,
SpinnerComponent, SpinnerComponent,
ScalarCloseComponent, ScalarCloseComponent,
MyFilterPipe,
GenericWidgetWrapperComponent, GenericWidgetWrapperComponent,
ToggleFullscreenDirective, ToggleFullscreenDirective,
FullscreenButtonComponent, FullscreenButtonComponent,

View File

@ -2,10 +2,10 @@ import { Component, OnDestroy } from "@angular/core";
import { IRCIntegration } from "../../shared/models/integration"; import { IRCIntegration } from "../../shared/models/integration";
import { ModalComponent, DialogRef } from "ngx-modialog"; import { ModalComponent, DialogRef } from "ngx-modialog";
import { ConfigModalContext } from "../../integration/integration.component"; import { ConfigModalContext } from "../../integration/integration.component";
import { IrcApiService } from "../../shared/irc-api.service"; import { IrcApiService } from "../../shared/services/irc-api.service";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { IntervalObservable } from "rxjs/observable/IntervalObservable"; import { IntervalObservable } from "rxjs/observable/IntervalObservable";
import { ApiService } from "../../shared/api.service"; import { ApiService } from "../../shared/services/api.service";
import { Subscription } from "rxjs"; import { Subscription } from "rxjs";
@Component({ @Component({

View File

@ -3,7 +3,7 @@ import { RSSIntegration } from "../../shared/models/integration";
import { ModalComponent, DialogRef } from "ngx-modialog"; import { ModalComponent, DialogRef } from "ngx-modialog";
import { ConfigModalContext } from "../../integration/integration.component"; import { ConfigModalContext } from "../../integration/integration.component";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { ApiService } from "../../shared/api.service"; import { ApiService } from "../../shared/services/api.service";
@Component({ @Component({
selector: "my-rss-config", selector: "my-rss-config",

View File

@ -3,7 +3,7 @@ import { TravisCiIntegration } from "../../shared/models/integration";
import { ModalComponent, DialogRef } from "ngx-modialog"; import { ModalComponent, DialogRef } from "ngx-modialog";
import { ConfigModalContext } from "../../integration/integration.component"; import { ConfigModalContext } from "../../integration/integration.component";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { ApiService } from "../../shared/api.service"; import { ApiService } from "../../shared/services/api.service";
@Component({ @Component({
selector: "my-travisci-config", selector: "my-travisci-config",

View File

@ -1,7 +1,7 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { DialogRef, ModalComponent } from "ngx-modialog"; import { DialogRef, ModalComponent } from "ngx-modialog";
import { WidgetComponent } from "../widget.component"; import { WidgetComponent } from "../widget.component";
import { ScalarService } from "../../../shared/scalar.service"; import { ScalarService } from "../../../shared/services/scalar.service";
import { ConfigModalContext } from "../../../integration/integration.component"; import { ConfigModalContext } from "../../../integration/integration.component";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { WIDGET_CUSTOM } from "../../../shared/models/widget"; import { WIDGET_CUSTOM } from "../../../shared/models/widget";

View File

@ -1,7 +1,7 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { DialogRef, ModalComponent } from "ngx-modialog"; import { DialogRef, ModalComponent } from "ngx-modialog";
import { WidgetComponent } from "../widget.component"; import { WidgetComponent } from "../widget.component";
import { ScalarService } from "../../../shared/scalar.service"; import { ScalarService } from "../../../shared/services/scalar.service";
import { ConfigModalContext } from "../../../integration/integration.component"; import { ConfigModalContext } from "../../../integration/integration.component";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { WIDGET_ETHERPAD } from "../../../shared/models/widget"; import { WIDGET_ETHERPAD } from "../../../shared/models/widget";

View File

@ -1,7 +1,7 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { DialogRef, ModalComponent } from "ngx-modialog"; import { DialogRef, ModalComponent } from "ngx-modialog";
import { WidgetComponent } from "../widget.component"; import { WidgetComponent } from "../widget.component";
import { ScalarService } from "../../../shared/scalar.service"; import { ScalarService } from "../../../shared/services/scalar.service";
import { ConfigModalContext } from "../../../integration/integration.component"; import { ConfigModalContext } from "../../../integration/integration.component";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { EditableWidget, WIDGET_GOOGLE_CALENDAR } from "../../../shared/models/widget"; import { EditableWidget, WIDGET_GOOGLE_CALENDAR } from "../../../shared/models/widget";

View File

@ -1,7 +1,7 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { DialogRef, ModalComponent } from "ngx-modialog"; import { DialogRef, ModalComponent } from "ngx-modialog";
import { WidgetComponent } from "../widget.component"; import { WidgetComponent } from "../widget.component";
import { ScalarService } from "../../../shared/scalar.service"; import { ScalarService } from "../../../shared/services/scalar.service";
import { ConfigModalContext } from "../../../integration/integration.component"; import { ConfigModalContext } from "../../../integration/integration.component";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { WIDGET_GOOGLE_DOCS } from "../../../shared/models/widget"; import { WIDGET_GOOGLE_DOCS } from "../../../shared/models/widget";

View File

@ -1,7 +1,7 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { DialogRef, ModalComponent } from "ngx-modialog"; import { DialogRef, ModalComponent } from "ngx-modialog";
import { WidgetComponent } from "../widget.component"; import { WidgetComponent } from "../widget.component";
import { ScalarService } from "../../../shared/scalar.service"; import { ScalarService } from "../../../shared/services/scalar.service";
import { ConfigModalContext } from "../../../integration/integration.component"; import { ConfigModalContext } from "../../../integration/integration.component";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { EditableWidget, WIDGET_JITSI } from "../../../shared/models/widget"; import { EditableWidget, WIDGET_JITSI } from "../../../shared/models/widget";

View File

@ -1,7 +1,7 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { DialogRef, ModalComponent } from "ngx-modialog"; import { DialogRef, ModalComponent } from "ngx-modialog";
import { WidgetComponent } from "../widget.component"; import { WidgetComponent } from "../widget.component";
import { ScalarService } from "../../../shared/scalar.service"; import { ScalarService } from "../../../shared/services/scalar.service";
import { ConfigModalContext } from "../../../integration/integration.component"; import { ConfigModalContext } from "../../../integration/integration.component";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { EditableWidget, WIDGET_TWITCH } from "../../../shared/models/widget"; import { EditableWidget, WIDGET_TWITCH } from "../../../shared/models/widget";

View File

@ -1,4 +1,4 @@
import { ScalarService } from "../../shared/scalar.service"; import { ScalarService } from "../../shared/services/scalar.service";
import { convertScalarWidgetsToDtos, EditableWidget } from "../../shared/models/widget"; import { convertScalarWidgetsToDtos, EditableWidget } from "../../shared/models/widget";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { Integration } from "../../shared/models/integration"; import { Integration } from "../../shared/models/integration";

View File

@ -1,7 +1,7 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { DialogRef, ModalComponent } from "ngx-modialog"; import { DialogRef, ModalComponent } from "ngx-modialog";
import { WidgetComponent } from "../widget.component"; import { WidgetComponent } from "../widget.component";
import { ScalarService } from "../../../shared/scalar.service"; import { ScalarService } from "../../../shared/services/scalar.service";
import { ConfigModalContext } from "../../../integration/integration.component"; import { ConfigModalContext } from "../../../integration/integration.component";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { EditableWidget, WIDGET_YOUTUBE } from "../../../shared/models/widget"; import { EditableWidget, WIDGET_YOUTUBE } from "../../../shared/models/widget";

View File

@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, Output } from "@angular/core";
import { Integration } from "../shared/models/integration"; import { Integration } from "../shared/models/integration";
import { overlayConfigFactory } from "ngx-modialog"; import { overlayConfigFactory } from "ngx-modialog";
import { BSModalContext, Modal } from "ngx-modialog/plugins/bootstrap"; import { BSModalContext, Modal } from "ngx-modialog/plugins/bootstrap";
import { IntegrationService } from "../shared/integration.service"; import { IntegrationService } from "../shared/services/integration.service";
export class ConfigModalContext extends BSModalContext { export class ConfigModalContext extends BSModalContext {
public integration: Integration; public integration: Integration;

View File

@ -1,11 +1,11 @@
import { Component, ViewChildren } from "@angular/core"; import { Component, ViewChildren } from "@angular/core";
import { IntegrationService } from "../../shared/integration.service"; import { IntegrationService } from "../../shared/services/integration.service";
import { IntegrationComponent } from "../../integration/integration.component"; import { IntegrationComponent } from "../../integration/integration.component";
import { ToasterService } from "angular2-toaster"; import { ToasterService } from "angular2-toaster";
import { Integration } from "../../shared/models/integration"; import { Integration } from "../../shared/models/integration";
import { ActivatedRoute } from "@angular/router"; import { ActivatedRoute } from "@angular/router";
import { ApiService } from "../../shared/api.service"; import { ApiService } from "../../shared/services/api.service";
import { ScalarService } from "../../shared/scalar.service"; import { ScalarService } from "../../shared/services/scalar.service";
import * as _ from "lodash"; import * as _ from "lodash";
import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser"; import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser";

View File

@ -1,5 +1,5 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { ScalarService } from "../../shared/scalar.service"; import { ScalarService } from "../../shared/services/scalar.service";
@Component({ @Component({
selector: "my-scalar-close", selector: "my-scalar-close",

View File

@ -1,13 +0,0 @@
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "myFilter",
pure: false
})
export class MyFilterPipe implements PipeTransform {
transform(items: any[], field: string, value: string): any[] {
if (!items) return [];
if (!value || value.length === 0) return items;
return items.filter(it => it[field].toLowerCase() === value.toLowerCase());
}
}

View File

@ -1,6 +1,6 @@
import { Injectable } from "@angular/core"; import { Injectable } from "@angular/core";
import { Http } from "@angular/http"; import { Http } from "@angular/http";
import { Integration } from "./models/integration"; import { Integration } from "../models/integration";
@Injectable() @Injectable()
export class ApiService { export class ApiService {

View File

@ -1,20 +1,20 @@
import { Injectable } from "@angular/core"; import { Injectable } from "@angular/core";
import { Integration } from "./models/integration"; import { Integration } from "../models/integration";
import { RssConfigComponent } from "../configs/rss/rss-config.component"; import { RssConfigComponent } from "../../configs/rss/rss-config.component";
import { ContainerContent } from "ngx-modialog"; import { ContainerContent } from "ngx-modialog";
import { IrcConfigComponent } from "../configs/irc/irc-config.component"; import { IrcConfigComponent } from "../../configs/irc/irc-config.component";
import { TravisCiConfigComponent } from "../configs/travisci/travisci-config.component"; import { TravisCiConfigComponent } from "../../configs/travisci/travisci-config.component";
import { CustomWidgetConfigComponent } from "../configs/widget/custom_widget/custom_widget-config.component"; import { CustomWidgetConfigComponent } from "../../configs/widget/custom_widget/custom_widget-config.component";
import { YoutubeWidgetConfigComponent } from "../configs/widget/youtube/youtube-config.component"; import { YoutubeWidgetConfigComponent } from "../../configs/widget/youtube/youtube-config.component";
import { TwitchWidgetConfigComponent } from "../configs/widget/twitch/twitch-config.component"; import { TwitchWidgetConfigComponent } from "../../configs/widget/twitch/twitch-config.component";
import { EtherpadWidgetConfigComponent } from "../configs/widget/etherpad/etherpad-config.component"; import { EtherpadWidgetConfigComponent } from "../../configs/widget/etherpad/etherpad-config.component";
import { JitsiWidgetConfigComponent } from "../configs/widget/jitsi/jitsi-config.component"; import { JitsiWidgetConfigComponent } from "../../configs/widget/jitsi/jitsi-config.component";
import { import {
WIDGET_CUSTOM, WIDGET_ETHERPAD, WIDGET_GOOGLE_CALENDAR, WIDGET_GOOGLE_DOCS, WIDGET_JITSI, WIDGET_TWITCH, WIDGET_CUSTOM, WIDGET_ETHERPAD, WIDGET_GOOGLE_CALENDAR, WIDGET_GOOGLE_DOCS, WIDGET_JITSI, WIDGET_TWITCH,
WIDGET_YOUTUBE WIDGET_YOUTUBE
} from "./models/widget"; } from "../models/widget";
import { GoogleDocsWidgetConfigComponent } from "../configs/widget/googledocs/googledocs-config.component"; import { GoogleDocsWidgetConfigComponent } from "../../configs/widget/googledocs/googledocs-config.component";
import { GoogleCalendarWidgetConfigComponent } from "../configs/widget/googlecalendar/googlecalendar-config.component"; import { GoogleCalendarWidgetConfigComponent } from "../../configs/widget/googlecalendar/googlecalendar-config.component";
@Injectable() @Injectable()
export class IntegrationService { export class IntegrationService {

View File

@ -6,8 +6,8 @@ import {
MembershipStateResponse, RoomEncryptionStatusResponse, MembershipStateResponse, RoomEncryptionStatusResponse,
ScalarSuccessResponse, ScalarSuccessResponse,
WidgetsResponse WidgetsResponse
} from "./models/scalar_responses"; } from "../models/scalar_responses";
import { EditableWidget } from "./models/widget"; import { EditableWidget } from "../models/widget";
@Injectable() @Injectable()
export class ScalarService { export class ScalarService {

View File

@ -1,5 +1,5 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { ApiService } from "../../shared/api.service"; import { ApiService } from "../../shared/services/api.service";
import { ActivatedRoute } from "@angular/router"; import { ActivatedRoute } from "@angular/router";
import { DomSanitizer, SafeUrl } from "@angular/platform-browser"; import { DomSanitizer, SafeUrl } from "@angular/platform-browser";

View File

@ -1,7 +1,7 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router"; import { ActivatedRoute } from "@angular/router";
import * as $ from "jquery"; import * as $ from "jquery";
import { ApiService } from "../../shared/api.service"; import { ApiService } from "../../shared/services/api.service";
import { JitsiWidgetIntegration } from "../../shared/models/integration"; import { JitsiWidgetIntegration } from "../../shared/models/integration";
declare var JitsiMeetExternalAPI: any; declare var JitsiMeetExternalAPI: any;