ng2-rest 13.2.9 → 16.0.11
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/README.md +135 -135
- package/assets/shared/shared_folder_info.txt +1 -1
- package/browser/README.md +24 -24
- package/{client/esm2020 → browser/esm2022}/lib/cookie.mjs +3 -3
- package/browser/esm2022/lib/helpers.mjs +25 -0
- package/{websql/esm2020 → browser/esm2022}/lib/models.mjs +9 -9
- package/browser/esm2022/lib/other/simple-resource.mjs +119 -0
- package/browser/esm2022/lib/request-cache.mjs +102 -0
- package/browser/esm2022/lib/resource.service.mjs +221 -0
- package/browser/esm2022/lib/rest-headers.mjs +129 -0
- package/browser/esm2022/lib/rest-request.mjs +323 -0
- package/browser/esm2022/lib/rest.class.mjs +120 -0
- package/browser/{fesm2020 → fesm2022}/ng2-rest.mjs +73 -73
- package/browser/{fesm2020 → fesm2022}/ng2-rest.mjs.map +1 -1
- package/browser/lib/rest-headers.d.ts +1 -1
- package/browser/package.json +6 -12
- package/client/README.md +24 -24
- package/{browser/esm2020 → client/esm2022}/lib/cookie.mjs +3 -3
- package/client/esm2022/lib/helpers.mjs +25 -0
- package/client/esm2022/lib/models.mjs +160 -0
- package/client/esm2022/lib/other/simple-resource.mjs +119 -0
- package/client/esm2022/lib/request-cache.mjs +102 -0
- package/client/esm2022/lib/resource.service.mjs +221 -0
- package/client/esm2022/lib/rest-headers.mjs +129 -0
- package/client/esm2022/lib/rest-request.mjs +323 -0
- package/client/esm2022/lib/rest.class.mjs +120 -0
- package/client/{fesm2020 → fesm2022}/ng2-rest.mjs +73 -73
- package/client/{fesm2020 → fesm2022}/ng2-rest.mjs.map +1 -1
- package/client/lib/rest-headers.d.ts +1 -1
- package/client/package.json +84 -82
- package/index.js.map +1 -1
- package/lib/content-type.js.map +1 -1
- package/lib/cookie.js.map +1 -1
- package/lib/helpers.js +1 -2
- package/lib/helpers.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/mapping.js.map +1 -1
- package/lib/models.js.map +1 -1
- package/lib/other/simple-resource.js +1 -2
- package/lib/other/simple-resource.js.map +1 -1
- package/lib/params.js.map +1 -1
- package/lib/request-cache.js +1 -2
- package/lib/request-cache.js.map +1 -1
- package/lib/resource.service.js +1 -2
- package/lib/resource.service.js.map +1 -1
- package/lib/rest-headers.d.ts +1 -1
- package/lib/rest-headers.js.map +1 -1
- package/lib/rest-request.js +1 -2
- package/lib/rest-request.js.map +1 -1
- package/lib/rest.class.js.map +1 -1
- package/package.json +4 -4
- package/package.json_devDependencies.json +217 -217
- package/package.json_tnp.json5 +53 -53
- package/tmp-environment.json +89 -87
- package/websql/README.md +24 -24
- package/websql/{esm2020 → esm2022}/lib/cookie.mjs +3 -3
- package/websql/esm2022/lib/helpers.mjs +25 -0
- package/websql/esm2022/lib/models.mjs +160 -0
- package/websql/esm2022/lib/other/simple-resource.mjs +119 -0
- package/websql/esm2022/lib/request-cache.mjs +102 -0
- package/websql/esm2022/lib/resource.service.mjs +221 -0
- package/websql/esm2022/lib/rest-headers.mjs +129 -0
- package/websql/esm2022/lib/rest-request.mjs +323 -0
- package/websql/esm2022/lib/rest.class.mjs +120 -0
- package/websql/{fesm2020 → fesm2022}/ng2-rest.mjs +73 -73
- package/websql/{fesm2020 → fesm2022}/ng2-rest.mjs.map +1 -1
- package/websql/lib/rest-headers.d.ts +1 -1
- package/websql/package.json +6 -12
- package/browser/esm2020/lib/helpers.mjs +0 -24
- package/browser/esm2020/lib/models.mjs +0 -160
- package/browser/esm2020/lib/other/simple-resource.mjs +0 -118
- package/browser/esm2020/lib/request-cache.mjs +0 -101
- package/browser/esm2020/lib/resource.service.mjs +0 -220
- package/browser/esm2020/lib/rest-headers.mjs +0 -129
- package/browser/esm2020/lib/rest-request.mjs +0 -322
- package/browser/esm2020/lib/rest.class.mjs +0 -120
- package/browser/fesm2015/ng2-rest.mjs +0 -1739
- package/browser/fesm2015/ng2-rest.mjs.map +0 -1
- package/client/esm2020/lib/helpers.mjs +0 -24
- package/client/esm2020/lib/models.mjs +0 -160
- package/client/esm2020/lib/other/simple-resource.mjs +0 -118
- package/client/esm2020/lib/request-cache.mjs +0 -101
- package/client/esm2020/lib/resource.service.mjs +0 -220
- package/client/esm2020/lib/rest-headers.mjs +0 -129
- package/client/esm2020/lib/rest-request.mjs +0 -322
- package/client/esm2020/lib/rest.class.mjs +0 -120
- package/client/fesm2015/ng2-rest.mjs +0 -1739
- package/client/fesm2015/ng2-rest.mjs.map +0 -1
- package/websql/esm2020/lib/helpers.mjs +0 -24
- package/websql/esm2020/lib/other/simple-resource.mjs +0 -118
- package/websql/esm2020/lib/request-cache.mjs +0 -101
- package/websql/esm2020/lib/resource.service.mjs +0 -220
- package/websql/esm2020/lib/rest-headers.mjs +0 -129
- package/websql/esm2020/lib/rest-request.mjs +0 -322
- package/websql/esm2020/lib/rest.class.mjs +0 -120
- package/websql/fesm2015/ng2-rest.mjs +0 -1739
- package/websql/fesm2015/ng2-rest.mjs.map +0 -1
- /package/browser/{esm2020 → esm2022}/lib/content-type.mjs +0 -0
- /package/browser/{esm2020 → esm2022}/lib/index.mjs +0 -0
- /package/browser/{esm2020 → esm2022}/lib/mapping.mjs +0 -0
- /package/browser/{esm2020 → esm2022}/lib/params.mjs +0 -0
- /package/browser/{esm2020 → esm2022}/ng2-rest.mjs +0 -0
- /package/browser/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/browser/{ng2-rest.d.ts → index.d.ts} +0 -0
- /package/client/{esm2020 → esm2022}/lib/content-type.mjs +0 -0
- /package/client/{esm2020 → esm2022}/lib/index.mjs +0 -0
- /package/client/{esm2020 → esm2022}/lib/mapping.mjs +0 -0
- /package/client/{esm2020 → esm2022}/lib/params.mjs +0 -0
- /package/client/{esm2020 → esm2022}/ng2-rest.mjs +0 -0
- /package/client/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/client/{ng2-rest.d.ts → index.d.ts} +0 -0
- /package/websql/{esm2020 → esm2022}/lib/content-type.mjs +0 -0
- /package/websql/{esm2020 → esm2022}/lib/index.mjs +0 -0
- /package/websql/{esm2020 → esm2022}/lib/mapping.mjs +0 -0
- /package/websql/{esm2020 → esm2022}/lib/params.mjs +0 -0
- /package/websql/{esm2020 → esm2022}/ng2-rest.mjs +0 -0
- /package/websql/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/websql/{ng2-rest.d.ts → index.d.ts} +0 -0
|
@@ -255,6 +255,7 @@ var Mapping;
|
|
|
255
255
|
|
|
256
256
|
// @ts-ignore
|
|
257
257
|
class Helpers extends CoreHelpers {
|
|
258
|
+
static { this.JSON = JSON10; }
|
|
258
259
|
static get Mapping() {
|
|
259
260
|
return {
|
|
260
261
|
encode(json, mapping) {
|
|
@@ -270,7 +271,6 @@ class Helpers extends CoreHelpers {
|
|
|
270
271
|
return regex.test(url);
|
|
271
272
|
}
|
|
272
273
|
}
|
|
273
|
-
Helpers.JSON = JSON10;
|
|
274
274
|
;
|
|
275
275
|
({}); // @--end-of-file-for-module=ng2-rest lib/helpers.ts
|
|
276
276
|
|
|
@@ -550,6 +550,12 @@ function prepareUrlOldWay(params) {
|
|
|
550
550
|
({}); // @--end-of-file-for-module=ng2-rest lib/params.ts
|
|
551
551
|
|
|
552
552
|
class RestHeaders {
|
|
553
|
+
static from(headers) {
|
|
554
|
+
if (!headers) {
|
|
555
|
+
return void 0;
|
|
556
|
+
}
|
|
557
|
+
return new RestHeaders(headers);
|
|
558
|
+
}
|
|
553
559
|
constructor(headers) {
|
|
554
560
|
/** @internal header names are lower case */
|
|
555
561
|
this._headers = new Map();
|
|
@@ -568,12 +574,6 @@ class RestHeaders {
|
|
|
568
574
|
});
|
|
569
575
|
}
|
|
570
576
|
}
|
|
571
|
-
static from(headers) {
|
|
572
|
-
if (!headers) {
|
|
573
|
-
return void 0;
|
|
574
|
-
}
|
|
575
|
-
return new RestHeaders(headers);
|
|
576
|
-
}
|
|
577
577
|
/**
|
|
578
578
|
* Returns a new RestHeaders instance from the given DOMString of Response RestHeaders
|
|
579
579
|
*/
|
|
@@ -691,36 +691,6 @@ const CONTENT_TYPE = {
|
|
|
691
691
|
({}); // @--end-of-file-for-module=ng2-rest lib/content-type.ts
|
|
692
692
|
|
|
693
693
|
class Rest {
|
|
694
|
-
constructor(endpoint, request, meta, customContentType) {
|
|
695
|
-
this.request = request;
|
|
696
|
-
this.meta = meta;
|
|
697
|
-
this.customContentType = customContentType;
|
|
698
|
-
this._headers = RestHeaders.from(CONTENT_TYPE.APPLICATION_JSON);
|
|
699
|
-
this.array = {
|
|
700
|
-
get: (params = void 0, doNotSerializeParams) => {
|
|
701
|
-
return this.req('get', void 0, params, doNotSerializeParams, true);
|
|
702
|
-
},
|
|
703
|
-
head: (params = void 0, doNotSerializeParams) => {
|
|
704
|
-
return this.req('head', void 0, params, doNotSerializeParams, true);
|
|
705
|
-
},
|
|
706
|
-
post: (item, params, doNotSerializeParams) => {
|
|
707
|
-
return this.req('post', item, params, doNotSerializeParams, true);
|
|
708
|
-
},
|
|
709
|
-
put: (item, params, doNotSerializeParams) => {
|
|
710
|
-
return this.req('put', item, params, doNotSerializeParams, true);
|
|
711
|
-
},
|
|
712
|
-
patch: (item, params, doNotSerializeParams) => {
|
|
713
|
-
return this.req('patch', item, params, doNotSerializeParams, true);
|
|
714
|
-
},
|
|
715
|
-
delete: (params, doNotSerializeParams) => {
|
|
716
|
-
return this.req('delete', void 0, params, doNotSerializeParams, true);
|
|
717
|
-
},
|
|
718
|
-
jsonp: (params, doNotSerializeParams) => {
|
|
719
|
-
return this.req('jsonp', void 0, params, doNotSerializeParams, true);
|
|
720
|
-
}
|
|
721
|
-
};
|
|
722
|
-
this.__meta_endpoint = endpoint;
|
|
723
|
-
}
|
|
724
694
|
mock(mock) {
|
|
725
695
|
if ((typeof mock === 'function') || (typeof mock === 'object')) {
|
|
726
696
|
this.mockHttp = mock;
|
|
@@ -756,6 +726,36 @@ class Rest {
|
|
|
756
726
|
get headers() {
|
|
757
727
|
return this._headers;
|
|
758
728
|
}
|
|
729
|
+
constructor(endpoint, request, meta, customContentType) {
|
|
730
|
+
this.request = request;
|
|
731
|
+
this.meta = meta;
|
|
732
|
+
this.customContentType = customContentType;
|
|
733
|
+
this._headers = RestHeaders.from(CONTENT_TYPE.APPLICATION_JSON);
|
|
734
|
+
this.array = {
|
|
735
|
+
get: (params = void 0, doNotSerializeParams) => {
|
|
736
|
+
return this.req('get', void 0, params, doNotSerializeParams, true);
|
|
737
|
+
},
|
|
738
|
+
head: (params = void 0, doNotSerializeParams) => {
|
|
739
|
+
return this.req('head', void 0, params, doNotSerializeParams, true);
|
|
740
|
+
},
|
|
741
|
+
post: (item, params, doNotSerializeParams) => {
|
|
742
|
+
return this.req('post', item, params, doNotSerializeParams, true);
|
|
743
|
+
},
|
|
744
|
+
put: (item, params, doNotSerializeParams) => {
|
|
745
|
+
return this.req('put', item, params, doNotSerializeParams, true);
|
|
746
|
+
},
|
|
747
|
+
patch: (item, params, doNotSerializeParams) => {
|
|
748
|
+
return this.req('patch', item, params, doNotSerializeParams, true);
|
|
749
|
+
},
|
|
750
|
+
delete: (params, doNotSerializeParams) => {
|
|
751
|
+
return this.req('delete', void 0, params, doNotSerializeParams, true);
|
|
752
|
+
},
|
|
753
|
+
jsonp: (params, doNotSerializeParams) => {
|
|
754
|
+
return this.req('jsonp', void 0, params, doNotSerializeParams, true);
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
this.__meta_endpoint = endpoint;
|
|
758
|
+
}
|
|
759
759
|
req(method, requestBody, params, doNotSerializeParams = false, isArray = false) {
|
|
760
760
|
const modelUrl = this.creatUrl(params, doNotSerializeParams);
|
|
761
761
|
const body = (CLASS.getNameFromObject(requestBody) === 'FormData')
|
|
@@ -807,14 +807,14 @@ class Rest {
|
|
|
807
807
|
({}); // @--end-of-file-for-module=ng2-rest lib/rest.class.ts
|
|
808
808
|
|
|
809
809
|
class Cookie {
|
|
810
|
-
constructor() {
|
|
811
|
-
}
|
|
812
810
|
static get Instance() {
|
|
813
811
|
if (!Cookie.__instance) {
|
|
814
812
|
Cookie.__instance = new Cookie();
|
|
815
813
|
}
|
|
816
814
|
return Cookie.__instance;
|
|
817
815
|
}
|
|
816
|
+
constructor() {
|
|
817
|
+
}
|
|
818
818
|
read(name) {
|
|
819
819
|
var result = new RegExp('(?:^|; )' + encodeURIComponent(name) + '=([^;]*)').exec(document.cookie);
|
|
820
820
|
return result ? result[1] : null;
|
|
@@ -841,9 +841,9 @@ const log$2 = Log.create('request-cache', Level.__NOTHING);
|
|
|
841
841
|
* there is Cache API for that
|
|
842
842
|
*/
|
|
843
843
|
class RequestCache {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
}
|
|
844
|
+
static { this.LOCAL_STORAGE_KEY = 'ng2restrequestcache'; }
|
|
845
|
+
static { this.cached = []; }
|
|
846
|
+
static { this.isRestoredFromLocalStorage = false; }
|
|
847
847
|
static restoreFromLocalStorage() {
|
|
848
848
|
if (Helpers$1.isNode) {
|
|
849
849
|
return;
|
|
@@ -884,6 +884,9 @@ class RequestCache {
|
|
|
884
884
|
a.body === b.body);
|
|
885
885
|
});
|
|
886
886
|
}
|
|
887
|
+
constructor(response) {
|
|
888
|
+
this.response = response;
|
|
889
|
+
}
|
|
887
890
|
get containsCache() {
|
|
888
891
|
RequestCache.restoreFromLocalStorage();
|
|
889
892
|
return RequestCache.cached.includes(this);
|
|
@@ -926,9 +929,6 @@ class RequestCache {
|
|
|
926
929
|
}
|
|
927
930
|
}
|
|
928
931
|
}
|
|
929
|
-
RequestCache.LOCAL_STORAGE_KEY = 'ng2restrequestcache';
|
|
930
|
-
RequestCache.cached = [];
|
|
931
|
-
RequestCache.isRestoredFromLocalStorage = false;
|
|
932
932
|
;
|
|
933
933
|
({}); // @--end-of-file-for-module=ng2-rest lib/request-cache.ts
|
|
934
934
|
|
|
@@ -1018,17 +1018,17 @@ var Models;
|
|
|
1018
1018
|
}
|
|
1019
1019
|
Models.ErrorBody = ErrorBody;
|
|
1020
1020
|
class BaseResponse {
|
|
1021
|
+
static { this.cookies = Cookie.Instance; }
|
|
1022
|
+
get cookies() {
|
|
1023
|
+
return BaseResponse.cookies;
|
|
1024
|
+
}
|
|
1021
1025
|
constructor(responseText, headers, statusCode, isArray = false) {
|
|
1022
1026
|
this.responseText = responseText;
|
|
1023
1027
|
this.headers = headers;
|
|
1024
1028
|
this.statusCode = statusCode;
|
|
1025
1029
|
this.isArray = isArray;
|
|
1026
1030
|
}
|
|
1027
|
-
get cookies() {
|
|
1028
|
-
return BaseResponse.cookies;
|
|
1029
|
-
}
|
|
1030
1031
|
}
|
|
1031
|
-
BaseResponse.cookies = Cookie.Instance;
|
|
1032
1032
|
Models.BaseResponse = BaseResponse;
|
|
1033
1033
|
class HttpResponse extends BaseResponse {
|
|
1034
1034
|
constructor(sourceRequest, responseText, headers, statusCode, entity, circular, jobid, isArray = false) {
|
|
@@ -1096,6 +1096,7 @@ class RestRequest {
|
|
|
1096
1096
|
this.meta = {};
|
|
1097
1097
|
this.replaySubjects = {};
|
|
1098
1098
|
}
|
|
1099
|
+
static { this.jobId = 0; }
|
|
1099
1100
|
handlerResult(options, sourceRequest) {
|
|
1100
1101
|
if (_.isUndefined(options)) {
|
|
1101
1102
|
options = {};
|
|
@@ -1392,27 +1393,20 @@ class RestRequest {
|
|
|
1392
1393
|
setTimeout(() => this.req(url, method, headers, body, replay.id, isArray));
|
|
1393
1394
|
}
|
|
1394
1395
|
}
|
|
1395
|
-
RestRequest.jobId = 0;
|
|
1396
1396
|
;
|
|
1397
1397
|
({}); // @--end-of-file-for-module=ng2-rest lib/rest-request.ts
|
|
1398
1398
|
|
|
1399
1399
|
const log = Log.create('resouce-service', Level.__NOTHING);
|
|
1400
1400
|
class Resource {
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
const zone = this.getZone();
|
|
1404
|
-
if (!RestRequest.zone) {
|
|
1405
|
-
RestRequest.zone = zone;
|
|
1406
|
-
}
|
|
1407
|
-
;
|
|
1408
|
-
});
|
|
1409
|
-
}
|
|
1401
|
+
static { this._listenErrors = new Subject(); }
|
|
1402
|
+
static { this._listenSuccess = new Subject(); }
|
|
1410
1403
|
static get listenErrors() {
|
|
1411
1404
|
return this._listenErrors.asObservable();
|
|
1412
1405
|
}
|
|
1413
1406
|
static get listenSuccessOperations() {
|
|
1414
1407
|
return this._listenSuccess.asObservable();
|
|
1415
1408
|
}
|
|
1409
|
+
static { this.enableWarnings = true; }
|
|
1416
1410
|
getZone() {
|
|
1417
1411
|
const isNode = (typeof window === 'undefined');
|
|
1418
1412
|
if (isNode) {
|
|
@@ -1466,6 +1460,8 @@ class Resource {
|
|
|
1466
1460
|
}
|
|
1467
1461
|
return model;
|
|
1468
1462
|
}
|
|
1463
|
+
static { this.instance = new Resource(); }
|
|
1464
|
+
static { this.endpoints = {}; }
|
|
1469
1465
|
static getModel(endpoint, model) {
|
|
1470
1466
|
model = Resource.prepareModel(model);
|
|
1471
1467
|
const e = Resource.endpoints[endpoint];
|
|
@@ -1475,6 +1471,7 @@ class Resource {
|
|
|
1475
1471
|
const r = Resource.endpoints[endpoint].models[model];
|
|
1476
1472
|
return Resource.endpoints[endpoint].models[model];
|
|
1477
1473
|
}
|
|
1474
|
+
static { this.request = new RestRequest(); }
|
|
1478
1475
|
static create(e, model, entityMapping, circular, customContentType) {
|
|
1479
1476
|
const badRestRegEX = new RegExp('((\/:)[a-z]+)+', 'g');
|
|
1480
1477
|
const matchArr = model.match(badRestRegEX) || [];
|
|
@@ -1505,6 +1502,16 @@ Instead use nested approach: /book/:bookid/author/:authorid
|
|
|
1505
1502
|
static reset() {
|
|
1506
1503
|
Resource.endpoints = {};
|
|
1507
1504
|
}
|
|
1505
|
+
constructor() {
|
|
1506
|
+
setTimeout(() => {
|
|
1507
|
+
const zone = this.getZone();
|
|
1508
|
+
if (!RestRequest.zone) {
|
|
1509
|
+
RestRequest.zone = zone;
|
|
1510
|
+
}
|
|
1511
|
+
;
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
static { this.Cookies = Cookie.Instance; }
|
|
1508
1515
|
static map(endpoint, url) {
|
|
1509
1516
|
log.i('url', url);
|
|
1510
1517
|
let regex = /(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/;
|
|
@@ -1599,13 +1606,6 @@ Instead use nested approach: /book/:bookid/author/:authorid
|
|
|
1599
1606
|
return res;
|
|
1600
1607
|
}
|
|
1601
1608
|
}
|
|
1602
|
-
Resource._listenErrors = new Subject();
|
|
1603
|
-
Resource._listenSuccess = new Subject();
|
|
1604
|
-
Resource.enableWarnings = true;
|
|
1605
|
-
Resource.instance = new Resource();
|
|
1606
|
-
Resource.endpoints = {};
|
|
1607
|
-
Resource.request = new RestRequest();
|
|
1608
|
-
Resource.Cookies = Cookie.Instance;
|
|
1609
1609
|
;
|
|
1610
1610
|
({}); // @--end-of-file-for-module=ng2-rest lib/resource.service.ts
|
|
1611
1611
|
|
|
@@ -1622,6 +1622,8 @@ Resource.Cookies = Cookie.Instance;
|
|
|
1622
1622
|
* @template QP query parameter type
|
|
1623
1623
|
*/
|
|
1624
1624
|
class ExtendedResource {
|
|
1625
|
+
static { this.doNotSerializeQueryParams = false; }
|
|
1626
|
+
static { this.handlers = []; }
|
|
1625
1627
|
constructor(endpoint, path_model) {
|
|
1626
1628
|
this.endpoint = endpoint;
|
|
1627
1629
|
this.path_model = path_model;
|
|
@@ -1692,8 +1694,6 @@ class ExtendedResource {
|
|
|
1692
1694
|
this.rest = Resource.create(endpoint, path_model);
|
|
1693
1695
|
}
|
|
1694
1696
|
}
|
|
1695
|
-
ExtendedResource.doNotSerializeQueryParams = false;
|
|
1696
|
-
ExtendedResource.handlers = [];
|
|
1697
1697
|
/**
|
|
1698
1698
|
*
|
|
1699
1699
|
* @export
|
|
@@ -1704,10 +1704,7 @@ ExtendedResource.handlers = [];
|
|
|
1704
1704
|
* @template QP query parameters type
|
|
1705
1705
|
*/
|
|
1706
1706
|
class SimpleResource {
|
|
1707
|
-
|
|
1708
|
-
let rest = new ExtendedResource(endpoint, model);
|
|
1709
|
-
this.model = rest.model;
|
|
1710
|
-
}
|
|
1707
|
+
static { this._isSetQueryParamsSerialization = false; }
|
|
1711
1708
|
static set doNotSerializeQueryParams(value) {
|
|
1712
1709
|
if (!SimpleResource._isSetQueryParamsSerialization) {
|
|
1713
1710
|
SimpleResource._isSetQueryParamsSerialization = true;
|
|
@@ -1720,8 +1717,11 @@ class SimpleResource {
|
|
|
1720
1717
|
static __destroy() {
|
|
1721
1718
|
ExtendedResource.handlers.forEach(h => h.unsubscribe());
|
|
1722
1719
|
}
|
|
1720
|
+
constructor(endpoint, model) {
|
|
1721
|
+
let rest = new ExtendedResource(endpoint, model);
|
|
1722
|
+
this.model = rest.model;
|
|
1723
|
+
}
|
|
1723
1724
|
}
|
|
1724
|
-
SimpleResource._isSetQueryParamsSerialization = false;
|
|
1725
1725
|
;
|
|
1726
1726
|
({}); // @--end-of-file-for-module=ng2-rest lib/other/simple-resource.ts
|
|
1727
1727
|
|