[DEV] update new model with remote library (not work)
This commit is contained in:
parent
8a5758af78
commit
c76a339caf
1558
front/package-lock.json
generated
1558
front/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
"version": "0.0.0",
|
||||
"license": "MPL-2",
|
||||
"scripts": {
|
||||
"all": "npm run build && npm run test",
|
||||
"all": "npm run build && pnpm run test",
|
||||
"ng": "ng",
|
||||
"dev": "ng serve --configuration=develop --watch --port 4203",
|
||||
"build": "ng build --prod",
|
||||
@ -12,34 +12,37 @@
|
||||
"style": "prettier --write .",
|
||||
"e2e": "ng e2e",
|
||||
"update_packages": "ncu --upgrade",
|
||||
"install_dependency": "npm install"
|
||||
"install_dependency": "pnpm install --force",
|
||||
"publish": "pnpm publish --no-git-checks"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^17.2.0",
|
||||
"@angular/cdk": "^17.1.2",
|
||||
"@angular/common": "^17.2.0",
|
||||
"@angular/compiler": "^17.2.0",
|
||||
"@angular/core": "^17.2.0",
|
||||
"@angular/forms": "^17.2.0",
|
||||
"@angular/material": "^17.1.2",
|
||||
"@angular/platform-browser": "^17.2.0",
|
||||
"@angular/platform-browser-dynamic": "^17.2.0",
|
||||
"@angular/router": "^17.2.0",
|
||||
"@angular/animations": "^17.3.1",
|
||||
"@angular/cdk": "^17.3.1",
|
||||
"@angular/common": "^17.3.1",
|
||||
"@angular/compiler": "^17.3.1",
|
||||
"@angular/core": "^17.3.1",
|
||||
"@angular/forms": "^17.3.1",
|
||||
"@angular/material": "^17.3.1",
|
||||
"@angular/platform-browser": "^17.3.1",
|
||||
"@angular/platform-browser-dynamic": "^17.3.1",
|
||||
"@angular/router": "^17.3.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"zone.js": "^0.14.4",
|
||||
"zod": "3.22.4"
|
||||
"zod": "3.22.4",
|
||||
"@kangaroo-and-rabbit/kar-cw": "0.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^17.2.0",
|
||||
"@angular-eslint/builder": "17.2.1",
|
||||
"@angular-eslint/eslint-plugin": "17.2.1",
|
||||
"@angular-eslint/eslint-plugin-template": "17.2.1",
|
||||
"@angular-eslint/schematics": "17.2.1",
|
||||
"@angular-eslint/template-parser": "17.2.1",
|
||||
"@angular/cli": "^17.2.0",
|
||||
"@angular/compiler-cli": "^17.2.0",
|
||||
"@angular/language-service": "^17.2.0",
|
||||
"npm-check-updates": "^16.14.15"
|
||||
"@angular-devkit/build-angular": "^17.3.1",
|
||||
"@angular-eslint/builder": "17.3.0",
|
||||
"@angular-eslint/eslint-plugin": "17.3.0",
|
||||
"@angular-eslint/eslint-plugin-template": "17.3.0",
|
||||
"@angular-eslint/schematics": "17.3.0",
|
||||
"@angular-eslint/template-parser": "17.3.0",
|
||||
"@angular/cli": "^17.3.1",
|
||||
"@angular/compiler-cli": "^17.3.1",
|
||||
"@angular/language-service": "^17.3.1",
|
||||
"npm-check-updates": "^16.14.17",
|
||||
"tslib": "^2.6.2"
|
||||
}
|
||||
}
|
9690
front/pnpm-lock.yaml
Normal file
9690
front/pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,13 +6,12 @@
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router'; // CLI imports router
|
||||
import { ForbiddenScene, HomeOutScene, NotFound404Scene, SsoScene } from 'common/scene';
|
||||
import { OnlyAdminGuard, OnlyUnregisteredGuardHome, OnlyUsersGuard, OnlyUsersGuardHome } from 'common/service';
|
||||
|
||||
import {
|
||||
HelpScene, HomeScene, AlbumEditScene, AlbumsScene, ArtistEditScene, ArtistScene, SettingsScene,
|
||||
GenderScene, PlaylistScene, TrackEditScene, TrackScene, UploadScene, ArtistsScene, ArtistAlbumScene, AlbumScene
|
||||
} from './scene';
|
||||
import { ForbiddenScene, OnlyUsersGuardHome, HomeOutScene, OnlyUnregisteredGuardHome, SsoScene, OnlyAdminGuard, OnlyUsersGuard, NotFound404Scene } from '@kangaroo-and-rabbit/kar-cw';
|
||||
|
||||
// import { HelpComponent } from './help/help.component';
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { EventOnMenu } from 'common/component/top-menu/top-menu';
|
||||
import { MenuItem, MenuPosition } from 'common/model';
|
||||
import { UserService, SessionService, SSOService } from 'common/service';
|
||||
import { isNullOrUndefined } from 'common/utils';
|
||||
import { ArianeService } from './service';
|
||||
import { UserRoles222 } from 'common/service/session';
|
||||
import { MenuItem } from '@kangaroo-and-rabbit/kar-cw/model';
|
||||
import { SSOService, SessionService, UserService } from '@kangaroo-and-rabbit/kar-cw/service';
|
||||
import { EventOnMenu } from '@kangaroo-and-rabbit/kar-cw/component/top-menu/top-menu';
|
||||
import { MenuPosition, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
|
||||
import { UserRoles222 } from '@kangaroo-and-rabbit/kar-cw/service/session';
|
||||
|
||||
enum MenuEventType {
|
||||
SSO_LOGIN = "SSO_CALL_LOGIN",
|
||||
@ -53,7 +53,7 @@ export class AppComponent implements OnInit {
|
||||
this.updateMainMenu();
|
||||
let self = this;
|
||||
this.sessionService.change.subscribe((isConnected) => {
|
||||
console.log(`receive event from session ...${ isConnected}`);
|
||||
console.log(`receive event from session ...${isConnected}`);
|
||||
self.isConnected = isConnected;
|
||||
self.autoConnectedDone = true;
|
||||
self.updateMainMenu();
|
||||
@ -107,7 +107,7 @@ export class AppComponent implements OnInit {
|
||||
eventOnMenu(data: EventOnMenu): void {
|
||||
//console.log(`plopppppppppp ${JSON.stringify(this.route.snapshot.url)}`);
|
||||
//console.log(`Get event on menu: ${JSON.stringify(data, null, 4)}`);
|
||||
switch(data.menu.otherData) {
|
||||
switch (data.menu.otherData) {
|
||||
case MenuEventType.SSO_LOGIN:
|
||||
this.ssoService.requestSignIn();
|
||||
break;
|
||||
@ -118,15 +118,15 @@ export class AppComponent implements OnInit {
|
||||
this.ssoService.requestSignUp();
|
||||
break;
|
||||
case MenuEventType.SEGMENT:
|
||||
if(this.arianeService.getCurrrentSegment() === "artist") {
|
||||
if (this.arianeService.getCurrrentSegment() === "artist") {
|
||||
this.arianeService.navigateArtist({});
|
||||
} else if(this.arianeService.getCurrrentSegment() === "gender") {
|
||||
} else if (this.arianeService.getCurrrentSegment() === "gender") {
|
||||
this.arianeService.navigateGender({});
|
||||
} else if(this.arianeService.getCurrrentSegment() === "playlist") {
|
||||
} else if (this.arianeService.getCurrrentSegment() === "playlist") {
|
||||
this.arianeService.navigatePlaylist({});
|
||||
} else if(this.arianeService.getCurrrentSegment() === "track") {
|
||||
} else if (this.arianeService.getCurrrentSegment() === "track") {
|
||||
this.arianeService.navigateTrack({});
|
||||
} else if(this.arianeService.getCurrrentSegment() === "album") {
|
||||
} else if (this.arianeService.getCurrrentSegment() === "album") {
|
||||
this.arianeService.navigateAlbum({});
|
||||
}
|
||||
break;
|
||||
@ -134,8 +134,8 @@ export class AppComponent implements OnInit {
|
||||
|
||||
break;
|
||||
case MenuEventType.ARTIST:
|
||||
if(this.arianeService.getCurrrentSegment() === "artist") {
|
||||
this.arianeService.navigateArtist({artistId: this.arianeService.getArtistId()});
|
||||
if (this.arianeService.getCurrrentSegment() === "artist") {
|
||||
this.arianeService.navigateArtist({ artistId: this.arianeService.getArtistId() });
|
||||
}
|
||||
break;
|
||||
case MenuEventType.ALBUM:
|
||||
@ -207,7 +207,7 @@ export class AppComponent implements OnInit {
|
||||
enable: !isNullOrUndefined(this.arianeService.getPlaylistId()),
|
||||
}
|
||||
],
|
||||
},{
|
||||
}, {
|
||||
position: MenuPosition.RIGHT,
|
||||
image: "assets/images/avatar_generic.svg",
|
||||
title: "",
|
||||
@ -257,7 +257,7 @@ export class AppComponent implements OnInit {
|
||||
icon: "add_circle_outline",
|
||||
title: "Sign-up",
|
||||
callback: true,
|
||||
model: this.signUpEnable?undefined:"disable",
|
||||
model: this.signUpEnable ? undefined : "disable",
|
||||
otherData: MenuEventType.SSO_SIGNUP,
|
||||
}, {
|
||||
position: MenuPosition.RIGHT,
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
@ -23,7 +23,7 @@ import {
|
||||
import { GenderService, DataService, PlaylistService, ArtistService, AlbumService, TrackService, ArianeService, PlayerService } from './service';
|
||||
import { UploadScene } from './scene/upload/upload';
|
||||
import { ElementSeriesComponent, ElementTrackComponent, ElementSeasonComponent, ElementVideoComponent, ElementPlayerAudioComponent, DescriptionAreaComponent } from './component';
|
||||
import { common_module_declarations, common_module_imports, common_module_providers, common_module_exports } from 'common/module';
|
||||
import { KarCWModule } from '@kangaroo-and-rabbit/kar-cw';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -53,14 +53,13 @@ import { common_module_declarations, common_module_imports, common_module_provid
|
||||
AlbumEditScene,
|
||||
ArtistEditScene,
|
||||
UploadScene,
|
||||
...common_module_declarations,
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
RouterModule,
|
||||
AppRoutingModule,
|
||||
HttpClientModule,
|
||||
...common_module_imports,
|
||||
KarCWModule,
|
||||
],
|
||||
providers: [
|
||||
PlayerService,
|
||||
@ -71,7 +70,6 @@ import { common_module_declarations, common_module_imports, common_module_provid
|
||||
AlbumService,
|
||||
TrackService,
|
||||
ArianeService,
|
||||
...common_module_providers,
|
||||
],
|
||||
exports: [
|
||||
AppComponent,
|
||||
@ -80,16 +78,9 @@ import { common_module_declarations, common_module_imports, common_module_provid
|
||||
ElementSeasonComponent,
|
||||
ElementVideoComponent,
|
||||
PopInCreateType,
|
||||
...common_module_exports,
|
||||
],
|
||||
bootstrap: [
|
||||
AppComponent
|
||||
],
|
||||
/*
|
||||
schemas: [
|
||||
CUSTOM_ELEMENTS_SCHEMA,
|
||||
NO_ERRORS_SCHEMA
|
||||
]
|
||||
*/
|
||||
})
|
||||
export class AppModule { }
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* API of the server (auto-generated code)
|
||||
*/
|
||||
import { HTTPMimeType, HTTPRequestModel, ModelResponseHttp, RESTConfig, RESTRequestJson, RESTRequestJsonArray, RESTRequestVoid } from "./rest-tools"
|
||||
import {UUID, Long, Gender, isGender, } from "./model"
|
||||
import { HTTPMimeType, HTTPRequestModel, RESTConfig, RESTRequestJson, RESTRequestJsonArray, RESTRequestVoid } from "./rest-tools"
|
||||
import { UUID, Long, Gender, isGender, } from "./model"
|
||||
export namespace GenderResource {
|
||||
|
||||
export function remove({ restConfig, params, }: {
|
||||
|
@ -4,14 +4,13 @@
|
||||
* @license PROPRIETARY (see license file)
|
||||
*/
|
||||
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
|
||||
import { isArray, isNullOrUndefined } from 'common/utils';
|
||||
|
||||
import { DataService, PlayerService, TrackService, AlbumService, ArtistService } from 'app/service';
|
||||
import { PlaylistCurrent } from 'app/service/player';
|
||||
import { HttpWrapperService } from 'common/service';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import { environment } from 'environments/environment';
|
||||
import { Album, Artist, Track } from 'app/back-api';
|
||||
import { isArray, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw/utils';
|
||||
|
||||
|
||||
export enum PlayMode {
|
||||
|
@ -4,10 +4,10 @@
|
||||
* @license PROPRIETARY (see license file)
|
||||
*/
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw/utils';
|
||||
import { NodeSmall } from 'app/back-api';
|
||||
|
||||
import { AlbumService, DataService } from 'app/service';
|
||||
import { isNullOrUndefined } from 'common/utils';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -4,10 +4,10 @@
|
||||
* @license PROPRIETARY (see license file)
|
||||
*/
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { isNullOrUndefined } from 'common/utils';
|
||||
|
||||
import { DataService, TrackService } from 'app/service';
|
||||
import { NodeSmall } from 'app/back-api';
|
||||
import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw/utils';
|
||||
|
||||
@Component({
|
||||
selector: 'app-element-series',
|
||||
|
@ -4,10 +4,10 @@
|
||||
* @license PROPRIETARY (see license file)
|
||||
*/
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw/utils';
|
||||
import { NodeSmall } from 'app/back-api';
|
||||
|
||||
import { AlbumService, DataService } from 'app/service';
|
||||
import { isNullOrUndefined } from 'common/utils';
|
||||
|
||||
@Component({
|
||||
selector: 'app-element-track',
|
||||
|
@ -4,10 +4,10 @@
|
||||
* @license PROPRIETARY (see license file)
|
||||
*/
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { isNullOrUndefined } from 'common/utils';
|
||||
|
||||
import { DataService } from 'app/service';
|
||||
import { NodeSmall } from 'app/back-api';
|
||||
import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -4,13 +4,12 @@
|
||||
* @license PROPRIETARY (see license file)
|
||||
*/
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
import { PopInService } from 'common/service/popin';
|
||||
import { PopInService } from '@kangaroo-and-rabbit/kar-cw/service';
|
||||
|
||||
@Component({
|
||||
selector: 'create-type',
|
||||
templateUrl: './create-type.html',
|
||||
styleUrls: [ './create-type.less' ]
|
||||
styleUrls: ['./create-type.less']
|
||||
})
|
||||
export class PopInCreateType implements OnInit {
|
||||
name: string = '';
|
||||
@ -26,14 +25,14 @@ export class PopInCreateType implements OnInit {
|
||||
|
||||
}
|
||||
eventPopUp(event: string): void {
|
||||
console.log(`GET event: ${ event}`);
|
||||
console.log(`GET event: ${event}`);
|
||||
this.popInService.close('popin-create-type');
|
||||
}
|
||||
updateNeedSend():void {
|
||||
updateNeedSend(): void {
|
||||
|
||||
}
|
||||
onName(value:any):void {
|
||||
if(value.length === 0) {
|
||||
onName(value: any): void {
|
||||
if (value.length === 0) {
|
||||
this.name = '';
|
||||
} else {
|
||||
this.name = value;
|
||||
@ -41,8 +40,8 @@ export class PopInCreateType implements OnInit {
|
||||
this.updateNeedSend();
|
||||
}
|
||||
|
||||
onDescription(value:any):void {
|
||||
if(value.length === 0) {
|
||||
onDescription(value: any): void {
|
||||
if (value.length === 0) {
|
||||
this.description = '';
|
||||
} else {
|
||||
this.description = value;
|
||||
|
@ -5,12 +5,12 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UploadProgress } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress';
|
||||
import { PopInService } from '@kangaroo-and-rabbit/kar-cw/service';
|
||||
import { Album } from 'app/back-api';
|
||||
|
||||
import { AlbumService, ArianeService, DataService, TrackService } from 'app/service';
|
||||
|
||||
import { UploadProgress } from 'common/popin/upload-progress/upload-progress';
|
||||
import { PopInService } from 'common/service';
|
||||
|
||||
export interface ElementList {
|
||||
value: number;
|
||||
|
@ -8,7 +8,6 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { Album, Track } from 'app/back-api';
|
||||
|
||||
import { ArtistService, DataService, ArianeService, AlbumService, TrackService, PlayerService } from 'app/service';
|
||||
import { arrayUnique } from 'common/utils/arrayTools';
|
||||
|
||||
@Component({
|
||||
selector: 'app-album',
|
||||
@ -126,3 +125,7 @@ export class AlbumScene implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
function arrayUnique(artistIds: number[]): number[] {
|
||||
throw new Error('Function not implemented.');
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { DataTools } from '@kangaroo-and-rabbit/kar-cw/utils/data-tools';
|
||||
import { Album, Artist, NodeSmall, Track } from 'app/back-api';
|
||||
|
||||
import { ArtistService, DataService, ArianeService, AlbumService, PlayerService, TrackService } from 'app/service';
|
||||
import { DataInterface } from 'common/utils';
|
||||
import { filter } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
@ -47,10 +47,10 @@ export class AlbumsScene implements OnInit {
|
||||
return new Promise((resolve, reject) => {
|
||||
self.trackService.getTracksWithAlbumId(albumId)
|
||||
.then((response: Track[]) => {
|
||||
const listArtists = DataInterface.extractLimitOneList(response, "artists");
|
||||
const listArtists = DataTools.extractLimitOneList(response, "artists");
|
||||
self.artistService.getAll(listArtists)
|
||||
.then((listArtists: Artist[]) => {
|
||||
resolve(DataInterface.extractLimitOne(listArtists, "name"));
|
||||
resolve(DataTools.extractLimitOne(listArtists, "name"));
|
||||
}).catch((error) => {
|
||||
resolve([">> ERROR 1 <<"]);
|
||||
})
|
||||
|
@ -5,11 +5,11 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UploadProgress } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress';
|
||||
import { PopInService } from '@kangaroo-and-rabbit/kar-cw/service';
|
||||
import { Artist, Track } from 'app/back-api';
|
||||
|
||||
import { ArtistService, DataService, GenderService, ArianeService, TrackService } from 'app/service';
|
||||
import { UploadProgress } from 'common/popin/upload-progress/upload-progress';
|
||||
import { PopInService } from 'common/service';
|
||||
|
||||
export class ElementList {
|
||||
constructor(
|
||||
|
@ -7,7 +7,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Artist, Track } from 'app/back-api';
|
||||
|
||||
import { ArtistService, ArianeService, AlbumService, TrackService, PlayerService } from 'app/service';
|
||||
import { ArtistService, ArianeService, TrackService, PlayerService } from 'app/service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-artists',
|
||||
|
@ -5,13 +5,12 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PopInService, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
|
||||
import { UploadProgress } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress';
|
||||
import { Track } from 'app/back-api';
|
||||
|
||||
|
||||
import { DataService, GenderService, ArtistService, TrackService, ArianeService, AlbumService } from 'app/service';
|
||||
import { UploadProgress } from 'common/popin/upload-progress/upload-progress';
|
||||
import { PopInService } from 'common/service';
|
||||
import { isNullOrUndefined } from 'common/utils';
|
||||
|
||||
export interface ElementList {
|
||||
value?: number;
|
||||
|
@ -5,10 +5,9 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
|
||||
import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
|
||||
import { Track } from 'app/back-api';
|
||||
import { DataService, TrackService, ArtistService, AlbumService, ArianeService } from 'app/service';
|
||||
import { HttpWrapperService } from 'common/service';
|
||||
import { isNullOrUndefined } from 'common/utils';
|
||||
|
||||
@Component({
|
||||
selector: 'app-track',
|
||||
@ -48,13 +47,13 @@ export class TrackScene implements OnInit {
|
||||
|
||||
name: string = '';
|
||||
description: string = '';
|
||||
track: number = undefined;
|
||||
artists: number[] = undefined;
|
||||
artistName: string = undefined;
|
||||
albumId: number = undefined;
|
||||
albumName: string = undefined;
|
||||
track?: number;
|
||||
artists?: number[];
|
||||
artistName?: string;
|
||||
albumId?: number;
|
||||
albumName?: string;
|
||||
dataId: string = "";
|
||||
typeId: number = undefined;
|
||||
typeId?: number;
|
||||
generatedName: string = '';
|
||||
trackSource: string = '';
|
||||
covers: string[];
|
||||
@ -75,7 +74,6 @@ export class TrackScene implements OnInit {
|
||||
constructor(private trackService: TrackService,
|
||||
private artistService: ArtistService,
|
||||
private albumService: AlbumService,
|
||||
private httpService: HttpWrapperService,
|
||||
private arianeService: ArianeService,
|
||||
private dataService: DataService) {
|
||||
|
||||
@ -145,10 +143,7 @@ export class TrackScene implements OnInit {
|
||||
this.generatedName = this.generatedName.replace(new RegExp('&', 'g'), '_');
|
||||
this.generatedName = this.generatedName.replace(new RegExp('/', 'g'), '_');
|
||||
// update the path of the uri request
|
||||
this.trackSource = this.httpService.createRESTCall2({
|
||||
api: `data/${this.dataId}/${this.generatedName}`,
|
||||
addURLToken: true,
|
||||
});
|
||||
this.trackSource = this.dataService.getUrl(this.dataId, this.generatedName);
|
||||
}
|
||||
|
||||
myPeriodicCheckFunction() {
|
||||
@ -565,3 +560,4 @@ export class TrackScene implements OnInit {
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PopInService, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
|
||||
import { UploadProgress } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress';
|
||||
import { Artist, Gender } from 'app/back-api';
|
||||
|
||||
import { GenderService, ArtistService, TrackService, AlbumService } from 'app/service';
|
||||
import { UploadProgress } from 'common/popin/upload-progress/upload-progress';
|
||||
import { PopInService } from 'common/service';
|
||||
import { isNullOrUndefined } from 'common/utils';
|
||||
|
||||
|
||||
export class ElementList {
|
||||
constructor(
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { isArrayOf, isNullOrUndefined, TypeCheck } from "common/utils";
|
||||
import { DataStore } from "common/utils/data-store";
|
||||
import { DataTools } from "common/utils/data-tools";
|
||||
import { TypeCheck, isNullOrUndefined } from "@kangaroo-and-rabbit/kar-cw/utils";
|
||||
import { DataTools } from "@kangaroo-and-rabbit/kar-cw/utils/data-tools";
|
||||
|
||||
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
|
||||
|
||||
export class GenericDataService<TYPE> {
|
||||
protected dataStore: DataStore<TYPE>;
|
||||
|
@ -6,14 +6,14 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { SessionService } from 'common/service';
|
||||
import { DataInterface, TypeCheck, isArrayOf, isNumber } from 'common/utils';
|
||||
import { Album, AlbumResource, UUID } from 'app/back-api';
|
||||
import { DataStore } from '../../common/utils/data-store';
|
||||
import { RESTConfig } from 'app/back-api/rest-tools';
|
||||
import { RESTConfig, isArrayOf } from 'app/back-api/rest-tools';
|
||||
import { environment } from 'environments/environment';
|
||||
import { DataTools } from 'common/utils/data-tools';
|
||||
import { GenericDataService } from './GenericDataService';
|
||||
import { SessionService, TypeCheck, isNumber } from '@kangaroo-and-rabbit/kar-cw';
|
||||
import { DataTools } from '@kangaroo-and-rabbit/kar-cw/utils/data-tools';
|
||||
|
||||
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
|
||||
|
||||
@Injectable()
|
||||
export class AlbumService extends GenericDataService<Album> {
|
||||
@ -143,7 +143,7 @@ export class AlbumService extends GenericDataService<Album> {
|
||||
],
|
||||
['name']);
|
||||
// filter with artist- ID !!!
|
||||
const listArtistId = DataInterface.extractLimitOneList(data, "artists");
|
||||
const listArtistId = DataTools.extractLimitOneList(data, "artists");
|
||||
if (isArrayOf(listArtistId, isNumber)) {
|
||||
resolve(listArtistId);
|
||||
} else {
|
||||
|
@ -14,8 +14,8 @@ import { ArtistService } from './artist';
|
||||
import { AlbumService } from './album';
|
||||
import { TrackService } from './track';
|
||||
import { environment } from 'environments/environment';
|
||||
import { isNullOrUndefined, isStringNullOrUndefined, isUndefined } from 'common/utils';
|
||||
import { NodeSmall } from 'app/back-api';
|
||||
import { isNullOrUndefined, isStringNullOrUndefined, isUndefined } from '@kangaroo-and-rabbit/kar-cw';
|
||||
|
||||
export class InputOrders {
|
||||
public genderId: number = undefined;
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { SessionService } from 'common/service';
|
||||
import { Artist, ArtistResource, UUID } from 'app/back-api';
|
||||
import { RESTConfig } from 'app/back-api/rest-tools';
|
||||
import { DataStore } from 'common/utils/data-store';
|
||||
import { environment } from 'environments/environment';
|
||||
import { GenericDataService } from './GenericDataService';
|
||||
import { SessionService } from '@kangaroo-and-rabbit/kar-cw/service';
|
||||
|
||||
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
|
||||
|
||||
|
||||
@Injectable()
|
||||
|
@ -5,10 +5,9 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { isArrayOf, isNullOrUndefined, isNumberFinite, isString } from 'common/utils';
|
||||
import { SessionService, isNullOrUndefined, isString } from '@kangaroo-and-rabbit/kar-cw';
|
||||
|
||||
import { SessionService } from 'common/service';
|
||||
import { RESTConfig, RESTUrl } from 'app/back-api/rest-tools';
|
||||
import { RESTConfig, RESTUrl, isArrayOf } from 'app/back-api/rest-tools';
|
||||
import { environment } from 'environments/environment';
|
||||
|
||||
@Injectable()
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { SessionService } from 'common/service';
|
||||
import { SessionService } from '@kangaroo-and-rabbit/kar-cw/service';
|
||||
import { GenderResource, Gender, UUID } from 'app/back-api';
|
||||
import { RESTConfig } from 'app/back-api/rest-tools';
|
||||
import { DataStore } from 'common/utils/data-store';
|
||||
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
|
||||
import { environment } from 'environments/environment';
|
||||
import { GenericDataService } from './GenericDataService';
|
||||
|
||||
|
@ -6,12 +6,12 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { SessionService } from 'common/service';
|
||||
import { Playlist, PlaylistResource, UUID } from 'app/back-api';
|
||||
import { RESTConfig } from 'app/back-api/rest-tools';
|
||||
import { DataStore } from 'common/utils/data-store';
|
||||
import { environment } from 'environments/environment';
|
||||
import { GenericDataService } from './GenericDataService';
|
||||
import { SessionService } from '@kangaroo-and-rabbit/kar-cw/service';
|
||||
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
|
||||
|
||||
@Injectable()
|
||||
export class PlaylistService extends GenericDataService<Playlist> {
|
||||
|
@ -6,14 +6,14 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { SessionService } from 'common/service';
|
||||
import { DataInterface, isArrayOf, isNumber, TypeCheck } from 'common/utils';
|
||||
import { DataStore } from 'common/utils/data-store';
|
||||
import { RESTConfig } from 'app/back-api/rest-tools';
|
||||
import { environment } from 'environments/environment';
|
||||
import { Track, TrackResource, UUID } from 'app/back-api';
|
||||
import { DataTools } from 'common/utils/data-tools';
|
||||
import { GenericDataService } from './GenericDataService';
|
||||
import { TypeCheck, isArrayOf, isNumber } from '@kangaroo-and-rabbit/kar-cw/utils';
|
||||
import { SessionService } from '@kangaroo-and-rabbit/kar-cw';
|
||||
import { DataTools } from '@kangaroo-and-rabbit/kar-cw/utils/data-tools';
|
||||
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
|
||||
|
||||
@Injectable()
|
||||
export class TrackService extends GenericDataService<Track> {
|
||||
@ -100,7 +100,7 @@ export class TrackService extends GenericDataService<Track> {
|
||||
],
|
||||
['name']); // tODO : set the Id in the track ...
|
||||
// filter with artist- ID !!!
|
||||
const listId = DataInterface.extractLimitOne(data, "id");
|
||||
const listId = DataTools.extractLimitOne(data, "id");
|
||||
resolve(listId);
|
||||
}).catch((response) => {
|
||||
reject(response);
|
||||
@ -240,7 +240,7 @@ export class TrackService extends GenericDataService<Track> {
|
||||
.then((response: Track[]) => {
|
||||
//console.log("==> get all tracks of the artist: " + JSON.stringify(data, null, 2));
|
||||
// extract a single time all value "id" in an array
|
||||
const listAlbumId = DataInterface.extractLimitOne(response, "albumId");
|
||||
const listAlbumId = DataTools.extractLimitOne(response, "albumId");
|
||||
if (isArrayOf(listAlbumId, isNumber)) {
|
||||
resolve(listAlbumId);
|
||||
} else {
|
||||
@ -268,7 +268,7 @@ export class TrackService extends GenericDataService<Track> {
|
||||
], ['id']);
|
||||
//console.log("==> get all tracks of the artist: " + JSON.stringify(data, null, 2));
|
||||
// extract a single time all value "id" in an array
|
||||
const listAlbumId = DataInterface.extractLimitOne(data, "albumId");
|
||||
const listAlbumId = DataTools.extractLimitOne(data, "albumId");
|
||||
resolve(listAlbumId.length);
|
||||
}).catch((response) => {
|
||||
reject(response);
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 0fd7c540ea5cdce19533338b3125e88d4ef442ef
|
Loading…
Reference in New Issue
Block a user