From 76ccc83e97d0bba4bb09cd42eee3e5464a9ef255 Mon Sep 17 00:00:00 2001 From: mustafahlvc Date: Thu, 3 Aug 2017 11:21:19 +0300 Subject: [PATCH] (Contacts App) Done for now. --- package-lock.json | 1025 +---------------- package.json | 26 +- .../event-form/event-form.component.html | 4 - .../contact-form/contact-form.component.html | 223 ++-- .../contact-form/contact-form.component.scss | 1 + .../contact-form/contact-form.component.ts | 31 +- .../contact-list/contact-list.component.html | 13 +- .../contact-list/contact-list.component.scss | 7 + .../contact-list/contact-list.component.ts | 100 +- .../content/apps/contacts/contact.model.ts | 28 +- .../apps/contacts/contacts.component.html | 84 +- .../content/apps/contacts/contacts.service.ts | 23 +- .../selected-bar/selected-bar.component.ts | 20 +- 13 files changed, 300 insertions(+), 1285 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2358f288..941259af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@angular/animations": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-4.3.2.tgz", - "integrity": "sha1-tNsX10PIzWlSplfnZRHaCEMvsj8=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-4.3.3.tgz", + "integrity": "sha1-tx3dRTZzkp9VCxccypmVKzqqgxw=", "requires": { "tslib": "1.7.1" } @@ -21,13 +21,13 @@ } }, "@angular/cli": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-1.2.5.tgz", - "integrity": "sha1-1zRgp1SoGzNEITRIQRAMhmUnaoE=", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-1.2.6.tgz", + "integrity": "sha1-du4g9yNC2bYeGiVU9WfJnmfc8Us=", "dev": true, "requires": { "@ngtools/json-schema": "1.1.0", - "@ngtools/webpack": "1.5.4", + "@ngtools/webpack": "1.5.5", "autoprefixer": "6.7.7", "chalk": "2.0.1", "circular-dependency-plugin": "3.0.0", @@ -87,35 +87,57 @@ "webpack-dev-server": "2.4.5", "webpack-merge": "2.6.1", "zone.js": "0.8.16" + }, + "dependencies": { + "@ngtools/webpack": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-1.5.5.tgz", + "integrity": "sha1-1uKpMxhAFWU9474z04Q3/dgQCec=", + "dev": true, + "requires": { + "loader-utils": "1.1.0", + "magic-string": "0.22.3", + "source-map": "0.5.6" + } + } } }, "@angular/common": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-4.3.2.tgz", - "integrity": "sha1-L72Xs56EU5nDRX4dVavGsfYOCbg=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-4.3.3.tgz", + "integrity": "sha1-H6++ozr066TN3YZ371eg92pQSIw=", "requires": { "tslib": "1.7.1" } }, "@angular/compiler": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-4.3.2.tgz", - "integrity": "sha1-t5ItCyCHqC57UWocERpZkwVPaLM=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-4.3.3.tgz", + "integrity": "sha1-jBWC/iinhEATJeUaBKmza2cSAz4=", "requires": { "tslib": "1.7.1" } }, "@angular/compiler-cli": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-4.3.1.tgz", - "integrity": "sha1-ALQa+2+utK71YbhCeASsiICv9jw=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-4.3.3.tgz", + "integrity": "sha1-s+OZkdGirBRFpKehIuKdzlSSxjc=", "dev": true, "requires": { - "@angular/tsc-wrapped": "4.3.1", + "@angular/tsc-wrapped": "4.3.3", "minimist": "1.2.0", "reflect-metadata": "0.1.10" }, "dependencies": { + "@angular/tsc-wrapped": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/tsc-wrapped/-/tsc-wrapped-4.3.3.tgz", + "integrity": "sha1-xYkPdDZkvmS3nCAK5unaXSqAH1s=", + "dev": true, + "requires": { + "tsickle": "0.21.6" + } + }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", @@ -125,9 +147,9 @@ } }, "@angular/core": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-4.3.2.tgz", - "integrity": "sha1-6ng0HDUBrY9DtR/7GD4gDcGYRMM=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-4.3.3.tgz", + "integrity": "sha1-jmp2kUZh20B/otiN0kQcTAFv9iU=", "requires": { "tslib": "1.7.1" } @@ -138,25 +160,25 @@ "integrity": "sha1-uc9XhlqTyhWP5W2FCVJCPySNEDs=" }, "@angular/forms": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-4.3.2.tgz", - "integrity": "sha1-bnw2PtmUkn3O/RoZGJnNt74CzsY=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-4.3.3.tgz", + "integrity": "sha1-CRKuu4GKF29OCLffDsn9QCHvy2s=", "requires": { "tslib": "1.7.1" } }, "@angular/http": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-4.3.2.tgz", - "integrity": "sha1-hRpWtwDmz95ml3aIPTKwSB4NUwc=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-4.3.3.tgz", + "integrity": "sha1-y+NjkBA2K2gQdvC2Bmc6DmL9lA0=", "requires": { "tslib": "1.7.1" } }, "@angular/language-service": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-4.3.1.tgz", - "integrity": "sha1-mRCDP8id2qw+SNP/r4u4k2GM2hE=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-4.3.3.tgz", + "integrity": "sha1-Y4z8oTQsOU9xP4wPo5jCYDLhVvQ=", "dev": true }, "@angular/material": { @@ -168,56 +190,35 @@ } }, "@angular/platform-browser": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-4.3.2.tgz", - "integrity": "sha1-f/D2pcKfE4+u63q4COt6sgKghZQ=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-4.3.3.tgz", + "integrity": "sha1-Yjtll5TweQltT3aFtL68tJ47mnE=", "requires": { "tslib": "1.7.1" } }, "@angular/platform-browser-dynamic": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.3.2.tgz", - "integrity": "sha1-9DTxoucPU4A/Gfj9T0ZlFvw07tU=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.3.3.tgz", + "integrity": "sha1-sWwJ3+l7W4PaoFgbIz9eo8Pu+zo=", "requires": { "tslib": "1.7.1" } }, "@angular/router": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-4.3.2.tgz", - "integrity": "sha1-ce3I/n/kY4pm0VVNV4VFHcrSQoQ=", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-4.3.3.tgz", + "integrity": "sha1-8/kATsMbT+TRVHfh5j4RjfNq1G0=", "requires": { "tslib": "1.7.1" } }, - "@angular/tsc-wrapped": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@angular/tsc-wrapped/-/tsc-wrapped-4.3.1.tgz", - "integrity": "sha1-9mFqTSo7vsHN7WZP0fUm7c6Z70E=", - "dev": true, - "requires": { - "tsickle": "0.21.6" - } - }, "@ngtools/json-schema": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=", "dev": true }, - "@ngtools/webpack": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-1.5.4.tgz", - "integrity": "sha1-ooHJXAfbpEyVxqI01leIAoWvDd0=", - "dev": true, - "requires": { - "enhanced-resolve": "3.3.0", - "loader-utils": "1.1.0", - "magic-string": "0.22.3", - "source-map": "0.5.6" - } - }, "@swimlane/ngx-datatable": { "version": "9.3.1", "resolved": "https://registry.npmjs.org/@swimlane/ngx-datatable/-/ngx-datatable-9.3.1.tgz", @@ -1201,7 +1202,6 @@ "requires": { "anymatch": "1.3.0", "async-each": "1.0.1", - "fsevents": "1.1.2", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -2931,905 +2931,6 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "fsevents": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", - "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", - "dev": true, - "optional": true, - "requires": { - "nan": "2.6.2", - "node-pre-gyp": "0.6.36" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true, - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "dev": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true, - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true, - "dev": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "dev": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.36", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true, - "dev": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "dev": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "dev": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true, - "dev": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "dev": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - } - } - }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", @@ -5777,9 +4878,9 @@ "integrity": "sha512-xWFpvOc+0WOD2kppPDlN1q5p58jgQDgUSsier/xi1i0HaVuU+BgNCo7aFPAKHaovw0Gv1WWp5GPAdpjXdUe7KA==" }, "ngx-perfect-scrollbar": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/ngx-perfect-scrollbar/-/ngx-perfect-scrollbar-4.5.2.tgz", - "integrity": "sha512-BsC0pZr+RKnj6QXXPI82X0oVXE5SECuOYsPSG+ojBhPRLKDlxvWY8e44DcEpL732/Q0EAyacv31zHidRKE+KjA==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/ngx-perfect-scrollbar/-/ngx-perfect-scrollbar-4.5.3.tgz", + "integrity": "sha512-XM5oyHFQCutV8IzAAIxbIWSTmVTgiijzm5IV2IUZcouOOdyXRlGKqdeLMUCM2OVuNjs88oWtxDz0I1qVyvzL8A==", "requires": { "perfect-scrollbar": "0.7.1" } diff --git a/package.json b/package.json index 765ba6c4..cdbb4751 100644 --- a/package.json +++ b/package.json @@ -12,18 +12,18 @@ }, "private": true, "dependencies": { - "@angular/animations": "^4.3.2", + "@angular/animations": "^4.3.3", "@angular/cdk": "^2.0.0-beta.8", - "@angular/common": "^4.3.2", - "@angular/compiler": "^4.3.2", - "@angular/core": "^4.3.2", + "@angular/common": "^4.3.3", + "@angular/compiler": "^4.3.3", + "@angular/core": "^4.3.3", "@angular/flex-layout": "2.0.0-beta.8", - "@angular/forms": "^4.3.2", - "@angular/http": "^4.3.2", + "@angular/forms": "^4.3.3", + "@angular/http": "^4.3.3", "@angular/material": "^2.0.0-beta.8", - "@angular/platform-browser": "^4.3.2", - "@angular/platform-browser-dynamic": "^4.3.2", - "@angular/router": "^4.3.2", + "@angular/platform-browser": "^4.3.3", + "@angular/platform-browser-dynamic": "^4.3.3", + "@angular/router": "^4.3.3", "@swimlane/ngx-datatable": "^9.3.1", "@swimlane/ngx-dnd": "^2.2.0", "angular-calendar": "^0.19.0", @@ -34,14 +34,14 @@ "highlight.js": "^9.12.0", "moment": "^2.18.1", "ngx-color-picker": "^4.2.0", - "ngx-perfect-scrollbar": "^4.5.2", + "ngx-perfect-scrollbar": "^4.5.3", "rxjs": "^5.4.2", "zone.js": "^0.8.16" }, "devDependencies": { - "@angular/cli": "^1.2.5", - "@angular/compiler-cli": "^4.3.1", - "@angular/language-service": "^4.3.1", + "@angular/cli": "^1.2.6", + "@angular/compiler-cli": "^4.3.3", + "@angular/language-service": "^4.3.3", "@types/jasmine": "^2.5.53", "@types/jasminewd2": "^2.0.2", "@types/node": "^6.0.83", diff --git a/src/app/main/content/apps/calendar/event-form/event-form.component.html b/src/app/main/content/apps/calendar/event-form/event-form.component.html index 170ef2af..97fbf6f7 100644 --- a/src/app/main/content/apps/calendar/event-form/event-form.component.html +++ b/src/app/main/content/apps/calendar/event-form/event-form.component.html @@ -64,10 +64,6 @@ - - - -
diff --git a/src/app/main/content/apps/contacts/contact-form/contact-form.component.html b/src/app/main/content/apps/contacts/contact-form/contact-form.component.html index c67943d2..4e930385 100644 --- a/src/app/main/content/apps/contacts/contact-form/contact-form.component.html +++ b/src/app/main/content/apps/contacts/contact-form/contact-form.component.html @@ -17,173 +17,85 @@
-
- account_circle - - - -
+
-
- - - - -
+
+ account_circle + + + +
-
- star - - - -
+
+ + + + +
-
- phone - - - -
+
+ star + + + +
-
- email - - - -
+
+ phone + + + +
-
- domain - - - -
+
+ email + + + +
-
- work - - - -
+
+ domain + + + +
- +
+ work + + + +
-
- home - - - -
+
+ + + + + +
-
- note - - - -
+
+ home + + + +
+
+ note + + + +
+ +
- diff --git a/src/app/main/content/apps/contacts/contact-form/contact-form.component.scss b/src/app/main/content/apps/contacts/contact-form/contact-form.component.scss index 45f889e5..1648e1df 100644 --- a/src/app/main/content/apps/contacts/contact-form/contact-form.component.scss +++ b/src/app/main/content/apps/contacts/contact-form/contact-form.component.scss @@ -1,4 +1,5 @@ .contact-form-dialog { + .mat-dialog-container { padding: 0; max-width: 400px; diff --git a/src/app/main/content/apps/contacts/contact-form/contact-form.component.ts b/src/app/main/content/apps/contacts/contact-form/contact-form.component.ts index 1cf2c453..9243399c 100644 --- a/src/app/main/content/apps/contacts/contact-form/contact-form.component.ts +++ b/src/app/main/content/apps/contacts/contact-form/contact-form.component.ts @@ -26,12 +26,12 @@ export class ContactFormDialogComponent implements OnInit private formBuilder: FormBuilder ) { - this.contact = data.contact; this.action = data.action; if ( this.action === 'edit' ) { this.dialogTitle = 'Edit Contact'; + this.contact = data.contact; } else { @@ -39,7 +39,7 @@ export class ContactFormDialogComponent implements OnInit this.contact = new Contact({}); } - // this.contactForm = this.createContactForm(); + this.contactForm = this.createContactForm(); } ngOnInit() @@ -48,20 +48,19 @@ export class ContactFormDialogComponent implements OnInit createContactForm() { - return new FormGroup({ - title : new FormControl(this.event.title), - start : new FormControl(this.event.start), - end : new FormControl(this.event.end), - allDay: new FormControl(this.event.allDay), - color : this.formBuilder.group({ - primary : new FormControl(this.event.color.primary), - secondary: new FormControl(this.event.color.secondary) - }), - meta : - this.formBuilder.group({ - location: new FormControl(this.event.meta.location), - notes : new FormControl(this.event.meta.notes) - }) + return this.formBuilder.group({ + id : [this.contact.id], + name : [this.contact.name], + lastName: [this.contact.lastName], + avatar : [this.contact.avatar], + nickname: [this.contact.nickname], + company : [this.contact.company], + jobTitle: [this.contact.jobTitle], + email : [this.contact.email], + phone : [this.contact.phone], + address : [this.contact.address], + birthday: [this.contact.birthday], + notes : [this.contact.notes] }); } } diff --git a/src/app/main/content/apps/contacts/contact-list/contact-list.component.html b/src/app/main/content/apps/contacts/contact-list/contact-list.component.html index 538469f8..bccbfdd6 100644 --- a/src/app/main/content/apps/contacts/contact-list/contact-list.component.html +++ b/src/app/main/content/apps/contacts/contact-list/contact-list.component.html @@ -72,18 +72,18 @@
- - @@ -100,3 +100,10 @@ md-ripple> + + + + + diff --git a/src/app/main/content/apps/contacts/contact-list/contact-list.component.scss b/src/app/main/content/apps/contacts/contact-list/contact-list.component.scss index 20a7e0c3..074df496 100644 --- a/src/app/main/content/apps/contacts/contact-list/contact-list.component.scss +++ b/src/app/main/content/apps/contacts/contact-list/contact-list.component.scss @@ -37,3 +37,10 @@ } } } + +#add-contact-button { + position: fixed; + bottom: 12px; + right: 12px; + padding: 0; +} diff --git a/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts b/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts index 12747e39..a5034a32 100644 --- a/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts +++ b/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts @@ -5,6 +5,7 @@ import { Observable } from 'rxjs/Observable'; import { ContactFormDialogComponent } from '../contact-form/contact-form.component'; import { MdDialog, MdDialogRef } from '@angular/material'; import { FuseConfirmDialogComponent } from '../../../../../core/components/confirm-dialog/confirm-dialog.component'; +import { FormGroup } from '@angular/forms'; @Component({ selector : 'fuse-contacts-contact-list', @@ -60,10 +61,30 @@ export class ContactListComponent implements OnInit this.dataSource = new FilesDataSource(this.contactsService); } + newContact() + { + this.dialogRef = this.dialog.open(ContactFormDialogComponent, { + panelClass: 'contact-form-dialog', + data : { + action: 'new' + } + }); + + this.dialogRef.afterClosed() + .subscribe((response: FormGroup) => { + if ( !response ) + { + return; + } + + this.contactsService.updateContact(response.getRawValue()); + + }); + + } + editContact(contact) { - // this.fileManagerService.onContactSelected.next(selected); - this.dialogRef = this.dialog.open(ContactFormDialogComponent, { panelClass: 'contact-form-dialog', data : { @@ -72,35 +93,55 @@ export class ContactListComponent implements OnInit } }); - /* this.dialogRef.afterClosed() - .subscribe(response => { - if ( !response ) - { - return; - } - const actionType: string = response[0]; - const formData: FormGroup = response[1]; - switch ( actionType ) - { - /!** - * Save - *!/ - case 'save': + this.dialogRef.afterClosed() + .subscribe(response => { + if ( !response ) + { + return; + } + const actionType: string = response[0]; + const formData: FormGroup = response[1]; + switch ( actionType ) + { + /** + * Save + */ + case 'save': - this.events[eventIndex] = Object.assign(this.events[eventIndex], formData.getRawValue()); - this.refresh.next(true); + this.contactsService.updateContact(formData.getRawValue()); - break; - /!** - * Delete - *!/ - case 'delete': + break; + /** + * Delete + */ + case 'delete': - this.deleteEvent(event); + this.deleteContact(contact); + + break; + } + }); + } + + /** + * Delete Contact + */ + deleteContact(contact) + { + this.confirmDialogRef = this.dialog.open(FuseConfirmDialogComponent, { + disableClose: false + }); + + this.confirmDialogRef.componentInstance.confirmMessage = 'Are you sure you want to delete?'; + + this.confirmDialogRef.afterClosed().subscribe(result => { + if ( result ) + { + this.contactsService.deleteContact(contact); + } + this.confirmDialogRef = null; + }); - break; - } - });*/ } onSelectedChange(contactId) @@ -121,11 +162,6 @@ export class ContactListComponent implements OnInit this.contactsService.updateUserData(this.user); } - - removeContact(contactId) - { - - } } export class FilesDataSource extends DataSource diff --git a/src/app/main/content/apps/contacts/contact.model.ts b/src/app/main/content/apps/contacts/contact.model.ts index 9cd2a8f4..b101e2c5 100644 --- a/src/app/main/content/apps/contacts/contact.model.ts +++ b/src/app/main/content/apps/contacts/contact.model.ts @@ -1,3 +1,5 @@ +import { FuseUtils } from '../../../../core/fuseUtils'; + export class Contact { id: string; @@ -16,20 +18,18 @@ export class Contact constructor(contact) { { - - this.id = contact.id; - this.name = contact.name; - this.lastName = contact.lastName; - this.avatar = contact.avatar; - this.nickname = contact.nickname; - this.company = contact.company; - this.jobTitle = contact.jobTitle; - this.email = contact.email; - this.phone = contact.phone; - this.address = contact.address; - this.birthday = contact.birhday; - this.notes = contact.notes; + this.id = contact.id || FuseUtils.genearateGUID(); + this.name = contact.name || ''; + this.lastName = contact.lastName || ''; + this.avatar = contact.avatar || 'assets/images/avatars/profile.jpg'; + this.nickname = contact.nickname || ''; + this.company = contact.company || ''; + this.jobTitle = contact.jobTitle || ''; + this.email = contact.email || ''; + this.phone = contact.phone || ''; + this.address = contact.address || ''; + this.birthday = contact.birhday || ''; + this.notes = contact.notes || ''; } } - } diff --git a/src/app/main/content/apps/contacts/contacts.component.html b/src/app/main/content/apps/contacts/contacts.component.html index 74134922..9e617752 100644 --- a/src/app/main/content/apps/contacts/contacts.component.html +++ b/src/app/main/content/apps/contacts/contacts.component.html @@ -50,7 +50,7 @@ -
+
@@ -66,85 +66,3 @@
- - - diff --git a/src/app/main/content/apps/contacts/contacts.service.ts b/src/app/main/content/apps/contacts/contacts.service.ts index fb5b05cf..09a372b9 100644 --- a/src/app/main/content/apps/contacts/contacts.service.ts +++ b/src/app/main/content/apps/contacts/contacts.service.ts @@ -152,7 +152,6 @@ export class ContactsService implements Resolve */ toggleSelectAll() { - console.info(this.selectedContacts); if ( this.selectedContacts.length > 0 ) { this.deselectContacts(); @@ -194,6 +193,7 @@ export class ContactsService implements Resolve this.http.post('api/contacts-contacts/' + contact.id, {...contact}) .subscribe(response => { + this.getContacts(); resolve(response); }); }); @@ -219,4 +219,25 @@ export class ContactsService implements Resolve this.onSelectedContactsChanged.next(this.selectedContacts); } + deleteContact(contact) + { + const contactIndex = this.contacts.indexOf(contact); + this.contacts.splice(contactIndex, 1); + this.onContactsChanged.next(this.contacts); + } + + deleteSelectedContacts() + { + for ( const contactId of this.selectedContacts ) + { + const contact = this.contacts.find(_contact => { + return _contact.id === contactId; + }); + const contactIndex = this.contacts.indexOf(contact); + this.contacts.splice(contactIndex, 1); + } + this.onContactsChanged.next(this.contacts); + this.deselectContacts(); + } + } diff --git a/src/app/main/content/apps/contacts/selected-bar/selected-bar.component.ts b/src/app/main/content/apps/contacts/selected-bar/selected-bar.component.ts index 243f4991..27041dc6 100644 --- a/src/app/main/content/apps/contacts/selected-bar/selected-bar.component.ts +++ b/src/app/main/content/apps/contacts/selected-bar/selected-bar.component.ts @@ -1,5 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ContactsService } from '../contacts.service'; +import { MdDialog, MdDialogRef } from '@angular/material'; +import { FuseConfirmDialogComponent } from '../../../../../core/components/confirm-dialog/confirm-dialog.component'; @Component({ selector : 'fuse-selected-bar', @@ -11,8 +13,12 @@ export class SelectedBarComponent implements OnInit selectedContacts: string[]; hasSelectedContacts: boolean; isIndeterminate: boolean; + confirmDialogRef: MdDialogRef; - constructor(private contactsService: ContactsService) + constructor( + private contactsService: ContactsService, + public dialog: MdDialog + ) { this.contactsService.onSelectedContactsChanged .subscribe(selectedContacts => { @@ -41,7 +47,19 @@ export class SelectedBarComponent implements OnInit deleteSelectedContacts() { + this.confirmDialogRef = this.dialog.open(FuseConfirmDialogComponent, { + disableClose: false + }); + this.confirmDialogRef.componentInstance.confirmMessage = 'Are you sure you want to delete all selected contacts?'; + + this.confirmDialogRef.afterClosed().subscribe(result => { + if ( result ) + { + this.contactsService.deleteSelectedContacts(); + } + this.confirmDialogRef = null; + }); } }