bx-rest 0.0.22 → 0.0.23

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, NgModule, inject, Component, ViewEncapsulation, Inject } from '@angular/core';
2
+ import { NgModule, inject, Component, ViewEncapsulation, Inject, Injectable } from '@angular/core';
3
3
  import { map, catchError, tap, mergeMap as mergeMap$1, first } from 'rxjs/operators';
4
4
  import { Subscription, filter, take, of, throwError, forkJoin, mergeMap } from 'rxjs';
5
5
  import clone from 'just-clone';
@@ -92,47 +92,6 @@ const $id = 'id';
92
92
  const $element = 'element';
93
93
  const $url = 'url';
94
94
 
95
- class BXRestListsElement {
96
- constructor(http, mapResult) {
97
- this.http = http;
98
- this.mapResult = mapResult;
99
- this.url = {
100
- add: [$lists, $element, $add],
101
- delete: [$lists, $element, $delete],
102
- get: [$lists, $element, $get],
103
- update: [$lists, $element, $update],
104
- getFileUrl: [$lists, $element, $get, $file, $url] // Метод возвращает путь к файлу
105
- };
106
- }
107
- get(pram) {
108
- return this.http.post(this.url.get, pram)
109
- .pipe(map(v => (v && v.result)
110
- ? Object.assign(v, { result: v.result.map(i => this.mapResult.get(i)) })
111
- : undefined));
112
- }
113
- }
114
-
115
- class BXRestLists {
116
- constructor(element) {
117
- this.element = element;
118
- this.url = {
119
- add: [$lists, $add],
120
- delete: [$lists, $delete],
121
- get: [$lists, $get],
122
- update: [$lists, $update],
123
- getIblockTypeId: [$lists, $get, $iblock, $type, $id], // Метод возвращает id типа инфоблока
124
- };
125
- }
126
- }
127
- BXRestLists.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, deps: [{ token: BXRestListsElement }], target: i0.ɵɵFactoryTarget.Injectable });
128
- BXRestLists.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, providedIn: 'root' });
129
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, decorators: [{
130
- type: Injectable,
131
- args: [{
132
- providedIn: 'root'
133
- }]
134
- }], ctorParameters: function () { return [{ type: BXRestListsElement }]; } });
135
-
136
95
  class BxRestModule {
137
96
  }
138
97
  BxRestModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BxRestModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -1307,6 +1266,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1307
1266
  }]
1308
1267
  }] });
1309
1268
 
1269
+ let BaseMapServices$1 = class BaseMapServices extends BaseServices {
1270
+ };
1271
+ BaseMapServices$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseMapServices$1, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1272
+ BaseMapServices$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseMapServices$1, providedIn: 'root' });
1273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseMapServices$1, decorators: [{
1274
+ type: Injectable,
1275
+ args: [{
1276
+ providedIn: 'root'
1277
+ }]
1278
+ }] });
1279
+
1280
+ class BXRestListsElementMap extends BaseMapServices$1 {
1281
+ get(item) {
1282
+ return Object.assign(item, {
1283
+ BP_PUBLISHED: item.BP_PUBLISHED === 'Y',
1284
+ CREATED_BY: this.toNum(item.CREATED_BY),
1285
+ IBLOCK_ID: this.toNum(item.IBLOCK_ID),
1286
+ ID: this.toNum(item.ID)
1287
+ });
1288
+ }
1289
+ }
1290
+ BXRestListsElementMap.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElementMap, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1291
+ BXRestListsElementMap.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElementMap, providedIn: 'root' });
1292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElementMap, decorators: [{
1293
+ type: Injectable,
1294
+ args: [{
1295
+ providedIn: 'root'
1296
+ }]
1297
+ }] });
1298
+
1299
+ class BXRestListsElement {
1300
+ constructor(http, mapResult) {
1301
+ this.http = http;
1302
+ this.mapResult = mapResult;
1303
+ this.url = {
1304
+ add: [$lists, $element, $add],
1305
+ delete: [$lists, $element, $delete],
1306
+ get: [$lists, $element, $get],
1307
+ update: [$lists, $element, $update],
1308
+ getFileUrl: [$lists, $element, $get, $file, $url] // Метод возвращает путь к файлу
1309
+ };
1310
+ }
1311
+ get(pram) {
1312
+ return this.http.post(this.url.get, pram)
1313
+ .pipe(map(v => (v && v.result)
1314
+ ? Object.assign(v, { result: v.result.map(i => this.mapResult.get(i)) })
1315
+ : undefined));
1316
+ }
1317
+ }
1318
+ BXRestListsElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElement, deps: [{ token: HttpBXServices }, { token: BXRestListsElementMap }], target: i0.ɵɵFactoryTarget.Injectable });
1319
+ BXRestListsElement.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElement, providedIn: 'root' });
1320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestListsElement, decorators: [{
1321
+ type: Injectable,
1322
+ args: [{
1323
+ providedIn: 'root'
1324
+ }]
1325
+ }], ctorParameters: function () { return [{ type: HttpBXServices }, { type: BXRestListsElementMap }]; } });
1326
+
1327
+ class BXRestLists {
1328
+ constructor(element) {
1329
+ this.element = element;
1330
+ this.url = {
1331
+ add: [$lists, $add],
1332
+ delete: [$lists, $delete],
1333
+ get: [$lists, $get],
1334
+ update: [$lists, $update],
1335
+ getIblockTypeId: [$lists, $get, $iblock, $type, $id], // Метод возвращает id типа инфоблока
1336
+ };
1337
+ }
1338
+ }
1339
+ BXRestLists.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, deps: [{ token: BXRestListsElement }], target: i0.ɵɵFactoryTarget.Injectable });
1340
+ BXRestLists.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, providedIn: 'root' });
1341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BXRestLists, decorators: [{
1342
+ type: Injectable,
1343
+ args: [{
1344
+ providedIn: 'root'
1345
+ }]
1346
+ }], ctorParameters: function () { return [{ type: BXRestListsElement }]; } });
1347
+
1310
1348
  const save = createAction('[Users Component] Save', props());
1311
1349
  const saveArr = createAction('[Users Component] Save Arr', props());
1312
1350
  const update = createAction('[Users Component] Update', props());