@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.
Files changed (34) hide show
  1. package/esm2020/lib/smart-client/smart-component-api-client.mjs +16 -2
  2. package/esm2020/lib/view-context/api/api/view.service.mjs +161 -3
  3. package/esm2020/lib/view-context/api/model/componentModel.mjs +1 -1
  4. package/esm2020/lib/view-context/api/model/models.mjs +4 -1
  5. package/esm2020/lib/view-context/api/model/uiActionConstraint.mjs +13 -0
  6. package/esm2020/lib/view-context/api/model/uiActionDescriptor.mjs +1 -1
  7. package/esm2020/lib/view-context/api/model/uiActionInputType.mjs +4 -2
  8. package/esm2020/lib/view-context/api/model/uiActionUploadDescriptor.mjs +13 -0
  9. package/esm2020/lib/view-context/api/model/uploadedFile.mjs +13 -0
  10. package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.mjs +68 -0
  11. package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.mjs +53 -0
  12. package/esm2020/lib/view-context/smart-ui-action/ui-action.service.mjs +32 -5
  13. package/esm2020/lib/view-context/smart-view-context.module.mjs +5 -2
  14. package/esm2020/lib/view-context/smart-view-context.service.mjs +27 -1
  15. package/fesm2015/smartbit4all-ng-client.mjs +360 -15
  16. package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
  17. package/fesm2020/smartbit4all-ng-client.mjs +385 -15
  18. package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
  19. package/lib/view-context/api/api/view.service.d.ts +47 -0
  20. package/lib/view-context/api/model/componentModel.d.ts +4 -0
  21. package/lib/view-context/api/model/models.d.ts +3 -0
  22. package/lib/view-context/api/model/uiActionConstraint.d.ts +22 -0
  23. package/lib/view-context/api/model/uiActionDescriptor.d.ts +2 -0
  24. package/lib/view-context/api/model/uiActionInputType.d.ts +3 -1
  25. package/lib/view-context/api/model/uiActionUploadDescriptor.d.ts +23 -0
  26. package/lib/view-context/api/model/uploadedFile.d.ts +19 -0
  27. package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.d.ts +30 -0
  28. package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.d.ts +22 -0
  29. package/lib/view-context/smart-ui-action/ui-action.service.d.ts +4 -1
  30. package/lib/view-context/smart-view-context.module.d.ts +10 -9
  31. package/lib/view-context/smart-view-context.service.d.ts +4 -0
  32. package/package.json +1 -1
  33. package/smartbit4all-ng-client-1.1.32.tgz +0 -0
  34. package/smartbit4all-ng-client-1.1.30.tgz +0 -0
@@ -3,7 +3,7 @@ import { InjectionToken, Injectable, Optional, Inject, PLATFORM_ID, NgModule, Sk
3
3
  import { Subject, takeUntil, map, catchError, throwError, from } from 'rxjs';
4
4
  import { SmartSubject } from '@smartbit4all/subject';
5
5
  import * as i1 from '@angular/common/http';
6
- import { HttpHeaders, HttpContext, HttpEventType, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
6
+ import { HttpHeaders, HttpContext, HttpParams, HttpEventType, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
7
7
  import * as i4 from '@angular/common';
8
8
  import { isPlatformBrowser, DOCUMENT, DatePipe, CommonModule } from '@angular/common';
9
9
  import * as i2 from '@angular/material/button';
@@ -14,15 +14,15 @@ import * as i3$1 from '@smartbit4all/navigation';
14
14
  import * as i4$1 from '@smartbit4all/dialog';
15
15
  import { SmartdialogService, SmartdialogModule } from '@smartbit4all/dialog';
16
16
  import { MatCommonModule } from '@angular/material/core';
17
- import * as i4$2 from '@angular/material/expansion';
17
+ import * as i4$3 from '@angular/material/expansion';
18
18
  import { MatExpansionModule } from '@angular/material/expansion';
19
19
  import { BrowserModule } from '@angular/platform-browser';
20
- import * as i3$2 from '@smartbit4all/icon';
20
+ import * as i4$2 from '@smartbit4all/icon';
21
21
  import { SmartIconModule } from '@smartbit4all/icon';
22
22
  import * as i1$1 from '@angular/material/dialog';
23
23
  import * as i2$1 from '@angular/router';
24
24
  import { catchError as catchError$1, switchMap } from 'rxjs/operators';
25
- import * as i3$3 from '@angular/material/snack-bar';
25
+ import * as i4$4 from '@angular/material/snack-bar';
26
26
  import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
27
27
  import { Validators } from '@angular/forms';
28
28
  import * as i5 from '@smartbit4all/form';
@@ -1095,6 +1095,19 @@ class ViewService {
1095
1095
  }
1096
1096
  this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
1097
1097
  }
1098
+ /**
1099
+ * @param consumes string[] mime-types
1100
+ * @return true: consumes contains 'multipart/form-data', false: otherwise
1101
+ */
1102
+ canConsumeForm(consumes) {
1103
+ const form = 'multipart/form-data';
1104
+ for (const consume of consumes) {
1105
+ if (form === consume) {
1106
+ return true;
1107
+ }
1108
+ }
1109
+ return false;
1110
+ }
1098
1111
  // @ts-ignore
1099
1112
  addToHttpParams(httpParams, value, key) {
1100
1113
  if (typeof value === "object" && value instanceof Date === false) {
@@ -1738,6 +1751,151 @@ class ViewService {
1738
1751
  reportProgress: reportProgress
1739
1752
  });
1740
1753
  }
1754
+ uploadAction(uuid, uiActionRequest, param, content, observe = 'body', reportProgress = false, options) {
1755
+ if (uuid === null || uuid === undefined) {
1756
+ throw new Error('Required parameter uuid was null or undefined when calling uploadAction.');
1757
+ }
1758
+ let localVarHeaders = this.defaultHeaders;
1759
+ let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1760
+ if (localVarHttpHeaderAcceptSelected === undefined) {
1761
+ // to determine the Accept header
1762
+ const httpHeaderAccepts = [
1763
+ 'application/json'
1764
+ ];
1765
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1766
+ }
1767
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1768
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1769
+ }
1770
+ let localVarHttpContext = options && options.context;
1771
+ if (localVarHttpContext === undefined) {
1772
+ localVarHttpContext = new HttpContext();
1773
+ }
1774
+ // to determine the Content-Type header
1775
+ const consumes = [
1776
+ 'multipart/form-data'
1777
+ ];
1778
+ const canConsumeForm = this.canConsumeForm(consumes);
1779
+ let localVarFormParams;
1780
+ let localVarUseForm = false;
1781
+ let localVarConvertFormParamsToString = false;
1782
+ // use FormData to transmit files using content-type "multipart/form-data"
1783
+ // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
1784
+ localVarUseForm = canConsumeForm;
1785
+ if (localVarUseForm) {
1786
+ localVarFormParams = new FormData();
1787
+ }
1788
+ else {
1789
+ localVarFormParams = new HttpParams({ encoder: this.encoder });
1790
+ }
1791
+ if (uiActionRequest !== undefined) {
1792
+ localVarFormParams = localVarFormParams.append('uiActionRequest', uiActionRequest) || localVarFormParams;
1793
+ }
1794
+ if (param !== undefined) {
1795
+ localVarFormParams = localVarFormParams.append('param', param) || localVarFormParams;
1796
+ }
1797
+ if (content !== undefined) {
1798
+ localVarFormParams = localVarFormParams.append('content', content) || localVarFormParams;
1799
+ }
1800
+ let responseType_ = 'json';
1801
+ if (localVarHttpHeaderAcceptSelected) {
1802
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1803
+ responseType_ = 'text';
1804
+ }
1805
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1806
+ responseType_ = 'json';
1807
+ }
1808
+ else {
1809
+ responseType_ = 'blob';
1810
+ }
1811
+ }
1812
+ let localVarPath = `/component/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/upload`;
1813
+ return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
1814
+ context: localVarHttpContext,
1815
+ body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
1816
+ responseType: responseType_,
1817
+ withCredentials: this.configuration.withCredentials,
1818
+ headers: localVarHeaders,
1819
+ observe: observe,
1820
+ reportProgress: reportProgress
1821
+ });
1822
+ }
1823
+ uploadMultipleAction(uuid, uiActionRequest, param, contents, observe = 'body', reportProgress = false, options) {
1824
+ if (uuid === null || uuid === undefined) {
1825
+ throw new Error('Required parameter uuid was null or undefined when calling uploadMultipleAction.');
1826
+ }
1827
+ let localVarHeaders = this.defaultHeaders;
1828
+ let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1829
+ if (localVarHttpHeaderAcceptSelected === undefined) {
1830
+ // to determine the Accept header
1831
+ const httpHeaderAccepts = [
1832
+ 'application/json'
1833
+ ];
1834
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1835
+ }
1836
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1837
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1838
+ }
1839
+ let localVarHttpContext = options && options.context;
1840
+ if (localVarHttpContext === undefined) {
1841
+ localVarHttpContext = new HttpContext();
1842
+ }
1843
+ // to determine the Content-Type header
1844
+ const consumes = [
1845
+ 'multipart/form-data'
1846
+ ];
1847
+ const canConsumeForm = this.canConsumeForm(consumes);
1848
+ let localVarFormParams;
1849
+ let localVarUseForm = false;
1850
+ let localVarConvertFormParamsToString = false;
1851
+ // use FormData to transmit files using content-type "multipart/form-data"
1852
+ // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
1853
+ localVarUseForm = canConsumeForm;
1854
+ if (localVarUseForm) {
1855
+ localVarFormParams = new FormData();
1856
+ }
1857
+ else {
1858
+ localVarFormParams = new HttpParams({ encoder: this.encoder });
1859
+ }
1860
+ if (uiActionRequest !== undefined) {
1861
+ localVarFormParams = localVarFormParams.append('uiActionRequest', uiActionRequest) || localVarFormParams;
1862
+ }
1863
+ if (param !== undefined) {
1864
+ localVarFormParams = localVarFormParams.append('param', param) || localVarFormParams;
1865
+ }
1866
+ if (contents) {
1867
+ if (localVarUseForm) {
1868
+ contents.forEach((element) => {
1869
+ localVarFormParams = localVarFormParams.append('contents', element) || localVarFormParams;
1870
+ });
1871
+ }
1872
+ else {
1873
+ localVarFormParams = localVarFormParams.append('contents', [...contents].join(COLLECTION_FORMATS['csv'])) || localVarFormParams;
1874
+ }
1875
+ }
1876
+ let responseType_ = 'json';
1877
+ if (localVarHttpHeaderAcceptSelected) {
1878
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1879
+ responseType_ = 'text';
1880
+ }
1881
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1882
+ responseType_ = 'json';
1883
+ }
1884
+ else {
1885
+ responseType_ = 'blob';
1886
+ }
1887
+ }
1888
+ let localVarPath = `/component/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/uploadMultiple`;
1889
+ return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
1890
+ context: localVarHttpContext,
1891
+ body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
1892
+ responseType: responseType_,
1893
+ withCredentials: this.configuration.withCredentials,
1894
+ headers: localVarHeaders,
1895
+ observe: observe,
1896
+ reportProgress: reportProgress
1897
+ });
1898
+ }
1741
1899
  }
1742
1900
  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 });
1743
1901
  ViewService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewService, providedIn: 'root' });
@@ -1887,6 +2045,18 @@ const UiActionButtonType = {
1887
2045
  Fab: 'FAB'
1888
2046
  };
1889
2047
 
2048
+ /**
2049
+ * View API
2050
+ * View API
2051
+ *
2052
+ * The version of the OpenAPI document: 1.0.0
2053
+ * Contact: info@it4all.hu
2054
+ *
2055
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2056
+ * https://openapi-generator.tech
2057
+ * Do not edit the class manually.
2058
+ */
2059
+
1890
2060
  /**
1891
2061
  * View API
1892
2062
  * View API
@@ -1918,7 +2088,9 @@ const UiActionInputType = {
1918
2088
  None: 'none',
1919
2089
  Textfield: 'textfield',
1920
2090
  Textarea: 'textarea',
1921
- UserSelect: 'user_select'
2091
+ UserSelect: 'user_select',
2092
+ File: 'file',
2093
+ MultipleFiles: 'multiple_files'
1922
2094
  };
1923
2095
 
1924
2096
  /**
@@ -1945,6 +2117,30 @@ const UiActionInputType = {
1945
2117
  * Do not edit the class manually.
1946
2118
  */
1947
2119
 
2120
+ /**
2121
+ * View API
2122
+ * View API
2123
+ *
2124
+ * The version of the OpenAPI document: 1.0.0
2125
+ * Contact: info@it4all.hu
2126
+ *
2127
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2128
+ * https://openapi-generator.tech
2129
+ * Do not edit the class manually.
2130
+ */
2131
+
2132
+ /**
2133
+ * View API
2134
+ * View API
2135
+ *
2136
+ * The version of the OpenAPI document: 1.0.0
2137
+ * Contact: info@it4all.hu
2138
+ *
2139
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2140
+ * https://openapi-generator.tech
2141
+ * Do not edit the class manually.
2142
+ */
2143
+
1948
2144
  /**
1949
2145
  * View API
1950
2146
  * View API
@@ -2490,6 +2686,22 @@ class SmartViewContextService {
2490
2686
  // });
2491
2687
  // return await isCompleted.toPromise();
2492
2688
  }
2689
+ async performUploadAction(uuid, uiActionRequest, param, content) {
2690
+ this._performUploadAction({
2691
+ uuid,
2692
+ uiActionRequest,
2693
+ param,
2694
+ content,
2695
+ });
2696
+ }
2697
+ async performUploadMultipleAction(uuid, uiActionRequest, param, content) {
2698
+ this._performUploadMultipleAction({
2699
+ uuid,
2700
+ uiActionRequest,
2701
+ param,
2702
+ content,
2703
+ });
2704
+ }
2493
2705
  async dataChanged(uuid, dataChange) {
2494
2706
  return await this._dataChanged({ uuid, dataChange });
2495
2707
  // const isCompleted = new Subject<void>();
@@ -2519,6 +2731,16 @@ class SmartViewContextService {
2519
2731
  .performWidgetMainAction(config.uuid, config.widgetId, config.uiActionRequest)
2520
2732
  .toPromise());
2521
2733
  }
2734
+ async _performUploadAction(config) {
2735
+ return await this.handlePerformActionResponse(await this.view
2736
+ .uploadAction(config.uuid, JSON.stringify(config.uiActionRequest), config.param, config.content)
2737
+ .toPromise());
2738
+ }
2739
+ async _performUploadMultipleAction(config) {
2740
+ return await this.handlePerformActionResponse(await this.view
2741
+ .uploadMultipleAction(config.uuid, JSON.stringify(config.uiActionRequest), config.param, config.content)
2742
+ .toPromise());
2743
+ }
2522
2744
  async _dataChanged(config) {
2523
2745
  return await this.handlePerformActionResponse(await this.view.dataChanged(config.uuid, config.dataChange).toPromise());
2524
2746
  }
@@ -2858,7 +3080,7 @@ class SmartDevToolDialogComponent {
2858
3080
  }
2859
3081
  }
2860
3082
  SmartDevToolDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolDialogComponent, deps: [{ token: SmartDevToolDialogService }], target: i0.ɵɵFactoryTarget.Component });
2861
- 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 } });
3083
+ 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 } });
2862
3084
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolDialogComponent, decorators: [{
2863
3085
  type: Component,
2864
3086
  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"] }]
@@ -2913,7 +3135,7 @@ class SmartDevToolFloatingButtonComponent {
2913
3135
  }
2914
3136
  }
2915
3137
  SmartDevToolFloatingButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolFloatingButtonComponent, deps: [{ token: SmartDevToolDialogService }], target: i0.ɵɵFactoryTarget.Component });
2916
- 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: i3$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3138
+ 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"] }] });
2917
3139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolFloatingButtonComponent, decorators: [{
2918
3140
  type: Component,
2919
3141
  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"] }]
@@ -3542,7 +3764,7 @@ class UiActionConfirmDialogComponent {
3542
3764
  }
3543
3765
  }
3544
3766
  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 });
3545
- 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: i3$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }] });
3767
+ 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"] }] });
3546
3768
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogComponent, decorators: [{
3547
3769
  type: Component,
3548
3770
  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"] }]
@@ -3688,7 +3910,7 @@ class UiActionInputDialogComponent {
3688
3910
  }
3689
3911
  }
3690
3912
  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 });
3691
- 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: i3$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i5.SmartformComponent, selector: "smartform", inputs: ["smartForm"] }] });
3913
+ 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"] }] });
3692
3914
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogComponent, decorators: [{
3693
3915
  type: Component,
3694
3916
  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 +3963,117 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3741
3963
  }]
3742
3964
  }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2$1.Router }]; } });
3743
3965
 
3966
+ class UiActionFileUploadDialogComponent {
3967
+ constructor(service, manager) {
3968
+ this.service = service;
3969
+ this.manager = manager;
3970
+ this.code = this.service.action.code;
3971
+ this.setUp();
3972
+ }
3973
+ ngOnDestroy() {
3974
+ this.service._destroy$.next();
3975
+ this.cancel();
3976
+ }
3977
+ async setUp() {
3978
+ this.descriptor = await this.manager.getActionDescriptor(this.service.action);
3979
+ this.isMultiple = this.service.isMultiple;
3980
+ this.i18n = {
3981
+ addFile: this.descriptor.upload?.title ?? 'dokumentum hozzáadása',
3982
+ browseOrDrag: this.descriptor.upload?.description ?? 'tallózás vagy behúzás',
3983
+ formats: this.descriptor.upload?.formats ?? '',
3984
+ maxSize: this.descriptor.upload?.maxSize ?? '',
3985
+ upload: this.descriptor.upload?.uploadButtonTitle,
3986
+ };
3987
+ // TODO set max size and file formats by UiAction.params
3988
+ if (this.descriptor[this.service.inputTypeName]) {
3989
+ this.dialogType = this.service.inputTypeName;
3990
+ }
3991
+ else {
3992
+ this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
3993
+ }
3994
+ }
3995
+ getTitle() {
3996
+ return this.descriptor[this.dialogType].title;
3997
+ }
3998
+ getText() {
3999
+ return this.descriptor[this.dialogType].text ?? '';
4000
+ }
4001
+ getActionButtonLabel() {
4002
+ return this.descriptor[this.dialogType].actionButton.caption;
4003
+ }
4004
+ getActionButtonColor() {
4005
+ return this.descriptor[this.dialogType].actionButton.color;
4006
+ }
4007
+ getCancelButtonLabel() {
4008
+ return this.descriptor[this.dialogType].cancelButton.caption;
4009
+ }
4010
+ getCancelButtonColor() {
4011
+ return this.descriptor[this.dialogType].cancelButton.color;
4012
+ }
4013
+ upload(files) {
4014
+ this.service.onSave(files);
4015
+ }
4016
+ cancel() {
4017
+ this.service.cancel();
4018
+ }
4019
+ }
4020
+ 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 });
4021
+ 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"] }] });
4022
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogComponent, decorators: [{
4023
+ type: Component,
4024
+ 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: [""] }]
4025
+ }], ctorParameters: function () { return [{ type: UiActionFileUploadDialogService }, { type: UiActionDescriptorService }]; } });
4026
+
4027
+ class UiActionFileUploadDialogService extends SmartdialogService {
4028
+ constructor(dialog, router) {
4029
+ super(dialog, router);
4030
+ this._destroy$ = new Subject();
4031
+ this.onAction = new SmartSubject(this._destroy$);
4032
+ this.isMultiple = false;
4033
+ }
4034
+ setDataAndOpenDialog(action, nodeName) {
4035
+ this.action = action;
4036
+ this.nodeName = nodeName;
4037
+ this.openDialog();
4038
+ }
4039
+ openDialog() {
4040
+ this.files = undefined;
4041
+ this.onAction = new SmartSubject(this._destroy$);
4042
+ const dialogData = {
4043
+ content: {
4044
+ title: '',
4045
+ },
4046
+ size: {},
4047
+ customComponent: UiActionFileUploadDialogComponent,
4048
+ };
4049
+ this.createDialog(dialogData, UiActionFileUploadDialogComponent);
4050
+ }
4051
+ async onSave(files) {
4052
+ this.files = files;
4053
+ this.onAction.complete();
4054
+ this.closeDialog();
4055
+ this.onAction = new SmartSubject(this._destroy$);
4056
+ }
4057
+ cancel() {
4058
+ this.onAction.complete();
4059
+ this.closeDialog();
4060
+ this.onAction = new SmartSubject(this._destroy$);
4061
+ }
4062
+ }
4063
+ 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 });
4064
+ UiActionFileUploadDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogService, providedIn: 'root' });
4065
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogService, decorators: [{
4066
+ type: Injectable,
4067
+ args: [{
4068
+ providedIn: 'root',
4069
+ }]
4070
+ }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2$1.Router }]; } });
4071
+
3744
4072
  class UiActionService {
3745
- constructor(confirmDialogService, textFieldDialogService, _snackBar) {
4073
+ constructor(confirmDialogService, textFieldDialogService, fileUploadDialogService, _snackBar) {
3746
4074
  this.confirmDialogService = confirmDialogService;
3747
4075
  this.textFieldDialogService = textFieldDialogService;
4076
+ this.fileUploadDialogService = fileUploadDialogService;
3748
4077
  this._snackBar = _snackBar;
3749
4078
  this._destroy$ = new Subject();
3750
4079
  }
@@ -3814,6 +4143,10 @@ class UiActionService {
3814
4143
  return await this.handleInputTypeTextField(inputTypeName, uiAction, uiActionRequest);
3815
4144
  case UiActionInputType.UserSelect:
3816
4145
  return await this.handleInputTypeUserSelect(inputTypeName, uiAction, uiActionRequest);
4146
+ case UiActionInputType.File:
4147
+ return await this.handleInputTypeUpload(inputTypeName, uiAction, uiActionRequest, false);
4148
+ case UiActionInputType.MultipleFiles:
4149
+ return await this.handleInputTypeUpload(inputTypeName, uiAction, uiActionRequest, true);
3817
4150
  default:
3818
4151
  return uiActionRequest;
3819
4152
  }
@@ -3842,6 +4175,27 @@ class UiActionService {
3842
4175
  };
3843
4176
  return uiActionRequest;
3844
4177
  }
4178
+ async handleInputTypeUpload(inputTypeName, uiAction, uiActionRequest, isMultiple) {
4179
+ this.fileUploadDialogService.inputTypeName = inputTypeName;
4180
+ this.fileUploadDialogService.action = uiAction;
4181
+ this.fileUploadDialogService.isMultiple = isMultiple;
4182
+ this.fileUploadDialogService.openDialog();
4183
+ await this.fileUploadDialogService.onAction.toPromise();
4184
+ let files = this.fileUploadDialogService.files;
4185
+ if (!files || !files.length) {
4186
+ console.error('There was no response from InputDialog');
4187
+ return;
4188
+ }
4189
+ uiActionRequest.params = {
4190
+ ...uiActionRequest.params,
4191
+ _files: files,
4192
+ isMultiple,
4193
+ param: uiAction.inputType === 'file' || uiAction.inputType === 'multiple_files'
4194
+ ? 'INPUT'
4195
+ : 'INPUT2',
4196
+ };
4197
+ return uiActionRequest;
4198
+ }
3845
4199
  async handleInputTypeUserSelect(inputTypeName, uiAction, uiActionRequest) {
3846
4200
  let response = await this.uiActionModel.serviceToUse.handleSpecificDemandsAsynchronously(uiAction, uiActionRequest);
3847
4201
  if (!response.shouldPerformAction || !response.uiActionRequest) {
@@ -3878,14 +4232,14 @@ class UiActionService {
3878
4232
  });
3879
4233
  }
3880
4234
  }
3881
- UiActionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionService, deps: [{ token: UiActionConfirmDialogService }, { token: UiActionInputDialogService }, { token: i3$3.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable });
4235
+ 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 });
3882
4236
  UiActionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionService, providedIn: 'root' });
3883
4237
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionService, decorators: [{
3884
4238
  type: Injectable,
3885
4239
  args: [{
3886
4240
  providedIn: 'root',
3887
4241
  }]
3888
- }], ctorParameters: function () { return [{ type: UiActionConfirmDialogService }, { type: UiActionInputDialogService }, { type: i3$3.MatSnackBar }]; } });
4242
+ }], ctorParameters: function () { return [{ type: UiActionConfirmDialogService }, { type: UiActionInputDialogService }, { type: UiActionFileUploadDialogService }, { type: i4$4.MatSnackBar }]; } });
3889
4243
 
3890
4244
  class UiActionToolbarComponent {
3891
4245
  constructor(service, inject) {
@@ -3977,7 +4331,7 @@ class UiActionToolbarComponent {
3977
4331
  }
3978
4332
  }
3979
4333
  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 });
3980
- 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: i3$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"] }] });
4334
+ 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"] }] });
3981
4335
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionToolbarComponent, decorators: [{
3982
4336
  type: Component,
3983
4337
  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"] }]
@@ -3995,7 +4349,8 @@ SmartViewContextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
3995
4349
  SmartViewRedirect,
3996
4350
  UiActionToolbarComponent,
3997
4351
  UiActionInputDialogComponent,
3998
- UiActionConfirmDialogComponent], imports: [CommonModule,
4352
+ UiActionConfirmDialogComponent,
4353
+ UiActionFileUploadDialogComponent], imports: [CommonModule,
3999
4354
  HttpClientModule,
4000
4355
  MatCommonModule,
4001
4356
  MatButtonModule,
@@ -4030,6 +4385,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4030
4385
  UiActionToolbarComponent,
4031
4386
  UiActionInputDialogComponent,
4032
4387
  UiActionConfirmDialogComponent,
4388
+ UiActionFileUploadDialogComponent,
4033
4389
  ],
4034
4390
  imports: [
4035
4391
  CommonModule,
@@ -4213,7 +4569,21 @@ let SmartComponentApiClient = class SmartComponentApiClient {
4213
4569
  return this.data;
4214
4570
  }
4215
4571
  async performUiActionRequest(uiActionRequest, widgetId, nodeId) {
4216
- if (widgetId && nodeId) {
4572
+ if (uiActionRequest.params['_files']) {
4573
+ const param = uiActionRequest.params['param'];
4574
+ const files = uiActionRequest.params['_files'];
4575
+ const isMultiple = uiActionRequest.params['isMultiple'];
4576
+ delete uiActionRequest.params['param'];
4577
+ delete uiActionRequest.params['_files'];
4578
+ delete uiActionRequest.params['isMultiple'];
4579
+ if (!isMultiple) {
4580
+ await this.viewContext.performUploadAction(this.uuid, uiActionRequest, param, files[0]);
4581
+ }
4582
+ else {
4583
+ await this.viewContext.performUploadMultipleAction(this.uuid, uiActionRequest, param, files);
4584
+ }
4585
+ }
4586
+ else if (widgetId && nodeId) {
4217
4587
  await this.viewContext.performWidgetAction(this.uuid, widgetId, nodeId, uiActionRequest);
4218
4588
  }
4219
4589
  else if (widgetId) {