@tsi-developpement/tsi-shared-ui 1.9.2 → 1.9.4
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/esm2022/lib/enums/grid-sizing-mode.mjs +15 -0
- package/esm2022/lib/enums/index.mjs +2 -2
- package/esm2022/lib/interfaces/grid/grid-configuration.mjs +1 -1
- package/esm2022/lib/interfaces/index.mjs +1 -2
- package/esm2022/lib/tsi-components/create-or-edit-entity-informations/create-or-edit-entity-informations.component.mjs +1 -1
- package/esm2022/lib/tsi-components/create-or-edit-modele-import/create-or-edit-modele-import.component.mjs +4 -5
- package/esm2022/lib/tsi-components/input-components/editable-grid/editable-grid.component.mjs +61 -3
- package/esm2022/lib/tsi-components/input-components/tsi-rate-input/tsi-rate-input.component.mjs +41 -12
- package/esm2022/lib/tsi-components/manage-import-export/manage-import-export.component.mjs +1 -1
- package/esm2022/lib/tsi-components/manage-reporting/manage-reporting.component.mjs +3 -5
- package/esm2022/lib/tsi-components/modal-component/modal.component.mjs +1 -1
- package/esm2022/lib/tsi-components/output-components/tsi-generic-grid/tsi-generic-grid.component.mjs +71 -78
- package/esm2022/lib/tsi-components/output-components/tsi-rate-display/tsi-rate-display.component.mjs +15 -5
- package/esm2022/lib/tsi-components/output-components/tsi-view-grid/tsi-view-grid.component.mjs +7 -4
- package/esm2022/lib/tsi-components/tsi-action-erp-create-or-edit/tsi-action-erp-create-or-edit.component.mjs +1 -1
- package/esm2022/lib/tsi-components/tsi-action-erp-list/tsi-action-erp-list.component.mjs +1 -1
- package/esm2022/lib/tsi-components/tsi-dynamic-form/dynamic-form-list/dynamic-form-list.component.mjs +1 -1
- package/esm2022/lib/tsi-components/tsi-generic-crud/tsi-generic-crud.component.mjs +7 -3
- package/esm2022/lib/tsi-components/tsi-notes-grid/tsi-notes-grid.component.mjs +1 -1
- package/esm2022/lib/tsi-components/tsi-popup-text-viewer/tsi-popup-text-viewer.component.mjs +1 -1
- package/esm2022/lib/tsi-components/tsi-upload-grid/tsi-upload-grid.component.mjs +1 -1
- package/esm2022/lib/tsi-helpers/column-width.controller.mjs +97 -0
- package/esm2022/lib/tsi-helpers/grid-col-style.helper.mjs +28 -5
- package/fesm2022/tsi-developpement-tsi-shared-ui.mjs +4039 -3839
- package/fesm2022/tsi-developpement-tsi-shared-ui.mjs.map +1 -1
- package/lib/consts/app-providers.d.ts +1 -1
- package/lib/enums/grid-sizing-mode.d.ts +13 -0
- package/lib/enums/index.d.ts +1 -1
- package/lib/interfaces/grid/grid-configuration.d.ts +7 -2
- package/lib/interfaces/index.d.ts +0 -1
- package/lib/tsi-components/input-components/editable-grid/editable-grid.component.d.ts +45 -1
- package/lib/tsi-components/input-components/tsi-rate-input/tsi-rate-input.component.d.ts +24 -3
- package/lib/tsi-components/output-components/tsi-generic-grid/tsi-generic-grid.component.d.ts +48 -2
- package/lib/tsi-components/output-components/tsi-rate-display/tsi-rate-display.component.d.ts +7 -1
- package/lib/tsi-components/output-components/tsi-view-grid/tsi-view-grid.component.d.ts +3 -2
- package/lib/tsi-components/tsi-generic-crud/tsi-generic-crud.component.d.ts +3 -1
- package/lib/tsi-helpers/column-width.controller.d.ts +67 -0
- package/lib/tsi-helpers/grid-col-style.helper.d.ts +16 -5
- package/package.json +1 -1
- package/esm2022/lib/enums/css-units.mjs +0 -10
- package/esm2022/lib/interfaces/styles/css-size-property.mjs +0 -17
- package/lib/enums/css-units.d.ts +0 -8
- package/lib/interfaces/styles/css-size-property.d.ts +0 -10
package/esm2022/lib/tsi-components/input-components/tsi-rate-input/tsi-rate-input.component.mjs
CHANGED
|
@@ -8,8 +8,16 @@ import * as i4 from "../../../tsi-directives/auto-select.directive";
|
|
|
8
8
|
export class TsiRateInputComponent extends TsiInputBase {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Governs how the percentage the user sees/edits relates to the value stored in the model.
|
|
13
|
+
* The user always reads and types a percentage; this flag only changes what is persisted.
|
|
14
|
+
*
|
|
15
|
+
* - false (default): "2 %" on screen is stored as the whole percent `2`.
|
|
16
|
+
* - true : "2 %" on screen is stored as the fraction `0.02`.
|
|
17
|
+
*
|
|
18
|
+
* Must match the `isFraction` given to the mirror `Tsi-Rate-Display` so the pair
|
|
19
|
+
* interprets a stored value identically.
|
|
20
|
+
*/
|
|
13
21
|
this.isFraction = false;
|
|
14
22
|
this.numOfDecimal = 2;
|
|
15
23
|
//#endregion
|
|
@@ -19,16 +27,17 @@ export class TsiRateInputComponent extends TsiInputBase {
|
|
|
19
27
|
//#endregion
|
|
20
28
|
this.isValueChanged = false;
|
|
21
29
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
/**
|
|
31
|
+
* The percentage shown in / typed into the p-inputNumber. It is a view-only
|
|
32
|
+
* projection of the stored model value (`inputField`), converted according to
|
|
33
|
+
* `isFraction`. The model remains the single source of truth.
|
|
34
|
+
*/
|
|
35
|
+
get displayValue() {
|
|
36
|
+
return this.toDisplay(this.inputField);
|
|
28
37
|
}
|
|
29
38
|
valueChanged(event) {
|
|
30
39
|
this.isValueChanged = true;
|
|
31
|
-
this.inputField = event;
|
|
40
|
+
this.inputField = this.toModel(event);
|
|
32
41
|
this.isDirty = true;
|
|
33
42
|
}
|
|
34
43
|
onChangeofOptions() {
|
|
@@ -38,12 +47,32 @@ export class TsiRateInputComponent extends TsiInputBase {
|
|
|
38
47
|
this.isValueChanged = false;
|
|
39
48
|
}
|
|
40
49
|
}
|
|
50
|
+
/** stored model value -> on-screen percentage */
|
|
51
|
+
toDisplay(model) {
|
|
52
|
+
if (model == null) {
|
|
53
|
+
return model;
|
|
54
|
+
}
|
|
55
|
+
return this.isFraction ? this.round(model * 100, this.numOfDecimal ?? 0) : model;
|
|
56
|
+
}
|
|
57
|
+
/** on-screen percentage -> stored model value */
|
|
58
|
+
toModel(displayValue) {
|
|
59
|
+
if (displayValue == null) {
|
|
60
|
+
return displayValue;
|
|
61
|
+
}
|
|
62
|
+
// A fraction needs two more decimals than the percentage the user typed.
|
|
63
|
+
return this.isFraction ? this.round(displayValue / 100, (this.numOfDecimal ?? 0) + 2) : displayValue;
|
|
64
|
+
}
|
|
65
|
+
/** Rounds to a fixed number of decimals, guarding against binary-float drift introduced by the x100 conversion. */
|
|
66
|
+
round(value, decimals) {
|
|
67
|
+
const factor = Math.pow(10, decimals);
|
|
68
|
+
return Math.round((value + Number.EPSILON) * factor) / factor;
|
|
69
|
+
}
|
|
41
70
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TsiRateInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TsiRateInputComponent, selector: "Tsi-Rate-Input", inputs: { required: "required", isFraction: "isFraction", numOfDecimal: "numOfDecimal" }, outputs: { newItemEvent: "newItemEvent", inputFieldChange: "inputFieldChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"flex h-2rem\">\r\n <p-inputNumber autoSelect class=\"{{myStyleClass}}\" \r\n styleClass=\"{{myStyleClass}} border-radius-7\" \r\n inputStyleClass=\"{{myStyleClass}} {{validationStatusCssClass}}\"\r\n [disabled]=\"disabled\" [ngModel]=\"
|
|
71
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TsiRateInputComponent, selector: "Tsi-Rate-Input", inputs: { required: "required", isFraction: "isFraction", numOfDecimal: "numOfDecimal" }, outputs: { newItemEvent: "newItemEvent", inputFieldChange: "inputFieldChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"flex h-2rem\">\r\n <p-inputNumber autoSelect class=\"{{myStyleClass}}\" \r\n styleClass=\"{{myStyleClass}} border-radius-7\" \r\n inputStyleClass=\"{{myStyleClass}} {{validationStatusCssClass}}\"\r\n [disabled]=\"disabled\" [ngModel]=\"displayValue\"\r\n (ngModelChange)=\"valueChanged($event)\"\r\n [required]=\"isRequired\"\r\n (onBlur)=\"onChangeofOptions()\" name=\"{{inputName}}\"\r\n id=\"{{inputId}}\" suffix=\"%\" [minFractionDigits]=\"numOfDecimal ?? 0\" [maxFractionDigits]=\"numOfDecimal ?? 0\"\r\n [locale]=\"locale\">\r\n </p-inputNumber>\r\n <Tsi-Bubble-Info [infoText]=\"infoText\"></Tsi-Bubble-Info>\r\n</div>", styles: [".ColorClass{background-color:#f0f;text-align:right}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: i3.TsiBubbleInfoComponent, selector: "Tsi-Bubble-Info", inputs: ["infoText"] }, { kind: "directive", type: i4.AutoSelectDirective, selector: "[autoSelect]" }] }); }
|
|
43
72
|
}
|
|
44
73
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TsiRateInputComponent, decorators: [{
|
|
45
74
|
type: Component,
|
|
46
|
-
args: [{ selector: 'Tsi-Rate-Input', template: "<div class=\"flex h-2rem\">\r\n <p-inputNumber autoSelect class=\"{{myStyleClass}}\" \r\n styleClass=\"{{myStyleClass}} border-radius-7\" \r\n inputStyleClass=\"{{myStyleClass}} {{validationStatusCssClass}}\"\r\n [disabled]=\"disabled\" [ngModel]=\"
|
|
75
|
+
args: [{ selector: 'Tsi-Rate-Input', template: "<div class=\"flex h-2rem\">\r\n <p-inputNumber autoSelect class=\"{{myStyleClass}}\" \r\n styleClass=\"{{myStyleClass}} border-radius-7\" \r\n inputStyleClass=\"{{myStyleClass}} {{validationStatusCssClass}}\"\r\n [disabled]=\"disabled\" [ngModel]=\"displayValue\"\r\n (ngModelChange)=\"valueChanged($event)\"\r\n [required]=\"isRequired\"\r\n (onBlur)=\"onChangeofOptions()\" name=\"{{inputName}}\"\r\n id=\"{{inputId}}\" suffix=\"%\" [minFractionDigits]=\"numOfDecimal ?? 0\" [maxFractionDigits]=\"numOfDecimal ?? 0\"\r\n [locale]=\"locale\">\r\n </p-inputNumber>\r\n <Tsi-Bubble-Info [infoText]=\"infoText\"></Tsi-Bubble-Info>\r\n</div>", styles: [".ColorClass{background-color:#f0f;text-align:right}\n"] }]
|
|
47
76
|
}], propDecorators: { required: [{
|
|
48
77
|
type: Input
|
|
49
78
|
}], isFraction: [{
|
|
@@ -55,4 +84,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
55
84
|
}], inputFieldChange: [{
|
|
56
85
|
type: Output
|
|
57
86
|
}] } });
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
87
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHNpLXJhdGUtaW5wdXQuY29tcG9uZW50LmpzIiwic291cmNlUm9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0aW9ucygpXCIgbmFtZT1cInt7aW5wdXROYW1lfX1cIlxyXG4gICAgICAgIGlkPVwie3tpbnB1dElkfX1cIiBzdWZmaXg9XCIlXCIgW21pbkZyYWN0aW9uRGlnaXRzXT1cIm51bU9mRGVjaW1hbCA/PyAwXCIgW21heEZyYWN0aW9uRGlnaXRzXT1cIm51bU9mRGVjaW1hbCA/PyAwXCJcclxuICAgICAgICBbbG9jYWxlXT1cImxvY2FsZVwiPlxyXG4gICAgPC9wLWlucHV0TnVtYmVyPlxyXG4gICAgPFRzaS1CdWJibGUtSW5mbyBbaW5mb1RleHRdPVwiaW5mb1RleHRcIj48L1RzaS1CdWJibGUtSW5mbz5cclxuPC9kaXY+Il19
|
|
@@ -489,7 +489,7 @@ export class ManageImportExportComponent extends TsiFormComponentBaseComponent {
|
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ManageImportExportComponent, deps: [{ token: i1.ModeleImportService }, { token: i1.TsiConfirmationService }, { token: i1.TsiNotificationService }, { token: i2.DynamicDialogConfig }, { token: i1.TsiModalService }, { token: i1.ErrorResponseManagerService }, { token: i2.DynamicDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
492
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ManageImportExportComponent, selector: "app-manage-import-export", providers: [...appProviders], viewQueries: [{ propertyName: "gridComponent", first: true, predicate: TsiViewGridComponent, descendants: true }, { propertyName: "fileUploader", first: true, predicate: ["fileUpload"], descendants: true }, { propertyName: "viewGridComponent", first: true, predicate: ["viewGrid"], descendants: true }, { propertyName: "importFileToExecuteFileUpload", first: true, predicate: ["importFileToExecuteFileUpload"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<p-tabView>\r\n <p-tabPanel [header]=\"'shared_execute_import_model_import_export' | localize\" class=\"pt-3 px-2\">\r\n <div class=\"card\">\r\n <div *busy=\"isloading\"></div>\r\n <div class=\"grid\">\r\n <div class=\"grid col-10\">\r\n <div>\r\n <Tsi-Label class=\"col-2\" [labelValue]=\"'shared_reporting_form'\">\r\n </Tsi-Label>\r\n <!-- <p-dropdown class=\"col-10 tsi-component\" class=\"tsi-component\" styleClass=\"tsi-component\" appendTp=\"body\"\r\n optionLabel=\"value\" optionValue=\"key\" [filter]=\"true\"\r\n filterBy=\"value\" [showClear]=\"true\" placeholder=\"{{'shared_reporting_select_form' | localize}}\"\r\n [disabled]=\"true\">\r\n </p-dropdown> -->\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <p-toolbar styleClass=\"mb-4 gap-2\">\r\n <ng-template pTemplate=\"left\">\r\n <Tsi-Button [text]=\"'shared_reporting_add_report' | localize\"\r\n icon=\"p-button-icon p-button-icon-left pi pi-plus\"\r\n styleClass=\"p-element p-button-success mr-2 p-button p-component ng-star-inserted p-button-label\"\r\n (click)=\"openModal()\"></Tsi-Button>\r\n </ng-template>\r\n <ng-template pTemplate=\"right\">\r\n <p-fileUpload #fileUpload name=\"demo[]\" (onBeforeUpload)=\"onImportFile($event)\"\r\n (onSelect)=\"onFileSelected($event)\" (onClear)=\"onClear($event)\" (onRemove)=\"onRemove($event)\"\r\n [multiple]=\"false\" accept=\"application/json\" [maxFileSize]=\"1000000\"\r\n [invalidFileSizeMessageSummary]=\"'shared_file_upload_invalid_file_size_message_summary' | localize\"\r\n [invalidFileSizeMessageDetail]=\"'shared_file_upload_invalid_file_size_message_detail' | localize\"\r\n [invalidFileTypeMessageSummary]=\"'shared_file_upload_invalid_file_type_message_summary' | localize\"\r\n [invalidFileLimitMessageDetail]=\"'shared_file_upload_invalid_file_limit_message_detail' | localize\"\r\n [invalidFileLimitMessageSummary]=\"'shared_file_upload_invalid_file_limit_message_summary' | localize\"\r\n [invalidFileTypeMessageDetail]=\"'shared_file_upload_invalid_file_type_message_detail' | localize\"\r\n [chooseIcon]=\"'pi pi-paperclip'\" cancelStyleClass=\"p-button-secondary\" uploadStyleClass=\"p-button-help\"\r\n removeStyleClass=\"p-button-danger\" [chooseLabel]=\"'shared_reporting_choose_report_file' | localize\"\r\n [uploadLabel]=\"'shared_reporting_import_report' | localize\"\r\n [cancelLabel]=\"'shared_reporting_cancel_choose_report_file' | localize\">\r\n <ng-template *ngIf=\"toUploadFileData\" pTemplate=\"fileupload-content\" let-files>\r\n <div *ngIf=\"files?.length\">\r\n <strong>{{ files[0].name }}</strong>\r\n </div>\r\n </ng-template>\r\n </p-fileUpload>\r\n </ng-template>\r\n </p-toolbar>\r\n\r\n <tsi-view-grid #viewGrid [header]=\"'shared_execute_import_model_import_export' |localize\"\r\n [searchFields]=\"searchFields\" [showConsultButton]=\"false\" [getDataFromApi]=\"true\"\r\n [crudService]=\"modeleImportService\" (buttonColumnClicked)=\"buttonClicked($event)\"\r\n [formName]=\"'app-manage-import-export'\" [columns]=\"columns\" key=\"uid\" [selectKeyOnly]=\"false\">\r\n </tsi-view-grid>\r\n </div>\r\n </p-tabPanel>\r\n\r\n <p-tabPanel [header]=\"'shared_execute_import_model_import_export_default' | localize\" class=\"pt-3 px-2\">\r\n <div class=\"grid\">\r\n <tsi-view-grid class=\"col-12\" [header]=\"'shared_execute_import_model_import_export_default' |localize\"\r\n [columns]=\"columnsJson\" [getDataFromApi]=\"false\" [gridData]=\"gridData\" [key]=\"key\"\r\n [formName]=\"'modele-import-par-default'\"\r\n (buttonColumnClicked)=\"handleButtonColumnExecuteClicked($event)\"></tsi-view-grid>\r\n </div>\r\n </p-tabPanel>\r\n\r\n <p-tabPanel [header]=\"'shared_execute_import_history' | localize\" class=\"pt-3 px-2\">\r\n <div class=\"grid\">\r\n <tsi-view-grid class=\"col-12\" [header]=\"'shared_execute_import_history' |localize\" [columns]=\"columnsHistory\"\r\n [getDataFromApi]=\"false\" [gridData]=\"historyGridData\" [key]=\"importHistoryKey\"\r\n [formName]=\"'modele-import-par-default'\"\r\n (buttonColumnClicked)=\"handleButtonColumnExecuteClicked($event)\"></tsi-view-grid>\r\n </div>\r\n </p-tabPanel>\r\n\r\n <p-tabPanel [header]=\"'shared_execute_import_without_model' | localize\" class=\"pt-3 px-2\">\r\n <div *busy=\"isloading\"></div>\r\n <ng-template pTemplate=\"body\">\r\n <p-fileUpload #importFileToReportFileUpload name=\"importFileToReport\" [multiple]=\"false\"\r\n (onSelect)=\"onImportFileWithoutModel_FileSelected($event)\" (onClear)=\"onImportFileWithoutModel_Clear($event)\"\r\n (onBeforeUpload)=\"onImportFileWithoutModel_ImportFile($event)\"\r\n (onRemove)=\"onImportFileWithoutModel_Remove($event)\" accept=\".xls,.xlsx\" [maxFileSize]=\"10000000\"\r\n [invalidFileSizeMessageSummary]=\"'shared_file_upload_invalid_file_size_message_summary' | localize\"\r\n [invalidFileSizeMessageDetail]=\"'shared_file_upload_invalid_file_size_message_detail' | localize\"\r\n [invalidFileTypeMessageSummary]=\"'shared_file_upload_invalid_file_type_message_summary' | localize\"\r\n [invalidFileLimitMessageDetail]=\"'shared_file_upload_invalid_file_limit_message_detail' | localize\"\r\n [invalidFileLimitMessageSummary]=\"'shared_file_upload_invalid_file_limit_message_summary' | localize\"\r\n [invalidFileTypeMessageDetail]=\"'shared_file_upload_invalid_file_type_message_detail' | localize\"\r\n [chooseIcon]=\"'pi pi-paperclip'\" cancelStyleClass=\"p-button-secondary\" uploadStyleClass=\"p-button-help\"\r\n removeStyleClass=\"p-button-danger\" [chooseLabel]=\"'shared_reporting_choose_report_file' | localize\"\r\n [uploadLabel]=\"'shared_reporting_import_report' | localize\"\r\n [cancelLabel]=\"'shared_reporting_cancel_choose_report_file' | localize\">\r\n <ng-template *ngIf=\"toUploadWithoutModel\" pTemplate=\"fileupload-content\" let-files>\r\n <div *ngIf=\"files?.length\">\r\n <strong>{{ files[0].name }}</strong>\r\n </div>\r\n </ng-template>\r\n </p-fileUpload>\r\n </ng-template>\r\n </p-tabPanel>\r\n\r\n <p-tabPanel [header]=\"'shared_import_result_header' | localize\" class=\"pt-3 px-2\">\r\n\r\n <div class=\"p-1\">\r\n <Tsi-Button (onClick)=\"getImportResult()\"\r\n styleClass=\"p-element p-button-text p-button-raised p-button-rounded mr-2 p-button p-component p-button-icon-only\"\r\n [tooltipText]=\"'shared_import_export_refresh'\" [tooltipPosition]=\"tooltipPosition.Top\"\r\n icon=\"p-button-icon pi pi-refresh\" class=\"p-button-text p-button-raised p-button-rounded mr-2\"></Tsi-Button>\r\n </div>\r\n\r\n <div class=\"grid\">\r\n <tsi-view-grid class=\"col-12\" [header]=\"'shared_import_result_header' |localize\" [columns]=\"importResultsColumns\"\r\n [getDataFromApi]=\"false\" [gridData]=\"importResultData\" [key]=\"'uid'\" [formName]=\"'modele-import-result-import'\"\r\n (buttonColumnClicked)=\"handleConsultImportResultButtonClicked($event)\"></tsi-view-grid>\r\n </div>\r\n </p-tabPanel>\r\n\r\n</p-tabView>\r\n\r\n<div class=\"p-1\">\r\n <Tsi-Button\r\n styleClass=\"p-element p-button-text p-button-raised p-button-rounded mr-2 p-button p-component p-button-icon-only\"\r\n [tooltipText]=\"'shared_import_export_refresh'\" [tooltipPosition]=\"tooltipPosition.Top\"\r\n icon=\"p-button-icon pi pi-refresh\" (onClick)=\"refreshImportExportData()\"\r\n class=\"p-button-text p-button-raised p-button-rounded mr-2\"></Tsi-Button>\r\n</div>\r\n\r\n<!-- dialog to import file to report -->\r\n<p-dialog header=\"{{'shared_reporting_select_file_to_import_into_report' | localize}}\"\r\n [(visible)]=\"isImportFileToExecuteVisible\" [style]=\"{width: '50vw'}\">\r\n <!-- <Tsi-Modal-Header (onCloseClick)=\"onImportFileToReportModalCancelClick()\" [inputTitle]=\"'shared_reporting_select_file_to_import_into_report'\"></Tsi-Modal-Header> -->\r\n\r\n <ng-template pTemplate=\"body\">\r\n <p-fileUpload #importFileToReportFileUpload name=\"importFileToReport\" [multiple]=\"false\"\r\n (onSelect)=\"onImportFileToExecute_FileSelected($event)\" (onClear)=\"onImportFileToExecute_Clear($event)\"\r\n (onBeforeUpload)=\"onImportFileToExecute_ImportFile($event)\" (onRemove)=\"onImportFileToExecute_Remove($event)\"\r\n accept=\"{{fileType}}\" [maxFileSize]=\"10000000\"\r\n [invalidFileSizeMessageSummary]=\"'shared_file_upload_invalid_file_size_message_summary' | localize\"\r\n [invalidFileSizeMessageDetail]=\"'shared_file_upload_invalid_file_size_message_detail' | localize\"\r\n [invalidFileTypeMessageSummary]=\"'shared_file_upload_invalid_file_type_message_summary' | localize\"\r\n [invalidFileLimitMessageDetail]=\"'shared_file_upload_invalid_file_limit_message_detail' | localize\"\r\n [invalidFileLimitMessageSummary]=\"'shared_file_upload_invalid_file_limit_message_summary' | localize\"\r\n [invalidFileTypeMessageDetail]=\"'shared_file_upload_invalid_file_type_message_detail' | localize\"\r\n [chooseIcon]=\"'pi pi-paperclip'\" cancelStyleClass=\"p-button-secondary\" uploadStyleClass=\"p-button-help\"\r\n removeStyleClass=\"p-button-danger\" [chooseLabel]=\"'shared_reporting_choose_report_file' | localize\"\r\n [uploadLabel]=\"'shared_reporting_import_report' | localize\"\r\n [cancelLabel]=\"'shared_reporting_cancel_choose_report_file' | localize\">\r\n <ng-template *ngIf=\"toUploadToExecuteFile\" pTemplate=\"fileupload-content\" let-files>\r\n <div *ngIf=\"files?.length\">\r\n <strong>{{ files[0].name }}</strong>\r\n </div>\r\n </ng-template>\r\n </p-fileUpload>\r\n </ng-template>\r\n\r\n\r\n <!-- <Tsi-Modal-Footer (onCancelClick)=\"onImportFileToReportModalCancelClick()\"\r\n (onSaveClick)=\"onImportFileToReportModalSaveClick()\"\r\n [saveDisabled]=\"!toUploadToUpdateReportFileData\"></Tsi-Modal-Footer> -->\r\n\r\n</p-dialog>", styles: ["::ng-deep .p-fileupload-choose input{display:none!important}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "component", type: i6.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i7.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i7.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "component", type: i8.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: i9.TsiLabelComponent, selector: "Tsi-Label", inputs: ["labelValue", "styleClass", "infoText"] }, { kind: "component", type: i10.TsiViewGridComponent, selector: "tsi-view-grid", inputs: ["columns", "gridConfiguration", "viewComponent", "crudService", "header", "modalSize", "showConsultButton", "showSearchField", "searchFields", "formEndpoint", "formName", "id", "showImportExportButton", "targetBusinessClass", "getDataFromApi", "gridData", "isSearchButtonDisabled", "selectKeyOnly", "selectionMode", "selectedItems", "key", "showGlobalSearch", "showExportButton", "showCalenderView", "showHeaderFilters", "showFilterButton", "selectAll", "checkedByField", "sortMode", "searchOnInit"], outputs: ["summariesChange", "selectedItemsChange", "buttonColumnClicked", "searchFieldsValueChanged", "getAllPagedResultChanged"] }, { kind: "component", type: i11.TsiButtonComponent, selector: "Tsi-Button", inputs: ["disabled", "text", "style", "tooltipText", "tooltipPosition", "buttonType", "icon", "styleClass", "iconSrc", "id", "iconWidth", "iconClass"], outputs: ["onClick", "rightClick"] }, { kind: "directive", type: i12.BusyDirective, selector: "[busy]", inputs: ["busy"] }, { kind: "pipe", type: i13.LocalizePipe, name: "localize" }] }); }
|
|
492
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ManageImportExportComponent, selector: "app-manage-import-export", providers: [...appProviders], viewQueries: [{ propertyName: "gridComponent", first: true, predicate: TsiViewGridComponent, descendants: true }, { propertyName: "fileUploader", first: true, predicate: ["fileUpload"], descendants: true }, { propertyName: "viewGridComponent", first: true, predicate: ["viewGrid"], descendants: true }, { propertyName: "importFileToExecuteFileUpload", first: true, predicate: ["importFileToExecuteFileUpload"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<p-tabView>\r\n <p-tabPanel [header]=\"'shared_execute_import_model_import_export' | localize\" class=\"pt-3 px-2\">\r\n <div class=\"card\">\r\n <div *busy=\"isloading\"></div>\r\n <div class=\"grid\">\r\n <div class=\"grid col-10\">\r\n <div>\r\n <Tsi-Label class=\"col-2\" [labelValue]=\"'shared_reporting_form'\">\r\n </Tsi-Label>\r\n <!-- <p-dropdown class=\"col-10 tsi-component\" class=\"tsi-component\" styleClass=\"tsi-component\" appendTp=\"body\"\r\n optionLabel=\"value\" optionValue=\"key\" [filter]=\"true\"\r\n filterBy=\"value\" [showClear]=\"true\" placeholder=\"{{'shared_reporting_select_form' | localize}}\"\r\n [disabled]=\"true\">\r\n </p-dropdown> -->\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <p-toolbar styleClass=\"mb-4 gap-2\">\r\n <ng-template pTemplate=\"left\">\r\n <Tsi-Button [text]=\"'shared_reporting_add_report' | localize\"\r\n icon=\"p-button-icon p-button-icon-left pi pi-plus\"\r\n styleClass=\"p-element p-button-success mr-2 p-button p-component ng-star-inserted p-button-label\"\r\n (click)=\"openModal()\"></Tsi-Button>\r\n </ng-template>\r\n <ng-template pTemplate=\"right\">\r\n <p-fileUpload #fileUpload name=\"demo[]\" (onBeforeUpload)=\"onImportFile($event)\"\r\n (onSelect)=\"onFileSelected($event)\" (onClear)=\"onClear($event)\" (onRemove)=\"onRemove($event)\"\r\n [multiple]=\"false\" accept=\"application/json\" [maxFileSize]=\"1000000\"\r\n [invalidFileSizeMessageSummary]=\"'shared_file_upload_invalid_file_size_message_summary' | localize\"\r\n [invalidFileSizeMessageDetail]=\"'shared_file_upload_invalid_file_size_message_detail' | localize\"\r\n [invalidFileTypeMessageSummary]=\"'shared_file_upload_invalid_file_type_message_summary' | localize\"\r\n [invalidFileLimitMessageDetail]=\"'shared_file_upload_invalid_file_limit_message_detail' | localize\"\r\n [invalidFileLimitMessageSummary]=\"'shared_file_upload_invalid_file_limit_message_summary' | localize\"\r\n [invalidFileTypeMessageDetail]=\"'shared_file_upload_invalid_file_type_message_detail' | localize\"\r\n [chooseIcon]=\"'pi pi-paperclip'\" cancelStyleClass=\"p-button-secondary\" uploadStyleClass=\"p-button-help\"\r\n removeStyleClass=\"p-button-danger\" [chooseLabel]=\"'shared_reporting_choose_report_file' | localize\"\r\n [uploadLabel]=\"'shared_reporting_import_report' | localize\"\r\n [cancelLabel]=\"'shared_reporting_cancel_choose_report_file' | localize\">\r\n <ng-template *ngIf=\"toUploadFileData\" pTemplate=\"fileupload-content\" let-files>\r\n <div *ngIf=\"files?.length\">\r\n <strong>{{ files[0].name }}</strong>\r\n </div>\r\n </ng-template>\r\n </p-fileUpload>\r\n </ng-template>\r\n </p-toolbar>\r\n\r\n <tsi-view-grid #viewGrid [header]=\"'shared_execute_import_model_import_export' |localize\"\r\n [searchFields]=\"searchFields\" [showConsultButton]=\"false\" [getDataFromApi]=\"true\"\r\n [crudService]=\"modeleImportService\" (buttonColumnClicked)=\"buttonClicked($event)\"\r\n [formName]=\"'app-manage-import-export'\" [columns]=\"columns\" key=\"uid\" [selectKeyOnly]=\"false\">\r\n </tsi-view-grid>\r\n </div>\r\n </p-tabPanel>\r\n\r\n <p-tabPanel [header]=\"'shared_execute_import_model_import_export_default' | localize\" class=\"pt-3 px-2\">\r\n <div class=\"grid\">\r\n <tsi-view-grid class=\"col-12\" [header]=\"'shared_execute_import_model_import_export_default' |localize\"\r\n [columns]=\"columnsJson\" [getDataFromApi]=\"false\" [gridData]=\"gridData\" [key]=\"key\"\r\n [formName]=\"'modele-import-par-default'\"\r\n (buttonColumnClicked)=\"handleButtonColumnExecuteClicked($event)\"></tsi-view-grid>\r\n </div>\r\n </p-tabPanel>\r\n\r\n <p-tabPanel [header]=\"'shared_execute_import_history' | localize\" class=\"pt-3 px-2\">\r\n <div class=\"grid\">\r\n <tsi-view-grid class=\"col-12\" [header]=\"'shared_execute_import_history' |localize\" [columns]=\"columnsHistory\"\r\n [getDataFromApi]=\"false\" [gridData]=\"historyGridData\" [key]=\"importHistoryKey\"\r\n [formName]=\"'modele-import-par-default'\"\r\n (buttonColumnClicked)=\"handleButtonColumnExecuteClicked($event)\"></tsi-view-grid>\r\n </div>\r\n </p-tabPanel>\r\n\r\n <p-tabPanel [header]=\"'shared_execute_import_without_model' | localize\" class=\"pt-3 px-2\">\r\n <div *busy=\"isloading\"></div>\r\n <ng-template pTemplate=\"body\">\r\n <p-fileUpload #importFileToReportFileUpload name=\"importFileToReport\" [multiple]=\"false\"\r\n (onSelect)=\"onImportFileWithoutModel_FileSelected($event)\" (onClear)=\"onImportFileWithoutModel_Clear($event)\"\r\n (onBeforeUpload)=\"onImportFileWithoutModel_ImportFile($event)\"\r\n (onRemove)=\"onImportFileWithoutModel_Remove($event)\" accept=\".xls,.xlsx\" [maxFileSize]=\"10000000\"\r\n [invalidFileSizeMessageSummary]=\"'shared_file_upload_invalid_file_size_message_summary' | localize\"\r\n [invalidFileSizeMessageDetail]=\"'shared_file_upload_invalid_file_size_message_detail' | localize\"\r\n [invalidFileTypeMessageSummary]=\"'shared_file_upload_invalid_file_type_message_summary' | localize\"\r\n [invalidFileLimitMessageDetail]=\"'shared_file_upload_invalid_file_limit_message_detail' | localize\"\r\n [invalidFileLimitMessageSummary]=\"'shared_file_upload_invalid_file_limit_message_summary' | localize\"\r\n [invalidFileTypeMessageDetail]=\"'shared_file_upload_invalid_file_type_message_detail' | localize\"\r\n [chooseIcon]=\"'pi pi-paperclip'\" cancelStyleClass=\"p-button-secondary\" uploadStyleClass=\"p-button-help\"\r\n removeStyleClass=\"p-button-danger\" [chooseLabel]=\"'shared_reporting_choose_report_file' | localize\"\r\n [uploadLabel]=\"'shared_reporting_import_report' | localize\"\r\n [cancelLabel]=\"'shared_reporting_cancel_choose_report_file' | localize\">\r\n <ng-template *ngIf=\"toUploadWithoutModel\" pTemplate=\"fileupload-content\" let-files>\r\n <div *ngIf=\"files?.length\">\r\n <strong>{{ files[0].name }}</strong>\r\n </div>\r\n </ng-template>\r\n </p-fileUpload>\r\n </ng-template>\r\n </p-tabPanel>\r\n\r\n <p-tabPanel [header]=\"'shared_import_result_header' | localize\" class=\"pt-3 px-2\">\r\n\r\n <div class=\"p-1\">\r\n <Tsi-Button (onClick)=\"getImportResult()\"\r\n styleClass=\"p-element p-button-text p-button-raised p-button-rounded mr-2 p-button p-component p-button-icon-only\"\r\n [tooltipText]=\"'shared_import_export_refresh'\" [tooltipPosition]=\"tooltipPosition.Top\"\r\n icon=\"p-button-icon pi pi-refresh\" class=\"p-button-text p-button-raised p-button-rounded mr-2\"></Tsi-Button>\r\n </div>\r\n\r\n <div class=\"grid\">\r\n <tsi-view-grid class=\"col-12\" [header]=\"'shared_import_result_header' |localize\" [columns]=\"importResultsColumns\"\r\n [getDataFromApi]=\"false\" [gridData]=\"importResultData\" [key]=\"'uid'\" [formName]=\"'modele-import-result-import'\"\r\n (buttonColumnClicked)=\"handleConsultImportResultButtonClicked($event)\"></tsi-view-grid>\r\n </div>\r\n </p-tabPanel>\r\n\r\n</p-tabView>\r\n\r\n<div class=\"p-1\">\r\n <Tsi-Button\r\n styleClass=\"p-element p-button-text p-button-raised p-button-rounded mr-2 p-button p-component p-button-icon-only\"\r\n [tooltipText]=\"'shared_import_export_refresh'\" [tooltipPosition]=\"tooltipPosition.Top\"\r\n icon=\"p-button-icon pi pi-refresh\" (onClick)=\"refreshImportExportData()\"\r\n class=\"p-button-text p-button-raised p-button-rounded mr-2\"></Tsi-Button>\r\n</div>\r\n\r\n<!-- dialog to import file to report -->\r\n<p-dialog header=\"{{'shared_reporting_select_file_to_import_into_report' | localize}}\"\r\n [(visible)]=\"isImportFileToExecuteVisible\" [style]=\"{width: '50vw'}\">\r\n <!-- <Tsi-Modal-Header (onCloseClick)=\"onImportFileToReportModalCancelClick()\" [inputTitle]=\"'shared_reporting_select_file_to_import_into_report'\"></Tsi-Modal-Header> -->\r\n\r\n <ng-template pTemplate=\"body\">\r\n <p-fileUpload #importFileToReportFileUpload name=\"importFileToReport\" [multiple]=\"false\"\r\n (onSelect)=\"onImportFileToExecute_FileSelected($event)\" (onClear)=\"onImportFileToExecute_Clear($event)\"\r\n (onBeforeUpload)=\"onImportFileToExecute_ImportFile($event)\" (onRemove)=\"onImportFileToExecute_Remove($event)\"\r\n accept=\"{{fileType}}\" [maxFileSize]=\"10000000\"\r\n [invalidFileSizeMessageSummary]=\"'shared_file_upload_invalid_file_size_message_summary' | localize\"\r\n [invalidFileSizeMessageDetail]=\"'shared_file_upload_invalid_file_size_message_detail' | localize\"\r\n [invalidFileTypeMessageSummary]=\"'shared_file_upload_invalid_file_type_message_summary' | localize\"\r\n [invalidFileLimitMessageDetail]=\"'shared_file_upload_invalid_file_limit_message_detail' | localize\"\r\n [invalidFileLimitMessageSummary]=\"'shared_file_upload_invalid_file_limit_message_summary' | localize\"\r\n [invalidFileTypeMessageDetail]=\"'shared_file_upload_invalid_file_type_message_detail' | localize\"\r\n [chooseIcon]=\"'pi pi-paperclip'\" cancelStyleClass=\"p-button-secondary\" uploadStyleClass=\"p-button-help\"\r\n removeStyleClass=\"p-button-danger\" [chooseLabel]=\"'shared_reporting_choose_report_file' | localize\"\r\n [uploadLabel]=\"'shared_reporting_import_report' | localize\"\r\n [cancelLabel]=\"'shared_reporting_cancel_choose_report_file' | localize\">\r\n <ng-template *ngIf=\"toUploadToExecuteFile\" pTemplate=\"fileupload-content\" let-files>\r\n <div *ngIf=\"files?.length\">\r\n <strong>{{ files[0].name }}</strong>\r\n </div>\r\n </ng-template>\r\n </p-fileUpload>\r\n </ng-template>\r\n\r\n\r\n <!-- <Tsi-Modal-Footer (onCancelClick)=\"onImportFileToReportModalCancelClick()\"\r\n (onSaveClick)=\"onImportFileToReportModalSaveClick()\"\r\n [saveDisabled]=\"!toUploadToUpdateReportFileData\"></Tsi-Modal-Footer> -->\r\n\r\n</p-dialog>", styles: ["::ng-deep .p-fileupload-choose input{display:none!important}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "component", type: i6.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i7.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i7.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "component", type: i8.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: i9.TsiLabelComponent, selector: "Tsi-Label", inputs: ["labelValue", "styleClass", "infoText"] }, { kind: "component", type: i10.TsiViewGridComponent, selector: "tsi-view-grid", inputs: ["columns", "gridConfiguration", "viewComponent", "crudService", "header", "modalSize", "showConsultButton", "showSearchField", "searchFields", "formEndpoint", "formName", "id", "showImportExportButton", "targetBusinessClass", "getDataFromApi", "gridData", "isSearchButtonDisabled", "selectKeyOnly", "selectionMode", "selectedItems", "key", "showGlobalSearch", "showExportButton", "showCalenderView", "showHeaderFilters", "showFilterButton", "selectAll", "checkedByField", "sortMode", "sizingMode", "searchOnInit"], outputs: ["summariesChange", "selectedItemsChange", "buttonColumnClicked", "searchFieldsValueChanged", "getAllPagedResultChanged"] }, { kind: "component", type: i11.TsiButtonComponent, selector: "Tsi-Button", inputs: ["disabled", "text", "style", "tooltipText", "tooltipPosition", "buttonType", "icon", "styleClass", "iconSrc", "id", "iconWidth", "iconClass"], outputs: ["onClick", "rightClick"] }, { kind: "directive", type: i12.BusyDirective, selector: "[busy]", inputs: ["busy"] }, { kind: "pipe", type: i13.LocalizePipe, name: "localize" }] }); }
|
|
493
493
|
}
|
|
494
494
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ManageImportExportComponent, decorators: [{
|
|
495
495
|
type: Component,
|