summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/utils/ng1-upgraded-provider.ts
blob: ed1ecd87bdfd29e907c5a16ed914609484691a82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { col
/**
 * Created by rc2122 on 4/6/2017.
 */
import {DataTypesService} from "../../services/data-types-service";
import ICacheObject = angular.ICacheObject;
import {SharingService} from "../../services/sharing-service";
import {CookieService} from "../../services/cookie-service";
import {CacheService} from "../../services/cache-service";
import {EventListenerService} from "app/services/event-listener-service";

/** Services we need to upgrade from angular1 to angular2 - in the future we need to rewrite them all to angular2 **/

export function dataTypesServiceFactory(cacheObj: ICacheObject) {
    return cacheObj.get('Sdc.Services.DataTypesService');
}

export function sharingServiceFactory(cacheObj: ICacheObject) {
    return cacheObj.get('Sdc.Services.SharingService');
}

export function cookieServiceFactory(cacheObj: ICacheObject) {
    return cacheObj.get('Sdc.Services.CookieService');
}

export function stateParamsServiceFactory(cacheObj: ICacheObject) {
    return cacheObj.get('$stateParams');
}

export function cacheServiceFactory(cacheObj: ICacheObject) {
    return cacheObj.get('Sdc.Services.CacheService');
}

export function eventListenerServiceServiceFactory(cacheObj: ICacheObject) {
    return cacheObj.get('EventListenerService');
}

export const DataTypesServiceProvider = {
    provide: DataTypesService,
    useFactory: dataTypesServiceFactory,
    deps: ['$injector']
};


export const SharingServiceProvider = {
    provide: SharingService,
    useFactory: sharingServiceFactory,
    deps: ['$injector']
};


export const CookieServiceProvider = {
    provide: CookieService,
    useFactory: cookieServiceFactory,
    deps: ['$injector']
};

export const StateParamsServiceFactory = {
    provide: '$stateParams',
    useFactory: stateParamsServiceFactory,
    deps: ['$injector']
};

export const CacheServiceProvider = {
    provide: CacheService,
    useFactory: cacheServiceFactory,
    deps: ['$injector']
};

export const EventListenerServiceProvider = {
    provide: EventListenerService,
    useFactory: eventListenerServiceServiceFactory,
    deps: ['$injector']
};