Sup_File/public/main.js
2018-05-30 04:36:47 +02:00

21182 lines
1.1 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{
/***/ "./src/$$_lazy_route_resource lazy recursive":
/*!**********************************************************!*\
!*** ./src/$$_lazy_route_resource lazy namespace object ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
function webpackEmptyAsyncContext(req) {
// Here Promise.resolve().then() is used instead of new Promise() to prevent
// uncaught exception popping up in devtools
return Promise.resolve().then(function() {
var e = new Error('Cannot find module "' + req + '".');
e.code = 'MODULE_NOT_FOUND';
throw e;
});
}
webpackEmptyAsyncContext.keys = function() { return []; };
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
module.exports = webpackEmptyAsyncContext;
webpackEmptyAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive";
/***/ }),
/***/ "./src/app/app.component.css":
/*!***********************************!*\
!*** ./src/app/app.component.css ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/app.component.html":
/*!************************************!*\
!*** ./src/app/app.component.html ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<!-- Start your project here-->\r\n<router-outlet></router-outlet>\r\n <!-- /Start your project here-->\r\n "
/***/ }),
/***/ "./src/app/app.component.ts":
/*!**********************************!*\
!*** ./src/app/app.component.ts ***!
\**********************************/
/*! exports provided: AppComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppComponent", function() { return AppComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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;
};
// import { ToastService } from './typescripts/pro/alerts';
var AppComponent = /** @class */ (function () {
function AppComponent() {
this.title = 'app';
}
AppComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-root',
template: __webpack_require__(/*! ./app.component.html */ "./src/app/app.component.html"),
styles: [__webpack_require__(/*! ./app.component.css */ "./src/app/app.component.css")]
})
], AppComponent);
return AppComponent;
}());
/***/ }),
/***/ "./src/app/app.module.ts":
/*!*******************************!*\
!*** ./src/app/app.module.ts ***!
\*******************************/
/*! exports provided: AppModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppModule", function() { return AppModule; });
/* harmony import */ var _typescripts_pro_alerts_toast_toast_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typescripts/pro/alerts/toast/toast.module */ "./src/app/typescripts/pro/alerts/toast/toast.module.ts");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _typescripts_free__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./typescripts/free */ "./src/app/typescripts/free/index.ts");
/* harmony import */ var _typescripts_pro_index__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./typescripts/pro/index */ "./src/app/typescripts/pro/index.ts");
/* harmony import */ var _agm_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @agm/core */ "./node_modules/@agm/core/index.js");
/* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts");
/* harmony import */ var _login_login_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./login/login.component */ "./src/app/login/login.component.ts");
/* harmony import */ var _signup_signup_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./signup/signup.component */ "./src/app/signup/signup.component.ts");
/* harmony import */ var _book_book_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./book/book.component */ "./src/app/book/book.component.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _main_main_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./main/main.component */ "./src/app/main/main.component.ts");
/* harmony import */ var videogular2_core__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! videogular2/core */ "./node_modules/videogular2/core.js");
/* harmony import */ var videogular2_core__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(videogular2_core__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var videogular2_controls__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! videogular2/controls */ "./node_modules/videogular2/controls.js");
/* harmony import */ var videogular2_controls__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(videogular2_controls__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var videogular2_overlay_play__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! videogular2/overlay-play */ "./node_modules/videogular2/overlay-play.js");
/* harmony import */ var videogular2_overlay_play__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(videogular2_overlay_play__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var videogular2_buffering__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! videogular2/buffering */ "./node_modules/videogular2/buffering.js");
/* harmony import */ var videogular2_buffering__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(videogular2_buffering__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var ngx_dropzone_wrapper__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ngx-dropzone-wrapper */ "./node_modules/ngx-dropzone-wrapper/dist/ngx-dropzone-wrapper.es5.js");
var __decorate = (undefined && undefined.__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;
};
// import { DropzoneModule } from 'dropzone';
// import {SingleMediaPlayer} from './single-media-player';
var DEFAULT_DROPZONE_CONFIG = {
// Change this to your upload POST address:
url: 'https://httpbin.org/post',
//acceptedFiles: 'image/*',
createImageThumbnails: true
};
var appRoutes = [
{
path: 'main',
component: _main_main_component__WEBPACK_IMPORTED_MODULE_15__["MainComponent"],
data: { title: 'Home Main' }
},
{
path: 'books',
component: _book_book_component__WEBPACK_IMPORTED_MODULE_13__["BookComponent"],
data: { title: 'Book List' }
},
{
path: 'login',
component: _login_login_component__WEBPACK_IMPORTED_MODULE_11__["LoginComponent"],
data: { title: 'Login' }
},
{
path: 'signup',
component: _signup_signup_component__WEBPACK_IMPORTED_MODULE_12__["SignupComponent"],
data: { title: 'Sign Up' }
},
{ path: '',
redirectTo: '/login',
pathMatch: 'full'
}
];
var AppModule = /** @class */ (function () {
function AppModule() {
}
AppModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["NgModule"])({
declarations: [
_app_component__WEBPACK_IMPORTED_MODULE_10__["AppComponent"],
_login_login_component__WEBPACK_IMPORTED_MODULE_11__["LoginComponent"],
_signup_signup_component__WEBPACK_IMPORTED_MODULE_12__["SignupComponent"],
_main_main_component__WEBPACK_IMPORTED_MODULE_15__["MainComponent"],
_book_book_component__WEBPACK_IMPORTED_MODULE_13__["BookComponent"]
],
imports: [
_angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["BrowserModule"],
ngx_dropzone_wrapper__WEBPACK_IMPORTED_MODULE_20__["DropzoneModule"],
videogular2_core__WEBPACK_IMPORTED_MODULE_16__["VgCoreModule"],
videogular2_controls__WEBPACK_IMPORTED_MODULE_17__["VgControlsModule"],
videogular2_overlay_play__WEBPACK_IMPORTED_MODULE_18__["VgOverlayPlayModule"],
videogular2_buffering__WEBPACK_IMPORTED_MODULE_19__["VgBufferingModule"],
_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_2__["BrowserAnimationsModule"],
_angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormsModule"],
_angular_http__WEBPACK_IMPORTED_MODULE_5__["HttpModule"],
_angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClientModule"],
_angular_router__WEBPACK_IMPORTED_MODULE_14__["RouterModule"].forRoot(appRoutes, { enableTracing: true } // <-- debugging purposes only
),
_typescripts_pro_alerts_toast_toast_module__WEBPACK_IMPORTED_MODULE_0__["ToastModule"].forRoot(),
_typescripts_free__WEBPACK_IMPORTED_MODULE_7__["MDBBootstrapModule"].forRoot(),
_typescripts_pro_index__WEBPACK_IMPORTED_MODULE_8__["MDBBootstrapModulePro"].forRoot(),
_agm_core__WEBPACK_IMPORTED_MODULE_9__["AgmCoreModule"].forRoot({
// https://developers.google.com/maps/documentation/javascript/get-api-key?hl=en#key
apiKey: 'Your_api_key'
})
],
providers: [
_typescripts_pro_index__WEBPACK_IMPORTED_MODULE_8__["MDBSpinningPreloader"],
{
provide: ngx_dropzone_wrapper__WEBPACK_IMPORTED_MODULE_20__["DROPZONE_CONFIG"],
useValue: DEFAULT_DROPZONE_CONFIG
}
],
bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_10__["AppComponent"]],
schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_3__["NO_ERRORS_SCHEMA"]]
})
], AppModule);
return AppModule;
}());
/***/ }),
/***/ "./src/app/book/book.component.css":
/*!*****************************************!*\
!*** ./src/app/book/book.component.css ***!
\*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".app-title {\r\n font-size: 24px;\r\n}\r\n\r\n.box-title {\r\n font-size: 20px;\r\n}\r\n\r\n.box-container {\r\n box-sizing: border-box;\r\n height: 300px;\r\n max-width: 90%;\r\n max-height: 90%;\r\n padding: 24px;\r\n margin: 24px auto;\r\n border-radius: 4px;\r\n\r\n color: #555;\r\n background-color: #eee;\r\n box-shadow:\r\n 0 6px 20px rgba(0, 0, 0, 0.18),\r\n 0 6px 6px rgba(0, 0, 0, 0.25);\r\n}\r\n\r\n.info-container {\r\n padding: 12px 16px;\r\n\r\n line-height: 24px;\r\n}\r\n\r\n.action-container,\r\n.content-container {\r\n position: relative;\r\n\r\n overflow: auto;\r\n height: 200px;\r\n min-height: 0;\r\n padding: 16px;\r\n margin: 8px 16px;\r\n border-radius: 4px;\r\n\r\n background-color: #fff;\r\n}\r\n\r\n.vertical-container,\r\n.horizontal-container {\r\n min-height: 0 !important;\r\n}\r\n\r\n.action-button {\r\n box-sizing: border-box;\r\n width: calc(100% - 16px);\r\n min-height: 35px;\r\n padding: 4px 16px;\r\n margin: 8px;\r\n border: 1px solid #555;\r\n border-radius: 4px;\r\n\r\n cursor: pointer;\r\n font-size: 14px;\r\n font-weight: bold;\r\n line-height: 14px;\r\n text-align: center;\r\n}\r\n\r\n.action-button:hover {\r\n color: #fff;\r\n background-color: #555;\r\n}\r\n\r\n.dropzone-container {\r\n height: 100%;\r\n}\r\n"
/***/ }),
/***/ "./src/app/book/book.component.html":
/*!******************************************!*\
!*** ./src/app/book/book.component.html ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"container-fluid\">\r\n <div *ngIf=\"mainFolder\">\r\n <p> Path : {{mainFolder.path}}</p>\r\n <p> Vous êtes dans le dossier : {{mainFolder.name}}</p>\r\n <button type=\"button\" class=\"btn btn-sm btn-warning\" mdbTooltip=\"Retour à : {{mainFolder.parent}}\" placement=\"top\" (click)=\"backToParentFolder()\" *ngIf=\"mainFolder.path !== 'Home'\"><i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i> {{mainFolder.parent}}</button>\r\n </div>\r\n\r\n\r\n <button type=\"button\" class=\"btn btn-sm btn-warning\" mdbTooltip=\"Nouveau dossier\" placement=\"top\" (click)=\"createBool()\" *ngIf=\"isClickCreateFolder === false\">\r\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"><i class=\"fa fa-folder-o\" aria-hidden=\"true\"></i></i>\r\n </button>\r\n\r\n\r\n\r\n <div class=\"md-form input-group\" *ngIf=\"isClickCreateFolder === true\">\r\n <div class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-sm waves-light\" mdbTooltip=\"Créer : {{inputCreateFolder}}\" placement=\"top\" type=\"button\" mdbWavesEffect (click)=\"createFolder()\">Créer</button>\r\n </div>\r\n <input type=\"search\" class=\"form-control\" placeholder=\"Nom du nouveau dossier...\" [(ngModel)]=\"inputCreateFolder\">\r\n </div>\r\n\r\n<!--\r\n <label class=\"btn btn-danger btn-sm\" mdbTooltip=\"Choisir fichier\" placement=\"top\" >\r\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"><i class=\"fa fa-file-o\" aria-hidden=\"true\"></i></i>\r\n <input type=\"file\" style=\"display: none;\" #myPicture name=\"myPicture\" (change)=\"fileChangeEvent($event)\">\r\n </label>\r\n <button type=\"button\" class=\"btn btn-sm btn-warning\" mdbTooltip=\"Ajouter le fichier : {{fileChooseName}}\" placement=\"top\" (click)=\"upload()\" >Ajouter le fichier {{fileChooseName}}</button>\r\n <label *ngIf=\"fileChooseName !== ''\"> Vous avez choisi : {{fileChooseName}}</label>-->\r\n\r\n <div class=\"box-container\" fxLayout=\"column\" [ngStyle.lt-sm]=\"'min-height: 400;'\">\r\n <div class=\"horizontal-container\" fxLayout=\"row\" fxLayout.lt-sm=\"column\" fxLayoutAlign=\"stretch\" fxFlex=\"auto\">\r\n <div class=\"vertical-container\" fxLayout=\"column\" fxLayoutAlign=\"stretch\" fxFlex=\"50%\">\r\n <div class=\"box-title\">Dropzone</div>\r\n\r\n <div class=\"content-container\" fxLayout=\"column\" fxLayoutAlign=\"stretch\" fxFlex=\"auto\" style=\"background-color: green;\">\r\n <dropzone *ngIf=\"type === 'component'\" class=\"dropzone-container\" [config]=\"config\" [disabled]=\"disabled\" fxLayout=\"row\" fxLayoutAlign=\"start strech\" fxFlex=\"auto\" [message]=\"'Click or drag file here to upload'\" (error)=\"onUploadError($event)\" (success)=\"onUploadSuccess($event)\"></dropzone>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n</div>\r\n<table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Nom</th>\r\n <th>Taille</th>\r\n <th>Type</th>\r\n <th>Date d'ajout</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let folder of allUserFolder; let i = index;\">\r\n <td>\r\n <button type=\"button\" class=\"btn btn-sm btn-warning\" mdbTooltip=\"Supprimer : {{folder.name}}\" placement=\"top\" (click)=\"deleteFolder(folder)\"><i class=\"fa fa-close\" aria-hidden=\"true\"></i></button>\r\n <button type=\"button\" class=\"btn btn-sm btn-warning\" mdbTooltip=\"Ouvrir : {{folder.name}}\" placement=\"top\" (click)=\"openFolder(folder.path)\"><i class=\"fa fa-folder-open-o\" aria-hidden=\"true\"></i></button>\r\n <!--<button type=\"button\" class=\"btn btn-warning\" (click)=\"renameFolder(folder)\">Rename</button>-->\r\n <div class=\"btn-group\" dropdown>\r\n <button type=\"button\" dropdownToggle class=\"btn btn-success btn-sm dropdown-toggle-split px-3 waves-light\" mdbTooltip=\"Déplacer : {{folder.name}}\" placement=\"top\" mdbWavesEffect>\r\n <i class=\"fa fa-arrows\" aria-hidden=\"true\"></i>\r\n </button>\r\n <div class=\"dropdown-menu\">\r\n <a class=\"dropdown-item\" *ngFor=\"let folderDest of allUserAppFolder; let i = index;\" (click)=\"moveFolder(folder, folderDest)\">{{folderDest.name}}</a>\r\n </div>\r\n </div>\r\n </td>\r\n\r\n <td>\r\n <button class=\"btn btn-primary btn-sm waves-light\" mdbTooltip=\"Renommer : {{folder.name}}\" placement=\"top\" type=\"button\" mdbWavesEffect (click)=\"renameFolder(folder)\">\r\n <i class=\"fa fa-pencil prefix\"></i>\r\n </button>\r\n <input type=\"search\" class=\"form-control col-xs-2\" placeholder= \"{{folder.name}}\" [(ngModel)]=\"folder.name\">\r\n </td>\r\n <!--<td>{{ folder.name }}</td>-->\r\n <td>{{ folder.taille}} Mo</td>\r\n <td>Folder</td>\r\n <td>{{ folder.owner }}</td>\r\n <i class=\"fa fa-folder-open-o\" aria-hidden=\"true\"></i>\r\n </tr>\r\n <tr *ngFor=\"let file of allUserFile; let i = index;\">\r\n <td>\r\n <button type=\"button\" class=\"btn btn-sm btn-warning\" mdbTooltip=\"Supprimer : {{file.name}}\" placement=\"top\" (click)=\"deleteFile(file)\"><i class=\"fa fa-close\" aria-hidden=\"true\"></i></button>\r\n\r\n <a href=\"{{file.data}}\" download=\"{{ file.name.toString()}}\" type=\"\">\r\n <button class=\"btn btn-sm btn-warning\" tooltip=\"Télécharger : {{ file.name.toString()}} : \" placement=\"top\">\r\n <i class=\"fa fa-download\" aria-hidden=\"true\"></i>\r\n </button>\r\n </a>\r\n\r\n <div class=\"btn-group\" dropdown>\r\n <button type=\"button\" dropdownToggle class=\"btn btn-success btn-sm dropdown-toggle-split px-3 waves-light\" mdbTooltip=\"Déplacer : {{file.name}}\" placement=\"top\" mdbWavesEffect>\r\n <i class=\"fa fa-arrows\" aria-hidden=\"true\"></i>\r\n </button>\r\n <div class=\"dropdown-menu\">\r\n <a class=\"dropdown-item\" *ngFor=\"let folder of allUserAppFolder; let i = index;\" (click)=\"moveFile(file, folder)\">{{folder.name}}</a>\r\n </div>\r\n </div>\r\n </td>\r\n <td>\r\n <button class=\"btn btn-primary btn-sm waves-light\" mdbTooltip=\"Renommer : {{file.name}}\" placement=\"top\" type=\"button\" mdbWavesEffect (click)=\"renameFile(file)\">\r\n <i class=\"fa fa-pencil prefix\"></i>\r\n </button>\r\n <input type=\"search\" class=\"form-control col-xs-2\" placeholder= \"{{file.name}}\" [(ngModel)]=\"file.name\">\r\n </td>\r\n\r\n\r\n\r\n\r\n <!--<td>{{ file.name }}</td>-->\r\n <td>{{ file.taille / ( 1024 * 1024 ) | number : '1.2-2'}} Mo</td>\r\n <td>{{ file.type }}</td>\r\n <td>{{ file.lastDate }}</td>\r\n <div *ngIf=\"file.type === ('image/jpeg')\">\r\n <img [src]=file.urlSafe class=\"img-fluid flex-center\" width=\"350\" height=\"200\">\r\n </div>\r\n <div *ngIf=\"file.type === ('image/png')\">\r\n <img [src]=file.urlSafe class=\"img-fluid flex-center\" width=\"350\" height=\"200\">\r\n </div>\r\n <div *ngIf=\"file.type === ('application/pdf')\">\r\n <!--<i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i>-->\r\n <object [data]=file.urlSafe type=\"application/pdf\"\r\n width=\"350\" height=\"200\" typemustmatch>\r\n </object>\r\n\r\n </div>\r\n <div *ngIf=\"file.type === ('video/mp4')\">\r\n <!--<i class=\"fa fa-file-movie-o\" aria-hidden=\"true\"></i>-->\r\n <vg-player style=\"height: 200px; width: 350px\">\r\n <video [vgMedia]=\"media\" #media id=\"singleVideo\" preload=\"auto\" controls>\r\n <source [src]=file.urlSafe type=\"video/mp4\">\r\n </video>\r\n </vg-player>\r\n </div>\r\n <div *ngIf=\"file.type === ('text/plain')\">\r\n <!--<div>{{ reader !== 'undifined' ? reader.result : ''}}</div>\r\n <div>{{test}}</div>\r\n <a href = \"../../../public/{{file._id + getStringExtention(file)}}\">show me</a>-->\r\n <object [data]=file.urlSafe type=\"text/plain\"\r\n width=\"350\" height=\"200\" typemustmatch>\r\n </object>\r\n </div>\r\n <div *ngIf=\"file.type === ''\">\r\n <i class=\"fa fa-file-o fa-5x\" aria-hidden=\"true\" width=\"350\" height=\"200\"></i>\r\n <!--<object [data]=file.url type=\"text/plain\"\r\n width=\"350\" height=\"200\" typemustmatch>\r\n </object>-->\r\n <!--<div>{{ reader !== 'undifined' ? reader.result : ''}}</div>\r\n <div>{{test}}</div>\r\n <a href = \"../../../public/{{file._id + getStringExtention(file)}}\">show me</a>-->\r\n </div>\r\n <div *ngIf=\"(file.type === ('audio/mp3')) || (file.type === ('audio/mpeg'))\">\r\n <!--<i class=\"fa fa-file-audio-o\" aria-hidden=\"true\"></i>-->\r\n <vg-player style=\"height: 50px; width: 350px\">\r\n <vg-controls>\r\n <vg-play-pause></vg-play-pause>\r\n <vg-time-display vgProperty=\"current\" vgFormat=\"mm:ss\"></vg-time-display>\r\n\r\n <vg-scrub-bar>\r\n <vg-scrub-bar-current-time></vg-scrub-bar-current-time>\r\n <vg-scrub-bar-buffering-time></vg-scrub-bar-buffering-time>\r\n </vg-scrub-bar>\r\n\r\n <vg-time-display vgProperty=\"left\" vgFormat=\"mm:ss\"></vg-time-display>\r\n <vg-time-display vgProperty=\"total\" vgFormat=\"mm:ss\"></vg-time-display>\r\n\r\n <vg-mute></vg-mute>\r\n\r\n <vg-fullscreen></vg-fullscreen>\r\n </vg-controls>\r\n\r\n <audio #media [vgMedia]=\"media\" id=\"myAudio\" preload=\"auto\">\r\n <source [src]=file.urlSafe type=\"audio/mp3\">\r\n </audio>\r\n </vg-player>\r\n </div>\r\n </tr>\r\n\r\n </tbody>\r\n</table>\r\n\r\n\r\n\r\n"
/***/ }),
/***/ "./src/app/book/book.component.ts":
/*!****************************************!*\
!*** ./src/app/book/book.component.ts ***!
\****************************************/
/*! exports provided: BookComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BookComponent", function() { return BookComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
/* harmony import */ var ngx_dropzone_wrapper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ngx-dropzone-wrapper */ "./node_modules/ngx-dropzone-wrapper/dist/ngx-dropzone-wrapper.es5.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
//import { Dropzone } from 'dropzone';
var BookComponent = /** @class */ (function () {
function BookComponent(http, router, route, sanitizer) {
this.http = http;
this.router = router;
this.route = route;
this.sanitizer = sanitizer;
this.type = 'component';
this.disabled = false;
this.config = {
clickable: true,
maxFiles: 1,
autoReset: null,
errorReset: null,
cancelReset: null
};
this.isClickCreateFolder = false;
this.fileChooseName = 'None';
this.filesToUpload = [];
this.test = '';
}
BookComponent.prototype.toggleType = function () {
this.type = (this.type === 'component') ? 'directive' : 'component';
};
BookComponent.prototype.toggleDisabled = function () {
this.disabled = !this.disabled;
};
BookComponent.prototype.toggleAutoReset = function () {
this.config.autoReset = this.config.autoReset ? null : 5000;
this.config.errorReset = this.config.errorReset ? null : 5000;
this.config.cancelReset = this.config.cancelReset ? null : 5000;
};
BookComponent.prototype.toggleMultiUpload = function () {
this.config.maxFiles = this.config.maxFiles ? 0 : 1;
};
BookComponent.prototype.toggleClickAction = function () {
this.config.clickable = !this.config.clickable;
};
BookComponent.prototype.resetDropzoneUploads = function () {
if (this.type === 'directive' && this.directiveRef) {
this.directiveRef.reset();
}
else if (this.type === 'component' && this.componentRef && this.componentRef.directiveRef) {
this.componentRef.directiveRef.reset();
}
};
BookComponent.prototype.onUploadError = function (args) {
console.log('onUploadError:', args);
};
BookComponent.prototype.onUploadSuccess = function (args) {
this.filesToUpload = args;
this.fileChooseName = args[0].name;
this.upload();
this.resetDropzoneUploads();
this.openFolder(this.mainFolder.path);
};
BookComponent.prototype.ngOnInit = function () {
var _this = this;
this.httpOptions = {
headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpHeaders"]({ 'Authorization': localStorage.getItem('jwtToken'), 'Access-Control-Allow-Origin': '*' }),
pathFolder: ''
};
this.http.get('/api/getCurrentUser', this.httpOptions).subscribe(function (user) {
_this.currentUser = user;
_this.openFolder('Home');
}, function (err) {
if (err.status === 401) {
_this.router.navigate(['login']);
}
});
};
BookComponent.prototype.deleteFile = function (fileToDelete) {
var _this = this;
this.http.post('/api/deleteFileMongo', fileToDelete).subscribe(function (file) {
_this.openFolder(_this.mainFolder.path);
});
};
BookComponent.prototype.deleteFolder = function (folderToDelete) {
var _this = this;
this.http.post('/api/deleteFolderMongo', folderToDelete).subscribe(function (folder) {
_this.openFolder(_this.mainFolder.path);
});
};
BookComponent.prototype.renameFolder = function (folderToRename) {
folderToRename.path = this.mainFolder.path + '/' + folderToRename.name;
this.http.post('/api/renameFolderMongo', folderToRename).subscribe(function (data) {
console.log('data : ' + data);
});
};
BookComponent.prototype.renameFile = function (fileToRename) {
this.http.post('/api/renameFileMongo', fileToRename).subscribe(function (data) {
console.log('data : ' + data);
});
};
BookComponent.prototype.saveURLFileMongo = function (fileToCreateURL) {
fileToCreateURL.url = '../../../public/' + fileToCreateURL._id.toString() + this.getStringExtention(fileToCreateURL);
// fileToCreateURL.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl(fileToCreateURL.url).toString();
this.http.post('/api/saveURLFileMongo', fileToCreateURL).subscribe(function (data) {
console.log('data : ' + data);
});
};
BookComponent.prototype.getfiles = function () {
//var preview = document.querySelector('img');
var _this = this;
var meee = this;
this.http.post('/api/getFileList', { mainPath: this.mainFolder.path, owner: this.currentUser.username.toString() }).subscribe(function (files) {
if (files) {
_this.allUserFile = files;
for (var _i = 0, _a = _this.allUserFile; _i < _a.length; _i++) {
var f = _a[_i];
if (f.type === ('image/jpeg') || f.type === ('image/png')) {
f.data = f.url;
f.urlSafe = _this.sanitizer.bypassSecurityTrustUrl(f.url);
}
else {
f.data = f.url;
f.urlSafe = _this.sanitizer.bypassSecurityTrustResourceUrl(f.url);
}
}
}
else {
_this.allUserFile = [];
}
});
};
BookComponent.prototype.getfolders = function () {
var _this = this;
this.http.post('/api/getFolderList', { mainPath: this.mainFolder.path, owner: this.currentUser.username.toString() }).subscribe(function (folders) {
if (folders) {
_this.allUserFolder = folders;
}
else {
_this.allUserFolder = [];
}
});
};
BookComponent.prototype.getAllUserAppFolder = function () {
var _this = this;
this.http.post('/api/getFolderAppList', { owner: this.currentUser.username.toString() }).subscribe(function (folders) {
if (folders) {
_this.allUserAppFolder = folders;
}
else {
_this.allUserAppFolder = [];
}
});
};
BookComponent.prototype.moveFile = function (fileToMove, folderDest) {
var _this = this;
fileToMove.path = folderDest.path;
this.http.post('/api/moveFile', fileToMove).subscribe(function (data) {
console.log('data : ' + data);
_this.getfiles();
//this.openFolder(this.mainFolder.path)
// this.getAllUserAppFolder();
// this.getfiles();
});
};
BookComponent.prototype.moveFolder = function (folderToMove, folderDest) {
var _this = this;
var newPath = folderDest.path + '/' + folderToMove.parent.name;
folderToMove.path = newPath;
folderToMove.parent = folderDest.path;
this.http.post('/api/moveFolder', folderToMove).subscribe(function (data) {
console.log('data : ' + data);
_this.getfolders();
//this.openFolder(this.mainFolder.path)
// this.getAllUserAppFolder();
// this.getfiles();
});
};
BookComponent.prototype.backToParentFolder = function () {
this.openFolder(this.mainFolder.parent);
};
BookComponent.prototype.openFolder = function (path) {
var _this = this;
this.httpOptions.pathFolder = path;
this.isClickCreateFolder = false;
this.http.post('/api/getMainFolder', { path: path, owner: this.currentUser.username.toString() }).subscribe(function (folder) {
if (folder) {
_this.mainFolder = folder;
_this.getfolders();
_this.getAllUserAppFolder();
_this.getfiles();
}
else {
if (path === 'Home') {
_this.http.post('api/createFolder', { name: 'Home', parent: '', path: 'Home', taille: 'taiile', idUser: _this.currentUser._id.toString(), fileList: [], folderList: [], owner: _this.currentUser.username.toString() }).subscribe(function (resp) {
_this.mainFolder = resp;
}, function (err) {
console.log('errrrr folllder : ' + err);
});
}
}
});
};
BookComponent.prototype.createBool = function () {
this.isClickCreateFolder = true;
};
BookComponent.prototype.createFolder = function () {
var _this = this;
var newPath = this.mainFolder.path + '/' + this.inputCreateFolder;
this.isClickCreateFolder = false;
this.http.post('api/createFolder', { name: this.inputCreateFolder.toString(), parent: this.mainFolder.path, path: newPath.toString(), taille: 'taiile', idUser: this.currentUser._id.toString(), fileList: [], folderList: [], owner: this.currentUser.username.toString() }).subscribe(function (resp) {
_this.getfolders();
_this.getAllUserAppFolder();
}, function (err) {
console.log('errrrr folllder : ' + err);
});
};
BookComponent.prototype.ngOnDestroy = function () {
localStorage.removeItem('jwtToken');
this.httpOptions = null;
this.currentUser = null;
};
BookComponent.prototype.upload = function () {
var _this = this;
var me = this;
if (this.mainFolder !== undefined) {
this.http.post('api/uploadFileMongo', { name: this.fileChooseName.toString(), path: this.mainFolder.path.toString(), type: this.filesToUpload[0].type.toString(), taille: this.filesToUpload[0].size.toString(), idUser: this.currentUser._id.toString(), owner: this.currentUser.username.toString(), lastDate: Date.now().toString(), url: '', urlSafe: '' }).subscribe(function (resp) {
me.saveURLFileMongo(resp);
var mee = _this;
me.makeFileRequest('http://localhost:3000/api/upload', [], _this.filesToUpload, resp).then(function (result) {
mee.getfiles();
mee.filesToUpload = null;
mee.fileChooseName = 'None';
}, function (error) {
console.error(error);
});
}, function (err) {
console.error(err);
});
}
};
BookComponent.prototype.fileChangeEvent = function (fileInput) {
this.filesToUpload = fileInput.target.files;
this.fileChooseName = this.filesToUpload[0].name;
};
BookComponent.prototype.makeFileRequest = function (url, params, files, monFile) {
var _this = this;
return new Promise(function (resolve, reject) {
var formData = new FormData();
var xhr = new XMLHttpRequest();
formData.append("public[]", files[0], monFile._id + _this.getStringExtention(monFile));
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
resolve(JSON.parse(xhr.response));
}
else {
reject(xhr.response);
}
}
};
xhr.open("POST", url, true);
xhr.send(formData);
});
};
BookComponent.prototype.getStringExtention = function (monFile) {
return (monFile.name.indexOf('.') > 0) ? '.' + monFile.name.split('.').pop().toLowerCase() : '';
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(ngx_dropzone_wrapper__WEBPACK_IMPORTED_MODULE_4__["DropzoneComponent"]),
__metadata("design:type", ngx_dropzone_wrapper__WEBPACK_IMPORTED_MODULE_4__["DropzoneComponent"])
], BookComponent.prototype, "componentRef", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(ngx_dropzone_wrapper__WEBPACK_IMPORTED_MODULE_4__["DropzoneDirective"]),
__metadata("design:type", ngx_dropzone_wrapper__WEBPACK_IMPORTED_MODULE_4__["DropzoneDirective"])
], BookComponent.prototype, "directiveRef", void 0);
BookComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-book',
template: __webpack_require__(/*! ./book.component.html */ "./src/app/book/book.component.html"),
styles: [__webpack_require__(/*! ./book.component.css */ "./src/app/book/book.component.css")]
}),
__metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"], _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"], _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"], _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__["DomSanitizer"]])
], BookComponent);
return BookComponent;
}());
/***/ }),
/***/ "./src/app/login/login.component.css":
/*!*******************************************!*\
!*** ./src/app/login/login.component.css ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "body {\r\n padding-top: 40px;\r\n padding-bottom: 40px;\r\n background-color: #eee;\r\n}\r\n\r\n.form-signin {\r\n max-width: 330px;\r\n padding: 15px;\r\n margin: 0 auto;\r\n}\r\n\r\n.form-signin .form-signin-heading,\r\n.form-signin .checkbox {\r\n margin-bottom: 10px;\r\n}\r\n\r\n.form-signin .checkbox {\r\n font-weight: normal;\r\n}\r\n\r\n.form-signin .form-control {\r\n position: relative;\r\n height: auto;\r\n box-sizing: border-box;\r\n padding: 10px;\r\n font-size: 16px;\r\n}\r\n\r\n.form-signin .form-control:focus {\r\n z-index: 2;\r\n}\r\n\r\n.form-signin input[type=\"email\"] {\r\n margin-bottom: -1px;\r\n border-bottom-right-radius: 0;\r\n border-bottom-left-radius: 0;\r\n}\r\n\r\n.form-signin input[type=\"password\"] {\r\n margin-bottom: 10px;\r\n border-top-left-radius: 0;\r\n border-top-right-radius: 0;\r\n}\r\n\r\n.form-signin p {\r\n margin-top: 10px;\r\n}\r\n"
/***/ }),
/***/ "./src/app/login/login.component.html":
/*!********************************************!*\
!*** ./src/app/login/login.component.html ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"container\">\r\n <form class=\"form-signin\" (ngSubmit)=\"login()\" #loginForm=\"ngForm\">\r\n <div class=\"alert alert-warning alert-dismissible\" role=\"alert\" *ngIf=\"message !== ''\">\r\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\r\n {{message}}\r\n </div>\r\n <h2 class=\"form-signin-heading\">Please sign in</h2>\r\n <label for=\"inputEmail\" class=\"sr-only\">Email address</label>\r\n <input type=\"email\" class=\"form-control\" placeholder=\"Email address\" [(ngModel)]=\"loginData.username\" name=\"username\" required/>\r\n <label for=\"inputPassword\" class=\"sr-only\">Password</label>\r\n <input type=\"password\" class=\"form-control\" placeholder=\"Password\" [(ngModel)]=\"loginData.password\" name=\"password\" required/>\r\n <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\" [disabled]=\"!loginForm.form.valid\">Sign in</button>\r\n <p>\r\n Not a member? <a [routerLink]=\"['/signup']\">Signup here</a>\r\n </p>\r\n\r\n <button onclick=\"location.href='/api/facebook'\" type=\"button\" class=\"btn-floating btn-fb\"><i class=\"fa fa-facebook\"></i></button>\r\n <button onclick=\"location.href='/api/github'\" type=\"button\" class=\"btn-floating btn-git\"><i class=\"fa fa-github\"></i></button>\r\n <button onclick=\"location.href='/api/google'\" type=\"button\" class=\"btn-floating btn-gplus\"><i class=\"fa fa-google\"></i></button>\r\n </form>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/login/login.component.ts":
/*!******************************************!*\
!*** ./src/app/login/login.component.ts ***!
\******************************************/
/*! exports provided: LoginComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoginComponent", function() { return LoginComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var LoginComponent = /** @class */ (function () {
function LoginComponent(http, router) {
this.http = http;
this.router = router;
this.loginData = { username: '', password: '' };
this.message = '';
}
LoginComponent.prototype.login = function () {
var _this = this;
this.http.post('/api/signin', this.loginData).subscribe(function (resp) {
_this.data = resp;
localStorage.setItem('jwtToken', _this.data.token);
_this.router.navigate(['main']);
}, function (err) {
_this.message = err.error.msg;
});
};
LoginComponent.prototype.ngOnInit = function () {
};
LoginComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-login',
template: __webpack_require__(/*! ./login.component.html */ "./src/app/login/login.component.html"),
styles: [__webpack_require__(/*! ./login.component.css */ "./src/app/login/login.component.css")]
}),
__metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"], _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"]])
], LoginComponent);
return LoginComponent;
}());
/***/ }),
/***/ "./src/app/main/main.component.html":
/*!******************************************!*\
!*** ./src/app/main/main.component.html ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<body class=\"grey-skin\">\r\n\r\n\r\n<!--Double navigation-->\r\n<header>\r\n\r\n <!-- Sidebar navigation -->\r\n <mdb-sidenav #sidenav class=\"sn-bg-1 fixed\" [fixed]=\"true\">\r\n\r\n <logo>\r\n <!-- Logo -->\r\n <li>\r\n <div class=\"logo-wrapper waves-light\">\r\n <a href=\"#\"><img style=\"height: 90px; margin-left: 13%;\"src=\"https://openclipart.org/image/2400px/svg_to_png/190248/slogonormal.png\" class=\"img-fluid flex-center\"></a>\r\n </div>\r\n </li>\r\n <!--/. Logo -->\r\n </logo>\r\n\r\n <links>\r\n <!--Social-->\r\n <li>\r\n <ul class=\"social\">\r\n <li><a class=\"icons-sm fb-ic\"><i class=\"fa fa-facebook\"> </i></a></li>\r\n <li><a class=\"icons-sm pin-ic\"><i class=\"fa fa-pinterest\"> </i></a></li>\r\n <li><a class=\"icons-sm gplus-ic\"><i class=\"fa fa-google-plus\"> </i></a></li>\r\n <li><a class=\"icons-sm tw-ic\"><i class=\"fa fa-twitter\"> </i></a></li>\r\n </ul>\r\n </li>\r\n <!--/Social-->\r\n <!--Search Form-->\r\n <li>\r\n <form class=\"search-form\" role=\"search\">\r\n <div class=\"form-group md-form mt-0 pt-1 waves-light\" mdbWavesEffect>\r\n <input type=\"text\" class=\"form-control\" placeholder=\"Search\">\r\n </div>\r\n </form>\r\n </li>\r\n <!--/.Search Form-->\r\n <!-- Side navigation links -->\r\n <li>\r\n <ul class=\"collapsible collapsible-accordion\">\r\n <mdb-squeezebox [multiple]=\"false\" aria-multiselectable=\"false\">\r\n\r\n <!-- Collapsible link -->\r\n <mdb-item>\r\n <mdb-item-head mdbWavesEffect><i class=\"fa fa-chevron-right\"></i> Collapsible menu</mdb-item-head>\r\n <mdb-item-body>\r\n <ul>\r\n <li><a href=\"#\" class=\"waves-effect\" mdbWavesEffect>Link 1</a></li>\r\n <li><a href=\"#\" class=\"waves-effect\" mdbWavesEffect>Link 2</a></li>\r\n </ul>\r\n </mdb-item-body>\r\n </mdb-item>\r\n\r\n <!-- Simple link -->\r\n <mdb-item class=\"no-collase\">\r\n <mdb-item-head mdbWavesEffect><i class=\"fa fa-hand-pointer-o\"></i> Simple link</mdb-item-head>\r\n <mdb-item-body></mdb-item-body>\r\n </mdb-item>\r\n\r\n <!-- Collapsible link -->\r\n <mdb-item>\r\n <mdb-item-head mdbWavesEffect><i class=\"fa fa-eye\"></i> Collapsible menu 2</mdb-item-head>\r\n <mdb-item-body>\r\n <ul>\r\n <li><a href=\"#\" class=\"waves-effect\" mdbWavesEffect>Link 1</a></li>\r\n <li><a href=\"#\" class=\"waves-effect\" mdbWavesEffect>Link 2</a></li>\r\n </ul>\r\n </mdb-item-body>\r\n </mdb-item>\r\n\r\n <!-- Simple link -->\r\n <mdb-item class=\"no-collase\">\r\n <mdb-item-head mdbWavesEffect><i class=\"fa fa-diamond\"></i> Simple link 2</mdb-item-head>\r\n <mdb-item-body></mdb-item-body>\r\n </mdb-item>\r\n\r\n </mdb-squeezebox>\r\n </ul>\r\n </li>\r\n <!--/. Side navigation links -->\r\n </links>\r\n <div class=\"sidenav-bg mask-strong\"></div>\r\n </mdb-sidenav>\r\n <!--/. Sidebar navigation -->\r\n\r\n <!-- Navbar -->\r\n <mdb-navbar SideClass=\"navbar fixed-top navbar-toggleable-md navbar-expand-lg scrolling-navbar double-nav\" [containerInside]=\"false\">\r\n\r\n <navlinks class=\"navbar-container\">\r\n <!-- SideNav slide-out button -->\r\n <div class=\"float-left\">\r\n <a (click)=\"sidenav.show()\" class=\"button-collapse\"><i class=\"fa fa-bars\"></i></a>\r\n </div>\r\n <!--/. SideNav slide-out button -->\r\n </navlinks>\r\n\r\n <logo>\r\n <!-- Breadcrumb-->\r\n <div class=\"breadcrumbs breadcrumb-dn mr-auto\">\r\n <p>Welcome</p>\r\n </div>\r\n <!--/. Breadcrumb-->\r\n </logo>\r\n\r\n <navlinks>\r\n <ul class=\"nav navbar-nav nav-flex-icons ml-auto ie-double-nav\">\r\n <li class=\"nav-item\">\r\n <a class=\"nav-link waves-light\" mdbWavesEffect><i class=\"fa fa-envelope\"></i> <span class=\"clearfix d-none d-sm-inline-block\">Contact</span></a>\r\n </li>\r\n <li class=\"nav-item\">\r\n <a class=\"nav-link waves-light\" mdbWavesEffect><i class=\"fa fa-user\"></i> <span class=\"clearfix d-none d-sm-inline-block\">Account</span></a>\r\n </li>\r\n <li class=\"nav-item\" (click)=\"logout()\">\r\n <a class=\"nav-link waves-light\" mdbWavesEffect><i class=\"fa fa-sign-out mr-1\"></i> <span class=\"clearfix d-none d-sm-inline-block\">Log out</span></a>\r\n </li>\r\n <!--<li class=\"nav-item dropdown btn-group\" dropdown>-->\r\n <!--<a dropdownToggle type=\"button\" class=\"nav-link dropdown-toggle waves-light\" mdbWavesEffect>-->\r\n <!--Dropdown-->\r\n <!--</a>-->\r\n <!--<div class=\"dropdown-menu dropdown-primary dropdown-menu-right\" role=\"menu\">-->\r\n <!--<a class=\"dropdown-item\" href=\"#\">Action</a>-->\r\n <!--<a class=\"dropdown-item\" href=\"#\">Another action</a>-->\r\n <!--<a class=\"dropdown-item\" href=\"#\">Something else here</a>-->\r\n <!--</div>-->\r\n <!--</li>-->\r\n </ul>\r\n </navlinks>\r\n </mdb-navbar>\r\n <!--/. Navbar -->\r\n\r\n</header>\r\n<!--/.Double navigation-->\r\n\r\n<!--Main Layout-->\r\n<main style=\"margin-left: 0%; margin-right: 0%;\">\r\n <div class=\"container-fluid\" style=\"margin:0%; padding: 0%\">\r\n <app-book></app-book>\r\n </div>\r\n\r\n\r\n</main>\r\n<!--/Main layout-->\r\n"
/***/ }),
/***/ "./src/app/main/main.component.scss":
/*!******************************************!*\
!*** ./src/app/main/main.component.scss ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/main/main.component.ts":
/*!****************************************!*\
!*** ./src/app/main/main.component.ts ***!
\****************************************/
/*! exports provided: MainComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MainComponent", function() { return MainComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var MainComponent = /** @class */ (function () {
function MainComponent(router, route) {
this.router = router;
this.route = route;
}
MainComponent.prototype.logout = function () {
localStorage.removeItem('jwtToken');
this.router.navigate(['login']);
};
MainComponent.prototype.ngOnInit = function () {
};
MainComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-main',
template: __webpack_require__(/*! ./main.component.html */ "./src/app/main/main.component.html"),
styles: [__webpack_require__(/*! ./main.component.scss */ "./src/app/main/main.component.scss")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"], _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"]])
], MainComponent);
return MainComponent;
}());
/***/ }),
/***/ "./src/app/signup/signup.component.css":
/*!*********************************************!*\
!*** ./src/app/signup/signup.component.css ***!
\*********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "body {\r\n padding-top: 40px;\r\n padding-bottom: 40px;\r\n background-color: #eee;\r\n}\r\n\r\n.form-signin {\r\n max-width: 330px;\r\n padding: 15px;\r\n margin: 0 auto;\r\n}\r\n\r\n.form-signin .form-signin-heading,\r\n.form-signin .checkbox {\r\n margin-bottom: 10px;\r\n}\r\n\r\n.form-signin .checkbox {\r\n font-weight: normal;\r\n}\r\n\r\n.form-signin .form-control {\r\n position: relative;\r\n height: auto;\r\n box-sizing: border-box;\r\n padding: 10px;\r\n font-size: 16px;\r\n}\r\n\r\n.form-signin .form-control:focus {\r\n z-index: 2;\r\n}\r\n\r\n.form-signin input[type=\"email\"] {\r\n margin-bottom: -1px;\r\n border-bottom-right-radius: 0;\r\n border-bottom-left-radius: 0;\r\n}\r\n\r\n.form-signin input[type=\"password\"] {\r\n margin-bottom: 10px;\r\n border-top-left-radius: 0;\r\n border-top-right-radius: 0;\r\n}\r\n\r\n.form-signin p {\r\n margin-top: 10px;\r\n}\r\n"
/***/ }),
/***/ "./src/app/signup/signup.component.html":
/*!**********************************************!*\
!*** ./src/app/signup/signup.component.html ***!
\**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"container\">\r\n <form class=\"form-signin\" (ngSubmit)=\"signup()\" #signupForm=\"ngForm\">\r\n <div class=\"alert alert-warning alert-dismissible\" role=\"alert\" *ngIf=\"message !== ''\">\r\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\r\n {{message}}\r\n </div>\r\n <h2 class=\"form-signin-heading\">Sign Up Now</h2>\r\n <label for=\"inputEmail\" class=\"sr-only\">Email address</label>\r\n <input type=\"email\" class=\"form-control\" placeholder=\"Email address\" [(ngModel)]=\"signupData.username\" name=\"username\" required/>\r\n <label for=\"inputPassword\" class=\"sr-only\">Password</label>\r\n <input type=\"password\" class=\"form-control\" placeholder=\"Password\" [(ngModel)]=\"signupData.password\" name=\"password\" required/>\r\n <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\" [disabled]=\"!signupForm.form.valid\">Sign Up</button>\r\n </form>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/signup/signup.component.ts":
/*!********************************************!*\
!*** ./src/app/signup/signup.component.ts ***!
\********************************************/
/*! exports provided: SignupComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignupComponent", function() { return SignupComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SignupComponent = /** @class */ (function () {
function SignupComponent(http, router) {
this.http = http;
this.router = router;
this.signupData = { username: '', password: '' };
this.message = '';
}
SignupComponent.prototype.signup = function () {
var _this = this;
this.http.post('/api/signup', this.signupData).subscribe(function (resp) {
// console.log(resp);
_this.router.navigate(['login']);
}, function (err) {
_this.message = err.error.msg;
});
};
SignupComponent.prototype.ngOnInit = function () {
};
SignupComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-signup',
template: __webpack_require__(/*! ./signup.component.html */ "./src/app/signup/signup.component.html"),
styles: [__webpack_require__(/*! ./signup.component.css */ "./src/app/signup/signup.component.css")]
}),
__metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"], _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"]])
], SignupComponent);
return SignupComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/buttons/buttons.module.ts":
/*!************************************************************!*\
!*** ./src/app/typescripts/free/buttons/buttons.module.ts ***!
\************************************************************/
/*! exports provided: ButtonsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonsModule", function() { return ButtonsModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _checkbox_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./checkbox.directive */ "./src/app/typescripts/free/buttons/checkbox.directive.ts");
/* harmony import */ var _radio_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./radio.directive */ "./src/app/typescripts/free/buttons/radio.directive.ts");
var __decorate = (undefined && undefined.__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 ButtonsModule = /** @class */ (function () {
function ButtonsModule() {
}
ButtonsModule_1 = ButtonsModule;
ButtonsModule.forRoot = function () {
return { ngModule: ButtonsModule_1, providers: [] };
};
ButtonsModule = ButtonsModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [_checkbox_directive__WEBPACK_IMPORTED_MODULE_1__["ButtonCheckboxDirective"], _radio_directive__WEBPACK_IMPORTED_MODULE_2__["ButtonRadioDirective"]],
exports: [_checkbox_directive__WEBPACK_IMPORTED_MODULE_1__["ButtonCheckboxDirective"], _radio_directive__WEBPACK_IMPORTED_MODULE_2__["ButtonRadioDirective"]]
})
], ButtonsModule);
return ButtonsModule;
var ButtonsModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/buttons/checkbox.directive.ts":
/*!****************************************************************!*\
!*** ./src/app/typescripts/free/buttons/checkbox.directive.ts ***!
\****************************************************************/
/*! exports provided: CHECKBOX_CONTROL_VALUE_ACCESSOR, ButtonCheckboxDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHECKBOX_CONTROL_VALUE_ACCESSOR", function() { return CHECKBOX_CONTROL_VALUE_ACCESSOR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonCheckboxDirective", function() { return ButtonCheckboxDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
// TODO: config: activeClass - Class to apply to the checked buttons
var CHECKBOX_CONTROL_VALUE_ACCESSOR = {
provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return ButtonCheckboxDirective; }),
multi: true
};
/**
* Add checkbox functionality to any element
*/
var ButtonCheckboxDirective = /** @class */ (function () {
function ButtonCheckboxDirective() {
/** Truthy value, will be set to ngModel */
this.btnCheckboxTrue = true;
/** Falsy value, will be set to ngModel */
this.btnCheckboxFalse = false;
this.state = false;
this.onChange = Function.prototype;
this.onTouched = Function.prototype;
}
// view -> model
ButtonCheckboxDirective.prototype.onClick = function () {
if (this.isDisabled) {
return;
}
this.toggle(!this.state);
this.onChange(this.value);
};
ButtonCheckboxDirective.prototype.ngOnInit = function () {
this.toggle(this.trueValue === this.value);
};
Object.defineProperty(ButtonCheckboxDirective.prototype, "trueValue", {
get: function () {
return typeof this.btnCheckboxTrue !== 'undefined'
? this.btnCheckboxTrue
: true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ButtonCheckboxDirective.prototype, "falseValue", {
get: function () {
return typeof this.btnCheckboxFalse !== 'undefined'
? this.btnCheckboxFalse
: false;
},
enumerable: true,
configurable: true
});
ButtonCheckboxDirective.prototype.toggle = function (state) {
this.state = state;
this.value = this.state ? this.trueValue : this.falseValue;
};
// ControlValueAccessor
// model -> view
ButtonCheckboxDirective.prototype.writeValue = function (value) {
this.state = this.trueValue === value;
this.value = value ? this.trueValue : this.falseValue;
};
ButtonCheckboxDirective.prototype.setDisabledState = function (isDisabled) {
this.isDisabled = isDisabled;
};
ButtonCheckboxDirective.prototype.registerOnChange = function (fn) {
this.onChange = fn;
};
ButtonCheckboxDirective.prototype.registerOnTouched = function (fn) {
this.onTouched = fn;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], ButtonCheckboxDirective.prototype, "btnCheckboxTrue", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], ButtonCheckboxDirective.prototype, "btnCheckboxFalse", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.active'),
__metadata("design:type", Object)
], ButtonCheckboxDirective.prototype, "state", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ButtonCheckboxDirective.prototype, "onClick", null);
ButtonCheckboxDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[mdbCheckbox]', providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR] })
], ButtonCheckboxDirective);
return ButtonCheckboxDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/buttons/index.ts":
/*!***************************************************!*\
!*** ./src/app/typescripts/free/buttons/index.ts ***!
\***************************************************/
/*! exports provided: ButtonsModule, ButtonRadioDirective, ButtonCheckboxDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _buttons_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buttons.module */ "./src/app/typescripts/free/buttons/buttons.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonsModule", function() { return _buttons_module__WEBPACK_IMPORTED_MODULE_0__["ButtonsModule"]; });
/* harmony import */ var _radio_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./radio.directive */ "./src/app/typescripts/free/buttons/radio.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonRadioDirective", function() { return _radio_directive__WEBPACK_IMPORTED_MODULE_1__["ButtonRadioDirective"]; });
/* harmony import */ var _checkbox_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./checkbox.directive */ "./src/app/typescripts/free/buttons/checkbox.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonCheckboxDirective", function() { return _checkbox_directive__WEBPACK_IMPORTED_MODULE_2__["ButtonCheckboxDirective"]; });
/***/ }),
/***/ "./src/app/typescripts/free/buttons/radio.directive.ts":
/*!*************************************************************!*\
!*** ./src/app/typescripts/free/buttons/radio.directive.ts ***!
\*************************************************************/
/*! exports provided: RADIO_CONTROL_VALUE_ACCESSOR, ButtonRadioDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RADIO_CONTROL_VALUE_ACCESSOR", function() { return RADIO_CONTROL_VALUE_ACCESSOR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonRadioDirective", function() { return ButtonRadioDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var RADIO_CONTROL_VALUE_ACCESSOR = {
provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return ButtonRadioDirective; }),
multi: true
};
/**
* Create radio buttons or groups of buttons.
* A value of a selected button is bound to a variable specified via ngModel.
*/
var ButtonRadioDirective = /** @class */ (function () {
function ButtonRadioDirective(el) {
this.onChange = Function.prototype;
this.onTouched = Function.prototype;
this.el = el;
}
Object.defineProperty(ButtonRadioDirective.prototype, "isActive", {
get: function () {
return this.mdbRadio === this.value;
},
enumerable: true,
configurable: true
});
// @HostBinding('class.active')
ButtonRadioDirective.prototype.onClick = function () {
if (this.el.nativeElement.attributes.disabled) {
return;
}
if (this.uncheckable && this.mdbRadio === this.value) {
this.value = undefined;
}
else {
this.value = this.mdbRadio;
}
this.onTouched();
this.onChange(this.value);
};
ButtonRadioDirective.prototype.ngOnInit = function () {
this.uncheckable = typeof this.uncheckable !== 'undefined';
};
ButtonRadioDirective.prototype.onBlur = function () {
this.onTouched();
};
// ControlValueAccessor
// model -> view
ButtonRadioDirective.prototype.writeValue = function (value) {
this.value = value;
};
ButtonRadioDirective.prototype.registerOnChange = function (fn) {
this.onChange = fn;
};
ButtonRadioDirective.prototype.registerOnTouched = function (fn) {
this.onTouched = fn;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], ButtonRadioDirective.prototype, "mdbRadio", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], ButtonRadioDirective.prototype, "uncheckable", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], ButtonRadioDirective.prototype, "value", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.active'),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [])
], ButtonRadioDirective.prototype, "isActive", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ButtonRadioDirective.prototype, "onClick", null);
ButtonRadioDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[mdbRadio]', providers: [RADIO_CONTROL_VALUE_ACCESSOR] }),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], ButtonRadioDirective);
return ButtonRadioDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/carousel/carousel.component.html":
/*!*******************************************************************!*\
!*** ./src/app/typescripts/free/carousel/carousel.component.html ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div tabindex=\"0\" (swipeleft)=\"swipe($event.type)\" (swiperight)=\"swipe($event.type)\" (mouseenter)=\"pause()\" (mouseleave)=\"play()\" (mouseup)=\"play()\" class=\"carousel {{ class }} {{ type }}\">\r\n <div class=\"controls-top\" *ngIf=\"slides.length > 1 && !checkNavigation() && isControls\">\r\n <a class=\"btn-floating\" [class.disabled]=\"activeSlide===0&&noWrap\" (click)=\"previousSlide()\"><i class=\"fa fa-chevron-left\"></i></a>\r\n <a class=\"btn-floating\" (click)=\"nextSlide()\" [class.disabled]=\"isLast(activeSlide) && noWrap\"><i class=\"fa fa-chevron-right\"></i></a>\r\n </div>\r\n <ol class=\"carousel-indicators\" *ngIf=\"slides.length > 1 && checkDots() && isControls\">\r\n <li *ngFor=\"let slidez of slides; let i = index;\" [class.active]=\"slidez.active === true\" (click)=\"selectSlide(i)\"></li>\r\n </ol>\r\n <ol class=\"carousel-indicators\" *ngIf=\"slides.length > 1 && !checkDots() && isControls\">\r\n <li *ngFor=\"let slidez of slides; let i = index;\" [class.active]=\"slidez.active === true\" (click)=\"selectSlide(i)\">\r\n <img class=\"img-fluid\" src=\"{{ getImg(slidez) }}\">\r\n </li>\r\n </ol>\r\n <div class=\"carousel-inner\"><ng-content></ng-content></div>\r\n <a class=\"carousel-control-prev\" [class.disabled]=\"activeSlide === 0 && noWrap\" (click)=\"previousSlide()\" *ngIf=\"slides.length > 1 && checkNavigation() && isControls\">\r\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\r\n <span class=\"sr-only\">Previous</span>\r\n </a>\r\n <a class=\"carousel-control-next\" (click)=\"nextSlide()\" [class.disabled]=\"isLast(activeSlide) && noWrap\" *ngIf=\"slides.length > 1 && checkNavigation() && isControls\">\r\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\r\n <span class=\"sr-only\">Next</span>\r\n </a>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/free/carousel/carousel.component.ts":
/*!*****************************************************************!*\
!*** ./src/app/typescripts/free/carousel/carousel.component.ts ***!
\*****************************************************************/
/*! exports provided: Direction, CarouselComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Direction", function() { return Direction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CarouselComponent", function() { return CarouselComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./src/app/typescripts/free/utils/index.ts");
/* harmony import */ var _carousel_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./carousel.config */ "./src/app/typescripts/free/carousel/carousel.config.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var Direction;
(function (Direction) {
Direction[Direction["UNKNOWN"] = 0] = "UNKNOWN";
Direction[Direction["NEXT"] = 1] = "NEXT";
Direction[Direction["PREV"] = 2] = "PREV";
})(Direction || (Direction = {}));
/**
* Base element to create carousel
*/
var CarouselComponent = /** @class */ (function () {
function CarouselComponent(config, el) {
this.SWIPE_ACTION = { LEFT: 'swipeleft', RIGHT: 'swiperight' };
this._slides = new _utils__WEBPACK_IMPORTED_MODULE_1__["LinkedList"]();
this.destroyed = false;
// protected el: ElementRef = null;
this.el = null;
this.animationEnd = true;
this.isControls = true;
this.class = '';
this.type = '';
this.animation = '';
/** Will be emitted when active slide has been changed. Part of two-way-bindable [(activeSlide)] property */
this.activeSlideChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"](false);
Object.assign(this, config);
this.el = el;
}
Object.defineProperty(CarouselComponent.prototype, "slides", {
get: function () {
return this._slides.toArray();
},
enumerable: true,
configurable: true
});
Object.defineProperty(CarouselComponent.prototype, "activeSlide", {
get: function () {
return this._currentActiveSlide;
},
/** Index of currently displayed slide(started for 0) */
set: function (index) {
if (this._slides.length && index !== this._currentActiveSlide) {
this._select(index);
}
},
enumerable: true,
configurable: true
});
CarouselComponent.prototype.checkNavigation = function () {
if (this.type === 'carousel-multi-item') {
return false;
}
return true;
};
CarouselComponent.prototype.checkDots = function () {
if (this.type === 'carousel-thumbnails') {
return false;
}
return true;
};
CarouselComponent.prototype.getImg = function (slide) {
return slide.el.nativeElement.querySelector('img').src;
};
Object.defineProperty(CarouselComponent.prototype, "interval", {
/**
* Delay of item cycling in milliseconds. If false, carousel won't cycle automatically.
*/
get: function () {
return this._interval;
},
set: function (value) {
this._interval = value;
this.restartTimer();
},
enumerable: true,
configurable: true
});
Object.defineProperty(CarouselComponent.prototype, "isBs4", {
get: function () {
return !Object(_utils__WEBPACK_IMPORTED_MODULE_1__["isBs3"])();
},
enumerable: true,
configurable: true
});
CarouselComponent.prototype.ngOnDestroy = function () {
this.destroyed = true;
};
/**
* Adds new slide. If this slide is first in collection - set it as active and starts auto changing
* @param slide
*/
CarouselComponent.prototype.addSlide = function (slide) {
this._slides.add(slide);
if (this._slides.length === 1) {
this._currentActiveSlide = void 0;
this.activeSlide = 0;
this.play();
}
};
/**
* Removes specified slide. If this slide is active - will roll to another slide
* @param slide
*/
CarouselComponent.prototype.removeSlide = function (slide) {
var _this = this;
var remIndex = this._slides.indexOf(slide);
if (this._currentActiveSlide === remIndex) {
// removing of active slide
// let nextSlideIndex: number = void 0;
var nextSlideIndex_1 = void 0;
if (this._slides.length > 1) {
// if this slide last - will roll to first slide, if noWrap flag is FALSE or to previous, if noWrap is TRUE
// in case, if this slide in middle of collection, index of next slide is same to removed
nextSlideIndex_1 = !this.isLast(remIndex) ? remIndex :
this.noWrap ? remIndex - 1 : 0;
}
this._slides.remove(remIndex);
// prevents exception with changing some value after checking
setTimeout(function () {
_this._select(nextSlideIndex_1);
}, 0);
}
else {
this._slides.remove(remIndex);
var currentSlideIndex_1 = this.getCurrentSlideIndex();
setTimeout(function () {
// after removing, need to actualize index of current active slide
_this._currentActiveSlide = currentSlideIndex_1;
_this.activeSlideChange.emit(_this._currentActiveSlide);
}, 0);
}
};
// Fixed problem while cannot swipe next / previous image while using HammerJS.
CarouselComponent.prototype.swipe = function (action) {
if (action === void 0) { action = this.SWIPE_ACTION.RIGHT; }
if (action === this.SWIPE_ACTION.RIGHT) {
this.previousSlide();
}
if (action === this.SWIPE_ACTION.LEFT) {
this.nextSlide();
}
};
/**
* Rolling to next slide
* @param force: {boolean} if true - will ignore noWrap flag
*/
CarouselComponent.prototype.nextSlide = function (force) {
if (force === void 0) { force = false; }
if (this.animation === 'slide') {
this.pause();
var direction = Direction.NEXT;
this.slideAnimation(this.findNextSlideIndex(direction, force), direction);
}
else if (this.animation === 'fade') {
this.pause();
this.fadeAnimation(this.findNextSlideIndex(Direction.NEXT, force));
}
else {
this.activeSlide = this.findNextSlideIndex(Direction.NEXT, force);
}
};
/**
* Rolling to previous slide
* @param force: {boolean} if true - will ignore noWrap flag
*/
CarouselComponent.prototype.previousSlide = function (force) {
if (force === void 0) { force = false; }
if (this.animation === 'slide') {
this.pause();
var direction = Direction.PREV;
this.slideAnimation(this.findNextSlideIndex(direction, force), direction);
}
else if (this.animation === 'fade') {
this.pause();
this.fadeAnimation(this.findNextSlideIndex(Direction.PREV, force));
}
else {
this.activeSlide = this.findNextSlideIndex(Direction.PREV, force);
}
};
CarouselComponent.prototype.fadeAnimation = function (goToIndex) {
var _this = this;
//const currentSlide = this._slides.get(this._currentActiveSlide);
var goToSlide = this._slides.get(goToIndex);
if (this.animationEnd) {
this.animationEnd = false;
goToSlide.directionNext = true;
setTimeout(function () {
goToSlide.directionNext = false;
_this.animationEnd = true;
_this.activeSlide = goToIndex;
_this.play();
}, 100);
}
};
CarouselComponent.prototype.slideAnimation = function (goToIndex, direction) {
var _this = this;
var currentSlide = this._slides.get(this._currentActiveSlide);
var goToSlide = this._slides.get(goToIndex);
if (this.animationEnd) {
if (direction === Direction.NEXT) {
this.animationEnd = false;
goToSlide.directionNext = true;
setTimeout(function () {
goToSlide.directionLeft = true;
currentSlide.directionLeft = true;
}, 100);
}
if (direction === Direction.PREV) {
this.animationEnd = false;
goToSlide.directionPrev = true;
setTimeout(function () {
goToSlide.directionRight = true;
currentSlide.directionRight = true;
}, 100);
}
setTimeout(function () {
goToSlide.directionLeft = false;
goToSlide.directionNext = false;
currentSlide.directionLeft = false;
currentSlide.directionNext = false;
goToSlide.directionRight = false;
goToSlide.directionPrev = false;
currentSlide.directionRight = false;
currentSlide.directionPrev = false;
_this.animationEnd = true;
_this.activeSlide = goToIndex;
var directionName;
if (direction === Direction.NEXT) {
directionName = 'Next';
}
else if (direction === Direction.PREV) {
directionName = 'Prev';
}
_this.activeSlideChange.emit({ 'direction': directionName, 'relatedTarget': _this.activeSlide });
_this.play();
}, 700);
}
};
/**
* Rolling to specified slide
* @param index: {number} index of slide, which must be shown
*/
CarouselComponent.prototype.selectSlide = function (index) {
this.pause();
if (this.animation === 'slide') {
if (this.activeSlide < index) {
this.slideAnimation(index, Direction.NEXT);
}
else if (this.activeSlide > index) {
this.slideAnimation(index, Direction.PREV);
}
}
else if (this.animation === 'fade') {
if (index !== this.activeSlide) {
this.fadeAnimation(index);
}
}
this.play();
};
/**
* Starts a auto changing of slides
*/
CarouselComponent.prototype.play = function () {
if (!this.isPlaying) {
this.isPlaying = true;
this.restartTimer();
}
};
/**
* Stops a auto changing of slides
*/
CarouselComponent.prototype.pause = function () {
if (!this.noPause) {
this.isPlaying = false;
this.resetTimer();
}
};
/**
* Finds and returns index of currently displayed slide
* @returns {number}
*/
CarouselComponent.prototype.getCurrentSlideIndex = function () {
return this._slides.findIndex(function (slide) { return slide.active; });
};
/**
* Defines, whether the specified index is last in collection
* @param index
* @returns {boolean}
*/
CarouselComponent.prototype.isLast = function (index) {
return index + 1 >= this._slides.length;
};
/**
* Defines next slide index, depending of direction
* @param direction: Direction(UNKNOWN|PREV|NEXT)
* @param force: {boolean} if TRUE - will ignore noWrap flag, else will return undefined if next slide require wrapping
* @returns {any}
*/
CarouselComponent.prototype.findNextSlideIndex = function (direction, force) {
var nextSlideIndex = 0;
if (!force && (this.isLast(this.activeSlide) && direction !== Direction.PREV && this.noWrap)) {
return void 0;
}
switch (direction) {
case Direction.NEXT:
// if this is last slide, not force, looping is disabled and need to going forward - select current slide, as a next
nextSlideIndex = (!this.isLast(this._currentActiveSlide)) ? this._currentActiveSlide + 1 :
(!force && this.noWrap) ? this._currentActiveSlide : 0;
break;
case Direction.PREV:
// if this is first slide, not force, looping is disabled and need to going backward - select current slide, as a next
nextSlideIndex = (this._currentActiveSlide > 0) ? this._currentActiveSlide - 1 :
(!force && this.noWrap) ? this._currentActiveSlide : this._slides.length - 1;
break;
default:
throw new Error('Unknown direction');
}
return nextSlideIndex;
};
/**
* Sets a slide, which specified through index, as active
* @param index
* @private
*/
CarouselComponent.prototype._select = function (index) {
if (isNaN(index)) {
this.pause();
return;
}
var currentSlide = this._slides.get(this._currentActiveSlide);
if (currentSlide) {
currentSlide.active = false;
}
var nextSlide = this._slides.get(index);
if (nextSlide) {
this._currentActiveSlide = index;
nextSlide.active = true;
this.activeSlide = index;
// this.activeSlideChange.emit(index);
}
};
/**
* Starts loop of auto changing of slides
*/
CarouselComponent.prototype.restartTimer = function () {
var _this = this;
this.resetTimer();
var interval = +this.interval;
if (!isNaN(interval) && interval > 0) {
this.currentInterval = setInterval(function () {
var nInterval = +_this.interval;
if (_this.isPlaying && !isNaN(_this.interval) && nInterval > 0 && _this.slides.length) {
_this.nextSlide();
}
else {
_this.pause();
}
}, interval);
}
};
/**
* Stops loop of auto changing of slides
*/
CarouselComponent.prototype.resetTimer = function () {
if (this.currentInterval) {
clearInterval(this.currentInterval);
this.currentInterval = void 0;
}
};
CarouselComponent.prototype.hasClass = function (el, className) {
if (el.classList) {
return el.classList.contains(className);
}
else {
return !!el.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)'));
}
};
CarouselComponent.prototype.classAdd = function (el, className) {
if (el.classList) {
el.classList.add(className);
}
else if (!this.hasClass(el, className)) {
el.className += ' ' + className;
}
};
CarouselComponent.prototype.removeClass = function (el, className) {
if (el.classList) {
el.classList.remove(className);
}
else if (this.hasClass(el, className)) {
var reg = new RegExp('(\\s|^)' + className + '(\\s|$)');
el.className = el.className.replace(reg, ' ');
}
};
CarouselComponent.prototype.keyboardControl = function (event) {
if (this.keyboard) {
if (event.keyCode === 39) {
this.nextSlide();
}
if (event.keyCode === 37) {
this.previousSlide();
}
}
};
CarouselComponent.prototype.focus = function () {
this.el.nativeElement.focus();
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], CarouselComponent.prototype, "noWrap", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], CarouselComponent.prototype, "noPause", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('isControls'),
__metadata("design:type", Boolean)
], CarouselComponent.prototype, "isControls", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], CarouselComponent.prototype, "keyboard", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('class'),
__metadata("design:type", String)
], CarouselComponent.prototype, "class", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('type'),
__metadata("design:type", String)
], CarouselComponent.prototype, "type", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('animation'),
__metadata("design:type", String)
], CarouselComponent.prototype, "animation", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], CarouselComponent.prototype, "activeSlideChange", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number),
__metadata("design:paramtypes", [Number])
], CarouselComponent.prototype, "activeSlide", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number),
__metadata("design:paramtypes", [Number])
], CarouselComponent.prototype, "interval", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('mouseleave'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], CarouselComponent.prototype, "play", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('mouseenter'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], CarouselComponent.prototype, "pause", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('keyup', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [KeyboardEvent]),
__metadata("design:returntype", void 0)
], CarouselComponent.prototype, "keyboardControl", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], CarouselComponent.prototype, "focus", null);
CarouselComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-carousel',
template: __webpack_require__(/*! ./carousel.component.html */ "./src/app/typescripts/free/carousel/carousel.component.html"),
}),
__metadata("design:paramtypes", [_carousel_config__WEBPACK_IMPORTED_MODULE_2__["CarouselConfig"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], CarouselComponent);
return CarouselComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/carousel/carousel.config.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/free/carousel/carousel.config.ts ***!
\**************************************************************/
/*! exports provided: CarouselConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CarouselConfig", function() { return CarouselConfig; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 CarouselConfig = /** @class */ (function () {
function CarouselConfig() {
/** Default interval of auto changing of slides */
this.interval = 5000;
/** Is loop of auto changing of slides can be paused */
this.noPause = false;
/** Is slides can wrap from the last to the first slide */
this.noWrap = false;
this.keyboard = false;
}
CarouselConfig = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], CarouselConfig);
return CarouselConfig;
}());
/***/ }),
/***/ "./src/app/typescripts/free/carousel/carousel.module.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/free/carousel/carousel.module.ts ***!
\**************************************************************/
/*! exports provided: CarouselModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CarouselModule", function() { return CarouselModule; });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _carousel_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./carousel.component */ "./src/app/typescripts/free/carousel/carousel.component.ts");
/* harmony import */ var _slide_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slide.component */ "./src/app/typescripts/free/carousel/slide.component.ts");
/* harmony import */ var _carousel_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./carousel.config */ "./src/app/typescripts/free/carousel/carousel.config.ts");
var __decorate = (undefined && undefined.__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 CarouselModule = /** @class */ (function () {
function CarouselModule() {
}
CarouselModule_1 = CarouselModule;
CarouselModule.forRoot = function () {
return { ngModule: CarouselModule_1, providers: [] };
};
CarouselModule = CarouselModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"]],
declarations: [_slide_component__WEBPACK_IMPORTED_MODULE_3__["SlideComponent"], _carousel_component__WEBPACK_IMPORTED_MODULE_2__["CarouselComponent"]],
exports: [_slide_component__WEBPACK_IMPORTED_MODULE_3__["SlideComponent"], _carousel_component__WEBPACK_IMPORTED_MODULE_2__["CarouselComponent"]],
providers: [_carousel_config__WEBPACK_IMPORTED_MODULE_4__["CarouselConfig"]]
})
], CarouselModule);
return CarouselModule;
var CarouselModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/carousel/index.ts":
/*!****************************************************!*\
!*** ./src/app/typescripts/free/carousel/index.ts ***!
\****************************************************/
/*! exports provided: CarouselComponent, CarouselModule, SlideComponent, CarouselConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _carousel_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./carousel.component */ "./src/app/typescripts/free/carousel/carousel.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CarouselComponent", function() { return _carousel_component__WEBPACK_IMPORTED_MODULE_0__["CarouselComponent"]; });
/* harmony import */ var _carousel_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./carousel.module */ "./src/app/typescripts/free/carousel/carousel.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CarouselModule", function() { return _carousel_module__WEBPACK_IMPORTED_MODULE_1__["CarouselModule"]; });
/* harmony import */ var _slide_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slide.component */ "./src/app/typescripts/free/carousel/slide.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SlideComponent", function() { return _slide_component__WEBPACK_IMPORTED_MODULE_2__["SlideComponent"]; });
/* harmony import */ var _carousel_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./carousel.config */ "./src/app/typescripts/free/carousel/carousel.config.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CarouselConfig", function() { return _carousel_config__WEBPACK_IMPORTED_MODULE_3__["CarouselConfig"]; });
/***/ }),
/***/ "./src/app/typescripts/free/carousel/slide.component.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/free/carousel/slide.component.ts ***!
\**************************************************************/
/*! exports provided: SlideComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SlideComponent", function() { return SlideComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _carousel_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./carousel.component */ "./src/app/typescripts/free/carousel/carousel.component.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SlideComponent = /** @class */ (function () {
function SlideComponent(carousel, el) {
this.animated = false;
this.directionNext = false;
this.directionLeft = false;
this.directionPrev = false;
this.directionRight = false;
// public el: ElementRef = null;
this.el = null;
this.carousel = carousel;
this.el = el;
}
/** Fires changes in container collection after adding a new slide instance */
SlideComponent.prototype.ngOnInit = function () {
this.carousel.addSlide(this);
};
/** Fires changes in container collection after removing of this slide instance */
SlideComponent.prototype.ngOnDestroy = function () {
this.carousel.removeSlide(this);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.active'),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], SlideComponent.prototype, "active", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.animated'),
__metadata("design:type", Object)
], SlideComponent.prototype, "animated", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.carousel-item-next'),
__metadata("design:type", Object)
], SlideComponent.prototype, "directionNext", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.carousel-item-left'),
__metadata("design:type", Object)
], SlideComponent.prototype, "directionLeft", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.carousel-item-prev'),
__metadata("design:type", Object)
], SlideComponent.prototype, "directionPrev", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.carousel-item-right'),
__metadata("design:type", Object)
], SlideComponent.prototype, "directionRight", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.carousel-item')
/** Link to Parent(container-collection) component */
,
__metadata("design:type", _carousel_component__WEBPACK_IMPORTED_MODULE_1__["CarouselComponent"])
], SlideComponent.prototype, "carousel", void 0);
SlideComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-slide',
template: "\n <ng-content></ng-content>\n "
}),
__metadata("design:paramtypes", [_carousel_component__WEBPACK_IMPORTED_MODULE_1__["CarouselComponent"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], SlideComponent);
return SlideComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/charts/chart.directive.ts":
/*!************************************************************!*\
!*** ./src/app/typescripts/free/charts/chart.directive.ts ***!
\************************************************************/
/*! exports provided: BaseChartDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseChartDirective", function() { return BaseChartDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var BaseChartDirective = /** @class */ (function () {
function BaseChartDirective(element, platformId) {
this.labels = [];
this.options = {
legend: { display: false }
};
this.legend = false;
this.chartClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.chartHover = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.initFlag = false;
this.isBrowser = false;
this.element = element;
this.isBrowser = Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["isPlatformBrowser"])(platformId);
}
BaseChartDirective.prototype.ngOnInit = function () {
if (this.isBrowser) {
this.ctx = this.element.nativeElement.getContext('2d');
this.cvs = this.element.nativeElement;
this.initFlag = true;
if (this.data || this.datasets) {
this.refresh();
}
}
};
BaseChartDirective.prototype.ngOnChanges = function (changes) {
if (this.initFlag) {
// Check if the changes are in the data or datasets
if (changes.hasOwnProperty('data') || changes.hasOwnProperty('datasets')) {
if (changes['data']) {
this.updateChartData(changes['data'].currentValue);
}
else {
this.updateChartData(changes['datasets'].currentValue);
}
this.chart.update();
}
else {
// otherwise rebuild the chart
this.refresh();
}
}
};
BaseChartDirective.prototype.ngOnDestroy = function () {
if (this.chart) {
this.chart.destroy();
this.chart = void 0;
}
};
BaseChartDirective.prototype.getChartBuilder = function (ctx /*, data:Array<any>, options:any*/) {
var _this = this;
var datasets = this.getDatasets();
var options = Object.assign({}, this.options);
if (this.legend === false) {
options.legend = { display: false };
}
// hock for onHover and onClick events
options.hover = options.hover || {};
if (!options.hover.onHover) {
options.hover.onHover = function (event, active) {
if (active && active.length) {
_this.chartHover.emit({ event: event, active: active });
}
};
}
if (!options.onClick) {
options.onClick = function (event, active) {
_this.chartClick.emit({ event: event, active: active });
};
}
var opts = {
type: this.chartType,
data: {
labels: this.labels,
datasets: datasets
},
options: options
};
return new Chart(ctx, opts);
};
BaseChartDirective.prototype.updateChartData = function (newDataValues) {
if (Array.isArray(newDataValues[0].data)) {
this.chart.data.datasets.forEach(function (dataset, i) {
dataset.data = newDataValues[i].data;
if (newDataValues[i].label) {
dataset.label = newDataValues[i].label;
}
});
}
else {
this.chart.data.datasets[0].data = newDataValues;
}
};
BaseChartDirective.prototype.getDatasets = function () {
var _this = this;
var datasets = void 0;
// in case if datasets is not provided, but data is present
if (!this.datasets || !this.datasets.length && (this.data && this.data.length)) {
if (Array.isArray(this.data[0])) {
datasets = this.data.map(function (data, index) {
return { data: data, label: _this.labels[index] || "Label " + index };
});
}
else {
datasets = [{ data: this.data, label: "Label 0" }];
}
}
if (this.datasets && this.datasets.length ||
(datasets && datasets.length)) {
datasets = (this.datasets || datasets)
.map(function (elm, index) {
var newElm = Object.assign({}, elm);
if (_this.colors && _this.colors.length) {
Object.assign(newElm, _this.colors[index]);
}
else {
Object.assign(newElm, getColors(_this.chartType, index, newElm.data.length));
}
return newElm;
});
}
if (!datasets) {
throw new Error("ng-charts configuration error,\n data or datasets field are required to render char " + this.chartType);
}
return datasets;
};
BaseChartDirective.prototype.refresh = function () {
this.ngOnDestroy();
this.chart = this.getChartBuilder(this.ctx /*, data, this.options*/);
};
BaseChartDirective.defaultColors = [
[255, 99, 132],
[54, 162, 235],
[255, 206, 86],
[231, 233, 237],
[75, 192, 192],
[151, 187, 205],
[220, 220, 220],
[247, 70, 74],
[70, 191, 189],
[253, 180, 92],
[148, 159, 177],
[77, 83, 96]
];
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Array)
], BaseChartDirective.prototype, "data", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Array)
], BaseChartDirective.prototype, "datasets", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Array)
], BaseChartDirective.prototype, "labels", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], BaseChartDirective.prototype, "options", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], BaseChartDirective.prototype, "chartType", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Array)
], BaseChartDirective.prototype, "colors", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], BaseChartDirective.prototype, "legend", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], BaseChartDirective.prototype, "chartClick", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], BaseChartDirective.prototype, "chartHover", void 0);
BaseChartDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: 'canvas[mdbChart]', exportAs: 'mdb-base-chart' }),
__param(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"])),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], String])
], BaseChartDirective);
return BaseChartDirective;
}());
function rgba(colour, alpha) {
return 'rgba(' + colour.concat(alpha).join(',') + ')';
}
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function formatLineColor(colors) {
return {
backgroundColor: rgba(colors, 0.4),
borderColor: rgba(colors, 1),
pointBackgroundColor: rgba(colors, 1),
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: rgba(colors, 0.8)
};
}
function formatBarColor(colors) {
return {
backgroundColor: rgba(colors, 0.6),
borderColor: rgba(colors, 1),
hoverBackgroundColor: rgba(colors, 0.8),
hoverBorderColor: rgba(colors, 1)
};
}
function formatPieColors(colors) {
return {
backgroundColor: colors.map(function (color) { return rgba(color, 0.6); }),
borderColor: colors.map(function () { return '#fff'; }),
pointBackgroundColor: colors.map(function (color) { return rgba(color, 1); }),
pointBorderColor: colors.map(function () { return '#fff'; }),
pointHoverBackgroundColor: colors.map(function (color) { return rgba(color, 1); }),
pointHoverBorderColor: colors.map(function (color) { return rgba(color, 1); })
};
}
function formatPolarAreaColors(colors) {
return {
backgroundColor: colors.map(function (color) { return rgba(color, 0.6); }),
borderColor: colors.map(function (color) { return rgba(color, 1); }),
hoverBackgroundColor: colors.map(function (color) { return rgba(color, 0.8); }),
hoverBorderColor: colors.map(function (color) { return rgba(color, 1); })
};
}
function getRandomColor() {
return [getRandomInt(0, 255), getRandomInt(0, 255), getRandomInt(0, 255)];
}
/**
* Generate colors for line|bar charts
* @param index
* @returns {number[]|Color}
*/
function generateColor(index) {
return BaseChartDirective.defaultColors[index] || getRandomColor();
}
/**
* Generate colors for pie|doughnut charts
* @param count
* @returns {Colors}
*/
function generateColors(count) {
var colorsArr = new Array(count);
for (var i = 0; i < count; i++) {
colorsArr[i] = BaseChartDirective.defaultColors[i] || getRandomColor();
}
return colorsArr;
}
/**
* Generate colors by chart type
* @param chartType
* @param index
* @param count
* @returns {Color}
*/
function getColors(chartType, index, count) {
if (chartType === 'pie' || chartType === 'doughnut') {
return formatPieColors(generateColors(count));
}
if (chartType === 'polarArea') {
return formatPolarAreaColors(generateColors(count));
}
if (chartType === 'line' || chartType === 'radar') {
return formatLineColor(generateColor(index));
}
if (chartType === 'bar' || chartType === 'horizontalBar') {
return formatBarColor(generateColor(index));
}
return generateColor(index);
}
/***/ }),
/***/ "./src/app/typescripts/free/charts/chart.module.ts":
/*!*********************************************************!*\
!*** ./src/app/typescripts/free/charts/chart.module.ts ***!
\*********************************************************/
/*! exports provided: MDBChartsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBChartsModule", function() { return MDBChartsModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _chart_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chart.directive */ "./src/app/typescripts/free/charts/chart.directive.ts");
var __decorate = (undefined && undefined.__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 MDBChartsModule = /** @class */ (function () {
function MDBChartsModule() {
}
MDBChartsModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [
_chart_directive__WEBPACK_IMPORTED_MODULE_1__["BaseChartDirective"]
],
exports: [
_chart_directive__WEBPACK_IMPORTED_MODULE_1__["BaseChartDirective"]
],
imports: []
})
], MDBChartsModule);
return MDBChartsModule;
}());
/***/ }),
/***/ "./src/app/typescripts/free/charts/index.ts":
/*!**************************************************!*\
!*** ./src/app/typescripts/free/charts/index.ts ***!
\**************************************************/
/*! exports provided: BaseChartDirective, MDBChartsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _chart_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chart.directive */ "./src/app/typescripts/free/charts/chart.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseChartDirective", function() { return _chart_directive__WEBPACK_IMPORTED_MODULE_0__["BaseChartDirective"]; });
/* harmony import */ var _chart_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chart.module */ "./src/app/typescripts/free/charts/chart.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBChartsModule", function() { return _chart_module__WEBPACK_IMPORTED_MODULE_1__["MDBChartsModule"]; });
/***/ }),
/***/ "./src/app/typescripts/free/collapse/collapse.directive.ts":
/*!*****************************************************************!*\
!*** ./src/app/typescripts/free/collapse/collapse.directive.ts ***!
\*****************************************************************/
/*! exports provided: CollapseDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CollapseDirective", function() { return CollapseDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
// todo: add animations when https://github.com/angular/angular/issues/9947 solved
var CollapseDirective = /** @class */ (function () {
function CollapseDirective(_el, _renderer) {
this.showBsCollapse = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.shownBsCollapse = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.hideBsCollapse = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.hiddenBsCollapse = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/** This event fires as soon as content collapses */
this.collapsed = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/** This event fires as soon as content becomes visible */
this.expanded = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
// shown
// @HostBinding('class.in')
// @HostBinding('class.show')
// @HostBinding('attr.aria-expanded')
this.isExpanded = true;
// hidden
// @HostBinding('attr.aria-hidden')
this.isCollapsed = false;
// stale state
// @HostBinding('class.collapse')
this.isCollapse = true;
// animation state
// @HostBinding('class.collapsing')
this.isCollapsing = false;
this.collapsing = false;
this.animationTime = 500;
this._el = _el;
this._renderer = _renderer;
}
CollapseDirective.prototype.ngOnInit = function () {
this._el.nativeElement.classList.add('show');
this._el.nativeElement.style.transition = this.animationTime + 'ms ease';
if (!this.collapse) {
this._el.nativeElement.classList.remove('show');
this.hide();
}
else {
this.show();
}
this.isExpanded = this.collapse;
};
CollapseDirective.prototype.ngAfterViewInit = function () {
this.maxHeight = this._el.nativeElement.scrollHeight;
};
CollapseDirective.prototype.resize = function () {
var container = this._el.nativeElement;
this.maxHeight = this._el.nativeElement.scrollHeight;
this._renderer.setElementStyle(container, 'height', this.maxHeight + 'px');
};
/** allows to manually toggle content visibility */
CollapseDirective.prototype.toggle = function (event) {
if (!this.collapsing) {
if (this.isExpanded) {
this.hide();
}
else {
this.show();
}
}
this.maxHeight = event.target.parentElement.nextElementSibling.scrollHeight;
};
/** allows to manually hide content */
CollapseDirective.prototype.hide = function () {
var _this = this;
this.collapsing = true;
this.hideBsCollapse.emit();
this.isCollapse = false;
this.isCollapsing = true;
this.isExpanded = false;
this.isCollapsed = true;
var container = this._el.nativeElement;
container.classList.remove('collapse');
container.classList.remove('show');
container.classList.add('collapsing');
this._renderer.setElementStyle(container, 'height', '0px');
setTimeout(function () {
container.classList.remove('collapsing');
container.classList.add('collapse');
_this.hiddenBsCollapse.emit();
_this.collapsing = false;
}, this.animationTime);
this.collapsed.emit(this);
};
/** allows to manually show collapsed content */
CollapseDirective.prototype.show = function () {
var _this = this;
if (!this.isExpanded) {
this.collapsing = true;
this.showBsCollapse.emit();
this.isCollapse = false;
this.isCollapsing = true;
this.isExpanded = true;
this.isCollapsed = false;
var container_1 = this._el.nativeElement;
container_1.classList.remove('collapse');
container_1.classList.add('collapsing');
setTimeout(function () {
_this._renderer.setElementStyle(container_1, 'height', _this.maxHeight + 'px');
}, 10);
setTimeout(function () {
container_1.classList.remove('collapsing');
container_1.classList.add('collapse');
container_1.classList.add('show');
_this.shownBsCollapse.emit();
_this.collapsing = false;
}, this.animationTime - (this.animationTime * 0.5));
this.expanded.emit(this);
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])('showBsCollapse'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], CollapseDirective.prototype, "showBsCollapse", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])('shownBsCollapse'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], CollapseDirective.prototype, "shownBsCollapse", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])('hideBsCollapse'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], CollapseDirective.prototype, "hideBsCollapse", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])('hiddenBsCollapse'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], CollapseDirective.prototype, "hiddenBsCollapse", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], CollapseDirective.prototype, "collapsed", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], CollapseDirective.prototype, "expanded", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], CollapseDirective.prototype, "collapse", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CollapseDirective.prototype, "animationTime", void 0);
CollapseDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbCollapse]',
exportAs: 'bs-collapse',
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], CollapseDirective);
return CollapseDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/collapse/collapse.module.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/free/collapse/collapse.module.ts ***!
\**************************************************************/
/*! exports provided: CollapseModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CollapseModule", function() { return CollapseModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _collapse_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collapse.directive */ "./src/app/typescripts/free/collapse/collapse.directive.ts");
var __decorate = (undefined && undefined.__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 CollapseModule = /** @class */ (function () {
function CollapseModule() {
}
CollapseModule_1 = CollapseModule;
CollapseModule.forRoot = function () {
return { ngModule: CollapseModule_1, providers: [] };
};
CollapseModule = CollapseModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [_collapse_directive__WEBPACK_IMPORTED_MODULE_1__["CollapseDirective"]],
exports: [_collapse_directive__WEBPACK_IMPORTED_MODULE_1__["CollapseDirective"]]
})
], CollapseModule);
return CollapseModule;
var CollapseModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/collapse/index.ts":
/*!****************************************************!*\
!*** ./src/app/typescripts/free/collapse/index.ts ***!
\****************************************************/
/*! exports provided: CollapseDirective, CollapseModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _collapse_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./collapse.directive */ "./src/app/typescripts/free/collapse/collapse.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CollapseDirective", function() { return _collapse_directive__WEBPACK_IMPORTED_MODULE_0__["CollapseDirective"]; });
/* harmony import */ var _collapse_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collapse.module */ "./src/app/typescripts/free/collapse/collapse.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CollapseModule", function() { return _collapse_module__WEBPACK_IMPORTED_MODULE_1__["CollapseModule"]; });
/***/ }),
/***/ "./src/app/typescripts/free/dropdown/dropdown-container.component.ts":
/*!***************************************************************************!*\
!*** ./src/app/typescripts/free/dropdown/dropdown-container.component.ts ***!
\***************************************************************************/
/*! exports provided: BsDropdownContainerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BsDropdownContainerComponent", function() { return BsDropdownContainerComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _dropdown_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dropdown.state */ "./src/app/typescripts/free/dropdown/dropdown.state.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var BsDropdownContainerComponent = /** @class */ (function () {
function BsDropdownContainerComponent(_state) {
var _this = this;
this._state = _state;
this.isOpen = false;
this.display = 'block';
this.position = 'absolute';
this._subscription = _state.isOpenChange.subscribe(function (value) {
_this.isOpen = value;
});
}
Object.defineProperty(BsDropdownContainerComponent.prototype, "direction", {
get: function () {
return this._state.direction;
},
enumerable: true,
configurable: true
});
BsDropdownContainerComponent.prototype.ngOnDestroy = function () {
this._subscription.unsubscribe();
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('style.display'),
__metadata("design:type", Object)
], BsDropdownContainerComponent.prototype, "display", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('style.position'),
__metadata("design:type", Object)
], BsDropdownContainerComponent.prototype, "position", void 0);
BsDropdownContainerComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-dropdown-container',
changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
template: "\n <div [class.dropup]=\"direction === 'up'\"\n [class.dropdown]=\"direction === 'down'\"\n [class.show]=\"isOpen\"\n [class.open]=\"isOpen\">\n <ng-content></ng-content>\n </div>\n "
}),
__metadata("design:paramtypes", [_dropdown_state__WEBPACK_IMPORTED_MODULE_1__["BsDropdownState"]])
], BsDropdownContainerComponent);
return BsDropdownContainerComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/dropdown/dropdown-menu.directive.ts":
/*!**********************************************************************!*\
!*** ./src/app/typescripts/free/dropdown/dropdown-menu.directive.ts ***!
\**********************************************************************/
/*! exports provided: BsDropdownMenuDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BsDropdownMenuDirective", function() { return BsDropdownMenuDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _dropdown_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dropdown.state */ "./src/app/typescripts/free/dropdown/dropdown.state.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var BsDropdownMenuDirective = /** @class */ (function () {
function BsDropdownMenuDirective(_state, _viewContainer, _templateRef) {
_state.resolveDropdownMenu({
templateRef: _templateRef,
viewContainer: _viewContainer
});
}
BsDropdownMenuDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbDropdownMenu],[dropdownMenu]',
exportAs: 'bs-dropdown-menu'
}),
__metadata("design:paramtypes", [_dropdown_state__WEBPACK_IMPORTED_MODULE_1__["BsDropdownState"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]])
], BsDropdownMenuDirective);
return BsDropdownMenuDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/dropdown/dropdown-toggle.directive.ts":
/*!************************************************************************!*\
!*** ./src/app/typescripts/free/dropdown/dropdown-toggle.directive.ts ***!
\************************************************************************/
/*! exports provided: BsDropdownToggleDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BsDropdownToggleDirective", function() { return BsDropdownToggleDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _dropdown_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dropdown.state */ "./src/app/typescripts/free/dropdown/dropdown.state.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var BsDropdownToggleDirective = /** @class */ (function () {
function BsDropdownToggleDirective(_state, _element) {
var _this = this;
this._state = _state;
this._element = _element;
this._subscriptions = [];
this.ariaHaspopup = true;
// @HostBinding('attr.disabled') isDisabled: boolean = null;
this.isDisabled = null;
// sync is open value with state
this._subscriptions.push(this._state
.isOpenChange.subscribe(function (value) { return _this.isOpen = value; }));
// populate disabled state
this._subscriptions.push(this._state
.isDisabledChange
.subscribe(function (value) { return _this.isDisabled = value || null; }));
}
BsDropdownToggleDirective.prototype.onClick = function () {
if (this.isDisabled) {
return;
}
this._state.toggleClick.emit();
};
BsDropdownToggleDirective.prototype.onDocumentClick = function (event) {
if (this._state.autoClose && event.button !== 2 &&
!this._element.nativeElement.contains(event.target)) {
this._state.toggleClick.emit(false);
}
};
BsDropdownToggleDirective.prototype.onEsc = function () {
if (this._state.autoClose) {
this._state.toggleClick.emit(false);
}
};
BsDropdownToggleDirective.prototype.ngOnDestroy = function () {
for (var _i = 0, _a = this._subscriptions; _i < _a.length; _i++) {
var sub = _a[_i];
sub.unsubscribe();
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('attr.aria-haspopup'),
__metadata("design:type", Object)
], BsDropdownToggleDirective.prototype, "ariaHaspopup", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('attr.disabled'),
__metadata("design:type", Object)
], BsDropdownToggleDirective.prototype, "isDisabled", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('attr.aria-expanded'),
__metadata("design:type", Boolean)
], BsDropdownToggleDirective.prototype, "isOpen", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], BsDropdownToggleDirective.prototype, "onClick", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('document:click', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], BsDropdownToggleDirective.prototype, "onDocumentClick", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('keyup.esc'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], BsDropdownToggleDirective.prototype, "onEsc", null);
BsDropdownToggleDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbDropdownToggle],[dropdownToggle]',
exportAs: 'bs-dropdown-toggle'
}),
__metadata("design:paramtypes", [_dropdown_state__WEBPACK_IMPORTED_MODULE_1__["BsDropdownState"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], BsDropdownToggleDirective);
return BsDropdownToggleDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/dropdown/dropdown.config.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/free/dropdown/dropdown.config.ts ***!
\**************************************************************/
/*! exports provided: BsDropdownConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BsDropdownConfig", function() { return BsDropdownConfig; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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;
};
/** Default dropdown configuration */
var BsDropdownConfig = /** @class */ (function () {
function BsDropdownConfig() {
/** default dropdown auto closing behavior */
this.autoClose = true;
}
BsDropdownConfig = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], BsDropdownConfig);
return BsDropdownConfig;
}());
/***/ }),
/***/ "./src/app/typescripts/free/dropdown/dropdown.directive.ts":
/*!*****************************************************************!*\
!*** ./src/app/typescripts/free/dropdown/dropdown.directive.ts ***!
\*****************************************************************/
/*! exports provided: BsDropdownDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BsDropdownDirective", function() { return BsDropdownDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_add_operator_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/add/operator/filter */ "./node_modules/rxjs-compat/_esm5/add/operator/filter.js");
/* harmony import */ var _utils_component_loader_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/component-loader/index */ "./src/app/typescripts/free/utils/component-loader/index.ts");
/* harmony import */ var _dropdown_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dropdown.config */ "./src/app/typescripts/free/dropdown/dropdown.config.ts");
/* harmony import */ var _dropdown_container_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dropdown-container.component */ "./src/app/typescripts/free/dropdown/dropdown-container.component.ts");
/* harmony import */ var _dropdown_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dropdown.state */ "./src/app/typescripts/free/dropdown/dropdown.state.ts");
/* harmony import */ var _utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/ng2-bootstrap-config */ "./src/app/typescripts/free/utils/ng2-bootstrap-config.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var BsDropdownDirective = /** @class */ (function () {
function BsDropdownDirective(_elementRef, _renderer, _viewContainerRef, _cis, _config, _state) {
this._elementRef = _elementRef;
this._renderer = _renderer;
this._viewContainerRef = _viewContainerRef;
this._cis = _cis;
this._config = _config;
this._state = _state;
// todo: move to component loader
this._isInlineOpen = false;
this._subscriptions = [];
this._isInited = false;
// create dropdown component loader
this._dropdown = this._cis
.createLoader(this._elementRef, this._viewContainerRef, this._renderer)
.provide({ provide: _dropdown_state__WEBPACK_IMPORTED_MODULE_5__["BsDropdownState"], useValue: this._state });
this.onShown = this._dropdown.onShown;
this.onHidden = this._dropdown.onHidden;
this.isOpenChange = this._state.isOpenChange;
// set initial dropdown state from config
this._state.autoClose = this._config.autoClose;
}
Object.defineProperty(BsDropdownDirective.prototype, "autoClose", {
get: function () {
return this._state.autoClose;
},
/**
* Indicates that dropdown will be closed on item or document click,
* and after pressing ESC
*/
set: function (value) {
if (typeof value === 'boolean') {
this._state.autoClose = value;
}
},
enumerable: true,
configurable: true
});
;
Object.defineProperty(BsDropdownDirective.prototype, "isDisabled", {
get: function () { return this._isDisabled; },
/**
* Disables dropdown toggle and hides dropdown menu if opened
*/
set: function (value) {
this._isDisabled = value;
this._state.isDisabledChange.emit(value);
if (value) {
this.hide();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(BsDropdownDirective.prototype, "isOpen", {
/**
* Returns whether or not the popover is currently being shown
*/
get: function () {
if (this._showInline) {
return this._isInlineOpen;
}
return this._dropdown.isShown;
},
set: function (value) {
if (value) {
this.show();
}
else {
this.hide();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(BsDropdownDirective.prototype, "isBs4", {
get: function () {
return !Object(_utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_6__["isBs3"])();
},
enumerable: true,
configurable: true
});
BsDropdownDirective.prototype.ngOnInit = function () {
var _this = this;
// fix: seems there are an issue with `routerLinkActive`
// which result in duplicated call ngOnInit without call to ngOnDestroy
// read more: https://github.com/valor-software/ngx-bootstrap/issues/1885
if (this._isInited) {
return;
}
this._isInited = true;
this._showInline = !this.container;
// attach DOM listeners
this._dropdown.listen({
triggers: this.triggers,
show: function () { return _this.show(); }
});
// toggle visibility on toggle element click
this._subscriptions.push(this._state
.toggleClick.subscribe(function (value) { return _this.toggle(value); }));
// hide dropdown if set disabled while opened
this._subscriptions.push(this._state
.isDisabledChange
.filter(function (value) { return value === true; })
.subscribe(function () { return _this.hide(); }));
// attach dropdown menu inside of dropdown
if (this._showInline) {
this._state.dropdownMenu
.then(function (dropdownMenu) {
_this._inlinedMenu = dropdownMenu.viewContainer.createEmbeddedView(dropdownMenu.templateRef);
});
}
};
/**
* Opens an elements popover. This is considered a “manual” triggering of
* the popover.
*/
BsDropdownDirective.prototype.show = function () {
var _this = this;
if (this.isOpen || this.isDisabled) {
return;
}
// material and dropup dropdown animation
//const parent = this._elementRef.nativeElement.classList;
var container = this._elementRef.nativeElement.lastElementChild;
setTimeout(function () { container.classList.add('fadeInDropdown'); }, 200);
if (this._showInline) {
this._isInlineOpen = true;
this.onShown.emit(true);
this._state.isOpenChange.emit(true);
return;
}
this._state.dropdownMenu
.then(function (dropdownMenu) {
// check direction in which dropdown should be opened
var _dropup = _this.dropup === true ||
(typeof _this.dropup !== 'undefined' && _this.dropup !== false);
_this._state.direction = _dropup ? 'up' : 'down';
var _placement = _this.placement ||
(_dropup ? 'top left' : 'bottom left');
// show dropdown
_this._dropdown
.attach(_dropdown_container_component__WEBPACK_IMPORTED_MODULE_4__["BsDropdownContainerComponent"])
.to(_this.container)
.position({ attachment: _placement })
.show({
content: dropdownMenu.templateRef,
placement: _placement
});
_this._state.isOpenChange.emit(true);
});
};
/**
* Closes an elements popover. This is considered a “manual” triggering of
* the popover.
*/
BsDropdownDirective.prototype.hide = function () {
var _this = this;
if (!this.isOpen) {
return;
}
var parent = this._elementRef.nativeElement.classList;
var container = this._elementRef.nativeElement.lastElementChild;
if ((parent.value === 'dropdown open show') || (parent.value === 'btn-group dropup open show')) {
container.classList.remove('fadeInDropdown');
setTimeout(function () {
if (_this._showInline) {
_this._isInlineOpen = false;
_this.onHidden.emit(true);
}
else {
_this._dropdown.hide();
}
_this._state.isOpenChange.emit(false);
}, 560);
}
else {
if (this._showInline) {
this._isInlineOpen = false;
this.onHidden.emit(true);
}
else {
this._dropdown.hide();
}
this._state.isOpenChange.emit(false);
}
};
/**
* Toggles an elements popover. This is considered a “manual” triggering of
* the popover.
*/
BsDropdownDirective.prototype.toggle = function (value) {
if (this.isOpen || value === false) {
return this.hide();
}
return this.show();
};
BsDropdownDirective.prototype.ngOnDestroy = function () {
// clean up subscriptions and destroy dropdown
for (var _i = 0, _a = this._subscriptions; _i < _a.length; _i++) {
var sub = _a[_i];
sub.unsubscribe();
}
this._dropdown.dispose();
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], BsDropdownDirective.prototype, "placement", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], BsDropdownDirective.prototype, "triggers", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], BsDropdownDirective.prototype, "container", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.dropup'),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], BsDropdownDirective.prototype, "dropup", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], BsDropdownDirective.prototype, "autoClose", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], BsDropdownDirective.prototype, "isDisabled", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.open'),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.show'),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], BsDropdownDirective.prototype, "isOpen", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], BsDropdownDirective.prototype, "isOpenChange", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], BsDropdownDirective.prototype, "onShown", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], BsDropdownDirective.prototype, "onHidden", void 0);
BsDropdownDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbDropdown],[dropdown]',
exportAs: 'bs-dropdown',
providers: [_dropdown_state__WEBPACK_IMPORTED_MODULE_5__["BsDropdownState"]]
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"],
_utils_component_loader_index__WEBPACK_IMPORTED_MODULE_2__["ComponentLoaderFactory"],
_dropdown_config__WEBPACK_IMPORTED_MODULE_3__["BsDropdownConfig"],
_dropdown_state__WEBPACK_IMPORTED_MODULE_5__["BsDropdownState"]])
], BsDropdownDirective);
return BsDropdownDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/dropdown/dropdown.module.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/free/dropdown/dropdown.module.ts ***!
\**************************************************************/
/*! exports provided: BsDropdownModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BsDropdownModule", function() { return BsDropdownModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _utils_component_loader_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/component-loader/index */ "./src/app/typescripts/free/utils/component-loader/index.ts");
/* harmony import */ var _utils_positioning_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/positioning/index */ "./src/app/typescripts/free/utils/positioning/index.ts");
/* harmony import */ var _dropdown_container_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dropdown-container.component */ "./src/app/typescripts/free/dropdown/dropdown-container.component.ts");
/* harmony import */ var _dropdown_menu_directive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dropdown-menu.directive */ "./src/app/typescripts/free/dropdown/dropdown-menu.directive.ts");
/* harmony import */ var _dropdown_toggle_directive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dropdown-toggle.directive */ "./src/app/typescripts/free/dropdown/dropdown-toggle.directive.ts");
/* harmony import */ var _dropdown_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./dropdown.config */ "./src/app/typescripts/free/dropdown/dropdown.config.ts");
/* harmony import */ var _dropdown_directive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./dropdown.directive */ "./src/app/typescripts/free/dropdown/dropdown.directive.ts");
/* harmony import */ var _dropdown_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./dropdown.state */ "./src/app/typescripts/free/dropdown/dropdown.state.ts");
var __decorate = (undefined && undefined.__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 BsDropdownModule = /** @class */ (function () {
function BsDropdownModule() {
}
BsDropdownModule_1 = BsDropdownModule;
BsDropdownModule.forRoot = function (config) {
return {
ngModule: BsDropdownModule_1, providers: [
_utils_component_loader_index__WEBPACK_IMPORTED_MODULE_1__["ComponentLoaderFactory"],
_utils_positioning_index__WEBPACK_IMPORTED_MODULE_2__["PositioningService"],
_dropdown_state__WEBPACK_IMPORTED_MODULE_8__["BsDropdownState"],
{ provide: _dropdown_config__WEBPACK_IMPORTED_MODULE_6__["BsDropdownConfig"], useValue: config ? config : { autoClose: true } }
]
};
};
;
BsDropdownModule = BsDropdownModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [
_dropdown_menu_directive__WEBPACK_IMPORTED_MODULE_4__["BsDropdownMenuDirective"],
_dropdown_toggle_directive__WEBPACK_IMPORTED_MODULE_5__["BsDropdownToggleDirective"],
_dropdown_container_component__WEBPACK_IMPORTED_MODULE_3__["BsDropdownContainerComponent"],
_dropdown_directive__WEBPACK_IMPORTED_MODULE_7__["BsDropdownDirective"]
],
exports: [
_dropdown_menu_directive__WEBPACK_IMPORTED_MODULE_4__["BsDropdownMenuDirective"],
_dropdown_toggle_directive__WEBPACK_IMPORTED_MODULE_5__["BsDropdownToggleDirective"],
_dropdown_directive__WEBPACK_IMPORTED_MODULE_7__["BsDropdownDirective"]
],
entryComponents: [_dropdown_container_component__WEBPACK_IMPORTED_MODULE_3__["BsDropdownContainerComponent"]]
})
], BsDropdownModule);
return BsDropdownModule;
var BsDropdownModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/dropdown/dropdown.state.ts":
/*!*************************************************************!*\
!*** ./src/app/typescripts/free/dropdown/dropdown.state.ts ***!
\*************************************************************/
/*! exports provided: BsDropdownState */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BsDropdownState", function() { return BsDropdownState; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var BsDropdownState = /** @class */ (function () {
function BsDropdownState() {
var _this = this;
this.direction = 'down';
this.isOpenChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.isDisabledChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.toggleClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.dropdownMenu = new Promise(function (resolve) {
_this.resolveDropdownMenu = resolve;
});
}
BsDropdownState = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
__metadata("design:paramtypes", [])
], BsDropdownState);
return BsDropdownState;
}());
/***/ }),
/***/ "./src/app/typescripts/free/dropdown/index.ts":
/*!****************************************************!*\
!*** ./src/app/typescripts/free/dropdown/index.ts ***!
\****************************************************/
/*! exports provided: BsDropdownDirective, BsDropdownMenuDirective, BsDropdownToggleDirective, BsDropdownContainerComponent, BsDropdownState, BsDropdownConfig, BsDropdownModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _dropdown_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown.directive */ "./src/app/typescripts/free/dropdown/dropdown.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownDirective", function() { return _dropdown_directive__WEBPACK_IMPORTED_MODULE_0__["BsDropdownDirective"]; });
/* harmony import */ var _dropdown_menu_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dropdown-menu.directive */ "./src/app/typescripts/free/dropdown/dropdown-menu.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownMenuDirective", function() { return _dropdown_menu_directive__WEBPACK_IMPORTED_MODULE_1__["BsDropdownMenuDirective"]; });
/* harmony import */ var _dropdown_toggle_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dropdown-toggle.directive */ "./src/app/typescripts/free/dropdown/dropdown-toggle.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownToggleDirective", function() { return _dropdown_toggle_directive__WEBPACK_IMPORTED_MODULE_2__["BsDropdownToggleDirective"]; });
/* harmony import */ var _dropdown_container_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dropdown-container.component */ "./src/app/typescripts/free/dropdown/dropdown-container.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownContainerComponent", function() { return _dropdown_container_component__WEBPACK_IMPORTED_MODULE_3__["BsDropdownContainerComponent"]; });
/* harmony import */ var _dropdown_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dropdown.state */ "./src/app/typescripts/free/dropdown/dropdown.state.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownState", function() { return _dropdown_state__WEBPACK_IMPORTED_MODULE_4__["BsDropdownState"]; });
/* harmony import */ var _dropdown_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dropdown.config */ "./src/app/typescripts/free/dropdown/dropdown.config.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownConfig", function() { return _dropdown_config__WEBPACK_IMPORTED_MODULE_5__["BsDropdownConfig"]; });
/* harmony import */ var _dropdown_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./dropdown.module */ "./src/app/typescripts/free/dropdown/dropdown.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownModule", function() { return _dropdown_module__WEBPACK_IMPORTED_MODULE_6__["BsDropdownModule"]; });
/***/ }),
/***/ "./src/app/typescripts/free/index.ts":
/*!*******************************************!*\
!*** ./src/app/typescripts/free/index.ts ***!
\*******************************************/
/*! exports provided: ButtonsModule, ButtonRadioDirective, ButtonCheckboxDirective, RippleModule, RippleDirective, WavesModule, WavesDirective, DeepModule, DeepDirective, InputsModule, MdbInputDirective, ActiveModule, ActiveDirective, InputValidateDirective, NavbarModule, BsDropdownConfig, BsDropdownContainerComponent, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownModule, BsDropdownState, BsDropdownToggleDirective, CarouselComponent, CarouselConfig, CarouselModule, MDBChartsModule, BaseChartDirective, CollapseDirective, CollapseModule, ModalBackdropComponent, ModalBackdropOptions, ModalDirective, ModalModule, ModalOptions, MDBModalService, ModalContainerComponent, MDBModalRef, TooltipConfig, TooltipContainerComponent, TooltipDirective, MDBTooltipModule, PopoverConfig, PopoverContainerComponent, PopoverModule, PopoverDirective, MDBRootModule, MDBBootstrapModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBRootModule", function() { return MDBRootModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBBootstrapModule", function() { return MDBBootstrapModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _inputs___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./inputs/ */ "./src/app/typescripts/free/inputs/index.ts");
/* harmony import */ var _buttons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buttons */ "./src/app/typescripts/free/buttons/index.ts");
/* harmony import */ var _ripple__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ripple */ "./src/app/typescripts/free/ripple/index.ts");
/* harmony import */ var _navbars__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./navbars */ "./src/app/typescripts/free/navbars/index.ts");
/* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dropdown */ "./src/app/typescripts/free/dropdown/index.ts");
/* harmony import */ var _carousel___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./carousel/ */ "./src/app/typescripts/free/carousel/index.ts");
/* harmony import */ var _charts___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./charts/ */ "./src/app/typescripts/free/charts/index.ts");
/* harmony import */ var _collapse__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./collapse */ "./src/app/typescripts/free/collapse/index.ts");
/* harmony import */ var _modals__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modals */ "./src/app/typescripts/free/modals/index.ts");
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./tooltip */ "./src/app/typescripts/free/tooltip/index.ts");
/* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./popover */ "./src/app/typescripts/free/popover/index.ts");
/* harmony import */ var _waves_waves_module__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./waves/waves.module */ "./src/app/typescripts/free/waves/waves.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonsModule", function() { return _buttons__WEBPACK_IMPORTED_MODULE_2__["ButtonsModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonRadioDirective", function() { return _buttons__WEBPACK_IMPORTED_MODULE_2__["ButtonRadioDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonCheckboxDirective", function() { return _buttons__WEBPACK_IMPORTED_MODULE_2__["ButtonCheckboxDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RippleModule", function() { return _ripple__WEBPACK_IMPORTED_MODULE_3__["RippleModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RippleDirective", function() { return _ripple__WEBPACK_IMPORTED_MODULE_3__["RippleDirective"]; });
/* harmony import */ var _waves___WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./waves/ */ "./src/app/typescripts/free/waves/index.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WavesModule", function() { return _waves___WEBPACK_IMPORTED_MODULE_13__["WavesModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WavesDirective", function() { return _waves___WEBPACK_IMPORTED_MODULE_13__["WavesDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DeepModule", function() { return _inputs___WEBPACK_IMPORTED_MODULE_1__["DeepModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DeepDirective", function() { return _inputs___WEBPACK_IMPORTED_MODULE_1__["DeepDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputsModule", function() { return _inputs___WEBPACK_IMPORTED_MODULE_1__["InputsModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbInputDirective", function() { return _inputs___WEBPACK_IMPORTED_MODULE_1__["MdbInputDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActiveModule", function() { return _inputs___WEBPACK_IMPORTED_MODULE_1__["ActiveModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActiveDirective", function() { return _inputs___WEBPACK_IMPORTED_MODULE_1__["ActiveDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputValidateDirective", function() { return _inputs___WEBPACK_IMPORTED_MODULE_1__["InputValidateDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NavbarModule", function() { return _navbars__WEBPACK_IMPORTED_MODULE_4__["NavbarModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownConfig", function() { return _dropdown__WEBPACK_IMPORTED_MODULE_5__["BsDropdownConfig"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownContainerComponent", function() { return _dropdown__WEBPACK_IMPORTED_MODULE_5__["BsDropdownContainerComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownDirective", function() { return _dropdown__WEBPACK_IMPORTED_MODULE_5__["BsDropdownDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownMenuDirective", function() { return _dropdown__WEBPACK_IMPORTED_MODULE_5__["BsDropdownMenuDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownModule", function() { return _dropdown__WEBPACK_IMPORTED_MODULE_5__["BsDropdownModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownState", function() { return _dropdown__WEBPACK_IMPORTED_MODULE_5__["BsDropdownState"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BsDropdownToggleDirective", function() { return _dropdown__WEBPACK_IMPORTED_MODULE_5__["BsDropdownToggleDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CarouselComponent", function() { return _carousel___WEBPACK_IMPORTED_MODULE_6__["CarouselComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CarouselConfig", function() { return _carousel___WEBPACK_IMPORTED_MODULE_6__["CarouselConfig"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CarouselModule", function() { return _carousel___WEBPACK_IMPORTED_MODULE_6__["CarouselModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBChartsModule", function() { return _charts___WEBPACK_IMPORTED_MODULE_7__["MDBChartsModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseChartDirective", function() { return _charts___WEBPACK_IMPORTED_MODULE_7__["BaseChartDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CollapseDirective", function() { return _collapse__WEBPACK_IMPORTED_MODULE_8__["CollapseDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CollapseModule", function() { return _collapse__WEBPACK_IMPORTED_MODULE_8__["CollapseModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalBackdropComponent", function() { return _modals__WEBPACK_IMPORTED_MODULE_9__["ModalBackdropComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalBackdropOptions", function() { return _modals__WEBPACK_IMPORTED_MODULE_9__["ModalBackdropOptions"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalDirective", function() { return _modals__WEBPACK_IMPORTED_MODULE_9__["ModalDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalModule", function() { return _modals__WEBPACK_IMPORTED_MODULE_9__["ModalModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalOptions", function() { return _modals__WEBPACK_IMPORTED_MODULE_9__["ModalOptions"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBModalService", function() { return _modals__WEBPACK_IMPORTED_MODULE_9__["MDBModalService"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalContainerComponent", function() { return _modals__WEBPACK_IMPORTED_MODULE_9__["ModalContainerComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBModalRef", function() { return _modals__WEBPACK_IMPORTED_MODULE_9__["MDBModalRef"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipConfig", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_10__["TooltipConfig"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipContainerComponent", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_10__["TooltipContainerComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipDirective", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_10__["TooltipDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBTooltipModule", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_10__["MDBTooltipModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopoverConfig", function() { return _popover__WEBPACK_IMPORTED_MODULE_11__["PopoverConfig"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopoverContainerComponent", function() { return _popover__WEBPACK_IMPORTED_MODULE_11__["PopoverContainerComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopoverModule", function() { return _popover__WEBPACK_IMPORTED_MODULE_11__["PopoverModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopoverDirective", function() { return _popover__WEBPACK_IMPORTED_MODULE_11__["PopoverDirective"]; });
var __decorate = (undefined && undefined.__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;
};
// free
var MODULES = [
_inputs___WEBPACK_IMPORTED_MODULE_1__["DeepModule"],
_buttons__WEBPACK_IMPORTED_MODULE_2__["ButtonsModule"],
_ripple__WEBPACK_IMPORTED_MODULE_3__["RippleModule"],
_waves_waves_module__WEBPACK_IMPORTED_MODULE_12__["WavesModule"],
_inputs___WEBPACK_IMPORTED_MODULE_1__["InputsModule"],
_inputs___WEBPACK_IMPORTED_MODULE_1__["ActiveModule"],
_navbars__WEBPACK_IMPORTED_MODULE_4__["NavbarModule"],
_dropdown__WEBPACK_IMPORTED_MODULE_5__["BsDropdownModule"],
_carousel___WEBPACK_IMPORTED_MODULE_6__["CarouselModule"],
_charts___WEBPACK_IMPORTED_MODULE_7__["MDBChartsModule"],
_collapse__WEBPACK_IMPORTED_MODULE_8__["CollapseModule"],
_modals__WEBPACK_IMPORTED_MODULE_9__["ModalModule"],
_tooltip__WEBPACK_IMPORTED_MODULE_10__["MDBTooltipModule"],
_popover__WEBPACK_IMPORTED_MODULE_11__["PopoverModule"],
];
var MDBRootModule = /** @class */ (function () {
function MDBRootModule() {
}
MDBRootModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [
_buttons__WEBPACK_IMPORTED_MODULE_2__["ButtonsModule"],
_inputs___WEBPACK_IMPORTED_MODULE_1__["DeepModule"],
_ripple__WEBPACK_IMPORTED_MODULE_3__["RippleModule"].forRoot(),
_waves_waves_module__WEBPACK_IMPORTED_MODULE_12__["WavesModule"].forRoot(),
_inputs___WEBPACK_IMPORTED_MODULE_1__["InputsModule"].forRoot(),
_inputs___WEBPACK_IMPORTED_MODULE_1__["ActiveModule"].forRoot(),
_navbars__WEBPACK_IMPORTED_MODULE_4__["NavbarModule"],
_dropdown__WEBPACK_IMPORTED_MODULE_5__["BsDropdownModule"].forRoot(),
_carousel___WEBPACK_IMPORTED_MODULE_6__["CarouselModule"].forRoot(),
_charts___WEBPACK_IMPORTED_MODULE_7__["MDBChartsModule"],
_collapse__WEBPACK_IMPORTED_MODULE_8__["CollapseModule"].forRoot(),
_modals__WEBPACK_IMPORTED_MODULE_9__["ModalModule"].forRoot(),
_tooltip__WEBPACK_IMPORTED_MODULE_10__["MDBTooltipModule"].forRoot(),
_popover__WEBPACK_IMPORTED_MODULE_11__["PopoverModule"].forRoot(),
],
exports: MODULES,
schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["NO_ERRORS_SCHEMA"]]
})
], MDBRootModule);
return MDBRootModule;
}());
var MDBBootstrapModule = /** @class */ (function () {
function MDBBootstrapModule() {
}
MDBBootstrapModule.forRoot = function () {
return { ngModule: MDBRootModule };
};
MDBBootstrapModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({ exports: MODULES })
], MDBBootstrapModule);
return MDBBootstrapModule;
}());
/***/ }),
/***/ "./src/app/typescripts/free/inputs/active.class.ts":
/*!*********************************************************!*\
!*** ./src/app/typescripts/free/inputs/active.class.ts ***!
\*********************************************************/
/*! exports provided: ActiveDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActiveDirective", function() { return ActiveDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var ActiveDirective = /** @class */ (function () {
function ActiveDirective(el, renderer, platformId) {
this.renderer = renderer;
this.isBrowser = false;
this.isClicked = false;
// public el: ElementRef = null;
this.el = null;
// public elLabel: ElementRef = null;
this.elLabel = null;
// public elIcon: Element = null;
this.elIcon = null;
this.el = el;
this.isBrowser = Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["isPlatformBrowser"])(platformId);
}
ActiveDirective.prototype.onClick = function () {
this.initComponent();
this.isClicked = true;
};
ActiveDirective.prototype.Click = function () {
this.isClicked = true;
};
ActiveDirective.prototype.onBlur = function () {
this.checkValue();
this.isClicked = false;
};
// ngAfterViewInit with checkValue after setTimeout is needed in situation when we have prefilled
// forms, and label has to be lifted up.
ActiveDirective.prototype.ngAfterViewInit = function () {
var _this = this;
this.initComponent();
setTimeout(function () {
_this.checkValue();
}, 0);
};
ActiveDirective.prototype.ngAfterViewChecked = function () {
this.initComponent();
this.checkValue();
};
ActiveDirective.prototype.initComponent = function () {
var inputId;
var inputP;
if (this.isBrowser) {
try {
inputId = this.el.nativeElement.id;
}
catch (err) { }
try {
inputP = this.el.nativeElement.parentNode;
}
catch (err) { }
this.elLabel = inputP.querySelector('label[for="' + inputId + '"]') || inputP.querySelector('label');
if (this.elLabel != null) {
this.renderer.addClass(this.elLabel, 'active');
}
this.elIcon = inputP.querySelector('i') || false;
if (this.elIcon) {
this.renderer.addClass(this.elIcon, 'active');
}
}
};
ActiveDirective.prototype.checkValue = function () {
var value = '';
if (this.elLabel != null) {
value = this.el.nativeElement.value || '';
if (value === '') {
this.renderer.removeClass(this.elLabel, 'active');
if (this.elIcon) {
this.renderer.removeClass(this.elIcon, 'active');
}
// tslint:disable-next-line:max-line-length
}
if (value === '' && this.isClicked || value === '' && this.el.nativeElement.placeholder || value === '' && this.el.nativeElement.attributes.placeholder) {
this.renderer.addClass(this.elLabel, 'active');
}
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", ActiveDirective)
], ActiveDirective.prototype, "mdbActive", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('focus', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ActiveDirective.prototype, "onClick", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ActiveDirective.prototype, "Click", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('blur', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ActiveDirective.prototype, "onBlur", null);
ActiveDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbActive]'
}),
__param(2, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"])),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"], String])
], ActiveDirective);
return ActiveDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/inputs/active.module.ts":
/*!**********************************************************!*\
!*** ./src/app/typescripts/free/inputs/active.module.ts ***!
\**********************************************************/
/*! exports provided: ActiveModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActiveModule", function() { return ActiveModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _active_class__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./active.class */ "./src/app/typescripts/free/inputs/active.class.ts");
/* harmony import */ var _input_validate_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./input-validate.directive */ "./src/app/typescripts/free/inputs/input-validate.directive.ts");
var __decorate = (undefined && undefined.__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 ActiveModule = /** @class */ (function () {
function ActiveModule() {
}
ActiveModule_1 = ActiveModule;
ActiveModule.forRoot = function () {
return { ngModule: ActiveModule_1, providers: [] };
};
ActiveModule = ActiveModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [_active_class__WEBPACK_IMPORTED_MODULE_1__["ActiveDirective"], _input_validate_directive__WEBPACK_IMPORTED_MODULE_2__["InputValidateDirective"]],
exports: [_active_class__WEBPACK_IMPORTED_MODULE_1__["ActiveDirective"], _input_validate_directive__WEBPACK_IMPORTED_MODULE_2__["InputValidateDirective"]]
})
], ActiveModule);
return ActiveModule;
var ActiveModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/inputs/deep.directive.ts":
/*!***********************************************************!*\
!*** ./src/app/typescripts/free/inputs/deep.directive.ts ***!
\***********************************************************/
/*! exports provided: DeepDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeepDirective", function() { return DeepDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var DeepDirective = /** @class */ (function () {
function DeepDirective(el, renderer) {
this.el = el;
this.renderer = renderer;
}
DeepDirective.prototype.ngAfterViewInit = function () {
this.renderer.addClass(this.el.nativeElement, 'onFocusSelect');
};
DeepDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbDeepDirective]',
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]])
], DeepDirective);
return DeepDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/inputs/deep.module.ts":
/*!********************************************************!*\
!*** ./src/app/typescripts/free/inputs/deep.module.ts ***!
\********************************************************/
/*! exports provided: DeepModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeepModule", function() { return DeepModule; });
/* harmony import */ var _deep_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./deep.directive */ "./src/app/typescripts/free/inputs/deep.directive.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 DeepModule = /** @class */ (function () {
function DeepModule() {
}
DeepModule_1 = DeepModule;
DeepModule.forRoot = function () {
return { ngModule: DeepModule_1, providers: [] };
};
DeepModule = DeepModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
declarations: [_deep_directive__WEBPACK_IMPORTED_MODULE_0__["DeepDirective"]],
exports: [_deep_directive__WEBPACK_IMPORTED_MODULE_0__["DeepDirective"]]
})
], DeepModule);
return DeepModule;
var DeepModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/inputs/equal-validator.directive.ts":
/*!**********************************************************************!*\
!*** ./src/app/typescripts/free/inputs/equal-validator.directive.ts ***!
\**********************************************************************/
/*! exports provided: EqualValidatorDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EqualValidatorDirective", function() { return EqualValidatorDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var EqualValidatorDirective = /** @class */ (function () {
function EqualValidatorDirective(validateEqual, reverse) {
this.validateEqual = validateEqual;
this.reverse = reverse;
}
EqualValidatorDirective_1 = EqualValidatorDirective;
Object.defineProperty(EqualValidatorDirective.prototype, "isReverse", {
get: function () {
if (!this.reverse) {
return false;
}
return this.reverse === 'true' ? true : false;
},
enumerable: true,
configurable: true
});
EqualValidatorDirective.prototype.validate = function (c) {
var setToNullValue = null;
// self value (e.g. retype password)
var v = c.value;
// control value (e.g. password)
// const e: any = c.root.get(this.validateEqual);
var e = c.root.get(this.validateEqual);
// value not equal
if (e && v !== e.value) {
return { validateEqual: false };
}
// value equal and reverse
if (e && v === e.value && this.isReverse) {
delete e.errors['validateEqual'];
if (!Object.keys(e.errors).length) {
e.setErrors(null);
}
}
// value not equal and reverse
if (e && v !== e.value && this.isReverse) {
e.setErrors({
validateEqual: false
});
}
// return null;
return setToNullValue;
};
EqualValidatorDirective = EqualValidatorDirective_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdb-validateEqual][formControlName],[validateEqual][formControl],[validateEqual][ngModel]',
providers: [
{ provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALIDATORS"], useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return EqualValidatorDirective_1; }), multi: true }
]
}),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"])('validateEqual')),
__param(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"])('reverse')),
__metadata("design:paramtypes", [String, String])
], EqualValidatorDirective);
return EqualValidatorDirective;
var EqualValidatorDirective_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/inputs/index.ts":
/*!**************************************************!*\
!*** ./src/app/typescripts/free/inputs/index.ts ***!
\**************************************************/
/*! exports provided: ActiveModule, ActiveDirective, EqualValidatorDirective, InputValidateDirective, MdbInputDirective, DeepModule, DeepDirective, InputsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _active_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./active.module */ "./src/app/typescripts/free/inputs/active.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActiveModule", function() { return _active_module__WEBPACK_IMPORTED_MODULE_0__["ActiveModule"]; });
/* harmony import */ var _active_class__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./active.class */ "./src/app/typescripts/free/inputs/active.class.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActiveDirective", function() { return _active_class__WEBPACK_IMPORTED_MODULE_1__["ActiveDirective"]; });
/* harmony import */ var _equal_validator_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equal-validator.directive */ "./src/app/typescripts/free/inputs/equal-validator.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EqualValidatorDirective", function() { return _equal_validator_directive__WEBPACK_IMPORTED_MODULE_2__["EqualValidatorDirective"]; });
/* harmony import */ var _input_validate_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./input-validate.directive */ "./src/app/typescripts/free/inputs/input-validate.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputValidateDirective", function() { return _input_validate_directive__WEBPACK_IMPORTED_MODULE_3__["InputValidateDirective"]; });
/* harmony import */ var _mdb_input_directive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mdb-input.directive */ "./src/app/typescripts/free/inputs/mdb-input.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbInputDirective", function() { return _mdb_input_directive__WEBPACK_IMPORTED_MODULE_4__["MdbInputDirective"]; });
/* harmony import */ var _deep_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./deep.module */ "./src/app/typescripts/free/inputs/deep.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DeepModule", function() { return _deep_module__WEBPACK_IMPORTED_MODULE_5__["DeepModule"]; });
/* harmony import */ var _deep_directive__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./deep.directive */ "./src/app/typescripts/free/inputs/deep.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DeepDirective", function() { return _deep_directive__WEBPACK_IMPORTED_MODULE_6__["DeepDirective"]; });
/* harmony import */ var _inputs_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./inputs.module */ "./src/app/typescripts/free/inputs/inputs.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputsModule", function() { return _inputs_module__WEBPACK_IMPORTED_MODULE_7__["InputsModule"]; });
/***/ }),
/***/ "./src/app/typescripts/free/inputs/input-validate.directive.ts":
/*!*********************************************************************!*\
!*** ./src/app/typescripts/free/inputs/input-validate.directive.ts ***!
\*********************************************************************/
/*! exports provided: InputValidateDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputValidateDirective", function() { return InputValidateDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var InputValidateDirective = /** @class */ (function () {
function InputValidateDirective(_elRef, _renderer) {
this._elRef = _elRef;
this._renderer = _renderer;
this.value = '';
this.minLength = '0';
this.maxLength = '524288';
}
InputValidateDirective.prototype.ngOnInit = function () {
// Inititalise a new <span> wrong/right elements and render it below the host component.
this.wrongTextContainer = this._renderer.createElement(this._elRef.nativeElement.parentElement, 'span');
this._renderer.setElementClass(this.wrongTextContainer, 'inputVal', true);
this._renderer.setElementClass(this.wrongTextContainer, 'text-danger', true);
var textWrong = this._elRef.nativeElement.getAttribute('data-error');
this.wrongTextContainer.innerHTML = (textWrong ? textWrong : 'wrong');
this._renderer.setElementStyle(this.wrongTextContainer, 'visibility', 'hidden');
this.rightTextContainer = this._renderer.createElement(this._elRef.nativeElement.parentElement, 'span');
this._renderer.setElementClass(this.rightTextContainer, 'inputVal', true);
this._renderer.setElementClass(this.rightTextContainer, 'text-success', true);
var textSuccess = this._elRef.nativeElement.getAttribute('data-success');
this.rightTextContainer.innerHTML = (textSuccess ? textSuccess : 'success');
this._renderer.setElementStyle(this.rightTextContainer, 'visibility', 'hidden');
};
InputValidateDirective.prototype.onBlur = function () {
var inputType = this._elRef.nativeElement.type;
if (inputType === 'email') {
if (this.customRegex) {
var re = new RegExp(this._elRef.nativeElement.getAttribute('customRegex'));
if (this._elRef.nativeElement.length === 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
/*tslint:disable:max-line-length*/
}
else if (re.test(this._elRef.nativeElement.value) && this._elRef.nativeElement.value.length >= this.minLength && this._elRef.nativeElement.value.length <= this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', true);
}
else if (!re.test(this._elRef.nativeElement.value) || this._elRef.nativeElement.value.length < this.minLength || this._elRef.nativeElement.value.length > this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
}
}
else if (!this.customRegex) {
/*tslint:disable:max-line-length*/
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if (this._elRef.nativeElement.length === 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
else if (re.test(this._elRef.nativeElement.value) && this._elRef.nativeElement.value.length >= this.minLength && this._elRef.nativeElement.value.length <= this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', true);
}
else if (!re.test(this._elRef.nativeElement.value) || this._elRef.nativeElement.value.length < this.minLength || this._elRef.nativeElement.value.length > this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
}
}
}
else if (inputType === 'password') {
if (this.customRegex) {
var re = new RegExp(this._elRef.nativeElement.getAttribute('customRegex'));
if (this._elRef.nativeElement.length === 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
// tslint:disable-next-line:max-line-length
}
else if (this._elRef.nativeElement.value.match(re) && this._elRef.nativeElement.value.length >= this.minLength && this._elRef.nativeElement.value.length <= this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', true);
// tslint:disable-next-line:max-line-length
}
else if (!this._elRef.nativeElement.value.match(re) || this._elRef.nativeElement.value.length < this.minLength || this._elRef.nativeElement.value.length > this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
}
else if (!this.customRegex) {
if (this._elRef.nativeElement.length === 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
// tslint:disable-next-line:max-line-length
}
else if (this._elRef.nativeElement.value.match(/^(?=(.*\d){1})(.*\S)(?=.*[a-zA-Z\S])[0-9a-zA-Z\S]/g) && this._elRef.nativeElement.value.length >= this.minLength && this._elRef.nativeElement.value.length <= this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', true);
// tslint:disable-next-line:max-line-length
}
else if (!this._elRef.nativeElement.value.match(/^(?=(.*\d){1})(.*\S)(?=.*[a-zA-Z\S])[0-9a-zA-Z\S]/g) || this._elRef.nativeElement.value.length < this.minLength || this._elRef.nativeElement.value.length > this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
}
}
else if (inputType === 'text') {
if (this.customRegex) {
var re = new RegExp(this._elRef.nativeElement.getAttribute('customRegex'));
if (this._elRef.nativeElement.length === 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
// tslint:disable-next-line:max-line-length
}
else if (this._elRef.nativeElement.value.match(re) && this._elRef.nativeElement.value.length >= this.minLength && this._elRef.nativeElement.value.length <= this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', true);
// tslint:disable-next-line:max-line-length
}
else if (!this._elRef.nativeElement.value.match(re) || this._elRef.nativeElement.value.length < this.minLength || this._elRef.nativeElement.value.length > this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
}
else if (!this.customRegex) {
if (this._elRef.nativeElement.length === 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
// tslint:disable-next-line:max-line-length
}
else if (this._elRef.nativeElement.value.match(/^[a-zA-Z0-9]+$/g) && this._elRef.nativeElement.value.length >= this.minLength && this._elRef.nativeElement.value.length <= this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', true);
// tslint:disable-next-line:max-line-length
}
else if (!this._elRef.nativeElement.value.match(/^[a-zA-Z0-9]+$/g) || this._elRef.nativeElement.value.length < this.minLength || this._elRef.nativeElement.value.length > this.maxLength) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
}
}
else if (inputType === 'submit') {
for (var i = 0; i < this._elRef.nativeElement.parentElement.length; i++) {
if (this._elRef.nativeElement.parentElement[i].value == null || this._elRef.nativeElement.parentElement[i].value === '') {
this._renderer.setElementClass(this._elRef.nativeElement.parentElement[i], 'counter-danger', true);
this._renderer.setElementClass(this._elRef.nativeElement.parentElement[i], 'counter-success', false);
}
else if (!this._elRef.nativeElement.parentElement[i].value == null) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
}
}
else if (inputType === 'tel') {
if (this.customRegex) {
var re = new RegExp(this._elRef.nativeElement.getAttribute('customRegex'));
if (this._elRef.nativeElement.length === 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
else if (re.test(this._elRef.nativeElement.value) && this._elRef.nativeElement.value.length >= 8 && this._elRef.nativeElement.value.length <= 20) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', true);
}
else if (!re.test(this._elRef.nativeElement.value) || this._elRef.nativeElement.value.length > 20) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
}
else if (!this.customRegex) {
var re = /^(1[ \-\+]{0,3}|\+1[ -\+]{0,3}|\+1|\+)?((\(\+?1-[2-9][0-9]{1,2}\))|(\(\+?[2-8][0-9][0-9]\))|(\(\+?[1-9][0-9]\))|(\(\+?[17]\))|(\([2-9][2-9]\))|([ \-\.]{0,3}[0-9]{2,4}))?([ \-\.][0-9])?([ \-\.]{0,3}[0-9]{2,4}){2,3}$/;
if (this._elRef.nativeElement.length === 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
else if (re.test(this._elRef.nativeElement.value) && this._elRef.nativeElement.value.length >= 8 && this._elRef.nativeElement.value.length <= 20) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', true);
}
else if (!re.test(this._elRef.nativeElement.value) || this._elRef.nativeElement.value.length > 20) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
}
}
else if (inputType === 'number') {
if (this.customRegex) {
var re = new RegExp(this._elRef.nativeElement.getAttribute('customRegex'));
if (this._elRef.nativeElement.length === 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
else if (re.test(this._elRef.nativeElement.value) && this._elRef.nativeElement.value.length > 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', true);
}
else if (!re.test(this._elRef.nativeElement.value) || this._elRef.nativeElement.value.length < 1) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
}
else if (!this.customRegex) {
var re = /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:(\.|,)\d+)?$/;
if (this._elRef.nativeElement.length === 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
else if (re.test(this._elRef.nativeElement.value) && this._elRef.nativeElement.value.length > 0) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', false);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', true);
}
else if (!re.test(this._elRef.nativeElement.value) || this._elRef.nativeElement.value.length < 1) {
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-danger', true);
this._renderer.setElementClass(this._elRef.nativeElement, 'counter-success', false);
}
}
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], InputValidateDirective.prototype, "value", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('minLength'),
__metadata("design:type", String)
], InputValidateDirective.prototype, "minLength", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('maxLength'),
__metadata("design:type", String)
], InputValidateDirective.prototype, "maxLength", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('customRegex'),
__metadata("design:type", Object)
], InputValidateDirective.prototype, "customRegex", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('blur', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], InputValidateDirective.prototype, "onBlur", null);
InputValidateDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbInputValidate]',
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], InputValidateDirective);
return InputValidateDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/inputs/inputs.module.ts":
/*!**********************************************************!*\
!*** ./src/app/typescripts/free/inputs/inputs.module.ts ***!
\**********************************************************/
/*! exports provided: InputsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputsModule", function() { return InputsModule; });
/* harmony import */ var _mdb_input_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mdb-input.directive */ "./src/app/typescripts/free/inputs/mdb-input.directive.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _equal_validator_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equal-validator.directive */ "./src/app/typescripts/free/inputs/equal-validator.directive.ts");
var __decorate = (undefined && undefined.__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 InputsModule = /** @class */ (function () {
function InputsModule() {
}
InputsModule_1 = InputsModule;
InputsModule.forRoot = function () {
return { ngModule: InputsModule_1, providers: [] };
};
InputsModule = InputsModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
declarations: [_mdb_input_directive__WEBPACK_IMPORTED_MODULE_0__["MdbInputDirective"], _equal_validator_directive__WEBPACK_IMPORTED_MODULE_2__["EqualValidatorDirective"]],
exports: [_mdb_input_directive__WEBPACK_IMPORTED_MODULE_0__["MdbInputDirective"], _equal_validator_directive__WEBPACK_IMPORTED_MODULE_2__["EqualValidatorDirective"]]
})
], InputsModule);
return InputsModule;
var InputsModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/inputs/mdb-input.directive.ts":
/*!****************************************************************!*\
!*** ./src/app/typescripts/free/inputs/mdb-input.directive.ts ***!
\****************************************************************/
/*! exports provided: MdbInputDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdbInputDirective", function() { return MdbInputDirective; });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var MdbInputDirective = /** @class */ (function () {
function MdbInputDirective(el, renderer, platformId) {
this.renderer = renderer;
this.minLength = '0';
this.maxLength = '524288';
this.mdbValidate = true;
this.focusCheckbox = true;
this.focusRadio = true;
this.isBrowser = false;
this.isClicked = false;
this.el = null;
this.elLabel = null;
this.elIcon = null;
this.el = el;
this.isBrowser = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["isPlatformBrowser"])(platformId);
}
MdbInputDirective.prototype.onclick = function () {
this.renderer.addClass(this.elLabel, 'active');
this.isClicked = true;
};
MdbInputDirective.prototype.onBlur = function () {
if (this.el.nativeElement.value === '') {
this.renderer.removeClass(this.elLabel, 'active');
}
this.isClicked = false;
// Validation:
if (this.mdbValidate) {
var inputType = this.el.nativeElement.type;
if (inputType === 'email') {
if (this.customRegex) {
var re = new RegExp(this.el.nativeElement.getAttribute('customRegex'));
if (this.el.nativeElement.length === 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
/*tslint:disable:max-line-length*/
}
else if (re.test(this.el.nativeElement.value) && this.el.nativeElement.value.length >= this.minLength && this.el.nativeElement.value.length <= this.maxLength) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.addClass(this.el.nativeElement, 'counter-success');
}
else if (!re.test(this.el.nativeElement.value) || this.el.nativeElement.value.length < this.minLength || this.el.nativeElement.value.length > this.maxLength) {
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
}
}
else if (!this.customRegex) {
/*tslint:disable:max-line-length*/
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if (this.el.nativeElement.length === 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
else if (re.test(this.el.nativeElement.value) && this.el.nativeElement.value.length >= this.minLength && this.el.nativeElement.value.length <= this.maxLength) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.addClass(this.el.nativeElement, 'counter-success');
}
else if (!re.test(this.el.nativeElement.value) || this.el.nativeElement.value.length < this.minLength || this.el.nativeElement.value.length > this.maxLength) {
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
}
}
}
else if (inputType === 'password') {
if (this.customRegex) {
var re = new RegExp(this.el.nativeElement.getAttribute('customRegex'));
if (this.el.nativeElement.length === 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
// tslint:disable-next-line:max-line-length
}
else if (this.el.nativeElement.value.match(re) && this.el.nativeElement.value.length >= this.minLength && this.el.nativeElement.value.length <= this.maxLength) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.addClass(this.el.nativeElement, 'counter-success');
// tslint:disable-next-line:max-line-length
}
else if (!this.el.nativeElement.value.match(re) || this.el.nativeElement.value.length < this.minLength || this.el.nativeElement.value.length > this.maxLength) {
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
}
else if (!this.customRegex) {
if (this.el.nativeElement.length === 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
// tslint:disable-next-line:max-line-length
}
else if (this.el.nativeElement.value.match(/^(?=(.*\d){1})(.*\S)(?=.*[a-zA-Z\S])[0-9a-zA-Z\S]/g) && this.el.nativeElement.value.length >= this.minLength && this.el.nativeElement.value.length <= this.maxLength) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.addClass(this.el.nativeElement, 'counter-success');
// tslint:disable-next-line:max-line-length
}
else if (!this.el.nativeElement.value.match(/^(?=(.*\d){1})(.*\S)(?=.*[a-zA-Z\S])[0-9a-zA-Z\S]/g) || this.el.nativeElement.value.length < this.minLength || this.el.nativeElement.value.length > this.maxLength) {
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
}
}
else if (inputType === 'text') {
if (this.customRegex) {
var re = new RegExp(this.el.nativeElement.getAttribute('customRegex'));
if (this.el.nativeElement.length === 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
// tslint:disable-next-line:max-line-length
}
else if (this.el.nativeElement.value.match(re) && this.el.nativeElement.value.length >= this.minLength && this.el.nativeElement.value.length <= this.maxLength) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.addClass(this.el.nativeElement, 'counter-success');
// tslint:disable-next-line:max-line-length
}
else if (!this.el.nativeElement.value.match(re) || this.el.nativeElement.value.length < this.minLength || this.el.nativeElement.value.length > this.maxLength) {
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
}
else if (!this.customRegex) {
if (this.el.nativeElement.length === 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
// tslint:disable-next-line:max-line-length
}
else if (this.el.nativeElement.value.match(/^[a-zA-Z0-9]+$/g) && this.el.nativeElement.value.length >= this.minLength && this.el.nativeElement.value.length <= this.maxLength) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.addClass(this.el.nativeElement, 'counter-success');
// tslint:disable-next-line:max-line-length
}
else if (!this.el.nativeElement.value.match(/^[a-zA-Z0-9]+$/g) || this.el.nativeElement.value.length < this.minLength || this.el.nativeElement.value.length > this.maxLength) {
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
}
}
else if (inputType === 'submit') {
for (var i = 0; i < this.el.nativeElement.parentElement.length; i++) {
if (this.el.nativeElement.parentElement[i].value == null || this.el.nativeElement.parentElement[i].value === '') {
this.renderer.addClass(this.el.nativeElement.parentElement[i], 'counter-danger');
this.renderer.removeClass(this.el.nativeElement.parentElement[i], 'counter-success');
}
else if (!this.el.nativeElement.parentElement[i].value == null) {
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
}
}
else if (inputType === 'tel') {
if (this.customRegex) {
var re = new RegExp(this.el.nativeElement.getAttribute('customRegex'));
if (this.el.nativeElement.length === 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
else if (re.test(this.el.nativeElement.value) && this.el.nativeElement.value.length >= 8 && this.el.nativeElement.value.length <= 20) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.addClass(this.el.nativeElement, 'counter-success');
}
else if (!re.test(this.el.nativeElement.value) || this.el.nativeElement.value.length > 20) {
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
}
else if (!this.customRegex) {
var re = /^(1[ \-\+]{0,3}|\+1[ -\+]{0,3}|\+1|\+)?((\(\+?1-[2-9][0-9]{1,2}\))|(\(\+?[2-8][0-9][0-9]\))|(\(\+?[1-9][0-9]\))|(\(\+?[17]\))|(\([2-9][2-9]\))|([ \-\.]{0,3}[0-9]{2,4}))?([ \-\.][0-9])?([ \-\.]{0,3}[0-9]{2,4}){2,3}$/;
if (this.el.nativeElement.length === 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
else if (re.test(this.el.nativeElement.value) && this.el.nativeElement.value.length >= 8 && this.el.nativeElement.value.length <= 20) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.addClass(this.el.nativeElement, 'counter-success');
}
else if (!re.test(this.el.nativeElement.value) || this.el.nativeElement.value.length > 20) {
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
}
}
else if (inputType === 'number') {
if (this.customRegex) {
var re = new RegExp(this.el.nativeElement.getAttribute('customRegex'));
if (this.el.nativeElement.length === 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
else if (re.test(this.el.nativeElement.value) && this.el.nativeElement.value.length > 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.addClass(this.el.nativeElement, 'counter-success');
}
else if (!re.test(this.el.nativeElement.value) || this.el.nativeElement.value.length < 1) {
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
}
else if (!this.customRegex) {
var re = /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:(\.|,)\d+)?$/;
if (this.el.nativeElement.length === 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
else if (re.test(this.el.nativeElement.value) && this.el.nativeElement.value.length > 0) {
this.renderer.removeClass(this.el.nativeElement, 'counter-danger');
this.renderer.addClass(this.el.nativeElement, 'counter-success');
}
else if (!re.test(this.el.nativeElement.value) || this.el.nativeElement.value.length < 1) {
this.renderer.addClass(this.el.nativeElement, 'counter-danger');
this.renderer.removeClass(this.el.nativeElement, 'counter-success');
}
}
}
}
};
MdbInputDirective.prototype.onchange = function () {
this.checkValue();
};
MdbInputDirective.prototype.ngOnInit = function () {
if (this.mdbValidate) {
// Inititalise a new <span> wrong/right elements and render it below the host component.
// this.wrongTextContainer = this.renderer.createElement(this.el.nativeElement.parentElement, 'span');
this.wrongTextContainer = this.renderer.createElement('span');
this.renderer.addClass(this.wrongTextContainer, 'inputVal');
this.renderer.addClass(this.wrongTextContainer, 'text-danger');
this.renderer.appendChild(this.el.nativeElement.parentElement, this.wrongTextContainer);
var textWrong = this.el.nativeElement.getAttribute('data-error');
this.wrongTextContainer.innerHTML = (textWrong ? textWrong : 'wrong');
this.renderer.setStyle(this.wrongTextContainer, 'visibility', 'hidden');
// this.rightTextContainer = this.renderer.createElement(this.el.nativeElement.parentElement, 'span');
this.rightTextContainer = this.renderer.createElement('span');
this.renderer.addClass(this.rightTextContainer, 'inputVal');
this.renderer.addClass(this.rightTextContainer, 'text-success');
this.renderer.appendChild(this.el.nativeElement.parentElement, this.rightTextContainer);
var textSuccess = this.el.nativeElement.getAttribute('data-success');
this.rightTextContainer.innerHTML = (textSuccess ? textSuccess : 'success');
this.renderer.setStyle(this.rightTextContainer, 'visibility', 'hidden');
}
};
MdbInputDirective.prototype.ngAfterViewInit = function () {
var type = this.el.nativeElement.type;
if (this.focusCheckbox && type === 'checkbox') {
this.renderer.addClass(this.el.nativeElement, 'onFocusSelect');
}
if (this.focusRadio && type === 'radio') {
this.renderer.addClass(this.el.nativeElement, 'onFocusSelect');
}
};
MdbInputDirective.prototype.ngAfterViewChecked = function () {
this.initComponent();
this.checkValue();
// tslint:disable-next-line:max-line-length
if (this.el.nativeElement.tagName === 'MDB-COMPLETER' && this.el.nativeElement.getAttribute('ng-reflect-model') == null && !this.isClicked) {
this.renderer.removeClass(this.elLabel, 'active');
}
};
MdbInputDirective.prototype.initComponent = function () {
var inputId;
var inputP;
if (this.isBrowser) {
try {
inputId = this.el.nativeElement.id;
}
catch (err) { }
try {
inputP = this.el.nativeElement.parentNode;
}
catch (err) { }
this.elLabel = inputP.querySelector('label[for="' + inputId + '"]') || inputP.querySelector('label');
if (this.elLabel && this.el.nativeElement.value !== '') {
this.renderer.addClass(this.elLabel, 'active');
}
this.elIcon = inputP.querySelector('i') || false;
if (this.elIcon) {
this.renderer.addClass(this.elIcon, 'active');
}
}
};
MdbInputDirective.prototype.checkValue = function () {
var value = '';
if (this.elLabel != null) {
value = this.el.nativeElement.value || '';
if (value === '') {
this.renderer.removeClass(this.elLabel, 'active');
if (this.elIcon) {
this.renderer.removeClass(this.elIcon, 'active');
}
// tslint:disable-next-line:max-line-length
}
if (value === '' && this.isClicked ||
value === '' && this.el.nativeElement.placeholder ||
value === '' && this.el.nativeElement.attributes.placeholder) {
this.renderer.addClass(this.elLabel, 'active');
}
if (this.el.nativeElement.getAttribute('ng-reflect-model') != null) {
if (this.el.nativeElement.tagName === 'MDB-COMPLETER' && this.el.nativeElement.getAttribute('ng-reflect-model').length !== 0) {
this.renderer.addClass(this.elLabel, 'active');
}
}
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('mdbInputDirective'),
__metadata("design:type", MdbInputDirective)
], MdbInputDirective.prototype, "mdbInputDirective", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('placeholder'),
__metadata("design:type", String)
], MdbInputDirective.prototype, "placeholder", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('minLength'),
__metadata("design:type", String)
], MdbInputDirective.prototype, "minLength", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('maxLength'),
__metadata("design:type", String)
], MdbInputDirective.prototype, "maxLength", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('customRegex'),
__metadata("design:type", Object)
], MdbInputDirective.prototype, "customRegex", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('mdbValidate'),
__metadata("design:type", Boolean)
], MdbInputDirective.prototype, "mdbValidate", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('focusCheckbox'),
__metadata("design:type", Boolean)
], MdbInputDirective.prototype, "focusCheckbox", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('focusRadio'),
__metadata("design:type", Boolean)
], MdbInputDirective.prototype, "focusRadio", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('click'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], MdbInputDirective.prototype, "onclick", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('blur'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], MdbInputDirective.prototype, "onBlur", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('change'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], MdbInputDirective.prototype, "onchange", null);
MdbInputDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"])({
selector: '[mdbInputDirective]'
}),
__param(2, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"])),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], String])
], MdbInputDirective);
return MdbInputDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/modals/index.ts":
/*!**************************************************!*\
!*** ./src/app/typescripts/free/modals/index.ts ***!
\**************************************************/
/*! exports provided: ModalBackdropComponent, ModalBackdropOptions, ModalOptions, MDBModalRef, ModalDirective, ModalModule, MDBModalService, ModalContainerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _modalBackdrop_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modalBackdrop.component */ "./src/app/typescripts/free/modals/modalBackdrop.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalBackdropComponent", function() { return _modalBackdrop_component__WEBPACK_IMPORTED_MODULE_0__["ModalBackdropComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalBackdropOptions", function() { return _modalBackdrop_component__WEBPACK_IMPORTED_MODULE_0__["ModalBackdropOptions"]; });
/* harmony import */ var _modal_options__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modal.options */ "./src/app/typescripts/free/modals/modal.options.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalOptions", function() { return _modal_options__WEBPACK_IMPORTED_MODULE_1__["ModalOptions"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBModalRef", function() { return _modal_options__WEBPACK_IMPORTED_MODULE_1__["MDBModalRef"]; });
/* harmony import */ var _modal_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modal.directive */ "./src/app/typescripts/free/modals/modal.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalDirective", function() { return _modal_directive__WEBPACK_IMPORTED_MODULE_2__["ModalDirective"]; });
/* harmony import */ var _modal_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modal.module */ "./src/app/typescripts/free/modals/modal.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalModule", function() { return _modal_module__WEBPACK_IMPORTED_MODULE_3__["ModalModule"]; });
/* harmony import */ var _modal_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modal.service */ "./src/app/typescripts/free/modals/modal.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBModalService", function() { return _modal_service__WEBPACK_IMPORTED_MODULE_4__["MDBModalService"]; });
/* harmony import */ var _modalContainer_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modalContainer.component */ "./src/app/typescripts/free/modals/modalContainer.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalContainerComponent", function() { return _modalContainer_component__WEBPACK_IMPORTED_MODULE_5__["ModalContainerComponent"]; });
/***/ }),
/***/ "./src/app/typescripts/free/modals/modal.directive.ts":
/*!************************************************************!*\
!*** ./src/app/typescripts/free/modals/modal.directive.ts ***!
\************************************************************/
/*! exports provided: ModalDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModalDirective", function() { return ModalDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/facade/browser */ "./src/app/typescripts/free/utils/facade/browser.ts");
/* harmony import */ var _utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/ng2-bootstrap-config */ "./src/app/typescripts/free/utils/ng2-bootstrap-config.ts");
/* harmony import */ var _utils_utils_class__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/utils.class */ "./src/app/typescripts/free/utils/utils.class.ts");
/* harmony import */ var _modalBackdrop_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modalBackdrop.component */ "./src/app/typescripts/free/modals/modalBackdrop.component.ts");
/* harmony import */ var _modal_options__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modal.options */ "./src/app/typescripts/free/modals/modal.options.ts");
/* harmony import */ var _utils_component_loader_component_loader_factory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/component-loader/component-loader.factory */ "./src/app/typescripts/free/utils/component-loader/component-loader.factory.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var TRANSITION_DURATION = 300;
var BACKDROP_TRANSITION_DURATION = 150;
/** Mark any code with directive to show it's content in modal */
var ModalDirective = /** @class */ (function () {
function ModalDirective(_element, _viewContainerRef, _renderer, clf) {
/** This event fires immediately when the `show` instance method is called. */
this.onShow = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/** This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete) */
this.onShown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/** This event is fired immediately when the hide instance method has been called. */
this.onHide = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/** This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete). */
this.onHidden = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
// seems like an Options
this.isAnimated = true;
this._isShown = false;
this.isBodyOverflowing = false;
this.originalBodyPadding = 0;
this.scrollbarWidth = 0;
this.timerHideModal = 0;
this.timerRmBackDrop = 0;
this.isNested = false;
this._element = _element;
this._renderer = _renderer;
this._backdrop = clf.createLoader(_element, _viewContainerRef, _renderer);
}
Object.defineProperty(ModalDirective.prototype, "config", {
// public get config(): ModalOptions {
get: function () {
return this._config;
},
/** allows to set modal configuration via element property */
set: function (conf) {
this._config = this.getConfig(conf);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ModalDirective.prototype, "isShown", {
get: function () {
return this._isShown;
},
enumerable: true,
configurable: true
});
ModalDirective.prototype.onClick = function (event) {
if (this.config.ignoreBackdropClick || this.config.backdrop === 'static' || event.target !== this._element.nativeElement) {
return;
}
this.dismissReason = _modal_options__WEBPACK_IMPORTED_MODULE_5__["DISMISS_REASONS"].BACKRDOP;
this.hide(event);
};
// todo: consider preventing default and stopping propagation
ModalDirective.prototype.onEsc = function () {
if (this.config.keyboard) {
this.dismissReason = _modal_options__WEBPACK_IMPORTED_MODULE_5__["DISMISS_REASONS"].ESC;
this.hide();
}
};
ModalDirective.prototype.ngOnDestroy = function () {
this.config = void 0;
if (this._isShown) {
this._isShown = false;
this.hideModal();
this._backdrop.dispose();
}
};
ModalDirective.prototype.ngAfterViewInit = function () {
var _this = this;
this._config = this._config || this.getConfig();
setTimeout(function () {
if (_this._config.show) {
_this.show();
}
}, 0);
};
/* Public methods */
/** Allows to manually toggle modal visibility */
ModalDirective.prototype.toggle = function () {
return this._isShown ? this.hide() : this.show();
};
/** Allows to manually open modal */
ModalDirective.prototype.show = function () {
var _this = this;
this.dismissReason = null;
this.onShow.emit(this);
if (this._isShown) {
return;
}
clearTimeout(this.timerHideModal);
clearTimeout(this.timerRmBackDrop);
this._isShown = true;
this.checkScrollbar();
this.setScrollbar();
if (_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"] && _utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body) {
if (_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body.classList.contains(_modal_options__WEBPACK_IMPORTED_MODULE_5__["ClassName"].OPEN)) {
this.isNested = true;
}
else {
this._renderer.setElementClass(_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body, _modal_options__WEBPACK_IMPORTED_MODULE_5__["ClassName"].OPEN, true);
}
}
this.showBackdrop(function () {
_this.showElement();
});
};
/** Allows to manually close modal */
ModalDirective.prototype.hide = function (event) {
var _this = this;
if (event) {
event.preventDefault();
}
this.onHide.emit(this);
// todo: add an option to prevent hiding
if (!this._isShown) {
return;
}
clearTimeout(this.timerHideModal);
clearTimeout(this.timerRmBackDrop);
this._isShown = false;
this._renderer.setElementClass(this._element.nativeElement, _modal_options__WEBPACK_IMPORTED_MODULE_5__["ClassName"].IN, false);
if (!Object(_utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__["isBs3"])()) {
this._renderer.setElementClass(this._element.nativeElement, _modal_options__WEBPACK_IMPORTED_MODULE_5__["ClassName"].SHOW, false);
}
if (this.isAnimated) {
this.timerHideModal = setTimeout(function () { return _this.hideModal(); }, TRANSITION_DURATION);
}
else {
this.hideModal();
}
};
/** Private methods @internal */
ModalDirective.prototype.getConfig = function (config) {
return Object.assign({}, _modal_options__WEBPACK_IMPORTED_MODULE_5__["modalConfigDefaults"], config);
};
/**
* Show dialog
* @internal
*/
ModalDirective.prototype.showElement = function () {
var _this = this;
// todo: replace this with component loader usage
if (!this._element.nativeElement.parentNode ||
(this._element.nativeElement.parentNode.nodeType !== Node.ELEMENT_NODE)) {
// don't move modals dom position
if (_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"] && _utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body) {
_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body.appendChild(this._element.nativeElement);
}
}
this._renderer.setElementAttribute(this._element.nativeElement, 'aria-hidden', 'false');
this._renderer.setElementStyle(this._element.nativeElement, 'display', 'block');
this._renderer.setElementProperty(this._element.nativeElement, 'scrollTop', 0);
if (this.isAnimated) {
_utils_utils_class__WEBPACK_IMPORTED_MODULE_3__["Utils"].reflow(this._element.nativeElement);
}
this._renderer.setElementClass(this._element.nativeElement, _modal_options__WEBPACK_IMPORTED_MODULE_5__["ClassName"].IN, true);
if (!Object(_utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__["isBs3"])()) {
this._renderer.setElementClass(this._element.nativeElement, _modal_options__WEBPACK_IMPORTED_MODULE_5__["ClassName"].SHOW, true);
}
var transitionComplete = function () {
if (_this._config.focus) {
_this._element.nativeElement.focus();
}
_this.onShown.emit(_this);
};
if (this.isAnimated) {
setTimeout(transitionComplete, TRANSITION_DURATION);
}
else {
transitionComplete();
}
};
/** @internal */
ModalDirective.prototype.hideModal = function () {
var _this = this;
this._renderer.setElementAttribute(this._element.nativeElement, 'aria-hidden', 'true');
this._renderer.setElementStyle(this._element.nativeElement, 'display', 'none');
this.showBackdrop(function () {
if (!_this.isNested) {
if (_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"] && _utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body) {
_this._renderer.setElementClass(_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body, _modal_options__WEBPACK_IMPORTED_MODULE_5__["ClassName"].OPEN, false);
}
_this.resetScrollbar();
}
_this.resetAdjustments();
_this.focusOtherModal();
_this.onHidden.emit(_this);
});
};
// todo: original show was calling a callback when done, but we can use promise
/** @internal */
ModalDirective.prototype.showBackdrop = function (callback) {
var _this = this;
if (this._isShown && this.config.backdrop && (!this.backdrop || !this.backdrop.instance.isShown)) {
this.removeBackdrop();
this._backdrop
.attach(_modalBackdrop_component__WEBPACK_IMPORTED_MODULE_4__["ModalBackdropComponent"])
.to('body')
.show({ isAnimated: this.isAnimated });
this.backdrop = this._backdrop._componentRef;
if (!callback) {
return;
}
if (!this.isAnimated) {
callback();
return;
}
setTimeout(callback, BACKDROP_TRANSITION_DURATION);
}
else if (!this._isShown && this.backdrop) {
this.backdrop.instance.isShown = false;
var callbackRemove = function () {
_this.removeBackdrop();
if (callback) {
callback();
}
};
if (this.backdrop.instance.isAnimated) {
this.timerRmBackDrop = setTimeout(callbackRemove, BACKDROP_TRANSITION_DURATION);
}
else {
callbackRemove();
}
}
else if (callback) {
callback();
}
};
/** @internal */
ModalDirective.prototype.removeBackdrop = function () {
this._backdrop.hide();
};
ModalDirective.prototype.focusOtherModal = function () {
var otherOpenedModals = this._element.nativeElement.parentElement.querySelectorAll('.in[mdbModal]');
if (!otherOpenedModals.length) {
return;
}
this._renderer.invokeElementMethod(otherOpenedModals[otherOpenedModals.length - 1], 'focus');
};
/** @internal */
ModalDirective.prototype.resetAdjustments = function () {
this._renderer.setElementStyle(this._element.nativeElement, 'paddingLeft', '');
this._renderer.setElementStyle(this._element.nativeElement, 'paddingRight', '');
};
/** Scroll bar tricks */
/** @internal */
ModalDirective.prototype.checkScrollbar = function () {
this.isBodyOverflowing = _utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body.clientWidth < _utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["window"].innerWidth;
this.scrollbarWidth = this.getScrollbarWidth();
};
ModalDirective.prototype.setScrollbar = function () {
if (!_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"]) {
return;
}
this.originalBodyPadding = parseInt(_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["window"].getComputedStyle(_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body).getPropertyValue('padding-right') || 0, 10);
if (this.isBodyOverflowing) {
_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body.style.paddingRight = this.originalBodyPadding + this.scrollbarWidth + "px";
}
};
ModalDirective.prototype.resetScrollbar = function () {
_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body.style.paddingRight = this.originalBodyPadding;
};
// thx d.walsh
ModalDirective.prototype.getScrollbarWidth = function () {
var scrollDiv = this._renderer.createElement(_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body, 'div', void 0);
scrollDiv.className = _modal_options__WEBPACK_IMPORTED_MODULE_5__["ClassName"].SCROLLBAR_MEASURER;
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
_utils_facade_browser__WEBPACK_IMPORTED_MODULE_1__["document"].body.removeChild(scrollDiv);
return scrollbarWidth;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])()
// public set config(conf: ModalOptions) {
,
__metadata("design:type", Object),
__metadata("design:paramtypes", [Object])
], ModalDirective.prototype, "config", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], ModalDirective.prototype, "onShow", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], ModalDirective.prototype, "onShown", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], ModalDirective.prototype, "onHide", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], ModalDirective.prototype, "onHidden", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], ModalDirective.prototype, "onClick", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('keydown.esc'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ModalDirective.prototype, "onEsc", null);
ModalDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbModal]',
exportAs: 'mdb-modal'
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"], _utils_component_loader_component_loader_factory__WEBPACK_IMPORTED_MODULE_6__["ComponentLoaderFactory"]])
], ModalDirective);
return ModalDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/modals/modal.module.ts":
/*!*********************************************************!*\
!*** ./src/app/typescripts/free/modals/modal.module.ts ***!
\*********************************************************/
/*! exports provided: ModalModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModalModule", function() { return ModalModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _modalBackdrop_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modalBackdrop.component */ "./src/app/typescripts/free/modals/modalBackdrop.component.ts");
/* harmony import */ var _modal_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modal.directive */ "./src/app/typescripts/free/modals/modal.directive.ts");
/* harmony import */ var _utils_positioning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/positioning */ "./src/app/typescripts/free/utils/positioning/index.ts");
/* harmony import */ var _utils_component_loader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/component-loader */ "./src/app/typescripts/free/utils/component-loader/index.ts");
/* harmony import */ var _modalContainer_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modalContainer.component */ "./src/app/typescripts/free/modals/modalContainer.component.ts");
/* harmony import */ var _modal_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modal.service */ "./src/app/typescripts/free/modals/modal.service.ts");
var __decorate = (undefined && undefined.__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 ModalModule = /** @class */ (function () {
function ModalModule() {
}
ModalModule_1 = ModalModule;
ModalModule.forRoot = function () {
return { ngModule: ModalModule_1, providers: [_modal_service__WEBPACK_IMPORTED_MODULE_6__["MDBModalService"], _utils_component_loader__WEBPACK_IMPORTED_MODULE_4__["ComponentLoaderFactory"], _utils_positioning__WEBPACK_IMPORTED_MODULE_3__["PositioningService"]] };
};
ModalModule = ModalModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [_modalBackdrop_component__WEBPACK_IMPORTED_MODULE_1__["ModalBackdropComponent"], _modal_directive__WEBPACK_IMPORTED_MODULE_2__["ModalDirective"], _modalContainer_component__WEBPACK_IMPORTED_MODULE_5__["ModalContainerComponent"]],
exports: [_modalBackdrop_component__WEBPACK_IMPORTED_MODULE_1__["ModalBackdropComponent"], _modal_directive__WEBPACK_IMPORTED_MODULE_2__["ModalDirective"]],
entryComponents: [_modalBackdrop_component__WEBPACK_IMPORTED_MODULE_1__["ModalBackdropComponent"], _modalContainer_component__WEBPACK_IMPORTED_MODULE_5__["ModalContainerComponent"]],
schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["NO_ERRORS_SCHEMA"]]
})
], ModalModule);
return ModalModule;
var ModalModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/modals/modal.options.ts":
/*!**********************************************************!*\
!*** ./src/app/typescripts/free/modals/modal.options.ts ***!
\**********************************************************/
/*! exports provided: ModalOptions, MDBModalRef, modalConfigDefaults, ClassName, Selector, TransitionDurations, DISMISS_REASONS */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModalOptions", function() { return ModalOptions; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBModalRef", function() { return MDBModalRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modalConfigDefaults", function() { return modalConfigDefaults; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClassName", function() { return ClassName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selector", function() { return Selector; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransitionDurations", function() { return TransitionDurations; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DISMISS_REASONS", function() { return DISMISS_REASONS; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 ModalOptions = /** @class */ (function () {
function ModalOptions() {
}
ModalOptions = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], ModalOptions);
return ModalOptions;
}());
var MDBModalRef = /** @class */ (function () {
function MDBModalRef() {
}
/**
* Hides the modal
*/
MDBModalRef.prototype.hide = function () { };
MDBModalRef = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], MDBModalRef);
return MDBModalRef;
}());
var modalConfigDefaults = {
backdrop: true,
keyboard: true,
focus: true,
show: false,
ignoreBackdropClick: false,
class: '',
animated: true
};
var ClassName = {
SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
BACKDROP: 'modal-backdrop',
OPEN: 'modal-open',
FADE: 'fade',
IN: 'in',
SHOW: 'show' // bs4
};
var Selector = {
DIALOG: '.modal-dialog',
DATA_TOGGLE: '[data-toggle="modal"]',
DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'
};
var TransitionDurations = {
MODAL: 300,
BACKDROP: 150
};
var DISMISS_REASONS = {
BACKRDOP: 'backdrop-click',
ESC: 'esc'
};
/***/ }),
/***/ "./src/app/typescripts/free/modals/modal.service.ts":
/*!**********************************************************!*\
!*** ./src/app/typescripts/free/modals/modal.service.ts ***!
\**********************************************************/
/*! exports provided: MDBModalService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBModalService", function() { return MDBModalService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _utils_component_loader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/component-loader */ "./src/app/typescripts/free/utils/component-loader/index.ts");
/* harmony import */ var _modalBackdrop_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modalBackdrop.component */ "./src/app/typescripts/free/modals/modalBackdrop.component.ts");
/* harmony import */ var _modalContainer_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modalContainer.component */ "./src/app/typescripts/free/modals/modalContainer.component.ts");
/* harmony import */ var _modal_options__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modal.options */ "./src/app/typescripts/free/modals/modal.options.ts");
/* harmony import */ var _modalService_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modalService.config */ "./src/app/typescripts/free/modals/modalService.config.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var MDBModalService = /** @class */ (function () {
// public constructor(private clf: ComponentLoaderFactory) {
function MDBModalService(clf, el, v, r) {
this.clf = clf;
this.el = el;
this.v = v;
this.r = r;
// constructor props
this.config = _modal_options__WEBPACK_IMPORTED_MODULE_4__["modalConfigDefaults"];
this.onShow = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.onShown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.onHide = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.onHidden = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.isBodyOverflowing = false;
this.originalBodyPadding = 0;
this.scrollbarWidth = 0;
this.modalsCount = 0;
// private lastDismissReason = '';
this.lastDismissReason = '';
this.loaders = [];
// this._backdropLoader = this.clf.createLoader<ModalBackdropComponent>(null, null, null);
this._backdropLoader = this.clf.createLoader(this.el, this.v, this.r);
_modalService_config__WEBPACK_IMPORTED_MODULE_5__["msConfig"].serviceInstance = this;
}
/** Shows a modal */
MDBModalService.prototype.show = function (content, config) {
this.modalsCount++;
this._createLoaders();
this.config = Object.assign({}, _modal_options__WEBPACK_IMPORTED_MODULE_4__["modalConfigDefaults"], config);
this._showBackdrop();
this.lastDismissReason = null;
return this._showModal(content);
};
MDBModalService.prototype.hide = function (level) {
var _this = this;
if (this.modalsCount === 1) {
this._hideBackdrop();
this.resetScrollbar();
}
this.modalsCount = this.modalsCount >= 1 ? this.modalsCount - 1 : 0;
setTimeout(function () {
_this._hideModal(level);
_this.removeLoaders(level);
}, this.config.animated ? _modal_options__WEBPACK_IMPORTED_MODULE_4__["TransitionDurations"].BACKDROP : 0);
};
MDBModalService.prototype._showBackdrop = function () {
var isBackdropEnabled = this.config.backdrop || this.config.backdrop === 'static';
var isBackdropInDOM = !this.backdropRef || !this.backdropRef.instance.isShown;
if (this.modalsCount === 1) {
this.removeBackdrop();
if (isBackdropEnabled && isBackdropInDOM) {
this._backdropLoader
.attach(_modalBackdrop_component__WEBPACK_IMPORTED_MODULE_2__["ModalBackdropComponent"])
.to('body')
.show({ isAnimated: this.config.animated });
this.backdropRef = this._backdropLoader._componentRef;
}
}
};
MDBModalService.prototype._hideBackdrop = function () {
var _this = this;
if (!this.backdropRef) {
return;
}
this.backdropRef.instance.isShown = false;
var duration = this.config.animated ? _modal_options__WEBPACK_IMPORTED_MODULE_4__["TransitionDurations"].BACKDROP : 0;
setTimeout(function () { return _this.removeBackdrop(); }, duration);
};
MDBModalService.prototype._showModal = function (content) {
var modalLoader = this.loaders[this.loaders.length - 1];
var mdbModalRef = new _modal_options__WEBPACK_IMPORTED_MODULE_4__["MDBModalRef"]();
var modalContainerRef = modalLoader
.provide({ provide: _modal_options__WEBPACK_IMPORTED_MODULE_4__["ModalOptions"], useValue: this.config })
.provide({ provide: _modal_options__WEBPACK_IMPORTED_MODULE_4__["MDBModalRef"], useValue: mdbModalRef })
.attach(_modalContainer_component__WEBPACK_IMPORTED_MODULE_3__["ModalContainerComponent"])
.to('body')
.show({ content: content, isAnimated: this.config.animated });
modalContainerRef.instance.level = this.getModalsCount();
mdbModalRef.hide = function () {
modalContainerRef.instance.hide();
};
mdbModalRef.content = modalLoader.getInnerComponent() || null;
return mdbModalRef;
};
MDBModalService.prototype._hideModal = function (level) {
var modalLoader = this.loaders[level - 1];
if (modalLoader) {
modalLoader.hide();
}
};
MDBModalService.prototype.getModalsCount = function () {
return this.modalsCount;
};
MDBModalService.prototype.setDismissReason = function (reason) {
this.lastDismissReason = reason;
};
MDBModalService.prototype.removeBackdrop = function () {
this._backdropLoader.hide();
this.backdropRef = null;
};
/** AFTER PR MERGE MODAL.COMPONENT WILL BE USING THIS CODE*/
/** Scroll bar tricks */
/** @internal */
MDBModalService.prototype.checkScrollbar = function () {
this.isBodyOverflowing = document.body.clientWidth < window.innerWidth;
this.scrollbarWidth = this.getScrollbarWidth();
};
MDBModalService.prototype.setScrollbar = function () {
if (!document) {
return;
}
this.originalBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right') || '0', 10);
if (this.isBodyOverflowing) {
document.body.style.paddingRight = this.originalBodyPadding + this.scrollbarWidth + "px";
}
};
MDBModalService.prototype.resetScrollbar = function () {
document.body.style.paddingRight = this.originalBodyPadding + 'px';
};
// thx d.walsh
MDBModalService.prototype.getScrollbarWidth = function () {
var scrollDiv = document.createElement('div');
scrollDiv.className = _modal_options__WEBPACK_IMPORTED_MODULE_4__["ClassName"].SCROLLBAR_MEASURER;
document.body.appendChild(scrollDiv);
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
return scrollbarWidth;
};
MDBModalService.prototype._createLoaders = function () {
// const loader = this.clf.createLoader<ModalContainerComponent>(null, null, null);
var loader = this.clf.createLoader(this.el, this.v, this.r);
this.copyEvent(loader.onBeforeShow, this.onShow);
this.copyEvent(loader.onShown, this.onShown);
this.copyEvent(loader.onBeforeHide, this.onHide);
this.copyEvent(loader.onHidden, this.onHidden);
this.loaders.push(loader);
};
MDBModalService.prototype.removeLoaders = function (level) {
this.loaders.splice(level - 1, 1);
this.loaders.forEach(function (loader, i) {
loader.instance.level = i + 1;
});
};
MDBModalService.prototype.copyEvent = function (from, to) {
var _this = this;
from.subscribe(function () {
to.emit(_this.lastDismissReason);
});
};
MDBModalService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
__metadata("design:paramtypes", [_utils_component_loader__WEBPACK_IMPORTED_MODULE_1__["ComponentLoaderFactory"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], MDBModalService);
return MDBModalService;
}());
/***/ }),
/***/ "./src/app/typescripts/free/modals/modalBackdrop.component.ts":
/*!********************************************************************!*\
!*** ./src/app/typescripts/free/modals/modalBackdrop.component.ts ***!
\********************************************************************/
/*! exports provided: ModalBackdropOptions, ModalBackdropComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModalBackdropOptions", function() { return ModalBackdropOptions; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModalBackdropComponent", function() { return ModalBackdropComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _modal_options__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modal.options */ "./src/app/typescripts/free/modals/modal.options.ts");
/* harmony import */ var _utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/ng2-bootstrap-config */ "./src/app/typescripts/free/utils/ng2-bootstrap-config.ts");
/* harmony import */ var _utils_utils_class__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/utils.class */ "./src/app/typescripts/free/utils/utils.class.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ModalBackdropOptions = /** @class */ (function () {
function ModalBackdropOptions(options) {
this.animate = true;
Object.assign(this, options);
}
return ModalBackdropOptions;
}());
/** This component will be added as background layout for modals if enabled */
var ModalBackdropComponent = /** @class */ (function () {
function ModalBackdropComponent(element, renderer) {
this.classNameBackDrop = true;
this._isShown = false;
this.element = element;
this.renderer = renderer;
}
Object.defineProperty(ModalBackdropComponent.prototype, "isAnimated", {
get: function () {
return this._isAnimated;
},
set: function (value) {
this._isAnimated = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ModalBackdropComponent.prototype, "isShown", {
get: function () {
return this._isShown;
},
set: function (value) {
this._isShown = value;
this.renderer.setElementClass(this.element.nativeElement, "" + _modal_options__WEBPACK_IMPORTED_MODULE_1__["ClassName"].IN, value);
if (!Object(_utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__["isBs3"])()) {
this.renderer.setElementClass(this.element.nativeElement, "" + _modal_options__WEBPACK_IMPORTED_MODULE_1__["ClassName"].SHOW, value);
}
},
enumerable: true,
configurable: true
});
ModalBackdropComponent.prototype.ngOnInit = function () {
if (this.isAnimated) {
this.renderer.setElementClass(this.element.nativeElement, "" + _modal_options__WEBPACK_IMPORTED_MODULE_1__["ClassName"].FADE, this.isAnimated);
_utils_utils_class__WEBPACK_IMPORTED_MODULE_3__["Utils"].reflow(this.element.nativeElement);
}
this.isShown = true;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.modal-backdrop'),
__metadata("design:type", Object)
], ModalBackdropComponent.prototype, "classNameBackDrop", void 0);
ModalBackdropComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-modal-backdrop',
template: "",
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], ModalBackdropComponent);
return ModalBackdropComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/modals/modalContainer.component.ts":
/*!*********************************************************************!*\
!*** ./src/app/typescripts/free/modals/modalContainer.component.ts ***!
\*********************************************************************/
/*! exports provided: ModalContainerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModalContainerComponent", function() { return ModalContainerComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _modal_options__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modal.options */ "./src/app/typescripts/free/modals/modal.options.ts");
/* harmony import */ var _utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/ng2-bootstrap-config */ "./src/app/typescripts/free/utils/ng2-bootstrap-config.ts");
/* harmony import */ var _modalService_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modalService.config */ "./src/app/typescripts/free/modals/modalService.config.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ModalContainerComponent = /** @class */ (function () {
function ModalContainerComponent(options, _element, _renderer) {
this._renderer = _renderer;
this.tabindex = -1;
this.role = 'dialog';
this.modla = true;
this.isShown = false;
this.isModalHiding = false;
this.mdbModalService = _modalService_config__WEBPACK_IMPORTED_MODULE_3__["msConfig"].serviceInstance;
this._element = _element;
this.config = Object.assign({}, options);
}
ModalContainerComponent.prototype.onClick = function (event) {
if (this.config.ignoreBackdropClick || this.config.backdrop === 'static' || event.target !== this._element.nativeElement) {
return;
}
this.mdbModalService.setDismissReason(_modal_options__WEBPACK_IMPORTED_MODULE_1__["DISMISS_REASONS"].BACKRDOP);
this.hide();
};
ModalContainerComponent.prototype.onEsc = function () {
if (this.config.keyboard && this.level === this.mdbModalService.getModalsCount()) {
this.mdbModalService.setDismissReason(_modal_options__WEBPACK_IMPORTED_MODULE_1__["DISMISS_REASONS"].ESC);
this.hide();
}
};
ModalContainerComponent.prototype.ngOnInit = function () {
var _this = this;
if (this.isAnimated) {
this._renderer.setElementClass(this._element.nativeElement, _modal_options__WEBPACK_IMPORTED_MODULE_1__["ClassName"].FADE, true);
}
this._renderer.setElementStyle(this._element.nativeElement, 'display', 'block');
setTimeout(function () {
_this.isShown = true;
_this._renderer.setElementClass(_this._element.nativeElement, Object(_utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__["isBs3"])() ? _modal_options__WEBPACK_IMPORTED_MODULE_1__["ClassName"].IN : _modal_options__WEBPACK_IMPORTED_MODULE_1__["ClassName"].SHOW, true);
}, this.isAnimated ? _modal_options__WEBPACK_IMPORTED_MODULE_1__["TransitionDurations"].BACKDROP : 0);
if (document && document.body) {
if (this.mdbModalService.getModalsCount() === 1) {
this.mdbModalService.checkScrollbar();
this.mdbModalService.setScrollbar();
}
this._renderer.setElementClass(document.body, _modal_options__WEBPACK_IMPORTED_MODULE_1__["ClassName"].OPEN, true);
}
};
ModalContainerComponent.prototype.ngOnDestroy = function () {
if (this.isShown) {
this.hide();
}
};
ModalContainerComponent.prototype.hide = function () {
var _this = this;
if (this.isModalHiding || !this.isShown) {
return;
}
this.isModalHiding = true;
this._renderer.setElementClass(this._element.nativeElement, Object(_utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__["isBs3"])() ? _modal_options__WEBPACK_IMPORTED_MODULE_1__["ClassName"].IN : _modal_options__WEBPACK_IMPORTED_MODULE_1__["ClassName"].SHOW, false);
setTimeout(function () {
_this.isShown = false;
if (document && document.body && _this.mdbModalService.getModalsCount() === 1) {
_this._renderer.setElementClass(document.body, _modal_options__WEBPACK_IMPORTED_MODULE_1__["ClassName"].OPEN, false);
}
_this.mdbModalService.hide(_this.level);
_this.isModalHiding = false;
}, this.isAnimated ? _modal_options__WEBPACK_IMPORTED_MODULE_1__["TransitionDurations"].MODAL : 0);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('tabindex'),
__metadata("design:type", Object)
], ModalContainerComponent.prototype, "tabindex", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('role'),
__metadata("design:type", Object)
], ModalContainerComponent.prototype, "role", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.modal'),
__metadata("design:type", Object)
], ModalContainerComponent.prototype, "modla", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], ModalContainerComponent.prototype, "onClick", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('window:keydown.esc'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ModalContainerComponent.prototype, "onEsc", null);
ModalContainerComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-modal-container',
template: "\n <div [class]=\"'modal-dialog' + (config.class ? ' ' + config.class : '')\" role=\"document\">\n <div class=\"modal-content\"><ng-content></ng-content></div>\n</div>"
}),
__metadata("design:paramtypes", [_modal_options__WEBPACK_IMPORTED_MODULE_1__["ModalOptions"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], ModalContainerComponent);
return ModalContainerComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/modals/modalService.config.ts":
/*!****************************************************************!*\
!*** ./src/app/typescripts/free/modals/modalService.config.ts ***!
\****************************************************************/
/*! exports provided: msConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "msConfig", function() { return msConfig; });
var msConfig = {
serviceInstance: new Object()
};
/***/ }),
/***/ "./src/app/typescripts/free/navbars/index.ts":
/*!***************************************************!*\
!*** ./src/app/typescripts/free/navbars/index.ts ***!
\***************************************************/
/*! exports provided: NavbarModule, NavbarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _navbar_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./navbar.module */ "./src/app/typescripts/free/navbars/navbar.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NavbarModule", function() { return _navbar_module__WEBPACK_IMPORTED_MODULE_0__["NavbarModule"]; });
/* harmony import */ var _navbar_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./navbar.component */ "./src/app/typescripts/free/navbars/navbar.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NavbarComponent", function() { return _navbar_component__WEBPACK_IMPORTED_MODULE_1__["NavbarComponent"]; });
/***/ }),
/***/ "./src/app/typescripts/free/navbars/links.component.ts":
/*!*************************************************************!*\
!*** ./src/app/typescripts/free/navbars/links.component.ts ***!
\*************************************************************/
/*! exports provided: LinksComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinksComponent", function() { return LinksComponent; });
/* harmony import */ var _navbar_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./navbar.service */ "./src/app/typescripts/free/navbars/navbar.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var LinksComponent = /** @class */ (function () {
function LinksComponent(_navbarService) {
this._navbarService = _navbarService;
this.linkClick = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
}
LinksComponent.prototype.ngAfterContentInit = function () {
var that = this;
setTimeout(function () {
that.links.forEach(function (element) {
element.nativeElement.onclick = function () {
that._navbarService.setNavbarLinkClicks();
};
});
}, 0);
};
LinksComponent.prototype.ngAfterViewInit = function () {
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"])(_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterLinkWithHref"], { read: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], descendants: true }),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["QueryList"])
], LinksComponent.prototype, "links", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
__metadata("design:type", Object)
], LinksComponent.prototype, "linkClick", void 0);
LinksComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: 'links',
template: "\n <ng-content></ng-content>\n ",
}),
__metadata("design:paramtypes", [_navbar_service__WEBPACK_IMPORTED_MODULE_0__["NavbarService"]])
], LinksComponent);
return LinksComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/navbars/logo.component.ts":
/*!************************************************************!*\
!*** ./src/app/typescripts/free/navbars/logo.component.ts ***!
\************************************************************/
/*! exports provided: LogoComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LogoComponent", function() { return LogoComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 LogoComponent = /** @class */ (function () {
function LogoComponent() {
}
LogoComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'logo',
template: "\n <ng-content></ng-content>\n "
})
], LogoComponent);
return LogoComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/navbars/navbar.component.html":
/*!****************************************************************!*\
!*** ./src/app/typescripts/free/navbars/navbar.component.html ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<nav class=\"{{SideClass}}\" #nav>\r\n <div [ngClass]=\"{'container': containerInside}\" [ngStyle]=\"{'display': displayStyle}\" #container>\r\n <ng-content select=\"logo\"></ng-content>\r\n <ng-content *ngIf=\"this.doubleNav == true\" select=\"navlinks\"></ng-content>\r\n <div *ngIf=\"this.doubleNav == false\">\r\n <button class=\"navbar-toggler\" type=\"button\" (click)=\"toggle($event)\" mdbWavesEffect *ngIf=\"this.el.nativeElement.children.length !== 0\">\r\n <span class=\"navbar-toggler-icon\">\r\n </span>\r\n </button>\r\n </div>\r\n <div #navbar [style.height]=\"height\" class=\"navbar-collapse collapse\" [ngClass]=\"{'collapse': collapse, 'show': showClass, 'collapsing': collapsing}\">\r\n <ng-content select=\"links\"></ng-content>\r\n </div>\r\n </div>\r\n</nav>\r\n"
/***/ }),
/***/ "./src/app/typescripts/free/navbars/navbar.component.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/free/navbars/navbar.component.ts ***!
\**************************************************************/
/*! exports provided: NavbarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavbarComponent", function() { return NavbarComponent; });
/* harmony import */ var _navbar_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./navbar.service */ "./src/app/typescripts/free/navbars/navbar.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var NavbarComponent = /** @class */ (function () {
function NavbarComponent(renderer, _navbarService) {
var _this = this;
this.renderer = renderer;
this._navbarService = _navbarService;
this.containerInside = true;
this.shown = false;
this.duration = 350; // ms
this.collapse = false;
this.showClass = false;
this.collapsing = false;
// tslint:disable-next-line:max-line-length
this.subscription = this._navbarService.getNavbarLinkClicks().subscribe(function (navbarLinkClicks) { _this.closeNavbarOnClick(navbarLinkClicks); });
}
NavbarComponent.prototype.closeNavbarOnClick = function (navbarLinkClicks) {
this.navbarLinkClicks = navbarLinkClicks;
if (this.showClass) {
this.hide();
}
};
NavbarComponent.prototype.ngOnInit = function () {
var isDoubleNav = this.SideClass.split(' ');
if (isDoubleNav.indexOf('double-nav') !== -1) {
this.doubleNav = true;
}
else {
this.doubleNav = false;
}
};
NavbarComponent.prototype.ngAfterViewInit = function () {
var _this = this;
/* bugfix - bez tego sypie ExpressionChangedAfterItHasBeenCheckedError -
https://github.com/angular/angular/issues/6005#issuecomment-165951692 */
setTimeout(function () {
_this.height = _this.el.nativeElement.scrollHeight;
_this.collapse = true;
if (!_this.containerInside) {
var childrens = Array.from(_this.container.nativeElement.children);
childrens.forEach(function (child) {
// this.navbar.nativeElement.append(child);
_this.renderer.appendChild(_this.navbar.nativeElement, child);
_this.container.nativeElement.remove();
});
}
if (_this.el.nativeElement.children.length === 0) {
_this.el.nativeElement.remove();
}
});
};
NavbarComponent.prototype.toggle = function (event) {
event.preventDefault();
if (!this.collapsing) {
if (this.shown) {
this.hide();
}
else {
this.show();
}
}
};
NavbarComponent.prototype.show = function () {
var _this = this;
this.shown = true;
this.collapse = false;
this.collapsing = true;
setTimeout(function () {
_this.renderer.setStyle(_this.el.nativeElement, 'height', _this.height + 'px');
}, 10);
setTimeout(function () {
_this.collapsing = false;
_this.collapse = true;
_this.showClass = true;
}, this.duration);
};
NavbarComponent.prototype.hide = function () {
var _this = this;
this.shown = false;
this.collapse = false;
this.showClass = false;
this.collapsing = true;
setTimeout(function () {
_this.renderer.setStyle(_this.el.nativeElement, 'height', '0px');
}, 10);
setTimeout(function () {
_this.collapsing = false;
_this.collapse = true;
}, this.duration);
};
Object.defineProperty(NavbarComponent.prototype, "displayStyle", {
get: function () {
// if(!this.containerInside) {
// return 'flex';
// } else {
return '';
// }
},
enumerable: true,
configurable: true
});
NavbarComponent.prototype.onResize = function (event) {
var _this = this;
var breakpoit = 0;
if (this.SideClass.includes('navbar-expand-xl')) {
breakpoit = 1200;
}
else if (this.SideClass.includes('navbar-expand-lg')) {
breakpoit = 992;
}
else if (this.SideClass.includes('navbar-expand-md')) {
breakpoit = 768;
}
else if (this.SideClass.includes('navbar-expand-sm')) {
breakpoit = 576;
}
else {
breakpoit = event.target.innerWidth + 1;
}
if (event.target.innerWidth < breakpoit) {
if (!this.shown) {
this.collapse = false;
this.renderer.setStyle(this.el.nativeElement, 'height', '0px');
this.renderer.setStyle(this.el.nativeElement, 'opacity', '0');
setTimeout(function () {
_this.height = _this.el.nativeElement.scrollHeight;
_this.collapse = true;
_this.renderer.setStyle(_this.el.nativeElement, 'opacity', '');
}, 4);
}
}
else {
this.collapsing = false;
this.shown = false;
this.showClass = false;
this.collapse = true;
this.renderer.setStyle(this.el.nativeElement, 'height', '');
}
};
NavbarComponent.prototype.onScroll = function () {
if (this.navbar.nativeElement.classList.contains('scrolling-navbar')) {
if (window.pageYOffset > 120) {
this.renderer.addClass(this.navbar.nativeElement, 'top-nav-collapse');
}
else {
this.renderer.removeClass(this.navbar.nativeElement, 'top-nav-collapse');
}
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
__metadata("design:type", String)
], NavbarComponent.prototype, "SideClass", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
__metadata("design:type", Object)
], NavbarComponent.prototype, "containerInside", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('navbar'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"])
], NavbarComponent.prototype, "el", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('mobile'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"])
], NavbarComponent.prototype, "mobile", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('nav'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"])
], NavbarComponent.prototype, "navbar", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('container'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"])
], NavbarComponent.prototype, "container", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('window:resize', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], NavbarComponent.prototype, "onResize", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('document:scroll', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], NavbarComponent.prototype, "onScroll", null);
NavbarComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: 'mdb-navbar',
template: __webpack_require__(/*! ./navbar.component.html */ "./src/app/typescripts/free/navbars/navbar.component.html"),
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], _navbar_service__WEBPACK_IMPORTED_MODULE_0__["NavbarService"]])
], NavbarComponent);
return NavbarComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/navbars/navbar.module.ts":
/*!***********************************************************!*\
!*** ./src/app/typescripts/free/navbars/navbar.module.ts ***!
\***********************************************************/
/*! exports provided: NavbarModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavbarModule", function() { return NavbarModule; });
/* harmony import */ var _links_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./links.component */ "./src/app/typescripts/free/navbars/links.component.ts");
/* harmony import */ var _logo_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logo.component */ "./src/app/typescripts/free/navbars/logo.component.ts");
/* harmony import */ var _navbar_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./navbar.service */ "./src/app/typescripts/free/navbars/navbar.service.ts");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _navbar_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./navbar.component */ "./src/app/typescripts/free/navbars/navbar.component.ts");
/* harmony import */ var _navlinks_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./navlinks.component */ "./src/app/typescripts/free/navbars/navlinks.component.ts");
var __decorate = (undefined && undefined.__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 NavbarModule = /** @class */ (function () {
function NavbarModule() {
}
NavbarModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"]],
declarations: [_navbar_component__WEBPACK_IMPORTED_MODULE_5__["NavbarComponent"], _links_component__WEBPACK_IMPORTED_MODULE_0__["LinksComponent"], _logo_component__WEBPACK_IMPORTED_MODULE_1__["LogoComponent"], _navlinks_component__WEBPACK_IMPORTED_MODULE_6__["NavlinksComponent"]],
exports: [_navbar_component__WEBPACK_IMPORTED_MODULE_5__["NavbarComponent"], _links_component__WEBPACK_IMPORTED_MODULE_0__["LinksComponent"], _logo_component__WEBPACK_IMPORTED_MODULE_1__["LogoComponent"], _navlinks_component__WEBPACK_IMPORTED_MODULE_6__["NavlinksComponent"]],
providers: [_navbar_service__WEBPACK_IMPORTED_MODULE_2__["NavbarService"]]
})
], NavbarModule);
return NavbarModule;
}());
/***/ }),
/***/ "./src/app/typescripts/free/navbars/navbar.service.ts":
/*!************************************************************!*\
!*** ./src/app/typescripts/free/navbars/navbar.service.ts ***!
\************************************************************/
/*! exports provided: NavbarService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavbarService", function() { return NavbarService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/Subject */ "./node_modules/rxjs-compat/_esm5/Subject.js");
var __decorate = (undefined && undefined.__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 NavbarService = /** @class */ (function () {
function NavbarService() {
this.navbarLinkClicks = new rxjs_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
}
NavbarService.prototype.getNavbarLinkClicks = function () {
return this.navbarLinkClicks.asObservable();
};
NavbarService.prototype.setNavbarLinkClicks = function () {
this.navbarLinkClicks.next();
};
NavbarService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], NavbarService);
return NavbarService;
}());
/***/ }),
/***/ "./src/app/typescripts/free/navbars/navlinks.component.ts":
/*!****************************************************************!*\
!*** ./src/app/typescripts/free/navbars/navlinks.component.ts ***!
\****************************************************************/
/*! exports provided: NavlinksComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavlinksComponent", function() { return NavlinksComponent; });
/* harmony import */ var _navbar_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./navbar.service */ "./src/app/typescripts/free/navbars/navbar.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var NavlinksComponent = /** @class */ (function () {
function NavlinksComponent(_navbarService) {
this._navbarService = _navbarService;
this.linkClick = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
}
NavlinksComponent.prototype.ngAfterContentInit = function () {
var that = this;
setTimeout(function () {
that.links.forEach(function (element) {
element.nativeElement.onclick = function () {
that._navbarService.setNavbarLinkClicks();
};
});
}, 0);
};
NavlinksComponent.prototype.ngAfterViewInit = function () {
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"])(_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterLinkWithHref"], { read: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], descendants: true }),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["QueryList"])
], NavlinksComponent.prototype, "links", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
__metadata("design:type", Object)
], NavlinksComponent.prototype, "linkClick", void 0);
NavlinksComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: 'navlinks',
template: "\n <ng-content></ng-content>\n ",
}),
__metadata("design:paramtypes", [_navbar_service__WEBPACK_IMPORTED_MODULE_0__["NavbarService"]])
], NavlinksComponent);
return NavlinksComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/popover/index.ts":
/*!***************************************************!*\
!*** ./src/app/typescripts/free/popover/index.ts ***!
\***************************************************/
/*! exports provided: PopoverDirective, PopoverModule, PopoverConfig, PopoverContainerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _popover_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./popover.directive */ "./src/app/typescripts/free/popover/popover.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopoverDirective", function() { return _popover_directive__WEBPACK_IMPORTED_MODULE_0__["PopoverDirective"]; });
/* harmony import */ var _popover_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./popover.module */ "./src/app/typescripts/free/popover/popover.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopoverModule", function() { return _popover_module__WEBPACK_IMPORTED_MODULE_1__["PopoverModule"]; });
/* harmony import */ var _popover_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./popover.config */ "./src/app/typescripts/free/popover/popover.config.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopoverConfig", function() { return _popover_config__WEBPACK_IMPORTED_MODULE_2__["PopoverConfig"]; });
/* harmony import */ var _popover_container_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./popover-container.component */ "./src/app/typescripts/free/popover/popover-container.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PopoverContainerComponent", function() { return _popover_container_component__WEBPACK_IMPORTED_MODULE_3__["PopoverContainerComponent"]; });
/***/ }),
/***/ "./src/app/typescripts/free/popover/popover-container.component.ts":
/*!*************************************************************************!*\
!*** ./src/app/typescripts/free/popover/popover-container.component.ts ***!
\*************************************************************************/
/*! exports provided: PopoverContainerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopoverContainerComponent", function() { return PopoverContainerComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _popover_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./popover.config */ "./src/app/typescripts/free/popover/popover.config.ts");
/* harmony import */ var _utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/ng2-bootstrap-config */ "./src/app/typescripts/free/utils/ng2-bootstrap-config.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var PopoverContainerComponent = /** @class */ (function () {
function PopoverContainerComponent(config) {
this.show = '!isBs3';
this.role = 'tooltip';
Object.assign(this, config);
}
Object.defineProperty(PopoverContainerComponent.prototype, "isBs3", {
get: function () {
return Object(_utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__["isBs3"])();
},
enumerable: true,
configurable: true
});
PopoverContainerComponent.prototype.ngOnInit = function () {
this.class = 'popover-fadeIn popover in popover-' + this.placement + ' ' + this.placement + ' bs-popover-' + this.placement;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], PopoverContainerComponent.prototype, "placement", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], PopoverContainerComponent.prototype, "title", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.show'),
__metadata("design:type", Object)
], PopoverContainerComponent.prototype, "show", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('attr.role'),
__metadata("design:type", Object)
], PopoverContainerComponent.prototype, "role", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class'),
__metadata("design:type", Object)
], PopoverContainerComponent.prototype, "class", void 0);
PopoverContainerComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-popover-container',
changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
template: "\n <h3 class=\"popover-header\" *ngIf=\"title\">{{title}}</h3>\n <div class=\"popover-body\">\n <ng-content></ng-content>\n </div>"
}),
__metadata("design:paramtypes", [_popover_config__WEBPACK_IMPORTED_MODULE_1__["PopoverConfig"]])
], PopoverContainerComponent);
return PopoverContainerComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/popover/popover.config.ts":
/*!************************************************************!*\
!*** ./src/app/typescripts/free/popover/popover.config.ts ***!
\************************************************************/
/*! exports provided: PopoverConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopoverConfig", function() { return PopoverConfig; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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;
};
/**
* Configuration service for the Popover directive.
* You can inject this service, typically in your root component, and customize
* the values of its properties in order to provide default values for all the
* popovers used in the application.
*/
var PopoverConfig = /** @class */ (function () {
function PopoverConfig() {
/**
* Placement of a popover. Accepts: "top", "bottom", "left", "right"
*/
this.placement = 'top';
/**
* Specifies events that should trigger. Supports a space separated list of
* event names.
*/
this.triggers = 'click';
}
PopoverConfig = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], PopoverConfig);
return PopoverConfig;
}());
/***/ }),
/***/ "./src/app/typescripts/free/popover/popover.directive.ts":
/*!***************************************************************!*\
!*** ./src/app/typescripts/free/popover/popover.directive.ts ***!
\***************************************************************/
/*! exports provided: PopoverDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopoverDirective", function() { return PopoverDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _popover_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./popover.config */ "./src/app/typescripts/free/popover/popover.config.ts");
/* harmony import */ var _utils_component_loader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/component-loader */ "./src/app/typescripts/free/utils/component-loader/index.ts");
/* harmony import */ var _popover_container_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./popover-container.component */ "./src/app/typescripts/free/popover/popover-container.component.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**
* A lightweight, extensible directive for fancy popover creation.
*/
var PopoverDirective = /** @class */ (function () {
function PopoverDirective(_elementRef, _renderer, _viewContainerRef, _config, cis) {
this._popover = cis
.createLoader(_elementRef, _viewContainerRef, _renderer)
.provide({ provide: _popover_config__WEBPACK_IMPORTED_MODULE_1__["PopoverConfig"], useValue: _config });
Object.assign(this, _config);
this.onShown = this._popover.onShown;
this.onHidden = this._popover.onHidden;
}
Object.defineProperty(PopoverDirective.prototype, "isOpen", {
/**
* Returns whether or not the popover is currently being shown
*/
get: function () { return this._popover.isShown; },
set: function (value) {
if (value) {
this.show();
}
else {
this.hide();
}
},
enumerable: true,
configurable: true
});
/**
* Opens an elements popover. This is considered a “manual” triggering of
* the popover.
*/
PopoverDirective.prototype.show = function () {
if (this._popover.isShown) {
return;
}
this._popover
.attach(_popover_container_component__WEBPACK_IMPORTED_MODULE_3__["PopoverContainerComponent"])
.to(this.container)
.position({ attachment: this.placement })
.show({
content: this.mdbPopover,
placement: this.placement,
title: this.popoverTitle
});
this.isOpen = true;
};
/**
* Closes an elements popover. This is considered a “manual” triggering of
* the popover.
*/
PopoverDirective.prototype.hide = function () {
if (this.isOpen) {
this._popover.hide();
this.isOpen = false;
}
};
/**
* Toggles an elements popover. This is considered a “manual” triggering of
* the popover.
*/
PopoverDirective.prototype.toggle = function () {
if (this.isOpen) {
return this.hide();
}
this.show();
};
PopoverDirective.prototype.ngOnInit = function () {
var _this = this;
this._popover.listen({
triggers: this.triggers,
show: function () { return _this.show(); }
});
};
PopoverDirective.prototype.dispose = function () {
this._popover.dispose();
};
PopoverDirective.prototype.ngOnDestroy = function () {
this._popover.dispose();
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], PopoverDirective.prototype, "mdbPopover", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], PopoverDirective.prototype, "popoverTitle", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], PopoverDirective.prototype, "placement", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], PopoverDirective.prototype, "triggers", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], PopoverDirective.prototype, "container", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], PopoverDirective.prototype, "isOpen", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], PopoverDirective.prototype, "onShown", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], PopoverDirective.prototype, "onHidden", void 0);
PopoverDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[mdbPopover]', exportAs: 'bs-mdbPopover' }),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"],
_popover_config__WEBPACK_IMPORTED_MODULE_1__["PopoverConfig"],
_utils_component_loader__WEBPACK_IMPORTED_MODULE_2__["ComponentLoaderFactory"]])
], PopoverDirective);
return PopoverDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/popover/popover.module.ts":
/*!************************************************************!*\
!*** ./src/app/typescripts/free/popover/popover.module.ts ***!
\************************************************************/
/*! exports provided: PopoverModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopoverModule", function() { return PopoverModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _utils_component_loader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/component-loader */ "./src/app/typescripts/free/utils/component-loader/index.ts");
/* harmony import */ var _utils_positioning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/positioning */ "./src/app/typescripts/free/utils/positioning/index.ts");
/* harmony import */ var _popover_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./popover.config */ "./src/app/typescripts/free/popover/popover.config.ts");
/* harmony import */ var _popover_directive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./popover.directive */ "./src/app/typescripts/free/popover/popover.directive.ts");
/* harmony import */ var _popover_container_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./popover-container.component */ "./src/app/typescripts/free/popover/popover-container.component.ts");
var __decorate = (undefined && undefined.__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 PopoverModule = /** @class */ (function () {
function PopoverModule() {
}
PopoverModule_1 = PopoverModule;
PopoverModule.forRoot = function () {
return {
ngModule: PopoverModule_1,
providers: [_popover_config__WEBPACK_IMPORTED_MODULE_4__["PopoverConfig"], _utils_component_loader__WEBPACK_IMPORTED_MODULE_2__["ComponentLoaderFactory"], _utils_positioning__WEBPACK_IMPORTED_MODULE_3__["PositioningService"]]
};
};
PopoverModule = PopoverModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"]],
declarations: [_popover_directive__WEBPACK_IMPORTED_MODULE_5__["PopoverDirective"], _popover_container_component__WEBPACK_IMPORTED_MODULE_6__["PopoverContainerComponent"]],
exports: [_popover_directive__WEBPACK_IMPORTED_MODULE_5__["PopoverDirective"]],
entryComponents: [_popover_container_component__WEBPACK_IMPORTED_MODULE_6__["PopoverContainerComponent"]]
})
], PopoverModule);
return PopoverModule;
var PopoverModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/ripple/index.ts":
/*!**************************************************!*\
!*** ./src/app/typescripts/free/ripple/index.ts ***!
\**************************************************/
/*! exports provided: RippleDirective, RippleModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _ripple_effect_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ripple-effect.directive */ "./src/app/typescripts/free/ripple/ripple-effect.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RippleDirective", function() { return _ripple_effect_directive__WEBPACK_IMPORTED_MODULE_0__["RippleDirective"]; });
/* harmony import */ var _ripple_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ripple.module */ "./src/app/typescripts/free/ripple/ripple.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RippleModule", function() { return _ripple_module__WEBPACK_IMPORTED_MODULE_1__["RippleModule"]; });
/***/ }),
/***/ "./src/app/typescripts/free/ripple/ripple-effect.directive.ts":
/*!********************************************************************!*\
!*** ./src/app/typescripts/free/ripple/ripple-effect.directive.ts ***!
\********************************************************************/
/*! exports provided: RippleDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RippleDirective", function() { return RippleDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var RippleDirective = /** @class */ (function () {
function RippleDirective(el) {
this.el = el;
}
RippleDirective.prototype.click = function (event) {
// event.stopPropagation();
if (!this.el.nativeElement.classList.contains('disabled')) {
var button = this.el.nativeElement;
if (!button.classList.contains('waves-effect')) {
button.className += ' waves-effect';
}
var xPos = event.clientX - button.getBoundingClientRect().left;
var yPos = event.clientY - button.getBoundingClientRect().top;
var tmp = document.createElement('div');
tmp.className += 'waves-ripple waves-rippling';
var ripple = button.appendChild(tmp);
var top_1 = yPos + 'px';
var left = xPos + 'px';
tmp.style.top = top_1;
tmp.style.left = left;
var scale = 'scale(' + ((button.clientWidth / 100) * 3) + ') translate(0,0)';
tmp.style.webkitTransform = scale;
tmp.style.transform = scale;
tmp.style.opacity = '1';
var duration = 750;
tmp.style.webkitTransitionDuration = duration + 'ms';
tmp.style.transitionDuration = duration + 'ms';
this.removeRipple(button, ripple);
}
};
RippleDirective.prototype.removeRipple = function (button, ripple) {
ripple.classList.remove('waves-rippling');
setTimeout(function () {
ripple.style.opacity = '0';
setTimeout(function () {
button.removeChild(ripple);
}, 750);
}, 200);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], RippleDirective.prototype, "click", null);
RippleDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbRippleRadius]'
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], RippleDirective);
return RippleDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/ripple/ripple.module.ts":
/*!**********************************************************!*\
!*** ./src/app/typescripts/free/ripple/ripple.module.ts ***!
\**********************************************************/
/*! exports provided: RippleModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RippleModule", function() { return RippleModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _ripple_effect_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ripple-effect.directive */ "./src/app/typescripts/free/ripple/ripple-effect.directive.ts");
var __decorate = (undefined && undefined.__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 RippleModule = /** @class */ (function () {
function RippleModule() {
}
RippleModule_1 = RippleModule;
RippleModule.forRoot = function () {
return { ngModule: RippleModule_1, providers: [] };
};
RippleModule = RippleModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [_ripple_effect_directive__WEBPACK_IMPORTED_MODULE_1__["RippleDirective"]],
exports: [_ripple_effect_directive__WEBPACK_IMPORTED_MODULE_1__["RippleDirective"]]
})
], RippleModule);
return RippleModule;
var RippleModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/tooltip/index.ts":
/*!***************************************************!*\
!*** ./src/app/typescripts/free/tooltip/index.ts ***!
\***************************************************/
/*! exports provided: TooltipContainerComponent, TooltipDirective, MDBTooltipModule, TooltipConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _tooltip_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tooltip.component */ "./src/app/typescripts/free/tooltip/tooltip.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipContainerComponent", function() { return _tooltip_component__WEBPACK_IMPORTED_MODULE_0__["TooltipContainerComponent"]; });
/* harmony import */ var _tooltip_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tooltip.directive */ "./src/app/typescripts/free/tooltip/tooltip.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipDirective", function() { return _tooltip_directive__WEBPACK_IMPORTED_MODULE_1__["TooltipDirective"]; });
/* harmony import */ var _tooltip_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tooltip.module */ "./src/app/typescripts/free/tooltip/tooltip.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBTooltipModule", function() { return _tooltip_module__WEBPACK_IMPORTED_MODULE_2__["MDBTooltipModule"]; });
/* harmony import */ var _tooltip_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tooltip.service */ "./src/app/typescripts/free/tooltip/tooltip.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipConfig", function() { return _tooltip_service__WEBPACK_IMPORTED_MODULE_3__["TooltipConfig"]; });
/***/ }),
/***/ "./src/app/typescripts/free/tooltip/tooltip.component.ts":
/*!***************************************************************!*\
!*** ./src/app/typescripts/free/tooltip/tooltip.component.ts ***!
\***************************************************************/
/*! exports provided: TooltipContainerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipContainerComponent", function() { return TooltipContainerComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _tooltip_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tooltip.service */ "./src/app/typescripts/free/tooltip/tooltip.service.ts");
/* harmony import */ var _utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/ng2-bootstrap-config */ "./src/app/typescripts/free/utils/ng2-bootstrap-config.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var TooltipContainerComponent = /** @class */ (function () {
function TooltipContainerComponent(config) {
this.show = !this.isBs3;
Object.assign(this, config);
}
Object.defineProperty(TooltipContainerComponent.prototype, "isBs3", {
get: function () {
return Object(_utils_ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__["isBs3"])();
},
enumerable: true,
configurable: true
});
TooltipContainerComponent.prototype.ngAfterViewInit = function () {
this.classMap = { in: false, fade: false };
this.classMap[this.placement] = true;
this.classMap['tooltip-' + this.placement] = true;
this.classMap.in = true;
if (this.animation) {
this.classMap.fade = true;
}
if (this.popupClass) {
this.classMap[this.popupClass] = true;
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.show'),
__metadata("design:type", Object)
], TooltipContainerComponent.prototype, "show", void 0);
TooltipContainerComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-tooltip-container',
changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
// tslint:disable-next-line
host: {
'[class]': '"tooltip-fadeIn tooltip in tooltip-" + placement'
},
template: "\n <div class=\"tooltip-arrow\"></div>\n <div class=\"tooltip-inner\"><ng-content></ng-content></div>\n "
}),
__metadata("design:paramtypes", [_tooltip_service__WEBPACK_IMPORTED_MODULE_1__["TooltipConfig"]])
], TooltipContainerComponent);
return TooltipContainerComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/free/tooltip/tooltip.directive.ts":
/*!***************************************************************!*\
!*** ./src/app/typescripts/free/tooltip/tooltip.directive.ts ***!
\***************************************************************/
/*! exports provided: TooltipDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipDirective", function() { return TooltipDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _tooltip_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tooltip.component */ "./src/app/typescripts/free/tooltip/tooltip.component.ts");
/* harmony import */ var _tooltip_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tooltip.service */ "./src/app/typescripts/free/tooltip/tooltip.service.ts");
/* harmony import */ var _utils_component_loader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/component-loader */ "./src/app/typescripts/free/utils/component-loader/index.ts");
/* harmony import */ var _utils_decorators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/decorators */ "./src/app/typescripts/free/utils/decorators.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var TooltipDirective = /** @class */ (function () {
function TooltipDirective(_viewContainerRef, _renderer, _elementRef, cis, config) {
/** Fired when tooltip content changes */
this.tooltipChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.delay = 0;
this.fadeDuration = 150;
this._tooltip = cis
.createLoader(_elementRef, _viewContainerRef, _renderer)
.provide({ provide: _tooltip_service__WEBPACK_IMPORTED_MODULE_2__["TooltipConfig"], useValue: config });
Object.assign(this, config);
this.onShown = this._tooltip.onShown;
this.onHidden = this._tooltip.onHidden;
}
Object.defineProperty(TooltipDirective.prototype, "isOpen", {
/**
* Returns whether or not the tooltip is currently being shown
*/
get: function () { return this._tooltip.isShown; },
set: function (value) {
if (value) {
this.show();
}
else {
this.hide();
}
},
enumerable: true,
configurable: true
});
TooltipDirective.prototype.ngOnInit = function () {
var _this = this;
this._tooltip.listen({
triggers: this.triggers,
show: function () { return _this.show(); }
});
this.tooltipChange.subscribe(function (value) {
if (!value) {
_this._tooltip.hide();
}
});
};
/**
* Toggles an elements tooltip. This is considered a “manual” triggering of
* the tooltip.
*/
TooltipDirective.prototype.toggle = function () {
if (this.isOpen) {
return this.hide();
}
this.show();
};
/**
* Opens an elements tooltip. This is considered a “manual” triggering of
* the tooltip.
*/
TooltipDirective.prototype.show = function () {
var _this = this;
if (this.isOpen || this.isDisabled || this._delayTimeoutId || !this.mdbTooltip) {
return;
}
var showTooltip = function () { return _this._tooltip
.attach(_tooltip_component__WEBPACK_IMPORTED_MODULE_1__["TooltipContainerComponent"])
.to(_this.container)
.position({ attachment: _this.placement })
.show({
content: _this.mdbTooltip,
placement: _this.placement
}); };
if (this.delay) {
this._delayTimeoutId = setTimeout(function () { showTooltip(); }, this.delay);
}
else {
showTooltip();
}
};
/**
* Closes an elements tooltip. This is considered a “manual” triggering of
* the tooltip.
*/
TooltipDirective.prototype.hide = function () {
var _this = this;
if (this._delayTimeoutId) {
clearTimeout(this._delayTimeoutId);
this._delayTimeoutId = undefined;
}
if (!this._tooltip.isShown) {
return;
}
this._tooltip.instance.classMap.in = false;
setTimeout(function () {
_this._tooltip.hide();
}, this.fadeDuration);
};
TooltipDirective.prototype.dispose = function () {
this._tooltip.dispose();
};
TooltipDirective.prototype.ngOnDestroy = function () {
this._tooltip.dispose();
};
__decorate([
Object(_utils_decorators__WEBPACK_IMPORTED_MODULE_4__["OnChange"])(),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], TooltipDirective.prototype, "mdbTooltip", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], TooltipDirective.prototype, "tooltipChange", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], TooltipDirective.prototype, "placement", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], TooltipDirective.prototype, "triggers", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], TooltipDirective.prototype, "container", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], TooltipDirective.prototype, "isOpen", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], TooltipDirective.prototype, "isDisabled", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], TooltipDirective.prototype, "onShown", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], TooltipDirective.prototype, "onHidden", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], TooltipDirective.prototype, "delay", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], TooltipDirective.prototype, "fadeDuration", void 0);
TooltipDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbTooltip]',
exportAs: 'mdb-tooltip'
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
_utils_component_loader__WEBPACK_IMPORTED_MODULE_3__["ComponentLoaderFactory"],
_tooltip_service__WEBPACK_IMPORTED_MODULE_2__["TooltipConfig"]])
], TooltipDirective);
return TooltipDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/tooltip/tooltip.module.ts":
/*!************************************************************!*\
!*** ./src/app/typescripts/free/tooltip/tooltip.module.ts ***!
\************************************************************/
/*! exports provided: MDBTooltipModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBTooltipModule", function() { return MDBTooltipModule; });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _tooltip_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tooltip.component */ "./src/app/typescripts/free/tooltip/tooltip.component.ts");
/* harmony import */ var _tooltip_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tooltip.directive */ "./src/app/typescripts/free/tooltip/tooltip.directive.ts");
/* harmony import */ var _tooltip_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tooltip.service */ "./src/app/typescripts/free/tooltip/tooltip.service.ts");
/* harmony import */ var _utils_component_loader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/component-loader */ "./src/app/typescripts/free/utils/component-loader/index.ts");
/* harmony import */ var _utils_positioning__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/positioning */ "./src/app/typescripts/free/utils/positioning/index.ts");
var __decorate = (undefined && undefined.__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 MDBTooltipModule = /** @class */ (function () {
function MDBTooltipModule() {
}
MDBTooltipModule_1 = MDBTooltipModule;
MDBTooltipModule.forRoot = function () {
return {
ngModule: MDBTooltipModule_1,
providers: [_tooltip_service__WEBPACK_IMPORTED_MODULE_4__["TooltipConfig"], _utils_component_loader__WEBPACK_IMPORTED_MODULE_5__["ComponentLoaderFactory"], _utils_positioning__WEBPACK_IMPORTED_MODULE_6__["PositioningService"]]
};
};
;
MDBTooltipModule = MDBTooltipModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"]],
declarations: [_tooltip_directive__WEBPACK_IMPORTED_MODULE_3__["TooltipDirective"], _tooltip_component__WEBPACK_IMPORTED_MODULE_2__["TooltipContainerComponent"]],
exports: [_tooltip_directive__WEBPACK_IMPORTED_MODULE_3__["TooltipDirective"]],
entryComponents: [_tooltip_component__WEBPACK_IMPORTED_MODULE_2__["TooltipContainerComponent"]]
})
], MDBTooltipModule);
return MDBTooltipModule;
var MDBTooltipModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/free/tooltip/tooltip.service.ts":
/*!*************************************************************!*\
!*** ./src/app/typescripts/free/tooltip/tooltip.service.ts ***!
\*************************************************************/
/*! exports provided: TooltipConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipConfig", function() { return TooltipConfig; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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;
};
/** Default values provider for tooltip */
var TooltipConfig = /** @class */ (function () {
function TooltipConfig() {
/** tooltip placement, supported positions: 'top', 'bottom', 'left', 'right' */
this.placement = 'top';
/** array of event names which triggers tooltip opening */
this.triggers = 'hover focus';
}
TooltipConfig = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], TooltipConfig);
return TooltipConfig;
}());
/***/ }),
/***/ "./src/app/typescripts/free/utils/component-loader/component-loader.class.ts":
/*!***********************************************************************************!*\
!*** ./src/app/typescripts/free/utils/component-loader/component-loader.class.ts ***!
\***********************************************************************************/
/*! exports provided: ComponentLoader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentLoader", function() { return ComponentLoader; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _triggers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../triggers */ "./src/app/typescripts/free/utils/triggers.ts");
/* harmony import */ var _content_ref_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./content-ref.class */ "./src/app/typescripts/free/utils/component-loader/content-ref.class.ts");
// todo: add delay support
// todo: merge events onShow, onShown, etc...
// todo: add global positioning configuration?
var ComponentLoader = /** @class */ (function () {
/**
* Do not use this directly, it should be instanced via
* `ComponentLoadFactory.attach`
* @internal
*/
// tslint:disable-next-line
function ComponentLoader(_viewContainerRef, _renderer, _elementRef, _injector, _componentFactoryResolver, _ngZone, _applicationRef, _posService) {
this._viewContainerRef = _viewContainerRef;
this._renderer = _renderer;
this._elementRef = _elementRef;
this._injector = _injector;
this._componentFactoryResolver = _componentFactoryResolver;
this._ngZone = _ngZone;
this._applicationRef = _applicationRef;
this._posService = _posService;
this.onBeforeShow = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.onShown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.onBeforeHide = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.onHidden = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this._providers = [];
}
Object.defineProperty(ComponentLoader.prototype, "isShown", {
get: function () {
return !!this._componentRef;
},
enumerable: true,
configurable: true
});
ComponentLoader.prototype.attach = function (compType) {
this._componentFactory = this._componentFactoryResolver
.resolveComponentFactory(compType);
return this;
};
// todo: add behaviour: to target element, `body`, custom element
ComponentLoader.prototype.to = function (container) {
this.container = container || this.container;
return this;
};
ComponentLoader.prototype.position = function (opts) {
this.attachment = opts.attachment || this.attachment;
this._elementRef = opts.target || this._elementRef;
return this;
};
ComponentLoader.prototype.provide = function (provider) {
this._providers.push(provider);
return this;
};
// todo: appendChild to element or document.querySelector(this.container)
ComponentLoader.prototype.show = function (opts) {
if (opts === void 0) { opts = {}; }
this._subscribePositioning();
this._innerComponent = null;
if (!this._componentRef) {
this.onBeforeShow.emit();
this._contentRef = this._getContentRef(opts.content);
var injector = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ReflectiveInjector"].resolveAndCreate(this._providers, this._injector);
this._componentRef = this._componentFactory.create(injector, this._contentRef.nodes);
this._applicationRef.attachView(this._componentRef.hostView);
// this._componentRef = this._viewContainerRef
// .createComponent(this._componentFactory, 0, injector, this._contentRef.nodes);
this.instance = this._componentRef.instance;
Object.assign(this._componentRef.instance, opts);
if (this.container instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) {
this.container.nativeElement
.appendChild(this._componentRef.location.nativeElement);
}
if (this.container === 'body' && typeof document !== 'undefined') {
// document.querySelector(this.container as string)
document.querySelector(this.container)
.appendChild(this._componentRef.location.nativeElement);
}
if (!this.container && this._elementRef && this._elementRef.nativeElement.parentElement) {
this._elementRef.nativeElement.parentElement
.appendChild(this._componentRef.location.nativeElement);
}
// we need to manually invoke change detection since events registered
// via
// Renderer::listen() are not picked up by change detection with the
// OnPush strategy
if (this._contentRef.componentRef) {
this._innerComponent = this._contentRef.componentRef.instance;
this._contentRef.componentRef.changeDetectorRef.markForCheck();
this._contentRef.componentRef.changeDetectorRef.detectChanges();
}
this._componentRef.changeDetectorRef.markForCheck();
this._componentRef.changeDetectorRef.detectChanges();
this.onShown.emit(this._componentRef.instance);
}
return this._componentRef;
};
ComponentLoader.prototype.hide = function () {
if (!this._componentRef) {
return this;
}
this.onBeforeHide.emit(this._componentRef.instance);
var componentEl = this._componentRef.location.nativeElement;
componentEl.parentNode.removeChild(componentEl);
if (this._contentRef.componentRef) {
this._contentRef.componentRef.destroy();
}
this._componentRef.destroy();
if (this._viewContainerRef && this._contentRef.viewRef) {
this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef));
}
// this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._componentRef.hostView));
//
// if (this._contentRef.viewRef && this._viewContainerRef.indexOf(this._contentRef.viewRef) !== -1) {
// this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef));
// }
this._contentRef = null;
this._componentRef = null;
this.onHidden.emit();
return this;
};
ComponentLoader.prototype.toggle = function () {
if (this.isShown) {
this.hide();
return;
}
this.show();
};
ComponentLoader.prototype.dispose = function () {
if (this.isShown) {
this.hide();
}
this._unsubscribePositioning();
if (this._unregisterListenersFn) {
this._unregisterListenersFn();
}
};
ComponentLoader.prototype.listen = function (listenOpts) {
var _this = this;
this.triggers = listenOpts.triggers || this.triggers;
listenOpts.target = listenOpts.target || this._elementRef;
listenOpts.show = listenOpts.show || (function () { return _this.show(); });
listenOpts.hide = listenOpts.hide || (function () { return _this.hide(); });
listenOpts.toggle = listenOpts.toggle || (function () { return _this.isShown
? listenOpts.hide()
: listenOpts.show(); });
this._unregisterListenersFn = Object(_triggers__WEBPACK_IMPORTED_MODULE_1__["listenToTriggers"])(this._renderer, listenOpts.target.nativeElement, this.triggers, listenOpts.show, listenOpts.hide, listenOpts.toggle);
return this;
};
ComponentLoader.prototype.getInnerComponent = function () {
return this._innerComponent;
};
ComponentLoader.prototype._subscribePositioning = function () {
var _this = this;
if (this._zoneSubscription || !this.attachment) {
return;
}
this._zoneSubscription = this._ngZone
.onStable.subscribe(function () {
if (!_this._componentRef) {
return;
}
_this._posService.position({
element: _this._componentRef.location,
target: _this._elementRef,
attachment: _this.attachment,
appendToBody: _this.container === 'body'
});
});
};
ComponentLoader.prototype._unsubscribePositioning = function () {
if (!this._zoneSubscription) {
return;
}
this._zoneSubscription.unsubscribe();
this._zoneSubscription = null;
};
ComponentLoader.prototype._getContentRef = function (content) {
if (!content) {
return new _content_ref_class__WEBPACK_IMPORTED_MODULE_2__["ContentRef"]([]);
}
if (content instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]) {
if (this._viewContainerRef) {
var viewRef_1 = this._viewContainerRef.createEmbeddedView(content);
return new _content_ref_class__WEBPACK_IMPORTED_MODULE_2__["ContentRef"]([viewRef_1.rootNodes], viewRef_1);
}
var viewRef = content.createEmbeddedView({});
this._applicationRef.attachView(viewRef);
return new _content_ref_class__WEBPACK_IMPORTED_MODULE_2__["ContentRef"]([viewRef.rootNodes], viewRef);
}
if (typeof content === 'function') {
var contentCmptFactory = this._componentFactoryResolver.resolveComponentFactory(content);
var modalContentInjector = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ReflectiveInjector"].resolveAndCreate(this._providers.concat([content]), this._injector);
var componentRef = contentCmptFactory.create(modalContentInjector);
this._applicationRef.attachView(componentRef.hostView);
return new _content_ref_class__WEBPACK_IMPORTED_MODULE_2__["ContentRef"]([[componentRef.location.nativeElement]], componentRef.hostView, componentRef);
}
return new _content_ref_class__WEBPACK_IMPORTED_MODULE_2__["ContentRef"]([[this._renderer.createText(null, "" + content)]]);
};
return ComponentLoader;
}());
/***/ }),
/***/ "./src/app/typescripts/free/utils/component-loader/component-loader.factory.ts":
/*!*************************************************************************************!*\
!*** ./src/app/typescripts/free/utils/component-loader/component-loader.factory.ts ***!
\*************************************************************************************/
/*! exports provided: ComponentLoaderFactory */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentLoaderFactory", function() { return ComponentLoaderFactory; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _component_loader_class__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./component-loader.class */ "./src/app/typescripts/free/utils/component-loader/component-loader.class.ts");
/* harmony import */ var _positioning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../positioning */ "./src/app/typescripts/free/utils/positioning/index.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ComponentLoaderFactory = /** @class */ (function () {
function ComponentLoaderFactory(_componentFactoryResolver, _ngZone, _injector, _posService, _applicationRef) {
this._componentFactoryResolver = _componentFactoryResolver;
this._ngZone = _ngZone;
this._injector = _injector;
this._posService = _posService;
this._applicationRef = _applicationRef;
}
/**
*
* @param _elementRef
* @param _viewContainerRef
* @param _renderer
* @returns {ComponentLoader}
*/
ComponentLoaderFactory.prototype.createLoader = function (_elementRef, _viewContainerRef, _renderer) {
return new _component_loader_class__WEBPACK_IMPORTED_MODULE_1__["ComponentLoader"](_viewContainerRef, _renderer, _elementRef, this._injector, this._componentFactoryResolver, this._ngZone, this._applicationRef, this._posService);
};
ComponentLoaderFactory = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"],
_positioning__WEBPACK_IMPORTED_MODULE_2__["PositioningService"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationRef"]])
], ComponentLoaderFactory);
return ComponentLoaderFactory;
}());
/***/ }),
/***/ "./src/app/typescripts/free/utils/component-loader/content-ref.class.ts":
/*!******************************************************************************!*\
!*** ./src/app/typescripts/free/utils/component-loader/content-ref.class.ts ***!
\******************************************************************************/
/*! exports provided: ContentRef */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentRef", function() { return ContentRef; });
/**
* @copyright Valor Software
* @copyright Angular ng-bootstrap team
*/
var ContentRef = /** @class */ (function () {
function ContentRef(nodes, viewRef, componentRef) {
this.nodes = nodes;
this.viewRef = viewRef;
this.componentRef = componentRef;
}
return ContentRef;
}());
/***/ }),
/***/ "./src/app/typescripts/free/utils/component-loader/index.ts":
/*!******************************************************************!*\
!*** ./src/app/typescripts/free/utils/component-loader/index.ts ***!
\******************************************************************/
/*! exports provided: ComponentLoader, ComponentLoaderFactory, ContentRef */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _component_loader_class__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./component-loader.class */ "./src/app/typescripts/free/utils/component-loader/component-loader.class.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentLoader", function() { return _component_loader_class__WEBPACK_IMPORTED_MODULE_0__["ComponentLoader"]; });
/* harmony import */ var _component_loader_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./component-loader.factory */ "./src/app/typescripts/free/utils/component-loader/component-loader.factory.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentLoaderFactory", function() { return _component_loader_factory__WEBPACK_IMPORTED_MODULE_1__["ComponentLoaderFactory"]; });
/* harmony import */ var _content_ref_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./content-ref.class */ "./src/app/typescripts/free/utils/component-loader/content-ref.class.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContentRef", function() { return _content_ref_class__WEBPACK_IMPORTED_MODULE_2__["ContentRef"]; });
/***/ }),
/***/ "./src/app/typescripts/free/utils/decorators.ts":
/*!******************************************************!*\
!*** ./src/app/typescripts/free/utils/decorators.ts ***!
\******************************************************/
/*! exports provided: OnChange */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OnChange", function() { return OnChange; });
/*tslint:disable:no-invalid-this */
function OnChange() {
var sufix = 'Change';
return function OnChangeHandler(target, propertyKey) {
var _key = " __" + propertyKey + "Value";
Object.defineProperty(target, propertyKey, {
get: function () { return this[_key]; },
set: function (value) {
var prevValue = this[_key];
this[_key] = value;
if (prevValue !== value && this[propertyKey + sufix]) {
this[propertyKey + sufix].emit(value);
}
}
});
};
}
/* tslint:enable */
/***/ }),
/***/ "./src/app/typescripts/free/utils/facade/browser.ts":
/*!**********************************************************!*\
!*** ./src/app/typescripts/free/utils/facade/browser.ts ***!
\**********************************************************/
/*! exports provided: window, document, location, gc, performance, Event, MouseEvent, KeyboardEvent, EventTarget, History, Location, EventListener */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return win; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "document", function() { return document; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "location", function() { return location; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gc", function() { return gc; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "performance", function() { return performance; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Event", function() { return Event; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseEvent", function() { return MouseEvent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyboardEvent", function() { return KeyboardEvent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventTarget", function() { return EventTarget; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "History", function() { return History; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventListener", function() { return EventListener; });
/*tslint:disable */
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* JS version of browser APIs. This library can only run in the browser.
*/
var win = typeof window !== 'undefined' && window || {};
var document = win.document;
var location = win.location;
var gc = win['gc'] ? function () { return win['gc'](); } : function () { return null; };
var performance = win['performance'] ? win['performance'] : null;
var Event = win['Event'];
var MouseEvent = win['MouseEvent'];
var KeyboardEvent = win['KeyboardEvent'];
var EventTarget = win['EventTarget'];
var History = win['History'];
var Location = win['Location'];
var EventListener = win['EventListener'];
/***/ }),
/***/ "./src/app/typescripts/free/utils/index.ts":
/*!*************************************************!*\
!*** ./src/app/typescripts/free/utils/index.ts ***!
\*************************************************/
/*! exports provided: OnChange, LinkedList, isBs3, Trigger, Utils */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decorators */ "./src/app/typescripts/free/utils/decorators.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OnChange", function() { return _decorators__WEBPACK_IMPORTED_MODULE_0__["OnChange"]; });
/* harmony import */ var _linked_list_class__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linked-list.class */ "./src/app/typescripts/free/utils/linked-list.class.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LinkedList", function() { return _linked_list_class__WEBPACK_IMPORTED_MODULE_1__["LinkedList"]; });
/* harmony import */ var _ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ng2-bootstrap-config */ "./src/app/typescripts/free/utils/ng2-bootstrap-config.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBs3", function() { return _ng2_bootstrap_config__WEBPACK_IMPORTED_MODULE_2__["isBs3"]; });
/* harmony import */ var _trigger_class__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./trigger.class */ "./src/app/typescripts/free/utils/trigger.class.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Trigger", function() { return _trigger_class__WEBPACK_IMPORTED_MODULE_3__["Trigger"]; });
/* harmony import */ var _utils_class__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils.class */ "./src/app/typescripts/free/utils/utils.class.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Utils", function() { return _utils_class__WEBPACK_IMPORTED_MODULE_4__["Utils"]; });
/***/ }),
/***/ "./src/app/typescripts/free/utils/linked-list.class.ts":
/*!*************************************************************!*\
!*** ./src/app/typescripts/free/utils/linked-list.class.ts ***!
\*************************************************************/
/*! exports provided: LinkedList */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinkedList", function() { return LinkedList; });
var LinkedList = /** @class */ (function () {
function LinkedList() {
// public length: = 0;
this.length = 0;
this.asArray = [];
// Array methods overriding END
}
LinkedList.prototype.getNode = function (position) {
if (this.length === 0 || position < 0 || position >= this.length) {
throw new Error('Position is out of the list');
}
var current = this.head;
for (var index = 0; index < position; index++) {
current = current.next;
}
return current;
};
LinkedList.prototype.createInternalArrayRepresentation = function () {
var outArray = [];
var current = this.head;
while (current) {
outArray.push(current.value);
current = current.next;
}
this.asArray = outArray;
};
// public get(position: number): T {
LinkedList.prototype.get = function (position) {
if (this.length === 0 || position < 0 || position >= this.length) {
return void 0;
}
var current = this.head;
for (var index = 0; index < position; index++) {
current = current.next;
}
return current.value;
};
LinkedList.prototype.add = function (value, position) {
if (position === void 0) { position = this.length; }
if (position < 0 || position > this.length) {
throw new Error('Position is out of the list');
}
var node = {
value: value,
next: undefined,
previous: undefined
};
if (this.length === 0) {
this.head = node;
this.tail = node;
this.current = node;
}
else {
if (position === 0) {
// first node
node.next = this.head;
this.head.previous = node;
this.head = node;
}
else if (position === this.length) {
// last node
this.tail.next = node;
node.previous = this.tail;
this.tail = node;
}
else {
// node in middle
var currentPreviousNode = this.getNode(position - 1);
var currentNextNode = currentPreviousNode.next;
currentPreviousNode.next = node;
currentNextNode.previous = node;
node.previous = currentPreviousNode;
node.next = currentNextNode;
}
}
this.length++;
this.createInternalArrayRepresentation();
};
LinkedList.prototype.remove = function (position) {
if (position === void 0) { position = 0; }
if (this.length === 0 || position < 0 || position >= this.length) {
throw new Error('Position is out of the list');
}
if (position === 0) {
// first node
this.head = this.head.next;
if (this.head) {
// there is no second node
this.head.previous = undefined;
}
else {
// there is no second node
this.tail = undefined;
}
}
else if (position === this.length - 1) {
// last node
this.tail = this.tail.previous;
this.tail.next = undefined;
}
else {
// middle node
var removedNode = this.getNode(position);
removedNode.next.previous = removedNode.previous;
removedNode.previous.next = removedNode.next;
}
this.length--;
this.createInternalArrayRepresentation();
};
LinkedList.prototype.set = function (position, value) {
if (this.length === 0 || position < 0 || position >= this.length) {
throw new Error('Position is out of the list');
}
var node = this.getNode(position);
node.value = value;
this.createInternalArrayRepresentation();
};
LinkedList.prototype.toArray = function () {
return this.asArray;
};
LinkedList.prototype.findAll = function (fn) {
var current = this.head;
var result = [];
for (var index = 0; index < this.length; index++) {
if (fn(current.value, index)) {
result.push({ index: index, value: current.value });
}
current = current.next;
}
return result;
};
// Array methods overriding start
LinkedList.prototype.push = function () {
var _this = this;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
args.forEach(function (arg) {
_this.add(arg);
});
return this.length;
};
// public pop(): T {
LinkedList.prototype.pop = function () {
if (this.length === 0) {
return undefined;
}
var last = this.tail;
this.remove(this.length - 1);
return last.value;
};
LinkedList.prototype.unshift = function () {
var _this = this;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
args.reverse();
args.forEach(function (arg) {
_this.add(arg, 0);
});
return this.length;
};
// public shift(): T {
LinkedList.prototype.shift = function () {
if (this.length === 0) {
return undefined;
}
var lastItem = this.head.value;
this.remove();
return lastItem;
};
LinkedList.prototype.forEach = function (fn) {
var current = this.head;
for (var index = 0; index < this.length; index++) {
fn(current.value, index);
current = current.next;
}
};
LinkedList.prototype.indexOf = function (value) {
var current = this.head;
var position = 0;
for (var index = 0; index < this.length; index++) {
if (current.value === value) {
position = index;
break;
}
current = current.next;
}
return position;
};
LinkedList.prototype.some = function (fn) {
var current = this.head;
var result = false;
while (current && !result) {
if (fn(current.value)) {
result = true;
break;
}
current = current.next;
}
return result;
};
LinkedList.prototype.every = function (fn) {
var current = this.head;
var result = true;
while (current && result) {
if (!fn(current.value)) {
result = false;
}
current = current.next;
}
return result;
};
LinkedList.prototype.toString = function () {
return '[Linked List]';
};
// public find(fn: any): T {
LinkedList.prototype.find = function (fn) {
var current = this.head;
// let result: T;
var result;
for (var index = 0; index < this.length; index++) {
if (fn(current.value, index)) {
result = current.value;
break;
}
current = current.next;
}
return result;
};
LinkedList.prototype.findIndex = function (fn) {
var current = this.head;
// let result: number;
var result;
for (var index = 0; index < this.length; index++) {
if (fn(current.value, index)) {
result = index;
break;
}
current = current.next;
}
return result;
};
return LinkedList;
}());
/***/ }),
/***/ "./src/app/typescripts/free/utils/ng2-bootstrap-config.ts":
/*!****************************************************************!*\
!*** ./src/app/typescripts/free/utils/ng2-bootstrap-config.ts ***!
\****************************************************************/
/*! exports provided: isBs3 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBs3", function() { return isBs3; });
/* harmony import */ var _facade_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./facade/browser */ "./src/app/typescripts/free/utils/facade/browser.ts");
function isBs3() {
return _facade_browser__WEBPACK_IMPORTED_MODULE_0__["window"].__theme === 'bs4';
}
/***/ }),
/***/ "./src/app/typescripts/free/utils/positioning/index.ts":
/*!*************************************************************!*\
!*** ./src/app/typescripts/free/utils/positioning/index.ts ***!
\*************************************************************/
/*! exports provided: positionElements, Positioning, PositioningService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _ng_positioning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ng-positioning */ "./src/app/typescripts/free/utils/positioning/ng-positioning.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "positionElements", function() { return _ng_positioning__WEBPACK_IMPORTED_MODULE_0__["positionElements"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Positioning", function() { return _ng_positioning__WEBPACK_IMPORTED_MODULE_0__["Positioning"]; });
/* harmony import */ var _positioning_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./positioning.service */ "./src/app/typescripts/free/utils/positioning/positioning.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PositioningService", function() { return _positioning_service__WEBPACK_IMPORTED_MODULE_1__["PositioningService"]; });
/***/ }),
/***/ "./src/app/typescripts/free/utils/positioning/ng-positioning.ts":
/*!**********************************************************************!*\
!*** ./src/app/typescripts/free/utils/positioning/ng-positioning.ts ***!
\**********************************************************************/
/*! exports provided: Positioning, positionElements */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Positioning", function() { return Positioning; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionElements", function() { return positionElements; });
/**
* @copyright Valor Software
* @copyright Angular ng-bootstrap team
*/
// previous version:
// https://github.com/angular-ui/bootstrap/blob/07c31d0731f7cb068a1932b8e01d2312b796b4ec/src/position/position.js
// tslint:disable
var Positioning = /** @class */ (function () {
function Positioning() {
}
Positioning.prototype.position = function (element, round) {
if (round === void 0) { round = true; }
var elPosition;
var parentOffset = { width: 0, height: 0, top: 0, bottom: 0, left: 0, right: 0 };
if (this.getStyle(element, 'position') === 'fixed') {
var bcRect = element.getBoundingClientRect();
elPosition = {
width: bcRect.width,
height: bcRect.height,
top: bcRect.top,
bottom: bcRect.bottom,
left: bcRect.left,
right: bcRect.right
};
}
else {
var offsetParentEl = this.offsetParent(element);
elPosition = this.offset(element, false);
if (offsetParentEl !== document.documentElement) {
parentOffset = this.offset(offsetParentEl, false);
}
parentOffset.top += offsetParentEl.clientTop;
parentOffset.left += offsetParentEl.clientLeft;
}
elPosition.top -= parentOffset.top;
elPosition.bottom -= parentOffset.top;
elPosition.left -= parentOffset.left;
elPosition.right -= parentOffset.left;
if (round) {
elPosition.top = Math.round(elPosition.top);
elPosition.bottom = Math.round(elPosition.bottom);
elPosition.left = Math.round(elPosition.left);
elPosition.right = Math.round(elPosition.right);
}
return elPosition;
};
Positioning.prototype.offset = function (element, round) {
if (round === void 0) { round = true; }
var elBcr = element.getBoundingClientRect();
var viewportOffset = {
top: window.pageYOffset - document.documentElement.clientTop,
left: window.pageXOffset - document.documentElement.clientLeft
};
var elOffset = {
height: elBcr.height || element.offsetHeight,
width: elBcr.width || element.offsetWidth,
top: elBcr.top + viewportOffset.top,
bottom: elBcr.bottom + viewportOffset.top,
left: elBcr.left + viewportOffset.left,
right: elBcr.right + viewportOffset.left
};
if (round) {
elOffset.height = Math.round(elOffset.height);
elOffset.width = Math.round(elOffset.width);
elOffset.top = Math.round(elOffset.top);
elOffset.bottom = Math.round(elOffset.bottom);
elOffset.left = Math.round(elOffset.left);
elOffset.right = Math.round(elOffset.right);
}
return elOffset;
};
Positioning.prototype.positionElements = function (hostElement, targetElement, placement, appendToBody) {
var hostElPosition = appendToBody ? this.offset(hostElement, false) : this.position(hostElement, false);
var shiftWidth = {
left: hostElPosition.left,
center: hostElPosition.left + hostElPosition.width / 2 - targetElement.offsetWidth / 2,
right: hostElPosition.left + hostElPosition.width
};
var shiftHeight = {
top: hostElPosition.top,
center: hostElPosition.top + hostElPosition.height / 2 - targetElement.offsetHeight / 2,
bottom: hostElPosition.top + hostElPosition.height
};
var targetElBCR = targetElement.getBoundingClientRect();
var placementPrimary = placement.split(' ')[0] || 'top';
var placementSecondary = placement.split(' ')[1] || 'center';
var targetElPosition = {
height: targetElBCR.height || targetElement.offsetHeight,
width: targetElBCR.width || targetElement.offsetWidth,
top: 0,
bottom: targetElBCR.height || targetElement.offsetHeight,
left: 0,
right: targetElBCR.width || targetElement.offsetWidth
};
switch (placementPrimary) {
case 'top':
targetElPosition.top = hostElPosition.top - targetElement.offsetHeight;
targetElPosition.bottom += hostElPosition.top - targetElement.offsetHeight;
targetElPosition.left = shiftWidth[placementSecondary];
targetElPosition.right += shiftWidth[placementSecondary];
break;
case 'bottom':
targetElPosition.top = shiftHeight[placementPrimary];
targetElPosition.bottom += shiftHeight[placementPrimary];
targetElPosition.left = shiftWidth[placementSecondary];
targetElPosition.right += shiftWidth[placementSecondary];
break;
case 'left':
targetElPosition.top = shiftHeight[placementSecondary];
targetElPosition.bottom += shiftHeight[placementSecondary];
targetElPosition.left = hostElPosition.left - targetElement.offsetWidth;
targetElPosition.right += hostElPosition.left - targetElement.offsetWidth;
break;
case 'right':
targetElPosition.top = shiftHeight[placementSecondary];
targetElPosition.bottom += shiftHeight[placementSecondary];
targetElPosition.left = shiftWidth[placementPrimary];
targetElPosition.right += shiftWidth[placementPrimary];
break;
}
targetElPosition.top = Math.round(targetElPosition.top);
targetElPosition.bottom = Math.round(targetElPosition.bottom);
targetElPosition.left = Math.round(targetElPosition.left);
targetElPosition.right = Math.round(targetElPosition.right);
return targetElPosition;
};
Positioning.prototype.getStyle = function (element, prop) { return window.getComputedStyle(element)[prop]; };
Positioning.prototype.isStaticPositioned = function (element) {
return (this.getStyle(element, 'position') || 'static') === 'static';
};
Positioning.prototype.offsetParent = function (element) {
var offsetParentEl = element.offsetParent || document.documentElement;
while (offsetParentEl && offsetParentEl !== document.documentElement && this.isStaticPositioned(offsetParentEl)) {
offsetParentEl = offsetParentEl.offsetParent;
}
return offsetParentEl || document.documentElement;
};
return Positioning;
}());
var positionService = new Positioning();
function positionElements(hostElement, targetElement, placement, appendToBody) {
var pos = positionService.positionElements(hostElement, targetElement, placement, appendToBody);
targetElement.style.top = pos.top + "px";
targetElement.style.left = pos.left + "px";
}
/***/ }),
/***/ "./src/app/typescripts/free/utils/positioning/positioning.service.ts":
/*!***************************************************************************!*\
!*** ./src/app/typescripts/free/utils/positioning/positioning.service.ts ***!
\***************************************************************************/
/*! exports provided: PositioningService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PositioningService", function() { return PositioningService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _ng_positioning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ng-positioning */ "./src/app/typescripts/free/utils/positioning/ng-positioning.ts");
var __decorate = (undefined && undefined.__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 PositioningService = /** @class */ (function () {
function PositioningService() {
}
// public position(options: PositioningOptions): void {
PositioningService.prototype.position = function (options) {
var element = options.element, target = options.target, attachment = options.attachment, appendToBody = options.appendToBody;
Object(_ng_positioning__WEBPACK_IMPORTED_MODULE_1__["positionElements"])(this._getHtmlElement(target), this._getHtmlElement(element), attachment, appendToBody);
};
PositioningService.prototype._getHtmlElement = function (element) {
// it means that we got a selector
if (typeof element === 'string') {
return document.querySelector(element);
}
if (element instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) {
return element.nativeElement;
}
return element;
};
PositioningService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], PositioningService);
return PositioningService;
}());
/***/ }),
/***/ "./src/app/typescripts/free/utils/trigger.class.ts":
/*!*********************************************************!*\
!*** ./src/app/typescripts/free/utils/trigger.class.ts ***!
\*********************************************************/
/*! exports provided: Trigger */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Trigger", function() { return Trigger; });
/**
* @copyright Valor Software
* @copyright Angular ng-bootstrap team
*/
var Trigger = /** @class */ (function () {
function Trigger(open, close) {
this.open = open;
this.close = close || open;
}
Trigger.prototype.isManual = function () { return this.open === 'manual' || this.close === 'manual'; };
return Trigger;
}());
/***/ }),
/***/ "./src/app/typescripts/free/utils/triggers.ts":
/*!****************************************************!*\
!*** ./src/app/typescripts/free/utils/triggers.ts ***!
\****************************************************/
/*! exports provided: parseTriggers, listenToTriggers */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseTriggers", function() { return parseTriggers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listenToTriggers", function() { return listenToTriggers; });
/* harmony import */ var _trigger_class__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./trigger.class */ "./src/app/typescripts/free/utils/trigger.class.ts");
var DEFAULT_ALIASES = {
hover: ['mouseover', 'mouseout'],
focus: ['focusin', 'focusout']
};
function parseTriggers(triggers, aliases) {
if (aliases === void 0) { aliases = DEFAULT_ALIASES; }
var trimmedTriggers = (triggers || '').trim();
if (trimmedTriggers.length === 0) {
return [];
}
var parsedTriggers = trimmedTriggers.split(/\s+/)
.map(function (trigger) { return trigger.split(':'); })
.map(function (triggerPair) {
var alias = aliases[triggerPair[0]] || triggerPair;
return new _trigger_class__WEBPACK_IMPORTED_MODULE_0__["Trigger"](alias[0], alias[1]);
});
var manualTriggers = parsedTriggers
.filter(function (triggerPair) { return triggerPair.isManual(); });
if (manualTriggers.length > 1) {
throw new Error('Triggers parse error: only one manual trigger is allowed');
}
if (manualTriggers.length === 1 && parsedTriggers.length > 1) {
throw new Error('Triggers parse error: manual trigger can\'t be mixed with other triggers');
}
return parsedTriggers;
}
function listenToTriggers(renderer, target, triggers, showFn, hideFn, toggleFn) {
var parsedTriggers = parseTriggers(triggers);
var listeners = [];
if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {
return Function.prototype;
}
// parsedTriggers.forEach((trigger: Trigger) => {
parsedTriggers.forEach(function (trigger) {
if (trigger.open === trigger.close) {
listeners.push(renderer.listen(target, trigger.open, toggleFn));
return;
}
listeners.push(renderer.listen(target, trigger.open, showFn), renderer.listen(target, trigger.close, hideFn));
});
return function () { listeners.forEach(function (unsubscribeFn) { return unsubscribeFn(); }); };
}
/***/ }),
/***/ "./src/app/typescripts/free/utils/utils.class.ts":
/*!*******************************************************!*\
!*** ./src/app/typescripts/free/utils/utils.class.ts ***!
\*******************************************************/
/*! exports provided: Utils */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Utils", function() { return Utils; });
/* harmony import */ var _facade_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./facade/browser */ "./src/app/typescripts/free/utils/facade/browser.ts");
var Utils = /** @class */ (function () {
function Utils() {
}
Utils.reflow = function (element) {
(function (bs) { return bs; })(element.offsetHeight);
};
// source: https://github.com/jquery/jquery/blob/master/src/css/var/getStyles.js
Utils.getStyles = function (elem) {
// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
// IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
var view = elem.ownerDocument.defaultView;
if (!view || !view.opener) {
view = _facade_browser__WEBPACK_IMPORTED_MODULE_0__["window"];
}
return view.getComputedStyle(elem);
};
return Utils;
}());
/***/ }),
/***/ "./src/app/typescripts/free/waves/index.ts":
/*!*************************************************!*\
!*** ./src/app/typescripts/free/waves/index.ts ***!
\*************************************************/
/*! exports provided: WavesDirective, WavesModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _waves_effect_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./waves-effect.directive */ "./src/app/typescripts/free/waves/waves-effect.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WavesDirective", function() { return _waves_effect_directive__WEBPACK_IMPORTED_MODULE_0__["WavesDirective"]; });
/* harmony import */ var _waves_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./waves.module */ "./src/app/typescripts/free/waves/waves.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WavesModule", function() { return _waves_module__WEBPACK_IMPORTED_MODULE_1__["WavesModule"]; });
/***/ }),
/***/ "./src/app/typescripts/free/waves/waves-effect.directive.ts":
/*!******************************************************************!*\
!*** ./src/app/typescripts/free/waves/waves-effect.directive.ts ***!
\******************************************************************/
/*! exports provided: WavesDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WavesDirective", function() { return WavesDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var WavesDirective = /** @class */ (function () {
function WavesDirective(el) {
this.el = el;
}
WavesDirective.prototype.click = function (event) {
// event.stopPropagation();
if (!this.el.nativeElement.classList.contains('disabled')) {
var button = this.el.nativeElement;
if (!button.classList.contains('waves-effect')) {
button.className += ' waves-effect';
}
var xPos = event.clientX - button.getBoundingClientRect().left;
var yPos = event.clientY - button.getBoundingClientRect().top;
var tmp = document.createElement('div');
tmp.className += 'waves-ripple waves-rippling';
var ripple = button.appendChild(tmp);
var top_1 = yPos + 'px';
var left = xPos + 'px';
tmp.style.top = top_1;
tmp.style.left = left;
var scale = 'scale(' + ((button.clientWidth / 100) * 3) + ') translate(0,0)';
tmp.style.webkitTransform = scale;
tmp.style.transform = scale;
tmp.style.opacity = '1';
var duration = 750;
tmp.style.webkitTransitionDuration = duration + 'ms';
tmp.style.transitionDuration = duration + 'ms';
this.removeRipple(button, ripple);
}
};
WavesDirective.prototype.removeRipple = function (button, ripple) {
ripple.classList.remove('waves-rippling');
setTimeout(function () {
ripple.style.opacity = '0';
setTimeout(function () {
button.removeChild(ripple);
}, 750);
}, 200);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], WavesDirective.prototype, "click", null);
WavesDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbWavesEffect]'
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], WavesDirective);
return WavesDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/free/waves/waves.module.ts":
/*!********************************************************!*\
!*** ./src/app/typescripts/free/waves/waves.module.ts ***!
\********************************************************/
/*! exports provided: WavesModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WavesModule", function() { return WavesModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _waves_effect_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./waves-effect.directive */ "./src/app/typescripts/free/waves/waves-effect.directive.ts");
var __decorate = (undefined && undefined.__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 WavesModule = /** @class */ (function () {
function WavesModule() {
}
WavesModule_1 = WavesModule;
WavesModule.forRoot = function () {
return { ngModule: WavesModule_1, providers: [] };
};
WavesModule = WavesModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [_waves_effect_directive__WEBPACK_IMPORTED_MODULE_1__["WavesDirective"]],
exports: [_waves_effect_directive__WEBPACK_IMPORTED_MODULE_1__["WavesDirective"]]
})
], WavesModule);
return WavesModule;
var WavesModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/accordion/components/sb-item.body.html":
/*!************************************************************************!*\
!*** ./src/app/typescripts/pro/accordion/components/sb-item.body.html ***!
\************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div #body class=\"sb-item-body\" [style.height]=\"height\">\r\n <div class=\"card-body\">\r\n \t<ng-content></ng-content>\r\n </div>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/accordion/components/sb-item.body.ts":
/*!**********************************************************************!*\
!*** ./src/app/typescripts/pro/accordion/components/sb-item.body.ts ***!
\**********************************************************************/
/*! exports provided: SBItemBodyComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SBItemBodyComponent", function() { return SBItemBodyComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SBItemBodyComponent = /** @class */ (function () {
function SBItemBodyComponent(renderer) {
this.renderer = renderer;
this.height = '0';
}
SBItemBodyComponent.prototype.toggle = function (collapsed) {
var _this = this;
var height = '0';
if (!collapsed) {
this.renderer.setElementStyle(this.bodyEl.nativeElement, 'height', 'auto');
height = this.bodyEl.nativeElement.offsetHeight + 'px';
this.renderer.setElementStyle(this.bodyEl.nativeElement, 'height', '0');
}
setTimeout(function () { return _this.renderer.setElementStyle(_this.bodyEl.nativeElement, 'height', height); }, 50);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('body'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], SBItemBodyComponent.prototype, "bodyEl", void 0);
SBItemBodyComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
exportAs: 'sbItemBody',
selector: 'mdb-item-body',
template: __webpack_require__(/*! ./sb-item.body.html */ "./src/app/typescripts/pro/accordion/components/sb-item.body.html")
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], SBItemBodyComponent);
return SBItemBodyComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/accordion/components/sb-item.head.html":
/*!************************************************************************!*\
!*** ./src/app/typescripts/pro/accordion/components/sb-item.head.html ***!
\************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"card-header\">\r\n <a role=\"button\" (click)=\"toggleClick($event)\">\r\n <h5 class=\"mb-0\">\r\n <ng-content></ng-content>\r\n <i class=\"fa fa-angle-down rotate-icon\"></i>\r\n </h5>\r\n </a>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/accordion/components/sb-item.head.ts":
/*!**********************************************************************!*\
!*** ./src/app/typescripts/pro/accordion/components/sb-item.head.ts ***!
\**********************************************************************/
/*! exports provided: SBItemHeadComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SBItemHeadComponent", function() { return SBItemHeadComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _sb_item__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sb-item */ "./src/app/typescripts/pro/accordion/components/sb-item.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SBItemHeadComponent = /** @class */ (function () {
function SBItemHeadComponent(sbItem) {
this.sbItem = sbItem;
}
SBItemHeadComponent.prototype.toggleClick = function (event) {
event.preventDefault();
this.sbItem.collapsed = !this.sbItem.collapsed;
this.sbItem.toggle(this.sbItem.collapsed);
};
SBItemHeadComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
exportAs: 'sbItemHead',
selector: 'mdb-item-head',
template: __webpack_require__(/*! ./sb-item.head.html */ "./src/app/typescripts/pro/accordion/components/sb-item.head.html")
}),
__metadata("design:paramtypes", [_sb_item__WEBPACK_IMPORTED_MODULE_1__["SBItemComponent"]])
], SBItemHeadComponent);
return SBItemHeadComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/accordion/components/sb-item.html":
/*!*******************************************************************!*\
!*** ./src/app/typescripts/pro/accordion/components/sb-item.html ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"card\" [ngClass]=\"{'is-collapsed': collapsed, 'active': !collapsed}\">\r\n <ng-content></ng-content>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/accordion/components/sb-item.ts":
/*!*****************************************************************!*\
!*** ./src/app/typescripts/pro/accordion/components/sb-item.ts ***!
\*****************************************************************/
/*! exports provided: SBItemComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SBItemComponent", function() { return SBItemComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _sb_item_body__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sb-item.body */ "./src/app/typescripts/pro/accordion/components/sb-item.body.ts");
/* harmony import */ var _sb_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sb.config */ "./src/app/typescripts/pro/accordion/components/sb.config.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SBItemComponent = /** @class */ (function () {
function SBItemComponent() {
this.collapsed = true;
this.squeezebox = _sb_config__WEBPACK_IMPORTED_MODULE_2__["sbConfig"].serviceInstance;
}
SBItemComponent.prototype.ngAfterViewInit = function () {
this.body.toggle(this.collapsed);
};
SBItemComponent.prototype.toggle = function (collapsed) {
this.squeezebox.didItemToggled(this);
this.applyToggle(collapsed);
};
SBItemComponent.prototype.applyToggle = function (collapsed) {
this.collapsed = collapsed;
this.body.toggle(collapsed);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SBItemComponent.prototype, "collapsed", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"])(_sb_item_body__WEBPACK_IMPORTED_MODULE_1__["SBItemBodyComponent"]),
__metadata("design:type", _sb_item_body__WEBPACK_IMPORTED_MODULE_1__["SBItemBodyComponent"])
], SBItemComponent.prototype, "body", void 0);
SBItemComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
exportAs: 'sbItem',
selector: 'mdb-item',
template: __webpack_require__(/*! ./sb-item.html */ "./src/app/typescripts/pro/accordion/components/sb-item.html")
}),
__metadata("design:paramtypes", [])
], SBItemComponent);
return SBItemComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/accordion/components/sb.config.ts":
/*!*******************************************************************!*\
!*** ./src/app/typescripts/pro/accordion/components/sb.config.ts ***!
\*******************************************************************/
/*! exports provided: sbConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sbConfig", function() { return sbConfig; });
var sbConfig = {
serviceInstance: new Object()
};
/***/ }),
/***/ "./src/app/typescripts/pro/accordion/components/squeezebox.html":
/*!**********************************************************************!*\
!*** ./src/app/typescripts/pro/accordion/components/squeezebox.html ***!
\**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"accordion\">\r\n <ng-content></ng-content>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/accordion/components/squeezebox.ts":
/*!********************************************************************!*\
!*** ./src/app/typescripts/pro/accordion/components/squeezebox.ts ***!
\********************************************************************/
/*! exports provided: SqueezeBoxComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SqueezeBoxComponent", function() { return SqueezeBoxComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _sb_item__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sb-item */ "./src/app/typescripts/pro/accordion/components/sb-item.ts");
/* harmony import */ var _sb_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sb.config */ "./src/app/typescripts/pro/accordion/components/sb.config.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SqueezeBoxComponent = /** @class */ (function () {
function SqueezeBoxComponent() {
this.multiple = true;
_sb_config__WEBPACK_IMPORTED_MODULE_2__["sbConfig"].serviceInstance = this;
}
SqueezeBoxComponent.prototype.didItemToggled = function (item) {
// on not multiple, it will collpase the rest of items
if (!this.multiple) {
this.items.toArray().forEach(function (i) {
if (i !== item) {
i.applyToggle(true);
}
});
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SqueezeBoxComponent.prototype, "multiple", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"])(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return _sb_item__WEBPACK_IMPORTED_MODULE_1__["SBItemComponent"]; })),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["QueryList"])
], SqueezeBoxComponent.prototype, "items", void 0);
SqueezeBoxComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
exportAs: 'squeezebox',
selector: 'mdb-squeezebox',
template: __webpack_require__(/*! ./squeezebox.html */ "./src/app/typescripts/pro/accordion/components/squeezebox.html")
}),
__metadata("design:paramtypes", [])
], SqueezeBoxComponent);
return SqueezeBoxComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/accordion/index.ts":
/*!****************************************************!*\
!*** ./src/app/typescripts/pro/accordion/index.ts ***!
\****************************************************/
/*! exports provided: SQUEEZEBOX_COMPONENTS, SqueezeBoxModule, SBItemComponent, SBItemHeadComponent, SBItemBodyComponent, SqueezeBoxComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SQUEEZEBOX_COMPONENTS", function() { return SQUEEZEBOX_COMPONENTS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SqueezeBoxModule", function() { return SqueezeBoxModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _components_squeezebox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/squeezebox */ "./src/app/typescripts/pro/accordion/components/squeezebox.ts");
/* harmony import */ var _components_sb_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/sb-item */ "./src/app/typescripts/pro/accordion/components/sb-item.ts");
/* harmony import */ var _components_sb_item_head__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/sb-item.head */ "./src/app/typescripts/pro/accordion/components/sb-item.head.ts");
/* harmony import */ var _components_sb_item_body__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/sb-item.body */ "./src/app/typescripts/pro/accordion/components/sb-item.body.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SBItemComponent", function() { return _components_sb_item__WEBPACK_IMPORTED_MODULE_3__["SBItemComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SBItemHeadComponent", function() { return _components_sb_item_head__WEBPACK_IMPORTED_MODULE_4__["SBItemHeadComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SBItemBodyComponent", function() { return _components_sb_item_body__WEBPACK_IMPORTED_MODULE_5__["SBItemBodyComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SqueezeBoxComponent", function() { return _components_squeezebox__WEBPACK_IMPORTED_MODULE_2__["SqueezeBoxComponent"]; });
var __decorate = (undefined && undefined.__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 SQUEEZEBOX_COMPONENTS = [_components_squeezebox__WEBPACK_IMPORTED_MODULE_2__["SqueezeBoxComponent"], _components_sb_item__WEBPACK_IMPORTED_MODULE_3__["SBItemComponent"], _components_sb_item_head__WEBPACK_IMPORTED_MODULE_4__["SBItemHeadComponent"], _components_sb_item_body__WEBPACK_IMPORTED_MODULE_5__["SBItemBodyComponent"]];
var SqueezeBoxModule = /** @class */ (function () {
function SqueezeBoxModule() {
}
SqueezeBoxModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"]],
declarations: [SQUEEZEBOX_COMPONENTS],
exports: [SQUEEZEBOX_COMPONENTS]
})
], SqueezeBoxModule);
return SqueezeBoxModule;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/overlay/overlay-container.ts":
/*!*********************************************************************!*\
!*** ./src/app/typescripts/pro/alerts/overlay/overlay-container.ts ***!
\*********************************************************************/
/*! exports provided: OverlayContainer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayContainer", function() { return OverlayContainer; });
/**
* The OverlayContainer is the container in which all overlays will load.
* It should be provided in the root component to ensure it is properly shared.
*/
var OverlayContainer = /** @class */ (function () {
function OverlayContainer() {
}
/**
* This method returns the overlay container element. It will lazily
* create the element the first time it is called to facilitate using
* the container in non-browser environments.
* @returns the container element
*/
OverlayContainer.prototype.getContainerElement = function () {
if (!this._containerElement) {
this._createContainer();
}
return this._containerElement;
};
/**
* Create the overlay container element, which is simply a div
* with the 'cdk-overlay-container' class on the document body.
*/
OverlayContainer.prototype._createContainer = function () {
var container = document.createElement('div');
container.classList.add('overlay-container');
document.body.appendChild(container);
this._containerElement = container;
};
return OverlayContainer;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/overlay/overlay-ref.ts":
/*!***************************************************************!*\
!*** ./src/app/typescripts/pro/alerts/overlay/overlay-ref.ts ***!
\***************************************************************/
/*! exports provided: OverlayRef */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayRef", function() { return OverlayRef; });
/**
* Reference to an overlay that has been created with the Overlay service.
* Used to manipulate or dispose of said overlay.
*/
var OverlayRef = /** @class */ (function () {
function OverlayRef(_portalHost) {
this._portalHost = _portalHost;
}
OverlayRef.prototype.attach = function (portal, newestOnTop) {
return this._portalHost.attach(portal, newestOnTop);
};
/**
* Detaches an overlay from a portal.
* @returns Resolves when the overlay has been detached.
*/
OverlayRef.prototype.detach = function () {
return this._portalHost.detach();
};
return OverlayRef;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/overlay/overlay.ts":
/*!***********************************************************!*\
!*** ./src/app/typescripts/pro/alerts/overlay/overlay.ts ***!
\***********************************************************/
/*! exports provided: Overlay, OVERLAY_PROVIDERS */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Overlay", function() { return Overlay; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OVERLAY_PROVIDERS", function() { return OVERLAY_PROVIDERS; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _portal_dom_portal_host__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../portal/dom-portal-host */ "./src/app/typescripts/pro/alerts/portal/dom-portal-host.ts");
/* harmony import */ var _overlay_ref__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./overlay-ref */ "./src/app/typescripts/pro/alerts/overlay/overlay-ref.ts");
/* harmony import */ var _overlay_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./overlay-container */ "./src/app/typescripts/pro/alerts/overlay/overlay-container.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**
* Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be
* used as a low-level building building block for other components. Dialogs, tooltips, menus,
* selects, etc. can all be built using overlays. The service should primarily be used by authors
* of re-usable components rather than developers building end-user applications.
*
* An overlay *is* a PortalHost, so any kind of Portal can be loaded into one.
*/
var Overlay = /** @class */ (function () {
function Overlay(_overlayContainer, _componentFactoryResolver, _appRef) {
this._overlayContainer = _overlayContainer;
this._componentFactoryResolver = _componentFactoryResolver;
this._appRef = _appRef;
this._paneElements = {};
}
/**
* Creates an overlay.
* @returns A reference to the created overlay.
*/
Overlay.prototype.create = function (positionClass, overlayContainer) {
// get existing pane if possible
return this._createOverlayRef(this.getPaneElement(positionClass, overlayContainer));
};
Overlay.prototype.getPaneElement = function (positionClass, overlayContainer) {
if (!this._paneElements[positionClass]) {
this._paneElements[positionClass] = this._createPaneElement(positionClass, overlayContainer);
}
return this._paneElements[positionClass];
};
/**
* Creates the DOM element for an overlay and appends it to the overlay container.
* @returns Newly-created pane element
*/
Overlay.prototype._createPaneElement = function (positionClass, overlayContainer) {
var pane = document.createElement('div');
pane.id = 'toast-container';
pane.classList.add(positionClass);
if (!overlayContainer) {
this._overlayContainer.getContainerElement().appendChild(pane);
}
else {
overlayContainer.getContainerElement().appendChild(pane);
}
return pane;
};
/**
* Create a DomPortalHost into which the overlay content can be loaded.
* @param pane The DOM element to turn into a portal host.
* @returns A portal host for the given DOM element.
*/
Overlay.prototype._createPortalHost = function (pane) {
return new _portal_dom_portal_host__WEBPACK_IMPORTED_MODULE_1__["DomPortalHost"](pane, this._componentFactoryResolver, this._appRef);
};
/**
* Creates an OverlayRef for an overlay in the given DOM element.
* @param pane DOM element for the overlay
*/
Overlay.prototype._createOverlayRef = function (pane) {
return new _overlay_ref__WEBPACK_IMPORTED_MODULE_2__["OverlayRef"](this._createPortalHost(pane));
};
Overlay = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
__metadata("design:paramtypes", [_overlay_container__WEBPACK_IMPORTED_MODULE_3__["OverlayContainer"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationRef"]])
], Overlay);
return Overlay;
}());
/** Providers for Overlay and its related injectables. */
var OVERLAY_PROVIDERS = [
Overlay,
_overlay_container__WEBPACK_IMPORTED_MODULE_3__["OverlayContainer"],
];
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/portal/dom-portal-host.ts":
/*!******************************************************************!*\
!*** ./src/app/typescripts/pro/alerts/portal/dom-portal-host.ts ***!
\******************************************************************/
/*! exports provided: DomPortalHost */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomPortalHost", function() { return DomPortalHost; });
/* harmony import */ var _portal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./portal */ "./src/app/typescripts/pro/alerts/portal/portal.ts");
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* A PortalHost for attaching portals to an arbitrary DOM element outside of the Angular
* application context.
*
* This is the only part of the portal core that directly touches the DOM.
*/
var DomPortalHost = /** @class */ (function (_super) {
__extends(DomPortalHost, _super);
function DomPortalHost(_hostDomElement, _componentFactoryResolver, _appRef) {
var _this = _super.call(this) || this;
_this._hostDomElement = _hostDomElement;
_this._componentFactoryResolver = _componentFactoryResolver;
_this._appRef = _appRef;
return _this;
}
/**
* Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.
* @param portal Portal to be attached
*/
DomPortalHost.prototype.attachComponentPortal = function (portal, newestOnTop) {
var _this = this;
var componentFactory = this._componentFactoryResolver.resolveComponentFactory(portal.component);
var componentRef;
// If the portal specifies a ViewContainerRef, we will use that as the attachment point
// for the component (in terms of Angular's component tree, not rendering).
// When the ViewContainerRef is missing, we use the factory to create the component directly
// and then manually attach the ChangeDetector for that component to the application (which
// happens automatically when using a ViewContainer).
componentRef = componentFactory.create(portal.injector);
// When creating a component outside of a ViewContainer, we need to manually register
// its ChangeDetector with the application. This API is unfortunately not yet published
// in Angular core. The change detector must also be deregistered when the component
// is destroyed to prevent memory leaks.
this._appRef.attachView(componentRef.hostView);
this.setDisposeFn(function () {
_this._appRef.detachView(componentRef.hostView);
componentRef.destroy();
});
// At this point the component has been instantiated, so we move it to the location in the DOM
// where we want it to be rendered.
if (newestOnTop) {
this._hostDomElement.insertBefore(this._getComponentRootNode(componentRef), this._hostDomElement.firstChild);
}
else {
this._hostDomElement.appendChild(this._getComponentRootNode(componentRef));
}
return componentRef;
};
/** Gets the root HTMLElement for an instantiated component. */
DomPortalHost.prototype._getComponentRootNode = function (componentRef) {
return componentRef.hostView.rootNodes[0];
};
return DomPortalHost;
}(_portal__WEBPACK_IMPORTED_MODULE_0__["BasePortalHost"]));
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/portal/portal.ts":
/*!*********************************************************!*\
!*** ./src/app/typescripts/pro/alerts/portal/portal.ts ***!
\*********************************************************/
/*! exports provided: ComponentPortal, BasePortalHost */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentPortal", function() { return ComponentPortal; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BasePortalHost", function() { return BasePortalHost; });
/**
* A `ComponentPortal` is a portal that instantiates some Component upon attachment.
*/
var ComponentPortal = /** @class */ (function () {
function ComponentPortal(component, injector) {
this.component = component;
this.injector = injector;
}
/** Attach this portal to a host. */
ComponentPortal.prototype.attach = function (host, newestOnTop) {
this._attachedHost = host;
return host.attach(this, newestOnTop);
};
/** Detach this portal from its host */
ComponentPortal.prototype.detach = function () {
var host = this._attachedHost;
this._attachedHost = null;
return host.detach();
};
Object.defineProperty(ComponentPortal.prototype, "isAttached", {
/** Whether this portal is attached to a host. */
get: function () {
return this._attachedHost != null;
},
enumerable: true,
configurable: true
});
/**
* Sets the PortalHost reference without performing `attach()`. This is used directly by
* the PortalHost when it is performing an `attach()` or `detach()`.
*/
// setAttachedHost(host: BasePortalHost) {
ComponentPortal.prototype.setAttachedHost = function (host) {
this._attachedHost = host;
};
return ComponentPortal;
}());
/**
* Partial implementation of PortalHost that only deals with attaching a
* ComponentPortal
*/
var BasePortalHost = /** @class */ (function () {
function BasePortalHost() {
this.setToNullValue = null;
}
BasePortalHost.prototype.attach = function (portal, newestOnTop) {
this._attachedPortal = portal;
return this.attachComponentPortal(portal, newestOnTop);
};
BasePortalHost.prototype.detach = function () {
if (this._attachedPortal) {
this._attachedPortal.setAttachedHost(null);
}
this._attachedPortal = null;
if (this._disposeFn != null) {
this._disposeFn();
// this._disposeFn = null;
this._disposeFn = this.setToNullValue;
}
};
BasePortalHost.prototype.setDisposeFn = function (fn) {
this._disposeFn = fn;
};
return BasePortalHost;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/toast/toast.component.html":
/*!*******************************************************************!*\
!*** ./src/app/typescripts/pro/alerts/toast/toast.component.html ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<button *ngIf=\"options.closeButton\" (click)=\"remove()\" class=\"toast-close-button\">\r\n &times;\r\n</button>\r\n<div *ngIf=\"title\" class=\"{{options.titleClass}}\" [attr.aria-label]=\"title\">\r\n {{title}}\r\n</div>\r\n<div *ngIf=\"message && options.enableHtml\" class=\"{{options.messageClass}}\" [innerHTML]=\"message\">\r\n</div>\r\n<div *ngIf=\"message && !options.enableHtml\" class=\"{{options.messageClass}}\" [attr.aria-label]=\"message\">\r\n {{message}}\r\n</div>\r\n<div *ngIf=\"options.progressBar\">\r\n <div class=\"toast-progress\" [style.width.%]=\"width\"></div>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/toast/toast.component.ts":
/*!*****************************************************************!*\
!*** ./src/app/typescripts/pro/alerts/toast/toast.component.ts ***!
\*****************************************************************/
/*! exports provided: ToastComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToastComponent", function() { return ToastComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
/* harmony import */ var _toast_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./toast.config */ "./src/app/typescripts/pro/alerts/toast/toast.config.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ToastComponent = /** @class */ (function () {
function ToastComponent(toastPackage, appRef) {
var _this = this;
this.toastPackage = toastPackage;
this.appRef = appRef;
/** width of progress bar */
this.width = -1;
/** a combination of toast type and options.toastClass */
this.toastClasses = '';
/** controls animation */
this.state = 'inactive';
this.toastService = _toast_config__WEBPACK_IMPORTED_MODULE_2__["tsConfig"].serviceInstance;
this.message = toastPackage.message;
this.title = toastPackage.title;
this.options = toastPackage.config;
this.toastClasses = toastPackage.toastType + " " + toastPackage.config.toastClass;
this.sub = toastPackage.toastRef.afterActivate().subscribe(function () {
_this.activateToast();
});
this.sub1 = toastPackage.toastRef.manualClosed().subscribe(function () {
_this.remove();
});
}
ToastComponent.prototype.ngOnDestroy = function () {
this.sub.unsubscribe();
this.sub1.unsubscribe();
clearInterval(this.intervalId);
clearTimeout(this.timeout);
};
/**
* activates toast and sets timeout
*/
ToastComponent.prototype.activateToast = function () {
var _this = this;
this.state = 'active';
if (this.options.timeOut !== 0) {
this.timeout = setTimeout(function () {
_this.remove();
}, this.options.timeOut);
this.hideTime = new Date().getTime() + this.options.timeOut;
if (this.options.progressBar) {
this.intervalId = setInterval(function () { return _this.updateProgress(); }, 10);
}
}
if (this.options.onActivateTick) {
this.appRef.tick();
}
};
/**
* updates progress bar width
*/
ToastComponent.prototype.updateProgress = function () {
if (this.width === 0) {
return;
}
var now = new Date().getTime();
var remaining = this.hideTime - now;
this.width = (remaining / this.options.timeOut) * 100;
if (this.width <= 0) {
this.width = 0;
}
};
/**
* tells toastrService to remove this toast after animation time
*/
ToastComponent.prototype.remove = function () {
var _this = this;
if (this.state === 'removed') {
return;
}
clearTimeout(this.timeout);
this.state = 'removed';
this.timeout = setTimeout(function () {
return _this.toastService.remove(_this.toastPackage.toastId);
}, 300);
};
ToastComponent.prototype.tapToast = function () {
if (this.state === 'removed') {
return;
}
this.toastPackage.triggerTap();
if (this.options.tapToDismiss) {
this.remove();
}
};
ToastComponent.prototype.stickAround = function () {
if (this.state === 'removed') {
return;
}
clearTimeout(this.timeout);
this.options.timeOut = 0;
this.hideTime = 0;
// disable progressBar
clearInterval(this.intervalId);
this.width = 0;
};
ToastComponent.prototype.delayedHideToast = function () {
var _this = this;
if (+this.options.extendedTimeOut === 0 || this.state === 'removed') {
return;
}
this.timeout = setTimeout(function () { return _this.remove(); }, this.options.extendedTimeOut);
this.options.timeOut = +this.options.extendedTimeOut;
this.hideTime = new Date().getTime() + this.options.timeOut;
this.width = 100;
if (this.options.progressBar) {
this.intervalId = setInterval(function () { return _this.updateProgress(); }, 10);
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class'),
__metadata("design:type", Object)
], ToastComponent.prototype, "toastClasses", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('@flyInOut'),
__metadata("design:type", Object)
], ToastComponent.prototype, "state", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ToastComponent.prototype, "tapToast", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('mouseenter'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ToastComponent.prototype, "stickAround", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('mouseleave'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ToastComponent.prototype, "delayedHideToast", null);
ToastComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-toast-component',
template: __webpack_require__(/*! ./toast.component.html */ "./src/app/typescripts/pro/alerts/toast/toast.component.html"),
animations: [
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["trigger"])('flyInOut', [
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["state"])('inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["style"])({
display: 'none',
opacity: 0
})),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["state"])('active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["style"])({ opacity: .5 })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["state"])('removed', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["style"])({ opacity: 0 })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["transition"])('inactive => active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["animate"])('300ms ease-in')),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["transition"])('active => removed', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["animate"])('300ms ease-in')),
]),
],
}),
__metadata("design:paramtypes", [_toast_config__WEBPACK_IMPORTED_MODULE_2__["ToastPackage"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationRef"]])
], ToastComponent);
return ToastComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/toast/toast.config.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/pro/alerts/toast/toast.config.ts ***!
\**************************************************************/
/*! exports provided: GlobalConfig, ToastPackage, tsConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalConfig", function() { return GlobalConfig; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToastPackage", function() { return ToastPackage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsConfig", function() { return tsConfig; });
/* harmony import */ var rxjs_Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs/Subject */ "./node_modules/rxjs-compat/_esm5/Subject.js");
/**
* Remove warning message from angular-cli
*/
var GlobalConfig = /** @class */ (function () {
function GlobalConfig() {
}
return GlobalConfig;
}());
/**
* Everything a toast needs to launch
*/
var ToastPackage = /** @class */ (function () {
function ToastPackage(toastId, config, message, title, toastType, toastRef) {
this.toastId = toastId;
this.config = config;
this.message = message;
this.title = title;
this.toastType = toastType;
this.toastRef = toastRef;
this._onTap = new rxjs_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
this._onAction = new rxjs_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
}
/** Fired on click */
ToastPackage.prototype.triggerTap = function () {
this._onTap.next();
this._onTap.complete();
};
ToastPackage.prototype.onTap = function () {
return this._onTap.asObservable();
};
/** available for use in custom toast */
ToastPackage.prototype.triggerAction = function (action) {
this._onAction.next(action);
this._onAction.complete();
};
ToastPackage.prototype.onAction = function () {
return this._onAction.asObservable();
};
return ToastPackage;
}());
var tsConfig = {
serviceInstance: new Object()
};
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/toast/toast.injector.ts":
/*!****************************************************************!*\
!*** ./src/app/typescripts/pro/alerts/toast/toast.injector.ts ***!
\****************************************************************/
/*! exports provided: ToastRef, ToastInjector */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToastRef", function() { return ToastRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToastInjector", function() { return ToastInjector; });
/* harmony import */ var rxjs_Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs/Subject */ "./node_modules/rxjs-compat/_esm5/Subject.js");
/* harmony import */ var _toast_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toast.config */ "./src/app/typescripts/pro/alerts/toast/toast.config.ts");
/**
* Reference to a toast opened via the Toast service.
*/
var ToastRef = /** @class */ (function () {
function ToastRef(_overlayRef) {
this._overlayRef = _overlayRef;
/** Subject for notifying the user that the toast has finished closing. */
this._afterClosed = new rxjs_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
this._activate = new rxjs_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
this._manualClose = new rxjs_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
}
ToastRef.prototype.manualClose = function () {
this._manualClose.next();
this._manualClose.complete();
};
ToastRef.prototype.manualClosed = function () {
return this._manualClose.asObservable();
};
/**
* Close the toast.
*/
ToastRef.prototype.close = function () {
this._overlayRef.detach();
this._afterClosed.next();
this._afterClosed.complete();
};
/** Gets an observable that is notified when the toast is finished closing. */
ToastRef.prototype.afterClosed = function () {
return this._afterClosed.asObservable();
};
ToastRef.prototype.isInactive = function () {
return this._activate.isStopped;
};
ToastRef.prototype.activate = function () {
this._activate.next();
this._activate.complete();
};
/** Gets an observable that is notified when the toast has started opening. */
ToastRef.prototype.afterActivate = function () {
return this._activate.asObservable();
};
return ToastRef;
}());
/** Custom injector type specifically for instantiating components with a toast. */
var ToastInjector = /** @class */ (function () {
function ToastInjector(_toastPackage, _parentInjector) {
this._toastPackage = _toastPackage;
this._parentInjector = _parentInjector;
}
ToastInjector.prototype.get = function (token, notFoundValue) {
if (token === _toast_config__WEBPACK_IMPORTED_MODULE_1__["ToastPackage"] && this._toastPackage) {
return this._toastPackage;
}
return this._parentInjector.get(token, notFoundValue);
};
return ToastInjector;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/toast/toast.module.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/pro/alerts/toast/toast.module.ts ***!
\**************************************************************/
/*! exports provided: ToastModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToastModule", function() { return ToastModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _toast_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./toast.component */ "./src/app/typescripts/pro/alerts/toast/toast.component.ts");
/* harmony import */ var _toast_token__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toast.token */ "./src/app/typescripts/pro/alerts/toast/toast.token.ts");
/* harmony import */ var _toast_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toast.service */ "./src/app/typescripts/pro/alerts/toast/toast.service.ts");
/* harmony import */ var _overlay_overlay_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../overlay/overlay-container */ "./src/app/typescripts/pro/alerts/overlay/overlay-container.ts");
/* harmony import */ var _overlay_overlay__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../overlay/overlay */ "./src/app/typescripts/pro/alerts/overlay/overlay.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var ToastModule = /** @class */ (function () {
function ToastModule(parentModule) {
if (parentModule) {
throw new Error('ToastModule is already loaded. It should only be imported in your application\'s main module.');
}
}
ToastModule_1 = ToastModule;
ToastModule.forRoot = function (config) {
return {
ngModule: ToastModule_1,
providers: [
{ provide: _toast_token__WEBPACK_IMPORTED_MODULE_3__["TOAST_CONFIG"], useValue: config },
_overlay_overlay_container__WEBPACK_IMPORTED_MODULE_5__["OverlayContainer"],
_overlay_overlay__WEBPACK_IMPORTED_MODULE_6__["Overlay"],
_toast_service__WEBPACK_IMPORTED_MODULE_4__["ToastService"],
]
};
};
ToastModule = ToastModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"]],
exports: [_toast_component__WEBPACK_IMPORTED_MODULE_2__["ToastComponent"]],
declarations: [_toast_component__WEBPACK_IMPORTED_MODULE_2__["ToastComponent"]],
entryComponents: [_toast_component__WEBPACK_IMPORTED_MODULE_2__["ToastComponent"]],
}),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])()), __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"])()),
__metadata("design:paramtypes", [ToastModule])
], ToastModule);
return ToastModule;
var ToastModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/toast/toast.service.ts":
/*!***************************************************************!*\
!*** ./src/app/typescripts/pro/alerts/toast/toast.service.ts ***!
\***************************************************************/
/*! exports provided: ToastService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToastService", function() { return ToastService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _overlay_overlay__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../overlay/overlay */ "./src/app/typescripts/pro/alerts/overlay/overlay.ts");
/* harmony import */ var _portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../portal/portal */ "./src/app/typescripts/pro/alerts/portal/portal.ts");
/* harmony import */ var _toast_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toast.config */ "./src/app/typescripts/pro/alerts/toast/toast.config.ts");
/* harmony import */ var _toast_injector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toast.injector */ "./src/app/typescripts/pro/alerts/toast/toast.injector.ts");
/* harmony import */ var _toast_token__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./toast.token */ "./src/app/typescripts/pro/alerts/toast/toast.token.ts");
/* harmony import */ var _toast_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./toast.component */ "./src/app/typescripts/pro/alerts/toast/toast.component.ts");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
var __assign = (undefined && undefined.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var ToastService = /** @class */ (function () {
function ToastService(
// @Inject(TOAST_CONFIG) public toastConfig: GlobalConfig,
toastConfig, overlay, _injector, sanitizer) {
this.toastConfig = toastConfig;
this.overlay = overlay;
this._injector = _injector;
this.sanitizer = sanitizer;
this.index = 0;
this.previousToastMessage = '';
this.currentlyActive = 0;
this.toasts = [];
_toast_config__WEBPACK_IMPORTED_MODULE_3__["tsConfig"].serviceInstance = this;
function use(source, defaultValue) {
return toastConfig && source !== undefined ? source : defaultValue;
}
this.toastConfig = this.applyConfig(toastConfig);
// Global
this.toastConfig.maxOpened = use(this.toastConfig.maxOpened, 0);
this.toastConfig.autoDismiss = use(this.toastConfig.autoDismiss, false);
this.toastConfig.newestOnTop = use(this.toastConfig.newestOnTop, true);
this.toastConfig.preventDuplicates = use(this.toastConfig.preventDuplicates, false);
if (!this.toastConfig.iconClasses) {
this.toastConfig.iconClasses = {};
}
this.toastConfig.iconClasses.error = this.toastConfig.iconClasses.error || 'toast-error';
this.toastConfig.iconClasses.info = this.toastConfig.iconClasses.info || 'toast-info';
this.toastConfig.iconClasses.success = this.toastConfig.iconClasses.success || 'toast-success';
this.toastConfig.iconClasses.warning = this.toastConfig.iconClasses.warning || 'toast-warning';
// Individual
this.toastConfig.timeOut = use(this.toastConfig.timeOut, 5000);
this.toastConfig.closeButton = use(this.toastConfig.closeButton, false);
this.toastConfig.extendedTimeOut = use(this.toastConfig.extendedTimeOut, 1000);
this.toastConfig.progressBar = use(this.toastConfig.progressBar, false);
this.toastConfig.enableHtml = use(this.toastConfig.enableHtml, false);
this.toastConfig.toastClass = use(this.toastConfig.toastClass, 'toast');
this.toastConfig.positionClass = use(this.toastConfig.positionClass, 'toast-top-right');
this.toastConfig.titleClass = use(this.toastConfig.titleClass, 'toast-title');
this.toastConfig.messageClass = use(this.toastConfig.messageClass, 'toast-message');
this.toastConfig.tapToDismiss = use(this.toastConfig.tapToDismiss, true);
this.toastConfig.toastComponent = use(this.toastConfig.toastComponent, _toast_component__WEBPACK_IMPORTED_MODULE_6__["ToastComponent"]);
this.toastConfig.onActivateTick = use(this.toastConfig.onActivateTick, false);
}
/** show successful toast */
// show(message: string, title?: string, override?: IndividualConfig, type = '') {
ToastService.prototype.show = function (message, title, override, type) {
if (type === void 0) { type = ''; }
return this._buildNotification(type, message, title, this.applyConfig(override));
};
/** show successful toast */
// success(message: string, title?: string, override?: IndividualConfig) {
ToastService.prototype.success = function (message, title, override) {
// const type = this.toastConfig.iconClasses.success;
var type = this.toastConfig.iconClasses.success;
return this._buildNotification(type, message, title, this.applyConfig(override));
};
/** show error toast */
// error(message: string, title?: string, override?: IndividualConfig) {
ToastService.prototype.error = function (message, title, override) {
// const type = this.toastConfig.iconClasses.error;
var type = this.toastConfig.iconClasses.error;
return this._buildNotification(type, message, title, this.applyConfig(override));
};
/** show info toast */
// info(message: string, title?: string, override?: IndividualConfig) {
ToastService.prototype.info = function (message, title, override) {
// const type = this.toastConfig.iconClasses.info;
var type = this.toastConfig.iconClasses.info;
return this._buildNotification(type, message, title, this.applyConfig(override));
};
/** show warning toast */
// warning(message: string, title?: string, override?: IndividualConfig) {
ToastService.prototype.warning = function (message, title, override) {
// const type = this.toastConfig.iconClasses.warning;
var type = this.toastConfig.iconClasses.warning;
return this._buildNotification(type, message, title, this.applyConfig(override));
};
/**
* Remove all or a single toast by id
*/
ToastService.prototype.clear = function (toastId) {
// Call every toastRef manualClose function
var toast;
for (var _i = 0, _a = this.toasts; _i < _a.length; _i++) {
toast = _a[_i];
if (toastId !== undefined) {
if (toast.toastId === toastId) {
toast.toastRef.manualClose();
return;
}
}
else {
toast.toastRef.manualClose();
}
}
};
/**
* Remove and destroy a single toast by id
*/
ToastService.prototype.remove = function (toastId) {
// const found = this._findToast(toastId);
var found = this._findToast(toastId);
if (!found) {
return false;
}
found.activeToast.toastRef.close();
this.toasts.splice(found.index, 1);
this.currentlyActive = this.currentlyActive - 1;
if (!this.toastConfig.maxOpened || !this.toasts.length) {
return false;
}
if (this.currentlyActive <= +this.toastConfig.maxOpened && this.toasts[this.currentlyActive]) {
// const p = this.toasts[this.currentlyActive].toastRef;
var p = this.toasts[this.currentlyActive].toastRef;
if (!p.isInactive()) {
this.currentlyActive = this.currentlyActive + 1;
p.activate();
}
}
return true;
};
/**
* Determines if toast message is already shown
*/
ToastService.prototype.isDuplicate = function (message) {
for (var i = 0; i < this.toasts.length; i++) {
if (this.toasts[i].message === message) {
return true;
}
}
return false;
};
/** create a clone of global config and apply individual settings */
ToastService.prototype.applyConfig = function (override) {
if (override === void 0) { override = {}; }
function use(source, defaultValue) {
return override && source !== undefined ? source : defaultValue;
}
var current = __assign({}, this.toastConfig);
current.closeButton = use(override.closeButton, current.closeButton);
current.extendedTimeOut = use(override.extendedTimeOut, current.extendedTimeOut);
current.progressBar = use(override.progressBar, current.progressBar);
current.timeOut = use(override.timeOut, current.timeOut);
current.enableHtml = use(override.enableHtml, current.enableHtml);
current.toastClass = use(override.toastClass, current.toastClass);
current.positionClass = use(override.positionClass, current.positionClass);
current.titleClass = use(override.titleClass, current.titleClass);
current.messageClass = use(override.messageClass, current.messageClass);
current.tapToDismiss = use(override.tapToDismiss, current.tapToDismiss);
current.toastComponent = use(override.toastComponent, current.toastComponent);
current.onActivateTick = use(override.onActivateTick, current.onActivateTick);
return current;
};
/**
* Find toast object by id
*/
ToastService.prototype._findToast = function (toastId) {
for (var i = 0; i < this.toasts.length; i++) {
if (this.toasts[i].toastId === toastId) {
return { index: i, activeToast: this.toasts[i] };
}
}
return null;
};
/**
* Creates and attaches toast data to component
* returns null if toast is duplicate and preventDuplicates == True
*/
ToastService.prototype._buildNotification = function (toastType, message, title, config) {
var _this = this;
// max opened and auto dismiss = true
if (this.toastConfig.preventDuplicates && this.isDuplicate(message)) {
return null;
}
this.previousToastMessage = message;
var keepInactive = false;
if (this.toastConfig.maxOpened && this.currentlyActive >= this.toastConfig.maxOpened) {
keepInactive = true;
if (this.toastConfig.autoDismiss) {
this.clear(this.toasts[this.toasts.length - 1].toastId);
}
}
var overlayRef = this.overlay.create(config.positionClass, this.overlayContainer);
this.index = this.index + 1;
// let sanitizedMessage = message;
var sanitizedMessage = message;
if (message && config.enableHtml) {
sanitizedMessage = this.sanitizer.sanitize(_angular_core__WEBPACK_IMPORTED_MODULE_0__["SecurityContext"].HTML, message);
}
var toastRef = new _toast_injector__WEBPACK_IMPORTED_MODULE_4__["ToastRef"](overlayRef);
var toastPackage = new _toast_config__WEBPACK_IMPORTED_MODULE_3__["ToastPackage"](this.index, config, sanitizedMessage, title, toastType, toastRef);
// const ins: ActiveToast = {
var ins = {
toastId: this.index,
message: message,
toastRef: toastRef,
onShown: toastRef.afterActivate(),
onHidden: toastRef.afterActivate(),
onTap: toastPackage.onTap(),
onAction: toastPackage.onAction(),
};
var toastInjector = new _toast_injector__WEBPACK_IMPORTED_MODULE_4__["ToastInjector"](toastPackage, this._injector);
var component = new _portal_portal__WEBPACK_IMPORTED_MODULE_2__["ComponentPortal"](config.toastComponent, toastInjector);
ins.portal = overlayRef.attach(component, this.toastConfig.newestOnTop);
if (!keepInactive) {
setTimeout(function () {
ins.toastRef.activate();
_this.currentlyActive = _this.currentlyActive + 1;
});
}
this.toasts.push(ins);
return ins;
};
ToastService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_toast_token__WEBPACK_IMPORTED_MODULE_5__["TOAST_CONFIG"])),
__metadata("design:paramtypes", [Object, _overlay_overlay__WEBPACK_IMPORTED_MODULE_1__["Overlay"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"],
_angular_platform_browser__WEBPACK_IMPORTED_MODULE_7__["DomSanitizer"]])
], ToastService);
return ToastService;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/alerts/toast/toast.token.ts":
/*!*************************************************************!*\
!*** ./src/app/typescripts/pro/alerts/toast/toast.token.ts ***!
\*************************************************************/
/*! exports provided: TOAST_CONFIG */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TOAST_CONFIG", function() { return TOAST_CONFIG; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var TOAST_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('ToastConfig');
/***/ }),
/***/ "./src/app/typescripts/pro/animations/animations.component.ts":
/*!********************************************************************!*\
!*** ./src/app/typescripts/pro/animations/animations.component.ts ***!
\********************************************************************/
/*! exports provided: slideIn, fadeIn, slideOut, flipState, turnState, iconsState, socialsState, flyInOut */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slideIn", function() { return slideIn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fadeIn", function() { return fadeIn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slideOut", function() { return slideOut; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flipState", function() { return flipState; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "turnState", function() { return turnState; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iconsState", function() { return iconsState; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "socialsState", function() { return socialsState; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flyInOut", function() { return flyInOut; });
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
// SideNav
var slideIn = Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('slideIn', [
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 0, transform: 'translateX(-300%)' })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 1, transform: 'translateX(0)' })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('inactive => active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('500ms ease')),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('active => inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('500ms ease')),
]);
var fadeIn = Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('fadeIn', [
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 0 })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 1 })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('inactive => active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('500ms ease')),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('active => inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('500ms ease')),
]);
var slideOut = Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('slideOut', [
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 0, transform: 'translateX(-300%)' })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 1, transform: 'translateX(0)' })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('inactive => active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('500ms ease')),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('active => inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('500ms ease')),
]);
var flipState = Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('flipState', [
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ transform: 'rotateY(179.9deg)' })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ transform: 'rotateY(0)' })),
]);
// Rotating animation animation
var turnState = Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('turnState', [
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ transform: 'rotateY(179.9deg)' })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ transform: 'rotateY(0)' })),
]);
// Social reveal animation
var iconsState = Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('iconsState', [
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('isactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ visibility: 'visible', transform: 'translate(-6%)' })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('isnotactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ visibility: 'hidden', transform: 'translate(27%)' })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('isactive => isnotactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('100ms ease-in')),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('isnotactive => isactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('200ms ease-out')),
]);
// Reveal animation animation
var socialsState = Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('socialsState', [
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ visibility: 'visible', transform: 'translateY(-100%)' })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ visibility: 'hidden', transform: 'translateY(0)' })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('* => void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('200ms ease-in')),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('void => *', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('200ms ease-out')),
]);
// image popup
// export const zoomState: any = trigger('zoomState', [
// state('active', style({ transform: 'scale(1, 1)', cursor: 'zoom-out' })),
// state('inactive', style({ transform: 'scale(0.9, 0.9)', cursor: 'zoom-in' })),
// transition('active => inactive', animate('300ms ease-in')),
// transition('inactive => active', animate('300ms ease-out')),
// ]);
// export const restartState: any = trigger('restartState', [
// state('inactive', style({ transform: 'scale(0.9, 0.9)' })),
// ]);
// alerts
var flyInOut = Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('flyInOut', [
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('inactive', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ display: 'none', opacity: 0.7 })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 0.7 })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('removed', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 0 })),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('inactive => active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('300ms ease-in')),
Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('active => removed', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('300ms ease-in')),
]);
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/completerModule.ts":
/*!*****************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/completerModule.ts ***!
\*****************************************************************/
/*! exports provided: Ng2CompleterModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ng2CompleterModule", function() { return Ng2CompleterModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _components_completer_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/completer.component */ "./src/app/typescripts/pro/autocomplete/components/completer.component.ts");
/* harmony import */ var _components_completer_list_item_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/completer-list-item.component */ "./src/app/typescripts/pro/autocomplete/components/completer-list-item.component.ts");
/* harmony import */ var _services_completer_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./services/completer.service */ "./src/app/typescripts/pro/autocomplete/services/completer.service.ts");
/* harmony import */ var _services_data_factory_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./services/data-factory.service */ "./src/app/typescripts/pro/autocomplete/services/data-factory.service.ts");
/* harmony import */ var _directives_completer_directive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./directives/completer.directive */ "./src/app/typescripts/pro/autocomplete/directives/completer.directive.ts");
/* harmony import */ var _directives_dropdown_directive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./directives/dropdown.directive */ "./src/app/typescripts/pro/autocomplete/directives/dropdown.directive.ts");
/* harmony import */ var _directives_input_directive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./directives/input.directive */ "./src/app/typescripts/pro/autocomplete/directives/input.directive.ts");
/* harmony import */ var _directives_list_context_directive__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./directives/list-context.directive */ "./src/app/typescripts/pro/autocomplete/directives/list-context.directive.ts");
/* harmony import */ var _directives_row_directive__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./directives/row.directive */ "./src/app/typescripts/pro/autocomplete/directives/row.directive.ts");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
var __decorate = (undefined && undefined.__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 Ng2CompleterModule = /** @class */ (function () {
function Ng2CompleterModule() {
}
Ng2CompleterModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [
_angular_common__WEBPACK_IMPORTED_MODULE_12__["CommonModule"],
_angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormsModule"],
_angular_http__WEBPACK_IMPORTED_MODULE_2__["HttpModule"]
],
declarations: [
_components_completer_list_item_component__WEBPACK_IMPORTED_MODULE_4__["CompleterListItemComponent"],
_directives_completer_directive__WEBPACK_IMPORTED_MODULE_7__["MdbCompleterDirective"],
_directives_dropdown_directive__WEBPACK_IMPORTED_MODULE_8__["MdbDropdownDirective"],
_directives_input_directive__WEBPACK_IMPORTED_MODULE_9__["MdbInputDirective"],
_directives_list_context_directive__WEBPACK_IMPORTED_MODULE_10__["MdbListDirective"],
_directives_row_directive__WEBPACK_IMPORTED_MODULE_11__["MdbRowDirective"],
_components_completer_component__WEBPACK_IMPORTED_MODULE_3__["CompleterComponent"]
],
exports: [
_components_completer_component__WEBPACK_IMPORTED_MODULE_3__["CompleterComponent"],
_components_completer_list_item_component__WEBPACK_IMPORTED_MODULE_4__["CompleterListItemComponent"],
_directives_completer_directive__WEBPACK_IMPORTED_MODULE_7__["MdbCompleterDirective"],
_directives_dropdown_directive__WEBPACK_IMPORTED_MODULE_8__["MdbDropdownDirective"],
_directives_input_directive__WEBPACK_IMPORTED_MODULE_9__["MdbInputDirective"],
_directives_list_context_directive__WEBPACK_IMPORTED_MODULE_10__["MdbListDirective"],
_directives_row_directive__WEBPACK_IMPORTED_MODULE_11__["MdbRowDirective"]
],
providers: [
_services_completer_service__WEBPACK_IMPORTED_MODULE_5__["CompleterService"],
_services_data_factory_service__WEBPACK_IMPORTED_MODULE_6__["LocalDataFactoryProvider"],
_services_data_factory_service__WEBPACK_IMPORTED_MODULE_6__["RemoteDataFactoryProvider"]
]
})
], Ng2CompleterModule);
return Ng2CompleterModule;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/components/completer-list-item.component.html":
/*!********************************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/components/completer-list-item.component.html ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<span class=\"completer-list-item-holder\" [ngClass]=\"{'completer-title': type === 'title', 'completer-description': type === 'description'}\" >\r\n <span class=\"completer-list-item\" *ngFor=\"let part of parts\" [ngClass]=\"part.isMatch ? matchClass : null\">{{part.text}}</span>\r\n</span>\r\n"
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/components/completer-list-item.component.ts":
/*!******************************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/components/completer-list-item.component.ts ***!
\******************************************************************************************/
/*! exports provided: CompleterListItemComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompleterListItemComponent", function() { return CompleterListItemComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
'use strict';
var CompleterListItemComponent = /** @class */ (function () {
function CompleterListItemComponent() {
this.parts = [];
}
CompleterListItemComponent.prototype.ngOnInit = function () {
if (!this.searchStr) {
this.parts.push({ isMatch: false, text: this.text });
return;
}
var matchStr = this.text.toLowerCase();
var matchPos = matchStr.indexOf(this.searchStr.toLowerCase());
var startIndex = 0;
while (matchPos >= 0) {
var matchText = this.text.slice(matchPos, matchPos + this.searchStr.length);
if (matchPos === 0) {
this.parts.push({ isMatch: true, text: matchText });
startIndex += this.searchStr.length;
}
else if (matchPos > 0) {
var matchPart = this.text.slice(startIndex, matchPos);
this.parts.push({ isMatch: false, text: matchPart });
this.parts.push({ isMatch: true, text: matchText });
startIndex += this.searchStr.length + matchPart.length;
}
matchPos = matchStr.indexOf(this.searchStr.toLowerCase(), startIndex);
}
if (startIndex < this.text.length) {
this.parts.push({ isMatch: false, text: this.text.slice(startIndex, this.text.length) });
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], CompleterListItemComponent.prototype, "text", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], CompleterListItemComponent.prototype, "searchStr", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], CompleterListItemComponent.prototype, "matchClass", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], CompleterListItemComponent.prototype, "type", void 0);
CompleterListItemComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-completer-list-item',
template: __webpack_require__(/*! ./completer-list-item.component.html */ "./src/app/typescripts/pro/autocomplete/components/completer-list-item.component.html")
})
], CompleterListItemComponent);
return CompleterListItemComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/components/completer.component.html":
/*!**********************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/components/completer.component.html ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"completer-holder md-form\" mdbCompleter>\r\n \r\n <input #mdbInput [attr.id]=\"inputId.length > 0 ? inputId : null\" type=\"search\" class=\"completer-input form-control mdb-autocomplete\" mdbInput [ngClass]=\"inputClass\" \r\n [(ngModel)]=\"searchStr\" (ngModelChange)=\"onChange($event)\" [attr.name]=\"inputName\" [placeholder]=\"placeholder\"\r\n [attr.maxlength]=\"maxChars\" [tabindex]=\"fieldTabindex\" [disabled]=\"disableInput\" \r\n [clearSelected]=\"clearSelected\" [clearUnselected]=\"clearUnselected\"\r\n [overrideSuggested]=\"overrideSuggested\" [openOnFocus]=\"openOnFocus\" [fillHighlighted]=\"fillHighlighted\" \r\n (blur)=\"onBlur()\" (focus)=\"onFocus()\" (keyup)=\"onKeyup($event)\" (keydown)=\"onKeydown($event)\"\r\n autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" />\r\n <label [ngClass]=\"{'active': focused}\">{{ label }}</label>\r\n <div class=\"completer-dropdown-holder\"\r\n *mdbList=\"dataService;\r\n minSearchLength: minSearchLength;\r\n pause: pause;\r\n autoMatch: autoMatch;\r\n initialValue: initialValue;\r\n autoHighlight: autoHighlight;\r\n let items = results;\r\n let searchActive = searching;\r\n let isInitialized = searchInitialized;\r\n let isOpen = isOpen;\">\r\n <div class=\"completer-dropdown\" mdbDropdown *ngIf=\"isInitialized && isOpen && ((items.length > 0 || displayNoResults) || (searchActive && displaySearching))\">\r\n <div *ngIf=\"searchActive && displaySearching\" class=\"completer-searching\">{{_textSearching}}</div>\r\n <div *ngIf=\"!searchActive && (!items || items.length === 0)\" class=\"completer-no-results\">{{_textNoResults}}</div>\r\n <div class=\"completer-row-wrapper\" *ngFor=\"let item of items; let rowIndex=index\">\r\n <div class=\"completer-row\" [mdbRow]=\"rowIndex\" [dataItem]=\"item\">\r\n <div *ngIf=\"item.image || item.image === ''\" class=\"completer-image-holder\">\r\n <img *ngIf=\"item.image != ''\" src=\"{{item.image}}\" class=\"completer-image\" />\r\n <div *ngIf=\"item.image === ''\" class=\"completer-image-default\"></div>\r\n </div>\r\n <div class=\"completer-item-text\" [ngClass]=\"{'completer-item-text-image': item.image || item.image === '' }\">\r\n <mdb-completer-list-item class=\"completer-title\" [text]=\"item.title\" [matchClass]=\"matchClass\" [searchStr]=\"searchStr\" [type]=\"'title'\"></mdb-completer-list-item>\r\n <mdb-completer-list-item *ngIf=\"item.description && item.description != ''\" class=\"completer-description\" [text]=\"item.description\"\r\n [matchClass]=\"matchClass\" [searchStr]=\"searchStr\" [type]=\"'description'\">\r\n </mdb-completer-list-item>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/components/completer.component.ts":
/*!********************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/components/completer.component.ts ***!
\********************************************************************************/
/*! exports provided: CompleterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompleterComponent", function() { return CompleterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _directives_completer_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../directives/completer.directive */ "./src/app/typescripts/pro/autocomplete/directives/completer.directive.ts");
/* harmony import */ var _services_completer_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/completer.service */ "./src/app/typescripts/pro/autocomplete/services/completer.service.ts");
/* harmony import */ var _globals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../globals */ "./src/app/typescripts/pro/autocomplete/globals.ts");
/* harmony import */ var rxjs_add_operator_catch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/add/operator/catch */ "./node_modules/rxjs-compat/_esm5/add/operator/catch.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
'use strict';
var noop = function () { };
var COMPLETER_CONTROL_VALUE_ACCESSOR = {
provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return CompleterComponent; }),
multi: true
};
var CompleterComponent = /** @class */ (function () {
function CompleterComponent(completerService) {
this.completerService = completerService;
this.inputName = '';
this.inputId = '';
this.pause = _globals__WEBPACK_IMPORTED_MODULE_4__["PAUSE"];
this.minSearchLength = _globals__WEBPACK_IMPORTED_MODULE_4__["MIN_SEARCH_LENGTH"];
this.maxChars = _globals__WEBPACK_IMPORTED_MODULE_4__["MAX_CHARS"];
this.overrideSuggested = false;
this.clearSelected = false;
this.clearUnselected = false;
this.fillHighlighted = true;
this.placeholder = '';
this.autoMatch = false;
this.disableInput = false;
this.autofocus = false;
this.openOnFocus = false;
this.autoHighlight = false;
this.focused = false;
this.selected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.highlighted = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.blur = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.focusEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.opened = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.keyup = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.keydown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.searchStr = '';
this.control = new _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormControl"]('');
// displaySearching = true;
this.displaySearching = true;
// displayNoResults = true;
this.displayNoResults = true;
this._onTouchedCallback = noop;
this._onChangeCallback = noop;
this._focus = false;
this._open = false;
this._textNoResults = _globals__WEBPACK_IMPORTED_MODULE_4__["TEXT_NO_RESULTS"];
this._textSearching = _globals__WEBPACK_IMPORTED_MODULE_4__["TEXT_SEARCHING"];
}
Object.defineProperty(CompleterComponent.prototype, "value", {
get: function () { return this.searchStr; },
set: function (v) {
if (v !== this.searchStr) {
this.searchStr = v;
}
// Propagate the change in any case
this._onChangeCallback(v);
},
enumerable: true,
configurable: true
});
;
CompleterComponent.prototype.ngAfterViewInit = function () {
if (this.autofocus) {
this._focus = true;
}
};
CompleterComponent.prototype.ngAfterViewChecked = function () {
if (this._focus) {
this.mdbInput.nativeElement.focus();
this._focus = false;
}
};
CompleterComponent.prototype.onTouched = function () {
this._onTouchedCallback();
};
CompleterComponent.prototype.writeValue = function (value) {
this.searchStr = value;
};
CompleterComponent.prototype.registerOnChange = function (fn) {
this._onChangeCallback = fn;
};
CompleterComponent.prototype.registerOnTouched = function (fn) {
this._onTouchedCallback = fn;
};
Object.defineProperty(CompleterComponent.prototype, "datasource", {
set: function (source) {
if (source) {
if (source instanceof Array) {
this.dataService = this.completerService.local(source);
}
else if (typeof (source) === 'string') {
this.dataService = this.completerService.remote(source);
}
else {
this.dataService = source;
}
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(CompleterComponent.prototype, "textNoResults", {
set: function (text) {
if (this._textNoResults !== text) {
this._textNoResults = text;
this.displayNoResults = this._textNoResults && this._textNoResults !== 'false';
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(CompleterComponent.prototype, "textSearching", {
set: function (text) {
if (this._textSearching !== text) {
this._textSearching = text;
this.displaySearching = this._textSearching && this._textSearching !== 'false';
}
},
enumerable: true,
configurable: true
});
CompleterComponent.prototype.ngOnInit = function () {
var _this = this;
this.completer.selected.subscribe(function (item) {
_this.selected.emit(item);
});
this.completer.highlighted.subscribe(function (item) {
_this.highlighted.emit(item);
});
this.completer.opened.subscribe(function (isOpen) {
_this._open = isOpen;
_this.opened.emit(isOpen);
});
if (this.initialValue) {
this.searchStr = this.initialValue; //
this.onFocus(); // fix label
} // <- end workaround
};
CompleterComponent.prototype.onBlur = function () {
this.blur.emit();
this.onTouched();
if (this.searchStr === undefined || this.searchStr === '') {
this.focused = false;
}
};
CompleterComponent.prototype.onFocus = function () {
this.focusEvent.emit();
this.onTouched();
this.focused = true;
};
CompleterComponent.prototype.onKeyup = function (event) {
this.keyup.emit(event);
};
CompleterComponent.prototype.onKeydown = function (event) {
this.keydown.emit(event);
};
CompleterComponent.prototype.onChange = function (value) {
this.value = value;
};
CompleterComponent.prototype.open = function () {
this.completer.open();
};
CompleterComponent.prototype.close = function () {
this.completer.clear();
};
CompleterComponent.prototype.focus = function () {
if (this.mdbInput) {
this.mdbInput.nativeElement.focus();
}
else {
this._focus = true;
}
};
CompleterComponent.prototype.isOpen = function () {
return this._open;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "dataService", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "inputName", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "inputId", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "pause", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "minSearchLength", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "maxChars", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "overrideSuggested", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "clearSelected", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "clearUnselected", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "fillHighlighted", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "placeholder", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], CompleterComponent.prototype, "matchClass", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number)
], CompleterComponent.prototype, "fieldTabindex", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "autoMatch", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "disableInput", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], CompleterComponent.prototype, "inputClass", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "autofocus", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "openOnFocus", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "initialValue", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "autoHighlight", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], CompleterComponent.prototype, "label", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "selected", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "highlighted", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "blur", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "focusEvent", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], CompleterComponent.prototype, "opened", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], CompleterComponent.prototype, "keyup", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], CompleterComponent.prototype, "keydown", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(_directives_completer_directive__WEBPACK_IMPORTED_MODULE_2__["MdbCompleterDirective"]),
__metadata("design:type", _directives_completer_directive__WEBPACK_IMPORTED_MODULE_2__["MdbCompleterDirective"])
], CompleterComponent.prototype, "completer", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('mdbInput'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], CompleterComponent.prototype, "mdbInput", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Object])
], CompleterComponent.prototype, "datasource", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], CompleterComponent.prototype, "textNoResults", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], CompleterComponent.prototype, "textSearching", null);
CompleterComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-completer',
template: __webpack_require__(/*! ./completer.component.html */ "./src/app/typescripts/pro/autocomplete/components/completer.component.html"),
providers: [COMPLETER_CONTROL_VALUE_ACCESSOR]
}),
__metadata("design:paramtypes", [_services_completer_service__WEBPACK_IMPORTED_MODULE_3__["CompleterService"]])
], CompleterComponent);
return CompleterComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/directives/completer.directive.ts":
/*!********************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/directives/completer.directive.ts ***!
\********************************************************************************/
/*! exports provided: MdbCompleterDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdbCompleterDirective", function() { return MdbCompleterDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var MdbCompleterDirective = /** @class */ (function () {
function MdbCompleterDirective() {
this.selected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.highlighted = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.opened = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this._hasHighlighted = false;
this._hasSelected = false;
this._cancelBlur = false;
this._isOpen = false;
this.setToNullValue = null;
}
MdbCompleterDirective.prototype.registerList = function (list) {
this.list = list;
};
MdbCompleterDirective.prototype.registerDropdown = function (dropdown) {
this.dropdown = dropdown;
};
MdbCompleterDirective.prototype.onHighlighted = function (item) {
this.highlighted.emit(item);
this._hasHighlighted = !!item;
};
MdbCompleterDirective.prototype.onSelected = function (item, clearList) {
if (clearList === void 0) { clearList = true; }
this.selected.emit(item);
if (item) {
this._hasSelected = true;
}
if (clearList) {
this.clear();
}
};
MdbCompleterDirective.prototype.search = function (term) {
if (this._hasSelected) {
// this.selected.emit(null);
this.selected.emit(this.setToNullValue);
this._hasSelected = false;
}
if (this.list) {
this.list.search(term);
}
};
MdbCompleterDirective.prototype.clear = function () {
if (this.dropdown) {
this.dropdown.clear();
}
if (this.list) {
this.list.clear();
}
this._hasHighlighted = false;
this.isOpen = false;
};
MdbCompleterDirective.prototype.selectCurrent = function () {
if (this.dropdown) {
this.dropdown.selectCurrent();
}
};
MdbCompleterDirective.prototype.nextRow = function () {
if (this.dropdown) {
this.dropdown.nextRow();
}
};
MdbCompleterDirective.prototype.prevRow = function () {
if (this.dropdown) {
this.dropdown.prevRow();
}
};
MdbCompleterDirective.prototype.hasHighlighted = function () {
return this._hasHighlighted;
};
MdbCompleterDirective.prototype.cancelBlur = function (cancel) {
this._cancelBlur = cancel;
};
MdbCompleterDirective.prototype.isCancelBlur = function () {
return this._cancelBlur;
};
MdbCompleterDirective.prototype.open = function () {
if (!this._isOpen) {
this.isOpen = true;
this.list.open();
}
};
Object.defineProperty(MdbCompleterDirective.prototype, "isOpen", {
get: function () {
return this._isOpen;
},
set: function (open) {
this._isOpen = open;
this.opened.emit(this._isOpen);
if (this.list) {
this.list.isOpen(open);
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(MdbCompleterDirective.prototype, "autoHighlightIndex", {
get: function () {
return this._autoHighlightIndex;
},
set: function (index) {
this._autoHighlightIndex = index;
},
enumerable: true,
configurable: true
});
Object.defineProperty(MdbCompleterDirective.prototype, "hasSelected", {
get: function () {
return this._hasSelected;
},
enumerable: true,
configurable: true
});
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], MdbCompleterDirective.prototype, "selected", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], MdbCompleterDirective.prototype, "highlighted", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], MdbCompleterDirective.prototype, "opened", void 0);
MdbCompleterDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbCompleter]',
})
], MdbCompleterDirective);
return MdbCompleterDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/directives/dropdown.directive.ts":
/*!*******************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/directives/dropdown.directive.ts ***!
\*******************************************************************************/
/*! exports provided: CtrRowItem, MdbDropdownDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CtrRowItem", function() { return CtrRowItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdbDropdownDirective", function() { return MdbDropdownDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _completer_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./completer.directive */ "./src/app/typescripts/pro/autocomplete/directives/completer.directive.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var CtrRowItem = /** @class */ (function () {
function CtrRowItem(row, index) {
this.row = row;
this.index = index;
}
return CtrRowItem;
}());
var MdbDropdownDirective = /** @class */ (function () {
function MdbDropdownDirective(completer, el) {
this.completer = completer;
this.el = el;
this.setToNullValue = null;
this.rows = [];
this.completer.registerDropdown(this);
}
MdbDropdownDirective.prototype.ngOnInit = function () {
var css = getComputedStyle(this.el.nativeElement);
this.isScrollOn = css.maxHeight && css.overflowY === 'auto';
};
MdbDropdownDirective.prototype.ngOnDestroy = function () {
// this.completer.registerDropdown(null);
this.completer.registerDropdown(this.setToNullValue);
};
MdbDropdownDirective.prototype.ngAfterViewInit = function () {
var _this = this;
var autoHighlightIndex = this.completer.autoHighlightIndex;
if (autoHighlightIndex) {
setTimeout(function () {
_this.highlightRow(autoHighlightIndex);
}, 0);
}
};
MdbDropdownDirective.prototype.onMouseDown = function () {
var _this = this;
// Support for canceling blur on IE (issue #158)
this.completer.cancelBlur(true);
setTimeout(function () {
_this.completer.cancelBlur(false);
}, 0);
};
MdbDropdownDirective.prototype.registerRow = function (row) {
this.rows.push(row);
};
MdbDropdownDirective.prototype.highlightRow = function (index) {
var highlighted = this.rows.find(function (row) { return row.index === index; });
if (index < 0) {
if (this.currHighlighted) {
this.currHighlighted.row.setHighlighted(false);
}
this.currHighlighted = undefined;
this.completer.onHighlighted(this.setToNullValue);
return;
}
if (!highlighted) {
return;
}
if (this.currHighlighted) {
this.currHighlighted.row.setHighlighted(false);
}
this.currHighlighted = highlighted;
this.currHighlighted.row.setHighlighted(true);
this.completer.onHighlighted(this.currHighlighted.row.getDataItem());
if (this.isScrollOn && this.currHighlighted) {
var rowTop = this.dropdownRowTop();
if (rowTop < 0) {
this.dropdownScrollTopTo(rowTop - 1);
}
else {
var row = this.currHighlighted.row.getNativeElement();
if (this.dropdownHeight() < row.getBoundingClientRect().bottom) {
this.dropdownScrollTopTo(this.dropdownRowOffsetHeight(row));
if (this.el.nativeElement.getBoundingClientRect().bottom - this.dropdownRowOffsetHeight(row)
< row.getBoundingClientRect().top) {
this.dropdownScrollTopTo(row.getBoundingClientRect().top - (this.el.nativeElement.getBoundingClientRect().top
// + parseInt(getComputedStyle(this.el.nativeElement).paddingTop, 10)));
+ parseInt(getComputedStyle(this.el.nativeElement).paddingTop, 10)));
}
}
}
}
};
MdbDropdownDirective.prototype.clear = function () {
this.rows = [];
};
MdbDropdownDirective.prototype.onSelected = function (item) {
this.completer.onSelected(item);
};
MdbDropdownDirective.prototype.selectCurrent = function () {
if (this.currHighlighted) {
this.onSelected(this.currHighlighted.row.getDataItem());
}
else if (this.rows.length > 0) {
this.onSelected(this.rows[0].row.getDataItem());
}
};
MdbDropdownDirective.prototype.nextRow = function () {
var nextRowIndex = 0;
if (this.currHighlighted) {
nextRowIndex = this.currHighlighted.index + 1;
}
this.highlightRow(nextRowIndex);
};
MdbDropdownDirective.prototype.prevRow = function () {
var nextRowIndex = -1;
if (this.currHighlighted) {
nextRowIndex = this.currHighlighted.index - 1;
}
this.highlightRow(nextRowIndex);
};
MdbDropdownDirective.prototype.dropdownScrollTopTo = function (offset) {
this.el.nativeElement.scrollTop = this.el.nativeElement.scrollTop + offset;
};
MdbDropdownDirective.prototype.dropdownRowTop = function () {
return this.currHighlighted.row.getNativeElement().getBoundingClientRect().top -
(this.el.nativeElement.getBoundingClientRect().top +
// parseInt(getComputedStyle(this.el.nativeElement).paddingTop, 10));
parseInt(getComputedStyle(this.el.nativeElement).paddingTop, 10));
};
MdbDropdownDirective.prototype.dropdownHeight = function () {
return this.el.nativeElement.getBoundingClientRect().top +
// parseInt(getComputedStyle(this.el.nativeElement).maxHeight, 10);
parseInt(getComputedStyle(this.el.nativeElement).maxHeight, 10);
};
MdbDropdownDirective.prototype.dropdownRowOffsetHeight = function (row) {
var css = getComputedStyle(row);
return row.offsetHeight +
// parseInt(css.marginTop, 10) + parseInt(css.marginBottom, 10);
parseInt(css.marginTop, 10) + parseInt(css.marginBottom, 10);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('mousedown', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], MdbDropdownDirective.prototype, "onMouseDown", null);
MdbDropdownDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbDropdown]',
}),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"])()),
__metadata("design:paramtypes", [_completer_directive__WEBPACK_IMPORTED_MODULE_1__["MdbCompleterDirective"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], MdbDropdownDirective);
return MdbDropdownDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/directives/input.directive.ts":
/*!****************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/directives/input.directive.ts ***!
\****************************************************************************/
/*! exports provided: MdbInputDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdbInputDirective", function() { return MdbInputDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _completer_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./completer.directive */ "./src/app/typescripts/pro/autocomplete/directives/completer.directive.ts");
/* harmony import */ var _globals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../globals */ "./src/app/typescripts/pro/autocomplete/globals.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
// keyboard events
var KEY_DW = 40;
var KEY_RT = 39;
var KEY_UP = 38;
var KEY_LF = 37;
var KEY_ES = 27;
var KEY_EN = 13;
var KEY_TAB = 9;
var MdbInputDirective = /** @class */ (function () {
// constructor( @Host() private completer: MdbCompleterDirective, private ngModel: NgModel, private el: ElementRef) {
function MdbInputDirective(completer, tempngModel, el) {
var _this = this;
this.completer = completer;
this.tempngModel = tempngModel;
this.el = el;
this.clearSelected = false;
this.clearUnselected = false;
this.overrideSuggested = false;
this.fillHighlighted = true;
this.openOnFocus = false;
this.ngModelChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this._searchStr = '';
this._displayStr = '';
// private blurTimer: Subscription = null;
this.blurTimer = null;
this.ngModel = this.tempngModel;
this.completer.selected.subscribe(function (item) {
if (!item) {
return;
}
if (_this.clearSelected) {
_this.searchStr = '';
}
else {
_this.searchStr = item.title;
}
_this.ngModelChange.emit(_this.searchStr);
});
this.completer.highlighted.subscribe(function (item) {
if (_this.fillHighlighted) {
if (item) {
_this._displayStr = item.title;
_this.ngModelChange.emit(item.title);
}
else {
_this._displayStr = _this.searchStr;
_this.ngModelChange.emit(_this.searchStr);
}
}
});
// this.ngModel.valueChanges.subscribe(value => {
this.ngModel.valueChanges.subscribe(function (value) {
if (!Object(_globals__WEBPACK_IMPORTED_MODULE_4__["isNil"])(value) && _this._displayStr !== value) {
if (_this.searchStr !== value) {
_this.completer.search(value);
}
_this.searchStr = value;
}
});
}
MdbInputDirective.prototype.keyupHandler = function (event) {
if (event.keyCode === KEY_LF || event.keyCode === KEY_RT || event.keyCode === KEY_TAB) {
// do nothing
return;
}
if (event.keyCode === KEY_UP || event.keyCode === KEY_EN) {
event.preventDefault();
}
else if (event.keyCode === KEY_DW) {
event.preventDefault();
this.completer.search(this.searchStr);
}
else if (event.keyCode === KEY_ES) {
this.restoreSearchValue();
this.completer.clear();
}
else {
if (this.searchStr) {
this.completer.open();
}
}
};
MdbInputDirective.prototype.keydownHandler = function (event) {
if (event.keyCode === KEY_EN) {
if (this.completer.hasHighlighted()) {
event.preventDefault();
}
this.handleSelection();
}
else if (event.keyCode === KEY_DW) {
event.preventDefault();
this.completer.open();
this.completer.nextRow();
}
else if (event.keyCode === KEY_UP) {
event.preventDefault();
this.completer.prevRow();
}
else if (event.keyCode === KEY_TAB) {
this.handleSelection();
}
else if (event.keyCode === KEY_ES) {
// This is very specific to IE10/11 #272
// without this, IE clears the input text
event.preventDefault();
}
};
MdbInputDirective.prototype.onBlur = function () {
var _this = this;
// Check if we need to cancel Blur for IE
if (this.completer.isCancelBlur()) {
setTimeout(function () {
// get the focus back
_this.el.nativeElement.focus();
}, 0);
return;
}
this.blurTimer = rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"].timer(200).subscribe(function () {
_this.blurTimer.unsubscribe();
_this.blurTimer = null;
if (_this.overrideSuggested) {
_this.completer.onSelected({ title: _this.searchStr, originalObject: null });
}
else {
if (_this.clearUnselected && !_this.completer.hasSelected) {
_this.searchStr = '';
_this.el.nativeElement.value = '';
}
else {
_this.restoreSearchValue();
}
}
_this.completer.clear();
});
};
MdbInputDirective.prototype.onfocus = function () {
if (this.blurTimer) {
this.blurTimer.unsubscribe();
this.blurTimer = null;
}
if (this.openOnFocus) {
this.completer.open();
}
};
Object.defineProperty(MdbInputDirective.prototype, "searchStr", {
get: function () {
return this._searchStr;
},
set: function (term) {
this._searchStr = term;
this._displayStr = term;
},
enumerable: true,
configurable: true
});
MdbInputDirective.prototype.handleSelection = function () {
if (this.completer.hasHighlighted()) {
this._searchStr = '';
this.completer.selectCurrent();
}
else if (this.overrideSuggested) {
this.completer.onSelected({ title: this.searchStr, originalObject: null });
}
else {
this.completer.clear();
}
};
MdbInputDirective.prototype.restoreSearchValue = function () {
if (this.fillHighlighted) {
if (this._displayStr !== this.searchStr) {
this._displayStr = this.searchStr;
this.ngModelChange.emit(this.searchStr);
}
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('clearSelected'),
__metadata("design:type", Object)
], MdbInputDirective.prototype, "clearSelected", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('clearUnselected'),
__metadata("design:type", Object)
], MdbInputDirective.prototype, "clearUnselected", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('overrideSuggested'),
__metadata("design:type", Object)
], MdbInputDirective.prototype, "overrideSuggested", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('fillHighlighted'),
__metadata("design:type", Object)
], MdbInputDirective.prototype, "fillHighlighted", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('openOnFocus'),
__metadata("design:type", Object)
], MdbInputDirective.prototype, "openOnFocus", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MdbInputDirective.prototype, "ngModelChange", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('keyup', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", Object)
], MdbInputDirective.prototype, "keyupHandler", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('keydown', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], MdbInputDirective.prototype, "keydownHandler", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('blur', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", Object)
], MdbInputDirective.prototype, "onBlur", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('focus', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], MdbInputDirective.prototype, "onfocus", null);
MdbInputDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbInput]',
}),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"])()),
__metadata("design:paramtypes", [_completer_directive__WEBPACK_IMPORTED_MODULE_3__["MdbCompleterDirective"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NgModel"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], MdbInputDirective);
return MdbInputDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/directives/list-context.directive.ts":
/*!***********************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/directives/list-context.directive.ts ***!
\***********************************************************************************/
/*! exports provided: CtrListContext, MdbListDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CtrListContext", function() { return CtrListContext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdbListDirective", function() { return MdbListDirective; });
/* harmony import */ var rxjs_add_observable_timer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs/add/observable/timer */ "./node_modules/rxjs-compat/_esm5/add/observable/timer.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _completer_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./completer.directive */ "./src/app/typescripts/pro/autocomplete/directives/completer.directive.ts");
/* harmony import */ var _globals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../globals */ "./src/app/typescripts/pro/autocomplete/globals.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var CtrListContext = /** @class */ (function () {
function CtrListContext(results, searching, searchInitialized, isOpen) {
this.results = results;
this.searching = searching;
this.searchInitialized = searchInitialized;
this.isOpen = isOpen;
}
return CtrListContext;
}());
var MdbListDirective = /** @class */ (function () {
function MdbListDirective(
// @Host() private completer: MdbCompleterDirective,
tmpCompleter, templateRef, viewContainer, cd) {
this.tmpCompleter = tmpCompleter;
this.templateRef = templateRef;
this.viewContainer = viewContainer;
this.cd = cd;
this.mdbListMinSearchLength = _globals__WEBPACK_IMPORTED_MODULE_4__["MIN_SEARCH_LENGTH"];
this.mdbListPause = _globals__WEBPACK_IMPORTED_MODULE_4__["PAUSE"];
this.mdbListAutoMatch = false;
this.mdbListAutoHighlight = false;
// private results: CompleterItem[] = [];
this.setToNullValue = null;
// private term: string = null;
this.term = null;
// private searching = false;
// private searchTimer: Subscription = null;
this.searchTimer = null;
// private clearTimer: Subscription = null;
this.clearTimer = null;
this.ctx = new CtrListContext([], false, false, false);
this._initialValue = null;
this.completer = this.tmpCompleter;
}
MdbListDirective.prototype.ngOnInit = function () {
this.completer.registerList(this);
this.viewContainer.createEmbeddedView(this.templateRef, new CtrListContext([], false, false, false));
};
Object.defineProperty(MdbListDirective.prototype, "dataService", {
set: function (newService) {
var _this = this;
this._dataService = newService;
if (this._dataService) {
this._dataService
.catch(function (err) { return _this.handleError(err); })
.subscribe(function (results) {
_this.ctx.searchInitialized = true;
_this.ctx.searching = false;
_this.ctx.results = results;
if (_this.mdbListAutoMatch && results.length === 1 && results[0].title && !Object(_globals__WEBPACK_IMPORTED_MODULE_4__["isNil"])(_this.term) &&
results[0].title.toLocaleLowerCase() === _this.term.toLocaleLowerCase()) {
// Do automatch
_this.completer.onSelected(results[0]);
}
if (_this._initialValue) {
_this.initialValue = _this._initialValue;
// this._initialValue = null;
_this._initialValue = _this.setToNullValue;
}
if (_this.mdbListAutoHighlight) {
_this.completer.autoHighlightIndex = _this.getBestMatchIndex();
}
_this.refreshTemplate();
});
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(MdbListDirective.prototype, "initialValue", {
set: function (value) {
var _this = this;
if (this._dataService && typeof this._dataService.convertToItem === 'function') {
setTimeout(function () {
var initialItem = _this._dataService.convertToItem(value);
if (initialItem) {
_this.completer.onSelected(initialItem, false);
}
});
}
else if (!this._dataService) {
this._initialValue = value;
}
},
enumerable: true,
configurable: true
});
MdbListDirective.prototype.search = function (term) {
var _this = this;
if (!Object(_globals__WEBPACK_IMPORTED_MODULE_4__["isNil"])(term) && term.length >= this.mdbListMinSearchLength && this.term !== term) {
if (this.searchTimer) {
this.searchTimer.unsubscribe();
this.searchTimer = null;
}
if (!this.ctx.searching) {
this.ctx.results = [];
this.ctx.searching = true;
this.ctx.searchInitialized = true;
this.refreshTemplate();
}
if (this.clearTimer) {
this.clearTimer.unsubscribe();
}
this.searchTimer = rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"].timer(this.mdbListPause).subscribe(function () {
_this.searchTimerComplete(term);
});
}
else if (!Object(_globals__WEBPACK_IMPORTED_MODULE_4__["isNil"])(term) && term.length < this.mdbListMinSearchLength) {
this.clear();
}
};
MdbListDirective.prototype.clear = function () {
var _this = this;
if (this.searchTimer) {
this.searchTimer.unsubscribe();
}
this.clearTimer = rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"].timer(_globals__WEBPACK_IMPORTED_MODULE_4__["CLEAR_TIMEOUT"]).subscribe(function () {
_this._clear();
});
};
MdbListDirective.prototype.open = function () {
if (!this.ctx.searchInitialized) {
this.search('');
}
this.refreshTemplate();
};
MdbListDirective.prototype.isOpen = function (open) {
this.ctx.isOpen = open;
};
MdbListDirective.prototype._clear = function () {
if (this.searchTimer) {
this.searchTimer.unsubscribe();
this.searchTimer = null;
}
if (this.dataService) {
this.dataService.cancel();
}
this.viewContainer.clear();
};
MdbListDirective.prototype.searchTimerComplete = function (term) {
// Begin the search
if (Object(_globals__WEBPACK_IMPORTED_MODULE_4__["isNil"])(term) || term.length < this.mdbListMinSearchLength) {
this.ctx.searching = false;
return;
}
this.term = term;
this._dataService.search(term);
};
MdbListDirective.prototype.handleError = function (error) {
this.ctx.searching = false;
var errMsg = 'search error';
if (error) {
errMsg = (error.message) ? error.message :
error.status ? error.status + " - " + error.statusText : 'Server error';
}
if (console && console.error) {
console.error(errMsg); // log to console
}
this.refreshTemplate();
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"].throw(errMsg);
};
MdbListDirective.prototype.refreshTemplate = function () {
// Recreate the template
this.viewContainer.clear();
if (this.ctx.results && this.ctx.isOpen) {
this.viewContainer.createEmbeddedView(this.templateRef, this.ctx);
}
this.cd.markForCheck();
};
MdbListDirective.prototype.getBestMatchIndex = function () {
var _this = this;
if (!this.ctx.results) {
return null;
}
// First try to find the exact term
var bestMatch = this.ctx.results.findIndex(function (item) { return item.title.toLowerCase() === _this.term.toLocaleLowerCase(); });
// If not try to find the first item that starts with the term
if (bestMatch < 0) {
bestMatch = this.ctx.results.findIndex(function (item) { return item.title.toLowerCase().startsWith(_this.term.toLocaleLowerCase()); });
}
// If not try to find the first item that includes the term
if (bestMatch < 0) {
bestMatch = this.ctx.results.findIndex(function (item) { return item.title.toLowerCase().includes(_this.term.toLocaleLowerCase()); });
}
return bestMatch < 0 ? null : bestMatch;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
__metadata("design:type", Object)
], MdbListDirective.prototype, "mdbListMinSearchLength", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
__metadata("design:type", Object)
], MdbListDirective.prototype, "mdbListPause", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
__metadata("design:type", Object)
], MdbListDirective.prototype, "mdbListAutoMatch", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
__metadata("design:type", Object)
], MdbListDirective.prototype, "mdbListAutoHighlight", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('mdbList'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Object])
], MdbListDirective.prototype, "dataService", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('mdbListInitialValue'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Object])
], MdbListDirective.prototype, "initialValue", null);
MdbListDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"])({
selector: '[mdbList]',
}),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Host"])()),
__metadata("design:paramtypes", [_completer_directive__WEBPACK_IMPORTED_MODULE_3__["MdbCompleterDirective"],
_angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"],
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"],
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]])
], MdbListDirective);
return MdbListDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/directives/row.directive.ts":
/*!**************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/directives/row.directive.ts ***!
\**************************************************************************/
/*! exports provided: MdbRowDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdbRowDirective", function() { return MdbRowDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _dropdown_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dropdown.directive */ "./src/app/typescripts/pro/autocomplete/directives/dropdown.directive.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var MdbRowDirective = /** @class */ (function () {
function MdbRowDirective(el, renderer, dropdown) {
this.el = el;
this.renderer = renderer;
this.dropdown = dropdown;
this.selected = false;
}
MdbRowDirective.prototype.ngOnInit = function () {
this.dropdown.registerRow(new _dropdown_directive__WEBPACK_IMPORTED_MODULE_1__["CtrRowItem"](this, this._rowIndex));
};
Object.defineProperty(MdbRowDirective.prototype, "mdbRow", {
set: function (index) {
this._rowIndex = index;
},
enumerable: true,
configurable: true
});
Object.defineProperty(MdbRowDirective.prototype, "dataItem", {
set: function (item) {
this._item = item;
},
enumerable: true,
configurable: true
});
MdbRowDirective.prototype.onClick = function () {
this.dropdown.onSelected(this._item);
};
MdbRowDirective.prototype.onMouseEnter = function () {
this.dropdown.highlightRow(this._rowIndex);
};
MdbRowDirective.prototype.setHighlighted = function (selected) {
this.selected = selected;
this.renderer.setElementClass(this.el.nativeElement, 'completer-selected-row', this.selected);
};
MdbRowDirective.prototype.getNativeElement = function () {
return this.el.nativeElement;
};
MdbRowDirective.prototype.getDataItem = function () {
return this._item;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number),
__metadata("design:paramtypes", [Number])
], MdbRowDirective.prototype, "mdbRow", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Object])
], MdbRowDirective.prototype, "dataItem", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], MdbRowDirective.prototype, "onClick", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('mouseenter', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], MdbRowDirective.prototype, "onMouseEnter", null);
MdbRowDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbRow]',
}),
__param(2, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"])()),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"], _dropdown_directive__WEBPACK_IMPORTED_MODULE_1__["MdbDropdownDirective"]])
], MdbRowDirective);
return MdbRowDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/globals.ts":
/*!*********************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/globals.ts ***!
\*********************************************************/
/*! exports provided: MAX_CHARS, MIN_SEARCH_LENGTH, PAUSE, TEXT_SEARCHING, TEXT_NO_RESULTS, CLEAR_TIMEOUT, isNil */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAX_CHARS", function() { return MAX_CHARS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MIN_SEARCH_LENGTH", function() { return MIN_SEARCH_LENGTH; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PAUSE", function() { return PAUSE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TEXT_SEARCHING", function() { return TEXT_SEARCHING; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TEXT_NO_RESULTS", function() { return TEXT_NO_RESULTS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_TIMEOUT", function() { return CLEAR_TIMEOUT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNil", function() { return isNil; });
var MAX_CHARS = 524288; // the default max length per the html maxlength attribute
var MIN_SEARCH_LENGTH = 3;
var PAUSE = 100;
var TEXT_SEARCHING = 'Searching...';
var TEXT_NO_RESULTS = 'No results found';
var CLEAR_TIMEOUT = 50;
function isNil(value) {
return typeof value === 'undefined' || value === null;
}
;
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/index.ts":
/*!*******************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/index.ts ***!
\*******************************************************/
/*! exports provided: Ng2CompleterModule, CompleterComponent, CompleterListItemComponent, CompleterService, localDataFactory, LocalDataFactoryProvider, remoteDataFactory, RemoteDataFactoryProvider, LocalData, RemoteData, CompleterBaseData, MdbCompleterDirective, MdbDropdownDirective, MdbInputDirective, MdbListDirective, MdbRowDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _completerModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./completerModule */ "./src/app/typescripts/pro/autocomplete/completerModule.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ng2CompleterModule", function() { return _completerModule__WEBPACK_IMPORTED_MODULE_0__["Ng2CompleterModule"]; });
/* harmony import */ var _components_completer_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/completer.component */ "./src/app/typescripts/pro/autocomplete/components/completer.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompleterComponent", function() { return _components_completer_component__WEBPACK_IMPORTED_MODULE_1__["CompleterComponent"]; });
/* harmony import */ var _components_completer_list_item_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/completer-list-item.component */ "./src/app/typescripts/pro/autocomplete/components/completer-list-item.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompleterListItemComponent", function() { return _components_completer_list_item_component__WEBPACK_IMPORTED_MODULE_2__["CompleterListItemComponent"]; });
/* harmony import */ var _services_completer_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./services/completer.service */ "./src/app/typescripts/pro/autocomplete/services/completer.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompleterService", function() { return _services_completer_service__WEBPACK_IMPORTED_MODULE_3__["CompleterService"]; });
/* harmony import */ var _services_data_factory_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./services/data-factory.service */ "./src/app/typescripts/pro/autocomplete/services/data-factory.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "localDataFactory", function() { return _services_data_factory_service__WEBPACK_IMPORTED_MODULE_4__["localDataFactory"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalDataFactoryProvider", function() { return _services_data_factory_service__WEBPACK_IMPORTED_MODULE_4__["LocalDataFactoryProvider"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "remoteDataFactory", function() { return _services_data_factory_service__WEBPACK_IMPORTED_MODULE_4__["remoteDataFactory"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RemoteDataFactoryProvider", function() { return _services_data_factory_service__WEBPACK_IMPORTED_MODULE_4__["RemoteDataFactoryProvider"]; });
/* harmony import */ var _services_local_data_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./services/local-data.service */ "./src/app/typescripts/pro/autocomplete/services/local-data.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalData", function() { return _services_local_data_service__WEBPACK_IMPORTED_MODULE_5__["LocalData"]; });
/* harmony import */ var _services_remote_data_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./services/remote-data.service */ "./src/app/typescripts/pro/autocomplete/services/remote-data.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RemoteData", function() { return _services_remote_data_service__WEBPACK_IMPORTED_MODULE_6__["RemoteData"]; });
/* harmony import */ var _services_base_data_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./services/base-data.service */ "./src/app/typescripts/pro/autocomplete/services/base-data.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompleterBaseData", function() { return _services_base_data_service__WEBPACK_IMPORTED_MODULE_7__["CompleterBaseData"]; });
/* harmony import */ var _directives_completer_directive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./directives/completer.directive */ "./src/app/typescripts/pro/autocomplete/directives/completer.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbCompleterDirective", function() { return _directives_completer_directive__WEBPACK_IMPORTED_MODULE_8__["MdbCompleterDirective"]; });
/* harmony import */ var _directives_dropdown_directive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./directives/dropdown.directive */ "./src/app/typescripts/pro/autocomplete/directives/dropdown.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbDropdownDirective", function() { return _directives_dropdown_directive__WEBPACK_IMPORTED_MODULE_9__["MdbDropdownDirective"]; });
/* harmony import */ var _directives_input_directive__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./directives/input.directive */ "./src/app/typescripts/pro/autocomplete/directives/input.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbInputDirective", function() { return _directives_input_directive__WEBPACK_IMPORTED_MODULE_10__["MdbInputDirective"]; });
/* harmony import */ var _directives_list_context_directive__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./directives/list-context.directive */ "./src/app/typescripts/pro/autocomplete/directives/list-context.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbListDirective", function() { return _directives_list_context_directive__WEBPACK_IMPORTED_MODULE_11__["MdbListDirective"]; });
/* harmony import */ var _directives_row_directive__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./directives/row.directive */ "./src/app/typescripts/pro/autocomplete/directives/row.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbRowDirective", function() { return _directives_row_directive__WEBPACK_IMPORTED_MODULE_12__["MdbRowDirective"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/services/base-data.service.ts":
/*!****************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/services/base-data.service.ts ***!
\****************************************************************************/
/*! exports provided: CompleterBaseData */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompleterBaseData", function() { return CompleterBaseData; });
/* harmony import */ var rxjs_Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs/Subject */ "./node_modules/rxjs-compat/_esm5/Subject.js");
/* harmony import */ var _globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../globals */ "./src/app/typescripts/pro/autocomplete/globals.ts");
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var CompleterBaseData = /** @class */ (function (_super) {
__extends(CompleterBaseData, _super);
function CompleterBaseData() {
return _super.call(this) || this;
}
CompleterBaseData.prototype.cancel = function () { };
CompleterBaseData.prototype.searchFields = function (searchFields) {
this._searchFields = searchFields;
return this;
};
CompleterBaseData.prototype.titleField = function (titleField) {
this._titleField = titleField;
return this;
};
CompleterBaseData.prototype.descriptionField = function (descriptionField) {
this._descriptionField = descriptionField;
return this;
};
CompleterBaseData.prototype.imageField = function (imageField) {
this._imageField = imageField;
return this;
};
CompleterBaseData.prototype.convertToItem = function (data) {
// let image: string = null;
var image = null;
var formattedText;
// let formattedDesc: string;
var formattedDesc;
if (this._titleField) {
formattedText = this.extractTitle(data);
}
else {
formattedText = data;
}
if (this._descriptionField) {
formattedDesc = this.extractValue(data, this._descriptionField);
}
if (this._imageField) {
image = this.extractValue(data, this._imageField);
}
if (Object(_globals__WEBPACK_IMPORTED_MODULE_1__["isNil"])(formattedText)) {
return null;
}
return {
title: formattedText,
description: formattedDesc,
image: image,
originalObject: data
};
};
CompleterBaseData.prototype.extractMatches = function (data, term) {
var _this = this;
var matches = [];
var searchFields = this._searchFields ? this._searchFields.split(',') : null;
if (this._searchFields !== null && this._searchFields !== undefined && term !== '') {
matches = data.filter(function (item) {
var values = searchFields ?
searchFields.map(function (searchField) { return _this.extractValue(item, searchField); }).filter(function (value) { return !!value; }) : [item];
return values.some(function (value) { return value.toString().toLowerCase().indexOf(term.toString().toLowerCase()) >= 0; });
});
}
else {
matches = data;
}
return matches;
};
CompleterBaseData.prototype.extractTitle = function (item) {
var _this = this;
// split title fields and run extractValue for each and join with ' '
return this._titleField.split(',')
.map(function (field) {
return _this.extractValue(item, field);
})
.reduce(function (acc, titlePart) { return acc ? acc + " " + titlePart : titlePart; });
};
CompleterBaseData.prototype.extractValue = function (obj, key) {
var keys;
var result;
if (key) {
keys = key.split('.');
result = obj;
for (var i = 0; i < keys.length; i++) {
if (result) {
result = result[keys[i]];
}
}
}
else {
result = obj;
}
return result;
};
CompleterBaseData.prototype.processResults = function (matches) {
var i;
var results = [];
if (matches && matches.length > 0) {
for (i = 0; i < matches.length; i++) {
var item = this.convertToItem(matches[i]);
if (item) {
results.push(item);
}
}
}
return results;
};
return CompleterBaseData;
}(rxjs_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]));
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/services/completer.service.ts":
/*!****************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/services/completer.service.ts ***!
\****************************************************************************/
/*! exports provided: CompleterService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompleterService", function() { return CompleterService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _local_data_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./local-data.service */ "./src/app/typescripts/pro/autocomplete/services/local-data.service.ts");
/* harmony import */ var _remote_data_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./remote-data.service */ "./src/app/typescripts/pro/autocomplete/services/remote-data.service.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var CompleterService = /** @class */ (function () {
function CompleterService(localDataFactory, // Using any instead of () => LocalData because on AoT errors
remoteDataFactory // Using any instead of () => LocalData because on AoT errors
) {
this.localDataFactory = localDataFactory;
this.remoteDataFactory = remoteDataFactory; // Using any instead of () => LocalData because on AoT errors
}
CompleterService.prototype.local = function (data, searchFields, titleField) {
if (searchFields === void 0) { searchFields = ''; }
if (titleField === void 0) { titleField = ''; }
var localData = this.localDataFactory();
return localData
.data(data)
.searchFields(searchFields)
.titleField(titleField);
};
CompleterService.prototype.remote = function (url, searchFields, titleField) {
if (searchFields === void 0) { searchFields = ''; }
if (titleField === void 0) { titleField = ''; }
var remoteData = this.remoteDataFactory();
return remoteData
.remoteUrl(url)
.searchFields(searchFields)
.titleField(titleField);
};
CompleterService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_local_data_service__WEBPACK_IMPORTED_MODULE_1__["LocalData"])),
__param(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_remote_data_service__WEBPACK_IMPORTED_MODULE_2__["RemoteData"])),
__metadata("design:paramtypes", [Object, Object])
], CompleterService);
return CompleterService;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/services/data-factory.service.ts":
/*!*******************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/services/data-factory.service.ts ***!
\*******************************************************************************/
/*! exports provided: localDataFactory, remoteDataFactory, LocalDataFactoryProvider, RemoteDataFactoryProvider */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "localDataFactory", function() { return localDataFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "remoteDataFactory", function() { return remoteDataFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocalDataFactoryProvider", function() { return LocalDataFactoryProvider; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RemoteDataFactoryProvider", function() { return RemoteDataFactoryProvider; });
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _local_data_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./local-data.service */ "./src/app/typescripts/pro/autocomplete/services/local-data.service.ts");
/* harmony import */ var _remote_data_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./remote-data.service */ "./src/app/typescripts/pro/autocomplete/services/remote-data.service.ts");
function localDataFactory() {
return function () {
return new _local_data_service__WEBPACK_IMPORTED_MODULE_1__["LocalData"]();
};
}
function remoteDataFactory(http) {
return function () {
return new _remote_data_service__WEBPACK_IMPORTED_MODULE_2__["RemoteData"](http);
};
}
var LocalDataFactoryProvider = { provide: _local_data_service__WEBPACK_IMPORTED_MODULE_1__["LocalData"], useFactory: localDataFactory };
var RemoteDataFactoryProvider = { provide: _remote_data_service__WEBPACK_IMPORTED_MODULE_2__["RemoteData"], useFactory: remoteDataFactory, deps: [_angular_http__WEBPACK_IMPORTED_MODULE_0__["Http"]] };
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/services/local-data.service.ts":
/*!*****************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/services/local-data.service.ts ***!
\*****************************************************************************/
/*! exports provided: LocalData */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocalData", function() { return LocalData; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _base_data_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base-data.service */ "./src/app/typescripts/pro/autocomplete/services/base-data.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var LocalData = /** @class */ (function (_super) {
__extends(LocalData, _super);
function LocalData() {
return _super.call(this) || this;
}
LocalData.prototype.data = function (data) {
var _this = this;
if (data instanceof rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]) {
data.subscribe(function (res) {
_this._data = res;
if (_this.savedTerm) {
_this.search(_this.savedTerm);
}
});
}
else {
this._data = data;
}
return this;
};
LocalData.prototype.search = function (term) {
if (!this._data) {
this.savedTerm = term;
}
else {
this.savedTerm = null;
var matches = this.extractMatches(this._data, term);
this.next(this.processResults(matches));
}
};
// public convertToItem(data: any): CompleterItem {
LocalData.prototype.convertToItem = function (data) {
return _super.prototype.convertToItem.call(this, data);
};
LocalData = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
__metadata("design:paramtypes", [])
], LocalData);
return LocalData;
}(_base_data_service__WEBPACK_IMPORTED_MODULE_2__["CompleterBaseData"]));
/***/ }),
/***/ "./src/app/typescripts/pro/autocomplete/services/remote-data.service.ts":
/*!******************************************************************************!*\
!*** ./src/app/typescripts/pro/autocomplete/services/remote-data.service.ts ***!
\******************************************************************************/
/*! exports provided: RemoteData */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RemoteData", function() { return RemoteData; });
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var rxjs_add_operator_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/add/operator/map */ "./node_modules/rxjs-compat/_esm5/add/operator/map.js");
/* harmony import */ var rxjs_add_operator_catch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/add/operator/catch */ "./node_modules/rxjs-compat/_esm5/add/operator/catch.js");
/* harmony import */ var _base_data_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base-data.service */ "./src/app/typescripts/pro/autocomplete/services/base-data.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var RemoteData = /** @class */ (function (_super) {
__extends(RemoteData, _super);
function RemoteData(http) {
var _this = _super.call(this) || this;
_this.http = http;
_this.setToNullValue = null;
// private _urlFormater: (term: string) => string | any = null;
_this._urlFormater = _this.setToNullValue;
// private _dataField: string = null;
_this._dataField = null;
return _this;
}
RemoteData.prototype.remoteUrl = function (remoteUrl) {
this._remoteUrl = remoteUrl;
return this;
};
RemoteData.prototype.urlFormater = function (urlFormater) {
this._urlFormater = urlFormater;
};
RemoteData.prototype.dataField = function (dataField) {
this._dataField = dataField;
};
/**
* @deprecated Please use the requestOptions to pass headers with the search request
*/
RemoteData.prototype.headers = function (headers) {
this._headers = headers;
};
RemoteData.prototype.requestOptions = function (requestOptions) {
this._requestOptions = requestOptions;
};
RemoteData.prototype.search = function (term) {
var _this = this;
this.cancel();
// let params = {};
var url = '';
if (this._urlFormater) {
url = this._urlFormater(term);
}
else {
url = this._remoteUrl + encodeURIComponent(term);
}
/*
* If requestOptions are provided, they will override anything set in headers.
*
* If no requestOptions are provided, a new RequestOptions object will be instantiated,
* and either the provided headers or a new Headers() object will be sent.
*/
if (!this._requestOptions) {
this._requestOptions = new _angular_http__WEBPACK_IMPORTED_MODULE_0__["RequestOptions"]();
this._requestOptions.headers = this._headers || new _angular_http__WEBPACK_IMPORTED_MODULE_0__["Headers"]();
}
this.remoteSearch = this.http.get(url, this._requestOptions)
.map(function (res) { return res.json(); })
.map(function (data) {
var matches = _this.extractValue(data, _this._dataField);
return _this.extractMatches(matches, term);
})
.map(function (matches) {
var results = _this.processResults(matches);
_this.next(results);
return results;
})
.catch(function (err) {
_this.error(err);
// return null;
return _this.setToNullValue;
})
.subscribe();
};
RemoteData.prototype.cancel = function () {
if (this.remoteSearch) {
this.remoteSearch.unsubscribe();
}
};
// public convertToItem(data: any): CompleterItem {
RemoteData.prototype.convertToItem = function (data) {
return _super.prototype.convertToItem.call(this, data);
};
return RemoteData;
}(_base_data_service__WEBPACK_IMPORTED_MODULE_3__["CompleterBaseData"]));
/***/ }),
/***/ "./src/app/typescripts/pro/cards/card-reveal.component.html":
/*!******************************************************************!*\
!*** ./src/app/typescripts/pro/cards/card-reveal.component.html ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"card-overflow col-12\">\r\n <div class=\"card-front\">\r\n <ng-content select=\"card-front\" ></ng-content>\r\n </div>\r\n <div class=\"card-revealed\" *ngIf=\"show\" [@socialsState]=\"socials\" >\r\n <ng-content select=\"card-revealed\" ></ng-content>\r\n </div>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/typescripts/pro/cards/card-reveal.component.ts":
/*!****************************************************************!*\
!*** ./src/app/typescripts/pro/cards/card-reveal.component.ts ***!
\****************************************************************/
/*! exports provided: CardRevealComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardRevealComponent", function() { return CardRevealComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _animations_animations_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../animations/animations.component */ "./src/app/typescripts/pro/animations/animations.component.ts");
var __decorate = (undefined && undefined.__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 CardRevealComponent = /** @class */ (function () {
function CardRevealComponent() {
}
CardRevealComponent.prototype.toggle = function () {
this.show = !this.show;
this.socials = (this.socials === 'active') ? 'inactive' : 'active';
};
CardRevealComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-card-reveal',
template: __webpack_require__(/*! ./card-reveal.component.html */ "./src/app/typescripts/pro/cards/card-reveal.component.html"),
animations: [_animations_animations_component__WEBPACK_IMPORTED_MODULE_1__["socialsState"]]
})
], CardRevealComponent);
return CardRevealComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/cards/card-rotating.component.html":
/*!********************************************************************!*\
!*** ./src/app/typescripts/pro/cards/card-rotating.component.html ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"flip-container card-wrapper\" [ngClass]=\"{'rotate': rotate}\">\r\n <div class=\"flipper card-rotating effect__click tp-box\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/typescripts/pro/cards/card-rotating.component.ts":
/*!******************************************************************!*\
!*** ./src/app/typescripts/pro/cards/card-rotating.component.ts ***!
\******************************************************************/
/*! exports provided: CardRotatingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardRotatingComponent", function() { return CardRotatingComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 CardRotatingComponent = /** @class */ (function () {
function CardRotatingComponent() {
this.rotate = false;
}
CardRotatingComponent.prototype.toggle = function () {
this.rotate = !this.rotate;
};
CardRotatingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-card-rotating',
template: __webpack_require__(/*! ./card-rotating.component.html */ "./src/app/typescripts/pro/cards/card-rotating.component.html")
})
], CardRotatingComponent);
return CardRotatingComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/cards/cards.module.ts":
/*!*******************************************************!*\
!*** ./src/app/typescripts/pro/cards/cards.module.ts ***!
\*******************************************************/
/*! exports provided: CardsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardsModule", function() { return CardsModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _card_reveal_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./card-reveal.component */ "./src/app/typescripts/pro/cards/card-reveal.component.ts");
/* harmony import */ var _card_rotating_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./card-rotating.component */ "./src/app/typescripts/pro/cards/card-rotating.component.ts");
var __decorate = (undefined && undefined.__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 CardsModule = /** @class */ (function () {
function CardsModule() {
}
CardsModule_1 = CardsModule;
CardsModule.forRoot = function () {
return { ngModule: CardsModule_1, providers: [] };
};
CardsModule = CardsModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"]],
declarations: [_card_reveal_component__WEBPACK_IMPORTED_MODULE_2__["CardRevealComponent"], _card_rotating_component__WEBPACK_IMPORTED_MODULE_3__["CardRotatingComponent"]],
exports: [_card_reveal_component__WEBPACK_IMPORTED_MODULE_2__["CardRevealComponent"], _card_rotating_component__WEBPACK_IMPORTED_MODULE_3__["CardRotatingComponent"]]
})
], CardsModule);
return CardsModule;
var CardsModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/cards/index.ts":
/*!************************************************!*\
!*** ./src/app/typescripts/pro/cards/index.ts ***!
\************************************************/
/*! exports provided: CardsModule, CardRevealComponent, CardRotatingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _cards_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cards.module */ "./src/app/typescripts/pro/cards/cards.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardsModule", function() { return _cards_module__WEBPACK_IMPORTED_MODULE_0__["CardsModule"]; });
/* harmony import */ var _card_reveal_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./card-reveal.component */ "./src/app/typescripts/pro/cards/card-reveal.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardRevealComponent", function() { return _card_reveal_component__WEBPACK_IMPORTED_MODULE_1__["CardRevealComponent"]; });
/* harmony import */ var _card_rotating_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./card-rotating.component */ "./src/app/typescripts/pro/cards/card-rotating.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardRotatingComponent", function() { return _card_rotating_component__WEBPACK_IMPORTED_MODULE_2__["CardRotatingComponent"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/date-picker/datapicker.component.html":
/*!***********************************************************************!*\
!*** ./src/app/typescripts/pro/date-picker/datapicker.component.html ***!
\***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<!-- Line 27: Deleted (focus)=\"onFocusInput($event)\" for better use in Firefox. If other strange problems will occur, please paste it in line 27. -->\r\n<div class=\"mydp picker\" [ngClass]=\"{'picker--opened': showSelector}\" [ngStyle]=\"{'width': opts.width}\">\r\n <div class=\"md-form\">\r\n <label *ngIf=\"label.length > 0\" \r\n [ngClass]=\"{\r\n 'active': checkActive(),\r\n 'disabled': opts.componentDisabled\r\n }\">{{ label }}</label>\r\n <input \r\n type=\"text\" \r\n class=\"form-control mydp-date\" \r\n [attr.aria-label]=\"opts.ariaLabelInputField\" \r\n (click)=\"openBtnClicked()\" \r\n [attr.maxlength]=\"opts.dateFormat.length\" \r\n [ngClass]=\"{\r\n 'selectiondisabled': opts.componentDisabled,\r\n 'disabled': opts.componentDisabled\r\n }\"\r\n placeholder=\"{{ placeholder }}\" \r\n [ngModel]=\"selectionDayTxt\" \r\n (ngModelChange)=\"onUserDateInput($event)\" \r\n [value]=\"selectionDayTxt\" \r\n [ngStyle]=\"{\r\n 'height': opts.height, \r\n 'font-size': opts.selectionTxtFontSize\r\n }\"\r\n \r\n (blur)=\"onBlurInput($event)\" \r\n [disabled]=\"opts.componentDisabled\" \r\n autocomplete=\"off\">\r\n </div>\r\n<div class=\"selector picker__holder selectorarrow selectorarrowleft selectorarrowright\" #divFocus [ngClass]=\"{'alignselectorright': opts.alignSelectorRight}\" tabindex=\"0\">\r\n <div class=\"picker__frame picker__box\">\r\n <div class=\"picker__header\">\r\n <div class=\"picker__date-display\">\r\n <div class=\"picker__weekday-display\">\r\n {{ weekText(getWeekday(tmp)) }}\r\n </div>\r\n <div class=\"picker__month-display\">\r\n <div>{{ monthText(tmp.month) }}</div>\r\n </div>\r\n <div class=\"picker__day-display\">\r\n <div>{{ tmp.day }}</div>\r\n </div>\r\n <div class=\"picker__year-display\">\r\n <div>{{ tmp.year }}</div>\r\n </div>\r\n </div>\r\n <select class=\"picker__select--year\" [(ngModel)]=\"visibleMonth.year\" (ngModelChange)=\"onUserYearInput($event)\" role=\"menu\" aria-label=\"Year selector\">\r\n <option *ngFor=\"let year of years\" [value]=\"year\">{{ year }}</option>\r\n </select>\r\n <select class=\"picker__select--month\" [(ngModel)]=\"visibleMonth.monthTxt\" (ngModelChange)=\"onUserMonthInput($event)\" role=\"menu\" aria-label=\"Month selector\">\r\n <option *ngFor=\"let month of months\" [value]=\"month.short\">{{ month.label }}</option>\r\n </select>\r\n <button class=\"picker__nav--prev\" data-nav=\"-1\" type=\"button\" aria-controls=\"date-picker-example_table\" title=\"Previous month\" (click)=\"prevMonth()\" [disabled]=\"prevMonthDisabled\" [ngClass]=\"{'headerbtnenabled': !prevMonthDisabled, 'headerbtndisabled': prevMonthDisabled}\"></button>\r\n <button class=\"picker__nav--next\" data-nav=\"1\" type=\"button\" aria-controls=\"date-picker-example_table\" title=\"Next month\" (click)=\"nextMonth()\" [disabled]=\"nextMonthDisabled\" [ngClass]=\"{'headerbtnenabled': !nextMonthDisabled, 'headerbtndisabled': nextMonthDisabled}\"></button>\r\n </div>\r\n <table class=\"picker__table\">\r\n <thead><tr><th class=\"picker__weekday weekdaytitleweeknbr\" *ngIf=\"opts.showWeekNumbers&&opts.firstDayOfWeek==='mo'\">#</th><th class=\"picker__weekday\" scope=\"col\" *ngFor=\"let d of weekDays\">{{d}}</th></tr></thead>\r\n <tbody>\r\n <tr *ngFor=\"let w of dates\">\r\n <td class=\"picker__day daycellweeknbr\" *ngIf=\"opts.showWeekNumbers&&opts.firstDayOfWeek==='mo'\">{{w.weekNbr}}</td>\r\n <td class=\"picker__day\" *ngFor=\"let d of w.week\" [ngClass]=\"{'picker__day--infocus':d.cmo===currMonthId&&!d.disabled, 'disabled': d.disabled, 'tablesingleday': d.cmo===currMonthId&&!d.disabled}\">\r\n <div *ngIf=\"d.markedDate.marked\" class=\"markdate\" [ngStyle]=\"{'background-color': d.markedDate.color}\"></div>\r\n <div class=\"picker__day\" [ngClass]=\"{'picker__day--infocus':d.cmo===currMonthId,'picker__day--outfocus': (d.cmo===nextMonthId || d.cmo===prevMonthId), 'picker__day--today':d.currDay&&opts.markCurrentDay, 'picker__day--selected picker__day--highlighted':selectedDate.day===d.dateObj.day && selectedDate.month===d.dateObj.month && selectedDate.year===d.dateObj.year && d.cmo===currMonthId}\" (click)=\"!d.disabled&&cellClicked(d);$event.stopPropagation()\" (keydown)=\"cellKeyDown($event, d)\" tabindex=\"0\">\r\n {{d.dateObj.day}}\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <div class=\"picker__footer\">\r\n <button type=\"button\" *ngIf=\"opts.showTodayBtn\" class=\"picker__button--today\" (click)=\"todayClicked()\" role=\"button\" [attr.aria-label]=\"opts.todayBtnTxt\">\r\n {{opts.todayBtnTxt}}\r\n </button>\r\n <button type=\"button\" *ngIf=\"opts.showClearDateBtn\" class=\"picker__button--clear\" (click)=\"removeBtnClicked()\" role=\"button\" [attr.aria-label]=\"opts.clearBtnTxt\">\r\n {{opts.clearBtnTxt}}\r\n </button>\r\n <button type=\"button\" [ngClass]=\"{'ml-auto': !opts.showTodayBtn}\" class=\"picker__button--close\" (click)=\"showSelector = false; removeInlineStyle();\" role=\"button\" [attr.aria-label]=\"opts.closeBtnTxt\">\r\n {{opts.closeBtnTxt}}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/typescripts/pro/date-picker/datepicker.component.ts":
/*!*********************************************************************!*\
!*** ./src/app/typescripts/pro/date-picker/datepicker.component.ts ***!
\*********************************************************************/
/*! exports provided: MYDP_VALUE_ACCESSOR, MDBDatePickerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MYDP_VALUE_ACCESSOR", function() { return MYDP_VALUE_ACCESSOR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBDatePickerComponent", function() { return MDBDatePickerComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_datepickerLocale_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./services/datepickerLocale.service */ "./src/app/typescripts/pro/date-picker/services/datepickerLocale.service.ts");
/* harmony import */ var _services_datepickerUtil_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./services/datepickerUtil.service */ "./src/app/typescripts/pro/date-picker/services/datepickerUtil.service.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var MYDP_VALUE_ACCESSOR = {
provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return MDBDatePickerComponent; }),
multi: true
};
var CalToggle;
(function (CalToggle) {
CalToggle[CalToggle["Open"] = 1] = "Open";
CalToggle[CalToggle["CloseByDateSel"] = 2] = "CloseByDateSel";
CalToggle[CalToggle["CloseByCalBtn"] = 3] = "CloseByCalBtn";
CalToggle[CalToggle["CloseByOutClick"] = 4] = "CloseByOutClick";
})(CalToggle || (CalToggle = {}));
var Year;
(function (Year) {
Year[Year["min"] = 1000] = "min";
Year[Year["max"] = 9999] = "max";
})(Year || (Year = {}));
var InputFocusBlur;
(function (InputFocusBlur) {
InputFocusBlur[InputFocusBlur["focus"] = 1] = "focus";
InputFocusBlur[InputFocusBlur["blur"] = 2] = "blur";
})(InputFocusBlur || (InputFocusBlur = {}));
var KeyCode;
(function (KeyCode) {
KeyCode[KeyCode["enter"] = 13] = "enter";
KeyCode[KeyCode["space"] = 32] = "space";
})(KeyCode || (KeyCode = {}));
var MonthId;
(function (MonthId) {
MonthId[MonthId["prev"] = 1] = "prev";
MonthId[MonthId["curr"] = 2] = "curr";
MonthId[MonthId["next"] = 3] = "next";
})(MonthId || (MonthId = {}));
var MDBDatePickerComponent = /** @class */ (function () {
function MDBDatePickerComponent(elem, renderer,
// private cdr: ChangeDetectorRef,
localeService, utilService) {
var _this = this;
this.elem = elem;
this.renderer = renderer;
this.localeService = localeService;
this.utilService = utilService;
this.label = '';
this.placeholder = '';
this.dateChanged = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.inputFieldChanged = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.calendarViewChanged = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.calendarToggle = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.inputFocusBlur = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.showSelector = false;
this.visibleMonth = { monthTxt: '', monthNbr: 0, year: 1 };
this.selectedMonth = { monthTxt: '', monthNbr: 0, year: 0 };
this.selectedDate = { year: 0, month: 0, day: 0 };
this.weekDays = [];
this.dates = [];
this.selectionDayTxt = '';
this.invalidDate = false;
this.disableTodayBtn = false;
this.dayIdx = 0;
this.weekDayOpts = ['su', 'mo', 'tu', 'we', 'th', 'fr', 'sa'];
this.editMonth = false;
this.invalidMonth = false;
this.editYear = false;
this.invalidYear = false;
this.prevMonthDisabled = false;
this.nextMonthDisabled = false;
this.prevYearDisabled = false;
this.nextYearDisabled = false;
this.prevMonthId = MonthId.prev;
this.currMonthId = MonthId.curr;
this.nextMonthId = MonthId.next;
this.tmp = { year: this.getToday().year, month: this.getToday().month, day: this.getToday().day };
// Default options
this.opts = {
closeAfterSelect: false,
dayLabelsFull: {},
dayLabels: {},
monthLabelsFull: {},
monthLabels: {},
dateFormat: '',
showTodayBtn: true,
todayBtnTxt: '',
firstDayOfWeek: '',
sunHighlight: true,
markCurrentDay: true,
disableUntil: { year: 0, month: 0, day: 0 },
disableSince: { year: 0, month: 0, day: 0 },
disableDays: [],
enableDays: [],
markDates: [],
markWeekends: {},
disableDateRanges: [],
disableWeekends: false,
showWeekNumbers: false,
height: '32px',
width: '100%',
selectionTxtFontSize: '1rem',
showClearDateBtn: true,
alignSelectorRight: false,
disableHeaderButtons: true,
minYear: Year.min,
maxYear: Year.max,
componentDisabled: false,
showSelectorArrow: true,
ariaLabelInputField: 'Date input field',
ariaLabelClearDate: 'Clear Date',
ariaLabelOpenCalendar: 'Open Calendar',
ariaLabelPrevMonth: 'Previous Month',
ariaLabelNextMonth: 'Next Month',
ariaLabelPrevYear: 'Previous Year',
ariaLabelNextYear: 'Next Year'
};
this.months = [];
this.years = [];
this.elements = document.getElementsByClassName('mydp picker');
this.onChangeCb = function () { };
this.onTouchedCb = function () { };
this.setLocaleOptions();
renderer.listenGlobal(this.elem.nativeElement, 'click', function (event) {
if (_this.showSelector &&
event.target &&
_this.elem.nativeElement !== event.target &&
!_this.elem.nativeElement.contains(event.target)) {
_this.removeInlineStyle();
_this.showSelector = false;
_this.removeZIndex();
_this.calendarToggle.emit(CalToggle.CloseByOutClick);
}
if (event.target.classList.contains('picker__holder')) {
_this.removeInlineStyle();
_this.removeZIndex();
_this.showSelector = false;
}
if (true && event.target && _this.elem.nativeElement.contains(event.target)) {
_this.resetMonthYearEdit();
}
});
}
MDBDatePickerComponent.prototype.ngAfterViewInit = function () {
var _this = this;
if (this.opts.startDate) {
setTimeout(function () {
_this.onUserDateInput(_this.opts.startDate);
}, 0);
}
};
MDBDatePickerComponent.prototype.removeInlineStyle = function () {
this.removeZIndex();
setTimeout(function () {
document.documentElement.style.removeProperty('overflow');
}, 155);
};
MDBDatePickerComponent.prototype.setLocaleOptions = function () {
var _this = this;
var opts = this.localeService.getLocaleOptions(this.locale);
Object.keys(opts).forEach(function (k) {
_this.opts[k] = opts[k];
});
};
MDBDatePickerComponent.prototype.setOptions = function () {
var _this = this;
var thisYear = new Date();
var currentYear = thisYear.getFullYear();
if (this.options !== undefined) {
Object.keys(this.options).forEach(function (k) {
_this.opts[k] = _this.options[k];
});
}
if (this.disabled !== undefined) {
this.opts.componentDisabled = this.disabled;
}
if (this.opts.minYear === 1000) {
this.opts.minYear = currentYear - 7;
}
if (this.opts.maxYear === 9999) {
this.opts.maxYear = currentYear + 7;
}
};
MDBDatePickerComponent.prototype.resetMonthYearEdit = function () {
this.editMonth = false;
this.editYear = false;
this.invalidMonth = false;
this.invalidYear = false;
};
MDBDatePickerComponent.prototype.onUserDateInput = function (value) {
this.invalidDate = false;
if (value.length === 0) {
this.clearDate();
}
else {
var date = this.utilService.isDateValid(value, this.opts.dateFormat, this.opts.minYear, this.opts.maxYear, this.opts.disableUntil, this.opts.disableSince, this.opts.disableWeekends, this.opts.disableDays, this.opts.disableDateRanges, this.opts.monthLabels, this.opts.enableDays);
if (date.day !== 0 && date.month !== 0 && date.year !== 0) {
this.selectDate(date);
}
else {
this.invalidDate = true;
}
}
if (this.invalidDate) {
this.inputFieldChanged.emit({ value: value, dateFormat: this.opts.dateFormat, valid: !(value.length === 0 || this.invalidDate) });
this.onChangeCb('');
this.onTouchedCb();
}
};
MDBDatePickerComponent.prototype.onFocusInput = function (event) {
this.openBtnClicked();
this.inputFocusBlur.emit({ reason: InputFocusBlur.focus, value: event.target.value });
document.documentElement.style.overflow = 'hidden';
this.divFocus.nativeElement.focus();
};
MDBDatePickerComponent.prototype.onBlurInput = function (event) {
this.selectionDayTxt = event.target.value;
this.onTouchedCb();
this.inputFocusBlur.emit({ reason: InputFocusBlur.blur, value: event.target.value });
};
MDBDatePickerComponent.prototype.onUserMonthInput = function (value) {
this.invalidMonth = false;
var m = this.utilService.isMonthLabelValid(value, this.opts.monthLabels);
if (m !== -1) {
this.editMonth = false;
if (m !== this.visibleMonth.monthNbr) {
this.visibleMonth = { monthTxt: this.monthText(m), monthNbr: m, year: this.visibleMonth.year };
this.generateCalendar(m, this.visibleMonth.year, true);
}
}
else {
this.invalidMonth = true;
}
};
MDBDatePickerComponent.prototype.onUserYearInput = function (value) {
this.invalidYear = false;
var y = this.utilService.isYearLabelValid(Number(value), this.opts.minYear, this.opts.maxYear);
if (y !== -1) {
this.editYear = false;
if (y !== this.visibleMonth.year) {
this.visibleMonth = { monthTxt: this.visibleMonth.monthTxt, monthNbr: this.visibleMonth.monthNbr, year: y };
this.generateCalendar(this.visibleMonth.monthNbr, y, true);
}
}
else {
this.invalidYear = true;
}
};
MDBDatePickerComponent.prototype.isTodayDisabled = function () {
this.disableTodayBtn = this.utilService.isDisabledDay(this.getToday(), this.opts.disableUntil, this.opts.disableSince, this.opts.disableWeekends, this.opts.disableDays, this.opts.disableDateRanges, this.opts.enableDays);
};
MDBDatePickerComponent.prototype.parseOptions = function () {
if (this.locale) {
this.setLocaleOptions();
}
this.setOptions();
this.isTodayDisabled();
this.dayIdx = this.weekDayOpts.indexOf(this.opts.firstDayOfWeek);
if (this.dayIdx !== -1) {
var idx = this.dayIdx;
for (var i = 0; i < this.weekDayOpts.length; i++) {
this.weekDays.push(this.opts.dayLabels[this.weekDayOpts[idx]]);
idx = this.weekDayOpts[idx] === 'sa' ? 0 : idx + 1;
}
}
};
MDBDatePickerComponent.prototype.writeValue = function (value) {
if (value && typeof value === 'string') {
this.updateDateValue(this.parseSelectedDate(value), false);
}
else if (value && value['date']) {
this.updateDateValue(this.parseSelectedDate(value['date']), false);
}
else if (value === '') {
this.updateDateValue({ year: 0, month: 0, day: 0 }, true);
}
};
MDBDatePickerComponent.prototype.registerOnChange = function (fn) {
this.onChangeCb = fn;
};
MDBDatePickerComponent.prototype.registerOnTouched = function (fn) {
this.onTouchedCb = fn;
};
MDBDatePickerComponent.prototype.ngOnChanges = function (changes) {
var _this = this;
if (changes.hasOwnProperty('selector') && changes['selector'].currentValue > 0) {
this.openBtnClicked();
}
if (changes.hasOwnProperty('placeholder')) {
this.placeholder = changes['placeholder'].currentValue;
}
if (changes.hasOwnProperty('locale')) {
this.locale = changes['locale'].currentValue;
}
if (changes.hasOwnProperty('disabled')) {
this.disabled = changes['disabled'].currentValue;
}
if (changes.hasOwnProperty('options')) {
this.options = changes['options'].currentValue;
}
this.weekDays.length = 0;
this.parseOptions();
if (changes.hasOwnProperty('defaultMonth')) {
var dm = changes['defaultMonth'].currentValue;
if (dm !== null && dm !== undefined && dm !== '') {
this.selectedMonth = this.parseSelectedMonth(dm);
}
else {
this.selectedMonth = { monthTxt: '', monthNbr: 0, year: 0 };
}
}
if (changes.hasOwnProperty('selDate')) {
var sd = changes['selDate'];
if (sd.currentValue !== null &&
sd.currentValue !== undefined &&
sd.currentValue !== '' &&
Object.keys(sd.currentValue).length !== 0) {
this.selectedDate = this.parseSelectedDate(sd.currentValue);
setTimeout(function () {
_this.onChangeCb(_this.getDateModel(_this.selectedDate));
});
}
else {
// Do not clear on init
if (!sd.isFirstChange()) {
this.clearDate();
}
}
}
if (this.showSelector) {
this.generateCalendar(this.visibleMonth.monthNbr, this.visibleMonth.year, false);
}
};
// Fix for situation, when on mobile devices keyboard was released when datepicker modal was active
MDBDatePickerComponent.prototype.hideKeyboard = function () {
// this set timeout needed for case when hideKeyborad
// is called inside of 'onfocus' event handler
setTimeout(function () {
// creating temp field
var field = document.createElement('input');
field.setAttribute('type', 'text');
// hiding temp field from peoples eyes
// -webkit-user-modify is nessesary for Android 4.x
/*tslint:disable:max-line-length*/
field.setAttribute('style', 'position:absolute; top: 0px; opacity: 0; -webkit-user-modify: read-write-plaintext-only; left:0px;');
document.body.appendChild(field);
// adding onfocus event handler for out temp field
field.onfocus = function () {
// this timeout of 200ms is nessasary for Android 2.3.x
setTimeout(function () {
field.setAttribute('style', 'display:none;');
setTimeout(function () {
document.body.removeChild(field);
document.body.focus();
}, 14);
}, 20);
};
// focusing it
field.focus();
}, 50);
};
MDBDatePickerComponent.prototype.removeBtnClicked = function () {
// Remove date button clicked
this.clearDate();
if (this.showSelector) {
this.calendarToggle.emit(CalToggle.CloseByCalBtn);
this.setZIndex();
}
// this.showSelector = false;
};
// Adding z-index: -2 for every div.mydp picker
// Fix for situation, when datepicker was behind an input or something else (Case from support forum)
MDBDatePickerComponent.prototype.setZIndex = function () {
for (var i = 0; i <= this.elements.length; i++) {
if (i === this.elements.length) {
break;
}
this.renderer.setElementStyle(this.elements[i], 'z-index', '1');
if (this.elements[i] === this.elem.nativeElement.childNodes[0] || this.elements[i] === this.elem.nativeElement.childNodes[1]) {
this.elementNumber = i;
this.renderer.setElementStyle(this.elements[i], 'z-index', '50');
}
}
};
// Removing z-index: -2 from div.mydp picker
MDBDatePickerComponent.prototype.removeZIndex = function () {
for (var i = 0; i <= this.elements.length; i++) {
if (i === this.elements.length) {
break;
}
this.renderer.setElementStyle(this.elements[i], 'z-index', '50');
}
};
MDBDatePickerComponent.prototype.openBtnClicked = function () {
// Open selector button clicked
this.showSelector = !this.showSelector;
if (this.showSelector) {
this.setVisibleMonth();
this.calendarToggle.emit(CalToggle.Open);
this.setZIndex();
}
else {
this.calendarToggle.emit(CalToggle.CloseByCalBtn);
}
this.hideKeyboard();
};
MDBDatePickerComponent.prototype.setVisibleMonth = function () {
// Sets visible month of calendar
var y = 0, m = 0;
if (!this.utilService.isInitializedDate(this.selectedDate)) {
if (this.selectedMonth.year === 0 && this.selectedMonth.monthNbr === 0) {
var today = this.getToday();
y = today.year;
m = today.month;
}
else {
y = this.selectedMonth.year;
m = this.selectedMonth.monthNbr;
}
}
else {
y = this.selectedDate.year;
m = this.selectedDate.month;
}
this.visibleMonth = { monthTxt: this.opts.monthLabels[m], monthNbr: m, year: y };
// Create current month
this.generateCalendar(m, y, true);
};
MDBDatePickerComponent.prototype.monthList = function () {
this.months = [];
for (var i = 1; i <= 12; i++) {
this.months.push({ index: i, short: this.opts.monthLabels[i], label: this.opts.monthLabelsFull[i] });
}
};
MDBDatePickerComponent.prototype.yearsList = function () {
this.years = [];
var firstYear = this.opts.minYear;
var lastYear = this.opts.maxYear;
for (var i = firstYear; i <= lastYear; i++) {
this.years.push(i);
}
};
MDBDatePickerComponent.prototype.prevMonth = function () {
// Previous month from calendar
var d = this.getDate(this.visibleMonth.year, this.visibleMonth.monthNbr, 1);
d.setMonth(d.getMonth() - 1);
var y = d.getFullYear();
var m = d.getMonth() + 1;
this.visibleMonth = { monthTxt: this.monthText(m), monthNbr: m, year: y };
this.generateCalendar(m, y, true);
};
MDBDatePickerComponent.prototype.nextMonth = function () {
// Next month from calendar
var d = this.getDate(this.visibleMonth.year, this.visibleMonth.monthNbr, 1);
d.setMonth(d.getMonth() + 1);
var y = d.getFullYear();
var m = d.getMonth() + 1;
this.visibleMonth = { monthTxt: this.monthText(m), monthNbr: m, year: y };
this.generateCalendar(m, y, true);
};
MDBDatePickerComponent.prototype.prevYear = function () {
// Previous year from calendar
this.visibleMonth.year--;
this.generateCalendar(this.visibleMonth.monthNbr, this.visibleMonth.year, true);
};
MDBDatePickerComponent.prototype.nextYear = function () {
// Next year from calendar
this.visibleMonth.year++;
this.generateCalendar(this.visibleMonth.monthNbr, this.visibleMonth.year, true);
};
MDBDatePickerComponent.prototype.todayClicked = function () {
// Today button clicked
var today = this.getToday();
if (!this.utilService.isDisabledDay(today, this.opts.disableUntil, this.opts.disableSince, this.opts.disableWeekends, this.opts.disableDays, this.opts.disableDateRanges, this.opts.enableDays)) {
this.selectDate(today);
}
if (today.year !== this.visibleMonth.year || today.month !== this.visibleMonth.monthNbr) {
this.visibleMonth = { monthTxt: this.opts.monthLabels[today.month], monthNbr: today.month, year: today.year };
this.generateCalendar(today.month, today.year, true);
}
};
MDBDatePickerComponent.prototype.cellClicked = function (cell) {
// Cell clicked on the calendar
if (cell.cmo === this.prevMonthId) {
// Previous month day
this.prevMonth();
}
else if (cell.cmo === this.currMonthId) {
// Current month day - if date is already selected clear it
if (cell.dateObj.year === this.selectedDate.year &&
cell.dateObj.month === this.selectedDate.month &&
cell.dateObj.day === this.selectedDate.day) {
this.clearDate();
}
else {
this.selectDate(cell.dateObj);
}
}
else if (cell.cmo === this.nextMonthId) {
// Next month day
this.nextMonth();
}
this.resetMonthYearEdit();
};
MDBDatePickerComponent.prototype.cellKeyDown = function (event, cell) {
// Cell keyboard handling
if ((event.keyCode === KeyCode.enter || event.keyCode === KeyCode.space) && !cell.disabled) {
event.preventDefault();
this.cellClicked(cell);
}
};
MDBDatePickerComponent.prototype.clearDate = function () {
// Clears the date and notifies parent using callbacks and value accessor
var date = { year: 0, month: 0, day: 0 };
this.dateChanged.emit({ date: date, jsdate: null, formatted: '', epoc: 0 });
this.onChangeCb('');
this.onTouchedCb();
this.updateDateValue(date, true);
this.setZIndex();
};
MDBDatePickerComponent.prototype.selectDate = function (date) {
// Date selected, notifies parent using callbacks and value accessor
this.tmp = date;
var dateModel = this.getDateModel(date);
this.dateChanged.emit(dateModel);
this.onChangeCb(dateModel);
this.onTouchedCb();
this.updateDateValue(date, false);
if (this.showSelector) {
this.calendarToggle.emit(CalToggle.CloseByDateSel);
}
if (this.opts.closeAfterSelect) {
this.showSelector = false;
this.removeInlineStyle();
}
// hide calendar when date was clicked
// this.showSelector = false;
};
MDBDatePickerComponent.prototype.updateDateValue = function (date, clear) {
// Updates date values
this.selectedDate = date;
this.selectionDayTxt = clear ? '' : this.formatDate(date);
this.inputFieldChanged.emit({ value: this.selectionDayTxt, dateFormat: this.opts.dateFormat, valid: !clear });
this.invalidDate = false;
};
MDBDatePickerComponent.prototype.getDateModel = function (date) {
// Creates a date model object from the given parameter
return this.formatDate(date);
};
MDBDatePickerComponent.prototype.preZero = function (val) {
// Prepend zero if smaller than 10
return parseInt(val, 0) < 10 ? '0' + val : val;
};
MDBDatePickerComponent.prototype.formatDate = function (val) {
// Returns formatted date string, if mmm is part of dateFormat returns month as a string
// days
var d = val.day; // 1 - 31
var dd = this.preZero(val.day); // 01 - 31
var ddd = this.opts.dayLabels[this.getWeekday(val)]; // Sun-Sat
var dddd = this.opts.dayLabelsFull[this.getWeekday(val)]; // Sunday Saturday
var m = val.month; // 1 - 12
var mm = this.preZero(val.month); // 01 - 12
var mmm = this.getMonthShort(val.month); // Jan - Dec
var mmmm = this.getMonthFull(val.month); // January December
var yy = val.year.toString().slice(2, 4); // 00 - 99
var yyyy = val.year; // 2000 - 2999
var toReplace = this.opts.dateFormat.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);
var formatted = '';
toReplace.forEach(function (el) {
switch (el) {
case 'dddd':
el = el.replace(el, dddd);
break;
case 'ddd':
el = el.replace(el, ddd);
break;
case 'dd':
el = el.replace(el, dd);
break;
case 'd':
el = el.replace(el, d);
break;
case 'mmmm':
el = el.replace(el, mmmm);
break;
case 'mmm':
el = el.replace(el, mmm);
break;
case 'mm':
el = el.replace(el, mm);
break;
case 'm':
el = el.replace(el, m);
break;
case 'yyyy':
el = el.replace(el, yyyy);
break;
case 'yy':
el = el.replace(el, yy);
break;
}
formatted += el;
});
return formatted;
};
MDBDatePickerComponent.prototype.monthText = function (m) {
// Returns month as a text
return this.opts.monthLabels[m];
};
MDBDatePickerComponent.prototype.weekText = function (m) {
// Returns month as a text
return this.opts.dayLabelsFull[m];
};
MDBDatePickerComponent.prototype.getMonthShort = function (m) {
return this.opts.monthLabels[m];
};
MDBDatePickerComponent.prototype.getMonthFull = function (m) {
return this.opts.monthLabelsFull[m];
};
MDBDatePickerComponent.prototype.monthStartIdx = function (y, m) {
// Month start index
var d = new Date();
d.setDate(1);
d.setMonth(m - 1);
d.setFullYear(y);
var idx = d.getDay() + this.sundayIdx();
return idx >= 7 ? idx - 7 : idx;
};
MDBDatePickerComponent.prototype.daysInMonth = function (m, y) {
// Return number of days of current month
return new Date(y, m, 0).getDate();
};
MDBDatePickerComponent.prototype.daysInPrevMonth = function (m, y) {
// Return number of days of the previous month
var d = this.getDate(y, m, 1);
d.setMonth(d.getMonth() - 1);
return this.daysInMonth(d.getMonth() + 1, d.getFullYear());
};
MDBDatePickerComponent.prototype.isCurrDay = function (d, m, y, cmo, today) {
// Check is a given date the today
return d === today.day && m === today.month && y === today.year && cmo === this.currMonthId;
};
MDBDatePickerComponent.prototype.getToday = function () {
var date = new Date();
return { year: date.getFullYear(), month: date.getMonth() + 1, day: date.getDate() };
};
MDBDatePickerComponent.prototype.getTimeInMilliseconds = function (date) {
return this.getDate(date.year, date.month, date.day).getTime();
};
MDBDatePickerComponent.prototype.getWeekday = function (date) {
// Get weekday: su, mo, tu, we ...
return this.weekDayOpts[this.utilService.getDayNumber(date)];
};
MDBDatePickerComponent.prototype.getDate = function (year, month, day) {
// Creates a date object from given year, month and day
return new Date(year, month - 1, day, 0, 0, 0, 0);
};
MDBDatePickerComponent.prototype.sundayIdx = function () {
// Index of Sunday day
return this.dayIdx > 0 ? 7 - this.dayIdx : 0;
};
MDBDatePickerComponent.prototype.generateCalendar = function (m, y, notifyChange) {
this.dates.length = 0;
var today = this.getToday();
var monthStart = this.monthStartIdx(y, m);
var dInThisM = this.daysInMonth(m, y);
var dInPrevM = this.daysInPrevMonth(m, y);
var dayNbr = 1;
var cmo = this.prevMonthId;
for (var i = 1; i < 7; i++) {
var week = [];
if (i === 1) {
// First week
var pm = dInPrevM - monthStart + 1;
// Previous month
for (var j = pm; j <= dInPrevM; j++) {
var date = { year: y, month: m - 1, day: j };
week.push({
dateObj: date, cmo: cmo, currDay: this.isCurrDay(j, m, y, cmo, today),
dayNbr: this.utilService.getDayNumber(date),
disabled: this.utilService.isDisabledDay(date, this.opts.disableUntil, this.opts.disableSince, this.opts.disableWeekends, this.opts.disableDays, this.opts.disableDateRanges, this.opts.enableDays),
markedDate: this.utilService.isMarkedDate(date, this.opts.markDates, this.opts.markWeekends)
});
}
cmo = this.currMonthId;
// Current month
var daysLeft = 7 - week.length;
for (var j = 0; j < daysLeft; j++) {
var date = { year: y, month: m, day: dayNbr };
week.push({
dateObj: date, cmo: cmo, currDay: this.isCurrDay(dayNbr, m, y, cmo, today),
dayNbr: this.utilService.getDayNumber(date),
disabled: this.utilService.isDisabledDay(date, this.opts.disableUntil, this.opts.disableSince, this.opts.disableWeekends, this.opts.disableDays, this.opts.disableDateRanges, this.opts.enableDays),
markedDate: this.utilService.isMarkedDate(date, this.opts.markDates, this.opts.markWeekends)
});
dayNbr++;
}
}
else {
// Rest of the weeks
for (var j = 1; j < 8; j++) {
if (dayNbr > dInThisM) {
// Next month
dayNbr = 1;
cmo = this.nextMonthId;
}
var date = { year: y, month: cmo === this.currMonthId ? m : m + 1, day: dayNbr };
week.push({
dateObj: date, cmo: cmo, currDay: this.isCurrDay(dayNbr, m, y, cmo, today),
dayNbr: this.utilService.getDayNumber(date),
disabled: this.utilService.isDisabledDay(date, this.opts.disableUntil, this.opts.disableSince, this.opts.disableWeekends, this.opts.disableDays, this.opts.disableDateRanges, this.opts.enableDays),
markedDate: this.utilService.isMarkedDate(date, this.opts.markDates, this.opts.markWeekends)
});
dayNbr++;
}
}
var weekNbr = this.opts.showWeekNumbers &&
this.opts.firstDayOfWeek === 'mo' ?
this.utilService.getWeekNumber(week[0].dateObj) : 0;
this.dates.push({ week: week, weekNbr: weekNbr });
}
this.setHeaderBtnDisabledState(m, y);
if (notifyChange) {
// Notify parent
this.calendarViewChanged.emit({
year: y,
month: m,
first: {
number: 1,
weekday: this.getWeekday({
year: y,
month: m,
day: 1
})
},
last: {
number: dInThisM,
weekday: this.getWeekday({
year: y,
month: m,
day: dInThisM
})
}
});
}
this.monthList();
this.yearsList();
};
MDBDatePickerComponent.prototype.parseSelectedDate = function (selDate) {
// Parse selDate value - it can be string or IMyDate object
var date = { day: 0, month: 0, year: 0 };
if (typeof selDate === 'string') {
var sd = selDate;
date.day = this.utilService.parseDatePartNumber(this.opts.dateFormat, sd, 'dd');
date.month = this.opts.dateFormat.indexOf('mmm') !== -1
? this.utilService.parseDatePartMonthName(this.opts.dateFormat, sd, 'mmm', this.opts.monthLabels)
: this.utilService.parseDatePartNumber(this.opts.dateFormat, sd, 'mm');
date.year = this.utilService.parseDatePartNumber(this.opts.dateFormat, sd, 'yyyy');
}
else if (typeof selDate === 'object') {
date = selDate;
}
this.selectionDayTxt = this.formatDate(date);
return date;
};
MDBDatePickerComponent.prototype.parseSelectedMonth = function (ms) {
return this.utilService.parseDefaultMonth(ms);
};
MDBDatePickerComponent.prototype.setHeaderBtnDisabledState = function (m, y) {
var dpm = false;
var dpy = false;
var dnm = false;
var dny = false;
if (this.opts.disableHeaderButtons) {
dpm = this.utilService.isMonthDisabledByDisableUntil({
year: m === 1 ? y - 1 : y,
month: m === 1 ? 12 : m - 1,
day: this.daysInMonth(m === 1 ? 12 : m - 1, m === 1 ? y - 1 : y)
}, this.opts.disableUntil);
dpy = this.utilService.isMonthDisabledByDisableUntil({
year: y - 1,
month: m,
day: this.daysInMonth(m, y - 1)
}, this.opts.disableUntil);
dnm = this.utilService.isMonthDisabledByDisableSince({
year: m === 12 ? y + 1 : y,
month: m === 12 ? 1 : m + 1,
day: 1
}, this.opts.disableSince);
dny = this.utilService.isMonthDisabledByDisableSince({ year: y + 1, month: m, day: 1 }, this.opts.disableSince);
}
this.prevMonthDisabled = m === 1 && y === this.opts.minYear || dpm;
this.prevYearDisabled = y - 1 < this.opts.minYear || dpy;
this.nextMonthDisabled = m === 12 && y === this.opts.maxYear || dnm;
this.nextYearDisabled = y + 1 > this.opts.maxYear || dny;
};
MDBDatePickerComponent.prototype.checkActive = function () {
if (this.placeholder.length > 0) {
return true;
}
else {
if (this.showSelector) {
return true;
}
else {
return false;
}
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], MDBDatePickerComponent.prototype, "options", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], MDBDatePickerComponent.prototype, "locale", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], MDBDatePickerComponent.prototype, "defaultMonth", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], MDBDatePickerComponent.prototype, "selDate", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], MDBDatePickerComponent.prototype, "label", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], MDBDatePickerComponent.prototype, "placeholder", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number)
], MDBDatePickerComponent.prototype, "selector", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], MDBDatePickerComponent.prototype, "disabled", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MDBDatePickerComponent.prototype, "dateChanged", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MDBDatePickerComponent.prototype, "inputFieldChanged", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MDBDatePickerComponent.prototype, "calendarViewChanged", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MDBDatePickerComponent.prototype, "calendarToggle", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MDBDatePickerComponent.prototype, "inputFocusBlur", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('divFocus'),
__metadata("design:type", Object)
], MDBDatePickerComponent.prototype, "divFocus", void 0);
MDBDatePickerComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-date-picker',
exportAs: 'mdbdatepicker',
template: __webpack_require__(/*! ./datapicker.component.html */ "./src/app/typescripts/pro/date-picker/datapicker.component.html"),
providers: [_services_datepickerLocale_service__WEBPACK_IMPORTED_MODULE_2__["LocaleService"], _services_datepickerUtil_service__WEBPACK_IMPORTED_MODULE_3__["UtilService"], MYDP_VALUE_ACCESSOR],
encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"],
_services_datepickerLocale_service__WEBPACK_IMPORTED_MODULE_2__["LocaleService"],
_services_datepickerUtil_service__WEBPACK_IMPORTED_MODULE_3__["UtilService"]])
], MDBDatePickerComponent);
return MDBDatePickerComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/date-picker/datepicker.module.ts":
/*!******************************************************************!*\
!*** ./src/app/typescripts/pro/date-picker/datepicker.module.ts ***!
\******************************************************************/
/*! exports provided: MDBDatePickerModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBDatePickerModule", function() { return MDBDatePickerModule; });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _datepicker_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./datepicker.component */ "./src/app/typescripts/pro/date-picker/datepicker.component.ts");
/* harmony import */ var _directives_datepickerFocus_directive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./directives/datepickerFocus.directive */ "./src/app/typescripts/pro/date-picker/directives/datepickerFocus.directive.ts");
/* harmony import */ var _directives_datepickerAutofill_directive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./directives/datepickerAutofill.directive */ "./src/app/typescripts/pro/date-picker/directives/datepickerAutofill.directive.ts");
var __decorate = (undefined && undefined.__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 MDBDatePickerModule = /** @class */ (function () {
function MDBDatePickerModule() {
}
MDBDatePickerModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormsModule"]],
declarations: [_datepicker_component__WEBPACK_IMPORTED_MODULE_3__["MDBDatePickerComponent"], _directives_datepickerFocus_directive__WEBPACK_IMPORTED_MODULE_4__["FocusDirective"], _directives_datepickerAutofill_directive__WEBPACK_IMPORTED_MODULE_5__["InputAutoFillDirective"]],
exports: [_datepicker_component__WEBPACK_IMPORTED_MODULE_3__["MDBDatePickerComponent"], _directives_datepickerFocus_directive__WEBPACK_IMPORTED_MODULE_4__["FocusDirective"], _directives_datepickerAutofill_directive__WEBPACK_IMPORTED_MODULE_5__["InputAutoFillDirective"]]
})
], MDBDatePickerModule);
return MDBDatePickerModule;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/date-picker/directives/datepickerAutofill.directive.ts":
/*!****************************************************************************************!*\
!*** ./src/app/typescripts/pro/date-picker/directives/datepickerAutofill.directive.ts ***!
\****************************************************************************************/
/*! exports provided: InputAutoFillDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputAutoFillDirective", function() { return InputAutoFillDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var KeyCode;
(function (KeyCode) {
KeyCode[KeyCode["backspace"] = 8] = "backspace";
KeyCode[KeyCode["delete"] = 46] = "delete";
})(KeyCode || (KeyCode = {}));
var InputAutoFillDirective = /** @class */ (function () {
function InputAutoFillDirective(el, rndr) {
this.el = el;
this.rndr = rndr;
}
InputAutoFillDirective.prototype.onKeyUp = function (evt) {
if (!this.opts.enabled || evt.keyCode === KeyCode.backspace || evt.keyCode === KeyCode.delete) {
return;
}
var val = this.getInputValue();
var ews = this.endsWith(val, this.opts.separator);
var parts = val.split(this.opts.separator);
var idx = parts.length - 1;
if (val.indexOf(this.opts.separator + this.opts.separator) !== -1 || idx > 2) {
return;
}
if (!ews &&
(val.length === this.getPartLength(0) ||
val.length === this.getPartLength(0) + this.getPartLength(1) + this.opts.separator.length)) {
this.setInputValue(val + this.opts.separator);
}
else if (ews &&
parts[idx - 1].length < this.getPartLength(idx - 1) &&
this.isNumber(parts[idx - 1]) && (this.isDay(idx - 1) || this.isMonth(idx - 1))) {
this.setInputValue(this.insertPos(val, val.length - 2, '0'));
}
else if (parts[idx].length < this.getPartLength(idx) &&
this.isNumber(parts[idx]) &&
(Number(parts[idx]) > 3 &&
this.isDay(idx) ||
Number(parts[idx]) > 1 &&
this.isMonth(idx))) {
this.setInputValue(this.insertPos(val, val.length - 1, '0') + (idx < 2 ? this.opts.separator : ''));
}
};
InputAutoFillDirective.prototype.endsWith = function (val, suffix) {
return val.indexOf(suffix, val.length - suffix.length) !== -1;
};
InputAutoFillDirective.prototype.insertPos = function (str, idx, val) {
return str.substr(0, idx) + val + str.substr(idx);
};
InputAutoFillDirective.prototype.getPartLength = function (idx) {
return this.opts.formatParts[idx].length;
};
InputAutoFillDirective.prototype.isNumber = function (val) {
return val.match(/[1-9]/) !== null;
};
InputAutoFillDirective.prototype.isDay = function (idx) {
return this.opts.formatParts[idx].indexOf('d') !== -1;
};
InputAutoFillDirective.prototype.isMonth = function (idx) {
return this.opts.formatParts[idx].indexOf('m') !== -1 && this.opts.formatParts[idx].length === 2;
};
InputAutoFillDirective.prototype.getInputValue = function () {
return this.el.nativeElement.value;
};
InputAutoFillDirective.prototype.setInputValue = function (val) {
this.rndr.setElementProperty(this.el.nativeElement, 'value', val);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], InputAutoFillDirective.prototype, "opts", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('keyup', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [KeyboardEvent]),
__metadata("design:returntype", void 0)
], InputAutoFillDirective.prototype, "onKeyUp", null);
InputAutoFillDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbInputAutoFill]'
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], InputAutoFillDirective);
return InputAutoFillDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/date-picker/directives/datepickerFocus.directive.ts":
/*!*************************************************************************************!*\
!*** ./src/app/typescripts/pro/date-picker/directives/datepickerFocus.directive.ts ***!
\*************************************************************************************/
/*! exports provided: FocusDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FocusDirective", function() { return FocusDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var FocusDirective = /** @class */ (function () {
function FocusDirective(el, renderer) {
this.el = el;
this.renderer = renderer;
}
// Focus to element: if value 0 = don't set focus, 1 = set only focus, 2 = set focus and set cursor position
FocusDirective.prototype.ngAfterViewInit = function () {
// if (this.value === "0") {
// return;
// }
this.renderer.invokeElementMethod(this.el.nativeElement, 'focus', []);
// // Set cursor position at the end of text if input element
// if (this.value === "2") {
// let len = this.el.nativeElement.value.length;
// this.el.nativeElement.setSelectionRange(len, len);
// }
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], FocusDirective.prototype, "value", void 0);
FocusDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbDpFocus]'
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], FocusDirective);
return FocusDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/date-picker/index.ts":
/*!******************************************************!*\
!*** ./src/app/typescripts/pro/date-picker/index.ts ***!
\******************************************************/
/*! exports provided: LocaleService, UtilService, FocusDirective, InputAutoFillDirective, MYDP_VALUE_ACCESSOR, MDBDatePickerComponent, MDBDatePickerModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _services_datepickerLocale_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./services/datepickerLocale.service */ "./src/app/typescripts/pro/date-picker/services/datepickerLocale.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocaleService", function() { return _services_datepickerLocale_service__WEBPACK_IMPORTED_MODULE_0__["LocaleService"]; });
/* harmony import */ var _services_datepickerUtil_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./services/datepickerUtil.service */ "./src/app/typescripts/pro/date-picker/services/datepickerUtil.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UtilService", function() { return _services_datepickerUtil_service__WEBPACK_IMPORTED_MODULE_1__["UtilService"]; });
/* harmony import */ var _directives_datepickerFocus_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./directives/datepickerFocus.directive */ "./src/app/typescripts/pro/date-picker/directives/datepickerFocus.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FocusDirective", function() { return _directives_datepickerFocus_directive__WEBPACK_IMPORTED_MODULE_2__["FocusDirective"]; });
/* harmony import */ var _directives_datepickerAutofill_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./directives/datepickerAutofill.directive */ "./src/app/typescripts/pro/date-picker/directives/datepickerAutofill.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputAutoFillDirective", function() { return _directives_datepickerAutofill_directive__WEBPACK_IMPORTED_MODULE_3__["InputAutoFillDirective"]; });
/* harmony import */ var _datepicker_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./datepicker.component */ "./src/app/typescripts/pro/date-picker/datepicker.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MYDP_VALUE_ACCESSOR", function() { return _datepicker_component__WEBPACK_IMPORTED_MODULE_4__["MYDP_VALUE_ACCESSOR"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBDatePickerComponent", function() { return _datepicker_component__WEBPACK_IMPORTED_MODULE_4__["MDBDatePickerComponent"]; });
/* harmony import */ var _datepicker_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./datepicker.module */ "./src/app/typescripts/pro/date-picker/datepicker.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBDatePickerModule", function() { return _datepicker_module__WEBPACK_IMPORTED_MODULE_5__["MDBDatePickerModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/date-picker/services/datepickerLocale.service.ts":
/*!**********************************************************************************!*\
!*** ./src/app/typescripts/pro/date-picker/services/datepickerLocale.service.ts ***!
\**********************************************************************************/
/*! exports provided: LocaleService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocaleService", function() { return LocaleService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 LocaleService = /** @class */ (function () {
function LocaleService() {
this.locales = {
'en': {
dayLabelsFull: {
su: 'Sunday',
mo: 'Monday',
tu: 'Tuesday',
we: 'Wednesday',
th: 'Thursday',
fr: 'Friday',
sa: 'Saturday'
},
dayLabels: {
su: 'Sun',
mo: 'Mon',
tu: 'Tue',
we: 'Wed',
th: 'Thu',
fr: 'Fri',
sa: 'Sat'
},
monthLabelsFull: {
1: 'January',
2: 'February',
3: 'March',
4: 'April',
5: 'May',
6: 'June',
7: 'July',
8: 'August',
9: 'September',
10: 'October',
11: 'November',
12: 'December'
},
monthLabels: {
1: 'Jan',
2: 'Feb',
3: 'Mar',
4: 'Apr',
5: 'May',
6: 'Jun',
7: 'Jul',
8: 'Aug',
9: 'Sep',
10: 'Oct',
11: 'Nov',
12: 'Dec'
},
dateFormat: 'yyyy-mm-dd',
todayBtnTxt: 'Today',
clearBtnTxt: 'Clear',
closeBtnTxt: 'Close',
firstDayOfWeek: 'mo',
sunHighlight: true,
}
};
}
LocaleService.prototype.getLocaleOptions = function (locale) {
if (locale && this.locales.hasOwnProperty(locale)) {
// User given locale
return this.locales[locale];
}
// Default: en
return this.locales['en'];
};
LocaleService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], LocaleService);
return LocaleService;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/date-picker/services/datepickerUtil.service.ts":
/*!********************************************************************************!*\
!*** ./src/app/typescripts/pro/date-picker/services/datepickerUtil.service.ts ***!
\********************************************************************************/
/*! exports provided: UtilService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UtilService", function() { return UtilService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 UtilService = /** @class */ (function () {
function UtilService() {
}
UtilService.prototype.isDateValid = function (dateStr, dateFormat, minYear, maxYear, disableUntil, disableSince, disableWeekends, disableDays, disableDateRanges, monthLabels, enableDays) {
var returnDate = { day: 0, month: 0, year: 0 };
var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var isMonthStr = this.getDatePartIndex(dateFormat, 'mmm') !== -1;
if (dateStr.length !== dateFormat.length) {
return returnDate;
}
var separator = this.getDateFormatSeparator(dateFormat);
var parts = dateStr.split(separator);
if (parts.length !== 3) {
return returnDate;
}
var day = this.parseDatePartNumber(dateFormat, dateStr, 'dd');
var month = isMonthStr ?
this.parseDatePartMonthName(dateFormat, dateStr, 'mmm', monthLabels) :
this.parseDatePartNumber(dateFormat, dateStr, 'mm');
var year = this.parseDatePartNumber(dateFormat, dateStr, 'yyyy');
if (day !== -1 && month !== -1 && year !== -1) {
if (year < minYear || year > maxYear || month < 1 || month > 12) {
return returnDate;
}
var date = { year: year, month: month, day: day };
if (this.isDisabledDay(date, disableUntil, disableSince, disableWeekends, disableDays, disableDateRanges, enableDays)) {
return returnDate;
}
if (year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0)) {
daysInMonth[1] = 29;
}
if (day < 1 || day > daysInMonth[month - 1]) {
return returnDate;
}
// Valid date
return date;
}
return returnDate;
};
UtilService.prototype.getDateFormatSeparator = function (dateFormat) {
return dateFormat.replace(/[dmy]/g, '')[0];
};
UtilService.prototype.isMonthLabelValid = function (monthLabel, monthLabels) {
for (var key = 1; key <= 12; key++) {
if (monthLabel.toLowerCase() === monthLabels[key].toLowerCase()) {
return key;
}
}
return -1;
};
UtilService.prototype.isYearLabelValid = function (yearLabel, minYear, maxYear) {
if (yearLabel >= minYear && yearLabel <= maxYear) {
return yearLabel;
}
return -1;
};
UtilService.prototype.parseDatePartNumber = function (dateFormat, dateString, datePart) {
var pos = this.getDatePartIndex(dateFormat, datePart);
if (pos !== -1) {
var value = dateString.substring(pos, pos + datePart.length);
if (!/^\d+$/.test(value)) {
return -1;
}
return parseInt(value, 0);
}
return -1;
};
UtilService.prototype.parseDatePartMonthName = function (dateFormat, dateString, datePart, monthLabels) {
var pos = this.getDatePartIndex(dateFormat, datePart);
if (pos !== -1) {
return this.isMonthLabelValid(dateString.substring(pos, pos + datePart.length), monthLabels);
}
return -1;
};
UtilService.prototype.getDatePartIndex = function (dateFormat, datePart) {
return dateFormat.indexOf(datePart);
};
// parseDefaultMonth(monthString: string): IMyMonth {
UtilService.prototype.parseDefaultMonth = function (monthString) {
var month = { monthTxt: '', monthNbr: 0, year: 0 };
if (monthString !== '') {
var split = monthString.split(monthString.match(/[^0-9]/)[0]);
month.monthNbr = split[0].length === 2 ? parseInt(split[0], 0) : parseInt(split[1], 0);
month.year = split[0].length === 2 ? parseInt(split[1], 0) : parseInt(split[0], 0);
}
return month;
};
UtilService.prototype.isDisabledDay = function (date, disableUntil, disableSince, disableWeekends, disableDays, disableDateRanges, enableDays) {
for (var _i = 0, enableDays_1 = enableDays; _i < enableDays_1.length; _i++) {
var e = enableDays_1[_i];
if (e.year === date.year && e.month === date.month && e.day === date.day) {
return false;
}
}
var dateMs = this.getTimeInMilliseconds(date);
if (this.isInitializedDate(disableUntil) && dateMs <= this.getTimeInMilliseconds(disableUntil)) {
return true;
}
if (this.isInitializedDate(disableSince) && dateMs >= this.getTimeInMilliseconds(disableSince)) {
return true;
}
if (disableWeekends) {
var dn = this.getDayNumber(date);
if (dn === 0 || dn === 6) {
return true;
}
}
for (var _a = 0, disableDays_1 = disableDays; _a < disableDays_1.length; _a++) {
var d = disableDays_1[_a];
if (d.year === date.year && d.month === date.month && d.day === date.day) {
return true;
}
}
for (var _b = 0, disableDateRanges_1 = disableDateRanges; _b < disableDateRanges_1.length; _b++) {
var d = disableDateRanges_1[_b];
if (this.isInitializedDate(d.begin) &&
this.isInitializedDate(d.end) &&
dateMs >= this.getTimeInMilliseconds(d.begin) &&
dateMs <= this.getTimeInMilliseconds(d.end)) {
return true;
}
}
return false;
};
UtilService.prototype.isMarkedDate = function (date, markedDates, markWeekends) {
for (var _i = 0, markedDates_1 = markedDates; _i < markedDates_1.length; _i++) {
var md = markedDates_1[_i];
for (var _a = 0, _b = md.dates; _a < _b.length; _a++) {
var d = _b[_a];
if (d.year === date.year && d.month === date.month && d.day === date.day) {
return { marked: true, color: md.color };
}
}
}
if (markWeekends && markWeekends.marked) {
var dayNbr = this.getDayNumber(date);
if (dayNbr === 0 || dayNbr === 6) {
return { marked: true, color: markWeekends.color };
}
}
return { marked: false, color: '' };
};
UtilService.prototype.getWeekNumber = function (date) {
var d = new Date(date.year, date.month - 1, date.day, 0, 0, 0, 0);
d.setDate(d.getDate() + (d.getDay() === 0 ? -3 : 4 - d.getDay()));
return Math.round(((d.getTime() - new Date(d.getFullYear(), 0, 4).getTime()) / 86400000) / 7) + 1;
};
UtilService.prototype.isMonthDisabledByDisableUntil = function (date, disableUntil) {
return this.isInitializedDate(disableUntil) && this.getTimeInMilliseconds(date) <= this.getTimeInMilliseconds(disableUntil);
};
UtilService.prototype.isMonthDisabledByDisableSince = function (date, disableSince) {
return this.isInitializedDate(disableSince) && this.getTimeInMilliseconds(date) >= this.getTimeInMilliseconds(disableSince);
};
UtilService.prototype.isInitializedDate = function (date) {
return date.year !== 0 && date.month !== 0 && date.day !== 0;
};
UtilService.prototype.getTimeInMilliseconds = function (date) {
return new Date(date.year, date.month - 1, date.day, 0, 0, 0, 0).getTime();
};
UtilService.prototype.getDayNumber = function (date) {
var d = new Date(date.year, date.month - 1, date.day, 0, 0, 0, 0);
return d.getDay();
};
UtilService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], UtilService);
return UtilService;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/easy-charts/chart-simple.component.html":
/*!*************************************************************************!*\
!*** ./src/app/typescripts/pro/easy-charts/chart-simple.component.html ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<span class=\"min-chart\">\r\n <span class=\"percent\">{{ percent }}</span>\r\n <mdb-easy-pie-chart [percent]=\"percent\" [options]=\"options\"></mdb-easy-pie-chart>\r\n</span>"
/***/ }),
/***/ "./src/app/typescripts/pro/easy-charts/chart-simple.component.ts":
/*!***********************************************************************!*\
!*** ./src/app/typescripts/pro/easy-charts/chart-simple.component.ts ***!
\***********************************************************************/
/*! exports provided: SimpleChartComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleChartComponent", function() { return SimpleChartComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SimpleChartComponent = /** @class */ (function () {
function SimpleChartComponent() {
this.options = {
barColor: null,
trackColor: null,
scaleColor: null,
scaleLength: '',
lineCap: null,
lineWidth: null,
trackWidth: null,
size: null,
rotate: null,
duration: null,
enableAnimation: null,
animate: {
duration: 1000,
enabled: true
}
};
}
SimpleChartComponent.prototype.ngOnInit = function () {
this.options.barColor = '#' + this.barColor;
this.options.trackColor = '#' + this.trackColor;
this.options.scaleColor = '#' + this.scaleColor;
this.options.scaleLength = this.scaleLength;
this.options.lineCap = this.lineCap;
this.options.lineWidth = this.lineWidth;
this.options.trackWidth = this.trackWidth;
this.options.size = this.size;
this.options.rotate = this.rotate;
this.options.animate.duration = this.animate.duration;
this.options.animate.enabled = this.animate.enabled;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('percent'),
__metadata("design:type", Object)
], SimpleChartComponent.prototype, "percent", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('barColor'),
__metadata("design:type", String)
], SimpleChartComponent.prototype, "barColor", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('trackColor'),
__metadata("design:type", String)
], SimpleChartComponent.prototype, "trackColor", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('scaleColor'),
__metadata("design:type", String)
], SimpleChartComponent.prototype, "scaleColor", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('scaleLength'),
__metadata("design:type", Number)
], SimpleChartComponent.prototype, "scaleLength", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('lineCap'),
__metadata("design:type", String)
], SimpleChartComponent.prototype, "lineCap", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('lineWidth'),
__metadata("design:type", Number)
], SimpleChartComponent.prototype, "lineWidth", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('trackWidth'),
__metadata("design:type", Number)
], SimpleChartComponent.prototype, "trackWidth", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('size'),
__metadata("design:type", Number)
], SimpleChartComponent.prototype, "size", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('rotate'),
__metadata("design:type", Number)
], SimpleChartComponent.prototype, "rotate", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('animate'),
__metadata("design:type", Object)
], SimpleChartComponent.prototype, "animate", void 0);
SimpleChartComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-simple-chart',
template: __webpack_require__(/*! ./chart-simple.component.html */ "./src/app/typescripts/pro/easy-charts/chart-simple.component.html"),
styles: []
}),
__metadata("design:paramtypes", [])
], SimpleChartComponent);
return SimpleChartComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/easy-charts/chart-simple.module.ts":
/*!********************************************************************!*\
!*** ./src/app/typescripts/pro/easy-charts/chart-simple.module.ts ***!
\********************************************************************/
/*! exports provided: ChartSimpleModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartSimpleModule", function() { return ChartSimpleModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _chart_simple_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chart-simple.component */ "./src/app/typescripts/pro/easy-charts/chart-simple.component.ts");
/* harmony import */ var _chart_smallpie_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chart-smallpie.component */ "./src/app/typescripts/pro/easy-charts/chart-smallpie.component.ts");
var __decorate = (undefined && undefined.__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 ChartSimpleModule = /** @class */ (function () {
function ChartSimpleModule() {
}
ChartSimpleModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [
_chart_simple_component__WEBPACK_IMPORTED_MODULE_1__["SimpleChartComponent"], _chart_smallpie_component__WEBPACK_IMPORTED_MODULE_2__["EasyPieChartComponent"]
],
exports: [
_chart_simple_component__WEBPACK_IMPORTED_MODULE_1__["SimpleChartComponent"], _chart_smallpie_component__WEBPACK_IMPORTED_MODULE_2__["EasyPieChartComponent"]
],
imports: []
})
], ChartSimpleModule);
return ChartSimpleModule;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/easy-charts/chart-smallpie.component.ts":
/*!*************************************************************************!*\
!*** ./src/app/typescripts/pro/easy-charts/chart-smallpie.component.ts ***!
\*************************************************************************/
/*! exports provided: EasyPieChartComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EasyPieChartComponent", function() { return EasyPieChartComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var EasyPieChartComponent = /** @class */ (function () {
function EasyPieChartComponent(el, platformId) {
this.isBrowser = false;
this.isBrowser = Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["isPlatformBrowser"])(platformId);
this.element = el;
var options = {
barColor: '#ef1e25',
trackColor: '#f9f9f9',
scaleColor: '#dfe0e0',
scaleLength: 5,
lineCap: 'round',
lineWidth: 3,
size: 110,
rotate: 0,
animate: {
duration: 1000,
enabled: true
}
};
this.options = Object.assign(options, this.options);
}
EasyPieChartComponent.prototype.ngOnInit = function () {
if (this.isBrowser) {
this.element.nativeElement.innerHTML = '';
this.pieChart = new EasyPieChart(this.element.nativeElement, this.options);
this.pieChart.update(this.percent);
}
};
EasyPieChartComponent.prototype.ngOnChanges = function (changes) {
if (!changes['percent'].isFirstChange()) {
this.pieChart.update(this.percent);
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('percent'),
__metadata("design:type", Object)
], EasyPieChartComponent.prototype, "percent", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('options'),
__metadata("design:type", Object)
], EasyPieChartComponent.prototype, "options", void 0);
EasyPieChartComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-easy-pie-chart',
template: '<div>Loading</div>'
}),
__param(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"])),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], String])
], EasyPieChartComponent);
return EasyPieChartComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/easy-charts/index.ts":
/*!******************************************************!*\
!*** ./src/app/typescripts/pro/easy-charts/index.ts ***!
\******************************************************/
/*! exports provided: SimpleChartComponent, EasyPieChartComponent, ChartSimpleModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _chart_simple_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chart-simple.component */ "./src/app/typescripts/pro/easy-charts/chart-simple.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleChartComponent", function() { return _chart_simple_component__WEBPACK_IMPORTED_MODULE_0__["SimpleChartComponent"]; });
/* harmony import */ var _chart_smallpie_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chart-smallpie.component */ "./src/app/typescripts/pro/easy-charts/chart-smallpie.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EasyPieChartComponent", function() { return _chart_smallpie_component__WEBPACK_IMPORTED_MODULE_1__["EasyPieChartComponent"]; });
/* harmony import */ var _chart_simple_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chart-simple.module */ "./src/app/typescripts/pro/easy-charts/chart-simple.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartSimpleModule", function() { return _chart_simple_module__WEBPACK_IMPORTED_MODULE_2__["ChartSimpleModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/file-input/classes/mdb-uploader.class.ts":
/*!**************************************************************************!*\
!*** ./src/app/typescripts/pro/file-input/classes/mdb-uploader.class.ts ***!
\**************************************************************************/
/*! exports provided: UploadStatus, humanizeBytes, MDBUploaderService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UploadStatus", function() { return UploadStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "humanizeBytes", function() { return humanizeBytes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBUploaderService", function() { return MDBUploaderService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var rxjs_add_observable_merge__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/add/observable/merge */ "./node_modules/rxjs-compat/_esm5/add/observable/merge.js");
/* harmony import */ var rxjs_add_observable_from__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/add/observable/from */ "./node_modules/rxjs-compat/_esm5/add/observable/from.js");
/* harmony import */ var rxjs_add_operator_mergeAll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/add/operator/mergeAll */ "./node_modules/rxjs-compat/_esm5/add/operator/mergeAll.js");
/* harmony import */ var rxjs_add_operator_combineLatest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/add/operator/combineLatest */ "./node_modules/rxjs-compat/_esm5/add/operator/combineLatest.js");
// import { Subscriber } from 'rxjs/Subscriber';
var UploadStatus;
(function (UploadStatus) {
UploadStatus[UploadStatus["Queue"] = 0] = "Queue";
UploadStatus[UploadStatus["Uploading"] = 1] = "Uploading";
UploadStatus[UploadStatus["Done"] = 2] = "Done";
UploadStatus[UploadStatus["Canceled"] = 3] = "Canceled";
})(UploadStatus || (UploadStatus = {}));
function humanizeBytes(bytes) {
if (bytes === 0) {
return '0 Byte';
}
var k = 1024;
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];
var i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
}
var MDBUploaderService = /** @class */ (function () {
function MDBUploaderService() {
this.setToNullValue = null;
this.files = [];
this.serviceEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.uploads = [];
}
MDBUploaderService.prototype.handleFiles = function (files) {
var _this = this;
this.fileList = files;
this.files = [].map.call(files, function (file, i) {
// const uploadFile: UploadFile = {
var uploadFile = {
fileIndex: i,
id: _this.generateId(),
name: file.name,
size: file.size,
type: file.type,
progress: {
status: UploadStatus.Queue,
data: {
percentage: 0,
speed: null,
speedHuman: null
}
},
lastModifiedDate: file.lastModifiedDate
};
_this.serviceEvents.emit({ type: 'addedToQueue', file: uploadFile });
return uploadFile;
});
this.serviceEvents.emit({ type: 'allAddedToQueue' });
};
MDBUploaderService.prototype.initInputEvents = function (input) {
var _this = this;
// input.subscribe((event: UploadInput) => {
// input.subscribe((event: UploadInput) => {
input.subscribe(function (event) {
switch (event.type) {
case 'uploadFile':
_this.serviceEvents.emit({ type: 'start', file: event.file });
var sub = _this.uploadFile(event.file, event).subscribe(function (data) {
_this.serviceEvents.emit(data);
});
_this.uploads.push({ file: event.file, sub: sub });
break;
case 'uploadAll':
// Lines 118, 121 and 129 commented due to ts comipilator check “noUnusedLocals”: true, “noUnusedParameters”: true,
// const concurrency = event.concurrency > 0 ? event.concurrency : Number.POSITIVE_INFINITY;
// const subscriber = Subscriber.create((data: UploadOutput) => {
// this.serviceEvents.emit(data);
// });
_this.uploads = _this.uploads.concat(_this.files.map(function (file) {
return { file: file, sub: _this.setToNullValue };
}));
// const subscription = Observable.from(this.files.map(file => this.uploadFile(file, event)))
// .mergeAll(concurrency)
// .combineLatest(data => data)
// .subscribe(subscriber);
break;
case 'cancel':
var id_1 = event.id || null;
if (!id_1) {
return;
}
// const index = this.uploads.findIndex(upload => upload.file.id === id);
var index = _this.uploads.findIndex(function (upload) { return upload.file.id === id_1; });
if (index !== -1) {
if (_this.uploads[index].sub) {
_this.uploads[index].sub.unsubscribe();
}
_this.serviceEvents.emit({ type: 'cancelled', file: _this.uploads[index].file });
_this.uploads[index].file.progress.status = UploadStatus.Canceled;
}
break;
case 'cancelAll':
// this.uploads.forEach(upload => {
_this.uploads.forEach(function (upload) {
upload.file.progress.status = UploadStatus.Canceled;
_this.serviceEvents.emit({ type: 'cancelled', file: upload.file });
});
break;
}
});
};
// uploadFile(file: UploadFile, event: UploadInput): Observable<UploadOutput> {
MDBUploaderService.prototype.uploadFile = function (file, event) {
var _this = this;
return new rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (observer) {
var url = event.url;
var method = event.method || 'POST';
var data = event.data || {};
var headers = event.headers || {};
var reader = new FileReader();
var xhr = new XMLHttpRequest();
var time = new Date().getTime();
var load = 0;
xhr.upload.addEventListener('progress', function (e) {
if (e.lengthComputable) {
var percentage = Math.round((e.loaded * 100) / e.total);
var diff = new Date().getTime() - time;
time += diff;
load = e.loaded - load;
var speed = parseInt((load / diff * 1000), 10);
file.progress = {
status: UploadStatus.Uploading,
data: {
percentage: percentage,
speed: speed,
speedHuman: humanizeBytes(speed) + "/s"
}
};
observer.next({ type: 'uploading', file: file });
}
}, false);
xhr.upload.addEventListener('error', function (e) {
observer.error(e);
observer.complete();
});
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE) {
file.progress = {
status: UploadStatus.Done,
data: {
percentage: 100,
speed: null,
speedHuman: null
}
};
try {
file.response = JSON.parse(xhr.response);
}
catch (e) {
file.response = xhr.response;
}
observer.next({ type: 'done', file: file });
observer.complete();
}
};
xhr.open(method, url, true);
var form = new FormData();
try {
var uploadFile_1 = _this.fileList.item(file.fileIndex);
var uploadIndex = _this.uploads.findIndex(function (upload) { return upload.file.size === uploadFile_1.size; });
if (_this.uploads[uploadIndex].file.progress.status === UploadStatus.Canceled) {
observer.complete();
}
form.append('file', uploadFile_1, uploadFile_1.name);
Object.keys(data).forEach(function (key) { return form.append(key, data[key]); });
Object.keys(headers).forEach(function (key) { return xhr.setRequestHeader(key, headers[key]); });
_this.serviceEvents.emit({ type: 'start', file: file });
xhr.send(form);
}
catch (e) {
observer.complete();
}
return function () {
xhr.abort();
reader.abort();
};
});
};
MDBUploaderService.prototype.generateId = function () {
return Math.random().toString(36).substring(7);
};
return MDBUploaderService;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/file-input/directives/mdb-file-drop.directive.ts":
/*!**********************************************************************************!*\
!*** ./src/app/typescripts/pro/file-input/directives/mdb-file-drop.directive.ts ***!
\**********************************************************************************/
/*! exports provided: MDBFileDropDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBFileDropDirective", function() { return MDBFileDropDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _classes_mdb_uploader_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../classes/mdb-uploader.class */ "./src/app/typescripts/pro/file-input/classes/mdb-uploader.class.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var MDBFileDropDirective = /** @class */ (function () {
function MDBFileDropDirective(platform_id, elementRef) {
this.platform_id = platform_id;
this.elementRef = elementRef;
this.isServer = Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["isPlatformServer"])(this.platform_id);
this.stopEvent = function (e) {
e.stopPropagation();
e.preventDefault();
};
this.upload = new _classes_mdb_uploader_class__WEBPACK_IMPORTED_MODULE_2__["MDBUploaderService"]();
this.uploadOutput = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
}
MDBFileDropDirective.prototype.ngOnInit = function () {
var _this = this;
if (this.isServer) {
return;
}
this.el = this.elementRef.nativeElement;
this.upload.serviceEvents.subscribe(function (event) {
_this.uploadOutput.emit(event);
});
if (this.uploadInput instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) {
this.upload.initInputEvents(this.uploadInput);
}
this.el.addEventListener('drop', this.stopEvent, false);
this.el.addEventListener('dragenter', this.stopEvent, false);
this.el.addEventListener('dragover', this.stopEvent, false);
this.el.addEventListener('dragover', this.stopEvent, false);
};
MDBFileDropDirective.prototype.ngOnDestroy = function () {
if (this.isServer) {
return;
}
this.uploadInput.unsubscribe();
};
MDBFileDropDirective.prototype.onDrop = function (e) {
e.stopPropagation();
e.preventDefault();
var event = { type: 'drop' };
this.uploadOutput.emit(event);
this.upload.handleFiles(e.dataTransfer.files);
};
MDBFileDropDirective.prototype.onDragOver = function (e) {
if (!e) {
return;
}
var event = { type: 'dragOver' };
this.uploadOutput.emit(event);
};
MDBFileDropDirective.prototype.onDragLeave = function (e) {
if (!e) {
return;
}
var event = { type: 'dragOut' };
this.uploadOutput.emit(event);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MDBFileDropDirective.prototype, "uploadInput", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MDBFileDropDirective.prototype, "uploadOutput", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('drop', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], MDBFileDropDirective.prototype, "onDrop", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('dragover', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Event]),
__metadata("design:returntype", void 0)
], MDBFileDropDirective.prototype, "onDragOver", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('dragleave', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Event]),
__metadata("design:returntype", void 0)
], MDBFileDropDirective.prototype, "onDragLeave", null);
MDBFileDropDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbFileDrop]'
}),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"])),
__metadata("design:paramtypes", [Object, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], MDBFileDropDirective);
return MDBFileDropDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/file-input/directives/mdb-file-select.directive.ts":
/*!************************************************************************************!*\
!*** ./src/app/typescripts/pro/file-input/directives/mdb-file-select.directive.ts ***!
\************************************************************************************/
/*! exports provided: MDBFileSelectDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBFileSelectDirective", function() { return MDBFileSelectDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _classes_mdb_uploader_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../classes/mdb-uploader.class */ "./src/app/typescripts/pro/file-input/classes/mdb-uploader.class.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var MDBFileSelectDirective = /** @class */ (function () {
function MDBFileSelectDirective(platform_id, elementRef) {
var _this = this;
this.platform_id = platform_id;
this.elementRef = elementRef;
this.isServer = Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["isPlatformServer"])(this.platform_id);
this.fileListener = function () {
_this.upload.handleFiles(_this.el.files);
};
this.upload = new _classes_mdb_uploader_class__WEBPACK_IMPORTED_MODULE_2__["MDBUploaderService"]();
this.uploadOutput = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
}
MDBFileSelectDirective.prototype.ngOnInit = function () {
var _this = this;
if (this.isServer) {
return;
}
this.el = this.elementRef.nativeElement;
this.el.addEventListener('change', this.fileListener, false);
this.upload.serviceEvents.subscribe(function (event) {
_this.uploadOutput.emit(event);
});
if (this.uploadInput instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) {
this.upload.initInputEvents(this.uploadInput);
}
};
MDBFileSelectDirective.prototype.ngOnDestroy = function () {
if (this.isServer) {
return;
}
this.el.removeEventListener('change', this.fileListener, false);
this.uploadInput.unsubscribe();
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MDBFileSelectDirective.prototype, "uploadInput", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MDBFileSelectDirective.prototype, "uploadOutput", void 0);
MDBFileSelectDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbFileSelect]'
}),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"])),
__metadata("design:paramtypes", [Object, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], MDBFileSelectDirective);
return MDBFileSelectDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/file-input/index.ts":
/*!*****************************************************!*\
!*** ./src/app/typescripts/pro/file-input/index.ts ***!
\*****************************************************/
/*! exports provided: MDBUploaderModule, UploadStatus, humanizeBytes, MDBUploaderService, MDBFileSelectDirective, MDBFileDropDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _module_mdb_uploader_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./module/mdb-uploader.module */ "./src/app/typescripts/pro/file-input/module/mdb-uploader.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBUploaderModule", function() { return _module_mdb_uploader_module__WEBPACK_IMPORTED_MODULE_0__["MDBUploaderModule"]; });
/* harmony import */ var _classes_mdb_uploader_class__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/mdb-uploader.class */ "./src/app/typescripts/pro/file-input/classes/mdb-uploader.class.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UploadStatus", function() { return _classes_mdb_uploader_class__WEBPACK_IMPORTED_MODULE_1__["UploadStatus"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "humanizeBytes", function() { return _classes_mdb_uploader_class__WEBPACK_IMPORTED_MODULE_1__["humanizeBytes"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBUploaderService", function() { return _classes_mdb_uploader_class__WEBPACK_IMPORTED_MODULE_1__["MDBUploaderService"]; });
/* harmony import */ var _directives_mdb_file_select_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./directives/mdb-file-select.directive */ "./src/app/typescripts/pro/file-input/directives/mdb-file-select.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBFileSelectDirective", function() { return _directives_mdb_file_select_directive__WEBPACK_IMPORTED_MODULE_2__["MDBFileSelectDirective"]; });
/* harmony import */ var _directives_mdb_file_drop_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./directives/mdb-file-drop.directive */ "./src/app/typescripts/pro/file-input/directives/mdb-file-drop.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBFileDropDirective", function() { return _directives_mdb_file_drop_directive__WEBPACK_IMPORTED_MODULE_3__["MDBFileDropDirective"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/file-input/module/mdb-uploader.module.ts":
/*!**************************************************************************!*\
!*** ./src/app/typescripts/pro/file-input/module/mdb-uploader.module.ts ***!
\**************************************************************************/
/*! exports provided: MDBUploaderModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBUploaderModule", function() { return MDBUploaderModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _directives_mdb_file_drop_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../directives/mdb-file-drop.directive */ "./src/app/typescripts/pro/file-input/directives/mdb-file-drop.directive.ts");
/* harmony import */ var _directives_mdb_file_select_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../directives/mdb-file-select.directive */ "./src/app/typescripts/pro/file-input/directives/mdb-file-select.directive.ts");
var __decorate = (undefined && undefined.__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 MDBUploaderModule = /** @class */ (function () {
function MDBUploaderModule() {
}
MDBUploaderModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [
_directives_mdb_file_select_directive__WEBPACK_IMPORTED_MODULE_2__["MDBFileSelectDirective"],
_directives_mdb_file_drop_directive__WEBPACK_IMPORTED_MODULE_1__["MDBFileDropDirective"]
],
exports: [
_directives_mdb_file_select_directive__WEBPACK_IMPORTED_MODULE_2__["MDBFileSelectDirective"],
_directives_mdb_file_drop_directive__WEBPACK_IMPORTED_MODULE_1__["MDBFileDropDirective"]
]
})
], MDBUploaderModule);
return MDBUploaderModule;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/index.ts":
/*!******************************************!*\
!*** ./src/app/typescripts/pro/index.ts ***!
\******************************************/
/*! exports provided: Ng2CompleterModule, CompleterComponent, CompleterListItemComponent, CompleterService, LocalDataFactoryProvider, RemoteDataFactoryProvider, MdbCompleterDirective, MdbDropdownDirective, MdbInputDirective, MdbListDirective, MdbRowDirective, CardsModule, CardRotatingComponent, CardRevealComponent, ProgressbarComponent, ProgressbarConfigComponent, ProgressbarModule, ProgressBars, ProgressDirective, ProgressSpinnerComponent, BarComponent, MaterialChipsComponent, MaterialChipsModule, TabDirective, TabHeadingDirective, TabsetComponent, TabsetConfig, TabsModule, NgTranscludeDirective, MDBSpinningPreloader, SelectModule, Diacritics, Option, OptionList, SELECT_VALUE_ACCESSOR, SelectComponent, SelectDropdownComponent, MDBDatePickerComponent, MDBDatePickerModule, InputAutoFillDirective, MYDP_VALUE_ACCESSOR, UtilService, LocaleService, FocusDirective, TimePickerModule, ClockPickerComponent, LightBoxModule, ImageModalComponent, SidenavComponent, SidenavModule, ChartSimpleModule, EasyPieChartComponent, SimpleChartComponent, SBItemComponent, SBItemBodyComponent, SBItemHeadComponent, SqueezeBoxComponent, SqueezeBoxModule, MdbStickyDirective, MdbStickyModule, MDBPageScrollModule, PageScrollDirective, PageScrollConfig, PageScrollInstance, PageScrollService, PageScrollUtilService, EasingLogic, CharCounterDirective, CharCounterModule, MDBFileDropDirective, MDBFileSelectDirective, MDBUploaderModule, MDBUploaderService, humanizeBytes, MDBRootModulePro, MDBBootstrapModulePro */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBRootModulePro", function() { return MDBRootModulePro; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBBootstrapModulePro", function() { return MDBBootstrapModulePro; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _autocomplete__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./autocomplete */ "./src/app/typescripts/pro/autocomplete/index.ts");
/* harmony import */ var _cards___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cards/ */ "./src/app/typescripts/pro/cards/index.ts");
/* harmony import */ var _file_input___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./file-input/ */ "./src/app/typescripts/pro/file-input/index.ts");
/* harmony import */ var _tags___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tags/ */ "./src/app/typescripts/pro/tags/index.ts");
/* harmony import */ var _progressbars___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./progressbars/ */ "./src/app/typescripts/pro/progressbars/index.ts");
/* harmony import */ var _tabs_pills___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tabs-pills/ */ "./src/app/typescripts/pro/tabs-pills/index.ts");
/* harmony import */ var _material_select___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./material-select/ */ "./src/app/typescripts/pro/material-select/index.ts");
/* harmony import */ var _date_picker___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./date-picker/ */ "./src/app/typescripts/pro/date-picker/index.ts");
/* harmony import */ var _time_picker___WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./time-picker/ */ "./src/app/typescripts/pro/time-picker/index.ts");
/* harmony import */ var _lightbox_light_box_module__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./lightbox/light-box.module */ "./src/app/typescripts/pro/lightbox/light-box.module.ts");
/* harmony import */ var _sidenav___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sidenav/ */ "./src/app/typescripts/pro/sidenav/index.ts");
/* harmony import */ var _easy_charts___WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./easy-charts/ */ "./src/app/typescripts/pro/easy-charts/index.ts");
/* harmony import */ var _accordion___WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./accordion/ */ "./src/app/typescripts/pro/accordion/index.ts");
/* harmony import */ var _sticky_content___WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sticky-content/ */ "./src/app/typescripts/pro/sticky-content/index.ts");
/* harmony import */ var _smoothscroll_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./smoothscroll/index */ "./src/app/typescripts/pro/smoothscroll/index.ts");
/* harmony import */ var _inputs___WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./inputs/ */ "./src/app/typescripts/pro/inputs/index.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ng2CompleterModule", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["Ng2CompleterModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompleterComponent", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["CompleterComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompleterListItemComponent", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["CompleterListItemComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompleterService", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["CompleterService"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalDataFactoryProvider", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["LocalDataFactoryProvider"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RemoteDataFactoryProvider", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["RemoteDataFactoryProvider"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbCompleterDirective", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["MdbCompleterDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbDropdownDirective", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["MdbDropdownDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbInputDirective", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["MdbInputDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbListDirective", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["MdbListDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbRowDirective", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_1__["MdbRowDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardsModule", function() { return _cards___WEBPACK_IMPORTED_MODULE_2__["CardsModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardRotatingComponent", function() { return _cards___WEBPACK_IMPORTED_MODULE_2__["CardRotatingComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardRevealComponent", function() { return _cards___WEBPACK_IMPORTED_MODULE_2__["CardRevealComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressbarComponent", function() { return _progressbars___WEBPACK_IMPORTED_MODULE_5__["ProgressbarComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressbarConfigComponent", function() { return _progressbars___WEBPACK_IMPORTED_MODULE_5__["ProgressbarConfigComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressbarModule", function() { return _progressbars___WEBPACK_IMPORTED_MODULE_5__["ProgressbarModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressBars", function() { return _progressbars___WEBPACK_IMPORTED_MODULE_5__["ProgressBars"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressDirective", function() { return _progressbars___WEBPACK_IMPORTED_MODULE_5__["ProgressDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressSpinnerComponent", function() { return _progressbars___WEBPACK_IMPORTED_MODULE_5__["ProgressSpinnerComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BarComponent", function() { return _progressbars___WEBPACK_IMPORTED_MODULE_5__["BarComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaterialChipsComponent", function() { return _tags___WEBPACK_IMPORTED_MODULE_4__["MaterialChipsComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaterialChipsModule", function() { return _tags___WEBPACK_IMPORTED_MODULE_4__["MaterialChipsModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabDirective", function() { return _tabs_pills___WEBPACK_IMPORTED_MODULE_6__["TabDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabHeadingDirective", function() { return _tabs_pills___WEBPACK_IMPORTED_MODULE_6__["TabHeadingDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabsetComponent", function() { return _tabs_pills___WEBPACK_IMPORTED_MODULE_6__["TabsetComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabsetConfig", function() { return _tabs_pills___WEBPACK_IMPORTED_MODULE_6__["TabsetConfig"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabsModule", function() { return _tabs_pills___WEBPACK_IMPORTED_MODULE_6__["TabsModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NgTranscludeDirective", function() { return _tabs_pills___WEBPACK_IMPORTED_MODULE_6__["NgTranscludeDirective"]; });
/* harmony import */ var _preloader_preloader_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./preloader/preloader.service */ "./src/app/typescripts/pro/preloader/preloader.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBSpinningPreloader", function() { return _preloader_preloader_service__WEBPACK_IMPORTED_MODULE_17__["MDBSpinningPreloader"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectModule", function() { return _material_select___WEBPACK_IMPORTED_MODULE_7__["SelectModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Diacritics", function() { return _material_select___WEBPACK_IMPORTED_MODULE_7__["Diacritics"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Option", function() { return _material_select___WEBPACK_IMPORTED_MODULE_7__["Option"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OptionList", function() { return _material_select___WEBPACK_IMPORTED_MODULE_7__["OptionList"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SELECT_VALUE_ACCESSOR", function() { return _material_select___WEBPACK_IMPORTED_MODULE_7__["SELECT_VALUE_ACCESSOR"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectComponent", function() { return _material_select___WEBPACK_IMPORTED_MODULE_7__["SelectComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectDropdownComponent", function() { return _material_select___WEBPACK_IMPORTED_MODULE_7__["SelectDropdownComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBDatePickerComponent", function() { return _date_picker___WEBPACK_IMPORTED_MODULE_8__["MDBDatePickerComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBDatePickerModule", function() { return _date_picker___WEBPACK_IMPORTED_MODULE_8__["MDBDatePickerModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputAutoFillDirective", function() { return _date_picker___WEBPACK_IMPORTED_MODULE_8__["InputAutoFillDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MYDP_VALUE_ACCESSOR", function() { return _date_picker___WEBPACK_IMPORTED_MODULE_8__["MYDP_VALUE_ACCESSOR"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UtilService", function() { return _date_picker___WEBPACK_IMPORTED_MODULE_8__["UtilService"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocaleService", function() { return _date_picker___WEBPACK_IMPORTED_MODULE_8__["LocaleService"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FocusDirective", function() { return _date_picker___WEBPACK_IMPORTED_MODULE_8__["FocusDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimePickerModule", function() { return _time_picker___WEBPACK_IMPORTED_MODULE_9__["TimePickerModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClockPickerComponent", function() { return _time_picker___WEBPACK_IMPORTED_MODULE_9__["ClockPickerComponent"]; });
/* harmony import */ var _lightbox___WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./lightbox/ */ "./src/app/typescripts/pro/lightbox/index.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LightBoxModule", function() { return _lightbox___WEBPACK_IMPORTED_MODULE_18__["LightBoxModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageModalComponent", function() { return _lightbox___WEBPACK_IMPORTED_MODULE_18__["ImageModalComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SidenavComponent", function() { return _sidenav___WEBPACK_IMPORTED_MODULE_11__["SidenavComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SidenavModule", function() { return _sidenav___WEBPACK_IMPORTED_MODULE_11__["SidenavModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartSimpleModule", function() { return _easy_charts___WEBPACK_IMPORTED_MODULE_12__["ChartSimpleModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EasyPieChartComponent", function() { return _easy_charts___WEBPACK_IMPORTED_MODULE_12__["EasyPieChartComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleChartComponent", function() { return _easy_charts___WEBPACK_IMPORTED_MODULE_12__["SimpleChartComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SBItemComponent", function() { return _accordion___WEBPACK_IMPORTED_MODULE_13__["SBItemComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SBItemBodyComponent", function() { return _accordion___WEBPACK_IMPORTED_MODULE_13__["SBItemBodyComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SBItemHeadComponent", function() { return _accordion___WEBPACK_IMPORTED_MODULE_13__["SBItemHeadComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SqueezeBoxComponent", function() { return _accordion___WEBPACK_IMPORTED_MODULE_13__["SqueezeBoxComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SqueezeBoxModule", function() { return _accordion___WEBPACK_IMPORTED_MODULE_13__["SqueezeBoxModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbStickyDirective", function() { return _sticky_content___WEBPACK_IMPORTED_MODULE_14__["MdbStickyDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbStickyModule", function() { return _sticky_content___WEBPACK_IMPORTED_MODULE_14__["MdbStickyModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBPageScrollModule", function() { return _smoothscroll_index__WEBPACK_IMPORTED_MODULE_15__["MDBPageScrollModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageScrollDirective", function() { return _smoothscroll_index__WEBPACK_IMPORTED_MODULE_15__["PageScrollDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageScrollConfig", function() { return _smoothscroll_index__WEBPACK_IMPORTED_MODULE_15__["PageScrollConfig"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageScrollInstance", function() { return _smoothscroll_index__WEBPACK_IMPORTED_MODULE_15__["PageScrollInstance"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageScrollService", function() { return _smoothscroll_index__WEBPACK_IMPORTED_MODULE_15__["PageScrollService"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageScrollUtilService", function() { return _smoothscroll_index__WEBPACK_IMPORTED_MODULE_15__["PageScrollUtilService"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EasingLogic", function() { return _smoothscroll_index__WEBPACK_IMPORTED_MODULE_15__["EasingLogic"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CharCounterDirective", function() { return _inputs___WEBPACK_IMPORTED_MODULE_16__["CharCounterDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CharCounterModule", function() { return _inputs___WEBPACK_IMPORTED_MODULE_16__["CharCounterModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBFileDropDirective", function() { return _file_input___WEBPACK_IMPORTED_MODULE_3__["MDBFileDropDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBFileSelectDirective", function() { return _file_input___WEBPACK_IMPORTED_MODULE_3__["MDBFileSelectDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBUploaderModule", function() { return _file_input___WEBPACK_IMPORTED_MODULE_3__["MDBUploaderModule"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBUploaderService", function() { return _file_input___WEBPACK_IMPORTED_MODULE_3__["MDBUploaderService"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "humanizeBytes", function() { return _file_input___WEBPACK_IMPORTED_MODULE_3__["humanizeBytes"]; });
var __decorate = (undefined && undefined.__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;
};
// export {
// ToastComponent, ToastContainerDirective, ToastContainerModule, ToastInjector, ToastPackage, ToastRef, ToastIconClasses,
// ToastModule, ToastService, GlobalConfig, IndividualConfig, Overlay, OVERLAY_PROVIDERS, OverlayContainer, OverlayRef
// } from './alerts/';
var MODULES = [
_autocomplete__WEBPACK_IMPORTED_MODULE_1__["Ng2CompleterModule"],
_cards___WEBPACK_IMPORTED_MODULE_2__["CardsModule"],
_file_input___WEBPACK_IMPORTED_MODULE_3__["MDBUploaderModule"],
_tags___WEBPACK_IMPORTED_MODULE_4__["MaterialChipsModule"],
_progressbars___WEBPACK_IMPORTED_MODULE_5__["ProgressBars"],
_tabs_pills___WEBPACK_IMPORTED_MODULE_6__["TabsModule"],
_material_select___WEBPACK_IMPORTED_MODULE_7__["SelectModule"],
_date_picker___WEBPACK_IMPORTED_MODULE_8__["MDBDatePickerModule"],
_time_picker___WEBPACK_IMPORTED_MODULE_9__["TimePickerModule"],
_lightbox_light_box_module__WEBPACK_IMPORTED_MODULE_10__["LightBoxModule"],
_sidenav___WEBPACK_IMPORTED_MODULE_11__["SidenavModule"],
_easy_charts___WEBPACK_IMPORTED_MODULE_12__["ChartSimpleModule"],
_accordion___WEBPACK_IMPORTED_MODULE_13__["SqueezeBoxModule"],
_sticky_content___WEBPACK_IMPORTED_MODULE_14__["MdbStickyModule"],
_smoothscroll_index__WEBPACK_IMPORTED_MODULE_15__["MDBPageScrollModule"],
_inputs___WEBPACK_IMPORTED_MODULE_16__["CharCounterModule"]
];
var MDBRootModulePro = /** @class */ (function () {
function MDBRootModulePro() {
}
MDBRootModulePro = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [
_autocomplete__WEBPACK_IMPORTED_MODULE_1__["Ng2CompleterModule"],
_cards___WEBPACK_IMPORTED_MODULE_2__["CardsModule"].forRoot(),
_tags___WEBPACK_IMPORTED_MODULE_4__["MaterialChipsModule"],
_progressbars___WEBPACK_IMPORTED_MODULE_5__["ProgressBars"].forRoot(),
_tabs_pills___WEBPACK_IMPORTED_MODULE_6__["TabsModule"].forRoot(),
_material_select___WEBPACK_IMPORTED_MODULE_7__["SelectModule"],
_date_picker___WEBPACK_IMPORTED_MODULE_8__["MDBDatePickerModule"],
_time_picker___WEBPACK_IMPORTED_MODULE_9__["TimePickerModule"],
_lightbox_light_box_module__WEBPACK_IMPORTED_MODULE_10__["LightBoxModule"],
_sidenav___WEBPACK_IMPORTED_MODULE_11__["SidenavModule"],
_easy_charts___WEBPACK_IMPORTED_MODULE_12__["ChartSimpleModule"],
_accordion___WEBPACK_IMPORTED_MODULE_13__["SqueezeBoxModule"],
_sticky_content___WEBPACK_IMPORTED_MODULE_14__["MdbStickyModule"],
_smoothscroll_index__WEBPACK_IMPORTED_MODULE_15__["MDBPageScrollModule"].forRoot(),
_inputs___WEBPACK_IMPORTED_MODULE_16__["CharCounterModule"].forRoot()
],
exports: MODULES,
providers: [],
schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["NO_ERRORS_SCHEMA"]]
})
], MDBRootModulePro);
return MDBRootModulePro;
}());
var MDBBootstrapModulePro = /** @class */ (function () {
function MDBBootstrapModulePro() {
}
MDBBootstrapModulePro.forRoot = function () {
return { ngModule: MDBRootModulePro };
};
MDBBootstrapModulePro = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({ exports: MODULES })
], MDBBootstrapModulePro);
return MDBBootstrapModulePro;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/inputs/char-counter.directive.ts":
/*!******************************************************************!*\
!*** ./src/app/typescripts/pro/inputs/char-counter.directive.ts ***!
\******************************************************************/
/*! exports provided: CharCounterDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CharCounterDirective", function() { return CharCounterDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var CharCounterDirective = /** @class */ (function () {
function CharCounterDirective(_elRef, _renderer) {
this._elRef = _elRef;
this._renderer = _renderer;
this.length = 20;
}
CharCounterDirective.prototype.ngOnInit = function () {
// Inititalise a new <span> element for the count display and render it below the host component.
this.textContainer = this._renderer.createElement(this._elRef.nativeElement.parentElement, 'p');
this._renderer.setElementClass(this.textContainer, 'chars', true);
this.textContainer.innerHTML = '0/' + this.length;
this._renderer.setElementStyle(this.textContainer, 'display', 'none');
};
CharCounterDirective.prototype.onKeyUp = function () {
this.textContainer.innerHTML = this._elRef.nativeElement.value.length + '/' + this.length;
if (this._elRef.nativeElement.value.length > this.length) {
this._renderer.setElementClass(this._elRef.nativeElement, 'invalid', true);
}
else {
this._renderer.setElementClass(this._elRef.nativeElement, 'invalid', false);
}
};
CharCounterDirective.prototype.hide = function () {
this._renderer.setElementStyle(this.textContainer, 'display', 'none');
};
CharCounterDirective.prototype.show = function () {
this._renderer.setElementStyle(this.textContainer, 'display', 'block');
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CharCounterDirective.prototype, "length", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('keyup', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], CharCounterDirective.prototype, "onKeyUp", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('blur', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], CharCounterDirective.prototype, "hide", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('focus', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], CharCounterDirective.prototype, "show", null);
CharCounterDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbCharCounter]'
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], CharCounterDirective);
return CharCounterDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/inputs/char-counter.module.ts":
/*!***************************************************************!*\
!*** ./src/app/typescripts/pro/inputs/char-counter.module.ts ***!
\***************************************************************/
/*! exports provided: CharCounterModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CharCounterModule", function() { return CharCounterModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _char_counter_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./char-counter.directive */ "./src/app/typescripts/pro/inputs/char-counter.directive.ts");
var __decorate = (undefined && undefined.__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 CharCounterModule = /** @class */ (function () {
function CharCounterModule() {
}
CharCounterModule_1 = CharCounterModule;
CharCounterModule.forRoot = function () {
return { ngModule: CharCounterModule_1, providers: [] };
};
CharCounterModule = CharCounterModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [_char_counter_directive__WEBPACK_IMPORTED_MODULE_1__["CharCounterDirective"]],
exports: [_char_counter_directive__WEBPACK_IMPORTED_MODULE_1__["CharCounterDirective"]]
})
], CharCounterModule);
return CharCounterModule;
var CharCounterModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/inputs/index.ts":
/*!*************************************************!*\
!*** ./src/app/typescripts/pro/inputs/index.ts ***!
\*************************************************/
/*! exports provided: CharCounterDirective, CharCounterModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _char_counter_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./char-counter.directive */ "./src/app/typescripts/pro/inputs/char-counter.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CharCounterDirective", function() { return _char_counter_directive__WEBPACK_IMPORTED_MODULE_0__["CharCounterDirective"]; });
/* harmony import */ var _char_counter_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./char-counter.module */ "./src/app/typescripts/pro/inputs/char-counter.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CharCounterModule", function() { return _char_counter_module__WEBPACK_IMPORTED_MODULE_1__["CharCounterModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/lightbox/image-popup.html":
/*!***********************************************************!*\
!*** ./src/app/typescripts/pro/lightbox/image-popup.html ***!
\***********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"ng-gallery mdb-lightbox {{ type }}\" *ngIf=\"showRepeat\"> \r\n <figure class=\"col-md-4\" *ngFor =\"let i of modalImages; let index = index\">\r\n <img src=\"{{ !i.thumb ? i.img : i.thumb }}\" class=\"ng-thumb\" (click)=\"openGallery(index)\" alt=\"Image {{ index + 1 }}\" />\r\n </figure>\r\n</div>\r\n<div tabindex=\"0\" class=\"ng-overlay\" [class.hide_lightbox]=\"opened == false\">\r\n <div class=\"top-bar\" style='z-index: 100000'>\r\n <span class=\"info-text\">{{ currentImageIndex + 1 }}/{{ modalImages.length }}</span> \r\n <a class=\"close-popup\" (click)=\"closeGallery()\" (click)=\"toggleRestart()\"></a>\r\n <a *ngIf=\"!is_iPhone_or_iPod\" class=\"fullscreen-toogle\" [class.toggled]='fullscreen' (click)=\"fullScreen()\"></a>\r\n <a class=\"zoom-toogle\" [class.zoom]='zoom' (click)=\"toggleZoomed()\" *ngIf=\"!isMobile\"></a>\r\n </div>\r\n <div class=\"ng-gallery-content\">\r\n <!--<img *ngIf=\"!loading\" src=\"{{imgSrc}}\" (mousedown)=\"checkEvent($event)\" (mouseup)=\"setZoom($event)\" [class.zoom]='zoom' [class.smooth]='smooth' class=\"effect\" (swipeleft)=\"swipe($event, $event.type)\" (swiperight)=\"swipe($event, $event.type)\"/>-->\r\n <img *ngIf=\"!loading\" src=\"{{imgSrc}}\" [class.smooth]='smooth' class=\"effect\" (swipeleft)=\"swipe($event, $event.type)\" (swiperight)=\"swipe($event, $event.type)\" (click)=\"toggleZoomed()\" style=\"transform: scale(0.9, 0.9)\"/>\r\n\r\n <div class=\"uil-ring-css\" *ngIf=\"loading\">\r\n <div></div>\r\n </div> \r\n <a class=\"nav-left\" *ngIf=\"modalImages.length >1 && !isMobile\" (click)=\"prevImage()\" >\r\n <span></span>\r\n </a>\r\n <a class=\"nav-right\" *ngIf=\"modalImages.length >1 && !isMobile\" (click)=\"nextImage()\">\r\n <span></span>\r\n </a>\r\n </div>\r\n</div>\r\n<div *ngIf=\"openModalWindow\">\r\n <mdb-image-modal [modalImages]=\"images\" [imagePointer]=\"imagePointer\" (cancelEvent)=\"cancelImageModel()\"></mdb-image-modal>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/lightbox/image-popup.ts":
/*!*********************************************************!*\
!*** ./src/app/typescripts/pro/lightbox/image-popup.ts ***!
\*********************************************************/
/*! exports provided: ImageModalComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImageModalComponent", function() { return ImageModalComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! hammerjs */ "./node_modules/hammerjs/hammer.js");
/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hammerjs__WEBPACK_IMPORTED_MODULE_2__);
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var ImageModalComponent = /** @class */ (function () {
function ImageModalComponent(platformId, element, renderer) {
this.element = element;
this.renderer = renderer;
this.opened = false;
this.loading = false;
this.showRepeat = false;
this.isMobile = false;
this.clicked = false;
this.isBrowser = false;
this.zoomed = 'inactive';
this.SWIPE_ACTION = { LEFT: 'swipeleft', RIGHT: 'swiperight' };
this.smooth = true;
this.cancelEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.isBrowser = Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["isPlatformBrowser"])(platformId);
this._element = this.element.nativeElement;
try {
document.createEvent('TouchEvent');
this.isMobile = true;
}
catch (err) {
this.isMobile = false;
return;
}
}
ImageModalComponent.prototype.toggleZoomed = function () {
// this.zoomed = (this.zoomed === 'inactive') ? 'active' : 'inactive';
// this.zoom = !this.zoom;
var imgRef = this.element.nativeElement.lastElementChild.lastElementChild.firstElementChild;
if (!this.clicked) {
this.renderer.setStyle(imgRef, 'transform', 'scale(1.0, 1.0');
this.renderer.setStyle(imgRef, 'animate', '300ms ease-out');
this.renderer.setStyle(imgRef, 'cursor', 'zoom-out');
this.clicked = true;
}
else if (this.clicked) {
this.renderer.setStyle(imgRef, 'transform', 'scale(0.9, 0.9');
this.renderer.setStyle(imgRef, 'animate', '300ms ease-in');
this.renderer.setStyle(imgRef, 'cursor', 'zoom-in');
this.clicked = false;
}
};
ImageModalComponent.prototype.toggleRestart = function () {
this.zoomed = (this.zoomed === 'inactive') ? 'active' : 'inactive';
};
ImageModalComponent.prototype.ngOnInit = function () {
this.loading = true;
if (this.imagePointer >= 0) {
this.showRepeat = false;
this.openGallery(this.imagePointer);
}
else {
this.showRepeat = true;
}
};
ImageModalComponent.prototype.closeGallery = function () {
// this.smooth = false;
this.zoom = false;
if (screenfull.enabled) {
screenfull.exit();
}
this.opened = false;
this.cancelEvent.emit(null);
};
ImageModalComponent.prototype.prevImage = function () {
// this.smooth = false;
// this.zoom = false;
this.loading = true;
this.currentImageIndex--;
if (this.currentImageIndex < 0) {
this.currentImageIndex = this.modalImages.length - 1;
}
this.openGallery(this.currentImageIndex);
};
ImageModalComponent.prototype.nextImage = function () {
// this.smooth = false;
// this.zoom = false;
this.loading = true;
this.currentImageIndex++;
if (this.modalImages.length === this.currentImageIndex) {
this.currentImageIndex = 0;
}
this.openGallery(this.currentImageIndex);
};
ImageModalComponent.prototype.openGallery = function (index) {
if (!index) {
this.currentImageIndex = 1;
}
this.currentImageIndex = index;
this.opened = true;
for (var i = 0; i < this.modalImages.length; i++) {
if (i === this.currentImageIndex) {
this.imgSrc = this.modalImages[i].img;
this.loading = false;
break;
}
}
};
ImageModalComponent.prototype.fullScreen = function () {
if (screenfull.enabled) {
screenfull.toggle();
}
};
Object.defineProperty(ImageModalComponent.prototype, "is_iPhone_or_iPod", {
get: function () {
if (this.isBrowser) {
if (navigator && navigator.userAgent && navigator.userAgent != null) {
var strUserAgent = navigator.userAgent.toLowerCase();
var arrMatches = strUserAgent.match(/ipad/);
if (arrMatches != null) {
return true;
}
}
return false;
}
},
enumerable: true,
configurable: true
});
ImageModalComponent.prototype.keyboardControl = function (event) {
if (event.keyCode === 39) {
this.nextImage();
}
if (event.keyCode === 37) {
this.prevImage();
}
if (event.keyCode === 27) {
this.closeGallery();
}
};
ImageModalComponent.prototype.swipe = function (action) {
// let thisImg = this._element.querySelector('.ng-gallery-content').querySelector('img[src="' + this.imgSrc + '"]');
if (action === void 0) { action = this.SWIPE_ACTION.RIGHT; }
if (action === this.SWIPE_ACTION.RIGHT) {
this.nextImage();
// console.log(event.distance, this.modalImages);
}
// previous
if (action === this.SWIPE_ACTION.LEFT) {
this.prevImage();
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('modalImages'),
__metadata("design:type", Object)
], ImageModalComponent.prototype, "modalImages", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('imagePointer'),
__metadata("design:type", Number)
], ImageModalComponent.prototype, "imagePointer", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('fullscreen'),
__metadata("design:type", Boolean)
], ImageModalComponent.prototype, "fullscreen", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('zoom'),
__metadata("design:type", Boolean)
], ImageModalComponent.prototype, "zoom", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('smooth'),
__metadata("design:type", Object)
], ImageModalComponent.prototype, "smooth", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('type'),
__metadata("design:type", String)
], ImageModalComponent.prototype, "type", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])('cancelEvent'),
__metadata("design:type", Object)
], ImageModalComponent.prototype, "cancelEvent", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('document:keyup', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [KeyboardEvent]),
__metadata("design:returntype", void 0)
], ImageModalComponent.prototype, "keyboardControl", null);
ImageModalComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-image-modal',
template: __webpack_require__(/*! ./image-popup.html */ "./src/app/typescripts/pro/lightbox/image-popup.html"),
}),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"])),
__metadata("design:paramtypes", [String, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]])
], ImageModalComponent);
return ImageModalComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/lightbox/index.ts":
/*!***************************************************!*\
!*** ./src/app/typescripts/pro/lightbox/index.ts ***!
\***************************************************/
/*! exports provided: LightBoxModule, ImageModalComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _image_popup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./image-popup */ "./src/app/typescripts/pro/lightbox/image-popup.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageModalComponent", function() { return _image_popup__WEBPACK_IMPORTED_MODULE_0__["ImageModalComponent"]; });
/* harmony import */ var _light_box_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./light-box.module */ "./src/app/typescripts/pro/lightbox/light-box.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LightBoxModule", function() { return _light_box_module__WEBPACK_IMPORTED_MODULE_1__["LightBoxModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/lightbox/light-box.module.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/pro/lightbox/light-box.module.ts ***!
\**************************************************************/
/*! exports provided: LightBoxModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LightBoxModule", function() { return LightBoxModule; });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _image_popup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./image-popup */ "./src/app/typescripts/pro/lightbox/image-popup.ts");
var __decorate = (undefined && undefined.__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 LightBoxModule = /** @class */ (function () {
function LightBoxModule() {
}
LightBoxModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormsModule"]],
declarations: [_image_popup__WEBPACK_IMPORTED_MODULE_3__["ImageModalComponent"]],
exports: [_image_popup__WEBPACK_IMPORTED_MODULE_3__["ImageModalComponent"]]
})
], LightBoxModule);
return LightBoxModule;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/material-select/diacritics.ts":
/*!***************************************************************!*\
!*** ./src/app/typescripts/pro/material-select/diacritics.ts ***!
\***************************************************************/
/*! exports provided: Diacritics */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diacritics", function() { return Diacritics; });
var Diacritics = /** @class */ (function () {
function Diacritics() {
}
Diacritics.strip = function (text) {
var _this = this;
var match = function (a) {
return _this.DIACRITICS[a] || a;
};
return text.replace(/[^\u0000-\u007E]/g, match);
};
Diacritics.DIACRITICS = {
'\u24B6': 'A',
'\uFF21': 'A',
'\u00C0': 'A',
'\u00C1': 'A',
'\u00C2': 'A',
'\u1EA6': 'A',
'\u1EA4': 'A',
'\u1EAA': 'A',
'\u1EA8': 'A',
'\u00C3': 'A',
'\u0100': 'A',
'\u0102': 'A',
'\u1EB0': 'A',
'\u1EAE': 'A',
'\u1EB4': 'A',
'\u1EB2': 'A',
'\u0226': 'A',
'\u01E0': 'A',
'\u00C4': 'A',
'\u01DE': 'A',
'\u1EA2': 'A',
'\u00C5': 'A',
'\u01FA': 'A',
'\u01CD': 'A',
'\u0200': 'A',
'\u0202': 'A',
'\u1EA0': 'A',
'\u1EAC': 'A',
'\u1EB6': 'A',
'\u1E00': 'A',
'\u0104': 'A',
'\u023A': 'A',
'\u2C6F': 'A',
'\uA732': 'AA',
'\u00C6': 'AE',
'\u01FC': 'AE',
'\u01E2': 'AE',
'\uA734': 'AO',
'\uA736': 'AU',
'\uA738': 'AV',
'\uA73A': 'AV',
'\uA73C': 'AY',
'\u24B7': 'B',
'\uFF22': 'B',
'\u1E02': 'B',
'\u1E04': 'B',
'\u1E06': 'B',
'\u0243': 'B',
'\u0182': 'B',
'\u0181': 'B',
'\u24B8': 'C',
'\uFF23': 'C',
'\u0106': 'C',
'\u0108': 'C',
'\u010A': 'C',
'\u010C': 'C',
'\u00C7': 'C',
'\u1E08': 'C',
'\u0187': 'C',
'\u023B': 'C',
'\uA73E': 'C',
'\u24B9': 'D',
'\uFF24': 'D',
'\u1E0A': 'D',
'\u010E': 'D',
'\u1E0C': 'D',
'\u1E10': 'D',
'\u1E12': 'D',
'\u1E0E': 'D',
'\u0110': 'D',
'\u018B': 'D',
'\u018A': 'D',
'\u0189': 'D',
'\uA779': 'D',
'\u01F1': 'DZ',
'\u01C4': 'DZ',
'\u01F2': 'Dz',
'\u01C5': 'Dz',
'\u24BA': 'E',
'\uFF25': 'E',
'\u00C8': 'E',
'\u00C9': 'E',
'\u00CA': 'E',
'\u1EC0': 'E',
'\u1EBE': 'E',
'\u1EC4': 'E',
'\u1EC2': 'E',
'\u1EBC': 'E',
'\u0112': 'E',
'\u1E14': 'E',
'\u1E16': 'E',
'\u0114': 'E',
'\u0116': 'E',
'\u00CB': 'E',
'\u1EBA': 'E',
'\u011A': 'E',
'\u0204': 'E',
'\u0206': 'E',
'\u1EB8': 'E',
'\u1EC6': 'E',
'\u0228': 'E',
'\u1E1C': 'E',
'\u0118': 'E',
'\u1E18': 'E',
'\u1E1A': 'E',
'\u0190': 'E',
'\u018E': 'E',
'\u24BB': 'F',
'\uFF26': 'F',
'\u1E1E': 'F',
'\u0191': 'F',
'\uA77B': 'F',
'\u24BC': 'G',
'\uFF27': 'G',
'\u01F4': 'G',
'\u011C': 'G',
'\u1E20': 'G',
'\u011E': 'G',
'\u0120': 'G',
'\u01E6': 'G',
'\u0122': 'G',
'\u01E4': 'G',
'\u0193': 'G',
'\uA7A0': 'G',
'\uA77D': 'G',
'\uA77E': 'G',
'\u24BD': 'H',
'\uFF28': 'H',
'\u0124': 'H',
'\u1E22': 'H',
'\u1E26': 'H',
'\u021E': 'H',
'\u1E24': 'H',
'\u1E28': 'H',
'\u1E2A': 'H',
'\u0126': 'H',
'\u2C67': 'H',
'\u2C75': 'H',
'\uA78D': 'H',
'\u24BE': 'I',
'\uFF29': 'I',
'\u00CC': 'I',
'\u00CD': 'I',
'\u00CE': 'I',
'\u0128': 'I',
'\u012A': 'I',
'\u012C': 'I',
'\u0130': 'I',
'\u00CF': 'I',
'\u1E2E': 'I',
'\u1EC8': 'I',
'\u01CF': 'I',
'\u0208': 'I',
'\u020A': 'I',
'\u1ECA': 'I',
'\u012E': 'I',
'\u1E2C': 'I',
'\u0197': 'I',
'\u24BF': 'J',
'\uFF2A': 'J',
'\u0134': 'J',
'\u0248': 'J',
'\u24C0': 'K',
'\uFF2B': 'K',
'\u1E30': 'K',
'\u01E8': 'K',
'\u1E32': 'K',
'\u0136': 'K',
'\u1E34': 'K',
'\u0198': 'K',
'\u2C69': 'K',
'\uA740': 'K',
'\uA742': 'K',
'\uA744': 'K',
'\uA7A2': 'K',
'\u24C1': 'L',
'\uFF2C': 'L',
'\u013F': 'L',
'\u0139': 'L',
'\u013D': 'L',
'\u1E36': 'L',
'\u1E38': 'L',
'\u013B': 'L',
'\u1E3C': 'L',
'\u1E3A': 'L',
'\u0141': 'L',
'\u023D': 'L',
'\u2C62': 'L',
'\u2C60': 'L',
'\uA748': 'L',
'\uA746': 'L',
'\uA780': 'L',
'\u01C7': 'LJ',
'\u01C8': 'Lj',
'\u24C2': 'M',
'\uFF2D': 'M',
'\u1E3E': 'M',
'\u1E40': 'M',
'\u1E42': 'M',
'\u2C6E': 'M',
'\u019C': 'M',
'\u24C3': 'N',
'\uFF2E': 'N',
'\u01F8': 'N',
'\u0143': 'N',
'\u00D1': 'N',
'\u1E44': 'N',
'\u0147': 'N',
'\u1E46': 'N',
'\u0145': 'N',
'\u1E4A': 'N',
'\u1E48': 'N',
'\u0220': 'N',
'\u019D': 'N',
'\uA790': 'N',
'\uA7A4': 'N',
'\u01CA': 'NJ',
'\u01CB': 'Nj',
'\u24C4': 'O',
'\uFF2F': 'O',
'\u00D2': 'O',
'\u00D3': 'O',
'\u00D4': 'O',
'\u1ED2': 'O',
'\u1ED0': 'O',
'\u1ED6': 'O',
'\u1ED4': 'O',
'\u00D5': 'O',
'\u1E4C': 'O',
'\u022C': 'O',
'\u1E4E': 'O',
'\u014C': 'O',
'\u1E50': 'O',
'\u1E52': 'O',
'\u014E': 'O',
'\u022E': 'O',
'\u0230': 'O',
'\u00D6': 'O',
'\u022A': 'O',
'\u1ECE': 'O',
'\u0150': 'O',
'\u01D1': 'O',
'\u020C': 'O',
'\u020E': 'O',
'\u01A0': 'O',
'\u1EDC': 'O',
'\u1EDA': 'O',
'\u1EE0': 'O',
'\u1EDE': 'O',
'\u1EE2': 'O',
'\u1ECC': 'O',
'\u1ED8': 'O',
'\u01EA': 'O',
'\u01EC': 'O',
'\u00D8': 'O',
'\u01FE': 'O',
'\u0186': 'O',
'\u019F': 'O',
'\uA74A': 'O',
'\uA74C': 'O',
'\u01A2': 'OI',
'\uA74E': 'OO',
'\u0222': 'OU',
'\u24C5': 'P',
'\uFF30': 'P',
'\u1E54': 'P',
'\u1E56': 'P',
'\u01A4': 'P',
'\u2C63': 'P',
'\uA750': 'P',
'\uA752': 'P',
'\uA754': 'P',
'\u24C6': 'Q',
'\uFF31': 'Q',
'\uA756': 'Q',
'\uA758': 'Q',
'\u024A': 'Q',
'\u24C7': 'R',
'\uFF32': 'R',
'\u0154': 'R',
'\u1E58': 'R',
'\u0158': 'R',
'\u0210': 'R',
'\u0212': 'R',
'\u1E5A': 'R',
'\u1E5C': 'R',
'\u0156': 'R',
'\u1E5E': 'R',
'\u024C': 'R',
'\u2C64': 'R',
'\uA75A': 'R',
'\uA7A6': 'R',
'\uA782': 'R',
'\u24C8': 'S',
'\uFF33': 'S',
'\u1E9E': 'S',
'\u015A': 'S',
'\u1E64': 'S',
'\u015C': 'S',
'\u1E60': 'S',
'\u0160': 'S',
'\u1E66': 'S',
'\u1E62': 'S',
'\u1E68': 'S',
'\u0218': 'S',
'\u015E': 'S',
'\u2C7E': 'S',
'\uA7A8': 'S',
'\uA784': 'S',
'\u24C9': 'T',
'\uFF34': 'T',
'\u1E6A': 'T',
'\u0164': 'T',
'\u1E6C': 'T',
'\u021A': 'T',
'\u0162': 'T',
'\u1E70': 'T',
'\u1E6E': 'T',
'\u0166': 'T',
'\u01AC': 'T',
'\u01AE': 'T',
'\u023E': 'T',
'\uA786': 'T',
'\uA728': 'TZ',
'\u24CA': 'U',
'\uFF35': 'U',
'\u00D9': 'U',
'\u00DA': 'U',
'\u00DB': 'U',
'\u0168': 'U',
'\u1E78': 'U',
'\u016A': 'U',
'\u1E7A': 'U',
'\u016C': 'U',
'\u00DC': 'U',
'\u01DB': 'U',
'\u01D7': 'U',
'\u01D5': 'U',
'\u01D9': 'U',
'\u1EE6': 'U',
'\u016E': 'U',
'\u0170': 'U',
'\u01D3': 'U',
'\u0214': 'U',
'\u0216': 'U',
'\u01AF': 'U',
'\u1EEA': 'U',
'\u1EE8': 'U',
'\u1EEE': 'U',
'\u1EEC': 'U',
'\u1EF0': 'U',
'\u1EE4': 'U',
'\u1E72': 'U',
'\u0172': 'U',
'\u1E76': 'U',
'\u1E74': 'U',
'\u0244': 'U',
'\u24CB': 'V',
'\uFF36': 'V',
'\u1E7C': 'V',
'\u1E7E': 'V',
'\u01B2': 'V',
'\uA75E': 'V',
'\u0245': 'V',
'\uA760': 'VY',
'\u24CC': 'W',
'\uFF37': 'W',
'\u1E80': 'W',
'\u1E82': 'W',
'\u0174': 'W',
'\u1E86': 'W',
'\u1E84': 'W',
'\u1E88': 'W',
'\u2C72': 'W',
'\u24CD': 'X',
'\uFF38': 'X',
'\u1E8A': 'X',
'\u1E8C': 'X',
'\u24CE': 'Y',
'\uFF39': 'Y',
'\u1EF2': 'Y',
'\u00DD': 'Y',
'\u0176': 'Y',
'\u1EF8': 'Y',
'\u0232': 'Y',
'\u1E8E': 'Y',
'\u0178': 'Y',
'\u1EF6': 'Y',
'\u1EF4': 'Y',
'\u01B3': 'Y',
'\u024E': 'Y',
'\u1EFE': 'Y',
'\u24CF': 'Z',
'\uFF3A': 'Z',
'\u0179': 'Z',
'\u1E90': 'Z',
'\u017B': 'Z',
'\u017D': 'Z',
'\u1E92': 'Z',
'\u1E94': 'Z',
'\u01B5': 'Z',
'\u0224': 'Z',
'\u2C7F': 'Z',
'\u2C6B': 'Z',
'\uA762': 'Z',
'\u24D0': 'a',
'\uFF41': 'a',
'\u1E9A': 'a',
'\u00E0': 'a',
'\u00E1': 'a',
'\u00E2': 'a',
'\u1EA7': 'a',
'\u1EA5': 'a',
'\u1EAB': 'a',
'\u1EA9': 'a',
'\u00E3': 'a',
'\u0101': 'a',
'\u0103': 'a',
'\u1EB1': 'a',
'\u1EAF': 'a',
'\u1EB5': 'a',
'\u1EB3': 'a',
'\u0227': 'a',
'\u01E1': 'a',
'\u00E4': 'a',
'\u01DF': 'a',
'\u1EA3': 'a',
'\u00E5': 'a',
'\u01FB': 'a',
'\u01CE': 'a',
'\u0201': 'a',
'\u0203': 'a',
'\u1EA1': 'a',
'\u1EAD': 'a',
'\u1EB7': 'a',
'\u1E01': 'a',
'\u0105': 'a',
'\u2C65': 'a',
'\u0250': 'a',
'\uA733': 'aa',
'\u00E6': 'ae',
'\u01FD': 'ae',
'\u01E3': 'ae',
'\uA735': 'ao',
'\uA737': 'au',
'\uA739': 'av',
'\uA73B': 'av',
'\uA73D': 'ay',
'\u24D1': 'b',
'\uFF42': 'b',
'\u1E03': 'b',
'\u1E05': 'b',
'\u1E07': 'b',
'\u0180': 'b',
'\u0183': 'b',
'\u0253': 'b',
'\u24D2': 'c',
'\uFF43': 'c',
'\u0107': 'c',
'\u0109': 'c',
'\u010B': 'c',
'\u010D': 'c',
'\u00E7': 'c',
'\u1E09': 'c',
'\u0188': 'c',
'\u023C': 'c',
'\uA73F': 'c',
'\u2184': 'c',
'\u24D3': 'd',
'\uFF44': 'd',
'\u1E0B': 'd',
'\u010F': 'd',
'\u1E0D': 'd',
'\u1E11': 'd',
'\u1E13': 'd',
'\u1E0F': 'd',
'\u0111': 'd',
'\u018C': 'd',
'\u0256': 'd',
'\u0257': 'd',
'\uA77A': 'd',
'\u01F3': 'dz',
'\u01C6': 'dz',
'\u24D4': 'e',
'\uFF45': 'e',
'\u00E8': 'e',
'\u00E9': 'e',
'\u00EA': 'e',
'\u1EC1': 'e',
'\u1EBF': 'e',
'\u1EC5': 'e',
'\u1EC3': 'e',
'\u1EBD': 'e',
'\u0113': 'e',
'\u1E15': 'e',
'\u1E17': 'e',
'\u0115': 'e',
'\u0117': 'e',
'\u00EB': 'e',
'\u1EBB': 'e',
'\u011B': 'e',
'\u0205': 'e',
'\u0207': 'e',
'\u1EB9': 'e',
'\u1EC7': 'e',
'\u0229': 'e',
'\u1E1D': 'e',
'\u0119': 'e',
'\u1E19': 'e',
'\u1E1B': 'e',
'\u0247': 'e',
'\u025B': 'e',
'\u01DD': 'e',
'\u24D5': 'f',
'\uFF46': 'f',
'\u1E1F': 'f',
'\u0192': 'f',
'\uA77C': 'f',
'\u24D6': 'g',
'\uFF47': 'g',
'\u01F5': 'g',
'\u011D': 'g',
'\u1E21': 'g',
'\u011F': 'g',
'\u0121': 'g',
'\u01E7': 'g',
'\u0123': 'g',
'\u01E5': 'g',
'\u0260': 'g',
'\uA7A1': 'g',
'\u1D79': 'g',
'\uA77F': 'g',
'\u24D7': 'h',
'\uFF48': 'h',
'\u0125': 'h',
'\u1E23': 'h',
'\u1E27': 'h',
'\u021F': 'h',
'\u1E25': 'h',
'\u1E29': 'h',
'\u1E2B': 'h',
'\u1E96': 'h',
'\u0127': 'h',
'\u2C68': 'h',
'\u2C76': 'h',
'\u0265': 'h',
'\u0195': 'hv',
'\u24D8': 'i',
'\uFF49': 'i',
'\u00EC': 'i',
'\u00ED': 'i',
'\u00EE': 'i',
'\u0129': 'i',
'\u012B': 'i',
'\u012D': 'i',
'\u00EF': 'i',
'\u1E2F': 'i',
'\u1EC9': 'i',
'\u01D0': 'i',
'\u0209': 'i',
'\u020B': 'i',
'\u1ECB': 'i',
'\u012F': 'i',
'\u1E2D': 'i',
'\u0268': 'i',
'\u0131': 'i',
'\u24D9': 'j',
'\uFF4A': 'j',
'\u0135': 'j',
'\u01F0': 'j',
'\u0249': 'j',
'\u24DA': 'k',
'\uFF4B': 'k',
'\u1E31': 'k',
'\u01E9': 'k',
'\u1E33': 'k',
'\u0137': 'k',
'\u1E35': 'k',
'\u0199': 'k',
'\u2C6A': 'k',
'\uA741': 'k',
'\uA743': 'k',
'\uA745': 'k',
'\uA7A3': 'k',
'\u24DB': 'l',
'\uFF4C': 'l',
'\u0140': 'l',
'\u013A': 'l',
'\u013E': 'l',
'\u1E37': 'l',
'\u1E39': 'l',
'\u013C': 'l',
'\u1E3D': 'l',
'\u1E3B': 'l',
'\u017F': 'l',
'\u0142': 'l',
'\u019A': 'l',
'\u026B': 'l',
'\u2C61': 'l',
'\uA749': 'l',
'\uA781': 'l',
'\uA747': 'l',
'\u01C9': 'lj',
'\u24DC': 'm',
'\uFF4D': 'm',
'\u1E3F': 'm',
'\u1E41': 'm',
'\u1E43': 'm',
'\u0271': 'm',
'\u026F': 'm',
'\u24DD': 'n',
'\uFF4E': 'n',
'\u01F9': 'n',
'\u0144': 'n',
'\u00F1': 'n',
'\u1E45': 'n',
'\u0148': 'n',
'\u1E47': 'n',
'\u0146': 'n',
'\u1E4B': 'n',
'\u1E49': 'n',
'\u019E': 'n',
'\u0272': 'n',
'\u0149': 'n',
'\uA791': 'n',
'\uA7A5': 'n',
'\u01CC': 'nj',
'\u24DE': 'o',
'\uFF4F': 'o',
'\u00F2': 'o',
'\u00F3': 'o',
'\u00F4': 'o',
'\u1ED3': 'o',
'\u1ED1': 'o',
'\u1ED7': 'o',
'\u1ED5': 'o',
'\u00F5': 'o',
'\u1E4D': 'o',
'\u022D': 'o',
'\u1E4F': 'o',
'\u014D': 'o',
'\u1E51': 'o',
'\u1E53': 'o',
'\u014F': 'o',
'\u022F': 'o',
'\u0231': 'o',
'\u00F6': 'o',
'\u022B': 'o',
'\u1ECF': 'o',
'\u0151': 'o',
'\u01D2': 'o',
'\u020D': 'o',
'\u020F': 'o',
'\u01A1': 'o',
'\u1EDD': 'o',
'\u1EDB': 'o',
'\u1EE1': 'o',
'\u1EDF': 'o',
'\u1EE3': 'o',
'\u1ECD': 'o',
'\u1ED9': 'o',
'\u01EB': 'o',
'\u01ED': 'o',
'\u00F8': 'o',
'\u01FF': 'o',
'\u0254': 'o',
'\uA74B': 'o',
'\uA74D': 'o',
'\u0275': 'o',
'\u01A3': 'oi',
'\u0223': 'ou',
'\uA74F': 'oo',
'\u24DF': 'p',
'\uFF50': 'p',
'\u1E55': 'p',
'\u1E57': 'p',
'\u01A5': 'p',
'\u1D7D': 'p',
'\uA751': 'p',
'\uA753': 'p',
'\uA755': 'p',
'\u24E0': 'q',
'\uFF51': 'q',
'\u024B': 'q',
'\uA757': 'q',
'\uA759': 'q',
'\u24E1': 'r',
'\uFF52': 'r',
'\u0155': 'r',
'\u1E59': 'r',
'\u0159': 'r',
'\u0211': 'r',
'\u0213': 'r',
'\u1E5B': 'r',
'\u1E5D': 'r',
'\u0157': 'r',
'\u1E5F': 'r',
'\u024D': 'r',
'\u027D': 'r',
'\uA75B': 'r',
'\uA7A7': 'r',
'\uA783': 'r',
'\u24E2': 's',
'\uFF53': 's',
'\u00DF': 's',
'\u015B': 's',
'\u1E65': 's',
'\u015D': 's',
'\u1E61': 's',
'\u0161': 's',
'\u1E67': 's',
'\u1E63': 's',
'\u1E69': 's',
'\u0219': 's',
'\u015F': 's',
'\u023F': 's',
'\uA7A9': 's',
'\uA785': 's',
'\u1E9B': 's',
'\u24E3': 't',
'\uFF54': 't',
'\u1E6B': 't',
'\u1E97': 't',
'\u0165': 't',
'\u1E6D': 't',
'\u021B': 't',
'\u0163': 't',
'\u1E71': 't',
'\u1E6F': 't',
'\u0167': 't',
'\u01AD': 't',
'\u0288': 't',
'\u2C66': 't',
'\uA787': 't',
'\uA729': 'tz',
'\u24E4': 'u',
'\uFF55': 'u',
'\u00F9': 'u',
'\u00FA': 'u',
'\u00FB': 'u',
'\u0169': 'u',
'\u1E79': 'u',
'\u016B': 'u',
'\u1E7B': 'u',
'\u016D': 'u',
'\u00FC': 'u',
'\u01DC': 'u',
'\u01D8': 'u',
'\u01D6': 'u',
'\u01DA': 'u',
'\u1EE7': 'u',
'\u016F': 'u',
'\u0171': 'u',
'\u01D4': 'u',
'\u0215': 'u',
'\u0217': 'u',
'\u01B0': 'u',
'\u1EEB': 'u',
'\u1EE9': 'u',
'\u1EEF': 'u',
'\u1EED': 'u',
'\u1EF1': 'u',
'\u1EE5': 'u',
'\u1E73': 'u',
'\u0173': 'u',
'\u1E77': 'u',
'\u1E75': 'u',
'\u0289': 'u',
'\u24E5': 'v',
'\uFF56': 'v',
'\u1E7D': 'v',
'\u1E7F': 'v',
'\u028B': 'v',
'\uA75F': 'v',
'\u028C': 'v',
'\uA761': 'vy',
'\u24E6': 'w',
'\uFF57': 'w',
'\u1E81': 'w',
'\u1E83': 'w',
'\u0175': 'w',
'\u1E87': 'w',
'\u1E85': 'w',
'\u1E98': 'w',
'\u1E89': 'w',
'\u2C73': 'w',
'\u24E7': 'x',
'\uFF58': 'x',
'\u1E8B': 'x',
'\u1E8D': 'x',
'\u24E8': 'y',
'\uFF59': 'y',
'\u1EF3': 'y',
'\u00FD': 'y',
'\u0177': 'y',
'\u1EF9': 'y',
'\u0233': 'y',
'\u1E8F': 'y',
'\u00FF': 'y',
'\u1EF7': 'y',
'\u1E99': 'y',
'\u1EF5': 'y',
'\u01B4': 'y',
'\u024F': 'y',
'\u1EFF': 'y',
'\u24E9': 'z',
'\uFF5A': 'z',
'\u017A': 'z',
'\u1E91': 'z',
'\u017C': 'z',
'\u017E': 'z',
'\u1E93': 'z',
'\u1E95': 'z',
'\u01B6': 'z',
'\u0225': 'z',
'\u0240': 'z',
'\u2C6C': 'z',
'\uA763': 'z',
'\u0386': '\u0391',
'\u0388': '\u0395',
'\u0389': '\u0397',
'\u038A': '\u0399',
'\u03AA': '\u0399',
'\u038C': '\u039F',
'\u038E': '\u03A5',
'\u03AB': '\u03A5',
'\u038F': '\u03A9',
'\u03AC': '\u03B1',
'\u03AD': '\u03B5',
'\u03AE': '\u03B7',
'\u03AF': '\u03B9',
'\u03CA': '\u03B9',
'\u0390': '\u03B9',
'\u03CC': '\u03BF',
'\u03CD': '\u03C5',
'\u03CB': '\u03C5',
'\u03B0': '\u03C5',
'\u03C9': '\u03C9',
'\u03C2': '\u03C3'
};
return Diacritics;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/material-select/index.ts":
/*!**********************************************************!*\
!*** ./src/app/typescripts/pro/material-select/index.ts ***!
\**********************************************************/
/*! exports provided: Diacritics, Option, OptionList, SELECT_VALUE_ACCESSOR, SelectComponent, SelectDropdownComponent, SelectModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _diacritics__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./diacritics */ "./src/app/typescripts/pro/material-select/diacritics.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Diacritics", function() { return _diacritics__WEBPACK_IMPORTED_MODULE_0__["Diacritics"]; });
/* harmony import */ var _option__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./option */ "./src/app/typescripts/pro/material-select/option.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Option", function() { return _option__WEBPACK_IMPORTED_MODULE_1__["Option"]; });
/* harmony import */ var _option_list__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./option-list */ "./src/app/typescripts/pro/material-select/option-list.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OptionList", function() { return _option_list__WEBPACK_IMPORTED_MODULE_2__["OptionList"]; });
/* harmony import */ var _select_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./select.component */ "./src/app/typescripts/pro/material-select/select.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SELECT_VALUE_ACCESSOR", function() { return _select_component__WEBPACK_IMPORTED_MODULE_3__["SELECT_VALUE_ACCESSOR"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectComponent", function() { return _select_component__WEBPACK_IMPORTED_MODULE_3__["SelectComponent"]; });
/* harmony import */ var _select_dropdown_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./select-dropdown.component */ "./src/app/typescripts/pro/material-select/select-dropdown.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectDropdownComponent", function() { return _select_dropdown_component__WEBPACK_IMPORTED_MODULE_4__["SelectDropdownComponent"]; });
/* harmony import */ var _select_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./select.module */ "./src/app/typescripts/pro/material-select/select.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectModule", function() { return _select_module__WEBPACK_IMPORTED_MODULE_5__["SelectModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/material-select/option-list.ts":
/*!****************************************************************!*\
!*** ./src/app/typescripts/pro/material-select/option-list.ts ***!
\****************************************************************/
/*! exports provided: OptionList */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OptionList", function() { return OptionList; });
/* harmony import */ var _option__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./option */ "./src/app/typescripts/pro/material-select/option.ts");
/* harmony import */ var _diacritics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./diacritics */ "./src/app/typescripts/pro/material-select/diacritics.ts");
var OptionList = /** @class */ (function () {
function OptionList(options) {
/* Consider using these for performance improvement. */
// private _selection: Array<Option>;
// private _filtered: Array<Option>;
// private _value: Array<string>;
// private _highlightedOption: Option = null;
this._highlightedOption = null;
this.setToNullValue = null;
if (typeof options === 'undefined' || options === null) {
options = [];
}
this._options = options.map(function (option) {
var o = new _option__WEBPACK_IMPORTED_MODULE_0__["Option"](option);
if (option.disabled) {
o.disabled = true;
}
if (option.group) {
o.disabled = true;
o.group = true;
}
return o;
});
this._hasShown = this._options.length > 0;
this.highlight();
}
// v0 and v1 are assumed not to be undefined or null.
OptionList.equalValues = function (v0, v1) {
if (v0.length !== v1.length) {
return false;
}
var a = v0.slice().sort();
var b = v1.slice().sort();
return a.every(function (v, i) {
return v === b[i];
});
};
Object.defineProperty(OptionList.prototype, "options", {
/** Options. **/
get: function () {
return this._options;
},
enumerable: true,
configurable: true
});
OptionList.prototype.getOptionsByValue = function (value) {
return this.options.filter(function (option) {
return option.value === value;
});
};
Object.defineProperty(OptionList.prototype, "value", {
/** Value. **/
get: function () {
return this.selection.map(function (selectedOption) {
return selectedOption.value;
});
},
set: function (v) {
v = typeof v === 'undefined' || v === null ? [] : v;
this.options.forEach(function (option) {
option.selected = v.indexOf(option.value) > -1;
});
},
enumerable: true,
configurable: true
});
Object.defineProperty(OptionList.prototype, "selection", {
/** Selection. **/
get: function () {
return this.options.filter(function (option) {
return option.selected;
});
},
enumerable: true,
configurable: true
});
OptionList.prototype.select = function (option, multiple) {
if (!multiple) {
this.clearSelection();
}
option.selected = true;
};
OptionList.prototype.deselect = function (option) {
option.selected = false;
};
OptionList.prototype.clearSelection = function () {
this.options.forEach(function (option) {
option.selected = false;
});
};
Object.defineProperty(OptionList.prototype, "filtered", {
/** Filter. **/
get: function () {
return this.options.filter(function (option) {
return option.shown;
});
},
enumerable: true,
configurable: true
});
OptionList.prototype.filter = function (term) {
var anyShown = false;
if (term.trim() === '') {
this.resetFilter();
anyShown = this.options.length > 0;
}
else {
this.options.forEach(function (option) {
var l = _diacritics__WEBPACK_IMPORTED_MODULE_1__["Diacritics"].strip(option.label).toUpperCase();
var t = _diacritics__WEBPACK_IMPORTED_MODULE_1__["Diacritics"].strip(term).toUpperCase();
option.shown = l.indexOf(t) > -1;
});
}
this.highlight();
this._hasShown = anyShown;
return anyShown;
};
OptionList.prototype.resetFilter = function () {
this.options.forEach(function (option) {
option.shown = true;
});
};
Object.defineProperty(OptionList.prototype, "highlightedOption", {
/** Highlight. **/
get: function () {
return this._highlightedOption;
},
enumerable: true,
configurable: true
});
OptionList.prototype.highlight = function () {
var option = this.hasShownSelected() ?
this.getFirstShownSelected() : this.getFirstShown();
this.highlightOption(option);
};
OptionList.prototype.highlightOption = function (option) {
this.clearHighlightedOption();
if (option !== null) {
option.highlighted = true;
this._highlightedOption = option;
}
};
OptionList.prototype.highlightNextOption = function () {
var shownOptions = this.filtered;
var index = this.getHighlightedIndexFromList(shownOptions);
if (index > -1 && index < shownOptions.length - 1) {
this.highlightOption(shownOptions[index + 1]);
}
};
OptionList.prototype.highlightPreviousOption = function () {
var shownOptions = this.filtered;
var index = this.getHighlightedIndexFromList(shownOptions);
if (index > 0) {
this.highlightOption(shownOptions[index - 1]);
}
};
OptionList.prototype.clearHighlightedOption = function () {
if (this.highlightedOption !== null) {
this.highlightedOption.highlighted = false;
this._highlightedOption = null;
}
};
OptionList.prototype.getHighlightedIndexFromList = function (options) {
for (var i = 0; i < options.length; i++) {
if (options[i].highlighted) {
return i;
}
}
return -1;
};
OptionList.prototype.getHighlightedIndex = function () {
return this.getHighlightedIndexFromList(this.filtered);
};
Object.defineProperty(OptionList.prototype, "hasShown", {
/** Util. **/
get: function () {
return this._hasShown;
},
enumerable: true,
configurable: true
});
OptionList.prototype.hasSelected = function () {
return this.options.some(function (option) {
return option.selected;
});
};
OptionList.prototype.hasShownSelected = function () {
return this.options.some(function (option) {
return option.shown && option.selected;
});
};
OptionList.prototype.getFirstShown = function () {
for (var _i = 0, _a = this.options; _i < _a.length; _i++) {
var option = _a[_i];
if (option.shown) {
return option;
}
}
// return null;
return this.setToNullValue;
};
OptionList.prototype.getFirstShownSelected = function () {
for (var _i = 0, _a = this.options; _i < _a.length; _i++) {
var option = _a[_i];
if (option.shown && option.selected) {
return option;
}
}
// return null;
return this.setToNullValue;
};
return OptionList;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/material-select/option.ts":
/*!***********************************************************!*\
!*** ./src/app/typescripts/pro/material-select/option.ts ***!
\***********************************************************/
/*! exports provided: Option */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Option", function() { return Option; });
var Option = /** @class */ (function () {
function Option(option) {
this.wrappedOption = option;
this.disabled = false;
this.highlighted = false;
this.selected = false;
this.shown = true;
this.group = false;
}
Object.defineProperty(Option.prototype, "value", {
get: function () {
return this.wrappedOption.value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Option.prototype, "label", {
get: function () {
return this.wrappedOption.label;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Option.prototype, "icon", {
get: function () {
if (this.wrappedOption.icon !== '' && this.wrappedOption.icon !== undefined) {
return this.wrappedOption.icon;
}
else {
return '';
}
},
enumerable: true,
configurable: true
});
return Option;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/material-select/select-dropdown.component.html":
/*!********************************************************************************!*\
!*** ./src/app/typescripts/pro/material-select/select-dropdown.component.html ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"dropdown-content\" [ngStyle]=\"{'top.px': top, 'left.px': left, 'width.px': width}\">\r\n\r\n <div class=\"filter\" *ngIf=\"!multiple && filterEnabled\">\r\n <input\r\n #filterInput\r\n autocomplete=\"on\"\r\n [placeholder]=\"placeholder\"\r\n (click)=\"onSingleFilterClick($event)\"\r\n (input)=\"onSingleFilterInput($event)\"\r\n (keydown)=\"onSingleFilterKeydown($event)\">\r\n </div>\r\n\r\n <div class=\"options\" #optionsList>\r\n <ul class=\"select-dropdown\" [ngClass]=\"{'multiple-select-dropdown': multiple}\"\r\n (wheel)=\"onOptionsWheel($event)\">\r\n <li *ngFor=\"let option of optionList.filtered\"\r\n [ngClass]=\"{'active': option.highlighted, 'selected': option.selected, 'disabled': option.disabled, 'optgroup': option.group}\"\r\n [ngStyle]=\"getOptionStyle(option)\"\r\n (click)=\"onOptionClick(option)\"\r\n (mouseover)=\"onOptionMouseover(option)\">\r\n <img class=\"rounded-circle\" [src]=\"option.icon\" *ngIf=\"option.icon !== ''\">\r\n <span class=\"select-option\" *ngIf=\"!multiple\">{{option.label}}</span>\r\n <span class=\"filtrable\" *ngIf=\"multiple\">\r\n <input type=\"checkbox\" [checked]=\"option.selected\">\r\n <label></label>\r\n {{option.label}}\r\n </span>\r\n </li>\r\n <li *ngIf=\"!this.hasOptionsItems\" class=\"message disabled\">\r\n <span>{{notFoundMsg}}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/material-select/select-dropdown.component.ts":
/*!******************************************************************************!*\
!*** ./src/app/typescripts/pro/material-select/select-dropdown.component.ts ***!
\******************************************************************************/
/*! exports provided: SelectDropdownComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectDropdownComponent", function() { return SelectDropdownComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _option_list__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./option-list */ "./src/app/typescripts/pro/material-select/option-list.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SelectDropdownComponent = /** @class */ (function () {
function SelectDropdownComponent(_elementRef) {
this._elementRef = _elementRef;
this.close = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.optionClicked = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.singleFilterClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.singleFilterInput = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.singleFilterKeydown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.disabledColor = '#fff';
this.disabledTextColor = '9e9e9e';
this.hasOptionsItems = true;
}
/** Event handlers. **/
// Angular life cycle hooks.
SelectDropdownComponent.prototype.onkeyup = function () {
this.hasOptionsItems = this._elementRef.nativeElement.childNodes[0].children[1].children[0].children.length >= 1 ? true : false;
};
SelectDropdownComponent.prototype.ngOnInit = function () {
this.optionsReset();
};
SelectDropdownComponent.prototype.ngOnChanges = function (changes) {
if (changes.hasOwnProperty('optionList')) {
this.optionsReset();
}
var container = this._elementRef.nativeElement.classList;
setTimeout(function () { container.add('fadeInSelect'); }, 200);
};
SelectDropdownComponent.prototype.ngAfterViewInit = function () {
this.moveHighlightedIntoView();
if (!this.multiple && this.filterEnabled) {
this.filterInput.nativeElement.focus();
}
};
// Filter input (single select).
SelectDropdownComponent.prototype.onSingleFilterClick = function () {
this.singleFilterClick.emit(null);
};
SelectDropdownComponent.prototype.onSingleFilterInput = function (event) {
this.singleFilterInput.emit(event.target.value);
};
SelectDropdownComponent.prototype.onSingleFilterKeydown = function (event) {
this.singleFilterKeydown.emit(event);
};
// Options list.
SelectDropdownComponent.prototype.onOptionsWheel = function (event) {
this.handleOptionsWheel(event);
};
SelectDropdownComponent.prototype.onOptionMouseover = function (option) {
this.optionList.highlightOption(option);
};
SelectDropdownComponent.prototype.onOptionClick = function (option) {
this.optionClicked.emit(option);
};
/** Initialization. **/
SelectDropdownComponent.prototype.optionsReset = function () {
this.optionList.filter('');
this.optionList.highlight();
};
/** View. **/
SelectDropdownComponent.prototype.getOptionStyle = function (option) {
if (option.highlighted) {
var style = {};
if (typeof this.highlightColor !== 'undefined') {
style['background-color'] = this.highlightColor;
}
if (typeof this.highlightTextColor !== 'undefined') {
style['color'] = this.highlightTextColor;
}
return style;
}
else {
return {};
}
};
SelectDropdownComponent.prototype.clearFilterInput = function () {
if (this.filterEnabled) {
this.filterInput.nativeElement.value = '';
}
};
SelectDropdownComponent.prototype.moveHighlightedIntoView = function () {
var list = this.optionsList.nativeElement;
var listHeight = list.offsetHeight;
var itemIndex = this.optionList.getHighlightedIndex();
if (itemIndex > -1) {
var item = list.children[0].children[itemIndex];
var itemHeight = item.offsetHeight;
var itemTop = itemIndex * itemHeight;
var itemBottom = itemTop + itemHeight;
var viewTop = list.scrollTop;
var viewBottom = viewTop + listHeight;
if (itemBottom > viewBottom) {
list.scrollTop = itemBottom - listHeight;
}
else if (itemTop < viewTop) {
list.scrollTop = itemTop;
}
}
};
SelectDropdownComponent.prototype.handleOptionsWheel = function (e) {
var div = this.optionsList.nativeElement;
var atTop = div.scrollTop === 0;
var atBottom = div.offsetHeight + div.scrollTop === div.scrollHeight;
if (atTop && e.deltaY < 0) {
e.preventDefault();
}
else if (atBottom && e.deltaY > 0) {
e.preventDefault();
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], SelectDropdownComponent.prototype, "filterEnabled", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], SelectDropdownComponent.prototype, "highlightColor", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], SelectDropdownComponent.prototype, "highlightTextColor", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number)
], SelectDropdownComponent.prototype, "left", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], SelectDropdownComponent.prototype, "multiple", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], SelectDropdownComponent.prototype, "notFoundMsg", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", _option_list__WEBPACK_IMPORTED_MODULE_1__["OptionList"])
], SelectDropdownComponent.prototype, "optionList", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number)
], SelectDropdownComponent.prototype, "top", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number)
], SelectDropdownComponent.prototype, "width", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], SelectDropdownComponent.prototype, "placeholder", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], SelectDropdownComponent.prototype, "close", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], SelectDropdownComponent.prototype, "optionClicked", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], SelectDropdownComponent.prototype, "singleFilterClick", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], SelectDropdownComponent.prototype, "singleFilterInput", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], SelectDropdownComponent.prototype, "singleFilterKeydown", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('filterInput'),
__metadata("design:type", Object)
], SelectDropdownComponent.prototype, "filterInput", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('optionsList'),
__metadata("design:type", Object)
], SelectDropdownComponent.prototype, "optionsList", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('keyup', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], SelectDropdownComponent.prototype, "onkeyup", null);
SelectDropdownComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-select-dropdown',
template: __webpack_require__(/*! ./select-dropdown.component.html */ "./src/app/typescripts/pro/material-select/select-dropdown.component.html"),
encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], SelectDropdownComponent);
return SelectDropdownComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/material-select/select.component.html":
/*!***********************************************************************!*\
!*** ./src/app/typescripts/pro/material-select/select.component.html ***!
\***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<label *ngIf=\"label !== ''\">\r\n {{label}}\r\n</label>\r\n<div\r\n #selection\r\n [attr.tabindex]=\"disabled ? null : 0\"\r\n [ngClass]=\"{'open': isOpen, 'focus': hasFocus, 'below': isBelow, 'disabled': disabled}\"\r\n (click)=\"onSelectContainerClick()\"\r\n (focus)=\"onSelectContainerFocus()\"\r\n (keydown)=\"onSelectContainerKeydown($event)\"\r\n (window:click)=\"onWindowClick()\"\r\n (window:resize)=\"onWindowResize()\">\r\n\r\n <div class=\"single\"\r\n *ngIf=\"!multiple\">\r\n <div class=\"value\"\r\n *ngIf=\"optionList.hasSelected()\">\r\n {{optionList.selection[0].label}}\r\n </div>\r\n <div class=\"placeholder\"\r\n *ngIf=\"!optionList.hasSelected()\">\r\n {{placeholderView}}\r\n </div>\r\n <div class=\"clear\"\r\n *ngIf=\"allowClear && hasSelected\"\r\n (click)=\"onClearSelectionClick($event)\">\r\n &#x2715;\r\n </div>\r\n </div>\r\n\r\n <div class=\"multiple\"\r\n *ngIf=\"multiple\">\r\n <div class=\"placeholder\"\r\n *ngIf=\"!optionList.hasSelected()\">\r\n {{placeholderView}}\r\n </div>\r\n\r\n <div class=\"option\" \r\n *ngFor=\"let option of optionList.selection\">\r\n <span class=\"deselect-option\">, </span>{{option.label}}\r\n </div>\r\n </div>\r\n\r\n</div>\r\n<mdb-select-dropdown\r\n *ngIf=\"isOpen\"\r\n #dropdown\r\n [multiple]=\"multiple\"\r\n [optionList]=\"optionList\"\r\n [notFoundMsg]=\"notFoundMsg\"\r\n [highlightColor]=\"highlightColor\"\r\n [highlightTextColor]=\"highlightTextColor\"\r\n [filterEnabled]=\"filterEnabled\"\r\n [placeholder]=\"filterPlaceholder\"\r\n [top]=\"top\"\r\n [left]=\"left\"\r\n (close)=\"onDropdownClose($event)\"\r\n (optionClicked)=\"onDropdownOptionClicked($event)\"\r\n (singleFilterClick)=\"onSingleFilterClick()\"\r\n (singleFilterInput)=\"onSingleFilterInput($event)\"\r\n (singleFilterKeydown)=\"onSingleFilterKeydown($event)\">\r\n</mdb-select-dropdown>"
/***/ }),
/***/ "./src/app/typescripts/pro/material-select/select.component.ts":
/*!*********************************************************************!*\
!*** ./src/app/typescripts/pro/material-select/select.component.ts ***!
\*********************************************************************/
/*! exports provided: SELECT_VALUE_ACCESSOR, SelectComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SELECT_VALUE_ACCESSOR", function() { return SELECT_VALUE_ACCESSOR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectComponent", function() { return SelectComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _select_dropdown_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./select-dropdown.component */ "./src/app/typescripts/pro/material-select/select-dropdown.component.ts");
/* harmony import */ var _option_list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./option-list */ "./src/app/typescripts/pro/material-select/option-list.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SELECT_VALUE_ACCESSOR = {
provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return SelectComponent; }),
multi: true
};
var SelectComponent = /** @class */ (function () {
// Angular lifecycle hooks.
function SelectComponent(el, renderer) {
this.el = el;
this.renderer = renderer;
this.allowClear = false;
this.disabled = false;
this.multiple = false;
this.noFilter = 0;
this.notFoundMsg = 'No results found';
this.placeholder = '';
this.filterPlaceholder = '';
this.label = '';
this.filterEnabled = false;
this.opened = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.closed = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.selected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.deselected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.noOptionsFound = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
// Angular lifecycle hooks.
this.KEYS = {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
ESC: 27,
SPACE: 32,
UP: 38,
DOWN: 40
};
this._value = [];
// Selection state variables.
this.hasSelected = false;
// View state variables.
this.hasFocus = false;
this.isOpen = false;
this.isBelow = true;
this.filterInputWidth = 1;
this.isDisabled = false;
this.placeholderView = '';
this.clearClicked = false;
this.selectContainerClicked = false;
this.onChange = function (_) { };
this.onTouched = function () { };
}
/** Event handlers. **/
SelectComponent.prototype.closeSelect = function ($event) {
if (!this.isChild($event.target) && this.isOpen) {
this.closeDropdown();
}
};
SelectComponent.prototype.ngOnInit = function () {
this.placeholderView = this.placeholder;
};
SelectComponent.prototype.ngAfterViewInit = function () {
this.setArrowUpIcon();
this.setArrowDownIcon();
this.renderer.setStyle(this.selectionSpan.nativeElement.children[0].lastChild, 'visibility', 'hidden');
};
SelectComponent.prototype.ngOnChanges = function (changes) {
if (changes.hasOwnProperty('options')) {
this.updateOptionsList(changes['options'].isFirstChange());
}
if (changes.hasOwnProperty('noFilter')) {
var numOptions = this.optionList.options.length;
var minNumOptions = changes['noFilter'].currentValue;
this.filterEnabled = numOptions >= minNumOptions;
}
};
SelectComponent.prototype.setArrowUpIcon = function () {
var div = this.renderer.createElement('div');
this.renderer.appendChild(this.selectionSpan.nativeElement.children[0], div);
this.selectionSpan.nativeElement.children[0].lastChild.innerHTML = '&#x25BC;';
this.renderer.addClass(this.selectionSpan.nativeElement.children[0].lastChild, 'toggle');
};
SelectComponent.prototype.setArrowDownIcon = function () {
var div = this.renderer.createElement('div');
this.renderer.appendChild(this.selectionSpan.nativeElement.children[0], div);
this.selectionSpan.nativeElement.children[0].lastChild.innerHTML = '&#x25B2;';
this.renderer.addClass(this.selectionSpan.nativeElement.children[0].lastChild, 'toggle');
};
SelectComponent.prototype.isChild = function (elemnt) {
var node = elemnt.parentNode;
while (node != null) {
if (node === this.el.nativeElement) {
return true;
}
node = node.parentNode;
}
return false;
};
// Window.
SelectComponent.prototype.onWindowClick = function () {
if (!this.selectContainerClicked && !this.multiple) {
this.closeDropdown();
}
this.clearClicked = false;
this.selectContainerClicked = false;
};
SelectComponent.prototype.onWindowResize = function () {
this.updateWidth();
};
// Select container.
SelectComponent.prototype.onSelectContainerClick = function () {
this.selectContainerClicked = true;
if (!this.clearClicked) {
this.toggleDropdown();
}
};
SelectComponent.prototype.onSelectContainerFocus = function () {
this.onTouched();
};
SelectComponent.prototype.onSelectContainerKeydown = function (event) {
this.handleSelectContainerKeydown(event);
};
// Dropdown container.
SelectComponent.prototype.onDropdownOptionClicked = function (option) {
this.multiple ?
this.toggleSelectOption(option) : this.selectOption(option);
};
SelectComponent.prototype.onDropdownClose = function (focus) {
this.closeDropdown(focus);
};
// Single filter input.
SelectComponent.prototype.onSingleFilterClick = function () {
this.selectContainerClicked = true;
};
SelectComponent.prototype.onSingleFilterInput = function (term) {
var hasShown = this.optionList.filter(term);
if (!hasShown) {
this.noOptionsFound.emit(term);
}
};
SelectComponent.prototype.onSingleFilterKeydown = function (event) {
this.handleSingleFilterKeydown(event);
};
// Multiple filter input.
SelectComponent.prototype.onMultipleFilterInput = function (event) {
var _this = this;
if (!this.isOpen) {
this.openDropdown();
}
this.updateFilterWidth();
setTimeout(function () {
var term = event.target.value;
var hasShown = _this.optionList.filter(term);
if (!hasShown) {
_this.noOptionsFound.emit(term);
}
});
};
SelectComponent.prototype.onMultipleFilterKeydown = function (event) {
this.handleMultipleFilterKeydown(event);
};
// Single clear select.
SelectComponent.prototype.onClearSelectionClick = function () {
this.clearClicked = true;
this.clearSelection();
this.closeDropdown(true);
};
// Multiple deselect option.
SelectComponent.prototype.onDeselectOptionClick = function (option) {
this.clearClicked = true;
this.deselectOption(option);
};
/** API. **/
// TODO fix issues with global click/key handler that closes the dropdown.
SelectComponent.prototype.open = function () {
this.openDropdown();
};
SelectComponent.prototype.close = function () {
this.closeDropdown();
};
Object.defineProperty(SelectComponent.prototype, "value", {
get: function () {
return this.multiple ? this._value : this._value[0];
},
set: function (v) {
if (typeof v === 'undefined' || v === null || v === '') {
v = [];
}
else if (typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean') {
v = [v];
}
else if (!Array.isArray(v)) {
throw new TypeError('Value must be a string or an array.');
}
if (!_option_list__WEBPACK_IMPORTED_MODULE_3__["OptionList"].equalValues(v, this._value)) {
this.optionList.value = v;
this.valueChanged();
}
},
enumerable: true,
configurable: true
});
SelectComponent.prototype.clear = function () {
this.clearSelection();
};
SelectComponent.prototype.select = function (value) {
var _this = this;
this.optionList.getOptionsByValue(value).forEach(function (option) {
_this.selectOption(option);
});
};
/** ControlValueAccessor interface methods. **/
SelectComponent.prototype.writeValue = function (value) {
this.value = value;
};
SelectComponent.prototype.registerOnChange = function (fn) {
this.onChange = fn;
};
SelectComponent.prototype.registerOnTouched = function (fn) {
this.onTouched = fn;
};
SelectComponent.prototype.setDisabledState = function (isDisabled) {
this.disabled = isDisabled;
};
SelectComponent.prototype.valueChanged = function () {
this._value = this.optionList.value;
this.hasSelected = this._value.length > 0;
this.placeholderView = this.hasSelected ? '' : this.placeholder;
this.updateFilterWidth();
this.onChange(this.value);
};
/** Initialization. **/
SelectComponent.prototype.updateOptionsList = function (firstTime) {
// let v: Array<string> | any;
var v;
if (!firstTime) {
v = this.optionList.value;
}
this.optionList = new _option_list__WEBPACK_IMPORTED_MODULE_3__["OptionList"](this.options);
if (!firstTime) {
this.optionList.value = v;
this.valueChanged();
}
};
/** Dropdown. **/
SelectComponent.prototype.toggleDropdown = function () {
if (!this.isDisabled) {
this.isOpen ? this.closeDropdown(true) : this.openDropdown();
}
};
SelectComponent.prototype.openDropdown = function () {
this.renderer.setStyle(this.el.nativeElement, 'z-index', '1000');
if (!this.isOpen) {
this.renderer.setStyle(this.selectionSpan.nativeElement.children[0].lastChild, 'visibility', 'visible');
// tslint:disable-next-line:max-line-length
this.renderer.setStyle(this.selectionSpan.nativeElement.children[0].children[this.selectionSpan.nativeElement.children[0].children.length - 2], 'visibility', 'hidden');
this.updateWidth();
this.updatePosition();
this.isOpen = true;
if (this.multiple && this.filterEnabled) {
this.filterInput.nativeElement.focus();
}
this.opened.emit(null);
}
};
SelectComponent.prototype.closeDropdown = function (focus) {
var _this = this;
if (focus === void 0) { focus = false; }
var container = this.el.nativeElement.lastElementChild.classList;
this.renderer.removeStyle(this.el.nativeElement, 'z-index');
container.remove('fadeInSelect');
if (this.isOpen) {
this.renderer.setStyle(this.selectionSpan.nativeElement.children[0].lastChild, 'visibility', 'hidden');
// tslint:disable-next-line:max-line-length
this.renderer.setStyle(this.selectionSpan.nativeElement.children[0].children[this.selectionSpan.nativeElement.children[0].children.length - 2], 'visibility', 'visible');
}
setTimeout(function () {
if (_this.isOpen) {
_this.clearFilterInput();
_this.isOpen = false;
if (focus) {
_this.focus();
}
_this.closed.emit(null);
}
}, 200);
};
/** Select. **/
SelectComponent.prototype.selectOption = function (option) {
if (!option.selected) {
this.optionList.select(option, this.multiple);
this.valueChanged();
this.selected.emit(option.wrappedOption);
}
};
SelectComponent.prototype.deselectOption = function (option) {
if (option.selected) {
this.optionList.deselect(option);
this.valueChanged();
this.deselected.emit(option.wrappedOption);
}
};
SelectComponent.prototype.clearSelection = function () {
var selection = this.optionList.selection;
if (selection.length > 0) {
this.optionList.clearSelection();
this.valueChanged();
if (selection.length === 1) {
this.deselected.emit(selection[0].wrappedOption);
}
else {
this.deselected.emit(selection.map(function (option) {
return option.wrappedOption;
}));
}
}
};
SelectComponent.prototype.toggleSelectOption = function (option) {
option.selected ?
this.deselectOption(option) : this.selectOption(option);
};
SelectComponent.prototype.selectHighlightedOption = function () {
var option = this.optionList.highlightedOption;
if (option !== null) {
this.selectOption(option);
this.closeDropdown(true);
}
};
SelectComponent.prototype.deselectLast = function () {
var sel = this.optionList.selection;
if (sel.length > 0) {
var option = sel[sel.length - 1];
this.deselectOption(option);
this.setMultipleFilterInput(option.label + ' ');
}
};
/** Filter. **/
SelectComponent.prototype.clearFilterInput = function () {
if (this.multiple && this.filterEnabled) {
this.filterInput.nativeElement.value = '';
}
else {
this.dropdown.clearFilterInput();
}
};
SelectComponent.prototype.setMultipleFilterInput = function (value) {
if (this.filterEnabled) {
this.filterInput.nativeElement.value = value;
}
};
SelectComponent.prototype.handleSelectContainerKeydown = function (event) {
var _this = this;
var key = event.which;
if (this.isOpen) {
if (key === this.KEYS.ESC ||
(key === this.KEYS.UP && event.altKey)) {
this.closeDropdown(true);
}
else if (key === this.KEYS.TAB) {
this.closeDropdown();
}
else if (key === this.KEYS.ENTER) {
this.selectHighlightedOption();
}
else if (key === this.KEYS.UP) {
this.optionList.highlightPreviousOption();
this.dropdown.moveHighlightedIntoView();
if (!this.filterEnabled) {
event.preventDefault();
}
}
else if (key === this.KEYS.DOWN) {
this.optionList.highlightNextOption();
this.dropdown.moveHighlightedIntoView();
if (!this.filterEnabled) {
event.preventDefault();
}
}
}
else {
if (key === this.KEYS.ENTER || key === this.KEYS.SPACE ||
(key === this.KEYS.DOWN && event.altKey)) {
/* FIREFOX HACK:
*
* The setTimeout is added to prevent the enter keydown event
* to be triggered for the filter input field, which causes
* the dropdown to be closed again.
*/
setTimeout(function () { _this.openDropdown(); });
}
}
};
SelectComponent.prototype.handleMultipleFilterKeydown = function (event) {
var key = event.which;
if (key === this.KEYS.BACKSPACE) {
if (this.hasSelected && this.filterEnabled &&
this.filterInput.nativeElement.value === '') {
this.deselectLast();
}
}
};
SelectComponent.prototype.handleSingleFilterKeydown = function (event) {
var key = event.which;
if (key === this.KEYS.ESC || key === this.KEYS.TAB
|| key === this.KEYS.UP || key === this.KEYS.DOWN
|| key === this.KEYS.ENTER) {
this.handleSelectContainerKeydown(event);
}
};
/** View. **/
SelectComponent.prototype.focus = function () {
this.hasFocus = true;
if (this.multiple && this.filterEnabled) {
this.filterInput.nativeElement.focus();
}
else {
this.selectionSpan.nativeElement.focus();
}
};
SelectComponent.prototype.blur = function () {
this.hasFocus = false;
this.selectionSpan.nativeElement.blur();
};
SelectComponent.prototype.updateWidth = function () {
this.width = this.selectionSpan.nativeElement.offsetWidth;
};
SelectComponent.prototype.updatePosition = function () {
var e = this.selectionSpan.nativeElement;
this.left = e.offsetLeft;
this.top = e.offsetTop + e.offsetHeight;
};
SelectComponent.prototype.updateFilterWidth = function () {
if (typeof this.filterInput !== 'undefined') {
var value = this.filterInput.nativeElement.value;
this.filterInputWidth = value.length === 0 ?
1 + this.placeholderView.length * 10 : 1 + value.length * 10;
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Array)
], SelectComponent.prototype, "options", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SelectComponent.prototype, "allowClear", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SelectComponent.prototype, "disabled", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], SelectComponent.prototype, "highlightColor", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], SelectComponent.prototype, "highlightTextColor", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SelectComponent.prototype, "multiple", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SelectComponent.prototype, "noFilter", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SelectComponent.prototype, "notFoundMsg", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SelectComponent.prototype, "placeholder", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SelectComponent.prototype, "filterPlaceholder", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SelectComponent.prototype, "label", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SelectComponent.prototype, "filterEnabled", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], SelectComponent.prototype, "opened", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], SelectComponent.prototype, "closed", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], SelectComponent.prototype, "selected", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], SelectComponent.prototype, "deselected", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], SelectComponent.prototype, "noOptionsFound", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('selection'),
__metadata("design:type", Object)
], SelectComponent.prototype, "selectionSpan", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('dropdown'),
__metadata("design:type", _select_dropdown_component__WEBPACK_IMPORTED_MODULE_2__["SelectDropdownComponent"])
], SelectComponent.prototype, "dropdown", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('filterInput'),
__metadata("design:type", Object)
], SelectComponent.prototype, "filterInput", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('document:click', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], SelectComponent.prototype, "closeSelect", null);
SelectComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-select',
template: __webpack_require__(/*! ./select.component.html */ "./src/app/typescripts/pro/material-select/select.component.html"),
providers: [SELECT_VALUE_ACCESSOR],
encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]])
], SelectComponent);
return SelectComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/material-select/select.module.ts":
/*!******************************************************************!*\
!*** ./src/app/typescripts/pro/material-select/select.module.ts ***!
\******************************************************************/
/*! exports provided: SelectModule, SELECT_VALUE_ACCESSOR, SelectComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectModule", function() { return SelectModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _select_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./select.component */ "./src/app/typescripts/pro/material-select/select.component.ts");
/* harmony import */ var _select_dropdown_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./select-dropdown.component */ "./src/app/typescripts/pro/material-select/select-dropdown.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SELECT_VALUE_ACCESSOR", function() { return _select_component__WEBPACK_IMPORTED_MODULE_3__["SELECT_VALUE_ACCESSOR"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectComponent", function() { return _select_component__WEBPACK_IMPORTED_MODULE_3__["SelectComponent"]; });
var __decorate = (undefined && undefined.__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 SelectModule = /** @class */ (function () {
function SelectModule() {
}
SelectModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [
_select_component__WEBPACK_IMPORTED_MODULE_3__["SelectComponent"],
_select_dropdown_component__WEBPACK_IMPORTED_MODULE_4__["SelectDropdownComponent"]
],
exports: [
_select_component__WEBPACK_IMPORTED_MODULE_3__["SelectComponent"]
],
imports: [
_angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"]
]
})
], SelectModule);
return SelectModule;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/preloader/preloader.constants.ts":
/*!******************************************************************!*\
!*** ./src/app/typescripts/pro/preloader/preloader.constants.ts ***!
\******************************************************************/
/*! exports provided: TYPE_ERROR_CONTAINER_WAS_NOT_FOUND_MESSAGE, EMULATE_ELEMENT_NAME, CONTAINER_QUERY, COMPLETE_CLASS_NAME, CONTAINER_CLASS_NAME, CONTAINER_NAME */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TYPE_ERROR_CONTAINER_WAS_NOT_FOUND_MESSAGE", function() { return TYPE_ERROR_CONTAINER_WAS_NOT_FOUND_MESSAGE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMULATE_ELEMENT_NAME", function() { return EMULATE_ELEMENT_NAME; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTAINER_QUERY", function() { return CONTAINER_QUERY; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COMPLETE_CLASS_NAME", function() { return COMPLETE_CLASS_NAME; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTAINER_CLASS_NAME", function() { return CONTAINER_CLASS_NAME; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTAINER_NAME", function() { return CONTAINER_NAME; });
var CONTAINER_CLASS_NAME = 'spinning-preloader-container';
var COMPLETE_CLASS_NAME = 'complete';
var CONTAINER_QUERY = "." + CONTAINER_CLASS_NAME;
var CONTAINER_NAME = CONTAINER_CLASS_NAME.split('-').join(' ');
var TYPE_ERROR_CONTAINER_WAS_NOT_FOUND_MESSAGE = "The " + CONTAINER_NAME + " was not found";
var EMULATE_ELEMENT_NAME = 'div';
/***/ }),
/***/ "./src/app/typescripts/pro/preloader/preloader.service.ts":
/*!****************************************************************!*\
!*** ./src/app/typescripts/pro/preloader/preloader.service.ts ***!
\****************************************************************/
/*! exports provided: MDBSpinningPreloader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBSpinningPreloader", function() { return MDBSpinningPreloader; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
/* harmony import */ var _preloader_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./preloader.constants */ "./src/app/typescripts/pro/preloader/preloader.constants.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var MDBSpinningPreloader = /** @class */ (function () {
function MDBSpinningPreloader(document) {
this.document = document;
this.container = this.document.querySelector(_preloader_constants__WEBPACK_IMPORTED_MODULE_2__["CONTAINER_QUERY"]);
}
MDBSpinningPreloader.errorHandler = function () {
throw new TypeError(_preloader_constants__WEBPACK_IMPORTED_MODULE_2__["TYPE_ERROR_CONTAINER_WAS_NOT_FOUND_MESSAGE"]);
};
MDBSpinningPreloader.prototype.start = function () {
this.container.classList.remove(_preloader_constants__WEBPACK_IMPORTED_MODULE_2__["COMPLETE_CLASS_NAME"]);
};
MDBSpinningPreloader.prototype.stop = function () {
this.container.classList.add(_preloader_constants__WEBPACK_IMPORTED_MODULE_2__["COMPLETE_CLASS_NAME"]);
};
Object.defineProperty(MDBSpinningPreloader.prototype, "container", {
get: function () {
return this._container;
},
set: function (element) {
if (!element) {
// NgSpinningPreloader.errorHandler();
}
this._container = element || this.document.createElement(_preloader_constants__WEBPACK_IMPORTED_MODULE_2__["EMULATE_ELEMENT_NAME"]);
},
enumerable: true,
configurable: true
});
MDBSpinningPreloader = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["DOCUMENT"])),
__metadata("design:paramtypes", [Object])
], MDBSpinningPreloader);
return MDBSpinningPreloader;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/bar.component.html":
/*!*****************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/bar.component.html ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"progress-bar\"\r\nstyle=\"min-width: 0;\"\r\nrole=\"progressbar\"\r\n[ngClass]=\"type && 'progress-bar-' + type\"\r\n[ngStyle]=\"{width: (percent < 100 ? percent : 100) + '%', transition: transition}\"\r\naria-valuemin=\"0\"\r\n[attr.aria-valuenow]=\"value\"\r\n[attr.aria-valuetext]=\"percent.toFixed(0) + '%'\"\r\n[attr.aria-valuemax]=\"max\">\r\n <ng-content></ng-content>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/bar.component.ts":
/*!***************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/bar.component.ts ***!
\***************************************************************/
/*! exports provided: BarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarComponent", function() { return BarComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _progress_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./progress.directive */ "./src/app/typescripts/pro/progressbars/progress.directive.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
// todo: number pipe
// todo: use query from progress?
var BarComponent = /** @class */ (function () {
function BarComponent(progress) {
this.percent = 0;
this.progress = progress;
}
Object.defineProperty(BarComponent.prototype, "value", {
/** current value of progress bar */
get: function () {
return this._value;
},
set: function (v) {
if (!v && v !== 0) {
return;
}
this._value = v;
this.recalculatePercentage();
},
enumerable: true,
configurable: true
});
BarComponent.prototype.ngOnInit = function () {
this.progress.addBar(this);
};
BarComponent.prototype.ngOnDestroy = function () {
this.progress.removeBar(this);
};
BarComponent.prototype.recalculatePercentage = function () {
this.percent = +(100 * this.value / this.progress.max).toFixed(2);
var totalPercentage = this.progress.bars.reduce(function (total, bar) {
return total + bar.percent;
}, 0);
if (totalPercentage > 100) {
this.percent -= totalPercentage - 100;
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], BarComponent.prototype, "type", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number),
__metadata("design:paramtypes", [Number])
], BarComponent.prototype, "value", null);
BarComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-bar',
template: __webpack_require__(/*! ./bar.component.html */ "./src/app/typescripts/pro/progressbars/bar.component.html")
}),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"])()),
__metadata("design:paramtypes", [_progress_directive__WEBPACK_IMPORTED_MODULE_1__["ProgressDirective"]])
], BarComponent);
return BarComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/index.ts":
/*!*******************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/index.ts ***!
\*******************************************************/
/*! exports provided: BarComponent, ProgressDirective, ProgressbarComponent, ProgressbarModule, ProgressbarConfigComponent, ProgressSpinnerComponent, MaterialRootModule, ProgressBars */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaterialRootModule", function() { return MaterialRootModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressBars", function() { return ProgressBars; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _bar_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bar.component */ "./src/app/typescripts/pro/progressbars/bar.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BarComponent", function() { return _bar_component__WEBPACK_IMPORTED_MODULE_1__["BarComponent"]; });
/* harmony import */ var _progress_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./progress.directive */ "./src/app/typescripts/pro/progressbars/progress.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressDirective", function() { return _progress_directive__WEBPACK_IMPORTED_MODULE_2__["ProgressDirective"]; });
/* harmony import */ var _progressbar_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./progressbar.component */ "./src/app/typescripts/pro/progressbars/progressbar.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressbarComponent", function() { return _progressbar_component__WEBPACK_IMPORTED_MODULE_3__["ProgressbarComponent"]; });
/* harmony import */ var _progressbar_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./progressbar.module */ "./src/app/typescripts/pro/progressbars/progressbar.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressbarModule", function() { return _progressbar_module__WEBPACK_IMPORTED_MODULE_4__["ProgressbarModule"]; });
/* harmony import */ var _progressbar_config_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./progressbar.config.component */ "./src/app/typescripts/pro/progressbars/progressbar.config.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressbarConfigComponent", function() { return _progressbar_config_component__WEBPACK_IMPORTED_MODULE_5__["ProgressbarConfigComponent"]; });
/* harmony import */ var _progress_spinner_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./progress-spinner.component */ "./src/app/typescripts/pro/progressbars/progress-spinner.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressSpinnerComponent", function() { return _progress_spinner_component__WEBPACK_IMPORTED_MODULE_6__["ProgressSpinnerComponent"]; });
/* harmony import */ var _progress_spinner_module___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./progress-spinner-module/ */ "./src/app/typescripts/pro/progressbars/progress-spinner-module/index.ts");
/* harmony import */ var _progress_bars_module___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./progress-bars-module/ */ "./src/app/typescripts/pro/progressbars/progress-bars-module/index.ts");
var __decorate = (undefined && undefined.__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 MATERIAL_MODULES = [
_progress_bars_module___WEBPACK_IMPORTED_MODULE_8__["MdProgressBarModule"],
_progress_spinner_module___WEBPACK_IMPORTED_MODULE_7__["MdProgressSpinnerModule"],
_progressbar_module__WEBPACK_IMPORTED_MODULE_4__["ProgressbarModule"]
];
var MaterialRootModule = /** @class */ (function () {
function MaterialRootModule() {
}
MaterialRootModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [
_progress_bars_module___WEBPACK_IMPORTED_MODULE_8__["MdProgressBarModule"].forRoot(),
_progress_spinner_module___WEBPACK_IMPORTED_MODULE_7__["MdProgressSpinnerModule"].forRoot(),
_progressbar_module__WEBPACK_IMPORTED_MODULE_4__["ProgressbarModule"].forRoot()
],
exports: MATERIAL_MODULES,
})
], MaterialRootModule);
return MaterialRootModule;
}());
/** @deprecated */
var ProgressBars = /** @class */ (function () {
function ProgressBars() {
}
/** @deprecated */
ProgressBars.forRoot = function () {
return { ngModule: MaterialRootModule };
};
ProgressBars = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: MATERIAL_MODULES,
exports: MATERIAL_MODULES,
})
], ProgressBars);
return ProgressBars;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress-bars-module/index.ts":
/*!****************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress-bars-module/index.ts ***!
\****************************************************************************/
/*! exports provided: MdProgressBarModule, ProgressBarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdProgressBarModule", function() { return MdProgressBarModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _progressbar_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./progressbar.component */ "./src/app/typescripts/pro/progressbars/progress-bars-module/progressbar.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressBarComponent", function() { return _progressbar_component__WEBPACK_IMPORTED_MODULE_2__["ProgressBarComponent"]; });
var __decorate = (undefined && undefined.__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 MdProgressBarModule = /** @class */ (function () {
function MdProgressBarModule() {
}
MdProgressBarModule_1 = MdProgressBarModule;
/** @deprecated */
MdProgressBarModule.forRoot = function () {
return {
ngModule: MdProgressBarModule_1,
providers: []
};
};
MdProgressBarModule = MdProgressBarModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"]],
exports: [_progressbar_component__WEBPACK_IMPORTED_MODULE_2__["ProgressBarComponent"]],
declarations: [_progressbar_component__WEBPACK_IMPORTED_MODULE_2__["ProgressBarComponent"]],
})
], MdProgressBarModule);
return MdProgressBarModule;
var MdProgressBarModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress-bars-module/progressbar.component.html":
/*!**********************************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress-bars-module/progressbar.component.html ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<!-- The background div is named as such because it appears below the other divs and is not sized based on values. -->\r\n<div class=\"mat-progress-bar-background mat-progress-bar-element\"></div>\r\n<div class=\"mat-progress-bar-buffer mat-progress-bar-element\" [ngStyle]=\"_bufferTransform()\"></div>\r\n<div class=\"mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element\" [ngStyle]=\"_primaryTransform()\"></div>\r\n<div class=\"mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element\"></div>\r\n"
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress-bars-module/progressbar.component.scss":
/*!**********************************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress-bars-module/progressbar.component.scss ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ":host {\n display: block;\n height: 5px;\n overflow: hidden;\n position: relative;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n transition: opacity 250ms linear;\n width: 100%; }\n\n:host .mat-progress-bar-element, :host .mat-progress-bar-fill::after {\n height: 100%;\n position: absolute;\n width: 100%; }\n\n:host .mat-progress-bar-background {\n background-repeat: repeat-x;\n background-size: 10px 4px;\n display: none; }\n\n:host .mat-progress-bar-buffer {\n -webkit-transform-origin: top left;\n transform-origin: top left;\n transition: stroke 0.3s cubic-bezier(0.35, 0, 0.25, 1), -webkit-transform 250ms ease;\n transition: transform 250ms ease, stroke 0.3s cubic-bezier(0.35, 0, 0.25, 1);\n transition: transform 250ms ease, stroke 0.3s cubic-bezier(0.35, 0, 0.25, 1), -webkit-transform 250ms ease; }\n\n:host .mat-progress-bar-secondary {\n display: none; }\n\n:host .mat-progress-bar-fill {\n -webkit-animation: none;\n animation: none;\n -webkit-transform-origin: top left;\n transform-origin: top left;\n transition: stroke 0.3s cubic-bezier(0.35, 0, 0.25, 1), -webkit-transform 250ms ease;\n transition: transform 250ms ease, stroke 0.3s cubic-bezier(0.35, 0, 0.25, 1);\n transition: transform 250ms ease, stroke 0.3s cubic-bezier(0.35, 0, 0.25, 1), -webkit-transform 250ms ease; }\n\n:host .mat-progress-bar-fill::after {\n -webkit-animation: none;\n animation: none;\n content: '';\n display: inline-block;\n left: 0; }\n\n:host[mode=query] {\n -webkit-transform: rotateZ(180deg);\n transform: rotateZ(180deg); }\n\n:host[mode=indeterminate] .mat-progress-bar-fill, :host[mode=query] .mat-progress-bar-fill {\n transition: none; }\n\n:host[mode=indeterminate] .mat-progress-bar-primary, :host[mode=query] .mat-progress-bar-primary {\n -webkit-animation: mat-progress-bar-primary-indeterminate-translate 2s infinite linear;\n animation: mat-progress-bar-primary-indeterminate-translate 2s infinite linear;\n left: -145.166611%; }\n\n:host[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after, :host[mode=query]\n.mat-progress-bar-primary.mat-progress-bar-fill::after {\n -webkit-animation: mat-progress-bar-primary-indeterminate-scale 2s infinite linear;\n animation: mat-progress-bar-primary-indeterminate-scale 2s infinite linear; }\n\n:host[mode=indeterminate] .mat-progress-bar-secondary, :host[mode=query] .mat-progress-bar-secondary {\n -webkit-animation: mat-progress-bar-secondary-indeterminate-translate 2s infinite linear;\n animation: mat-progress-bar-secondary-indeterminate-translate 2s infinite linear;\n left: -54.888891%;\n display: block; }\n\n:host[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after, :host[mode=query]\n.mat-progress-bar-secondary.mat-progress-bar-fill::after {\n -webkit-animation: mat-progress-bar-secondary-indeterminate-scale 2s infinite linear;\n animation: mat-progress-bar-secondary-indeterminate-scale 2s infinite linear; }\n\n:host[mode=buffer] .mat-progress-bar-background {\n -webkit-animation: mat-progress-bar-background-scroll 250ms infinite linear;\n animation: mat-progress-bar-background-scroll 250ms infinite linear;\n display: block; }\n\n:host-context([dir=rtl]) {\n -webkit-transform: rotateY(180deg);\n transform: rotateY(180deg); }\n\n@-webkit-keyframes mat-progress-bar-primary-indeterminate-translate {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0); }\n 20% {\n -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);\n animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);\n -webkit-transform: translateX(0);\n transform: translateX(0); }\n 59.15% {\n -webkit-animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);\n animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);\n -webkit-transform: translateX(83.67142%);\n transform: translateX(83.67142%); }\n 100% {\n -webkit-transform: translateX(200.61106%);\n transform: translateX(200.61106%); } }\n\n@keyframes mat-progress-bar-primary-indeterminate-translate {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0); }\n 20% {\n -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);\n animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);\n -webkit-transform: translateX(0);\n transform: translateX(0); }\n 59.15% {\n -webkit-animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);\n animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);\n -webkit-transform: translateX(83.67142%);\n transform: translateX(83.67142%); }\n 100% {\n -webkit-transform: translateX(200.61106%);\n transform: translateX(200.61106%); } }\n\n@-webkit-keyframes mat-progress-bar-primary-indeterminate-scale {\n 0% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 36.65% {\n -webkit-animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1);\n animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1);\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 69.15% {\n -webkit-animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);\n animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);\n -webkit-transform: scaleX(0.66148);\n transform: scaleX(0.66148); }\n 100% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); } }\n\n@keyframes mat-progress-bar-primary-indeterminate-scale {\n 0% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 36.65% {\n -webkit-animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1);\n animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1);\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 69.15% {\n -webkit-animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);\n animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);\n -webkit-transform: scaleX(0.66148);\n transform: scaleX(0.66148); }\n 100% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); } }\n\n@-webkit-keyframes mat-progress-bar-secondary-indeterminate-translate {\n 0% {\n -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n -webkit-transform: translateX(0);\n transform: translateX(0); }\n 25% {\n -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n -webkit-transform: translateX(37.65191%);\n transform: translateX(37.65191%); }\n 48.35% {\n -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n -webkit-transform: translateX(84.38617%);\n transform: translateX(84.38617%); }\n 100% {\n -webkit-transform: translateX(160.27778%);\n transform: translateX(160.27778%); } }\n\n@keyframes mat-progress-bar-secondary-indeterminate-translate {\n 0% {\n -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n -webkit-transform: translateX(0);\n transform: translateX(0); }\n 25% {\n -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n -webkit-transform: translateX(37.65191%);\n transform: translateX(37.65191%); }\n 48.35% {\n -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n -webkit-transform: translateX(84.38617%);\n transform: translateX(84.38617%); }\n 100% {\n -webkit-transform: translateX(160.27778%);\n transform: translateX(160.27778%); } }\n\n@-webkit-keyframes mat-progress-bar-secondary-indeterminate-scale {\n 0% {\n -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 19.15% {\n -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n -webkit-transform: scaleX(0.4571);\n transform: scaleX(0.4571); }\n 44.15% {\n -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n -webkit-transform: scaleX(0.72796);\n transform: scaleX(0.72796); }\n 100% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); } }\n\n@keyframes mat-progress-bar-secondary-indeterminate-scale {\n 0% {\n -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 19.15% {\n -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n -webkit-transform: scaleX(0.4571);\n transform: scaleX(0.4571); }\n 44.15% {\n -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n -webkit-transform: scaleX(0.72796);\n transform: scaleX(0.72796); }\n 100% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); } }\n\n@-webkit-keyframes mat-progress-bar-background-scroll {\n to {\n -webkit-transform: translateX(-10px);\n transform: translateX(-10px); } }\n\n@keyframes mat-progress-bar-background-scroll {\n to {\n -webkit-transform: translateX(-10px);\n transform: translateX(-10px); } }\n"
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress-bars-module/progressbar.component.ts":
/*!********************************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress-bars-module/progressbar.component.ts ***!
\********************************************************************************************/
/*! exports provided: ProgressBarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressBarComponent", function() { return ProgressBarComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
// TODO(josephperrott): Benchpress tests.
// TODO(josephperrott): Add ARIA attributes for progressbar "for".
/**
* <md-progress-bar> component.
*/
var ProgressBarComponent = /** @class */ (function () {
function ProgressBarComponent() {
/** Color of the progress bar. */
this.color = 'primary';
this._value = 0;
this._bufferValue = 0;
/**
* Mode of the progress bar.
*
* Input must be one of these values: determinate, indeterminate, buffer, query, defaults to
* 'determinate'.
* Mirrored to mode attribute.
*/
this.mode = 'determinate';
}
Object.defineProperty(ProgressBarComponent.prototype, "value", {
/** Value of the progressbar. Defaults to zero. Mirrored to aria-valuenow. */
get: function () { return this._value; },
set: function (v) { this._value = clamp(v || 0); },
enumerable: true,
configurable: true
});
Object.defineProperty(ProgressBarComponent.prototype, "bufferValue", {
/** Buffer value of the progress bar. Defaults to zero. */
get: function () { return this._bufferValue; },
set: function (v) { this._bufferValue = clamp(v || 0); },
enumerable: true,
configurable: true
});
/** Gets the current transform value for the progress bar's primary indicator. */
ProgressBarComponent.prototype._primaryTransform = function () {
var scale = this.value / 100;
return { transform: "scaleX(" + scale + ")" };
};
/**
* Gets the current transform value for the progress bar's buffer indicator. Only used if the
* progress mode is set to buffer, otherwise returns an undefined, causing no transformation.
*/
ProgressBarComponent.prototype._bufferTransform = function () {
if (this.mode === 'buffer') {
var scale = this.bufferValue / 100;
return { transform: "scaleX(" + scale + ")" };
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], ProgressBarComponent.prototype, "color", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('attr.aria-valuenow'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Number])
], ProgressBarComponent.prototype, "value", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Number])
], ProgressBarComponent.prototype, "bufferValue", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('attr.mode'),
__metadata("design:type", String)
], ProgressBarComponent.prototype, "mode", void 0);
ProgressBarComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-progress-bar, mat-progress-bar',
template: __webpack_require__(/*! ./progressbar.component.html */ "./src/app/typescripts/pro/progressbars/progress-bars-module/progressbar.component.html"),
styles: [__webpack_require__(/*! ./progressbar.component.scss */ "./src/app/typescripts/pro/progressbars/progress-bars-module/progressbar.component.scss")],
changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
})
], ProgressBarComponent);
return ProgressBarComponent;
}());
/** Clamps a value to be between two numbers, by default 0 and 100. */
function clamp(v, min, max) {
if (min === void 0) { min = 0; }
if (max === void 0) { max = 100; }
return Math.max(min, Math.min(max, v));
}
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress-spinner-module/index.ts":
/*!*******************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress-spinner-module/index.ts ***!
\*******************************************************************************/
/*! exports provided: MdProgressSpinnerModule, MdProgressSpinnerCssMatStylerDirective, MdProgressSpinnerComponent, MdSpinnerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdProgressSpinnerModule", function() { return MdProgressSpinnerModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _progress_spinner_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./progress-spinner.component */ "./src/app/typescripts/pro/progressbars/progress-spinner-module/progress-spinner.component.ts");
/* harmony import */ var _progress_spinner_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../progress-spinner.component */ "./src/app/typescripts/pro/progressbars/progress-spinner.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdProgressSpinnerCssMatStylerDirective", function() { return _progress_spinner_component__WEBPACK_IMPORTED_MODULE_1__["MdProgressSpinnerCssMatStylerDirective"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdProgressSpinnerComponent", function() { return _progress_spinner_component__WEBPACK_IMPORTED_MODULE_1__["MdProgressSpinnerComponent"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdSpinnerComponent", function() { return _progress_spinner_component__WEBPACK_IMPORTED_MODULE_1__["MdSpinnerComponent"]; });
var __decorate = (undefined && undefined.__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 MdProgressSpinnerModule = /** @class */ (function () {
function MdProgressSpinnerModule() {
}
MdProgressSpinnerModule_1 = MdProgressSpinnerModule;
/** @deprecated */
MdProgressSpinnerModule.forRoot = function () {
return {
ngModule: MdProgressSpinnerModule_1,
providers: []
};
};
MdProgressSpinnerModule = MdProgressSpinnerModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
exports: [
_progress_spinner_component__WEBPACK_IMPORTED_MODULE_1__["MdProgressSpinnerComponent"],
_progress_spinner_component__WEBPACK_IMPORTED_MODULE_1__["MdSpinnerComponent"],
_progress_spinner_component__WEBPACK_IMPORTED_MODULE_1__["MdProgressSpinnerCssMatStylerDirective"],
_progress_spinner_component__WEBPACK_IMPORTED_MODULE_2__["ProgressSpinnerComponent"]
],
declarations: [
_progress_spinner_component__WEBPACK_IMPORTED_MODULE_1__["MdProgressSpinnerComponent"],
_progress_spinner_component__WEBPACK_IMPORTED_MODULE_1__["MdSpinnerComponent"],
_progress_spinner_component__WEBPACK_IMPORTED_MODULE_1__["MdProgressSpinnerCssMatStylerDirective"],
_progress_spinner_component__WEBPACK_IMPORTED_MODULE_2__["ProgressSpinnerComponent"]
],
})
], MdProgressSpinnerModule);
return MdProgressSpinnerModule;
var MdProgressSpinnerModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress-spinner-module/progress-spinner.component.html":
/*!******************************************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress-spinner-module/progress-spinner.component.html ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<!--\r\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\r\n center. The center of the circle will remain at the center of the md-progress-spinner\r\n element containing the SVG.\r\n-->\r\n<svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid meet\">\r\n <path></path>\r\n</svg>"
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress-spinner-module/progress-spinner.component.scss":
/*!******************************************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress-spinner-module/progress-spinner.component.scss ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ":host {\n display: block;\n height: 100px;\n width: 100px;\n overflow: hidden; }\n\n:host svg {\n height: 100%;\n width: 100%;\n -webkit-transform-origin: center;\n transform-origin: center; }\n\n:host path {\n fill: transparent;\n stroke-width: 10px;\n transition: stroke 0.3s cubic-bezier(0.35, 0, 0.25, 1); }\n\n:host[mode=indeterminate] svg {\n -webkit-animation-duration: 5.25s, 2.887s;\n animation-duration: 5.25s, 2.887s;\n -webkit-animation-name: mat-progress-spinner-sporadic-rotate, mat-progress-spinner-linear-rotate;\n animation-name: mat-progress-spinner-sporadic-rotate, mat-progress-spinner-linear-rotate;\n -webkit-animation-timing-function: cubic-bezier(0.35, 0, 0.25, 1), linear;\n animation-timing-function: cubic-bezier(0.35, 0, 0.25, 1), linear;\n -webkit-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n transition: none; }\n\n@-webkit-keyframes mat-progress-spinner-linear-rotate {\n 0% {\n -webkit-transform: rotate(0);\n transform: rotate(0); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes mat-progress-spinner-linear-rotate {\n 0% {\n -webkit-transform: rotate(0);\n transform: rotate(0); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@-webkit-keyframes mat-progress-spinner-sporadic-rotate {\n 12.5% {\n -webkit-transform: rotate(135deg);\n transform: rotate(135deg); }\n 25% {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n 37.5% {\n -webkit-transform: rotate(405deg);\n transform: rotate(405deg); }\n 50% {\n -webkit-transform: rotate(540deg);\n transform: rotate(540deg); }\n 62.5% {\n -webkit-transform: rotate(675deg);\n transform: rotate(675deg); }\n 75% {\n -webkit-transform: rotate(810deg);\n transform: rotate(810deg); }\n 87.5% {\n -webkit-transform: rotate(945deg);\n transform: rotate(945deg); }\n 100% {\n -webkit-transform: rotate(1080deg);\n transform: rotate(1080deg); } }\n\n@keyframes mat-progress-spinner-sporadic-rotate {\n 12.5% {\n -webkit-transform: rotate(135deg);\n transform: rotate(135deg); }\n 25% {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n 37.5% {\n -webkit-transform: rotate(405deg);\n transform: rotate(405deg); }\n 50% {\n -webkit-transform: rotate(540deg);\n transform: rotate(540deg); }\n 62.5% {\n -webkit-transform: rotate(675deg);\n transform: rotate(675deg); }\n 75% {\n -webkit-transform: rotate(810deg);\n transform: rotate(810deg); }\n 87.5% {\n -webkit-transform: rotate(945deg);\n transform: rotate(945deg); }\n 100% {\n -webkit-transform: rotate(1080deg);\n transform: rotate(1080deg); } }\n"
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress-spinner-module/progress-spinner.component.ts":
/*!****************************************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress-spinner-module/progress-spinner.component.ts ***!
\****************************************************************************************************/
/*! exports provided: MdProgressSpinnerCssMatStylerDirective, MdProgressSpinnerComponent, MdSpinnerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdProgressSpinnerCssMatStylerDirective", function() { return MdProgressSpinnerCssMatStylerDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdProgressSpinnerComponent", function() { return MdProgressSpinnerComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdSpinnerComponent", function() { return MdSpinnerComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
// TODO(josephperrott): Benchpress tests.
/** A single degree in radians. */
var DEGREE_IN_RADIANS = Math.PI / 180;
/** Duration of the indeterminate animation. */
var DURATION_INDETERMINATE = 667;
/** Duration of the indeterminate animation. */
var DURATION_DETERMINATE = 225;
/** Start animation value of the indeterminate animation */
var startIndeterminate = 3;
/** End animation value of the indeterminate animation */
var endIndeterminate = 80;
/* Maximum angle for the arc. The angle can't be exactly 360, because the arc becomes hidden. */
var MAX_ANGLE = 359.99 / 100;
/**
* Directive whose purpose is to add the mat- CSS styling to this selector.
* @docs-private
*/
var MdProgressSpinnerCssMatStylerDirective = /** @class */ (function () {
function MdProgressSpinnerCssMatStylerDirective() {
}
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.mat-progress-spinner'),
__metadata("design:type", Object)
], MdProgressSpinnerCssMatStylerDirective.prototype, "true", void 0);
MdProgressSpinnerCssMatStylerDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbSpinners], mat-progress-spinner'
})
], MdProgressSpinnerCssMatStylerDirective);
return MdProgressSpinnerCssMatStylerDirective;
}());
/**
* <md-progress-spinner> component.
*/
var MdProgressSpinnerComponent = /** @class */ (function () {
function MdProgressSpinnerComponent(_ngZone, _elementRef, _renderer, platformId) {
this._ngZone = _ngZone;
this._elementRef = _elementRef;
this._renderer = _renderer;
/** The id of the last requested animation. */
this._lastAnimationId = 0;
this._mode = 'determinate';
this._color = 'primary';
this.isBrowser = false;
this.isBrowser = Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["isPlatformBrowser"])(platformId);
}
Object.defineProperty(MdProgressSpinnerComponent.prototype, "_ariaValueMin", {
/**
* Values for aria max and min are only defined as numbers when in a determinate mode. We do this
* because voiceover does not report the progress indicator as indeterminate if the aria min
* and/or max value are number values.
*/
get: function () {
return this.mode === 'determinate' ? 0 : null;
},
enumerable: true,
configurable: true
});
Object.defineProperty(MdProgressSpinnerComponent.prototype, "_ariaValueMax", {
get: function () {
return this.mode === 'determinate' ? 100 : null;
},
enumerable: true,
configurable: true
});
Object.defineProperty(MdProgressSpinnerComponent.prototype, "interdeterminateInterval", {
/** @docs-private */
get: function () {
return this._interdeterminateInterval;
},
/** @docs-private */
set: function (interval) {
clearInterval(this._interdeterminateInterval);
this._interdeterminateInterval = interval;
},
enumerable: true,
configurable: true
});
/**
* Clean up any animations that were running.
*/
MdProgressSpinnerComponent.prototype.ngOnDestroy = function () {
this._cleanupIndeterminateAnimation();
};
Object.defineProperty(MdProgressSpinnerComponent.prototype, "color", {
/** The color of the progress-spinner. Can be primary, accent, or warn. */
get: function () { return this._color; },
set: function (value) {
this._updateColor(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(MdProgressSpinnerComponent.prototype, "value", {
/** Value of the progress circle. It is bound to the host as the attribute aria-valuenow. */
get: function () {
if (this.mode === 'determinate') {
return this._value;
}
return;
},
set: function (v) {
if (v != null && this.mode === 'determinate') {
var newValue = clamp(v);
this._animateCircle(this.value || 0, newValue);
this._value = newValue;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(MdProgressSpinnerComponent.prototype, "mode", {
/**
* Mode of the progress circle
*
* Input must be one of the values from ProgressMode, defaults to 'determinate'.
* mode is bound to the host as the attribute host.
*/
get: function () {
return this._mode;
},
set: function (mode) {
if (mode !== this._mode) {
if (mode === 'indeterminate') {
this._startIndeterminateAnimation();
}
else {
this._cleanupIndeterminateAnimation();
this._animateCircle(0, this._value);
}
this._mode = mode;
}
},
enumerable: true,
configurable: true
});
/**
* Animates the circle from one percentage value to another.
*
* @param animateFrom The percentage of the circle filled starting the animation.
* @param animateTo The percentage of the circle filled ending the animation.
* @param ease The easing function to manage the pace of change in the animation.
* @param duration The length of time to show the animation, in milliseconds.
* @param rotation The starting angle of the circle fill, with 0° represented at the top center
* of the circle.
*/
MdProgressSpinnerComponent.prototype._animateCircle = function (animateFrom, animateTo, ease, duration, rotation) {
var _this = this;
if (ease === void 0) { ease = linearEase; }
if (duration === void 0) { duration = DURATION_DETERMINATE; }
if (rotation === void 0) { rotation = 0; }
var id = ++this._lastAnimationId;
var startTime = Date.now();
var changeInValue = animateTo - animateFrom;
// No need to animate it if the values are the same
if (animateTo === animateFrom) {
this._renderArc(animateTo, rotation);
}
else {
var animation_1 = function () {
var elapsedTime = Math.max(0, Math.min(Date.now() - startTime, duration));
_this._renderArc(ease(elapsedTime, animateFrom, changeInValue, duration), rotation);
// Prevent overlapping animations by checking if a new animation has been called for and
// if the animation has lasted longer than the animation duration.
if (id === _this._lastAnimationId && elapsedTime < duration) {
requestAnimationFrame(animation_1);
}
};
// Run the animation outside of Angular's zone, in order to avoid
// hitting ZoneJS and change detection on each frame.
this._ngZone.runOutsideAngular(animation_1);
}
};
/**
* Starts the indeterminate animation interval, if it is not already running.
*/
MdProgressSpinnerComponent.prototype._startIndeterminateAnimation = function () {
var _this = this;
var rotationStartPoint = 0;
var start = startIndeterminate;
var end = endIndeterminate;
var duration = DURATION_INDETERMINATE;
var animate = function () {
_this._animateCircle(start, end, materialEase, duration, rotationStartPoint);
// Prevent rotation from reaching Number.MAX_SAFE_INTEGER.
rotationStartPoint = (rotationStartPoint + end) % 100;
var temp = start;
start = -end;
end = -temp;
};
if (this.isBrowser) {
if (!this.interdeterminateInterval) {
this._ngZone.runOutsideAngular(function () {
_this.interdeterminateInterval = setInterval(animate, duration + 50, 0, false);
animate();
});
}
}
};
/**
* Removes interval, ending the animation.
*/
MdProgressSpinnerComponent.prototype._cleanupIndeterminateAnimation = function () {
this.interdeterminateInterval = null;
};
/**
* Renders the arc onto the SVG element. Proxies `getArc` while setting the proper
* DOM attribute on the `<path>`.
*/
MdProgressSpinnerComponent.prototype._renderArc = function (currentValue, rotation) {
if (rotation === void 0) { rotation = 0; }
// Caches the path reference so it doesn't have to be looked up every time.
var path = this._path = this._path || this._elementRef.nativeElement.querySelector('path');
// Ensure that the path was found. This may not be the case if the
// animation function fires too early.
if (path) {
path.setAttribute('d', getSvgArc(currentValue, rotation));
}
};
/**
* Updates the color of the progress-spinner by adding the new palette class to the element
* and removing the old one.
*/
MdProgressSpinnerComponent.prototype._updateColor = function (newColor) {
this._setElementColor(this._color, false);
this._setElementColor(newColor, true);
this._color = newColor;
};
/** Sets the given palette class on the component element. */
MdProgressSpinnerComponent.prototype._setElementColor = function (color, isAdd) {
if (color != null && color !== '') {
this._renderer.setElementClass(this._elementRef.nativeElement, "mat-" + color, isAdd);
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]),
__metadata("design:type", String)
], MdProgressSpinnerComponent.prototype, "platformId", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], MdProgressSpinnerComponent.prototype, "color", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('attr.aria-valuenow'),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Object])
], MdProgressSpinnerComponent.prototype, "value", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('attr.mode'),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object),
__metadata("design:paramtypes", [String])
], MdProgressSpinnerComponent.prototype, "mode", null);
MdProgressSpinnerComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-Spinners, mat-progress-spinner',
template: __webpack_require__(/*! ./progress-spinner.component.html */ "./src/app/typescripts/pro/progressbars/progress-spinner-module/progress-spinner.component.html"),
changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
}),
__param(3, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"])),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"], Object])
], MdProgressSpinnerComponent);
return MdProgressSpinnerComponent;
}());
/**
* <md-spinner> component.
*
* This is a component definition to be used as a convenience reference to create an
* indeterminate <md-progress-spinner> instance.
*/
var MdSpinnerComponent = /** @class */ (function (_super) {
__extends(MdSpinnerComponent, _super);
function MdSpinnerComponent(elementRef, ngZone, renderer) {
var _this = _super.call(this, ngZone, elementRef, renderer) || this;
_this.mode = 'indeterminate';
return _this;
}
MdSpinnerComponent.prototype.ngOnDestroy = function () {
// The `ngOnDestroy` from `MdProgressSpinner` should be called explicitly, because
// in certain cases Angular won't call it (e.g. when using AoT and in unit tests).
_super.prototype.ngOnDestroy.call(this);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.mat-spinner'),
__metadata("design:type", Object)
], MdSpinnerComponent.prototype, "true", void 0);
MdSpinnerComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-spinners, mat-spinner, mdb-progress-spinner',
template: __webpack_require__(/*! ./progress-spinner.component.html */ "./src/app/typescripts/pro/progressbars/progress-spinner-module/progress-spinner.component.html"),
styles: [__webpack_require__(/*! ./progress-spinner.component.scss */ "./src/app/typescripts/pro/progressbars/progress-spinner-module/progress-spinner.component.scss")],
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], MdSpinnerComponent);
return MdSpinnerComponent;
}(MdProgressSpinnerComponent));
/**
* Module functions.
*/
/** Clamps a value to be between 0 and 100. */
function clamp(v) {
return Math.max(0, Math.min(100, v));
}
/**
* Converts Polar coordinates to Cartesian.
*/
function polarToCartesian(radius, pathRadius, angleInDegrees) {
var angleInRadians = (angleInDegrees - 90) * DEGREE_IN_RADIANS;
return (radius + (pathRadius * Math.cos(angleInRadians))) +
',' + (radius + (pathRadius * Math.sin(angleInRadians)));
}
/**
* Easing function for linear animation.
*/
function linearEase(currentTime, startValue, changeInValue, duration) {
return changeInValue * currentTime / duration + startValue;
}
/**
* Easing function to match material design indeterminate animation.
*/
function materialEase(currentTime, startValue, changeInValue, duration) {
var time = currentTime / duration;
var timeCubed = Math.pow(time, 3);
var timeQuad = Math.pow(time, 4);
var timeQuint = Math.pow(time, 5);
return startValue + changeInValue * ((6 * timeQuint) + (-15 * timeQuad) + (10 * timeCubed));
}
/**
* Determines the path value to define the arc. Converting percentage values to to polar
* coordinates on the circle, and then to cartesian coordinates in the viewport.
*
* @param currentValue The current percentage value of the progress circle, the percentage of the
* circle to fill.
* @param rotation The starting point of the circle with 0 being the 0 degree point.
* @return A string for an SVG path representing a circle filled from the starting point to the
* percentage value provided.
*/
function getSvgArc(currentValue, rotation) {
var startPoint = rotation || 0;
var radius = 50;
var pathRadius = 40;
var startAngle = startPoint * MAX_ANGLE;
var endAngle = currentValue * MAX_ANGLE;
var start = polarToCartesian(radius, pathRadius, startAngle);
var end = polarToCartesian(radius, pathRadius, endAngle + startAngle);
var arcSweep = endAngle < 0 ? 0 : 1;
var largeArcFlag;
if (endAngle < 0) {
largeArcFlag = endAngle >= -180 ? 0 : 1;
}
else {
largeArcFlag = endAngle <= 180 ? 0 : 1;
}
return "M" + start + "A" + pathRadius + "," + pathRadius + " 0 " + largeArcFlag + "," + arcSweep + " " + end;
}
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress-spinner.component.html":
/*!******************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress-spinner.component.html ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"preloader-wrapper active {{spinnerType}}\">\r\n <mdb-Spinners mdbSpinners mode=\"indeterminate\"></mdb-Spinners>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress-spinner.component.ts":
/*!****************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress-spinner.component.ts ***!
\****************************************************************************/
/*! exports provided: ProgressSpinnerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressSpinnerComponent", function() { return ProgressSpinnerComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ProgressSpinnerComponent = /** @class */ (function () {
function ProgressSpinnerComponent(el) {
this.addClass = 'spinner-blue-only';
this.spinnerType = '';
this.spinnerColor = 'rainbow';
this.el = el;
}
ProgressSpinnerComponent.prototype.ngAfterViewInit = function () {
var hostElem = this.el.nativeElement;
var colorClass = this.spinnerColor;
this.addClass = 'spinner-rainbow';
switch (colorClass) {
case 'green':
this.addClass = 'spinner-green-only';
break;
case 'blue':
this.addClass = 'spinner-blue-only';
break;
case 'yellow':
this.addClass = 'spinner-yellow-only';
break;
case 'red':
this.addClass = 'spinner-red-only';
break;
case 'rainbow':
this.addClass = 'spinner-rainbow spinner-blue-only mat-progress-spinner';
this.spinerRun();
break;
}
hostElem.children[0].children[0].className += ' ' + this.addClass;
};
ProgressSpinnerComponent.prototype.spinerRun = function () {
var _this = this;
var counter = 0;
var hostElem = this.el.nativeElement;
setInterval(function () {
switch (counter) {
case 0:
_this.addClass = 'spinner-red-only mat-progress-spinner ';
break;
case 1:
_this.addClass = 'spinner-yellow-only mat-progress-spinner';
break;
case 2:
_this.addClass = 'spinner-blue-only mat-progress-spinner';
break;
case 3:
_this.addClass = 'spinner-green-only mat-progress-spinner';
break;
}
hostElem.children[0].children[0].className = ' ' + _this.addClass;
if (counter < 3) {
counter++;
}
else {
counter = 0;
}
}, 1333);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], ProgressSpinnerComponent.prototype, "spinnerType", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], ProgressSpinnerComponent.prototype, "spinnerColor", void 0);
ProgressSpinnerComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-spinner',
template: __webpack_require__(/*! ./progress-spinner.component.html */ "./src/app/typescripts/pro/progressbars/progress-spinner.component.html")
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], ProgressSpinnerComponent);
return ProgressSpinnerComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progress.directive.ts":
/*!********************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progress.directive.ts ***!
\********************************************************************/
/*! exports provided: ProgressDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressDirective", function() { return ProgressDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
// todo: progress element conflict with bootstrap.css
// todo: need hack: replace host element with div
var ProgressDirective = /** @class */ (function () {
function ProgressDirective() {
this.addClass = true;
this.bars = [];
this._max = 100;
}
Object.defineProperty(ProgressDirective.prototype, "max", {
/** maximum total value of progress element */
get: function () {
return this._max;
},
set: function (v) {
this._max = v;
this.bars.forEach(function (bar) {
bar.recalculatePercentage();
});
},
enumerable: true,
configurable: true
});
ProgressDirective.prototype.addBar = function (bar) {
if (!this.animate) {
bar.transition = 'none';
}
this.bars.push(bar);
};
ProgressDirective.prototype.removeBar = function (bar) {
this.bars.splice(this.bars.indexOf(bar), 1);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], ProgressDirective.prototype, "animate", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('attr.max'),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number),
__metadata("design:paramtypes", [Number])
], ProgressDirective.prototype, "max", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.progress'),
__metadata("design:type", Object)
], ProgressDirective.prototype, "addClass", void 0);
ProgressDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: 'mdbProgress, [mdbProgress]' })
], ProgressDirective);
return ProgressDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progressbar.component.html":
/*!*************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progressbar.component.html ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div mdbProgress [animate]=\"animate\" [max]=\"max\">\r\n <mdb-bar [type]=\"type\" [value]=\"value\">\r\n <ng-content></ng-content>\r\n </mdb-bar>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progressbar.component.ts":
/*!***********************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progressbar.component.ts ***!
\***********************************************************************/
/*! exports provided: ProgressbarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressbarComponent", function() { return ProgressbarComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _progressbar_config_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./progressbar.config.component */ "./src/app/typescripts/pro/progressbars/progressbar.config.component.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ProgressbarComponent = /** @class */ (function () {
function ProgressbarComponent(config) {
Object.assign(this, config);
}
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], ProgressbarComponent.prototype, "animate", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number)
], ProgressbarComponent.prototype, "max", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], ProgressbarComponent.prototype, "type", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Number)
], ProgressbarComponent.prototype, "value", void 0);
ProgressbarComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-progressbar',
template: __webpack_require__(/*! ./progressbar.component.html */ "./src/app/typescripts/pro/progressbars/progressbar.component.html")
}),
__metadata("design:paramtypes", [_progressbar_config_component__WEBPACK_IMPORTED_MODULE_1__["ProgressbarConfigComponent"]])
], ProgressbarComponent);
return ProgressbarComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progressbar.config.component.ts":
/*!******************************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progressbar.config.component.ts ***!
\******************************************************************************/
/*! exports provided: ProgressbarConfigComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressbarConfigComponent", function() { return ProgressbarConfigComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 ProgressbarConfigComponent = /** @class */ (function () {
function ProgressbarConfigComponent() {
/** if `true` changing value of progress bar will be animated (note: not supported by Bootstrap 4) */
this.animate = true;
/** maximum total value of progress element */
this.max = 100;
}
ProgressbarConfigComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], ProgressbarConfigComponent);
return ProgressbarConfigComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/progressbars/progressbar.module.ts":
/*!********************************************************************!*\
!*** ./src/app/typescripts/pro/progressbars/progressbar.module.ts ***!
\********************************************************************/
/*! exports provided: ProgressbarModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressbarModule", function() { return ProgressbarModule; });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _bar_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bar.component */ "./src/app/typescripts/pro/progressbars/bar.component.ts");
/* harmony import */ var _progress_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./progress.directive */ "./src/app/typescripts/pro/progressbars/progress.directive.ts");
/* harmony import */ var _progressbar_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./progressbar.component */ "./src/app/typescripts/pro/progressbars/progressbar.component.ts");
/* harmony import */ var _progressbar_config_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./progressbar.config.component */ "./src/app/typescripts/pro/progressbars/progressbar.config.component.ts");
var __decorate = (undefined && undefined.__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 ProgressbarModule = /** @class */ (function () {
function ProgressbarModule() {
}
ProgressbarModule_1 = ProgressbarModule;
ProgressbarModule.forRoot = function () {
return { ngModule: ProgressbarModule_1, providers: [_progressbar_config_component__WEBPACK_IMPORTED_MODULE_5__["ProgressbarConfigComponent"]] };
};
ProgressbarModule = ProgressbarModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"]],
declarations: [_progress_directive__WEBPACK_IMPORTED_MODULE_3__["ProgressDirective"], _bar_component__WEBPACK_IMPORTED_MODULE_2__["BarComponent"], _progressbar_component__WEBPACK_IMPORTED_MODULE_4__["ProgressbarComponent"]],
exports: [_progress_directive__WEBPACK_IMPORTED_MODULE_3__["ProgressDirective"], _bar_component__WEBPACK_IMPORTED_MODULE_2__["BarComponent"], _progressbar_component__WEBPACK_IMPORTED_MODULE_4__["ProgressbarComponent"]]
})
], ProgressbarModule);
return ProgressbarModule;
var ProgressbarModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/sidenav/index.ts":
/*!**************************************************!*\
!*** ./src/app/typescripts/pro/sidenav/index.ts ***!
\**************************************************/
/*! exports provided: SidenavComponent, SidenavModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _sidenav_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sidenav.component */ "./src/app/typescripts/pro/sidenav/sidenav.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SidenavComponent", function() { return _sidenav_component__WEBPACK_IMPORTED_MODULE_0__["SidenavComponent"]; });
/* harmony import */ var _sidenav_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sidenav.module */ "./src/app/typescripts/pro/sidenav/sidenav.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SidenavModule", function() { return _sidenav_module__WEBPACK_IMPORTED_MODULE_1__["SidenavModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/sidenav/sidenav.component.html":
/*!****************************************************************!*\
!*** ./src/app/typescripts/pro/sidenav/sidenav.component.html ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<ul #sidenav id=\"slide-out\" class=\"{{ class }} side-nav\" >\r\n <ng-content></ng-content>\r\n <!-- <div class=\"sidenav-bg mask-strong\"></div> -->\r\n</ul>\r\n<div (click)=\"hide()\" #overlay id=\"sidenav-overlay\" style=\"display: none;\"></div>"
/***/ }),
/***/ "./src/app/typescripts/pro/sidenav/sidenav.component.ts":
/*!**************************************************************!*\
!*** ./src/app/typescripts/pro/sidenav/sidenav.component.ts ***!
\**************************************************************/
/*! exports provided: SidenavComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SidenavComponent", function() { return SidenavComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var SidenavComponent = /** @class */ (function () {
function SidenavComponent(platformId, el, renderer) {
this.el = el;
this.renderer = renderer;
this.isBrowser = false;
this.fixed = true;
this.isBrowser = Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["isPlatformBrowser"])(platformId);
}
SidenavComponent.prototype.ngAfterViewInit = function () {
if (this.isBrowser) {
// pobraneie szerokosci okna po init
this.windwosWidth = window.innerWidth;
if (this.fixed) {
this.renderer.setElementClass(document.body, 'fixed-sn', true);
if (this.windwosWidth < 1441) {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(-100%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(-100%)');
this.setShown(false);
}
else {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(0%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(0%)');
this.setShown(true);
}
}
else {
this.renderer.setElementClass(document.body, 'hidden-sn', true);
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(-100%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(-100%)');
this.setShown(false);
}
}
};
SidenavComponent.prototype.windwosResize = function () {
if (this.isBrowser) {
this.windwosWidth = window.innerWidth;
if (this.fixed) {
if (this.windwosWidth < 1441) {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(-100%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(-100%)');
this.setShown(false);
}
if (this.windwosWidth > 1440 && this.shown) {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(0%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(0%)');
this.hideOverlay();
this.setShown(true);
}
else if (this.windwosWidth > 1440) {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(0%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(0%)');
this.hideOverlay();
this.setShown(true);
}
}
else {
if (this.windwosWidth > 1440) {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(-100%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(-100%)');
this.hideOverlay();
this.setShown(false);
}
}
}
};
;
SidenavComponent.prototype.show = function () {
if (this.isBrowser) {
if (this.fixed) {
if (this.windwosWidth < 1441) {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(0%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(0%)');
this.setShown(true);
this.showOverlay();
}
else {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(0%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(0%)');
this.setShown(true);
}
}
else {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(0%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(0%)');
this.setShown(true);
this.showOverlay();
}
}
};
SidenavComponent.prototype.hide = function () {
if (this.isBrowser) {
if (this.fixed) {
if (this.windwosWidth < 1441) {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(-100%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(-100%)');
this.setShown(false);
this.hideOverlay();
}
else {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(-100%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(-100%)');
this.setShown(false);
}
}
else {
this.renderer.setElementStyle(this.sideNav.nativeElement, 'transform', 'translateX(-100%)');
this.renderer.setElementStyle(this.el.nativeElement, 'transform', 'translateX(-100%)');
this.setShown(false);
this.hideOverlay();
}
}
};
SidenavComponent.prototype.toggle = function () {
if (this.shown) {
this.hide();
}
else {
this.show();
}
};
SidenavComponent.prototype.showOverlay = function () {
var _this = this;
this.renderer.setElementStyle(this.overlay.nativeElement, 'display', 'block');
setTimeout(function () {
_this.renderer.setElementStyle(_this.overlay.nativeElement, 'opacity', '1');
}, 0);
};
SidenavComponent.prototype.hideOverlay = function () {
var _this = this;
this.renderer.setElementStyle(this.overlay.nativeElement, 'opacity', '0');
setTimeout(function () {
_this.renderer.setElementStyle(_this.overlay.nativeElement, 'display', 'none');
}, 200);
};
SidenavComponent.prototype.setShown = function (value) {
var _this = this;
setTimeout(function () {
_this.shown = value;
}, 510);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], SidenavComponent.prototype, "class", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], SidenavComponent.prototype, "fixed", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('sidenav'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], SidenavComponent.prototype, "sideNav", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('overlay'),
__metadata("design:type", Object)
], SidenavComponent.prototype, "overlay", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('window:resize'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], SidenavComponent.prototype, "windwosResize", null);
SidenavComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-sidenav',
template: __webpack_require__(/*! ./sidenav.component.html */ "./src/app/typescripts/pro/sidenav/sidenav.component.html")
}),
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"])),
__metadata("design:paramtypes", [String, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer"]])
], SidenavComponent);
return SidenavComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/sidenav/sidenav.module.ts":
/*!***********************************************************!*\
!*** ./src/app/typescripts/pro/sidenav/sidenav.module.ts ***!
\***********************************************************/
/*! exports provided: SidenavModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SidenavModule", function() { return SidenavModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _sidenav_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sidenav.component */ "./src/app/typescripts/pro/sidenav/sidenav.component.ts");
var __decorate = (undefined && undefined.__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 SidenavModule = /** @class */ (function () {
function SidenavModule() {
}
SidenavModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [
_sidenav_component__WEBPACK_IMPORTED_MODULE_2__["SidenavComponent"],
],
exports: [
_sidenav_component__WEBPACK_IMPORTED_MODULE_2__["SidenavComponent"]
],
imports: [
_angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"],
]
})
], SidenavModule);
return SidenavModule;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/smoothscroll/index.ts":
/*!*******************************************************!*\
!*** ./src/app/typescripts/pro/smoothscroll/index.ts ***!
\*******************************************************/
/*! exports provided: MDBPageScrollModule, PageScrollDirective, PageScrollService, EasingLogic, PageScrollConfig, PageScrollInstance, PageScrollUtilService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _mdb_page_scroll_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mdb-page-scroll.directive */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageScrollDirective", function() { return _mdb_page_scroll_directive__WEBPACK_IMPORTED_MODULE_0__["PageScrollDirective"]; });
/* harmony import */ var _mdb_page_scroll_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mdb-page-scroll.service */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageScrollService", function() { return _mdb_page_scroll_service__WEBPACK_IMPORTED_MODULE_1__["PageScrollService"]; });
/* harmony import */ var _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mdb-page-scroll.config */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.config.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EasingLogic", function() { return _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_2__["EasingLogic"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageScrollConfig", function() { return _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_2__["PageScrollConfig"]; });
/* harmony import */ var _mdb_page_scroll_instance__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mdb-page-scroll.instance */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.instance.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageScrollInstance", function() { return _mdb_page_scroll_instance__WEBPACK_IMPORTED_MODULE_3__["PageScrollInstance"]; });
/* harmony import */ var _mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mdb-page-scroll-util.service */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll-util.service.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageScrollUtilService", function() { return _mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_4__["PageScrollUtilService"]; });
/* harmony import */ var _mdb_page_scroll_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./mdb-page-scroll.module */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MDBPageScrollModule", function() { return _mdb_page_scroll_module__WEBPACK_IMPORTED_MODULE_5__["MDBPageScrollModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll-util.service.ts":
/*!******************************************************************************!*\
!*** ./src/app/typescripts/pro/smoothscroll/mdb-page-scroll-util.service.ts ***!
\******************************************************************************/
/*! exports provided: PageScrollUtilService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageScrollUtilService", function() { return PageScrollUtilService; });
/**
* Created by sebastianfuss on 02.09.16.
*/
var PageScrollUtilService = /** @class */ (function () {
function PageScrollUtilService() {
}
/**
* Util method to check whether a given variable is either undefined or null
* @param variable
* @returns {boolean} true the variable is undefined or null
*/
PageScrollUtilService.isUndefinedOrNull = function (variable) {
return (typeof variable === 'undefined') || variable === undefined || variable === null;
};
PageScrollUtilService.extractElementPosition = function (document, scrollTargetElement) {
var body = document.body;
var docEl = document.documentElement;
// const windowPageYOffset: number = document.defaultView && document.defaultView.pageYOffset || undefined;
var windowPageYOffset = document.defaultView && document.defaultView.pageYOffset || undefined;
// const windowPageXOffset: number = document.defaultView && document.defaultView.pageXOffset || undefined;
var windowPageXOffset = document.defaultView && document.defaultView.pageXOffset || undefined;
var scrollTop = windowPageYOffset || docEl.scrollTop || body.scrollTop;
var scrollLeft = windowPageXOffset || docEl.scrollLeft || body.scrollLeft;
var clientTop = docEl.clientTop || body.clientTop || 0;
var clientLeft = docEl.clientLeft || body.clientLeft || 0;
if (PageScrollUtilService.isUndefinedOrNull(scrollTargetElement)) {
// No element found, so return the current position to not cause any change in scroll position
return { top: scrollTop, left: scrollLeft };
}
var box = scrollTargetElement.getBoundingClientRect();
var top = box.top + scrollTop - clientTop;
var left = box.left + scrollLeft - clientLeft;
return { top: Math.round(top), left: Math.round(left) };
};
return PageScrollUtilService;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.config.ts":
/*!************************************************************************!*\
!*** ./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.config.ts ***!
\************************************************************************/
/*! exports provided: EasingLogic, PageScrollConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EasingLogic", function() { return EasingLogic; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageScrollConfig", function() { return PageScrollConfig; });
var EasingLogic = /** @class */ (function () {
function EasingLogic() {
}
return EasingLogic;
}());
var PageScrollConfig = /** @class */ (function () {
function PageScrollConfig() {
}
Object.defineProperty(PageScrollConfig, "defaultEasingLogic", {
// Getter and setter to avoid auto completion to suggest calling the method
get: function () {
return PageScrollConfig._easingLogic;
},
set: function (easingLogic) {
PageScrollConfig._easingLogic = easingLogic;
},
enumerable: true,
configurable: true
});
/**
* The number of milliseconds to wait till updating the scroll position again.
* Small amounts may produce smoother animations but require more processing power.
* @type {number}
* @private
*/
PageScrollConfig._interval = 10;
/**
* The amount of pixels that need to be between the current scrollTop/scrollLeft position
* and the target position the cause a scroll animation. In case distance is below
* this threshold, an immediate jump will be performed.
* Due to dpi or rounding irregularities in browsers floating point numbers for scrollTop/scrollLeft values
* are possible, making a === comparison of current scrollTop or scrollLeft and target scrollPosition error-prone.
* @type {number}
* @private
*/
PageScrollConfig._minScrollDistance = 2;
/**
* Name of the default namespace.
* @type {string}
* @private
*/
PageScrollConfig._defaultNamespace = 'default';
/**
* Whether by default the scrolling should happen in vertical direction (by manipulating the scrollTop property)
* (= true; default) or in horizontal direction (by manipulating the scrollLeft property) (= false
* @type {boolean}
*/
PageScrollConfig.defaultIsVerticalScrolling = true;
/**
* How many console logs should be emitted.
* 0: None
* 2: If animation could not be started due to missing target, "already at destination" or similar reasons
* 5: All scroll position values that get set
* @type {boolean}
* @private
*/
PageScrollConfig._logLevel = 2;
/**
* The duration how long a scrollTo animation should last by default.
* May be overridden using the page-scroll-duration attribute on a single ng2PageScroll instance.
* @type {number}
*/
PageScrollConfig.defaultDuration = 1250;
/**
* The distance in pixels above scroll target where the animation should stop. Setting a positive number results in
* the scroll target being more in the middle of the screen, negative numbers will produce scrolling "too far"
* @type {number}
*/
PageScrollConfig.defaultScrollOffset = 0;
/**
* Whether by default for inline scroll animations the advanced offset calculation should take place (true) or
* not (false). Default is false.
* The advanced offset calculation will traverse the DOM tree upwards, starting at the scrollTarget, until it finds
* the scrollingView container element. Along the way the offset positions of the relative positioned
* (position: relative) elements will be taken into account for calculating the target elements position.
* @type {boolean}
*/
PageScrollConfig.defaultAdvancedInlineOffsetCalculation = false;
/**
* The events that are listened to on the body to decide whether a scroll animation has been interfered/interrupted by the user
* @type {string[]}
* @private
*/
PageScrollConfig._interruptEvents = ['mousedown', 'wheel', 'DOMMouseScroll', 'mousewheel', 'keyup', 'touchmove'];
/**
* The keys that are considered to interrupt a scroll animation (mainly the arrow keys). All other key presses will not stop the
* scroll animation.
* @type {number[]}
* @private
*/
PageScrollConfig._interruptKeys = [33, 34, 35, 36, 38, 40];
/**
* Whether a scroll animation should be interruptible by user interaction (true) or not (false). If the user performs an
* interrupting event while a scroll animation takes place, the scroll animation stops.
* @type {boolean}
*/
PageScrollConfig.defaultInterruptible = true;
PageScrollConfig._easingLogic = {
ease: function (t, b, c, d) {
// Linear easing
return c * t / d + b;
}
};
return PageScrollConfig;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.directive.ts":
/*!***************************************************************************!*\
!*** ./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.directive.ts ***!
\***************************************************************************/
/*! exports provided: PageScrollDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageScrollDirective", function() { return PageScrollDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
/* harmony import */ var _mdb_page_scroll_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mdb-page-scroll.service */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.service.ts");
/* harmony import */ var _mdb_page_scroll_instance__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mdb-page-scroll.instance */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.instance.ts");
/* harmony import */ var _mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./mdb-page-scroll-util.service */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll-util.service.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var PageScrollDirective = /** @class */ (function () {
function PageScrollDirective(pageScrollService, router, document) {
this.pageScrollService = pageScrollService;
this.router = router;
this.pageScrollHorizontal = null;
this.pageScrollOffset = null;
this.pageScrollDuration = null;
this.pageScrollSpeed = null;
this.pageScrollEasing = null;
this.pageScrollAdjustHash = false;
this.pageScroll = null;
this.pageScrollFinish = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.document = document;
}
PageScrollDirective.prototype.ngOnChanges = function () {
// Some inputs changed, reset the pageScrollInstance
this.pageScrollInstance = undefined;
};
PageScrollDirective.prototype.ngOnDestroy = function () {
if (this.pageScrollInstance) {
this.pageScrollService.stop(this.pageScrollInstance);
}
return undefined;
};
// private generatePageScrollInstance(): PageScrollInstance {
PageScrollDirective.prototype.generatePageScrollInstance = function () {
if (_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_5__["PageScrollUtilService"].isUndefinedOrNull(this.pageScrollInstance)) {
this.pageScrollInstance = _mdb_page_scroll_instance__WEBPACK_IMPORTED_MODULE_4__["PageScrollInstance"].newInstance({
document: this.document,
scrollTarget: this.href,
scrollingViews: null,
namespace: this.pageScroll,
verticalScrolling: !this.pageScrollHorizontal,
pageScrollOffset: this.pageScrollOffset,
pageScrollInterruptible: this.pageScrollInterruptible,
pageScrollEasingLogic: this.pageScrollEasing,
pageScrollDuration: this.pageScrollDuration,
pageScrollSpeed: this.pageScrollSpeed,
pageScrollFinishListener: this.pageScrollFinish
});
}
return this.pageScrollInstance;
};
PageScrollDirective.prototype.pushRouterState = function () {
if (this.pageScrollAdjustHash && typeof this.pageScrollInstance.scrollTarget === 'string'
&& this.pageScrollInstance.scrollTarget.substr(0, 1) === '#') {
// "Navigate" to the current route again and this time set the fragment/hash
this.router.navigate([], {
fragment: this.pageScrollInstance.scrollTarget.substr(1),
preserveQueryParams: true
});
}
};
PageScrollDirective.prototype.scroll = function () {
var pageScrollInstance = this.generatePageScrollInstance();
this.pushRouterState();
this.pageScrollService.start(pageScrollInstance);
};
PageScrollDirective.prototype.handleClick = function () {
var _this = this;
if (this.routerLink && this.router !== null && this.router !== undefined) {
var urlTree = void 0;
if (typeof this.routerLink === 'string') {
urlTree = this.router.parseUrl(this.routerLink);
}
else {
urlTree = this.router.createUrlTree(this.routerLink);
}
if (!this.router.isActive(urlTree, true)) {
// We need to navigate their first.
// Navigation is handled by the routerLink directive
// so we only need to listen for route change
var subscription_1 = this.router.events.subscribe(function (routerEvent) {
if (routerEvent instanceof _angular_router__WEBPACK_IMPORTED_MODULE_1__["NavigationEnd"]) {
subscription_1.unsubscribe();
_this.scroll();
}
else if (routerEvent instanceof _angular_router__WEBPACK_IMPORTED_MODULE_1__["NavigationError"] || routerEvent instanceof _angular_router__WEBPACK_IMPORTED_MODULE_1__["NavigationCancel"]) {
subscription_1.unsubscribe();
}
});
return false; // to preventDefault()
}
}
this.scroll();
return false; // to preventDefault()
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], PageScrollDirective.prototype, "routerLink", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], PageScrollDirective.prototype, "href", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])()
// public pageScrollHorizontal: boolean = null;
,
__metadata("design:type", Object)
], PageScrollDirective.prototype, "pageScrollHorizontal", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])()
// public pageScrollOffset: number = null;
,
__metadata("design:type", Object)
], PageScrollDirective.prototype, "pageScrollOffset", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])()
// public pageScrollDuration: number = null;
,
__metadata("design:type", Object)
], PageScrollDirective.prototype, "pageScrollDuration", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])()
// public pageScrollSpeed: number = null;
,
__metadata("design:type", Object)
], PageScrollDirective.prototype, "pageScrollSpeed", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])()
// public pageScrollEasing: EasingLogic = null;
,
__metadata("design:type", Object)
], PageScrollDirective.prototype, "pageScrollEasing", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], PageScrollDirective.prototype, "pageScrollInterruptible", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], PageScrollDirective.prototype, "pageScrollAdjustHash", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])()
// public pageScroll: string = null;
,
__metadata("design:type", Object)
], PageScrollDirective.prototype, "pageScroll", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], PageScrollDirective.prototype, "pageScrollFinish", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])('click', ['$event']),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", Boolean)
], PageScrollDirective.prototype, "handleClick", null);
PageScrollDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbPageScroll]'
}),
__param(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])()), __param(2, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__["DOCUMENT"])),
__metadata("design:paramtypes", [_mdb_page_scroll_service__WEBPACK_IMPORTED_MODULE_3__["PageScrollService"], _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"], Object])
], PageScrollDirective);
return PageScrollDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.instance.ts":
/*!**************************************************************************!*\
!*** ./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.instance.ts ***!
\**************************************************************************/
/*! exports provided: PageScrollInstance */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageScrollInstance", function() { return PageScrollInstance; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mdb-page-scroll.config */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.config.ts");
/* harmony import */ var _mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mdb-page-scroll-util.service */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll-util.service.ts");
/**
* Created by sebastianfuss on 29.08.16.
*/
/**
* Represents a scrolling action
*/
var PageScrollInstance = /** @class */ (function () {
/**
* Private constructor, requires the properties assumed to be the bare minimum.
* Use the factory methods to create instances:
* {@link PageScrollInstance#simpleInstance}
* {@link PageScrollInstance#newInstance}
* @param namespace
* @param document
*/
function PageScrollInstance(namespace, document) {
/**
* These properties will be set during instance construction and default to their defaults from PageScrollConfig
*/
/* A namespace to "group" scroll animations together and stopping some does not stop others */
this._namespace = _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._defaultNamespace;
/* Whether we scroll vertically (true) or horizontally (false) */
this._verticalScrolling = _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"].defaultIsVerticalScrolling;
/* Offset in px that the animation should stop above that target element */
this._offset = _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"].defaultScrollOffset;
/* Duration in milliseconds the scroll animation should last */
this._duration = _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"].defaultDuration;
/* Easing function to manipulate the scrollTop/scrollLeft value over time */
this._easingLogic = _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"].defaultEasingLogic;
/* Boolean whether the scroll animation should stop on user interruption or not */
this._interruptible = _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"].defaultInterruptible;
/* Whether the advanded offset calculation for inline scrolling should be used */
this._advancedInlineOffsetCalculation = _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"].defaultAdvancedInlineOffsetCalculation;
/* Event emitter to notify the world about the scrolling */
this._pageScrollFinish = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* These properties will be set/manipulated if the scroll animation starts
*/
/* The initial value of the scrollTop or scrollLeft position when the animation starts */
this._startScrollPosition = 0;
/* Whether an interrupt listener is attached to the body or not */
this._interruptListenersAttached = false;
/* References to the timer instance that is used to perform the scroll animation to be
able to clear it on animation end*/
this._timer = null;
this._namespace = namespace;
this.document = document;
}
/*
* Factory methods for instance creation
*/
PageScrollInstance.simpleInstance = function (document, scrollTarget, namespace) {
return PageScrollInstance.newInstance({
document: document,
scrollTarget: scrollTarget,
namespace: namespace
});
};
// public static newInstance(options: PageScrollOptions) {
PageScrollInstance.newInstance = function (options) {
if (_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.namespace) || options.namespace.length <= 0) {
options.namespace = _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._defaultNamespace;
}
// const pageScrollInstance: PageScrollInstance = new PageScrollInstance(options.namespace, document);
var pageScrollInstance = new PageScrollInstance(options.namespace, document);
if (_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.scrollingViews) || options.scrollingViews.length === 0) {
pageScrollInstance._isInlineScrolling = false;
pageScrollInstance._scrollingViews = [document.documentElement, document.body, document.body.parentNode];
}
else {
pageScrollInstance._isInlineScrolling = true;
pageScrollInstance._scrollingViews = options.scrollingViews;
}
pageScrollInstance._scrollTarget = options.scrollTarget;
if (!_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.verticalScrolling)) {
pageScrollInstance._verticalScrolling = options.verticalScrolling;
}
if (!_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.pageScrollOffset)) {
pageScrollInstance._offset = options.pageScrollOffset;
}
if (!_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.pageScrollEasingLogic)) {
pageScrollInstance._easingLogic = options.pageScrollEasingLogic;
}
if (_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.pageScrollDuration) && !_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.pageScrollSpeed)) {
// No duration specified in the options, only in this case we use the speed option when present
pageScrollInstance._speed = options.pageScrollSpeed;
pageScrollInstance._duration = undefined;
}
else if (!_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.pageScrollDuration)) {
pageScrollInstance._duration = options.pageScrollDuration;
}
if (!_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.pageScrollFinishListener)) {
pageScrollInstance._pageScrollFinish = options.pageScrollFinishListener;
}
pageScrollInstance._interruptible = options.pageScrollInterruptible ||
(_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.pageScrollInterruptible) && _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"].defaultInterruptible);
pageScrollInstance._advancedInlineOffsetCalculation = options.advancedInlineOffsetCalculation ||
(_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(options.advancedInlineOffsetCalculation) &&
_mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"].defaultAdvancedInlineOffsetCalculation);
return pageScrollInstance;
};
/**
* Create a PageScrollInstance representing a scroll animation on the documents body.
*
* @param document The document that contains the body to be scrolled and the scrollTarget elements
* @param scrollTarget Where to scroll to. Can be a HTMLElement reference or a string like '#elementId'
* @param verticalScrolling
* @param namespace Optional namespace to group scroll animations logically
* @returns {PageScrollInstance}
*
* @deprecated Use {@link newInstance(options: PageScrollOptions)}
**/
PageScrollInstance.simpleDirectionInstance = function (document, scrollTarget, verticalScrolling, namespace) {
return PageScrollInstance.newInstance({
document: document,
scrollTarget: scrollTarget,
namespace: namespace,
verticalScrolling: verticalScrolling,
});
};
/**
* Create a PageScrollInstance representing a scroll animation to the target element where the scrollingView
* elements get scrolled (like a div container with fixed height, resulting in scrollbars in it).
*
* Make sure that the scrollTarget is located inside the scrollingView in the DOM hierarchy, otherwise the
* scrollingView will be scrolled to an apparently arbitrary position.
*
* @param document The document that contains the body to be scrolled and the scrollTarget elements
* @param scrollTarget Where to scroll to. Can be a HTMLElement reference or a string like '#elementId'
* @param scrollingView The element that should be scrolled
* @param namespace Optional namespace to group scroll animations logically
* @returns {PageScrollInstance}
*
* @deprecated Use {@link newInstance(options: PageScrollOptions)}
*/
PageScrollInstance.simpleInlineInstance = function (document, scrollTarget, scrollingView, namespace) {
return PageScrollInstance.newInstance({
document: document,
scrollTarget: scrollTarget,
scrollingViews: [scrollingView],
verticalScrolling: true,
namespace: namespace
});
};
/**
*
* @param document The document that contains the body to be scrolled and the scrollTarget elements
* @param scrollTarget Where to scroll to. Can be a HTMLElement reference or a string like '#elementId'
* @param scrollingView The element that should be scrolled
* @param verticalScrolling whether the scrolling should be performed in vertical direction (true, default) or horizontal (false)
* @param namespace Optional namespace to group scroll animations logically
* @returns {PageScrollInstance}
*
* @deprecated Use {@link newInstance(options: PageScrollOptions)}
*/
PageScrollInstance.simpleInlineDirectionInstance = function (document, scrollTarget, scrollingView, verticalScrolling, namespace) {
return PageScrollInstance.newInstance({
document: document,
scrollTarget: scrollTarget,
scrollingViews: [scrollingView],
namespace: namespace,
verticalScrolling: verticalScrolling,
});
};
/**
*
* @param document The document that contains the body to be scrolled and the scrollTarget elements
* @param scrollTarget Where to scroll to. Can be a HTMLElement reference or a string like '#elementId'
* @param scrollingViews The elements that should be scrolled. Null to use the default elements of document and body.
* @param namespace Optional namespace to group scroll animations logically
* @param verticalScrolling whether the scrolling should be performed in vertical direction (true, default) or horizontal (false)
* @param pageScrollOffset The offset to be attached to the top of the target element or
* null/undefined to use application default
* @param pageScrollInterruptible Whether this scroll animation should be interruptible.
* Null/undefined for application default
* @param pageScrollEasingLogic Easing function to be used for manipulating the scroll position
* over time. Null/undefined for application default
* @param pageScrollDuration The duration in milliseconds the animation should last.
* Null/undefined for application default
* @param pageScrollFinishListener Listener to be called to notify other parts of the application
* that the scroll animation has finished
* @returns {PageScrollInstance}
*
* @deprecated Use {@link newInstance(options: PageScrollOptions)}
*/
PageScrollInstance.advancedInstance = function (document, scrollTarget, scrollingViews, namespace, verticalScrolling, pageScrollOffset, pageScrollInterruptible, pageScrollEasingLogic, pageScrollDuration, pageScrollFinishListener) {
return PageScrollInstance.newInstance({
document: document,
scrollTarget: scrollTarget,
scrollingViews: scrollingViews,
namespace: namespace,
verticalScrolling: verticalScrolling,
pageScrollOffset: pageScrollOffset,
pageScrollInterruptible: pageScrollInterruptible,
pageScrollEasingLogic: pageScrollEasingLogic,
pageScrollDuration: pageScrollDuration,
pageScrollFinishListener: pageScrollFinishListener
});
};
PageScrollInstance.prototype.getScrollPropertyValue = function (scrollingView) {
if (!this.verticalScrolling) {
return scrollingView.scrollLeft;
}
return scrollingView.scrollTop;
};
/**
* Extract the exact location of the scrollTarget element.
*
* Extract the scrollTarget HTMLElement from the given PageScrollTarget object. The latter one may be
* a string like "#heading2", then this method returns the corresponding DOM element for that id.
*
* @returns {HTMLElement}
*/
PageScrollInstance.prototype.extractScrollTargetPosition = function () {
// let scrollTargetElement: HTMLElement;
var scrollTargetElement;
if (typeof this._scrollTarget === 'string') {
scrollTargetElement = this.document.getElementById(this._scrollTarget.substr(1));
}
else {
scrollTargetElement = this._scrollTarget;
}
if (scrollTargetElement === null || scrollTargetElement === undefined) {
// Scroll target not found
return { top: NaN, left: NaN };
}
if (this._isInlineScrolling) {
var position = { top: scrollTargetElement.offsetTop, left: scrollTargetElement.offsetLeft };
if (this._advancedInlineOffsetCalculation && this.scrollingViews.length === 1) {
var accumulatedParentsPos = { top: 0, left: 0 };
// not named window to make sure we're not getting the global window variable by accident
var theWindow = scrollTargetElement.ownerDocument.defaultView;
var parentFound = false;
// Start parent is the immediate parent
// let parent = scrollTargetElement.parentElement;
var parent_1 = scrollTargetElement.parentElement;
// Iterate upwards all parents
while (!parentFound && !_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(parent_1)) {
if (theWindow.getComputedStyle(parent_1).getPropertyValue('position') === 'relative') {
accumulatedParentsPos.top += parent_1.offsetTop;
accumulatedParentsPos.left += parent_1.offsetLeft;
}
// Next iteration
parent_1 = parent_1.parentElement;
parentFound = parent_1 === this.scrollingViews[0];
}
if (parentFound) {
// Only use the results if we found the parent, otherwise we accumulated too much anyway
position.top += accumulatedParentsPos.top;
position.left += accumulatedParentsPos.left;
}
else {
if (_mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._logLevel >= 2) {
console.warn('Unable to find nested scrolling targets parent!');
}
}
}
return position;
}
return _mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].extractElementPosition(this.document, scrollTargetElement);
};
/**
* Get the top offset of the scroll animation.
* This automatically takes the offset location of the scrolling container/scrolling view
* into account (for nested/inline scrolling).
*
* @returns {number}
*/
PageScrollInstance.prototype.getCurrentOffset = function () {
return this._offset;
};
/**
* Sets the "scrollTop" or "scrollLeft" property for all scrollingViews to the provided value
* @param position
* @return true if at least for one ScrollTopSource the scrollTop/scrollLeft value could be set and it kept the new value.
* false if it failed for all ScrollingViews, meaning that we should stop the animation
* (probably because we're at the end of the scrolling region)
*/
PageScrollInstance.prototype.setScrollPosition = function (position) {
var _this = this;
if (_mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._logLevel >= 5) {
console.warn('Scroll Position: ' + position);
}
// Set the new scrollTop/scrollLeft to all scrollingViews elements
return this.scrollingViews.reduce(function (oneAlreadyWorked, scrollingView) {
var startScrollPropertyValue = _this.getScrollPropertyValue(scrollingView);
if (scrollingView && !_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(startScrollPropertyValue)) {
var scrollDistance = Math.abs(startScrollPropertyValue - position);
// The movement we need to perform is less than 2px
// This we consider a small movement which some browser may not perform when
// changing the scrollTop/scrollLeft property
// Thus in this cases we do not stop the scroll animation, although setting the
// scrollTop/scrollLeft value "fails"
var isSmallMovement = scrollDistance < _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._minScrollDistance;
if (!_this.verticalScrolling) {
scrollingView.scrollLeft = position;
}
else {
scrollingView.scrollTop = position;
}
// Return true of setting the new scrollTop/scrollLeft value worked
// We consider that it worked if the new scrollTop/scrollLeft value is closer to the
// desired scrollTop/scrollLeft than before (it might not be exactly the value we
// set due to dpi or rounding irregularities)
if (isSmallMovement || scrollDistance > Math.abs(_this.getScrollPropertyValue(scrollingView) - position)) {
return true;
}
}
return oneAlreadyWorked;
}, false);
};
/**
* Trigger firing a animation finish event
* @param value Whether the animation finished at the target (true) or got interrupted (false)
*/
PageScrollInstance.prototype.fireEvent = function (value) {
if (this._pageScrollFinish) {
this._pageScrollFinish.emit(value);
}
};
/**
* Attach the interrupt listeners to the PageScrollInstance body. The given interruptReporter
* will be called if any of the attached events is fired.
*
* Possibly attached interruptListeners are automatically removed from the body before the new one will be attached.
*
* @param interruptReporter
*/
PageScrollInstance.prototype.attachInterruptListeners = function (interruptReporter) {
var _this = this;
if (this._interruptListenersAttached) {
// Detach possibly existing listeners first
this.detachInterruptListeners();
}
this._interruptListener = function (event) {
interruptReporter.report(event, _this);
};
_mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._interruptEvents.forEach(function (event) { return _this.document.body.addEventListener(event, _this._interruptListener); });
this._interruptListenersAttached = true;
};
/**
* Remove event listeners from the body and stop listening for events that might be treated as "animation
* interrupt" events.
*/
PageScrollInstance.prototype.detachInterruptListeners = function () {
var _this = this;
_mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._interruptEvents.forEach(function (event) { return _this.document.body.removeEventListener(event, _this._interruptListener); });
this._interruptListenersAttached = false;
};
Object.defineProperty(PageScrollInstance.prototype, "namespace", {
get: function () {
return this._namespace;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "scrollTarget", {
get: function () {
return this._scrollTarget;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "verticalScrolling", {
get: function () {
return this._verticalScrolling;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "scrollingViews", {
get: function () {
return this._scrollingViews;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "startScrollPosition", {
get: function () {
return this._startScrollPosition;
},
set: function (value) {
this._startScrollPosition = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "targetScrollPosition", {
get: function () {
return this._targetScrollPosition;
},
set: function (value) {
this._targetScrollPosition = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "distanceToScroll", {
get: function () {
return this._distanceToScroll;
},
set: function (value) {
this._distanceToScroll = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "executionDuration", {
get: function () {
return this._executionDuration;
},
set: function (value) {
this._executionDuration = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "duration", {
get: function () {
return this._duration;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "speed", {
get: function () {
return this._speed;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "easingLogic", {
get: function () {
return this._easingLogic;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "interruptible", {
get: function () {
return this._interruptible;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "startTime", {
get: function () {
return this._startTime;
},
set: function (value) {
this._startTime = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "endTime", {
get: function () {
return this._endTime;
},
set: function (value) {
this._endTime = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "timer", {
get: function () {
return this._timer;
},
set: function (value) {
this._timer = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageScrollInstance.prototype, "interruptListenersAttached", {
get: function () {
return this._interruptListenersAttached;
},
enumerable: true,
configurable: true
});
return PageScrollInstance;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.module.ts":
/*!************************************************************************!*\
!*** ./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.module.ts ***!
\************************************************************************/
/*! exports provided: MDBPageScrollModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDBPageScrollModule", function() { return MDBPageScrollModule; });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _mdb_page_scroll_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mdb-page-scroll.service */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.service.ts");
/* harmony import */ var _mdb_page_scroll_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mdb-page-scroll.directive */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.directive.ts");
/**
* Created by sebastianfuss on 03.09.16.
*/
var __decorate = (undefined && undefined.__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 MDBPageScrollModule = /** @class */ (function () {
function MDBPageScrollModule() {
}
MDBPageScrollModule_1 = MDBPageScrollModule;
MDBPageScrollModule.forRoot = function () {
return {
ngModule: MDBPageScrollModule_1,
providers: [
{ provide: _mdb_page_scroll_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollService"], useClass: _mdb_page_scroll_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollService"] }
]
};
};
MDBPageScrollModule = MDBPageScrollModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"]],
declarations: [_mdb_page_scroll_directive__WEBPACK_IMPORTED_MODULE_3__["PageScrollDirective"]],
exports: [_mdb_page_scroll_directive__WEBPACK_IMPORTED_MODULE_3__["PageScrollDirective"]]
})
], MDBPageScrollModule);
return MDBPageScrollModule;
var MDBPageScrollModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.service.ts":
/*!*************************************************************************!*\
!*** ./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.service.ts ***!
\*************************************************************************/
/*! exports provided: PageScrollService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageScrollService", function() { return PageScrollService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mdb-page-scroll.config */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll.config.ts");
/* harmony import */ var _mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mdb-page-scroll-util.service */ "./src/app/typescripts/pro/smoothscroll/mdb-page-scroll-util.service.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var PageScrollService = /** @class */ (function () {
function PageScrollService() {
var _this = this;
this.runningInstances = [];
this.onInterrupted = {
report: function (event, pageScrollInstance) {
if (!pageScrollInstance.interruptible) {
// Non-interruptible anyway, so do not stop anything
return;
}
var shouldStop = true;
if (event.type === 'keyup') {
// Only stop if specific keys have been pressed, for all others don't stop anything
if (_mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._interruptKeys.indexOf(event.keyCode) === -1) {
// The pressed key is not in the list of interrupting keys
shouldStop = false;
}
}
else if (event.type === 'mousedown') {
// For mousedown events we only stop the scroll animation of the mouse has
// been clicked inside the scrolling container
if (!pageScrollInstance.scrollingViews.some(function (scrollingView) { return scrollingView.contains(event.target); })) {
// Mouse clicked an element which is not inside any of the the scrolling containers
shouldStop = false;
}
}
if (shouldStop) {
_this.stopAll(pageScrollInstance.namespace);
}
}
};
if (PageScrollService_1.instanceCounter > 0 && Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["isDevMode"])()) {
console.warn('An instance of PageScrollService already exists, usually ' +
'including one provider should be enough, so double check.');
}
PageScrollService_1.instanceCounter++;
}
PageScrollService_1 = PageScrollService;
PageScrollService.prototype.stopInternal = function (interrupted, pageScrollInstance) {
var index = this.runningInstances.indexOf(pageScrollInstance);
if (index >= 0) {
this.runningInstances.splice(index, 1);
}
if (pageScrollInstance.interruptListenersAttached) {
pageScrollInstance.detachInterruptListeners();
}
if (pageScrollInstance.timer) {
// Clear/Stop the timer
clearInterval(pageScrollInstance.timer);
// Clear the reference to this timer
pageScrollInstance.timer = undefined;
pageScrollInstance.fireEvent(!interrupted);
return true;
}
return false;
};
/**
* Start a scroll animation. All properties of the animation are stored in the given {@link PageScrollInstance} object.
*
* This is the core functionality of the whole library.
*
* @param pageScrollInstance
*/
PageScrollService.prototype.start = function (pageScrollInstance) {
var _this = this;
// Stop all possibly running scroll animations in the same namespace
this.stopAll(pageScrollInstance.namespace);
if (pageScrollInstance.scrollingViews === null || pageScrollInstance.scrollingViews.length === 0) {
// No scrollingViews specified, thus we can't animate anything
if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["isDevMode"])()) {
console.warn('No scrollingViews specified, this ng2-page-scroll does not know which DOM elements to scroll');
}
return;
}
var startScrollPositionFound = false;
// Reset start scroll position to 0. If any of the scrollingViews has a different one, it will be extracted next
pageScrollInstance.startScrollPosition = 0;
// Get the start scroll position from the scrollingViews (e.g. if the user already scrolled down the content)
pageScrollInstance.scrollingViews.forEach(function (scrollingView) {
if (_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(scrollingView)) {
return;
}
// Get the scrollTop or scrollLeft value of the first scrollingView that returns a value for its "scrollTop"
// or "scrollLeft" property that is not undefined and unequal to 0
var scrollPosition = pageScrollInstance.getScrollPropertyValue(scrollingView);
if (!startScrollPositionFound && scrollPosition) {
// We found a scrollingView that does not have scrollTop or scrollLeft 0
// Return the scroll position value, as this will be our startScrollPosition
pageScrollInstance.startScrollPosition = scrollPosition;
startScrollPositionFound = true;
}
});
var pageScrollOffset = pageScrollInstance.getCurrentOffset();
// Calculate the target position that the scroll animation should go to
var scrollTargetPosition = pageScrollInstance.extractScrollTargetPosition();
pageScrollInstance.targetScrollPosition = Math.round((pageScrollInstance.verticalScrolling ? scrollTargetPosition.top : scrollTargetPosition.left) - pageScrollOffset);
// Calculate the distance we need to go in total
pageScrollInstance.distanceToScroll = pageScrollInstance.targetScrollPosition - pageScrollInstance.startScrollPosition;
if (isNaN(pageScrollInstance.distanceToScroll)) {
// We weren't able to find the target position, maybe the element does not exist?
if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["isDevMode"])()) {
// console.log('Scrolling not possible, as we can\'t find the specified target');
}
pageScrollInstance.fireEvent(false);
return;
}
// We're at the final destination already
// OR we need to scroll down but are already at the end
// OR we need to scroll up but are at the top already
var allReadyAtDestination = Math.abs(pageScrollInstance.distanceToScroll) < _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._minScrollDistance;
// Check how long we need to scroll if a speed option is given
// Default executionDuration is the specified duration
pageScrollInstance.executionDuration = pageScrollInstance.duration;
// Maybe we need to pay attention to the speed option?
if (!_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(pageScrollInstance.speed) && _mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(pageScrollInstance.duration)) {
// Speed option is set and no duration => calculate duration based on speed and scroll distance
pageScrollInstance.executionDuration = pageScrollInstance.distanceToScroll / pageScrollInstance.speed * 1000;
}
// We should go there directly, as our "animation" would have one big step
// only anyway and this way we save the interval stuff
var tooShortInterval = pageScrollInstance.executionDuration <= _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._interval;
if (allReadyAtDestination || tooShortInterval) {
if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["isDevMode"])()) {
if (allReadyAtDestination) {
// console.log('Scrolling not possible, as we can\'t get any closer to the destination');
}
else {
// console.log('Scroll duration shorter that interval length, jumping to target');
}
}
pageScrollInstance.setScrollPosition(pageScrollInstance.targetScrollPosition);
pageScrollInstance.fireEvent(true);
return;
}
// Register the interrupt listeners if we want an interruptible scroll animation
if (pageScrollInstance.interruptible ||
(_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(pageScrollInstance.interruptible) && _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"].defaultInterruptible)) {
pageScrollInstance.attachInterruptListeners(this.onInterrupted);
}
// Let's get started, get the start time...
pageScrollInstance.startTime = new Date().getTime();
// .. and calculate the end time (when we need to finish at last)
pageScrollInstance.endTime = pageScrollInstance.startTime + pageScrollInstance.executionDuration;
pageScrollInstance.timer = setInterval(function (_pageScrollInstance) {
// Take the current time
var currentTime = new Date().getTime();
// Determine the new scroll position
var newScrollPosition;
var stopNow = false;
if (_pageScrollInstance.endTime <= currentTime) {
// We're over the time already, so go the targetScrollPosition (aka destination)
newScrollPosition = _pageScrollInstance.targetScrollPosition;
stopNow = true;
}
else {
// Calculate the scroll position based on the current time using the easing function
newScrollPosition = Math.round(_pageScrollInstance.easingLogic.ease(currentTime - _pageScrollInstance.startTime, _pageScrollInstance.startScrollPosition, _pageScrollInstance.distanceToScroll, _pageScrollInstance.executionDuration));
}
// Set the new scrollPosition to all scrollingViews elements
if (!_pageScrollInstance.setScrollPosition(newScrollPosition)) {
// Setting the new scrollTop/scrollLeft value failed for all ScrollingViews
// early stop the scroll animation to save resources
stopNow = true;
}
// At the end do the internal stop maintenance and fire the pageScrollFinish event
// (otherwise the event might arrive at "too early")
if (stopNow) {
_this.stopInternal(false, _pageScrollInstance);
}
}, _mdb_page_scroll_config__WEBPACK_IMPORTED_MODULE_1__["PageScrollConfig"]._interval, pageScrollInstance);
// Register the instance as running one
this.runningInstances.push(pageScrollInstance);
};
/**
* Stop all running scroll animations. Optionally limit to stop only the ones of specific namespace.
*
* @param namespace
* @returns {boolean}
*/
// public stopAll(namespace?: string): boolean {
PageScrollService.prototype.stopAll = function (namespace) {
if (this.runningInstances.length > 0) {
var stoppedSome = false;
for (var i = 0; i < this.runningInstances.length; ++i) {
var pageScrollInstance = this.runningInstances[i];
if (_mdb_page_scroll_util_service__WEBPACK_IMPORTED_MODULE_2__["PageScrollUtilService"].isUndefinedOrNull(namespace) || namespace.length === 0 ||
pageScrollInstance.namespace === namespace) {
stoppedSome = true;
this.stopInternal(true, pageScrollInstance);
// Decrease the counter, as we removed an item from the array we iterate over
i--;
}
}
return stoppedSome;
}
return false;
};
PageScrollService.prototype.stop = function (pageScrollInstance) {
return this.stopInternal(true, pageScrollInstance);
};
PageScrollService.instanceCounter = 0;
PageScrollService = PageScrollService_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
__metadata("design:paramtypes", [])
], PageScrollService);
return PageScrollService;
var PageScrollService_1;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/sticky-content/computed.style.ts":
/*!******************************************************************!*\
!*** ./src/app/typescripts/pro/sticky-content/computed.style.ts ***!
\******************************************************************/
/*! exports provided: computedStyle */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computedStyle", function() { return computedStyle; });
/**
* returns coumputed style of given element
* @param el
* @param styleProp
* @returns {any}
*/
// export function computedStyle(element: string | HTMLElement, styleProp: string): string {
function computedStyle(element, styleProp) {
var el;
el = (typeof element === 'string') ? document.querySelector(element) : element;
var value;
var defaultView = (el.ownerDocument || document).defaultView;
// W3C standard way:
if (defaultView && defaultView.getComputedStyle) {
// sanitize property name to css notation
// (hypen separated words eg. font-Size)
styleProp = styleProp.replace(/([A-Z])/g, '-$1').toLowerCase();
return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);
}
else if (el['currentStyle']) {
// sanitize property name to camelCase
styleProp = styleProp.replace(/\-(\w)/g, function (letter) {
return letter.toUpperCase();
});
value = el['currentStyle'][styleProp];
// convert other units to pixels on IE
if (/^\d+(em|pt|%|ex)?$/i.test(value)) {
return (function (val) {
var oldLeft = el.style.left, oldRsLeft = el['runtimeStyle'].left;
el['runtimeStyle'].left = el['currentStyle'].left;
el.style.left = val || 0;
val = el.style['pixelLeft'] + 'px';
el.style.left = oldLeft;
el['runtimeStyle'].left = oldRsLeft;
return val;
})(value);
}
return value;
}
}
/***/ }),
/***/ "./src/app/typescripts/pro/sticky-content/index.ts":
/*!*********************************************************!*\
!*** ./src/app/typescripts/pro/sticky-content/index.ts ***!
\*********************************************************/
/*! exports provided: MdbStickyDirective, MdbStickyModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _sticky_content_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sticky-content.directive */ "./src/app/typescripts/pro/sticky-content/sticky-content.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbStickyDirective", function() { return _sticky_content_directive__WEBPACK_IMPORTED_MODULE_0__["MdbStickyDirective"]; });
/* harmony import */ var _sticky_content_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sticky-content.module */ "./src/app/typescripts/pro/sticky-content/sticky-content.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbStickyModule", function() { return _sticky_content_module__WEBPACK_IMPORTED_MODULE_1__["MdbStickyModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/sticky-content/sticky-content.directive.ts":
/*!****************************************************************************!*\
!*** ./src/app/typescripts/pro/sticky-content/sticky-content.directive.ts ***!
\****************************************************************************/
/*! exports provided: MdbStickyDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdbStickyDirective", function() { return MdbStickyDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _computed_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./computed.style */ "./src/app/typescripts/pro/sticky-content/computed.style.ts");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var MdbStickyDirective = /** @class */ (function () {
function MdbStickyDirective(el, platformId) {
var _this = this;
this.isBrowser = false;
this.stickyOffsetTop = 0;
this.scrollHandler = function () {
// let elRect: ClientRect = this.el.getBoundingClientRect();
var parentRect = _this.el.parentElement.getBoundingClientRect();
var bodyRect = document.body.getBoundingClientRect();
var dynProps;
if (_this.original.float === 'right') {
var right = bodyRect.right - parentRect.right + _this.original.marginRight;
dynProps = { right: right + 'px' };
}
else if (_this.original.float === 'left') {
var left = parentRect.left - bodyRect.left + _this.original.marginLeft;
dynProps = { left: left + 'px' };
}
else {
// console.log('parentRect..............', parentRect.width);
dynProps = { width: parentRect.width + 'px' };
}
// console.log('dynProps', dynProps);
if (_this.original.marginTop + _this.original.marginBottom +
_this.original.boundingClientRect.height + _this.stickyOffsetTop >= parentRect.bottom) {
/**
* stikcy element reached to the bottom of the container
*/
// console.log('case 1 (absolute)', parentRect.bottom, this.original.marginBottom);
var floatAdjustment = _this.original.float === 'right' ? { right: 0 } :
_this.original.float === 'left' ? { left: 0 } : {};
Object.assign(_this.el.style, {
position: 'absolute',
float: 'none',
top: 'inherit',
bottom: 0
}, dynProps, floatAdjustment);
}
else if (parentRect.top * -1 + _this.original.marginTop + _this.stickyOffsetTop > _this.original.offsetTop) {
/**
* stikcy element is in the middle of container
*/
// console.log('case 2 (fixed)', parentRect.top * -1, this.original.marginTop, this.original.offsetTop);
// if not floating, add an empty filler element, since the original elements becames 'fixed'
if (_this.original.float !== 'left' && _this.original.float !== 'right' && !_this.fillerEl) {
_this.fillerEl = document.createElement('div');
_this.fillerEl.style.height = _this.el.offsetHeight + 'px';
_this.parentEl.insertBefore(_this.fillerEl, _this.el);
}
Object.assign(_this.el.style, {
position: 'fixed',
float: 'none',
top: _this.stickyOffsetTop + 'px',
bottom: 'inherit'
}, dynProps);
}
else {
/**
* stikcy element is in the original position
*/
// console.log('case 3 (original)');
if (_this.fillerEl) {
_this.parentEl.removeChild(_this.fillerEl); // IE11 does not work with el.remove()
_this.fillerEl = undefined;
}
Object.assign(_this.el.style, {
position: _this.original.position,
float: _this.original.float,
top: _this.original.top,
bottom: _this.original.bottom,
width: _this.original.width,
left: _this.original.left
}, dynProps);
}
};
this.el = this.el = el.nativeElement;
this.parentEl = this.el.parentElement;
this.isBrowser = Object(_angular_common__WEBPACK_IMPORTED_MODULE_2__["isPlatformBrowser"])(platformId);
}
MdbStickyDirective.prototype.ngAfterViewInit = function () {
this.el.style.boxSizing = 'border-box';
if (this.stickyAfter) {
var cetStickyAfterEl = document.querySelector(this.stickyAfter);
if (cetStickyAfterEl) {
this.stickyOffsetTop = cetStickyAfterEl.getBoundingClientRect().bottom;
}
}
// set the parent relatively positioned
var allowedPositions = ['absolute', 'fixed', 'relative'];
var parentElPosition = Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.parentEl, 'position');
if (allowedPositions.indexOf(parentElPosition) === -1) {
this.parentEl.style.position = 'relative';
}
this.diff = {
top: this.el.offsetTop - this.parentEl.offsetTop,
left: this.el.offsetLeft - this.parentEl.offsetLeft
};
if (this.isBrowser) {
var elRect = this.el.getBoundingClientRect();
this.el.getBoundingClientRect();
this.original = {
boundingClientRect: elRect,
position: Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.el, 'position'),
float: Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.el, 'float'),
top: Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.el, 'top'),
bottom: Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.el, 'bottom'),
left: Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.el, 'left'),
width: Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.el, 'width'),
offsetTop: this.el.offsetTop,
offsetLeft: this.el.offsetLeft,
marginTop: parseInt(Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.el, 'marginTop'), 10),
marginBottom: parseInt(Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.el, 'marginBottom'), 10),
marginLeft: parseInt(Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.el, 'marginLeft'), 10),
marginRight: parseInt(Object(_computed_style__WEBPACK_IMPORTED_MODULE_1__["computedStyle"])(this.el, 'marginLeft'), 10)
};
}
this.attach();
};
MdbStickyDirective.prototype.ngOnDestroy = function () {
this.detach();
};
MdbStickyDirective.prototype.attach = function () {
window.addEventListener('scroll', this.scrollHandler);
window.addEventListener('resize', this.scrollHandler);
};
MdbStickyDirective.prototype.detach = function () {
window.removeEventListener('scroll', this.scrollHandler);
window.removeEventListener('resize', this.scrollHandler);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], MdbStickyDirective.prototype, "stickyAfter", void 0);
MdbStickyDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbSticky]'
}),
__param(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"])),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], String])
], MdbStickyDirective);
return MdbStickyDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/sticky-content/sticky-content.module.ts":
/*!*************************************************************************!*\
!*** ./src/app/typescripts/pro/sticky-content/sticky-content.module.ts ***!
\*************************************************************************/
/*! exports provided: MdbStickyDirective, MdbStickyModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MdbStickyModule", function() { return MdbStickyModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _sticky_content_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sticky-content.directive */ "./src/app/typescripts/pro/sticky-content/sticky-content.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MdbStickyDirective", function() { return _sticky_content_directive__WEBPACK_IMPORTED_MODULE_3__["MdbStickyDirective"]; });
var __decorate = (undefined && undefined.__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 MdbStickyModule = /** @class */ (function () {
function MdbStickyModule() {
}
MdbStickyModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormsModule"]],
declarations: [_sticky_content_directive__WEBPACK_IMPORTED_MODULE_3__["MdbStickyDirective"]],
exports: [_sticky_content_directive__WEBPACK_IMPORTED_MODULE_3__["MdbStickyDirective"]]
})
], MdbStickyModule);
return MdbStickyModule;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/tabs-pills/index.ts":
/*!*****************************************************!*\
!*** ./src/app/typescripts/pro/tabs-pills/index.ts ***!
\*****************************************************/
/*! exports provided: NgTranscludeDirective, TabDirective, TabHeadingDirective, TabsetComponent, TabsetConfig, TabsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _transclude_directive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transclude.directive */ "./src/app/typescripts/pro/tabs-pills/transclude.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NgTranscludeDirective", function() { return _transclude_directive__WEBPACK_IMPORTED_MODULE_0__["NgTranscludeDirective"]; });
/* harmony import */ var _tab_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tab.directive */ "./src/app/typescripts/pro/tabs-pills/tab.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabDirective", function() { return _tab_directive__WEBPACK_IMPORTED_MODULE_1__["TabDirective"]; });
/* harmony import */ var _tab_heading_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tab-heading.directive */ "./src/app/typescripts/pro/tabs-pills/tab-heading.directive.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabHeadingDirective", function() { return _tab_heading_directive__WEBPACK_IMPORTED_MODULE_2__["TabHeadingDirective"]; });
/* harmony import */ var _tabset_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tabset.component */ "./src/app/typescripts/pro/tabs-pills/tabset.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabsetComponent", function() { return _tabset_component__WEBPACK_IMPORTED_MODULE_3__["TabsetComponent"]; });
/* harmony import */ var _tabset_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tabset.config */ "./src/app/typescripts/pro/tabs-pills/tabset.config.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabsetConfig", function() { return _tabset_config__WEBPACK_IMPORTED_MODULE_4__["TabsetConfig"]; });
/* harmony import */ var _tabset_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tabset.module */ "./src/app/typescripts/pro/tabs-pills/tabset.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabsModule", function() { return _tabset_module__WEBPACK_IMPORTED_MODULE_5__["TabsModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/tabs-pills/tab-heading.directive.ts":
/*!*********************************************************************!*\
!*** ./src/app/typescripts/pro/tabs-pills/tab-heading.directive.ts ***!
\*********************************************************************/
/*! exports provided: TabHeadingDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabHeadingDirective", function() { return TabHeadingDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _tab_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tab.directive */ "./src/app/typescripts/pro/tabs-pills/tab.directive.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/** Should be used to mark <template> element as a template for tab heading */
var TabHeadingDirective = /** @class */ (function () {
function TabHeadingDirective(templateRef, tab) {
tab.headingRef = templateRef;
}
TabHeadingDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[mdbTabHeading]' }),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], _tab_directive__WEBPACK_IMPORTED_MODULE_1__["TabDirective"]])
], TabHeadingDirective);
return TabHeadingDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/tabs-pills/tab.directive.ts":
/*!*************************************************************!*\
!*** ./src/app/typescripts/pro/tabs-pills/tab.directive.ts ***!
\*************************************************************/
/*! exports provided: TabDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabDirective", function() { return TabDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _tabset_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tabset.component */ "./src/app/typescripts/pro/tabs-pills/tabset.component.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var TabDirective = /** @class */ (function () {
function TabDirective(tabset, el) {
/** fired when tab became active, $event:Tab equals to selected instance of Tab component */
this.select = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/** fired when tab became inactive, $event:Tab equals to deselected instance of Tab component */
this.deselect = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/** fired before tab will be removed */
this.removed = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.addClass = true;
this.test = true;
// public el: ElementRef = null;
this.el = null;
this.el = el;
this.tabset = tabset;
this.tabset.addTab(this);
}
Object.defineProperty(TabDirective.prototype, "active", {
/** tab active state toggle */
get: function () {
return this._active;
},
set: function (active) {
var _this = this;
if (this.disabled && active || !active) {
if (!active) {
this.removeClass(this.el.nativeElement, 'show');
setTimeout(function () {
_this._active = active;
_this.deselect.emit(_this);
}, 150);
}
return;
}
setTimeout(function () {
_this._active = active;
_this.classAdd(_this.el.nativeElement, 'show');
}, 150);
this.select.emit(this);
this.tabset.tabs.forEach(function (mdbTab) {
if (mdbTab !== _this) {
mdbTab.active = false;
}
});
},
enumerable: true,
configurable: true
});
TabDirective.prototype.ngOnInit = function () {
this.removable = this.removable;
};
TabDirective.prototype.hasClass = function (el, className) {
if (el.classList) {
return el.classList.contains(className);
}
else {
return !!el.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)'));
}
};
TabDirective.prototype.classAdd = function (el, className) {
if (el.classList) {
el.classList.add(className);
}
else if (!this.hasClass(el, className)) {
el.className += ' ' + className;
}
;
};
TabDirective.prototype.removeClass = function (el, className) {
if (el.classList) {
el.classList.remove(className);
}
else if (this.hasClass(el, className)) {
var reg = new RegExp('(\\s|^)' + className + '(\\s|$)');
el.className = el.className.replace(reg, ' ');
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], TabDirective.prototype, "heading", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], TabDirective.prototype, "disabled", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean)
], TabDirective.prototype, "removable", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], TabDirective.prototype, "customClass", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.active'),
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], TabDirective.prototype, "active", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], TabDirective.prototype, "select", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], TabDirective.prototype, "deselect", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], TabDirective.prototype, "removed", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.tab-pane'),
__metadata("design:type", Object)
], TabDirective.prototype, "addClass", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.fade'),
__metadata("design:type", Object)
], TabDirective.prototype, "test", void 0);
TabDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: 'mdb-tab, [mdbTab]' }),
__metadata("design:paramtypes", [_tabset_component__WEBPACK_IMPORTED_MODULE_1__["TabsetComponent"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], TabDirective);
return TabDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/tabs-pills/tabset.component.html":
/*!******************************************************************!*\
!*** ./src/app/typescripts/pro/tabs-pills/tabset.component.html ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"container-fluid\"> \r\n <div class=\"row\">\r\n <div class=\"{{ listGetClass }}\">\r\n <ul class=\"nav {{ buttonClass }}\" [ngClass]=\"classMap\" (click)=\"$event.preventDefault()\">\r\n <li *ngFor=\"let tabz of tabs;let i = index\" [ngClass]=\"['nav-item', tabz.customClass || '']\" [class.active]=\"tabz.active\" [class.disabled]=\"tabz.disabled\" (click)=\"click($event, i)\">\r\n <a #tabEl href=\"javascript:void(0);\" class=\"nav-link waves-light\" [class.active]=\"tabz.active\" [class.disabled]=\"tabz.disabled\">\r\n <span [mdbNgTransclude]=\"tabz.headingRef\" [innerHTML]=\"tabz.heading\"></span>\r\n <span *ngIf=\"tabz.removable\">\r\n <span (click)=\"$event.preventDefault(); removeTab(tabz);\" class=\"glyphicon glyphicon-remove-circle\">\r\n </span>\r\n </span>\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"{{ tabsGetClass }}\">\r\n <div class=\"tab-content {{ contentClass }}\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/tabs-pills/tabset.component.ts":
/*!****************************************************************!*\
!*** ./src/app/typescripts/pro/tabs-pills/tabset.component.ts ***!
\****************************************************************/
/*! exports provided: TabsetComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabsetComponent", function() { return TabsetComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _tabset_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tabset.config */ "./src/app/typescripts/pro/tabs-pills/tabset.config.ts");
/* harmony import */ var _free_waves__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../free/waves */ "./src/app/typescripts/free/waves/index.ts");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
// todo: add active event to tab
// todo: fix? mixing static and dynamic tabs position tabs in order of creation
var TabsetComponent = /** @class */ (function () {
function TabsetComponent(config, ripple) {
this.ripple = ripple;
this.tabs = [];
this.classMap = {};
this.clazz = true;
this.showBsTab = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.shownBsTab = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.hideBsTab = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.hiddenBsTab = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
Object.assign(this, config);
}
Object.defineProperty(TabsetComponent.prototype, "vertical", {
get: function () {
return this._vertical;
},
set: function (value) {
this._vertical = value;
this.setClassMap();
},
enumerable: true,
configurable: true
});
TabsetComponent.prototype.setActiveTab = function (index) {
this.tabs[index - 1].active = true;
};
Object.defineProperty(TabsetComponent.prototype, "justified", {
/** if true tabs fill the container and have a consistent width */
get: function () {
return this._justified;
},
set: function (value) {
this._justified = value;
this.setClassMap();
},
enumerable: true,
configurable: true
});
Object.defineProperty(TabsetComponent.prototype, "type", {
/** navigation context class: 'tabs' or 'pills' */
get: function () {
return this._type;
},
set: function (value) {
this._type = value;
this.setClassMap();
},
enumerable: true,
configurable: true
});
TabsetComponent.prototype.click = function (event, index) {
var prev = this.tabEl.toArray()[this.getActive()];
var clicked = this.tabEl.toArray()[index];
this.hideBsTab.emit({
target: clicked,
relatedTarget: prev
});
this.showBsTab.emit({
target: clicked,
relatedTarget: prev
});
this.setActiveTab(index + 1);
if (this.contentClass !== 'vertical') {
this.ripple.el = clicked;
this.ripple.click(event);
}
this.hiddenBsTab.emit({
target: clicked,
relatedTarget: prev
});
this.shownBsTab.emit({
target: clicked,
relatedTarget: prev
});
};
TabsetComponent.prototype.ngOnDestroy = function () {
this.isDestroyed = true;
};
// public getActive() {
TabsetComponent.prototype.getActive = function () {
var tabs = this.tabs.map(function (object, index) {
return {
index: index,
object: object
};
});
for (var _i = 0, tabs_1 = tabs; _i < tabs_1.length; _i++) {
var tab = tabs_1[_i];
if (tab.object.active) {
return tab.index;
}
}
};
TabsetComponent.prototype.addTab = function (tab) {
this.tabs.push(tab);
tab.active = this.tabs.length === 1 && tab.active !== false;
};
TabsetComponent.prototype.removeTab = function (tab) {
var index = this.tabs.indexOf(tab);
if (index === -1 || this.isDestroyed) {
return;
}
// Select a new tab if the tab to be removed is selected and not destroyed
if (tab.active && this.hasAvailableTabs(index)) {
var newActiveIndex = this.getClosestTabIndex(index);
this.tabs[newActiveIndex].active = true;
}
tab.removed.emit(tab);
this.tabs.splice(index, 1);
};
TabsetComponent.prototype.getClosestTabIndex = function (index) {
var tabsLength = this.tabs.length;
if (!tabsLength) {
return -1;
}
for (var step = 1; step <= tabsLength; step += 1) {
var prevIndex = index - step;
var nextIndex = index + step;
if (this.tabs[prevIndex] && !this.tabs[prevIndex].disabled) {
return prevIndex;
}
if (this.tabs[nextIndex] && !this.tabs[nextIndex].disabled) {
return nextIndex;
}
}
return -1;
};
TabsetComponent.prototype.hasAvailableTabs = function (index) {
var tabsLength = this.tabs.length;
if (!tabsLength) {
return false;
}
for (var i = 0; i < tabsLength; i += 1) {
if (!this.tabs[i].disabled && i !== index) {
return true;
}
}
return false;
};
TabsetComponent.prototype.setClassMap = function () {
this.classMap = {
'nav-stacked': this.vertical,
'nav-justified': this.justified,
};
};
TabsetComponent.prototype.listGet = function () {
if (this.vertical) {
this.listGetClass = 'col-md-3';
}
else {
this.listGetClass = 'col-md-12';
}
};
TabsetComponent.prototype.tabsGet = function () {
if (this.vertical) {
this.tabsGetClass = 'col-md-9';
}
else {
this.tabsGetClass = 'col-md-12';
}
};
TabsetComponent.prototype.ngOnInit = function () {
this.listGet();
this.tabsGet();
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])('class.tab-container'),
__metadata("design:type", Object)
], TabsetComponent.prototype, "clazz", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], TabsetComponent.prototype, "buttonClass", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], TabsetComponent.prototype, "contentClass", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChildren"])('tabEl', { read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] }),
__metadata("design:type", Object)
], TabsetComponent.prototype, "tabEl", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], TabsetComponent.prototype, "showBsTab", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], TabsetComponent.prototype, "shownBsTab", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], TabsetComponent.prototype, "hideBsTab", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], TabsetComponent.prototype, "hiddenBsTab", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], TabsetComponent.prototype, "vertical", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], TabsetComponent.prototype, "justified", null);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], TabsetComponent.prototype, "type", null);
TabsetComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-tabset',
template: __webpack_require__(/*! ./tabset.component.html */ "./src/app/typescripts/pro/tabs-pills/tabset.component.html"),
providers: [_free_waves__WEBPACK_IMPORTED_MODULE_2__["WavesDirective"]]
}),
__metadata("design:paramtypes", [_tabset_config__WEBPACK_IMPORTED_MODULE_1__["TabsetConfig"], _free_waves__WEBPACK_IMPORTED_MODULE_2__["WavesDirective"]])
], TabsetComponent);
return TabsetComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/tabs-pills/tabset.config.ts":
/*!*************************************************************!*\
!*** ./src/app/typescripts/pro/tabs-pills/tabset.config.ts ***!
\*************************************************************/
/*! exports provided: TabsetConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabsetConfig", function() { return TabsetConfig; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 TabsetConfig = /** @class */ (function () {
function TabsetConfig() {
/** provides default navigation context class: 'tabs' or 'pills' */
this.type = 'tabs';
}
TabsetConfig = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], TabsetConfig);
return TabsetConfig;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/tabs-pills/tabset.module.ts":
/*!*************************************************************!*\
!*** ./src/app/typescripts/pro/tabs-pills/tabset.module.ts ***!
\*************************************************************/
/*! exports provided: TabsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabsModule", function() { return TabsModule; });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _transclude_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transclude.directive */ "./src/app/typescripts/pro/tabs-pills/transclude.directive.ts");
/* harmony import */ var _tab_heading_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tab-heading.directive */ "./src/app/typescripts/pro/tabs-pills/tab-heading.directive.ts");
/* harmony import */ var _tab_directive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tab.directive */ "./src/app/typescripts/pro/tabs-pills/tab.directive.ts");
/* harmony import */ var _tabset_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tabset.component */ "./src/app/typescripts/pro/tabs-pills/tabset.component.ts");
/* harmony import */ var _tabset_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tabset.config */ "./src/app/typescripts/pro/tabs-pills/tabset.config.ts");
var __decorate = (undefined && undefined.__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 TabsModule = /** @class */ (function () {
function TabsModule() {
}
TabsModule_1 = TabsModule;
TabsModule.forRoot = function () {
return {
ngModule: TabsModule_1,
providers: [_tabset_config__WEBPACK_IMPORTED_MODULE_6__["TabsetConfig"]]
};
};
TabsModule = TabsModule_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"]],
declarations: [_transclude_directive__WEBPACK_IMPORTED_MODULE_2__["NgTranscludeDirective"], _tab_directive__WEBPACK_IMPORTED_MODULE_4__["TabDirective"], _tabset_component__WEBPACK_IMPORTED_MODULE_5__["TabsetComponent"], _tab_heading_directive__WEBPACK_IMPORTED_MODULE_3__["TabHeadingDirective"]],
exports: [_tab_directive__WEBPACK_IMPORTED_MODULE_4__["TabDirective"], _tabset_component__WEBPACK_IMPORTED_MODULE_5__["TabsetComponent"], _tab_heading_directive__WEBPACK_IMPORTED_MODULE_3__["TabHeadingDirective"], _transclude_directive__WEBPACK_IMPORTED_MODULE_2__["NgTranscludeDirective"]]
})
], TabsModule);
return TabsModule;
var TabsModule_1;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/tabs-pills/transclude.directive.ts":
/*!********************************************************************!*\
!*** ./src/app/typescripts/pro/tabs-pills/transclude.directive.ts ***!
\********************************************************************/
/*! exports provided: NgTranscludeDirective */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgTranscludeDirective", function() { return NgTranscludeDirective; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var NgTranscludeDirective = /** @class */ (function () {
function NgTranscludeDirective(viewRef) {
this.viewRef = viewRef;
}
Object.defineProperty(NgTranscludeDirective.prototype, "mdbNgTransclude", {
get: function () {
return this._ngTransclude;
},
set: function (templateRef) {
this._ngTransclude = templateRef;
if (templateRef) {
this.viewRef.createEmbeddedView(templateRef);
}
},
enumerable: true,
configurable: true
});
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]])
], NgTranscludeDirective.prototype, "mdbNgTransclude", null);
NgTranscludeDirective = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({
selector: '[mdbNgTransclude]'
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]])
], NgTranscludeDirective);
return NgTranscludeDirective;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/tags/chips.component.html":
/*!***********************************************************!*\
!*** ./src/app/typescripts/pro/tags/chips.component.html ***!
\***********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div *ngIf=\"values && values.length\" class=\"md-chip-list\" [ngClass]=\"focused\">\r\n <span *ngFor=\"let value of values\" class=\"md-chip\" selected > \r\n {{value}} <i class=\"close fa fa-times\" aria-hidden=\"true\" (click)=\"removeValue(value)\" ></i>\r\n </span>\r\n\r\n <span>\r\n <input [(ngModel)]=\"labelToAdd\" \r\n (keyup.enter)=\"addValue(box.value, $event);$event.preventDefault()\"\r\n (focus)=\"onFocus()\" \r\n (focusout)=\"focusOutFunction()\" \r\n #box />\r\n </span>\r\n</div>\r\n<div *ngIf=\"!values || !values.length\">\r\n <input class=\"md-chips-input\" placeholder=\"{{ placeholder }}\" #tbox \r\n (keyup.enter)=\"addValue(tbox.value, $event);$event.preventDefault()\"/>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/tags/chips.component.ts":
/*!*********************************************************!*\
!*** ./src/app/typescripts/pro/tags/chips.component.ts ***!
\*********************************************************/
/*! exports provided: CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, MaterialChipsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR", function() { return CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaterialChipsComponent", function() { return MaterialChipsComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return MaterialChipsComponent; }),
multi: true
};
var MaterialChipsComponent = /** @class */ (function () {
function MaterialChipsComponent() {
this.placeholder = '';
this.isTagsFocused = false;
this.tagsfocusedChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.labelsChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this.onTouchedCallback = this.noop;
this.onChangeCallback = this.noop;
this.onTouchedCallback = this.onTouchedCallback === undefined ? this.noop : this.onTouchedCallback;
this.onChangeCallback = this.onChangeCallback === undefined ? this.noop : this.onChangeCallback;
}
Object.defineProperty(MaterialChipsComponent.prototype, "tagsfocused", {
get: function () {
return this.isTagsFocused;
},
enumerable: true,
configurable: true
});
MaterialChipsComponent.prototype.registerOnChange = function (fn) { this.onChangeCallback = fn; };
MaterialChipsComponent.prototype.registerOnTouched = function (fn) { this.onTouchedCallback = fn; };
MaterialChipsComponent.prototype.removeValue = function (value) {
var index = this.values.indexOf(value, 0);
if (index !== undefined) {
this.values.splice(index, 1);
this.labelsChange.emit(this.values);
}
};
MaterialChipsComponent.prototype.addValue = function (value) {
if (!value || value.trim() === '') {
return;
}
this.values.push(value);
this.labelsChange.emit(this.values);
this.labelToAdd = '';
};
MaterialChipsComponent.prototype.writeValue = function (value) {
if (value !== this.values) {
this.values = value;
}
};
MaterialChipsComponent.prototype.onFocus = function () {
this.focused = 'md-focused';
this.isTagsFocused = true;
this.tagsfocusedChange.emit(this.isTagsFocused);
};
MaterialChipsComponent.prototype.focusOutFunction = function () {
this.focused = '';
this.isTagsFocused = false;
this.tagsfocusedChange.emit(this.isTagsFocused);
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('placeholder'),
__metadata("design:type", Object)
], MaterialChipsComponent.prototype, "placeholder", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", Object)
], MaterialChipsComponent.prototype, "tagsfocusedChange", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"])
], MaterialChipsComponent.prototype, "labelsChange", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], MaterialChipsComponent.prototype, "tagsfocused", null);
MaterialChipsComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-material-chips',
template: __webpack_require__(/*! ./chips.component.html */ "./src/app/typescripts/pro/tags/chips.component.html"),
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR]
}),
__metadata("design:paramtypes", [])
], MaterialChipsComponent);
return MaterialChipsComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/tags/chips.module.ts":
/*!******************************************************!*\
!*** ./src/app/typescripts/pro/tags/chips.module.ts ***!
\******************************************************/
/*! exports provided: MaterialChipsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaterialChipsModule", function() { return MaterialChipsModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _chips_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chips.component */ "./src/app/typescripts/pro/tags/chips.component.ts");
var __decorate = (undefined && undefined.__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 MaterialChipsModule = /** @class */ (function () {
function MaterialChipsModule() {
}
MaterialChipsModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"]],
declarations: [_chips_component__WEBPACK_IMPORTED_MODULE_3__["MaterialChipsComponent"]],
exports: [_chips_component__WEBPACK_IMPORTED_MODULE_3__["MaterialChipsComponent"]]
})
], MaterialChipsModule);
return MaterialChipsModule;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/tags/index.ts":
/*!***********************************************!*\
!*** ./src/app/typescripts/pro/tags/index.ts ***!
\***********************************************/
/*! exports provided: CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, MaterialChipsComponent, MaterialChipsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _chips_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chips.component */ "./src/app/typescripts/pro/tags/chips.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR", function() { return _chips_component__WEBPACK_IMPORTED_MODULE_0__["CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaterialChipsComponent", function() { return _chips_component__WEBPACK_IMPORTED_MODULE_0__["MaterialChipsComponent"]; });
/* harmony import */ var _chips_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chips.module */ "./src/app/typescripts/pro/tags/chips.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaterialChipsModule", function() { return _chips_module__WEBPACK_IMPORTED_MODULE_1__["MaterialChipsModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/time-picker/index.ts":
/*!******************************************************!*\
!*** ./src/app/typescripts/pro/time-picker/index.ts ***!
\******************************************************/
/*! exports provided: TIME_PIRCKER_VALUE_ACCESSOT, ClockPickerComponent, TimePickerModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _timepicker_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timepicker.component */ "./src/app/typescripts/pro/time-picker/timepicker.component.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TIME_PIRCKER_VALUE_ACCESSOT", function() { return _timepicker_component__WEBPACK_IMPORTED_MODULE_0__["TIME_PIRCKER_VALUE_ACCESSOT"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClockPickerComponent", function() { return _timepicker_component__WEBPACK_IMPORTED_MODULE_0__["ClockPickerComponent"]; });
/* harmony import */ var _timepicker_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timepicker.module */ "./src/app/typescripts/pro/time-picker/timepicker.module.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimePickerModule", function() { return _timepicker_module__WEBPACK_IMPORTED_MODULE_1__["TimePickerModule"]; });
/***/ }),
/***/ "./src/app/typescripts/pro/time-picker/timepicker.component.html":
/*!***********************************************************************!*\
!*** ./src/app/typescripts/pro/time-picker/timepicker.component.html ***!
\***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div>\r\n <div class=\"md-form\">\r\n <label class=\"active\">{{ label }}</label>\r\n <input [placeholder]=\"placeholder\" [value]=\"endHours\" type=\"text\" class=\"form-control timepicker\" (click)=\"openBtnClicked()\" [(ngModel)]=\"endHours\">\r\n </div>\r\n <div class=\"clockpicker picker\" [hidden]=\"!showClock\" [ngClass]=\"{'picker--opened': showClock, 'darktheme': darktheme}\">\r\n <div class=\"picker__holder\">\r\n <div class=\"picker__frame\">\r\n <div class=\"picker__wrap\">\r\n <div class=\"picker__box\">\r\n <div class=\"picker__date-display\">\r\n <div class=\"clockpicker-display\">\r\n <div class=\"clockpicker-display-column\">\r\n <span class=\"clockpicker-span-hours text-primary\" [ngClass]=\"{'text-primary': showHours}\" (click)=\"showHoursClock()\">\r\n {{ selectedHours.h }}</span>:<span class=\"clockpicker-span-minutes\" [ngClass]=\"{'text-primary': !showHours}\"\r\n (click)=\"showMinutesClock()\">{{selectedHours.m }}</span>\r\n </div>\r\n <div class=\"clockpicker-display-column clockpicker-display-am-pm\" *ngIf=\"twelvehour\">\r\n <div class=\"clockpicker-span-am-pm\">{{ selectedHours.ampm }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"picker__calendar-container\">\r\n <div class=\"clockpicker-plate\" #plate>\r\n <div class=\"clockpicker-canvas\">\r\n <svg class=\"clockpicker-svg\" width=\"270\" height=\"270\" #svg>\r\n <g transform=\"translate(135,135)\" #g>\r\n <line x1=\"0\" y1=\"0\" x2=\"77.94228634059948\" y2=\"-45.00000000000001\" #hand></line>\r\n <circle class=\"clockpicker-canvas-fg\" r=\"5\" cx=\"95.26279441628824\" cy=\"-55.000000000000014\" #fg></circle>\r\n <circle class=\"clockpicker-canvas-bg\" r=\"20\" cx=\"95.26279441628824\" cy=\"-55.000000000000014\" #bg></circle>\r\n <circle class=\"clockpicker-canvas-bearing\" cx=\"0\" cy=\"0\" r=\"2\" #bearing></circle>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"clockpicker-dial clockpicker-hours\" #hoursPlate [ngClass]=\"{'clockpicker-dial-out': !showHours}\" [ngStyle]=\"{'visibility': !showHours ? 'hidden' : 'visible'}\">\r\n <div *ngFor=\"let tick of hoursTicks\" class=\"clockpicker-tick\" style=\"font-size: 140%;\" [ngStyle]=\"{'left': tick.left+'px', 'top': tick.top+'px'}\"\r\n id=\"{{ tick.hour }}\">\r\n {{ tick.hour }}\r\n </div>\r\n </div>\r\n <div class=\"clockpicker-dial clockpicker-minutes\" #minutesPlate [ngClass]=\"{'clockpicker-dial-out': showHours}\" [ngStyle]=\"{'visibility': showHours ? 'hidden' : 'visible'}\">\r\n <div *ngFor=\"let tick of minutesTicks\" class=\"clockpicker-tick\" style=\"font-size: 120%;\" [ngStyle]=\"{'left': tick.left+'px', 'top': tick.top+'px'}\">\r\n {{ tick.min }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"clockpicker-am-pm-block\" *ngIf=\"twelvehour\">\r\n <button type=\"button\" class=\"btn-floating btn-flat clockpicker-button am-button\" [ngClass]=\"{'active': selectedHours.ampm=='AM'}\"\r\n (click)=\"setAmPm('AM')\">\r\n AM\r\n </button>\r\n <button type=\"button\" class=\"btn-floating btn-flat clockpicker-button pm-button\" [ngClass]=\"{'active': selectedHours.ampm=='PM'}\"\r\n (click)=\"setAmPm('PM')\">\r\n PM\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"picker__footer\">\r\n <button type=\"button\" *ngIf=\"buttonLabel\" class=\"btn-flat clockpicker-button\" (click)=\"closeBtnClicked()\">\r\n {{buttonLabel}}\r\n </button>\r\n <button type=\"button\" *ngIf=\"!buttonLabel\" class=\"btn-flat clockpicker-button\" (click)=\"closeBtnClicked()\">\r\n Done\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>"
/***/ }),
/***/ "./src/app/typescripts/pro/time-picker/timepicker.component.ts":
/*!*********************************************************************!*\
!*** ./src/app/typescripts/pro/time-picker/timepicker.component.ts ***!
\*********************************************************************/
/*! exports provided: TIME_PIRCKER_VALUE_ACCESSOT, ClockPickerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TIME_PIRCKER_VALUE_ACCESSOT", function() { return TIME_PIRCKER_VALUE_ACCESSOT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClockPickerComponent", function() { return ClockPickerComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var TIME_PIRCKER_VALUE_ACCESSOT = {
provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return ClockPickerComponent; }),
multi: true
};
var ClockPickerComponent = /** @class */ (function () {
function ClockPickerComponent(elem, renderer) {
var _this = this;
this.elem = elem;
this.renderer = renderer;
this.twelvehour = false;
this.darktheme = false;
this.placeholder = '';
this.label = '';
this.duration = 300;
this.showClock = false;
this.touchDevice = ('ontouchstart' in document.documentElement);
this.showHours = false;
this.dialRadius = 135;
this.outerRadius = 110;
this.innerRadius = 80;
this.tickRadius = 20;
this.diameter = this.dialRadius * 2;
this.hoursTicks = [];
this.minutesTicks = [];
this.selectedHours = { 'h': '12', 'm': '00', 'ampm': 'AM' };
this.endHours = '';
this.touchSupported = 'ontouchstart' in window;
this.mousedownEvent = 'mousedown' + (this.touchSupported ? ' touchstart' : '');
this.mousemoveEvent = 'mousemove' + (this.touchSupported ? ' touchmove' : '');
this.mouseupEvent = 'mouseup' + (this.touchSupported ? ' touchend' : '');
this.onChangeCb = function () { };
this.onTouchedCb = function () { };
renderer.listen(this.elem.nativeElement, 'click', function (event) {
if (_this.showClock &&
event.target &&
_this.elem.nativeElement !== event.target &&
!_this.elem.nativeElement.contains(event.target)) {
_this.showClock = false;
}
if (event.target.classList.contains('picker__holder')) {
_this.showClock = false;
}
});
}
ClockPickerComponent.prototype.ngOnInit = function () {
this.generateTick();
};
ClockPickerComponent.prototype.ngAfterViewInit = function () {
var _this = this;
this.renderer.listen(this.elem.nativeElement.querySelector('.clockpicker-plate'), 'mousedown', function (event) {
_this.mousedown(event, false);
});
};
ClockPickerComponent.prototype.checkDraw = function () {
var value;
var isHours = this.showHours;
if (isHours) {
value = parseInt(this.selectedHours.h, 0);
}
else {
value = parseInt(this.selectedHours.m, 0);
}
var unit = Math.PI / (isHours ? 6 : 30), radian = value * unit, radius = isHours && value > 0 && value < 13 ? this.innerRadius : this.outerRadius, xd = Math.sin(radian) * radius, yd = -Math.cos(radian) * radius;
this.setHand(xd, yd, false);
};
ClockPickerComponent.prototype.mousedown = function (e, space) {
var _this = this;
var offset = this.plate.nativeElement.getBoundingClientRect(), isTouch = /^touch/.test(e.type), x0 = offset.left + this.dialRadius, y0 = offset.top + this.dialRadius, dx = (isTouch ? e.originalEvent.touches[0] : e).clientX - x0, dy = (isTouch ? e.originalEvent.touches[0] : e).clientY - y0, z = Math.sqrt(dx * dx + dy * dy);
var moved = false;
if (space && (z < this.outerRadius - this.tickRadius || z > this.outerRadius + this.tickRadius)) {
return;
}
e.preventDefault();
e.stopPropagation();
if (this.showHours) {
this.setHand(dx, dy, true);
}
else {
this.setHand(dx, dy, false);
}
var mousemoveEventMethod = function (event) {
event.preventDefault();
event.stopPropagation();
var x = event.clientX - x0, y = event.clientY - y0;
if (!moved && x === dx && y === dy) {
return;
}
moved = true;
_this.setHand(x, y, false);
};
var mouseupEventMethod = function (event) {
document.removeEventListener(_this.mousemoveEvent, mousemoveEventMethod);
e.preventDefault();
var x = event.clientX - x0, y = event.clientX - y0;
if ((space || moved) && x === dx && y === dy) {
_this.setHand(x, y, false);
}
_this.showMinutesClock();
document.removeEventListener(_this.mouseupEvent, mouseupEventMethod);
};
document.addEventListener(this.mousemoveEvent, mousemoveEventMethod);
document.addEventListener('mouseup', mouseupEventMethod);
};
ClockPickerComponent.prototype.hideKeyboard = function () {
// this set timeout needed for case when hideKeyborad
// is called inside of 'onfocus' event handler
setTimeout(function () {
// creating temp field
var field = document.createElement('input');
field.setAttribute('type', 'text');
// hiding temp field from peoples eyes
// -webkit-user-modify is nessesary for Android 4.x
/*tslint:disable:max-line-length*/
field.setAttribute('style', 'position:absolute; top: 0px; opacity: 0; -webkit-user-modify: read-write-plaintext-only; left:0px;');
document.body.appendChild(field);
// adding onfocus event handler for out temp field
field.onfocus = function () {
// this timeout of 200ms is nessasary for Android 2.3.x
setTimeout(function () {
field.setAttribute('style', 'display:none;');
setTimeout(function () {
document.body.removeChild(field);
document.body.focus();
}, 14);
}, 20);
};
// focusing it
field.focus();
}, 50);
};
ClockPickerComponent.prototype.openBtnClicked = function () {
this.showClock = true;
this.showHours = true;
this.checkDraw();
this.hideKeyboard();
};
ClockPickerComponent.prototype.closeBtnClicked = function () {
var h = this.selectedHours.h;
var m = this.selectedHours.m;
var ampm = this.selectedHours.ampm;
if (this.twelvehour) {
this.endHours = h + ':' + m + ampm;
}
else {
this.endHours = h + ':' + m;
}
this.onChangeCb(this.endHours);
this.onTouchedCb();
this.showClock = false;
};
ClockPickerComponent.prototype.setHour = function (hour) {
this.selectedHours.h = hour;
};
ClockPickerComponent.prototype.setMinute = function (min) {
// event.stopPropagation();
this.selectedHours.m = min;
};
ClockPickerComponent.prototype.setAmPm = function (ampm) {
// event.stopPropagation();
this.selectedHours.ampm = ampm;
};
ClockPickerComponent.prototype.showHoursClock = function () {
this.showHours = true;
this.checkDraw();
};
ClockPickerComponent.prototype.showMinutesClock = function () {
this.showHours = false;
this.checkDraw();
};
ClockPickerComponent.prototype.generateTick = function () {
if (this.twelvehour) {
for (var i = 1; i < 13; i++) {
var radian = i / 6 * Math.PI;
var radius = this.outerRadius;
var tick = {
'hour': i,
'left': this.dialRadius + Math.sin(radian) * radius - this.tickRadius,
'top': this.dialRadius - Math.cos(radian) * radius - this.tickRadius,
};
this.hoursTicks.push(tick);
}
}
else {
for (var i = 0; i < 24; i++) {
var radian = i / 6 * Math.PI;
var inner = i > 0 && i < 13;
var radius = inner ? this.innerRadius : this.outerRadius;
var h = void 0;
if (i === 0) {
h = '0' + i.toString();
}
else {
h = i;
}
var tick = {
'hour': h,
'left': this.dialRadius + Math.sin(radian) * radius - this.tickRadius,
'top': this.dialRadius - Math.cos(radian) * radius - this.tickRadius,
};
this.hoursTicks.push(tick);
}
}
for (var i = 0; i < 60; i += 5) {
var radian = i / 30 * Math.PI;
var min = i.toString();
if (i < 10) {
min = '0' + i.toString();
}
var tick = {
'min': min,
'left': this.dialRadius + Math.sin(radian) * this.outerRadius - this.tickRadius,
'top': this.dialRadius - Math.cos(radian) * this.outerRadius - this.tickRadius,
};
this.minutesTicks.push(tick);
}
};
ClockPickerComponent.prototype.setHand = function (x, y, roundBy5) {
var radian = Math.atan2(x, -y);
var isHours = this.showHours;
var unit = Math.PI / (isHours || roundBy5 ? 6 : 30);
var z = Math.sqrt(x * x + y * y);
var inner = isHours && z < (this.outerRadius + this.innerRadius) / 2;
var radius = inner ? this.innerRadius : this.outerRadius;
var value;
if (this.showHours) {
value = parseInt(this.selectedHours.h, 0);
}
else {
value = parseInt(this.selectedHours.m, 0);
}
if (this.twelvehour) {
radius = this.outerRadius;
}
if (radian < 0) {
radian = Math.PI * 2 + radian;
}
value = Math.round(radian / unit);
radian = value * unit;
if (this.twelvehour) {
if (isHours) {
if (value === 0) {
value = 12;
}
}
else {
if (roundBy5) {
value *= 5;
}
if (value === 60) {
value = 0;
}
}
}
else {
if (isHours) {
value = !inner ? value + 12 : value;
value = value === 24 ? 0 : value;
value = (inner && value === 0) ? 12 : value;
value = (!inner && value === 12) ? 0 : value;
}
else {
if (roundBy5) {
value *= 5;
}
if (value === 60) {
value = 0;
}
}
}
if (isHours) {
this.fg.nativeElement.setAttribute('class', 'clockpicker-canvas-fg');
}
else {
if (value % 5 === 0) {
this.fg.nativeElement.setAttribute('class', 'clockpicker-canvas-fg');
}
else {
this.fg.nativeElement.setAttribute('class', 'clockpicker-canvas-fg active');
}
}
var cx1 = Math.sin(radian) * (radius - this.tickRadius), cy1 = -Math.cos(radian) * (radius - this.tickRadius), cx2 = Math.sin(radian) * radius, cy2 = -Math.cos(radian) * radius;
this.hand.nativeElement.setAttribute('x2', cx1);
this.hand.nativeElement.setAttribute('y2', cy1);
this.bg.nativeElement.setAttribute('cx', cx2);
this.bg.nativeElement.setAttribute('cy', cy2);
this.fg.nativeElement.setAttribute('cx', cx2);
this.fg.nativeElement.setAttribute('cy', cy2);
if (this.showHours) {
if (value < 10) {
this.setHour('0' + value.toString());
}
else {
this.setHour(value.toString());
}
}
else {
if (value < 10) {
this.setMinute('0' + value.toString());
}
else {
this.setMinute(value.toString());
}
}
};
ClockPickerComponent.prototype.offset = function (obj) {
var left = 0, top = 0;
if (obj.offsetParent) {
do {
left += obj.offsetLeft;
top += obj.offsetTop;
} while (obj = obj.offsetParent);
}
return { left: left, top: top };
};
ClockPickerComponent.prototype.writeValue = function (value) {
this.endHours = value;
};
ClockPickerComponent.prototype.registerOnChange = function (fn) {
this.onChangeCb = fn;
};
ClockPickerComponent.prototype.registerOnTouched = function (fn) {
this.onTouchedCb = fn;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('hoursPlate'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ClockPickerComponent.prototype, "hoursPlate", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('minutesPlate'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ClockPickerComponent.prototype, "minutesPlate", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('plate'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ClockPickerComponent.prototype, "plate", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('svg'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ClockPickerComponent.prototype, "svg", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('g'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ClockPickerComponent.prototype, "g", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('hand'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ClockPickerComponent.prototype, "hand", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('fg'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ClockPickerComponent.prototype, "fg", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('bg'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ClockPickerComponent.prototype, "bg", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('bearing'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ClockPickerComponent.prototype, "bearing", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('twelvehour'),
__metadata("design:type", Object)
], ClockPickerComponent.prototype, "twelvehour", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('darktheme'),
__metadata("design:type", Object)
], ClockPickerComponent.prototype, "darktheme", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('placeholder'),
__metadata("design:type", String)
], ClockPickerComponent.prototype, "placeholder", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('label'),
__metadata("design:type", Object)
], ClockPickerComponent.prototype, "label", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('duration'),
__metadata("design:type", Object)
], ClockPickerComponent.prototype, "duration", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('showClock'),
__metadata("design:type", Object)
], ClockPickerComponent.prototype, "showClock", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('buttonlabel'),
__metadata("design:type", String)
], ClockPickerComponent.prototype, "buttonLabel", void 0);
ClockPickerComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'mdb-time-picker',
template: __webpack_require__(/*! ./timepicker.component.html */ "./src/app/typescripts/pro/time-picker/timepicker.component.html"),
providers: [TIME_PIRCKER_VALUE_ACCESSOT]
}),
__metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]])
], ClockPickerComponent);
return ClockPickerComponent;
}());
/***/ }),
/***/ "./src/app/typescripts/pro/time-picker/timepicker.module.ts":
/*!******************************************************************!*\
!*** ./src/app/typescripts/pro/time-picker/timepicker.module.ts ***!
\******************************************************************/
/*! exports provided: TimePickerModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimePickerModule", function() { return TimePickerModule; });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _timepicker_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./timepicker.component */ "./src/app/typescripts/pro/time-picker/timepicker.component.ts");
var __decorate = (undefined && undefined.__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 TimePickerModule = /** @class */ (function () {
function TimePickerModule() {
}
TimePickerModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormsModule"]],
declarations: [_timepicker_component__WEBPACK_IMPORTED_MODULE_3__["ClockPickerComponent"]],
exports: [_timepicker_component__WEBPACK_IMPORTED_MODULE_3__["ClockPickerComponent"]]
})
], TimePickerModule);
return TimePickerModule;
}());
/***/ }),
/***/ "./src/environments/environment.ts":
/*!*****************************************!*\
!*** ./src/environments/environment.ts ***!
\*****************************************/
/*! exports provided: environment */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; });
// The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `.angular-cli.json`.
var environment = {
production: false
};
/***/ }),
/***/ "./src/main.ts":
/*!*********************!*\
!*** ./src/main.ts ***!
\*********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js");
/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts");
if (_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].production) {
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["enableProdMode"])();
}
Object(_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__["platformBrowserDynamic"])().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"]);
/***/ }),
/***/ 0:
/*!***************************!*\
!*** multi ./src/main.ts ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! E:\Programmation\Projects\Sup_File\src\main.ts */"./src/main.ts");
/***/ })
},[[0,"runtime","vendor"]]]);
//# sourceMappingURL=main.js.map