@sd-angular/core 0.0.882 → 0.0.886
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/api/src/lib/api.model.d.ts +2 -2
- package/assets/ckeditor/plugins/notification/plugin.js +1 -1
- package/assets/ckeditor/plugins/videoembed/.gitattributes +17 -0
- package/assets/ckeditor/plugins/wordcount/lang/ca.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/cs.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/de.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/el.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/en.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/es.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/eu.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/fa.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/fr.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/he.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/hr.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/hu.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/ja.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/nl.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/no.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/pl.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/pt-br.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/ro.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/ru.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/sk.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/sv.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/tr.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/uk.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/zh-cn.js +1 -1
- package/assets/ckeditor/plugins/wordcount/lang/zh.js +1 -1
- package/assets/ckeditor/plugins/wordcount/samples/wordcount.html +1 -1
- package/assets/ckeditor/plugins/wordcount/samples/wordcountWithMaxCount.html +1 -1
- package/bundles/sd-angular-core-api.umd.js +134 -121
- package/bundles/sd-angular-core-api.umd.js.map +1 -1
- package/bundles/sd-angular-core-api.umd.min.js +1 -1
- package/bundles/sd-angular-core-api.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-cache.umd.js +151 -13
- package/bundles/sd-angular-core-cache.umd.js.map +1 -1
- package/bundles/sd-angular-core-cache.umd.min.js +2 -2
- package/bundles/sd-angular-core-cache.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.js +33 -24
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-upload-excel.umd.js +1 -0
- package/bundles/sd-angular-core-upload-excel.umd.js.map +1 -1
- package/bundles/sd-angular-core-upload-excel.umd.min.js +1 -1
- package/bundles/sd-angular-core-upload-excel.umd.min.js.map +1 -1
- package/cache/sd-angular-core-cache.metadata.json +1 -1
- package/cache/src/lib/cache.model.d.ts +27 -4
- package/cache/src/lib/cache.service.d.ts +3 -2
- package/esm2015/api/src/lib/api.model.js +1 -1
- package/esm2015/api/src/lib/http.interceptor.js +13 -6
- package/esm2015/cache/src/lib/cache.model.js +1 -1
- package/esm2015/cache/src/lib/cache.service.js +115 -11
- package/esm2015/grid-material/src/lib/components/grid-filter/grid-filter.component.js +8 -7
- package/esm2015/grid-material/src/lib/grid-material.component.js +8 -1
- package/esm2015/grid-material/src/lib/models/grid-column.model.js +1 -1
- package/esm2015/upload-excel/src/lib/upload-excel.component.js +2 -1
- package/fesm2015/sd-angular-core-api.js +12 -6
- package/fesm2015/sd-angular-core-api.js.map +1 -1
- package/fesm2015/sd-angular-core-cache.js +114 -10
- package/fesm2015/sd-angular-core-cache.js.map +1 -1
- package/fesm2015/sd-angular-core-grid-material.js +14 -6
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/fesm2015/sd-angular-core-upload-excel.js +1 -0
- package/fesm2015/sd-angular-core-upload-excel.js.map +1 -1
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/grid-material/src/lib/models/grid-column.model.d.ts +1 -0
- package/package.json +1 -1
- package/{sd-angular-core-0.0.882.tgz → sd-angular-core-0.0.886.tgz} +0 -0
|
@@ -4,8 +4,8 @@ export interface IApiConfiguration {
|
|
|
4
4
|
host?: string;
|
|
5
5
|
tokenHeader?: string;
|
|
6
6
|
customHeaders?: () => HttpHeaders;
|
|
7
|
-
beforeRemote?: (request: HttpRequest<any>) => void
|
|
8
|
-
afterRemote?: (response: HttpResponse<any> | HttpErrorResponse) => void
|
|
7
|
+
beforeRemote?: (request: HttpRequest<any>) => void | Promise<void>;
|
|
8
|
+
afterRemote?: (response: HttpResponse<any> | HttpErrorResponse) => void | Promise<void>;
|
|
9
9
|
translate?: (value: string) => string;
|
|
10
10
|
}
|
|
11
11
|
export declare const API_CONFIG: InjectionToken<IApiConfiguration>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
|
3
|
+
|
|
4
|
+
# Custom for Visual Studio
|
|
5
|
+
*.cs diff=csharp
|
|
6
|
+
|
|
7
|
+
# Standard to msysgit
|
|
8
|
+
*.doc diff=astextplain
|
|
9
|
+
*.DOC diff=astextplain
|
|
10
|
+
*.docx diff=astextplain
|
|
11
|
+
*.DOCX diff=astextplain
|
|
12
|
+
*.dot diff=astextplain
|
|
13
|
+
*.DOT diff=astextplain
|
|
14
|
+
*.pdf diff=astextplain
|
|
15
|
+
*.PDF diff=astextplain
|
|
16
|
+
*.rtf diff=astextplain
|
|
17
|
+
*.RTF diff=astextplain
|
|
@@ -31,127 +31,6 @@
|
|
|
31
31
|
var hash__namespace = /*#__PURE__*/_interopNamespace(hash);
|
|
32
32
|
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
|
33
33
|
|
|
34
|
-
var API_CONFIG = new i0.InjectionToken('api.configuration');
|
|
35
|
-
var TOKEN = hash__default['default']({
|
|
36
|
-
origin: location.origin,
|
|
37
|
-
key: 'ed4a2ffc-af43-41fb-9ac9-970f43d99571'
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
var SdTokenService = /** @class */ (function () {
|
|
41
|
-
function SdTokenService(configuration, cacheService) {
|
|
42
|
-
var _this = this;
|
|
43
|
-
this.configuration = configuration;
|
|
44
|
-
this.cacheService = cacheService;
|
|
45
|
-
this.set = function (token) {
|
|
46
|
-
var set = _this.cacheService.create(TOKEN, {
|
|
47
|
-
type: 'local',
|
|
48
|
-
hours: 240
|
|
49
|
-
}).set;
|
|
50
|
-
set(token);
|
|
51
|
-
};
|
|
52
|
-
this.clear = function () {
|
|
53
|
-
var remove = _this.cacheService.create(TOKEN, {
|
|
54
|
-
type: 'local',
|
|
55
|
-
hours: 240
|
|
56
|
-
}).remove;
|
|
57
|
-
remove();
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
Object.defineProperty(SdTokenService.prototype, "token", {
|
|
61
|
-
get: function () {
|
|
62
|
-
var get = this.cacheService.create(TOKEN, {
|
|
63
|
-
type: 'local',
|
|
64
|
-
hours: 240
|
|
65
|
-
}).get;
|
|
66
|
-
return get();
|
|
67
|
-
},
|
|
68
|
-
enumerable: false,
|
|
69
|
-
configurable: true
|
|
70
|
-
});
|
|
71
|
-
Object.defineProperty(SdTokenService.prototype, "customHeaders", {
|
|
72
|
-
get: function () {
|
|
73
|
-
var _a, _b;
|
|
74
|
-
return ((_b = (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.customHeaders) === null || _b === void 0 ? void 0 : _b.call(_a)) || null;
|
|
75
|
-
},
|
|
76
|
-
enumerable: false,
|
|
77
|
-
configurable: true
|
|
78
|
-
});
|
|
79
|
-
return SdTokenService;
|
|
80
|
-
}());
|
|
81
|
-
SdTokenService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SdTokenService_Factory() { return new SdTokenService(i0.ɵɵinject(API_CONFIG, 8), i0.ɵɵinject(i2.SdCacheService)); }, token: SdTokenService, providedIn: "root" });
|
|
82
|
-
SdTokenService.decorators = [
|
|
83
|
-
{ type: i0.Injectable, args: [{
|
|
84
|
-
providedIn: 'root'
|
|
85
|
-
},] }
|
|
86
|
-
];
|
|
87
|
-
SdTokenService.ctorParameters = function () { return [
|
|
88
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [API_CONFIG,] }, { type: i0.Optional }] },
|
|
89
|
-
{ type: i2.SdCacheService }
|
|
90
|
-
]; };
|
|
91
|
-
|
|
92
|
-
var SdHttpInterceptor = /** @class */ (function () {
|
|
93
|
-
function SdHttpInterceptor(configuration, tokenService) {
|
|
94
|
-
this.configuration = configuration;
|
|
95
|
-
this.tokenService = tokenService;
|
|
96
|
-
}
|
|
97
|
-
SdHttpInterceptor.prototype.intercept = function (request, next) {
|
|
98
|
-
var _this = this;
|
|
99
|
-
var _a, _b, _c, _d;
|
|
100
|
-
if (((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.tokenHeader) && this.tokenService.token) {
|
|
101
|
-
request = request.clone({ headers: request.headers.set(this.configuration.tokenHeader, this.tokenService.token) });
|
|
102
|
-
}
|
|
103
|
-
if (!request.url.startsWith('http')) {
|
|
104
|
-
request = request.clone({
|
|
105
|
-
url: (((_b = this.configuration) === null || _b === void 0 ? void 0 : _b.host) || location.host) + request.url
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
if (request.body instanceof FormData) {
|
|
109
|
-
request = request.clone({
|
|
110
|
-
headers: request.headers.delete('Content-Type')
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
(_d = (_c = this.configuration) === null || _c === void 0 ? void 0 : _c.beforeRemote) === null || _d === void 0 ? void 0 : _d.call(_c, request);
|
|
114
|
-
return next.handle(request).pipe(operators.map(function (event) {
|
|
115
|
-
var _a, _b;
|
|
116
|
-
if (event instanceof i1.HttpResponse) {
|
|
117
|
-
(_b = (_a = _this.configuration) === null || _a === void 0 ? void 0 : _a.afterRemote) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
118
|
-
}
|
|
119
|
-
return event;
|
|
120
|
-
}), operators.catchError(function (error) {
|
|
121
|
-
var _a, _b;
|
|
122
|
-
(_b = (_a = _this.configuration) === null || _a === void 0 ? void 0 : _a.afterRemote) === null || _b === void 0 ? void 0 : _b.call(_a, error);
|
|
123
|
-
return rxjs.throwError(error);
|
|
124
|
-
}));
|
|
125
|
-
};
|
|
126
|
-
return SdHttpInterceptor;
|
|
127
|
-
}());
|
|
128
|
-
SdHttpInterceptor.decorators = [
|
|
129
|
-
{ type: i0.Injectable }
|
|
130
|
-
];
|
|
131
|
-
SdHttpInterceptor.ctorParameters = function () { return [
|
|
132
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [API_CONFIG,] }, { type: i0.Optional }] },
|
|
133
|
-
{ type: SdTokenService }
|
|
134
|
-
]; };
|
|
135
|
-
|
|
136
|
-
var SdApiModule = /** @class */ (function () {
|
|
137
|
-
function SdApiModule() {
|
|
138
|
-
}
|
|
139
|
-
return SdApiModule;
|
|
140
|
-
}());
|
|
141
|
-
SdApiModule.decorators = [
|
|
142
|
-
{ type: i0.NgModule, args: [{
|
|
143
|
-
imports: [
|
|
144
|
-
i1.HttpClientModule,
|
|
145
|
-
],
|
|
146
|
-
exports: [
|
|
147
|
-
i1.HttpClientModule
|
|
148
|
-
],
|
|
149
|
-
providers: [
|
|
150
|
-
{ provide: i1.HTTP_INTERCEPTORS, useClass: SdHttpInterceptor, multi: true }
|
|
151
|
-
],
|
|
152
|
-
},] }
|
|
153
|
-
];
|
|
154
|
-
|
|
155
34
|
/*! *****************************************************************************
|
|
156
35
|
Copyright (c) Microsoft Corporation.
|
|
157
36
|
|
|
@@ -453,6 +332,140 @@
|
|
|
453
332
|
return value;
|
|
454
333
|
}
|
|
455
334
|
|
|
335
|
+
var API_CONFIG = new i0.InjectionToken('api.configuration');
|
|
336
|
+
var TOKEN = hash__default['default']({
|
|
337
|
+
origin: location.origin,
|
|
338
|
+
key: 'ed4a2ffc-af43-41fb-9ac9-970f43d99571'
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
var SdTokenService = /** @class */ (function () {
|
|
342
|
+
function SdTokenService(configuration, cacheService) {
|
|
343
|
+
var _this = this;
|
|
344
|
+
this.configuration = configuration;
|
|
345
|
+
this.cacheService = cacheService;
|
|
346
|
+
this.set = function (token) {
|
|
347
|
+
var set = _this.cacheService.create(TOKEN, {
|
|
348
|
+
type: 'local',
|
|
349
|
+
hours: 240
|
|
350
|
+
}).set;
|
|
351
|
+
set(token);
|
|
352
|
+
};
|
|
353
|
+
this.clear = function () {
|
|
354
|
+
var remove = _this.cacheService.create(TOKEN, {
|
|
355
|
+
type: 'local',
|
|
356
|
+
hours: 240
|
|
357
|
+
}).remove;
|
|
358
|
+
remove();
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
Object.defineProperty(SdTokenService.prototype, "token", {
|
|
362
|
+
get: function () {
|
|
363
|
+
var get = this.cacheService.create(TOKEN, {
|
|
364
|
+
type: 'local',
|
|
365
|
+
hours: 240
|
|
366
|
+
}).get;
|
|
367
|
+
return get();
|
|
368
|
+
},
|
|
369
|
+
enumerable: false,
|
|
370
|
+
configurable: true
|
|
371
|
+
});
|
|
372
|
+
Object.defineProperty(SdTokenService.prototype, "customHeaders", {
|
|
373
|
+
get: function () {
|
|
374
|
+
var _a, _b;
|
|
375
|
+
return ((_b = (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.customHeaders) === null || _b === void 0 ? void 0 : _b.call(_a)) || null;
|
|
376
|
+
},
|
|
377
|
+
enumerable: false,
|
|
378
|
+
configurable: true
|
|
379
|
+
});
|
|
380
|
+
return SdTokenService;
|
|
381
|
+
}());
|
|
382
|
+
SdTokenService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SdTokenService_Factory() { return new SdTokenService(i0.ɵɵinject(API_CONFIG, 8), i0.ɵɵinject(i2.SdCacheService)); }, token: SdTokenService, providedIn: "root" });
|
|
383
|
+
SdTokenService.decorators = [
|
|
384
|
+
{ type: i0.Injectable, args: [{
|
|
385
|
+
providedIn: 'root'
|
|
386
|
+
},] }
|
|
387
|
+
];
|
|
388
|
+
SdTokenService.ctorParameters = function () { return [
|
|
389
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [API_CONFIG,] }, { type: i0.Optional }] },
|
|
390
|
+
{ type: i2.SdCacheService }
|
|
391
|
+
]; };
|
|
392
|
+
|
|
393
|
+
var SdHttpInterceptor = /** @class */ (function () {
|
|
394
|
+
function SdHttpInterceptor(configuration, tokenService) {
|
|
395
|
+
this.configuration = configuration;
|
|
396
|
+
this.tokenService = tokenService;
|
|
397
|
+
}
|
|
398
|
+
SdHttpInterceptor.prototype.intercept = function (request, next) {
|
|
399
|
+
var _this = this;
|
|
400
|
+
var _a, _b;
|
|
401
|
+
if (((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.tokenHeader) && this.tokenService.token) {
|
|
402
|
+
request = request.clone({ headers: request.headers.set(this.configuration.tokenHeader, this.tokenService.token) });
|
|
403
|
+
}
|
|
404
|
+
if (!request.url.startsWith('http')) {
|
|
405
|
+
request = request.clone({
|
|
406
|
+
url: (((_b = this.configuration) === null || _b === void 0 ? void 0 : _b.host) || location.host) + request.url
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
if (request.body instanceof FormData) {
|
|
410
|
+
request = request.clone({
|
|
411
|
+
headers: request.headers.delete('Content-Type')
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
return rxjs.of(request).pipe(operators.switchMap(function (req) { return __awaiter(_this, void 0, void 0, function () {
|
|
415
|
+
var _c, _d, beforeRemote;
|
|
416
|
+
return __generator(this, function (_e) {
|
|
417
|
+
switch (_e.label) {
|
|
418
|
+
case 0:
|
|
419
|
+
beforeRemote = (_d = (_c = this.configuration) === null || _c === void 0 ? void 0 : _c.beforeRemote) === null || _d === void 0 ? void 0 : _d.call(_c, req);
|
|
420
|
+
if (!(beforeRemote instanceof Promise)) return [3 /*break*/, 2];
|
|
421
|
+
return [4 /*yield*/, beforeRemote];
|
|
422
|
+
case 1:
|
|
423
|
+
_e.sent();
|
|
424
|
+
_e.label = 2;
|
|
425
|
+
case 2: return [2 /*return*/, req];
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
}); }), operators.switchMap(next.handle)).pipe(operators.map(function (event) {
|
|
429
|
+
var _a, _b;
|
|
430
|
+
if (event instanceof i1.HttpResponse) {
|
|
431
|
+
(_b = (_a = _this.configuration) === null || _a === void 0 ? void 0 : _a.afterRemote) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
432
|
+
}
|
|
433
|
+
return event;
|
|
434
|
+
}), operators.catchError(function (error) {
|
|
435
|
+
var _a, _b;
|
|
436
|
+
(_b = (_a = _this.configuration) === null || _a === void 0 ? void 0 : _a.afterRemote) === null || _b === void 0 ? void 0 : _b.call(_a, error);
|
|
437
|
+
return rxjs.throwError(error);
|
|
438
|
+
}));
|
|
439
|
+
};
|
|
440
|
+
return SdHttpInterceptor;
|
|
441
|
+
}());
|
|
442
|
+
SdHttpInterceptor.decorators = [
|
|
443
|
+
{ type: i0.Injectable }
|
|
444
|
+
];
|
|
445
|
+
SdHttpInterceptor.ctorParameters = function () { return [
|
|
446
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [API_CONFIG,] }, { type: i0.Optional }] },
|
|
447
|
+
{ type: SdTokenService }
|
|
448
|
+
]; };
|
|
449
|
+
|
|
450
|
+
var SdApiModule = /** @class */ (function () {
|
|
451
|
+
function SdApiModule() {
|
|
452
|
+
}
|
|
453
|
+
return SdApiModule;
|
|
454
|
+
}());
|
|
455
|
+
SdApiModule.decorators = [
|
|
456
|
+
{ type: i0.NgModule, args: [{
|
|
457
|
+
imports: [
|
|
458
|
+
i1.HttpClientModule,
|
|
459
|
+
],
|
|
460
|
+
exports: [
|
|
461
|
+
i1.HttpClientModule
|
|
462
|
+
],
|
|
463
|
+
providers: [
|
|
464
|
+
{ provide: i1.HTTP_INTERCEPTORS, useClass: SdHttpInterceptor, multi: true }
|
|
465
|
+
],
|
|
466
|
+
},] }
|
|
467
|
+
];
|
|
468
|
+
|
|
456
469
|
var _timeout, _cacheDuration, _cache, _defineParams;
|
|
457
470
|
var SdApiService = /** @class */ (function () {
|
|
458
471
|
function SdApiService(httpClient, configuration, cacheService, tokenService) {
|