eservices-core 1.0.353 → 1.0.356
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.
|
@@ -33,12 +33,6 @@ declare const _default: {
|
|
|
33
33
|
* */
|
|
34
34
|
isReady: Ref<boolean>;
|
|
35
35
|
setCurrentContext(id: number): void;
|
|
36
|
-
/**
|
|
37
|
-
* Инициализирует данные приложения. В данному методе проходят проверка на
|
|
38
|
-
* установленные переменные и их значения. Также происходит получение с сер-
|
|
39
|
-
* вера начальных значений приложеия(констант)
|
|
40
|
-
* */
|
|
41
|
-
initialization(): Promise<void>;
|
|
42
36
|
/**
|
|
43
37
|
* Обновление всех данных пользователя, включая:
|
|
44
38
|
* - Пресональные данные (email, id, name, username, image..)
|
package/dist/classes/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.356
|
|
3
3
|
* (c) 2022 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -2131,7 +2131,12 @@ function requestHandler(callback, options = {}) {
|
|
|
2131
2131
|
timeout: 12 * 1000
|
|
2132
2132
|
});
|
|
2133
2133
|
else {
|
|
2134
|
-
|
|
2134
|
+
if (error === null || error === void 0 ? void 0 : error.message)
|
|
2135
|
+
NotificationSystem.add('error', error.message);
|
|
2136
|
+
else {
|
|
2137
|
+
console.warn(error);
|
|
2138
|
+
NotificationSystem.add('error', CoreError.ApiResponseParseFailed().message);
|
|
2139
|
+
}
|
|
2135
2140
|
}
|
|
2136
2141
|
}
|
|
2137
2142
|
if (options.throw)
|
|
@@ -4680,18 +4685,6 @@ var ApplicationManager = new class ApplicationManager {
|
|
|
4680
4685
|
this.currentContextId.value = id;
|
|
4681
4686
|
console.log(`Current context id %c${id}`, 'color: purple');
|
|
4682
4687
|
}
|
|
4683
|
-
/**
|
|
4684
|
-
* Инициализирует данные приложения. В данному методе проходят проверка на
|
|
4685
|
-
* установленные переменные и их значения. Также происходит получение с сер-
|
|
4686
|
-
* вера начальных значений приложеия(констант)
|
|
4687
|
-
* */
|
|
4688
|
-
initialization() {
|
|
4689
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4690
|
-
const result = yield Request('/close-api/initialization');
|
|
4691
|
-
Object.assign(this.state, result);
|
|
4692
|
-
console.log(`Applications %cinitialized.`, 'color: purple');
|
|
4693
|
-
});
|
|
4694
|
-
}
|
|
4695
4688
|
/**
|
|
4696
4689
|
* Обновление всех данных пользователя, включая:
|
|
4697
4690
|
* - Пресональные данные (email, id, name, username, image..)
|
|
@@ -4700,16 +4693,14 @@ var ApplicationManager = new class ApplicationManager {
|
|
|
4700
4693
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4701
4694
|
try {
|
|
4702
4695
|
const result = yield clientService.getClientData();
|
|
4703
|
-
console.log(result);
|
|
4704
4696
|
this.isReady.value = true;
|
|
4705
4697
|
this.person.value = result;
|
|
4706
4698
|
this.organizations.value = result.organizations;
|
|
4707
4699
|
if (!this.currentContextId.value)
|
|
4708
4700
|
this.setCurrentContext(result.id);
|
|
4709
|
-
console.log(this.person.value);
|
|
4710
4701
|
}
|
|
4711
4702
|
catch (e) {
|
|
4712
|
-
|
|
4703
|
+
NotificationSystem.add('error', e);
|
|
4713
4704
|
}
|
|
4714
4705
|
});
|
|
4715
4706
|
}
|
|
@@ -5431,7 +5422,7 @@ const _hoisted_1$a = ["alt"];
|
|
|
5431
5422
|
var script$a = /*#__PURE__*/ vue.defineComponent({
|
|
5432
5423
|
__name: 'widget-image',
|
|
5433
5424
|
props: {
|
|
5434
|
-
src: { type:
|
|
5425
|
+
src: { type: null, required: true },
|
|
5435
5426
|
alt: { type: String, required: true },
|
|
5436
5427
|
default: { type: String, required: false }
|
|
5437
5428
|
},
|
|
@@ -5566,9 +5557,14 @@ class metadataService {
|
|
|
5566
5557
|
static url() {
|
|
5567
5558
|
return `/close-api/metadata/`;
|
|
5568
5559
|
}
|
|
5569
|
-
static get(entity,
|
|
5560
|
+
static get(entity, criteria, id) {
|
|
5570
5561
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5571
|
-
|
|
5562
|
+
const query = new URLSearchParams();
|
|
5563
|
+
if (criteria)
|
|
5564
|
+
query.append('criteria', criteria);
|
|
5565
|
+
if (id)
|
|
5566
|
+
query.append('id', String(id));
|
|
5567
|
+
return yield fetch(this.url() + `${entity}?${query.toString()}`, {
|
|
5572
5568
|
method: "GET",
|
|
5573
5569
|
}).then(res => res.json());
|
|
5574
5570
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MetadataResponseInterface } from "../types/metadata-types";
|
|
2
2
|
export default class metadataService {
|
|
3
3
|
private static url;
|
|
4
|
-
static get(entity: string,
|
|
4
|
+
static get(entity: string, criteria?: string, id?: any): Promise<MetadataResponseInterface>;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
src: {
|
|
3
|
-
type:
|
|
3
|
+
type: any;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
6
|
alt: {
|
|
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
[key: string]: any;
|
|
16
16
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
17
|
src: {
|
|
18
|
-
type:
|
|
18
|
+
type: any;
|
|
19
19
|
required: true;
|
|
20
20
|
};
|
|
21
21
|
alt: {
|