monkey-front-core 0.0.119 → 0.0.122
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/esm2020/lib/core/model/monkeyecx-model.mjs +18 -3
- package/fesm2015/monkey-front-core.mjs +15 -3
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +18 -3
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/model/monkeyecx-model.d.ts +7 -2
- package/monkey-front-core-0.0.122.tgz +0 -0
- package/package.json +3 -3
- package/monkey-front-core-0.0.119.tgz +0 -0
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
export class Link {
|
|
2
|
+
constructor(data) {
|
|
3
|
+
this.href = data?.href;
|
|
4
|
+
this.type = data?.type;
|
|
5
|
+
this.templated = data?.templated;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
1
8
|
export class MonkeyEcxModel {
|
|
2
|
-
getAction(type) {
|
|
9
|
+
getAction(type, replaceOptions) {
|
|
3
10
|
const { _links } = this;
|
|
4
11
|
if (!_links)
|
|
5
12
|
return null;
|
|
6
|
-
|
|
13
|
+
let link = _links[type.toLowerCase()];
|
|
14
|
+
link = new Link(link);
|
|
15
|
+
if (link && replaceOptions && link?.templated) {
|
|
16
|
+
const { from, to } = replaceOptions;
|
|
17
|
+
link = new Link({
|
|
18
|
+
...link,
|
|
19
|
+
href: `${link.href}`.replace(from, to),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
7
22
|
return link;
|
|
8
23
|
}
|
|
9
24
|
}
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ua2V5ZWN4LW1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbW9ua2V5LWZyb250LWNvcmUvc3Jj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Xhwb3J0IGNsYXNzIExpbmsge1xuICBocmVmOiBzdHJpbmc7XG5cbiAgdHlwZTogc3RyaW5nO1xuXG4gIHRlbXBsYXRlZDogYm9vbGVhbjtcblxuICBjb25zdHJ1Y3RvcihkYXRhPzogYW55KSB7XG4gICAgdGhpcy5ocmVmID0gZGF0YT8uaHJlZjtcbiAgICB0aGlzLnR5cGUgPSBkYXRhPy50eXBlO1xuICAgIHRoaXMudGVtcGxhdGVkID0gZGF0YT8udGVtcGxhdGVkO1xuICB9XG59XG5cbmV4cG9ydCBjbGFzcyBNb25rZXlFY3hNb2RlbCB7XG4gIF9saW5rczogYW55O1xuXG4gIHB1YmxpYyBnZXRBY3Rpb24oXG4gICAgdHlwZTogc3RyaW5nLFxuICAgIHJlcGxhY2VPcHRpb25zPzoge1xuICAgICAgZnJvbTogc3RyaW5nO1xuICAgICAgdG86IHN0cmluZztcbiAgICB9XG4gICk6IExpbmsgfCBudWxsIHtcbiAgICBjb25zdCB7IF9saW5rcyB9ID0gdGhpcztcbiAgICBpZiAoIV9saW5rcykgcmV0dXJuIG51bGw7XG4gICAgbGV0IGxpbms6IExpbmsgPSBfbGlua3NbdHlwZS50b0xvd2VyQ2FzZSgpXTtcbiAgICBsaW5rID0gbmV3IExpbmsobGluayk7XG4gICAgaWYgKGxpbmsgJiYgcmVwbGFjZU9wdGlvbnMgJiYgbGluaz8udGVtcGxhdGVkKSB7XG4gICAgICBjb25zdCB7IGZyb20sIHRvIH0gPSByZXBsYWNlT3B0aW9ucztcbiAgICAgIGxpbmsgPSBuZXcgTGluayh7XG4gICAgICAgIC4uLmxpbmssXG4gICAgICAgIGhyZWY6IGAke2xpbmsuaHJlZn1gLnJlcGxhY2UoZnJvbSwgdG8pLFxuICAgICAgfSk7XG4gICAgfVxuICAgIHJldHVybiBsaW5rO1xuICB9XG59XG4iXX0=
|
|
@@ -3776,12 +3776,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
3776
3776
|
}]
|
|
3777
3777
|
}] });
|
|
3778
3778
|
|
|
3779
|
+
class Link {
|
|
3780
|
+
constructor(data) {
|
|
3781
|
+
this.href = data === null || data === void 0 ? void 0 : data.href;
|
|
3782
|
+
this.type = data === null || data === void 0 ? void 0 : data.type;
|
|
3783
|
+
this.templated = data === null || data === void 0 ? void 0 : data.templated;
|
|
3784
|
+
}
|
|
3785
|
+
}
|
|
3779
3786
|
class MonkeyEcxModel {
|
|
3780
|
-
getAction(type) {
|
|
3787
|
+
getAction(type, replaceOptions) {
|
|
3781
3788
|
const { _links } = this;
|
|
3782
3789
|
if (!_links)
|
|
3783
3790
|
return null;
|
|
3784
|
-
|
|
3791
|
+
let link = _links[type.toLowerCase()];
|
|
3792
|
+
link = new Link(link);
|
|
3793
|
+
if (link && replaceOptions && (link === null || link === void 0 ? void 0 : link.templated)) {
|
|
3794
|
+
const { from, to } = replaceOptions;
|
|
3795
|
+
link = new Link(Object.assign(Object.assign({}, link), { href: `${link.href}`.replace(from, to) }));
|
|
3796
|
+
}
|
|
3785
3797
|
return link;
|
|
3786
3798
|
}
|
|
3787
3799
|
}
|
|
@@ -4259,5 +4271,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
4259
4271
|
* Generated bundle index. Do not edit.
|
|
4260
4272
|
*/
|
|
4261
4273
|
|
|
4262
|
-
export { ClosedToMaintenanceComponent, ClosedToMaintenanceModule, decoratorsUtils as DecoratorsUtils, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPipesModule, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModuleModule, OpSearch, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
4274
|
+
export { ClosedToMaintenanceComponent, ClosedToMaintenanceModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPipesModule, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModuleModule, OpSearch, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
4263
4275
|
//# sourceMappingURL=monkey-front-core.mjs.map
|