@smartsoft001/angular 1.1.685 → 1.1.690
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 +1703 -1634
- 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 +25 -9
- package/esm2015/lib/services/details/details.service.js +29 -0
- package/esm2015/lib/services/index.js +2 -1
- package/esm2015/lib/services/menu/menu.service.js +9 -6
- package/esm2015/lib/services/services.module.js +4 -2
- package/esm2015/smartsoft001-angular.js +133 -132
- package/fesm2015/smartsoft001-angular.js +1337 -1271
- 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,256 @@ 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
|
+
console.log(rootCheck.value, result.value);
|
|
364
|
+
def.control['__smartDisabled'] = !enabled;
|
|
365
|
+
});
|
|
366
|
+
}), delay(0)).subscribe(() => {
|
|
367
|
+
if (rootCheck)
|
|
368
|
+
this.detailsService.setRoot(rootCheck.value, true);
|
|
369
|
+
enabledDefinitions.forEach(def => {
|
|
370
|
+
if (!def.control['__smartDisabled'] && !result.controls[def.key]) {
|
|
371
|
+
result.addControl(def.key, def.control);
|
|
372
|
+
result.updateValueAndValidity();
|
|
373
|
+
}
|
|
374
|
+
else if (def.control['__smartDisabled'] && result.controls[def.key]) {
|
|
375
|
+
result.removeControl(def.key);
|
|
376
|
+
result.updateValueAndValidity();
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
});
|
|
380
|
+
return result;
|
|
454
381
|
});
|
|
455
382
|
}
|
|
383
|
+
setValidators(key, control, options, form, uniqueProvider) {
|
|
384
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
385
|
+
const result = [];
|
|
386
|
+
const asyncResult = [];
|
|
387
|
+
if (options.required) {
|
|
388
|
+
result.push(Validators.required);
|
|
389
|
+
}
|
|
390
|
+
if (options.type === FieldType.email) {
|
|
391
|
+
result.push((c) => {
|
|
392
|
+
if (!c.value)
|
|
393
|
+
return;
|
|
394
|
+
const reg = new RegExp("^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$");
|
|
395
|
+
if (reg.test(c.value))
|
|
396
|
+
return null;
|
|
397
|
+
return { email: true };
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
if (options.type === FieldType.phoneNumber) {
|
|
401
|
+
result.push((c) => {
|
|
402
|
+
if (!c.value)
|
|
403
|
+
return;
|
|
404
|
+
const reg = new RegExp("^((\\+91-?)|0)?[0-9]{9}$");
|
|
405
|
+
if (reg.test(c.value))
|
|
406
|
+
return null;
|
|
407
|
+
return { phoneNumber: true };
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
if (options.type === FieldType.pesel) {
|
|
411
|
+
result.push((c) => {
|
|
412
|
+
if (!c.value)
|
|
413
|
+
return;
|
|
414
|
+
if (PeselService.isValid(c.value))
|
|
415
|
+
return null;
|
|
416
|
+
return { pesel: true };
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
if ((_a = options.possibilities) === null || _a === void 0 ? void 0 : _a.minLength) {
|
|
420
|
+
result.push(Validators.minLength((_b = options.possibilities) === null || _b === void 0 ? void 0 : _b.minLength));
|
|
421
|
+
}
|
|
422
|
+
if ((_c = options.possibilities) === null || _c === void 0 ? void 0 : _c.maxLength) {
|
|
423
|
+
result.push(Validators.maxLength((_d = options.possibilities) === null || _d === void 0 ? void 0 : _d.maxLength));
|
|
424
|
+
}
|
|
425
|
+
if (((_e = options.possibilities) === null || _e === void 0 ? void 0 : _e.min) || ((_f = options.possibilities) === null || _f === void 0 ? void 0 : _f.min) === 0) {
|
|
426
|
+
result.push(Validators.min((_g = options.possibilities) === null || _g === void 0 ? void 0 : _g.min));
|
|
427
|
+
}
|
|
428
|
+
if (((_h = options.possibilities) === null || _h === void 0 ? void 0 : _h.max) || ((_j = options.possibilities) === null || _j === void 0 ? void 0 : _j.max) === 0) {
|
|
429
|
+
result.push(Validators.max((_k = options.possibilities) === null || _k === void 0 ? void 0 : _k.max));
|
|
430
|
+
}
|
|
431
|
+
if (options.unique && uniqueProvider) {
|
|
432
|
+
asyncResult.push((c) => __awaiter(this, void 0, void 0, function* () {
|
|
433
|
+
const record = {
|
|
434
|
+
[key]: options.type === FieldType.int ? c.value : `'${c.value}'`
|
|
435
|
+
};
|
|
436
|
+
if (form.value && options.unique.withFields) {
|
|
437
|
+
options.unique.withFields.forEach(fieldKey => {
|
|
438
|
+
record[fieldKey] = form.value[fieldKey];
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
if (yield uniqueProvider(record))
|
|
442
|
+
return null;
|
|
443
|
+
return {
|
|
444
|
+
invalidUnique: true
|
|
445
|
+
};
|
|
446
|
+
}));
|
|
447
|
+
}
|
|
448
|
+
control.setValidators(result);
|
|
449
|
+
control.setAsyncValidators(asyncResult);
|
|
450
|
+
}
|
|
451
|
+
createControl(obj, field, required) {
|
|
452
|
+
let result;
|
|
453
|
+
const zipCodeValidator = (c) => {
|
|
454
|
+
if (c.value && ZipCodeService.isInvalid(c.value)) {
|
|
455
|
+
return {
|
|
456
|
+
invalidZipCode: true,
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
return null;
|
|
460
|
+
};
|
|
461
|
+
switch (field.options.type) {
|
|
462
|
+
case FieldType.address:
|
|
463
|
+
result = this.fb.group({
|
|
464
|
+
city: ["", required ? [Validators.required] : null],
|
|
465
|
+
street: ["", required ? [Validators.required] : null],
|
|
466
|
+
buildingNumber: ["", required ? [Validators.required] : null],
|
|
467
|
+
flatNumber: [""],
|
|
468
|
+
zipCode: [
|
|
469
|
+
"",
|
|
470
|
+
required
|
|
471
|
+
? [Validators.required, zipCodeValidator]
|
|
472
|
+
: [zipCodeValidator],
|
|
473
|
+
],
|
|
474
|
+
});
|
|
475
|
+
break;
|
|
476
|
+
default:
|
|
477
|
+
result = this.fb.control(null);
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
const value = obj[field.key]
|
|
481
|
+
? obj[field.key]
|
|
482
|
+
: field.options.defaltValue
|
|
483
|
+
? field.options.defaltValue()
|
|
484
|
+
: null;
|
|
485
|
+
if (value)
|
|
486
|
+
result.setValue(value);
|
|
487
|
+
result.updateValueAndValidity();
|
|
488
|
+
return result;
|
|
489
|
+
}
|
|
456
490
|
}
|
|
457
491
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
458
|
-
|
|
492
|
+
FormFactory.decorators = [
|
|
459
493
|
{ type: Injectable }
|
|
460
494
|
];
|
|
461
495
|
/**
|
|
@@ -465,409 +499,326 @@ PopoverService.decorators = [
|
|
|
465
499
|
* })>}
|
|
466
500
|
* @nocollapse
|
|
467
501
|
*/
|
|
468
|
-
|
|
469
|
-
{ type:
|
|
502
|
+
FormFactory.ctorParameters = () => [
|
|
503
|
+
{ type: FormBuilder },
|
|
504
|
+
{ type: AuthService },
|
|
505
|
+
{ type: DetailsService },
|
|
506
|
+
{ type: IModelValidatorsProvider, decorators: [{ type: Optional }, { type: Inject, args: [MODEL_VALIDATORS_PROVIDER,] }] }
|
|
470
507
|
];
|
|
471
508
|
|
|
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
|
-
});
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
FingerprintService.set = false;
|
|
627
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
628
|
-
FingerprintService.decorators = [
|
|
629
|
-
{ type: Injectable }
|
|
630
|
-
];
|
|
631
|
-
/**
|
|
632
|
-
* @type {function(): !Array<(null|{
|
|
633
|
-
* type: ?,
|
|
634
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
635
|
-
* })>}
|
|
636
|
-
* @nocollapse
|
|
637
|
-
*/
|
|
638
|
-
FingerprintService.ctorParameters = () => [
|
|
639
|
-
{ type: Platform },
|
|
640
|
-
{ type: FingerprintAIO },
|
|
641
|
-
{ type: TranslateService },
|
|
642
|
-
{ type: StorageService }
|
|
643
|
-
];
|
|
644
|
-
|
|
645
|
-
const { Camera } = Plugins;
|
|
646
|
-
class CameraService {
|
|
647
|
-
getCapture(options = {}) {
|
|
648
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
649
|
-
const image = yield Camera.getPhoto({
|
|
650
|
-
quality: options.quality ? options.quality : 100,
|
|
651
|
-
resultType: CameraResultType.Base64
|
|
652
|
-
});
|
|
653
|
-
return {
|
|
654
|
-
data: image.base64String,
|
|
655
|
-
exif: image.exif
|
|
656
|
-
};
|
|
657
|
-
});
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
661
|
-
CameraService.decorators = [
|
|
662
|
-
{ type: Injectable }
|
|
663
|
-
];
|
|
664
|
-
|
|
665
|
-
const FILE_SERVICE_CONFIG = new InjectionToken('FILE_SERVICE_CONFIG');
|
|
666
|
-
class FileService {
|
|
667
|
-
constructor(config, http) {
|
|
668
|
-
this.config = config;
|
|
669
|
-
this.http = http;
|
|
670
|
-
}
|
|
671
|
-
upload(file, callback) {
|
|
672
|
-
const formData = new FormData();
|
|
673
|
-
formData.append('file', file, file.name);
|
|
674
|
-
return this.http.post(this.config.apiUrl + '/attachments', formData, {
|
|
675
|
-
reportProgress: true,
|
|
676
|
-
observe: 'events'
|
|
677
|
-
}).pipe(map((event) => {
|
|
678
|
-
if (event.type === HttpEventType.UploadProgress) {
|
|
679
|
-
const percentDone = Math.round(100 * event.loaded / event.total);
|
|
680
|
-
return percentDone;
|
|
681
|
-
}
|
|
682
|
-
if (event.type === HttpEventType.Response) {
|
|
683
|
-
if (callback)
|
|
684
|
-
callback(event.body);
|
|
685
|
-
return 100;
|
|
686
|
-
}
|
|
687
|
-
}));
|
|
688
|
-
}
|
|
689
|
-
download(id) {
|
|
690
|
-
window.open(this.getUrl(id), '_blank').focus();
|
|
691
|
-
}
|
|
692
|
-
delete(id) {
|
|
693
|
-
return this.http.delete(this.config.apiUrl + '/attachments/' + id).toPromise();
|
|
694
|
-
}
|
|
695
|
-
getUrl(id) {
|
|
696
|
-
return this.config.apiUrl + '/attachments/' + id;
|
|
509
|
+
class SharedFactoriesModule {
|
|
510
|
+
}
|
|
511
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
512
|
+
SharedFactoriesModule.decorators = [
|
|
513
|
+
{ type: NgModule, args: [{
|
|
514
|
+
imports: [
|
|
515
|
+
ReactiveFormsModule
|
|
516
|
+
],
|
|
517
|
+
providers: [
|
|
518
|
+
FormFactory
|
|
519
|
+
]
|
|
520
|
+
},] }
|
|
521
|
+
];
|
|
522
|
+
|
|
523
|
+
function setDefaultTranslationsAndLang(service) {
|
|
524
|
+
const map = {
|
|
525
|
+
'pl': TRANSLATE_DATA_PL,
|
|
526
|
+
'eng': TRANSLATE_DATA_ENG
|
|
527
|
+
};
|
|
528
|
+
Object.keys(map).forEach(key => {
|
|
529
|
+
service.setTranslation(key, map[key], true);
|
|
530
|
+
});
|
|
531
|
+
if (!service.currentLang) {
|
|
532
|
+
const lang = service.getBrowserLang();
|
|
533
|
+
service.use(lang);
|
|
697
534
|
}
|
|
698
535
|
}
|
|
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
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
536
|
+
const TRANSLATE_DATA_ENG = {
|
|
537
|
+
details: 'details',
|
|
538
|
+
admin: 'admin',
|
|
539
|
+
add: 'add',
|
|
540
|
+
change: 'change',
|
|
541
|
+
confirm: 'confirm',
|
|
542
|
+
cancel: 'cancel',
|
|
543
|
+
delete: 'delete',
|
|
544
|
+
undo: 'undo',
|
|
545
|
+
search: 'search',
|
|
546
|
+
page: 'page',
|
|
547
|
+
filters: 'filters',
|
|
548
|
+
or: 'or',
|
|
549
|
+
signInQuicklyWith: 'sign in quickly with',
|
|
550
|
+
selected: "selected",
|
|
551
|
+
select: "select",
|
|
552
|
+
show: "show",
|
|
553
|
+
download: "download",
|
|
554
|
+
play: "play",
|
|
555
|
+
writeHere: "write here",
|
|
556
|
+
next: 'next',
|
|
557
|
+
prev: 'prev',
|
|
558
|
+
edit: "edit",
|
|
559
|
+
save: "save",
|
|
560
|
+
noResults: "no results",
|
|
561
|
+
CALENDAR: {
|
|
562
|
+
DAY_OF_WEEK: {
|
|
563
|
+
Mon: 'Mon',
|
|
564
|
+
Tue: 'Tue',
|
|
565
|
+
Wed: 'Wed',
|
|
566
|
+
Thu: 'Thu',
|
|
567
|
+
Fri: 'Fri',
|
|
568
|
+
Sat: 'Sat',
|
|
569
|
+
Sun: 'Sun',
|
|
570
|
+
},
|
|
571
|
+
MONTH: {
|
|
572
|
+
January: "January",
|
|
573
|
+
February: "February",
|
|
574
|
+
March: "March",
|
|
575
|
+
April: "April",
|
|
576
|
+
May: "May",
|
|
577
|
+
June: "June",
|
|
578
|
+
July: "July",
|
|
579
|
+
August: "August",
|
|
580
|
+
September: "September",
|
|
581
|
+
October: "October",
|
|
582
|
+
November: "November",
|
|
583
|
+
December: "December"
|
|
584
|
+
},
|
|
585
|
+
Today: "Today",
|
|
586
|
+
LastSevenDays: "Last 7 days",
|
|
587
|
+
ThisMonth: "This month",
|
|
588
|
+
Yesterday: "Yesterday",
|
|
589
|
+
LastThirtyDays: "Last 30 days",
|
|
590
|
+
LastMonth: "Last month"
|
|
591
|
+
},
|
|
592
|
+
OBJECT: {
|
|
593
|
+
deleted: 'object deleted',
|
|
594
|
+
confirmDelete: 'confirm delete object'
|
|
595
|
+
},
|
|
596
|
+
APP: {
|
|
597
|
+
logout: 'log out',
|
|
598
|
+
signIn: 'sign in',
|
|
599
|
+
logged: 'logged'
|
|
600
|
+
},
|
|
601
|
+
MODEL: {
|
|
602
|
+
body: 'body',
|
|
603
|
+
buildingNumber: 'building number',
|
|
604
|
+
city: 'city',
|
|
605
|
+
date: 'date',
|
|
606
|
+
disabled: 'disabled',
|
|
607
|
+
email: 'email',
|
|
608
|
+
file: 'file',
|
|
609
|
+
firstName: 'first name',
|
|
610
|
+
flatNumber: 'flat number',
|
|
611
|
+
lastName: 'last name',
|
|
612
|
+
password: 'password',
|
|
613
|
+
passwordConfirm: 'confirm password',
|
|
614
|
+
passwordReset: 'reset password',
|
|
615
|
+
permissions: 'permissions',
|
|
616
|
+
price: 'price',
|
|
617
|
+
send: 'send',
|
|
618
|
+
street: 'street',
|
|
619
|
+
username: 'user name',
|
|
620
|
+
zipCode: 'zip code',
|
|
621
|
+
},
|
|
622
|
+
INPUT: {
|
|
623
|
+
ERRORS: {
|
|
624
|
+
required: 'field is required',
|
|
625
|
+
requires: 'fields are required',
|
|
626
|
+
invalidNip: 'Invalid nip format',
|
|
627
|
+
invalidUnique: 'Invalid unique value',
|
|
628
|
+
invalidFileType: 'Invalid file type',
|
|
629
|
+
confirm: 'bad confirmed',
|
|
630
|
+
invalidEmailFormat: "invalid email format",
|
|
631
|
+
invalidPhoneNumberFormat: "invalid phone number (000000000)",
|
|
632
|
+
invalidPeselFormat: "invalid pesel",
|
|
633
|
+
invalidMinLength: "min length",
|
|
634
|
+
invalidMaxLength: "max length",
|
|
635
|
+
invalidMin: 'min value',
|
|
636
|
+
invalidMax: 'max value',
|
|
637
|
+
upperLetters: "upper letters",
|
|
638
|
+
lowerLetters: "lower letters",
|
|
639
|
+
symbols: "string"
|
|
640
|
+
},
|
|
641
|
+
'PASSWORD-STRENGTH': {
|
|
642
|
+
poor: 'poor',
|
|
643
|
+
notGood: 'not ood',
|
|
644
|
+
good: 'good'
|
|
765
645
|
}
|
|
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;
|
|
646
|
+
},
|
|
647
|
+
ERRORS: {
|
|
648
|
+
invalidUsernameOrPassword: 'Invalid username or password',
|
|
649
|
+
other: 'Error'
|
|
777
650
|
}
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
651
|
+
};
|
|
652
|
+
const TRANSLATE_DATA_PL = {
|
|
653
|
+
details: 'szczegóły',
|
|
654
|
+
admin: 'administrator',
|
|
655
|
+
add: 'dodaj',
|
|
656
|
+
change: 'zmień',
|
|
657
|
+
confirm: 'potwierdź',
|
|
658
|
+
cancel: 'anuluj',
|
|
659
|
+
delete: 'usuń',
|
|
660
|
+
undo: 'cofnij',
|
|
661
|
+
search: 'wyszukaj',
|
|
662
|
+
page: 'strona',
|
|
663
|
+
filters: 'filtry',
|
|
664
|
+
or: 'lub',
|
|
665
|
+
signInQuicklyWith: 'szybko zaloguj się za pomocą',
|
|
666
|
+
selected: "wybrano",
|
|
667
|
+
select: "wybierz",
|
|
668
|
+
show: "pokaż",
|
|
669
|
+
download: "pobierz",
|
|
670
|
+
play: "włącz",
|
|
671
|
+
writeHere: "napisz tutaj",
|
|
672
|
+
next: 'dalej',
|
|
673
|
+
prev: 'wstecz',
|
|
674
|
+
edit: "edycja",
|
|
675
|
+
save: "zapisz",
|
|
676
|
+
noResults: "brak wyników",
|
|
677
|
+
CALENDAR: {
|
|
678
|
+
DAY_OF_WEEK: {
|
|
679
|
+
Mon: 'Pon',
|
|
680
|
+
Tue: 'Wto',
|
|
681
|
+
Wed: 'Śro',
|
|
682
|
+
Thu: 'Czw',
|
|
683
|
+
Fri: 'Pio',
|
|
684
|
+
Sat: 'Sob',
|
|
685
|
+
Sun: 'Nie',
|
|
686
|
+
},
|
|
687
|
+
MONTH: {
|
|
688
|
+
January: "Styczeń",
|
|
689
|
+
February: "Luty",
|
|
690
|
+
March: "Marzec",
|
|
691
|
+
April: "Kwiecień",
|
|
692
|
+
May: "Maj",
|
|
693
|
+
June: "Czerwiec",
|
|
694
|
+
July: "Lipiec",
|
|
695
|
+
August: "Sierpień",
|
|
696
|
+
September: "Wrzesień",
|
|
697
|
+
October: "Październik",
|
|
698
|
+
November: "Listopad",
|
|
699
|
+
December: "Grudzień"
|
|
700
|
+
},
|
|
701
|
+
Today: "Dzisiaj",
|
|
702
|
+
LastSevenDays: "Ostatnie 7 dnii",
|
|
703
|
+
ThisMonth: "Ten miesiąc",
|
|
704
|
+
Yesterday: "Wczoraj",
|
|
705
|
+
LastThirtyDays: "Ostatnie 30 dni",
|
|
706
|
+
LastMonth: "Ostatni miesiąc"
|
|
707
|
+
},
|
|
708
|
+
OBJECT: {
|
|
709
|
+
deleted: 'obiekt został usunięty',
|
|
710
|
+
confirmDelete: 'potwierdź usunięcie'
|
|
711
|
+
},
|
|
712
|
+
APP: {
|
|
713
|
+
logout: 'wyloguj się',
|
|
714
|
+
logged: 'zalogowany',
|
|
715
|
+
signIn: 'zaloguj się'
|
|
716
|
+
},
|
|
717
|
+
MODEL: {
|
|
718
|
+
body: 'treść',
|
|
719
|
+
buildingNumber: 'numer budynku',
|
|
720
|
+
city: 'miasto',
|
|
721
|
+
date: 'data',
|
|
722
|
+
disabled: 'nieaktywny',
|
|
723
|
+
email: 'email',
|
|
724
|
+
file: 'plik',
|
|
725
|
+
firstName: 'imię',
|
|
726
|
+
flatNumber: 'numer lokalu',
|
|
727
|
+
lastName: 'nazwisko',
|
|
728
|
+
password: 'hasło',
|
|
729
|
+
passwordConfirm: 'powtórz hasło',
|
|
730
|
+
passwordReset: 'Nie pamiętam hasła',
|
|
731
|
+
permissions: 'uprawnienia',
|
|
732
|
+
price: 'cena',
|
|
733
|
+
send: 'wyślij',
|
|
734
|
+
street: 'ulica',
|
|
735
|
+
username: 'nazwa użytkownika',
|
|
736
|
+
zipCode: 'kod pocztowy',
|
|
737
|
+
},
|
|
738
|
+
INPUT: {
|
|
739
|
+
ERRORS: {
|
|
740
|
+
required: 'to pole jest wymagane',
|
|
741
|
+
requires: 'te pola są wymagane',
|
|
742
|
+
invalidNip: 'niepoprawny format nip',
|
|
743
|
+
invalidUnique: 'wartość jest już w systemie',
|
|
744
|
+
confirm: 'źle powtórzone',
|
|
745
|
+
invalidEmailFormat: "niepoprawny adres email",
|
|
746
|
+
invalidFileType: 'niepoprawny format pliku',
|
|
747
|
+
invalidPhoneNumberFormat: "niepoprawny numer telefonu (000000000)",
|
|
748
|
+
invalidPeselFormat: "niepoprawny numer pesel",
|
|
749
|
+
invalidMinLength: "minimalna długość",
|
|
750
|
+
invalidMaxLength: "maksymalna długość",
|
|
751
|
+
invalidMin: "minimalna wartość",
|
|
752
|
+
invalidMax: "maksymalna wartość",
|
|
753
|
+
upperLetters: "duże litery",
|
|
754
|
+
lowerLetters: "małe litery",
|
|
755
|
+
symbols: "znaki specjalne"
|
|
756
|
+
},
|
|
757
|
+
'PASSWORD-STRENGTH': {
|
|
758
|
+
poor: 'bardzo słabe',
|
|
759
|
+
notGood: 'słabe',
|
|
760
|
+
good: 'dobre'
|
|
781
761
|
}
|
|
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'));
|
|
762
|
+
},
|
|
763
|
+
ERRORS: {
|
|
764
|
+
invalidUsernameOrPassword: 'Niepoprawna nazwa użytkownika, lub hasło',
|
|
765
|
+
other: 'Wystąpił błąd'
|
|
802
766
|
}
|
|
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 = () => [];
|
|
767
|
+
};
|
|
816
768
|
|
|
817
|
-
class
|
|
818
|
-
constructor(
|
|
819
|
-
this.
|
|
820
|
-
this.alertController = alertController;
|
|
821
|
-
this.toastController = toastController;
|
|
769
|
+
class ToastService {
|
|
770
|
+
constructor(toastCtrl) {
|
|
771
|
+
this.toastCtrl = toastCtrl;
|
|
822
772
|
}
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
const loader = yield this.loadingController.create({
|
|
826
|
-
message: msg || 'loading...',
|
|
827
|
-
});
|
|
828
|
-
yield loader.present();
|
|
829
|
-
return loader;
|
|
830
|
-
});
|
|
773
|
+
addLockError() {
|
|
774
|
+
++ToastService.lockError;
|
|
831
775
|
}
|
|
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
|
-
});
|
|
776
|
+
removeLockError() {
|
|
777
|
+
--ToastService.lockError;
|
|
841
778
|
}
|
|
842
|
-
|
|
779
|
+
error(config) {
|
|
843
780
|
return __awaiter(this, void 0, void 0, function* () {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
781
|
+
if (ToastService.lockError)
|
|
782
|
+
return;
|
|
783
|
+
const toast = yield this.toastCtrl.create({
|
|
784
|
+
position: 'bottom',
|
|
785
|
+
header: config.title,
|
|
786
|
+
message: config.message,
|
|
787
|
+
duration: config.duration ? config.duration : 2000,
|
|
788
|
+
buttons: config.buttons ? config.buttons.map(b => {
|
|
789
|
+
return {
|
|
790
|
+
text: b.text,
|
|
791
|
+
side: b.position,
|
|
792
|
+
role: 'cancel',
|
|
793
|
+
handler: b.handler
|
|
794
|
+
};
|
|
795
|
+
}) : null
|
|
852
796
|
});
|
|
853
|
-
yield
|
|
854
|
-
alert.onDidDismiss().then(() => { callback(); });
|
|
797
|
+
yield toast.present();
|
|
855
798
|
});
|
|
856
799
|
}
|
|
857
|
-
|
|
800
|
+
info(config) {
|
|
858
801
|
return __awaiter(this, void 0, void 0, function* () {
|
|
859
|
-
const toast = yield this.
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
802
|
+
const toast = yield this.toastCtrl.create({
|
|
803
|
+
position: 'bottom',
|
|
804
|
+
header: config.title,
|
|
805
|
+
message: config.message,
|
|
806
|
+
duration: config.duration ? config.duration : 2000,
|
|
807
|
+
buttons: config.buttons ? config.buttons.map(b => {
|
|
808
|
+
return {
|
|
809
|
+
text: b.text,
|
|
810
|
+
side: b.position,
|
|
811
|
+
handler: b.handler
|
|
812
|
+
};
|
|
813
|
+
}) : null
|
|
863
814
|
});
|
|
864
|
-
toast.present();
|
|
865
|
-
return toast;
|
|
815
|
+
yield toast.present();
|
|
866
816
|
});
|
|
867
817
|
}
|
|
868
818
|
}
|
|
819
|
+
ToastService.lockError = 0;
|
|
869
820
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
870
|
-
|
|
821
|
+
ToastService.decorators = [
|
|
871
822
|
{ type: Injectable }
|
|
872
823
|
];
|
|
873
824
|
/**
|
|
@@ -877,152 +828,33 @@ UIService.decorators = [
|
|
|
877
828
|
* })>}
|
|
878
829
|
* @nocollapse
|
|
879
830
|
*/
|
|
880
|
-
|
|
881
|
-
{ type: LoadingController },
|
|
882
|
-
{ type: AlertController },
|
|
831
|
+
ToastService.ctorParameters = () => [
|
|
883
832
|
{ type: ToastController }
|
|
884
833
|
];
|
|
885
834
|
|
|
886
|
-
class
|
|
887
|
-
constructor(
|
|
888
|
-
this.
|
|
889
|
-
|
|
890
|
-
show(options) {
|
|
891
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
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
|
-
const resolver = options.injector.get(ComponentFactoryResolver);
|
|
991
|
-
this._endContainer.clear();
|
|
992
|
-
const factory = resolver.resolveComponentFactory(options.component);
|
|
993
|
-
this._endContainer.createComponent(factory, 0, options.injector);
|
|
994
|
-
yield this.menuCtrl.enable(true, "end");
|
|
995
|
-
yield this.menuCtrl.open("end");
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
/**
|
|
999
|
-
* @desc close menu (menu on the left side of the screen)
|
|
1000
|
-
*/
|
|
1001
|
-
closeStart() {
|
|
1002
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1003
|
-
this._openedEnd = false;
|
|
1004
|
-
yield this.menuCtrl.close("start");
|
|
1005
|
-
yield this.menuCtrl.enable(false, "start");
|
|
1006
|
-
});
|
|
835
|
+
class ErrorService {
|
|
836
|
+
constructor(toastService, translateService) {
|
|
837
|
+
this.toastService = toastService;
|
|
838
|
+
this.translateService = translateService;
|
|
1007
839
|
}
|
|
1008
|
-
|
|
1009
|
-
* @desc close menu (menu on the right side of the screen)
|
|
1010
|
-
*/
|
|
1011
|
-
closeEnd() {
|
|
840
|
+
log(obj) {
|
|
1012
841
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
842
|
+
let message = '';
|
|
843
|
+
if (obj instanceof HttpErrorResponse) {
|
|
844
|
+
if (obj.error && obj.error.details === 'Invalid username or password') {
|
|
845
|
+
message = yield this.translateService.get('ERRORS.invalidUsernameOrPassword').toPromise();
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
if (!message)
|
|
849
|
+
message = yield this.translateService.get('ERRORS.other').toPromise();
|
|
850
|
+
console.error(obj);
|
|
851
|
+
yield this.toastService.error({ message });
|
|
1017
852
|
});
|
|
1018
853
|
}
|
|
1019
854
|
}
|
|
1020
|
-
/** @nocollapse */ MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(i0.ɵɵinject(i1.MenuController), i0.ɵɵinject(i0.ComponentFactoryResolver)); }, token: MenuService, providedIn: "root" });
|
|
1021
855
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1022
|
-
|
|
1023
|
-
{ type: Injectable
|
|
1024
|
-
providedIn: "root",
|
|
1025
|
-
},] }
|
|
856
|
+
ErrorService.decorators = [
|
|
857
|
+
{ type: Injectable }
|
|
1026
858
|
];
|
|
1027
859
|
/**
|
|
1028
860
|
* @type {function(): !Array<(null|{
|
|
@@ -1031,297 +863,315 @@ MenuService.decorators = [
|
|
|
1031
863
|
* })>}
|
|
1032
864
|
* @nocollapse
|
|
1033
865
|
*/
|
|
1034
|
-
|
|
1035
|
-
{ type:
|
|
1036
|
-
{ type:
|
|
866
|
+
ErrorService.ctorParameters = () => [
|
|
867
|
+
{ type: ToastService },
|
|
868
|
+
{ type: TranslateService }
|
|
1037
869
|
];
|
|
1038
870
|
|
|
1039
|
-
class
|
|
1040
|
-
constructor() {
|
|
1041
|
-
this.
|
|
871
|
+
class HardwareService {
|
|
872
|
+
constructor(platform) {
|
|
873
|
+
this.platform = platform;
|
|
1042
874
|
}
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
const exist = AppService._endButtonsSource$.value.find(e => e.id === button.id);
|
|
1046
|
-
if (exist) {
|
|
1047
|
-
Object.keys(button).filter(k => k !== 'id').forEach(key => {
|
|
1048
|
-
exist[key] = button[key];
|
|
1049
|
-
});
|
|
1050
|
-
AppService._endButtonsSource$.next([...AppService._endButtonsSource$.value]);
|
|
1051
|
-
return;
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
AppService._endButtonsSource$.next(ArrayService.addItem(AppService._endButtonsSource$.value, button));
|
|
875
|
+
get isMobile() {
|
|
876
|
+
return this.platform.is('capacitor');
|
|
1055
877
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
}
|
|
1064
|
-
AppService._endButtonsSource$.next([
|
|
1065
|
-
...AppService._endButtonsSource$.value.filter(e => e.id !== buttonOrId)
|
|
1066
|
-
]);
|
|
878
|
+
get isMobileWeb() {
|
|
879
|
+
return this.platform.is('mobileweb');
|
|
880
|
+
}
|
|
881
|
+
onBackButtonClick(callback) {
|
|
882
|
+
return App.addListener('backButton', () => {
|
|
883
|
+
callback();
|
|
884
|
+
});
|
|
1067
885
|
}
|
|
1068
886
|
}
|
|
1069
|
-
AppService._endButtonsSource$ = new BehaviorSubject([]);
|
|
1070
|
-
/** @nocollapse */ AppService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppService_Factory() { return new AppService(); }, token: AppService, providedIn: "root" });
|
|
1071
887
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1072
|
-
|
|
1073
|
-
{ type: Injectable
|
|
1074
|
-
|
|
1075
|
-
|
|
888
|
+
HardwareService.decorators = [
|
|
889
|
+
{ type: Injectable }
|
|
890
|
+
];
|
|
891
|
+
/**
|
|
892
|
+
* @type {function(): !Array<(null|{
|
|
893
|
+
* type: ?,
|
|
894
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
895
|
+
* })>}
|
|
896
|
+
* @nocollapse
|
|
897
|
+
*/
|
|
898
|
+
HardwareService.ctorParameters = () => [
|
|
899
|
+
{ type: Platform }
|
|
1076
900
|
];
|
|
1077
901
|
|
|
1078
|
-
class
|
|
1079
|
-
|
|
1080
|
-
|
|
902
|
+
class ModalService {
|
|
903
|
+
constructor(modalCtrl, navParams) {
|
|
904
|
+
this.modalCtrl = modalCtrl;
|
|
905
|
+
this.navParams = navParams;
|
|
1081
906
|
}
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
907
|
+
getParam(key) {
|
|
908
|
+
var _a;
|
|
909
|
+
return (_a = this.navParams) === null || _a === void 0 ? void 0 : _a.get(key);
|
|
910
|
+
}
|
|
911
|
+
show(options) {
|
|
912
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
913
|
+
const modalOptions = {
|
|
914
|
+
component: options.component,
|
|
915
|
+
componentProps: options.props,
|
|
916
|
+
cssClass: options.cssClass ? options.cssClass : [],
|
|
917
|
+
backdropDismiss: options.backdropDismiss
|
|
918
|
+
};
|
|
919
|
+
if (options.mode === "bottom") {
|
|
920
|
+
modalOptions.cssClass.push('smart-modal-bottom');
|
|
921
|
+
}
|
|
922
|
+
const modal = yield this.modalCtrl.create(modalOptions);
|
|
923
|
+
yield modal.present();
|
|
924
|
+
return modal;
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
dismiss(data = null) {
|
|
928
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
929
|
+
yield this.modalCtrl.dismiss(data);
|
|
1087
930
|
});
|
|
1088
931
|
}
|
|
1089
932
|
}
|
|
933
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
934
|
+
ModalService.decorators = [
|
|
935
|
+
{ type: Injectable }
|
|
936
|
+
];
|
|
937
|
+
/**
|
|
938
|
+
* @type {function(): !Array<(null|{
|
|
939
|
+
* type: ?,
|
|
940
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
941
|
+
* })>}
|
|
942
|
+
* @nocollapse
|
|
943
|
+
*/
|
|
944
|
+
ModalService.ctorParameters = () => [
|
|
945
|
+
{ type: ModalController },
|
|
946
|
+
{ type: NavParams, decorators: [{ type: Optional }] }
|
|
947
|
+
];
|
|
1090
948
|
|
|
1091
|
-
class
|
|
1092
|
-
constructor(
|
|
1093
|
-
this.
|
|
1094
|
-
this.
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
return result;
|
|
1110
|
-
if (mode === "create" && _.isObject(options.create)) {
|
|
1111
|
-
result = Object.assign(Object.assign({}, options), options.create);
|
|
1112
|
-
}
|
|
1113
|
-
else if (mode === "update" && _.isObject(options.update)) {
|
|
1114
|
-
result = Object.assign(Object.assign({}, options), options.update);
|
|
1115
|
-
}
|
|
1116
|
-
return result;
|
|
1117
|
-
}
|
|
1118
|
-
create(obj, ops = {}) {
|
|
1119
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1120
|
-
FormFactory.checkModelMeta(obj);
|
|
1121
|
-
const result = SmartFormGroup.create();
|
|
1122
|
-
const fields = getModelFieldsWithOptions(obj).filter((field) => {
|
|
1123
|
-
var _a, _b;
|
|
1124
|
-
return (!ops.mode ||
|
|
1125
|
-
(ops.mode === "create" && field.options.create) ||
|
|
1126
|
-
(ops.mode === "update" && field.options.update) ||
|
|
1127
|
-
(ops.mode === "multiUpdate" && ((_b = (_a = field.options) === null || _a === void 0 ? void 0 : _a.update) === null || _b === void 0 ? void 0 : _b.multi)) ||
|
|
1128
|
-
(ops.mode !== "create" &&
|
|
1129
|
-
ops.mode !== "update" &&
|
|
1130
|
-
field.options.customs &&
|
|
1131
|
-
field.options.customs.some((custom) => custom.mode === ops.mode)));
|
|
1132
|
-
});
|
|
1133
|
-
const enabledDefinitions = [];
|
|
1134
|
-
for (let index = 0; index < fields.length; index++) {
|
|
1135
|
-
const field = fields[index];
|
|
1136
|
-
let control = null;
|
|
1137
|
-
const options = FormFactory.getOptionsFromMode(field.options, ops.mode);
|
|
1138
|
-
if (options.permissions && !this.authService.expectPermissions(options.permissions)) {
|
|
1139
|
-
continue;
|
|
1140
|
-
}
|
|
1141
|
-
if (field.options.type === FieldType.object) {
|
|
1142
|
-
control = yield this.create(obj[field.key], ops);
|
|
1143
|
-
}
|
|
1144
|
-
else if (field.options.type === FieldType.array) {
|
|
1145
|
-
control = this.fb.array([]);
|
|
1146
|
-
if (obj[field.key]) {
|
|
1147
|
-
for (let indexField = 0; indexField < obj[field.key].length; indexField++) {
|
|
1148
|
-
control.push(yield this.create(obj[field.key][indexField], ops));
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
else {
|
|
1153
|
-
control = this.createControl(obj, field, options.required);
|
|
1154
|
-
}
|
|
1155
|
-
this.setValidators(field.key, control, options, result, ops.uniqueProvider);
|
|
1156
|
-
if (this.validatorsProvider) {
|
|
1157
|
-
const providerResult = yield this.validatorsProvider.get({
|
|
1158
|
-
key: field.key,
|
|
1159
|
-
instance: obj,
|
|
1160
|
-
type: obj.constructor,
|
|
1161
|
-
base: {
|
|
1162
|
-
validators: control.validator,
|
|
1163
|
-
asyncValidators: control.asyncValidator
|
|
1164
|
-
}
|
|
1165
|
-
});
|
|
1166
|
-
control.setValidators(providerResult.validators);
|
|
1167
|
-
control.setAsyncValidators(providerResult.asyncValidators);
|
|
1168
|
-
}
|
|
1169
|
-
result.addControl(field.key, control);
|
|
1170
|
-
if (options.confirm && options.type === FieldType.object) {
|
|
1171
|
-
throw Error("Object not supported confirms");
|
|
1172
|
-
}
|
|
1173
|
-
if (options.confirm) {
|
|
1174
|
-
const confirmControl = this.fb.control(null, [
|
|
1175
|
-
Validators.required,
|
|
1176
|
-
(a) => {
|
|
1177
|
-
if (a.value !== result.controls[field.key].value) {
|
|
1178
|
-
return {
|
|
1179
|
-
confirm: true,
|
|
1180
|
-
};
|
|
1181
|
-
}
|
|
1182
|
-
return null;
|
|
1183
|
-
},
|
|
1184
|
-
]);
|
|
1185
|
-
result.addControl(field.key + "Confirm", confirmControl);
|
|
1186
|
-
}
|
|
1187
|
-
if (options.enabled) {
|
|
1188
|
-
enabledDefinitions.push({
|
|
1189
|
-
key: field.key,
|
|
1190
|
-
control,
|
|
1191
|
-
enabled: options.enabled
|
|
1192
|
-
});
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
result.valueChanges.pipe(tap(value => {
|
|
1196
|
-
enabledDefinitions.forEach(def => {
|
|
1197
|
-
const enabled = SpecificationService.valid(value, def.enabled);
|
|
1198
|
-
def.control['__smartDisabled'] = !enabled;
|
|
1199
|
-
});
|
|
1200
|
-
}), delay(0)).subscribe(value => {
|
|
1201
|
-
enabledDefinitions.forEach(def => {
|
|
1202
|
-
if (!def.control['__smartDisabled'] && !result.controls[def.key]) {
|
|
1203
|
-
result.addControl(def.key, def.control);
|
|
1204
|
-
result.updateValueAndValidity();
|
|
1205
|
-
}
|
|
1206
|
-
else if (def.control['__smartDisabled'] && result.controls[def.key]) {
|
|
1207
|
-
result.removeControl(def.key);
|
|
1208
|
-
result.updateValueAndValidity();
|
|
1209
|
-
}
|
|
1210
|
-
});
|
|
949
|
+
class DynamicComponentLoader {
|
|
950
|
+
constructor(resolver, injector) {
|
|
951
|
+
this.resolver = resolver;
|
|
952
|
+
this.injector = injector;
|
|
953
|
+
}
|
|
954
|
+
getComponentsWithFactories(options) {
|
|
955
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
956
|
+
let components = [];
|
|
957
|
+
components = options.components.filter((comp) => !DynamicComponentLoader.declaredComponents.some((dec) => dec.component === comp)) || [];
|
|
958
|
+
const result = options.components.map((c) => {
|
|
959
|
+
let factory = this.resolver.resolveComponentFactory(c);
|
|
960
|
+
if (!factory) {
|
|
961
|
+
factory = DynamicComponentLoader.declaredComponents.find((x) => x.component === c).factory;
|
|
962
|
+
}
|
|
963
|
+
return {
|
|
964
|
+
component: c,
|
|
965
|
+
factory,
|
|
966
|
+
};
|
|
1211
967
|
});
|
|
968
|
+
DynamicComponentLoader.declaredComponents = [
|
|
969
|
+
...DynamicComponentLoader.declaredComponents,
|
|
970
|
+
...result,
|
|
971
|
+
];
|
|
1212
972
|
return result;
|
|
1213
973
|
});
|
|
1214
974
|
}
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
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
|
-
|
|
975
|
+
}
|
|
976
|
+
DynamicComponentLoader.declaredComponents = [];
|
|
977
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
978
|
+
DynamicComponentLoader.decorators = [
|
|
979
|
+
{ type: Injectable }
|
|
980
|
+
];
|
|
981
|
+
/**
|
|
982
|
+
* @type {function(): !Array<(null|{
|
|
983
|
+
* type: ?,
|
|
984
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
985
|
+
* })>}
|
|
986
|
+
* @nocollapse
|
|
987
|
+
*/
|
|
988
|
+
DynamicComponentLoader.ctorParameters = () => [
|
|
989
|
+
{ type: ComponentFactoryResolver },
|
|
990
|
+
{ type: Injector }
|
|
991
|
+
];
|
|
992
|
+
|
|
993
|
+
class PopoverService {
|
|
994
|
+
constructor(popoverCtrl) {
|
|
995
|
+
this.popoverCtrl = popoverCtrl;
|
|
996
|
+
}
|
|
997
|
+
close() {
|
|
998
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
999
|
+
yield this.popoverCtrl.dismiss();
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1004
|
+
PopoverService.decorators = [
|
|
1005
|
+
{ type: Injectable }
|
|
1006
|
+
];
|
|
1007
|
+
/**
|
|
1008
|
+
* @type {function(): !Array<(null|{
|
|
1009
|
+
* type: ?,
|
|
1010
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1011
|
+
* })>}
|
|
1012
|
+
* @nocollapse
|
|
1013
|
+
*/
|
|
1014
|
+
PopoverService.ctorParameters = () => [
|
|
1015
|
+
{ type: PopoverController }
|
|
1016
|
+
];
|
|
1017
|
+
|
|
1018
|
+
class StyleService {
|
|
1019
|
+
constructor(platform, platformId) {
|
|
1020
|
+
this.platform = platform;
|
|
1021
|
+
this.platformId = platformId;
|
|
1022
|
+
}
|
|
1023
|
+
static create(platform, platformId, el, style) {
|
|
1024
|
+
const result = new StyleService(platform, platformId);
|
|
1025
|
+
result.init(el, style);
|
|
1026
|
+
return result;
|
|
1027
|
+
}
|
|
1028
|
+
init(el, style) {
|
|
1029
|
+
this._elementRef = el;
|
|
1030
|
+
this.set(style);
|
|
1031
|
+
}
|
|
1032
|
+
set(style) {
|
|
1033
|
+
if (!style)
|
|
1034
|
+
style = {};
|
|
1035
|
+
if (!StyleService.style)
|
|
1036
|
+
StyleService.style = {};
|
|
1037
|
+
StyleService.style = Object.assign(Object.assign({}, StyleService.style), style);
|
|
1038
|
+
this.execute();
|
|
1039
|
+
}
|
|
1040
|
+
execute() {
|
|
1041
|
+
this.setColor('primary');
|
|
1042
|
+
this.setColor('secondary');
|
|
1043
|
+
this.setColor('tertiary');
|
|
1044
|
+
this.setColor('success');
|
|
1045
|
+
this.setColor('warning');
|
|
1046
|
+
this.setColor('danger');
|
|
1047
|
+
this.setColor('dark');
|
|
1048
|
+
this.setColor('medium');
|
|
1049
|
+
this.setColor('light');
|
|
1050
|
+
this.setFont();
|
|
1051
|
+
this.setButton();
|
|
1052
|
+
this.setMobileBreakpoint();
|
|
1053
|
+
}
|
|
1054
|
+
setColor(name) {
|
|
1055
|
+
this.setProperty(`--smart-color-${name}`, `color-${name}`);
|
|
1056
|
+
this.setProperty(`--smart-color-${name}-rgb`, `color-${name}-rgb`);
|
|
1057
|
+
this.setProperty(`--smart-color-${name}-contrast`, `color-${name}-contrast`);
|
|
1058
|
+
this.setProperty(`--smart-color-${name}-contrast-rgb`, `color-${name}-contrast-rgb`);
|
|
1059
|
+
this.setProperty(`--smart-color-${name}-shade`, `color-${name}-shade`);
|
|
1060
|
+
this.setProperty(`--smart-color-${name}-tint`, `color-${name}-tint`);
|
|
1061
|
+
this.setProperty(`--ion-color-${name}`, `color-${name}`);
|
|
1062
|
+
this.setProperty(`--ion-color-${name}-rgb`, `color-${name}-rgb`);
|
|
1063
|
+
this.setProperty(`--ion-color-${name}-contrast`, `color-${name}-contrast`);
|
|
1064
|
+
this.setProperty(`--ion-color-${name}-contrast-rgb`, `color-${name}-contrast-rgb`);
|
|
1065
|
+
this.setProperty(`--ion-color-${name}-shade`, `color-${name}-shade`);
|
|
1066
|
+
this.setProperty(`--ion-color-${name}-tint`, `color-${name}-tint`);
|
|
1067
|
+
}
|
|
1068
|
+
setProperty(property, type) {
|
|
1069
|
+
if (!StyleService.style[type])
|
|
1070
|
+
return;
|
|
1071
|
+
const native = this._elementRef.nativeElement;
|
|
1072
|
+
native.style.setProperty(property, StyleService.style[type]);
|
|
1073
|
+
}
|
|
1074
|
+
setFont() {
|
|
1075
|
+
if (isPlatformBrowser(this.platformId) && this.platform.is('ios')) {
|
|
1076
|
+
this.setProperty('--ion-font-family', 'ios-font');
|
|
1077
|
+
this.setProperty('--default-font-weight', 'ios-font-weight');
|
|
1078
|
+
this.setProperty('--default-font-style', 'ios-font-style');
|
|
1259
1079
|
}
|
|
1260
|
-
if ((
|
|
1261
|
-
|
|
1080
|
+
else if (isPlatformBrowser(this.platformId) && this.platform.is("android")) {
|
|
1081
|
+
this.setProperty('--ion-font-family', 'md-font');
|
|
1082
|
+
this.setProperty('--default-font-weight', 'md-font-weight');
|
|
1083
|
+
this.setProperty('--default-font-style', 'md-font-style');
|
|
1262
1084
|
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
};
|
|
1268
|
-
if (form.value && options.unique.withFields) {
|
|
1269
|
-
options.unique.withFields.forEach(fieldKey => {
|
|
1270
|
-
record[fieldKey] = form.value[fieldKey];
|
|
1271
|
-
});
|
|
1272
|
-
}
|
|
1273
|
-
if (yield uniqueProvider(record))
|
|
1274
|
-
return null;
|
|
1275
|
-
return {
|
|
1276
|
-
invalidUnique: true
|
|
1277
|
-
};
|
|
1278
|
-
}));
|
|
1085
|
+
else {
|
|
1086
|
+
this.setProperty('--ion-font-family', 'font');
|
|
1087
|
+
this.setProperty('--default-font-weight', 'font-weight');
|
|
1088
|
+
this.setProperty('--default-font-style', 'font-style');
|
|
1279
1089
|
}
|
|
1280
|
-
control.setValidators(result);
|
|
1281
|
-
control.setAsyncValidators(asyncResult);
|
|
1282
1090
|
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1091
|
+
setButton() {
|
|
1092
|
+
this.setProperty('--smart-button-height', 'button-height');
|
|
1093
|
+
this.setProperty('--smart-button-min-width', 'button-min-width');
|
|
1094
|
+
this.setProperty('--smart-button-padding-right', 'button-padding-right');
|
|
1095
|
+
this.setProperty('--smart-button-padding-left', 'button-padding-left');
|
|
1096
|
+
this.setProperty('--smart-button-padding-top', 'button-padding-top');
|
|
1097
|
+
this.setProperty('--smart-button-padding-bottom', 'button-padding-bottom');
|
|
1098
|
+
this.setProperty('--smart-button-icon-size', 'button-icon-size');
|
|
1099
|
+
}
|
|
1100
|
+
setMobileBreakpoint() {
|
|
1101
|
+
this.setProperty('--phone-breakpoint', 'phone-breakpoint');
|
|
1102
|
+
this.setProperty('--tablet-breakpoint', 'tablet-breakpoint');
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
StyleService.style = null;
|
|
1106
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1107
|
+
StyleService.decorators = [
|
|
1108
|
+
{ type: Injectable }
|
|
1109
|
+
];
|
|
1110
|
+
/**
|
|
1111
|
+
* @type {function(): !Array<(null|{
|
|
1112
|
+
* type: ?,
|
|
1113
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1114
|
+
* })>}
|
|
1115
|
+
* @nocollapse
|
|
1116
|
+
*/
|
|
1117
|
+
StyleService.ctorParameters = () => [
|
|
1118
|
+
{ type: Platform },
|
|
1119
|
+
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
|
|
1120
|
+
];
|
|
1121
|
+
|
|
1122
|
+
const FINGERPRINT_PLATFORMS = [
|
|
1123
|
+
'android',
|
|
1124
|
+
'ios', 'ipad'
|
|
1125
|
+
];
|
|
1126
|
+
class FingerprintService {
|
|
1127
|
+
constructor(platform, faio, translateService, storageService) {
|
|
1128
|
+
this.platform = platform;
|
|
1129
|
+
this.faio = faio;
|
|
1130
|
+
this.translateService = translateService;
|
|
1131
|
+
this.storageService = storageService;
|
|
1132
|
+
}
|
|
1133
|
+
isSet() {
|
|
1134
|
+
return FingerprintService.set || !!this.storageService.getItem('FINGERPINT_SET');
|
|
1135
|
+
}
|
|
1136
|
+
setData(data) {
|
|
1137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1138
|
+
if (!this.isSet() && FINGERPRINT_PLATFORMS.some(p => this.platform.is(p)) && (yield this.faio.isAvailable())) {
|
|
1139
|
+
yield this.faio.registerBiometricSecret({
|
|
1140
|
+
secret: JSON.stringify(data)
|
|
1306
1141
|
});
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1142
|
+
this.storageService.setItem('FINGERPINT_SET', "1");
|
|
1143
|
+
FingerprintService.set = true;
|
|
1144
|
+
return;
|
|
1145
|
+
}
|
|
1146
|
+
// // to tests
|
|
1147
|
+
// localStorage.setItem('TEST_FINGERPINT', JSON.stringify(data));
|
|
1148
|
+
// localStorage.setItem('FINGERPINT_SET', "1");
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
clearData() {
|
|
1152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1153
|
+
this.storageService.removeItem('FINGERPINT_SET');
|
|
1154
|
+
FingerprintService.set = false;
|
|
1155
|
+
});
|
|
1156
|
+
}
|
|
1157
|
+
getDate(options = {}) {
|
|
1158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1159
|
+
if (!options.force && !this.isSet())
|
|
1160
|
+
return null;
|
|
1161
|
+
FingerprintService.set = true;
|
|
1162
|
+
const data = yield this.faio.loadBiometricSecret({
|
|
1163
|
+
title: this.translateService.instant('APP.signIn'),
|
|
1164
|
+
cancelButtonTitle: this.translateService.instant('cancel')
|
|
1165
|
+
});
|
|
1166
|
+
// // to tests
|
|
1167
|
+
// const data = localStorage.getItem('TEST_FINGERPINT');
|
|
1168
|
+
return JSON.parse(data);
|
|
1169
|
+
});
|
|
1321
1170
|
}
|
|
1322
1171
|
}
|
|
1172
|
+
FingerprintService.set = false;
|
|
1323
1173
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1324
|
-
|
|
1174
|
+
FingerprintService.decorators = [
|
|
1325
1175
|
{ type: Injectable }
|
|
1326
1176
|
];
|
|
1327
1177
|
/**
|
|
@@ -1331,271 +1181,311 @@ FormFactory.decorators = [
|
|
|
1331
1181
|
* })>}
|
|
1332
1182
|
* @nocollapse
|
|
1333
1183
|
*/
|
|
1334
|
-
|
|
1335
|
-
{ type:
|
|
1336
|
-
{ type:
|
|
1337
|
-
{ type:
|
|
1184
|
+
FingerprintService.ctorParameters = () => [
|
|
1185
|
+
{ type: Platform },
|
|
1186
|
+
{ type: FingerprintAIO },
|
|
1187
|
+
{ type: TranslateService },
|
|
1188
|
+
{ type: StorageService }
|
|
1338
1189
|
];
|
|
1339
1190
|
|
|
1340
|
-
|
|
1191
|
+
const { Camera } = Plugins;
|
|
1192
|
+
class CameraService {
|
|
1193
|
+
getCapture(options = {}) {
|
|
1194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1195
|
+
const image = yield Camera.getPhoto({
|
|
1196
|
+
quality: options.quality ? options.quality : 100,
|
|
1197
|
+
resultType: CameraResultType.Base64
|
|
1198
|
+
});
|
|
1199
|
+
return {
|
|
1200
|
+
data: image.base64String,
|
|
1201
|
+
exif: image.exif
|
|
1202
|
+
};
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1341
1205
|
}
|
|
1342
1206
|
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1343
|
-
|
|
1344
|
-
{ type:
|
|
1345
|
-
imports: [
|
|
1346
|
-
ReactiveFormsModule
|
|
1347
|
-
],
|
|
1348
|
-
providers: [
|
|
1349
|
-
FormFactory
|
|
1350
|
-
]
|
|
1351
|
-
},] }
|
|
1207
|
+
CameraService.decorators = [
|
|
1208
|
+
{ type: Injectable }
|
|
1352
1209
|
];
|
|
1353
1210
|
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1211
|
+
const FILE_SERVICE_CONFIG = new InjectionToken('FILE_SERVICE_CONFIG');
|
|
1212
|
+
class FileService {
|
|
1213
|
+
constructor(config, http) {
|
|
1214
|
+
this.config = config;
|
|
1215
|
+
this.http = http;
|
|
1216
|
+
}
|
|
1217
|
+
upload(file, callback) {
|
|
1218
|
+
const formData = new FormData();
|
|
1219
|
+
formData.append('file', file, file.name);
|
|
1220
|
+
return this.http.post(this.config.apiUrl + '/attachments', formData, {
|
|
1221
|
+
reportProgress: true,
|
|
1222
|
+
observe: 'events'
|
|
1223
|
+
}).pipe(map((event) => {
|
|
1224
|
+
if (event.type === HttpEventType.UploadProgress) {
|
|
1225
|
+
const percentDone = Math.round(100 * event.loaded / event.total);
|
|
1226
|
+
return percentDone;
|
|
1227
|
+
}
|
|
1228
|
+
if (event.type === HttpEventType.Response) {
|
|
1229
|
+
if (callback)
|
|
1230
|
+
callback(event.body);
|
|
1231
|
+
return 100;
|
|
1232
|
+
}
|
|
1233
|
+
}));
|
|
1234
|
+
}
|
|
1235
|
+
download(id) {
|
|
1236
|
+
window.open(this.getUrl(id), '_blank').focus();
|
|
1237
|
+
}
|
|
1238
|
+
delete(id) {
|
|
1239
|
+
return this.http.delete(this.config.apiUrl + '/attachments/' + id).toPromise();
|
|
1240
|
+
}
|
|
1241
|
+
getUrl(id) {
|
|
1242
|
+
return this.config.apiUrl + '/attachments/' + id;
|
|
1365
1243
|
}
|
|
1366
1244
|
}
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
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
|
-
November: "November",
|
|
1414
|
-
December: "December"
|
|
1415
|
-
},
|
|
1416
|
-
Today: "Today",
|
|
1417
|
-
LastSevenDays: "Last 7 days",
|
|
1418
|
-
ThisMonth: "This month",
|
|
1419
|
-
Yesterday: "Yesterday",
|
|
1420
|
-
LastThirtyDays: "Last 30 days",
|
|
1421
|
-
LastMonth: "Last month"
|
|
1422
|
-
},
|
|
1423
|
-
OBJECT: {
|
|
1424
|
-
deleted: 'object deleted',
|
|
1425
|
-
confirmDelete: 'confirm delete object'
|
|
1426
|
-
},
|
|
1427
|
-
APP: {
|
|
1428
|
-
logout: 'log out',
|
|
1429
|
-
signIn: 'sign in',
|
|
1430
|
-
logged: 'logged'
|
|
1431
|
-
},
|
|
1432
|
-
MODEL: {
|
|
1433
|
-
body: 'body',
|
|
1434
|
-
buildingNumber: 'building number',
|
|
1435
|
-
city: 'city',
|
|
1436
|
-
date: 'date',
|
|
1437
|
-
disabled: 'disabled',
|
|
1438
|
-
email: 'email',
|
|
1439
|
-
file: 'file',
|
|
1440
|
-
firstName: 'first name',
|
|
1441
|
-
flatNumber: 'flat number',
|
|
1442
|
-
lastName: 'last name',
|
|
1443
|
-
password: 'password',
|
|
1444
|
-
passwordConfirm: 'confirm password',
|
|
1445
|
-
passwordReset: 'reset password',
|
|
1446
|
-
permissions: 'permissions',
|
|
1447
|
-
price: 'price',
|
|
1448
|
-
send: 'send',
|
|
1449
|
-
street: 'street',
|
|
1450
|
-
username: 'user name',
|
|
1451
|
-
zipCode: 'zip code',
|
|
1452
|
-
},
|
|
1453
|
-
INPUT: {
|
|
1454
|
-
ERRORS: {
|
|
1455
|
-
required: 'field is required',
|
|
1456
|
-
requires: 'fields are required',
|
|
1457
|
-
invalidNip: 'Invalid nip format',
|
|
1458
|
-
invalidUnique: 'Invalid unique value',
|
|
1459
|
-
invalidFileType: 'Invalid file type',
|
|
1460
|
-
confirm: 'bad confirmed',
|
|
1461
|
-
invalidEmailFormat: "invalid email format",
|
|
1462
|
-
invalidPhoneNumberFormat: "invalid phone number (000000000)",
|
|
1463
|
-
invalidPeselFormat: "invalid pesel",
|
|
1464
|
-
invalidMinLength: "min length",
|
|
1465
|
-
invalidMaxLength: "max length",
|
|
1466
|
-
invalidMin: 'min value',
|
|
1467
|
-
invalidMax: 'max value',
|
|
1468
|
-
upperLetters: "upper letters",
|
|
1469
|
-
lowerLetters: "lower letters",
|
|
1470
|
-
symbols: "string"
|
|
1471
|
-
},
|
|
1472
|
-
'PASSWORD-STRENGTH': {
|
|
1473
|
-
poor: 'poor',
|
|
1474
|
-
notGood: 'not ood',
|
|
1475
|
-
good: 'good'
|
|
1245
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1246
|
+
FileService.decorators = [
|
|
1247
|
+
{ type: Injectable }
|
|
1248
|
+
];
|
|
1249
|
+
/**
|
|
1250
|
+
* @type {function(): !Array<(null|{
|
|
1251
|
+
* type: ?,
|
|
1252
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1253
|
+
* })>}
|
|
1254
|
+
* @nocollapse
|
|
1255
|
+
*/
|
|
1256
|
+
FileService.ctorParameters = () => [
|
|
1257
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [FILE_SERVICE_CONFIG,] }] },
|
|
1258
|
+
{ type: HttpClient }
|
|
1259
|
+
];
|
|
1260
|
+
|
|
1261
|
+
class CalendarService {
|
|
1262
|
+
constructor() {
|
|
1263
|
+
this.state = {
|
|
1264
|
+
date: moment$1().add(2, 'year'),
|
|
1265
|
+
calendar: [
|
|
1266
|
+
{
|
|
1267
|
+
dates: null,
|
|
1268
|
+
monthName: null,
|
|
1269
|
+
number: null,
|
|
1270
|
+
year: null
|
|
1271
|
+
}
|
|
1272
|
+
]
|
|
1273
|
+
};
|
|
1274
|
+
this.setState = (nextState) => {
|
|
1275
|
+
this.state = Object.assign(Object.assign({}, this.state), nextState);
|
|
1276
|
+
};
|
|
1277
|
+
//this service is a singleton therefore its constructor will only
|
|
1278
|
+
//be called once during the application life cycle
|
|
1279
|
+
this.initCalendar();
|
|
1280
|
+
}
|
|
1281
|
+
getCalendar() {
|
|
1282
|
+
return [...this.state.calendar];
|
|
1283
|
+
}
|
|
1284
|
+
generatePrevMonths() {
|
|
1285
|
+
const calendar = this.state.calendar;
|
|
1286
|
+
let date = moment$1(calendar[0].year + '-' + calendar[0].number + '-01');
|
|
1287
|
+
const dateYearAgo = date.clone().subtract(1, 'year');
|
|
1288
|
+
while (date.isSameOrAfter(dateYearAgo)) {
|
|
1289
|
+
date = date.clone().subtract(1, 'month');
|
|
1290
|
+
calendar.unshift(this.generateMonth(date));
|
|
1476
1291
|
}
|
|
1477
|
-
},
|
|
1478
|
-
ERRORS: {
|
|
1479
|
-
invalidUsernameOrPassword: 'Invalid username or password',
|
|
1480
|
-
other: 'Error'
|
|
1481
1292
|
}
|
|
1482
|
-
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
delete: 'usuń',
|
|
1491
|
-
undo: 'cofnij',
|
|
1492
|
-
search: 'wyszukaj',
|
|
1493
|
-
page: 'strona',
|
|
1494
|
-
filters: 'filtry',
|
|
1495
|
-
or: 'lub',
|
|
1496
|
-
signInQuicklyWith: 'szybko zaloguj się za pomocą',
|
|
1497
|
-
selected: "wybrano",
|
|
1498
|
-
select: "wybierz",
|
|
1499
|
-
show: "pokaż",
|
|
1500
|
-
download: "pobierz",
|
|
1501
|
-
play: "włącz",
|
|
1502
|
-
writeHere: "napisz tutaj",
|
|
1503
|
-
next: 'dalej',
|
|
1504
|
-
prev: 'wstecz',
|
|
1505
|
-
edit: "edycja",
|
|
1506
|
-
save: "zapisz",
|
|
1507
|
-
noResults: "brak wyników",
|
|
1508
|
-
CALENDAR: {
|
|
1509
|
-
DAY_OF_WEEK: {
|
|
1510
|
-
Mon: 'Pon',
|
|
1511
|
-
Tue: 'Wto',
|
|
1512
|
-
Wed: 'Śro',
|
|
1513
|
-
Thu: 'Czw',
|
|
1514
|
-
Fri: 'Pio',
|
|
1515
|
-
Sat: 'Sob',
|
|
1516
|
-
Sun: 'Nie',
|
|
1517
|
-
},
|
|
1518
|
-
MONTH: {
|
|
1519
|
-
January: "Styczeń",
|
|
1520
|
-
February: "Luty",
|
|
1521
|
-
March: "Marzec",
|
|
1522
|
-
April: "Kwiecień",
|
|
1523
|
-
May: "Maj",
|
|
1524
|
-
June: "Czerwiec",
|
|
1525
|
-
July: "Lipiec",
|
|
1526
|
-
August: "Sierpień",
|
|
1527
|
-
September: "Wrzesień",
|
|
1528
|
-
October: "Październik",
|
|
1529
|
-
November: "Listopad",
|
|
1530
|
-
December: "Grudzień"
|
|
1531
|
-
},
|
|
1532
|
-
Today: "Dzisiaj",
|
|
1533
|
-
LastSevenDays: "Ostatnie 7 dnii",
|
|
1534
|
-
ThisMonth: "Ten miesiąc",
|
|
1535
|
-
Yesterday: "Wczoraj",
|
|
1536
|
-
LastThirtyDays: "Ostatnie 30 dni",
|
|
1537
|
-
LastMonth: "Ostatni miesiąc"
|
|
1538
|
-
},
|
|
1539
|
-
OBJECT: {
|
|
1540
|
-
deleted: 'obiekt został usunięty',
|
|
1541
|
-
confirmDelete: 'potwierdź usunięcie'
|
|
1542
|
-
},
|
|
1543
|
-
APP: {
|
|
1544
|
-
logout: 'wyloguj się',
|
|
1545
|
-
logged: 'zalogowany',
|
|
1546
|
-
signIn: 'zaloguj się'
|
|
1547
|
-
},
|
|
1548
|
-
MODEL: {
|
|
1549
|
-
body: 'treść',
|
|
1550
|
-
buildingNumber: 'numer budynku',
|
|
1551
|
-
city: 'miasto',
|
|
1552
|
-
date: 'data',
|
|
1553
|
-
disabled: 'nieaktywny',
|
|
1554
|
-
email: 'email',
|
|
1555
|
-
file: 'plik',
|
|
1556
|
-
firstName: 'imię',
|
|
1557
|
-
flatNumber: 'numer lokalu',
|
|
1558
|
-
lastName: 'nazwisko',
|
|
1559
|
-
password: 'hasło',
|
|
1560
|
-
passwordConfirm: 'powtórz hasło',
|
|
1561
|
-
passwordReset: 'Nie pamiętam hasła',
|
|
1562
|
-
permissions: 'uprawnienia',
|
|
1563
|
-
price: 'cena',
|
|
1564
|
-
send: 'wyślij',
|
|
1565
|
-
street: 'ulica',
|
|
1566
|
-
username: 'nazwa użytkownika',
|
|
1567
|
-
zipCode: 'kod pocztowy',
|
|
1568
|
-
},
|
|
1569
|
-
INPUT: {
|
|
1570
|
-
ERRORS: {
|
|
1571
|
-
required: 'to pole jest wymagane',
|
|
1572
|
-
requires: 'te pola są wymagane',
|
|
1573
|
-
invalidNip: 'niepoprawny format nip',
|
|
1574
|
-
invalidUnique: 'wartość jest już w systemie',
|
|
1575
|
-
confirm: 'źle powtórzone',
|
|
1576
|
-
invalidEmailFormat: "niepoprawny adres email",
|
|
1577
|
-
invalidFileType: 'niepoprawny format pliku',
|
|
1578
|
-
invalidPhoneNumberFormat: "niepoprawny numer telefonu (000000000)",
|
|
1579
|
-
invalidPeselFormat: "niepoprawny numer pesel",
|
|
1580
|
-
invalidMinLength: "minimalna długość",
|
|
1581
|
-
invalidMaxLength: "maksymalna długość",
|
|
1582
|
-
invalidMin: "minimalna wartość",
|
|
1583
|
-
invalidMax: "maksymalna wartość",
|
|
1584
|
-
upperLetters: "duże litery",
|
|
1585
|
-
lowerLetters: "małe litery",
|
|
1586
|
-
symbols: "znaki specjalne"
|
|
1587
|
-
},
|
|
1588
|
-
'PASSWORD-STRENGTH': {
|
|
1589
|
-
poor: 'bardzo słabe',
|
|
1590
|
-
notGood: 'słabe',
|
|
1591
|
-
good: 'dobre'
|
|
1293
|
+
generateNextMonths() {
|
|
1294
|
+
const calendar = this.state.calendar;
|
|
1295
|
+
const dateString = calendar[calendar.length - 1].year + '-' + calendar[calendar.length - 1].number + '-01';
|
|
1296
|
+
let date = moment$1(dateString);
|
|
1297
|
+
const dateYearNext = date.clone().add(1, 'year');
|
|
1298
|
+
while (date.isSameOrBefore(dateYearNext)) {
|
|
1299
|
+
date = date.clone().add(1, 'month');
|
|
1300
|
+
calendar.push(this.generateMonth(date));
|
|
1592
1301
|
}
|
|
1593
|
-
},
|
|
1594
|
-
ERRORS: {
|
|
1595
|
-
invalidUsernameOrPassword: 'Niepoprawna nazwa użytkownika, lub hasło',
|
|
1596
|
-
other: 'Wystąpił błąd'
|
|
1597
1302
|
}
|
|
1598
|
-
|
|
1303
|
+
initCalendar() {
|
|
1304
|
+
const { date } = this.state;
|
|
1305
|
+
const firstMonth = this.generateMonth(date);
|
|
1306
|
+
const calendar = [firstMonth];
|
|
1307
|
+
const currentDate = moment$1().clone();
|
|
1308
|
+
const dateYearAgo = currentDate.clone().subtract(2, 'year');
|
|
1309
|
+
while (date.isSameOrAfter(dateYearAgo)) { // creating one year calendar
|
|
1310
|
+
calendar.unshift(this.previousMonth());
|
|
1311
|
+
}
|
|
1312
|
+
this.state.date = moment$1();
|
|
1313
|
+
const currentMonthIndex = calendar.length - 13;
|
|
1314
|
+
calendar[currentMonthIndex].dates = calendar[currentMonthIndex].dates.filter(this.filterFutureDates);
|
|
1315
|
+
this.setState({ calendar: calendar });
|
|
1316
|
+
}
|
|
1317
|
+
previousMonth() {
|
|
1318
|
+
const { date } = this.state;
|
|
1319
|
+
const newDate = date.subtract(1, 'month');
|
|
1320
|
+
const m = this.generateMonth(newDate);
|
|
1321
|
+
this.setState({ date: newDate });
|
|
1322
|
+
return m;
|
|
1323
|
+
}
|
|
1324
|
+
filterFutureDates(date) {
|
|
1325
|
+
if (!date) {
|
|
1326
|
+
return true;
|
|
1327
|
+
}
|
|
1328
|
+
return date.isSameOrBefore(moment$1());
|
|
1329
|
+
}
|
|
1330
|
+
generateMonth(date) {
|
|
1331
|
+
const firstDay = moment$1(date).startOf('month');
|
|
1332
|
+
const monthName = moment$1(date).format('MMMM');
|
|
1333
|
+
const year = moment$1(date).format('YYYY');
|
|
1334
|
+
const number = moment$1(date).format('MM');
|
|
1335
|
+
const monthLength = date.daysInMonth();
|
|
1336
|
+
const totalDatesInMonth = this.generateMonthDates(firstDay, monthLength);
|
|
1337
|
+
const emptyCellsBeforeFirstDay = Array(firstDay.weekday()).fill(null);
|
|
1338
|
+
const dates = [...emptyCellsBeforeFirstDay, ...totalDatesInMonth];
|
|
1339
|
+
return {
|
|
1340
|
+
dates,
|
|
1341
|
+
monthName,
|
|
1342
|
+
number,
|
|
1343
|
+
year
|
|
1344
|
+
};
|
|
1345
|
+
}
|
|
1346
|
+
generateMonthDates(firstDay, length) {
|
|
1347
|
+
return Array(length).fill(null).map((v, i) => moment$1(firstDay).add(i, 'day'));
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1351
|
+
CalendarService.decorators = [
|
|
1352
|
+
{ type: Injectable }
|
|
1353
|
+
];
|
|
1354
|
+
/**
|
|
1355
|
+
* @type {function(): !Array<(null|{
|
|
1356
|
+
* type: ?,
|
|
1357
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1358
|
+
* })>}
|
|
1359
|
+
* @nocollapse
|
|
1360
|
+
*/
|
|
1361
|
+
CalendarService.ctorParameters = () => [];
|
|
1362
|
+
|
|
1363
|
+
class UIService {
|
|
1364
|
+
constructor(loadingController, alertController, toastController) {
|
|
1365
|
+
this.loadingController = loadingController;
|
|
1366
|
+
this.alertController = alertController;
|
|
1367
|
+
this.toastController = toastController;
|
|
1368
|
+
}
|
|
1369
|
+
showLoading(msg) {
|
|
1370
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1371
|
+
const loader = yield this.loadingController.create({
|
|
1372
|
+
message: msg || 'loading...',
|
|
1373
|
+
});
|
|
1374
|
+
yield loader.present();
|
|
1375
|
+
return loader;
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
showSimpleAlert(msg, heading) {
|
|
1379
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1380
|
+
const alert = yield this.alertController.create({
|
|
1381
|
+
header: heading || 'Alert',
|
|
1382
|
+
message: msg,
|
|
1383
|
+
buttons: ['OK']
|
|
1384
|
+
});
|
|
1385
|
+
yield alert.present();
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
showAlertWithDismissCallback(heading, msg, btnText, callback) {
|
|
1389
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1390
|
+
const alert = yield this.alertController.create({
|
|
1391
|
+
header: heading,
|
|
1392
|
+
message: msg,
|
|
1393
|
+
buttons: [
|
|
1394
|
+
{
|
|
1395
|
+
text: btnText,
|
|
1396
|
+
}
|
|
1397
|
+
]
|
|
1398
|
+
});
|
|
1399
|
+
yield alert.present();
|
|
1400
|
+
alert.onDidDismiss().then(() => { callback(); });
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
showToast(msg, duration) {
|
|
1404
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1405
|
+
const toast = yield this.toastController.create({
|
|
1406
|
+
message: msg,
|
|
1407
|
+
color: 'dark',
|
|
1408
|
+
duration: duration || 2000
|
|
1409
|
+
});
|
|
1410
|
+
toast.present();
|
|
1411
|
+
return toast;
|
|
1412
|
+
});
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1416
|
+
UIService.decorators = [
|
|
1417
|
+
{ type: Injectable }
|
|
1418
|
+
];
|
|
1419
|
+
/**
|
|
1420
|
+
* @type {function(): !Array<(null|{
|
|
1421
|
+
* type: ?,
|
|
1422
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1423
|
+
* })>}
|
|
1424
|
+
* @nocollapse
|
|
1425
|
+
*/
|
|
1426
|
+
UIService.ctorParameters = () => [
|
|
1427
|
+
{ type: LoadingController },
|
|
1428
|
+
{ type: AlertController },
|
|
1429
|
+
{ type: ToastController }
|
|
1430
|
+
];
|
|
1431
|
+
|
|
1432
|
+
class AlertService {
|
|
1433
|
+
constructor(alertCtrl) {
|
|
1434
|
+
this.alertCtrl = alertCtrl;
|
|
1435
|
+
}
|
|
1436
|
+
show(options) {
|
|
1437
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1438
|
+
const alert = yield this.alertCtrl.create(options);
|
|
1439
|
+
yield alert.present();
|
|
1440
|
+
});
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1444
|
+
AlertService.decorators = [
|
|
1445
|
+
{ type: Injectable }
|
|
1446
|
+
];
|
|
1447
|
+
/**
|
|
1448
|
+
* @type {function(): !Array<(null|{
|
|
1449
|
+
* type: ?,
|
|
1450
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1451
|
+
* })>}
|
|
1452
|
+
* @nocollapse
|
|
1453
|
+
*/
|
|
1454
|
+
AlertService.ctorParameters = () => [
|
|
1455
|
+
{ type: AlertController }
|
|
1456
|
+
];
|
|
1457
|
+
|
|
1458
|
+
class SharedServicesModule {
|
|
1459
|
+
}
|
|
1460
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1461
|
+
SharedServicesModule.decorators = [
|
|
1462
|
+
{ type: NgModule, args: [{
|
|
1463
|
+
imports: [
|
|
1464
|
+
IonicModule,
|
|
1465
|
+
TranslateModule.forChild(),
|
|
1466
|
+
CookieModule.forRoot(),
|
|
1467
|
+
],
|
|
1468
|
+
providers: [
|
|
1469
|
+
ToastService,
|
|
1470
|
+
ErrorService,
|
|
1471
|
+
HardwareService,
|
|
1472
|
+
ModalService,
|
|
1473
|
+
DynamicComponentLoader,
|
|
1474
|
+
PopoverService,
|
|
1475
|
+
StorageService,
|
|
1476
|
+
StyleService,
|
|
1477
|
+
AuthService,
|
|
1478
|
+
FingerprintService,
|
|
1479
|
+
FingerprintAIO,
|
|
1480
|
+
CameraService,
|
|
1481
|
+
FileService,
|
|
1482
|
+
CalendarService,
|
|
1483
|
+
UIService,
|
|
1484
|
+
AlertService,
|
|
1485
|
+
DetailsService
|
|
1486
|
+
],
|
|
1487
|
+
},] }
|
|
1488
|
+
];
|
|
1599
1489
|
|
|
1600
1490
|
class EnumToListPipe {
|
|
1601
1491
|
transform(value) {
|
|
@@ -1940,6 +1830,105 @@ AccordionHeaderComponent.decorators = [
|
|
|
1940
1830
|
*/
|
|
1941
1831
|
AccordionHeaderComponent.ctorParameters = () => [];
|
|
1942
1832
|
|
|
1833
|
+
/**
|
|
1834
|
+
* Only to use in smart-page
|
|
1835
|
+
* @requires PageComponent
|
|
1836
|
+
*/
|
|
1837
|
+
class MenuService {
|
|
1838
|
+
constructor(menuCtrl, resolver) {
|
|
1839
|
+
this.menuCtrl = menuCtrl;
|
|
1840
|
+
this.resolver = resolver;
|
|
1841
|
+
this._openedEnd = false;
|
|
1842
|
+
this._menuItemsSource = new BehaviorSubject([]);
|
|
1843
|
+
this.menuItems$ = this._menuItemsSource.asObservable();
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* @desc checking if the menu is open (menu on the right side of the screen)
|
|
1847
|
+
*/
|
|
1848
|
+
get openedEnd() {
|
|
1849
|
+
return this._openedEnd;
|
|
1850
|
+
}
|
|
1851
|
+
changeMenuItemByRoute(route, changes) {
|
|
1852
|
+
const items = this._menuItemsSource.value.map(i => {
|
|
1853
|
+
if (i.route === route)
|
|
1854
|
+
return Object.assign(Object.assign({}, i), changes);
|
|
1855
|
+
return i;
|
|
1856
|
+
});
|
|
1857
|
+
this._menuItemsSource.next(items);
|
|
1858
|
+
}
|
|
1859
|
+
setMenuItems(items) {
|
|
1860
|
+
this._menuItemsSource.next(items);
|
|
1861
|
+
}
|
|
1862
|
+
/**
|
|
1863
|
+
* @private
|
|
1864
|
+
*/
|
|
1865
|
+
init(endContainer) {
|
|
1866
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1867
|
+
this._endContainer = endContainer;
|
|
1868
|
+
yield this.menuCtrl.close("end");
|
|
1869
|
+
});
|
|
1870
|
+
}
|
|
1871
|
+
/**
|
|
1872
|
+
* @desc open menu (menu on the right side of the screen)
|
|
1873
|
+
* @param {object} options - use options
|
|
1874
|
+
* @param {class} options.component - angular component to render
|
|
1875
|
+
* @param {class} options.injector - angular injector to use in component
|
|
1876
|
+
*/
|
|
1877
|
+
openEnd(options) {
|
|
1878
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1879
|
+
this._openedEnd = true;
|
|
1880
|
+
if (this._endContainer) {
|
|
1881
|
+
const resolver = options.injector.get(ComponentFactoryResolver);
|
|
1882
|
+
this._endContainer.clear();
|
|
1883
|
+
const factory = resolver.resolveComponentFactory(options.component);
|
|
1884
|
+
this._endContainer.createComponent(factory, 0, options.injector);
|
|
1885
|
+
}
|
|
1886
|
+
yield this.menuCtrl.enable(true, "end");
|
|
1887
|
+
yield this.menuCtrl.open("end");
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1890
|
+
/**
|
|
1891
|
+
* @desc close menu (menu on the left side of the screen)
|
|
1892
|
+
*/
|
|
1893
|
+
closeStart() {
|
|
1894
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1895
|
+
this._openedEnd = false;
|
|
1896
|
+
yield this.menuCtrl.close("start");
|
|
1897
|
+
yield this.menuCtrl.enable(false, "start");
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
/**
|
|
1901
|
+
* @desc close menu (menu on the right side of the screen)
|
|
1902
|
+
*/
|
|
1903
|
+
closeEnd() {
|
|
1904
|
+
var _a;
|
|
1905
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1906
|
+
this._openedEnd = false;
|
|
1907
|
+
yield this.menuCtrl.close("end");
|
|
1908
|
+
yield this.menuCtrl.enable(false, "end");
|
|
1909
|
+
(_a = this._endContainer) === null || _a === void 0 ? void 0 : _a.clear();
|
|
1910
|
+
});
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
/** @nocollapse */ MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(i0.ɵɵinject(i1.MenuController), i0.ɵɵinject(i0.ComponentFactoryResolver)); }, token: MenuService, providedIn: "root" });
|
|
1914
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
1915
|
+
MenuService.decorators = [
|
|
1916
|
+
{ type: Injectable, args: [{
|
|
1917
|
+
providedIn: "root",
|
|
1918
|
+
},] }
|
|
1919
|
+
];
|
|
1920
|
+
/**
|
|
1921
|
+
* @type {function(): !Array<(null|{
|
|
1922
|
+
* type: ?,
|
|
1923
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
1924
|
+
* })>}
|
|
1925
|
+
* @nocollapse
|
|
1926
|
+
*/
|
|
1927
|
+
MenuService.ctorParameters = () => [
|
|
1928
|
+
{ type: MenuController },
|
|
1929
|
+
{ type: ComponentFactoryResolver }
|
|
1930
|
+
];
|
|
1931
|
+
|
|
1943
1932
|
class AppBaseComponent {
|
|
1944
1933
|
constructor(router, cd, elementRef, styleService, menuService, authService, platformId, document) {
|
|
1945
1934
|
this.router = router;
|
|
@@ -2609,14 +2598,16 @@ DetailTextComponent.decorators = [
|
|
|
2609
2598
|
];
|
|
2610
2599
|
|
|
2611
2600
|
class DetailsComponent extends CreateDynamicComponent("details") {
|
|
2612
|
-
constructor() {
|
|
2613
|
-
super(
|
|
2601
|
+
constructor(cd, moduleRef, cfr, detailsService) {
|
|
2602
|
+
super(cd, moduleRef, cfr);
|
|
2603
|
+
this.detailsService = detailsService;
|
|
2614
2604
|
this._subscription = new Subscription();
|
|
2615
2605
|
this.dynamicContents = new QueryList();
|
|
2616
2606
|
}
|
|
2617
2607
|
set options(val) {
|
|
2618
2608
|
this._options = val;
|
|
2619
2609
|
this._subscription.add(this._options.item$.subscribe((item) => {
|
|
2610
|
+
this.detailsService.setRoot(item);
|
|
2620
2611
|
this.item = item;
|
|
2621
2612
|
}));
|
|
2622
2613
|
this.refreshDynamicInstance();
|
|
@@ -2647,6 +2638,19 @@ DetailsComponent.decorators = [
|
|
|
2647
2638
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2648
2639
|
},] }
|
|
2649
2640
|
];
|
|
2641
|
+
/**
|
|
2642
|
+
* @type {function(): !Array<(null|{
|
|
2643
|
+
* type: ?,
|
|
2644
|
+
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
2645
|
+
* })>}
|
|
2646
|
+
* @nocollapse
|
|
2647
|
+
*/
|
|
2648
|
+
DetailsComponent.ctorParameters = () => [
|
|
2649
|
+
{ type: ChangeDetectorRef },
|
|
2650
|
+
{ type: NgModuleRef },
|
|
2651
|
+
{ type: ComponentFactoryResolver },
|
|
2652
|
+
{ type: DetailsService }
|
|
2653
|
+
];
|
|
2650
2654
|
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
2651
2655
|
DetailsComponent.propDecorators = {
|
|
2652
2656
|
options: [{ type: Input }],
|
|
@@ -2655,8 +2659,9 @@ DetailsComponent.propDecorators = {
|
|
|
2655
2659
|
};
|
|
2656
2660
|
|
|
2657
2661
|
class DetailsBaseComponent {
|
|
2658
|
-
constructor(authService) {
|
|
2662
|
+
constructor(authService, detailsService) {
|
|
2659
2663
|
this.authService = authService;
|
|
2664
|
+
this.detailsService = detailsService;
|
|
2660
2665
|
}
|
|
2661
2666
|
get fields() {
|
|
2662
2667
|
return this._fields;
|
|
@@ -2697,7 +2702,9 @@ class DetailsBaseComponent {
|
|
|
2697
2702
|
else
|
|
2698
2703
|
result = ObjectService.createByType(item, obj.type);
|
|
2699
2704
|
const removeFields = enabledDefinitions.filter((def) => {
|
|
2700
|
-
return SpecificationService.invalid(result, def.spec
|
|
2705
|
+
return SpecificationService.invalid(result, def.spec, {
|
|
2706
|
+
$root: this.detailsService.$root
|
|
2707
|
+
});
|
|
2701
2708
|
}).map(def => def.key);
|
|
2702
2709
|
this._fields = this._fields.filter(f => !removeFields.some(rf => rf === f.key));
|
|
2703
2710
|
return result;
|
|
@@ -2738,7 +2745,8 @@ DetailsBaseComponent.decorators = [
|
|
|
2738
2745
|
* @nocollapse
|
|
2739
2746
|
*/
|
|
2740
2747
|
DetailsBaseComponent.ctorParameters = () => [
|
|
2741
|
-
{ type: AuthService }
|
|
2748
|
+
{ type: AuthService },
|
|
2749
|
+
{ type: DetailsService }
|
|
2742
2750
|
];
|
|
2743
2751
|
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
2744
2752
|
DetailsBaseComponent.propDecorators = {
|
|
@@ -3143,6 +3151,64 @@ GridRowComponent.propDecorators = {
|
|
|
3143
3151
|
rowClassExist: [{ type: HostBinding, args: ['class.row',] }]
|
|
3144
3152
|
};
|
|
3145
3153
|
|
|
3154
|
+
class NgrxStoreService {
|
|
3155
|
+
static addReducer(key, reducer) {
|
|
3156
|
+
if (!NgrxStoreService._reducers[key]) {
|
|
3157
|
+
NgrxStoreService._reducers[key] = reducer;
|
|
3158
|
+
NgrxStoreService.store.addReducer(key, reducer);
|
|
3159
|
+
console.log(`${NgrxStoreService.name} register reducer ${key}`);
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
connect(store) {
|
|
3163
|
+
NgrxStoreService.store = store;
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
NgrxStoreService._reducers = {};
|
|
3167
|
+
NgrxStoreService.store = undefined;
|
|
3168
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
3169
|
+
NgrxStoreService.decorators = [
|
|
3170
|
+
{ type: Injectable }
|
|
3171
|
+
];
|
|
3172
|
+
|
|
3173
|
+
class AppService {
|
|
3174
|
+
constructor() {
|
|
3175
|
+
this.endButtons$ = AppService._endButtonsSource$.asObservable();
|
|
3176
|
+
}
|
|
3177
|
+
addEndButton(button) {
|
|
3178
|
+
if (button.id) {
|
|
3179
|
+
const exist = AppService._endButtonsSource$.value.find(e => e.id === button.id);
|
|
3180
|
+
if (exist) {
|
|
3181
|
+
Object.keys(button).filter(k => k !== 'id').forEach(key => {
|
|
3182
|
+
exist[key] = button[key];
|
|
3183
|
+
});
|
|
3184
|
+
AppService._endButtonsSource$.next([...AppService._endButtonsSource$.value]);
|
|
3185
|
+
return;
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
AppService._endButtonsSource$.next(ArrayService.addItem(AppService._endButtonsSource$.value, button));
|
|
3189
|
+
}
|
|
3190
|
+
removeEndButton(buttonOrId) {
|
|
3191
|
+
if (typeof buttonOrId === 'object') {
|
|
3192
|
+
const button = buttonOrId.id ?
|
|
3193
|
+
AppService._endButtonsSource$.value.find(e => e.id === buttonOrId.id)
|
|
3194
|
+
: buttonOrId;
|
|
3195
|
+
AppService._endButtonsSource$.next(ArrayService.removeItem(AppService._endButtonsSource$.value, button));
|
|
3196
|
+
return;
|
|
3197
|
+
}
|
|
3198
|
+
AppService._endButtonsSource$.next([
|
|
3199
|
+
...AppService._endButtonsSource$.value.filter(e => e.id !== buttonOrId)
|
|
3200
|
+
]);
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
AppService._endButtonsSource$ = new BehaviorSubject([]);
|
|
3204
|
+
/** @nocollapse */ AppService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppService_Factory() { return new AppService(); }, token: AppService, providedIn: "root" });
|
|
3205
|
+
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
3206
|
+
AppService.decorators = [
|
|
3207
|
+
{ type: Injectable, args: [{
|
|
3208
|
+
providedIn: 'root'
|
|
3209
|
+
},] }
|
|
3210
|
+
];
|
|
3211
|
+
|
|
3146
3212
|
class InputComponent {
|
|
3147
3213
|
constructor(componentFactoryResolver, injector) {
|
|
3148
3214
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
@@ -7192,5 +7258,5 @@ function fastPropGetter(paths) {
|
|
|
7192
7258
|
* Generated bundle index. Do not edit.
|
|
7193
7259
|
*/
|
|
7194
7260
|
|
|
7195
|
-
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,
|
|
7261
|
+
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 };
|
|
7196
7262
|
//# sourceMappingURL=smartsoft001-angular.js.map
|