@smartbit4all/ng-client 1.1.30 → 1.1.32
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/smart-client/smart-component-api-client.mjs +16 -2
- package/esm2020/lib/view-context/api/api/view.service.mjs +161 -3
- package/esm2020/lib/view-context/api/model/componentModel.mjs +1 -1
- package/esm2020/lib/view-context/api/model/models.mjs +4 -1
- package/esm2020/lib/view-context/api/model/uiActionConstraint.mjs +13 -0
- package/esm2020/lib/view-context/api/model/uiActionDescriptor.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionInputType.mjs +4 -2
- package/esm2020/lib/view-context/api/model/uiActionUploadDescriptor.mjs +13 -0
- package/esm2020/lib/view-context/api/model/uploadedFile.mjs +13 -0
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.mjs +68 -0
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.mjs +53 -0
- package/esm2020/lib/view-context/smart-ui-action/ui-action.service.mjs +32 -5
- package/esm2020/lib/view-context/smart-view-context.module.mjs +5 -2
- package/esm2020/lib/view-context/smart-view-context.service.mjs +27 -1
- package/fesm2015/smartbit4all-ng-client.mjs +360 -15
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +385 -15
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/view-context/api/api/view.service.d.ts +47 -0
- package/lib/view-context/api/model/componentModel.d.ts +4 -0
- package/lib/view-context/api/model/models.d.ts +3 -0
- package/lib/view-context/api/model/uiActionConstraint.d.ts +22 -0
- package/lib/view-context/api/model/uiActionDescriptor.d.ts +2 -0
- package/lib/view-context/api/model/uiActionInputType.d.ts +3 -1
- package/lib/view-context/api/model/uiActionUploadDescriptor.d.ts +23 -0
- package/lib/view-context/api/model/uploadedFile.d.ts +19 -0
- package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.d.ts +30 -0
- package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.d.ts +22 -0
- package/lib/view-context/smart-ui-action/ui-action.service.d.ts +4 -1
- package/lib/view-context/smart-view-context.module.d.ts +10 -9
- package/lib/view-context/smart-view-context.service.d.ts +4 -0
- package/package.json +1 -1
- package/smartbit4all-ng-client-1.1.32.tgz +0 -0
- package/smartbit4all-ng-client-1.1.30.tgz +0 -0
|
@@ -4,7 +4,7 @@ import { __awaiter, __decorate, __param } from 'tslib';
|
|
|
4
4
|
import { Subject, takeUntil, map, catchError, throwError, from } from 'rxjs';
|
|
5
5
|
import { SmartSubject } from '@smartbit4all/subject';
|
|
6
6
|
import * as i1 from '@angular/common/http';
|
|
7
|
-
import { HttpHeaders, HttpContext, HttpEventType, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
7
|
+
import { HttpHeaders, HttpContext, HttpParams, HttpEventType, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
8
8
|
import * as i4 from '@angular/common';
|
|
9
9
|
import { isPlatformBrowser, DOCUMENT, DatePipe, CommonModule } from '@angular/common';
|
|
10
10
|
import * as i2 from '@angular/material/button';
|
|
@@ -15,15 +15,15 @@ import * as i3$1 from '@smartbit4all/navigation';
|
|
|
15
15
|
import * as i4$1 from '@smartbit4all/dialog';
|
|
16
16
|
import { SmartdialogService, SmartdialogModule } from '@smartbit4all/dialog';
|
|
17
17
|
import { MatCommonModule } from '@angular/material/core';
|
|
18
|
-
import * as i4$
|
|
18
|
+
import * as i4$3 from '@angular/material/expansion';
|
|
19
19
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
20
20
|
import { BrowserModule } from '@angular/platform-browser';
|
|
21
|
-
import * as
|
|
21
|
+
import * as i4$2 from '@smartbit4all/icon';
|
|
22
22
|
import { SmartIconModule } from '@smartbit4all/icon';
|
|
23
23
|
import * as i1$1 from '@angular/material/dialog';
|
|
24
24
|
import * as i2$1 from '@angular/router';
|
|
25
25
|
import { catchError as catchError$1, switchMap } from 'rxjs/operators';
|
|
26
|
-
import * as
|
|
26
|
+
import * as i4$4 from '@angular/material/snack-bar';
|
|
27
27
|
import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
|
|
28
28
|
import { Validators } from '@angular/forms';
|
|
29
29
|
import * as i5 from '@smartbit4all/form';
|
|
@@ -1058,6 +1058,19 @@ class ViewService {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
1060
1060
|
}
|
|
1061
|
+
/**
|
|
1062
|
+
* @param consumes string[] mime-types
|
|
1063
|
+
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
|
1064
|
+
*/
|
|
1065
|
+
canConsumeForm(consumes) {
|
|
1066
|
+
const form = 'multipart/form-data';
|
|
1067
|
+
for (const consume of consumes) {
|
|
1068
|
+
if (form === consume) {
|
|
1069
|
+
return true;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
return false;
|
|
1073
|
+
}
|
|
1061
1074
|
// @ts-ignore
|
|
1062
1075
|
addToHttpParams(httpParams, value, key) {
|
|
1063
1076
|
if (typeof value === "object" && value instanceof Date === false) {
|
|
@@ -1701,6 +1714,151 @@ class ViewService {
|
|
|
1701
1714
|
reportProgress: reportProgress
|
|
1702
1715
|
});
|
|
1703
1716
|
}
|
|
1717
|
+
uploadAction(uuid, uiActionRequest, param, content, observe = 'body', reportProgress = false, options) {
|
|
1718
|
+
if (uuid === null || uuid === undefined) {
|
|
1719
|
+
throw new Error('Required parameter uuid was null or undefined when calling uploadAction.');
|
|
1720
|
+
}
|
|
1721
|
+
let localVarHeaders = this.defaultHeaders;
|
|
1722
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
1723
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
1724
|
+
// to determine the Accept header
|
|
1725
|
+
const httpHeaderAccepts = [
|
|
1726
|
+
'application/json'
|
|
1727
|
+
];
|
|
1728
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
1729
|
+
}
|
|
1730
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
1731
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
1732
|
+
}
|
|
1733
|
+
let localVarHttpContext = options && options.context;
|
|
1734
|
+
if (localVarHttpContext === undefined) {
|
|
1735
|
+
localVarHttpContext = new HttpContext();
|
|
1736
|
+
}
|
|
1737
|
+
// to determine the Content-Type header
|
|
1738
|
+
const consumes = [
|
|
1739
|
+
'multipart/form-data'
|
|
1740
|
+
];
|
|
1741
|
+
const canConsumeForm = this.canConsumeForm(consumes);
|
|
1742
|
+
let localVarFormParams;
|
|
1743
|
+
let localVarUseForm = false;
|
|
1744
|
+
let localVarConvertFormParamsToString = false;
|
|
1745
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
1746
|
+
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
|
1747
|
+
localVarUseForm = canConsumeForm;
|
|
1748
|
+
if (localVarUseForm) {
|
|
1749
|
+
localVarFormParams = new FormData();
|
|
1750
|
+
}
|
|
1751
|
+
else {
|
|
1752
|
+
localVarFormParams = new HttpParams({ encoder: this.encoder });
|
|
1753
|
+
}
|
|
1754
|
+
if (uiActionRequest !== undefined) {
|
|
1755
|
+
localVarFormParams = localVarFormParams.append('uiActionRequest', uiActionRequest) || localVarFormParams;
|
|
1756
|
+
}
|
|
1757
|
+
if (param !== undefined) {
|
|
1758
|
+
localVarFormParams = localVarFormParams.append('param', param) || localVarFormParams;
|
|
1759
|
+
}
|
|
1760
|
+
if (content !== undefined) {
|
|
1761
|
+
localVarFormParams = localVarFormParams.append('content', content) || localVarFormParams;
|
|
1762
|
+
}
|
|
1763
|
+
let responseType_ = 'json';
|
|
1764
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
1765
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
1766
|
+
responseType_ = 'text';
|
|
1767
|
+
}
|
|
1768
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
1769
|
+
responseType_ = 'json';
|
|
1770
|
+
}
|
|
1771
|
+
else {
|
|
1772
|
+
responseType_ = 'blob';
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
let localVarPath = `/component/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/upload`;
|
|
1776
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
1777
|
+
context: localVarHttpContext,
|
|
1778
|
+
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
|
1779
|
+
responseType: responseType_,
|
|
1780
|
+
withCredentials: this.configuration.withCredentials,
|
|
1781
|
+
headers: localVarHeaders,
|
|
1782
|
+
observe: observe,
|
|
1783
|
+
reportProgress: reportProgress
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1786
|
+
uploadMultipleAction(uuid, uiActionRequest, param, contents, observe = 'body', reportProgress = false, options) {
|
|
1787
|
+
if (uuid === null || uuid === undefined) {
|
|
1788
|
+
throw new Error('Required parameter uuid was null or undefined when calling uploadMultipleAction.');
|
|
1789
|
+
}
|
|
1790
|
+
let localVarHeaders = this.defaultHeaders;
|
|
1791
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
1792
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
1793
|
+
// to determine the Accept header
|
|
1794
|
+
const httpHeaderAccepts = [
|
|
1795
|
+
'application/json'
|
|
1796
|
+
];
|
|
1797
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
1798
|
+
}
|
|
1799
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
1800
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
1801
|
+
}
|
|
1802
|
+
let localVarHttpContext = options && options.context;
|
|
1803
|
+
if (localVarHttpContext === undefined) {
|
|
1804
|
+
localVarHttpContext = new HttpContext();
|
|
1805
|
+
}
|
|
1806
|
+
// to determine the Content-Type header
|
|
1807
|
+
const consumes = [
|
|
1808
|
+
'multipart/form-data'
|
|
1809
|
+
];
|
|
1810
|
+
const canConsumeForm = this.canConsumeForm(consumes);
|
|
1811
|
+
let localVarFormParams;
|
|
1812
|
+
let localVarUseForm = false;
|
|
1813
|
+
let localVarConvertFormParamsToString = false;
|
|
1814
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
1815
|
+
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
|
1816
|
+
localVarUseForm = canConsumeForm;
|
|
1817
|
+
if (localVarUseForm) {
|
|
1818
|
+
localVarFormParams = new FormData();
|
|
1819
|
+
}
|
|
1820
|
+
else {
|
|
1821
|
+
localVarFormParams = new HttpParams({ encoder: this.encoder });
|
|
1822
|
+
}
|
|
1823
|
+
if (uiActionRequest !== undefined) {
|
|
1824
|
+
localVarFormParams = localVarFormParams.append('uiActionRequest', uiActionRequest) || localVarFormParams;
|
|
1825
|
+
}
|
|
1826
|
+
if (param !== undefined) {
|
|
1827
|
+
localVarFormParams = localVarFormParams.append('param', param) || localVarFormParams;
|
|
1828
|
+
}
|
|
1829
|
+
if (contents) {
|
|
1830
|
+
if (localVarUseForm) {
|
|
1831
|
+
contents.forEach((element) => {
|
|
1832
|
+
localVarFormParams = localVarFormParams.append('contents', element) || localVarFormParams;
|
|
1833
|
+
});
|
|
1834
|
+
}
|
|
1835
|
+
else {
|
|
1836
|
+
localVarFormParams = localVarFormParams.append('contents', [...contents].join(COLLECTION_FORMATS['csv'])) || localVarFormParams;
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
let responseType_ = 'json';
|
|
1840
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
1841
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
1842
|
+
responseType_ = 'text';
|
|
1843
|
+
}
|
|
1844
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
1845
|
+
responseType_ = 'json';
|
|
1846
|
+
}
|
|
1847
|
+
else {
|
|
1848
|
+
responseType_ = 'blob';
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
let localVarPath = `/component/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/uploadMultiple`;
|
|
1852
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
1853
|
+
context: localVarHttpContext,
|
|
1854
|
+
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
|
1855
|
+
responseType: responseType_,
|
|
1856
|
+
withCredentials: this.configuration.withCredentials,
|
|
1857
|
+
headers: localVarHeaders,
|
|
1858
|
+
observe: observe,
|
|
1859
|
+
reportProgress: reportProgress
|
|
1860
|
+
});
|
|
1861
|
+
}
|
|
1704
1862
|
}
|
|
1705
1863
|
ViewService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1706
1864
|
ViewService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewService, providedIn: 'root' });
|
|
@@ -1859,7 +2017,9 @@ const UiActionInputType = {
|
|
|
1859
2017
|
None: 'none',
|
|
1860
2018
|
Textfield: 'textfield',
|
|
1861
2019
|
Textarea: 'textarea',
|
|
1862
|
-
UserSelect: 'user_select'
|
|
2020
|
+
UserSelect: 'user_select',
|
|
2021
|
+
File: 'file',
|
|
2022
|
+
MultipleFiles: 'multiple_files'
|
|
1863
2023
|
};
|
|
1864
2024
|
|
|
1865
2025
|
/**
|
|
@@ -2447,6 +2607,26 @@ class SmartViewContextService {
|
|
|
2447
2607
|
// return await isCompleted.toPromise();
|
|
2448
2608
|
});
|
|
2449
2609
|
}
|
|
2610
|
+
performUploadAction(uuid, uiActionRequest, param, content) {
|
|
2611
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2612
|
+
this._performUploadAction({
|
|
2613
|
+
uuid,
|
|
2614
|
+
uiActionRequest,
|
|
2615
|
+
param,
|
|
2616
|
+
content,
|
|
2617
|
+
});
|
|
2618
|
+
});
|
|
2619
|
+
}
|
|
2620
|
+
performUploadMultipleAction(uuid, uiActionRequest, param, content) {
|
|
2621
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2622
|
+
this._performUploadMultipleAction({
|
|
2623
|
+
uuid,
|
|
2624
|
+
uiActionRequest,
|
|
2625
|
+
param,
|
|
2626
|
+
content,
|
|
2627
|
+
});
|
|
2628
|
+
});
|
|
2629
|
+
}
|
|
2450
2630
|
dataChanged(uuid, dataChange) {
|
|
2451
2631
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2452
2632
|
return yield this._dataChanged({ uuid, dataChange });
|
|
@@ -2484,6 +2664,20 @@ class SmartViewContextService {
|
|
|
2484
2664
|
.toPromise());
|
|
2485
2665
|
});
|
|
2486
2666
|
}
|
|
2667
|
+
_performUploadAction(config) {
|
|
2668
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2669
|
+
return yield this.handlePerformActionResponse(yield this.view
|
|
2670
|
+
.uploadAction(config.uuid, JSON.stringify(config.uiActionRequest), config.param, config.content)
|
|
2671
|
+
.toPromise());
|
|
2672
|
+
});
|
|
2673
|
+
}
|
|
2674
|
+
_performUploadMultipleAction(config) {
|
|
2675
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2676
|
+
return yield this.handlePerformActionResponse(yield this.view
|
|
2677
|
+
.uploadMultipleAction(config.uuid, JSON.stringify(config.uiActionRequest), config.param, config.content)
|
|
2678
|
+
.toPromise());
|
|
2679
|
+
});
|
|
2680
|
+
}
|
|
2487
2681
|
_dataChanged(config) {
|
|
2488
2682
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2489
2683
|
return yield this.handlePerformActionResponse(yield this.view.dataChanged(config.uuid, config.dataChange).toPromise());
|
|
@@ -2833,7 +3027,7 @@ class SmartDevToolDialogComponent {
|
|
|
2833
3027
|
}
|
|
2834
3028
|
}
|
|
2835
3029
|
SmartDevToolDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolDialogComponent, deps: [{ token: SmartDevToolDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2836
|
-
SmartDevToolDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartDevToolDialogComponent, selector: "app-smart-dev-tool-dialog", ngImport: i0, template: "<div class=\"smartDevToolDialogContainer\">\r\n <div class=\"header\">\r\n <h2>Developer tool</h2>\r\n <button mat-icon-button title=\"close\" (click)=\"close()\">\r\n <smart-icon icon=\"close\"></smart-icon>\r\n </button>\r\n </div>\r\n <div class=\"requestsContainer\">\r\n <mat-accordion multi>\r\n <mat-expansion-panel\r\n class=\"requestCard\"\r\n [ngClass]=\"apiCall.responseStatus === 200 ? '' : 'hasError'\"\r\n *ngFor=\"let apiCall of descriptor?.apiCalls; let i = index\"\r\n >\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <div class=\"titlePanel\">\r\n <span class=\"date\">\r\n {{ apiCall.responseDate | smartDevToolDatePipe }}\r\n </span>\r\n <span class=\"urlText\">\r\n {{ apiCall.url }}\r\n </span>\r\n <div [ngClass]=\"apiCall.requestMethod\">\r\n {{ apiCall.requestMethod }}\r\n </div>\r\n <div [ngClass]=\"'statusCode-' + apiCall.responseStatus.toString()[0]\">\r\n {{ apiCall.responseStatus }}\r\n </div>\r\n </div>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div>\r\n <div class=\"table\">\r\n <div class=\"row\">\r\n <div class=\"mainCol heading\">Request</div>\r\n <div class=\"mainCol heading\">Response</div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Date</div>\r\n <div class=\"data\">\r\n {{ apiCall.requestDate | smartDevToolDatePipe }}\r\n </div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Date</div>\r\n <div class=\"data\">\r\n {{ apiCall.responseDate | smartDevToolDatePipe }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Headers</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Headers</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.requestHeader\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.requestHeader)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.requestHeader\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.responseHeader\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.responseHeader)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.responseHeader\" class=\"data\">null</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\"></div>\r\n <div class=\"data\"></div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Status</div>\r\n <div class=\"data\">\r\n {{ apiCall.responseStatus }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\"></div>\r\n <div class=\"data\"></div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Status text</div>\r\n <div class=\"data\">\r\n {{ apiCall.responseStatusText }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Body</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Body</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.requestBody\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.requestBody)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.requestBody\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.responseBody\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.responseBody)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.responseBody\" class=\"data\">null</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Session Storage</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Local Storage</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Cookies</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.sessionStorage\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.sessionStorage)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.sessionStorage\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.localStorage\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.localStorage)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.localStorage\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.cookies\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.cookies)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.cookies\" class=\"data\">null</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n <div class=\"buttonsContainer\">\r\n <button color=\"primary\" mat-raised-button (click)=\"copy()\">Copy</button>\r\n <button color=\"warn\" mat-raised-button (click)=\"clear()\">Clear</button>\r\n </div>\r\n</div>\r\n", styles: [".smartDevToolDialogContainer{display:flex;flex-direction:column;gap:1rem;width:78vw;height:90vh}.header{display:flex;flex-direction:row;justify-content:space-between}.requestsContainer{display:flex;flex-direction:column;gap:1rem;flex:1;overflow:auto}.requestCard{background-color:var(--primary-lighter-color);padding:.5rem;border-radius:.5rem;display:flex;flex-direction:column}.table{display:flex;flex-direction:column;gap:.25rem}.row{display:flex;flex-direction:row;gap:1rem}.mainCol{flex:1;display:flex;flex-direction:row;gap:.5rem;overflow:auto}.heading{font-weight:700}.data{word-wrap:break-word}.buttonsContainer{display:flex;flex-direction:row;justify-content:space-between}pre{outline:1px solid #000;padding:5px;margin:5px}.string{color:green}.number{color:#ff8c00}.boolean{color:#00f}.null{color:#f0f}.key{color:red}@media only screen and (max-width: 1000px){.row{flex-direction:column;gap:.5rem}.mainCol{flex-direction:column;overflow-x:auto;overflow-y:visible;flex:auto}.requestCard h4{font-size:small;overflow:auto}.smartDevToolDialogContainer{width:calc(80vw - 3rem)}}.hasError{background-color:var(--warn-lighter-color)}.titlePanel{flex:1;display:flex;flex-direction:row;gap:1rem}.urlText{flex:1;text-decoration:underline}.PATCH{color:#d38042}.DELETE{color:#a41e22}.GET{color:#0f6ab4}.POST{color:#10a54a}.PUT{color:#c5862b}.HEAD{color:#ffd20f}.statusCode-2{color:#5fb442}.statusCode-3{color:#5970f6}.statusCode-4{color:#ec6762}.statusCode-5{color:#f2a63b}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i4$2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i4$2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }], directives: [{ type: i4$2.MatAccordion, selector: "mat-accordion", inputs: ["multi", "hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$2.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "smartDevToolDatePipe": SmartDevToolDatePipe } });
|
|
3030
|
+
SmartDevToolDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartDevToolDialogComponent, selector: "app-smart-dev-tool-dialog", ngImport: i0, template: "<div class=\"smartDevToolDialogContainer\">\r\n <div class=\"header\">\r\n <h2>Developer tool</h2>\r\n <button mat-icon-button title=\"close\" (click)=\"close()\">\r\n <smart-icon icon=\"close\"></smart-icon>\r\n </button>\r\n </div>\r\n <div class=\"requestsContainer\">\r\n <mat-accordion multi>\r\n <mat-expansion-panel\r\n class=\"requestCard\"\r\n [ngClass]=\"apiCall.responseStatus === 200 ? '' : 'hasError'\"\r\n *ngFor=\"let apiCall of descriptor?.apiCalls; let i = index\"\r\n >\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <div class=\"titlePanel\">\r\n <span class=\"date\">\r\n {{ apiCall.responseDate | smartDevToolDatePipe }}\r\n </span>\r\n <span class=\"urlText\">\r\n {{ apiCall.url }}\r\n </span>\r\n <div [ngClass]=\"apiCall.requestMethod\">\r\n {{ apiCall.requestMethod }}\r\n </div>\r\n <div [ngClass]=\"'statusCode-' + apiCall.responseStatus.toString()[0]\">\r\n {{ apiCall.responseStatus }}\r\n </div>\r\n </div>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div>\r\n <div class=\"table\">\r\n <div class=\"row\">\r\n <div class=\"mainCol heading\">Request</div>\r\n <div class=\"mainCol heading\">Response</div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Date</div>\r\n <div class=\"data\">\r\n {{ apiCall.requestDate | smartDevToolDatePipe }}\r\n </div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Date</div>\r\n <div class=\"data\">\r\n {{ apiCall.responseDate | smartDevToolDatePipe }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Headers</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Headers</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.requestHeader\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.requestHeader)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.requestHeader\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.responseHeader\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.responseHeader)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.responseHeader\" class=\"data\">null</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\"></div>\r\n <div class=\"data\"></div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Status</div>\r\n <div class=\"data\">\r\n {{ apiCall.responseStatus }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\"></div>\r\n <div class=\"data\"></div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Status text</div>\r\n <div class=\"data\">\r\n {{ apiCall.responseStatusText }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Body</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Body</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.requestBody\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.requestBody)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.requestBody\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.responseBody\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.responseBody)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.responseBody\" class=\"data\">null</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Session Storage</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Local Storage</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Cookies</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.sessionStorage\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.sessionStorage)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.sessionStorage\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.localStorage\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.localStorage)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.localStorage\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.cookies\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.cookies)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.cookies\" class=\"data\">null</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n <div class=\"buttonsContainer\">\r\n <button color=\"primary\" mat-raised-button (click)=\"copy()\">Copy</button>\r\n <button color=\"warn\" mat-raised-button (click)=\"clear()\">Clear</button>\r\n </div>\r\n</div>\r\n", styles: [".smartDevToolDialogContainer{display:flex;flex-direction:column;gap:1rem;width:78vw;height:90vh}.header{display:flex;flex-direction:row;justify-content:space-between}.requestsContainer{display:flex;flex-direction:column;gap:1rem;flex:1;overflow:auto}.requestCard{background-color:var(--primary-lighter-color);padding:.5rem;border-radius:.5rem;display:flex;flex-direction:column}.table{display:flex;flex-direction:column;gap:.25rem}.row{display:flex;flex-direction:row;gap:1rem}.mainCol{flex:1;display:flex;flex-direction:row;gap:.5rem;overflow:auto}.heading{font-weight:700}.data{word-wrap:break-word}.buttonsContainer{display:flex;flex-direction:row;justify-content:space-between}pre{outline:1px solid #000;padding:5px;margin:5px}.string{color:green}.number{color:#ff8c00}.boolean{color:#00f}.null{color:#f0f}.key{color:red}@media only screen and (max-width: 1000px){.row{flex-direction:column;gap:.5rem}.mainCol{flex-direction:column;overflow-x:auto;overflow-y:visible;flex:auto}.requestCard h4{font-size:small;overflow:auto}.smartDevToolDialogContainer{width:calc(80vw - 3rem)}}.hasError{background-color:var(--warn-lighter-color)}.titlePanel{flex:1;display:flex;flex-direction:row;gap:1rem}.urlText{flex:1;text-decoration:underline}.PATCH{color:#d38042}.DELETE{color:#a41e22}.GET{color:#0f6ab4}.POST{color:#10a54a}.PUT{color:#c5862b}.HEAD{color:#ffd20f}.statusCode-2{color:#5fb442}.statusCode-3{color:#5970f6}.statusCode-4{color:#ec6762}.statusCode-5{color:#f2a63b}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i4$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i4$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }], directives: [{ type: i4$3.MatAccordion, selector: "mat-accordion", inputs: ["multi", "hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "smartDevToolDatePipe": SmartDevToolDatePipe } });
|
|
2837
3031
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolDialogComponent, decorators: [{
|
|
2838
3032
|
type: Component,
|
|
2839
3033
|
args: [{ selector: 'app-smart-dev-tool-dialog', template: "<div class=\"smartDevToolDialogContainer\">\r\n <div class=\"header\">\r\n <h2>Developer tool</h2>\r\n <button mat-icon-button title=\"close\" (click)=\"close()\">\r\n <smart-icon icon=\"close\"></smart-icon>\r\n </button>\r\n </div>\r\n <div class=\"requestsContainer\">\r\n <mat-accordion multi>\r\n <mat-expansion-panel\r\n class=\"requestCard\"\r\n [ngClass]=\"apiCall.responseStatus === 200 ? '' : 'hasError'\"\r\n *ngFor=\"let apiCall of descriptor?.apiCalls; let i = index\"\r\n >\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <div class=\"titlePanel\">\r\n <span class=\"date\">\r\n {{ apiCall.responseDate | smartDevToolDatePipe }}\r\n </span>\r\n <span class=\"urlText\">\r\n {{ apiCall.url }}\r\n </span>\r\n <div [ngClass]=\"apiCall.requestMethod\">\r\n {{ apiCall.requestMethod }}\r\n </div>\r\n <div [ngClass]=\"'statusCode-' + apiCall.responseStatus.toString()[0]\">\r\n {{ apiCall.responseStatus }}\r\n </div>\r\n </div>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div>\r\n <div class=\"table\">\r\n <div class=\"row\">\r\n <div class=\"mainCol heading\">Request</div>\r\n <div class=\"mainCol heading\">Response</div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Date</div>\r\n <div class=\"data\">\r\n {{ apiCall.requestDate | smartDevToolDatePipe }}\r\n </div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Date</div>\r\n <div class=\"data\">\r\n {{ apiCall.responseDate | smartDevToolDatePipe }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Headers</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Headers</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.requestHeader\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.requestHeader)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.requestHeader\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.responseHeader\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.responseHeader)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.responseHeader\" class=\"data\">null</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\"></div>\r\n <div class=\"data\"></div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Status</div>\r\n <div class=\"data\">\r\n {{ apiCall.responseStatus }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\"></div>\r\n <div class=\"data\"></div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Status text</div>\r\n <div class=\"data\">\r\n {{ apiCall.responseStatusText }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Body</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Body</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.requestBody\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.requestBody)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.requestBody\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.responseBody\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.responseBody)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.responseBody\" class=\"data\">null</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Session Storage</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Local Storage</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <div class=\"heading\">Cookies</div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.sessionStorage\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.sessionStorage)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.sessionStorage\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.localStorage\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.localStorage)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.localStorage\" class=\"data\">null</div>\r\n </div>\r\n <div class=\"mainCol\">\r\n <pre\r\n *ngIf=\"apiCall.cookies\"\r\n class=\"data\"\r\n [innerHTML]=\"getBody(apiCall.cookies)\"\r\n ></pre>\r\n <div *ngIf=\"!apiCall.cookies\" class=\"data\">null</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n <div class=\"buttonsContainer\">\r\n <button color=\"primary\" mat-raised-button (click)=\"copy()\">Copy</button>\r\n <button color=\"warn\" mat-raised-button (click)=\"clear()\">Clear</button>\r\n </div>\r\n</div>\r\n", styles: [".smartDevToolDialogContainer{display:flex;flex-direction:column;gap:1rem;width:78vw;height:90vh}.header{display:flex;flex-direction:row;justify-content:space-between}.requestsContainer{display:flex;flex-direction:column;gap:1rem;flex:1;overflow:auto}.requestCard{background-color:var(--primary-lighter-color);padding:.5rem;border-radius:.5rem;display:flex;flex-direction:column}.table{display:flex;flex-direction:column;gap:.25rem}.row{display:flex;flex-direction:row;gap:1rem}.mainCol{flex:1;display:flex;flex-direction:row;gap:.5rem;overflow:auto}.heading{font-weight:700}.data{word-wrap:break-word}.buttonsContainer{display:flex;flex-direction:row;justify-content:space-between}pre{outline:1px solid #000;padding:5px;margin:5px}.string{color:green}.number{color:#ff8c00}.boolean{color:#00f}.null{color:#f0f}.key{color:red}@media only screen and (max-width: 1000px){.row{flex-direction:column;gap:.5rem}.mainCol{flex-direction:column;overflow-x:auto;overflow-y:visible;flex:auto}.requestCard h4{font-size:small;overflow:auto}.smartDevToolDialogContainer{width:calc(80vw - 3rem)}}.hasError{background-color:var(--warn-lighter-color)}.titlePanel{flex:1;display:flex;flex-direction:row;gap:1rem}.urlText{flex:1;text-decoration:underline}.PATCH{color:#d38042}.DELETE{color:#a41e22}.GET{color:#0f6ab4}.POST{color:#10a54a}.PUT{color:#c5862b}.HEAD{color:#ffd20f}.statusCode-2{color:#5fb442}.statusCode-3{color:#5970f6}.statusCode-4{color:#ec6762}.statusCode-5{color:#f2a63b}\n"] }]
|
|
@@ -2888,7 +3082,7 @@ class SmartDevToolFloatingButtonComponent {
|
|
|
2888
3082
|
}
|
|
2889
3083
|
}
|
|
2890
3084
|
SmartDevToolFloatingButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolFloatingButtonComponent, deps: [{ token: SmartDevToolDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2891
|
-
SmartDevToolFloatingButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartDevToolFloatingButtonComponent, selector: "smart-session-dev-tool", ngImport: i0, template: "<button\r\n *ngIf=\"isShown\"\r\n mat-fab\r\n [color]=\"errorsCount.length ? 'warn' : 'accent'\"\r\n class=\"floatingButton\"\r\n extended\r\n title=\"devTool\"\r\n (click)=\"openDevToolDialog()\"\r\n>\r\n <smart-icon color=\"white\" icon=\"developer_mode\"></smart-icon>\r\n {{ errorsCount }}\r\n</button>\r\n", styles: [".floatingButton{position:fixed;right:2rem;bottom:2rem}.mat-icon.mat-white{color:#fff}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type:
|
|
3085
|
+
SmartDevToolFloatingButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartDevToolFloatingButtonComponent, selector: "smart-session-dev-tool", ngImport: i0, template: "<button\r\n *ngIf=\"isShown\"\r\n mat-fab\r\n [color]=\"errorsCount.length ? 'warn' : 'accent'\"\r\n class=\"floatingButton\"\r\n extended\r\n title=\"devTool\"\r\n (click)=\"openDevToolDialog()\"\r\n>\r\n <smart-icon color=\"white\" icon=\"developer_mode\"></smart-icon>\r\n {{ errorsCount }}\r\n</button>\r\n", styles: [".floatingButton{position:fixed;right:2rem;bottom:2rem}.mat-icon.mat-white{color:#fff}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2892
3086
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolFloatingButtonComponent, decorators: [{
|
|
2893
3087
|
type: Component,
|
|
2894
3088
|
args: [{ selector: 'smart-session-dev-tool', template: "<button\r\n *ngIf=\"isShown\"\r\n mat-fab\r\n [color]=\"errorsCount.length ? 'warn' : 'accent'\"\r\n class=\"floatingButton\"\r\n extended\r\n title=\"devTool\"\r\n (click)=\"openDevToolDialog()\"\r\n>\r\n <smart-icon color=\"white\" icon=\"developer_mode\"></smart-icon>\r\n {{ errorsCount }}\r\n</button>\r\n", styles: [".floatingButton{position:fixed;right:2rem;bottom:2rem}.mat-icon.mat-white{color:#fff}\n"] }]
|
|
@@ -3536,7 +3730,7 @@ class UiActionConfirmDialogComponent {
|
|
|
3536
3730
|
}
|
|
3537
3731
|
}
|
|
3538
3732
|
UiActionConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogComponent, deps: [{ token: UiActionConfirmDialogService }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3539
|
-
UiActionConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionConfirmDialogComponent, selector: "app-ui-action-confirm-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n\t<div class=\"headerContainer\">\r\n\t\t<h3 class=\"color-accent-700\">\r\n\t\t\t{{ getTitle() }}\r\n\t\t</h3>\r\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<p>\r\n\t\t{{ getText() }}\r\n\t</p>\r\n\t<div class=\"folderNameDialogButtonsContainer\">\r\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n\t\t\t{{ getCancelButtonLabel() }}\r\n\t\t</button>\r\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"doAction()\">\r\n\t\t\t{{ getActionButtonLabel() }}\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type:
|
|
3733
|
+
UiActionConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionConfirmDialogComponent, selector: "app-ui-action-confirm-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n\t<div class=\"headerContainer\">\r\n\t\t<h3 class=\"color-accent-700\">\r\n\t\t\t{{ getTitle() }}\r\n\t\t</h3>\r\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<p>\r\n\t\t{{ getText() }}\r\n\t</p>\r\n\t<div class=\"folderNameDialogButtonsContainer\">\r\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n\t\t\t{{ getCancelButtonLabel() }}\r\n\t\t</button>\r\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"doAction()\">\r\n\t\t\t{{ getActionButtonLabel() }}\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }] });
|
|
3540
3734
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogComponent, decorators: [{
|
|
3541
3735
|
type: Component,
|
|
3542
3736
|
args: [{ selector: "app-ui-action-confirm-dialog", template: "<div class=\"folderNameDialogContainer\">\r\n\t<div class=\"headerContainer\">\r\n\t\t<h3 class=\"color-accent-700\">\r\n\t\t\t{{ getTitle() }}\r\n\t\t</h3>\r\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<p>\r\n\t\t{{ getText() }}\r\n\t</p>\r\n\t<div class=\"folderNameDialogButtonsContainer\">\r\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n\t\t\t{{ getCancelButtonLabel() }}\r\n\t\t</button>\r\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"doAction()\">\r\n\t\t\t{{ getActionButtonLabel() }}\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
|
|
@@ -3686,7 +3880,7 @@ class UiActionInputDialogComponent {
|
|
|
3686
3880
|
}
|
|
3687
3881
|
}
|
|
3688
3882
|
UiActionInputDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogComponent, deps: [{ token: UiActionInputDialogService }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3689
|
-
UiActionInputDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionInputDialogComponent, selector: "smart-ui-action-input-dialog", viewQueries: [{ propertyName: "folderFormChild", first: true, predicate: ["form"], descendants: true }], ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n\t<div class=\"headerContainer\">\r\n\t\t<h3 class=\"color-accent-700\">\r\n\t\t\t{{ getTitle() }}\r\n\t\t</h3>\r\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<p>\r\n\t\t{{ getText() }}\r\n\t</p>\r\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\r\n\t<div class=\"folderNameDialogButtonsContainer\">\r\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n\t\t\t{{ getCancelButtonLabel() }}\r\n\t\t</button>\r\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\r\n\t\t\t{{ getActionButtonLabel() }}\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type:
|
|
3883
|
+
UiActionInputDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionInputDialogComponent, selector: "smart-ui-action-input-dialog", viewQueries: [{ propertyName: "folderFormChild", first: true, predicate: ["form"], descendants: true }], ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n\t<div class=\"headerContainer\">\r\n\t\t<h3 class=\"color-accent-700\">\r\n\t\t\t{{ getTitle() }}\r\n\t\t</h3>\r\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<p>\r\n\t\t{{ getText() }}\r\n\t</p>\r\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\r\n\t<div class=\"folderNameDialogButtonsContainer\">\r\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n\t\t\t{{ getCancelButtonLabel() }}\r\n\t\t</button>\r\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\r\n\t\t\t{{ getActionButtonLabel() }}\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i5.SmartformComponent, selector: "smartform", inputs: ["smartForm"] }] });
|
|
3690
3884
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogComponent, decorators: [{
|
|
3691
3885
|
type: Component,
|
|
3692
3886
|
args: [{ selector: 'smart-ui-action-input-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n\t<div class=\"headerContainer\">\r\n\t\t<h3 class=\"color-accent-700\">\r\n\t\t\t{{ getTitle() }}\r\n\t\t</h3>\r\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<p>\r\n\t\t{{ getText() }}\r\n\t</p>\r\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\r\n\t<div class=\"folderNameDialogButtonsContainer\">\r\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n\t\t\t{{ getCancelButtonLabel() }}\r\n\t\t</button>\r\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\r\n\t\t\t{{ getActionButtonLabel() }}\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
|
|
@@ -3741,10 +3935,123 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3741
3935
|
}]
|
|
3742
3936
|
}], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2$1.Router }]; } });
|
|
3743
3937
|
|
|
3938
|
+
class UiActionFileUploadDialogComponent {
|
|
3939
|
+
constructor(service, manager) {
|
|
3940
|
+
this.service = service;
|
|
3941
|
+
this.manager = manager;
|
|
3942
|
+
this.code = this.service.action.code;
|
|
3943
|
+
this.setUp();
|
|
3944
|
+
}
|
|
3945
|
+
ngOnDestroy() {
|
|
3946
|
+
this.service._destroy$.next();
|
|
3947
|
+
this.cancel();
|
|
3948
|
+
}
|
|
3949
|
+
setUp() {
|
|
3950
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
3951
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3952
|
+
this.descriptor = yield this.manager.getActionDescriptor(this.service.action);
|
|
3953
|
+
this.isMultiple = this.service.isMultiple;
|
|
3954
|
+
this.i18n = {
|
|
3955
|
+
addFile: (_b = (_a = this.descriptor.upload) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : 'dokumentum hozzáadása',
|
|
3956
|
+
browseOrDrag: (_d = (_c = this.descriptor.upload) === null || _c === void 0 ? void 0 : _c.description) !== null && _d !== void 0 ? _d : 'tallózás vagy behúzás',
|
|
3957
|
+
formats: (_f = (_e = this.descriptor.upload) === null || _e === void 0 ? void 0 : _e.formats) !== null && _f !== void 0 ? _f : '',
|
|
3958
|
+
maxSize: (_h = (_g = this.descriptor.upload) === null || _g === void 0 ? void 0 : _g.maxSize) !== null && _h !== void 0 ? _h : '',
|
|
3959
|
+
upload: (_j = this.descriptor.upload) === null || _j === void 0 ? void 0 : _j.uploadButtonTitle,
|
|
3960
|
+
};
|
|
3961
|
+
// TODO set max size and file formats by UiAction.params
|
|
3962
|
+
if (this.descriptor[this.service.inputTypeName]) {
|
|
3963
|
+
this.dialogType = this.service.inputTypeName;
|
|
3964
|
+
}
|
|
3965
|
+
else {
|
|
3966
|
+
this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
|
|
3967
|
+
}
|
|
3968
|
+
});
|
|
3969
|
+
}
|
|
3970
|
+
getTitle() {
|
|
3971
|
+
return this.descriptor[this.dialogType].title;
|
|
3972
|
+
}
|
|
3973
|
+
getText() {
|
|
3974
|
+
var _a;
|
|
3975
|
+
return (_a = this.descriptor[this.dialogType].text) !== null && _a !== void 0 ? _a : '';
|
|
3976
|
+
}
|
|
3977
|
+
getActionButtonLabel() {
|
|
3978
|
+
return this.descriptor[this.dialogType].actionButton.caption;
|
|
3979
|
+
}
|
|
3980
|
+
getActionButtonColor() {
|
|
3981
|
+
return this.descriptor[this.dialogType].actionButton.color;
|
|
3982
|
+
}
|
|
3983
|
+
getCancelButtonLabel() {
|
|
3984
|
+
return this.descriptor[this.dialogType].cancelButton.caption;
|
|
3985
|
+
}
|
|
3986
|
+
getCancelButtonColor() {
|
|
3987
|
+
return this.descriptor[this.dialogType].cancelButton.color;
|
|
3988
|
+
}
|
|
3989
|
+
upload(files) {
|
|
3990
|
+
this.service.onSave(files);
|
|
3991
|
+
}
|
|
3992
|
+
cancel() {
|
|
3993
|
+
this.service.cancel();
|
|
3994
|
+
}
|
|
3995
|
+
}
|
|
3996
|
+
UiActionFileUploadDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogComponent, deps: [{ token: UiActionFileUploadDialogService }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3997
|
+
UiActionFileUploadDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionFileUploadDialogComponent, selector: "lib-ui-action-file-upload-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n <smartfileuploader\r\n [i18n]=\"i18n\"\r\n [fileFormats]=\"fileFormats\"\r\n [maxSizeMb]=\"maxSizeMb\"\r\n [uploadCallback]=\"upload.bind(this)\"\r\n [isMultiple]=\"isMultiple\"\r\n ></smartfileuploader>\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\r\n {{ getActionButtonLabel() }}\r\n </button> -->\r\n </div>\r\n</div>\r\n", styles: [""], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i5.SmartfileuploaderComponent, selector: "smartfileuploader", inputs: ["uploadCallback", "fileFormats", "maxSizeMb", "i18n", "useIconButton", "isMultiple"] }] });
|
|
3998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogComponent, decorators: [{
|
|
3999
|
+
type: Component,
|
|
4000
|
+
args: [{ selector: 'lib-ui-action-file-upload-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n <smartfileuploader\r\n [i18n]=\"i18n\"\r\n [fileFormats]=\"fileFormats\"\r\n [maxSizeMb]=\"maxSizeMb\"\r\n [uploadCallback]=\"upload.bind(this)\"\r\n [isMultiple]=\"isMultiple\"\r\n ></smartfileuploader>\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\r\n {{ getActionButtonLabel() }}\r\n </button> -->\r\n </div>\r\n</div>\r\n", styles: [""] }]
|
|
4001
|
+
}], ctorParameters: function () { return [{ type: UiActionFileUploadDialogService }, { type: UiActionDescriptorService }]; } });
|
|
4002
|
+
|
|
4003
|
+
class UiActionFileUploadDialogService extends SmartdialogService {
|
|
4004
|
+
constructor(dialog, router) {
|
|
4005
|
+
super(dialog, router);
|
|
4006
|
+
this._destroy$ = new Subject();
|
|
4007
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
4008
|
+
this.isMultiple = false;
|
|
4009
|
+
}
|
|
4010
|
+
setDataAndOpenDialog(action, nodeName) {
|
|
4011
|
+
this.action = action;
|
|
4012
|
+
this.nodeName = nodeName;
|
|
4013
|
+
this.openDialog();
|
|
4014
|
+
}
|
|
4015
|
+
openDialog() {
|
|
4016
|
+
this.files = undefined;
|
|
4017
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
4018
|
+
const dialogData = {
|
|
4019
|
+
content: {
|
|
4020
|
+
title: '',
|
|
4021
|
+
},
|
|
4022
|
+
size: {},
|
|
4023
|
+
customComponent: UiActionFileUploadDialogComponent,
|
|
4024
|
+
};
|
|
4025
|
+
this.createDialog(dialogData, UiActionFileUploadDialogComponent);
|
|
4026
|
+
}
|
|
4027
|
+
onSave(files) {
|
|
4028
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4029
|
+
this.files = files;
|
|
4030
|
+
this.onAction.complete();
|
|
4031
|
+
this.closeDialog();
|
|
4032
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
4033
|
+
});
|
|
4034
|
+
}
|
|
4035
|
+
cancel() {
|
|
4036
|
+
this.onAction.complete();
|
|
4037
|
+
this.closeDialog();
|
|
4038
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
4039
|
+
}
|
|
4040
|
+
}
|
|
4041
|
+
UiActionFileUploadDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4042
|
+
UiActionFileUploadDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogService, providedIn: 'root' });
|
|
4043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogService, decorators: [{
|
|
4044
|
+
type: Injectable,
|
|
4045
|
+
args: [{
|
|
4046
|
+
providedIn: 'root',
|
|
4047
|
+
}]
|
|
4048
|
+
}], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2$1.Router }]; } });
|
|
4049
|
+
|
|
3744
4050
|
class UiActionService {
|
|
3745
|
-
constructor(confirmDialogService, textFieldDialogService, _snackBar) {
|
|
4051
|
+
constructor(confirmDialogService, textFieldDialogService, fileUploadDialogService, _snackBar) {
|
|
3746
4052
|
this.confirmDialogService = confirmDialogService;
|
|
3747
4053
|
this.textFieldDialogService = textFieldDialogService;
|
|
4054
|
+
this.fileUploadDialogService = fileUploadDialogService;
|
|
3748
4055
|
this._snackBar = _snackBar;
|
|
3749
4056
|
this._destroy$ = new Subject();
|
|
3750
4057
|
}
|
|
@@ -3818,6 +4125,10 @@ class UiActionService {
|
|
|
3818
4125
|
return yield this.handleInputTypeTextField(inputTypeName, uiAction, uiActionRequest);
|
|
3819
4126
|
case UiActionInputType.UserSelect:
|
|
3820
4127
|
return yield this.handleInputTypeUserSelect(inputTypeName, uiAction, uiActionRequest);
|
|
4128
|
+
case UiActionInputType.File:
|
|
4129
|
+
return yield this.handleInputTypeUpload(inputTypeName, uiAction, uiActionRequest, false);
|
|
4130
|
+
case UiActionInputType.MultipleFiles:
|
|
4131
|
+
return yield this.handleInputTypeUpload(inputTypeName, uiAction, uiActionRequest, true);
|
|
3821
4132
|
default:
|
|
3822
4133
|
return uiActionRequest;
|
|
3823
4134
|
}
|
|
@@ -3846,6 +4157,24 @@ class UiActionService {
|
|
|
3846
4157
|
return uiActionRequest;
|
|
3847
4158
|
});
|
|
3848
4159
|
}
|
|
4160
|
+
handleInputTypeUpload(inputTypeName, uiAction, uiActionRequest, isMultiple) {
|
|
4161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4162
|
+
this.fileUploadDialogService.inputTypeName = inputTypeName;
|
|
4163
|
+
this.fileUploadDialogService.action = uiAction;
|
|
4164
|
+
this.fileUploadDialogService.isMultiple = isMultiple;
|
|
4165
|
+
this.fileUploadDialogService.openDialog();
|
|
4166
|
+
yield this.fileUploadDialogService.onAction.toPromise();
|
|
4167
|
+
let files = this.fileUploadDialogService.files;
|
|
4168
|
+
if (!files || !files.length) {
|
|
4169
|
+
console.error('There was no response from InputDialog');
|
|
4170
|
+
return;
|
|
4171
|
+
}
|
|
4172
|
+
uiActionRequest.params = Object.assign(Object.assign({}, uiActionRequest.params), { _files: files, isMultiple, param: uiAction.inputType === 'file' || uiAction.inputType === 'multiple_files'
|
|
4173
|
+
? 'INPUT'
|
|
4174
|
+
: 'INPUT2' });
|
|
4175
|
+
return uiActionRequest;
|
|
4176
|
+
});
|
|
4177
|
+
}
|
|
3849
4178
|
handleInputTypeUserSelect(inputTypeName, uiAction, uiActionRequest) {
|
|
3850
4179
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3851
4180
|
let response = yield this.uiActionModel.serviceToUse.handleSpecificDemandsAsynchronously(uiAction, uiActionRequest);
|
|
@@ -3887,14 +4216,14 @@ class UiActionService {
|
|
|
3887
4216
|
});
|
|
3888
4217
|
}
|
|
3889
4218
|
}
|
|
3890
|
-
UiActionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionService, deps: [{ token: UiActionConfirmDialogService }, { token: UiActionInputDialogService }, { token:
|
|
4219
|
+
UiActionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionService, deps: [{ token: UiActionConfirmDialogService }, { token: UiActionInputDialogService }, { token: UiActionFileUploadDialogService }, { token: i4$4.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3891
4220
|
UiActionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionService, providedIn: 'root' });
|
|
3892
4221
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionService, decorators: [{
|
|
3893
4222
|
type: Injectable,
|
|
3894
4223
|
args: [{
|
|
3895
4224
|
providedIn: 'root',
|
|
3896
4225
|
}]
|
|
3897
|
-
}], ctorParameters: function () { return [{ type: UiActionConfirmDialogService }, { type: UiActionInputDialogService }, { type:
|
|
4226
|
+
}], ctorParameters: function () { return [{ type: UiActionConfirmDialogService }, { type: UiActionInputDialogService }, { type: UiActionFileUploadDialogService }, { type: i4$4.MatSnackBar }]; } });
|
|
3898
4227
|
|
|
3899
4228
|
class UiActionToolbarComponent {
|
|
3900
4229
|
constructor(service, inject) {
|
|
@@ -3993,7 +4322,7 @@ class UiActionToolbarComponent {
|
|
|
3993
4322
|
}
|
|
3994
4323
|
}
|
|
3995
4324
|
UiActionToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionToolbarComponent, deps: [{ token: UiActionService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
3996
|
-
UiActionToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: { uiActionModels: "uiActionModels", uiActionDescriptorService: "uiActionDescriptorService" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"uiActionButtonsContainer\">\r\n <button\r\n *ngFor=\"let uiActionModel of uiActionModelsWithDescriptions\"\r\n mat-button\r\n [ngClass]=\"getType(uiActionModel)\"\r\n class=\"{{ uiActionModel.cssClass }}\"\r\n [color]=\"uiActionModel.descriptor?.color\"\r\n (click)=\"onActionClicked($event, uiActionModel)\"\r\n (dblclick)=\"onActionDoubleClicked($event, uiActionModel)\"\r\n >\r\n <div *ngIf=\"isOnlyIcon(uiActionModel); then iconOnly; else text\"></div>\r\n <ng-template #iconOnly>\r\n <smart-icon\r\n *ngIf=\"uiActionModel.descriptor?.icon\"\r\n [icon]=\"uiActionModel.descriptor!.icon!\"\r\n [color]=\"uiActionModel.descriptor?.iconColor ?? uiActionModel.descriptor?.color\"\r\n ></smart-icon>\r\n </ng-template>\r\n <ng-template #text>\r\n <smart-icon\r\n *ngIf=\"\r\n uiActionModel.descriptor?.icon &&\r\n uiActionModel.descriptor?.iconPosition === iconPosition().Pre\r\n \"\r\n [icon]=\"uiActionModel.descriptor!.icon!\"\r\n [color]=\"uiActionModel.descriptor?.iconColor ?? uiActionModel.descriptor?.color\"\r\n ></smart-icon>\r\n {{ uiActionModel.descriptor?.title }}\r\n <smart-icon\r\n *ngIf=\"\r\n uiActionModel.descriptor?.icon &&\r\n uiActionModel.descriptor?.iconPosition === iconPosition().Post\r\n \"\r\n [icon]=\"uiActionModel.descriptor!.icon!\"\r\n [color]=\"uiActionModel.descriptor?.iconColor ?? uiActionModel.descriptor?.color\"\r\n ></smart-icon>\r\n </ng-template>\r\n </button>\r\n</div>\r\n", styles: [".uiActionButtonsContainer{display:flex;flex-direction:row;gap:1rem;flex-wrap:wrap;min-height:2.25rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type:
|
|
4325
|
+
UiActionToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: { uiActionModels: "uiActionModels", uiActionDescriptorService: "uiActionDescriptorService" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"uiActionButtonsContainer\">\r\n <button\r\n *ngFor=\"let uiActionModel of uiActionModelsWithDescriptions\"\r\n mat-button\r\n [ngClass]=\"getType(uiActionModel)\"\r\n class=\"{{ uiActionModel.cssClass }}\"\r\n [color]=\"uiActionModel.descriptor?.color\"\r\n (click)=\"onActionClicked($event, uiActionModel)\"\r\n (dblclick)=\"onActionDoubleClicked($event, uiActionModel)\"\r\n >\r\n <div *ngIf=\"isOnlyIcon(uiActionModel); then iconOnly; else text\"></div>\r\n <ng-template #iconOnly>\r\n <smart-icon\r\n *ngIf=\"uiActionModel.descriptor?.icon\"\r\n [icon]=\"uiActionModel.descriptor!.icon!\"\r\n [color]=\"uiActionModel.descriptor?.iconColor ?? uiActionModel.descriptor?.color\"\r\n ></smart-icon>\r\n </ng-template>\r\n <ng-template #text>\r\n <smart-icon\r\n *ngIf=\"\r\n uiActionModel.descriptor?.icon &&\r\n uiActionModel.descriptor?.iconPosition === iconPosition().Pre\r\n \"\r\n [icon]=\"uiActionModel.descriptor!.icon!\"\r\n [color]=\"uiActionModel.descriptor?.iconColor ?? uiActionModel.descriptor?.color\"\r\n ></smart-icon>\r\n {{ uiActionModel.descriptor?.title }}\r\n <smart-icon\r\n *ngIf=\"\r\n uiActionModel.descriptor?.icon &&\r\n uiActionModel.descriptor?.iconPosition === iconPosition().Post\r\n \"\r\n [icon]=\"uiActionModel.descriptor!.icon!\"\r\n [color]=\"uiActionModel.descriptor?.iconColor ?? uiActionModel.descriptor?.color\"\r\n ></smart-icon>\r\n </ng-template>\r\n </button>\r\n</div>\r\n", styles: [".uiActionButtonsContainer{display:flex;flex-direction:row;gap:1rem;flex-wrap:wrap;min-height:2.25rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3997
4326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionToolbarComponent, decorators: [{
|
|
3998
4327
|
type: Component,
|
|
3999
4328
|
args: [{ selector: 'smart-ui-action-toolbar', template: "<div class=\"uiActionButtonsContainer\">\r\n <button\r\n *ngFor=\"let uiActionModel of uiActionModelsWithDescriptions\"\r\n mat-button\r\n [ngClass]=\"getType(uiActionModel)\"\r\n class=\"{{ uiActionModel.cssClass }}\"\r\n [color]=\"uiActionModel.descriptor?.color\"\r\n (click)=\"onActionClicked($event, uiActionModel)\"\r\n (dblclick)=\"onActionDoubleClicked($event, uiActionModel)\"\r\n >\r\n <div *ngIf=\"isOnlyIcon(uiActionModel); then iconOnly; else text\"></div>\r\n <ng-template #iconOnly>\r\n <smart-icon\r\n *ngIf=\"uiActionModel.descriptor?.icon\"\r\n [icon]=\"uiActionModel.descriptor!.icon!\"\r\n [color]=\"uiActionModel.descriptor?.iconColor ?? uiActionModel.descriptor?.color\"\r\n ></smart-icon>\r\n </ng-template>\r\n <ng-template #text>\r\n <smart-icon\r\n *ngIf=\"\r\n uiActionModel.descriptor?.icon &&\r\n uiActionModel.descriptor?.iconPosition === iconPosition().Pre\r\n \"\r\n [icon]=\"uiActionModel.descriptor!.icon!\"\r\n [color]=\"uiActionModel.descriptor?.iconColor ?? uiActionModel.descriptor?.color\"\r\n ></smart-icon>\r\n {{ uiActionModel.descriptor?.title }}\r\n <smart-icon\r\n *ngIf=\"\r\n uiActionModel.descriptor?.icon &&\r\n uiActionModel.descriptor?.iconPosition === iconPosition().Post\r\n \"\r\n [icon]=\"uiActionModel.descriptor!.icon!\"\r\n [color]=\"uiActionModel.descriptor?.iconColor ?? uiActionModel.descriptor?.color\"\r\n ></smart-icon>\r\n </ng-template>\r\n </button>\r\n</div>\r\n", styles: [".uiActionButtonsContainer{display:flex;flex-direction:row;gap:1rem;flex-wrap:wrap;min-height:2.25rem}\n"] }]
|
|
@@ -4011,7 +4340,8 @@ SmartViewContextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
|
|
|
4011
4340
|
SmartViewRedirect,
|
|
4012
4341
|
UiActionToolbarComponent,
|
|
4013
4342
|
UiActionInputDialogComponent,
|
|
4014
|
-
UiActionConfirmDialogComponent
|
|
4343
|
+
UiActionConfirmDialogComponent,
|
|
4344
|
+
UiActionFileUploadDialogComponent], imports: [CommonModule,
|
|
4015
4345
|
HttpClientModule,
|
|
4016
4346
|
MatCommonModule,
|
|
4017
4347
|
MatButtonModule,
|
|
@@ -4046,6 +4376,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4046
4376
|
UiActionToolbarComponent,
|
|
4047
4377
|
UiActionInputDialogComponent,
|
|
4048
4378
|
UiActionConfirmDialogComponent,
|
|
4379
|
+
UiActionFileUploadDialogComponent,
|
|
4049
4380
|
],
|
|
4050
4381
|
imports: [
|
|
4051
4382
|
CommonModule,
|
|
@@ -4234,7 +4565,21 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
4234
4565
|
}
|
|
4235
4566
|
performUiActionRequest(uiActionRequest, widgetId, nodeId) {
|
|
4236
4567
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4237
|
-
if (
|
|
4568
|
+
if (uiActionRequest.params['_files']) {
|
|
4569
|
+
const param = uiActionRequest.params['param'];
|
|
4570
|
+
const files = uiActionRequest.params['_files'];
|
|
4571
|
+
const isMultiple = uiActionRequest.params['isMultiple'];
|
|
4572
|
+
delete uiActionRequest.params['param'];
|
|
4573
|
+
delete uiActionRequest.params['_files'];
|
|
4574
|
+
delete uiActionRequest.params['isMultiple'];
|
|
4575
|
+
if (!isMultiple) {
|
|
4576
|
+
yield this.viewContext.performUploadAction(this.uuid, uiActionRequest, param, files[0]);
|
|
4577
|
+
}
|
|
4578
|
+
else {
|
|
4579
|
+
yield this.viewContext.performUploadMultipleAction(this.uuid, uiActionRequest, param, files);
|
|
4580
|
+
}
|
|
4581
|
+
}
|
|
4582
|
+
else if (widgetId && nodeId) {
|
|
4238
4583
|
yield this.viewContext.performWidgetAction(this.uuid, widgetId, nodeId, uiActionRequest);
|
|
4239
4584
|
}
|
|
4240
4585
|
else if (widgetId) {
|