eservices-core 1.0.364 → 1.0.365
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.d.ts +4 -27
- package/dist/index.js +172 -162
- package/dist/widgets/interface/interface-navigation-row.vue.d.ts +11 -1
- package/package.json +68 -68
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,7 @@ import * as mixins from "./mixins";
|
|
|
3
3
|
import config from "./config";
|
|
4
4
|
import * as types from "./types";
|
|
5
5
|
import Table from "./classes/Table";
|
|
6
|
-
import Form from "./classes/Form";
|
|
7
6
|
import "./../styles/index.css";
|
|
8
|
-
import { Component } from "vue";
|
|
9
7
|
import StylesInterface from "./styles/types";
|
|
10
8
|
import { Values } from "./types";
|
|
11
9
|
import WidgetBreadcrumbs from "./widgets/breadcrumbs/widget-breadcrumbs.vue";
|
|
@@ -21,6 +19,7 @@ import WidgetNotificationSystem from "./widgets/errorSystem/default/WidgetNotifi
|
|
|
21
19
|
import WidgetImage from "./widgets/image/widget-image.vue";
|
|
22
20
|
import WidgetButton from "./widgets/buttons/WidgetButton.vue";
|
|
23
21
|
import WidgetNotFound from "./widgets/notFound/WidgetNotFound.vue";
|
|
22
|
+
import InterfaceContainer from "./widgets/interface/interface-container.vue";
|
|
24
23
|
import authService from "./services/AuthService";
|
|
25
24
|
import dataService from "./services/data-service";
|
|
26
25
|
import { CommunicationService as communicationService } from "./services/communication-service";
|
|
@@ -37,13 +36,6 @@ import { clickOutside, requestHandler } from "./utils";
|
|
|
37
36
|
import valuesToUpperCase from "./utils/values-to-upper-case";
|
|
38
37
|
import { prettyDate, prettyDateWithTime } from "./utils/prettyDate";
|
|
39
38
|
export { StylesInterface };
|
|
40
|
-
import InterfaceContainer from "./widgets/interface/interface-container.vue";
|
|
41
|
-
/**WIDGETS**/
|
|
42
|
-
export { InterfaceContainer };
|
|
43
|
-
export interface StepRecordRow {
|
|
44
|
-
next?: () => Promise<any>;
|
|
45
|
-
component?: Component;
|
|
46
|
-
}
|
|
47
39
|
export interface NavigationRecordRow {
|
|
48
40
|
title: string;
|
|
49
41
|
icon?: string;
|
|
@@ -55,11 +47,6 @@ export interface InterfaceBreadcrumb {
|
|
|
55
47
|
link: any;
|
|
56
48
|
title: string;
|
|
57
49
|
}
|
|
58
|
-
export interface InterfaceNotificationRecordRow {
|
|
59
|
-
title?: string;
|
|
60
|
-
icon: string;
|
|
61
|
-
count: number;
|
|
62
|
-
}
|
|
63
50
|
export interface InterfaceUserPopupRecordRow {
|
|
64
51
|
title: string;
|
|
65
52
|
icon: string;
|
|
@@ -74,12 +61,6 @@ export interface CodeEntity {
|
|
|
74
61
|
code: string;
|
|
75
62
|
name: string;
|
|
76
63
|
}
|
|
77
|
-
export declare type ContextProfileKey = number;
|
|
78
|
-
export interface ContextProfile {
|
|
79
|
-
name: string;
|
|
80
|
-
id: ContextProfileKey | null;
|
|
81
|
-
photo: string | null;
|
|
82
|
-
}
|
|
83
64
|
export interface ValuesInterface {
|
|
84
65
|
[name: string]: Values;
|
|
85
66
|
}
|
|
@@ -102,13 +83,9 @@ clickOutside,
|
|
|
102
83
|
* @deprecated
|
|
103
84
|
* */
|
|
104
85
|
requestHandler };
|
|
105
|
-
export { ApplicationManager, NotificationSystem,
|
|
106
|
-
/**
|
|
107
|
-
* Some classes, test: 22.03.2022
|
|
108
|
-
* */
|
|
109
|
-
Table, CoreError, List, ProcessWrap, ListCell };
|
|
86
|
+
export { ApplicationManager, NotificationSystem, Table, CoreError, List, ProcessWrap, ListCell };
|
|
110
87
|
export { fileService, processWizardService, viewService, authService, dataService, communicationService, metadataService };
|
|
111
|
-
export { WidgetNotificationSystem, WidgetForm, ModalValidation, WidgetTable, WidgetTableController, WidgetSpinner, WidgetBreadcrumbs, WidgetCommunication, WidgetList, WidgetSection, WidgetImage, WidgetButton, WidgetNotFound };
|
|
88
|
+
export { WidgetNotificationSystem, WidgetForm, ModalValidation, WidgetTable, WidgetTableController, WidgetSpinner, WidgetBreadcrumbs, WidgetCommunication, WidgetList, WidgetSection, WidgetImage, WidgetButton, WidgetNotFound, InterfaceContainer as WidgetInterfaceContainer };
|
|
112
89
|
declare const utils: {
|
|
113
90
|
clickOutside: typeof _utils.clickOutside;
|
|
114
91
|
requestHandler: typeof _utils.requestHandler;
|
|
@@ -182,7 +159,7 @@ declare const _default: {
|
|
|
182
159
|
StepWorker: typeof import("./classes/StepWorker").default;
|
|
183
160
|
Errors: typeof CoreError;
|
|
184
161
|
CoreError: typeof CoreError;
|
|
185
|
-
Form: typeof Form;
|
|
162
|
+
Form: typeof import("./classes/Form").default;
|
|
186
163
|
ListWorker: typeof import("./classes/ListWorker").default;
|
|
187
164
|
ViewForm: typeof import("./classes/ViewForm/ViewForm").ViewForm;
|
|
188
165
|
Table: typeof Table;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.365
|
|
3
3
|
* (c) 2022 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -5462,149 +5462,12 @@ return (_ctx, _cache) => {
|
|
|
5462
5462
|
|
|
5463
5463
|
};
|
|
5464
5464
|
|
|
5465
|
-
var css_248z$9 = "\n.widget-not-found[data-v-245f2dd1]{\r\n\t\ttext-align: center;\n}\n.widget-not-found__title[data-v-245f2dd1]{\r\n\t\tfont-size: 44px;\r\n\t\tfont-weight: 600;\n}\n.widget-not-found__info[data-v-245f2dd1]{\r\n\t\ttext-align: center;\n}\r\n";
|
|
5465
|
+
var css_248z$9 = "\n.widget-not-found[data-v-245f2dd1]{\r\n\t\ttext-align: center;\r\n\t\tmargin: auto;\r\n\t\tmax-width: 760px;\n}\n.widget-not-found__title[data-v-245f2dd1]{\r\n\t\tfont-size: 44px;\r\n\t\tfont-weight: 600;\n}\n.widget-not-found__info[data-v-245f2dd1]{\r\n\t\ttext-align: center;\n}\r\n";
|
|
5466
5466
|
styleInject(css_248z$9);
|
|
5467
5467
|
|
|
5468
5468
|
script$a.__scopeId = "data-v-245f2dd1";
|
|
5469
5469
|
script$a.__file = "core/widgets/notFound/WidgetNotFound.vue";
|
|
5470
5470
|
|
|
5471
|
-
class CommunicationService {
|
|
5472
|
-
static create(data) {
|
|
5473
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5474
|
-
return Request(CommunicationService.url, {
|
|
5475
|
-
method: 'post',
|
|
5476
|
-
body: JSON.stringify(data),
|
|
5477
|
-
headers: {
|
|
5478
|
-
'Content-Type': 'application/json',
|
|
5479
|
-
}
|
|
5480
|
-
});
|
|
5481
|
-
});
|
|
5482
|
-
}
|
|
5483
|
-
/**
|
|
5484
|
-
* @description Чтение списка разговоров
|
|
5485
|
-
* */
|
|
5486
|
-
static read(data) {
|
|
5487
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5488
|
-
const query = new URLSearchParams({
|
|
5489
|
-
targetCode: String(data.targetCode),
|
|
5490
|
-
entityName: data.entity.name,
|
|
5491
|
-
entityCatalogId: data.entity.catalogId
|
|
5492
|
-
});
|
|
5493
|
-
return Request(CommunicationService.url + '?' + query.toString(), {
|
|
5494
|
-
method: 'get',
|
|
5495
|
-
});
|
|
5496
|
-
});
|
|
5497
|
-
}
|
|
5498
|
-
static readMessages(data) {
|
|
5499
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5500
|
-
return Request(`${CommunicationService.url}/${data.id}/messages`, {
|
|
5501
|
-
method: 'get'
|
|
5502
|
-
});
|
|
5503
|
-
});
|
|
5504
|
-
}
|
|
5505
|
-
static createMessage(data) {
|
|
5506
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5507
|
-
return Request(`${CommunicationService.url}/${data.talkId}/messages`, {
|
|
5508
|
-
method: 'post',
|
|
5509
|
-
body: JSON.stringify({
|
|
5510
|
-
text: data.text
|
|
5511
|
-
}),
|
|
5512
|
-
headers: {
|
|
5513
|
-
'Content-Type': 'application/json',
|
|
5514
|
-
}
|
|
5515
|
-
})
|
|
5516
|
-
.then(res => {
|
|
5517
|
-
return res.data;
|
|
5518
|
-
});
|
|
5519
|
-
});
|
|
5520
|
-
}
|
|
5521
|
-
}
|
|
5522
|
-
CommunicationService.url = `/close-api/communications`;
|
|
5523
|
-
|
|
5524
|
-
class viewService {
|
|
5525
|
-
static getDefaultView(name) {
|
|
5526
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5527
|
-
return Request('/close-api/views/' + name, {
|
|
5528
|
-
method: 'GET',
|
|
5529
|
-
headers: {
|
|
5530
|
-
'Content-Type': 'application/json',
|
|
5531
|
-
},
|
|
5532
|
-
});
|
|
5533
|
-
});
|
|
5534
|
-
}
|
|
5535
|
-
}
|
|
5536
|
-
|
|
5537
|
-
class processWizardService {
|
|
5538
|
-
static getStartConfig(process, entity) {
|
|
5539
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5540
|
-
return Request(`/close-api/views/process-wizard/${process}/${entity}`, {
|
|
5541
|
-
method: 'GET',
|
|
5542
|
-
headers: {
|
|
5543
|
-
'Content-Type': 'application/json',
|
|
5544
|
-
},
|
|
5545
|
-
});
|
|
5546
|
-
});
|
|
5547
|
-
}
|
|
5548
|
-
static startProcess(process, entity) {
|
|
5549
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5550
|
-
return Request(`/close-api/views/process-wizard/${process}/${entity}`, {
|
|
5551
|
-
method: 'POST',
|
|
5552
|
-
headers: {
|
|
5553
|
-
'Content-Type': 'application/json',
|
|
5554
|
-
},
|
|
5555
|
-
});
|
|
5556
|
-
});
|
|
5557
|
-
}
|
|
5558
|
-
static runStep(process, entity, stepName, token, values) {
|
|
5559
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5560
|
-
return Request(`/close-api/views/process-wizard/${process}/${entity}`, {
|
|
5561
|
-
method: 'PUT',
|
|
5562
|
-
headers: {
|
|
5563
|
-
'Content-Type': 'application/json',
|
|
5564
|
-
},
|
|
5565
|
-
body: JSON.stringify({
|
|
5566
|
-
stepName,
|
|
5567
|
-
token,
|
|
5568
|
-
values
|
|
5569
|
-
})
|
|
5570
|
-
});
|
|
5571
|
-
});
|
|
5572
|
-
}
|
|
5573
|
-
}
|
|
5574
|
-
|
|
5575
|
-
class metadataService {
|
|
5576
|
-
static url() {
|
|
5577
|
-
return `/close-api/metadata/`;
|
|
5578
|
-
}
|
|
5579
|
-
static get(entity, criteria, id) {
|
|
5580
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5581
|
-
const query = new URLSearchParams();
|
|
5582
|
-
if (criteria)
|
|
5583
|
-
query.append('criteria', criteria);
|
|
5584
|
-
if (id)
|
|
5585
|
-
query.append('id', String(id));
|
|
5586
|
-
return yield fetch(this.url() + `${entity}?${query.toString()}`, {
|
|
5587
|
-
method: "GET",
|
|
5588
|
-
}).then(res => res.json());
|
|
5589
|
-
});
|
|
5590
|
-
}
|
|
5591
|
-
}
|
|
5592
|
-
|
|
5593
|
-
/**
|
|
5594
|
-
* @description Recursive changing object, uppercase first chapter of each key.
|
|
5595
|
-
* */
|
|
5596
|
-
function valuesToUpperCase(values) {
|
|
5597
|
-
return Object.keys(values).reduce((acc, key) => {
|
|
5598
|
-
let value = values[key];
|
|
5599
|
-
const newKey = key.charAt(0).toUpperCase() + key.slice(1); // upper
|
|
5600
|
-
// If current value is not primitive value, continue recursive parse
|
|
5601
|
-
if (typeof value === 'object' && !(value === undefined || value === null))
|
|
5602
|
-
value = valuesToUpperCase(value);
|
|
5603
|
-
acc[newKey] = value;
|
|
5604
|
-
return acc;
|
|
5605
|
-
}, {});
|
|
5606
|
-
}
|
|
5607
|
-
|
|
5608
5471
|
const _hoisted_1$9 = { class: "container-navigation-row" };
|
|
5609
5472
|
const _hoisted_2$8 = { class: "navigation-row__title text_size_md" };
|
|
5610
5473
|
const _hoisted_3$6 = {
|
|
@@ -5614,7 +5477,8 @@ const _hoisted_3$6 = {
|
|
|
5614
5477
|
var script$9 = /*#__PURE__*/ vue.defineComponent({
|
|
5615
5478
|
__name: 'interface-navigation-row',
|
|
5616
5479
|
props: {
|
|
5617
|
-
record: { type: null, required: true }
|
|
5480
|
+
record: { type: null, required: true },
|
|
5481
|
+
activeList: { type: Boolean, required: false }
|
|
5618
5482
|
},
|
|
5619
5483
|
emits: ["toggle"],
|
|
5620
5484
|
setup(__props, { emit: emits }) {
|
|
@@ -5632,6 +5496,8 @@ var script$9 = /*#__PURE__*/ vue.defineComponent({
|
|
|
5632
5496
|
* */
|
|
5633
5497
|
const checkRow = (row) => {
|
|
5634
5498
|
const currentPath = router.currentRoute.value.path;
|
|
5499
|
+
if (!row.link)
|
|
5500
|
+
return false;
|
|
5635
5501
|
try {
|
|
5636
5502
|
const resolved = router.resolve(row.link);
|
|
5637
5503
|
return resolved.path === currentPath;
|
|
@@ -5663,7 +5529,7 @@ var script$9 = /*#__PURE__*/ vue.defineComponent({
|
|
|
5663
5529
|
'navigation-row_bold': (_a = __props.record.children) === null || _a === void 0 ? void 0 : _a.length,
|
|
5664
5530
|
'navigation-row_active': vue.unref(activeRow),
|
|
5665
5531
|
}]),
|
|
5666
|
-
onClick: _cache[
|
|
5532
|
+
onClick: _cache[1] || (_cache[1] = ($event) => (activateRecord()))
|
|
5667
5533
|
}, [
|
|
5668
5534
|
vue.createVNode(script$_, {
|
|
5669
5535
|
class: "navigation-row__icon",
|
|
@@ -5671,14 +5537,19 @@ var script$9 = /*#__PURE__*/ vue.defineComponent({
|
|
|
5671
5537
|
}, null, 8 /* PROPS */, ["name"]),
|
|
5672
5538
|
vue.createElementVNode("p", _hoisted_2$8, vue.toDisplayString(__props.record.title), 1 /* TEXT */),
|
|
5673
5539
|
((_b = __props.record.children) === null || _b === void 0 ? void 0 : _b.length)
|
|
5674
|
-
? (vue.openBlock(), vue.
|
|
5540
|
+
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
5675
5541
|
key: 0,
|
|
5676
|
-
class:
|
|
5677
|
-
|
|
5678
|
-
},
|
|
5542
|
+
class: "navigation-row-toggle",
|
|
5543
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => (emits('toggle')), ["stop"]))
|
|
5544
|
+
}, [
|
|
5545
|
+
vue.createVNode(script$_, {
|
|
5546
|
+
class: vue.normalizeClass([{ 'navigation-row__toggle_active': vue.unref(activeRow) || __props.activeList }, "navigation-row__toggle"]),
|
|
5547
|
+
name: "angle-right"
|
|
5548
|
+
}, null, 8 /* PROPS */, ["class"])
|
|
5549
|
+
]))
|
|
5679
5550
|
: vue.createCommentVNode("v-if", true)
|
|
5680
5551
|
], 2 /* CLASS */),
|
|
5681
|
-
(vue.unref(activeRow))
|
|
5552
|
+
(vue.unref(activeRow) || __props.activeList)
|
|
5682
5553
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$6, [
|
|
5683
5554
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.record.children, (elem, index) => {
|
|
5684
5555
|
return (vue.openBlock(), vue.createBlock(script$9, {
|
|
@@ -5693,7 +5564,7 @@ var script$9 = /*#__PURE__*/ vue.defineComponent({
|
|
|
5693
5564
|
}
|
|
5694
5565
|
});
|
|
5695
5566
|
|
|
5696
|
-
var css_248z$8 = "\n.container-navigation-row[data-v-476fe206]{\r\n border-bottom: var(--interface-navigation-row-border-bottom);\n}\n.navigation-row[data-v-476fe206]{\r\n display:
|
|
5567
|
+
var css_248z$8 = "\n.container-navigation-row[data-v-476fe206]{\r\n border-bottom: var(--interface-navigation-row-border-bottom);\n}\n.navigation-row[data-v-476fe206]{\r\n display: grid;\r\n\t\tgrid-template-rows: 60px;\r\n\t\tgrid-template-columns: min-content 1fr min-content;\r\n\t\talign-items: center;\r\n cursor: pointer;\r\n\t\tpadding: 0 0 0 20px;\r\n\t\tgap: 10px;\n}\n.navigation-row[data-v-476fe206]:not(.navigation-row_active):hover{\r\n background-color: var(--interface-navigation-row-background-color-hover);\n}\n.navigation-row_active[data-v-476fe206]{\r\n background-color: var(--interface-navigation-row-primary-background-color-active);\r\n color: var(--interface-navigation-row-primary-color-active);\n}\n.navigation-row__icon[data-v-476fe206] {\r\n font-size: 20px;\n}\n.navigation-row__title[data-v-476fe206]{\r\n margin: 0;\r\n flex-grow: 1;\r\n user-select: none;\n}\n.navigation-row_bold[data-v-476fe206]{\r\n font-weight: 600;\n}\n.navigation-row__toggle[data-v-476fe206]{\r\n height: 13px;\r\n font-size: 13px;\n}\n.navigation-row-children[data-v-476fe206]{\r\n border-left: var(--interface-navigation-row-children-border-left);\n}\n.navigation-row__toggle_active[data-v-476fe206]{\r\n transform: rotate(90deg);\n}\n.navigation-row-toggle[data-v-476fe206]{\r\n\t\theight: 100%;\r\n\t\tpadding: 0 10px;\r\n\t\tdisplay: grid;\r\n\t\tplace-content: center;\n}\r\n";
|
|
5697
5568
|
styleInject(css_248z$8);
|
|
5698
5569
|
|
|
5699
5570
|
script$9.__scopeId = "data-v-476fe206";
|
|
@@ -5706,24 +5577,26 @@ var script$8 = /*#__PURE__*/ vue.defineComponent({
|
|
|
5706
5577
|
config: { type: Array, required: true }
|
|
5707
5578
|
},
|
|
5708
5579
|
setup(__props) {
|
|
5709
|
-
const
|
|
5710
|
-
|
|
5711
|
-
* @description Обработанная конфигурация. Добавлен hash для идентификации
|
|
5712
|
-
* объекта.
|
|
5713
|
-
* */
|
|
5714
|
-
const parsedConfig = vue.computed(() => props.config.map(elem => {
|
|
5715
|
-
return Object.assign(Object.assign({}, elem), { hash: hash__default["default"](elem).toString() });
|
|
5716
|
-
}));
|
|
5717
|
-
vue.reactive({
|
|
5718
|
-
activeRow: null
|
|
5580
|
+
const state = vue.reactive({
|
|
5581
|
+
activeList: null
|
|
5719
5582
|
});
|
|
5583
|
+
function isActive(item) {
|
|
5584
|
+
return hash__default["default"](item) === hash__default["default"](state.activeList);
|
|
5585
|
+
}
|
|
5586
|
+
function handleToggle(newActivity) {
|
|
5587
|
+
if (isActive(newActivity))
|
|
5588
|
+
return state.activeList = null;
|
|
5589
|
+
state.activeList = newActivity;
|
|
5590
|
+
}
|
|
5720
5591
|
return (_ctx, _cache) => {
|
|
5721
5592
|
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
|
|
5722
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
5593
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.config, (item, index) => {
|
|
5723
5594
|
return (vue.openBlock(), vue.createBlock(script$9, {
|
|
5724
|
-
key:
|
|
5725
|
-
record: item
|
|
5726
|
-
|
|
5595
|
+
key: index,
|
|
5596
|
+
record: item,
|
|
5597
|
+
onToggle: ($event) => (handleToggle(item)),
|
|
5598
|
+
"active-list": isActive(item)
|
|
5599
|
+
}, null, 8 /* PROPS */, ["record", "onToggle", "active-list"]));
|
|
5727
5600
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5728
5601
|
]));
|
|
5729
5602
|
};
|
|
@@ -6134,6 +6007,143 @@ styleInject(css_248z);
|
|
|
6134
6007
|
script.__scopeId = "data-v-378f75d5";
|
|
6135
6008
|
script.__file = "core/widgets/interface/interface-container.vue";
|
|
6136
6009
|
|
|
6010
|
+
class CommunicationService {
|
|
6011
|
+
static create(data) {
|
|
6012
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6013
|
+
return Request(CommunicationService.url, {
|
|
6014
|
+
method: 'post',
|
|
6015
|
+
body: JSON.stringify(data),
|
|
6016
|
+
headers: {
|
|
6017
|
+
'Content-Type': 'application/json',
|
|
6018
|
+
}
|
|
6019
|
+
});
|
|
6020
|
+
});
|
|
6021
|
+
}
|
|
6022
|
+
/**
|
|
6023
|
+
* @description Чтение списка разговоров
|
|
6024
|
+
* */
|
|
6025
|
+
static read(data) {
|
|
6026
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6027
|
+
const query = new URLSearchParams({
|
|
6028
|
+
targetCode: String(data.targetCode),
|
|
6029
|
+
entityName: data.entity.name,
|
|
6030
|
+
entityCatalogId: data.entity.catalogId
|
|
6031
|
+
});
|
|
6032
|
+
return Request(CommunicationService.url + '?' + query.toString(), {
|
|
6033
|
+
method: 'get',
|
|
6034
|
+
});
|
|
6035
|
+
});
|
|
6036
|
+
}
|
|
6037
|
+
static readMessages(data) {
|
|
6038
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6039
|
+
return Request(`${CommunicationService.url}/${data.id}/messages`, {
|
|
6040
|
+
method: 'get'
|
|
6041
|
+
});
|
|
6042
|
+
});
|
|
6043
|
+
}
|
|
6044
|
+
static createMessage(data) {
|
|
6045
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6046
|
+
return Request(`${CommunicationService.url}/${data.talkId}/messages`, {
|
|
6047
|
+
method: 'post',
|
|
6048
|
+
body: JSON.stringify({
|
|
6049
|
+
text: data.text
|
|
6050
|
+
}),
|
|
6051
|
+
headers: {
|
|
6052
|
+
'Content-Type': 'application/json',
|
|
6053
|
+
}
|
|
6054
|
+
})
|
|
6055
|
+
.then(res => {
|
|
6056
|
+
return res.data;
|
|
6057
|
+
});
|
|
6058
|
+
});
|
|
6059
|
+
}
|
|
6060
|
+
}
|
|
6061
|
+
CommunicationService.url = `/close-api/communications`;
|
|
6062
|
+
|
|
6063
|
+
class viewService {
|
|
6064
|
+
static getDefaultView(name) {
|
|
6065
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6066
|
+
return Request('/close-api/views/' + name, {
|
|
6067
|
+
method: 'GET',
|
|
6068
|
+
headers: {
|
|
6069
|
+
'Content-Type': 'application/json',
|
|
6070
|
+
},
|
|
6071
|
+
});
|
|
6072
|
+
});
|
|
6073
|
+
}
|
|
6074
|
+
}
|
|
6075
|
+
|
|
6076
|
+
class processWizardService {
|
|
6077
|
+
static getStartConfig(process, entity) {
|
|
6078
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6079
|
+
return Request(`/close-api/views/process-wizard/${process}/${entity}`, {
|
|
6080
|
+
method: 'GET',
|
|
6081
|
+
headers: {
|
|
6082
|
+
'Content-Type': 'application/json',
|
|
6083
|
+
},
|
|
6084
|
+
});
|
|
6085
|
+
});
|
|
6086
|
+
}
|
|
6087
|
+
static startProcess(process, entity) {
|
|
6088
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6089
|
+
return Request(`/close-api/views/process-wizard/${process}/${entity}`, {
|
|
6090
|
+
method: 'POST',
|
|
6091
|
+
headers: {
|
|
6092
|
+
'Content-Type': 'application/json',
|
|
6093
|
+
},
|
|
6094
|
+
});
|
|
6095
|
+
});
|
|
6096
|
+
}
|
|
6097
|
+
static runStep(process, entity, stepName, token, values) {
|
|
6098
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6099
|
+
return Request(`/close-api/views/process-wizard/${process}/${entity}`, {
|
|
6100
|
+
method: 'PUT',
|
|
6101
|
+
headers: {
|
|
6102
|
+
'Content-Type': 'application/json',
|
|
6103
|
+
},
|
|
6104
|
+
body: JSON.stringify({
|
|
6105
|
+
stepName,
|
|
6106
|
+
token,
|
|
6107
|
+
values
|
|
6108
|
+
})
|
|
6109
|
+
});
|
|
6110
|
+
});
|
|
6111
|
+
}
|
|
6112
|
+
}
|
|
6113
|
+
|
|
6114
|
+
class metadataService {
|
|
6115
|
+
static url() {
|
|
6116
|
+
return `/close-api/metadata/`;
|
|
6117
|
+
}
|
|
6118
|
+
static get(entity, criteria, id) {
|
|
6119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6120
|
+
const query = new URLSearchParams();
|
|
6121
|
+
if (criteria)
|
|
6122
|
+
query.append('criteria', criteria);
|
|
6123
|
+
if (id)
|
|
6124
|
+
query.append('id', String(id));
|
|
6125
|
+
return yield fetch(this.url() + `${entity}?${query.toString()}`, {
|
|
6126
|
+
method: "GET",
|
|
6127
|
+
}).then(res => res.json());
|
|
6128
|
+
});
|
|
6129
|
+
}
|
|
6130
|
+
}
|
|
6131
|
+
|
|
6132
|
+
/**
|
|
6133
|
+
* @description Recursive changing object, uppercase first chapter of each key.
|
|
6134
|
+
* */
|
|
6135
|
+
function valuesToUpperCase(values) {
|
|
6136
|
+
return Object.keys(values).reduce((acc, key) => {
|
|
6137
|
+
let value = values[key];
|
|
6138
|
+
const newKey = key.charAt(0).toUpperCase() + key.slice(1); // upper
|
|
6139
|
+
// If current value is not primitive value, continue recursive parse
|
|
6140
|
+
if (typeof value === 'object' && !(value === undefined || value === null))
|
|
6141
|
+
value = valuesToUpperCase(value);
|
|
6142
|
+
acc[newKey] = value;
|
|
6143
|
+
return acc;
|
|
6144
|
+
}, {});
|
|
6145
|
+
}
|
|
6146
|
+
|
|
6137
6147
|
const utils = {
|
|
6138
6148
|
clickOutside,
|
|
6139
6149
|
requestHandler,
|
|
@@ -6154,7 +6164,6 @@ var index = {
|
|
|
6154
6164
|
|
|
6155
6165
|
exports.ApplicationManager = ApplicationManager;
|
|
6156
6166
|
exports.CoreError = CoreError;
|
|
6157
|
-
exports.InterfaceContainer = script;
|
|
6158
6167
|
exports.List = List;
|
|
6159
6168
|
exports.ModalValidation = script$c;
|
|
6160
6169
|
exports.NotificationSystem = NotificationSystem;
|
|
@@ -6165,6 +6174,7 @@ exports.WidgetButton = script$J;
|
|
|
6165
6174
|
exports.WidgetCommunication = script$g;
|
|
6166
6175
|
exports.WidgetForm = script$K;
|
|
6167
6176
|
exports.WidgetImage = script$b;
|
|
6177
|
+
exports.WidgetInterfaceContainer = script;
|
|
6168
6178
|
exports.WidgetList = script$A;
|
|
6169
6179
|
exports.WidgetNotFound = script$a;
|
|
6170
6180
|
exports.WidgetNotificationSystem = script$q;
|
|
@@ -3,6 +3,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3
3
|
type: any;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
|
+
activeList: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
required: false;
|
|
9
|
+
};
|
|
6
10
|
}, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
7
11
|
[key: string]: any;
|
|
8
12
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "toggle"[], "toggle", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -10,7 +14,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10
14
|
type: any;
|
|
11
15
|
required: true;
|
|
12
16
|
};
|
|
17
|
+
activeList: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
required: false;
|
|
20
|
+
};
|
|
13
21
|
}>> & {
|
|
14
22
|
onToggle?: (...args: any[]) => any;
|
|
15
|
-
}, {
|
|
23
|
+
}, {
|
|
24
|
+
activeList: boolean;
|
|
25
|
+
}>;
|
|
16
26
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eservices-core",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "----",
|
|
5
|
-
"author": "",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"serve": "vue-cli-service serve",
|
|
8
|
-
"build": "vue-cli-service build",
|
|
9
|
-
"test:unit": "vue-cli-service test:unit",
|
|
10
|
-
"full": "npm run rollup && npm publish",
|
|
11
|
-
"rollup": "rollup -c ./rollup.config.js --environment BABEL_ENV:production",
|
|
12
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
13
|
-
},
|
|
14
|
-
"types": "dist/index.d.ts",
|
|
15
|
-
"main": "dist/index.js",
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"jenesius-event-emitter": "^1.0.4",
|
|
18
|
-
"socket.io-client": "^4.4.1"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"@babel/preset-env": "^7.16.5",
|
|
22
|
-
"@babel/preset-typescript": "^7.16.5",
|
|
23
|
-
"@rollup/plugin-commonjs": "^21.0.1",
|
|
24
|
-
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
25
|
-
"@rollup/plugin-typescript": "^8.3.0",
|
|
26
|
-
"@types/bencode": "^2.0.1",
|
|
27
|
-
"@types/date-and-time": "^0.13.0",
|
|
28
|
-
"@types/jest": "^24.9.1",
|
|
29
|
-
"@types/object-hash": "^2.2.1",
|
|
30
|
-
"@vue/cli-plugin-typescript": "~4.5.0",
|
|
31
|
-
"@vue/cli-plugin-unit-jest": "~4.5.0",
|
|
32
|
-
"@vue/cli-service": "~4.5.0",
|
|
33
|
-
"@vue/compiler-sfc": "^3.0.0",
|
|
34
|
-
"@vue/test-utils": "^2.0.0-rc.18",
|
|
35
|
-
"babel-jest": "26.6.3",
|
|
36
|
-
"object-hash": "^3.0.0",
|
|
37
|
-
"postcss-import": "^14.0.2",
|
|
38
|
-
"rollup-plugin-filesize": "^9.1.2",
|
|
39
|
-
"rollup-plugin-import-css": "^3.0.2",
|
|
40
|
-
"rollup-plugin-node-resolve": "^5.2.0",
|
|
41
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
42
|
-
"rollup-plugin-styles": "^4.0.0",
|
|
43
|
-
"rollup-plugin-typescript": "^1.0.1",
|
|
44
|
-
"rollup-plugin-typescript2": "^0.31.1",
|
|
45
|
-
"rollup-plugin-vue": "6.0.0",
|
|
46
|
-
"tslib": "^2.3.1",
|
|
47
|
-
"typescript": "~4.1.5",
|
|
48
|
-
"vue-jest": "^5.0.0-alpha.10"
|
|
49
|
-
},
|
|
50
|
-
"peerDependencies": {
|
|
51
|
-
"date-and-time": "^2.0.1",
|
|
52
|
-
"jenesius-vue-form": "^2.0.30",
|
|
53
|
-
"jenesius-vue-modal": "^1.5.0",
|
|
54
|
-
"vue": "^3.0.0",
|
|
55
|
-
"vue-router": "^4.0.12"
|
|
56
|
-
},
|
|
57
|
-
"license": "ISC",
|
|
58
|
-
"repository": {
|
|
59
|
-
"type": "git",
|
|
60
|
-
"url": "https://eBorneo@dev.azure.com/eBorneo/AppRegister/_git/feCore"
|
|
61
|
-
},
|
|
62
|
-
"files": [
|
|
63
|
-
"dist/index.js",
|
|
64
|
-
"dist/**/*.ts",
|
|
65
|
-
"dist/*.ts",
|
|
66
|
-
"readme.md"
|
|
67
|
-
]
|
|
68
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "eservices-core",
|
|
3
|
+
"version": "1.0.365",
|
|
4
|
+
"description": "----",
|
|
5
|
+
"author": "",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"serve": "vue-cli-service serve",
|
|
8
|
+
"build": "vue-cli-service build",
|
|
9
|
+
"test:unit": "vue-cli-service test:unit",
|
|
10
|
+
"full": "npm run rollup && npm publish",
|
|
11
|
+
"rollup": "rollup -c ./rollup.config.js --environment BABEL_ENV:production",
|
|
12
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
13
|
+
},
|
|
14
|
+
"types": "dist/index.d.ts",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"jenesius-event-emitter": "^1.0.4",
|
|
18
|
+
"socket.io-client": "^4.4.1"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@babel/preset-env": "^7.16.5",
|
|
22
|
+
"@babel/preset-typescript": "^7.16.5",
|
|
23
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
24
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
25
|
+
"@rollup/plugin-typescript": "^8.3.0",
|
|
26
|
+
"@types/bencode": "^2.0.1",
|
|
27
|
+
"@types/date-and-time": "^0.13.0",
|
|
28
|
+
"@types/jest": "^24.9.1",
|
|
29
|
+
"@types/object-hash": "^2.2.1",
|
|
30
|
+
"@vue/cli-plugin-typescript": "~4.5.0",
|
|
31
|
+
"@vue/cli-plugin-unit-jest": "~4.5.0",
|
|
32
|
+
"@vue/cli-service": "~4.5.0",
|
|
33
|
+
"@vue/compiler-sfc": "^3.0.0",
|
|
34
|
+
"@vue/test-utils": "^2.0.0-rc.18",
|
|
35
|
+
"babel-jest": "26.6.3",
|
|
36
|
+
"object-hash": "^3.0.0",
|
|
37
|
+
"postcss-import": "^14.0.2",
|
|
38
|
+
"rollup-plugin-filesize": "^9.1.2",
|
|
39
|
+
"rollup-plugin-import-css": "^3.0.2",
|
|
40
|
+
"rollup-plugin-node-resolve": "^5.2.0",
|
|
41
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
42
|
+
"rollup-plugin-styles": "^4.0.0",
|
|
43
|
+
"rollup-plugin-typescript": "^1.0.1",
|
|
44
|
+
"rollup-plugin-typescript2": "^0.31.1",
|
|
45
|
+
"rollup-plugin-vue": "6.0.0",
|
|
46
|
+
"tslib": "^2.3.1",
|
|
47
|
+
"typescript": "~4.1.5",
|
|
48
|
+
"vue-jest": "^5.0.0-alpha.10"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"date-and-time": "^2.0.1",
|
|
52
|
+
"jenesius-vue-form": "^2.0.30",
|
|
53
|
+
"jenesius-vue-modal": "^1.5.0",
|
|
54
|
+
"vue": "^3.0.0",
|
|
55
|
+
"vue-router": "^4.0.12"
|
|
56
|
+
},
|
|
57
|
+
"license": "ISC",
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "https://eBorneo@dev.azure.com/eBorneo/AppRegister/_git/feCore"
|
|
61
|
+
},
|
|
62
|
+
"files": [
|
|
63
|
+
"dist/index.js",
|
|
64
|
+
"dist/**/*.ts",
|
|
65
|
+
"dist/*.ts",
|
|
66
|
+
"readme.md"
|
|
67
|
+
]
|
|
68
|
+
}
|