@smartsoft001/angular 1.1.686 → 1.1.691
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/smartsoft001-angular.umd.js +1710 -1645
- package/bundles/smartsoft001-angular.umd.js.map +1 -1
- package/esm2015/lib/components/details/base/base.component.js +9 -4
- package/esm2015/lib/components/details/details.component.js +20 -4
- package/esm2015/lib/factories/form/form.factory.js +24 -9
- package/esm2015/lib/services/details/details.service.js +29 -0
- package/esm2015/lib/services/index.js +2 -1
- package/esm2015/lib/services/services.module.js +4 -2
- package/esm2015/smartsoft001-angular.js +133 -132
- package/fesm2015/smartsoft001-angular.js +1335 -1273
- package/fesm2015/smartsoft001-angular.js.map +1 -1
- package/lib/components/details/base/base.component.d.ts +3 -1
- package/lib/components/details/details.component.d.ts +5 -2
- package/lib/factories/form/form.factory.d.ts +5 -2
- package/lib/pipes/pipes.module.d.ts +1 -1
- package/lib/services/details/details.service.d.ts +7 -0
- package/lib/services/index.d.ts +1 -0
- package/package.json +5 -5
- package/smartsoft001-angular.d.ts +132 -131
- package/smartsoft001-angular.metadata.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { __awaiter, __decorate, __metadata } from 'tslib';
|
|
2
2
|
import 'reflect-metadata';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, Injector, Inject, PLATFORM_ID, InjectionToken, Optional,
|
|
4
|
+
import { Injectable, Injector, Inject, PLATFORM_ID, InjectionToken, Optional, NgModule, ComponentFactoryResolver, Pipe, Type, Component, ElementRef, EventEmitter, Input, Output, Directive, ChangeDetectorRef, ViewChild, ViewContainerRef, ChangeDetectionStrategy, ApplicationRef, NgModuleRef, QueryList, ViewEncapsulation, TemplateRef, ViewChildren, HostBinding, Renderer2, HostListener, forwardRef, ContentChildren, NgZone } from '@angular/core';
|
|
5
5
|
import { FormGroup, Validators, FormBuilder, ReactiveFormsModule, FormArray, FormControl, NG_VALIDATORS, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
6
6
|
import * as _ from 'lodash';
|
|
7
|
-
import {
|
|
7
|
+
import { tap, delay, map, first, filter, takeUntil, debounceTime, distinctUntilChanged, catchError } from 'rxjs/operators';
|
|
8
8
|
import { SYMBOL_MODEL, SYMBOL_FIELD, getModelFieldsWithOptions, FieldType, getModelFieldOptions, getModelOptions } from '@smartsoft001/models';
|
|
9
|
-
import {
|
|
9
|
+
import { SPECIFICATION_ROOT_KEY, SpecificationService, PeselService, ZipCodeService, ObjectService, ArrayService, NipService } from '@smartsoft001/utils';
|
|
10
10
|
import decode from 'jwt-decode';
|
|
11
11
|
import { CookieService, CookieModule } from 'ngx-cookie';
|
|
12
12
|
import * as i1 from '@ionic/angular';
|
|
13
13
|
import { Platform, ToastController, ModalController, NavParams, PopoverController, LoadingController, AlertController, IonicModule, MenuController, IonDatetime, IonSearchbar, IonSegment, DomController } from '@ionic/angular';
|
|
14
14
|
import { isPlatformBrowser, DOCUMENT, Location, CommonModule } from '@angular/common';
|
|
15
15
|
import { Storage } from '@ionic/storage';
|
|
16
|
-
import { HttpErrorResponse, HttpEventType, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
17
16
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
18
|
-
import {
|
|
17
|
+
import { HttpErrorResponse, HttpEventType, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
19
18
|
import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
|
|
19
|
+
import { App, Plugins, CameraResultType } from '@capacitor/core';
|
|
20
20
|
import * as moment$1 from 'moment';
|
|
21
|
-
import { BehaviorSubject, of, Subscription, Subject, isObservable } from 'rxjs';
|
|
22
21
|
import { Memoize } from 'lodash-decorators';
|
|
22
|
+
import { of, BehaviorSubject, Subscription, Subject, isObservable } from 'rxjs';
|
|
23
23
|
import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, Router, RouterModule } from '@angular/router';
|
|
24
24
|
import { ChartsModule } from 'ng2-charts';
|
|
25
25
|
import { MatTableModule } from '@angular/material/table';
|
|
@@ -201,126 +201,36 @@ class IModelValidatorsProvider {
|
|
|
201
201
|
}
|
|
202
202
|
const MODEL_VALIDATORS_PROVIDER = new InjectionToken("MODEL_VALIDATORS_PROVIDER");
|
|
203
203
|
|
|
204
|
-
class
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
addLockError() {
|
|
209
|
-
++ToastService.lockError;
|
|
210
|
-
}
|
|
211
|
-
removeLockError() {
|
|
212
|
-
--ToastService.lockError;
|
|
213
|
-
}
|
|
214
|
-
error(config) {
|
|
215
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
216
|
-
if (ToastService.lockError)
|
|
217
|
-
return;
|
|
218
|
-
const toast = yield this.toastCtrl.create({
|
|
219
|
-
position: 'bottom',
|
|
220
|
-
header: config.title,
|
|
221
|
-
message: config.message,
|
|
222
|
-
duration: config.duration ? config.duration : 2000,
|
|
223
|
-
buttons: config.buttons ? config.buttons.map(b => {
|
|
224
|
-
return {
|
|
225
|
-
text: b.text,
|
|
226
|
-
side: b.position,
|
|
227
|
-
role: 'cancel',
|
|
228
|
-
handler: b.handler
|
|
229
|
-
};
|
|
230
|
-
}) : null
|
|
231
|
-
});
|
|
232
|
-
yield toast.present();
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
info(config) {
|
|
236
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
237
|
-
const toast = yield this.toastCtrl.create({
|
|
238
|
-
position: 'bottom',
|
|
239
|
-
header: config.title,
|
|
240
|
-
message: config.message,
|
|
241
|
-
duration: config.duration ? config.duration : 2000,
|
|
242
|
-
buttons: config.buttons ? config.buttons.map(b => {
|
|
243
|
-
return {
|
|
244
|
-
text: b.text,
|
|
245
|
-
side: b.position,
|
|
246
|
-
handler: b.handler
|
|
247
|
-
};
|
|
248
|
-
}) : null
|
|
249
|
-
});
|
|
250
|
-
yield toast.present();
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
ToastService.lockError = 0;
|
|
255
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
256
|
-
ToastService.decorators = [
|
|
257
|
-
{ type: Injectable }
|
|
258
|
-
];
|
|
259
|
-
/**
|
|
260
|
-
* @type {function(): !Array<(null|{
|
|
261
|
-
* type: ?,
|
|
262
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
263
|
-
* })>}
|
|
264
|
-
* @nocollapse
|
|
265
|
-
*/
|
|
266
|
-
ToastService.ctorParameters = () => [
|
|
267
|
-
{ type: ToastController }
|
|
268
|
-
];
|
|
269
|
-
|
|
270
|
-
class ErrorService {
|
|
271
|
-
constructor(toastService, translateService) {
|
|
272
|
-
this.toastService = toastService;
|
|
273
|
-
this.translateService = translateService;
|
|
204
|
+
class SmartFormGroup extends FormGroup {
|
|
205
|
+
static create() {
|
|
206
|
+
return new SmartFormGroup({});
|
|
274
207
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
message = yield this.translateService.get('ERRORS.invalidUsernameOrPassword').toPromise();
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
if (!message)
|
|
284
|
-
message = yield this.translateService.get('ERRORS.other').toPromise();
|
|
285
|
-
console.error(obj);
|
|
286
|
-
yield this.toastService.error({ message });
|
|
208
|
+
setForm(form) {
|
|
209
|
+
Object.keys(form.controls).forEach(key => {
|
|
210
|
+
if (this.controls[key])
|
|
211
|
+
this.removeControl(key);
|
|
212
|
+
this.addControl(key, form.controls[key]);
|
|
287
213
|
});
|
|
288
214
|
}
|
|
289
215
|
}
|
|
290
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
291
|
-
ErrorService.decorators = [
|
|
292
|
-
{ type: Injectable }
|
|
293
|
-
];
|
|
294
|
-
/**
|
|
295
|
-
* @type {function(): !Array<(null|{
|
|
296
|
-
* type: ?,
|
|
297
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
298
|
-
* })>}
|
|
299
|
-
* @nocollapse
|
|
300
|
-
*/
|
|
301
|
-
ErrorService.ctorParameters = () => [
|
|
302
|
-
{ type: ToastService },
|
|
303
|
-
{ type: TranslateService }
|
|
304
|
-
];
|
|
305
216
|
|
|
306
|
-
class
|
|
307
|
-
constructor(
|
|
308
|
-
this.
|
|
217
|
+
class DetailsService {
|
|
218
|
+
constructor() {
|
|
219
|
+
this.init();
|
|
309
220
|
}
|
|
310
|
-
get
|
|
311
|
-
return this.
|
|
221
|
+
get $root() {
|
|
222
|
+
return this._root;
|
|
312
223
|
}
|
|
313
|
-
|
|
314
|
-
|
|
224
|
+
init() {
|
|
225
|
+
this._root = null;
|
|
315
226
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
});
|
|
227
|
+
setRoot(obj, force = false) {
|
|
228
|
+
if (!this._root || force)
|
|
229
|
+
this._root = obj;
|
|
320
230
|
}
|
|
321
231
|
}
|
|
322
232
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
323
|
-
|
|
233
|
+
DetailsService.decorators = [
|
|
324
234
|
{ type: Injectable }
|
|
325
235
|
];
|
|
326
236
|
/**
|
|
@@ -330,132 +240,255 @@ HardwareService.decorators = [
|
|
|
330
240
|
* })>}
|
|
331
241
|
* @nocollapse
|
|
332
242
|
*/
|
|
333
|
-
|
|
334
|
-
{ type: Platform }
|
|
335
|
-
];
|
|
243
|
+
DetailsService.ctorParameters = () => [];
|
|
336
244
|
|
|
337
|
-
class
|
|
338
|
-
constructor(
|
|
339
|
-
this.
|
|
340
|
-
this.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
var _a;
|
|
344
|
-
return (_a = this.navParams) === null || _a === void 0 ? void 0 : _a.get(key);
|
|
345
|
-
}
|
|
346
|
-
show(options) {
|
|
347
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
348
|
-
const modalOptions = {
|
|
349
|
-
component: options.component,
|
|
350
|
-
componentProps: options.props,
|
|
351
|
-
cssClass: options.cssClass ? options.cssClass : [],
|
|
352
|
-
backdropDismiss: options.backdropDismiss
|
|
353
|
-
};
|
|
354
|
-
if (options.mode === "bottom") {
|
|
355
|
-
modalOptions.cssClass.push('smart-modal-bottom');
|
|
356
|
-
}
|
|
357
|
-
const modal = yield this.modalCtrl.create(modalOptions);
|
|
358
|
-
yield modal.present();
|
|
359
|
-
return modal;
|
|
360
|
-
});
|
|
245
|
+
class FormFactory {
|
|
246
|
+
constructor(fb, authService, detailsService, validatorsProvider) {
|
|
247
|
+
this.fb = fb;
|
|
248
|
+
this.authService = authService;
|
|
249
|
+
this.detailsService = detailsService;
|
|
250
|
+
this.validatorsProvider = validatorsProvider;
|
|
361
251
|
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
252
|
+
static checkModelMeta(obj) {
|
|
253
|
+
if (!obj)
|
|
254
|
+
throw new Error("You should set object as param");
|
|
255
|
+
if (!Reflect.hasMetadata(SYMBOL_MODEL, obj.constructor))
|
|
256
|
+
throw new Error("You should mark class with @Model decorator");
|
|
366
257
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
ModalService.decorators = [
|
|
370
|
-
{ type: Injectable }
|
|
371
|
-
];
|
|
372
|
-
/**
|
|
373
|
-
* @type {function(): !Array<(null|{
|
|
374
|
-
* type: ?,
|
|
375
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
376
|
-
* })>}
|
|
377
|
-
* @nocollapse
|
|
378
|
-
*/
|
|
379
|
-
ModalService.ctorParameters = () => [
|
|
380
|
-
{ type: ModalController },
|
|
381
|
-
{ type: NavParams, decorators: [{ type: Optional }] }
|
|
382
|
-
];
|
|
383
|
-
|
|
384
|
-
class DynamicComponentLoader {
|
|
385
|
-
constructor(resolver, injector) {
|
|
386
|
-
this.resolver = resolver;
|
|
387
|
-
this.injector = injector;
|
|
258
|
+
static getOptions(obj, key) {
|
|
259
|
+
return Reflect.getMetadata(SYMBOL_FIELD, obj, key);
|
|
388
260
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
components = options.components.filter((comp) => !DynamicComponentLoader.declaredComponents.some((dec) => dec.component === comp)) || [];
|
|
393
|
-
const result = options.components.map((c) => {
|
|
394
|
-
let factory = this.resolver.resolveComponentFactory(c);
|
|
395
|
-
if (!factory) {
|
|
396
|
-
factory = DynamicComponentLoader.declaredComponents.find((x) => x.component === c).factory;
|
|
397
|
-
}
|
|
398
|
-
return {
|
|
399
|
-
component: c,
|
|
400
|
-
factory,
|
|
401
|
-
};
|
|
402
|
-
});
|
|
403
|
-
DynamicComponentLoader.declaredComponents = [
|
|
404
|
-
...DynamicComponentLoader.declaredComponents,
|
|
405
|
-
...result,
|
|
406
|
-
];
|
|
261
|
+
static getOptionsFromMode(options, mode) {
|
|
262
|
+
let result = options;
|
|
263
|
+
if (!mode)
|
|
407
264
|
return result;
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
DynamicComponentLoader.declaredComponents = [];
|
|
412
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
413
|
-
DynamicComponentLoader.decorators = [
|
|
414
|
-
{ type: Injectable }
|
|
415
|
-
];
|
|
416
|
-
/**
|
|
417
|
-
* @type {function(): !Array<(null|{
|
|
418
|
-
* type: ?,
|
|
419
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
420
|
-
* })>}
|
|
421
|
-
* @nocollapse
|
|
422
|
-
*/
|
|
423
|
-
DynamicComponentLoader.ctorParameters = () => [
|
|
424
|
-
{ type: ComponentFactoryResolver },
|
|
425
|
-
{ type: Injector }
|
|
426
|
-
];
|
|
427
|
-
|
|
428
|
-
class NgrxStoreService {
|
|
429
|
-
static addReducer(key, reducer) {
|
|
430
|
-
if (!NgrxStoreService._reducers[key]) {
|
|
431
|
-
NgrxStoreService._reducers[key] = reducer;
|
|
432
|
-
NgrxStoreService.store.addReducer(key, reducer);
|
|
433
|
-
console.log(`${NgrxStoreService.name} register reducer ${key}`);
|
|
265
|
+
if (mode === "create" && _.isObject(options.create)) {
|
|
266
|
+
result = Object.assign(Object.assign({}, options), options.create);
|
|
434
267
|
}
|
|
268
|
+
else if (mode === "update" && _.isObject(options.update)) {
|
|
269
|
+
result = Object.assign(Object.assign({}, options), options.update);
|
|
270
|
+
}
|
|
271
|
+
return result;
|
|
435
272
|
}
|
|
436
|
-
|
|
437
|
-
NgrxStoreService.store = store;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
NgrxStoreService._reducers = {};
|
|
441
|
-
NgrxStoreService.store = undefined;
|
|
442
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
443
|
-
NgrxStoreService.decorators = [
|
|
444
|
-
{ type: Injectable }
|
|
445
|
-
];
|
|
446
|
-
|
|
447
|
-
class PopoverService {
|
|
448
|
-
constructor(popoverCtrl) {
|
|
449
|
-
this.popoverCtrl = popoverCtrl;
|
|
450
|
-
}
|
|
451
|
-
close() {
|
|
273
|
+
create(obj, ops = {}) {
|
|
452
274
|
return __awaiter(this, void 0, void 0, function* () {
|
|
453
|
-
|
|
275
|
+
FormFactory.checkModelMeta(obj);
|
|
276
|
+
const result = SmartFormGroup.create();
|
|
277
|
+
const fields = getModelFieldsWithOptions(obj).filter((field) => {
|
|
278
|
+
var _a, _b;
|
|
279
|
+
return (!ops.mode ||
|
|
280
|
+
(ops.mode === "create" && field.options.create) ||
|
|
281
|
+
(ops.mode === "update" && field.options.update) ||
|
|
282
|
+
(ops.mode === "multiUpdate" && ((_b = (_a = field.options) === null || _a === void 0 ? void 0 : _a.update) === null || _b === void 0 ? void 0 : _b.multi)) ||
|
|
283
|
+
(ops.mode !== "create" &&
|
|
284
|
+
ops.mode !== "update" &&
|
|
285
|
+
field.options.customs &&
|
|
286
|
+
field.options.customs.some((custom) => custom.mode === ops.mode)));
|
|
287
|
+
});
|
|
288
|
+
const enabledDefinitions = [];
|
|
289
|
+
for (let index = 0; index < fields.length; index++) {
|
|
290
|
+
const field = fields[index];
|
|
291
|
+
let control = null;
|
|
292
|
+
const options = FormFactory.getOptionsFromMode(field.options, ops.mode);
|
|
293
|
+
if (options.permissions && !this.authService.expectPermissions(options.permissions)) {
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
if (field.options.type === FieldType.object) {
|
|
297
|
+
control = yield this.create(obj[field.key], Object.assign(Object.assign({}, ops), { root: ops.root ? ops.root : result }));
|
|
298
|
+
}
|
|
299
|
+
else if (field.options.type === FieldType.array) {
|
|
300
|
+
control = this.fb.array([]);
|
|
301
|
+
if (obj[field.key]) {
|
|
302
|
+
for (let indexField = 0; indexField < obj[field.key].length; indexField++) {
|
|
303
|
+
control.push(yield this.create(obj[field.key][indexField], Object.assign(Object.assign({}, ops), { root: ops.root ? ops.root : result })));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
control = this.createControl(obj, field, options.required);
|
|
309
|
+
}
|
|
310
|
+
this.setValidators(field.key, control, options, result, ops.uniqueProvider);
|
|
311
|
+
if (this.validatorsProvider) {
|
|
312
|
+
const providerResult = yield this.validatorsProvider.get({
|
|
313
|
+
key: field.key,
|
|
314
|
+
instance: obj,
|
|
315
|
+
type: obj.constructor,
|
|
316
|
+
base: {
|
|
317
|
+
validators: control.validator,
|
|
318
|
+
asyncValidators: control.asyncValidator
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
control.setValidators(providerResult.validators);
|
|
322
|
+
control.setAsyncValidators(providerResult.asyncValidators);
|
|
323
|
+
}
|
|
324
|
+
result.addControl(field.key, control);
|
|
325
|
+
if (options.confirm && options.type === FieldType.object) {
|
|
326
|
+
throw Error("Object not supported confirms");
|
|
327
|
+
}
|
|
328
|
+
if (options.confirm) {
|
|
329
|
+
const confirmControl = this.fb.control(null, [
|
|
330
|
+
Validators.required,
|
|
331
|
+
(a) => {
|
|
332
|
+
if (a.value !== result.controls[field.key].value) {
|
|
333
|
+
return {
|
|
334
|
+
confirm: true,
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
return null;
|
|
338
|
+
},
|
|
339
|
+
]);
|
|
340
|
+
result.addControl(field.key + "Confirm", confirmControl);
|
|
341
|
+
}
|
|
342
|
+
if (options.enabled) {
|
|
343
|
+
enabledDefinitions.push({
|
|
344
|
+
key: field.key,
|
|
345
|
+
control,
|
|
346
|
+
enabled: options.enabled
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
let rootCheck = null;
|
|
351
|
+
if (enabledDefinitions.some(d => {
|
|
352
|
+
var _a;
|
|
353
|
+
return ((_a = d === null || d === void 0 ? void 0 : d.enabled) === null || _a === void 0 ? void 0 : _a.criteria) &&
|
|
354
|
+
Object.keys(d.enabled.criteria).some(k => k.indexOf(SPECIFICATION_ROOT_KEY) === 0);
|
|
355
|
+
}) && ops.root) {
|
|
356
|
+
rootCheck = ops.root;
|
|
357
|
+
}
|
|
358
|
+
(rootCheck ? rootCheck : result).valueChanges.pipe(tap(() => {
|
|
359
|
+
enabledDefinitions.forEach(def => {
|
|
360
|
+
const enabled = SpecificationService.valid(result.value, def.enabled, {
|
|
361
|
+
$root: rootCheck === null || rootCheck === void 0 ? void 0 : rootCheck.value
|
|
362
|
+
});
|
|
363
|
+
def.control['__smartDisabled'] = !enabled;
|
|
364
|
+
});
|
|
365
|
+
}), delay(0)).subscribe(() => {
|
|
366
|
+
if (rootCheck)
|
|
367
|
+
this.detailsService.setRoot(rootCheck.value, true);
|
|
368
|
+
enabledDefinitions.forEach(def => {
|
|
369
|
+
if (!def.control['__smartDisabled'] && !result.controls[def.key]) {
|
|
370
|
+
result.addControl(def.key, def.control);
|
|
371
|
+
result.updateValueAndValidity();
|
|
372
|
+
}
|
|
373
|
+
else if (def.control['__smartDisabled'] && result.controls[def.key]) {
|
|
374
|
+
result.removeControl(def.key);
|
|
375
|
+
result.updateValueAndValidity();
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
});
|
|
379
|
+
return result;
|
|
454
380
|
});
|
|
455
381
|
}
|
|
382
|
+
setValidators(key, control, options, form, uniqueProvider) {
|
|
383
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
384
|
+
const result = [];
|
|
385
|
+
const asyncResult = [];
|
|
386
|
+
if (options.required) {
|
|
387
|
+
result.push(Validators.required);
|
|
388
|
+
}
|
|
389
|
+
if (options.type === FieldType.email) {
|
|
390
|
+
result.push((c) => {
|
|
391
|
+
if (!c.value)
|
|
392
|
+
return;
|
|
393
|
+
const reg = new RegExp("^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$");
|
|
394
|
+
if (reg.test(c.value))
|
|
395
|
+
return null;
|
|
396
|
+
return { email: true };
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
if (options.type === FieldType.phoneNumber) {
|
|
400
|
+
result.push((c) => {
|
|
401
|
+
if (!c.value)
|
|
402
|
+
return;
|
|
403
|
+
const reg = new RegExp("^((\\+91-?)|0)?[0-9]{9}$");
|
|
404
|
+
if (reg.test(c.value))
|
|
405
|
+
return null;
|
|
406
|
+
return { phoneNumber: true };
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
if (options.type === FieldType.pesel) {
|
|
410
|
+
result.push((c) => {
|
|
411
|
+
if (!c.value)
|
|
412
|
+
return;
|
|
413
|
+
if (PeselService.isValid(c.value))
|
|
414
|
+
return null;
|
|
415
|
+
return { pesel: true };
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
if ((_a = options.possibilities) === null || _a === void 0 ? void 0 : _a.minLength) {
|
|
419
|
+
result.push(Validators.minLength((_b = options.possibilities) === null || _b === void 0 ? void 0 : _b.minLength));
|
|
420
|
+
}
|
|
421
|
+
if ((_c = options.possibilities) === null || _c === void 0 ? void 0 : _c.maxLength) {
|
|
422
|
+
result.push(Validators.maxLength((_d = options.possibilities) === null || _d === void 0 ? void 0 : _d.maxLength));
|
|
423
|
+
}
|
|
424
|
+
if (((_e = options.possibilities) === null || _e === void 0 ? void 0 : _e.min) || ((_f = options.possibilities) === null || _f === void 0 ? void 0 : _f.min) === 0) {
|
|
425
|
+
result.push(Validators.min((_g = options.possibilities) === null || _g === void 0 ? void 0 : _g.min));
|
|
426
|
+
}
|
|
427
|
+
if (((_h = options.possibilities) === null || _h === void 0 ? void 0 : _h.max) || ((_j = options.possibilities) === null || _j === void 0 ? void 0 : _j.max) === 0) {
|
|
428
|
+
result.push(Validators.max((_k = options.possibilities) === null || _k === void 0 ? void 0 : _k.max));
|
|
429
|
+
}
|
|
430
|
+
if (options.unique && uniqueProvider) {
|
|
431
|
+
asyncResult.push((c) => __awaiter(this, void 0, void 0, function* () {
|
|
432
|
+
const record = {
|
|
433
|
+
[key]: options.type === FieldType.int ? c.value : `'${c.value}'`
|
|
434
|
+
};
|
|
435
|
+
if (form.value && options.unique.withFields) {
|
|
436
|
+
options.unique.withFields.forEach(fieldKey => {
|
|
437
|
+
record[fieldKey] = form.value[fieldKey];
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
if (yield uniqueProvider(record))
|
|
441
|
+
return null;
|
|
442
|
+
return {
|
|
443
|
+
invalidUnique: true
|
|
444
|
+
};
|
|
445
|
+
}));
|
|
446
|
+
}
|
|
447
|
+
control.setValidators(result);
|
|
448
|
+
control.setAsyncValidators(asyncResult);
|
|
449
|
+
}
|
|
450
|
+
createControl(obj, field, required) {
|
|
451
|
+
let result;
|
|
452
|
+
const zipCodeValidator = (c) => {
|
|
453
|
+
if (c.value && ZipCodeService.isInvalid(c.value)) {
|
|
454
|
+
return {
|
|
455
|
+
invalidZipCode: true,
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
return null;
|
|
459
|
+
};
|
|
460
|
+
switch (field.options.type) {
|
|
461
|
+
case FieldType.address:
|
|
462
|
+
result = this.fb.group({
|
|
463
|
+
city: ["", required ? [Validators.required] : null],
|
|
464
|
+
street: ["", required ? [Validators.required] : null],
|
|
465
|
+
buildingNumber: ["", required ? [Validators.required] : null],
|
|
466
|
+
flatNumber: [""],
|
|
467
|
+
zipCode: [
|
|
468
|
+
"",
|
|
469
|
+
required
|
|
470
|
+
? [Validators.required, zipCodeValidator]
|
|
471
|
+
: [zipCodeValidator],
|
|
472
|
+
],
|
|
473
|
+
});
|
|
474
|
+
break;
|
|
475
|
+
default:
|
|
476
|
+
result = this.fb.control(null);
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
const value = obj[field.key]
|
|
480
|
+
? obj[field.key]
|
|
481
|
+
: field.options.defaltValue
|
|
482
|
+
? field.options.defaltValue()
|
|
483
|
+
: null;
|
|
484
|
+
if (value)
|
|
485
|
+
result.setValue(value);
|
|
486
|
+
result.updateValueAndValidity();
|
|
487
|
+
return result;
|
|
488
|
+
}
|
|
456
489
|
}
|
|
457
490
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
458
|
-
|
|
491
|
+
FormFactory.decorators = [
|
|
459
492
|
{ type: Injectable }
|
|
460
493
|
];
|
|
461
494
|
/**
|
|
@@ -465,409 +498,326 @@ PopoverService.decorators = [
|
|
|
465
498
|
* })>}
|
|
466
499
|
* @nocollapse
|
|
467
500
|
*/
|
|
468
|
-
|
|
469
|
-
{ type:
|
|
501
|
+
FormFactory.ctorParameters = () => [
|
|
502
|
+
{ type: FormBuilder },
|
|
503
|
+
{ type: AuthService },
|
|
504
|
+
{ type: DetailsService },
|
|
505
|
+
{ type: IModelValidatorsProvider, decorators: [{ type: Optional }, { type: Inject, args: [MODEL_VALIDATORS_PROVIDER,] }] }
|
|
470
506
|
];
|
|
471
507
|
|
|
472
|
-
class
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
this.setColor('tertiary');
|
|
498
|
-
this.setColor('success');
|
|
499
|
-
this.setColor('warning');
|
|
500
|
-
this.setColor('danger');
|
|
501
|
-
this.setColor('dark');
|
|
502
|
-
this.setColor('medium');
|
|
503
|
-
this.setColor('light');
|
|
504
|
-
this.setFont();
|
|
505
|
-
this.setButton();
|
|
506
|
-
this.setMobileBreakpoint();
|
|
507
|
-
}
|
|
508
|
-
setColor(name) {
|
|
509
|
-
this.setProperty(`--smart-color-${name}`, `color-${name}`);
|
|
510
|
-
this.setProperty(`--smart-color-${name}-rgb`, `color-${name}-rgb`);
|
|
511
|
-
this.setProperty(`--smart-color-${name}-contrast`, `color-${name}-contrast`);
|
|
512
|
-
this.setProperty(`--smart-color-${name}-contrast-rgb`, `color-${name}-contrast-rgb`);
|
|
513
|
-
this.setProperty(`--smart-color-${name}-shade`, `color-${name}-shade`);
|
|
514
|
-
this.setProperty(`--smart-color-${name}-tint`, `color-${name}-tint`);
|
|
515
|
-
this.setProperty(`--ion-color-${name}`, `color-${name}`);
|
|
516
|
-
this.setProperty(`--ion-color-${name}-rgb`, `color-${name}-rgb`);
|
|
517
|
-
this.setProperty(`--ion-color-${name}-contrast`, `color-${name}-contrast`);
|
|
518
|
-
this.setProperty(`--ion-color-${name}-contrast-rgb`, `color-${name}-contrast-rgb`);
|
|
519
|
-
this.setProperty(`--ion-color-${name}-shade`, `color-${name}-shade`);
|
|
520
|
-
this.setProperty(`--ion-color-${name}-tint`, `color-${name}-tint`);
|
|
521
|
-
}
|
|
522
|
-
setProperty(property, type) {
|
|
523
|
-
if (!StyleService.style[type])
|
|
524
|
-
return;
|
|
525
|
-
const native = this._elementRef.nativeElement;
|
|
526
|
-
native.style.setProperty(property, StyleService.style[type]);
|
|
527
|
-
}
|
|
528
|
-
setFont() {
|
|
529
|
-
if (isPlatformBrowser(this.platformId) && this.platform.is('ios')) {
|
|
530
|
-
this.setProperty('--ion-font-family', 'ios-font');
|
|
531
|
-
this.setProperty('--default-font-weight', 'ios-font-weight');
|
|
532
|
-
this.setProperty('--default-font-style', 'ios-font-style');
|
|
533
|
-
}
|
|
534
|
-
else if (isPlatformBrowser(this.platformId) && this.platform.is("android")) {
|
|
535
|
-
this.setProperty('--ion-font-family', 'md-font');
|
|
536
|
-
this.setProperty('--default-font-weight', 'md-font-weight');
|
|
537
|
-
this.setProperty('--default-font-style', 'md-font-style');
|
|
538
|
-
}
|
|
539
|
-
else {
|
|
540
|
-
this.setProperty('--ion-font-family', 'font');
|
|
541
|
-
this.setProperty('--default-font-weight', 'font-weight');
|
|
542
|
-
this.setProperty('--default-font-style', 'font-style');
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
setButton() {
|
|
546
|
-
this.setProperty('--smart-button-height', 'button-height');
|
|
547
|
-
this.setProperty('--smart-button-min-width', 'button-min-width');
|
|
548
|
-
this.setProperty('--smart-button-padding-right', 'button-padding-right');
|
|
549
|
-
this.setProperty('--smart-button-padding-left', 'button-padding-left');
|
|
550
|
-
this.setProperty('--smart-button-padding-top', 'button-padding-top');
|
|
551
|
-
this.setProperty('--smart-button-padding-bottom', 'button-padding-bottom');
|
|
552
|
-
this.setProperty('--smart-button-icon-size', 'button-icon-size');
|
|
553
|
-
}
|
|
554
|
-
setMobileBreakpoint() {
|
|
555
|
-
this.setProperty('--phone-breakpoint', 'phone-breakpoint');
|
|
556
|
-
this.setProperty('--tablet-breakpoint', 'tablet-breakpoint');
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
StyleService.style = null;
|
|
560
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
561
|
-
StyleService.decorators = [
|
|
562
|
-
{ type: Injectable }
|
|
563
|
-
];
|
|
564
|
-
/**
|
|
565
|
-
* @type {function(): !Array<(null|{
|
|
566
|
-
* type: ?,
|
|
567
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
568
|
-
* })>}
|
|
569
|
-
* @nocollapse
|
|
570
|
-
*/
|
|
571
|
-
StyleService.ctorParameters = () => [
|
|
572
|
-
{ type: Platform },
|
|
573
|
-
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
|
|
574
|
-
];
|
|
575
|
-
|
|
576
|
-
const FINGERPRINT_PLATFORMS = [
|
|
577
|
-
'android',
|
|
578
|
-
'ios', 'ipad'
|
|
579
|
-
];
|
|
580
|
-
class FingerprintService {
|
|
581
|
-
constructor(platform, faio, translateService, storageService) {
|
|
582
|
-
this.platform = platform;
|
|
583
|
-
this.faio = faio;
|
|
584
|
-
this.translateService = translateService;
|
|
585
|
-
this.storageService = storageService;
|
|
586
|
-
}
|
|
587
|
-
isSet() {
|
|
588
|
-
return FingerprintService.set || !!this.storageService.getItem('FINGERPINT_SET');
|
|
589
|
-
}
|
|
590
|
-
setData(data) {
|
|
591
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
592
|
-
if (!this.isSet() && FINGERPRINT_PLATFORMS.some(p => this.platform.is(p)) && (yield this.faio.isAvailable())) {
|
|
593
|
-
yield this.faio.registerBiometricSecret({
|
|
594
|
-
secret: JSON.stringify(data)
|
|
595
|
-
});
|
|
596
|
-
this.storageService.setItem('FINGERPINT_SET', "1");
|
|
597
|
-
FingerprintService.set = true;
|
|
598
|
-
return;
|
|
599
|
-
}
|
|
600
|
-
// // to tests
|
|
601
|
-
// localStorage.setItem('TEST_FINGERPINT', JSON.stringify(data));
|
|
602
|
-
// localStorage.setItem('FINGERPINT_SET', "1");
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
clearData() {
|
|
606
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
607
|
-
this.storageService.removeItem('FINGERPINT_SET');
|
|
608
|
-
FingerprintService.set = false;
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
getDate(options = {}) {
|
|
612
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
613
|
-
if (!options.force && !this.isSet())
|
|
614
|
-
return null;
|
|
615
|
-
FingerprintService.set = true;
|
|
616
|
-
const data = yield this.faio.loadBiometricSecret({
|
|
617
|
-
title: this.translateService.instant('APP.signIn'),
|
|
618
|
-
cancelButtonTitle: this.translateService.instant('cancel')
|
|
619
|
-
});
|
|
620
|
-
// // to tests
|
|
621
|
-
// const data = localStorage.getItem('TEST_FINGERPINT');
|
|
622
|
-
return JSON.parse(data);
|
|
623
|
-
});
|
|
508
|
+
class SharedFactoriesModule {
|
|
509
|
+
}
|
|
510
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
511
|
+
SharedFactoriesModule.decorators = [
|
|
512
|
+
{ type: NgModule, args: [{
|
|
513
|
+
imports: [
|
|
514
|
+
ReactiveFormsModule
|
|
515
|
+
],
|
|
516
|
+
providers: [
|
|
517
|
+
FormFactory
|
|
518
|
+
]
|
|
519
|
+
},] }
|
|
520
|
+
];
|
|
521
|
+
|
|
522
|
+
function setDefaultTranslationsAndLang(service) {
|
|
523
|
+
const map = {
|
|
524
|
+
'pl': TRANSLATE_DATA_PL,
|
|
525
|
+
'eng': TRANSLATE_DATA_ENG
|
|
526
|
+
};
|
|
527
|
+
Object.keys(map).forEach(key => {
|
|
528
|
+
service.setTranslation(key, map[key], true);
|
|
529
|
+
});
|
|
530
|
+
if (!service.currentLang) {
|
|
531
|
+
const lang = service.getBrowserLang();
|
|
532
|
+
service.use(lang);
|
|
624
533
|
}
|
|
625
534
|
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
getCalendar() {
|
|
736
|
-
return [...this.state.calendar];
|
|
737
|
-
}
|
|
738
|
-
generatePrevMonths() {
|
|
739
|
-
const calendar = this.state.calendar;
|
|
740
|
-
let date = moment$1(calendar[0].year + '-' + calendar[0].number + '-01');
|
|
741
|
-
const dateYearAgo = date.clone().subtract(1, 'year');
|
|
742
|
-
while (date.isSameOrAfter(dateYearAgo)) {
|
|
743
|
-
date = date.clone().subtract(1, 'month');
|
|
744
|
-
calendar.unshift(this.generateMonth(date));
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
generateNextMonths() {
|
|
748
|
-
const calendar = this.state.calendar;
|
|
749
|
-
const dateString = calendar[calendar.length - 1].year + '-' + calendar[calendar.length - 1].number + '-01';
|
|
750
|
-
let date = moment$1(dateString);
|
|
751
|
-
const dateYearNext = date.clone().add(1, 'year');
|
|
752
|
-
while (date.isSameOrBefore(dateYearNext)) {
|
|
753
|
-
date = date.clone().add(1, 'month');
|
|
754
|
-
calendar.push(this.generateMonth(date));
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
initCalendar() {
|
|
758
|
-
const { date } = this.state;
|
|
759
|
-
const firstMonth = this.generateMonth(date);
|
|
760
|
-
const calendar = [firstMonth];
|
|
761
|
-
const currentDate = moment$1().clone();
|
|
762
|
-
const dateYearAgo = currentDate.clone().subtract(2, 'year');
|
|
763
|
-
while (date.isSameOrAfter(dateYearAgo)) { // creating one year calendar
|
|
764
|
-
calendar.unshift(this.previousMonth());
|
|
535
|
+
const TRANSLATE_DATA_ENG = {
|
|
536
|
+
details: 'details',
|
|
537
|
+
admin: 'admin',
|
|
538
|
+
add: 'add',
|
|
539
|
+
change: 'change',
|
|
540
|
+
confirm: 'confirm',
|
|
541
|
+
cancel: 'cancel',
|
|
542
|
+
delete: 'delete',
|
|
543
|
+
undo: 'undo',
|
|
544
|
+
search: 'search',
|
|
545
|
+
page: 'page',
|
|
546
|
+
filters: 'filters',
|
|
547
|
+
or: 'or',
|
|
548
|
+
signInQuicklyWith: 'sign in quickly with',
|
|
549
|
+
selected: "selected",
|
|
550
|
+
select: "select",
|
|
551
|
+
show: "show",
|
|
552
|
+
download: "download",
|
|
553
|
+
play: "play",
|
|
554
|
+
writeHere: "write here",
|
|
555
|
+
next: 'next',
|
|
556
|
+
prev: 'prev',
|
|
557
|
+
edit: "edit",
|
|
558
|
+
save: "save",
|
|
559
|
+
noResults: "no results",
|
|
560
|
+
CALENDAR: {
|
|
561
|
+
DAY_OF_WEEK: {
|
|
562
|
+
Mon: 'Mon',
|
|
563
|
+
Tue: 'Tue',
|
|
564
|
+
Wed: 'Wed',
|
|
565
|
+
Thu: 'Thu',
|
|
566
|
+
Fri: 'Fri',
|
|
567
|
+
Sat: 'Sat',
|
|
568
|
+
Sun: 'Sun',
|
|
569
|
+
},
|
|
570
|
+
MONTH: {
|
|
571
|
+
January: "January",
|
|
572
|
+
February: "February",
|
|
573
|
+
March: "March",
|
|
574
|
+
April: "April",
|
|
575
|
+
May: "May",
|
|
576
|
+
June: "June",
|
|
577
|
+
July: "July",
|
|
578
|
+
August: "August",
|
|
579
|
+
September: "September",
|
|
580
|
+
October: "October",
|
|
581
|
+
November: "November",
|
|
582
|
+
December: "December"
|
|
583
|
+
},
|
|
584
|
+
Today: "Today",
|
|
585
|
+
LastSevenDays: "Last 7 days",
|
|
586
|
+
ThisMonth: "This month",
|
|
587
|
+
Yesterday: "Yesterday",
|
|
588
|
+
LastThirtyDays: "Last 30 days",
|
|
589
|
+
LastMonth: "Last month"
|
|
590
|
+
},
|
|
591
|
+
OBJECT: {
|
|
592
|
+
deleted: 'object deleted',
|
|
593
|
+
confirmDelete: 'confirm delete object'
|
|
594
|
+
},
|
|
595
|
+
APP: {
|
|
596
|
+
logout: 'log out',
|
|
597
|
+
signIn: 'sign in',
|
|
598
|
+
logged: 'logged'
|
|
599
|
+
},
|
|
600
|
+
MODEL: {
|
|
601
|
+
body: 'body',
|
|
602
|
+
buildingNumber: 'building number',
|
|
603
|
+
city: 'city',
|
|
604
|
+
date: 'date',
|
|
605
|
+
disabled: 'disabled',
|
|
606
|
+
email: 'email',
|
|
607
|
+
file: 'file',
|
|
608
|
+
firstName: 'first name',
|
|
609
|
+
flatNumber: 'flat number',
|
|
610
|
+
lastName: 'last name',
|
|
611
|
+
password: 'password',
|
|
612
|
+
passwordConfirm: 'confirm password',
|
|
613
|
+
passwordReset: 'reset password',
|
|
614
|
+
permissions: 'permissions',
|
|
615
|
+
price: 'price',
|
|
616
|
+
send: 'send',
|
|
617
|
+
street: 'street',
|
|
618
|
+
username: 'user name',
|
|
619
|
+
zipCode: 'zip code',
|
|
620
|
+
},
|
|
621
|
+
INPUT: {
|
|
622
|
+
ERRORS: {
|
|
623
|
+
required: 'field is required',
|
|
624
|
+
requires: 'fields are required',
|
|
625
|
+
invalidNip: 'Invalid nip format',
|
|
626
|
+
invalidUnique: 'Invalid unique value',
|
|
627
|
+
invalidFileType: 'Invalid file type',
|
|
628
|
+
confirm: 'bad confirmed',
|
|
629
|
+
invalidEmailFormat: "invalid email format",
|
|
630
|
+
invalidPhoneNumberFormat: "invalid phone number (000000000)",
|
|
631
|
+
invalidPeselFormat: "invalid pesel",
|
|
632
|
+
invalidMinLength: "min length",
|
|
633
|
+
invalidMaxLength: "max length",
|
|
634
|
+
invalidMin: 'min value',
|
|
635
|
+
invalidMax: 'max value',
|
|
636
|
+
upperLetters: "upper letters",
|
|
637
|
+
lowerLetters: "lower letters",
|
|
638
|
+
symbols: "string"
|
|
639
|
+
},
|
|
640
|
+
'PASSWORD-STRENGTH': {
|
|
641
|
+
poor: 'poor',
|
|
642
|
+
notGood: 'not ood',
|
|
643
|
+
good: 'good'
|
|
765
644
|
}
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
}
|
|
771
|
-
previousMonth() {
|
|
772
|
-
const { date } = this.state;
|
|
773
|
-
const newDate = date.subtract(1, 'month');
|
|
774
|
-
const m = this.generateMonth(newDate);
|
|
775
|
-
this.setState({ date: newDate });
|
|
776
|
-
return m;
|
|
645
|
+
},
|
|
646
|
+
ERRORS: {
|
|
647
|
+
invalidUsernameOrPassword: 'Invalid username or password',
|
|
648
|
+
other: 'Error'
|
|
777
649
|
}
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
650
|
+
};
|
|
651
|
+
const TRANSLATE_DATA_PL = {
|
|
652
|
+
details: 'szczegóły',
|
|
653
|
+
admin: 'administrator',
|
|
654
|
+
add: 'dodaj',
|
|
655
|
+
change: 'zmień',
|
|
656
|
+
confirm: 'potwierdź',
|
|
657
|
+
cancel: 'anuluj',
|
|
658
|
+
delete: 'usuń',
|
|
659
|
+
undo: 'cofnij',
|
|
660
|
+
search: 'wyszukaj',
|
|
661
|
+
page: 'strona',
|
|
662
|
+
filters: 'filtry',
|
|
663
|
+
or: 'lub',
|
|
664
|
+
signInQuicklyWith: 'szybko zaloguj się za pomocą',
|
|
665
|
+
selected: "wybrano",
|
|
666
|
+
select: "wybierz",
|
|
667
|
+
show: "pokaż",
|
|
668
|
+
download: "pobierz",
|
|
669
|
+
play: "włącz",
|
|
670
|
+
writeHere: "napisz tutaj",
|
|
671
|
+
next: 'dalej',
|
|
672
|
+
prev: 'wstecz',
|
|
673
|
+
edit: "edycja",
|
|
674
|
+
save: "zapisz",
|
|
675
|
+
noResults: "brak wyników",
|
|
676
|
+
CALENDAR: {
|
|
677
|
+
DAY_OF_WEEK: {
|
|
678
|
+
Mon: 'Pon',
|
|
679
|
+
Tue: 'Wto',
|
|
680
|
+
Wed: 'Śro',
|
|
681
|
+
Thu: 'Czw',
|
|
682
|
+
Fri: 'Pio',
|
|
683
|
+
Sat: 'Sob',
|
|
684
|
+
Sun: 'Nie',
|
|
685
|
+
},
|
|
686
|
+
MONTH: {
|
|
687
|
+
January: "Styczeń",
|
|
688
|
+
February: "Luty",
|
|
689
|
+
March: "Marzec",
|
|
690
|
+
April: "Kwiecień",
|
|
691
|
+
May: "Maj",
|
|
692
|
+
June: "Czerwiec",
|
|
693
|
+
July: "Lipiec",
|
|
694
|
+
August: "Sierpień",
|
|
695
|
+
September: "Wrzesień",
|
|
696
|
+
October: "Październik",
|
|
697
|
+
November: "Listopad",
|
|
698
|
+
December: "Grudzień"
|
|
699
|
+
},
|
|
700
|
+
Today: "Dzisiaj",
|
|
701
|
+
LastSevenDays: "Ostatnie 7 dnii",
|
|
702
|
+
ThisMonth: "Ten miesiąc",
|
|
703
|
+
Yesterday: "Wczoraj",
|
|
704
|
+
LastThirtyDays: "Ostatnie 30 dni",
|
|
705
|
+
LastMonth: "Ostatni miesiąc"
|
|
706
|
+
},
|
|
707
|
+
OBJECT: {
|
|
708
|
+
deleted: 'obiekt został usunięty',
|
|
709
|
+
confirmDelete: 'potwierdź usunięcie'
|
|
710
|
+
},
|
|
711
|
+
APP: {
|
|
712
|
+
logout: 'wyloguj się',
|
|
713
|
+
logged: 'zalogowany',
|
|
714
|
+
signIn: 'zaloguj się'
|
|
715
|
+
},
|
|
716
|
+
MODEL: {
|
|
717
|
+
body: 'treść',
|
|
718
|
+
buildingNumber: 'numer budynku',
|
|
719
|
+
city: 'miasto',
|
|
720
|
+
date: 'data',
|
|
721
|
+
disabled: 'nieaktywny',
|
|
722
|
+
email: 'email',
|
|
723
|
+
file: 'plik',
|
|
724
|
+
firstName: 'imię',
|
|
725
|
+
flatNumber: 'numer lokalu',
|
|
726
|
+
lastName: 'nazwisko',
|
|
727
|
+
password: 'hasło',
|
|
728
|
+
passwordConfirm: 'powtórz hasło',
|
|
729
|
+
passwordReset: 'Nie pamiętam hasła',
|
|
730
|
+
permissions: 'uprawnienia',
|
|
731
|
+
price: 'cena',
|
|
732
|
+
send: 'wyślij',
|
|
733
|
+
street: 'ulica',
|
|
734
|
+
username: 'nazwa użytkownika',
|
|
735
|
+
zipCode: 'kod pocztowy',
|
|
736
|
+
},
|
|
737
|
+
INPUT: {
|
|
738
|
+
ERRORS: {
|
|
739
|
+
required: 'to pole jest wymagane',
|
|
740
|
+
requires: 'te pola są wymagane',
|
|
741
|
+
invalidNip: 'niepoprawny format nip',
|
|
742
|
+
invalidUnique: 'wartość jest już w systemie',
|
|
743
|
+
confirm: 'źle powtórzone',
|
|
744
|
+
invalidEmailFormat: "niepoprawny adres email",
|
|
745
|
+
invalidFileType: 'niepoprawny format pliku',
|
|
746
|
+
invalidPhoneNumberFormat: "niepoprawny numer telefonu (000000000)",
|
|
747
|
+
invalidPeselFormat: "niepoprawny numer pesel",
|
|
748
|
+
invalidMinLength: "minimalna długość",
|
|
749
|
+
invalidMaxLength: "maksymalna długość",
|
|
750
|
+
invalidMin: "minimalna wartość",
|
|
751
|
+
invalidMax: "maksymalna wartość",
|
|
752
|
+
upperLetters: "duże litery",
|
|
753
|
+
lowerLetters: "małe litery",
|
|
754
|
+
symbols: "znaki specjalne"
|
|
755
|
+
},
|
|
756
|
+
'PASSWORD-STRENGTH': {
|
|
757
|
+
poor: 'bardzo słabe',
|
|
758
|
+
notGood: 'słabe',
|
|
759
|
+
good: 'dobre'
|
|
781
760
|
}
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
const monthName = moment$1(date).format('MMMM');
|
|
787
|
-
const year = moment$1(date).format('YYYY');
|
|
788
|
-
const number = moment$1(date).format('MM');
|
|
789
|
-
const monthLength = date.daysInMonth();
|
|
790
|
-
const totalDatesInMonth = this.generateMonthDates(firstDay, monthLength);
|
|
791
|
-
const emptyCellsBeforeFirstDay = Array(firstDay.weekday()).fill(null);
|
|
792
|
-
const dates = [...emptyCellsBeforeFirstDay, ...totalDatesInMonth];
|
|
793
|
-
return {
|
|
794
|
-
dates,
|
|
795
|
-
monthName,
|
|
796
|
-
number,
|
|
797
|
-
year
|
|
798
|
-
};
|
|
799
|
-
}
|
|
800
|
-
generateMonthDates(firstDay, length) {
|
|
801
|
-
return Array(length).fill(null).map((v, i) => moment$1(firstDay).add(i, 'day'));
|
|
761
|
+
},
|
|
762
|
+
ERRORS: {
|
|
763
|
+
invalidUsernameOrPassword: 'Niepoprawna nazwa użytkownika, lub hasło',
|
|
764
|
+
other: 'Wystąpił błąd'
|
|
802
765
|
}
|
|
803
|
-
}
|
|
804
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
805
|
-
CalendarService.decorators = [
|
|
806
|
-
{ type: Injectable }
|
|
807
|
-
];
|
|
808
|
-
/**
|
|
809
|
-
* @type {function(): !Array<(null|{
|
|
810
|
-
* type: ?,
|
|
811
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
812
|
-
* })>}
|
|
813
|
-
* @nocollapse
|
|
814
|
-
*/
|
|
815
|
-
CalendarService.ctorParameters = () => [];
|
|
766
|
+
};
|
|
816
767
|
|
|
817
|
-
class
|
|
818
|
-
constructor(
|
|
819
|
-
this.
|
|
820
|
-
this.alertController = alertController;
|
|
821
|
-
this.toastController = toastController;
|
|
768
|
+
class ToastService {
|
|
769
|
+
constructor(toastCtrl) {
|
|
770
|
+
this.toastCtrl = toastCtrl;
|
|
822
771
|
}
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
const loader = yield this.loadingController.create({
|
|
826
|
-
message: msg || 'loading...',
|
|
827
|
-
});
|
|
828
|
-
yield loader.present();
|
|
829
|
-
return loader;
|
|
830
|
-
});
|
|
772
|
+
addLockError() {
|
|
773
|
+
++ToastService.lockError;
|
|
831
774
|
}
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
const alert = yield this.alertController.create({
|
|
835
|
-
header: heading || 'Alert',
|
|
836
|
-
message: msg,
|
|
837
|
-
buttons: ['OK']
|
|
838
|
-
});
|
|
839
|
-
yield alert.present();
|
|
840
|
-
});
|
|
775
|
+
removeLockError() {
|
|
776
|
+
--ToastService.lockError;
|
|
841
777
|
}
|
|
842
|
-
|
|
778
|
+
error(config) {
|
|
843
779
|
return __awaiter(this, void 0, void 0, function* () {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
780
|
+
if (ToastService.lockError)
|
|
781
|
+
return;
|
|
782
|
+
const toast = yield this.toastCtrl.create({
|
|
783
|
+
position: 'bottom',
|
|
784
|
+
header: config.title,
|
|
785
|
+
message: config.message,
|
|
786
|
+
duration: config.duration ? config.duration : 2000,
|
|
787
|
+
buttons: config.buttons ? config.buttons.map(b => {
|
|
788
|
+
return {
|
|
789
|
+
text: b.text,
|
|
790
|
+
side: b.position,
|
|
791
|
+
role: 'cancel',
|
|
792
|
+
handler: b.handler
|
|
793
|
+
};
|
|
794
|
+
}) : null
|
|
852
795
|
});
|
|
853
|
-
yield
|
|
854
|
-
alert.onDidDismiss().then(() => { callback(); });
|
|
796
|
+
yield toast.present();
|
|
855
797
|
});
|
|
856
798
|
}
|
|
857
|
-
|
|
799
|
+
info(config) {
|
|
858
800
|
return __awaiter(this, void 0, void 0, function* () {
|
|
859
|
-
const toast = yield this.
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
801
|
+
const toast = yield this.toastCtrl.create({
|
|
802
|
+
position: 'bottom',
|
|
803
|
+
header: config.title,
|
|
804
|
+
message: config.message,
|
|
805
|
+
duration: config.duration ? config.duration : 2000,
|
|
806
|
+
buttons: config.buttons ? config.buttons.map(b => {
|
|
807
|
+
return {
|
|
808
|
+
text: b.text,
|
|
809
|
+
side: b.position,
|
|
810
|
+
handler: b.handler
|
|
811
|
+
};
|
|
812
|
+
}) : null
|
|
863
813
|
});
|
|
864
|
-
toast.present();
|
|
865
|
-
return toast;
|
|
814
|
+
yield toast.present();
|
|
866
815
|
});
|
|
867
816
|
}
|
|
868
817
|
}
|
|
818
|
+
ToastService.lockError = 0;
|
|
869
819
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
870
|
-
|
|
820
|
+
ToastService.decorators = [
|
|
871
821
|
{ type: Injectable }
|
|
872
822
|
];
|
|
873
823
|
/**
|
|
@@ -877,155 +827,33 @@ UIService.decorators = [
|
|
|
877
827
|
* })>}
|
|
878
828
|
* @nocollapse
|
|
879
829
|
*/
|
|
880
|
-
|
|
881
|
-
{ type: LoadingController },
|
|
882
|
-
{ type: AlertController },
|
|
830
|
+
ToastService.ctorParameters = () => [
|
|
883
831
|
{ type: ToastController }
|
|
884
832
|
];
|
|
885
833
|
|
|
886
|
-
class
|
|
887
|
-
constructor(
|
|
888
|
-
this.
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
const alert = yield this.alertCtrl.create(options);
|
|
893
|
-
yield alert.present();
|
|
894
|
-
});
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
898
|
-
AlertService.decorators = [
|
|
899
|
-
{ type: Injectable }
|
|
900
|
-
];
|
|
901
|
-
/**
|
|
902
|
-
* @type {function(): !Array<(null|{
|
|
903
|
-
* type: ?,
|
|
904
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
905
|
-
* })>}
|
|
906
|
-
* @nocollapse
|
|
907
|
-
*/
|
|
908
|
-
AlertService.ctorParameters = () => [
|
|
909
|
-
{ type: AlertController }
|
|
910
|
-
];
|
|
911
|
-
|
|
912
|
-
class SharedServicesModule {
|
|
913
|
-
}
|
|
914
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
915
|
-
SharedServicesModule.decorators = [
|
|
916
|
-
{ type: NgModule, args: [{
|
|
917
|
-
imports: [
|
|
918
|
-
IonicModule,
|
|
919
|
-
TranslateModule.forChild(),
|
|
920
|
-
CookieModule.forRoot(),
|
|
921
|
-
],
|
|
922
|
-
providers: [
|
|
923
|
-
ToastService,
|
|
924
|
-
ErrorService,
|
|
925
|
-
HardwareService,
|
|
926
|
-
ModalService,
|
|
927
|
-
DynamicComponentLoader,
|
|
928
|
-
PopoverService,
|
|
929
|
-
StorageService,
|
|
930
|
-
StyleService,
|
|
931
|
-
AuthService,
|
|
932
|
-
FingerprintService,
|
|
933
|
-
FingerprintAIO,
|
|
934
|
-
CameraService,
|
|
935
|
-
FileService,
|
|
936
|
-
CalendarService,
|
|
937
|
-
UIService,
|
|
938
|
-
AlertService
|
|
939
|
-
],
|
|
940
|
-
},] }
|
|
941
|
-
];
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* Only to use in smart-page
|
|
945
|
-
* @requires PageComponent
|
|
946
|
-
*/
|
|
947
|
-
class MenuService {
|
|
948
|
-
constructor(menuCtrl, resolver) {
|
|
949
|
-
this.menuCtrl = menuCtrl;
|
|
950
|
-
this.resolver = resolver;
|
|
951
|
-
this._openedEnd = false;
|
|
952
|
-
this._menuItemsSource = new BehaviorSubject([]);
|
|
953
|
-
this.menuItems$ = this._menuItemsSource.asObservable();
|
|
954
|
-
}
|
|
955
|
-
/**
|
|
956
|
-
* @desc checking if the menu is open (menu on the right side of the screen)
|
|
957
|
-
*/
|
|
958
|
-
get openedEnd() {
|
|
959
|
-
return this._openedEnd;
|
|
960
|
-
}
|
|
961
|
-
changeMenuItemByRoute(route, changes) {
|
|
962
|
-
const items = this._menuItemsSource.value.map(i => {
|
|
963
|
-
if (i.route === route)
|
|
964
|
-
return Object.assign(Object.assign({}, i), changes);
|
|
965
|
-
return i;
|
|
966
|
-
});
|
|
967
|
-
this._menuItemsSource.next(items);
|
|
968
|
-
}
|
|
969
|
-
setMenuItems(items) {
|
|
970
|
-
this._menuItemsSource.next(items);
|
|
971
|
-
}
|
|
972
|
-
/**
|
|
973
|
-
* @private
|
|
974
|
-
*/
|
|
975
|
-
init(endContainer) {
|
|
976
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
977
|
-
this._endContainer = endContainer;
|
|
978
|
-
yield this.menuCtrl.close("end");
|
|
979
|
-
});
|
|
980
|
-
}
|
|
981
|
-
/**
|
|
982
|
-
* @desc open menu (menu on the right side of the screen)
|
|
983
|
-
* @param {object} options - use options
|
|
984
|
-
* @param {class} options.component - angular component to render
|
|
985
|
-
* @param {class} options.injector - angular injector to use in component
|
|
986
|
-
*/
|
|
987
|
-
openEnd(options) {
|
|
988
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
989
|
-
this._openedEnd = true;
|
|
990
|
-
if (this._endContainer) {
|
|
991
|
-
const resolver = options.injector.get(ComponentFactoryResolver);
|
|
992
|
-
this._endContainer.clear();
|
|
993
|
-
const factory = resolver.resolveComponentFactory(options.component);
|
|
994
|
-
this._endContainer.createComponent(factory, 0, options.injector);
|
|
995
|
-
}
|
|
996
|
-
yield this.menuCtrl.enable(true, "end");
|
|
997
|
-
yield this.menuCtrl.open("end");
|
|
998
|
-
});
|
|
999
|
-
}
|
|
1000
|
-
/**
|
|
1001
|
-
* @desc close menu (menu on the left side of the screen)
|
|
1002
|
-
*/
|
|
1003
|
-
closeStart() {
|
|
1004
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1005
|
-
this._openedEnd = false;
|
|
1006
|
-
yield this.menuCtrl.close("start");
|
|
1007
|
-
yield this.menuCtrl.enable(false, "start");
|
|
1008
|
-
});
|
|
1009
|
-
}
|
|
1010
|
-
/**
|
|
1011
|
-
* @desc close menu (menu on the right side of the screen)
|
|
1012
|
-
*/
|
|
1013
|
-
closeEnd() {
|
|
1014
|
-
var _a;
|
|
834
|
+
class ErrorService {
|
|
835
|
+
constructor(toastService, translateService) {
|
|
836
|
+
this.toastService = toastService;
|
|
837
|
+
this.translateService = translateService;
|
|
838
|
+
}
|
|
839
|
+
log(obj) {
|
|
1015
840
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
841
|
+
let message = '';
|
|
842
|
+
if (obj instanceof HttpErrorResponse) {
|
|
843
|
+
if (obj.error && obj.error.details === 'Invalid username or password') {
|
|
844
|
+
message = yield this.translateService.get('ERRORS.invalidUsernameOrPassword').toPromise();
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
if (!message)
|
|
848
|
+
message = yield this.translateService.get('ERRORS.other').toPromise();
|
|
849
|
+
console.error(obj);
|
|
850
|
+
yield this.toastService.error({ message });
|
|
1020
851
|
});
|
|
1021
852
|
}
|
|
1022
853
|
}
|
|
1023
|
-
/** @nocollapse */ MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(i0.ɵɵinject(i1.MenuController), i0.ɵɵinject(i0.ComponentFactoryResolver)); }, token: MenuService, providedIn: "root" });
|
|
1024
854
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1025
|
-
|
|
1026
|
-
{ type: Injectable
|
|
1027
|
-
providedIn: "root",
|
|
1028
|
-
},] }
|
|
855
|
+
ErrorService.decorators = [
|
|
856
|
+
{ type: Injectable }
|
|
1029
857
|
];
|
|
1030
858
|
/**
|
|
1031
859
|
* @type {function(): !Array<(null|{
|
|
@@ -1034,297 +862,315 @@ MenuService.decorators = [
|
|
|
1034
862
|
* })>}
|
|
1035
863
|
* @nocollapse
|
|
1036
864
|
*/
|
|
1037
|
-
|
|
1038
|
-
{ type:
|
|
1039
|
-
{ type:
|
|
865
|
+
ErrorService.ctorParameters = () => [
|
|
866
|
+
{ type: ToastService },
|
|
867
|
+
{ type: TranslateService }
|
|
1040
868
|
];
|
|
1041
869
|
|
|
1042
|
-
class
|
|
1043
|
-
constructor() {
|
|
1044
|
-
this.
|
|
870
|
+
class HardwareService {
|
|
871
|
+
constructor(platform) {
|
|
872
|
+
this.platform = platform;
|
|
1045
873
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
const exist = AppService._endButtonsSource$.value.find(e => e.id === button.id);
|
|
1049
|
-
if (exist) {
|
|
1050
|
-
Object.keys(button).filter(k => k !== 'id').forEach(key => {
|
|
1051
|
-
exist[key] = button[key];
|
|
1052
|
-
});
|
|
1053
|
-
AppService._endButtonsSource$.next([...AppService._endButtonsSource$.value]);
|
|
1054
|
-
return;
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
AppService._endButtonsSource$.next(ArrayService.addItem(AppService._endButtonsSource$.value, button));
|
|
874
|
+
get isMobile() {
|
|
875
|
+
return this.platform.is('capacitor');
|
|
1058
876
|
}
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
}
|
|
1067
|
-
AppService._endButtonsSource$.next([
|
|
1068
|
-
...AppService._endButtonsSource$.value.filter(e => e.id !== buttonOrId)
|
|
1069
|
-
]);
|
|
877
|
+
get isMobileWeb() {
|
|
878
|
+
return this.platform.is('mobileweb');
|
|
879
|
+
}
|
|
880
|
+
onBackButtonClick(callback) {
|
|
881
|
+
return App.addListener('backButton', () => {
|
|
882
|
+
callback();
|
|
883
|
+
});
|
|
1070
884
|
}
|
|
1071
885
|
}
|
|
1072
|
-
AppService._endButtonsSource$ = new BehaviorSubject([]);
|
|
1073
|
-
/** @nocollapse */ AppService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppService_Factory() { return new AppService(); }, token: AppService, providedIn: "root" });
|
|
1074
886
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1075
|
-
|
|
1076
|
-
{ type: Injectable
|
|
1077
|
-
|
|
1078
|
-
|
|
887
|
+
HardwareService.decorators = [
|
|
888
|
+
{ type: Injectable }
|
|
889
|
+
];
|
|
890
|
+
/**
|
|
891
|
+
* @type {function(): !Array<(null|{
|
|
892
|
+
* type: ?,
|
|
893
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
894
|
+
* })>}
|
|
895
|
+
* @nocollapse
|
|
896
|
+
*/
|
|
897
|
+
HardwareService.ctorParameters = () => [
|
|
898
|
+
{ type: Platform }
|
|
1079
899
|
];
|
|
1080
900
|
|
|
1081
|
-
class
|
|
1082
|
-
|
|
1083
|
-
|
|
901
|
+
class ModalService {
|
|
902
|
+
constructor(modalCtrl, navParams) {
|
|
903
|
+
this.modalCtrl = modalCtrl;
|
|
904
|
+
this.navParams = navParams;
|
|
1084
905
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
906
|
+
getParam(key) {
|
|
907
|
+
var _a;
|
|
908
|
+
return (_a = this.navParams) === null || _a === void 0 ? void 0 : _a.get(key);
|
|
909
|
+
}
|
|
910
|
+
show(options) {
|
|
911
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
912
|
+
const modalOptions = {
|
|
913
|
+
component: options.component,
|
|
914
|
+
componentProps: options.props,
|
|
915
|
+
cssClass: options.cssClass ? options.cssClass : [],
|
|
916
|
+
backdropDismiss: options.backdropDismiss
|
|
917
|
+
};
|
|
918
|
+
if (options.mode === "bottom") {
|
|
919
|
+
modalOptions.cssClass.push('smart-modal-bottom');
|
|
920
|
+
}
|
|
921
|
+
const modal = yield this.modalCtrl.create(modalOptions);
|
|
922
|
+
yield modal.present();
|
|
923
|
+
return modal;
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
dismiss(data = null) {
|
|
927
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
928
|
+
yield this.modalCtrl.dismiss(data);
|
|
1090
929
|
});
|
|
1091
930
|
}
|
|
1092
931
|
}
|
|
932
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
933
|
+
ModalService.decorators = [
|
|
934
|
+
{ type: Injectable }
|
|
935
|
+
];
|
|
936
|
+
/**
|
|
937
|
+
* @type {function(): !Array<(null|{
|
|
938
|
+
* type: ?,
|
|
939
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
940
|
+
* })>}
|
|
941
|
+
* @nocollapse
|
|
942
|
+
*/
|
|
943
|
+
ModalService.ctorParameters = () => [
|
|
944
|
+
{ type: ModalController },
|
|
945
|
+
{ type: NavParams, decorators: [{ type: Optional }] }
|
|
946
|
+
];
|
|
1093
947
|
|
|
1094
|
-
class
|
|
1095
|
-
constructor(
|
|
1096
|
-
this.
|
|
1097
|
-
this.
|
|
1098
|
-
this.validatorsProvider = validatorsProvider;
|
|
1099
|
-
}
|
|
1100
|
-
static checkModelMeta(obj) {
|
|
1101
|
-
if (!obj)
|
|
1102
|
-
throw new Error("You should set object as param");
|
|
1103
|
-
if (!Reflect.hasMetadata(SYMBOL_MODEL, obj.constructor))
|
|
1104
|
-
throw new Error("You should mark class with @Model decorator");
|
|
1105
|
-
}
|
|
1106
|
-
static getOptions(obj, key) {
|
|
1107
|
-
return Reflect.getMetadata(SYMBOL_FIELD, obj, key);
|
|
1108
|
-
}
|
|
1109
|
-
static getOptionsFromMode(options, mode) {
|
|
1110
|
-
let result = options;
|
|
1111
|
-
if (!mode)
|
|
1112
|
-
return result;
|
|
1113
|
-
if (mode === "create" && _.isObject(options.create)) {
|
|
1114
|
-
result = Object.assign(Object.assign({}, options), options.create);
|
|
1115
|
-
}
|
|
1116
|
-
else if (mode === "update" && _.isObject(options.update)) {
|
|
1117
|
-
result = Object.assign(Object.assign({}, options), options.update);
|
|
1118
|
-
}
|
|
1119
|
-
return result;
|
|
948
|
+
class DynamicComponentLoader {
|
|
949
|
+
constructor(resolver, injector) {
|
|
950
|
+
this.resolver = resolver;
|
|
951
|
+
this.injector = injector;
|
|
1120
952
|
}
|
|
1121
|
-
|
|
953
|
+
getComponentsWithFactories(options) {
|
|
1122
954
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
const
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
(
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
field.options.customs.some((custom) => custom.mode === ops.mode)));
|
|
1135
|
-
});
|
|
1136
|
-
const enabledDefinitions = [];
|
|
1137
|
-
for (let index = 0; index < fields.length; index++) {
|
|
1138
|
-
const field = fields[index];
|
|
1139
|
-
let control = null;
|
|
1140
|
-
const options = FormFactory.getOptionsFromMode(field.options, ops.mode);
|
|
1141
|
-
if (options.permissions && !this.authService.expectPermissions(options.permissions)) {
|
|
1142
|
-
continue;
|
|
1143
|
-
}
|
|
1144
|
-
if (field.options.type === FieldType.object) {
|
|
1145
|
-
control = yield this.create(obj[field.key], ops);
|
|
1146
|
-
}
|
|
1147
|
-
else if (field.options.type === FieldType.array) {
|
|
1148
|
-
control = this.fb.array([]);
|
|
1149
|
-
if (obj[field.key]) {
|
|
1150
|
-
for (let indexField = 0; indexField < obj[field.key].length; indexField++) {
|
|
1151
|
-
control.push(yield this.create(obj[field.key][indexField], ops));
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
else {
|
|
1156
|
-
control = this.createControl(obj, field, options.required);
|
|
1157
|
-
}
|
|
1158
|
-
this.setValidators(field.key, control, options, result, ops.uniqueProvider);
|
|
1159
|
-
if (this.validatorsProvider) {
|
|
1160
|
-
const providerResult = yield this.validatorsProvider.get({
|
|
1161
|
-
key: field.key,
|
|
1162
|
-
instance: obj,
|
|
1163
|
-
type: obj.constructor,
|
|
1164
|
-
base: {
|
|
1165
|
-
validators: control.validator,
|
|
1166
|
-
asyncValidators: control.asyncValidator
|
|
1167
|
-
}
|
|
1168
|
-
});
|
|
1169
|
-
control.setValidators(providerResult.validators);
|
|
1170
|
-
control.setAsyncValidators(providerResult.asyncValidators);
|
|
1171
|
-
}
|
|
1172
|
-
result.addControl(field.key, control);
|
|
1173
|
-
if (options.confirm && options.type === FieldType.object) {
|
|
1174
|
-
throw Error("Object not supported confirms");
|
|
1175
|
-
}
|
|
1176
|
-
if (options.confirm) {
|
|
1177
|
-
const confirmControl = this.fb.control(null, [
|
|
1178
|
-
Validators.required,
|
|
1179
|
-
(a) => {
|
|
1180
|
-
if (a.value !== result.controls[field.key].value) {
|
|
1181
|
-
return {
|
|
1182
|
-
confirm: true,
|
|
1183
|
-
};
|
|
1184
|
-
}
|
|
1185
|
-
return null;
|
|
1186
|
-
},
|
|
1187
|
-
]);
|
|
1188
|
-
result.addControl(field.key + "Confirm", confirmControl);
|
|
1189
|
-
}
|
|
1190
|
-
if (options.enabled) {
|
|
1191
|
-
enabledDefinitions.push({
|
|
1192
|
-
key: field.key,
|
|
1193
|
-
control,
|
|
1194
|
-
enabled: options.enabled
|
|
1195
|
-
});
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
result.valueChanges.pipe(tap(value => {
|
|
1199
|
-
enabledDefinitions.forEach(def => {
|
|
1200
|
-
const enabled = SpecificationService.valid(value, def.enabled);
|
|
1201
|
-
def.control['__smartDisabled'] = !enabled;
|
|
1202
|
-
});
|
|
1203
|
-
}), delay(0)).subscribe(value => {
|
|
1204
|
-
enabledDefinitions.forEach(def => {
|
|
1205
|
-
if (!def.control['__smartDisabled'] && !result.controls[def.key]) {
|
|
1206
|
-
result.addControl(def.key, def.control);
|
|
1207
|
-
result.updateValueAndValidity();
|
|
1208
|
-
}
|
|
1209
|
-
else if (def.control['__smartDisabled'] && result.controls[def.key]) {
|
|
1210
|
-
result.removeControl(def.key);
|
|
1211
|
-
result.updateValueAndValidity();
|
|
1212
|
-
}
|
|
1213
|
-
});
|
|
955
|
+
let components = [];
|
|
956
|
+
components = options.components.filter((comp) => !DynamicComponentLoader.declaredComponents.some((dec) => dec.component === comp)) || [];
|
|
957
|
+
const result = options.components.map((c) => {
|
|
958
|
+
let factory = this.resolver.resolveComponentFactory(c);
|
|
959
|
+
if (!factory) {
|
|
960
|
+
factory = DynamicComponentLoader.declaredComponents.find((x) => x.component === c).factory;
|
|
961
|
+
}
|
|
962
|
+
return {
|
|
963
|
+
component: c,
|
|
964
|
+
factory,
|
|
965
|
+
};
|
|
1214
966
|
});
|
|
967
|
+
DynamicComponentLoader.declaredComponents = [
|
|
968
|
+
...DynamicComponentLoader.declaredComponents,
|
|
969
|
+
...result,
|
|
970
|
+
];
|
|
1215
971
|
return result;
|
|
1216
972
|
});
|
|
1217
973
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
974
|
+
}
|
|
975
|
+
DynamicComponentLoader.declaredComponents = [];
|
|
976
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
977
|
+
DynamicComponentLoader.decorators = [
|
|
978
|
+
{ type: Injectable }
|
|
979
|
+
];
|
|
980
|
+
/**
|
|
981
|
+
* @type {function(): !Array<(null|{
|
|
982
|
+
* type: ?,
|
|
983
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
984
|
+
* })>}
|
|
985
|
+
* @nocollapse
|
|
986
|
+
*/
|
|
987
|
+
DynamicComponentLoader.ctorParameters = () => [
|
|
988
|
+
{ type: ComponentFactoryResolver },
|
|
989
|
+
{ type: Injector }
|
|
990
|
+
];
|
|
991
|
+
|
|
992
|
+
class PopoverService {
|
|
993
|
+
constructor(popoverCtrl) {
|
|
994
|
+
this.popoverCtrl = popoverCtrl;
|
|
995
|
+
}
|
|
996
|
+
close() {
|
|
997
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
998
|
+
yield this.popoverCtrl.dismiss();
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1003
|
+
PopoverService.decorators = [
|
|
1004
|
+
{ type: Injectable }
|
|
1005
|
+
];
|
|
1006
|
+
/**
|
|
1007
|
+
* @type {function(): !Array<(null|{
|
|
1008
|
+
* type: ?,
|
|
1009
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1010
|
+
* })>}
|
|
1011
|
+
* @nocollapse
|
|
1012
|
+
*/
|
|
1013
|
+
PopoverService.ctorParameters = () => [
|
|
1014
|
+
{ type: PopoverController }
|
|
1015
|
+
];
|
|
1016
|
+
|
|
1017
|
+
class StyleService {
|
|
1018
|
+
constructor(platform, platformId) {
|
|
1019
|
+
this.platform = platform;
|
|
1020
|
+
this.platformId = platformId;
|
|
1021
|
+
}
|
|
1022
|
+
static create(platform, platformId, el, style) {
|
|
1023
|
+
const result = new StyleService(platform, platformId);
|
|
1024
|
+
result.init(el, style);
|
|
1025
|
+
return result;
|
|
1026
|
+
}
|
|
1027
|
+
init(el, style) {
|
|
1028
|
+
this._elementRef = el;
|
|
1029
|
+
this.set(style);
|
|
1030
|
+
}
|
|
1031
|
+
set(style) {
|
|
1032
|
+
if (!style)
|
|
1033
|
+
style = {};
|
|
1034
|
+
if (!StyleService.style)
|
|
1035
|
+
StyleService.style = {};
|
|
1036
|
+
StyleService.style = Object.assign(Object.assign({}, StyleService.style), style);
|
|
1037
|
+
this.execute();
|
|
1038
|
+
}
|
|
1039
|
+
execute() {
|
|
1040
|
+
this.setColor('primary');
|
|
1041
|
+
this.setColor('secondary');
|
|
1042
|
+
this.setColor('tertiary');
|
|
1043
|
+
this.setColor('success');
|
|
1044
|
+
this.setColor('warning');
|
|
1045
|
+
this.setColor('danger');
|
|
1046
|
+
this.setColor('dark');
|
|
1047
|
+
this.setColor('medium');
|
|
1048
|
+
this.setColor('light');
|
|
1049
|
+
this.setFont();
|
|
1050
|
+
this.setButton();
|
|
1051
|
+
this.setMobileBreakpoint();
|
|
1052
|
+
}
|
|
1053
|
+
setColor(name) {
|
|
1054
|
+
this.setProperty(`--smart-color-${name}`, `color-${name}`);
|
|
1055
|
+
this.setProperty(`--smart-color-${name}-rgb`, `color-${name}-rgb`);
|
|
1056
|
+
this.setProperty(`--smart-color-${name}-contrast`, `color-${name}-contrast`);
|
|
1057
|
+
this.setProperty(`--smart-color-${name}-contrast-rgb`, `color-${name}-contrast-rgb`);
|
|
1058
|
+
this.setProperty(`--smart-color-${name}-shade`, `color-${name}-shade`);
|
|
1059
|
+
this.setProperty(`--smart-color-${name}-tint`, `color-${name}-tint`);
|
|
1060
|
+
this.setProperty(`--ion-color-${name}`, `color-${name}`);
|
|
1061
|
+
this.setProperty(`--ion-color-${name}-rgb`, `color-${name}-rgb`);
|
|
1062
|
+
this.setProperty(`--ion-color-${name}-contrast`, `color-${name}-contrast`);
|
|
1063
|
+
this.setProperty(`--ion-color-${name}-contrast-rgb`, `color-${name}-contrast-rgb`);
|
|
1064
|
+
this.setProperty(`--ion-color-${name}-shade`, `color-${name}-shade`);
|
|
1065
|
+
this.setProperty(`--ion-color-${name}-tint`, `color-${name}-tint`);
|
|
1066
|
+
}
|
|
1067
|
+
setProperty(property, type) {
|
|
1068
|
+
if (!StyleService.style[type])
|
|
1069
|
+
return;
|
|
1070
|
+
const native = this._elementRef.nativeElement;
|
|
1071
|
+
native.style.setProperty(property, StyleService.style[type]);
|
|
1072
|
+
}
|
|
1073
|
+
setFont() {
|
|
1074
|
+
if (isPlatformBrowser(this.platformId) && this.platform.is('ios')) {
|
|
1075
|
+
this.setProperty('--ion-font-family', 'ios-font');
|
|
1076
|
+
this.setProperty('--default-font-weight', 'ios-font-weight');
|
|
1077
|
+
this.setProperty('--default-font-style', 'ios-font-style');
|
|
1262
1078
|
}
|
|
1263
|
-
if ((
|
|
1264
|
-
|
|
1079
|
+
else if (isPlatformBrowser(this.platformId) && this.platform.is("android")) {
|
|
1080
|
+
this.setProperty('--ion-font-family', 'md-font');
|
|
1081
|
+
this.setProperty('--default-font-weight', 'md-font-weight');
|
|
1082
|
+
this.setProperty('--default-font-style', 'md-font-style');
|
|
1265
1083
|
}
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
};
|
|
1271
|
-
if (form.value && options.unique.withFields) {
|
|
1272
|
-
options.unique.withFields.forEach(fieldKey => {
|
|
1273
|
-
record[fieldKey] = form.value[fieldKey];
|
|
1274
|
-
});
|
|
1275
|
-
}
|
|
1276
|
-
if (yield uniqueProvider(record))
|
|
1277
|
-
return null;
|
|
1278
|
-
return {
|
|
1279
|
-
invalidUnique: true
|
|
1280
|
-
};
|
|
1281
|
-
}));
|
|
1084
|
+
else {
|
|
1085
|
+
this.setProperty('--ion-font-family', 'font');
|
|
1086
|
+
this.setProperty('--default-font-weight', 'font-weight');
|
|
1087
|
+
this.setProperty('--default-font-style', 'font-style');
|
|
1282
1088
|
}
|
|
1283
|
-
control.setValidators(result);
|
|
1284
|
-
control.setAsyncValidators(asyncResult);
|
|
1285
1089
|
}
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1090
|
+
setButton() {
|
|
1091
|
+
this.setProperty('--smart-button-height', 'button-height');
|
|
1092
|
+
this.setProperty('--smart-button-min-width', 'button-min-width');
|
|
1093
|
+
this.setProperty('--smart-button-padding-right', 'button-padding-right');
|
|
1094
|
+
this.setProperty('--smart-button-padding-left', 'button-padding-left');
|
|
1095
|
+
this.setProperty('--smart-button-padding-top', 'button-padding-top');
|
|
1096
|
+
this.setProperty('--smart-button-padding-bottom', 'button-padding-bottom');
|
|
1097
|
+
this.setProperty('--smart-button-icon-size', 'button-icon-size');
|
|
1098
|
+
}
|
|
1099
|
+
setMobileBreakpoint() {
|
|
1100
|
+
this.setProperty('--phone-breakpoint', 'phone-breakpoint');
|
|
1101
|
+
this.setProperty('--tablet-breakpoint', 'tablet-breakpoint');
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
StyleService.style = null;
|
|
1105
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1106
|
+
StyleService.decorators = [
|
|
1107
|
+
{ type: Injectable }
|
|
1108
|
+
];
|
|
1109
|
+
/**
|
|
1110
|
+
* @type {function(): !Array<(null|{
|
|
1111
|
+
* type: ?,
|
|
1112
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1113
|
+
* })>}
|
|
1114
|
+
* @nocollapse
|
|
1115
|
+
*/
|
|
1116
|
+
StyleService.ctorParameters = () => [
|
|
1117
|
+
{ type: Platform },
|
|
1118
|
+
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
|
|
1119
|
+
];
|
|
1120
|
+
|
|
1121
|
+
const FINGERPRINT_PLATFORMS = [
|
|
1122
|
+
'android',
|
|
1123
|
+
'ios', 'ipad'
|
|
1124
|
+
];
|
|
1125
|
+
class FingerprintService {
|
|
1126
|
+
constructor(platform, faio, translateService, storageService) {
|
|
1127
|
+
this.platform = platform;
|
|
1128
|
+
this.faio = faio;
|
|
1129
|
+
this.translateService = translateService;
|
|
1130
|
+
this.storageService = storageService;
|
|
1131
|
+
}
|
|
1132
|
+
isSet() {
|
|
1133
|
+
return FingerprintService.set || !!this.storageService.getItem('FINGERPINT_SET');
|
|
1134
|
+
}
|
|
1135
|
+
setData(data) {
|
|
1136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1137
|
+
if (!this.isSet() && FINGERPRINT_PLATFORMS.some(p => this.platform.is(p)) && (yield this.faio.isAvailable())) {
|
|
1138
|
+
yield this.faio.registerBiometricSecret({
|
|
1139
|
+
secret: JSON.stringify(data)
|
|
1309
1140
|
});
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1141
|
+
this.storageService.setItem('FINGERPINT_SET', "1");
|
|
1142
|
+
FingerprintService.set = true;
|
|
1143
|
+
return;
|
|
1144
|
+
}
|
|
1145
|
+
// // to tests
|
|
1146
|
+
// localStorage.setItem('TEST_FINGERPINT', JSON.stringify(data));
|
|
1147
|
+
// localStorage.setItem('FINGERPINT_SET', "1");
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
clearData() {
|
|
1151
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1152
|
+
this.storageService.removeItem('FINGERPINT_SET');
|
|
1153
|
+
FingerprintService.set = false;
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
getDate(options = {}) {
|
|
1157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1158
|
+
if (!options.force && !this.isSet())
|
|
1159
|
+
return null;
|
|
1160
|
+
FingerprintService.set = true;
|
|
1161
|
+
const data = yield this.faio.loadBiometricSecret({
|
|
1162
|
+
title: this.translateService.instant('APP.signIn'),
|
|
1163
|
+
cancelButtonTitle: this.translateService.instant('cancel')
|
|
1164
|
+
});
|
|
1165
|
+
// // to tests
|
|
1166
|
+
// const data = localStorage.getItem('TEST_FINGERPINT');
|
|
1167
|
+
return JSON.parse(data);
|
|
1168
|
+
});
|
|
1324
1169
|
}
|
|
1325
1170
|
}
|
|
1171
|
+
FingerprintService.set = false;
|
|
1326
1172
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1327
|
-
|
|
1173
|
+
FingerprintService.decorators = [
|
|
1328
1174
|
{ type: Injectable }
|
|
1329
1175
|
];
|
|
1330
1176
|
/**
|
|
@@ -1334,271 +1180,311 @@ FormFactory.decorators = [
|
|
|
1334
1180
|
* })>}
|
|
1335
1181
|
* @nocollapse
|
|
1336
1182
|
*/
|
|
1337
|
-
|
|
1338
|
-
{ type:
|
|
1339
|
-
{ type:
|
|
1340
|
-
{ type:
|
|
1183
|
+
FingerprintService.ctorParameters = () => [
|
|
1184
|
+
{ type: Platform },
|
|
1185
|
+
{ type: FingerprintAIO },
|
|
1186
|
+
{ type: TranslateService },
|
|
1187
|
+
{ type: StorageService }
|
|
1341
1188
|
];
|
|
1342
1189
|
|
|
1343
|
-
|
|
1190
|
+
const { Camera } = Plugins;
|
|
1191
|
+
class CameraService {
|
|
1192
|
+
getCapture(options = {}) {
|
|
1193
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1194
|
+
const image = yield Camera.getPhoto({
|
|
1195
|
+
quality: options.quality ? options.quality : 100,
|
|
1196
|
+
resultType: CameraResultType.Base64
|
|
1197
|
+
});
|
|
1198
|
+
return {
|
|
1199
|
+
data: image.base64String,
|
|
1200
|
+
exif: image.exif
|
|
1201
|
+
};
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1344
1204
|
}
|
|
1345
1205
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1346
|
-
|
|
1347
|
-
{ type:
|
|
1348
|
-
imports: [
|
|
1349
|
-
ReactiveFormsModule
|
|
1350
|
-
],
|
|
1351
|
-
providers: [
|
|
1352
|
-
FormFactory
|
|
1353
|
-
]
|
|
1354
|
-
},] }
|
|
1206
|
+
CameraService.decorators = [
|
|
1207
|
+
{ type: Injectable }
|
|
1355
1208
|
];
|
|
1356
1209
|
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1210
|
+
const FILE_SERVICE_CONFIG = new InjectionToken('FILE_SERVICE_CONFIG');
|
|
1211
|
+
class FileService {
|
|
1212
|
+
constructor(config, http) {
|
|
1213
|
+
this.config = config;
|
|
1214
|
+
this.http = http;
|
|
1215
|
+
}
|
|
1216
|
+
upload(file, callback) {
|
|
1217
|
+
const formData = new FormData();
|
|
1218
|
+
formData.append('file', file, file.name);
|
|
1219
|
+
return this.http.post(this.config.apiUrl + '/attachments', formData, {
|
|
1220
|
+
reportProgress: true,
|
|
1221
|
+
observe: 'events'
|
|
1222
|
+
}).pipe(map((event) => {
|
|
1223
|
+
if (event.type === HttpEventType.UploadProgress) {
|
|
1224
|
+
const percentDone = Math.round(100 * event.loaded / event.total);
|
|
1225
|
+
return percentDone;
|
|
1226
|
+
}
|
|
1227
|
+
if (event.type === HttpEventType.Response) {
|
|
1228
|
+
if (callback)
|
|
1229
|
+
callback(event.body);
|
|
1230
|
+
return 100;
|
|
1231
|
+
}
|
|
1232
|
+
}));
|
|
1233
|
+
}
|
|
1234
|
+
download(id) {
|
|
1235
|
+
window.open(this.getUrl(id), '_blank').focus();
|
|
1236
|
+
}
|
|
1237
|
+
delete(id) {
|
|
1238
|
+
return this.http.delete(this.config.apiUrl + '/attachments/' + id).toPromise();
|
|
1239
|
+
}
|
|
1240
|
+
getUrl(id) {
|
|
1241
|
+
return this.config.apiUrl + '/attachments/' + id;
|
|
1368
1242
|
}
|
|
1369
1243
|
}
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
November: "November",
|
|
1417
|
-
December: "December"
|
|
1418
|
-
},
|
|
1419
|
-
Today: "Today",
|
|
1420
|
-
LastSevenDays: "Last 7 days",
|
|
1421
|
-
ThisMonth: "This month",
|
|
1422
|
-
Yesterday: "Yesterday",
|
|
1423
|
-
LastThirtyDays: "Last 30 days",
|
|
1424
|
-
LastMonth: "Last month"
|
|
1425
|
-
},
|
|
1426
|
-
OBJECT: {
|
|
1427
|
-
deleted: 'object deleted',
|
|
1428
|
-
confirmDelete: 'confirm delete object'
|
|
1429
|
-
},
|
|
1430
|
-
APP: {
|
|
1431
|
-
logout: 'log out',
|
|
1432
|
-
signIn: 'sign in',
|
|
1433
|
-
logged: 'logged'
|
|
1434
|
-
},
|
|
1435
|
-
MODEL: {
|
|
1436
|
-
body: 'body',
|
|
1437
|
-
buildingNumber: 'building number',
|
|
1438
|
-
city: 'city',
|
|
1439
|
-
date: 'date',
|
|
1440
|
-
disabled: 'disabled',
|
|
1441
|
-
email: 'email',
|
|
1442
|
-
file: 'file',
|
|
1443
|
-
firstName: 'first name',
|
|
1444
|
-
flatNumber: 'flat number',
|
|
1445
|
-
lastName: 'last name',
|
|
1446
|
-
password: 'password',
|
|
1447
|
-
passwordConfirm: 'confirm password',
|
|
1448
|
-
passwordReset: 'reset password',
|
|
1449
|
-
permissions: 'permissions',
|
|
1450
|
-
price: 'price',
|
|
1451
|
-
send: 'send',
|
|
1452
|
-
street: 'street',
|
|
1453
|
-
username: 'user name',
|
|
1454
|
-
zipCode: 'zip code',
|
|
1455
|
-
},
|
|
1456
|
-
INPUT: {
|
|
1457
|
-
ERRORS: {
|
|
1458
|
-
required: 'field is required',
|
|
1459
|
-
requires: 'fields are required',
|
|
1460
|
-
invalidNip: 'Invalid nip format',
|
|
1461
|
-
invalidUnique: 'Invalid unique value',
|
|
1462
|
-
invalidFileType: 'Invalid file type',
|
|
1463
|
-
confirm: 'bad confirmed',
|
|
1464
|
-
invalidEmailFormat: "invalid email format",
|
|
1465
|
-
invalidPhoneNumberFormat: "invalid phone number (000000000)",
|
|
1466
|
-
invalidPeselFormat: "invalid pesel",
|
|
1467
|
-
invalidMinLength: "min length",
|
|
1468
|
-
invalidMaxLength: "max length",
|
|
1469
|
-
invalidMin: 'min value',
|
|
1470
|
-
invalidMax: 'max value',
|
|
1471
|
-
upperLetters: "upper letters",
|
|
1472
|
-
lowerLetters: "lower letters",
|
|
1473
|
-
symbols: "string"
|
|
1474
|
-
},
|
|
1475
|
-
'PASSWORD-STRENGTH': {
|
|
1476
|
-
poor: 'poor',
|
|
1477
|
-
notGood: 'not ood',
|
|
1478
|
-
good: 'good'
|
|
1244
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1245
|
+
FileService.decorators = [
|
|
1246
|
+
{ type: Injectable }
|
|
1247
|
+
];
|
|
1248
|
+
/**
|
|
1249
|
+
* @type {function(): !Array<(null|{
|
|
1250
|
+
* type: ?,
|
|
1251
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1252
|
+
* })>}
|
|
1253
|
+
* @nocollapse
|
|
1254
|
+
*/
|
|
1255
|
+
FileService.ctorParameters = () => [
|
|
1256
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [FILE_SERVICE_CONFIG,] }] },
|
|
1257
|
+
{ type: HttpClient }
|
|
1258
|
+
];
|
|
1259
|
+
|
|
1260
|
+
class CalendarService {
|
|
1261
|
+
constructor() {
|
|
1262
|
+
this.state = {
|
|
1263
|
+
date: moment$1().add(2, 'year'),
|
|
1264
|
+
calendar: [
|
|
1265
|
+
{
|
|
1266
|
+
dates: null,
|
|
1267
|
+
monthName: null,
|
|
1268
|
+
number: null,
|
|
1269
|
+
year: null
|
|
1270
|
+
}
|
|
1271
|
+
]
|
|
1272
|
+
};
|
|
1273
|
+
this.setState = (nextState) => {
|
|
1274
|
+
this.state = Object.assign(Object.assign({}, this.state), nextState);
|
|
1275
|
+
};
|
|
1276
|
+
//this service is a singleton therefore its constructor will only
|
|
1277
|
+
//be called once during the application life cycle
|
|
1278
|
+
this.initCalendar();
|
|
1279
|
+
}
|
|
1280
|
+
getCalendar() {
|
|
1281
|
+
return [...this.state.calendar];
|
|
1282
|
+
}
|
|
1283
|
+
generatePrevMonths() {
|
|
1284
|
+
const calendar = this.state.calendar;
|
|
1285
|
+
let date = moment$1(calendar[0].year + '-' + calendar[0].number + '-01');
|
|
1286
|
+
const dateYearAgo = date.clone().subtract(1, 'year');
|
|
1287
|
+
while (date.isSameOrAfter(dateYearAgo)) {
|
|
1288
|
+
date = date.clone().subtract(1, 'month');
|
|
1289
|
+
calendar.unshift(this.generateMonth(date));
|
|
1479
1290
|
}
|
|
1480
|
-
},
|
|
1481
|
-
ERRORS: {
|
|
1482
|
-
invalidUsernameOrPassword: 'Invalid username or password',
|
|
1483
|
-
other: 'Error'
|
|
1484
1291
|
}
|
|
1485
|
-
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
delete: 'usuń',
|
|
1494
|
-
undo: 'cofnij',
|
|
1495
|
-
search: 'wyszukaj',
|
|
1496
|
-
page: 'strona',
|
|
1497
|
-
filters: 'filtry',
|
|
1498
|
-
or: 'lub',
|
|
1499
|
-
signInQuicklyWith: 'szybko zaloguj się za pomocą',
|
|
1500
|
-
selected: "wybrano",
|
|
1501
|
-
select: "wybierz",
|
|
1502
|
-
show: "pokaż",
|
|
1503
|
-
download: "pobierz",
|
|
1504
|
-
play: "włącz",
|
|
1505
|
-
writeHere: "napisz tutaj",
|
|
1506
|
-
next: 'dalej',
|
|
1507
|
-
prev: 'wstecz',
|
|
1508
|
-
edit: "edycja",
|
|
1509
|
-
save: "zapisz",
|
|
1510
|
-
noResults: "brak wyników",
|
|
1511
|
-
CALENDAR: {
|
|
1512
|
-
DAY_OF_WEEK: {
|
|
1513
|
-
Mon: 'Pon',
|
|
1514
|
-
Tue: 'Wto',
|
|
1515
|
-
Wed: 'Śro',
|
|
1516
|
-
Thu: 'Czw',
|
|
1517
|
-
Fri: 'Pio',
|
|
1518
|
-
Sat: 'Sob',
|
|
1519
|
-
Sun: 'Nie',
|
|
1520
|
-
},
|
|
1521
|
-
MONTH: {
|
|
1522
|
-
January: "Styczeń",
|
|
1523
|
-
February: "Luty",
|
|
1524
|
-
March: "Marzec",
|
|
1525
|
-
April: "Kwiecień",
|
|
1526
|
-
May: "Maj",
|
|
1527
|
-
June: "Czerwiec",
|
|
1528
|
-
July: "Lipiec",
|
|
1529
|
-
August: "Sierpień",
|
|
1530
|
-
September: "Wrzesień",
|
|
1531
|
-
October: "Październik",
|
|
1532
|
-
November: "Listopad",
|
|
1533
|
-
December: "Grudzień"
|
|
1534
|
-
},
|
|
1535
|
-
Today: "Dzisiaj",
|
|
1536
|
-
LastSevenDays: "Ostatnie 7 dnii",
|
|
1537
|
-
ThisMonth: "Ten miesiąc",
|
|
1538
|
-
Yesterday: "Wczoraj",
|
|
1539
|
-
LastThirtyDays: "Ostatnie 30 dni",
|
|
1540
|
-
LastMonth: "Ostatni miesiąc"
|
|
1541
|
-
},
|
|
1542
|
-
OBJECT: {
|
|
1543
|
-
deleted: 'obiekt został usunięty',
|
|
1544
|
-
confirmDelete: 'potwierdź usunięcie'
|
|
1545
|
-
},
|
|
1546
|
-
APP: {
|
|
1547
|
-
logout: 'wyloguj się',
|
|
1548
|
-
logged: 'zalogowany',
|
|
1549
|
-
signIn: 'zaloguj się'
|
|
1550
|
-
},
|
|
1551
|
-
MODEL: {
|
|
1552
|
-
body: 'treść',
|
|
1553
|
-
buildingNumber: 'numer budynku',
|
|
1554
|
-
city: 'miasto',
|
|
1555
|
-
date: 'data',
|
|
1556
|
-
disabled: 'nieaktywny',
|
|
1557
|
-
email: 'email',
|
|
1558
|
-
file: 'plik',
|
|
1559
|
-
firstName: 'imię',
|
|
1560
|
-
flatNumber: 'numer lokalu',
|
|
1561
|
-
lastName: 'nazwisko',
|
|
1562
|
-
password: 'hasło',
|
|
1563
|
-
passwordConfirm: 'powtórz hasło',
|
|
1564
|
-
passwordReset: 'Nie pamiętam hasła',
|
|
1565
|
-
permissions: 'uprawnienia',
|
|
1566
|
-
price: 'cena',
|
|
1567
|
-
send: 'wyślij',
|
|
1568
|
-
street: 'ulica',
|
|
1569
|
-
username: 'nazwa użytkownika',
|
|
1570
|
-
zipCode: 'kod pocztowy',
|
|
1571
|
-
},
|
|
1572
|
-
INPUT: {
|
|
1573
|
-
ERRORS: {
|
|
1574
|
-
required: 'to pole jest wymagane',
|
|
1575
|
-
requires: 'te pola są wymagane',
|
|
1576
|
-
invalidNip: 'niepoprawny format nip',
|
|
1577
|
-
invalidUnique: 'wartość jest już w systemie',
|
|
1578
|
-
confirm: 'źle powtórzone',
|
|
1579
|
-
invalidEmailFormat: "niepoprawny adres email",
|
|
1580
|
-
invalidFileType: 'niepoprawny format pliku',
|
|
1581
|
-
invalidPhoneNumberFormat: "niepoprawny numer telefonu (000000000)",
|
|
1582
|
-
invalidPeselFormat: "niepoprawny numer pesel",
|
|
1583
|
-
invalidMinLength: "minimalna długość",
|
|
1584
|
-
invalidMaxLength: "maksymalna długość",
|
|
1585
|
-
invalidMin: "minimalna wartość",
|
|
1586
|
-
invalidMax: "maksymalna wartość",
|
|
1587
|
-
upperLetters: "duże litery",
|
|
1588
|
-
lowerLetters: "małe litery",
|
|
1589
|
-
symbols: "znaki specjalne"
|
|
1590
|
-
},
|
|
1591
|
-
'PASSWORD-STRENGTH': {
|
|
1592
|
-
poor: 'bardzo słabe',
|
|
1593
|
-
notGood: 'słabe',
|
|
1594
|
-
good: 'dobre'
|
|
1292
|
+
generateNextMonths() {
|
|
1293
|
+
const calendar = this.state.calendar;
|
|
1294
|
+
const dateString = calendar[calendar.length - 1].year + '-' + calendar[calendar.length - 1].number + '-01';
|
|
1295
|
+
let date = moment$1(dateString);
|
|
1296
|
+
const dateYearNext = date.clone().add(1, 'year');
|
|
1297
|
+
while (date.isSameOrBefore(dateYearNext)) {
|
|
1298
|
+
date = date.clone().add(1, 'month');
|
|
1299
|
+
calendar.push(this.generateMonth(date));
|
|
1595
1300
|
}
|
|
1596
|
-
},
|
|
1597
|
-
ERRORS: {
|
|
1598
|
-
invalidUsernameOrPassword: 'Niepoprawna nazwa użytkownika, lub hasło',
|
|
1599
|
-
other: 'Wystąpił błąd'
|
|
1600
1301
|
}
|
|
1601
|
-
|
|
1302
|
+
initCalendar() {
|
|
1303
|
+
const { date } = this.state;
|
|
1304
|
+
const firstMonth = this.generateMonth(date);
|
|
1305
|
+
const calendar = [firstMonth];
|
|
1306
|
+
const currentDate = moment$1().clone();
|
|
1307
|
+
const dateYearAgo = currentDate.clone().subtract(2, 'year');
|
|
1308
|
+
while (date.isSameOrAfter(dateYearAgo)) { // creating one year calendar
|
|
1309
|
+
calendar.unshift(this.previousMonth());
|
|
1310
|
+
}
|
|
1311
|
+
this.state.date = moment$1();
|
|
1312
|
+
const currentMonthIndex = calendar.length - 13;
|
|
1313
|
+
calendar[currentMonthIndex].dates = calendar[currentMonthIndex].dates.filter(this.filterFutureDates);
|
|
1314
|
+
this.setState({ calendar: calendar });
|
|
1315
|
+
}
|
|
1316
|
+
previousMonth() {
|
|
1317
|
+
const { date } = this.state;
|
|
1318
|
+
const newDate = date.subtract(1, 'month');
|
|
1319
|
+
const m = this.generateMonth(newDate);
|
|
1320
|
+
this.setState({ date: newDate });
|
|
1321
|
+
return m;
|
|
1322
|
+
}
|
|
1323
|
+
filterFutureDates(date) {
|
|
1324
|
+
if (!date) {
|
|
1325
|
+
return true;
|
|
1326
|
+
}
|
|
1327
|
+
return date.isSameOrBefore(moment$1());
|
|
1328
|
+
}
|
|
1329
|
+
generateMonth(date) {
|
|
1330
|
+
const firstDay = moment$1(date).startOf('month');
|
|
1331
|
+
const monthName = moment$1(date).format('MMMM');
|
|
1332
|
+
const year = moment$1(date).format('YYYY');
|
|
1333
|
+
const number = moment$1(date).format('MM');
|
|
1334
|
+
const monthLength = date.daysInMonth();
|
|
1335
|
+
const totalDatesInMonth = this.generateMonthDates(firstDay, monthLength);
|
|
1336
|
+
const emptyCellsBeforeFirstDay = Array(firstDay.weekday()).fill(null);
|
|
1337
|
+
const dates = [...emptyCellsBeforeFirstDay, ...totalDatesInMonth];
|
|
1338
|
+
return {
|
|
1339
|
+
dates,
|
|
1340
|
+
monthName,
|
|
1341
|
+
number,
|
|
1342
|
+
year
|
|
1343
|
+
};
|
|
1344
|
+
}
|
|
1345
|
+
generateMonthDates(firstDay, length) {
|
|
1346
|
+
return Array(length).fill(null).map((v, i) => moment$1(firstDay).add(i, 'day'));
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1350
|
+
CalendarService.decorators = [
|
|
1351
|
+
{ type: Injectable }
|
|
1352
|
+
];
|
|
1353
|
+
/**
|
|
1354
|
+
* @type {function(): !Array<(null|{
|
|
1355
|
+
* type: ?,
|
|
1356
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1357
|
+
* })>}
|
|
1358
|
+
* @nocollapse
|
|
1359
|
+
*/
|
|
1360
|
+
CalendarService.ctorParameters = () => [];
|
|
1361
|
+
|
|
1362
|
+
class UIService {
|
|
1363
|
+
constructor(loadingController, alertController, toastController) {
|
|
1364
|
+
this.loadingController = loadingController;
|
|
1365
|
+
this.alertController = alertController;
|
|
1366
|
+
this.toastController = toastController;
|
|
1367
|
+
}
|
|
1368
|
+
showLoading(msg) {
|
|
1369
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1370
|
+
const loader = yield this.loadingController.create({
|
|
1371
|
+
message: msg || 'loading...',
|
|
1372
|
+
});
|
|
1373
|
+
yield loader.present();
|
|
1374
|
+
return loader;
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
showSimpleAlert(msg, heading) {
|
|
1378
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1379
|
+
const alert = yield this.alertController.create({
|
|
1380
|
+
header: heading || 'Alert',
|
|
1381
|
+
message: msg,
|
|
1382
|
+
buttons: ['OK']
|
|
1383
|
+
});
|
|
1384
|
+
yield alert.present();
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
showAlertWithDismissCallback(heading, msg, btnText, callback) {
|
|
1388
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1389
|
+
const alert = yield this.alertController.create({
|
|
1390
|
+
header: heading,
|
|
1391
|
+
message: msg,
|
|
1392
|
+
buttons: [
|
|
1393
|
+
{
|
|
1394
|
+
text: btnText,
|
|
1395
|
+
}
|
|
1396
|
+
]
|
|
1397
|
+
});
|
|
1398
|
+
yield alert.present();
|
|
1399
|
+
alert.onDidDismiss().then(() => { callback(); });
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
showToast(msg, duration) {
|
|
1403
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1404
|
+
const toast = yield this.toastController.create({
|
|
1405
|
+
message: msg,
|
|
1406
|
+
color: 'dark',
|
|
1407
|
+
duration: duration || 2000
|
|
1408
|
+
});
|
|
1409
|
+
toast.present();
|
|
1410
|
+
return toast;
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1415
|
+
UIService.decorators = [
|
|
1416
|
+
{ type: Injectable }
|
|
1417
|
+
];
|
|
1418
|
+
/**
|
|
1419
|
+
* @type {function(): !Array<(null|{
|
|
1420
|
+
* type: ?,
|
|
1421
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1422
|
+
* })>}
|
|
1423
|
+
* @nocollapse
|
|
1424
|
+
*/
|
|
1425
|
+
UIService.ctorParameters = () => [
|
|
1426
|
+
{ type: LoadingController },
|
|
1427
|
+
{ type: AlertController },
|
|
1428
|
+
{ type: ToastController }
|
|
1429
|
+
];
|
|
1430
|
+
|
|
1431
|
+
class AlertService {
|
|
1432
|
+
constructor(alertCtrl) {
|
|
1433
|
+
this.alertCtrl = alertCtrl;
|
|
1434
|
+
}
|
|
1435
|
+
show(options) {
|
|
1436
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1437
|
+
const alert = yield this.alertCtrl.create(options);
|
|
1438
|
+
yield alert.present();
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1443
|
+
AlertService.decorators = [
|
|
1444
|
+
{ type: Injectable }
|
|
1445
|
+
];
|
|
1446
|
+
/**
|
|
1447
|
+
* @type {function(): !Array<(null|{
|
|
1448
|
+
* type: ?,
|
|
1449
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1450
|
+
* })>}
|
|
1451
|
+
* @nocollapse
|
|
1452
|
+
*/
|
|
1453
|
+
AlertService.ctorParameters = () => [
|
|
1454
|
+
{ type: AlertController }
|
|
1455
|
+
];
|
|
1456
|
+
|
|
1457
|
+
class SharedServicesModule {
|
|
1458
|
+
}
|
|
1459
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1460
|
+
SharedServicesModule.decorators = [
|
|
1461
|
+
{ type: NgModule, args: [{
|
|
1462
|
+
imports: [
|
|
1463
|
+
IonicModule,
|
|
1464
|
+
TranslateModule.forChild(),
|
|
1465
|
+
CookieModule.forRoot(),
|
|
1466
|
+
],
|
|
1467
|
+
providers: [
|
|
1468
|
+
ToastService,
|
|
1469
|
+
ErrorService,
|
|
1470
|
+
HardwareService,
|
|
1471
|
+
ModalService,
|
|
1472
|
+
DynamicComponentLoader,
|
|
1473
|
+
PopoverService,
|
|
1474
|
+
StorageService,
|
|
1475
|
+
StyleService,
|
|
1476
|
+
AuthService,
|
|
1477
|
+
FingerprintService,
|
|
1478
|
+
FingerprintAIO,
|
|
1479
|
+
CameraService,
|
|
1480
|
+
FileService,
|
|
1481
|
+
CalendarService,
|
|
1482
|
+
UIService,
|
|
1483
|
+
AlertService,
|
|
1484
|
+
DetailsService
|
|
1485
|
+
],
|
|
1486
|
+
},] }
|
|
1487
|
+
];
|
|
1602
1488
|
|
|
1603
1489
|
class EnumToListPipe {
|
|
1604
1490
|
transform(value) {
|
|
@@ -1943,6 +1829,105 @@ AccordionHeaderComponent.decorators = [
|
|
|
1943
1829
|
*/
|
|
1944
1830
|
AccordionHeaderComponent.ctorParameters = () => [];
|
|
1945
1831
|
|
|
1832
|
+
/**
|
|
1833
|
+
* Only to use in smart-page
|
|
1834
|
+
* @requires PageComponent
|
|
1835
|
+
*/
|
|
1836
|
+
class MenuService {
|
|
1837
|
+
constructor(menuCtrl, resolver) {
|
|
1838
|
+
this.menuCtrl = menuCtrl;
|
|
1839
|
+
this.resolver = resolver;
|
|
1840
|
+
this._openedEnd = false;
|
|
1841
|
+
this._menuItemsSource = new BehaviorSubject([]);
|
|
1842
|
+
this.menuItems$ = this._menuItemsSource.asObservable();
|
|
1843
|
+
}
|
|
1844
|
+
/**
|
|
1845
|
+
* @desc checking if the menu is open (menu on the right side of the screen)
|
|
1846
|
+
*/
|
|
1847
|
+
get openedEnd() {
|
|
1848
|
+
return this._openedEnd;
|
|
1849
|
+
}
|
|
1850
|
+
changeMenuItemByRoute(route, changes) {
|
|
1851
|
+
const items = this._menuItemsSource.value.map(i => {
|
|
1852
|
+
if (i.route === route)
|
|
1853
|
+
return Object.assign(Object.assign({}, i), changes);
|
|
1854
|
+
return i;
|
|
1855
|
+
});
|
|
1856
|
+
this._menuItemsSource.next(items);
|
|
1857
|
+
}
|
|
1858
|
+
setMenuItems(items) {
|
|
1859
|
+
this._menuItemsSource.next(items);
|
|
1860
|
+
}
|
|
1861
|
+
/**
|
|
1862
|
+
* @private
|
|
1863
|
+
*/
|
|
1864
|
+
init(endContainer) {
|
|
1865
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1866
|
+
this._endContainer = endContainer;
|
|
1867
|
+
yield this.menuCtrl.close("end");
|
|
1868
|
+
});
|
|
1869
|
+
}
|
|
1870
|
+
/**
|
|
1871
|
+
* @desc open menu (menu on the right side of the screen)
|
|
1872
|
+
* @param {object} options - use options
|
|
1873
|
+
* @param {class} options.component - angular component to render
|
|
1874
|
+
* @param {class} options.injector - angular injector to use in component
|
|
1875
|
+
*/
|
|
1876
|
+
openEnd(options) {
|
|
1877
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1878
|
+
this._openedEnd = true;
|
|
1879
|
+
if (this._endContainer) {
|
|
1880
|
+
const resolver = options.injector.get(ComponentFactoryResolver);
|
|
1881
|
+
this._endContainer.clear();
|
|
1882
|
+
const factory = resolver.resolveComponentFactory(options.component);
|
|
1883
|
+
this._endContainer.createComponent(factory, 0, options.injector);
|
|
1884
|
+
}
|
|
1885
|
+
yield this.menuCtrl.enable(true, "end");
|
|
1886
|
+
yield this.menuCtrl.open("end");
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1889
|
+
/**
|
|
1890
|
+
* @desc close menu (menu on the left side of the screen)
|
|
1891
|
+
*/
|
|
1892
|
+
closeStart() {
|
|
1893
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1894
|
+
this._openedEnd = false;
|
|
1895
|
+
yield this.menuCtrl.close("start");
|
|
1896
|
+
yield this.menuCtrl.enable(false, "start");
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
/**
|
|
1900
|
+
* @desc close menu (menu on the right side of the screen)
|
|
1901
|
+
*/
|
|
1902
|
+
closeEnd() {
|
|
1903
|
+
var _a;
|
|
1904
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1905
|
+
this._openedEnd = false;
|
|
1906
|
+
yield this.menuCtrl.close("end");
|
|
1907
|
+
yield this.menuCtrl.enable(false, "end");
|
|
1908
|
+
(_a = this._endContainer) === null || _a === void 0 ? void 0 : _a.clear();
|
|
1909
|
+
});
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
/** @nocollapse */ MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(i0.ɵɵinject(i1.MenuController), i0.ɵɵinject(i0.ComponentFactoryResolver)); }, token: MenuService, providedIn: "root" });
|
|
1913
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1914
|
+
MenuService.decorators = [
|
|
1915
|
+
{ type: Injectable, args: [{
|
|
1916
|
+
providedIn: "root",
|
|
1917
|
+
},] }
|
|
1918
|
+
];
|
|
1919
|
+
/**
|
|
1920
|
+
* @type {function(): !Array<(null|{
|
|
1921
|
+
* type: ?,
|
|
1922
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1923
|
+
* })>}
|
|
1924
|
+
* @nocollapse
|
|
1925
|
+
*/
|
|
1926
|
+
MenuService.ctorParameters = () => [
|
|
1927
|
+
{ type: MenuController },
|
|
1928
|
+
{ type: ComponentFactoryResolver }
|
|
1929
|
+
];
|
|
1930
|
+
|
|
1946
1931
|
class AppBaseComponent {
|
|
1947
1932
|
constructor(router, cd, elementRef, styleService, menuService, authService, platformId, document) {
|
|
1948
1933
|
this.router = router;
|
|
@@ -2612,14 +2597,16 @@ DetailTextComponent.decorators = [
|
|
|
2612
2597
|
];
|
|
2613
2598
|
|
|
2614
2599
|
class DetailsComponent extends CreateDynamicComponent("details") {
|
|
2615
|
-
constructor() {
|
|
2616
|
-
super(
|
|
2600
|
+
constructor(cd, moduleRef, cfr, detailsService) {
|
|
2601
|
+
super(cd, moduleRef, cfr);
|
|
2602
|
+
this.detailsService = detailsService;
|
|
2617
2603
|
this._subscription = new Subscription();
|
|
2618
2604
|
this.dynamicContents = new QueryList();
|
|
2619
2605
|
}
|
|
2620
2606
|
set options(val) {
|
|
2621
2607
|
this._options = val;
|
|
2622
2608
|
this._subscription.add(this._options.item$.subscribe((item) => {
|
|
2609
|
+
this.detailsService.setRoot(item);
|
|
2623
2610
|
this.item = item;
|
|
2624
2611
|
}));
|
|
2625
2612
|
this.refreshDynamicInstance();
|
|
@@ -2650,6 +2637,19 @@ DetailsComponent.decorators = [
|
|
|
2650
2637
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2651
2638
|
},] }
|
|
2652
2639
|
];
|
|
2640
|
+
/**
|
|
2641
|
+
* @type {function(): !Array<(null|{
|
|
2642
|
+
* type: ?,
|
|
2643
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
2644
|
+
* })>}
|
|
2645
|
+
* @nocollapse
|
|
2646
|
+
*/
|
|
2647
|
+
DetailsComponent.ctorParameters = () => [
|
|
2648
|
+
{ type: ChangeDetectorRef },
|
|
2649
|
+
{ type: NgModuleRef },
|
|
2650
|
+
{ type: ComponentFactoryResolver },
|
|
2651
|
+
{ type: DetailsService }
|
|
2652
|
+
];
|
|
2653
2653
|
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
2654
2654
|
DetailsComponent.propDecorators = {
|
|
2655
2655
|
options: [{ type: Input }],
|
|
@@ -2658,8 +2658,9 @@ DetailsComponent.propDecorators = {
|
|
|
2658
2658
|
};
|
|
2659
2659
|
|
|
2660
2660
|
class DetailsBaseComponent {
|
|
2661
|
-
constructor(authService) {
|
|
2661
|
+
constructor(authService, detailsService) {
|
|
2662
2662
|
this.authService = authService;
|
|
2663
|
+
this.detailsService = detailsService;
|
|
2663
2664
|
}
|
|
2664
2665
|
get fields() {
|
|
2665
2666
|
return this._fields;
|
|
@@ -2700,7 +2701,9 @@ class DetailsBaseComponent {
|
|
|
2700
2701
|
else
|
|
2701
2702
|
result = ObjectService.createByType(item, obj.type);
|
|
2702
2703
|
const removeFields = enabledDefinitions.filter((def) => {
|
|
2703
|
-
return SpecificationService.invalid(result, def.spec
|
|
2704
|
+
return SpecificationService.invalid(result, def.spec, {
|
|
2705
|
+
$root: this.detailsService.$root
|
|
2706
|
+
});
|
|
2704
2707
|
}).map(def => def.key);
|
|
2705
2708
|
this._fields = this._fields.filter(f => !removeFields.some(rf => rf === f.key));
|
|
2706
2709
|
return result;
|
|
@@ -2741,7 +2744,8 @@ DetailsBaseComponent.decorators = [
|
|
|
2741
2744
|
* @nocollapse
|
|
2742
2745
|
*/
|
|
2743
2746
|
DetailsBaseComponent.ctorParameters = () => [
|
|
2744
|
-
{ type: AuthService }
|
|
2747
|
+
{ type: AuthService },
|
|
2748
|
+
{ type: DetailsService }
|
|
2745
2749
|
];
|
|
2746
2750
|
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
2747
2751
|
DetailsBaseComponent.propDecorators = {
|
|
@@ -3146,6 +3150,64 @@ GridRowComponent.propDecorators = {
|
|
|
3146
3150
|
rowClassExist: [{ type: HostBinding, args: ['class.row',] }]
|
|
3147
3151
|
};
|
|
3148
3152
|
|
|
3153
|
+
class NgrxStoreService {
|
|
3154
|
+
static addReducer(key, reducer) {
|
|
3155
|
+
if (!NgrxStoreService._reducers[key]) {
|
|
3156
|
+
NgrxStoreService._reducers[key] = reducer;
|
|
3157
|
+
NgrxStoreService.store.addReducer(key, reducer);
|
|
3158
|
+
console.log(`${NgrxStoreService.name} register reducer ${key}`);
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
connect(store) {
|
|
3162
|
+
NgrxStoreService.store = store;
|
|
3163
|
+
}
|
|
3164
|
+
}
|
|
3165
|
+
NgrxStoreService._reducers = {};
|
|
3166
|
+
NgrxStoreService.store = undefined;
|
|
3167
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
3168
|
+
NgrxStoreService.decorators = [
|
|
3169
|
+
{ type: Injectable }
|
|
3170
|
+
];
|
|
3171
|
+
|
|
3172
|
+
class AppService {
|
|
3173
|
+
constructor() {
|
|
3174
|
+
this.endButtons$ = AppService._endButtonsSource$.asObservable();
|
|
3175
|
+
}
|
|
3176
|
+
addEndButton(button) {
|
|
3177
|
+
if (button.id) {
|
|
3178
|
+
const exist = AppService._endButtonsSource$.value.find(e => e.id === button.id);
|
|
3179
|
+
if (exist) {
|
|
3180
|
+
Object.keys(button).filter(k => k !== 'id').forEach(key => {
|
|
3181
|
+
exist[key] = button[key];
|
|
3182
|
+
});
|
|
3183
|
+
AppService._endButtonsSource$.next([...AppService._endButtonsSource$.value]);
|
|
3184
|
+
return;
|
|
3185
|
+
}
|
|
3186
|
+
}
|
|
3187
|
+
AppService._endButtonsSource$.next(ArrayService.addItem(AppService._endButtonsSource$.value, button));
|
|
3188
|
+
}
|
|
3189
|
+
removeEndButton(buttonOrId) {
|
|
3190
|
+
if (typeof buttonOrId === 'object') {
|
|
3191
|
+
const button = buttonOrId.id ?
|
|
3192
|
+
AppService._endButtonsSource$.value.find(e => e.id === buttonOrId.id)
|
|
3193
|
+
: buttonOrId;
|
|
3194
|
+
AppService._endButtonsSource$.next(ArrayService.removeItem(AppService._endButtonsSource$.value, button));
|
|
3195
|
+
return;
|
|
3196
|
+
}
|
|
3197
|
+
AppService._endButtonsSource$.next([
|
|
3198
|
+
...AppService._endButtonsSource$.value.filter(e => e.id !== buttonOrId)
|
|
3199
|
+
]);
|
|
3200
|
+
}
|
|
3201
|
+
}
|
|
3202
|
+
AppService._endButtonsSource$ = new BehaviorSubject([]);
|
|
3203
|
+
/** @nocollapse */ AppService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppService_Factory() { return new AppService(); }, token: AppService, providedIn: "root" });
|
|
3204
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
3205
|
+
AppService.decorators = [
|
|
3206
|
+
{ type: Injectable, args: [{
|
|
3207
|
+
providedIn: 'root'
|
|
3208
|
+
},] }
|
|
3209
|
+
];
|
|
3210
|
+
|
|
3149
3211
|
class InputComponent {
|
|
3150
3212
|
constructor(componentFactoryResolver, injector) {
|
|
3151
3213
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
@@ -7195,5 +7257,5 @@ function fastPropGetter(paths) {
|
|
|
7195
7257
|
* Generated bundle index. Do not edit.
|
|
7196
7258
|
*/
|
|
7197
7259
|
|
|
7198
|
-
export { ACCORDION_COMPONENTS, APP_COMPONENTS, AUTH_TOKEN, AccordionBodyComponent, AccordionComponent, AccordionHeaderComponent, AlertService, AppBaseComponent, AppService, AppSplitPanelComponent, AuthService, BUTTON_COMPONENTS, BaseComponent, ButtonBaseComponent, ButtonComponent, ButtonStandardComponent, CARD_COMPONENTS, CHART_COMPONENTS, COMPONENTS$1 as COMPONENTS, CalendarService, CameraService, CardComponent, ChartBarComponent, ChartComponent, ChartLineComponent, ChartType, CreateDynamicComponent, DATE_EDIT_COMPONENTS, DATE_RANGE_COMPONENTS, DETAILS_COMPONENTS, DETAIL_COMPONENTS, DYNAMIC_COMPONENTS, DateEditComponent, DateRangeComponent, DateRangeModalComponent, DateValidator, DetailAddressComponent, DetailArrayComponent, DetailAttachmentComponent, DetailBaseComponent, DetailColorComponent, DetailComponent, DetailDateRangeComponent, DetailEmailComponent, DetailEnumComponent, DetailFlagComponent, DetailImageComponent, DetailLogoComponent, DetailObjectComponent, DetailPdfComponent, DetailTextComponent, DetailVideoComponent, DetailsBaseComponent, DetailsComponent, DetailsDirective, DetailsPage, DetailsStandardComponent, DynamicComponent, DynamicComponentLoader, DynamicContentDirective, EnumToListPipe, ErrorContextComponent, ErrorService, ExportComponent, FILE_SERVICE_CONFIG, FINGERPRINT_PLATFORMS, FORM_COMPONENTS, FileService, FileUrlPipe, FilterBtnConstants, FingerprintService, FormBaseComponent, FormComponent, FormFactory, FormStandardComponent, FormStepperComponent, GRID_COMPONENTS, GridColumnComponent, GridComponent, GridRowComponent, HardwareService, IMPORTS, IModelExportProvider, IModelImportProvider, IModelLabelProvider, IModelPossibilitiesProvider, IModelValidatorsProvider, INFO_COMPONENTS, INPUT_COMPONENTS, ImportComponent, InfoComponent, InfoModalComponent, InputAddressComponent, InputArrayComponent, InputAttachmentComponent, InputBaseComponent, InputCheckComponent, InputColorComponent, InputComponent, InputCurrencyComponent, InputDateComponent, InputDateRangeComponent, InputDateWithEditComponent, InputEmailComponent, InputEnumComponent, InputErrorComponent, InputFileComponent, InputFlagComponent, InputFloatComponent, InputImageComponent, InputIntComponent, InputIntsComponent, InputLogoComponent, InputLongTextComponent, InputNipComponent, InputObjectComponent, InputPasswordComponent, InputPdfComponent, InputPeselComponent, InputPhoneNumberComponent, InputRadioComponent, InputStringsComponent, InputTextComponent, InputVideoComponent, LIST_COMPONENTS, LOADER_COMPONENTS, ListBaseComponent, ListCellPipe, ListComponent, ListDesktopComponent, ListHeaderPipe, ListMasonryGridComponent, ListMobileComponent, ListMode, LoaderComponent, MODEL_EXPORT_PROVIDER, MODEL_IMPORT_PROVIDER, MODEL_LABEL_PROVIDER, MODEL_POSSIBILITIES_PROVIDER, MODEL_VALIDATORS_PROVIDER, MY_FORMATS, MenuService, ModalService, ModelLabelPipe, NgrxSharedModule, NgrxStoreService, PAGE_COMPONENTS, PIPES, PageBaseComponent, PageComponent, PageStandardComponent, PaginationMode, PagingComponent, PasswordStrengthComponent, PopoverService, ReduxAction, ReduxActionDecorator, ReduxSelect, SEARCHBAR_COMPONENTS, SearchbarComponent, SharedComponentsModule, SharedDirectivesModule, SharedFactoriesModule, SharedModule, SharedPagesModule, SharedPipesModule, SharedServicesModule, SmartFormGroup, StorageService, StyleService, TABS_COMPONENTS, TabComponent, TabsComponent, ToastService, UIService, UtilsSharedModule, fastPropGetter, modalFromBottomEnterAnimation, modalFromBottomLeaveAnimation, SharedFactoriesModule as ɵa, FormFactory as ɵb,
|
|
7260
|
+
export { ACCORDION_COMPONENTS, APP_COMPONENTS, AUTH_TOKEN, AccordionBodyComponent, AccordionComponent, AccordionHeaderComponent, AlertService, AppBaseComponent, AppService, AppSplitPanelComponent, AuthService, BUTTON_COMPONENTS, BaseComponent, ButtonBaseComponent, ButtonComponent, ButtonStandardComponent, CARD_COMPONENTS, CHART_COMPONENTS, COMPONENTS$1 as COMPONENTS, CalendarService, CameraService, CardComponent, ChartBarComponent, ChartComponent, ChartLineComponent, ChartType, CreateDynamicComponent, DATE_EDIT_COMPONENTS, DATE_RANGE_COMPONENTS, DETAILS_COMPONENTS, DETAIL_COMPONENTS, DYNAMIC_COMPONENTS, DateEditComponent, DateRangeComponent, DateRangeModalComponent, DateValidator, DetailAddressComponent, DetailArrayComponent, DetailAttachmentComponent, DetailBaseComponent, DetailColorComponent, DetailComponent, DetailDateRangeComponent, DetailEmailComponent, DetailEnumComponent, DetailFlagComponent, DetailImageComponent, DetailLogoComponent, DetailObjectComponent, DetailPdfComponent, DetailTextComponent, DetailVideoComponent, DetailsBaseComponent, DetailsComponent, DetailsDirective, DetailsPage, DetailsService, DetailsStandardComponent, DynamicComponent, DynamicComponentLoader, DynamicContentDirective, EnumToListPipe, ErrorContextComponent, ErrorService, ExportComponent, FILE_SERVICE_CONFIG, FINGERPRINT_PLATFORMS, FORM_COMPONENTS, FileService, FileUrlPipe, FilterBtnConstants, FingerprintService, FormBaseComponent, FormComponent, FormFactory, FormStandardComponent, FormStepperComponent, GRID_COMPONENTS, GridColumnComponent, GridComponent, GridRowComponent, HardwareService, IMPORTS, IModelExportProvider, IModelImportProvider, IModelLabelProvider, IModelPossibilitiesProvider, IModelValidatorsProvider, INFO_COMPONENTS, INPUT_COMPONENTS, ImportComponent, InfoComponent, InfoModalComponent, InputAddressComponent, InputArrayComponent, InputAttachmentComponent, InputBaseComponent, InputCheckComponent, InputColorComponent, InputComponent, InputCurrencyComponent, InputDateComponent, InputDateRangeComponent, InputDateWithEditComponent, InputEmailComponent, InputEnumComponent, InputErrorComponent, InputFileComponent, InputFlagComponent, InputFloatComponent, InputImageComponent, InputIntComponent, InputIntsComponent, InputLogoComponent, InputLongTextComponent, InputNipComponent, InputObjectComponent, InputPasswordComponent, InputPdfComponent, InputPeselComponent, InputPhoneNumberComponent, InputRadioComponent, InputStringsComponent, InputTextComponent, InputVideoComponent, LIST_COMPONENTS, LOADER_COMPONENTS, ListBaseComponent, ListCellPipe, ListComponent, ListDesktopComponent, ListHeaderPipe, ListMasonryGridComponent, ListMobileComponent, ListMode, LoaderComponent, MODEL_EXPORT_PROVIDER, MODEL_IMPORT_PROVIDER, MODEL_LABEL_PROVIDER, MODEL_POSSIBILITIES_PROVIDER, MODEL_VALIDATORS_PROVIDER, MY_FORMATS, MenuService, ModalService, ModelLabelPipe, NgrxSharedModule, NgrxStoreService, PAGE_COMPONENTS, PIPES, PageBaseComponent, PageComponent, PageStandardComponent, PaginationMode, PagingComponent, PasswordStrengthComponent, PopoverService, ReduxAction, ReduxActionDecorator, ReduxSelect, SEARCHBAR_COMPONENTS, SearchbarComponent, SharedComponentsModule, SharedDirectivesModule, SharedFactoriesModule, SharedModule, SharedPagesModule, SharedPipesModule, SharedServicesModule, SmartFormGroup, StorageService, StyleService, TABS_COMPONENTS, TabComponent, TabsComponent, ToastService, UIService, UtilsSharedModule, fastPropGetter, modalFromBottomEnterAnimation, modalFromBottomLeaveAnimation, SharedFactoriesModule as ɵa, FormFactory as ɵb, FileUrlPipe as ɵba, ListHeaderPipe as ɵbb, IModelLabelProvider as ɵbc, MODEL_LABEL_PROVIDER as ɵbd, ModelLabelPipe as ɵbe, APP_COMPONENTS as ɵbf, ACCORDION_COMPONENTS as ɵbg, BUTTON_COMPONENTS as ɵbh, CARD_COMPONENTS as ɵbi, CHART_COMPONENTS as ɵbj, DETAILS_COMPONENTS as ɵbk, DETAIL_COMPONENTS as ɵbl, FORM_COMPONENTS as ɵbm, INPUT_COMPONENTS as ɵbn, LIST_COMPONENTS as ɵbo, LOADER_COMPONENTS as ɵbp, PAGE_COMPONENTS as ɵbq, SEARCHBAR_COMPONENTS as ɵbr, TABS_COMPONENTS as ɵbs, GRID_COMPONENTS as ɵbt, INFO_COMPONENTS as ɵbu, DATE_RANGE_COMPONENTS as ɵbv, DATE_EDIT_COMPONENTS as ɵbw, DYNAMIC_COMPONENTS as ɵbx, COMPONENTS$1 as ɵby, IMPORTS as ɵbz, IModelValidatorsProvider as ɵc, SharedComponentsModule as ɵca, FormStandardComponent as ɵcb, FormBaseComponent as ɵcc, BaseComponent as ɵcd, FormStepperComponent as ɵce, FormComponent as ɵcf, DynamicContentDirective as ɵcg, IModelExportProvider as ɵch, MODEL_EXPORT_PROVIDER as ɵci, IModelImportProvider as ɵcj, MODEL_IMPORT_PROVIDER as ɵck, AppSplitPanelComponent as ɵcl, AppBaseComponent as ɵcm, MenuService as ɵcn, PageStandardComponent as ɵco, PageBaseComponent as ɵcp, AppService as ɵcq, PageComponent as ɵcr, InputComponent as ɵcs, InputIntComponent as ɵct, InputBaseComponent as ɵcu, BaseComponent as ɵcv, InputErrorComponent as ɵcw, InputTextComponent as ɵcx, InputPasswordComponent as ɵcy, InputFlagComponent as ɵcz, MODEL_VALIDATORS_PROVIDER as ɵd, InputEnumComponent as ɵda, InputEmailComponent as ɵdb, InputCurrencyComponent as ɵdc, MY_FORMATS as ɵdd, InputDateComponent as ɵde, InputDateWithEditComponent as ɵdf, InputFileComponent as ɵdg, InputRadioComponent as ɵdh, InputPossibilitiesBaseComponent as ɵdi, IModelPossibilitiesProvider as ɵdj, MODEL_POSSIBILITIES_PROVIDER as ɵdk, InputNipComponent as ɵdl, InputStringsComponent as ɵdm, InputLongTextComponent as ɵdn, InputAddressComponent as ɵdo, InputObjectComponent as ɵdp, InputColorComponent as ɵdq, InputLogoComponent as ɵdr, InputCheckComponent as ɵds, InputIntsComponent as ɵdt, InputPhoneNumberComponent as ɵdu, InputPeselComponent as ɵdv, InputArrayComponent as ɵdw, InputPdfComponent as ɵdx, InputFileBaseComponent as ɵdy, InputVideoComponent as ɵdz, AuthService as ɵe, InputAttachmentComponent as ɵea, InputDateRangeComponent as ɵeb, InputImageComponent as ɵec, InputFloatComponent as ɵed, ButtonComponent as ɵee, ButtonStandardComponent as ɵef, ButtonBaseComponent as ɵeg, CardComponent as ɵeh, ListComponent as ɵei, ListMobileComponent as ɵej, ListBaseComponent as ɵek, ListDesktopComponent as ɵel, ListMasonryGridComponent as ɵem, LoaderComponent as ɵen, DetailComponent as ɵeo, DetailTextComponent as ɵep, DetailBaseComponent as ɵeq, DetailFlagComponent as ɵer, DetailEnumComponent as ɵes, DetailEmailComponent as ɵet, DetailAddressComponent as ɵeu, DetailObjectComponent as ɵev, DetailColorComponent as ɵew, DetailLogoComponent as ɵex, DetailArrayComponent as ɵey, DetailPdfComponent as ɵez, StorageService as ɵf, DetailVideoComponent as ɵfa, DetailAttachmentComponent as ɵfb, DetailDateRangeComponent as ɵfc, DetailImageComponent as ɵfd, DetailsComponent as ɵfe, DetailsStandardComponent as ɵff, DetailsBaseComponent as ɵfg, SearchbarComponent as ɵfh, TabsComponent as ɵfi, TabComponent as ɵfj, AccordionComponent as ɵfk, AccordionHeaderComponent as ɵfl, AccordionBodyComponent as ɵfm, ChartComponent as ɵfn, ChartLineComponent as ɵfo, ChartBaseComponent as ɵfp, ChartBarComponent as ɵfq, GridComponent as ɵfr, GridRowComponent as ɵfs, GridColumnComponent as ɵft, DynamicComponent as ɵfu, PasswordStrengthComponent as ɵfv, InfoComponent as ɵfw, InfoModalComponent as ɵfx, DateRangeComponent as ɵfy, DateRangeModalComponent as ɵfz, DetailsService as ɵg, DateEditComponent as ɵga, ErrorContextComponent as ɵgb, ExportComponent as ɵgc, PagingComponent as ɵgd, ImportComponent as ɵge, SharedDirectivesModule as ɵgf, DetailsDirective as ɵgg, DateValidator as ɵgh, SharedPagesModule as ɵgi, DetailsPage as ɵgj, NgrxStoreService as ɵgk, ErrorEffects as ɵgl, SharedServicesModule as ɵh, ToastService as ɵi, ErrorService as ɵj, HardwareService as ɵk, ModalService as ɵl, DynamicComponentLoader as ɵm, PopoverService as ɵn, StyleService as ɵo, FingerprintService as ɵp, CameraService as ɵq, FILE_SERVICE_CONFIG as ɵr, FileService as ɵs, CalendarService as ɵt, UIService as ɵu, AlertService as ɵv, PIPES as ɵw, SharedPipesModule as ɵx, EnumToListPipe as ɵy, ListCellPipe as ɵz };
|
|
7199
7261
|
//# sourceMappingURL=smartsoft001-angular.js.map
|