1 | import { __decorate, __assign, __param } from 'tslib';
|
2 | import { EventEmitter, Input, Output, Component, NgModule, forwardRef, ChangeDetectorRef, HostBinding, ViewChild, ViewEncapsulation, Inject, CUSTOM_ELEMENTS_SCHEMA, HostListener, Directive } from '@angular/core';
|
3 | import { CommonModule } from '@angular/common';
|
4 | import { MatButtonModule, MatProgressSpinnerModule, MatCheckboxModule, MatRadioModule, MatInputModule, MatSlideToggleModule, MatTooltipModule, MatSnackBarRef, MAT_SNACK_BAR_DATA, MatIconModule, MatDialogRef, MAT_DIALOG_DATA, MatDialog, MatProgressBarModule } from '@angular/material';
|
5 | import { trigger, state, style, transition, animate } from '@angular/animations';
|
6 | import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, FormsModule, ReactiveFormsModule, FormControl } from '@angular/forms';
|
7 | import { Subject } from 'rxjs';
|
8 | import { takeUntil } from 'rxjs/operators';
|
9 | import { MatSelectModule } from '@angular/material/select';
|
10 | import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
11 | import { HttpClient } from '@angular/common/http';
|
12 | import { ImageCropperModule } from 'ngx-image-cropper';
|
13 |
|
14 | var ButtonComponent = (function () {
|
15 | function ButtonComponent() {
|
16 | this.clicked = new EventEmitter();
|
17 | }
|
18 | ButtonComponent.prototype.ngOnInit = function () {
|
19 | this.theme = this.theme ? this.theme : 'primary';
|
20 | };
|
21 | ButtonComponent.prototype.clickedButton = function (event) {
|
22 |
|
23 | this.btnWidth = event.currentTarget['offsetWidth'] - 80;
|
24 | this.clicked.emit(event);
|
25 | };
|
26 | __decorate([
|
27 | Input()
|
28 | ], ButtonComponent.prototype, "showProgress", void 0);
|
29 | __decorate([
|
30 | Input()
|
31 | ], ButtonComponent.prototype, "isContained", void 0);
|
32 | __decorate([
|
33 | Input()
|
34 | ], ButtonComponent.prototype, "theme", void 0);
|
35 | __decorate([
|
36 | Input()
|
37 | ], ButtonComponent.prototype, "focused", void 0);
|
38 | __decorate([
|
39 | Input()
|
40 | ], ButtonComponent.prototype, "large", void 0);
|
41 | __decorate([
|
42 | Input()
|
43 | ], ButtonComponent.prototype, "isStroked", void 0);
|
44 | __decorate([
|
45 | Input()
|
46 | ], ButtonComponent.prototype, "shouldBeDisabled", void 0);
|
47 | __decorate([
|
48 | Input()
|
49 | ], ButtonComponent.prototype, "showIcon", void 0);
|
50 | __decorate([
|
51 | Output()
|
52 | ], ButtonComponent.prototype, "clicked", void 0);
|
53 | ButtonComponent = __decorate([
|
54 | Component({
|
55 | selector: 'nitrozen-button',
|
56 | template: "<div [ngClass]=\"{\n 'primary-section': theme === 'primary' ,\n 'secondary-section': theme === 'accent'\n }\">\n<button mat-raised-button class=\"btn-nitrozen\" \n[ngClass]=\"{\n 'mat-stroked-button': isStroked,\n 'mat-flat-button':isContained,\n 'btn-focused':focused,\n 'hover-state':showProgress,\n 'large-btn':large\n }\"\n [disabled]=\"shouldBeDisabled\"\n (click)=\"clickedButton($event)\"\n\n>\n\n<div class=\"btn-icon-show\">\n <div class=\"btn-txt\" \n [ngClass]=\"{\n 'btn-show-icn': showIcon,\n 'btn-stroke-color':isStroked,\n 'btn-contained-color':isContained,\n 'btn-progress': !showProgress,\n 'btn-notprogress' : showProgress\n }\">\n <ng-content></ng-content>\n </div>\n\n\n <div class=\"btn-spin\" [ngClass]=\"{\n 'btn-spin-stroke': isStroked,\n 'btn-spin-contained':isContained,\n 'btn-progress': !showProgress,\n 'btn-notprogress' : showProgress\n }\" *ngIf=\"showIcon\">\n <img src=\"./../../assets/icons/Bag_Icon.svg\">\n</div>\n <div class=\"btn-spin\" [ngStyle]=\"{'width.px': btnWidth}\" [ngClass]=\"{\n 'btn-spin-stroke': isStroked,\n 'btn-spin-contained':isContained,\n 'btn-notprogress': !showProgress,\n 'btn-progress' : showProgress\n }\">\n <img *ngIf=\"isContained\" class=\"btn-spinner\" style=\"width: 50px;\" src=\"../../../assets/icons/loader-white-1.gif\">\n <img *ngIf=\"isStroked && theme === 'primary'\" class=\"btn-spinner\" style=\"width: 50px;\" src=\"../../../assets/icons/loader-green.gif\">\n <img *ngIf=\"isStroked && theme === 'accent'\" class=\"btn-spinner\" style=\"width: 50px;\" src=\"../../../assets/icons/loader-blue.gif\">\n <!-- <mat-progress-spinner\n class=\"btn-spinner\"\n [ngClass]=\"{'c-button__spinner--active': showProgress && !shouldBeDisabled}\"\n diameter=\"21\"\n mode=\"indeterminate\"\n ></mat-progress-spinner> -->\n</div>\n</div>\n</button>\n</div>\n\n",
|
57 | styles: [".btn-nitrozen{height:48px;border-radius:3px;cursor:pointer;padding:0 40px;box-shadow:none}.hover-state{pointer-events:none}.large-btn{height:64px!important;padding:0 65px!important}.btn-notprogress{opacity:0;transition:opacity .25s ease-out;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.fx-wt{width:66.38px}.primary-section .mat-flat-button.btn-focused{text-decoration:underline;color:#fff;text-underline-position:under}.primary-section .mat-stroked-button.btn-focused{text-decoration:underline;color:#36cc9b;text-underline-position:under}.primary-section .mat-flat-button{background-color:#36cc9b}.primary-section .mat-flat-button:hover:not([disabled]){background-color:#2eb589}.primary-section .mat-flat-button:focus{text-decoration:underline;color:#fff;text-underline-position:under}.primary-section .mat-stroked-button{border:1px solid #36cc9b}.primary-section .mat-stroked-button:hover:not([disabled]){background-color:rgba(54,204,155,.12)}.primary-section .mat-stroked-button:focus{text-decoration:underline;color:#45cc9b;text-underline-position:under}.primary-section .btn-spin-stroke .mat-spinner circle,.primary-section .btn-spin-stroke ::ng-deep .mat-progress-spinner circle{stroke:#fff}.primary-section .btn-spin-contained .mat-spinner circle,.primary-section .btn-spin-contained ::ng-deep .mat-progress-spinner circle{stroke:#fff}.primary-section .mat-flat-button:disabled,.primary-section .mat-flat-button[disabled=disabled]{background-color:rgba(54,204,155,.4)!important}.primary-section .btn-txt{font-family:Poppins;font-size:16px;font-weight:700;line-height:25px;text-align:center}.primary-section .btn-stroke-color{color:#36cc9b}.primary-section .btn-contained-color{color:#fff}.primary-section .btn-spinner{text-align:center}.primary-section .btn-spin{display:flex;justify-content:center}.primary-section .btn-fynd-icon{height:48px;width:190px;border-radius:3px;background-color:#36cc9b}.primary-section .btn-fynd-icon:hover:not([disabled]){background-color:#2eb589}.primary-section .btn-fynd-icon:focus{text-decoration:underline;color:#fff;text-underline-position:under}.primary-section .btn-show-icn{padding-left:10px}.primary-section .btn-icon-show{display:flex;flex-direction:row-reverse;justify-content:center}.secondary-section .mat-flat-button.btn-focused{text-decoration:underline;color:#fff;text-underline-position:under}.secondary-section .mat-stroked-button.btn-focused{text-decoration:underline;color:#5c6bdd;text-underline-position:under}.secondary-section .mat-flat-button{background-color:#5c6bdd}.secondary-section .mat-flat-button:hover:not([disabled]){background-color:#4f5ecc}.secondary-section .mat-flat-button:focus{text-decoration:underline;color:#fff;text-underline-position:under}.secondary-section .mat-stroked-button{border:1px solid #5c6bdd}.secondary-section .mat-stroked-button:hover:not([disabled]){background-color:rgba(79,94,204,.12)}.secondary-section .mat-stroked-button:focus{text-decoration:underline;color:#5c6bdd;text-underline-position:under}.secondary-section .btn-spin-stroke .mat-spinner circle,.secondary-section .btn-spin-stroke ::ng-deep .mat-progress-spinner circle{stroke:#5c6bdd}.secondary-section .btn-spin-contained .mat-spinner circle,.secondary-section .btn-spin-contained ::ng-deep .mat-progress-spinner circle{stroke:#fff}.secondary-section .mat-flat-button:disabled,.secondary-section .mat-flat-button[disabled=disabled]{background-color:rgba(92,107,221,.4)!important}.secondary-section .btn-txt{font-family:Poppins;font-size:16px;font-weight:700;line-height:25px;text-align:center}.secondary-section .btn-stroke-color{color:#5c6bdd}.secondary-section .btn-contained-color{color:#fff}.secondary-section .btn-spinner{text-align:center}.secondary-section .btn-spin{display:flex;justify-content:center}.secondary-section .btn-fynd-icon{height:48px;width:190px;border-radius:3px;background-color:#5c6bdd}.secondary-section .btn-fynd-icon:hover:not([disabled]){background-color:#2eb589}.secondary-section .btn-fynd-icon:focus{text-decoration:underline;color:#fff;text-underline-position:under}.secondary-section .btn-show-icn{padding-left:10px}.secondary-section .btn-icon-show{display:flex;flex-direction:row-reverse;justify-content:center}"]
|
58 | })
|
59 | ], ButtonComponent);
|
60 | return ButtonComponent;
|
61 | }());
|
62 |
|
63 | var ButtonModule = (function () {
|
64 | function ButtonModule() {
|
65 | }
|
66 | ButtonModule = __decorate([
|
67 | NgModule({
|
68 | declarations: [ButtonComponent],
|
69 | imports: [
|
70 | CommonModule,
|
71 | MatButtonModule,
|
72 | MatProgressSpinnerModule
|
73 | ],
|
74 | exports: [
|
75 | ButtonComponent,
|
76 | MatButtonModule,
|
77 | MatProgressSpinnerModule
|
78 | ]
|
79 | })
|
80 | ], ButtonModule);
|
81 | return ButtonModule;
|
82 | }());
|
83 |
|
84 | var ButtonTextComponent = (function () {
|
85 | function ButtonTextComponent() {
|
86 | this.clicked = new EventEmitter();
|
87 | }
|
88 | ButtonTextComponent.prototype.ngOnInit = function () {
|
89 |
|
90 | };
|
91 | ButtonTextComponent.prototype.clickedButton = function (event) {
|
92 | this.clicked.emit(event);
|
93 | };
|
94 | __decorate([
|
95 | Input()
|
96 | ], ButtonTextComponent.prototype, "shouldBeDisabled", void 0);
|
97 | __decorate([
|
98 | Input()
|
99 | ], ButtonTextComponent.prototype, "theme", void 0);
|
100 | __decorate([
|
101 | Input()
|
102 | ], ButtonTextComponent.prototype, "focused", void 0);
|
103 | __decorate([
|
104 | Input()
|
105 | ], ButtonTextComponent.prototype, "prefixIcon", void 0);
|
106 | __decorate([
|
107 | Input()
|
108 | ], ButtonTextComponent.prototype, "postfixIcon", void 0);
|
109 | __decorate([
|
110 | Input()
|
111 | ], ButtonTextComponent.prototype, "type", void 0);
|
112 | __decorate([
|
113 | Output()
|
114 | ], ButtonTextComponent.prototype, "clicked", void 0);
|
115 | ButtonTextComponent = __decorate([
|
116 | Component({
|
117 | selector: 'nitrozen-button-text',
|
118 | template: "<div [ngClass]=\"{\n 'primary-section': theme === 'primary' ,\n 'secondary-section': theme === 'accent',\n 'warn-section':theme === 'warn'\n }\">\n <div>\n<button [ngClass]=\"{'btn-focused':focused,'btn-warn-thm':theme === 'warn','btn-prim-thm':theme === 'primary'}\" mat-button (click)=\"clickedButton($event)\" [disabled]=\"shouldBeDisabled\">\n\t<div>\n\t\t<span class=\"btn-spin\" *ngIf=\"prefixIcon\">\n <img src=\"./../../assets/icons/arrow-icon.svg\">\n</span>\n\t<span class=\"btn-txt\" [ngClass]=\"{\n 'primary-section': theme === 'primary' ,\n 'secondary-section': theme === 'accent',\n 'warn-section':theme === 'warn'\n }\">\n <ng-content></ng-content>\n </span>\n <span class=\"btn-spin-post\" *ngIf=\"postfixIcon\">\n <img src=\"./../../assets/icons/arrow-icon.svg\">\n</span>\n \n</div>\n</button>\n</div>\n</div>\n",
|
119 | styles: [".btn-txt{color:#4f5ecc;font-family:Poppins;font-size:16px;font-weight:700;text-align:center}button:disabled,button[disabled=disabled]{color:rgba(92,107,221,.5)!important;opacity:.5}.btn-text,.primary-section{color:#36cc9b!important}.btn-prim-thm:focus{text-decoration:underline;color:#36cc9b!important;text-underline-position:under}.warn-section .btn-txt{color:#fb406b!important;font-weight:700}.btn-warn-thm:focus{text-decoration:underline;color:#fb406b!important;text-underline-position:under}.mat-button{height:48px}.mat-button:hover{background-color:transparent!important}.btn-focused,.mat-button:focus{text-decoration:underline;color:#4f5ecc;text-underline-position:under}.btn-spin{padding-right:8px}.btn-spin-post{padding-left:8px}.hover-state{pointer-events:none}img{width:14px;height:12px}"]
|
120 | })
|
121 | ], ButtonTextComponent);
|
122 | return ButtonTextComponent;
|
123 | }());
|
124 |
|
125 | var ButtonTextModule = (function () {
|
126 | function ButtonTextModule() {
|
127 | }
|
128 | ButtonTextModule = __decorate([
|
129 | NgModule({
|
130 | declarations: [ButtonTextComponent],
|
131 | imports: [
|
132 | CommonModule,
|
133 | MatButtonModule,
|
134 | MatProgressSpinnerModule
|
135 | ],
|
136 | exports: [
|
137 | ButtonTextComponent,
|
138 | MatButtonModule,
|
139 | MatProgressSpinnerModule
|
140 | ]
|
141 | })
|
142 | ], ButtonTextModule);
|
143 | return ButtonTextModule;
|
144 | }());
|
145 |
|
146 | var CheckboxComponent = (function () {
|
147 | function CheckboxComponent() {
|
148 | |
149 |
|
150 |
|
151 | this.disabled = false;
|
152 | |
153 |
|
154 |
|
155 | this.indeterminate = false;
|
156 | this.change = new EventEmitter();
|
157 | }
|
158 | CheckboxComponent.prototype.ngOnInit = function () {
|
159 | };
|
160 | CheckboxComponent.prototype.onCheckboxStateChanged = function (e) {
|
161 | console.log(e);
|
162 | this.change.emit(e);
|
163 | };
|
164 | __decorate([
|
165 | Input()
|
166 | ], CheckboxComponent.prototype, "checked", void 0);
|
167 | __decorate([
|
168 | Input()
|
169 | ], CheckboxComponent.prototype, "disabled", void 0);
|
170 | __decorate([
|
171 | Input()
|
172 | ], CheckboxComponent.prototype, "indeterminate", void 0);
|
173 | __decorate([
|
174 | Output()
|
175 | ], CheckboxComponent.prototype, "change", void 0);
|
176 | CheckboxComponent = __decorate([
|
177 | Component({
|
178 | selector: 'nitrozen-checkbox',
|
179 | template: "<mat-checkbox \nclass=\"nitro-checkbox\" \n[checked]=\"checked\" \n[indeterminate]=\"indeterminate\"\n[disabled]=\"disabled\"\n(change)=\"onCheckboxStateChanged($event)\">\n\n\n<ng-content></ng-content>\n\n</mat-checkbox>",
|
180 | styles: [""]
|
181 | })
|
182 | ], CheckboxComponent);
|
183 | return CheckboxComponent;
|
184 | }());
|
185 |
|
186 | var CheckboxModule = (function () {
|
187 | function CheckboxModule() {
|
188 | }
|
189 | CheckboxModule = __decorate([
|
190 | NgModule({
|
191 | declarations: [CheckboxComponent],
|
192 | imports: [
|
193 | CommonModule,
|
194 | MatCheckboxModule
|
195 | ],
|
196 | exports: [CheckboxComponent, MatCheckboxModule]
|
197 | })
|
198 | ], CheckboxModule);
|
199 | return CheckboxModule;
|
200 | }());
|
201 |
|
202 | var RadioButtonComponent = (function () {
|
203 | function RadioButtonComponent() {
|
204 | |
205 |
|
206 |
|
207 | this.disabled = false;
|
208 | this.change = new EventEmitter();
|
209 | }
|
210 | RadioButtonComponent.prototype.ngOnInit = function () {
|
211 | };
|
212 | RadioButtonComponent.prototype.onRadioButtonStateChanged = function (e) {
|
213 | console.log(e);
|
214 | this.change.emit(e);
|
215 | };
|
216 | __decorate([
|
217 | Input()
|
218 | ], RadioButtonComponent.prototype, "selected", void 0);
|
219 | __decorate([
|
220 | Input()
|
221 | ], RadioButtonComponent.prototype, "disabled", void 0);
|
222 | __decorate([
|
223 | Output()
|
224 | ], RadioButtonComponent.prototype, "change", void 0);
|
225 | RadioButtonComponent = __decorate([
|
226 | Component({
|
227 | selector: 'nitrozen-radio-button',
|
228 | template: " <mat-radio-button color=\"primary\"\n[disabled]=\"disabled\"\n(change)=\"onRadioButtonStateChanged($event)\">\n\n\n<ng-content></ng-content>\n</mat-radio-button> \n",
|
229 | styles: ["::ng-deep .mat-radio-label-content{padding-left:12px!important;font-family:Poppins!important}"]
|
230 | })
|
231 | ], RadioButtonComponent);
|
232 | return RadioButtonComponent;
|
233 | }());
|
234 |
|
235 | var RadioButtonModule = (function () {
|
236 | function RadioButtonModule() {
|
237 | }
|
238 | RadioButtonModule = __decorate([
|
239 | NgModule({
|
240 | declarations: [RadioButtonComponent],
|
241 | imports: [
|
242 | CommonModule,
|
243 | MatRadioModule
|
244 | ],
|
245 | exports: [RadioButtonComponent, MatRadioModule]
|
246 | })
|
247 | ], RadioButtonModule);
|
248 | return RadioButtonModule;
|
249 | }());
|
250 |
|
251 | var InputTypes;
|
252 | (function (InputTypes) {
|
253 | InputTypes["text"] = "text";
|
254 | InputTypes["number"] = "number";
|
255 | InputTypes["password"] = "password";
|
256 | InputTypes["textarea"] = "textarea";
|
257 | })(InputTypes || (InputTypes = {}));
|
258 |
|
259 | var nextId = 0;
|
260 | var INPUT_VALUE_ACCESSOR = {
|
261 | provide: NG_VALUE_ACCESSOR,
|
262 | useExisting: forwardRef(function () { return InputComponent; }),
|
263 | multi: true
|
264 | };
|
265 | var INPUT_VALIDATORS = {
|
266 | provide: NG_VALIDATORS,
|
267 | useExisting: forwardRef(function () { return InputComponent; }),
|
268 | multi: true
|
269 | };
|
270 | var InputComponent = (function () {
|
271 | function InputComponent(cd) {
|
272 | this.cd = cd;
|
273 | this.label = '';
|
274 | this.type = InputTypes.text;
|
275 | this.blocked = false;
|
276 | this.placeholder = '';
|
277 | this.disabled = false;
|
278 | this.search = false;
|
279 | this.showSuccess = false;
|
280 | this.noneditable = false;
|
281 | this.required = false;
|
282 | this.requiredIndicator = '*';
|
283 | this.tooltip = false;
|
284 | this.passwordToggleEnabled = false;
|
285 | this.passwordTextVisible = false;
|
286 | this.autoSelect = false;
|
287 | this.autofocus = false;
|
288 | this.autocomplete = false;
|
289 | this.autocorrect = false;
|
290 | this.spellcheck = false;
|
291 | this.change = new EventEmitter();
|
292 | this.blur = new EventEmitter();
|
293 | this.focus = new EventEmitter();
|
294 | this.keyup = new EventEmitter();
|
295 | this.click = new EventEmitter();
|
296 | this.getHostCssClasses = 'ngx-input';
|
297 | this.focused = false;
|
298 | this.onTouchedCallback = function () {
|
299 |
|
300 | };
|
301 | this.onChangeCallback = function () {
|
302 |
|
303 | };
|
304 | }
|
305 | Object.defineProperty(InputComponent.prototype, "value", {
|
306 | get: function () {
|
307 | return this._value;
|
308 | },
|
309 | set: function (val) {
|
310 | if (val !== this._value) {
|
311 | this._value = val;
|
312 | this.onChangeCallback(this._value);
|
313 | }
|
314 | },
|
315 | enumerable: true,
|
316 | configurable: true
|
317 | });
|
318 | Object.defineProperty(InputComponent.prototype, "focusedOrDirty", {
|
319 | get: function () {
|
320 | if (this.focused) {
|
321 | return true;
|
322 | }
|
323 | if (typeof this.value === 'string') {
|
324 | return this.value && this.value.length;
|
325 | }
|
326 | return typeof this.value !== 'undefined' && this.value !== null;
|
327 | },
|
328 | enumerable: true,
|
329 | configurable: true
|
330 | });
|
331 | Object.defineProperty(InputComponent.prototype, "isTouched", {
|
332 | get: function () {
|
333 | return this.inputModel ? this.inputModel.touched : false;
|
334 | },
|
335 | enumerable: true,
|
336 | configurable: true
|
337 | });
|
338 | Object.defineProperty(InputComponent.prototype, "labelState", {
|
339 | get: function () {
|
340 | if (this.placeholder)
|
341 | return 'outside';
|
342 | if (this.focusedOrDirty)
|
343 | return 'outside';
|
344 | return 'inside';
|
345 | },
|
346 | enumerable: true,
|
347 | configurable: true
|
348 | });
|
349 | Object.defineProperty(InputComponent.prototype, "underlineState", {
|
350 | get: function () {
|
351 | if (this.focused)
|
352 | return 'expanded';
|
353 | return 'collapsed';
|
354 | },
|
355 | enumerable: true,
|
356 | configurable: true
|
357 | });
|
358 | Object.defineProperty(InputComponent.prototype, "requiredIndicatorView", {
|
359 | get: function () {
|
360 | if (!this.requiredIndicator || !this.required)
|
361 | return '';
|
362 | return this.requiredIndicator;
|
363 | },
|
364 | enumerable: true,
|
365 | configurable: true
|
366 | });
|
367 | Object.defineProperty(InputComponent.prototype, "element", {
|
368 | get: function () {
|
369 | if (this.type === InputTypes.textarea)
|
370 | return this.textareaControl;
|
371 | return this.inputControl;
|
372 | },
|
373 | enumerable: true,
|
374 | configurable: true
|
375 | });
|
376 | InputComponent.prototype.validate = function (c) {
|
377 | if (this.type !== 'number') {
|
378 | return null;
|
379 | }
|
380 | return __assign({}, Validators.max(this.max)(c), Validators.min(this.min)(c));
|
381 | };
|
382 | InputComponent.prototype.ngOnInit = function () {
|
383 | if (!this.value)
|
384 | this.value = '';
|
385 | };
|
386 | InputComponent.prototype.ngAfterViewInit = function () {
|
387 | var _this = this;
|
388 | if (this.autofocus) {
|
389 | setTimeout(function () {
|
390 | _this.element.nativeElement.focus();
|
391 | });
|
392 | }
|
393 |
|
394 | setTimeout(function () { return _this.cd.markForCheck(); });
|
395 | };
|
396 | InputComponent.prototype.ngOnChanges = function (changes) {
|
397 | if ('max' in changes || 'min' in changes) {
|
398 | this.onChangeCallback(this._value);
|
399 | }
|
400 | };
|
401 | InputComponent.prototype.onChange = function (event) {
|
402 | event.stopPropagation();
|
403 | this.change.emit(this.value);
|
404 | };
|
405 | InputComponent.prototype.onKeyUp = function (event) {
|
406 | event.stopPropagation();
|
407 | this.keyup.emit(event);
|
408 | };
|
409 | InputComponent.prototype.onFocus = function (event) {
|
410 | var _this = this;
|
411 | event.stopPropagation();
|
412 | if (this.autoSelect) {
|
413 | setTimeout(function () {
|
414 | _this.element.nativeElement.select();
|
415 | });
|
416 | }
|
417 | this.focused = true;
|
418 | this.focus.emit(event);
|
419 | this.onTouchedCallback();
|
420 | };
|
421 | InputComponent.prototype.onBlur = function (event) {
|
422 | event.stopPropagation();
|
423 | this.focused = false;
|
424 | this.blur.emit(event);
|
425 | };
|
426 | InputComponent.prototype.writeValue = function (val) {
|
427 | if (val !== this._value) {
|
428 | this._value = val;
|
429 | }
|
430 | };
|
431 | InputComponent.prototype.registerOnChange = function (fn) {
|
432 | this.onChangeCallback = fn;
|
433 | };
|
434 | InputComponent.prototype.registerOnTouched = function (fn) {
|
435 | this.onTouchedCallback = fn;
|
436 | };
|
437 | InputComponent.prototype.togglePassword = function () {
|
438 | var _this = this;
|
439 | this.passwordTextVisible = !this.passwordTextVisible;
|
440 | setTimeout(function () {
|
441 | if (_this.passwordTextVisible) {
|
442 | _this.passwordControl.nativeElement.focus();
|
443 | }
|
444 | else {
|
445 | _this.element.nativeElement.focus();
|
446 | }
|
447 | });
|
448 | };
|
449 | InputComponent.prototype.setDisabledState = function (isDisabled) {
|
450 | this.disabled = isDisabled;
|
451 | };
|
452 | InputComponent.ctorParameters = function () { return [
|
453 | { type: ChangeDetectorRef }
|
454 | ]; };
|
455 | __decorate([
|
456 | Input()
|
457 | ], InputComponent.prototype, "id", void 0);
|
458 | __decorate([
|
459 | Input()
|
460 | ], InputComponent.prototype, "name", void 0);
|
461 | __decorate([
|
462 | Input()
|
463 | ], InputComponent.prototype, "label", void 0);
|
464 | __decorate([
|
465 | Input()
|
466 | ], InputComponent.prototype, "type", void 0);
|
467 | __decorate([
|
468 | Input()
|
469 | ], InputComponent.prototype, "hint", void 0);
|
470 | __decorate([
|
471 | Input()
|
472 | ], InputComponent.prototype, "error", void 0);
|
473 | __decorate([
|
474 | Input()
|
475 | ], InputComponent.prototype, "blocked", void 0);
|
476 | __decorate([
|
477 | Input()
|
478 | ], InputComponent.prototype, "success", void 0);
|
479 | __decorate([
|
480 | Input()
|
481 | ], InputComponent.prototype, "placeholder", void 0);
|
482 | __decorate([
|
483 | Input()
|
484 | ], InputComponent.prototype, "disabled", void 0);
|
485 | __decorate([
|
486 | Input()
|
487 | ], InputComponent.prototype, "tabindex", void 0);
|
488 | __decorate([
|
489 | Input()
|
490 | ], InputComponent.prototype, "search", void 0);
|
491 | __decorate([
|
492 | Input()
|
493 | ], InputComponent.prototype, "showSuccess", void 0);
|
494 | __decorate([
|
495 | Input()
|
496 | ], InputComponent.prototype, "righttext", void 0);
|
497 | __decorate([
|
498 | Input()
|
499 | ], InputComponent.prototype, "toolmsg", void 0);
|
500 | __decorate([
|
501 | Input()
|
502 | ], InputComponent.prototype, "pattern", void 0);
|
503 | __decorate([
|
504 | Input()
|
505 | ], InputComponent.prototype, "noneditable", void 0);
|
506 | __decorate([
|
507 | Input()
|
508 | ], InputComponent.prototype, "min", void 0);
|
509 | __decorate([
|
510 | Input()
|
511 | ], InputComponent.prototype, "max", void 0);
|
512 | __decorate([
|
513 | Input()
|
514 | ], InputComponent.prototype, "minlength", void 0);
|
515 | __decorate([
|
516 | Input()
|
517 | ], InputComponent.prototype, "maxlength", void 0);
|
518 | __decorate([
|
519 | Input()
|
520 | ], InputComponent.prototype, "required", void 0);
|
521 | __decorate([
|
522 | Input()
|
523 | ], InputComponent.prototype, "requiredIndicator", void 0);
|
524 | __decorate([
|
525 | Input()
|
526 | ], InputComponent.prototype, "tooltip", void 0);
|
527 | __decorate([
|
528 | Input()
|
529 | ], InputComponent.prototype, "passwordToggleEnabled", void 0);
|
530 | __decorate([
|
531 | Input()
|
532 | ], InputComponent.prototype, "passwordTextVisible", void 0);
|
533 | __decorate([
|
534 | Input()
|
535 | ], InputComponent.prototype, "autoSelect", void 0);
|
536 | __decorate([
|
537 | Input()
|
538 | ], InputComponent.prototype, "autofocus", void 0);
|
539 | __decorate([
|
540 | Input()
|
541 | ], InputComponent.prototype, "autocomplete", void 0);
|
542 | __decorate([
|
543 | Input()
|
544 | ], InputComponent.prototype, "autocorrect", void 0);
|
545 | __decorate([
|
546 | Input()
|
547 | ], InputComponent.prototype, "spellcheck", void 0);
|
548 | __decorate([
|
549 | Output()
|
550 | ], InputComponent.prototype, "change", void 0);
|
551 | __decorate([
|
552 | Output()
|
553 | ], InputComponent.prototype, "blur", void 0);
|
554 | __decorate([
|
555 | Output()
|
556 | ], InputComponent.prototype, "focus", void 0);
|
557 | __decorate([
|
558 | Output()
|
559 | ], InputComponent.prototype, "keyup", void 0);
|
560 | __decorate([
|
561 | Output()
|
562 | ], InputComponent.prototype, "click", void 0);
|
563 | __decorate([
|
564 | HostBinding('class')
|
565 | ], InputComponent.prototype, "getHostCssClasses", void 0);
|
566 | __decorate([
|
567 | HostBinding('class.ng-dirty')
|
568 | ], InputComponent.prototype, "focusedOrDirty", null);
|
569 | __decorate([
|
570 | HostBinding('class.ng-touched')
|
571 | ], InputComponent.prototype, "isTouched", null);
|
572 | __decorate([
|
573 | ViewChild('inputControl')
|
574 | ], InputComponent.prototype, "inputControl", void 0);
|
575 | __decorate([
|
576 | ViewChild('inputModel')
|
577 | ], InputComponent.prototype, "inputModel", void 0);
|
578 | __decorate([
|
579 | ViewChild('textareaControl')
|
580 | ], InputComponent.prototype, "textareaControl", void 0);
|
581 | __decorate([
|
582 | ViewChild('passwordControl')
|
583 | ], InputComponent.prototype, "passwordControl", void 0);
|
584 | InputComponent = __decorate([
|
585 | Component({
|
586 | selector: 'nitrozen-input',
|
587 | providers: [INPUT_VALUE_ACCESSOR, INPUT_VALIDATORS],
|
588 | encapsulation: ViewEncapsulation.None,
|
589 | animations: [
|
590 | trigger('labelState', [
|
591 | state('inside', style({
|
592 | 'font-size': '1em',
|
593 | top: '0'
|
594 | })),
|
595 | state('outside', style({
|
596 | 'font-size': '.7rem',
|
597 | top: '-15px'
|
598 | })),
|
599 | transition('inside => outside', animate('150ms ease-out')),
|
600 | transition('outside => inside', animate('150ms ease-out'))
|
601 | ]),
|
602 | trigger('underlineState', [
|
603 | state('collapsed', style({
|
604 | width: '0%'
|
605 | })),
|
606 | state('expanded', style({
|
607 | width: '100%'
|
608 | })),
|
609 | transition('collapsed => expanded', animate('150ms ease-out')),
|
610 | transition('expanded => collapsed', animate('150ms ease-out'))
|
611 | ])
|
612 | ],
|
613 | template: "<div class=\"nitro-input-wrap\" [ngClass]=\"{'input-noneditable':noneditable}\">\n <div class=\"ngx-input-flex-wrap\">\n \n <div class=\"nitro-input-flex-wrap-inner\">\n <div class=\"nitro-input-box-wrap\">\n <div class=\"prefix-icon\">\n <ng-content select=\"nitrozen-input-prefix\"></ng-content>\n </div>\n <textarea [ngClass]=\"{'search-txt': search }\"\n *ngIf=\"type === 'textarea'\"\n class=\"ngx-input-textarea\"\n rows=\"1\"\n autosize\n [(ngModel)]=\"value\"\n [id]=\"id\"\n [name]=\"name\"\n [pattern]=\"pattern\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [attr.tabindex]=\"tabindex\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.autocorrect]=\"autocorrect\"\n [attr.spellcheck]=\"spellcheck\"\n [minlength]=\"minlength\"\n [maxlength]=\"maxlength\"\n [required]=\"required\"\n (change)=\"onChange($event)\"\n (keyup)=\"onKeyUp($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (click)=\"click.emit($event)\"\n #inputModel=\"ngModel\"\n #textareaControl\n >\n </textarea>\n <input [ngClass]=\"{'search-txt': search,'blocked':blocked }\"\n *ngIf=\"type !== 'textarea'\"\n class=\"ngx-input-box\"\n [(ngModel)]=\"value\"\n [hidden]=\"passwordTextVisible\"\n [id]=\"id\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [type]=\"type\"\n [pattern]=\"pattern\"\n [min]=\"'' + min\"\n [max]=\"'' + max\"\n [minlength]=\"minlength\"\n [maxlength]=\"maxlength\"\n [attr.tabindex]=\"tabindex\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.autocorrect]=\"autocorrect\"\n [attr.spellcheck]=\"spellcheck\"\n (change)=\"onChange($event)\"\n (keyup)=\"onKeyUp($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (click)=\"click.emit($event)\"\n [required]=\"required\"\n #inputModel=\"ngModel\"\n #inputControl\n />\n <input [ngClass]=\"{'search-txt': search }\"\n *ngIf=\"passwordToggleEnabled\"\n [hidden]=\"!passwordTextVisible\"\n type=\"text\"\n class=\"ngx-input-box\"\n type=\"text\"\n [id]=\"id + '-password'\"\n [placeholder]=\"placeholder\"\n [name]=\"name\"\n [pattern]=\"pattern\"\n [disabled]=\"disabled\"\n [minlength]=\"minlength\"\n [maxlength]=\"maxlength\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.autocorrect]=\"autocorrect\"\n [attr.spellcheck]=\"spellcheck\"\n [attr.tabindex]=\"tabindex\"\n [(ngModel)]=\"value\"\n (change)=\"onChange($event)\"\n (keyup)=\"onKeyUp($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (click)=\"click.emit($event)\"\n [required]=\"required\"\n #inputTextModel=\"ngModel\"\n #passwordControl\n />\n <span\n *ngIf=\"type === 'password' && passwordToggleEnabled\"\n class=\"icon-eye\"\n title=\"Toggle Text Visibility\"\n (click)=\"togglePassword()\"\n >\n </span>\n <div class=\"nitro-input-label\">\n <span [innerHTML]=\"label\"></span> <span class=\"required-indicator\" [innerHTML]=\"requiredIndicatorView\"></span>\n <span class=\"nitro-tool\" [matTooltipPosition]=\"'above'\" matTooltipClass='input-tooltip' matTooltip=\"{{toolmsg}}\" [hidden]=\"!tooltip\"> <img src=\"../../../assets/icons/tooltip.svg\"></span>\n </div>\n <div class=\"suffix-icon\">\n <ng-content select=\"nitrozen-input-suffix\"></ng-content>\n </div>\n </div>\n \n </div>\n \n </div>\n <!-- <div class=\"ngx-input-underline\">\n <div class=\"underline-fill\"></div>\n </div> -->\n <div class=\"ngx-input-hint\" *ngIf=\"hint\">\n <!-- <ng-content select=\"ngx-input-hint\"></ng-content> -->\n <span [innerHTML]=\"hint\"></span>\n </div>\n <div class=\"nitro-cmp\">\n <div>\n <div class=\"nitro-input-error\" [ngClass]=\"{'is-focused':focused}\" *ngIf=\"error\">\n <!-- <ng-content select=\"ngx-input-hint\"></ng-content> -->\n <span [innerHTML]=\"error\"></span>\n </div>\n <div class=\"nitro-input-success\" *ngIf=\"success\">\n <!-- <ng-content select=\"ngx-input-hint\"></ng-content> -->\n <div class=\"nito-ss-img\" *ngIf=\"showSuccess\">\n <img src=\"../../../assets/icons/check-circle.svg\">\n </div>\n <div class=\"ss-txt\" *ngIf=\"showSuccess\">\n <span [innerHTML]=\"success\"></span>\n </div>\n </div>\n </div>\n <div class=\"ngx-input-hint\" *ngIf=\"righttext\">\n <span [innerHTML]=\"righttext\"></span>\n </div>\n </div>\n </div>\n\n\n\n",
|
614 | styles: [".nitro-input-label{color:#9b9b9b;font-family:Poppins;font-size:12px;font-weight:500;line-height:21px;padding-bottom:4px}.nitro-tool{width:24px;height:24px;text-align:center;padding-left:4px}.input-noneditable{opacity:.4;pointer-events:none}input{height:36px;border:1px solid #d7d7d7;border-radius:4px;background-color:#fff;outline:0;color:#41434c;font-family:Poppins;font-size:14px;line-height:21px;padding-left:12px;width:100%}input:focus{box-shadow:none;border:1px solid #5c6bdd!important;border-radius:3px;background-color:#fff}input:focus+.nitro-input-label{color:#5c6bdd!important;font-weight:600!important}.is-focused{display:none!important}.nitro-cmp{display:flex;justify-content:space-between}textarea{box-sizing:border-box;height:96px;border:1px solid #d7d7d7;border-radius:4px;background-color:#fff;outline:0;color:#41434c;font-family:Poppins;font-size:14px;line-height:21px;padding-left:12px;padding-top:6px;width:100%}textarea:focus{box-shadow:none;border:1px solid #5c6bdd;border-radius:3px;background-color:#fff}textarea:focus+.nitro-input-label{color:#5c6bdd}.ss-txt{padding-left:5px}.suffix-icon{position:absolute;right:0;top:35px;width:24px;height:24px;text-align:center;cursor:pointer}.nito-ss-img{line-height:28px}.blocked{background-color:#f3f3f3;pointer-events:none}.prefix-icon{position:absolute;left:5px;top:35px;width:24px;height:24px;text-align:center}.search-txt{padding-left:35px;width:97.5%!important}.nitro-input-box-wrap{display:flex;position:relative;flex-direction:column-reverse}::-webkit-input-placeholder{color:#a4a4a4;font-family:Poppins;font-size:12px;line-height:21px}::-moz-placeholder{color:#a4a4a4;font-family:Poppins;font-size:12px;line-height:21px}::placeholder{color:#a4a4a4;font-family:Poppins;font-size:12px;line-height:21px}:-ms-input-placeholder{color:#a4a4a4;font-family:Poppins;font-size:12px;line-height:21px}::-ms-input-placeholder{color:#a4a4a4;font-family:Poppins;font-size:12px;line-height:21px}.nitro-input-flex-wrap-inner{padding-top:4px}.ngx-input{width:100%}.ngx-input ngx-input-prefix{margin-right:8px}.ngx-input ngx-input-suffix{margin-left:8px}.ngx-input .nitro-input-wrap .ngx-input-box-wrap{position:relative;width:100%}.ngx-input .nitro-input-wrap .ngx-input-box-wrap:focus{outline:0}.ngx-input .nitro-input-wrap .ngx-input-box-wrap .ngx-input-box,.ngx-input .nitro-input-wrap .ngx-input-box-wrap .ngx-input-textarea{height:40px;border:1px solid #d7d7d7;border-radius:4px;background-color:#fff;outline:0;color:#41434c;font-family:Poppins;font-size:14px;line-height:21px;padding-left:12px;width:100%}.ngx-input .nitro-input-wrap .ngx-input-box-wrap .ngx-input-box:focus,.ngx-input .nitro-input-wrap .ngx-input-box-wrap .ngx-input-textarea:focus{box-shadow:none;border:1px solid #5c6bdd!important;border-radius:3px;background-color:#fff}.ngx-input .nitro-input-wrap .ngx-input-box-wrap .ngx-input-box[disabled],.ngx-input .nitro-input-wrap .ngx-input-box-wrap .ngx-input-textarea[disabled]{color:grey;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ngx-input .nitro-input-wrap .ngx-input-box-wrap .ngx-input-box{margin:3px 0}.ngx-input .nitro-input-wrap .ngx-input-box-wrap .ngx-input-textarea{resize:none}.ngx-input .nitro-input-wrap .ngx-input-box-wrap .icon-eye{line-height:25px;top:0;bottom:0;position:absolute;right:10px;cursor:pointer;font-size:.8rem;color:#00f;transition:color .1s}.ngx-input .nitro-input-wrap .ngx-input-box-wrap .icon-eye:hover{color:red}.ngx-input .nitro-input-wrap .ngx-input-label{pointer-events:none;position:absolute;font-size:16px}.ngx-input .nitro-input-wrap .ngx-input-underline{width:100%;height:1px;background-color:#ff0}.ngx-input .nitro-input-wrap .ngx-input-underline .underline-fill{background-color:#00f;width:100%;height:2px;margin:0 auto}.ngx-input .nitro-input-wrap .nitro-input-error{display:none}.ngx-input .nitro-input-wrap .ngx-input-hint{color:#9b9b9b;font-family:Poppins;font-size:12px;font-weight:500;line-height:21px;padding-top:4px}.ngx-input .nitro-input-wrap .nitro-input-success{color:#36cc9b;font-family:Poppins;font-size:12px;line-height:21px;display:flex;padding-top:4px}.ngx-input.invalid.ng-touched .ngx-input-box,.ngx-input.invalid.ng-touched .ngx-input-textarea,.ngx-input.ng-invalid.ng-dirty .ngx-input-box,.ngx-input.ng-invalid.ng-dirty .ngx-input-textarea,.ngx-input.ng-invalid.ng-touched .ngx-input-box,.ngx-input.ng-invalid.ng-touched .ngx-input-textarea{border:1px solid #fa3f4d}.ngx-input.invalid.ng-touched .nitro-input-label,.ngx-input.ng-invalid.ng-dirty .nitro-input-label,.ngx-input.ng-invalid.ng-touched .nitro-input-label{font-weight:600;color:#fa3f4d}.ngx-input.invalid.ng-touched .ngx-input-hint,.ngx-input.ng-invalid.ng-dirty .ngx-input-hint,.ngx-input.ng-invalid.ng-touched .ngx-input-hint{color:#fa3f4d;display:none}.ngx-input.invalid.ng-touched .nitro-input-error,.ngx-input.ng-invalid.ng-dirty .nitro-input-error,.ngx-input.ng-invalid.ng-touched .nitro-input-error{display:block;color:#fa3f4d;font-family:Poppins;font-size:12px;line-height:18px;padding-top:4px}.ngx-input.invalid.ng-touched .nitro-input-success,.ngx-input.ng-invalid.ng-dirty .nitro-input-success,.ngx-input.ng-invalid.ng-touched .nitro-input-success{display:none}"]
|
615 | })
|
616 | ], InputComponent);
|
617 | return InputComponent;
|
618 | }());
|
619 |
|
620 | var InputSuffixComponent = (function () {
|
621 | function InputSuffixComponent() {
|
622 | }
|
623 | InputSuffixComponent = __decorate([
|
624 | Component({
|
625 | selector: 'nitrozen-input-suffix',
|
626 | template: "\n <ng-content></ng-content>\n "
|
627 | })
|
628 | ], InputSuffixComponent);
|
629 | return InputSuffixComponent;
|
630 | }());
|
631 |
|
632 | var InputPrefixComponent = (function () {
|
633 | function InputPrefixComponent() {
|
634 | }
|
635 | InputPrefixComponent = __decorate([
|
636 | Component({
|
637 | selector: 'nitrozen-input-prefix',
|
638 | template: "\n <ng-content></ng-content>\n "
|
639 | })
|
640 | ], InputPrefixComponent);
|
641 | return InputPrefixComponent;
|
642 | }());
|
643 |
|
644 | var InputModule = (function () {
|
645 | function InputModule() {
|
646 | }
|
647 | InputModule = __decorate([
|
648 | NgModule({
|
649 | declarations: [InputComponent, InputSuffixComponent, InputPrefixComponent],
|
650 | imports: [
|
651 | CommonModule,
|
652 | MatInputModule,
|
653 | MatProgressSpinnerModule,
|
654 | FormsModule,
|
655 | ReactiveFormsModule,
|
656 | MatSlideToggleModule,
|
657 | MatTooltipModule
|
658 | ],
|
659 | exports: [
|
660 | InputComponent,
|
661 | InputSuffixComponent,
|
662 | InputPrefixComponent,
|
663 | MatInputModule,
|
664 | FormsModule,
|
665 | ReactiveFormsModule,
|
666 | MatProgressSpinnerModule,
|
667 | MatSlideToggleModule,
|
668 | MatTooltipModule
|
669 | ]
|
670 | })
|
671 | ], InputModule);
|
672 | return InputModule;
|
673 | }());
|
674 |
|
675 | var SelectComponent = (function () {
|
676 | function SelectComponent() {
|
677 | }
|
678 | SelectComponent.prototype.ngOnInit = function () {
|
679 | };
|
680 | SelectComponent = __decorate([
|
681 | Component({
|
682 | selector: 'app-select',
|
683 | template: "<p>\n select works!\n</p>\n",
|
684 | styles: [""]
|
685 | })
|
686 | ], SelectComponent);
|
687 | return SelectComponent;
|
688 | }());
|
689 |
|
690 | var SelectModule = (function () {
|
691 | function SelectModule() {
|
692 | }
|
693 | SelectModule = __decorate([
|
694 | NgModule({
|
695 | declarations: [SelectComponent],
|
696 | imports: [
|
697 | CommonModule
|
698 | ]
|
699 | })
|
700 | ], SelectModule);
|
701 | return SelectModule;
|
702 | }());
|
703 |
|
704 | var SearchableSelectComponent = (function () {
|
705 | function SearchableSelectComponent() {
|
706 | this.destroy$ = new Subject();
|
707 | this.selectCtrl = new FormControl();
|
708 | this.selectFilterCtrl = new FormControl();
|
709 | this.customClass = '';
|
710 | this.isColumnHeader = true;
|
711 | this.placeholder = "Select";
|
712 | this.label = this.placeholder;
|
713 | this.displayName = "name";
|
714 | this.id = "id";
|
715 | this.isMultiple = false;
|
716 | this.isSearch = true;
|
717 | this.change = new EventEmitter();
|
718 | this.optionListObject = {};
|
719 | }
|
720 | SearchableSelectComponent.prototype.ngOnInit = function () {
|
721 | var _this = this;
|
722 | this.filteredoptions = this.options;
|
723 | this.selectCtrl.setValue(this.value);
|
724 | this.options.forEach(function (option) {
|
725 | _this.optionListObject[option[_this.id]] = option;
|
726 | });
|
727 | this.selectFilterCtrl.valueChanges.pipe(takeUntil(this.destroy$))
|
728 | .subscribe(function () {
|
729 | _this.filterOptions();
|
730 | });
|
731 | this.selectCtrl.valueChanges.pipe(takeUntil(this.destroy$))
|
732 | .subscribe(function (event) {
|
733 | if (!_this.isMultiple) {
|
734 | _this.change.emit({
|
735 | value: _this.selectCtrl.value,
|
736 | objectValue: _this.optionListObject[_this.selectCtrl.value]
|
737 | });
|
738 | }
|
739 | });
|
740 | };
|
741 | SearchableSelectComponent.prototype.ngOnChanges = function (event) {
|
742 | var _this = this;
|
743 | if (event.value) {
|
744 | this.selectCtrl.setValue(event.value.currentValue, { emitEvent: false });
|
745 | }
|
746 | if (event.options) {
|
747 | this.options = event.options.currentValue;
|
748 | this.filteredoptions = this.options;
|
749 | this.options.forEach(function (option) {
|
750 | _this.optionListObject[option[_this.id]] = option;
|
751 | });
|
752 | }
|
753 | };
|
754 | SearchableSelectComponent.prototype.submitOptions = function () {
|
755 | var objectValue = this.getArrayValueObjects(this.selectCtrl.value);
|
756 | this.change.emit({
|
757 | value: this.selectCtrl.value,
|
758 | objectValue: objectValue
|
759 | });
|
760 | this.select.close();
|
761 | };
|
762 | SearchableSelectComponent.prototype.clearOptions = function () {
|
763 | this.selectCtrl.setValue([]);
|
764 | this.change.emit({
|
765 | value: [],
|
766 | objectValue: []
|
767 | });
|
768 | this.select.close();
|
769 | };
|
770 | SearchableSelectComponent.prototype.getArrayValueObjects = function (value) {
|
771 | var _this = this;
|
772 | var objectValue = [];
|
773 | value.forEach(function (selectedValue) {
|
774 | objectValue.push(_this.optionListObject[selectedValue]);
|
775 | });
|
776 | return objectValue;
|
777 | };
|
778 | SearchableSelectComponent.prototype.filterOptions = function () {
|
779 | var _this = this;
|
780 | if (!this.options) {
|
781 | return;
|
782 | }
|
783 |
|
784 | var search = this.selectFilterCtrl.value;
|
785 | if (!search) {
|
786 | this.filteredoptions = this.options.slice();
|
787 | return;
|
788 | }
|
789 | else {
|
790 | search = search.toLowerCase();
|
791 | }
|
792 |
|
793 | this.filteredoptions = this.options.filter(function (option) { return option[_this.displayName].toLowerCase().indexOf(search) > -1; });
|
794 | };
|
795 | SearchableSelectComponent.prototype.selectAllChanged = function (event) {
|
796 |
|
797 | };
|
798 | __decorate([
|
799 | ViewChild('select')
|
800 | ], SearchableSelectComponent.prototype, "select", void 0);
|
801 | __decorate([
|
802 | Input()
|
803 | ], SearchableSelectComponent.prototype, "customClass", void 0);
|
804 | __decorate([
|
805 | Input()
|
806 | ], SearchableSelectComponent.prototype, "isColumnHeader", void 0);
|
807 | __decorate([
|
808 | Input()
|
809 | ], SearchableSelectComponent.prototype, "placeholder", void 0);
|
810 | __decorate([
|
811 | Input()
|
812 | ], SearchableSelectComponent.prototype, "label", void 0);
|
813 | __decorate([
|
814 | Input()
|
815 | ], SearchableSelectComponent.prototype, "value", void 0);
|
816 | __decorate([
|
817 | Input()
|
818 | ], SearchableSelectComponent.prototype, "options", void 0);
|
819 | __decorate([
|
820 | Input()
|
821 | ], SearchableSelectComponent.prototype, "displayName", void 0);
|
822 | __decorate([
|
823 | Input()
|
824 | ], SearchableSelectComponent.prototype, "id", void 0);
|
825 | __decorate([
|
826 | Input()
|
827 | ], SearchableSelectComponent.prototype, "isMultiple", void 0);
|
828 | __decorate([
|
829 | Input()
|
830 | ], SearchableSelectComponent.prototype, "isSearch", void 0);
|
831 | __decorate([
|
832 | Output()
|
833 | ], SearchableSelectComponent.prototype, "change", void 0);
|
834 | SearchableSelectComponent = __decorate([
|
835 | Component({
|
836 | selector: 'app-select',
|
837 | template: "<div class=\"nitro-div\">\n <mat-form-field [floatLabel]=\"'always'\">\n <mat-label>{{label}}</mat-label>\n\n <mat-select #select [ngClass]=\"select.panelOpen ? 'arrow-top' : 'arrow-bottom'\"[placeholder]=\"placeholder\" [formControl]=\"selectCtrl\" [multiple]=\"isMultiple\" triggerValue=\"Select\" [disableOptionCentering]=\"true\" #select\n [panelClass]=\"isMultiple ? 'nitro-searchable-multiple-select-panel' : 'nitro-searchable-select-panel'\" name=\"form_value\">\n <!-- <mat-select-trigger *ngIf=\"isColumnHeader\">\n <span class=\"place-holder\">\n {{placeholder}}\n </span>\n </mat-select-trigger> -->\n <div class=\"options-container\">\n\n <mat-option *ngIf=\"isSearch\">\n <ngx-mat-select-search [formControl]=\"selectFilterCtrl\" [placeholderLabel]=\"'Search'\"\n [noEntriesFoundLabel]=\"'No match found'\"></ngx-mat-select-search>\n </mat-option>\n <nitrozen-select-check-all *ngIf=\"isMultiple\" [text]=\"''\" [model]=\"selectCtrl\" [values]=\"options\" (change)=\"selectAllChanged($event)\">\n </nitrozen-select-check-all>\n <mat-option *ngFor=\"let option of filteredoptions\" [value]=\"option[id]\">\n {{option[displayName]}}\n </mat-option>\n </div>\n <div class=\"select-action-container\" *ngIf=\"isMultiple\">\n <nitrozen-button-text (clicked)=\"clearOptions()\">Clear</nitrozen-button-text>\n <nitrozen-button-text (clicked)=\"submitOptions()\">Submit</nitrozen-button-text>\n\n </div>\n\n <!-- <app-button [type]=\"'small-success'\" [label]=\"'Submit'\" (click)=\"submitOptions()\">\n <span>Submit</span>\n </app-button>\n <app-button [type]=\"'small-default'\" [label]=\"'Clear'\" (click)=\"clearOptions()\">\n <span>Clear</span>\n </app-button> \n </div> -->\n </mat-select>\n <mat-placeholder class=\"place-holder\">{{placeholder}}</mat-placeholder>\n </mat-form-field>\n <div>{{model}}</div>\n</div>",
|
838 | encapsulation: ViewEncapsulation.None,
|
839 | styles: [".nitro-div ::ng-deep .mat-form-field-underline{display:none}.nitro-div ::ng-deep .mat-select-value-text{height:40px!important;padding-left:25px;line-height:40px!important;font-family:Poppins}.nitro-div ::ng-deep .mat-select{height:40px;background:#fff;border:1px solid #a9a9a9;border-radius:2px;font-family:Poppins}.nitro-div ::ng-deep .mat-form-field-label{line-height:40px!important;padding-left:5px;font-family:Poppins}.nitro-div ::ng-deep .mat-select-trigger{height:40px}.nitro-div .mat-select-disabled{border:none}.nitro-div .mat-select-disabled ::ng-deep .mat-select-trigger{background-color:#e4e5e6;border:1px solid #e4e5e6}.nitro-div .mat-select-disabled ::ng-deep .mat-select-arrow{margin:0 12px!important;color:#bbb!important}.nitro-div .mat-select-disabled ::ng-deep .mat-select-value-text{color:#bbb}.nitro-div ::ng-deep .mat-option{height:40px!important;border-bottom:1px solid;font-family:Poppins}.nitro-div ::ng-deep .mat-option-text{font-family:Poppins}.nitro-div ::ng-deep .mat-select-arrow{margin:0 12px!important;color:#5c6bdd!important}.nitro-div .mat-form-field-can-float.mat-form-field-should-float ::ng-deep .mat-form-field-label{line-height:21px!important;font-size:16px;font-weight:500px}.select-action-container{display:flex;flex-direction:row;justify-content:flex-end;height:60px;border-top:1px solid #e4e5e6;align-items:center}.options-container{max-height:196px;overflow:auto}.arrow-top ::ng-deep .mat-select-arrow{border-bottom:5px solid;border-top:none!important}.arrow-bottom :ng-deep .mat-select-arrow{border-top:5px solid;border-bottom:none!important}"]
|
840 | })
|
841 | ], SearchableSelectComponent);
|
842 | return SearchableSelectComponent;
|
843 | }());
|
844 |
|
845 | var SelectCheckAllComponent = (function () {
|
846 | function SelectCheckAllComponent() {
|
847 | this.values = [];
|
848 | this.text = 'Select All';
|
849 | this.change = new EventEmitter();
|
850 | }
|
851 | SelectCheckAllComponent.prototype.ngOnInit = function () {
|
852 | };
|
853 | SelectCheckAllComponent.prototype.isChecked = function () {
|
854 | return this.model.value && this.values.length
|
855 | && this.model.value.length === this.values.length;
|
856 | };
|
857 | SelectCheckAllComponent.prototype.isIndeterminate = function () {
|
858 | return this.model.value && this.values.length && this.model.value.length
|
859 | && this.model.value.length < this.values.length;
|
860 | };
|
861 | SelectCheckAllComponent.prototype.toggleSelection = function (change) {
|
862 |
|
863 |
|
864 |
|
865 |
|
866 | if (change.checked) {
|
867 | this.model.setValue(this.values);
|
868 | }
|
869 | else {
|
870 | this.model.setValue([]);
|
871 | }
|
872 | };
|
873 | __decorate([
|
874 | Input()
|
875 | ], SelectCheckAllComponent.prototype, "model", void 0);
|
876 | __decorate([
|
877 | Input()
|
878 | ], SelectCheckAllComponent.prototype, "values", void 0);
|
879 | __decorate([
|
880 | Input()
|
881 | ], SelectCheckAllComponent.prototype, "text", void 0);
|
882 | __decorate([
|
883 | Output()
|
884 | ], SelectCheckAllComponent.prototype, "change", void 0);
|
885 | SelectCheckAllComponent = __decorate([
|
886 | Component({
|
887 | selector: 'nitrozen-select-check-all',
|
888 | template: "<mat-checkbox class=\"mat-option\" [disableRipple]=\"true\" [indeterminate]=\"isIndeterminate()\" [checked]=\"isChecked()\"\n (click)=\"$event.stopPropagation()\" (change)=\"toggleSelection($event)\">\n {{text}}\n</mat-checkbox>",
|
889 | styles: ['']
|
890 | })
|
891 | ], SelectCheckAllComponent);
|
892 | return SelectCheckAllComponent;
|
893 | }());
|
894 |
|
895 | var SearchableSelectModule = (function () {
|
896 | function SearchableSelectModule() {
|
897 | }
|
898 | SearchableSelectModule = __decorate([
|
899 | NgModule({
|
900 | declarations: [SearchableSelectComponent, SelectCheckAllComponent],
|
901 | imports: [
|
902 | CommonModule, MatSelectModule, FormsModule, ReactiveFormsModule, NgxMatSelectSearchModule, MatCheckboxModule, ButtonTextModule
|
903 | ],
|
904 | exports: [SearchableSelectComponent, MatSelectModule, SelectCheckAllComponent, MatCheckboxModule]
|
905 | })
|
906 | ], SearchableSelectModule);
|
907 | return SearchableSelectModule;
|
908 | }());
|
909 |
|
910 | var CustomSnackbarComponent = (function () {
|
911 | function CustomSnackbarComponent(snackBarRef, data) {
|
912 | this.snackBarRef = snackBarRef;
|
913 | this.data = data;
|
914 | }
|
915 | CustomSnackbarComponent.ctorParameters = function () { return [
|
916 | { type: MatSnackBarRef },
|
917 | { type: undefined, decorators: [{ type: Inject, args: [MAT_SNACK_BAR_DATA,] }] }
|
918 | ]; };
|
919 | CustomSnackbarComponent = __decorate([
|
920 | Component({
|
921 | selector: 'custom-snackbar',
|
922 | template: "\n <div class=\"flex\" style=\"display: flex;\n justify-content: space-between;align-items: center;\">\n <div class=\"data\" style=\"white-space: pre-line;\">{{data.data}}</div>\n <div class=\"dismiss\" style=\"cursor:pointer;align-items: center;\n display: flex;\" *ngIf=\"data.hasIcon\">\n <mat-icon (click)=\"snackBarRef.dismiss()\">close</mat-icon>\n </div>\n <div class=\"dismiss\" style=\"cursor:pointer;line-height: 40px;\" *ngIf=\"!data.hasIcon\">\n <div *ngIf=\"data.text\">{{data.text}}</div>\n </div>\n</div>\n\n "
|
923 | }),
|
924 | __param(1, Inject(MAT_SNACK_BAR_DATA))
|
925 | ], CustomSnackbarComponent);
|
926 | return CustomSnackbarComponent;
|
927 | }());
|
928 |
|
929 | var SnackBarComponent = (function () {
|
930 | function SnackBarComponent() {
|
931 | }
|
932 | SnackBarComponent.prototype.ngOnInit = function () {
|
933 | };
|
934 | SnackBarComponent = __decorate([
|
935 | Component({
|
936 | selector: 'nitrozen-snack-bar',
|
937 | template: "\n <ng-content></ng-content>\n ",
|
938 | styles: ["::ng-deep .text-snackbar{border-radius:3px;background-color:#5c6bdd!important;color:#fff;font-family:Poppins;font-size:14px;font-weight:400;line-height:21px}.btn-space{display:flex;justify-content:space-evenly;padding-top:30px}::ng-deep .success-snackbar{border-radius:3px;background-color:#00c851;color:#fff;font-family:Poppins;font-size:14px;font-weight:400;line-height:21px}::ng-deep .error-snackbar{border-radius:3px;background-color:#fa3f4d;color:#fff;font-family:Poppins;font-size:14px;font-weight:400;line-height:21px}"]
|
939 | })
|
940 | ], SnackBarComponent);
|
941 | return SnackBarComponent;
|
942 | }());
|
943 |
|
944 | var ɵ0 = {};
|
945 | var SnackBarModule = (function () {
|
946 | function SnackBarModule() {
|
947 | }
|
948 | SnackBarModule = __decorate([
|
949 | NgModule({
|
950 | declarations: [SnackBarComponent, CustomSnackbarComponent],
|
951 | imports: [
|
952 | CommonModule,
|
953 | MatIconModule
|
954 | ],
|
955 | exports: [
|
956 | SnackBarComponent,
|
957 | CustomSnackbarComponent,
|
958 | MatIconModule
|
959 | ],
|
960 | providers: [{ provide: MAT_SNACK_BAR_DATA, useValue: ɵ0 }],
|
961 | entryComponents: [
|
962 | CustomSnackbarComponent
|
963 | ]
|
964 | })
|
965 | ], SnackBarModule);
|
966 | return SnackBarModule;
|
967 | }());
|
968 |
|
969 | var VerticalTabsComponent = (function () {
|
970 | function VerticalTabsComponent() {
|
971 | this.change = new EventEmitter();
|
972 | }
|
973 | VerticalTabsComponent.prototype.ngOnInit = function () {
|
974 | };
|
975 | VerticalTabsComponent.prototype.handleChange = function (obj) {
|
976 | console.log(obj);
|
977 | this.change.emit(obj);
|
978 | };
|
979 | __decorate([
|
980 | Input()
|
981 | ], VerticalTabsComponent.prototype, "tab", void 0);
|
982 | __decorate([
|
983 | Output()
|
984 | ], VerticalTabsComponent.prototype, "change", void 0);
|
985 | VerticalTabsComponent = __decorate([
|
986 | Component({
|
987 | selector: 'nitrozen-vertical-tabs',
|
988 | template: "<div class=\"tabordion\">\n <section *ngFor=\"let tb of tab; let i = index\">\n <input type=\"radio\" name=\"sections\" id=\"option{{i}}\" [checked]=\"tb.checked\" (change)=\"handleChange(tb)\">\n <label for=\"option{{i}}\">\n \t<div class=\"tab-sls\">\n \t\t<div class=\"tab-select\">\n \t\t<img class=\"img-tabs\" src=\"../../../assets/icons/tab_selected_icon.svg\">\n \t</div>\n \t<div class=\"tab-unselect\">\n \t\t<img class=\"img-tabs\" src=\"../../../assets/icons/tab_unselected.svg\">\n \t</div>\n\n \t<div class=\"text-tabs\">{{tb.name}}</div>\n \t</div>\n \t</label>\n <!-- <article>\n <p>{{tb.name}}</p>\n </article> -->\n </section>\n<!-- <section id=\"section2\">\n <input type=\"radio\" name=\"sections\" id=\"option2\">\n <label for=\"option2\">\n \t<div class=\"tab-sls\">\n \t\t<div class=\"tab-select\">\n \t\t<img class=\"img-tabs\" src=\"../../../assets/icons/tab_selected_icon.svg\">\n \t</div>\n \t<div class=\"tab-unselect\">\n \t\t<img class=\"img-tabs\" src=\"../../../assets/icons/tab_unselected.svg\">\n \t</div>\n\n \t<div class=\"text-tabs\">Catalog Portfolio</div>\n \t</div>\n </label>\n <article>\n <p>Catalog Portfolio</p>\n </article>\n </section>\n <section id=\"section3\">\n <input type=\"radio\" name=\"sections\" id=\"option3\">\n <label for=\"option3\">\n \t<div class=\"tab-sls\">\n \t\t<div class=\"tab-select\">\n \t\t<img class=\"img-tabs\" src=\"../../../assets/icons/tab_selected_icon.svg\">\n \t</div>\n \t<div class=\"tab-unselect\">\n \t\t<img class=\"img-tabs\" src=\"../../../assets/icons/tab_unselected.svg\">\n \t</div>\n\n \t<div class=\"text-tabs\">Business Profile</div>\n \t</div>\n </label>\n <article>\n <p>Business Profile</p>\n </article>\n </section>\n <section id=\"section4\">\n <input type=\"radio\" name=\"sections\" id=\"option4\">\n <label for=\"option4\">\n \t<div class=\"tab-sls\">\n \t\t<div class=\"tab-select\">\n \t\t<img class=\"img-tabs\" src=\"../../../assets/icons/tab_selected_icon.svg\">\n \t</div>\n \t<div class=\"tab-unselect\">\n \t\t<img class=\"img-tabs\" src=\"../../../assets/icons/tab_unselected.svg\">\n \t</div>\n\n \t<div class=\"text-tabs\">KYC & Bank Details</div>\n \t</div>\n </label>\n <article>\n <p>KYC & Bank Details</p>\n </article>\n </section>\n <section id=\"section5\">\n <input type=\"radio\" name=\"sections\" id=\"option5\">\n <label for=\"option5\">\n \t<div class=\"tab-sls\">\n \t\t<div class=\"tab-select\">\n \t\t<img class=\"img-tabs\" src=\"../../../assets/icons/tab_selected_icon.svg\">\n \t</div>\n \t<div class=\"tab-unselect\">\n \t\t<img class=\"img-tabs\" src=\"../../../assets/icons/tab_unselected.svg\">\n \t</div>\n\n \t<div class=\"text-tabs\">Agreement</div>\n \t</div>\n </label>\n <article>\n <p>Agreement</p>\n </article>\n </section> -->\n</div>",
|
989 | styles: [".tabordion{display:block;font-family:Poppins;margin:auto;position:relative}.tabordion input[name=sections]{left:-9999px;position:absolute;top:-9999px}.tabordion section{display:block}.tabordion section label{cursor:pointer;display:block;padding:15px 20px;position:relative;max-width:280px;border-radius:3px;width:200px;z-index:100;border:1px solid #e4e5e6;margin-bottom:10px;color:#41434c;font-family:Poppins;font-size:16px;font-weight:500;line-height:25px}.tabordion section label .tab-select{display:none}.tabordion section label .tab-unselect{display:block}.tabordion section article{display:none;left:230px;min-width:300px;padding:0 0 0 21px;position:absolute;top:0}.tabordion section article:after{bottom:0;content:\"\";display:block;left:-229px;position:absolute;top:0;width:220px;z-index:1}.tabordion input[name=sections]:checked+label{color:#5c6bdd;font-family:Poppins;font-size:16px;border:1px solid #fff}.tabordion input[name=sections]:checked+label .tab-select{display:block}.tabordion input[name=sections]:checked+label .tab-unselect{display:none}.tabordion input[name=sections]:checked~article{display:block}.tab-select{height:24px;width:24px}.img-tabs{padding-top:2px}.text-tabs{padding-left:12px}.tab-unselect{height:24px;width:24px}@media (max-width:533px){.tabordion,h1{width:100%}.tabordion section label{font-size:1em;width:160px}.tabordion section article{left:200px;min-width:270px}.tabordion section article:after{bottom:0;content:\"\";display:block;left:-199px;position:absolute;top:0;width:200px}}.tab-sls{display:flex}@media (max-width:768px){.tabordion,h1{width:96%}}@media (min-width:1366px){.tabordion,h1{width:70%}}@media (min-width:1824px){.tabordion,h1{width:100%}}"]
|
990 | })
|
991 | ], VerticalTabsComponent);
|
992 | return VerticalTabsComponent;
|
993 | }());
|
994 |
|
995 | var VerticalTabsModule = (function () {
|
996 | function VerticalTabsModule() {
|
997 | }
|
998 | VerticalTabsModule = __decorate([
|
999 | NgModule({
|
1000 | declarations: [VerticalTabsComponent],
|
1001 | imports: [
|
1002 | CommonModule
|
1003 | ],
|
1004 | exports: [
|
1005 | VerticalTabsComponent
|
1006 | ],
|
1007 | schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
1008 | })
|
1009 | ], VerticalTabsModule);
|
1010 | return VerticalTabsModule;
|
1011 | }());
|
1012 |
|
1013 | var TabsComponent = (function () {
|
1014 | function TabsComponent() {
|
1015 | this.change = new EventEmitter();
|
1016 | }
|
1017 | TabsComponent.prototype.ngOnInit = function () {
|
1018 | };
|
1019 | TabsComponent.prototype.handleChange = function (obj) {
|
1020 | console.log(obj);
|
1021 | this.change.emit(obj);
|
1022 | };
|
1023 | __decorate([
|
1024 | Input()
|
1025 | ], TabsComponent.prototype, "tab", void 0);
|
1026 | __decorate([
|
1027 | Output()
|
1028 | ], TabsComponent.prototype, "change", void 0);
|
1029 | TabsComponent = __decorate([
|
1030 | Component({
|
1031 | selector: 'nitrozen-tabs',
|
1032 | template: "<div>\n<div class=\"tab-ordion\">\n <section *ngFor=\"let tb of tab; let i = index\">\n <input type=\"radio\" name=\"sections\" id=\"option{{i}}\" [checked]=\"tb.checked\" (change)=\"handleChange(tb)\">\n <label for=\"option{{i}}\">\n \t<div class=\"text-tabs\">{{tb.name}}</div>\n \t</label>\n </section>\n</div>\n</div>",
|
1033 | styles: [".tab-ordion{display:flex;font-family:Poppins;position:relative;justify-content:space-evenly;padding-top:20px;width:87%}.tab-ordion input[name=sections]{left:-9999px;position:absolute;top:-9999px}.tab-ordion section{display:flex;align-items:center}.tab-ordion section label{cursor:pointer;display:block;position:relative;border-radius:3px;z-index:100;margin-bottom:10px;padding:0 12px;color:#41434c;font-family:Poppins}.tab-ordion section label:hover{border-radius:20px;background-color:#f3f3f3;height:40px;align-items:center;display:flex}.tab-ordion section label .tab-select{display:none}.tab-ordion section label .tab-unselect{display:block}.tab-ordion section article{display:none;left:230px;min-width:300px;padding:0 0 0 21px;position:absolute;top:0}.tab-ordion section article:after{bottom:0;content:\"\";display:block;left:-229px;position:absolute;top:0;width:220px;z-index:1}.tab-ordion input[name=sections]:checked+label{color:#5c6bdd;font-family:Poppins;font-size:16px;border:1px solid #fff;background-color:#5c6bdd;border-radius:20px;height:40px;align-items:center;display:flex}.tab-ordion input[name=sections]:checked+label .tab-select{display:block}.tab-ordion input[name=sections]:checked+label .tab-unselect{display:none}.tab-ordion input[name=sections]:checked+label .text-tabs{color:#fff}.tab-ordion input[name=sections]:checked~article{display:block}.tab-select{height:24px;width:24px}.img-tabs{padding-top:2px}.text-tabs{color:#4d4d4e;font-family:Poppins;font-size:14px;line-height:21px;width:100%}.tab-unselect{height:24px;width:24px}@media (max-width:533px){.tab-ordion,h1{width:100%}.tab-ordion section label{font-size:1em;width:160px}.tab-ordion section article{left:200px;min-width:270px}.tab-ordion section article:after{bottom:0;content:\"\";display:block;left:-199px;position:absolute;top:0;width:200px}}.tab-sls{display:flex}@media (max-width:768px){h1{width:96%}.tab-ordion{width:18%}}@media (min-width:1366px){.tab-ordion,h1{width:70%}}@media (min-width:1824px){h1{width:100%}.tab-ordion{width:55%}}"]
|
1034 | })
|
1035 | ], TabsComponent);
|
1036 | return TabsComponent;
|
1037 | }());
|
1038 |
|
1039 | var TabsModule = (function () {
|
1040 | function TabsModule() {
|
1041 | }
|
1042 | TabsModule = __decorate([
|
1043 | NgModule({
|
1044 | declarations: [TabsComponent],
|
1045 | imports: [
|
1046 | CommonModule
|
1047 | ],
|
1048 | exports: [
|
1049 | TabsComponent
|
1050 | ],
|
1051 | schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
1052 | })
|
1053 | ], TabsModule);
|
1054 | return TabsModule;
|
1055 | }());
|
1056 |
|
1057 | var CropModalComponent = (function () {
|
1058 | function CropModalComponent(dialogRef, data) {
|
1059 | this.dialogRef = dialogRef;
|
1060 | this.data = data;
|
1061 | this.croppedImage = '';
|
1062 | }
|
1063 | CropModalComponent.prototype.onNoClick = function () {
|
1064 | this.dialogRef.close(this.croppedImage);
|
1065 | };
|
1066 | CropModalComponent.prototype.myMethod = function () {
|
1067 | this.dialogRef.close();
|
1068 | };
|
1069 | CropModalComponent.prototype.imageCropped = function (event) {
|
1070 | this.croppedImage = event.base64;
|
1071 | };
|
1072 | CropModalComponent.prototype.ngOnInit = function () {
|
1073 | };
|
1074 | CropModalComponent.ctorParameters = function () { return [
|
1075 | { type: MatDialogRef },
|
1076 | { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
1077 | ]; };
|
1078 | CropModalComponent = __decorate([
|
1079 | Component({
|
1080 | selector: 'nitrozen-crop-modal',
|
1081 | template: "<div class=\"alert-modal\">\n\t<div class=\"dialog-tt\" mat-dialog-title>Crop Image</div>\n\t<div mat-dialog-content>\n\t\t<!-- <input type=\"file\" (change)=\"fileChangeEvent($event)\" />\n\t\t<img src=\"{{data.name}}\"> -->\n\t\t<div>\n\t\t\t<image-cropper\n\t\t\t[imageBase64]=\"data.name\"\n\t\t\tformat=\"png,jpeg\"\n\t\t\t(imageCropped)=\"imageCropped($event)\"\n\t\t\t[aspectRatio]=\"data.config\"\n\t\t\t></image-cropper>\n\t\t</div>\n\t</div>\n\t<div class=\"dialog-act\" mat-dialog-actions>\n\t\t<div>\n\t\t\t<nitrozen-button [isContained]=\"true\" [theme]=\"'primary'\" [showIcon]=\"false\" (clicked)=\"onNoClick()\">Submit</nitrozen-button>\n\t\t</div>\n\t\t<div class=\"cancel-btns\">\n\t\t\t<nitrozen-button [showProgress]=\"false\" [isStroked]=\"true\" [theme]=\"'primary'\" [showIcon]=\"false\" [shouldBeDisabled]=\"false\" (clicked)=\"myMethod()\"\n\t\t\t>Cancel</nitrozen-button>\n\t\t</div>\n\t</div>\n</div>",
|
1082 | styles: [".dialog-tt{color:#41434c;font-family:Poppins;font-size:16px;font-weight:700;line-height:25px;visibility:hidden}.dialog-act{display:flex;justify-content:flex-end;padding-top:40px}.cancel-btns{padding-left:12px}"]
|
1083 | }),
|
1084 | __param(1, Inject(MAT_DIALOG_DATA))
|
1085 | ], CropModalComponent);
|
1086 | return CropModalComponent;
|
1087 | }());
|
1088 |
|
1089 | var FileUploadComponent = (function () {
|
1090 | function FileUploadComponent(_http, dialog) {
|
1091 | this._http = _http;
|
1092 | this.dialog = dialog;
|
1093 |
|
1094 | this.text = 'Drag and drop your file here.';
|
1095 |
|
1096 | this.param = 'file';
|
1097 |
|
1098 | this.target = 'https://file.io';
|
1099 | this.required = false;
|
1100 | this.download = false;
|
1101 | this.enableCrop = false;
|
1102 |
|
1103 | this.complete = new EventEmitter();
|
1104 | this.dimen = new EventEmitter();
|
1105 | this.files = [];
|
1106 | this.canChange = false;
|
1107 | this.logo_active = false;
|
1108 |
|
1109 |
|
1110 |
|
1111 |
|
1112 |
|
1113 |
|
1114 |
|
1115 |
|
1116 |
|
1117 |
|
1118 |
|
1119 |
|
1120 |
|
1121 |
|
1122 |
|
1123 |
|
1124 |
|
1125 |
|
1126 |
|
1127 | this.typesMap = {
|
1128 | csv: {
|
1129 | accept: 'text/csv',
|
1130 | contentType: ['application/vnd.ms-excel', 'text/csv', 'text/plain'],
|
1131 | readMethod: 'text',
|
1132 | errorMsg: 'Invalid File Format. only CSV files are allowed'
|
1133 | },
|
1134 | image: {
|
1135 | accept: 'image/*',
|
1136 | readMethod: 'dataurl',
|
1137 | errorMsg: 'Invalid File Format. only IMAGE files are allowed'
|
1138 | },
|
1139 | image_jpg: {
|
1140 | accept: 'image/jpeg',
|
1141 | readMethod: 'dataurl',
|
1142 | errorMsg: 'Invalid File Format. only JPEG files are allowed'
|
1143 | },
|
1144 | video: {
|
1145 | accept: 'video/*',
|
1146 | readMethod: 'dataurl',
|
1147 | errorMsg: 'Invalid File Format. only VIDEO files are allowed'
|
1148 | },
|
1149 | pdf: {
|
1150 | accept: 'application/pdf',
|
1151 | contentType: ['application/pdf'],
|
1152 | errorMsg: 'Invalid File Format. only CSV files are allowed'
|
1153 | },
|
1154 | json: {
|
1155 | accept: 'application/json',
|
1156 | contentType: 'application/json',
|
1157 | readMethod: 'text',
|
1158 | errorMsg: 'Invalid File Format. only JSON files are allowed'
|
1159 | }
|
1160 | };
|
1161 | }
|
1162 | FileUploadComponent.prototype.ngOnInit = function () {
|
1163 | };
|
1164 | FileUploadComponent.prototype.onClick = function () {
|
1165 | var _this = this;
|
1166 | this.files = [];
|
1167 | this.logo_active = true;
|
1168 | var fileUpload = document.getElementById('fileUpload');
|
1169 |
|
1170 |
|
1171 | fileUpload.onchange = function ($event) {
|
1172 | console.log($event);
|
1173 | for (var index = 0; index < fileUpload.files.length; index++) {
|
1174 | var file = fileUpload.files[index];
|
1175 | _this.files.push({
|
1176 | data: file, state: 'in',
|
1177 | inProgress: false, progress: 0, canRetry: false, canCancel: true
|
1178 | });
|
1179 | }
|
1180 | _this.uploadFiles();
|
1181 | };
|
1182 | fileUpload.click();
|
1183 | };
|
1184 |
|
1185 |
|
1186 |
|
1187 |
|
1188 |
|
1189 |
|
1190 |
|
1191 |
|
1192 | FileUploadComponent.prototype.cancelFile = function (file) {
|
1193 | this.canChange = false;
|
1194 | this.logo_active = false;
|
1195 | file.sub.unsubscribe();
|
1196 | this.removeFileFromArray(file);
|
1197 | };
|
1198 | FileUploadComponent.prototype.retryFile = function (file) {
|
1199 | this.uploadFile(file);
|
1200 | file.canRetry = false;
|
1201 | };
|
1202 | FileUploadComponent.prototype.uploadDragFile = function (event) {
|
1203 | this.files = [];
|
1204 | this.logo_active = true;
|
1205 | for (var index = 0; index < event.length; index++) {
|
1206 | var element = event[index];
|
1207 | this.files.push({
|
1208 | data: element, state: 'in',
|
1209 | inProgress: false, progress: 0, canRetry: false, canCancel: true
|
1210 | });
|
1211 | this.uploadFiles();
|
1212 | }
|
1213 | };
|
1214 | FileUploadComponent.prototype.downloadImage = function (downloadUrl) {
|
1215 | window.open(downloadUrl, "_blank");
|
1216 | };
|
1217 | FileUploadComponent.prototype.getImageDimension = function (obj) {
|
1218 | var fr = new Image();
|
1219 | fr.onload = function () {
|
1220 | this.dimens = {
|
1221 | width: fr.width,
|
1222 | height: fr.height,
|
1223 | crop: obj.crop ? obj.crop : false
|
1224 | };
|
1225 | this.dimen.emit(this.dimens);
|
1226 | }.bind(this);
|
1227 | fr.src = this.url;
|
1228 | };
|
1229 | FileUploadComponent.prototype.uploadFile = function (file) {
|
1230 | var _this = this;
|
1231 | this.canChange = true;
|
1232 | this.uploadedFileName = file.data.name;
|
1233 | var reader = new FileReader();
|
1234 | reader.readAsDataURL(file.data);
|
1235 | reader.onload = function (event) {
|
1236 | _this.url = event.target['result'];
|
1237 | _this.getImageDimension({ crop: false });
|
1238 | };
|
1239 | this.file_type = file.data.type;
|
1240 | this.logo_active = false;
|
1241 | this.complete.emit(file.data);
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 |
|
1252 |
|
1253 |
|
1254 |
|
1255 |
|
1256 |
|
1257 |
|
1258 |
|
1259 |
|
1260 |
|
1261 |
|
1262 |
|
1263 |
|
1264 |
|
1265 |
|
1266 |
|
1267 |
|
1268 |
|
1269 |
|
1270 |
|
1271 |
|
1272 |
|
1273 | };
|
1274 | FileUploadComponent.prototype.uploadFiles = function () {
|
1275 | var _this = this;
|
1276 | var fileUpload = document.getElementById('fileUpload');
|
1277 | fileUpload.value = '';
|
1278 | this.files.forEach(function (file) {
|
1279 | _this.uploadFile(file);
|
1280 | });
|
1281 | };
|
1282 | FileUploadComponent.prototype.openCropTool = function (event) {
|
1283 | var _this = this;
|
1284 | event.stopPropagation();
|
1285 | var dialogRef = this.dialog.open(CropModalComponent, {
|
1286 | width: '480px',
|
1287 | data: { name: this.url, config: this.config },
|
1288 | autoFocus: false
|
1289 | });
|
1290 | dialogRef.afterClosed().subscribe(function (res) {
|
1291 | if (res) {
|
1292 | _this.url = res;
|
1293 | _this.complete.emit(_this.url);
|
1294 | _this.getImageDimension({ crop: true });
|
1295 | }
|
1296 | });
|
1297 | };
|
1298 | FileUploadComponent.prototype.removeFileFromArray = function (file) {
|
1299 | var index = this.files.indexOf(file);
|
1300 | if (index > -1) {
|
1301 | this.files.splice(index, 1);
|
1302 | }
|
1303 | };
|
1304 | FileUploadComponent.prototype.myMethod = function (e) { };
|
1305 | FileUploadComponent.ctorParameters = function () { return [
|
1306 | { type: HttpClient },
|
1307 | { type: MatDialog }
|
1308 | ]; };
|
1309 | __decorate([
|
1310 | Input()
|
1311 | ], FileUploadComponent.prototype, "text", void 0);
|
1312 | __decorate([
|
1313 | Input()
|
1314 | ], FileUploadComponent.prototype, "param", void 0);
|
1315 | __decorate([
|
1316 | Input()
|
1317 | ], FileUploadComponent.prototype, "view", void 0);
|
1318 | __decorate([
|
1319 | Input()
|
1320 | ], FileUploadComponent.prototype, "size", void 0);
|
1321 | __decorate([
|
1322 | Input()
|
1323 | ], FileUploadComponent.prototype, "dimension", void 0);
|
1324 | __decorate([
|
1325 | Input()
|
1326 | ], FileUploadComponent.prototype, "error", void 0);
|
1327 | __decorate([
|
1328 | Input()
|
1329 | ], FileUploadComponent.prototype, "msg", void 0);
|
1330 | __decorate([
|
1331 | Input()
|
1332 | ], FileUploadComponent.prototype, "target", void 0);
|
1333 | __decorate([
|
1334 | Input()
|
1335 | ], FileUploadComponent.prototype, "accept", void 0);
|
1336 | __decorate([
|
1337 | Input()
|
1338 | ], FileUploadComponent.prototype, "required", void 0);
|
1339 | __decorate([
|
1340 | Input()
|
1341 | ], FileUploadComponent.prototype, "download", void 0);
|
1342 | __decorate([
|
1343 | Input()
|
1344 | ], FileUploadComponent.prototype, "enableCrop", void 0);
|
1345 | __decorate([
|
1346 | Input()
|
1347 | ], FileUploadComponent.prototype, "downloadUrl", void 0);
|
1348 | __decorate([
|
1349 | Input()
|
1350 | ], FileUploadComponent.prototype, "replaceable", void 0);
|
1351 | __decorate([
|
1352 | Input()
|
1353 | ], FileUploadComponent.prototype, "newSrc", void 0);
|
1354 | __decorate([
|
1355 | Input()
|
1356 | ], FileUploadComponent.prototype, "config", void 0);
|
1357 | __decorate([
|
1358 | Input()
|
1359 | ], FileUploadComponent.prototype, "type", void 0);
|
1360 | __decorate([
|
1361 | Output()
|
1362 | ], FileUploadComponent.prototype, "complete", void 0);
|
1363 | __decorate([
|
1364 | Output()
|
1365 | ], FileUploadComponent.prototype, "dimen", void 0);
|
1366 | FileUploadComponent = __decorate([
|
1367 | Component({
|
1368 | selector: 'nitrozen-file-upload',
|
1369 | template: "<div *ngIf=\"type === 'no-preview'\">\n <div class=\"file-cnt\" (click)=\"onClick()\" appDragDrop (onFileDropped)=\"uploadDragFile($event)\">\n <div class=\"file-side-cont\" [ngClass]=\"{'file-active': logo_active}\" >\n <div class=\"img-ic\" *ngIf=\"!replaceable\">\n <img src=\"./../../assets/icons/fileupload_upload.svg\">\n </div>\n <div class=\"img-ic-new\" *ngIf=\"replaceable && file_type !== 'application/pdf'\">\n <img src=\"./../../assets/icons/fileupload_general.svg\" style=\"height: 48px;object-fit: cover;\">\n </div>\n <div class=\"img-ic-new\" *ngIf=\"replaceable && file_type === 'application/pdf'\">\n <img src=\"./../../assets/icons/fileupload_placeholder_pdf.svg\" style=\"height: 48px;object-fit: cover;\">\n </div>\n <div class=\"img-txt\">\n <div class=\"txt-cnt-left\" *ngIf=\"!canChange\">{{text}}</div>\n <div class=\"txt-cnt-left\" *ngIf=\"canChange\">{{uploadedFileName}}</div>\n <div class=\"txt-msg\" title=\"{{msg}}\">{{msg}}</div>\n <div *ngIf=\"size\" class=\"txt-msg\" title=\"{{size}}\">{{size}}</div>\n <div *ngIf=\"dimension\" class=\"txt-msg\" title=\"{{dimension}}\">{{dimension}}</div>\n </div>\n \n <div class=\"file-btn\">\n <div *ngIf=\"enableCrop && replaceable\">\n <div class=\"url-down\" (click)=\"openCropTool($event)\">\n <img src=\"./../../assets/icons/crop_icon.svg\">\n </div>\n </div>\n <div *ngIf=\"downloadUrl\">\n <div class=\"url-down\" (click)=\"downloadImage(downloadUrl)\">\n <img src=\"./../../assets/icons/fileupoload-download.svg\">\n </div>\n </div>\n <div class=\"flat-btn-underline\" *ngIf=\"!canChange\">\n <nitrozen-button-rounded [showProgress]=\"false\" [isStroked]=\"true\" [theme]=\"'primary'\" [showIcon]=\"false\" [shouldBeDisabled]=\"false\"\n >Upload</nitrozen-button-rounded>\n </div>\n <div class=\"flat-btn-underline\" *ngIf=\"canChange\">\n <a class=\"btn-text file-change\">Change</a>\n </div>\n </div>\n </div>\n </div>\n <!-- <ul>\n <li *ngFor=\"let file of files\" [@fadeInOut]=\"file.state\">\n <mat-progress-bar [value]=\"file.progress\"></mat-progress-bar>\n <span id=\"file-label\">\n {{file.data.name}}\n <a title=\"Retry\" (click)=\"retryFile(file)\" *ngIf=\"file.canRetry\">\n <mat-icon>refresh</mat-icon></a>\n <a title=\"Cancel\" (click)=\"cancelFile(file)\" *ngIf=\"file.canCancel\">\n <mat-icon>cancel</mat-icon></a>\n </span>\n </li>\n </ul> -->\n <input type=\"file\" id=\"fileUpload\" [required]=\"required\" name=\"fileUpload\" multiple=\"multiple\"\n accept=\"{{accept}}\" style=\"display:none;\"/>\n\n <div *ngIf=\"error\"><span [innerHTML]=\"error\"></span></div>\n</div>\n<div *ngIf=\"type === 'preview' && view === 'landscape'\">\n <div class=\"file-cnt-image\" [ngClass]=\"{'file-height': canChange}\" (click)=\"onClick()\" appDragDrop (onFileDropped)=\"uploadDragFile($event)\">\n <div class=\"inner-cnt\" [ngClass]=\"{'file-active': logo_active}\" >\n <div class=\"image-cnt\" [ngClass]=\"{'file-image-height': canChange}\">\n <div class=\"img-ic-image\" *ngIf=\"!canChange && !replaceable\">\n <img src=\"./../../assets/icons/fileupload_large_upload.svg\">\n </div>\n <div class=\"img-txt-image\" *ngIf=\"!canChange && !replaceable\">\n <div class=\"txt-cnt\">Drag and drop a file here</div>\n <div class=\"txt-cnt\">or</div>\n <div class=\"pad-12\">\n <nitrozen-button-rounded [showProgress]=\"false\" [isStroked]=\"true\" [theme]=\"'primary'\" [showIcon]=\"false\" [shouldBeDisabled]=\"false\"\n >Upload</nitrozen-button-rounded>\n </div>\n <div class=\"pad-12\" *ngIf=\"!canChange\">\n <div class=\"txt-msg-cn\" title=\"{{msg}}\">{{msg}}</div>\n <div *ngIf=\"size\" class=\"txt-msg-cn\" title=\"{{size}}\">{{size}}</div>\n <div *ngIf=\"dimension\" class=\"txt-msg-cn\" title=\"{{dimension}}\">{{dimension}}</div>\n </div>\n <!-- <div class=\"txt-cnt\" *ngIf=\"canChange\">{{uploadedFileName}}</div> -->\n <!-- <div class=\"txt-msg\" title=\"{{msg}}\">{{msg}}</div> -->\n </div>\n <div>\n <div *ngIf=\"canChange && !replaceable\">\n <img class=\"url-img\" src=\"{{url}}\">\n </div>\n <div *ngIf=\"replaceable\">\n <img class=\"url-img\" src=\"{{newSrc}}\">\n </div>\n </div>\n </div>\n <div class=\"icn-down-pos\" *ngIf=\"canChange && downloadUrl\">\n <div class=\"url-down\" (click)=\"downloadImage(downloadUrl)\">\n <img src=\"./../../assets/icons/fileupoload-download.svg\">\n </div>\n </div>\n <div class=\"icn-down-crop\" *ngIf=\"canChange && enableCrop\">\n <div class=\"url-down\" (click)=\"openCropTool($event)\">\n <img class=\"crop-icn\" src=\"./../../assets/icons/crop_icon.svg\">\n </div>\n </div>\n </div>\n <div class=\"file-btn-image\" *ngIf=\"canChange\">\n <div class=\"img-new-cnt\">\n <div class=\"txt-cnt-image\" *ngIf=\"canChange\">{{uploadedFileName}}</div>\n <div class=\"txt-msg-image\" title=\"{{msg}}\">{{msg}}</div>\n <div *ngIf=\"size\" class=\"txt-msg-image\" title=\"{{size}}\">{{size}}</div>\n <div *ngIf=\"dimension\" class=\"txt-msg-image\" title=\"{{dimension}}\">{{dimension}}</div>\n </div>\n <div class=\"change-btn\" *ngIf=\"canChange\">\n <div class=\"flat-btn-underline\">\n <a class=\"btn-text file-change\">Change</a>\n </div>\n </div>\n </div>\n </div>\n <input type=\"file\" id=\"fileUpload\" [required]=\"required\" name=\"fileUpload\" multiple=\"multiple\"\n accept=\"{{accept}}\" style=\"display:none;\"/>\n\n <div *ngIf=\"error\"><span [innerHTML]=\"error\"></span></div>\n</div>\n<div *ngIf=\"type === 'preview' && view === 'protrait'\">\n <div class=\"file-cnt-image file-flx\" [ngClass]=\"{'file-height': canChange}\">\n <div class=\"main-file-drop\" (click)=\"onClick()\" appDragDrop (onFileDropped)=\"uploadDragFile($event)\">\n <div class=\"inner-cnt-prot\" [ngClass]=\"{'file-active': logo_active}\" >\n <div class=\"image-cnt-new\">\n <div class=\"img-ic-image\" *ngIf=\"!canChange && !replaceable\">\n <img src=\"./../../assets/icons/fileupload_large_upload.svg\">\n </div>\n <div class=\"img-txt-image\" *ngIf=\"!canChange && !replaceable\">\n <!-- <div class=\"txt-cnt break-txt\">Drag and drop a file here or click to upload</div> -->\n <div class=\"txt-cnt\">Drag and drop a file here</div>\n <div class=\"txt-cnt\">or</div>\n <div class=\"pad-12\">\n <nitrozen-button-rounded [showProgress]=\"false\" [isStroked]=\"true\" [theme]=\"'primary'\" [showIcon]=\"false\" [shouldBeDisabled]=\"false\">Upload</nitrozen-button-rounded>\n </div>\n <div class=\"pad-12\" *ngIf=\"!canChange\">\n <div class=\"txt-msg-cn\" title=\"{{msg}}\">{{msg}}</div>\n <div *ngIf=\"size\" class=\"txt-msg-cn\" title=\"{{size}}\">{{size}}</div>\n <div *ngIf=\"dimension\" class=\"txt-msg-cn\" title=\"{{dimension}}\">{{dimension}}</div>\n </div>\n </div>\n <div>\n <div *ngIf=\"canChange && !replaceable\">\n <img class=\"url-img-port\" src=\"{{url}}\">\n </div>\n <div *ngIf=\"replaceable\">\n <img class=\"url-img-port\" src=\"{{newSrc}}\">\n </div>\n <!-- <div class=\"icn-down-pos\" *ngIf=\"downloadUrl\">\n <div class=\"url-down\" (click)=\"downloadImage(downloadUrl)\">\n <img src=\"./../../assets/icons/fileupoload-download.svg\">\n </div>\n </div> -->\n </div>\n </div>\n <div class=\"icn-down-pos\" *ngIf=\"canChange && downloadUrl\">\n <div class=\"url-down\" (click)=\"downloadImage(downloadUrl)\">\n <img src=\"./../../assets/icons/fileupoload-download.svg\">\n </div>\n </div>\n <div class=\"icn-down-crop-pro\" *ngIf=\"canChange && enableCrop\">\n <div class=\"url-down\" (click)=\"openCropTool($event)\">\n <img src=\"./../../assets/icons/crop_icon.svg\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"file-btn-image\" *ngIf=\"canChange\">\n <div class=\"img-new-cnt\">\n <div class=\"txt-cnt-image\" *ngIf=\"canChange\">{{uploadedFileName}}</div>\n <div class=\"txt-msg-image\" title=\"{{msg}}\">{{msg}}</div>\n <div *ngIf=\"size\" class=\"txt-msg-image\" title=\"{{size}}\">{{size}}</div>\n <div *ngIf=\"dimension\" class=\"txt-msg-image\" title=\"{{dimension}}\">{{dimension}}</div>\n </div>\n <div class=\"change-btn\" *ngIf=\"canChange\">\n <div class=\"flat-btn-underline\">\n <a class=\"btn-text file-change\" (click)=\"onClick()\">Change</a>\n </div>\n </div>\n </div>\n </div>\n <input type=\"file\" id=\"fileUpload\" [required]=\"required\" name=\"fileUpload\" multiple=\"multiple\"\n accept=\"{{accept}}\" style=\"display:none;\"/>\n <div *ngIf=\"error\"><span [innerHTML]=\"error\"></span></div>\n</div>",
|
1370 | animations: [
|
1371 | trigger('fadeInOut', [
|
1372 | state('in', style({ opacity: 100 })),
|
1373 | transition('* => void', [
|
1374 | animate(300, style({ opacity: 0 }))
|
1375 | ])
|
1376 | ])
|
1377 | ],
|
1378 | styles: [".file-cnt{display:flex;width:65%;border-radius:3px;padding:12px;border:1px solid #e4e5e6;cursor:pointer;background-color:#f8f8f8}.file-side-cont{display:flex;width:100%;border:1px dashed #d7d7d7;border-radius:3px;background-color:#fff;padding:12px}.crop-icn{width:40px}.file-active{border:1px dashed #00f!important}.url-down{display:flex;height:100%;padding-right:25%}.icn-down-pos{position:absolute;right:10px;bottom:20px;top:175px;z-index:1}.icn-down-crop{position:absolute;right:60px;bottom:20px;top:175px;z-index:1}.icn-down-crop-pro{position:absolute;z-index:1;bottom:20px;right:40px}.file-cnt-image{width:486px;border:1px solid #e4e5e6;border-radius:3px;background-color:#f8f8f8;position:relative;cursor:pointer}.file-height{height:480px}.file-flx{display:flex;justify-content:center}.main-file-drop{width:265px;border-radius:3px;border:1px solid #e4e5e6;background-color:#d8d8d8;position:relative;cursor:pointer;height:330px;margin:10px 0}.img-txt-image{padding-top:12px}.break-txt{word-break:break-all;width:201px;text-align:center!important}.image-cnt-new{vertical-align:middle;margin:0 -50% 0 0;position:absolute;top:51%;left:50%;transform:translate(-50%,-50%)}.img-ic{border-radius:3px;padding:10px;align-items:center;display:flex}.img-ic-new{align-items:center;display:flex}.url-img{height:335px;width:466px;-o-object-fit:cover;object-fit:cover}.url-img-port{height:330px;width:266px;-o-object-fit:cover;object-fit:cover}.change-btn{display:flex;align-items:center;padding-right:12px}.img-new-cnt{flex:1;padding:12px}.text-msg-image{color:#9b9b9b;font-family:Poppins;font-size:12px;text-align:left;padding-left:10px}.file-btn-image{position:absolute;bottom:-40px;left:50%;transform:translate(-50%,-50%);width:96%;background:#fff;display:flex;justify-content:space-around}.inner-cnt{height:332px;border:1px dashed #d7d7d7;border-radius:3px;background-color:#fff;margin:10px}.inner-cnt-prot{border:1px dashed #d7d7d7;border-radius:3px;background-color:#fff;height:328px}.file-change{color:#5c6bdd!important;font-size:12px!important}.image-cnt{vertical-align:middle;margin:0 -50% 0 0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.file-image-height{top:37.8%}.img-txt{padding-left:24px;padding-top:10px}.txt-cnt{color:#61636a;font-family:Poppins;font-size:16px;text-align:center;text-overflow:ellipsis;max-width:275px;overflow:auto}.txt-cnt-left{color:#41434c;font-family:Poppins;font-size:12px;text-align:left;text-overflow:ellipsis;max-width:275px;overflow:auto}.txt-cnt-image{color:#41434c;font-family:Poppins;font-size:12px;text-overflow:ellipsis;max-width:275px;overflow:auto;text-align:left}.txt-msg{color:#9b9b9b;font-family:Poppins;font-size:12px;text-align:left;width:275px}.pad-12{padding-top:12px}.txt-msg-cn{text-align:center;color:#9b9b9b;font-family:Poppins;font-size:12px;width:275px}.txt-msg-image{color:#9b9b9b;font-family:Poppins;font-size:12px;text-align:left;width:275px}"]
|
1379 | })
|
1380 | ], FileUploadComponent);
|
1381 | return FileUploadComponent;
|
1382 | }());
|
1383 | var FileUploadModel = (function () {
|
1384 | function FileUploadModel() {
|
1385 | }
|
1386 | return FileUploadModel;
|
1387 | }());
|
1388 |
|
1389 | var ButtonRoundedComponent = (function () {
|
1390 | function ButtonRoundedComponent() {
|
1391 | this.clicked = new EventEmitter();
|
1392 | }
|
1393 | ButtonRoundedComponent.prototype.ngOnInit = function () {
|
1394 | this.theme = this.theme ? this.theme : 'primary';
|
1395 | };
|
1396 | ButtonRoundedComponent.prototype.clickedButton = function (event) {
|
1397 | this.clicked.emit(event);
|
1398 | };
|
1399 | __decorate([
|
1400 | Input()
|
1401 | ], ButtonRoundedComponent.prototype, "showProgress", void 0);
|
1402 | __decorate([
|
1403 | Input()
|
1404 | ], ButtonRoundedComponent.prototype, "isContained", void 0);
|
1405 | __decorate([
|
1406 | Input()
|
1407 | ], ButtonRoundedComponent.prototype, "focused", void 0);
|
1408 | __decorate([
|
1409 | Input()
|
1410 | ], ButtonRoundedComponent.prototype, "isStroked", void 0);
|
1411 | __decorate([
|
1412 | Input()
|
1413 | ], ButtonRoundedComponent.prototype, "theme", void 0);
|
1414 | __decorate([
|
1415 | Input()
|
1416 | ], ButtonRoundedComponent.prototype, "shouldBeDisabled", void 0);
|
1417 | __decorate([
|
1418 | Input()
|
1419 | ], ButtonRoundedComponent.prototype, "showIcon", void 0);
|
1420 | __decorate([
|
1421 | Output()
|
1422 | ], ButtonRoundedComponent.prototype, "clicked", void 0);
|
1423 | ButtonRoundedComponent = __decorate([
|
1424 | Component({
|
1425 | selector: 'nitrozen-button-rounded',
|
1426 | template: "<div class=\"primary-theme\" [ngClass]=\"{\n 'primary-section': theme === 'primary' ,\n 'secondary-section': theme === 'accent'\n }\">\n\t<button mat-button class=\"btn-nitrozen\" \n[ngClass]=\"{\n 'mat-stroked-button': isStroked,\n 'mat-flat-button':isContained,\n 'btn-focused':focused,\n 'hover-state':showProgress\n }\"\n [disabled]=\"shouldBeDisabled\"\n (click)=\"clickedButton($event)\"\n\n>\n\n<div class=\"btn-icon-show\">\n <span class=\"btn-txt\" \n [ngClass]=\"{\n 'btn-show-icn': showIcon,\n 'btn-stroke-color':isStroked,\n 'btn-contained-color':isContained,\n 'btn-progress': !showProgress,\n 'btn-notprogress' : showProgress\n }\">\n <ng-content></ng-content>\n </span>\n\n <div class=\"btn-spin\" [ngClass]=\"{\n 'btn-spin-stroke': isStroked,\n 'btn-spin-contained':isContained,\n 'btn-progress': !showProgress,\n 'btn-notprogress' : showProgress\n }\" *ngIf=\"showIcon\">\n <img src=\"./../../assets/icons/Bag_Icon.svg\">\n</div>\n <div class=\"btn-spin fx-wt\" [ngClass]=\"{\n 'btn-spin-stroke': isStroked,\n 'btn-spin-contained':isContained,\n 'btn-notprogress': !showProgress,\n 'btn-progress' : showProgress\n }\" *ngIf=\"!shouldBeDisabled\">\n <img *ngIf=\"isContained\" class=\"btn-spinner\" style=\"width: 40px;\" src=\"../../../assets/icons/loader-white-1.gif\">\n <img *ngIf=\"isStroked && theme === 'primary'\" class=\"btn-spinner\" style=\"width: 40px;\" src=\"../../../assets/icons/loader-blue.gif\">\n <img *ngIf=\"isStroked && theme === 'accent'\" class=\"btn-spinner\" style=\"width: 40px;\" src=\"../../../assets/icons/loader-blue.gif\">\n <!-- <mat-progress-spinner\n class=\"btn-spinner\"\n [ngClass]=\"{'c-button__spinner--active': showProgress && !shouldBeDisabled}\"\n diameter=\"21\"\n mode=\"indeterminate\"\n ></mat-progress-spinner> -->\n</div>\n</div>\n\n\n<!-- <span class=\"btn-txt\" *ngIf=\"!showProgress && !showIcon\">\n <ng-content></ng-content>\n </span> -->\n\n \n</button>\n\n\n</div>\n",
|
1427 | styles: [".btn-nitrozen{height:40px;border-radius:21px;padding:0 32px;outline:0;cursor:pointer}.hover-state{pointer-events:none}.btn-notprogress{opacity:0;transition:opacity .25s ease-out;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.btn-progress{opacity:1}.fx-wt{width:66.38px}.primary-section .mat-flat-button.btn-focused{text-decoration:underline;color:#fff;text-underline-position:under}.primary-section .mat-stroked-button.btn-focused{text-decoration:underline;color:#5c6bdd;text-underline-position:under}.primary-section .mat-flat-button{background-color:#5c6bdd}.primary-section .mat-flat-button:hover:not([disabled]){background-color:#4f5ecc}.primary-section .mat-flat-button:focus{text-decoration:underline;color:#fff;text-underline-position:under}.primary-section .mat-stroked-button{border:1px solid #5c6bdd!important}.primary-section .mat-stroked-button:hover:not([disabled]){background-color:rgba(79,94,204,.12)}.primary-section .mat-stroked-button:focus{text-decoration:underline;color:#5c6bdd;text-underline-position:under}.primary-section .btn-spin-stroke .mat-spinner circle,.primary-section .btn-spin-stroke ::ng-deep .mat-progress-spinner circle{stroke:#5c6bdd}.primary-section .btn-spin-contained .mat-spinner circle,.primary-section .btn-spin-contained ::ng-deep .mat-progress-spinner circle{stroke:#fff}.primary-section .mat-flat-button:disabled,.primary-section .mat-flat-button[disabled=disabled]{background-color:rgba(54,204,155,.4)!important}.primary-section .btn-txt{font-family:Poppins;font-size:16px;font-weight:700;line-height:25px;text-align:center}.primary-section .btn-stroke-color{color:#5c6bdd}.primary-section .btn-contained-color{color:#fff}.primary-section .btn-spinner{text-align:center}.primary-section .btn-spin{display:flex;justify-content:center}.primary-section .btn-fynd-icon{height:48px;width:190px;border-radius:3px;background-color:#5c6bdd}.primary-section .btn-fynd-icon:hover:not([disabled]){background-color:#2eb589}.primary-section .btn-fynd-icon:focus{text-decoration:underline;color:#fff;text-underline-position:under}.primary-section .btn-show-icn{padding-left:10px}.primary-section .btn-icon-show{display:flex;flex-direction:row-reverse;justify-content:center}.secondary-section .mat-flat-button.btn-focused{text-decoration:underline;color:#fff;text-underline-position:under}.secondary-section .mat-stroked-button.btn-focused{text-decoration:underline;color:#5c6bdd;text-underline-position:under}.secondary-section .mat-flat-button{background-color:#5c6bdd}.secondary-section .mat-flat-button:hover:not([disabled]){background-color:#4f5ecc}.secondary-section .mat-flat-button:focus{text-decoration:underline;color:#fff;text-underline-position:under}.secondary-section .mat-stroked-button{border:1px solid #5c6bdd}.secondary-section .mat-stroked-button:hover:not([disabled]){background-color:rgba(79,94,204,.12)}.secondary-section .mat-stroked-button:focus{text-decoration:underline;color:#5c6bdd;text-underline-position:under}.secondary-section .btn-spin-stroke .mat-spinner circle,.secondary-section .btn-spin-stroke ::ng-deep .mat-progress-spinner circle{stroke:#5c6bdd}.secondary-section .btn-spin-contained .mat-spinner circle,.secondary-section .btn-spin-contained ::ng-deep .mat-progress-spinner circle{stroke:#fff}.secondary-section .mat-flat-button:disabled,.secondary-section .mat-flat-button[disabled=disabled]{background-color:rgba(92,107,221,.4)!important}.secondary-section .mat-stroked-button:disabled .btn-stroke-color,.secondary-section .mat-stroked-button[disabled=disabled] .btn-stroke-color{color:rgba(92,107,221,.4)!important}.secondary-section .btn-txt{font-family:Poppins;font-size:16px;font-weight:700;line-height:25px;text-align:center}.secondary-section .btn-stroke-color{color:#5c6bdd}.secondary-section .btn-contained-color{color:#fff}.secondary-section .btn-spinner{text-align:center}.secondary-section .btn-spin{display:flex;justify-content:center}.secondary-section .btn-fynd-icon{height:48px;width:190px;border-radius:3px;background-color:#5c6bdd}.secondary-section .btn-fynd-icon:hover:not([disabled]){background-color:#2eb589}.secondary-section .btn-fynd-icon:focus{text-decoration:underline;color:#fff;text-underline-position:under}.secondary-section .btn-show-icn{padding-left:10px}.secondary-section .btn-icon-show{display:flex;flex-direction:row-reverse;justify-content:center}"]
|
1428 | })
|
1429 | ], ButtonRoundedComponent);
|
1430 | return ButtonRoundedComponent;
|
1431 | }());
|
1432 |
|
1433 | var ButtonRoundedModule = (function () {
|
1434 | function ButtonRoundedModule() {
|
1435 | }
|
1436 | ButtonRoundedModule = __decorate([
|
1437 | NgModule({
|
1438 | declarations: [ButtonRoundedComponent],
|
1439 | imports: [
|
1440 | CommonModule,
|
1441 | MatButtonModule,
|
1442 | MatProgressSpinnerModule
|
1443 | ],
|
1444 | exports: [
|
1445 | ButtonRoundedComponent,
|
1446 | MatButtonModule,
|
1447 | MatProgressSpinnerModule
|
1448 | ]
|
1449 | })
|
1450 | ], ButtonRoundedModule);
|
1451 | return ButtonRoundedModule;
|
1452 | }());
|
1453 |
|
1454 | var DragDropDirective = (function () {
|
1455 | function DragDropDirective() {
|
1456 | this.onFileDropped = new EventEmitter();
|
1457 | }
|
1458 |
|
1459 |
|
1460 |
|
1461 | DragDropDirective.prototype.onDragOver = function (evt) {
|
1462 | evt.preventDefault();
|
1463 | evt.stopPropagation();
|
1464 |
|
1465 |
|
1466 | };
|
1467 |
|
1468 | DragDropDirective.prototype.onDragLeave = function (evt) {
|
1469 | evt.preventDefault();
|
1470 | evt.stopPropagation();
|
1471 |
|
1472 |
|
1473 | };
|
1474 |
|
1475 | DragDropDirective.prototype.ondrop = function (evt) {
|
1476 | evt.preventDefault();
|
1477 | evt.stopPropagation();
|
1478 |
|
1479 |
|
1480 | var files = evt.dataTransfer.files;
|
1481 | if (files.length > 0) {
|
1482 | this.onFileDropped.emit(files);
|
1483 | }
|
1484 | };
|
1485 | __decorate([
|
1486 | Output()
|
1487 | ], DragDropDirective.prototype, "onFileDropped", void 0);
|
1488 | __decorate([
|
1489 | HostListener('dragover', ['$event'])
|
1490 | ], DragDropDirective.prototype, "onDragOver", null);
|
1491 | __decorate([
|
1492 | HostListener('dragleave', ['$event'])
|
1493 | ], DragDropDirective.prototype, "onDragLeave", null);
|
1494 | __decorate([
|
1495 | HostListener('drop', ['$event'])
|
1496 | ], DragDropDirective.prototype, "ondrop", null);
|
1497 | DragDropDirective = __decorate([
|
1498 | Directive({
|
1499 | selector: '[appDragDrop]'
|
1500 | })
|
1501 | ], DragDropDirective);
|
1502 | return DragDropDirective;
|
1503 | }());
|
1504 |
|
1505 | var FileUploadModule = (function () {
|
1506 | function FileUploadModule() {
|
1507 | }
|
1508 | FileUploadModule = __decorate([
|
1509 | NgModule({
|
1510 | declarations: [FileUploadComponent, DragDropDirective, CropModalComponent],
|
1511 | imports: [
|
1512 | CommonModule,
|
1513 | MatButtonModule,
|
1514 | ButtonTextModule,
|
1515 | ButtonModule,
|
1516 | ButtonRoundedModule,
|
1517 | MatProgressSpinnerModule,
|
1518 | MatProgressBarModule,
|
1519 | ImageCropperModule,
|
1520 | MatIconModule
|
1521 | ],
|
1522 | exports: [
|
1523 | FileUploadComponent,
|
1524 | MatButtonModule,
|
1525 | MatProgressSpinnerModule,
|
1526 | MatProgressBarModule,
|
1527 | MatIconModule
|
1528 | ],
|
1529 | entryComponents: [CropModalComponent]
|
1530 | })
|
1531 | ], FileUploadModule);
|
1532 | return FileUploadModule;
|
1533 | }());
|
1534 |
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 | export { ButtonModule, ButtonTextModule, CheckboxModule, FileUploadModule, InputModule, RadioButtonModule, SearchableSelectModule, SelectModule, SnackBarModule, TabsModule, VerticalTabsModule, ɵ0, ButtonComponent as ɵa, ButtonTextComponent as ɵb, CheckboxComponent as ɵc, RadioButtonComponent as ɵd, InputComponent as ɵe, InputSuffixComponent as ɵf, InputPrefixComponent as ɵg, SelectComponent as ɵh, SearchableSelectComponent as ɵi, SelectCheckAllComponent as ɵj, SnackBarComponent as ɵk, CustomSnackbarComponent as ɵl, VerticalTabsComponent as ɵm, TabsComponent as ɵn, FileUploadComponent as ɵo, DragDropDirective as ɵp, CropModalComponent as ɵq, ButtonRoundedModule as ɵr, ButtonRoundedComponent as ɵs };
|
1540 |
|