bx-rest 0.4.2 → 0.4.4
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/esm2022/functions/mapResult.mjs +5 -2
- package/esm2022/map/rest.mjs +17 -0
- package/esm2022/map/task/elapseditem.mjs +5 -5
- package/esm2022/map/task.mjs +3 -3
- package/esm2022/map.mjs +1 -1
- package/esm2022/request/bizproc/activity.mjs +5 -5
- package/esm2022/request/bizproc/event.mjs +5 -5
- package/esm2022/request/bizproc/robot.mjs +5 -5
- package/esm2022/request/bizproc/task.mjs +5 -5
- package/esm2022/request/bizproc/workflow.mjs +5 -5
- package/esm2022/request/bizproc.mjs +6 -6
- package/esm2022/request/task/elapseditem.mjs +5 -5
- package/esm2022/request/task.mjs +6 -6
- package/esm2022/request/tasks/task.mjs +2 -2
- package/esm2022/request/user.mjs +3 -10
- package/esm2022/request-navvy/bizproc/workflow.mjs +10 -10
- package/esm2022/request-navvy/bizproc.mjs +10 -10
- package/esm2022/request-navvy/calendar/event.mjs +5 -5
- package/esm2022/request-navvy/calendar.mjs +3 -3
- package/esm2022/request-navvy/task/delegate/elapseditem.mjs +11 -11
- package/esm2022/request-navvy/task/elapseditem.mjs +13 -13
- package/esm2022/request-navvy/task/operation/elapseditem.mjs +14 -14
- package/esm2022/request-navvy/tasks/task.mjs +4 -29
- package/esm2022/request-navvy/user.mjs +12 -35
- package/esm2022/rest.mjs +38 -25
- package/esm2022/services/Navvy/NavvyAlternativePaginationNavigation.mjs +4 -3
- package/esm2022/services/Navvy/NavvyPagNav.mjs +4 -3
- package/esm2022/services/Navvy/NavvyPagNavTasks.mjs +4 -3
- package/esm2022/services/Navvy/NavvyPagNavWithUselessKey.mjs +3 -2
- package/esm2022/services/Navvy/NavvySimple.mjs +8 -4
- package/esm2022/services/Navvy/NavvySupport.mjs +1 -4
- package/esm2022/services/Navvy/extends/NavvyPagNavBase.mjs +3 -2
- package/esm2022/services/base.mjs +1 -3
- package/esm2022/services/http/HttpBX.mjs +6 -3
- package/esm2022/settings.mjs +2 -2
- package/esm2022/typification/rest/base/answer.mjs +1 -1
- package/esm2022/typification/rest/batch/batchRequestParam.mjs +1 -1
- package/esm2022/typification/rest/department/add.mjs +1 -1
- package/esm2022/typification/rest/department/del.mjs +1 -1
- package/esm2022/typification/rest/department/department.mjs +1 -1
- package/esm2022/typification/rest/department/get.mjs +1 -1
- package/esm2022/typification/rest/department/update.mjs +1 -1
- package/esm2022/typification/rest/profile.mjs +2 -0
- package/esm2022/typification/rest/tasks/base/fieldsName.mjs +1 -1
- package/fesm2022/bx-rest.mjs +882 -904
- package/fesm2022/bx-rest.mjs.map +1 -1
- package/functions/mapResult.d.ts +2 -1
- package/map/rest.d.ts +8 -0
- package/map/task/elapseditem.d.ts +3 -3
- package/map/task.d.ts +3 -3
- package/package.json +1 -1
- package/request/bizproc/activity.d.ts +3 -3
- package/request/bizproc/event.d.ts +3 -3
- package/request/bizproc/robot.d.ts +3 -3
- package/request/bizproc/task.d.ts +3 -3
- package/request/bizproc/workflow.d.ts +3 -3
- package/request/bizproc.d.ts +14 -14
- package/request/task/elapseditem.d.ts +3 -3
- package/request/task.d.ts +4 -4
- package/request/tasks/task.d.ts +2 -2
- package/request/user.d.ts +1 -1
- package/request-navvy/bizproc/workflow.d.ts +7 -7
- package/request-navvy/bizproc.d.ts +8 -8
- package/request-navvy/calendar/event.d.ts +3 -3
- package/request-navvy/calendar.d.ts +3 -3
- package/request-navvy/task/delegate/elapseditem.d.ts +9 -9
- package/request-navvy/task/elapseditem.d.ts +12 -12
- package/request-navvy/task/operation/elapseditem.d.ts +10 -10
- package/request-navvy/tasks/task.d.ts +3 -6
- package/request-navvy/user.d.ts +5 -8
- package/rest.d.ts +16 -6
- package/services/Navvy/NavvySimple.d.ts +0 -1
- package/services/Navvy/NavvySupport.d.ts +0 -2
- package/typification/rest/base/answer.d.ts +4 -1
- package/typification/rest/batch/batchRequestParam.d.ts +2 -3
- package/typification/rest/department/get.d.ts +4 -2
- package/typification/rest/profile.d.ts +16 -0
- package/typification/rest/tasks/base/fieldsName.d.ts +12 -0
package/fesm2022/bx-rest.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Injectable } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { map, catchError, take, mergeMap as mergeMap$1 } from 'rxjs/operators';
|
|
4
|
+
import { throwError, ReplaySubject, last, shareReplay, mergeMap, concat, from, concatMap, tap, Subscription, of, forkJoin } from 'rxjs';
|
|
4
5
|
import clone from 'just-clone';
|
|
5
6
|
import { DateTime } from 'luxon';
|
|
6
7
|
import * as i2 from '@angular/common/http';
|
|
7
8
|
import { HttpParams, HttpHeaders } from '@angular/common/http';
|
|
8
9
|
import flatten from 'just-flatten-it';
|
|
9
|
-
import { map, catchError, take, mergeMap as mergeMap$1 } from 'rxjs/operators';
|
|
10
10
|
|
|
11
11
|
class BX_REST_SETTINGS extends InjectionToken {
|
|
12
12
|
constructor() {
|
|
@@ -16,7 +16,7 @@ class BX_REST_SETTINGS extends InjectionToken {
|
|
|
16
16
|
key: 'auth'
|
|
17
17
|
};
|
|
18
18
|
this.urls = {
|
|
19
|
-
home: '
|
|
19
|
+
home: ''
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -36,248 +36,521 @@ export const BX_REST_SETTINGS: iRestSettings = {
|
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
function BXRestMapResult(v) {
|
|
39
|
-
if (v && (v
|
|
39
|
+
if (v && (instanceOfiBXRestAnswerSuccess(v))) {
|
|
40
40
|
return v.result;
|
|
41
41
|
}
|
|
42
42
|
return undefined;
|
|
43
|
+
}
|
|
44
|
+
function instanceOfiBXRestAnswerSuccess(object) {
|
|
45
|
+
return 'result' in object;
|
|
43
46
|
}
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const $user = 'user';
|
|
51
|
-
const $task = 'task';
|
|
52
|
-
const $calendar = 'calendar';
|
|
53
|
-
const $meeting = 'meeting';
|
|
54
|
-
const $list = 'list';
|
|
55
|
-
const $search = 'search';
|
|
56
|
-
const $accessibility = 'accessibility';
|
|
57
|
-
const $delete = 'delete';
|
|
58
|
-
const $nearest = 'nearest';
|
|
59
|
-
const $params = 'params';
|
|
60
|
-
const $status = 'status';
|
|
61
|
-
const $resource = 'resource';
|
|
62
|
-
const $booking = 'booking';
|
|
63
|
-
const $section = 'section';
|
|
64
|
-
const $settings = 'settings';
|
|
65
|
-
const $tasks = 'tasks';
|
|
66
|
-
const $elapseditem = 'elapseditem';
|
|
67
|
-
const $getlist = 'getlist';
|
|
68
|
-
const $approve = 'approve';
|
|
69
|
-
const $complete = 'complete';
|
|
70
|
-
const $counters = 'counters';
|
|
71
|
-
const $defer = 'defer';
|
|
72
|
-
const $delegate = 'delegate';
|
|
73
|
-
const $disapprove = 'disapprove';
|
|
74
|
-
const $favorite = 'favorite';
|
|
75
|
-
const $files = 'files';
|
|
76
|
-
const $file = 'file';
|
|
77
|
-
const $attach = 'attach';
|
|
78
|
-
const $field = 'field';
|
|
79
|
-
const $getFields = 'get' + $field + 's';
|
|
80
|
-
const $getaccess = 'getaccess';
|
|
81
|
-
const $history = 'history';
|
|
82
|
-
const $pause = 'pause';
|
|
83
|
-
const $renew = 'renew';
|
|
84
|
-
const $start = 'start';
|
|
85
|
-
const $result = 'result';
|
|
86
|
-
const $planner = 'planner';
|
|
87
|
-
const $disk = 'disk';
|
|
88
|
-
const $rename = 'rename';
|
|
89
|
-
const $markdeleted = 'markdeleted';
|
|
90
|
-
const $restore = 'restore';
|
|
91
|
-
const $folder = 'folder';
|
|
92
|
-
const $getchildren = 'getchildren';
|
|
93
|
-
const $copyto = 'copyto';
|
|
94
|
-
const $moveto = 'moveto';
|
|
95
|
-
const $uploadfile = 'uploadfile';
|
|
96
|
-
const $storage = 'storage';
|
|
97
|
-
const $getTypes = 'getTypes';
|
|
98
|
-
const $stages = 'stages';
|
|
99
|
-
const $getmanifest = 'getmanifest';
|
|
100
|
-
const $isactionallowed = 'isactionallowed';
|
|
101
|
-
const $commentitem = 'commentitem';
|
|
102
|
-
const $department = 'department';
|
|
103
|
-
const $sonet_group = 'sonet_group';
|
|
104
|
-
const $create = 'create';
|
|
105
|
-
const $feature = 'feature';
|
|
106
|
-
const $access = 'access';
|
|
107
|
-
const $request = 'request';
|
|
108
|
-
const $socialnetwork = 'socialnetwork';
|
|
109
|
-
const $api = 'api';
|
|
110
|
-
const $workgroup = 'workgroup';
|
|
111
|
-
const $log = 'log';
|
|
112
|
-
const $blogpost = 'blogpost';
|
|
113
|
-
const $lists = 'lists';
|
|
114
|
-
const $iblock = 'iblock';
|
|
115
|
-
const $type = 'type';
|
|
116
|
-
const $id = 'id';
|
|
117
|
-
const $element = 'element';
|
|
118
|
-
const $url = 'url';
|
|
119
|
-
const $bizproc = 'bizproc';
|
|
120
|
-
const $workflow = 'workflow';
|
|
121
|
-
const $instances = 'instances';
|
|
122
|
-
const $terminate = '$terminate';
|
|
123
|
-
const $kill = 'kill';
|
|
124
|
-
const $template = 'template';
|
|
125
|
-
const $activity = 'activity';
|
|
126
|
-
const $robot = 'robot';
|
|
127
|
-
const $send = 'send';
|
|
128
|
-
const $share = 'share';
|
|
129
|
-
const $blogcomment = 'blogcomment';
|
|
130
|
-
const $server = 'server';
|
|
131
|
-
const $time = 'time';
|
|
132
|
-
const $chat = 'chat';
|
|
133
|
-
const $message = 'message';
|
|
134
|
-
const $im = 'im';
|
|
135
|
-
const $updateTitle = 'updateTitle';
|
|
136
|
-
const $updateColor = 'updateColor';
|
|
137
|
-
const $updateAvatar = 'updateAvatar';
|
|
138
|
-
const $setOwner = 'setOwner';
|
|
139
|
-
const $mute = 'mute';
|
|
140
|
-
|
|
141
|
-
var partNameMethods$1 = /*#__PURE__*/Object.freeze({
|
|
142
|
-
__proto__: null,
|
|
143
|
-
$access: $access,
|
|
144
|
-
$accessibility: $accessibility,
|
|
145
|
-
$activity: $activity,
|
|
146
|
-
$add: $add,
|
|
147
|
-
$api: $api,
|
|
148
|
-
$approve: $approve,
|
|
149
|
-
$attach: $attach,
|
|
150
|
-
$bizproc: $bizproc,
|
|
151
|
-
$blogcomment: $blogcomment,
|
|
152
|
-
$blogpost: $blogpost,
|
|
153
|
-
$booking: $booking,
|
|
154
|
-
$calendar: $calendar,
|
|
155
|
-
$chat: $chat,
|
|
156
|
-
$commentitem: $commentitem,
|
|
157
|
-
$complete: $complete,
|
|
158
|
-
$copyto: $copyto,
|
|
159
|
-
$counters: $counters,
|
|
160
|
-
$create: $create,
|
|
161
|
-
$defer: $defer,
|
|
162
|
-
$delegate: $delegate,
|
|
163
|
-
$delete: $delete,
|
|
164
|
-
$department: $department,
|
|
165
|
-
$disapprove: $disapprove,
|
|
166
|
-
$disk: $disk,
|
|
167
|
-
$elapseditem: $elapseditem,
|
|
168
|
-
$element: $element,
|
|
169
|
-
$event: $event,
|
|
170
|
-
$favorite: $favorite,
|
|
171
|
-
$feature: $feature,
|
|
172
|
-
$field: $field,
|
|
173
|
-
$file: $file,
|
|
174
|
-
$files: $files,
|
|
175
|
-
$folder: $folder,
|
|
176
|
-
$get: $get,
|
|
177
|
-
$getFields: $getFields,
|
|
178
|
-
$getTypes: $getTypes,
|
|
179
|
-
$getaccess: $getaccess,
|
|
180
|
-
$getchildren: $getchildren,
|
|
181
|
-
$getlist: $getlist,
|
|
182
|
-
$getmanifest: $getmanifest,
|
|
183
|
-
$history: $history,
|
|
184
|
-
$iblock: $iblock,
|
|
185
|
-
$id: $id,
|
|
186
|
-
$im: $im,
|
|
187
|
-
$instances: $instances,
|
|
188
|
-
$isactionallowed: $isactionallowed,
|
|
189
|
-
$kill: $kill,
|
|
190
|
-
$list: $list,
|
|
191
|
-
$lists: $lists,
|
|
192
|
-
$log: $log,
|
|
193
|
-
$markdeleted: $markdeleted,
|
|
194
|
-
$meeting: $meeting,
|
|
195
|
-
$message: $message,
|
|
196
|
-
$moveto: $moveto,
|
|
197
|
-
$mute: $mute,
|
|
198
|
-
$nearest: $nearest,
|
|
199
|
-
$params: $params,
|
|
200
|
-
$pause: $pause,
|
|
201
|
-
$planner: $planner,
|
|
202
|
-
$rename: $rename,
|
|
203
|
-
$renew: $renew,
|
|
204
|
-
$request: $request,
|
|
205
|
-
$resource: $resource,
|
|
206
|
-
$restore: $restore,
|
|
207
|
-
$result: $result,
|
|
208
|
-
$robot: $robot,
|
|
209
|
-
$search: $search,
|
|
210
|
-
$section: $section,
|
|
211
|
-
$send: $send,
|
|
212
|
-
$server: $server,
|
|
213
|
-
$set: $set,
|
|
214
|
-
$setOwner: $setOwner,
|
|
215
|
-
$settings: $settings,
|
|
216
|
-
$share: $share,
|
|
217
|
-
$socialnetwork: $socialnetwork,
|
|
218
|
-
$sonet_group: $sonet_group,
|
|
219
|
-
$stages: $stages,
|
|
220
|
-
$start: $start,
|
|
221
|
-
$status: $status,
|
|
222
|
-
$storage: $storage,
|
|
223
|
-
$task: $task,
|
|
224
|
-
$tasks: $tasks,
|
|
225
|
-
$template: $template,
|
|
226
|
-
$terminate: $terminate,
|
|
227
|
-
$time: $time,
|
|
228
|
-
$type: $type,
|
|
229
|
-
$update: $update,
|
|
230
|
-
$updateAvatar: $updateAvatar,
|
|
231
|
-
$updateColor: $updateColor,
|
|
232
|
-
$updateTitle: $updateTitle,
|
|
233
|
-
$uploadfile: $uploadfile,
|
|
234
|
-
$url: $url,
|
|
235
|
-
$user: $user,
|
|
236
|
-
$workflow: $workflow,
|
|
237
|
-
$workgroup: $workgroup
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
class CookiesServices {
|
|
241
|
-
static get(name) {
|
|
242
|
-
const results = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
|
|
243
|
-
if (results)
|
|
244
|
-
return results[2];
|
|
245
|
-
else
|
|
246
|
-
return '';
|
|
48
|
+
class NavvySupport {
|
|
49
|
+
constructor(requestClass, mapClass) {
|
|
50
|
+
this.requestClass = requestClass;
|
|
51
|
+
this.mapClass = mapClass;
|
|
52
|
+
this.pageSize = 50; // больше всё равно не дас
|
|
247
53
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
string += '; SameSite=None; Secure';
|
|
254
|
-
document.cookie = string;
|
|
54
|
+
mapAndError(request) {
|
|
55
|
+
return request.pipe(map(v => BXRestMapResult(v)), catchError(err => {
|
|
56
|
+
// this.snackBar.error(errorText)
|
|
57
|
+
return throwError(() => err);
|
|
58
|
+
}));
|
|
255
59
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
class NavvySimple extends NavvySupport {
|
|
63
|
+
constructor(requestClass, mapClass, func, map = undefined
|
|
64
|
+
// private snackBar: SnackBarService,
|
|
65
|
+
) {
|
|
66
|
+
super(requestClass, mapClass);
|
|
67
|
+
this.func = func;
|
|
68
|
+
this.map = map;
|
|
263
69
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
if (results) {
|
|
267
|
-
return JSON.parse(results[2]);
|
|
268
|
-
}
|
|
269
|
-
return false;
|
|
70
|
+
resultVanilla() {
|
|
71
|
+
return this.func;
|
|
270
72
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
73
|
+
// TODO: del after 09.04.2024
|
|
74
|
+
// mapForVanilla() {
|
|
75
|
+
// return this.func.pipe(
|
|
76
|
+
// map(v => (v && instanceOfiBXRestAnswerSuccess(v) && this.map)
|
|
77
|
+
// ? Object.assign(v,{result: this.map.call(this.mapClass, v.result)}) : v)
|
|
78
|
+
// ) as ReturnTypeNavvy<Observable<iBXRestAnswer<T | undefined>>, Observable<iBXRestAnswer<R | undefined>>>
|
|
79
|
+
// }
|
|
80
|
+
result() {
|
|
81
|
+
return this.mapAndError(this.func).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
class NavvyPagNavBase extends NavvySupport {
|
|
86
|
+
constructor(requestClass, mapClass, func, param, map = undefined) {
|
|
87
|
+
super(requestClass, mapClass);
|
|
88
|
+
this.func = func;
|
|
89
|
+
this.param = param;
|
|
90
|
+
this.map = map;
|
|
91
|
+
// load: number = 0
|
|
92
|
+
this.load$ = new ReplaySubject(1);
|
|
93
|
+
this.load$.next(0.001);
|
|
94
|
+
}
|
|
95
|
+
resultVanilla() {
|
|
96
|
+
return this.func.call(this.requestClass, this.param);
|
|
97
|
+
}
|
|
98
|
+
mapForVanilla() {
|
|
99
|
+
return this.mapForVanillaEnd(this.func, this.param);
|
|
100
|
+
}
|
|
101
|
+
mapForVanillaEnd(func, param) {
|
|
102
|
+
return func.call(this.requestClass, param).pipe(map(v => (v && instanceOfiBXRestAnswerSuccess(v) && this.map) ? Object.assign(v, { result: this.map.call(this.mapClass, v.result) }) : v));
|
|
103
|
+
}
|
|
104
|
+
result() {
|
|
105
|
+
return this.resultEnd(this.func, this.param);
|
|
106
|
+
}
|
|
107
|
+
resultEnd(func, param) {
|
|
108
|
+
return this.mapAndError(func.call(this.requestClass, param)).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Класс-прослойка-обработчик для методов работающих на альтернативной постраничной навигации тика как методы по
|
|
114
|
+
* затраченному времени на задачи https://dev.1c-bitrix.ru/rest_help/tasks/task/elapseditem/index.php
|
|
115
|
+
*
|
|
116
|
+
* не завершенный класс, работаем от частного к общему
|
|
117
|
+
*/
|
|
118
|
+
class NavvyAlterPagNav extends NavvyPagNavBase {
|
|
119
|
+
resultAll() {
|
|
120
|
+
let save = [];
|
|
121
|
+
return this.resultAllEnd()
|
|
122
|
+
.pipe(map(v => {
|
|
123
|
+
if (v) {
|
|
124
|
+
save.push(...v);
|
|
125
|
+
}
|
|
126
|
+
return save;
|
|
127
|
+
}), last(), shareReplay(1));
|
|
128
|
+
}
|
|
129
|
+
resultAllEnd() {
|
|
130
|
+
// return this.mapForVanillaEnd(this.func, this.param)
|
|
131
|
+
return this.resultVanilla().pipe(mergeMap(items => {
|
|
132
|
+
if (items && instanceOfiBXRestAnswerSuccess(items)) {
|
|
133
|
+
if (items.total && items.next) {
|
|
134
|
+
let requests = [];
|
|
135
|
+
for (let i = items.next; i < items.total; i = i + this.pageSize) {
|
|
136
|
+
let paramClone = clone(this.param);
|
|
137
|
+
paramClone.PARAMS = {
|
|
138
|
+
NAV_PARAMS: {
|
|
139
|
+
nPageSize: this.pageSize,
|
|
140
|
+
iNumPage: i / this.pageSize + 1
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
requests.push(paramClone);
|
|
144
|
+
}
|
|
145
|
+
return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param).pipe(tap(_ => {
|
|
146
|
+
if (param && param.PARAMS && items.total) {
|
|
147
|
+
this.load$.next((param.PARAMS.NAV_PARAMS.iNumPage * this.pageSize + this.pageSize) / items.total);
|
|
148
|
+
}
|
|
149
|
+
})))));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return this.mapResultForGetAll(items);
|
|
153
|
+
}), catchError(err => {
|
|
154
|
+
// this.snackBar.error("Проблемы с поточным получение затреканого времени")
|
|
155
|
+
console.error(err);
|
|
156
|
+
return throwError(() => err);
|
|
157
|
+
}));
|
|
158
|
+
}
|
|
159
|
+
mapResultForGetAll(items) {
|
|
160
|
+
return (instanceOfiBXRestAnswerSuccess(items)) ? from([items.result]).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v)) : from([]);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// TODO: реализовать загрузку всего в очереди
|
|
165
|
+
class NavvyPagNav extends NavvyPagNavBase {
|
|
166
|
+
resultAll() {
|
|
167
|
+
let save = [];
|
|
168
|
+
return this.resultAllEnd()
|
|
169
|
+
.pipe(map(v => {
|
|
170
|
+
if (v) {
|
|
171
|
+
save.push(...v);
|
|
172
|
+
}
|
|
173
|
+
return save;
|
|
174
|
+
}), last(), shareReplay(1));
|
|
175
|
+
}
|
|
176
|
+
resultAllEnd() {
|
|
177
|
+
// return this.mapForVanillaEnd(this.func, this.param)
|
|
178
|
+
return this.resultVanilla().pipe(mergeMap(items => {
|
|
179
|
+
if (items && instanceOfiBXRestAnswerSuccess(items)) {
|
|
180
|
+
if (items.total && items.next) {
|
|
181
|
+
let requests = [];
|
|
182
|
+
for (let i = items.next; i < items.total; i = i + this.pageSize) {
|
|
183
|
+
let paramClone = clone(this.param);
|
|
184
|
+
paramClone.start = i;
|
|
185
|
+
requests.push(paramClone);
|
|
186
|
+
}
|
|
187
|
+
return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param))));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return this.mapResultForGetAll(items);
|
|
191
|
+
}), catchError(err => {
|
|
192
|
+
// this.snackBar.error("Проблемы с поточным получение затреканого времени")
|
|
193
|
+
console.error(err);
|
|
194
|
+
return throwError(() => err);
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
mapResultForGetAll(items) {
|
|
198
|
+
return (instanceOfiBXRestAnswerSuccess(items)) ? from([items.result]).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v)) : from([]);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
class NavvyPagNavWithUselessKey extends NavvyPagNavBase {
|
|
203
|
+
resultAll() {
|
|
204
|
+
let save = [];
|
|
205
|
+
return this.resultAllEnd()
|
|
206
|
+
.pipe(map(v => {
|
|
207
|
+
if (v) {
|
|
208
|
+
save.push(...v);
|
|
209
|
+
}
|
|
210
|
+
return save;
|
|
211
|
+
}), last());
|
|
212
|
+
}
|
|
213
|
+
resultAllEnd() {
|
|
214
|
+
return this.mapForVanillaEnd(this.func, this.param).pipe(mergeMap(items => {
|
|
215
|
+
if (items && instanceOfiBXRestAnswerSuccess(items)) {
|
|
216
|
+
if (items.total && items.next) {
|
|
217
|
+
let requests = [];
|
|
218
|
+
for (let i = 0; i < items.total; i = i + this.pageSize) {
|
|
219
|
+
let paramClone = clone(this.param);
|
|
220
|
+
paramClone.start = i;
|
|
221
|
+
requests.push(paramClone);
|
|
222
|
+
}
|
|
223
|
+
/*
|
|
224
|
+
return from(requests.map(param => this.resultEnd(this.func, param))).pipe(
|
|
225
|
+
// toArray(),
|
|
226
|
+
mergeMap(v => {
|
|
227
|
+
return v
|
|
228
|
+
})
|
|
229
|
+
)
|
|
230
|
+
*/
|
|
231
|
+
return from(requests).pipe(concatMap(param => this.resultEnd(this.func, param)));
|
|
232
|
+
/*
|
|
233
|
+
return this.getAllTaskElapsedItem(func, param).pipe(
|
|
234
|
+
map(vEnd => {
|
|
235
|
+
if (vEnd && vEnd.result && items.result) {
|
|
236
|
+
return merge(clone(vEnd), {result: [...items.result, ...vEnd.result]})
|
|
237
|
+
}
|
|
238
|
+
return items
|
|
239
|
+
})
|
|
240
|
+
)
|
|
241
|
+
*/
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return from([1]).pipe(concatMap(_ => this.resultEnd(this.func, this.param)));
|
|
245
|
+
// return from([BXRestMapResult(items)])
|
|
246
|
+
// as ReturnType<Observable<T | undefined>, Observable<R | undefined>>
|
|
247
|
+
}), catchError(err => {
|
|
248
|
+
// this.snackBar.error("Проблемы с поточным получение затреканого времени")
|
|
249
|
+
console.error(err);
|
|
250
|
+
return throwError(() => err);
|
|
251
|
+
}));
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// TODO: реализовать загрузку всего в очереди
|
|
256
|
+
class NavvyPagNavTasks extends NavvyPagNavBase {
|
|
257
|
+
resultAll() {
|
|
258
|
+
let save = [];
|
|
259
|
+
return this.resultAllEnd()
|
|
260
|
+
.pipe(map(v => {
|
|
261
|
+
if (v) {
|
|
262
|
+
save.push(...v);
|
|
263
|
+
}
|
|
264
|
+
return save;
|
|
265
|
+
}), last(), shareReplay(1));
|
|
266
|
+
}
|
|
267
|
+
resultAllEnd() {
|
|
268
|
+
// return this.mapForVanillaEnd(this.func, this.param)
|
|
269
|
+
return this.resultVanilla().pipe(mergeMap(items => {
|
|
270
|
+
if (items && instanceOfiBXRestAnswerSuccess(items)) {
|
|
271
|
+
if (items.total && items.next) {
|
|
272
|
+
let requests = [];
|
|
273
|
+
for (let i = items.next; i < items.total; i = i + this.pageSize) {
|
|
274
|
+
let paramClone = clone(this.param);
|
|
275
|
+
paramClone.start = i;
|
|
276
|
+
requests.push(paramClone);
|
|
277
|
+
}
|
|
278
|
+
return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param))));
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return this.mapResultForGetAll(items);
|
|
282
|
+
}), catchError(err => {
|
|
283
|
+
// this.snackBar.error("Проблемы с поточным получение затреканого времени")
|
|
284
|
+
console.error(err);
|
|
285
|
+
return throwError(() => err);
|
|
286
|
+
}));
|
|
287
|
+
}
|
|
288
|
+
mapResultForGetAll(items) {
|
|
289
|
+
return (instanceOfiBXRestAnswerSuccess(items)) ? from([items.result]).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v)) : from([]);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
class Navvy {
|
|
294
|
+
constructor(requestClass, mapClass) {
|
|
295
|
+
this.requestClass = requestClass;
|
|
296
|
+
this.mapClass = mapClass;
|
|
297
|
+
}
|
|
298
|
+
simple(func, map = undefined) {
|
|
299
|
+
return new NavvySimple(this.requestClass, this.mapClass, func.call(this.requestClass), map);
|
|
300
|
+
}
|
|
301
|
+
simpleWithArg(func, arg, map = undefined) {
|
|
302
|
+
return new NavvySimple(this.requestClass, this.mapClass, func.call(this.requestClass, arg), map);
|
|
303
|
+
}
|
|
304
|
+
PagNav(func, arg, map = undefined) {
|
|
305
|
+
return new NavvyPagNav(this.requestClass, this.mapClass, func, arg, map);
|
|
306
|
+
}
|
|
307
|
+
PagNavTasks(func, arg, map = undefined) {
|
|
308
|
+
return new NavvyPagNavTasks(this.requestClass, this.mapClass, func, arg, map);
|
|
309
|
+
}
|
|
310
|
+
PagNavWithUselessKey(func, arg, map = undefined) {
|
|
311
|
+
return new NavvyPagNavWithUselessKey(this.requestClass, this.mapClass, func, arg, map);
|
|
312
|
+
}
|
|
313
|
+
alterPagNav(func, arg, map = undefined) {
|
|
314
|
+
return new NavvyAlterPagNav(this.requestClass, this.mapClass, func, arg, map);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const $get = 'get';
|
|
319
|
+
const $add = 'add';
|
|
320
|
+
const $set = 'set';
|
|
321
|
+
const $event = 'event';
|
|
322
|
+
const $update = 'update';
|
|
323
|
+
const $user = 'user';
|
|
324
|
+
const $task = 'task';
|
|
325
|
+
const $calendar = 'calendar';
|
|
326
|
+
const $meeting = 'meeting';
|
|
327
|
+
const $list = 'list';
|
|
328
|
+
const $search = 'search';
|
|
329
|
+
const $accessibility = 'accessibility';
|
|
330
|
+
const $delete = 'delete';
|
|
331
|
+
const $nearest = 'nearest';
|
|
332
|
+
const $params = 'params';
|
|
333
|
+
const $status = 'status';
|
|
334
|
+
const $resource = 'resource';
|
|
335
|
+
const $booking = 'booking';
|
|
336
|
+
const $section = 'section';
|
|
337
|
+
const $settings = 'settings';
|
|
338
|
+
const $tasks = 'tasks';
|
|
339
|
+
const $elapseditem = 'elapseditem';
|
|
340
|
+
const $getlist = 'getlist';
|
|
341
|
+
const $approve = 'approve';
|
|
342
|
+
const $complete = 'complete';
|
|
343
|
+
const $counters = 'counters';
|
|
344
|
+
const $defer = 'defer';
|
|
345
|
+
const $delegate = 'delegate';
|
|
346
|
+
const $disapprove = 'disapprove';
|
|
347
|
+
const $favorite = 'favorite';
|
|
348
|
+
const $files = 'files';
|
|
349
|
+
const $file = 'file';
|
|
350
|
+
const $attach = 'attach';
|
|
351
|
+
const $field = 'field';
|
|
352
|
+
const $getFields = 'get' + $field + 's';
|
|
353
|
+
const $getaccess = 'getaccess';
|
|
354
|
+
const $history = 'history';
|
|
355
|
+
const $pause = 'pause';
|
|
356
|
+
const $renew = 'renew';
|
|
357
|
+
const $start = 'start';
|
|
358
|
+
const $result = 'result';
|
|
359
|
+
const $planner = 'planner';
|
|
360
|
+
const $disk = 'disk';
|
|
361
|
+
const $rename = 'rename';
|
|
362
|
+
const $markdeleted = 'markdeleted';
|
|
363
|
+
const $restore = 'restore';
|
|
364
|
+
const $folder = 'folder';
|
|
365
|
+
const $getchildren = 'getchildren';
|
|
366
|
+
const $copyto = 'copyto';
|
|
367
|
+
const $moveto = 'moveto';
|
|
368
|
+
const $uploadfile = 'uploadfile';
|
|
369
|
+
const $storage = 'storage';
|
|
370
|
+
const $getTypes = 'getTypes';
|
|
371
|
+
const $stages = 'stages';
|
|
372
|
+
const $getmanifest = 'getmanifest';
|
|
373
|
+
const $isactionallowed = 'isactionallowed';
|
|
374
|
+
const $commentitem = 'commentitem';
|
|
375
|
+
const $department = 'department';
|
|
376
|
+
const $sonet_group = 'sonet_group';
|
|
377
|
+
const $create = 'create';
|
|
378
|
+
const $feature = 'feature';
|
|
379
|
+
const $access = 'access';
|
|
380
|
+
const $request = 'request';
|
|
381
|
+
const $socialnetwork = 'socialnetwork';
|
|
382
|
+
const $api = 'api';
|
|
383
|
+
const $workgroup = 'workgroup';
|
|
384
|
+
const $log = 'log';
|
|
385
|
+
const $blogpost = 'blogpost';
|
|
386
|
+
const $lists = 'lists';
|
|
387
|
+
const $iblock = 'iblock';
|
|
388
|
+
const $type = 'type';
|
|
389
|
+
const $id = 'id';
|
|
390
|
+
const $element = 'element';
|
|
391
|
+
const $url = 'url';
|
|
392
|
+
const $bizproc = 'bizproc';
|
|
393
|
+
const $workflow = 'workflow';
|
|
394
|
+
const $instances = 'instances';
|
|
395
|
+
const $terminate = '$terminate';
|
|
396
|
+
const $kill = 'kill';
|
|
397
|
+
const $template = 'template';
|
|
398
|
+
const $activity = 'activity';
|
|
399
|
+
const $robot = 'robot';
|
|
400
|
+
const $send = 'send';
|
|
401
|
+
const $share = 'share';
|
|
402
|
+
const $blogcomment = 'blogcomment';
|
|
403
|
+
const $server = 'server';
|
|
404
|
+
const $time = 'time';
|
|
405
|
+
const $chat = 'chat';
|
|
406
|
+
const $message = 'message';
|
|
407
|
+
const $im = 'im';
|
|
408
|
+
const $updateTitle = 'updateTitle';
|
|
409
|
+
const $updateColor = 'updateColor';
|
|
410
|
+
const $updateAvatar = 'updateAvatar';
|
|
411
|
+
const $setOwner = 'setOwner';
|
|
412
|
+
const $mute = 'mute';
|
|
413
|
+
|
|
414
|
+
var partNameMethods$1 = /*#__PURE__*/Object.freeze({
|
|
415
|
+
__proto__: null,
|
|
416
|
+
$access: $access,
|
|
417
|
+
$accessibility: $accessibility,
|
|
418
|
+
$activity: $activity,
|
|
419
|
+
$add: $add,
|
|
420
|
+
$api: $api,
|
|
421
|
+
$approve: $approve,
|
|
422
|
+
$attach: $attach,
|
|
423
|
+
$bizproc: $bizproc,
|
|
424
|
+
$blogcomment: $blogcomment,
|
|
425
|
+
$blogpost: $blogpost,
|
|
426
|
+
$booking: $booking,
|
|
427
|
+
$calendar: $calendar,
|
|
428
|
+
$chat: $chat,
|
|
429
|
+
$commentitem: $commentitem,
|
|
430
|
+
$complete: $complete,
|
|
431
|
+
$copyto: $copyto,
|
|
432
|
+
$counters: $counters,
|
|
433
|
+
$create: $create,
|
|
434
|
+
$defer: $defer,
|
|
435
|
+
$delegate: $delegate,
|
|
436
|
+
$delete: $delete,
|
|
437
|
+
$department: $department,
|
|
438
|
+
$disapprove: $disapprove,
|
|
439
|
+
$disk: $disk,
|
|
440
|
+
$elapseditem: $elapseditem,
|
|
441
|
+
$element: $element,
|
|
442
|
+
$event: $event,
|
|
443
|
+
$favorite: $favorite,
|
|
444
|
+
$feature: $feature,
|
|
445
|
+
$field: $field,
|
|
446
|
+
$file: $file,
|
|
447
|
+
$files: $files,
|
|
448
|
+
$folder: $folder,
|
|
449
|
+
$get: $get,
|
|
450
|
+
$getFields: $getFields,
|
|
451
|
+
$getTypes: $getTypes,
|
|
452
|
+
$getaccess: $getaccess,
|
|
453
|
+
$getchildren: $getchildren,
|
|
454
|
+
$getlist: $getlist,
|
|
455
|
+
$getmanifest: $getmanifest,
|
|
456
|
+
$history: $history,
|
|
457
|
+
$iblock: $iblock,
|
|
458
|
+
$id: $id,
|
|
459
|
+
$im: $im,
|
|
460
|
+
$instances: $instances,
|
|
461
|
+
$isactionallowed: $isactionallowed,
|
|
462
|
+
$kill: $kill,
|
|
463
|
+
$list: $list,
|
|
464
|
+
$lists: $lists,
|
|
465
|
+
$log: $log,
|
|
466
|
+
$markdeleted: $markdeleted,
|
|
467
|
+
$meeting: $meeting,
|
|
468
|
+
$message: $message,
|
|
469
|
+
$moveto: $moveto,
|
|
470
|
+
$mute: $mute,
|
|
471
|
+
$nearest: $nearest,
|
|
472
|
+
$params: $params,
|
|
473
|
+
$pause: $pause,
|
|
474
|
+
$planner: $planner,
|
|
475
|
+
$rename: $rename,
|
|
476
|
+
$renew: $renew,
|
|
477
|
+
$request: $request,
|
|
478
|
+
$resource: $resource,
|
|
479
|
+
$restore: $restore,
|
|
480
|
+
$result: $result,
|
|
481
|
+
$robot: $robot,
|
|
482
|
+
$search: $search,
|
|
483
|
+
$section: $section,
|
|
484
|
+
$send: $send,
|
|
485
|
+
$server: $server,
|
|
486
|
+
$set: $set,
|
|
487
|
+
$setOwner: $setOwner,
|
|
488
|
+
$settings: $settings,
|
|
489
|
+
$share: $share,
|
|
490
|
+
$socialnetwork: $socialnetwork,
|
|
491
|
+
$sonet_group: $sonet_group,
|
|
492
|
+
$stages: $stages,
|
|
493
|
+
$start: $start,
|
|
494
|
+
$status: $status,
|
|
495
|
+
$storage: $storage,
|
|
496
|
+
$task: $task,
|
|
497
|
+
$tasks: $tasks,
|
|
498
|
+
$template: $template,
|
|
499
|
+
$terminate: $terminate,
|
|
500
|
+
$time: $time,
|
|
501
|
+
$type: $type,
|
|
502
|
+
$update: $update,
|
|
503
|
+
$updateAvatar: $updateAvatar,
|
|
504
|
+
$updateColor: $updateColor,
|
|
505
|
+
$updateTitle: $updateTitle,
|
|
506
|
+
$uploadfile: $uploadfile,
|
|
507
|
+
$url: $url,
|
|
508
|
+
$user: $user,
|
|
509
|
+
$workflow: $workflow,
|
|
510
|
+
$workgroup: $workgroup
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
class CookiesServices {
|
|
514
|
+
static get(name) {
|
|
515
|
+
const results = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
|
|
516
|
+
if (results)
|
|
517
|
+
return results[2];
|
|
518
|
+
else
|
|
519
|
+
return '';
|
|
520
|
+
}
|
|
521
|
+
static set(name, value, age = 0) {
|
|
522
|
+
let string = name + '=' + value + ';';
|
|
523
|
+
if (age) {
|
|
524
|
+
string += ' max-age=' + age;
|
|
525
|
+
}
|
|
526
|
+
string += '; SameSite=None; Secure';
|
|
527
|
+
document.cookie = string;
|
|
528
|
+
}
|
|
529
|
+
static setObj(name, value, age = 0) {
|
|
530
|
+
let string = name + '=' + JSON.stringify(value) + ';';
|
|
531
|
+
if (age) {
|
|
532
|
+
string += ' max-age=' + age;
|
|
533
|
+
}
|
|
534
|
+
string += '; SameSite=None; Secure';
|
|
535
|
+
document.cookie = string;
|
|
536
|
+
}
|
|
537
|
+
static getObj(name) {
|
|
538
|
+
const results = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
|
|
539
|
+
if (results) {
|
|
540
|
+
return JSON.parse(results[2]);
|
|
541
|
+
}
|
|
542
|
+
return false;
|
|
543
|
+
}
|
|
544
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CookiesServices, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
545
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CookiesServices, providedIn: 'root' }); }
|
|
546
|
+
}
|
|
547
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CookiesServices, decorators: [{
|
|
548
|
+
type: Injectable,
|
|
549
|
+
args: [{
|
|
550
|
+
providedIn: 'root'
|
|
551
|
+
}]
|
|
552
|
+
}] });
|
|
553
|
+
|
|
281
554
|
const time = {
|
|
282
555
|
oneDayMilliseconds: 1000 * 60 * 60 * 24
|
|
283
556
|
};
|
|
@@ -381,7 +654,6 @@ class BaseServices {
|
|
|
381
654
|
return url;
|
|
382
655
|
}
|
|
383
656
|
getHomeAddress() {
|
|
384
|
-
// return this.prepareBaseAddress(environment.urls.home)
|
|
385
657
|
return this.prepareBaseAddress(this.BX_REST_SETTINGS.urls.home);
|
|
386
658
|
}
|
|
387
659
|
dateDiff(a, b) {
|
|
@@ -966,10 +1238,12 @@ class HttpBXServices extends HttpServices {
|
|
|
966
1238
|
return res;
|
|
967
1239
|
}
|
|
968
1240
|
mapBranchResult(res) {
|
|
969
|
-
return Object.assign([], ...res.map(i => (i
|
|
1241
|
+
return Object.assign([], ...res.map(i => (instanceOfiBXRestAnswerSuccess(i) && instanceOfiBXRestAnswerSuccess(i.result)) ? i.result.result : undefined));
|
|
970
1242
|
}
|
|
971
1243
|
mapBranchResultWithoutKey(res) {
|
|
972
|
-
return flatten(Object.assign([], ...res.map(i => (i
|
|
1244
|
+
return flatten(Object.assign([], ...res.map(i => (instanceOfiBXRestAnswerSuccess(i) && instanceOfiBXRestAnswerSuccess(i.result))
|
|
1245
|
+
? i.result.result
|
|
1246
|
+
: undefined)));
|
|
973
1247
|
}
|
|
974
1248
|
/**
|
|
975
1249
|
* Основной метод для запросов
|
|
@@ -1087,14 +1361,8 @@ class BXRestUser {
|
|
|
1087
1361
|
get(params = {}) {
|
|
1088
1362
|
return this.http.post(this.url.get, params);
|
|
1089
1363
|
}
|
|
1090
|
-
current(
|
|
1091
|
-
|
|
1092
|
-
if (update) {
|
|
1093
|
-
return request;
|
|
1094
|
-
}
|
|
1095
|
-
else {
|
|
1096
|
-
return request.pipe(share());
|
|
1097
|
-
}
|
|
1364
|
+
current() {
|
|
1365
|
+
return this.http.post(this.url.current, {});
|
|
1098
1366
|
}
|
|
1099
1367
|
update(user) {
|
|
1100
1368
|
return this.http.post(this.url.update, user);
|
|
@@ -1197,7 +1465,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
1197
1465
|
}]
|
|
1198
1466
|
}], ctorParameters: function () { return [{ type: BXRestListsElement }, { type: BXRestListsField }, { type: HttpBXServices }]; } });
|
|
1199
1467
|
|
|
1200
|
-
class
|
|
1468
|
+
class BXRestTaskElapsedItem {
|
|
1201
1469
|
constructor(http) {
|
|
1202
1470
|
this.http = http;
|
|
1203
1471
|
this.url = {
|
|
@@ -1245,10 +1513,10 @@ class BXRestTaskElapseditem {
|
|
|
1245
1513
|
isActionAllowed(param) {
|
|
1246
1514
|
return this.http.post(this.url.isactionallowed, param);
|
|
1247
1515
|
}
|
|
1248
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
1249
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
1516
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTaskElapsedItem, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1517
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTaskElapsedItem, providedIn: 'root' }); }
|
|
1250
1518
|
}
|
|
1251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
1519
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTaskElapsedItem, decorators: [{
|
|
1252
1520
|
type: Injectable,
|
|
1253
1521
|
args: [{
|
|
1254
1522
|
providedIn: 'root'
|
|
@@ -1311,12 +1579,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
1311
1579
|
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
1312
1580
|
|
|
1313
1581
|
class BXRestTask {
|
|
1314
|
-
constructor(
|
|
1315
|
-
this.
|
|
1316
|
-
this.
|
|
1582
|
+
constructor(elapsedItem, commentItem, planner) {
|
|
1583
|
+
this.elapsedItem = elapsedItem;
|
|
1584
|
+
this.commentItem = commentItem;
|
|
1317
1585
|
this.planner = planner;
|
|
1318
1586
|
}
|
|
1319
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTask, deps: [{ token:
|
|
1587
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTask, deps: [{ token: BXRestTaskElapsedItem }, { token: BXRestTaskCommentItem }, { token: BXRestTaskPlanner }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1320
1588
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTask, providedIn: 'root' }); }
|
|
1321
1589
|
}
|
|
1322
1590
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTask, decorators: [{
|
|
@@ -1324,7 +1592,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
1324
1592
|
args: [{
|
|
1325
1593
|
providedIn: 'root'
|
|
1326
1594
|
}]
|
|
1327
|
-
}], ctorParameters: function () { return [{ type:
|
|
1595
|
+
}], ctorParameters: function () { return [{ type: BXRestTaskElapsedItem }, { type: BXRestTaskCommentItem }, { type: BXRestTaskPlanner }]; } });
|
|
1328
1596
|
|
|
1329
1597
|
class BXRestTasksTaskResult {
|
|
1330
1598
|
constructor(http) {
|
|
@@ -1508,7 +1776,7 @@ class BXRestTasksTask {
|
|
|
1508
1776
|
getFields() {
|
|
1509
1777
|
return this.http.post(this.url.getFields);
|
|
1510
1778
|
}
|
|
1511
|
-
|
|
1779
|
+
getAccess(param) {
|
|
1512
1780
|
return this.http.post(this.url.getaccess, param);
|
|
1513
1781
|
}
|
|
1514
1782
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestTasksTask, deps: [{ token: BXRestTasksTaskResult }, { token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -1767,7 +2035,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
1767
2035
|
}]
|
|
1768
2036
|
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
1769
2037
|
|
|
1770
|
-
class
|
|
2038
|
+
class BXRestBizProcWorkflow {
|
|
1771
2039
|
constructor(instances, template, http) {
|
|
1772
2040
|
this.instances = instances;
|
|
1773
2041
|
this.template = template;
|
|
@@ -1782,17 +2050,17 @@ class BXRestBizprocWorkflow {
|
|
|
1782
2050
|
start(param) {
|
|
1783
2051
|
return this.http.post(this.url.start, param);
|
|
1784
2052
|
}
|
|
1785
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
1786
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2053
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcWorkflow, deps: [{ token: BXRestBizprocWorkflowInstance }, { token: BXRestBizprocWorkflowTemplate }, { token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2054
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcWorkflow, providedIn: 'root' }); }
|
|
1787
2055
|
}
|
|
1788
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2056
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcWorkflow, decorators: [{
|
|
1789
2057
|
type: Injectable,
|
|
1790
2058
|
args: [{
|
|
1791
2059
|
providedIn: 'root'
|
|
1792
2060
|
}]
|
|
1793
2061
|
}], ctorParameters: function () { return [{ type: BXRestBizprocWorkflowInstance }, { type: BXRestBizprocWorkflowTemplate }, { type: HttpBXServices }]; } });
|
|
1794
2062
|
|
|
1795
|
-
class
|
|
2063
|
+
class BXRestBizProcActivity {
|
|
1796
2064
|
constructor() {
|
|
1797
2065
|
this.url = {
|
|
1798
2066
|
add: [$bizproc, $activity, $add],
|
|
@@ -1802,34 +2070,34 @@ class BXRestBizprocActivity {
|
|
|
1802
2070
|
log: [$bizproc, $activity, $log] // Записывает информацию в лог бизнес-процесса
|
|
1803
2071
|
};
|
|
1804
2072
|
}
|
|
1805
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
1806
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2073
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2074
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcActivity, providedIn: 'root' }); }
|
|
1807
2075
|
}
|
|
1808
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcActivity, decorators: [{
|
|
1809
2077
|
type: Injectable,
|
|
1810
2078
|
args: [{
|
|
1811
2079
|
providedIn: 'root'
|
|
1812
2080
|
}]
|
|
1813
2081
|
}] });
|
|
1814
2082
|
|
|
1815
|
-
class
|
|
2083
|
+
class BXRestBizProcTask {
|
|
1816
2084
|
constructor() {
|
|
1817
2085
|
this.url = {
|
|
1818
2086
|
complete: [$bizproc, $task, $complete],
|
|
1819
2087
|
list: [$bizproc, $task, $list], // Возвращает список заданий бизнес-процессов
|
|
1820
2088
|
};
|
|
1821
2089
|
}
|
|
1822
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
1823
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2090
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcTask, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2091
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcTask, providedIn: 'root' }); }
|
|
1824
2092
|
}
|
|
1825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcTask, decorators: [{
|
|
1826
2094
|
type: Injectable,
|
|
1827
2095
|
args: [{
|
|
1828
2096
|
providedIn: 'root'
|
|
1829
2097
|
}]
|
|
1830
2098
|
}] });
|
|
1831
2099
|
|
|
1832
|
-
class
|
|
2100
|
+
class BXRestBizProcRobot {
|
|
1833
2101
|
constructor() {
|
|
1834
2102
|
this.url = {
|
|
1835
2103
|
add: [$bizproc, $robot, $add],
|
|
@@ -1838,33 +2106,33 @@ class BXRestBizprocRobot {
|
|
|
1838
2106
|
update: [$bizproc, $robot, $update] // Обновляет поля робота
|
|
1839
2107
|
};
|
|
1840
2108
|
}
|
|
1841
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
1842
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcRobot, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2110
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcRobot, providedIn: 'root' }); }
|
|
1843
2111
|
}
|
|
1844
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcRobot, decorators: [{
|
|
1845
2113
|
type: Injectable,
|
|
1846
2114
|
args: [{
|
|
1847
2115
|
providedIn: 'root'
|
|
1848
2116
|
}]
|
|
1849
2117
|
}] });
|
|
1850
2118
|
|
|
1851
|
-
class
|
|
2119
|
+
class BXRestBizProcEvent {
|
|
1852
2120
|
constructor() {
|
|
1853
2121
|
this.url = {
|
|
1854
2122
|
send: [$bizproc, $event, $send], // Возвращает действию выходные параметры, заданные в описании действия
|
|
1855
2123
|
};
|
|
1856
2124
|
}
|
|
1857
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
1858
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2125
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcEvent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2126
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcEvent, providedIn: 'root' }); }
|
|
1859
2127
|
}
|
|
1860
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProcEvent, decorators: [{
|
|
1861
2129
|
type: Injectable,
|
|
1862
2130
|
args: [{
|
|
1863
2131
|
providedIn: 'root'
|
|
1864
2132
|
}]
|
|
1865
2133
|
}] });
|
|
1866
2134
|
|
|
1867
|
-
class
|
|
2135
|
+
class BXRestBizProc {
|
|
1868
2136
|
constructor(workflow, activity, task, robot, event) {
|
|
1869
2137
|
this.workflow = workflow;
|
|
1870
2138
|
this.activity = activity;
|
|
@@ -1872,15 +2140,15 @@ class BXRestBizproc {
|
|
|
1872
2140
|
this.robot = robot;
|
|
1873
2141
|
this.event = event;
|
|
1874
2142
|
}
|
|
1875
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
1876
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2143
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProc, deps: [{ token: BXRestBizProcWorkflow }, { token: BXRestBizProcActivity }, { token: BXRestBizProcTask }, { token: BXRestBizProcRobot }, { token: BXRestBizProcEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2144
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProc, providedIn: 'root' }); }
|
|
1877
2145
|
}
|
|
1878
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestBizProc, decorators: [{
|
|
1879
2147
|
type: Injectable,
|
|
1880
2148
|
args: [{
|
|
1881
2149
|
providedIn: 'root'
|
|
1882
2150
|
}]
|
|
1883
|
-
}], ctorParameters: function () { return [{ type:
|
|
2151
|
+
}], ctorParameters: function () { return [{ type: BXRestBizProcWorkflow }, { type: BXRestBizProcActivity }, { type: BXRestBizProcTask }, { type: BXRestBizProcRobot }, { type: BXRestBizProcEvent }]; } });
|
|
1884
2152
|
|
|
1885
2153
|
class BXRestLogBlogPost {
|
|
1886
2154
|
constructor(http) {
|
|
@@ -1915,540 +2183,271 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
1915
2183
|
class BXRestLogBlogComment {
|
|
1916
2184
|
constructor() {
|
|
1917
2185
|
this.url = {
|
|
1918
|
-
add: [$log, $blogcomment, $add], // Добавляет комментарий к сообщению Живой ленты
|
|
1919
|
-
};
|
|
1920
|
-
}
|
|
1921
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLogBlogComment, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1922
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLogBlogComment, providedIn: 'root' }); }
|
|
1923
|
-
}
|
|
1924
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLogBlogComment, decorators: [{
|
|
1925
|
-
type: Injectable,
|
|
1926
|
-
args: [{
|
|
1927
|
-
providedIn: 'root'
|
|
1928
|
-
}]
|
|
1929
|
-
}] });
|
|
1930
|
-
|
|
1931
|
-
class BXRestLog {
|
|
1932
|
-
constructor(blogPost, blogComment) {
|
|
1933
|
-
this.blogPost = blogPost;
|
|
1934
|
-
this.blogComment = blogComment;
|
|
1935
|
-
}
|
|
1936
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLog, deps: [{ token: BXRestLogBlogPost }, { token: BXRestLogBlogComment }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1937
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLog, providedIn: 'root' }); }
|
|
1938
|
-
}
|
|
1939
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLog, decorators: [{
|
|
1940
|
-
type: Injectable,
|
|
1941
|
-
args: [{
|
|
1942
|
-
providedIn: 'root'
|
|
1943
|
-
}]
|
|
1944
|
-
}], ctorParameters: function () { return [{ type: BXRestLogBlogPost }, { type: BXRestLogBlogComment }]; } });
|
|
1945
|
-
|
|
1946
|
-
class BXRestCalendarEvent {
|
|
1947
|
-
constructor(http) {
|
|
1948
|
-
this.http = http;
|
|
1949
|
-
this.url = {
|
|
1950
|
-
add: [$calendar, $event, $add],
|
|
1951
|
-
delete: [$calendar, $event, $delete],
|
|
1952
|
-
get: [$calendar, $event, $get],
|
|
1953
|
-
getNearest: [$calendar, $event, $get, $nearest],
|
|
1954
|
-
update: [$calendar, $event, $get, $update], // Редактирует существующее событие
|
|
1955
|
-
};
|
|
1956
|
-
}
|
|
1957
|
-
get(param) {
|
|
1958
|
-
return this.http.post(this.url.get, param);
|
|
1959
|
-
}
|
|
1960
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendarEvent, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1961
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendarEvent, providedIn: 'root' }); }
|
|
1962
|
-
}
|
|
1963
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendarEvent, decorators: [{
|
|
1964
|
-
type: Injectable,
|
|
1965
|
-
args: [{
|
|
1966
|
-
providedIn: 'root'
|
|
1967
|
-
}]
|
|
1968
|
-
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
1969
|
-
|
|
1970
|
-
class BXRestCalendar {
|
|
1971
|
-
// TODO: эту дичь расформировать потом по классам
|
|
1972
|
-
/*
|
|
1973
|
-
protected url = {
|
|
1974
|
-
accessibility: {get: getNameMethod([$calendar, $accessibility, $get])}, // Возвращает занятость пользователей из списка.
|
|
1975
|
-
meeting: {
|
|
1976
|
-
params: {
|
|
1977
|
-
set: getNameMethod([$calendar, $meeting, $params, $set]), // Устанавливает параметры события для текущего пользователя
|
|
1978
|
-
},
|
|
1979
|
-
status: {
|
|
1980
|
-
get: getNameMethod([$calendar, $meeting, $status, $get]), // Возвращает статус участия текущего пользователя в событии
|
|
1981
|
-
set: getNameMethod([$calendar, $meeting, $status, $set]), // Устанавливает статус участия в событии для текущего пользователя
|
|
1982
|
-
},
|
|
1983
|
-
},
|
|
1984
|
-
resource: {
|
|
1985
|
-
list: getNameMethod([$calendar, $resource, $list]), // Возвращает список (массив) всех ресурсов
|
|
1986
|
-
add: getNameMethod([$calendar, $resource, $add]), // Добавляет новый ресурс
|
|
1987
|
-
update: getNameMethod([$calendar, $resource, $update]), // Изменяет ресурс
|
|
1988
|
-
delete: getNameMethod([$calendar, $resource, $delete]), // Удаляет ресурс
|
|
1989
|
-
booking: {
|
|
1990
|
-
list: getNameMethod([$calendar, $resource, $booking, $list]), // Предоставляет возможность выбрать бронирования ресурсов
|
|
1991
|
-
}
|
|
1992
|
-
},
|
|
1993
|
-
section: {
|
|
1994
|
-
add: getNameMethod([$calendar, $section, $add]), // Добавляет новый календарь
|
|
1995
|
-
delete: getNameMethod([$calendar, $section, $delete]), // Удаляет календарь
|
|
1996
|
-
get: getNameMethod([$calendar, $section, $get]), // Возвращает список календарей
|
|
1997
|
-
update: getNameMethod([$calendar, $section, $update]) //Обновляет календарь
|
|
1998
|
-
},
|
|
1999
|
-
settings: {
|
|
2000
|
-
get: getNameMethod([$calendar, $settings, $get]), // Возвращает основные настройки календаря
|
|
2001
|
-
set: getNameMethod([$calendar, $user, $settings, $set]), // Сохраняет пользовательские настройки календаря
|
|
2002
|
-
},
|
|
2003
|
-
getbyid: getNameMethod([$calendar, $event, 'getbyid']), // Возвращает событие календаря по идентификатору
|
|
2004
|
-
}
|
|
2005
|
-
*/
|
|
2006
|
-
constructor(event) {
|
|
2007
|
-
this.event = event;
|
|
2008
|
-
}
|
|
2009
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendar, deps: [{ token: BXRestCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2010
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendar, providedIn: 'root' }); }
|
|
2011
|
-
}
|
|
2012
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendar, decorators: [{
|
|
2013
|
-
type: Injectable,
|
|
2014
|
-
args: [{
|
|
2015
|
-
providedIn: 'root'
|
|
2016
|
-
}]
|
|
2017
|
-
}], ctorParameters: function () { return [{ type: BXRestCalendarEvent }]; } });
|
|
2018
|
-
|
|
2019
|
-
class BXRestSonetGroup {
|
|
2020
|
-
constructor(http) {
|
|
2021
|
-
this.http = http;
|
|
2022
|
-
this.url = {
|
|
2023
|
-
create: [$sonet_group, $create],
|
|
2024
|
-
delete: [$sonet_group, $delete],
|
|
2025
|
-
// feature: {
|
|
2026
|
-
// access: [$sonet_group, $feature, $access] // Проверяет, имеет ли текущий пользователь право на совершение операции в группе соцсети, осуществляя вызов функции CSocNetFeaturesPerms::CurrentUserCanPerformOperation()
|
|
2027
|
-
// },
|
|
2028
|
-
get: [$sonet_group, $get],
|
|
2029
|
-
setowner: [$sonet_group, 'setowner'],
|
|
2030
|
-
update: [$sonet_group, $update], // Изменяет параметры группы соцсети, используя метод API CSocNetGroup::Update()
|
|
2031
|
-
// user: {
|
|
2032
|
-
// add: [$sonet_group, $user, $add], // sonet_group.user.add Добавляет пользователей в качестве участников рабочей группы (без приглашения и подтверждения)
|
|
2033
|
-
// delete: [$sonet_group, $user, $delete], // Удаляет пользователей из рабочей группы
|
|
2034
|
-
// get: [$sonet_group, $user, $get], // Возвращает массив участников группы соцсети, осуществляя вызов CSocNetUserToGroup::GetList(), при этом проверяются права на доступ текущего пользователя к группе
|
|
2035
|
-
// groups: [$sonet_group, $user, 'groups'], // Возвращает массив групп соцсети текущего пользователя, осуществляя вызов CSocNetUserToGroup::GetList()
|
|
2036
|
-
// invite: [$sonet_group, $user, 'invite'], // Выполняет приглашение пользователей в группу соцсети от лица текущего пользователя, при этом проверяются права на доступ текущего пользователя к группе
|
|
2037
|
-
// request: [$sonet_group, $user, $request], // Отправляет запрос текущего пользователя на вступление в группу соцсети, при этом проверяются права на доступ текущего пользователя к группе.
|
|
2038
|
-
// update: [$sonet_group, $user, $update], // Изменяет роль пользователей в рабочей группе События при работе с группами СоцСети Список событий при добавлении, изменении и удалении группы.
|
|
2039
|
-
// },
|
|
2040
|
-
// workgroup: {
|
|
2041
|
-
// list: [$socialnetwork, $api, $workgroup, $list], // Метод возвращает список групп,
|
|
2042
|
-
// get: [$socialnetwork, $api, $workgroup, $get] // Метод возвращает данные по рабочей группе
|
|
2043
|
-
// }
|
|
2044
|
-
};
|
|
2045
|
-
}
|
|
2046
|
-
// // TODO: filter и select позже нормально описать
|
|
2047
|
-
// getList(filter: any = {}, select: iWorkgroupFields[] = ['ID', 'NAME']){
|
|
2048
|
-
// return this.httpPost<iHttpAnswerBX<{workgroups: iListWorkgroup[]}>>(
|
|
2049
|
-
// this.url.get,
|
|
2050
|
-
// {
|
|
2051
|
-
// order: select,
|
|
2052
|
-
// filter: filter
|
|
2053
|
-
// }
|
|
2054
|
-
// )
|
|
2055
|
-
// }
|
|
2056
|
-
get(param = {}) {
|
|
2057
|
-
return this.http.post(this.url.get, param);
|
|
2058
|
-
}
|
|
2059
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2060
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, providedIn: 'root' }); }
|
|
2061
|
-
}
|
|
2062
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, decorators: [{
|
|
2063
|
-
type: Injectable,
|
|
2064
|
-
args: [{
|
|
2065
|
-
providedIn: 'root'
|
|
2066
|
-
}]
|
|
2067
|
-
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2068
|
-
|
|
2069
|
-
class BXRestServer {
|
|
2070
|
-
constructor(http) {
|
|
2071
|
-
this.http = http;
|
|
2072
|
-
this.url = {
|
|
2073
|
-
time: [$server, $time]
|
|
2074
|
-
};
|
|
2075
|
-
}
|
|
2076
|
-
time() {
|
|
2077
|
-
return this.http.post(this.url.time);
|
|
2078
|
-
}
|
|
2079
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2080
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, providedIn: 'root' }); }
|
|
2081
|
-
}
|
|
2082
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, decorators: [{
|
|
2083
|
-
type: Injectable,
|
|
2084
|
-
args: [{
|
|
2085
|
-
providedIn: 'root'
|
|
2086
|
-
}]
|
|
2087
|
-
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2088
|
-
|
|
2089
|
-
class BXRestDepartment {
|
|
2090
|
-
constructor(http) {
|
|
2091
|
-
this.http = http;
|
|
2092
|
-
this.url = {
|
|
2093
|
-
get: [$department, $get],
|
|
2094
|
-
del: [$department, $delete],
|
|
2095
|
-
add: [$department, $add],
|
|
2096
|
-
update: [$department, $update]
|
|
2097
|
-
};
|
|
2098
|
-
}
|
|
2099
|
-
get(param = {}) {
|
|
2100
|
-
return this.http.post(this.url.get, param);
|
|
2101
|
-
}
|
|
2102
|
-
add(param) {
|
|
2103
|
-
return this.http.post(this.url.add, param);
|
|
2104
|
-
}
|
|
2105
|
-
del(param) {
|
|
2106
|
-
return this.http.post(this.url.del, param);
|
|
2107
|
-
}
|
|
2108
|
-
update(param) {
|
|
2109
|
-
return this.http.post(this.url.update, param);
|
|
2110
|
-
}
|
|
2111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2112
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, providedIn: 'root' }); }
|
|
2113
|
-
}
|
|
2114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, decorators: [{
|
|
2115
|
-
type: Injectable,
|
|
2116
|
-
args: [{
|
|
2117
|
-
providedIn: 'root'
|
|
2118
|
-
}]
|
|
2119
|
-
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2120
|
-
|
|
2121
|
-
class BXRestImChat {
|
|
2122
|
-
constructor(http) {
|
|
2123
|
-
this.http = http;
|
|
2124
|
-
this.url = {
|
|
2125
|
-
add: [$im, $chat, $add],
|
|
2126
|
-
// list: [$im, $chat, $user, $list],
|
|
2127
|
-
// add: [$im, $chat, $user, $add],
|
|
2128
|
-
// delete: [$im, $chat, $user, $delete],
|
|
2129
|
-
updateTitle: [$im, $chat, $updateTitle],
|
|
2130
|
-
updateColor: [$im, $chat, $updateColor],
|
|
2131
|
-
updateAvatar: [$im, $chat, $updateAvatar],
|
|
2132
|
-
setOwner: [$im, $chat, $setOwner],
|
|
2133
|
-
get: [$im, $chat, $get],
|
|
2134
|
-
mute: [$im, $chat, $mute],
|
|
2135
|
-
};
|
|
2136
|
-
}
|
|
2137
|
-
add(param) {
|
|
2138
|
-
return this.http.post(this.url.add, param);
|
|
2186
|
+
add: [$log, $blogcomment, $add], // Добавляет комментарий к сообщению Живой ленты
|
|
2187
|
+
};
|
|
2139
2188
|
}
|
|
2140
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2141
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2189
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLogBlogComment, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2190
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLogBlogComment, providedIn: 'root' }); }
|
|
2142
2191
|
}
|
|
2143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLogBlogComment, decorators: [{
|
|
2144
2193
|
type: Injectable,
|
|
2145
2194
|
args: [{
|
|
2146
2195
|
providedIn: 'root'
|
|
2147
2196
|
}]
|
|
2148
|
-
}]
|
|
2197
|
+
}] });
|
|
2149
2198
|
|
|
2150
|
-
class
|
|
2151
|
-
constructor(
|
|
2152
|
-
this.
|
|
2199
|
+
class BXRestLog {
|
|
2200
|
+
constructor(blogPost, blogComment) {
|
|
2201
|
+
this.blogPost = blogPost;
|
|
2202
|
+
this.blogComment = blogComment;
|
|
2153
2203
|
}
|
|
2154
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2155
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2204
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLog, deps: [{ token: BXRestLogBlogPost }, { token: BXRestLogBlogComment }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2205
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLog, providedIn: 'root' }); }
|
|
2156
2206
|
}
|
|
2157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestLog, decorators: [{
|
|
2158
2208
|
type: Injectable,
|
|
2159
2209
|
args: [{
|
|
2160
2210
|
providedIn: 'root'
|
|
2161
2211
|
}]
|
|
2162
|
-
}], ctorParameters: function () { return [{ type:
|
|
2212
|
+
}], ctorParameters: function () { return [{ type: BXRestLogBlogPost }, { type: BXRestLogBlogComment }]; } });
|
|
2163
2213
|
|
|
2164
|
-
class
|
|
2214
|
+
class BXRestCalendarEvent {
|
|
2165
2215
|
constructor(http) {
|
|
2166
2216
|
this.http = http;
|
|
2217
|
+
this.url = {
|
|
2218
|
+
add: [$calendar, $event, $add],
|
|
2219
|
+
delete: [$calendar, $event, $delete],
|
|
2220
|
+
get: [$calendar, $event, $get],
|
|
2221
|
+
getNearest: [$calendar, $event, $get, $nearest],
|
|
2222
|
+
update: [$calendar, $event, $get, $update], // Редактирует существующее событие
|
|
2223
|
+
};
|
|
2167
2224
|
}
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
*/
|
|
2171
|
-
info() {
|
|
2172
|
-
return this.http.post(['app', 'info']);
|
|
2225
|
+
get(param) {
|
|
2226
|
+
return this.http.post(this.url.get, param);
|
|
2173
2227
|
}
|
|
2174
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2175
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2228
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendarEvent, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2229
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendarEvent, providedIn: 'root' }); }
|
|
2176
2230
|
}
|
|
2177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendarEvent, decorators: [{
|
|
2178
2232
|
type: Injectable,
|
|
2179
2233
|
args: [{
|
|
2180
2234
|
providedIn: 'root'
|
|
2181
2235
|
}]
|
|
2182
2236
|
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2183
2237
|
|
|
2184
|
-
class
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
}
|
|
2219
|
-
|
|
2220
|
-
class NavvyPagNavBase extends NavvySupport {
|
|
2221
|
-
constructor(requestClass, mapClass, func, param, map = undefined) {
|
|
2222
|
-
super(requestClass, mapClass);
|
|
2223
|
-
this.func = func;
|
|
2224
|
-
this.param = param;
|
|
2225
|
-
this.map = map;
|
|
2226
|
-
// load: number = 0
|
|
2227
|
-
this.load$ = new ReplaySubject(1);
|
|
2228
|
-
this.load$.next(0.001);
|
|
2229
|
-
}
|
|
2230
|
-
resultVanilla() {
|
|
2231
|
-
return this.func.call(this.requestClass, this.param);
|
|
2232
|
-
}
|
|
2233
|
-
mapForVanilla() {
|
|
2234
|
-
return this.mapForVanillaEnd(this.func, this.param);
|
|
2235
|
-
}
|
|
2236
|
-
mapForVanillaEnd(func, param) {
|
|
2237
|
-
return func.call(this.requestClass, param).pipe(map(v => (v && v.result && this.map) ? Object.assign(v, { result: this.map.call(this.mapClass, v.result) }) : v));
|
|
2238
|
-
}
|
|
2239
|
-
result() {
|
|
2240
|
-
return this.resultEnd(this.func, this.param);
|
|
2241
|
-
}
|
|
2242
|
-
resultEnd(func, param) {
|
|
2243
|
-
return this.mapAndError(func.call(this.requestClass, param)).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v));
|
|
2244
|
-
}
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
|
-
/**
|
|
2248
|
-
* Класс-прослойка-обработчик для методов работающих на альтернативной постраничной навигации тика как методы по
|
|
2249
|
-
* затраченному времени на задачи https://dev.1c-bitrix.ru/rest_help/tasks/task/elapseditem/index.php
|
|
2250
|
-
*
|
|
2251
|
-
* не завершенный класс, работаем от частного к общему
|
|
2252
|
-
*/
|
|
2253
|
-
class NavvyAlterPagNav extends NavvyPagNavBase {
|
|
2254
|
-
resultAll() {
|
|
2255
|
-
let save = [];
|
|
2256
|
-
return this.resultAllEnd()
|
|
2257
|
-
.pipe(map(v => {
|
|
2258
|
-
if (v) {
|
|
2259
|
-
save.push(...v);
|
|
2260
|
-
}
|
|
2261
|
-
return save;
|
|
2262
|
-
}), last(), shareReplay(1));
|
|
2263
|
-
}
|
|
2264
|
-
resultAllEnd() {
|
|
2265
|
-
// return this.mapForVanillaEnd(this.func, this.param)
|
|
2266
|
-
return this.resultVanilla().pipe(mergeMap(items => {
|
|
2267
|
-
if (items && items.result) {
|
|
2268
|
-
if (items.total && items.next) {
|
|
2269
|
-
let requests = [];
|
|
2270
|
-
for (let i = items.next; i < items.total; i = i + this.pageSize) {
|
|
2271
|
-
let paramClone = clone(this.param);
|
|
2272
|
-
paramClone.PARAMS = {
|
|
2273
|
-
NAV_PARAMS: {
|
|
2274
|
-
nPageSize: this.pageSize,
|
|
2275
|
-
iNumPage: i / this.pageSize + 1
|
|
2276
|
-
}
|
|
2277
|
-
};
|
|
2278
|
-
requests.push(paramClone);
|
|
2279
|
-
}
|
|
2280
|
-
return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param).pipe(tap(_ => {
|
|
2281
|
-
if (param && param.PARAMS && items.total) {
|
|
2282
|
-
this.load$.next((param.PARAMS.NAV_PARAMS.iNumPage * this.pageSize + this.pageSize) / items.total);
|
|
2283
|
-
}
|
|
2284
|
-
})))));
|
|
2285
|
-
}
|
|
2286
|
-
}
|
|
2287
|
-
return this.mapResultForGetAll(items);
|
|
2288
|
-
}), catchError(err => {
|
|
2289
|
-
// this.snackBar.error("Проблемы с поточным получение затреканого времени")
|
|
2290
|
-
console.error(err);
|
|
2291
|
-
return throwError(() => err);
|
|
2292
|
-
}));
|
|
2238
|
+
class BXRestCalendar {
|
|
2239
|
+
// TODO: эту дичь расформировать потом по классам
|
|
2240
|
+
/*
|
|
2241
|
+
protected url = {
|
|
2242
|
+
accessibility: {get: getNameMethod([$calendar, $accessibility, $get])}, // Возвращает занятость пользователей из списка.
|
|
2243
|
+
meeting: {
|
|
2244
|
+
params: {
|
|
2245
|
+
set: getNameMethod([$calendar, $meeting, $params, $set]), // Устанавливает параметры события для текущего пользователя
|
|
2246
|
+
},
|
|
2247
|
+
status: {
|
|
2248
|
+
get: getNameMethod([$calendar, $meeting, $status, $get]), // Возвращает статус участия текущего пользователя в событии
|
|
2249
|
+
set: getNameMethod([$calendar, $meeting, $status, $set]), // Устанавливает статус участия в событии для текущего пользователя
|
|
2250
|
+
},
|
|
2251
|
+
},
|
|
2252
|
+
resource: {
|
|
2253
|
+
list: getNameMethod([$calendar, $resource, $list]), // Возвращает список (массив) всех ресурсов
|
|
2254
|
+
add: getNameMethod([$calendar, $resource, $add]), // Добавляет новый ресурс
|
|
2255
|
+
update: getNameMethod([$calendar, $resource, $update]), // Изменяет ресурс
|
|
2256
|
+
delete: getNameMethod([$calendar, $resource, $delete]), // Удаляет ресурс
|
|
2257
|
+
booking: {
|
|
2258
|
+
list: getNameMethod([$calendar, $resource, $booking, $list]), // Предоставляет возможность выбрать бронирования ресурсов
|
|
2259
|
+
}
|
|
2260
|
+
},
|
|
2261
|
+
section: {
|
|
2262
|
+
add: getNameMethod([$calendar, $section, $add]), // Добавляет новый календарь
|
|
2263
|
+
delete: getNameMethod([$calendar, $section, $delete]), // Удаляет календарь
|
|
2264
|
+
get: getNameMethod([$calendar, $section, $get]), // Возвращает список календарей
|
|
2265
|
+
update: getNameMethod([$calendar, $section, $update]) //Обновляет календарь
|
|
2266
|
+
},
|
|
2267
|
+
settings: {
|
|
2268
|
+
get: getNameMethod([$calendar, $settings, $get]), // Возвращает основные настройки календаря
|
|
2269
|
+
set: getNameMethod([$calendar, $user, $settings, $set]), // Сохраняет пользовательские настройки календаря
|
|
2270
|
+
},
|
|
2271
|
+
getbyid: getNameMethod([$calendar, $event, 'getbyid']), // Возвращает событие календаря по идентификатору
|
|
2293
2272
|
}
|
|
2294
|
-
|
|
2295
|
-
|
|
2273
|
+
*/
|
|
2274
|
+
constructor(event) {
|
|
2275
|
+
this.event = event;
|
|
2296
2276
|
}
|
|
2297
|
-
}
|
|
2277
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendar, deps: [{ token: BXRestCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2278
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendar, providedIn: 'root' }); }
|
|
2279
|
+
}
|
|
2280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestCalendar, decorators: [{
|
|
2281
|
+
type: Injectable,
|
|
2282
|
+
args: [{
|
|
2283
|
+
providedIn: 'root'
|
|
2284
|
+
}]
|
|
2285
|
+
}], ctorParameters: function () { return [{ type: BXRestCalendarEvent }]; } });
|
|
2298
2286
|
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
return this.mapResultForGetAll(items);
|
|
2326
|
-
}), catchError(err => {
|
|
2327
|
-
// this.snackBar.error("Проблемы с поточным получение затреканого времени")
|
|
2328
|
-
console.error(err);
|
|
2329
|
-
return throwError(() => err);
|
|
2330
|
-
}));
|
|
2287
|
+
class BXRestSonetGroup {
|
|
2288
|
+
constructor(http) {
|
|
2289
|
+
this.http = http;
|
|
2290
|
+
this.url = {
|
|
2291
|
+
create: [$sonet_group, $create],
|
|
2292
|
+
delete: [$sonet_group, $delete],
|
|
2293
|
+
// feature: {
|
|
2294
|
+
// access: [$sonet_group, $feature, $access] // Проверяет, имеет ли текущий пользователь право на совершение операции в группе соцсети, осуществляя вызов функции CSocNetFeaturesPerms::CurrentUserCanPerformOperation()
|
|
2295
|
+
// },
|
|
2296
|
+
get: [$sonet_group, $get],
|
|
2297
|
+
setowner: [$sonet_group, 'setowner'],
|
|
2298
|
+
update: [$sonet_group, $update], // Изменяет параметры группы соцсети, используя метод API CSocNetGroup::Update()
|
|
2299
|
+
// user: {
|
|
2300
|
+
// add: [$sonet_group, $user, $add], // sonet_group.user.add Добавляет пользователей в качестве участников рабочей группы (без приглашения и подтверждения)
|
|
2301
|
+
// delete: [$sonet_group, $user, $delete], // Удаляет пользователей из рабочей группы
|
|
2302
|
+
// get: [$sonet_group, $user, $get], // Возвращает массив участников группы соцсети, осуществляя вызов CSocNetUserToGroup::GetList(), при этом проверяются права на доступ текущего пользователя к группе
|
|
2303
|
+
// groups: [$sonet_group, $user, 'groups'], // Возвращает массив групп соцсети текущего пользователя, осуществляя вызов CSocNetUserToGroup::GetList()
|
|
2304
|
+
// invite: [$sonet_group, $user, 'invite'], // Выполняет приглашение пользователей в группу соцсети от лица текущего пользователя, при этом проверяются права на доступ текущего пользователя к группе
|
|
2305
|
+
// request: [$sonet_group, $user, $request], // Отправляет запрос текущего пользователя на вступление в группу соцсети, при этом проверяются права на доступ текущего пользователя к группе.
|
|
2306
|
+
// update: [$sonet_group, $user, $update], // Изменяет роль пользователей в рабочей группе События при работе с группами СоцСети Список событий при добавлении, изменении и удалении группы.
|
|
2307
|
+
// },
|
|
2308
|
+
// workgroup: {
|
|
2309
|
+
// list: [$socialnetwork, $api, $workgroup, $list], // Метод возвращает список групп,
|
|
2310
|
+
// get: [$socialnetwork, $api, $workgroup, $get] // Метод возвращает данные по рабочей группе
|
|
2311
|
+
// }
|
|
2312
|
+
};
|
|
2331
2313
|
}
|
|
2332
|
-
|
|
2333
|
-
|
|
2314
|
+
// // TODO: filter и select позже нормально описать
|
|
2315
|
+
// getList(filter: any = {}, select: iWorkgroupFields[] = ['ID', 'NAME']){
|
|
2316
|
+
// return this.httpPost<iHttpAnswerBX<{workgroups: iListWorkgroup[]}>>(
|
|
2317
|
+
// this.url.get,
|
|
2318
|
+
// {
|
|
2319
|
+
// order: select,
|
|
2320
|
+
// filter: filter
|
|
2321
|
+
// }
|
|
2322
|
+
// )
|
|
2323
|
+
// }
|
|
2324
|
+
get(param = {}) {
|
|
2325
|
+
return this.http.post(this.url.get, param);
|
|
2334
2326
|
}
|
|
2335
|
-
}
|
|
2327
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2328
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, providedIn: 'root' }); }
|
|
2329
|
+
}
|
|
2330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestSonetGroup, decorators: [{
|
|
2331
|
+
type: Injectable,
|
|
2332
|
+
args: [{
|
|
2333
|
+
providedIn: 'root'
|
|
2334
|
+
}]
|
|
2335
|
+
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2336
2336
|
|
|
2337
|
-
class
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
save.push(...v);
|
|
2344
|
-
}
|
|
2345
|
-
return save;
|
|
2346
|
-
}), last());
|
|
2337
|
+
class BXRestServer {
|
|
2338
|
+
constructor(http) {
|
|
2339
|
+
this.http = http;
|
|
2340
|
+
this.url = {
|
|
2341
|
+
time: [$server, $time]
|
|
2342
|
+
};
|
|
2347
2343
|
}
|
|
2348
|
-
|
|
2349
|
-
return this.
|
|
2350
|
-
if (items && items.result) {
|
|
2351
|
-
if (items.total && items.next) {
|
|
2352
|
-
let requests = [];
|
|
2353
|
-
for (let i = 0; i < items.total; i = i + this.pageSize) {
|
|
2354
|
-
let paramClone = clone(this.param);
|
|
2355
|
-
paramClone.start = i;
|
|
2356
|
-
requests.push(paramClone);
|
|
2357
|
-
}
|
|
2358
|
-
/*
|
|
2359
|
-
return from(requests.map(param => this.resultEnd(this.func, param))).pipe(
|
|
2360
|
-
// toArray(),
|
|
2361
|
-
mergeMap(v => {
|
|
2362
|
-
return v
|
|
2363
|
-
})
|
|
2364
|
-
)
|
|
2365
|
-
*/
|
|
2366
|
-
return from(requests).pipe(concatMap(param => this.resultEnd(this.func, param)));
|
|
2367
|
-
/*
|
|
2368
|
-
return this.getAllTaskElapsedItem(func, param).pipe(
|
|
2369
|
-
map(vEnd => {
|
|
2370
|
-
if (vEnd && vEnd.result && items.result) {
|
|
2371
|
-
return merge(clone(vEnd), {result: [...items.result, ...vEnd.result]})
|
|
2372
|
-
}
|
|
2373
|
-
return items
|
|
2374
|
-
})
|
|
2375
|
-
)
|
|
2376
|
-
*/
|
|
2377
|
-
}
|
|
2378
|
-
}
|
|
2379
|
-
return from([1]).pipe(concatMap(_ => this.resultEnd(this.func, this.param)));
|
|
2380
|
-
// return from([BXRestMapResult(items)])
|
|
2381
|
-
// as ReturnType<Observable<T | undefined>, Observable<R | undefined>>
|
|
2382
|
-
}), catchError(err => {
|
|
2383
|
-
// this.snackBar.error("Проблемы с поточным получение затреканого времени")
|
|
2384
|
-
console.error(err);
|
|
2385
|
-
return throwError(() => err);
|
|
2386
|
-
}));
|
|
2344
|
+
time() {
|
|
2345
|
+
return this.http.post(this.url.time);
|
|
2387
2346
|
}
|
|
2388
|
-
}
|
|
2347
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2348
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, providedIn: 'root' }); }
|
|
2349
|
+
}
|
|
2350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestServer, decorators: [{
|
|
2351
|
+
type: Injectable,
|
|
2352
|
+
args: [{
|
|
2353
|
+
providedIn: 'root'
|
|
2354
|
+
}]
|
|
2355
|
+
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2389
2356
|
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
return save;
|
|
2400
|
-
}), last(), shareReplay(1));
|
|
2357
|
+
class BXRestDepartment {
|
|
2358
|
+
constructor(http) {
|
|
2359
|
+
this.http = http;
|
|
2360
|
+
this.url = {
|
|
2361
|
+
get: [$department, $get],
|
|
2362
|
+
del: [$department, $delete],
|
|
2363
|
+
add: [$department, $add],
|
|
2364
|
+
update: [$department, $update]
|
|
2365
|
+
};
|
|
2401
2366
|
}
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
return this.resultVanilla().pipe(mergeMap(items => {
|
|
2405
|
-
if (items && items.result) {
|
|
2406
|
-
if (items.total && items.next) {
|
|
2407
|
-
let requests = [];
|
|
2408
|
-
for (let i = items.next; i < items.total; i = i + this.pageSize) {
|
|
2409
|
-
let paramClone = clone(this.param);
|
|
2410
|
-
paramClone.start = i;
|
|
2411
|
-
requests.push(paramClone);
|
|
2412
|
-
}
|
|
2413
|
-
return concat(this.mapResultForGetAll(items), from(requests).pipe(concatMap(param => this.resultEnd(this.func, param))));
|
|
2414
|
-
}
|
|
2415
|
-
}
|
|
2416
|
-
return this.mapResultForGetAll(items);
|
|
2417
|
-
}), catchError(err => {
|
|
2418
|
-
// this.snackBar.error("Проблемы с поточным получение затреканого времени")
|
|
2419
|
-
console.error(err);
|
|
2420
|
-
return throwError(() => err);
|
|
2421
|
-
}));
|
|
2367
|
+
get(param = {}) {
|
|
2368
|
+
return this.http.post(this.url.get, param);
|
|
2422
2369
|
}
|
|
2423
|
-
|
|
2424
|
-
return
|
|
2370
|
+
add(param) {
|
|
2371
|
+
return this.http.post(this.url.add, param);
|
|
2425
2372
|
}
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
class Navvy {
|
|
2429
|
-
constructor(requestClass, mapClass) {
|
|
2430
|
-
this.requestClass = requestClass;
|
|
2431
|
-
this.mapClass = mapClass;
|
|
2373
|
+
del(param) {
|
|
2374
|
+
return this.http.post(this.url.del, param);
|
|
2432
2375
|
}
|
|
2433
|
-
|
|
2434
|
-
return
|
|
2376
|
+
update(param) {
|
|
2377
|
+
return this.http.post(this.url.update, param);
|
|
2435
2378
|
}
|
|
2436
|
-
|
|
2437
|
-
|
|
2379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2380
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, providedIn: 'root' }); }
|
|
2381
|
+
}
|
|
2382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestDepartment, decorators: [{
|
|
2383
|
+
type: Injectable,
|
|
2384
|
+
args: [{
|
|
2385
|
+
providedIn: 'root'
|
|
2386
|
+
}]
|
|
2387
|
+
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2388
|
+
|
|
2389
|
+
class BXRestImChat {
|
|
2390
|
+
constructor(http) {
|
|
2391
|
+
this.http = http;
|
|
2392
|
+
this.url = {
|
|
2393
|
+
add: [$im, $chat, $add],
|
|
2394
|
+
// list: [$im, $chat, $user, $list],
|
|
2395
|
+
// add: [$im, $chat, $user, $add],
|
|
2396
|
+
// delete: [$im, $chat, $user, $delete],
|
|
2397
|
+
updateTitle: [$im, $chat, $updateTitle],
|
|
2398
|
+
updateColor: [$im, $chat, $updateColor],
|
|
2399
|
+
updateAvatar: [$im, $chat, $updateAvatar],
|
|
2400
|
+
setOwner: [$im, $chat, $setOwner],
|
|
2401
|
+
get: [$im, $chat, $get],
|
|
2402
|
+
mute: [$im, $chat, $mute],
|
|
2403
|
+
};
|
|
2438
2404
|
}
|
|
2439
|
-
|
|
2440
|
-
return
|
|
2405
|
+
add(param) {
|
|
2406
|
+
return this.http.post(this.url.add, param);
|
|
2441
2407
|
}
|
|
2442
|
-
|
|
2443
|
-
|
|
2408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestImChat, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2409
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestImChat, providedIn: 'root' }); }
|
|
2410
|
+
}
|
|
2411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestImChat, decorators: [{
|
|
2412
|
+
type: Injectable,
|
|
2413
|
+
args: [{
|
|
2414
|
+
providedIn: 'root'
|
|
2415
|
+
}]
|
|
2416
|
+
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2417
|
+
|
|
2418
|
+
class BXRestIm {
|
|
2419
|
+
constructor(chat) {
|
|
2420
|
+
this.chat = chat;
|
|
2444
2421
|
}
|
|
2445
|
-
|
|
2446
|
-
|
|
2422
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestIm, deps: [{ token: BXRestImChat }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2423
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestIm, providedIn: 'root' }); }
|
|
2424
|
+
}
|
|
2425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestIm, decorators: [{
|
|
2426
|
+
type: Injectable,
|
|
2427
|
+
args: [{
|
|
2428
|
+
providedIn: 'root'
|
|
2429
|
+
}]
|
|
2430
|
+
}], ctorParameters: function () { return [{ type: BXRestImChat }]; } });
|
|
2431
|
+
|
|
2432
|
+
class BXRestApp {
|
|
2433
|
+
constructor(http) {
|
|
2434
|
+
this.http = http;
|
|
2447
2435
|
}
|
|
2448
|
-
|
|
2449
|
-
|
|
2436
|
+
/**
|
|
2437
|
+
* Показ информации о приложении. Метод поддерживает безопасный вызов
|
|
2438
|
+
*/
|
|
2439
|
+
info() {
|
|
2440
|
+
return this.http.post(['app', 'info']);
|
|
2450
2441
|
}
|
|
2451
|
-
}
|
|
2442
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestApp, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2443
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestApp, providedIn: 'root' }); }
|
|
2444
|
+
}
|
|
2445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestApp, decorators: [{
|
|
2446
|
+
type: Injectable,
|
|
2447
|
+
args: [{
|
|
2448
|
+
providedIn: 'root'
|
|
2449
|
+
}]
|
|
2450
|
+
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2452
2451
|
|
|
2453
2452
|
class BaseMapServices extends BaseServices {
|
|
2454
2453
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BaseMapServices, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -2591,15 +2590,17 @@ class BXRestNavvyUser {
|
|
|
2591
2590
|
this.setDefParam(copyParams);
|
|
2592
2591
|
return this.Navvy.PagNav(this.BXRestUser.get, copyParams, this.BXRestUserMap.get);
|
|
2593
2592
|
}
|
|
2594
|
-
current(
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2593
|
+
current() {
|
|
2594
|
+
return this.Navvy.simple(this.BXRestUser.current, this.BXRestUserMap.current);
|
|
2595
|
+
// TODO: подумать о сохранении данных (на будущее, пример код ниже)
|
|
2596
|
+
/*
|
|
2597
|
+
const navvy = new Navvy(this, this.BXRestUserMap)
|
|
2598
|
+
return navvy.simpleWithArg(
|
|
2599
|
+
this.self,
|
|
2600
|
+
update,
|
|
2601
|
+
this.BXRestUserMap.current
|
|
2602
|
+
)
|
|
2603
|
+
*/
|
|
2603
2604
|
}
|
|
2604
2605
|
/*
|
|
2605
2606
|
update(user: iBXRestUser, fieldUpdate: string[]) {
|
|
@@ -2641,28 +2642,6 @@ class BXRestNavvyUser {
|
|
|
2641
2642
|
fields() {
|
|
2642
2643
|
return this.Navvy.simple(this.BXRestUser.fields);
|
|
2643
2644
|
}
|
|
2644
|
-
self(update = false) {
|
|
2645
|
-
if (update) {
|
|
2646
|
-
return this.BXRestUser.current(update);
|
|
2647
|
-
}
|
|
2648
|
-
else {
|
|
2649
|
-
let self = SessionStorage.getItem(this.constructor.name + this.self.name);
|
|
2650
|
-
if (self) {
|
|
2651
|
-
return of(self);
|
|
2652
|
-
}
|
|
2653
|
-
return this.BXRestUser.current(update)
|
|
2654
|
-
.pipe(map(v => {
|
|
2655
|
-
if (v) {
|
|
2656
|
-
return v;
|
|
2657
|
-
}
|
|
2658
|
-
return undefined;
|
|
2659
|
-
}), shareReplay(1), tap(v => {
|
|
2660
|
-
if (v) {
|
|
2661
|
-
SessionStorage.setItem(this.constructor.name + this.self.name, v);
|
|
2662
|
-
}
|
|
2663
|
-
}));
|
|
2664
|
-
}
|
|
2665
|
-
}
|
|
2666
2645
|
// getAll(params: iBXGetParam = {}): Observable<iBXRestUser [] | undefined> {
|
|
2667
2646
|
// if (!Object.keys(params).length) {
|
|
2668
2647
|
// params = clone(this.def.params)
|
|
@@ -2959,7 +2938,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
2959
2938
|
}]
|
|
2960
2939
|
}] });
|
|
2961
2940
|
|
|
2962
|
-
class
|
|
2941
|
+
class BXRestMapTaskElapsedItem extends BaseMapServices {
|
|
2963
2942
|
update(p) {
|
|
2964
2943
|
return (p == null);
|
|
2965
2944
|
}
|
|
@@ -2979,21 +2958,21 @@ class BXRestMapTaskElapseditem extends BaseMapServices {
|
|
|
2979
2958
|
DATE_STOP: this.toDate(item.DATE_STOP),
|
|
2980
2959
|
});
|
|
2981
2960
|
}
|
|
2982
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2983
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2961
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTaskElapsedItem, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2962
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTaskElapsedItem, providedIn: 'root' }); }
|
|
2984
2963
|
}
|
|
2985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2964
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTaskElapsedItem, decorators: [{
|
|
2986
2965
|
type: Injectable,
|
|
2987
2966
|
args: [{
|
|
2988
2967
|
providedIn: 'root'
|
|
2989
2968
|
}]
|
|
2990
2969
|
}] });
|
|
2991
2970
|
|
|
2992
|
-
class
|
|
2993
|
-
constructor(
|
|
2994
|
-
this.
|
|
2995
|
-
this.
|
|
2996
|
-
this.Navvy = new Navvy(this.
|
|
2971
|
+
class BXRestNavvyDelegateElapsedItem {
|
|
2972
|
+
constructor(BXRestElapsedItem, BXRestMapElapsedItem) {
|
|
2973
|
+
this.BXRestElapsedItem = BXRestElapsedItem;
|
|
2974
|
+
this.BXRestMapElapsedItem = BXRestMapElapsedItem;
|
|
2975
|
+
this.Navvy = new Navvy(this.BXRestElapsedItem, this.BXRestMapElapsedItem);
|
|
2997
2976
|
}
|
|
2998
2977
|
getList(param = {}) {
|
|
2999
2978
|
if (param) {
|
|
@@ -3009,17 +2988,17 @@ class BXRestNavvyDelegateElapseditem {
|
|
|
3009
2988
|
};
|
|
3010
2989
|
}
|
|
3011
2990
|
}
|
|
3012
|
-
return this.Navvy.alterPagNav(this.
|
|
2991
|
+
return this.Navvy.alterPagNav(this.BXRestElapsedItem.getList, param, this.BXRestMapElapsedItem.getList);
|
|
3013
2992
|
}
|
|
3014
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
3015
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2993
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDelegateElapsedItem, deps: [{ token: BXRestTaskElapsedItem }, { token: BXRestMapTaskElapsedItem }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2994
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDelegateElapsedItem, providedIn: 'root' }); }
|
|
3016
2995
|
}
|
|
3017
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
2996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyDelegateElapsedItem, decorators: [{
|
|
3018
2997
|
type: Injectable,
|
|
3019
2998
|
args: [{
|
|
3020
2999
|
providedIn: 'root'
|
|
3021
3000
|
}]
|
|
3022
|
-
}], ctorParameters: function () { return [{ type:
|
|
3001
|
+
}], ctorParameters: function () { return [{ type: BXRestTaskElapsedItem }, { type: BXRestMapTaskElapsedItem }]; } });
|
|
3023
3002
|
|
|
3024
3003
|
// import { iTaskResult, iTaskResultHttp } from '@/lib/typification/bitrix/api/rest/task/result/result'
|
|
3025
3004
|
class BXRestMapTasksTaskResult extends BaseMapServices {
|
|
@@ -3200,31 +3179,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
3200
3179
|
}]
|
|
3201
3180
|
}], ctorParameters: function () { return [{ type: BX_REST_SETTINGS }, { type: BXRestMapTasksTaskResult }]; } });
|
|
3202
3181
|
|
|
3203
|
-
// export interface TimeProcess {
|
|
3204
|
-
// total: number,
|
|
3205
|
-
// next: number
|
|
3206
|
-
// }
|
|
3207
3182
|
class BXRestNavvyTasksTask {
|
|
3208
3183
|
constructor(result, BXRestTasksTask, BXRestMapTasksTask) {
|
|
3209
3184
|
this.result = result;
|
|
3210
3185
|
this.BXRestTasksTask = BXRestTasksTask;
|
|
3211
3186
|
this.BXRestMapTasksTask = BXRestMapTasksTask;
|
|
3212
|
-
// pageSize = 50
|
|
3213
|
-
// nowLoad$ = new ReplaySubject<TimeProcess>(1)
|
|
3214
|
-
this.def = {
|
|
3215
|
-
select: ['ID', 'PARENT_ID', 'TITLE', 'DESCRIPTION', 'MARK', 'PRIORITY', 'STATUS', 'MULTITASK',
|
|
3216
|
-
'GROUP_ID', 'STAGE_ID', 'CREATED_BY', 'CREATED_DATE', 'RESPONSIBLE_ID', 'ACCOMPLICES', 'AUDITORS',
|
|
3217
|
-
'CHANGED_BY', 'CHANGED_DATE', 'STATUS_CHANGED_DATE', 'CLOSED_BY', 'CLOSED_DATE', 'DATE_START', 'VIEWED_DATE',
|
|
3218
|
-
'DEADLINE', 'START_DATE_PLAN', 'END_DATE_PLAN', 'FORKED_BY_TEMPLATE_ID', 'TIME_ESTIMATE', 'TIME_SPENT_IN_LOGS',
|
|
3219
|
-
'TAGS', 'ALLOW_TIME_TRACKING'
|
|
3220
|
-
]
|
|
3221
|
-
};
|
|
3222
3187
|
this.Navvy = new Navvy(this.BXRestTasksTask, this.BXRestMapTasksTask);
|
|
3223
|
-
// this.storeTask$ = this.store.select('tasks')
|
|
3224
|
-
// this.nowLoad$.next({
|
|
3225
|
-
// total: 0,
|
|
3226
|
-
// next: 0
|
|
3227
|
-
// })
|
|
3228
3188
|
}
|
|
3229
3189
|
add(param) {
|
|
3230
3190
|
return this.Navvy.simpleWithArg(this.BXRestTasksTask.add, param, this.BXRestMapTasksTask.add);
|
|
@@ -3256,16 +3216,10 @@ class BXRestNavvyTasksTask {
|
|
|
3256
3216
|
}
|
|
3257
3217
|
*/
|
|
3258
3218
|
get(param) {
|
|
3259
|
-
if (!param.select) {
|
|
3260
|
-
param.select = this.def.select;
|
|
3261
|
-
}
|
|
3262
3219
|
return this.Navvy.simpleWithArg(this.BXRestTasksTask.get, param, this.BXRestMapTasksTask.get);
|
|
3263
3220
|
}
|
|
3264
3221
|
list(param = {}) {
|
|
3265
|
-
|
|
3266
|
-
param.select = this.def.select;
|
|
3267
|
-
}
|
|
3268
|
-
return this.Navvy.PagNavTasks(this.BXRestTasksTask.list, param, this.BXRestMapTasksTask.list);
|
|
3222
|
+
return this.Navvy.PagNavTasks((this.BXRestTasksTask.list), param, this.BXRestMapTasksTask.list);
|
|
3269
3223
|
}
|
|
3270
3224
|
/*
|
|
3271
3225
|
listArray(requestArray: RequestApiTaskListBX = {}) {
|
|
@@ -3332,8 +3286,8 @@ class BXRestNavvyTasksTask {
|
|
|
3332
3286
|
getFields() {
|
|
3333
3287
|
return this.Navvy.simple(this.BXRestTasksTask.getFields);
|
|
3334
3288
|
}
|
|
3335
|
-
|
|
3336
|
-
return this.Navvy.simpleWithArg(this.BXRestTasksTask.
|
|
3289
|
+
getAccess(param) {
|
|
3290
|
+
return this.Navvy.simpleWithArg(this.BXRestTasksTask.getAccess, param, this.BXRestMapTasksTask.getaccess);
|
|
3337
3291
|
}
|
|
3338
3292
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyTasksTask, deps: [{ token: BXRestNavvyTasksTaskResult }, { token: BXRestTasksTask }, { token: BXRestMapTasksTask }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3339
3293
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyTasksTask, providedIn: 'root' }); }
|
|
@@ -3359,11 +3313,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
3359
3313
|
}]
|
|
3360
3314
|
}], ctorParameters: function () { return [{ type: BXRestNavvyTasksTask }]; } });
|
|
3361
3315
|
|
|
3362
|
-
class
|
|
3363
|
-
constructor(http, delegate,
|
|
3316
|
+
class BXRestNavvyOperationElapsedItem {
|
|
3317
|
+
constructor(http, delegate, BXRestMapElapsedItem, BXRestNavvyUser, BXRestNavvyTasks) {
|
|
3364
3318
|
this.http = http;
|
|
3365
3319
|
this.delegate = delegate;
|
|
3366
|
-
this.
|
|
3320
|
+
this.BXRestMapElapsedItem = BXRestMapElapsedItem;
|
|
3367
3321
|
this.BXRestNavvyUser = BXRestNavvyUser;
|
|
3368
3322
|
this.BXRestNavvyTasks = BXRestNavvyTasks;
|
|
3369
3323
|
}
|
|
@@ -3390,14 +3344,14 @@ class BXRestNavvyOperationElapseditem {
|
|
|
3390
3344
|
};
|
|
3391
3345
|
})).pipe(map(v => {
|
|
3392
3346
|
if (v && v.length) {
|
|
3393
|
-
return this.http.mapBranchResultWithoutKey(v).map(i => this.
|
|
3347
|
+
return this.http.mapBranchResultWithoutKey(v).map(i => this.BXRestMapElapsedItem.getList(i)).filter((i) => i !== undefined).flat();
|
|
3394
3348
|
}
|
|
3395
3349
|
return undefined;
|
|
3396
3350
|
}));
|
|
3397
3351
|
}
|
|
3398
|
-
|
|
3352
|
+
checkPermissionAddElapsedTimeToTaskArr(tasks) {
|
|
3399
3353
|
let request = Object.assign({}, ...tasks.map(i => {
|
|
3400
|
-
return { [i]: this.
|
|
3354
|
+
return { [i]: this.checkPermissionAddElapsedTimeToTask(i) };
|
|
3401
3355
|
}));
|
|
3402
3356
|
return forkJoin(request)
|
|
3403
3357
|
.pipe(take(1), mergeMap(v => {
|
|
@@ -3434,7 +3388,7 @@ class BXRestNavvyOperationElapseditem {
|
|
|
3434
3388
|
return of(forForeach);
|
|
3435
3389
|
}));
|
|
3436
3390
|
}
|
|
3437
|
-
|
|
3391
|
+
checkPermissionAddElapsedTimeToTask(idTask) {
|
|
3438
3392
|
let permission = Permission.get();
|
|
3439
3393
|
if (permission?.tasks?.length) {
|
|
3440
3394
|
let findTask = permission.tasks.find(i => i.id === idTask);
|
|
@@ -3443,7 +3397,7 @@ class BXRestNavvyOperationElapseditem {
|
|
|
3443
3397
|
}
|
|
3444
3398
|
return this.BXRestNavvyUser.current().result().pipe(mergeMap(self => {
|
|
3445
3399
|
if (self) {
|
|
3446
|
-
return this.BXRestNavvyTasks.task.
|
|
3400
|
+
return this.BXRestNavvyTasks.task.getAccess({
|
|
3447
3401
|
id: idTask,
|
|
3448
3402
|
users: [self.ID]
|
|
3449
3403
|
}).result().pipe(tap(v => {
|
|
@@ -3470,7 +3424,7 @@ class BXRestNavvyOperationElapseditem {
|
|
|
3470
3424
|
}
|
|
3471
3425
|
return this.BXRestNavvyUser.current().result().pipe(mergeMap(self => {
|
|
3472
3426
|
if (self) {
|
|
3473
|
-
return this.BXRestNavvyTasks.task.
|
|
3427
|
+
return this.BXRestNavvyTasks.task.getAccess({
|
|
3474
3428
|
id: idTask,
|
|
3475
3429
|
users: [self.ID]
|
|
3476
3430
|
}).result().pipe(tap(v => {
|
|
@@ -3488,23 +3442,23 @@ class BXRestNavvyOperationElapseditem {
|
|
|
3488
3442
|
}
|
|
3489
3443
|
return of(undefined);
|
|
3490
3444
|
}
|
|
3491
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
3492
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
3445
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyOperationElapsedItem, deps: [{ token: HttpBXServices }, { token: BXRestNavvyDelegateElapsedItem }, { token: BXRestMapTaskElapsedItem }, { token: BXRestNavvyUser }, { token: BXRestNavvyTasks }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3446
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyOperationElapsedItem, providedIn: 'root' }); }
|
|
3493
3447
|
}
|
|
3494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
3448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyOperationElapsedItem, decorators: [{
|
|
3495
3449
|
type: Injectable,
|
|
3496
3450
|
args: [{
|
|
3497
3451
|
providedIn: 'root'
|
|
3498
3452
|
}]
|
|
3499
|
-
}], ctorParameters: function () { return [{ type: HttpBXServices }, { type:
|
|
3453
|
+
}], ctorParameters: function () { return [{ type: HttpBXServices }, { type: BXRestNavvyDelegateElapsedItem }, { type: BXRestMapTaskElapsedItem }, { type: BXRestNavvyUser }, { type: BXRestNavvyTasks }]; } });
|
|
3500
3454
|
|
|
3501
3455
|
class BXRestNavvyElapseditem {
|
|
3502
|
-
constructor(
|
|
3503
|
-
this.
|
|
3504
|
-
this.
|
|
3456
|
+
constructor(BXRestElapsedItem, BXRestMapElapsedItem, delegate, operation) {
|
|
3457
|
+
this.BXRestElapsedItem = BXRestElapsedItem;
|
|
3458
|
+
this.BXRestMapElapsedItem = BXRestMapElapsedItem;
|
|
3505
3459
|
this.delegate = delegate;
|
|
3506
3460
|
this.operation = operation;
|
|
3507
|
-
this.Navvy = new Navvy(this.
|
|
3461
|
+
this.Navvy = new Navvy(this.BXRestElapsedItem, this.BXRestMapElapsedItem);
|
|
3508
3462
|
}
|
|
3509
3463
|
/*
|
|
3510
3464
|
call(methodName: string, ...args: any[]){
|
|
@@ -3520,9 +3474,9 @@ class BXRestNavvyElapseditem {
|
|
|
3520
3474
|
add(param) {
|
|
3521
3475
|
return this.operation.checkPermissionReadTask(param.TASKID).pipe(mergeMap(allowedReadTask => {
|
|
3522
3476
|
if (allowedReadTask) {
|
|
3523
|
-
return this.operation.
|
|
3477
|
+
return this.operation.checkPermissionAddElapsedTimeToTask(param.TASKID).pipe(mergeMap(allowed => {
|
|
3524
3478
|
if (allowed) {
|
|
3525
|
-
return this.
|
|
3479
|
+
return this.BXRestElapsedItem.add(param);
|
|
3526
3480
|
}
|
|
3527
3481
|
else {
|
|
3528
3482
|
return throwError(() => new Error('Отсутствуют права добавление записи затраченного времени'));
|
|
@@ -3544,7 +3498,7 @@ class BXRestNavvyElapseditem {
|
|
|
3544
3498
|
if (allowedReadTask) {
|
|
3545
3499
|
return this.isAllowedModify(param.TASKID, param.ITEMID).pipe(mergeMap(allowed => {
|
|
3546
3500
|
if (allowed) {
|
|
3547
|
-
return this.
|
|
3501
|
+
return this.BXRestElapsedItem.update(param);
|
|
3548
3502
|
}
|
|
3549
3503
|
else {
|
|
3550
3504
|
return throwError(() => new Error('Отсутствуют права на изменение записи затраченного времени'));
|
|
@@ -3554,7 +3508,7 @@ class BXRestNavvyElapseditem {
|
|
|
3554
3508
|
else {
|
|
3555
3509
|
return throwError(() => new Error('Отсутствуют права на чтение задачи'));
|
|
3556
3510
|
}
|
|
3557
|
-
})), this.
|
|
3511
|
+
})), this.BXRestMapElapsedItem.update);
|
|
3558
3512
|
}
|
|
3559
3513
|
/*
|
|
3560
3514
|
getAll(
|
|
@@ -3662,7 +3616,7 @@ class BXRestNavvyElapseditem {
|
|
|
3662
3616
|
isActionAllowed(param) {
|
|
3663
3617
|
return this.Navvy.simple(() => this.operation.checkPermissionReadTask(param.TASKID).pipe(mergeMap(canRead => {
|
|
3664
3618
|
if (canRead) {
|
|
3665
|
-
return this.
|
|
3619
|
+
return this.BXRestElapsedItem.isActionAllowed(param);
|
|
3666
3620
|
}
|
|
3667
3621
|
return throwError(() => new Error('Отсутствуют права на чтение задачи'));
|
|
3668
3622
|
})));
|
|
@@ -3672,7 +3626,7 @@ class BXRestNavvyElapseditem {
|
|
|
3672
3626
|
if (allowedReadTask) {
|
|
3673
3627
|
return this.isAllowedRemove(param.TASKID, param.ITEMID).pipe(mergeMap(allowed => {
|
|
3674
3628
|
if (allowed) {
|
|
3675
|
-
return this.
|
|
3629
|
+
return this.BXRestElapsedItem.del(param);
|
|
3676
3630
|
}
|
|
3677
3631
|
else {
|
|
3678
3632
|
return throwError(() => new Error('Отсутствуют права на удаление записи затраченного времени'));
|
|
@@ -3684,7 +3638,7 @@ class BXRestNavvyElapseditem {
|
|
|
3684
3638
|
}
|
|
3685
3639
|
})), v => (v === null));
|
|
3686
3640
|
}
|
|
3687
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyElapseditem, deps: [{ token:
|
|
3641
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyElapseditem, deps: [{ token: BXRestTaskElapsedItem }, { token: BXRestMapTaskElapsedItem }, { token: BXRestNavvyDelegateElapsedItem }, { token: BXRestNavvyOperationElapsedItem }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3688
3642
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyElapseditem, providedIn: 'root' }); }
|
|
3689
3643
|
}
|
|
3690
3644
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyElapseditem, decorators: [{
|
|
@@ -3692,7 +3646,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
3692
3646
|
args: [{
|
|
3693
3647
|
providedIn: 'root'
|
|
3694
3648
|
}]
|
|
3695
|
-
}], ctorParameters: function () { return [{ type:
|
|
3649
|
+
}], ctorParameters: function () { return [{ type: BXRestTaskElapsedItem }, { type: BXRestMapTaskElapsedItem }, { type: BXRestNavvyDelegateElapsedItem }, { type: BXRestNavvyOperationElapsedItem }]; } });
|
|
3696
3650
|
|
|
3697
3651
|
class BXRestMapTaskCommentItem extends BaseMapServices {
|
|
3698
3652
|
getlist(value) {
|
|
@@ -4375,25 +4329,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
4375
4329
|
}]
|
|
4376
4330
|
}], ctorParameters: function () { return [{ type: BXRestNavvyDiskOperation }, { type: BXRestNavvyDiskFile }, { type: BXRestNavvyDiskFolder }, { type: BXRestNavvyDiskAttachedObject }]; } });
|
|
4377
4331
|
|
|
4378
|
-
class
|
|
4379
|
-
constructor(
|
|
4380
|
-
this.
|
|
4381
|
-
this.Navvy = new Navvy(this.
|
|
4332
|
+
class BXRestNavvyBXRestBizProcWorkflow {
|
|
4333
|
+
constructor(BXRestBizProcWorkflow) {
|
|
4334
|
+
this.BXRestBizProcWorkflow = BXRestBizProcWorkflow;
|
|
4335
|
+
this.Navvy = new Navvy(this.BXRestBizProcWorkflow, undefined);
|
|
4382
4336
|
}
|
|
4383
4337
|
start(param) {
|
|
4384
|
-
return this.Navvy.simpleWithArg(this.
|
|
4338
|
+
return this.Navvy.simpleWithArg(this.BXRestBizProcWorkflow.start, param);
|
|
4385
4339
|
}
|
|
4386
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
4387
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
4340
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBXRestBizProcWorkflow, deps: [{ token: BXRestBizProcWorkflow }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4341
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBXRestBizProcWorkflow, providedIn: 'root' }); }
|
|
4388
4342
|
}
|
|
4389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
4343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBXRestBizProcWorkflow, decorators: [{
|
|
4390
4344
|
type: Injectable,
|
|
4391
4345
|
args: [{
|
|
4392
4346
|
providedIn: 'root'
|
|
4393
4347
|
}]
|
|
4394
|
-
}], ctorParameters: function () { return [{ type:
|
|
4348
|
+
}], ctorParameters: function () { return [{ type: BXRestBizProcWorkflow }]; } });
|
|
4395
4349
|
|
|
4396
|
-
class
|
|
4350
|
+
class BXRestNavvyBizProc {
|
|
4397
4351
|
constructor(workflow, BXRestNavvyLists) {
|
|
4398
4352
|
this.workflow = workflow;
|
|
4399
4353
|
this.BXRestNavvyLists = BXRestNavvyLists;
|
|
@@ -4404,10 +4358,10 @@ class BXRestNavvyBizproc {
|
|
|
4404
4358
|
*
|
|
4405
4359
|
* @param id
|
|
4406
4360
|
* @param parametersElement
|
|
4407
|
-
* @param
|
|
4361
|
+
* @param parametersBizProc
|
|
4408
4362
|
* @param templateIDs
|
|
4409
4363
|
*/
|
|
4410
|
-
startProcFormNewsFeed(id, parametersElement,
|
|
4364
|
+
startProcFormNewsFeed(id, parametersElement, parametersBizProc, templateIDs) {
|
|
4411
4365
|
return this.BXRestNavvyLists.element.add({
|
|
4412
4366
|
IBLOCK_TYPE_ID: 'bitrix_processes',
|
|
4413
4367
|
IBLOCK_ID: id,
|
|
@@ -4421,13 +4375,13 @@ class BXRestNavvyBizproc {
|
|
|
4421
4375
|
}
|
|
4422
4376
|
}).result().pipe(mergeMap(v => {
|
|
4423
4377
|
if (v) {
|
|
4424
|
-
if (Object.keys(
|
|
4378
|
+
if (Object.keys(parametersBizProc).length) {
|
|
4425
4379
|
let reques = [];
|
|
4426
4380
|
for (let templateID of templateIDs) {
|
|
4427
4381
|
reques.push(this.workflow.start({
|
|
4428
4382
|
TEMPLATE_ID: templateID,
|
|
4429
4383
|
DOCUMENT_ID: ['lists', 'BizprocDocument', String(v)],
|
|
4430
|
-
PARAMETERS:
|
|
4384
|
+
PARAMETERS: parametersBizProc
|
|
4431
4385
|
}).result());
|
|
4432
4386
|
}
|
|
4433
4387
|
return forkJoin(reques);
|
|
@@ -4439,15 +4393,15 @@ class BXRestNavvyBizproc {
|
|
|
4439
4393
|
return throwError(() => new Error('Не удалось запустить бизнес процесс'));
|
|
4440
4394
|
}));
|
|
4441
4395
|
}
|
|
4442
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
4443
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
4396
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizProc, deps: [{ token: BXRestNavvyBXRestBizProcWorkflow }, { token: BXRestNavvyLists }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4397
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizProc, providedIn: 'root' }); }
|
|
4444
4398
|
}
|
|
4445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
4399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyBizProc, decorators: [{
|
|
4446
4400
|
type: Injectable,
|
|
4447
4401
|
args: [{
|
|
4448
4402
|
providedIn: 'root'
|
|
4449
4403
|
}]
|
|
4450
|
-
}], ctorParameters: function () { return [{ type:
|
|
4404
|
+
}], ctorParameters: function () { return [{ type: BXRestNavvyBXRestBizProcWorkflow }, { type: BXRestNavvyLists }]; } });
|
|
4451
4405
|
|
|
4452
4406
|
class BXRestNavvyLogBlogPost {
|
|
4453
4407
|
constructor(BXRestLogBlogPost) {
|
|
@@ -4562,7 +4516,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
4562
4516
|
}]
|
|
4563
4517
|
}] });
|
|
4564
4518
|
|
|
4565
|
-
class
|
|
4519
|
+
class BXRestNavvyRestCalendarEvent {
|
|
4566
4520
|
constructor(BXRestCalendarEvent, eventMap) {
|
|
4567
4521
|
this.BXRestCalendarEvent = BXRestCalendarEvent;
|
|
4568
4522
|
this.eventMap = eventMap;
|
|
@@ -4571,10 +4525,10 @@ class BXRestRestCalendarEvent {
|
|
|
4571
4525
|
get(param) {
|
|
4572
4526
|
return this.Navvy.simpleWithArg(this.BXRestCalendarEvent.get, param, this.eventMap.get);
|
|
4573
4527
|
}
|
|
4574
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
4575
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
4528
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyRestCalendarEvent, deps: [{ token: BXRestCalendarEvent }, { token: BXRestMapCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4529
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyRestCalendarEvent, providedIn: 'root' }); }
|
|
4576
4530
|
}
|
|
4577
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type:
|
|
4531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyRestCalendarEvent, decorators: [{
|
|
4578
4532
|
type: Injectable,
|
|
4579
4533
|
args: [{
|
|
4580
4534
|
providedIn: 'root'
|
|
@@ -4620,7 +4574,7 @@ class BXRestNavvyCalendar {
|
|
|
4620
4574
|
constructor(event) {
|
|
4621
4575
|
this.event = event;
|
|
4622
4576
|
}
|
|
4623
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyCalendar, deps: [{ token:
|
|
4577
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyCalendar, deps: [{ token: BXRestNavvyRestCalendarEvent }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4624
4578
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyCalendar, providedIn: 'root' }); }
|
|
4625
4579
|
}
|
|
4626
4580
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvyCalendar, decorators: [{
|
|
@@ -4628,7 +4582,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
4628
4582
|
args: [{
|
|
4629
4583
|
providedIn: 'root'
|
|
4630
4584
|
}]
|
|
4631
|
-
}], ctorParameters: function () { return [{ type:
|
|
4585
|
+
}], ctorParameters: function () { return [{ type: BXRestNavvyRestCalendarEvent }]; } });
|
|
4632
4586
|
|
|
4633
4587
|
class BXRestMapSonetGroup extends BaseMapServices {
|
|
4634
4588
|
get(items) {
|
|
@@ -4842,14 +4796,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
4842
4796
|
}]
|
|
4843
4797
|
}], ctorParameters: function () { return [{ type: BXRestApp }, { type: BXRestMapApp }]; } });
|
|
4844
4798
|
|
|
4799
|
+
class BXRestMaps extends BaseMapServices {
|
|
4800
|
+
profile(user) {
|
|
4801
|
+
return (user) ? { ...user, ...{ ID: this.toNum(user.ID) } } : undefined;
|
|
4802
|
+
}
|
|
4803
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMaps, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4804
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMaps, providedIn: 'root' }); }
|
|
4805
|
+
}
|
|
4806
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMaps, decorators: [{
|
|
4807
|
+
type: Injectable,
|
|
4808
|
+
args: [{
|
|
4809
|
+
providedIn: 'root'
|
|
4810
|
+
}]
|
|
4811
|
+
}] });
|
|
4812
|
+
|
|
4845
4813
|
class BXRest {
|
|
4846
|
-
constructor(user, lists, task, tasks, disk,
|
|
4814
|
+
constructor(user, lists, task, tasks, disk, bizProc, log, calendar, sonet_group, server, department, im, app, http) {
|
|
4847
4815
|
this.user = user;
|
|
4848
4816
|
this.lists = lists;
|
|
4849
4817
|
this.task = task;
|
|
4850
4818
|
this.tasks = tasks;
|
|
4851
4819
|
this.disk = disk;
|
|
4852
|
-
this.
|
|
4820
|
+
this.bizProc = bizProc;
|
|
4853
4821
|
this.log = log;
|
|
4854
4822
|
this.calendar = calendar;
|
|
4855
4823
|
this.sonet_group = sonet_group;
|
|
@@ -4857,8 +4825,12 @@ class BXRest {
|
|
|
4857
4825
|
this.department = department;
|
|
4858
4826
|
this.im = im;
|
|
4859
4827
|
this.app = app;
|
|
4828
|
+
this.http = http;
|
|
4829
|
+
}
|
|
4830
|
+
profile() {
|
|
4831
|
+
return this.http.post(['profile']);
|
|
4860
4832
|
}
|
|
4861
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRest, deps: [{ token: BXRestUser }, { token: BXRestLists }, { token: BXRestTask }, { token: BXRestTasks }, { token: BXRestDisk }, { token:
|
|
4833
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRest, deps: [{ token: BXRestUser }, { token: BXRestLists }, { token: BXRestTask }, { token: BXRestTasks }, { token: BXRestDisk }, { token: BXRestBizProc }, { token: BXRestLog }, { token: BXRestCalendar }, { token: BXRestSonetGroup }, { token: BXRestServer }, { token: BXRestDepartment }, { token: BXRestIm }, { token: BXRestApp }, { token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4862
4834
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRest, providedIn: 'root' }); }
|
|
4863
4835
|
}
|
|
4864
4836
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRest, decorators: [{
|
|
@@ -4866,15 +4838,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
4866
4838
|
args: [{
|
|
4867
4839
|
providedIn: 'root'
|
|
4868
4840
|
}]
|
|
4869
|
-
}], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTask }, { type: BXRestTasks }, { type: BXRestDisk }, { type:
|
|
4841
|
+
}], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTask }, { type: BXRestTasks }, { type: BXRestDisk }, { type: BXRestBizProc }, { type: BXRestLog }, { type: BXRestCalendar }, { type: BXRestSonetGroup }, { type: BXRestServer }, { type: BXRestDepartment }, { type: BXRestIm }, { type: BXRestApp }, { type: HttpBXServices }]; } });
|
|
4870
4842
|
class BXRestNavvy {
|
|
4871
|
-
constructor(user, lists, task, tasks, disk,
|
|
4843
|
+
constructor(user, lists, task, tasks, disk, bizProc, log, calendar, sonet_group, server, department, im, app, BXRest, BXRestMap) {
|
|
4872
4844
|
this.user = user;
|
|
4873
4845
|
this.lists = lists;
|
|
4874
4846
|
this.task = task;
|
|
4875
4847
|
this.tasks = tasks;
|
|
4876
4848
|
this.disk = disk;
|
|
4877
|
-
this.
|
|
4849
|
+
this.bizProc = bizProc;
|
|
4878
4850
|
this.log = log;
|
|
4879
4851
|
this.calendar = calendar;
|
|
4880
4852
|
this.sonet_group = sonet_group;
|
|
@@ -4882,8 +4854,14 @@ class BXRestNavvy {
|
|
|
4882
4854
|
this.department = department;
|
|
4883
4855
|
this.im = im;
|
|
4884
4856
|
this.app = app;
|
|
4857
|
+
this.BXRest = BXRest;
|
|
4858
|
+
this.BXRestMap = BXRestMap;
|
|
4859
|
+
this.Navvy = new Navvy(this.BXRest, this.BXRestMap);
|
|
4860
|
+
}
|
|
4861
|
+
profile() {
|
|
4862
|
+
return this.Navvy.simple(this.BXRest.profile, this.BXRestMap.profile);
|
|
4885
4863
|
}
|
|
4886
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvy, deps: [{ token: BXRestNavvyUser }, { token: BXRestNavvyLists }, { token: BXRestNavvyTask }, { token: BXRestNavvyTasks }, { token: BXRestNavvyDisk }, { token:
|
|
4864
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvy, deps: [{ token: BXRestNavvyUser }, { token: BXRestNavvyLists }, { token: BXRestNavvyTask }, { token: BXRestNavvyTasks }, { token: BXRestNavvyDisk }, { token: BXRestNavvyBizProc }, { token: BXRestNavvyLog }, { token: BXRestNavvyCalendar }, { token: BXRestNavvySonetGroup }, { token: BXRestNavvyServer }, { token: BXRestNavvyDepartment }, { token: BXRestNavvyIm }, { token: BXRestNavvyApp }, { token: BXRest }, { token: BXRestMaps }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4887
4865
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvy, providedIn: 'root' }); }
|
|
4888
4866
|
}
|
|
4889
4867
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestNavvy, decorators: [{
|
|
@@ -4891,7 +4869,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
4891
4869
|
args: [{
|
|
4892
4870
|
providedIn: 'root'
|
|
4893
4871
|
}]
|
|
4894
|
-
}], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTask }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type:
|
|
4872
|
+
}], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTask }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type: BXRestNavvyBizProc }, { type: BXRestNavvyLog }, { type: BXRestNavvyCalendar }, { type: BXRestNavvySonetGroup }, { type: BXRestNavvyServer }, { type: BXRestNavvyDepartment }, { type: BXRestNavvyIm }, { type: BXRestNavvyApp }, { type: BXRest }, { type: BXRestMaps }]; } });
|
|
4895
4873
|
class BXRestMap {
|
|
4896
4874
|
constructor(lists) {
|
|
4897
4875
|
this.lists = lists;
|
|
@@ -5037,7 +5015,7 @@ class BXRestMapTask {
|
|
|
5037
5015
|
this.elapsedItem = elapsedItem;
|
|
5038
5016
|
this.stages = stages;
|
|
5039
5017
|
}
|
|
5040
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTask, deps: [{ token: BXRestMapTaskCommentItem }, { token:
|
|
5018
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTask, deps: [{ token: BXRestMapTaskCommentItem }, { token: BXRestMapTaskElapsedItem }, { token: BXRestMapTaskStage }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5041
5019
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTask, providedIn: 'root' }); }
|
|
5042
5020
|
}
|
|
5043
5021
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BXRestMapTask, decorators: [{
|
|
@@ -5045,7 +5023,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
|
|
|
5045
5023
|
args: [{
|
|
5046
5024
|
providedIn: 'root'
|
|
5047
5025
|
}]
|
|
5048
|
-
}], ctorParameters: function () { return [{ type: BXRestMapTaskCommentItem }, { type:
|
|
5026
|
+
}], ctorParameters: function () { return [{ type: BXRestMapTaskCommentItem }, { type: BXRestMapTaskElapsedItem }, { type: BXRestMapTaskStage }]; } });
|
|
5049
5027
|
|
|
5050
5028
|
class BXRestMapTasks {
|
|
5051
5029
|
constructor(task) {
|