eservices-core 1.0.374 → 1.0.376
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/dist/index.js +67 -59
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.376
|
|
3
3
|
* (c) 2022 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -2030,8 +2030,8 @@ script$K.render = render$9;
|
|
|
2030
2030
|
script$K.__scopeId = "data-v-63bc86eb";
|
|
2031
2031
|
script$K.__file = "core/widgets/modals/ModalWait.vue";
|
|
2032
2032
|
|
|
2033
|
-
var _a;
|
|
2034
|
-
var NotificationSystem = new (_a = class NotificationSystem {
|
|
2033
|
+
var _a$1;
|
|
2034
|
+
var NotificationSystem = new (_a$1 = class NotificationSystem {
|
|
2035
2035
|
constructor() {
|
|
2036
2036
|
/**
|
|
2037
2037
|
* @description Array of current cards.
|
|
@@ -2074,8 +2074,8 @@ var NotificationSystem = new (_a = class NotificationSystem {
|
|
|
2074
2074
|
(_b = card.children) === null || _b === void 0 ? void 0 : _b.splice(childIndex, 1);
|
|
2075
2075
|
}
|
|
2076
2076
|
},
|
|
2077
|
-
_a.cardId = 0,
|
|
2078
|
-
_a);
|
|
2077
|
+
_a$1.cardId = 0,
|
|
2078
|
+
_a$1);
|
|
2079
2079
|
|
|
2080
2080
|
const DefaultValuesOptions = {
|
|
2081
2081
|
error: true,
|
|
@@ -4646,60 +4646,68 @@ class clientService {
|
|
|
4646
4646
|
}
|
|
4647
4647
|
}
|
|
4648
4648
|
|
|
4649
|
-
var
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4649
|
+
var _a;
|
|
4650
|
+
var ApplicationManager = new (_a = class ApplicationManager {
|
|
4651
|
+
constructor() {
|
|
4652
|
+
/**
|
|
4653
|
+
* @description Identity of current context. NULL if the data was not upload from web-service.
|
|
4654
|
+
*/
|
|
4655
|
+
this.currentContextId = vue.ref(null);
|
|
4656
|
+
/**
|
|
4657
|
+
* @description Computed data of current context. Person or Organization
|
|
4658
|
+
*/
|
|
4659
|
+
this.currentContext = vue.computed(() => {
|
|
4660
|
+
if (!this.isReady.value)
|
|
4661
|
+
return null;
|
|
4662
|
+
if (!this.person.value)
|
|
4663
|
+
return null;
|
|
4664
|
+
if (this.person.value.id === this.currentContextId.value)
|
|
4665
|
+
return this.person.value;
|
|
4666
|
+
return this.organizations.value.find(org => org.id === this.currentContextId.value) || null;
|
|
4667
|
+
});
|
|
4668
|
+
this.person = vue.ref(null); // Person context data
|
|
4669
|
+
this.organizations = vue.ref([]); // Organizations list
|
|
4670
|
+
/**
|
|
4671
|
+
* true - если информация о пользователе получена.
|
|
4672
|
+
* */
|
|
4673
|
+
this.isReady = vue.ref(false);
|
|
4674
|
+
vue.watch(() => this.currentContextId.value, () => {
|
|
4675
|
+
if (!this.currentContextId.value)
|
|
4676
|
+
return;
|
|
4677
|
+
localStorage.setItem(ApplicationManager.CURRENT_CONTEXT_KEY, String(this.currentContextId.value));
|
|
4678
|
+
});
|
|
4679
|
+
}
|
|
4680
|
+
setCurrentContext(id) {
|
|
4681
|
+
if (this.currentContextId.value === id)
|
|
4682
|
+
return console.log(`[application-manager] The current content has already been installed.`);
|
|
4683
|
+
this.currentContextId.value = id;
|
|
4684
|
+
console.log(`Current context id %c${id}`, 'color: purple');
|
|
4685
|
+
}
|
|
4669
4686
|
/**
|
|
4670
|
-
*
|
|
4687
|
+
* Обновление всех данных пользователя, включая:
|
|
4688
|
+
* - Пресональные данные (email, id, name, username, image..)
|
|
4671
4689
|
* */
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
this.organizations.value = result.organizations;
|
|
4694
|
-
if (!this.currentContextId.value)
|
|
4695
|
-
this.setCurrentContext(result.id);
|
|
4696
|
-
}
|
|
4697
|
-
catch (e) {
|
|
4698
|
-
NotificationSystem.add('error', e);
|
|
4699
|
-
}
|
|
4700
|
-
});
|
|
4701
|
-
}
|
|
4702
|
-
};
|
|
4690
|
+
updateFullClientData() {
|
|
4691
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4692
|
+
try {
|
|
4693
|
+
const result = yield clientService.getClientData();
|
|
4694
|
+
this.isReady.value = true;
|
|
4695
|
+
this.person.value = result;
|
|
4696
|
+
this.organizations.value = result.organizations;
|
|
4697
|
+
const savedContext = localStorage.getItem(ApplicationManager.CURRENT_CONTEXT_KEY);
|
|
4698
|
+
if (savedContext)
|
|
4699
|
+
this.setCurrentContext(Number.parseInt(savedContext));
|
|
4700
|
+
if (!this.currentContextId.value)
|
|
4701
|
+
this.setCurrentContext(result.id);
|
|
4702
|
+
}
|
|
4703
|
+
catch (e) {
|
|
4704
|
+
NotificationSystem.add('error', e);
|
|
4705
|
+
}
|
|
4706
|
+
});
|
|
4707
|
+
}
|
|
4708
|
+
},
|
|
4709
|
+
_a.CURRENT_CONTEXT_KEY = 'CurrentContext',
|
|
4710
|
+
_a);
|
|
4703
4711
|
|
|
4704
4712
|
var classes = {
|
|
4705
4713
|
StepWorker,
|
|
@@ -5592,7 +5600,7 @@ var script$d = /*#__PURE__*/ vue.defineComponent({
|
|
|
5592
5600
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => (emits('toggle')), ["stop"]))
|
|
5593
5601
|
}, [
|
|
5594
5602
|
vue.createVNode(script$13, {
|
|
5595
|
-
class: vue.normalizeClass([{ 'navigation-row__toggle_active': vue.unref(activeRow) || __props.activeList }, "navigation-row__toggle"]),
|
|
5603
|
+
class: vue.normalizeClass([{ 'navigation-row__toggle_active': vue.unref(activeRow) || __props.activeList }, "navigation-row__toggle widget-navigation-toggle-icon"]),
|
|
5596
5604
|
name: "angle-right"
|
|
5597
5605
|
}, null, 8 /* PROPS */, ["class"])
|
|
5598
5606
|
]))
|
|
@@ -5797,7 +5805,7 @@ styleInject(css_248z$8);
|
|
|
5797
5805
|
script$8.__scopeId = "data-v-23db5c51";
|
|
5798
5806
|
script$8.__file = "core/widgets/interface/user-popup-switch-organization.vue";
|
|
5799
5807
|
|
|
5800
|
-
const _hoisted_1$6 = { class: "widget-popup" };
|
|
5808
|
+
const _hoisted_1$6 = { class: "widget-popup widget-interface-popup" };
|
|
5801
5809
|
const _hoisted_2$5 = { class: "popup-current-context popup-section" };
|
|
5802
5810
|
const _hoisted_3$4 = { class: "popup-current-context__info" };
|
|
5803
5811
|
const _hoisted_4$3 = { class: "info-title text_bold text_md info-paragraph" };
|