wt-front-shared 1.0.28 → 1.0.31
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/esm2020/lib/core/components/auto-form/containers/form-field/form-field.component.mjs +2 -2
- package/esm2020/lib/core/components/files-upload/table-files-uploading/table-files-uploading.component.mjs +2 -2
- package/esm2020/lib/core/services/actions/actions.service.mjs +2 -2
- package/esm2020/lib/core/services/cache-data/cache-data.service.mjs +2 -2
- package/esm2020/lib/core/services/files/files.service.mjs +2 -2
- package/esm2020/lib/core/services/form-delete-file/form-delete-file.service.mjs +2 -2
- package/esm2020/lib/core/services/form-validation/form-validation.service.mjs +2 -2
- package/esm2020/lib/core/services/index.mjs +2 -2
- package/esm2020/lib/core/services/model-services/tags/tags.service.mjs +2 -2
- package/esm2020/lib/core/services/publish/publish.service.mjs +2 -2
- package/esm2020/lib/core/services/reports/reports.service.mjs +2 -2
- package/esm2020/lib/core/services/static-data/static-data.service.mjs +2 -2
- package/esm2020/lib/core/services/users/users.service.mjs +2 -2
- package/esm2020/lib/core/services/websocket.service.mjs +74 -0
- package/fesm2015/wt-front-shared.mjs +88 -17
- package/fesm2015/wt-front-shared.mjs.map +1 -1
- package/fesm2020/wt-front-shared.mjs +86 -17
- package/fesm2020/wt-front-shared.mjs.map +1 -1
- package/lib/core/services/index.d.ts +1 -0
- package/lib/core/services/websocket.service.d.ts +23 -0
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Inject, Injectable } from "@angular/core";
|
|
2
|
+
import { CORE_CONFIG } from "../tokens";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export var WebsocketMessageTypes;
|
|
5
|
+
(function (WebsocketMessageTypes) {
|
|
6
|
+
WebsocketMessageTypes["USER_ACTIVITY"] = "user-activity";
|
|
7
|
+
})(WebsocketMessageTypes || (WebsocketMessageTypes = {}));
|
|
8
|
+
export var WebsocketMessageSubTypes;
|
|
9
|
+
(function (WebsocketMessageSubTypes) {
|
|
10
|
+
WebsocketMessageSubTypes["CHANGE_PAGE"] = "change-page";
|
|
11
|
+
WebsocketMessageSubTypes["OPEN_BOOKING_FORM"] = "open-booking-form";
|
|
12
|
+
WebsocketMessageSubTypes["OPEN_FIRM_CONTACT"] = "open-firm-contact";
|
|
13
|
+
})(WebsocketMessageSubTypes || (WebsocketMessageSubTypes = {}));
|
|
14
|
+
export class WebsocketService {
|
|
15
|
+
constructor(config) {
|
|
16
|
+
this.config = config;
|
|
17
|
+
this.wsIsLoaded = false;
|
|
18
|
+
this.maxNumbersOfReloads = 10;
|
|
19
|
+
this.numbersOfReloads = 0;
|
|
20
|
+
this.connectToWebSocket();
|
|
21
|
+
}
|
|
22
|
+
connectToWebSocket() {
|
|
23
|
+
if ("WebSocket" in window) {
|
|
24
|
+
this.ws = new WebSocket(this.config.websocketUrl);
|
|
25
|
+
this.ws.onopen = () => {
|
|
26
|
+
this.numbersOfReloads = 0;
|
|
27
|
+
console.info('[ document ][ WS ][ Connection opened ]', this.sessionKey || '', this.config.websocketUrl);
|
|
28
|
+
this.wsIsLoaded = true;
|
|
29
|
+
};
|
|
30
|
+
this.ws.onmessage = (event) => {
|
|
31
|
+
let message;
|
|
32
|
+
try {
|
|
33
|
+
message = JSON.parse(event.data);
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
console.info('[ document ][ WS ][ Incorrect message ]', { message: event.data, error: e });
|
|
37
|
+
}
|
|
38
|
+
if (message && !this.sessionKey) {
|
|
39
|
+
if (message?.sessionKey) {
|
|
40
|
+
this.sessionKey = message.sessionKey;
|
|
41
|
+
}
|
|
42
|
+
console.info('[ document ][ WS ][ Message received ]', this.sessionKey, message);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
this.ws.onclose = () => {
|
|
46
|
+
console.info('[ document ][ WS ][ Connection closed ]');
|
|
47
|
+
this.wsIsLoaded = false;
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
if (this.numbersOfReloads < this.maxNumbersOfReloads) {
|
|
50
|
+
this.numbersOfReloads++;
|
|
51
|
+
this.connectToWebSocket();
|
|
52
|
+
}
|
|
53
|
+
}, 10000);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
wsSentMessage(type, subType, message) {
|
|
58
|
+
if (this.wsIsLoaded) {
|
|
59
|
+
this.ws.send(JSON.stringify({ type, subType, message, sessionKey: this.sessionKey }));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
WebsocketService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, deps: [{ token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
64
|
+
WebsocketService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, providedIn: 'root' });
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, decorators: [{
|
|
66
|
+
type: Injectable,
|
|
67
|
+
args: [{
|
|
68
|
+
providedIn: 'root'
|
|
69
|
+
}]
|
|
70
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
71
|
+
type: Inject,
|
|
72
|
+
args: [CORE_CONFIG]
|
|
73
|
+
}] }]; } });
|
|
74
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2Vic29ja2V0LnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93dC1mcm9udC1zaGFyZWQvc3JjL2xpYi9jb3JlL3NlcnZpY2VzL3dlYnNvY2tldC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSx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ZW50TWVzc2FnZSh0eXBlOiBXZWJzb2NrZXRNZXNzYWdlVHlwZXMsIHN1YlR5cGU6IFdlYnNvY2tldE1lc3NhZ2VTdWJUeXBlcywgbWVzc2FnZTogYW55KTogdm9pZCB7XG4gICAgaWYgKHRoaXMud3NJc0xvYWRlZCkge1xuICAgICAgdGhpcy53cy5zZW5kKEpTT04uc3RyaW5naWZ5KHt0eXBlLCBzdWJUeXBlLCBtZXNzYWdlLCBzZXNzaW9uS2V5OiB0aGlzLnNlc3Npb25LZXl9KSk7XG4gICAgfVxuICB9XG59XG4iXX0=
|
|
@@ -2336,7 +2336,7 @@ class UsersService extends BaseAPIService {
|
|
|
2336
2336
|
this.httpClient = httpClient;
|
|
2337
2337
|
this.requestsFacade = requestsFacade;
|
|
2338
2338
|
this.formsFacade = formsFacade;
|
|
2339
|
-
this.api = new UsersApi('
|
|
2339
|
+
this.api = new UsersApi('https://world-travel.uz:3001/'); //this.config.apiUrl);
|
|
2340
2340
|
}
|
|
2341
2341
|
loginSend(config) {
|
|
2342
2342
|
return this.doRequest(config, AuthEndpointTypes.LOGIN_SEND);
|
|
@@ -2534,7 +2534,7 @@ class ActionsService extends BaseAPIService {
|
|
|
2534
2534
|
this.httpClient = httpClient;
|
|
2535
2535
|
this.requestsFacade = requestsFacade;
|
|
2536
2536
|
this.formsFacade = formsFacade;
|
|
2537
|
-
this.api = new ActionsApi('
|
|
2537
|
+
this.api = new ActionsApi('https://world-travel.uz:3001/'); //this.config.apiUrl);
|
|
2538
2538
|
}
|
|
2539
2539
|
sendAction(config) {
|
|
2540
2540
|
return this.doRequest(config, ActionsEndpointTypes.SEND_ACTION);
|
|
@@ -3213,7 +3213,7 @@ class FilesService extends BaseAPIService {
|
|
|
3213
3213
|
this.httpClient = httpClient;
|
|
3214
3214
|
this.requestsFacade = requestsFacade;
|
|
3215
3215
|
this.formsFacade = formsFacade;
|
|
3216
|
-
this.api = new FilesApi('
|
|
3216
|
+
this.api = new FilesApi('https://world-travel.uz:3001/'); //this.config.apiUrl);
|
|
3217
3217
|
}
|
|
3218
3218
|
filesLoad(config) {
|
|
3219
3219
|
return this.doRequest(config, FilesEndpointTypes.LOAD);
|
|
@@ -3567,7 +3567,7 @@ class TagsService extends BaseAPIService {
|
|
|
3567
3567
|
this.httpClient = httpClient;
|
|
3568
3568
|
this.requestsFacade = requestsFacade;
|
|
3569
3569
|
this.formsFacade = formsFacade;
|
|
3570
|
-
this.api = new TagsApi('
|
|
3570
|
+
this.api = new TagsApi('https://world-travel.uz:3001/'); //this.config.apiUrl);
|
|
3571
3571
|
}
|
|
3572
3572
|
tagsLoad(config) {
|
|
3573
3573
|
return this.doRequest(config, TagsEndpointTypes.LOAD);
|
|
@@ -3870,7 +3870,7 @@ class FormValidationService extends BaseAPIService {
|
|
|
3870
3870
|
this.httpClient = httpClient;
|
|
3871
3871
|
this.requestsFacade = requestsFacade;
|
|
3872
3872
|
this.formsFacade = formsFacade;
|
|
3873
|
-
this.api = new FormValidationApi('
|
|
3873
|
+
this.api = new FormValidationApi('https://world-travel.uz:3001/'); //this.config.apiUrl);
|
|
3874
3874
|
}
|
|
3875
3875
|
formValidationCheck(config) {
|
|
3876
3876
|
return this.doRequest(config, FormValidationEndpointTypes.CHECK);
|
|
@@ -4183,7 +4183,7 @@ class FormDeleteFileService extends BaseAPIService {
|
|
|
4183
4183
|
this.httpClient = httpClient;
|
|
4184
4184
|
this.requestsFacade = requestsFacade;
|
|
4185
4185
|
this.formsFacade = formsFacade;
|
|
4186
|
-
this.api = new FormDeleteFileApi('
|
|
4186
|
+
this.api = new FormDeleteFileApi('https://world-travel.uz:3001/'); //this.config.apiUrl);
|
|
4187
4187
|
}
|
|
4188
4188
|
formDeleteFile(config) {
|
|
4189
4189
|
return this.doRequest(config, FormDeleteFileBaseEndpointTypes.DELETE);
|
|
@@ -4395,7 +4395,7 @@ class PublishService extends BaseAPIService {
|
|
|
4395
4395
|
this.httpClient = httpClient;
|
|
4396
4396
|
this.requestsFacade = requestsFacade;
|
|
4397
4397
|
this.formsFacade = formsFacade;
|
|
4398
|
-
this.api = new PublishApi('
|
|
4398
|
+
this.api = new PublishApi('https://world-travel.uz:3001/'); //this.config.apiUrl);
|
|
4399
4399
|
}
|
|
4400
4400
|
publishPost(config) {
|
|
4401
4401
|
return this.doRequest(config, PublishEndpointTypes.POST);
|
|
@@ -5055,7 +5055,7 @@ class CacheDataService extends BaseAPIService {
|
|
|
5055
5055
|
this.httpClient = httpClient;
|
|
5056
5056
|
this.requestsFacade = requestsFacade;
|
|
5057
5057
|
this.formsFacade = formsFacade;
|
|
5058
|
-
this.api = new CacheDataApi(/*this.config.apiUrl*/ '
|
|
5058
|
+
this.api = new CacheDataApi(/*this.config.apiUrl*/ 'https://world-travel.uz:3001/');
|
|
5059
5059
|
}
|
|
5060
5060
|
getCacheData(config) {
|
|
5061
5061
|
return this.doRequest(config, CacheDataEndpointTypes.GET_CACHE_DATA);
|
|
@@ -5212,7 +5212,7 @@ class ReportsService extends BaseAPIService {
|
|
|
5212
5212
|
this.httpClient = httpClient;
|
|
5213
5213
|
this.requestsFacade = requestsFacade;
|
|
5214
5214
|
this.formsFacade = formsFacade;
|
|
5215
|
-
this.api = new ReportsApi('
|
|
5215
|
+
this.api = new ReportsApi('https://world-travel.uz:3001/'); //this.config.apiUrl);
|
|
5216
5216
|
}
|
|
5217
5217
|
getEntitiesReports(config) {
|
|
5218
5218
|
return this.doRequest(config, ReportsEndpointTypes.ENTITIES_REPORT);
|
|
@@ -5350,7 +5350,7 @@ class StaticDataService extends BaseAPIService {
|
|
|
5350
5350
|
this.httpClient = httpClient;
|
|
5351
5351
|
this.requestsFacade = requestsFacade;
|
|
5352
5352
|
this.formsFacade = formsFacade;
|
|
5353
|
-
this.api = new StaticDataApi('
|
|
5353
|
+
this.api = new StaticDataApi('https://world-travel.uz:3001/'); //this.config.apiUrl);
|
|
5354
5354
|
}
|
|
5355
5355
|
getList(config) {
|
|
5356
5356
|
return this.doRequest(config, StaticDataEndpointTypes.GET_LIST);
|
|
@@ -5493,7 +5493,81 @@ const StorageProvider = {
|
|
|
5493
5493
|
useFactory: cookiesProviderFactory,
|
|
5494
5494
|
};
|
|
5495
5495
|
|
|
5496
|
-
|
|
5496
|
+
const CORE_CONFIG = new InjectionToken('SHARED_CORE_CONFIG');
|
|
5497
|
+
// export const AUTH_SERVICE_CONFIG: InjectionToken<SocialAuthServiceConfig> = new InjectionToken<SocialAuthServiceConfig>('AUTH_SERVICE_CONFIG');
|
|
5498
|
+
|
|
5499
|
+
var WebsocketMessageTypes;
|
|
5500
|
+
(function (WebsocketMessageTypes) {
|
|
5501
|
+
WebsocketMessageTypes["USER_ACTIVITY"] = "user-activity";
|
|
5502
|
+
})(WebsocketMessageTypes || (WebsocketMessageTypes = {}));
|
|
5503
|
+
var WebsocketMessageSubTypes;
|
|
5504
|
+
(function (WebsocketMessageSubTypes) {
|
|
5505
|
+
WebsocketMessageSubTypes["CHANGE_PAGE"] = "change-page";
|
|
5506
|
+
WebsocketMessageSubTypes["OPEN_BOOKING_FORM"] = "open-booking-form";
|
|
5507
|
+
WebsocketMessageSubTypes["OPEN_FIRM_CONTACT"] = "open-firm-contact";
|
|
5508
|
+
})(WebsocketMessageSubTypes || (WebsocketMessageSubTypes = {}));
|
|
5509
|
+
class WebsocketService {
|
|
5510
|
+
constructor(config) {
|
|
5511
|
+
this.config = config;
|
|
5512
|
+
this.wsIsLoaded = false;
|
|
5513
|
+
this.maxNumbersOfReloads = 10;
|
|
5514
|
+
this.numbersOfReloads = 0;
|
|
5515
|
+
this.connectToWebSocket();
|
|
5516
|
+
}
|
|
5517
|
+
connectToWebSocket() {
|
|
5518
|
+
if ("WebSocket" in window) {
|
|
5519
|
+
this.ws = new WebSocket(this.config.websocketUrl);
|
|
5520
|
+
this.ws.onopen = () => {
|
|
5521
|
+
this.numbersOfReloads = 0;
|
|
5522
|
+
console.info('[ document ][ WS ][ Connection opened ]', this.sessionKey || '', this.config.websocketUrl);
|
|
5523
|
+
this.wsIsLoaded = true;
|
|
5524
|
+
};
|
|
5525
|
+
this.ws.onmessage = (event) => {
|
|
5526
|
+
let message;
|
|
5527
|
+
try {
|
|
5528
|
+
message = JSON.parse(event.data);
|
|
5529
|
+
}
|
|
5530
|
+
catch (e) {
|
|
5531
|
+
console.info('[ document ][ WS ][ Incorrect message ]', { message: event.data, error: e });
|
|
5532
|
+
}
|
|
5533
|
+
if (message && !this.sessionKey) {
|
|
5534
|
+
if (message === null || message === void 0 ? void 0 : message.sessionKey) {
|
|
5535
|
+
this.sessionKey = message.sessionKey;
|
|
5536
|
+
}
|
|
5537
|
+
console.info('[ document ][ WS ][ Message received ]', this.sessionKey, message);
|
|
5538
|
+
}
|
|
5539
|
+
};
|
|
5540
|
+
this.ws.onclose = () => {
|
|
5541
|
+
console.info('[ document ][ WS ][ Connection closed ]');
|
|
5542
|
+
this.wsIsLoaded = false;
|
|
5543
|
+
setTimeout(() => {
|
|
5544
|
+
if (this.numbersOfReloads < this.maxNumbersOfReloads) {
|
|
5545
|
+
this.numbersOfReloads++;
|
|
5546
|
+
this.connectToWebSocket();
|
|
5547
|
+
}
|
|
5548
|
+
}, 10000);
|
|
5549
|
+
};
|
|
5550
|
+
}
|
|
5551
|
+
}
|
|
5552
|
+
wsSentMessage(type, subType, message) {
|
|
5553
|
+
if (this.wsIsLoaded) {
|
|
5554
|
+
this.ws.send(JSON.stringify({ type, subType, message, sessionKey: this.sessionKey }));
|
|
5555
|
+
}
|
|
5556
|
+
}
|
|
5557
|
+
}
|
|
5558
|
+
WebsocketService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, deps: [{ token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5559
|
+
WebsocketService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, providedIn: 'root' });
|
|
5560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, decorators: [{
|
|
5561
|
+
type: Injectable,
|
|
5562
|
+
args: [{
|
|
5563
|
+
providedIn: 'root'
|
|
5564
|
+
}]
|
|
5565
|
+
}], ctorParameters: function () {
|
|
5566
|
+
return [{ type: undefined, decorators: [{
|
|
5567
|
+
type: Inject,
|
|
5568
|
+
args: [CORE_CONFIG]
|
|
5569
|
+
}] }];
|
|
5570
|
+
} });
|
|
5497
5571
|
|
|
5498
5572
|
class RouterFacade {
|
|
5499
5573
|
constructor(store) {
|
|
@@ -7693,7 +7767,7 @@ class TableFilesUploadingComponent {
|
|
|
7693
7767
|
}
|
|
7694
7768
|
initUploader() {
|
|
7695
7769
|
this.publicUrl = 'http://localhost:4000'; // this.config.publicUrl;
|
|
7696
|
-
const apiUrl = '
|
|
7770
|
+
const apiUrl = 'https://world-travel.uz:3001/'; // this.config.apiUrl;
|
|
7697
7771
|
const { token } = this.authenticationService.loadAuthDataFromLocalStore();
|
|
7698
7772
|
const uploadUrl = `${apiUrl}/api/files/${this.section}/${this.itemId}`;
|
|
7699
7773
|
this.url = `${this.publicUrl}/${this.section}/${this.itemId}`;
|
|
@@ -8108,7 +8182,7 @@ class FormFieldComponent {
|
|
|
8108
8182
|
const entityId = (_a = this.form.get('id')) === null || _a === void 0 ? void 0 : _a.value;
|
|
8109
8183
|
const { token } = this.authenticationService.loadAuthDataFromLocalStore();
|
|
8110
8184
|
const newConfig = {
|
|
8111
|
-
apiUrl: '
|
|
8185
|
+
apiUrl: 'https://world-travel.uz:3001/',
|
|
8112
8186
|
panelUrl: 'http://localhost:4200',
|
|
8113
8187
|
};
|
|
8114
8188
|
this.ckeConfig = {
|
|
@@ -10511,9 +10585,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
10511
10585
|
}]
|
|
10512
10586
|
}] });
|
|
10513
10587
|
|
|
10514
|
-
const CORE_CONFIG = new InjectionToken('SHARED_CORE_CONFIG');
|
|
10515
|
-
// export const AUTH_SERVICE_CONFIG: InjectionToken<SocialAuthServiceConfig> = new InjectionToken<SocialAuthServiceConfig>('AUTH_SERVICE_CONFIG');
|
|
10516
|
-
|
|
10517
10588
|
class HeadersInterceptor {
|
|
10518
10589
|
constructor(authenticationService, routerFacade, usersFacade, formErrorsFacade, formsFacade, filesFacade, publicationMessagesFacade, requestsFacade, notificationsFacade) {
|
|
10519
10590
|
this.authenticationService = authenticationService;
|
|
@@ -10750,5 +10821,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
10750
10821
|
* Generated bundle index. Do not edit.
|
|
10751
10822
|
*/
|
|
10752
10823
|
|
|
10753
|
-
export { AccessDeniedComponent, AccessDeniedModule, ActionsEndpointTypes, ActionsFacade, ActionsMetaStatus, ActionsModel, ActionsSendRequest, ActionsService, AsyncValidators, AsyncValidatorsMessages, AsyncValidatorsType, AuthEndpointTypes, AuthenticationService, AutoFormMainComponent, AutoFormModule, AutoFormService, AutoFormShowComponent, Back, BaseAPI, BaseAPIService, BaseAutoFormService, BaseErrors, BaseModelAdapter, BaseResponseFactory, BreadCrumbsComponent, BreadCrumbsModule, ButtonComponent, ButtonModule, CORE_CONFIG, CacheDataEndpointTypes, CacheDataFacade, CacheDataModel, CacheDataService, ChipsInputComponent, ChipsInputModule, ClearStaticData, CommonDialogComponent, CookiesService, CoreFacade, CoreLoadError, CoreLoaded, CountFormatPipe, CreateRequestListener, DateFormatPipe, DeleteComponent, DeleteRequest, DeleteRequestWaiter, DialogService, DialogsModule, EntitiesReportsRequest, Entity, EntityQueryFieldNames, EntitySortType, EntityType, FieldType, FileFieldNames, FileModel, FileUpdateModel, FilesDeleteRequest, FilesDeleteResponseFactory, FilesEndpointTypes, FilesFacade, FilesLoadRequest, FilesLoadResponseFactory, FilesService, FilesSortRequest, FilesSortResponseFactory, FilesUpdateRequest, FilesUpdateResponseFactory, FilesUploadComponent, FilesUploadModule, FormDeleteFileBaseEndpointTypes, FormDeleteFileFacade, FormDeleteFileRequest, FormDeleteFileService, FormErrorModel, FormErrorsFacade, FormFieldErrorComponent, FormFieldErrorModule, FormFieldPublishErrorComponent, FormFieldPublishErrorModule, FormValidationCheckRequest, FormValidationEndpointTypes, FormValidationFacade, FormValidationService, FormsFacade, Forward, GetCacheDataRequest, GetRequest, GlobalErrorMessages, GlobalEvent, Go, GoFail, HeaderComponent, HeaderModule, HeadersInterceptor, IFormFieldFormat, IconComponent, ImageComponent, ImageModule, InputTagsComponent, InputTagsModule, JwtInterceptor, LoadCore, LoadUsers, LoadUsersFail, LoadUsersSuccess, LoginSend, LoginSendCreateRequest, LoginSendCreateResponseFactory, LoginSendFail, LoginSendSuccess, MainConst, MainFacade, MapperRegistry, MapperUtil, MetaModel, NOTIFICATION_LONG_TIMEOUT, NOTIFICATION_TIMEOUT, NotificationAdd, NotificationAddFail, NotificationModel, NotificationShowingType, NotificationsEffects, NotificationsFacade, PaginationComponent, PaginationModule, PagingModel, PanelComponent, PanelHeaderComponent, PanelHeaderModule, PanelModule, PasswordRules, PhonePipe, PipesModule, PostRequest, PublicationMessageFieldNames, PublicationMessagesFacade, PublishDataModel, PublishEndpointTypes, PublishErrors, PublishPostRequest, PublishResultModel, PublishService, PutRequest, QueryFieldsAdapter, ReducerService, RefreshToken, RefreshTokenFail, RefreshTokenSuccess, ReportsEndpointTypes, ReportsFacade, ReportsModel, ReportsService, Request, RequestMethods, RequestStatus, RequestsEffects, RequestsFacade, ResponseStatus, RouterEffects, RouterFacade, RouterService, STICKY_SIDEBAR_OPTIONS, SafePipe, SequelizeUniqueConstraintError, SetLoaded, SetRouterQueryParams, SharedFormErrors, SharedIconModule, SharedReducer, SharedSpinnerModule, SmartProgressBarComponent, SmartProgressBarModule, SocialAuthService, SpinnerComponent, StarRatingComponent, StarRatingModule, StaticDataCreate, StaticDataCreateFail, StaticDataCreateRequest, StaticDataCreateSuccess, StaticDataDelete, StaticDataDeleteFail, StaticDataDeleteRequest, StaticDataDeleteSuccess, StaticDataEffects, StaticDataEndpointTypes, StaticDataFacade, StaticDataGet, StaticDataGetFail, StaticDataGetList, StaticDataGetListCategories, StaticDataGetListCategoriesFail, StaticDataGetListCategoriesRequest, StaticDataGetListCategoriesSuccess, StaticDataGetListFail, StaticDataGetListRequest, StaticDataGetListSuccess, StaticDataGetRequest, StaticDataGetSubRouting, StaticDataGetSubRoutingFail, StaticDataGetSubRoutingSuccess, StaticDataGetSuccess, StaticDataMetaStatus, StaticDataModel, StaticDataPartUpdate, StaticDataService, StaticDataSubRoutingGetRequest, StaticDataUpdate, StaticDataUpdateFail, StaticDataUpdateRequest, StaticDataUpdateSuccess, StickySidebarDirective, StickySidebarInnerDirective, StickySidebarModule, StorageProvider, StorageService, TableMenuComponent, TableMenuModule, TagCloudComponent, TagCloudModule, TagEntitiesRequest, TagEntityModel, TagModel, TagsEndpointTypes, TagsFacade, TagsLoadRequest, TagsLoadResponseFactory, TagsService, TextWithLinkMoreComponent, TextWithLinkMoreModule, USERS_FEATURE_KEY, UiUnitIds, UiUnitsEffects, UiUnitsFacade, UnPublishPostRequest, UpdateRequestData, UserFieldNames, UserModel, UserRole, UserSectionRightModel, UsersEffects, UsersFacade, UsersService, ValidatorsType, VersionsModel, WtFrontSharedModule, appearFromLeft, appearFromLeftHideToRight, appearFromLeftWithDelay, appearFromRight, appearFromRightWithDelay, appearOpacity, appearOpacity2, componentDestroyed, coreQuery, defaultStickySidebarOptions, entityScheme, expandCollapse, fileMapper, fileScheme, getAll, getAllUiUnits, getRequestInfo, getRouterLastRoute, getRouterLastRouteParams, getRouterQueryParams, getRouterRoot, getRouterUrl, getUIUnit, getUiUnitDataById, getUserAuthData, guid, hideToTopOpacity, initialState$b as initialState, mappet, notificationQuery, publicationMessageMapper, publicationMessageScheme, requestsQuery, sharedEffects, sharedFacades, staticDataQuery, trackById, uiUnitsQuery, untilComponentDestroyed, userMapper, userReducer, userScheme, usersQuery };
|
|
10824
|
+
export { AccessDeniedComponent, AccessDeniedModule, ActionsEndpointTypes, ActionsFacade, ActionsMetaStatus, ActionsModel, ActionsSendRequest, ActionsService, AsyncValidators, AsyncValidatorsMessages, AsyncValidatorsType, AuthEndpointTypes, AuthenticationService, AutoFormMainComponent, AutoFormModule, AutoFormService, AutoFormShowComponent, Back, BaseAPI, BaseAPIService, BaseAutoFormService, BaseErrors, BaseModelAdapter, BaseResponseFactory, BreadCrumbsComponent, BreadCrumbsModule, ButtonComponent, ButtonModule, CORE_CONFIG, CacheDataEndpointTypes, CacheDataFacade, CacheDataModel, CacheDataService, ChipsInputComponent, ChipsInputModule, ClearStaticData, CommonDialogComponent, CookiesService, CoreFacade, CoreLoadError, CoreLoaded, CountFormatPipe, CreateRequestListener, DateFormatPipe, DeleteComponent, DeleteRequest, DeleteRequestWaiter, DialogService, DialogsModule, EntitiesReportsRequest, Entity, EntityQueryFieldNames, EntitySortType, EntityType, FieldType, FileFieldNames, FileModel, FileUpdateModel, FilesDeleteRequest, FilesDeleteResponseFactory, FilesEndpointTypes, FilesFacade, FilesLoadRequest, FilesLoadResponseFactory, FilesService, FilesSortRequest, FilesSortResponseFactory, FilesUpdateRequest, FilesUpdateResponseFactory, FilesUploadComponent, FilesUploadModule, FormDeleteFileBaseEndpointTypes, FormDeleteFileFacade, FormDeleteFileRequest, FormDeleteFileService, FormErrorModel, FormErrorsFacade, FormFieldErrorComponent, FormFieldErrorModule, FormFieldPublishErrorComponent, FormFieldPublishErrorModule, FormValidationCheckRequest, FormValidationEndpointTypes, FormValidationFacade, FormValidationService, FormsFacade, Forward, GetCacheDataRequest, GetRequest, GlobalErrorMessages, GlobalEvent, Go, GoFail, HeaderComponent, HeaderModule, HeadersInterceptor, IFormFieldFormat, IconComponent, ImageComponent, ImageModule, InputTagsComponent, InputTagsModule, JwtInterceptor, LoadCore, LoadUsers, LoadUsersFail, LoadUsersSuccess, LoginSend, LoginSendCreateRequest, LoginSendCreateResponseFactory, LoginSendFail, LoginSendSuccess, MainConst, MainFacade, MapperRegistry, MapperUtil, MetaModel, NOTIFICATION_LONG_TIMEOUT, NOTIFICATION_TIMEOUT, NotificationAdd, NotificationAddFail, NotificationModel, NotificationShowingType, NotificationsEffects, NotificationsFacade, PaginationComponent, PaginationModule, PagingModel, PanelComponent, PanelHeaderComponent, PanelHeaderModule, PanelModule, PasswordRules, PhonePipe, PipesModule, PostRequest, PublicationMessageFieldNames, PublicationMessagesFacade, PublishDataModel, PublishEndpointTypes, PublishErrors, PublishPostRequest, PublishResultModel, PublishService, PutRequest, QueryFieldsAdapter, ReducerService, RefreshToken, RefreshTokenFail, RefreshTokenSuccess, ReportsEndpointTypes, ReportsFacade, ReportsModel, ReportsService, Request, RequestMethods, RequestStatus, RequestsEffects, RequestsFacade, ResponseStatus, RouterEffects, RouterFacade, RouterService, STICKY_SIDEBAR_OPTIONS, SafePipe, SequelizeUniqueConstraintError, SetLoaded, SetRouterQueryParams, SharedFormErrors, SharedIconModule, SharedReducer, SharedSpinnerModule, SmartProgressBarComponent, SmartProgressBarModule, SocialAuthService, SpinnerComponent, StarRatingComponent, StarRatingModule, StaticDataCreate, StaticDataCreateFail, StaticDataCreateRequest, StaticDataCreateSuccess, StaticDataDelete, StaticDataDeleteFail, StaticDataDeleteRequest, StaticDataDeleteSuccess, StaticDataEffects, StaticDataEndpointTypes, StaticDataFacade, StaticDataGet, StaticDataGetFail, StaticDataGetList, StaticDataGetListCategories, StaticDataGetListCategoriesFail, StaticDataGetListCategoriesRequest, StaticDataGetListCategoriesSuccess, StaticDataGetListFail, StaticDataGetListRequest, StaticDataGetListSuccess, StaticDataGetRequest, StaticDataGetSubRouting, StaticDataGetSubRoutingFail, StaticDataGetSubRoutingSuccess, StaticDataGetSuccess, StaticDataMetaStatus, StaticDataModel, StaticDataPartUpdate, StaticDataService, StaticDataSubRoutingGetRequest, StaticDataUpdate, StaticDataUpdateFail, StaticDataUpdateRequest, StaticDataUpdateSuccess, StickySidebarDirective, StickySidebarInnerDirective, StickySidebarModule, StorageProvider, StorageService, TableMenuComponent, TableMenuModule, TagCloudComponent, TagCloudModule, TagEntitiesRequest, TagEntityModel, TagModel, TagsEndpointTypes, TagsFacade, TagsLoadRequest, TagsLoadResponseFactory, TagsService, TextWithLinkMoreComponent, TextWithLinkMoreModule, USERS_FEATURE_KEY, UiUnitIds, UiUnitsEffects, UiUnitsFacade, UnPublishPostRequest, UpdateRequestData, UserFieldNames, UserModel, UserRole, UserSectionRightModel, UsersEffects, UsersFacade, UsersService, ValidatorsType, VersionsModel, WebsocketMessageSubTypes, WebsocketMessageTypes, WebsocketService, WtFrontSharedModule, appearFromLeft, appearFromLeftHideToRight, appearFromLeftWithDelay, appearFromRight, appearFromRightWithDelay, appearOpacity, appearOpacity2, componentDestroyed, coreQuery, defaultStickySidebarOptions, entityScheme, expandCollapse, fileMapper, fileScheme, getAll, getAllUiUnits, getRequestInfo, getRouterLastRoute, getRouterLastRouteParams, getRouterQueryParams, getRouterRoot, getRouterUrl, getUIUnit, getUiUnitDataById, getUserAuthData, guid, hideToTopOpacity, initialState$b as initialState, mappet, notificationQuery, publicationMessageMapper, publicationMessageScheme, requestsQuery, sharedEffects, sharedFacades, staticDataQuery, trackById, uiUnitsQuery, untilComponentDestroyed, userMapper, userReducer, userScheme, usersQuery };
|
|
10754
10825
|
//# sourceMappingURL=wt-front-shared.mjs.map
|