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