+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 9192c75..0000000
--- a/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# Angular 2 Essential Training
-
-This is the repository for my course, [Angular 2 Essential Training](https://www.lynda.com/AngularJS-tutorials/AngularJS-2-Essential-Training/422834-2.html).
-The full course is available at [lynda.com](https://lynda.com).
-
-## Course Description
-
-JavaScript frameworks help you code more quickly, by providing special functionality for developing specific types of web projects. Angular was designed by Google to address challenges programmers face building single-page applications. This course introduces you to the essentials of this "superheroic" framework, including declarative templates, two-way data binding, and dependency injection. Justin Schwartzenberger steps through the framework one feature at a time, focusing on the new component-based architecture of Angular 2. After completing this training, you'll be able to tackle the other project-based courses in our library and create your own Angular app.
-
-Topics include:
-- What is Angular?
-- Setting up an Angular template
-- Creating a component
-- Displaying data
-- Working with events
-- Using two-way data binding
-- Creating a subcomponent
-- Using the built-in HTTP module
-- Using the built-in router module
-
-## Instructions
-
-1. Make sure you have these installed
- - [node.js](http://nodejs.org/)
- - [git](http://git-scm.com/)
-
-2. Clone this repository into your local machine using the terminal (mac) or Gitbash (PC)
-
- `git clone https://github.com/LyndaExerciseFiles/angular2-essential-training.git`
-
-3. CD to the folder
-
- `cd angular2-essential-training`
-
-4. Run the following to install the project dependencies:
-
- `npm install`
-
-5. Run the npm start command to build the code, watch for file changes, and serve up the site locally:
-
- `npm start`
-
-The repository has a branch for each video starting point. For example, the branch **02-01b** is used as the starting code for the video *02-01 NgModule and the root module*. You can checkout branches using `git checkout ` and not have to re-run `npm install` each time since you will remain in the same root folder.
-
-Note that the site will run using `lite-server` and will be served up at the following local address:
- http://localhost:3000
-
-*If you use a code editor that launches its own web server please note that it may run on a different port number.
-You will want to use `npm start` for this project.*
-
-## More Stuff
-Check out some of my [other courses on lynda.com](https://lynda.com/justinschwartzenberger).
-You can also [follow me on twitter](https://twitter.com/schwarty), or read [my blog](http://schwarty.com).
\ No newline at end of file
diff --git a/app/app.component.ts b/app/app.component.ts
deleted file mode 100755
index ba31e20..0000000
--- a/app/app.component.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { Component } from '@angular/core';
-
-@Component({
- selector: 'mw-app',
- templateUrl: 'app/app.component.html',
- styleUrls: ['app/app.component.css']
-})
-export class AppComponent { }
diff --git a/app/media-item-list.component.html b/app/media-item-list.component.html
deleted file mode 100755
index 6bc2880..0000000
--- a/app/media-item-list.component.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
{{medium}}
-
{{ mediaItems | categoryList }}
-
-
-
-
-
\ No newline at end of file
diff --git a/app/media-item.component.ts b/app/media-item.component.ts
deleted file mode 100755
index 224c247..0000000
--- a/app/media-item.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, Input, Output, EventEmitter } from '@angular/core';
-
-@Component({
- selector: 'mw-media-item',
- templateUrl: 'app/media-item.component.html',
- styleUrls: ['app/media-item.component.css']
-})
-export class MediaItemComponent {
- @Input() mediaItem;
- @Output() delete = new EventEmitter();
-
- onDelete() {
- this.delete.emit(this.mediaItem);
- }
-}
diff --git a/app/media-item.service.ts b/app/media-item.service.ts
deleted file mode 100755
index bd16331..0000000
--- a/app/media-item.service.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { Injectable } from '@angular/core';
-import { Http, URLSearchParams } from '@angular/http';
-import 'rxjs/add/operator/map';
-
-@Injectable()
-export class MediaItemService {
- constructor(private http: Http) {}
-
- get(medium) {
- let searchParams = new URLSearchParams();
- searchParams.append('medium', medium);
- return this.http.get('mediaitems', { search: searchParams })
- .map(response => {
- return response.json().mediaItems;
- });
- }
-
- add(mediaItem) {
- return this.http.post('mediaitems', mediaItem)
- .map(response => {});
- }
-
- delete(mediaItem) {
- return this.http.delete(`mediaitems/${mediaItem.id}`)
- .map(response => {});
- }
-}
diff --git a/app/mock-xhr-backend.ts b/app/mock-xhr-backend.ts
deleted file mode 100755
index 84641b5..0000000
--- a/app/mock-xhr-backend.ts
+++ /dev/null
@@ -1,118 +0,0 @@
-import { Request, Response, ResponseOptions, RequestMethod } from '@angular/http';
-import { Observable } from 'rxjs/Observable';
-import { Observer } from 'rxjs/Observer';
-
-export class MockXHRBackend {
- constructor() {
- }
-
- createConnection(request: Request) {
- var response = new Observable((responseObserver: Observer) => {
- var responseData;
- var responseOptions;
- switch (request.method) {
- case RequestMethod.Get:
- if (request.url.indexOf('mediaitems?medium=') >= 0 || request.url === 'mediaitems') {
- var medium;
- if (request.url.indexOf('?') >= 0) {
- medium = request.url.split('=')[1];
- if (medium === 'undefined') medium = '';
- }
- var mediaItems;
- if (medium) {
- mediaItems = this._mediaItems.filter(mediaItem => mediaItem.medium === medium);
- } else {
- mediaItems = this._mediaItems;
- }
- responseOptions = new ResponseOptions({
- body: { mediaItems: JSON.parse(JSON.stringify(mediaItems)) },
- status: 200
- });
- } else {
- var id = parseInt(request.url.split('/')[1]);
- mediaItems = this._mediaItems.filter(mediaItem => mediaItem.id === id);
- responseOptions = new ResponseOptions({
- body: JSON.parse(JSON.stringify(mediaItems[0])),
- status: 200
- });
- }
- break;
- case RequestMethod.Post:
- var mediaItem = JSON.parse(request.text().toString());
- mediaItem.id = this._getNewId();
- this._mediaItems.push(mediaItem);
- responseOptions = new ResponseOptions({ status: 201 });
- break;
- case RequestMethod.Delete:
- var id = parseInt(request.url.split('/')[1]);
- this._deleteMediaItem(id);
- responseOptions = new ResponseOptions({ status: 200 });
- }
-
- var responseObject = new Response(responseOptions);
- responseObserver.next(responseObject);
- responseObserver.complete();
- return () => { };
- });
- return { response };
- }
-
- _deleteMediaItem(id) {
- var mediaItem = this._mediaItems.find(mediaItem => mediaItem.id === id);
- var index = this._mediaItems.indexOf(mediaItem);
- if (index >= 0) {
- this._mediaItems.splice(index, 1);
- }
- }
-
- _getNewId() {
- if (this._mediaItems.length > 0) {
- return Math.max.apply(Math, this._mediaItems.map(mediaItem => mediaItem.id)) + 1;
- }
- }
-
- _mediaItems = [
- {
- id: 1,
- name: "Firebug",
- medium: "Series",
- category: "Science Fiction",
- year: 2010,
- watchedOn: 1294166565384,
- isFavorite: false
- },
- {
- id: 2,
- name: "The Small Tall",
- medium: "Movies",
- category: "Comedy",
- year: 2015,
- watchedOn: null,
- isFavorite: true
- }, {
- id: 3,
- name: "The Redemption",
- medium: "Movies",
- category: "Action",
- year: 2016,
- watchedOn: null,
- isFavorite: false
- }, {
- id: 4,
- name: "Hoopers",
- medium: "Series",
- category: "Drama",
- year: null,
- watchedOn: null,
- isFavorite: true
- }, {
- id: 5,
- name: "Happy Joe: Cheery Road",
- medium: "Movies",
- category: "Action",
- year: 2015,
- watchedOn: 1457166565384,
- isFavorite: false
- }
- ];
-}
\ No newline at end of file
diff --git a/app/providers.ts b/app/providers.ts
deleted file mode 100755
index 4665768..0000000
--- a/app/providers.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { OpaqueToken } from '@angular/core';
-
-export const lookupListToken = new OpaqueToken('lookupListToken');
-
-export const lookupLists = {
- mediums: ['Movies', 'Series']
-};
\ No newline at end of file
diff --git a/catalogue/catalogue/.gitignore b/catalogue/catalogue/.gitignore
new file mode 100644
index 0000000..82eca33
--- /dev/null
+++ b/catalogue/catalogue/.gitignore
@@ -0,0 +1,25 @@
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/build/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
\ No newline at end of file
diff --git a/catalogue/catalogue/.mvn/wrapper/maven-wrapper.jar b/catalogue/catalogue/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 0000000..9cc84ea
Binary files /dev/null and b/catalogue/catalogue/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/catalogue/catalogue/.mvn/wrapper/maven-wrapper.properties b/catalogue/catalogue/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000..b573bb5
--- /dev/null
+++ b/catalogue/catalogue/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1 @@
+distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip
diff --git a/catalogue/catalogue/mvnw b/catalogue/catalogue/mvnw
new file mode 100644
index 0000000..5bf251c
--- /dev/null
+++ b/catalogue/catalogue/mvnw
@@ -0,0 +1,225 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+echo $MAVEN_PROJECTBASEDIR
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/catalogue/catalogue/mvnw.cmd b/catalogue/catalogue/mvnw.cmd
new file mode 100644
index 0000000..019bd74
--- /dev/null
+++ b/catalogue/catalogue/mvnw.cmd
@@ -0,0 +1,143 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/catalogue/catalogue/package-lock.json b/catalogue/catalogue/package-lock.json
new file mode 100644
index 0000000..48e341a
--- /dev/null
+++ b/catalogue/catalogue/package-lock.json
@@ -0,0 +1,3 @@
+{
+ "lockfileVersion": 1
+}
diff --git a/catalogue/catalogue/pom.xml b/catalogue/catalogue/pom.xml
new file mode 100644
index 0000000..6a1af61
--- /dev/null
+++ b/catalogue/catalogue/pom.xml
@@ -0,0 +1,198 @@
+
+
+ 4.0.0
+
+ com.example.moviesinc
+ catalogue
+ 0.0.1-SNAPSHOT
+ war
+
+ catalogue
+ Demo project for Spring Boot
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.0.2.RELEASE
+
+
+
+
+ UTF-8
+ UTF-8
+ 1.8
+ -Xmx1024m -XX:MaxPermSize=256m
+ 0.7.9
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ com.h2database
+ h2
+ runtime
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+ provided
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+ org.hibernate
+ hibernate-core
+ 4.1.4.Final
+
+
+ org.hibernate
+ hibernate-entitymanager
+ 5.2.3.Final
+
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+ prepare-agent
+
+ prepare-agent
+
+
+
+ report
+ prepare-package
+
+ report
+
+
+
+ post-unit-test
+ test
+
+ report
+
+
+ target/jacoco.exec
+ target/jacoco-ut
+
+
+
+
+
+
+
+
+ com.github.eirslett
+ frontend-maven-plugin
+ 1.0
+
+ src/main/resources/angular-app
+ temp
+
+
+
+
+ install node and npm
+
+ install-node-and-npm
+
+
+ v8.9.0
+ 3.9.5
+
+
+
+
+
+ npm install
+
+ npm
+
+
+ install
+
+
+
+
+ angular-cli install
+
+ npm
+
+
+ install --no-optional -g angular-cli
+
+
+
+
+ npm run ng-test
+ prepare-package
+
+ npm
+
+
+ run-script test
+
+
+
+
+
+ npm build
+
+ npm
+
+
+ run prod
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.15
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 2.6
+
+ false
+
+
+
+
+
+
+
+
+
+
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/CatalogueApplication.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/CatalogueApplication.java
new file mode 100644
index 0000000..c9b8a8b
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/CatalogueApplication.java
@@ -0,0 +1,14 @@
+package com.example.moviesinc;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class CatalogueApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(CatalogueApplication.class, args);
+ }
+
+}
+
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/DataLoader.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/DataLoader.java
new file mode 100644
index 0000000..42562aa
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/DataLoader.java
@@ -0,0 +1,51 @@
+package com.example.moviesinc;
+
+import com.example.moviesinc.catalogue.Model.Image;
+import com.example.moviesinc.catalogue.Model.MediaItem;
+import com.example.moviesinc.catalogue.Service.MediaItemService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+@Component
+public class DataLoader implements ApplicationRunner {
+
+ private Image image1 = new Image("./media/firebug1.png", true, true);
+ private Image image2 = new Image("./media/firebug2.png", false, false);
+ private Image image3 = new Image("./media/smalltall1.png", false, false);
+ private Image image4 = new Image("./media/smalltall2.png", false, true);
+
+ private List imageList1 = new ArrayList();
+ private List imageList2 = new ArrayList();
+
+ private MediaItem mediaItem1 = new MediaItem(1, "Firebug", "Series", "Science Fiction", 2010, 1.00, new Date(), "A1234567890", false);
+ private MediaItem mediaItem2 = new MediaItem(2, "The Small Tall", "Movies", "Comedy", 2015, 3.50, new Date(), "A1234567891", true);
+ private MediaItem mediaItem3 = new MediaItem(3, "The Redemption", "Movies", "Action", 2016, 4.7, new Date(), "A1234567892", false);
+ private MediaItem mediaItem4 = new MediaItem(4, "Hoopers", "Series", "Drama", 2013, 3.2, new Date(), "A1234567893", true);
+ private MediaItem mediaItem5 = new MediaItem(5, "Happy Joe: Cheery Road", "Movies", "Action", 2010, 1.9, new Date(), "A1234567894", false);
+
+ @Autowired
+ private MediaItemService mediaItemService ;
+
+ public void run(ApplicationArguments args) {
+ imageList1.add(image1);
+ imageList1.add(image2);
+ mediaItem1.setImages(imageList1);
+ mediaItemService.save(mediaItem1);
+
+ imageList2.add(image3);
+ imageList2.add(image4);
+ mediaItem2.setImages(imageList2);
+ mediaItemService.save(mediaItem2);
+
+ mediaItemService.save(mediaItem3);
+ mediaItemService.save(mediaItem4);
+ mediaItemService.save(mediaItem5);
+ }
+}
+
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/DAO/MediaItemDAO.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/DAO/MediaItemDAO.java
new file mode 100644
index 0000000..1fda16a
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/DAO/MediaItemDAO.java
@@ -0,0 +1,13 @@
+package com.example.moviesinc.catalogue.DAO;
+
+import com.example.moviesinc.catalogue.Model.MediaItem;
+
+import java.util.List;
+
+public interface MediaItemDAO {
+
+ List findMediaItems(String medium, String movieName, String category);
+
+ void save(MediaItem mediaItem);
+
+}
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/DAO/MediaItemDAOHib.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/DAO/MediaItemDAOHib.java
new file mode 100644
index 0000000..e777f10
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/DAO/MediaItemDAOHib.java
@@ -0,0 +1,33 @@
+package com.example.moviesinc.catalogue.DAO;
+
+import com.example.moviesinc.catalogue.Model.Image;
+import com.example.moviesinc.catalogue.Model.MediaItem;
+import org.springframework.stereotype.Repository;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static java.util.stream.Collectors.toList;
+
+@Repository
+public class MediaItemDAOHib implements MediaItemDAO {
+
+
+ private List mediaItemList = new ArrayList<>();
+
+ @Override
+ public List findMediaItems(String medium, String movieName, String category) {
+ List resultList = new ArrayList<>();
+ resultList = mediaItemList.stream().filter( !category.isEmpty() && !category.equalsIgnoreCase("All") ? m -> m.getCategory().equalsIgnoreCase(category) : m -> true).collect(toList());
+ resultList = resultList.stream().filter( !movieName.isEmpty() ? m -> m.getName().contains(movieName) : m -> true).collect(toList());
+ return resultList.stream().filter( !medium.isEmpty() && !medium.equalsIgnoreCase("All") ? m -> m.getMedium().equalsIgnoreCase(medium): m->true).collect(toList());
+ }
+
+ @Override
+ public void save(MediaItem mediaItem) {
+ mediaItemList.add(mediaItem);
+ }
+
+}
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Model/Filter.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Model/Filter.java
new file mode 100644
index 0000000..030c8ee
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Model/Filter.java
@@ -0,0 +1,24 @@
+package com.example.moviesinc.catalogue.Model;
+
+
+public class Filter {
+
+ private String movieName;
+ private String category;
+
+ public String getMovieName() {
+ return movieName;
+ }
+
+ public void setMovieName(String movieName) {
+ this.movieName = movieName;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+}
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Model/Image.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Model/Image.java
new file mode 100644
index 0000000..2347822
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Model/Image.java
@@ -0,0 +1,38 @@
+package com.example.moviesinc.catalogue.Model;
+
+public class Image {
+
+ private String imgSrc;
+ private Boolean selected;
+ private Boolean isAvailableFullSize;
+
+ public Image(String imgSrc, Boolean selected, Boolean isAvailableFullSize) {
+ this.imgSrc = imgSrc;
+ this.selected = selected;
+ this.isAvailableFullSize = isAvailableFullSize;
+ }
+
+ public String getImgSrc() {
+ return imgSrc;
+ }
+
+ public void setImgSrc(String imgSrc) {
+ this.imgSrc = imgSrc;
+ }
+
+ public Boolean getSelected() {
+ return selected;
+ }
+
+ public void setSelected(Boolean selected) {
+ this.selected = selected;
+ }
+
+ public Boolean getAvailableFullSize() {
+ return isAvailableFullSize;
+ }
+
+ public void setAvailableFullSize(Boolean availableFullSize) {
+ isAvailableFullSize = availableFullSize;
+ }
+}
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Model/MediaItem.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Model/MediaItem.java
new file mode 100644
index 0000000..71b9d7f
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Model/MediaItem.java
@@ -0,0 +1,126 @@
+package com.example.moviesinc.catalogue.Model;
+
+import javax.persistence.Entity;
+import java.util.Date;
+import java.util.List;
+
+@Entity
+public class MediaItem {
+ private int id;
+ private String name;
+ private String medium;
+ private String category;
+ private int year;
+ private Double rating;
+ private Date watchedOn;
+ private String movieId;
+ private Boolean isFavourite;
+ private List images;
+
+ public MediaItem(){}
+
+ public MediaItem(String name, String medium, String category, String year, Double rating, Date watchedOn, String movieId, Boolean isFavourite) {
+ this.id = id;
+ this.name = name;
+ this.medium = medium;
+ this.category = category;
+ this.year = Integer.parseInt(year);
+ this.rating = rating;
+ this.watchedOn = watchedOn;
+ this.movieId = movieId;
+ this.isFavourite = isFavourite;
+ }
+
+ public MediaItem(int id, String name, String medium, String category, int year, Double rating, Date watchedOn, String movieId, Boolean isFavourite) {
+ this.id = id;
+ this.name = name;
+ this.medium = medium;
+ this.category = category;
+ this.year = year;
+ this.rating = rating;
+ this.watchedOn = watchedOn;
+ this.movieId = movieId;
+ this.isFavourite = isFavourite;
+ }
+
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getMedium() {
+ return medium;
+ }
+
+ public void setMedium(String medium) {
+ this.medium = medium;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public int getYear() {
+ return year;
+ }
+
+ public void setYear(int year) {
+ this.year = year;
+ }
+
+ public Double getRating() {
+ return rating;
+ }
+
+ public void setRating(Double rating) {
+ this.rating = rating;
+ }
+
+ public Date getWatchedOn() {
+ return watchedOn;
+ }
+
+ public void setWatchedOn(Date watchedOn) {
+ this.watchedOn = watchedOn;
+ }
+
+ public String getMovieId() {
+ return movieId;
+ }
+
+ public void setMovieId(String movieId) {
+ this.movieId = movieId;
+ }
+
+ public Boolean getFavourite() {
+ return isFavourite;
+ }
+
+ public void setFavourite(Boolean favourite) {
+ isFavourite = favourite;
+ }
+
+ public List getImages() {
+ return images;
+ }
+
+ public void setImages(List images) {
+ this.images = images;
+ }
+}
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemBO.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemBO.java
new file mode 100644
index 0000000..2ef1522
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemBO.java
@@ -0,0 +1,13 @@
+package com.example.moviesinc.catalogue.Service;
+
+import com.example.moviesinc.catalogue.Model.MediaItem;
+
+import java.util.List;
+
+public interface MediaItemBO {
+
+ public List findMediaItems(String medium, String movieName, String category);
+
+ public void save(MediaItem mediaItem);
+
+}
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemBOImpl.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemBOImpl.java
new file mode 100644
index 0000000..9ed7a45
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemBOImpl.java
@@ -0,0 +1,27 @@
+package com.example.moviesinc.catalogue.Service;
+
+import com.example.moviesinc.catalogue.DAO.MediaItemDAO;
+import com.example.moviesinc.catalogue.DAO.MediaItemDAOHib;
+import com.example.moviesinc.catalogue.Model.MediaItem;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class MediaItemBOImpl implements MediaItemBO {
+
+ @Autowired
+ private MediaItemDAO mediaItemDAO;
+
+ @Override
+ public List findMediaItems(String medium, String movieName, String category) {
+ return mediaItemDAO.findMediaItems(medium, movieName, category);
+ }
+
+ @Override
+ public void save(MediaItem mediaItem) {
+ mediaItemDAO.save(mediaItem);
+ }
+
+}
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemService.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemService.java
new file mode 100644
index 0000000..ac9ceed
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemService.java
@@ -0,0 +1,13 @@
+package com.example.moviesinc.catalogue.Service;
+
+import com.example.moviesinc.catalogue.Model.MediaItem;
+
+import java.util.List;
+
+public interface MediaItemService {
+
+ public List findMediaItems(String medium, String movieName, String category);
+
+ public void save(MediaItem mediaItem);
+
+}
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemServiceImpl.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemServiceImpl.java
new file mode 100644
index 0000000..a42b502
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/Service/MediaItemServiceImpl.java
@@ -0,0 +1,25 @@
+package com.example.moviesinc.catalogue.Service;
+
+import com.example.moviesinc.catalogue.Model.MediaItem;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class MediaItemServiceImpl implements MediaItemService {
+
+ @Autowired
+ private MediaItemBO mediaItemBO;
+
+
+ @Override
+ public List findMediaItems(String medium, String mediaName, String category) {
+ return mediaItemBO.findMediaItems(medium, mediaName, category);
+ }
+
+ @Override
+ public void save(MediaItem mediaItem) {
+ mediaItemBO.save(mediaItem);
+ }
+}
diff --git a/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/WS/MediaItemWs.java b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/WS/MediaItemWs.java
new file mode 100644
index 0000000..c63473a
--- /dev/null
+++ b/catalogue/catalogue/src/main/java/com/example/moviesinc/catalogue/WS/MediaItemWs.java
@@ -0,0 +1,44 @@
+package com.example.moviesinc.catalogue.WS;
+
+import com.example.moviesinc.catalogue.Model.Filter;
+import com.example.moviesinc.catalogue.Model.MediaItem;
+import com.example.moviesinc.catalogue.Service.MediaItemService;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Service("mediaItemWs")
+@RestController
+@RequestMapping("/mediaitems")
+public class MediaItemWs {
+
+ @Autowired
+ public MediaItemService mediaItemService;
+
+ @RequestMapping
+ @CrossOrigin(origins = "http://localhost:4200")
+ public List findMediaItems(@RequestParam(defaultValue="All") String medium, @RequestParam(name="filter", required = false) String filterJson) {
+ ObjectMapper mapper = new ObjectMapper();
+ Filter filter = new Filter();
+ try {
+ filter = mapper.readValue(filterJson, Filter.class);
+ }catch (Exception e){
+ System.out.println("no filter");
+ }
+ if( filter != null) {
+ return mediaItemService.findMediaItems(medium, filter.getMovieName()!= null ? filter.getMovieName() : "", filter.getCategory()!= null ? filter.getCategory() : "");
+ } else {
+ return mediaItemService.findMediaItems(medium, null, null);
+ }
+ }
+
+ @PostMapping
+ @CrossOrigin(origins = "http://localhost:4200")
+ public void addMediaItem(@RequestBody MediaItem mediaItem) {
+ mediaItemService.save(mediaItem);
+ }
+
+}
diff --git a/catalogue/catalogue/src/main/resources/angular-app/.editorconfig b/catalogue/catalogue/src/main/resources/angular-app/.editorconfig
new file mode 100644
index 0000000..6e87a00
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/.editorconfig
@@ -0,0 +1,13 @@
+# Editor configuration, see http://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false
diff --git a/catalogue/catalogue/src/main/resources/angular-app/.gitignore b/catalogue/catalogue/src/main/resources/angular-app/.gitignore
new file mode 100644
index 0000000..ee5c9d8
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/.gitignore
@@ -0,0 +1,39 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/tmp
+/out-tsc
+
+# dependencies
+/node_modules
+
+# IDEs and editors
+/.idea
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# IDE - VSCode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+# misc
+/.sass-cache
+/connect.lock
+/coverage
+/libpeerconnection.log
+npm-debug.log
+yarn-error.log
+testem.log
+/typings
+
+# System Files
+.DS_Store
+Thumbs.db
diff --git a/catalogue/catalogue/src/main/resources/angular-app/README.md b/catalogue/catalogue/src/main/resources/angular-app/README.md
new file mode 100644
index 0000000..ce7ca01
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/README.md
@@ -0,0 +1,27 @@
+# Angular6Training
+
+This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.7.
+
+## Development server
+
+Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
+
+## Code scaffolding
+
+Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
+
+## Build
+
+Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
+
+## Running unit tests
+
+Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Running end-to-end tests
+
+Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
+
+## Further help
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
diff --git a/catalogue/catalogue/src/main/resources/angular-app/angular.json b/catalogue/catalogue/src/main/resources/angular-app/angular.json
new file mode 100644
index 0000000..c4c4793
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/angular.json
@@ -0,0 +1,127 @@
+{
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+ "version": 1,
+ "newProjectRoot": "projects",
+ "projects": {
+ "angular6-training": {
+ "root": "",
+ "sourceRoot": "src",
+ "projectType": "application",
+ "prefix": "app",
+ "schematics": {},
+ "architect": {
+ "build": {
+ "builder": "@angular-devkit/build-angular:browser",
+ "options": {
+ "outputPath": "../public",
+ "index": "src/index.html",
+ "main": "src/main.ts",
+ "polyfills": "src/polyfills.ts",
+ "tsConfig": "src/tsconfig.app.json",
+ "assets": [
+ "src/favicon.ico",
+ "src/assets"
+ ],
+ "styles": [
+ "src/styles.css"
+ ],
+ "scripts": []
+ },
+ "configurations": {
+ "production": {
+ "fileReplacements": [
+ {
+ "replace": "src/environments/environment.ts",
+ "with": "src/environments/environment.prod.ts"
+ }
+ ],
+ "optimization": true,
+ "outputHashing": "all",
+ "sourceMap": false,
+ "extractCss": true,
+ "namedChunks": false,
+ "aot": true,
+ "extractLicenses": true,
+ "vendorChunk": false,
+ "buildOptimizer": true
+ }
+ }
+ },
+ "serve": {
+ "builder": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "browserTarget": "angular6-training:build"
+ },
+ "configurations": {
+ "production": {
+ "browserTarget": "angular6-training:build:production"
+ }
+ }
+ },
+ "extract-i18n": {
+ "builder": "@angular-devkit/build-angular:extract-i18n",
+ "options": {
+ "browserTarget": "angular6-training:build"
+ }
+ },
+ "test": {
+ "builder": "@angular-devkit/build-angular:karma",
+ "options": {
+ "main": "src/test.ts",
+ "polyfills": "src/polyfills.ts",
+ "tsConfig": "src/tsconfig.spec.json",
+ "karmaConfig": "src/karma.conf.js",
+ "styles": [
+ "src/styles.css"
+ ],
+ "scripts": [],
+ "assets": [
+ "src/favicon.ico",
+ "src/assets"
+ ]
+ }
+ },
+ "lint": {
+ "builder": "@angular-devkit/build-angular:tslint",
+ "options": {
+ "tsConfig": [
+ "src/tsconfig.app.json",
+ "src/tsconfig.spec.json"
+ ],
+ "exclude": [
+ "**/node_modules/**"
+ ]
+ }
+ }
+ }
+ },
+ "angular6-training-e2e": {
+ "root": "e2e/",
+ "projectType": "application",
+ "architect": {
+ "e2e": {
+ "builder": "@angular-devkit/build-angular:protractor",
+ "options": {
+ "protractorConfig": "e2e/protractor.conf.js",
+ "devServerTarget": "angular6-training:serve"
+ },
+ "configurations": {
+ "production": {
+ "devServerTarget": "angular6-training:serve:production"
+ }
+ }
+ },
+ "lint": {
+ "builder": "@angular-devkit/build-angular:tslint",
+ "options": {
+ "tsConfig": "e2e/tsconfig.e2e.json",
+ "exclude": [
+ "**/node_modules/**"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "defaultProject": "angular6-training"
+}
diff --git a/catalogue/catalogue/src/main/resources/angular-app/e2e/protractor.conf.js b/catalogue/catalogue/src/main/resources/angular-app/e2e/protractor.conf.js
new file mode 100644
index 0000000..86776a3
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/e2e/protractor.conf.js
@@ -0,0 +1,28 @@
+// Protractor configuration file, see link for more information
+// https://github.com/angular/protractor/blob/master/lib/config.ts
+
+const { SpecReporter } = require('jasmine-spec-reporter');
+
+exports.config = {
+ allScriptsTimeout: 11000,
+ specs: [
+ './src/**/*.e2e-spec.ts'
+ ],
+ capabilities: {
+ 'browserName': 'chrome'
+ },
+ directConnect: true,
+ baseUrl: 'http://localhost:4200/',
+ framework: 'jasmine',
+ jasmineNodeOpts: {
+ showColors: true,
+ defaultTimeoutInterval: 30000,
+ print: function() {}
+ },
+ onPrepare() {
+ require('ts-node').register({
+ project: require('path').join(__dirname, './tsconfig.e2e.json')
+ });
+ jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
+ }
+};
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/e2e/src/app.e2e-spec.ts b/catalogue/catalogue/src/main/resources/angular-app/e2e/src/app.e2e-spec.ts
new file mode 100644
index 0000000..f7cd968
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/e2e/src/app.e2e-spec.ts
@@ -0,0 +1,14 @@
+import { AppPage } from './app.po';
+
+describe('workspace-project App', () => {
+ let page: AppPage;
+
+ beforeEach(() => {
+ page = new AppPage();
+ });
+
+ it('should display welcome message', () => {
+ page.navigateTo();
+ expect(page.getParagraphText()).toEqual('Welcome to angular6-training!');
+ });
+});
diff --git a/catalogue/catalogue/src/main/resources/angular-app/e2e/src/app.po.ts b/catalogue/catalogue/src/main/resources/angular-app/e2e/src/app.po.ts
new file mode 100644
index 0000000..82ea75b
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/e2e/src/app.po.ts
@@ -0,0 +1,11 @@
+import { browser, by, element } from 'protractor';
+
+export class AppPage {
+ navigateTo() {
+ return browser.get('/');
+ }
+
+ getParagraphText() {
+ return element(by.css('app-root h1')).getText();
+ }
+}
diff --git a/catalogue/catalogue/src/main/resources/angular-app/e2e/tsconfig.e2e.json b/catalogue/catalogue/src/main/resources/angular-app/e2e/tsconfig.e2e.json
new file mode 100644
index 0000000..a6dd622
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/e2e/tsconfig.e2e.json
@@ -0,0 +1,13 @@
+{
+ "extends": "../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../out-tsc/app",
+ "module": "commonjs",
+ "target": "es5",
+ "types": [
+ "jasmine",
+ "jasminewd2",
+ "node"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/package.json b/catalogue/catalogue/src/main/resources/angular-app/package.json
new file mode 100644
index 0000000..c5ff344
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "angular6-training",
+ "version": "0.0.0",
+ "scripts": {
+ "ng": "ng",
+ "start": "ng serve",
+ "build": "ng build",
+ "prod": "ng build --prod",
+ "test": "ng test",
+ "lint": "ng lint",
+ "e2e": "ng e2e"
+ },
+ "private": true,
+ "dependencies": {
+ "@angular/animations": "^6.0.3",
+ "@angular/common": "^6.0.3",
+ "@angular/compiler": "^6.0.3",
+ "@angular/core": "^6.0.3",
+ "@angular/forms": "^6.0.3",
+ "@angular/http": "^6.0.3",
+ "@angular/platform-browser": "^6.0.3",
+ "@angular/platform-browser-dynamic": "^6.0.3",
+ "@angular/router": "^6.0.3",
+ "core-js": "^2.5.4",
+ "intl": "^1.2.5",
+ "rxjs": "6.0.0",
+ "zone.js": "^0.8.26"
+ },
+ "devDependencies": {
+ "@angular-devkit/build-angular": "~0.6.6",
+ "@angular/cli": "~6.0.7",
+ "@angular/compiler-cli": "^6.0.3",
+ "@angular/language-service": "^6.0.3",
+ "@types/jasmine": "~2.8.6",
+ "@types/jasminewd2": "~2.0.3",
+ "@types/node": "~8.9.4",
+ "codelyzer": "~4.2.1",
+ "jasmine-core": "~2.99.1",
+ "jasmine-spec-reporter": "~4.2.1",
+ "karma": "~1.7.1",
+ "karma-coverage": "^0.1.5",
+ "karma-junit-reporter": "^1.2.0",
+ "karma-coverage-istanbul-reporter": "~2.0.0",
+ "karma-jasmine": "~1.1.1",
+ "karma-jasmine-html-reporter": "^0.2.2",
+ "karma-phantomjs-launcher": "^1.0.4",
+ "phantomjs-prebuilt": "^2.1.16",
+ "protractor": "~5.3.0",
+ "ts-node": "~5.0.1",
+ "tslint": "~5.9.1",
+ "typescript": "2.8.0"
+ }
+}
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/ApiXHRBackend.js b/catalogue/catalogue/src/main/resources/angular-app/src/app/ApiXHRBackend.js
new file mode 100644
index 0000000..894b3fd
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/ApiXHRBackend.js
@@ -0,0 +1,48 @@
+System.register(['@angular/core', '@angular/http'], function(exports_1, context_1) {
+ "use strict";
+ var __moduleName = context_1 && context_1.id;
+ var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+ var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+ };
+ var core_1, http_1;
+ var ApiXHRBackend;
+ return {
+ setters:[
+ function (core_1_1) {
+ core_1 = core_1_1;
+ },
+ function (http_1_1) {
+ http_1 = http_1_1;
+ }],
+ execute: function() {
+ ApiXHRBackend = (function (_super) {
+ __extends(ApiXHRBackend, _super);
+ function ApiXHRBackend() {
+ _super.apply(this, arguments);
+ }
+ ApiXHRBackend.prototype.createConnection = function (request) {
+ request.url = 'http://localhost:8080/' + request.url; // prefix base url
+ return _super.prototype.createConnection.call(this, request);
+ };
+ ApiXHRBackend = __decorate([
+ core_1.Injectable(),
+ __metadata('design:paramtypes', [])
+ ], ApiXHRBackend);
+ return ApiXHRBackend;
+ }(http_1.XHRBackend));
+ exports_1("ApiXHRBackend", ApiXHRBackend);
+ }
+ }
+});
+//# sourceMappingURL=ApiXHRBackend.js.map
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/ApiXHRBackend.js.map b/catalogue/catalogue/src/main/resources/angular-app/src/app/ApiXHRBackend.js.map
new file mode 100644
index 0000000..02dd4f2
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/ApiXHRBackend.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ApiXHRBackend.js","sourceRoot":"","sources":["ApiXHRBackend.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;YAIA;gBAAmC,iCAAU;gBAA7C;oBAAmC,8BAAU;gBAK7C,CAAC;gBAJG,wCAAgB,GAAhB,UAAiB,OAAgB;oBAC7B,OAAO,CAAC,GAAG,GAAG,wBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAK,kBAAkB;oBAC5E,MAAM,CAAC,gBAAK,CAAC,gBAAgB,YAAC,OAAO,CAAC,CAAC;gBAC3C,CAAC;gBALL;oBAAC,iBAAU,EAAE;;iCAAA;gBAMb,oBAAC;YAAD,CAAC,AALD,CAAmC,iBAAU,GAK5C;YALD,yCAKC,CAAA"}
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/ApiXHRBackend.ts b/catalogue/catalogue/src/main/resources/angular-app/src/app/ApiXHRBackend.ts
new file mode 100644
index 0000000..92b9ea8
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/ApiXHRBackend.ts
@@ -0,0 +1,10 @@
+import { Injectable } from '@angular/core';
+import {Request, XHRBackend, XHRConnection} from '@angular/http';
+
+@Injectable()
+export class ApiXHRBackend extends XHRBackend {
+ createConnection(request: Request): XHRConnection {
+ request.url = 'http://localhost:5005/' + request.url; // prefix base url
+ return super.createConnection(request);
+ }
+}
diff --git a/app/app.component.css b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.css
old mode 100755
new mode 100644
similarity index 94%
rename from app/app.component.css
rename to catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.css
index 779f65e..fbaad53
--- a/app/app.component.css
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.css
@@ -1,30 +1,30 @@
-:host {
- display: flex;
- font-family: Arial, Helvetica, sans-serif;
- min-height: 100%;
-}
-nav {
- display: flex;
- flex-direction: column;
- width: 68px;
- background-color: #53ace4;
-}
-nav .icon {
- width: 48px;
- height: 48px;
- margin: 10px;
-}
-section {
- width: 100%;
- background-color: #32435b;
-}
-section > header {
- color: #ffffff;
- padding: 10px;
-}
-section > header > h1 {
- font-size: 2em;
-}
-section > header .description {
- font-style: italic;
+:host {
+ display: flex;
+ font-family: Arial, Helvetica, sans-serif;
+ min-height: 100%;
+}
+nav {
+ display: flex;
+ flex-direction: column;
+ width: 68px;
+ background-color: #53ace4;
+}
+nav .icon {
+ width: 48px;
+ height: 48px;
+ margin: 10px;
+}
+section {
+ width: 100%;
+ background-color: #32435b;
+}
+section > header {
+ color: #ffffff;
+ padding: 10px;
+}
+section > header > h1 {
+ font-size: 2em;
+}
+section > header .description {
+ font-style: italic;
}
\ No newline at end of file
diff --git a/app/app.component.html b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.html
old mode 100755
new mode 100644
similarity index 64%
rename from app/app.component.html
rename to catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.html
index cbf7b49..5eae280
--- a/app/app.component.html
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.html
@@ -1,18 +1,18 @@
-
-
-
-
Media Watch List
-
Keeping track of the media I want to watch.
-
-
+
+
+
+
Media Watch List
+
Keeping track of the media I want to watch.
+
+
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.js b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.js
new file mode 100644
index 0000000..18e03ff
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.js
@@ -0,0 +1,38 @@
+System.register(['@angular/core'], function(exports_1, context_1) {
+ "use strict";
+ var __moduleName = context_1 && context_1.id;
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+ var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+ };
+ var core_1;
+ var AppComponent;
+ return {
+ setters:[
+ function (core_1_1) {
+ core_1 = core_1_1;
+ }],
+ execute: function() {
+ AppComponent = (function () {
+ function AppComponent() {
+ }
+ AppComponent = __decorate([
+ core_1.Component({
+ selector: 'mw-app',
+ templateUrl: 'app/app.component.html',
+ styleUrls: ['app/app.component.css']
+ }),
+ __metadata('design:paramtypes', [])
+ ], AppComponent);
+ return AppComponent;
+ }());
+ exports_1("AppComponent", AppComponent);
+ }
+ }
+});
+//# sourceMappingURL=app.component.js.map
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.js.map b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.js.map
new file mode 100644
index 0000000..6db2077
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"app.component.js","sourceRoot":"","sources":["app.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAOA;gBAAA;gBAEC,CAAC;gBAPF;oBAAC,gBAAS,CAAC;wBACT,QAAQ,EAAE,QAAQ;wBAClB,WAAW,EAAE,wBAAwB;wBACrC,SAAS,EAAE,CAAC,uBAAuB,CAAC;qBACrC,CAAC;;gCAAA;gBAGD,mBAAC;YAAD,CAAC,AAFF,IAEE;YAFF,uCAEE,CAAA"}
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.ts b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.ts
new file mode 100644
index 0000000..b73c369
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.component.ts
@@ -0,0 +1,10 @@
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'mw-app',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.css']
+})
+export class AppComponent {
+
+ }
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/app.module.js b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.module.js
new file mode 100644
index 0000000..64bfd55
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.module.js
@@ -0,0 +1,117 @@
+System.register(['@angular/core', '@angular/platform-browser', '@angular/forms', '@angular/http', './app.component', './media-item.component', './media-item-list.component', './favorite.directive', './category-list.pipe', './media-item-form.component', './media-item-popup.component', './poster-switcher.component', './fullsize.directive', './media-item.service', './providers', './list-utility.service', "./ApiXHRBackend", "./media-item-toolbar.component", './app.routing'], function(exports_1, context_1) {
+ "use strict";
+ var __moduleName = context_1 && context_1.id;
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+ var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+ };
+ var core_1, platform_browser_1, forms_1, http_1, app_component_1, media_item_component_1, media_item_list_component_1, favorite_directive_1, category_list_pipe_1, media_item_form_component_1, media_item_popup_component_1, poster_switcher_component_1, fullsize_directive_1, media_item_service_1, providers_1, list_utility_service_1, ApiXHRBackend_1, media_item_toolbar_component_1, app_routing_1;
+ var AppModule;
+ return {
+ setters:[
+ function (core_1_1) {
+ core_1 = core_1_1;
+ },
+ function (platform_browser_1_1) {
+ platform_browser_1 = platform_browser_1_1;
+ },
+ function (forms_1_1) {
+ forms_1 = forms_1_1;
+ },
+ function (http_1_1) {
+ http_1 = http_1_1;
+ },
+ function (app_component_1_1) {
+ app_component_1 = app_component_1_1;
+ },
+ function (media_item_component_1_1) {
+ media_item_component_1 = media_item_component_1_1;
+ },
+ function (media_item_list_component_1_1) {
+ media_item_list_component_1 = media_item_list_component_1_1;
+ },
+ function (favorite_directive_1_1) {
+ favorite_directive_1 = favorite_directive_1_1;
+ },
+ function (category_list_pipe_1_1) {
+ category_list_pipe_1 = category_list_pipe_1_1;
+ },
+ function (media_item_form_component_1_1) {
+ media_item_form_component_1 = media_item_form_component_1_1;
+ },
+ function (media_item_popup_component_1_1) {
+ media_item_popup_component_1 = media_item_popup_component_1_1;
+ },
+ function (poster_switcher_component_1_1) {
+ poster_switcher_component_1 = poster_switcher_component_1_1;
+ },
+ function (fullsize_directive_1_1) {
+ fullsize_directive_1 = fullsize_directive_1_1;
+ },
+ function (media_item_service_1_1) {
+ media_item_service_1 = media_item_service_1_1;
+ },
+ function (providers_1_1) {
+ providers_1 = providers_1_1;
+ },
+ function (list_utility_service_1_1) {
+ list_utility_service_1 = list_utility_service_1_1;
+ },
+ function (ApiXHRBackend_1_1) {
+ ApiXHRBackend_1 = ApiXHRBackend_1_1;
+ },
+ function (media_item_toolbar_component_1_1) {
+ media_item_toolbar_component_1 = media_item_toolbar_component_1_1;
+ },
+ function (app_routing_1_1) {
+ app_routing_1 = app_routing_1_1;
+ }],
+ execute: function() {
+ AppModule = (function () {
+ function AppModule() {
+ }
+ AppModule = __decorate([
+ core_1.NgModule({
+ imports: [
+ platform_browser_1.BrowserModule,
+ forms_1.ReactiveFormsModule,
+ http_1.HttpModule,
+ app_routing_1.routing
+ ],
+ declarations: [
+ app_component_1.AppComponent,
+ media_item_component_1.MediaItemComponent,
+ media_item_list_component_1.MediaItemListComponent,
+ favorite_directive_1.FavoriteDirective,
+ category_list_pipe_1.CategoryListPipe,
+ media_item_form_component_1.MediaItemFormComponent,
+ media_item_popup_component_1.MediaItemPopupComponent,
+ poster_switcher_component_1.PosterSwitcherComponent,
+ fullsize_directive_1.FullSizeDirective,
+ media_item_toolbar_component_1.MediaItemToolbarComponent
+ ],
+ providers: [
+ media_item_service_1.MediaItemService,
+ ApiXHRBackend_1.ApiXHRBackend,
+ list_utility_service_1.ListUtilityService,
+ { provide: providers_1.lookupListToken, useValue: providers_1.lookupLists },
+ { provide: http_1.XHRBackend, useClass: ApiXHRBackend_1.ApiXHRBackend }
+ ],
+ bootstrap: [
+ app_component_1.AppComponent
+ ]
+ }),
+ __metadata('design:paramtypes', [])
+ ], AppModule);
+ return AppModule;
+ }());
+ exports_1("AppModule", AppModule);
+ }
+ }
+});
+//# sourceMappingURL=app.module.js.map
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/app.module.js.map b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.module.js.map
new file mode 100644
index 0000000..60b299a
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.module.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"app.module.js","sourceRoot":"","sources":["app.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAmDA;gBAAA;gBAAwB,CAAC;gBA9BzB;oBAAC,eAAQ,CAAC;wBACR,OAAO,EAAE;4BACP,gCAAa;4BACb,2BAAmB;4BACnB,iBAAU;4BACV,qBAAO;yBACR;wBACD,YAAY,EAAE;4BACZ,4BAAY;4BACZ,yCAAkB;4BAClB,kDAAsB;4BACtB,sCAAiB;4BACjB,qCAAgB;4BAChB,kDAAsB;4BACtB,oDAAuB;4BACvB,mDAAuB;4BACvB,sCAAiB;4BACjB,wDAAyB;yBAC1B;wBACD,SAAS,EAAE;4BACT,qCAAgB;4BAChB,6BAAa;4BACb,yCAAkB;4BAClB,EAAE,OAAO,EAAE,2BAAe,EAAE,QAAQ,EAAE,uBAAW,EAAE;4BACnD,EAAE,OAAO,EAAE,iBAAU,EAAE,QAAQ,EAAE,6BAAa,EAAI;yBACnD;wBACD,SAAS,EAAE;4BACT,4BAAY;yBACb;qBACF,CAAC;;6BAAA;gBACsB,gBAAC;YAAD,CAAC,AAAzB,IAAyB;YAAzB,iCAAyB,CAAA"}
\ No newline at end of file
diff --git a/app/app.module.ts b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.module.ts
similarity index 64%
rename from app/app.module.ts
rename to catalogue/catalogue/src/main/resources/angular-app/src/app/app.module.ts
index ce3feab..55201d8 100644
--- a/app/app.module.ts
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.module.ts
@@ -9,9 +9,14 @@ import { MediaItemListComponent } from './media-item-list.component';
import { FavoriteDirective } from './favorite.directive';
import { CategoryListPipe } from './category-list.pipe';
import { MediaItemFormComponent } from './media-item-form.component';
+import { MediaItemPopupComponent } from './media-item-popup.component';
+import { PosterSwitcherComponent } from './poster-switcher.component';
+import { FullSizeDirective } from './fullsize.directive';
import { MediaItemService } from './media-item.service';
import { lookupListToken, lookupLists } from './providers';
-import { MockXHRBackend } from './mock-xhr-backend';
+import { ListUtilityService } from './list-utility.service';
+import { ApiXHRBackend } from "./ApiXHRBackend";
+import { MediaItemToolbarComponent } from "./media-item-toolbar.component";
import { routing } from './app.routing';
@NgModule({
@@ -27,12 +32,18 @@ import { routing } from './app.routing';
MediaItemListComponent,
FavoriteDirective,
CategoryListPipe,
- MediaItemFormComponent
+ MediaItemFormComponent,
+ MediaItemPopupComponent,
+ PosterSwitcherComponent,
+ FullSizeDirective,
+ MediaItemToolbarComponent
],
providers: [
MediaItemService,
+ ApiXHRBackend,
+ ListUtilityService,
{ provide: lookupListToken, useValue: lookupLists },
- { provide: XHRBackend, useClass: MockXHRBackend }
+ { provide: XHRBackend, useClass: ApiXHRBackend }
],
bootstrap: [
AppComponent
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/app.routing.js b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.routing.js
new file mode 100644
index 0000000..c8e32e8
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.routing.js
@@ -0,0 +1,27 @@
+System.register(['@angular/router', './media-item-form.component', './media-item-list.component'], function(exports_1, context_1) {
+ "use strict";
+ var __moduleName = context_1 && context_1.id;
+ var router_1, media_item_form_component_1, media_item_list_component_1;
+ var appRoutes, routing;
+ return {
+ setters:[
+ function (router_1_1) {
+ router_1 = router_1_1;
+ },
+ function (media_item_form_component_1_1) {
+ media_item_form_component_1 = media_item_form_component_1_1;
+ },
+ function (media_item_list_component_1_1) {
+ media_item_list_component_1 = media_item_list_component_1_1;
+ }],
+ execute: function() {
+ appRoutes = [
+ { path: 'add', component: media_item_form_component_1.MediaItemFormComponent },
+ { path: ':medium', component: media_item_list_component_1.MediaItemListComponent },
+ { path: '', pathMatch: 'full', redirectTo: 'all' }
+ ];
+ exports_1("routing", routing = router_1.RouterModule.forRoot(appRoutes));
+ }
+ }
+});
+//# sourceMappingURL=app.routing.js.map
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/app.routing.js.map b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.routing.js.map
new file mode 100644
index 0000000..889b518
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.routing.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"app.routing.js","sourceRoot":"","sources":["app.routing.ts"],"names":[],"mappings":";;;;QAKM,SAAS,EAMF,OAAO;;;;;;;;;;;;;YANd,SAAS,GAAW;gBACxB,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,kDAAsB,EAAE;gBAClD,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,kDAAsB,EAAE;gBACtD,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;aACnD,CAAC;YAEW,qBAAA,OAAO,GAAG,qBAAY,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA,CAAC"}
\ No newline at end of file
diff --git a/app/app.routing.ts b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.routing.ts
similarity index 88%
rename from app/app.routing.ts
rename to catalogue/catalogue/src/main/resources/angular-app/src/app/app.routing.ts
index 828565c..ae33b18 100644
--- a/app/app.routing.ts
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/app.routing.ts
@@ -6,7 +6,7 @@ import { MediaItemListComponent } from './media-item-list.component';
const appRoutes: Routes = [
{ path: 'add', component: MediaItemFormComponent },
{ path: ':medium', component: MediaItemListComponent },
- { path: '', pathMatch: 'full', redirectTo: 'all' }
+ { path: '', component: MediaItemListComponent }
];
export const routing = RouterModule.forRoot(appRoutes);
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/category-list.pipe.js b/catalogue/catalogue/src/main/resources/angular-app/src/app/category-list.pipe.js
new file mode 100644
index 0000000..455cff7
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/category-list.pipe.js
@@ -0,0 +1,45 @@
+System.register(['@angular/core'], function(exports_1, context_1) {
+ "use strict";
+ var __moduleName = context_1 && context_1.id;
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+ var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+ };
+ var core_1;
+ var CategoryListPipe;
+ return {
+ setters:[
+ function (core_1_1) {
+ core_1 = core_1_1;
+ }],
+ execute: function() {
+ CategoryListPipe = (function () {
+ function CategoryListPipe() {
+ }
+ CategoryListPipe.prototype.transform = function (mediaItems) {
+ var categories = [];
+ mediaItems.forEach(function (mediaItem) {
+ if (categories.indexOf(mediaItem.category) <= -1) {
+ categories.push(mediaItem.category);
+ }
+ });
+ return categories.join(', ');
+ };
+ CategoryListPipe = __decorate([
+ core_1.Pipe({
+ name: 'categoryList'
+ }),
+ __metadata('design:paramtypes', [])
+ ], CategoryListPipe);
+ return CategoryListPipe;
+ }());
+ exports_1("CategoryListPipe", CategoryListPipe);
+ }
+ }
+});
+//# sourceMappingURL=category-list.pipe.js.map
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/category-list.pipe.js.map b/catalogue/catalogue/src/main/resources/angular-app/src/app/category-list.pipe.js.map
new file mode 100644
index 0000000..4876079
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/category-list.pipe.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"category-list.pipe.js","sourceRoot":"","sources":["category-list.pipe.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAKA;gBAAA;gBAUA,CAAC;gBATC,oCAAS,GAAT,UAAU,UAAU;oBAClB,IAAI,UAAU,GAAG,EAAE,CAAC;oBACpB,UAAU,CAAC,OAAO,CAAC,UAAA,SAAS;wBAC1B,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;4BACjD,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;wBACtC,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC/B,CAAC;gBAZH;oBAAC,WAAI,CAAC;wBACJ,IAAI,EAAE,cAAc;qBACrB,CAAC;;oCAAA;gBAWF,uBAAC;YAAD,CAAC,AAVD,IAUC;YAVD,+CAUC,CAAA"}
\ No newline at end of file
diff --git a/app/category-list.pipe.ts b/catalogue/catalogue/src/main/resources/angular-app/src/app/category-list.pipe.ts
old mode 100755
new mode 100644
similarity index 95%
rename from app/category-list.pipe.ts
rename to catalogue/catalogue/src/main/resources/angular-app/src/app/category-list.pipe.ts
index 1e3b9a1..5941b58
--- a/app/category-list.pipe.ts
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/category-list.pipe.ts
@@ -1,16 +1,16 @@
-import { Pipe } from '@angular/core';
-
-@Pipe({
- name: 'categoryList'
-})
-export class CategoryListPipe {
- transform(mediaItems) {
- var categories = [];
- mediaItems.forEach(mediaItem => {
- if (categories.indexOf(mediaItem.category) <= -1) {
- categories.push(mediaItem.category);
- }
- });
- return categories.join(', ');
- }
+import { Pipe } from '@angular/core';
+
+@Pipe({
+ name: 'categoryList'
+})
+export class CategoryListPipe {
+ transform(mediaItems) {
+ var categories = [];
+ mediaItems.forEach(mediaItem => {
+ if (categories.indexOf(mediaItem.category) <= -1) {
+ categories.push(mediaItem.category);
+ }
+ });
+ return categories.join(', ');
+ }
}
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/favorite.directive.js b/catalogue/catalogue/src/main/resources/angular-app/src/app/favorite.directive.js
new file mode 100644
index 0000000..4ee6363
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/favorite.directive.js
@@ -0,0 +1,76 @@
+System.register(['@angular/core'], function(exports_1, context_1) {
+ "use strict";
+ var __moduleName = context_1 && context_1.id;
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+ var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+ };
+ var core_1;
+ var FavoriteDirective;
+ return {
+ setters:[
+ function (core_1_1) {
+ core_1 = core_1_1;
+ }],
+ execute: function() {
+ FavoriteDirective = (function () {
+ function FavoriteDirective() {
+ this.isFavorite = true;
+ this.hovering = false;
+ }
+ FavoriteDirective.prototype.onMouseEnter = function () {
+ this.hovering = true;
+ };
+ FavoriteDirective.prototype.onMouseLeave = function () {
+ this.hovering = false;
+ };
+ Object.defineProperty(FavoriteDirective.prototype, "mwFavorite", {
+ set: function (value) {
+ this.isFavorite = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ __decorate([
+ core_1.HostBinding('class.is-favorite'),
+ __metadata('design:type', Object)
+ ], FavoriteDirective.prototype, "isFavorite", void 0);
+ __decorate([
+ core_1.HostBinding('class.is-favorite-hovering'),
+ __metadata('design:type', Object)
+ ], FavoriteDirective.prototype, "hovering", void 0);
+ __decorate([
+ core_1.HostListener('mouseenter'),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
+ ], FavoriteDirective.prototype, "onMouseEnter", null);
+ __decorate([
+ core_1.HostListener('mouseleave'),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
+ ], FavoriteDirective.prototype, "onMouseLeave", null);
+ __decorate([
+ core_1.Input(),
+ __metadata('design:type', Object),
+ __metadata('design:paramtypes', [Object])
+ ], FavoriteDirective.prototype, "mwFavorite", null);
+ FavoriteDirective = __decorate([
+ core_1.Directive({
+ selector: '[mwFavorite]'
+ }),
+ __metadata('design:paramtypes', [])
+ ], FavoriteDirective);
+ return FavoriteDirective;
+ }());
+ exports_1("FavoriteDirective", FavoriteDirective);
+ }
+ }
+});
+//# sourceMappingURL=favorite.directive.js.map
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/favorite.directive.js.map b/catalogue/catalogue/src/main/resources/angular-app/src/app/favorite.directive.js.map
new file mode 100644
index 0000000..6b281ec
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/favorite.directive.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"favorite.directive.js","sourceRoot":"","sources":["favorite.directive.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAKA;gBAAA;oBACoC,eAAU,GAAG,IAAI,CAAC;oBAET,aAAQ,GAAG,KAAK,CAAC;gBAa9D,CAAC;gBAX6B,wCAAY,GAAZ;oBAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACvB,CAAC;gBAE2B,wCAAY,GAAZ;oBAC1B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACxB,CAAC;gBAEQ,sBAAI,yCAAU;yBAAd,UAAe,KAAK;wBAC3B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;oBAC1B,CAAC;;;mBAAA;gBAdD;oBAAC,kBAAW,CAAC,mBAAmB,CAAC;;qEAAA;gBAEjC;oBAAC,kBAAW,CAAC,4BAA4B,CAAC;;mEAAA;gBAE1C;oBAAC,mBAAY,CAAC,YAAY,CAAC;;;;qEAAA;gBAI3B;oBAAC,mBAAY,CAAC,YAAY,CAAC;;;;qEAAA;gBAI3B;oBAAC,YAAK,EAAE;;;mEAAA;gBAhBV;oBAAC,gBAAS,CAAC;wBACT,QAAQ,EAAE,cAAc;qBACzB,CAAC;;qCAAA;gBAiBF,wBAAC;YAAD,CAAC,AAhBD,IAgBC;YAhBD,iDAgBC,CAAA"}
\ No newline at end of file
diff --git a/app/favorite.directive.ts b/catalogue/catalogue/src/main/resources/angular-app/src/app/favorite.directive.ts
old mode 100755
new mode 100644
similarity index 95%
rename from app/favorite.directive.ts
rename to catalogue/catalogue/src/main/resources/angular-app/src/app/favorite.directive.ts
index d186912..96965e4
--- a/app/favorite.directive.ts
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/favorite.directive.ts
@@ -1,22 +1,22 @@
-import { Directive, HostBinding, HostListener, Input } from '@angular/core';
-
-@Directive({
- selector: '[mwFavorite]'
-})
-export class FavoriteDirective {
- @HostBinding('class.is-favorite') isFavorite = true;
-
- @HostBinding('class.is-favorite-hovering') hovering = false;
-
- @HostListener('mouseenter') onMouseEnter() {
- this.hovering = true;
- }
-
- @HostListener('mouseleave') onMouseLeave() {
- this.hovering = false;
- }
-
- @Input() set mwFavorite(value) {
- this.isFavorite = value;
- }
-}
+import { Directive, HostBinding, HostListener, Input } from '@angular/core';
+
+@Directive({
+ selector: '[mwFavorite]'
+})
+export class FavoriteDirective {
+ @HostBinding('class.is-favorite') isFavorite = true;
+
+ @HostBinding('class.is-favorite-hovering') hovering = false;
+
+ @HostListener('mouseenter') onMouseEnter() {
+ this.hovering = true;
+ }
+
+ @HostListener('mouseleave') onMouseLeave() {
+ this.hovering = false;
+ }
+
+ @Input() set mwFavorite(value) {
+ this.isFavorite = value;
+ }
+}
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/fullsize.directive.js b/catalogue/catalogue/src/main/resources/angular-app/src/app/fullsize.directive.js
new file mode 100644
index 0000000..3798023
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/fullsize.directive.js
@@ -0,0 +1,76 @@
+System.register(['@angular/core'], function(exports_1, context_1) {
+ "use strict";
+ var __moduleName = context_1 && context_1.id;
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+ var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+ };
+ var core_1;
+ var FullSizeDirective;
+ return {
+ setters:[
+ function (core_1_1) {
+ core_1 = core_1_1;
+ }],
+ execute: function() {
+ FullSizeDirective = (function () {
+ function FullSizeDirective() {
+ this.isFullSize = true;
+ this.hovering = false;
+ }
+ FullSizeDirective.prototype.onMouseEnter = function () {
+ this.hovering = true;
+ };
+ FullSizeDirective.prototype.onMouseLeave = function () {
+ this.hovering = false;
+ };
+ Object.defineProperty(FullSizeDirective.prototype, "mwFullSize", {
+ set: function (value) {
+ this.isFullSize = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ __decorate([
+ core_1.HostBinding('class.full-size'),
+ __metadata('design:type', Object)
+ ], FullSizeDirective.prototype, "isFullSize", void 0);
+ __decorate([
+ core_1.HostBinding('class.full-size-hovering'),
+ __metadata('design:type', Object)
+ ], FullSizeDirective.prototype, "hovering", void 0);
+ __decorate([
+ core_1.HostListener('mouseenter'),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
+ ], FullSizeDirective.prototype, "onMouseEnter", null);
+ __decorate([
+ core_1.HostListener('mouseleave'),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
+ ], FullSizeDirective.prototype, "onMouseLeave", null);
+ __decorate([
+ core_1.Input(),
+ __metadata('design:type', Object),
+ __metadata('design:paramtypes', [Object])
+ ], FullSizeDirective.prototype, "mwFullSize", null);
+ FullSizeDirective = __decorate([
+ core_1.Directive({
+ selector: '[mwFullSize]'
+ }),
+ __metadata('design:paramtypes', [])
+ ], FullSizeDirective);
+ return FullSizeDirective;
+ }());
+ exports_1("FullSizeDirective", FullSizeDirective);
+ }
+ }
+});
+//# sourceMappingURL=fullsize.directive.js.map
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/fullsize.directive.js.map b/catalogue/catalogue/src/main/resources/angular-app/src/app/fullsize.directive.js.map
new file mode 100644
index 0000000..fc10e1b
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/fullsize.directive.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"fullsize.directive.js","sourceRoot":"","sources":["fullsize.directive.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAKA;gBAAA;oBACkC,eAAU,GAAG,IAAI,CAAC;oBACT,aAAQ,GAAG,KAAK,CAAC;gBAa5D,CAAC;gBAX6B,wCAAY,GAAZ;oBAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACvB,CAAC;gBAC2B,wCAAY,GAAZ;oBAC1B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACxB,CAAC;gBAEQ,sBAAI,yCAAU;yBAAd,UAAe,KAAK;wBAC3B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;oBAC1B,CAAC;;;mBAAA;gBAZD;oBAAC,kBAAW,CAAC,iBAAiB,CAAC;;qEAAA;gBAC/B;oBAAC,kBAAW,CAAC,0BAA0B,CAAC;;mEAAA;gBAExC;oBAAC,mBAAY,CAAC,YAAY,CAAC;;;;qEAAA;gBAG3B;oBAAC,mBAAY,CAAC,YAAY,CAAC;;;;qEAAA;gBAI3B;oBAAC,YAAK,EAAE;;;mEAAA;gBAdV;oBAAC,gBAAS,CAAC;wBACT,QAAQ,EAAE,cAAc;qBACzB,CAAC;;qCAAA;gBAgBF,wBAAC;YAAD,CAAC,AAfD,IAeC;YAfD,iDAeC,CAAA"}
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/fullsize.directive.ts b/catalogue/catalogue/src/main/resources/angular-app/src/app/fullsize.directive.ts
new file mode 100644
index 0000000..4478fa5
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/fullsize.directive.ts
@@ -0,0 +1,21 @@
+import { Directive, HostBinding, HostListener, Input } from '@angular/core';
+
+@Directive({
+ selector: '[mwFullSize]'
+})
+export class FullSizeDirective {
+ @HostBinding('class.full-size') isFullSize = true;
+ @HostBinding('class.full-size-hovering') hovering = false;
+
+ @HostListener('mouseenter') onMouseEnter() {
+ this.hovering = true;
+ }
+ @HostListener('mouseleave') onMouseLeave() {
+ this.hovering = false;
+ }
+
+ @Input() set mwFullSize(value){
+ this.isFullSize = value;
+ }
+
+}
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/list-utility.service.js b/catalogue/catalogue/src/main/resources/angular-app/src/app/list-utility.service.js
new file mode 100644
index 0000000..f20be85
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/list-utility.service.js
@@ -0,0 +1,40 @@
+System.register(['lodash'], function(exports_1, context_1) {
+ "use strict";
+ var __moduleName = context_1 && context_1.id;
+ var _;
+ var ListUtilityService;
+ return {
+ setters:[
+ function (_1) {
+ _ = _1;
+ }],
+ execute: function() {
+ ListUtilityService = (function () {
+ function ListUtilityService() {
+ }
+ ListUtilityService.prototype.filter = function (listToSearch, propertyName, operator, value) {
+ return _.filter(listToSearch, function (obj) {
+ if (operator === "contains") {
+ return obj[propertyName].includes(value);
+ }
+ if (operator === "equals") {
+ return obj[propertyName] === value;
+ }
+ if (operator === "startswith") {
+ return obj[propertyName].startsWith(value);
+ }
+ if (operator === "lessThan") {
+ return obj[propertyName] < value;
+ }
+ if (operator === "greaterThan") {
+ return obj[propertyName] > value;
+ }
+ });
+ };
+ return ListUtilityService;
+ }());
+ exports_1("ListUtilityService", ListUtilityService);
+ }
+ }
+});
+//# sourceMappingURL=list-utility.service.js.map
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/list-utility.service.js.map b/catalogue/catalogue/src/main/resources/angular-app/src/app/list-utility.service.js.map
new file mode 100644
index 0000000..e1126b8
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/list-utility.service.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"list-utility.service.js","sourceRoot":"","sources":["list-utility.service.ts"],"names":[],"mappings":";;;;;;;;;;;YAEA;gBAAA;gBA0BA,CAAC;gBAzBC,mCAAM,GAAN,UAAO,YAA2B,EAAE,YAAoB,EAAE,QAAgB,EAAE,KAAS;oBACjF,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,UAAS,GAAG;wBACtC,EAAE,CAAA,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC;4BAC3B,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;wBAC3C,CAAC;wBAED,EAAE,CAAA,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC;4BAEzB,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,KAAK,CAAC;wBACrC,CAAC;wBAED,EAAE,CAAA,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC;4BAC7B,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;wBAC7C,CAAC;wBAED,EAAE,CAAA,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC;4BAC3B,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC;wBACnC,CAAC;wBAED,EAAE,CAAA,CAAC,QAAQ,KAAK,aAAa,CAAC,CAAC,CAAC;4BAC9B,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC;wBACnC,CAAC;oBAEL,CAAC,CAAC,CAAA;gBACN,CAAC;gBACH,yBAAC;YAAD,CAAC,AA1BD,IA0BC;YA1BD,mDA0BC,CAAA"}
\ No newline at end of file
diff --git a/catalogue/catalogue/src/main/resources/angular-app/src/app/list-utility.service.ts b/catalogue/catalogue/src/main/resources/angular-app/src/app/list-utility.service.ts
new file mode 100644
index 0000000..57e1704
--- /dev/null
+++ b/catalogue/catalogue/src/main/resources/angular-app/src/app/list-utility.service.ts
@@ -0,0 +1,29 @@
+import * as _ from 'lodash';
+
+export class ListUtilityService{
+ filter(listToSearch: Array