@quadrel-enterprise-ui/framework 21.12.4 → 21.12.6
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/fesm2022/quadrel-enterprise-ui-framework.mjs +18 -16
- package/fesm2022/quadrel-enterprise-ui-framework.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/i18n/de.json +0 -1
- package/src/assets/i18n/en.json +0 -1
- package/src/assets/i18n/fr.json +0 -1
- package/src/assets/i18n/it.json +0 -1
- package/types/quadrel-enterprise-ui-framework.d.ts +2 -3
|
@@ -31014,11 +31014,11 @@ class QdTreeRowComponent {
|
|
|
31014
31014
|
};
|
|
31015
31015
|
}
|
|
31016
31016
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTreeRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31017
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdTreeRowComponent, isStandalone: false, selector: "[qd-tree-row]", inputs: { columnsDetails: "columnsDetails", indentation: "indentation", config: "config", testId: ["data-test-id", "testId"], rowData: "rowData", rowIndex: "rowIndex" }, host: { properties: { "attr.data-test-id": "this.testId" } }, providers: [QdDataFacetsContextService], ngImport: i0, template: "@for (column of columnsDetails; track column) { @if (column.type === 'group') {\n<td\n (click)=\"onExpanderClick()\"\n [class]=\"\n [\n 'qd-tree-body-cell',\n 'qd-tree-body-cell-group',\n 'qd-tree-body-cell-group-index-' + indentation,\n getCellClass(column),\n rowData?.nestedRows ? ' expandable' : ''\n ].join(' ')\n \"\n [attr.data-test-id]=\"testId + '-cell-' + indentation\"\n>\n @if (rowData?.nestedRows) { @if (!expanded) {\n <qd-icon class=\"expander\" [attr.data-test-id]=\"testId + '-opening-expander'\" [icon]=\"'ctrlRight'\"></qd-icon>\n } @if (expanded) {\n <qd-icon class=\"expander\" [icon]=\"'ctrlDown'\"></qd-icon>\n } } @for (groupedColumn of $any(column).groupedColumns; track groupedColumn) { @if (rowData[groupedColumn.column]) {\n <span>{{ rowData[groupedColumn.column] }}</span>\n } }\n</td>\n} @else {\n<td\n [class]=\"'qd-tree-body-cell ' + getCellClass(column)\"\n [attr.data-test-id]=\"testId + '-cell-' + (column.column || column.index)\"\n>\n <ng-container *ngComponentOutlet=\"getComponentType(column); inputs: getComponentInputs(column)\"></ng-container>\n</td>\n} } @if (config.secondaryActions?.length > 0) {\n<td\n class=\"qd-tree-body-cell\"\n [attr.data-test-id]=\"testId + '-cell-inline-actions'\"\n qd-tree-row-actions-secondary-menu\n [config]=\"config\"\n [rowIndex]=\"
|
|
31017
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdTreeRowComponent, isStandalone: false, selector: "[qd-tree-row]", inputs: { columnsDetails: "columnsDetails", indentation: "indentation", config: "config", testId: ["data-test-id", "testId"], rowData: "rowData", rowIndex: "rowIndex" }, host: { properties: { "attr.data-test-id": "this.testId" } }, providers: [QdDataFacetsContextService], ngImport: i0, template: "@for (column of columnsDetails; track column) { @if (column.type === 'group') {\n<td\n (click)=\"onExpanderClick()\"\n [class]=\"\n [\n 'qd-tree-body-cell',\n 'qd-tree-body-cell-group',\n 'qd-tree-body-cell-group-index-' + indentation,\n getCellClass(column),\n rowData?.nestedRows ? ' expandable' : ''\n ].join(' ')\n \"\n [attr.data-test-id]=\"testId + '-cell-' + indentation\"\n>\n @if (rowData?.nestedRows) { @if (!expanded) {\n <qd-icon class=\"expander\" [attr.data-test-id]=\"testId + '-opening-expander'\" [icon]=\"'ctrlRight'\"></qd-icon>\n } @if (expanded) {\n <qd-icon class=\"expander\" [icon]=\"'ctrlDown'\"></qd-icon>\n } } @for (groupedColumn of $any(column).groupedColumns; track groupedColumn) { @if (rowData[groupedColumn.column]) {\n <span>{{ rowData[groupedColumn.column] }}</span>\n } }\n</td>\n} @else {\n<td\n [class]=\"'qd-tree-body-cell ' + getCellClass(column)\"\n [attr.data-test-id]=\"testId + '-cell-' + (column.column || column.index)\"\n>\n <ng-container *ngComponentOutlet=\"getComponentType(column); inputs: getComponentInputs(column)\"></ng-container>\n</td>\n} } @if (config.secondaryActions?.length > 0) {\n<td\n class=\"qd-tree-body-cell\"\n [attr.data-test-id]=\"testId + '-cell-inline-actions'\"\n qd-tree-row-actions-secondary-menu\n [config]=\"config\"\n [rowIndex]=\"rowIndex\"\n [rowData]=\"rowData\"\n [testId]=\"testId + '-secondary-actions'\"\n></td>\n}\n", styles: ["[qd-tree-row] .qd-data-facets{display:block}[qd-tree-row] qd-data-facets-progress.qd-data-facets{transform:translateY(.1875rem)}[qd-tree-row] qd-data-facets-chip.qd-data-facets{display:contents}[qd-tree-row] qd-data-facets-text.qd-data-facets{margin:.625rem 0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "component", type: QdTreeRowActionsSecondaryMenuComponent, selector: "[qd-tree-row-actions-secondary-menu]", inputs: ["rowIndex", "rowData", "config", "testId"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
31018
31018
|
}
|
|
31019
31019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTreeRowComponent, decorators: [{
|
|
31020
31020
|
type: Component,
|
|
31021
|
-
args: [{ selector: '[qd-tree-row]', encapsulation: ViewEncapsulation.None, providers: [QdDataFacetsContextService], standalone: false, template: "@for (column of columnsDetails; track column) { @if (column.type === 'group') {\n<td\n (click)=\"onExpanderClick()\"\n [class]=\"\n [\n 'qd-tree-body-cell',\n 'qd-tree-body-cell-group',\n 'qd-tree-body-cell-group-index-' + indentation,\n getCellClass(column),\n rowData?.nestedRows ? ' expandable' : ''\n ].join(' ')\n \"\n [attr.data-test-id]=\"testId + '-cell-' + indentation\"\n>\n @if (rowData?.nestedRows) { @if (!expanded) {\n <qd-icon class=\"expander\" [attr.data-test-id]=\"testId + '-opening-expander'\" [icon]=\"'ctrlRight'\"></qd-icon>\n } @if (expanded) {\n <qd-icon class=\"expander\" [icon]=\"'ctrlDown'\"></qd-icon>\n } } @for (groupedColumn of $any(column).groupedColumns; track groupedColumn) { @if (rowData[groupedColumn.column]) {\n <span>{{ rowData[groupedColumn.column] }}</span>\n } }\n</td>\n} @else {\n<td\n [class]=\"'qd-tree-body-cell ' + getCellClass(column)\"\n [attr.data-test-id]=\"testId + '-cell-' + (column.column || column.index)\"\n>\n <ng-container *ngComponentOutlet=\"getComponentType(column); inputs: getComponentInputs(column)\"></ng-container>\n</td>\n} } @if (config.secondaryActions?.length > 0) {\n<td\n class=\"qd-tree-body-cell\"\n [attr.data-test-id]=\"testId + '-cell-inline-actions'\"\n qd-tree-row-actions-secondary-menu\n [config]=\"config\"\n [rowIndex]=\"
|
|
31021
|
+
args: [{ selector: '[qd-tree-row]', encapsulation: ViewEncapsulation.None, providers: [QdDataFacetsContextService], standalone: false, template: "@for (column of columnsDetails; track column) { @if (column.type === 'group') {\n<td\n (click)=\"onExpanderClick()\"\n [class]=\"\n [\n 'qd-tree-body-cell',\n 'qd-tree-body-cell-group',\n 'qd-tree-body-cell-group-index-' + indentation,\n getCellClass(column),\n rowData?.nestedRows ? ' expandable' : ''\n ].join(' ')\n \"\n [attr.data-test-id]=\"testId + '-cell-' + indentation\"\n>\n @if (rowData?.nestedRows) { @if (!expanded) {\n <qd-icon class=\"expander\" [attr.data-test-id]=\"testId + '-opening-expander'\" [icon]=\"'ctrlRight'\"></qd-icon>\n } @if (expanded) {\n <qd-icon class=\"expander\" [icon]=\"'ctrlDown'\"></qd-icon>\n } } @for (groupedColumn of $any(column).groupedColumns; track groupedColumn) { @if (rowData[groupedColumn.column]) {\n <span>{{ rowData[groupedColumn.column] }}</span>\n } }\n</td>\n} @else {\n<td\n [class]=\"'qd-tree-body-cell ' + getCellClass(column)\"\n [attr.data-test-id]=\"testId + '-cell-' + (column.column || column.index)\"\n>\n <ng-container *ngComponentOutlet=\"getComponentType(column); inputs: getComponentInputs(column)\"></ng-container>\n</td>\n} } @if (config.secondaryActions?.length > 0) {\n<td\n class=\"qd-tree-body-cell\"\n [attr.data-test-id]=\"testId + '-cell-inline-actions'\"\n qd-tree-row-actions-secondary-menu\n [config]=\"config\"\n [rowIndex]=\"rowIndex\"\n [rowData]=\"rowData\"\n [testId]=\"testId + '-secondary-actions'\"\n></td>\n}\n", styles: ["[qd-tree-row] .qd-data-facets{display:block}[qd-tree-row] qd-data-facets-progress.qd-data-facets{transform:translateY(.1875rem)}[qd-tree-row] qd-data-facets-chip.qd-data-facets{display:contents}[qd-tree-row] qd-data-facets-text.qd-data-facets{margin:.625rem 0}\n"] }]
|
|
31022
31022
|
}], propDecorators: { columnsDetails: [{
|
|
31023
31023
|
type: Input
|
|
31024
31024
|
}], indentation: [{
|
|
@@ -31084,7 +31084,7 @@ class QdTreeEmptyStateComponent {
|
|
|
31084
31084
|
return this.emptyStateService.i18ns;
|
|
31085
31085
|
}
|
|
31086
31086
|
handleClick() {
|
|
31087
|
-
this.config.handler();
|
|
31087
|
+
this.config.handler?.();
|
|
31088
31088
|
this.emptyStateService.emitAction();
|
|
31089
31089
|
}
|
|
31090
31090
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTreeEmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -38110,8 +38110,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
38110
38110
|
*/
|
|
38111
38111
|
class QdQuickEditComponent {
|
|
38112
38112
|
fb = inject(FormBuilder);
|
|
38113
|
-
footerService = inject(QdPageFooterService, { optional: true });
|
|
38114
|
-
pageService = inject(QdPageStoreService, { optional: true });
|
|
38115
38113
|
sectionActionService = inject(QdSectionToolbarActionService, { optional: true });
|
|
38116
38114
|
eventBrokerService = inject(QdEventBrokerService, { optional: true });
|
|
38117
38115
|
changeDetectorRef = inject(ChangeDetectorRef);
|
|
@@ -38161,10 +38159,7 @@ class QdQuickEditComponent {
|
|
|
38161
38159
|
*/
|
|
38162
38160
|
data;
|
|
38163
38161
|
get templateData() {
|
|
38164
|
-
return this.controlContainer?.control?.value ?? this.data;
|
|
38165
|
-
}
|
|
38166
|
-
get templateData$() {
|
|
38167
|
-
return (this.controlContainer?.control?.valueChanges.pipe(startWith(this.controlContainer.control.value)) ?? of(this.data));
|
|
38162
|
+
return this.controlContainer?.control?.value ?? this.data ?? [];
|
|
38168
38163
|
}
|
|
38169
38164
|
/**
|
|
38170
38165
|
* A static test ID for integration tests can be set. <br />
|
|
@@ -38189,6 +38184,7 @@ class QdQuickEditComponent {
|
|
|
38189
38184
|
actions$;
|
|
38190
38185
|
hasVisibleActions$;
|
|
38191
38186
|
_destroyed$ = new Subject();
|
|
38187
|
+
_pageViewonly$;
|
|
38192
38188
|
get control() {
|
|
38193
38189
|
return (this.controlContainer?.control ?? this.quickEditFormGroup.get('rows'));
|
|
38194
38190
|
}
|
|
@@ -38234,6 +38230,10 @@ class QdQuickEditComponent {
|
|
|
38234
38230
|
ngOnChanges(changes) {
|
|
38235
38231
|
if (changes['data'] || changes['config'])
|
|
38236
38232
|
this.initRows();
|
|
38233
|
+
if (changes['config'] && !changes['config'].isFirstChange()) {
|
|
38234
|
+
this.initOpModeSubscription();
|
|
38235
|
+
this.initActionsStream();
|
|
38236
|
+
}
|
|
38237
38237
|
}
|
|
38238
38238
|
ngOnDestroy() {
|
|
38239
38239
|
this._destroyed$.next();
|
|
@@ -38356,10 +38356,12 @@ class QdQuickEditComponent {
|
|
|
38356
38356
|
this.focusables.first?.focus();
|
|
38357
38357
|
}
|
|
38358
38358
|
initOpModeSubscription() {
|
|
38359
|
-
this.viewonly
|
|
38360
|
-
|
|
38361
|
-
|
|
38362
|
-
|
|
38359
|
+
if (typeof this.config.viewonly === 'boolean') {
|
|
38360
|
+
this.viewonly$ = of(this.config.viewonly);
|
|
38361
|
+
return;
|
|
38362
|
+
}
|
|
38363
|
+
this._pageViewonly$ ??= this.eventBrokerService?.consume('operation_mode_changed').pipe(map(e => e.payload.isViewonly), startWith(false));
|
|
38364
|
+
this.viewonly$ = this._pageViewonly$ ?? of(false);
|
|
38363
38365
|
}
|
|
38364
38366
|
validateSetup() {
|
|
38365
38367
|
if (this.data != null && this.controlContainer != null)
|
|
@@ -38383,14 +38385,14 @@ class QdQuickEditComponent {
|
|
|
38383
38385
|
initManualChangeDetectionForControlReset() {
|
|
38384
38386
|
if (!this.isFormControl)
|
|
38385
38387
|
return;
|
|
38386
|
-
this.controlContainer.control.valueChanges.pipe(tap(() => this.changeDetectorRef.detectChanges())).subscribe();
|
|
38388
|
+
this.controlContainer.control.valueChanges.pipe(takeUntil$1(this._destroyed$), tap(() => this.changeDetectorRef.detectChanges())).subscribe();
|
|
38387
38389
|
}
|
|
38388
38390
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdQuickEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
38389
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdQuickEditComponent, isStandalone: false, selector: "qd-quick-edit", inputs: { config: "config", data: "data", testId: ["data-test-id", "testId"] }, outputs: { formGroupChange: "formGroupChange", addNewClicked: "addNewClicked" }, viewQueries: [{ propertyName: "customForDirective", first: true, predicate: QdCustomForDirective, descendants: true }, { propertyName: "focusables", predicate: QdFocusableDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (showStandaloneCreate) {\n<div class=\"editable-actions\">\n <button
|
|
38391
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdQuickEditComponent, isStandalone: false, selector: "qd-quick-edit", inputs: { config: "config", data: "data", testId: ["data-test-id", "testId"] }, outputs: { formGroupChange: "formGroupChange", addNewClicked: "addNewClicked" }, viewQueries: [{ propertyName: "customForDirective", first: true, predicate: QdCustomForDirective, descendants: true }, { propertyName: "focusables", predicate: QdFocusableDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (showStandaloneCreate) {\n<div class=\"editable-actions\">\n <button qdButton qdButtonGhost icon=\"plus\" (click)=\"createRow()\" [data-test-id]=\"testId + '-button-add-new'\">\n {{ config.standaloneCreateLabel?.i18n ?? \"i18n.qd.quick.edit.createButtonLabel\" | translate }}\n </button>\n</div>\n}\n\n<div class=\"table\" [formGroup]=\"control\">\n @if (!config.canAdd || templateData.length > 0 || config.emptyStateView) {\n <div class=\"table-header\">\n <div class=\"table-row\">\n @for (header of visibleColumns; track header) {\n <div class=\"table-cell\">\n {{ header?.i18n | translate }}\n <qd-tooltip-icon [tooltip]=\"header?.tooltip\"></qd-tooltip-icon>\n </div>\n } @if (hasVisibleActions$ | async) {\n <div class=\"table-cell actions-column\">\n <button class=\"menu-button\">\n <qd-icon icon=\"overflowMenuHorizontal\"></qd-icon>\n </button>\n </div>\n }\n </div>\n </div>\n }\n <div class=\"table-body\">\n <div\n class=\"table-row\"\n *qdCustomFor=\"let row of templateData; let rowIndex = index; toggler: togglerDrawing\"\n [formGroupName]=\"rowIndex\"\n [attr.data-test-id]=\"testId + '-row-' + rowIndex\"\n >\n @for (column of visibleColumns; track trackByColumnName($index, column)) {\n <div class=\"table-cell\">\n @if (column.type === 'enum') {\n <qd-dropdown\n [config]=\"{\n filter: column.filter,\n options: column.options,\n placeholder: column.placeholder,\n placeholderPrefix: column.placeholderPrefix,\n viewonly: (viewonly$ | async) === true || !column.isEditable(row, column.name)\n }\"\n [data-test-id]=\"column.name + rowIndex\"\n [dense]=\"true\"\n [formControl]=\"$any(control.controls[rowIndex])?.controls[column.name]\"\n qdFocusable\n class=\"dropdown\"\n >\n </qd-dropdown>\n } @else { @if ($any(control.controls[rowIndex])?.controls[column.name]) {\n <qd-input\n [data-test-id]=\"column.name + rowIndex\"\n [formControlName]=\"column.name\"\n [config]=\"{\n inputType: column.type === 'integer' ? 'number' : 'text',\n viewonly: (viewonly$ | async) === true || !column.isEditable(row, column.name)\n }\"\n qdFocusable\n ></qd-input>\n } }\n </div>\n } @if (hasVisibleActions$ | async) {\n <td class=\"table-cell actions\" [attr.data-test-id]=\"testId + '-cell-inline-actions'\">\n <button\n type=\"button\"\n [qdPopoverOnClick]=\"menu\"\n [qdPopoverCloseStrategy]=\"'onEveryClick'\"\n [qdPopoverStopPropagation]=\"true\"\n class=\"menu-button\"\n data-test=\"secondary-actions-toggler\"\n >\n <qd-icon icon=\"overflowMenuHorizontal\"></qd-icon>\n </button>\n <ng-template #menu>\n @for (secondaryAction of actions$ | async; track secondaryAction) {\n <button\n class=\"secondary-actions\"\n [ngClass]=\"{ disabled: isActionDisabled(secondaryAction, row) }\"\n [attr.disabled]=\"isActionDisabled(secondaryAction, row) || null\"\n (click)=\"handleSecondaryAction(secondaryAction, rowIndex)\"\n >\n {{ secondaryAction.label.i18n | translate }}\n </button>\n } @if (canAdd && (viewonly$ | async) === false) {\n <button class=\"secondary-actions\" (click)=\"removeRow(rowIndex)\">\n {{ \"i18n.qd.quick.edit.removeButtonLabel\" | translate }}\n </button>\n }\n </ng-template>\n </td>\n }\n </div>\n </div>\n @if (config.emptyStateView && !config.emptyStateView.disabled && templateData.length === 0) {\n <div class=\"empty-body\">\n <p>{{ config.emptyStateView.i18n | translate }}</p>\n </div>\n }\n</div>\n", styles: [".table{display:flex;width:100%;flex-direction:column;margin:1.25rem auto;background-color:#fff;font-size:.875rem}.table ::ng-deep .qd-input-input{margin-bottom:0!important}.table-header .table-row{padding-top:.125rem;padding-bottom:.125rem;background-color:#e5e5e5;font-weight:700}.table-header .table-row .actions-column{visibility:hidden}.table-header,.table-body{display:flex;flex-direction:column}.table-row{display:flex;flex-direction:row;padding:.25rem 1rem;border-bottom:.0625rem solid rgb(213,213,213);gap:1rem}.table-row ::ng-deep qd-form-label{display:none!important}.table-row ::ng-deep qd-input{min-width:0;margin-bottom:0!important}.table-body .table-row:hover{background-color:#f5f5f5}.table-cell{display:flex;min-width:0;height:2.3125rem;flex:1;align-items:center;text-align:left}.table-cell:has(.qd-input-error),.table-cell:has(.qd-dropdown-error){height:auto;align-items:flex-start}.table-cell:has(.qd-input-character-counter){height:auto;align-items:flex-start}.table-cell:has(.qd-input-character-counter) ::ng-deep qd-input{position:relative}.table-cell:has(.qd-input-character-counter) ::ng-deep qd-input .qd-input-character-counter{position:absolute;right:.25rem;bottom:.125rem;font-size:.625rem;line-height:1;pointer-events:none}.table-cell.actions,.table-cell.actions-column{min-width:auto;flex:0 0 auto}.table-row:last-child{border-bottom:none}.editable-actions{display:flex;justify-content:flex-end;margin-right:.625rem;gap:.625rem}.menu-button{display:flex;padding:0 .625rem 0 .375rem;background:unset;color:#454545;font-size:2rem;vertical-align:middle}.menu-button:hover,.menu-button:focus{color:#000;outline:0!important}.secondary-actions{display:block;width:100%;min-height:2rem;padding:0 1rem;background:#fff0;font-size:.75rem;text-align:left}.secondary-actions:hover{background-color:#f2f7fa}.secondary-actions.disabled{color:#b4b4b4;cursor:not-allowed}.secondary-actions.disabled:hover{background-color:#fff0}.dropdown{width:100%;min-width:0}.empty-body{padding:1.5rem;background:#fff}.empty-body p{margin:0 0 .5rem}\n"], dependencies: [{ kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "directive", type: QdButtonGhostDirective, selector: "button[qdButtonGhost], a[qdButtonGhost]" }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: QdDropdownComponent, selector: "qd-dropdown", inputs: ["value", "id", "formControlName", "config", "data-test-id", "qdPopoverMaxHeight", "dense"], outputs: ["valueChange", "enterClick", "dropdownOpened", "clickHint", "clickReadonly", "clickViewonly", "optionsResolved"] }, { kind: "component", type: QdInputComponent, selector: "qd-input", inputs: ["formControlName", "value", "config", "isError", "data-test-id"], outputs: ["valueChange", "enterClick", "clickClear", "clickHint", "clickReadonly", "clickViewonly", "optionsResolved"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "directive", type: QdPopoverOnClickDirective, selector: "[qdPopoverOnClick]", inputs: ["qdPopoverOnClick", "qdPopoverPlacement", "qdPopoverOffsetX", "qdPopoverOffsetY", "qdPopoverCloseStrategy", "qdPopoverDisabled", "qdPopoverStopPropagation", "qdPopoverBackgroundColor", "qdPopoverMaxHeight", "qdPopoverMinWidth", "qdPopoverMaxWidth", "qdPopoverAutoSize", "qdPopoverEnableKeyControl", "qdPopoverRestoreFocus", "qdPopoverFlipIntoViewport"], outputs: ["opened", "closed"], exportAs: ["qdPopoverOnClick"] }, { kind: "directive", type: QdFocusableDirective, selector: "[qdFocusable]" }, { kind: "component", type: QdTooltipIconComponent, selector: "qd-tooltip-icon", inputs: ["tooltip"] }, { kind: "directive", type: QdCustomForDirective, selector: "[qdCustomFor]", inputs: ["qdCustomForOf", "qdCustomForToggler"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
38390
38392
|
}
|
|
38391
38393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdQuickEditComponent, decorators: [{
|
|
38392
38394
|
type: Component,
|
|
38393
|
-
args: [{ selector: 'qd-quick-edit', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (showStandaloneCreate) {\n<div class=\"editable-actions\">\n <button
|
|
38395
|
+
args: [{ selector: 'qd-quick-edit', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (showStandaloneCreate) {\n<div class=\"editable-actions\">\n <button qdButton qdButtonGhost icon=\"plus\" (click)=\"createRow()\" [data-test-id]=\"testId + '-button-add-new'\">\n {{ config.standaloneCreateLabel?.i18n ?? \"i18n.qd.quick.edit.createButtonLabel\" | translate }}\n </button>\n</div>\n}\n\n<div class=\"table\" [formGroup]=\"control\">\n @if (!config.canAdd || templateData.length > 0 || config.emptyStateView) {\n <div class=\"table-header\">\n <div class=\"table-row\">\n @for (header of visibleColumns; track header) {\n <div class=\"table-cell\">\n {{ header?.i18n | translate }}\n <qd-tooltip-icon [tooltip]=\"header?.tooltip\"></qd-tooltip-icon>\n </div>\n } @if (hasVisibleActions$ | async) {\n <div class=\"table-cell actions-column\">\n <button class=\"menu-button\">\n <qd-icon icon=\"overflowMenuHorizontal\"></qd-icon>\n </button>\n </div>\n }\n </div>\n </div>\n }\n <div class=\"table-body\">\n <div\n class=\"table-row\"\n *qdCustomFor=\"let row of templateData; let rowIndex = index; toggler: togglerDrawing\"\n [formGroupName]=\"rowIndex\"\n [attr.data-test-id]=\"testId + '-row-' + rowIndex\"\n >\n @for (column of visibleColumns; track trackByColumnName($index, column)) {\n <div class=\"table-cell\">\n @if (column.type === 'enum') {\n <qd-dropdown\n [config]=\"{\n filter: column.filter,\n options: column.options,\n placeholder: column.placeholder,\n placeholderPrefix: column.placeholderPrefix,\n viewonly: (viewonly$ | async) === true || !column.isEditable(row, column.name)\n }\"\n [data-test-id]=\"column.name + rowIndex\"\n [dense]=\"true\"\n [formControl]=\"$any(control.controls[rowIndex])?.controls[column.name]\"\n qdFocusable\n class=\"dropdown\"\n >\n </qd-dropdown>\n } @else { @if ($any(control.controls[rowIndex])?.controls[column.name]) {\n <qd-input\n [data-test-id]=\"column.name + rowIndex\"\n [formControlName]=\"column.name\"\n [config]=\"{\n inputType: column.type === 'integer' ? 'number' : 'text',\n viewonly: (viewonly$ | async) === true || !column.isEditable(row, column.name)\n }\"\n qdFocusable\n ></qd-input>\n } }\n </div>\n } @if (hasVisibleActions$ | async) {\n <td class=\"table-cell actions\" [attr.data-test-id]=\"testId + '-cell-inline-actions'\">\n <button\n type=\"button\"\n [qdPopoverOnClick]=\"menu\"\n [qdPopoverCloseStrategy]=\"'onEveryClick'\"\n [qdPopoverStopPropagation]=\"true\"\n class=\"menu-button\"\n data-test=\"secondary-actions-toggler\"\n >\n <qd-icon icon=\"overflowMenuHorizontal\"></qd-icon>\n </button>\n <ng-template #menu>\n @for (secondaryAction of actions$ | async; track secondaryAction) {\n <button\n class=\"secondary-actions\"\n [ngClass]=\"{ disabled: isActionDisabled(secondaryAction, row) }\"\n [attr.disabled]=\"isActionDisabled(secondaryAction, row) || null\"\n (click)=\"handleSecondaryAction(secondaryAction, rowIndex)\"\n >\n {{ secondaryAction.label.i18n | translate }}\n </button>\n } @if (canAdd && (viewonly$ | async) === false) {\n <button class=\"secondary-actions\" (click)=\"removeRow(rowIndex)\">\n {{ \"i18n.qd.quick.edit.removeButtonLabel\" | translate }}\n </button>\n }\n </ng-template>\n </td>\n }\n </div>\n </div>\n @if (config.emptyStateView && !config.emptyStateView.disabled && templateData.length === 0) {\n <div class=\"empty-body\">\n <p>{{ config.emptyStateView.i18n | translate }}</p>\n </div>\n }\n</div>\n", styles: [".table{display:flex;width:100%;flex-direction:column;margin:1.25rem auto;background-color:#fff;font-size:.875rem}.table ::ng-deep .qd-input-input{margin-bottom:0!important}.table-header .table-row{padding-top:.125rem;padding-bottom:.125rem;background-color:#e5e5e5;font-weight:700}.table-header .table-row .actions-column{visibility:hidden}.table-header,.table-body{display:flex;flex-direction:column}.table-row{display:flex;flex-direction:row;padding:.25rem 1rem;border-bottom:.0625rem solid rgb(213,213,213);gap:1rem}.table-row ::ng-deep qd-form-label{display:none!important}.table-row ::ng-deep qd-input{min-width:0;margin-bottom:0!important}.table-body .table-row:hover{background-color:#f5f5f5}.table-cell{display:flex;min-width:0;height:2.3125rem;flex:1;align-items:center;text-align:left}.table-cell:has(.qd-input-error),.table-cell:has(.qd-dropdown-error){height:auto;align-items:flex-start}.table-cell:has(.qd-input-character-counter){height:auto;align-items:flex-start}.table-cell:has(.qd-input-character-counter) ::ng-deep qd-input{position:relative}.table-cell:has(.qd-input-character-counter) ::ng-deep qd-input .qd-input-character-counter{position:absolute;right:.25rem;bottom:.125rem;font-size:.625rem;line-height:1;pointer-events:none}.table-cell.actions,.table-cell.actions-column{min-width:auto;flex:0 0 auto}.table-row:last-child{border-bottom:none}.editable-actions{display:flex;justify-content:flex-end;margin-right:.625rem;gap:.625rem}.menu-button{display:flex;padding:0 .625rem 0 .375rem;background:unset;color:#454545;font-size:2rem;vertical-align:middle}.menu-button:hover,.menu-button:focus{color:#000;outline:0!important}.secondary-actions{display:block;width:100%;min-height:2rem;padding:0 1rem;background:#fff0;font-size:.75rem;text-align:left}.secondary-actions:hover{background-color:#f2f7fa}.secondary-actions.disabled{color:#b4b4b4;cursor:not-allowed}.secondary-actions.disabled:hover{background-color:#fff0}.dropdown{width:100%;min-width:0}.empty-body{padding:1.5rem;background:#fff}.empty-body p{margin:0 0 .5rem}\n"] }]
|
|
38394
38396
|
}], ctorParameters: () => [], propDecorators: { config: [{
|
|
38395
38397
|
type: Input,
|
|
38396
38398
|
args: [{ required: true }]
|