@sdcorejs/angular 20.2.15 → 20.3.1
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/README.md +9 -7
- package/assets/STYLE-GUIDE.md +6 -3
- package/assets/THEME.md +166 -0
- package/assets/fonts/fonts.scss +1 -1
- package/assets/scss/ckeditor5.scss +2 -2
- package/assets/scss/core/_inline-edit.scss +3 -3
- package/assets/scss/core/_read-state-panel.scss +2 -2
- package/assets/scss/core/color.scss +4 -2
- package/assets/scss/core/form.scss +35 -12
- package/assets/scss/core/scrollbar.scss +3 -3
- package/assets/scss/core/utilities/_base.scss +5 -5
- package/assets/scss/core/utilities/_typography.scss +22 -22
- package/assets/scss/sd-core.scss +12 -0
- package/assets/scss/themes/_component-tokens.scss +261 -0
- package/assets/scss/themes/_presets.scss +3 -0
- package/assets/scss/themes/_ramps.scss +56 -0
- package/assets/scss/themes/_scales.scss +90 -0
- package/assets/scss/themes/_semantic.scss +22 -0
- package/assets/scss/themes/default.scss +113 -10
- package/assets/scss/themes/material-theme.scss +3 -0
- package/components/breadcrumb/index.d.ts +2 -1
- package/components/data-state/index.d.ts +6 -2
- package/components/file-explorer/index.d.ts +450 -57
- package/components/form-generic/index.d.ts +949 -834
- package/components/highlight/index.d.ts +27 -0
- package/components/image-editor/index.d.ts +478 -0
- package/components/index.d.ts +3 -0
- package/components/inform/index.d.ts +5 -2
- package/components/kanban/index.d.ts +179 -0
- package/components/mini-editor/index.d.ts +1 -1
- package/components/preview/index.d.ts +51 -2
- package/components/query-builder/index.d.ts +1 -1
- package/components/section/index.d.ts +7 -2
- package/components/tab/index.d.ts +3 -1
- package/components/table/index.d.ts +6 -0
- package/directives/index.d.ts +8 -0
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs +6 -6
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-audit-diff.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-audit-diff.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-avatar.mjs +34 -27
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs +35 -5
- package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +13 -11
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-card.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs +8 -4
- package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor.mjs +12 -4
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +2260 -133
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +6502 -6557
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-highlight.mjs +63 -0
- package/fesm2022/sdcorejs-angular-components-highlight.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-history.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs +2088 -0
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +9 -5
- package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-job-progress.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-job-progress.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-kanban.mjs +441 -0
- package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +40 -22
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-operator.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-preview.mjs +129 -7
- package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +33 -24
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +14 -9
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +28 -4
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-splitter.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs +7 -3
- package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +4 -4
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +12 -4
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +308 -113
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +14 -5
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components.mjs +3 -0
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +99 -13
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +149 -6
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +19 -4
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +19 -4
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +17 -7
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +17 -7
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs +3 -3
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +18 -4
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +29 -5
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-label.mjs +27 -2
- package/fesm2022/sdcorejs-angular-forms-label.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs +244 -0
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-forms-select.mjs +498 -7
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +22 -4
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time-range.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-time-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-time.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms.mjs +8 -0
- package/fesm2022/sdcorejs-angular-forms.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +1729 -271
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-auth.mjs +35 -3
- package/fesm2022/sdcorejs-angular-modules-auth.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-icon.mjs +19 -0
- package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +39 -48
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-permission.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-api.mjs +196 -8
- package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +10 -3
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-excel.mjs +5 -0
- package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-notify.mjs +107 -7
- package/fesm2022/sdcorejs-angular-services-notify.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs +458 -1
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs +169 -0
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-utilities.mjs +1 -0
- package/fesm2022/sdcorejs-angular-utilities.mjs.map +1 -1
- package/forms/autocomplete/index.d.ts +19 -1
- package/forms/chip/index.d.ts +13 -2
- package/forms/chip-calendar/index.d.ts +13 -2
- package/forms/date/index.d.ts +7 -2
- package/forms/datetime/index.d.ts +7 -2
- package/forms/index.d.ts +8 -6
- package/forms/inline-text/index.d.ts +1 -1
- package/forms/input/index.d.ts +21 -5
- package/forms/input-number/index.d.ts +12 -2
- package/forms/label/index.d.ts +16 -1
- package/forms/models/index.d.ts +16 -1
- package/forms/segmented/index.d.ts +90 -0
- package/forms/select/index.d.ts +66 -4
- package/forms/textarea/index.d.ts +9 -2
- package/i18n/index.d.ts +344 -54
- package/modules/auth/index.d.ts +3 -3
- package/modules/icon/index.d.ts +11 -1
- package/modules/layout/index.d.ts +2 -2
- package/modules/permission/index.d.ts +3 -2
- package/package.json +22 -2
- package/services/api/index.d.ts +49 -2
- package/services/confirm/index.d.ts +15 -0
- package/services/notify/index.d.ts +8 -0
- package/utilities/extensions/index.d.ts +68 -1
- package/utilities/index.d.ts +1 -0
- package/utilities/theme/index.d.ts +25 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, inject, TemplateRef, Directive, booleanAttribute, Pipe, isSignal, output, signal, computed, effect, untracked, ChangeDetectionStrategy, Component, viewChild, ElementRef, afterRenderEffect, isDevMode, Input, contentChildren, DestroyRef, ChangeDetectorRef, afterNextRender, model, InjectionToken, Injectable, ViewChild, Renderer2, NgZone, contentChild } from '@angular/core';
|
|
2
|
+
import { input, inject, TemplateRef, Directive, booleanAttribute, Pipe, isSignal, output, signal, computed, effect, untracked, ChangeDetectionStrategy, Component, viewChild, ElementRef, afterRenderEffect, isDevMode, Input, contentChildren, DestroyRef, ChangeDetectorRef, afterNextRender, model, InjectionToken, Injectable, ViewChild, Renderer2, NgZone, Injector, contentChild } from '@angular/core';
|
|
3
3
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
4
4
|
import * as i3$2 from '@angular/material/paginator';
|
|
5
5
|
import { MatPaginatorIntl, MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
@@ -18,7 +18,7 @@ import { SdViewportService } from '@sdcorejs/angular/services/viewport';
|
|
|
18
18
|
import { SdSelect } from '@sdcorejs/angular/forms/select';
|
|
19
19
|
import { SdTranslatePipe, I18nService } from '@sdcorejs/angular/i18n';
|
|
20
20
|
import { SdIcon } from '@sdcorejs/angular/modules/icon';
|
|
21
|
-
import {
|
|
21
|
+
import { Utilities, FilterUtilities, StringUtilities, DateUtilities, NumberUtilities, BrowserUtilities, ArrayUtilities } from '@sdcorejs/utils/fns';
|
|
22
22
|
import * as i2 from '@angular/material/button';
|
|
23
23
|
import { MatButtonModule } from '@angular/material/button';
|
|
24
24
|
import { SdQuickAction } from '@sdcorejs/angular/components/quick-action';
|
|
@@ -468,6 +468,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
468
468
|
args: [{ name: 'sdTree' }]
|
|
469
469
|
}] });
|
|
470
470
|
|
|
471
|
+
/** Segments that must never be traversed, matching the `@sdcorejs/utils` 1.2 safe-key rule. */
|
|
472
|
+
const PROTOTYPE_SEGMENTS = new Set(['__proto__', 'prototype', 'constructor']);
|
|
473
|
+
/** Upper bound for the per-field cache; column/group fields are a small, stable set in practice. */
|
|
474
|
+
const MAX_CACHED_FIELDS = 1000;
|
|
475
|
+
/** `true` when `@sdcorejs/utils` rejects the field as a property path. */
|
|
476
|
+
const rejectedFields = new Map();
|
|
477
|
+
/**
|
|
478
|
+
* Reads a row value by table field (`column.field`, group field) for every table read path.
|
|
479
|
+
*
|
|
480
|
+
* why (NSP-5745): `@sdcorejs/utils` 1.2 parses property paths strictly and throws
|
|
481
|
+
* `UnsafePropertyPathError` for a segment with whitespace or a path with leading/trailing
|
|
482
|
+
* whitespace. Tables whose columns come from backend data (for example import headers such as
|
|
483
|
+
* "Số phòng ngủ" or "Loại sản phẩm*") then failed the whole read with "Không thể tải dữ liệu".
|
|
484
|
+
*
|
|
485
|
+
* A path that utils accepts keeps the exact `getNestedValue` result. A path that utils rejects
|
|
486
|
+
* falls back to the 1.1.x dot-split lookup, restricted to own data properties (no inherited
|
|
487
|
+
* values, no getters), never through a prototype-sensitive segment and never into a prototype
|
|
488
|
+
* object.
|
|
489
|
+
*/
|
|
490
|
+
function resolveFieldValue(source, field) {
|
|
491
|
+
if (!isTraversable(source))
|
|
492
|
+
return undefined;
|
|
493
|
+
if (typeof field !== 'string' || field === '')
|
|
494
|
+
return undefined;
|
|
495
|
+
if (isRejectedPath(field))
|
|
496
|
+
return readOwnDotPath(source, field);
|
|
497
|
+
try {
|
|
498
|
+
return Utilities.getNestedValue(source, field);
|
|
499
|
+
}
|
|
500
|
+
catch {
|
|
501
|
+
// why: for an accepted path utils 1.2 only throws when the traversal meets a prototype
|
|
502
|
+
// object, which this resolver never reads (same result as the fallback).
|
|
503
|
+
return undefined;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Detects a path that `@sdcorejs/utils` rejects, once per field.
|
|
508
|
+
*
|
|
509
|
+
* why: matching `instanceof UnsafePropertyPathError` is unreliable. `@sdcorejs/utils/fns` and
|
|
510
|
+
* `@sdcorejs/utils/errors` each ship their own copy of the class, and an application bundler
|
|
511
|
+
* renames one of them, so the brand check fails in bundled apps. An empty own-property root can
|
|
512
|
+
* only make `getNestedValue` throw for the path itself, so the probe needs no error type. The
|
|
513
|
+
* cache also keeps sort/filter loops from paying for a thrown exception on every row.
|
|
514
|
+
*/
|
|
515
|
+
function isRejectedPath(field) {
|
|
516
|
+
const cached = rejectedFields.get(field);
|
|
517
|
+
if (cached !== undefined)
|
|
518
|
+
return cached;
|
|
519
|
+
let rejected = false;
|
|
520
|
+
try {
|
|
521
|
+
Utilities.getNestedValue({}, field);
|
|
522
|
+
}
|
|
523
|
+
catch {
|
|
524
|
+
rejected = true;
|
|
525
|
+
}
|
|
526
|
+
if (rejectedFields.size >= MAX_CACHED_FIELDS)
|
|
527
|
+
rejectedFields.clear();
|
|
528
|
+
rejectedFields.set(field, rejected);
|
|
529
|
+
return rejected;
|
|
530
|
+
}
|
|
531
|
+
function readOwnDotPath(source, field) {
|
|
532
|
+
let current = source;
|
|
533
|
+
for (const segment of field.split('.')) {
|
|
534
|
+
if (PROTOTYPE_SEGMENTS.has(segment))
|
|
535
|
+
return undefined;
|
|
536
|
+
if (!isTraversable(current))
|
|
537
|
+
return undefined;
|
|
538
|
+
const descriptor = Object.getOwnPropertyDescriptor(current, segment);
|
|
539
|
+
if (!descriptor || !('value' in descriptor))
|
|
540
|
+
return undefined;
|
|
541
|
+
current = descriptor.value;
|
|
542
|
+
}
|
|
543
|
+
return isPrototypeObject(current) ? undefined : current;
|
|
544
|
+
}
|
|
545
|
+
/** Non-null object or function that is not a built-in prototype object. */
|
|
546
|
+
function isTraversable(value) {
|
|
547
|
+
if (value === null || (typeof value !== 'object' && typeof value !== 'function'))
|
|
548
|
+
return false;
|
|
549
|
+
return !isPrototypeObject(value);
|
|
550
|
+
}
|
|
551
|
+
function isPrototypeObject(value) {
|
|
552
|
+
return value === Object.prototype || value === Function.prototype;
|
|
553
|
+
}
|
|
554
|
+
|
|
471
555
|
const hasQuickSearchValue = (value) => Array.isArray(value) ? value.length > 0 : value !== undefined && value !== null && value !== '';
|
|
472
556
|
const sameQuickSearchValue = (left, right) => Array.isArray(left) && Array.isArray(right)
|
|
473
557
|
? left.length === right.length && left.every((value, index) => value === right[index])
|
|
@@ -527,7 +611,7 @@ const matchesQuickSearch = (data, option, value) => {
|
|
|
527
611
|
return (!term ||
|
|
528
612
|
!fields.length ||
|
|
529
613
|
fields.some(({ field, exact }) => {
|
|
530
|
-
const raw =
|
|
614
|
+
const raw = resolveFieldValue(data, field);
|
|
531
615
|
if (raw == null)
|
|
532
616
|
return false;
|
|
533
617
|
const text = String(raw).toLowerCase();
|
|
@@ -583,11 +667,11 @@ class TableQuickSearchComponent {
|
|
|
583
667
|
item.onChange?.(value);
|
|
584
668
|
}
|
|
585
669
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TableQuickSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
586
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TableQuickSearchComponent, isStandalone: true, selector: "sd-table-quick-search", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, rightTemplate: { classPropertyName: "rightTemplate", publicName: "rightTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "@let _option = option();\n@let _value = value();\n@let _valid = valid();\n@let _autoId = autoId();\n@let _inputId = inputId();\n@let _term = term();\n@let _enterHint = 'core.component.table.quick-search.enter' | sdTranslate;\n<div class=\"sd-quick-search-row\">\n <div class=\"sd-quick-search-controls\" role=\"search\" [attr.aria-label]=\"'core.component.table.search' | sdTranslate\">\n @for (control of controls(); track control.item.field) {\n @let item = control.item;\n @let items = item.type === 'values' ? (item.option.items | filterValues | async) : item.option.items;\n <sd-select\n class=\"sd-quick-search-dropdown\"\n [autoId]=\"_autoId ? _autoId + '-quick-search-' + item.field : undefined\"\n [label]=\"item.title\"\n [items]=\"items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [model]=\"_value.filters[item.field]\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"!!item.required\"\n [disabled]=\"control.disabled\"\n (sdChange)=\"onFilterChange(item, $event)\"\n appearance=\"outline\"\n [size]=\"isMobile() ? 'md' : 'sm'\"\n hideInlineError />\n }\n <div class=\"sd-quick-search-keyword\">\n <div class=\"sd-quick-search-field\" [class.sd-quick-search-disabled]=\"!_valid\">\n <sd-icon name=\"search\" size=\"18px\" aria-hidden=\"true\" />\n <input\n #searchInput\n [id]=\"_inputId\"\n type=\"text\"\n enterkeyhint=\"search\"\n autocomplete=\"off\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-term' : null\"\n [attr.aria-label]=\"'core.component.table.search' | sdTranslate\"\n [attr.aria-describedby]=\"_inputId + (_valid ? '-hint' : '-required')\"\n [placeholder]=\"_option.placeholder || ('core.component.table.quick-search.placeholder' | sdTranslate)\"\n [disabled]=\"!_valid\"\n [value]=\"_term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\" />\n @if (_term) {\n <button\n class=\"sd-quick-search-clear\"\n type=\"button\"\n [disabled]=\"!_valid\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-clear' : null\"\n [attr.aria-label]=\"'core.component.table.quick-search.clear' | sdTranslate\"\n (click)=\"clear(searchInput)\">\n <sd-icon name=\"close\" size=\"16px\" aria-hidden=\"true\" />\n </button>\n }\n <span class=\"sd-quick-search-enter\" [matTooltip]=\"_enterHint\" aria-hidden=\"true\">\u21B5</span>\n </div>\n </div>\n </div>\n @if (rightTemplate(); as template) {\n <div class=\"sd-quick-search-right\"><ng-container [ngTemplateOutlet]=\"template\" /></div>\n }\n</div>\n<span [id]=\"_inputId + '-hint'\" hidden>{{ _enterHint }}</span>\n@if (!_valid) {\n <p class=\"sd-quick-search-hint\" [id]=\"_inputId + '-required'\">\n {{ 'core.component.table.quick-search.required' | sdTranslate }}\n </p>\n}\n", styles: [":host{display:block;flex:0 0 auto;container-type:inline-size;box-sizing:border-box;padding:12px 16px;background
|
|
670
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TableQuickSearchComponent, isStandalone: true, selector: "sd-table-quick-search", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, rightTemplate: { classPropertyName: "rightTemplate", publicName: "rightTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "@let _option = option();\n@let _value = value();\n@let _valid = valid();\n@let _autoId = autoId();\n@let _inputId = inputId();\n@let _term = term();\n@let _enterHint = 'core.component.table.quick-search.enter' | sdTranslate;\n<div class=\"sd-quick-search-row\">\n <div class=\"sd-quick-search-controls\" role=\"search\" [attr.aria-label]=\"'core.component.table.search' | sdTranslate\">\n @for (control of controls(); track control.item.field) {\n @let item = control.item;\n @let items = item.type === 'values' ? (item.option.items | filterValues | async) : item.option.items;\n <sd-select\n class=\"sd-quick-search-dropdown\"\n [autoId]=\"_autoId ? _autoId + '-quick-search-' + item.field : undefined\"\n [label]=\"item.title\"\n [items]=\"items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [model]=\"_value.filters[item.field]\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"!!item.required\"\n [disabled]=\"control.disabled\"\n (sdChange)=\"onFilterChange(item, $event)\"\n appearance=\"outline\"\n [size]=\"isMobile() ? 'md' : 'sm'\"\n hideInlineError />\n }\n <div class=\"sd-quick-search-keyword\">\n <div class=\"sd-quick-search-field\" [class.sd-quick-search-disabled]=\"!_valid\">\n <sd-icon name=\"search\" size=\"18px\" aria-hidden=\"true\" />\n <input\n #searchInput\n [id]=\"_inputId\"\n type=\"text\"\n enterkeyhint=\"search\"\n autocomplete=\"off\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-term' : null\"\n [attr.aria-label]=\"'core.component.table.search' | sdTranslate\"\n [attr.aria-describedby]=\"_inputId + (_valid ? '-hint' : '-required')\"\n [placeholder]=\"_option.placeholder || ('core.component.table.quick-search.placeholder' | sdTranslate)\"\n [disabled]=\"!_valid\"\n [value]=\"_term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\" />\n @if (_term) {\n <button\n class=\"sd-quick-search-clear\"\n type=\"button\"\n [disabled]=\"!_valid\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-clear' : null\"\n [attr.aria-label]=\"'core.component.table.quick-search.clear' | sdTranslate\"\n (click)=\"clear(searchInput)\">\n <sd-icon name=\"close\" size=\"16px\" aria-hidden=\"true\" />\n </button>\n }\n <span class=\"sd-quick-search-enter\" [matTooltip]=\"_enterHint\" aria-hidden=\"true\">\u21B5</span>\n </div>\n </div>\n </div>\n @if (rightTemplate(); as template) {\n <div class=\"sd-quick-search-right\"><ng-container [ngTemplateOutlet]=\"template\" /></div>\n }\n</div>\n<span [id]=\"_inputId + '-hint'\" hidden>{{ _enterHint }}</span>\n@if (!_valid) {\n <p class=\"sd-quick-search-hint\" [id]=\"_inputId + '-required'\">\n {{ 'core.component.table.quick-search.required' | sdTranslate }}\n </p>\n}\n", styles: [":host{display:block;flex:0 0 auto;container-type:inline-size;box-sizing:border-box;padding:12px 16px;background:var(--sd-table-bg, #ffffff)}.sd-quick-search-row{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px 20px}.sd-quick-search-controls{display:flex;flex:1 1 460px;flex-wrap:wrap;align-items:flex-end;gap:12px;min-width:0}.sd-quick-search-dropdown{display:block;flex:0 1 180px;min-width:140px;max-width:100%}.sd-quick-search-keyword{flex:0 1 360px;min-width:220px;max-width:100%}.sd-quick-search-field{display:flex;align-items:center;gap:8px;min-width:0;min-height:32px;padding:0 8px;border:1px solid var(--sd-border, #e0e3e8);border-radius:var(--sd-radius-6, 6px);background:var(--sd-table-bg, #ffffff);color:var(--sd-text-secondary, #626872)}.sd-quick-search-field>sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;flex:0 0 18px}.sd-quick-search-field input{min-width:0;width:100%;flex:1;border:0;border-radius:var(--sd-radius-2, 2px);background:transparent;color:var(--sd-text, #212121);font:inherit;font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);padding:4px 0}.sd-quick-search-field input::placeholder{color:var(--sd-text-secondary, #626872);opacity:1}.sd-quick-search-disabled{background:var(--sd-surface-muted, #f2f3f4)}.sd-quick-search-clear{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex:0 0 24px;border:0;border-radius:50%;padding:0;color:inherit;background:transparent;cursor:pointer}.sd-quick-search-clear:hover{background:var(--sd-surface-muted, #f2f3f4)}.sd-quick-search-clear sd-icon{font-size:var(--sd-font-size-16, 16px);width:16px}.sd-quick-search-enter{font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);padding:0 4px;border:1px solid var(--sd-border, #e0e3e8);border-radius:var(--sd-radius-4, 4px)}.sd-quick-search-right{margin-left:auto;max-width:100%;min-width:0}.sd-quick-search-hint{margin:6px 0 0;font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #626872)}@container (max-width: 550px){.sd-quick-search-controls{flex-basis:100%}.sd-quick-search-dropdown,.sd-quick-search-keyword{flex:1 1 100%;min-width:0}.sd-quick-search-right{margin-left:0;flex-basis:100%}.sd-quick-search-field{min-height:44px}.sd-quick-search-field input{font-size:var(--sd-font-size-16, 16px)}.sd-quick-search-clear{width:40px;height:40px;flex-basis:40px}}@media(pointer:coarse){.sd-quick-search-field{min-height:44px}.sd-quick-search-field input{font-size:var(--sd-font-size-16, 16px)}.sd-quick-search-clear{width:40px;height:40px;flex-basis:40px}}.sd-quick-search-field:focus-within{border-color:var(--sd-primary, #2563eb)}.sd-quick-search-field input:focus{outline:none}.sd-quick-search-clear:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "pipe", type: FilterValuesPipe, name: "filterValues" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
587
671
|
}
|
|
588
672
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TableQuickSearchComponent, decorators: [{
|
|
589
673
|
type: Component,
|
|
590
|
-
args: [{ selector: 'sd-table-quick-search', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, NgTemplateOutlet, MatTooltipModule, SdSelect, SdIcon, SdTranslatePipe, FilterValuesPipe], template: "@let _option = option();\n@let _value = value();\n@let _valid = valid();\n@let _autoId = autoId();\n@let _inputId = inputId();\n@let _term = term();\n@let _enterHint = 'core.component.table.quick-search.enter' | sdTranslate;\n<div class=\"sd-quick-search-row\">\n <div class=\"sd-quick-search-controls\" role=\"search\" [attr.aria-label]=\"'core.component.table.search' | sdTranslate\">\n @for (control of controls(); track control.item.field) {\n @let item = control.item;\n @let items = item.type === 'values' ? (item.option.items | filterValues | async) : item.option.items;\n <sd-select\n class=\"sd-quick-search-dropdown\"\n [autoId]=\"_autoId ? _autoId + '-quick-search-' + item.field : undefined\"\n [label]=\"item.title\"\n [items]=\"items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [model]=\"_value.filters[item.field]\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"!!item.required\"\n [disabled]=\"control.disabled\"\n (sdChange)=\"onFilterChange(item, $event)\"\n appearance=\"outline\"\n [size]=\"isMobile() ? 'md' : 'sm'\"\n hideInlineError />\n }\n <div class=\"sd-quick-search-keyword\">\n <div class=\"sd-quick-search-field\" [class.sd-quick-search-disabled]=\"!_valid\">\n <sd-icon name=\"search\" size=\"18px\" aria-hidden=\"true\" />\n <input\n #searchInput\n [id]=\"_inputId\"\n type=\"text\"\n enterkeyhint=\"search\"\n autocomplete=\"off\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-term' : null\"\n [attr.aria-label]=\"'core.component.table.search' | sdTranslate\"\n [attr.aria-describedby]=\"_inputId + (_valid ? '-hint' : '-required')\"\n [placeholder]=\"_option.placeholder || ('core.component.table.quick-search.placeholder' | sdTranslate)\"\n [disabled]=\"!_valid\"\n [value]=\"_term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\" />\n @if (_term) {\n <button\n class=\"sd-quick-search-clear\"\n type=\"button\"\n [disabled]=\"!_valid\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-clear' : null\"\n [attr.aria-label]=\"'core.component.table.quick-search.clear' | sdTranslate\"\n (click)=\"clear(searchInput)\">\n <sd-icon name=\"close\" size=\"16px\" aria-hidden=\"true\" />\n </button>\n }\n <span class=\"sd-quick-search-enter\" [matTooltip]=\"_enterHint\" aria-hidden=\"true\">\u21B5</span>\n </div>\n </div>\n </div>\n @if (rightTemplate(); as template) {\n <div class=\"sd-quick-search-right\"><ng-container [ngTemplateOutlet]=\"template\" /></div>\n }\n</div>\n<span [id]=\"_inputId + '-hint'\" hidden>{{ _enterHint }}</span>\n@if (!_valid) {\n <p class=\"sd-quick-search-hint\" [id]=\"_inputId + '-required'\">\n {{ 'core.component.table.quick-search.required' | sdTranslate }}\n </p>\n}\n", styles: [":host{display:block;flex:0 0 auto;container-type:inline-size;box-sizing:border-box;padding:12px 16px;background
|
|
674
|
+
args: [{ selector: 'sd-table-quick-search', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, NgTemplateOutlet, MatTooltipModule, SdSelect, SdIcon, SdTranslatePipe, FilterValuesPipe], template: "@let _option = option();\n@let _value = value();\n@let _valid = valid();\n@let _autoId = autoId();\n@let _inputId = inputId();\n@let _term = term();\n@let _enterHint = 'core.component.table.quick-search.enter' | sdTranslate;\n<div class=\"sd-quick-search-row\">\n <div class=\"sd-quick-search-controls\" role=\"search\" [attr.aria-label]=\"'core.component.table.search' | sdTranslate\">\n @for (control of controls(); track control.item.field) {\n @let item = control.item;\n @let items = item.type === 'values' ? (item.option.items | filterValues | async) : item.option.items;\n <sd-select\n class=\"sd-quick-search-dropdown\"\n [autoId]=\"_autoId ? _autoId + '-quick-search-' + item.field : undefined\"\n [label]=\"item.title\"\n [items]=\"items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [model]=\"_value.filters[item.field]\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"!!item.required\"\n [disabled]=\"control.disabled\"\n (sdChange)=\"onFilterChange(item, $event)\"\n appearance=\"outline\"\n [size]=\"isMobile() ? 'md' : 'sm'\"\n hideInlineError />\n }\n <div class=\"sd-quick-search-keyword\">\n <div class=\"sd-quick-search-field\" [class.sd-quick-search-disabled]=\"!_valid\">\n <sd-icon name=\"search\" size=\"18px\" aria-hidden=\"true\" />\n <input\n #searchInput\n [id]=\"_inputId\"\n type=\"text\"\n enterkeyhint=\"search\"\n autocomplete=\"off\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-term' : null\"\n [attr.aria-label]=\"'core.component.table.search' | sdTranslate\"\n [attr.aria-describedby]=\"_inputId + (_valid ? '-hint' : '-required')\"\n [placeholder]=\"_option.placeholder || ('core.component.table.quick-search.placeholder' | sdTranslate)\"\n [disabled]=\"!_valid\"\n [value]=\"_term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\" />\n @if (_term) {\n <button\n class=\"sd-quick-search-clear\"\n type=\"button\"\n [disabled]=\"!_valid\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-clear' : null\"\n [attr.aria-label]=\"'core.component.table.quick-search.clear' | sdTranslate\"\n (click)=\"clear(searchInput)\">\n <sd-icon name=\"close\" size=\"16px\" aria-hidden=\"true\" />\n </button>\n }\n <span class=\"sd-quick-search-enter\" [matTooltip]=\"_enterHint\" aria-hidden=\"true\">\u21B5</span>\n </div>\n </div>\n </div>\n @if (rightTemplate(); as template) {\n <div class=\"sd-quick-search-right\"><ng-container [ngTemplateOutlet]=\"template\" /></div>\n }\n</div>\n<span [id]=\"_inputId + '-hint'\" hidden>{{ _enterHint }}</span>\n@if (!_valid) {\n <p class=\"sd-quick-search-hint\" [id]=\"_inputId + '-required'\">\n {{ 'core.component.table.quick-search.required' | sdTranslate }}\n </p>\n}\n", styles: [":host{display:block;flex:0 0 auto;container-type:inline-size;box-sizing:border-box;padding:12px 16px;background:var(--sd-table-bg, #ffffff)}.sd-quick-search-row{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px 20px}.sd-quick-search-controls{display:flex;flex:1 1 460px;flex-wrap:wrap;align-items:flex-end;gap:12px;min-width:0}.sd-quick-search-dropdown{display:block;flex:0 1 180px;min-width:140px;max-width:100%}.sd-quick-search-keyword{flex:0 1 360px;min-width:220px;max-width:100%}.sd-quick-search-field{display:flex;align-items:center;gap:8px;min-width:0;min-height:32px;padding:0 8px;border:1px solid var(--sd-border, #e0e3e8);border-radius:var(--sd-radius-6, 6px);background:var(--sd-table-bg, #ffffff);color:var(--sd-text-secondary, #626872)}.sd-quick-search-field>sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;flex:0 0 18px}.sd-quick-search-field input{min-width:0;width:100%;flex:1;border:0;border-radius:var(--sd-radius-2, 2px);background:transparent;color:var(--sd-text, #212121);font:inherit;font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);padding:4px 0}.sd-quick-search-field input::placeholder{color:var(--sd-text-secondary, #626872);opacity:1}.sd-quick-search-disabled{background:var(--sd-surface-muted, #f2f3f4)}.sd-quick-search-clear{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex:0 0 24px;border:0;border-radius:50%;padding:0;color:inherit;background:transparent;cursor:pointer}.sd-quick-search-clear:hover{background:var(--sd-surface-muted, #f2f3f4)}.sd-quick-search-clear sd-icon{font-size:var(--sd-font-size-16, 16px);width:16px}.sd-quick-search-enter{font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);padding:0 4px;border:1px solid var(--sd-border, #e0e3e8);border-radius:var(--sd-radius-4, 4px)}.sd-quick-search-right{margin-left:auto;max-width:100%;min-width:0}.sd-quick-search-hint{margin:6px 0 0;font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #626872)}@container (max-width: 550px){.sd-quick-search-controls{flex-basis:100%}.sd-quick-search-dropdown,.sd-quick-search-keyword{flex:1 1 100%;min-width:0}.sd-quick-search-right{margin-left:0;flex-basis:100%}.sd-quick-search-field{min-height:44px}.sd-quick-search-field input{font-size:var(--sd-font-size-16, 16px)}.sd-quick-search-clear{width:40px;height:40px;flex-basis:40px}}@media(pointer:coarse){.sd-quick-search-field{min-height:44px}.sd-quick-search-field input{font-size:var(--sd-font-size-16, 16px)}.sd-quick-search-clear{width:40px;height:40px;flex-basis:40px}}.sd-quick-search-field:focus-within{border-color:var(--sd-primary, #2563eb)}.sd-quick-search-field input:focus{outline:none}.sd-quick-search-clear:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}\n"] }]
|
|
591
675
|
}], ctorParameters: () => [], propDecorators: { option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], autoId: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], rightTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "rightTemplate", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
592
676
|
|
|
593
677
|
class SdTableMobileActionsComponent {
|
|
@@ -694,11 +778,11 @@ class SdTableMobileActionsComponent {
|
|
|
694
778
|
owner.focus();
|
|
695
779
|
}
|
|
696
780
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdTableMobileActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
697
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdTableMobileActionsComponent, isStandalone: true, selector: "sd-table-mobile-actions", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, autoOpen: { classPropertyName: "autoOpen", publicName: "autoOpen", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { end: "end" }, viewQueries: [{ propertyName: "sheet", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _busy = busy();\n@let _error = error();\n@let _autoId = autoId();\n@let _title = title();\n@let _selection = selection();\n@if (_selection) {\n <div class=\"sd-mobile-actions\" role=\"region\" [attr.aria-label]=\"_title\">\n <sd-quick-action opened contained class=\"sd-mobile-quick-action\">\n <span sdMessage class=\"sd-mobile-selection-summary\" [attr.aria-label]=\"_title\">\n <span class=\"sd-mobile-selection-count T14M\">{{ count() }}</span>\n </span>\n <div sdAction class=\"sd-mobile-action-buttons\">\n <div class=\"sd-mobile-action-list\">\n @for (action of direct(); track action.key) {\n <span class=\"sd-mobile-action-direct\">\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-action-' + action.key : null\"\n [title]=\"action.title\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n size=\"sm\"\n [type]=\"action.type || 'text'\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"run(action)\"></sd-button>\n </span>\n }\n @if (overflow().length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-more\"\n [disabled]=\"_busy\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-more' : null\"\n (click)=\"openMore()\">\n <sd-icon name=\"more_horiz\"></sd-icon><span>{{ 'core.component.table.mobile.more' | sdTranslate }}</span>\n </button>\n }\n </div>\n <button\n type=\"button\"\n class=\"sd-mobile-end sd-mobile-clear\"\n [attr.aria-label]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"end.emit()\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-end' : null\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n </div>\n </sd-quick-action>\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n}\n<sd-modal\n #sheet\n [autoId]=\"_autoId ? _autoId + '-mobile-sheet' : undefined\"\n [title]=\"_title\"\n view=\"bottom-sheet\"\n [disableBackdropClose]=\"false\"\n modalClass=\"sd-table-mobile-sheet-panel\"\n (sdClosed)=\"onSheetClosed()\">\n <div class=\"sd-mobile-sheet\">\n @for (action of sheetActions(); track action.key) {\n @if (action.children; as children) {\n <section [attr.aria-label]=\"action.title\" class=\"sd-mobile-action-group\">\n <h3 class=\"T12M\">{{ action.title }}</h3>\n @for (child of children; track child.key) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + child.key : null\"\n [disabled]=\"_busy || action.disabled || child.disabled\"\n (click)=\"runSheet(child)\">\n <sd-icon [name]=\"child.icon || 'chevron_right'\" [fontSet]=\"child.fontSet\" [color]=\"child.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ child.title }}\n @if (child.htmlTemplate) {\n <span [innerHTML]=\"child.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n </section>\n } @else {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + action.key : null\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"runSheet(action)\">\n <sd-icon [name]=\"action.icon || 'chevron_right'\" [fontSet]=\"action.fontSet\" [color]=\"action.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ action.title }}\n @if (action.htmlTemplate) {\n <span [innerHTML]=\"action.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n }\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n</sd-modal>\n", styles: [":host{display:block;min-width:0}.sd-mobile-actions{min-width:0;padding:4px 0 max(4px,env(safe-area-inset-bottom))}.sd-mobile-selection-summary{display:flex;align-items:center}.sd-mobile-selection-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 6px;border-radius:8px;background:var(--sd-success-dark, #2e7d32);color:var(--sd-success-contrast, #fff);font-variant-numeric:tabular-nums}.sd-mobile-action-buttons{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;width:100%;min-width:0;gap:8px}.sd-mobile-action-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,72px),1fr));grid-auto-rows:minmax(40px,1fr);gap:4px 8px;min-width:0}.sd-mobile-action-direct{min-width:0}.sd-mobile-action-direct sd-button{width:100%;height:100%}.sd-mobile-more{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 6px;min-width:0;height:100%}.sd-mobile-end{display:grid;place-items:center;padding:0;width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:var(--sd-text);line-height:0;cursor:pointer}.sd-mobile-end:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}button{min-height:40px;white-space:normal}button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}:host ::ng-deep .sd-mobile-quick-action .c-quick-action.contained{flex-wrap:nowrap;gap:8px;padding:4px 16px;border-radius:12px}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-message{flex:0 0 auto}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-action{flex:1 1 auto}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-more .mdc-button__label{display:inline-flex;align-items:center;gap:4px}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct button{width:100%;height:100%;min-height:40px;padding:4px 6px!important;white-space:normal}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct .c-title{white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip;line-height:18px}:host ::ng-deep .sd-mobile-quick-action .mat-mdc-button-touch-target{height:40px}:host ::ng-deep .sd-mobile-quick-action sd-icon,:host ::ng-deep .sd-mobile-quick-action sd-icon mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct sd-icon mat-icon{width:16px;height:16px;font-size:16px;line-height:16px}.sd-mobile-sheet{padding:0 12px max(12px,env(safe-area-inset-bottom));overflow-wrap:anywhere}.sd-mobile-action-group{padding:8px 0;border-top:1px solid var(--sd-border)}.sd-mobile-action-group:first-child{border-top:0;padding-top:0}.sd-mobile-action-group h3{margin:8px 12px 4px;color:var(--sd-text-secondary)}.sd-mobile-sheet-action{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:48px;padding:12px;text-align:start;border-radius:10px}.sd-mobile-sheet-label{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4}.sd-mobile-sheet-action sd-icon{flex:0 0 20px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .sd-table-mobile-sheet-panel .sd-mobile-sheet-action .mdc-button__label{display:flex;align-items:center;gap:12px;width:100%}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-title{overflow-wrap:anywhere;font-size:16px;line-height:1.4}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-header{min-height:64px;padding:12px 20px}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-close-btn{width:40px;height:40px}\n"], dependencies: [{ kind: "component", type: SdQuickAction, selector: "sd-quick-action", inputs: ["opened", "contained"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
781
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdTableMobileActionsComponent, isStandalone: true, selector: "sd-table-mobile-actions", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, autoOpen: { classPropertyName: "autoOpen", publicName: "autoOpen", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { end: "end" }, viewQueries: [{ propertyName: "sheet", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _busy = busy();\n@let _error = error();\n@let _autoId = autoId();\n@let _title = title();\n@let _selection = selection();\n@if (_selection) {\n <div class=\"sd-mobile-actions\" role=\"region\" [attr.aria-label]=\"_title\">\n <sd-quick-action opened contained class=\"sd-mobile-quick-action\">\n <span sdMessage class=\"sd-mobile-selection-summary\" [attr.aria-label]=\"_title\">\n <span class=\"sd-mobile-selection-count T14M\">{{ count() }}</span>\n </span>\n <div sdAction class=\"sd-mobile-action-buttons\">\n <div class=\"sd-mobile-action-list\">\n @for (action of direct(); track action.key) {\n <span class=\"sd-mobile-action-direct\">\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-action-' + action.key : null\"\n [title]=\"action.title\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n size=\"sm\"\n [type]=\"action.type || 'text'\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"run(action)\"></sd-button>\n </span>\n }\n @if (overflow().length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-more\"\n [disabled]=\"_busy\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-more' : null\"\n (click)=\"openMore()\">\n <sd-icon name=\"more_horiz\"></sd-icon><span>{{ 'core.component.table.mobile.more' | sdTranslate }}</span>\n </button>\n }\n </div>\n <button\n type=\"button\"\n class=\"sd-mobile-end sd-mobile-clear\"\n [attr.aria-label]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"end.emit()\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-end' : null\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n </div>\n </sd-quick-action>\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n}\n<sd-modal\n #sheet\n [autoId]=\"_autoId ? _autoId + '-mobile-sheet' : undefined\"\n [title]=\"_title\"\n view=\"bottom-sheet\"\n [disableBackdropClose]=\"false\"\n modalClass=\"sd-table-mobile-sheet-panel\"\n (sdClosed)=\"onSheetClosed()\">\n <div class=\"sd-mobile-sheet\">\n @for (action of sheetActions(); track action.key) {\n @if (action.children; as children) {\n <section [attr.aria-label]=\"action.title\" class=\"sd-mobile-action-group\">\n <h3 class=\"T12M\">{{ action.title }}</h3>\n @for (child of children; track child.key) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + child.key : null\"\n [disabled]=\"_busy || action.disabled || child.disabled\"\n (click)=\"runSheet(child)\">\n <sd-icon [name]=\"child.icon || 'chevron_right'\" [fontSet]=\"child.fontSet\" [color]=\"child.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ child.title }}\n @if (child.htmlTemplate) {\n <span [innerHTML]=\"child.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n </section>\n } @else {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + action.key : null\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"runSheet(action)\">\n <sd-icon [name]=\"action.icon || 'chevron_right'\" [fontSet]=\"action.fontSet\" [color]=\"action.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ action.title }}\n @if (action.htmlTemplate) {\n <span [innerHTML]=\"action.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n }\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n</sd-modal>\n", styles: [":host{display:block;min-width:0}.sd-mobile-actions{min-width:0;padding:4px 0 max(4px,env(safe-area-inset-bottom))}.sd-mobile-selection-summary{display:flex;align-items:center}.sd-mobile-selection-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 6px;border-radius:var(--sd-radius-8, 8px);background:var(--sd-success-dark, #2e7d32);color:var(--sd-success-contrast, #fff);font-variant-numeric:tabular-nums}.sd-mobile-action-buttons{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;width:100%;min-width:0;gap:8px}.sd-mobile-action-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,72px),1fr));grid-auto-rows:minmax(40px,1fr);gap:4px 8px;min-width:0}.sd-mobile-action-direct{min-width:0}.sd-mobile-action-direct sd-button{width:100%;height:100%}.sd-mobile-more{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 6px;min-width:0;height:100%}.sd-mobile-end{display:grid;place-items:center;padding:0;width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:var(--sd-text);line-height:0;cursor:pointer}.sd-mobile-end:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}button{min-height:40px;white-space:normal}button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host ::ng-deep .sd-mobile-quick-action .c-quick-action.contained{flex-wrap:nowrap;gap:8px;padding:4px 16px;border-radius:var(--sd-radius-12, 12px)}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-message{flex:0 0 auto}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-action{flex:1 1 auto}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-more .mdc-button__label{display:inline-flex;align-items:center;gap:4px}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct button{width:100%;height:100%;min-height:40px;padding:4px 6px!important;white-space:normal}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct .c-title{white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-mobile-quick-action .mat-mdc-button-touch-target{height:40px}:host ::ng-deep .sd-mobile-quick-action sd-icon,:host ::ng-deep .sd-mobile-quick-action sd-icon mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px);line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct sd-icon mat-icon{width:16px;height:16px;font-size:var(--sd-font-size-16, 16px);line-height:var(--sd-line-height-16, 16px)}.sd-mobile-sheet{padding:0 12px max(12px,env(safe-area-inset-bottom));overflow-wrap:anywhere}.sd-mobile-action-group{padding:8px 0;border-top:1px solid var(--sd-border)}.sd-mobile-action-group:first-child{border-top:0;padding-top:0}.sd-mobile-action-group h3{margin:8px 12px 4px;color:var(--sd-text-secondary)}.sd-mobile-sheet-action{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:48px;padding:12px;text-align:start;border-radius:var(--sd-radius-10, 10px)}.sd-mobile-sheet-label{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4}.sd-mobile-sheet-action sd-icon{flex:0 0 20px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .sd-table-mobile-sheet-panel .sd-mobile-sheet-action .mdc-button__label{display:flex;align-items:center;gap:12px;width:100%}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-title{overflow-wrap:anywhere;font-size:var(--sd-font-size-16, 16px);line-height:1.4}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-header{min-height:64px;padding:12px 20px}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-close-btn{width:40px;height:40px}\n"], dependencies: [{ kind: "component", type: SdQuickAction, selector: "sd-quick-action", inputs: ["opened", "contained"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
698
782
|
}
|
|
699
783
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdTableMobileActionsComponent, decorators: [{
|
|
700
784
|
type: Component,
|
|
701
|
-
args: [{ selector: 'sd-table-mobile-actions', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdQuickAction, SdButton, SdModal, MatButtonModule, SdIcon, SdTranslatePipe], template: "@let _busy = busy();\n@let _error = error();\n@let _autoId = autoId();\n@let _title = title();\n@let _selection = selection();\n@if (_selection) {\n <div class=\"sd-mobile-actions\" role=\"region\" [attr.aria-label]=\"_title\">\n <sd-quick-action opened contained class=\"sd-mobile-quick-action\">\n <span sdMessage class=\"sd-mobile-selection-summary\" [attr.aria-label]=\"_title\">\n <span class=\"sd-mobile-selection-count T14M\">{{ count() }}</span>\n </span>\n <div sdAction class=\"sd-mobile-action-buttons\">\n <div class=\"sd-mobile-action-list\">\n @for (action of direct(); track action.key) {\n <span class=\"sd-mobile-action-direct\">\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-action-' + action.key : null\"\n [title]=\"action.title\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n size=\"sm\"\n [type]=\"action.type || 'text'\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"run(action)\"></sd-button>\n </span>\n }\n @if (overflow().length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-more\"\n [disabled]=\"_busy\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-more' : null\"\n (click)=\"openMore()\">\n <sd-icon name=\"more_horiz\"></sd-icon><span>{{ 'core.component.table.mobile.more' | sdTranslate }}</span>\n </button>\n }\n </div>\n <button\n type=\"button\"\n class=\"sd-mobile-end sd-mobile-clear\"\n [attr.aria-label]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"end.emit()\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-end' : null\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n </div>\n </sd-quick-action>\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n}\n<sd-modal\n #sheet\n [autoId]=\"_autoId ? _autoId + '-mobile-sheet' : undefined\"\n [title]=\"_title\"\n view=\"bottom-sheet\"\n [disableBackdropClose]=\"false\"\n modalClass=\"sd-table-mobile-sheet-panel\"\n (sdClosed)=\"onSheetClosed()\">\n <div class=\"sd-mobile-sheet\">\n @for (action of sheetActions(); track action.key) {\n @if (action.children; as children) {\n <section [attr.aria-label]=\"action.title\" class=\"sd-mobile-action-group\">\n <h3 class=\"T12M\">{{ action.title }}</h3>\n @for (child of children; track child.key) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + child.key : null\"\n [disabled]=\"_busy || action.disabled || child.disabled\"\n (click)=\"runSheet(child)\">\n <sd-icon [name]=\"child.icon || 'chevron_right'\" [fontSet]=\"child.fontSet\" [color]=\"child.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ child.title }}\n @if (child.htmlTemplate) {\n <span [innerHTML]=\"child.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n </section>\n } @else {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + action.key : null\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"runSheet(action)\">\n <sd-icon [name]=\"action.icon || 'chevron_right'\" [fontSet]=\"action.fontSet\" [color]=\"action.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ action.title }}\n @if (action.htmlTemplate) {\n <span [innerHTML]=\"action.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n }\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n</sd-modal>\n", styles: [":host{display:block;min-width:0}.sd-mobile-actions{min-width:0;padding:4px 0 max(4px,env(safe-area-inset-bottom))}.sd-mobile-selection-summary{display:flex;align-items:center}.sd-mobile-selection-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 6px;border-radius:8px;background:var(--sd-success-dark, #2e7d32);color:var(--sd-success-contrast, #fff);font-variant-numeric:tabular-nums}.sd-mobile-action-buttons{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;width:100%;min-width:0;gap:8px}.sd-mobile-action-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,72px),1fr));grid-auto-rows:minmax(40px,1fr);gap:4px 8px;min-width:0}.sd-mobile-action-direct{min-width:0}.sd-mobile-action-direct sd-button{width:100%;height:100%}.sd-mobile-more{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 6px;min-width:0;height:100%}.sd-mobile-end{display:grid;place-items:center;padding:0;width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:var(--sd-text);line-height:0;cursor:pointer}.sd-mobile-end:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}button{min-height:40px;white-space:normal}button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}:host ::ng-deep .sd-mobile-quick-action .c-quick-action.contained{flex-wrap:nowrap;gap:8px;padding:4px 16px;border-radius:12px}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-message{flex:0 0 auto}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-action{flex:1 1 auto}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-more .mdc-button__label{display:inline-flex;align-items:center;gap:4px}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct button{width:100%;height:100%;min-height:40px;padding:4px 6px!important;white-space:normal}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct .c-title{white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip;line-height:18px}:host ::ng-deep .sd-mobile-quick-action .mat-mdc-button-touch-target{height:40px}:host ::ng-deep .sd-mobile-quick-action sd-icon,:host ::ng-deep .sd-mobile-quick-action sd-icon mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct sd-icon mat-icon{width:16px;height:16px;font-size:16px;line-height:16px}.sd-mobile-sheet{padding:0 12px max(12px,env(safe-area-inset-bottom));overflow-wrap:anywhere}.sd-mobile-action-group{padding:8px 0;border-top:1px solid var(--sd-border)}.sd-mobile-action-group:first-child{border-top:0;padding-top:0}.sd-mobile-action-group h3{margin:8px 12px 4px;color:var(--sd-text-secondary)}.sd-mobile-sheet-action{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:48px;padding:12px;text-align:start;border-radius:10px}.sd-mobile-sheet-label{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4}.sd-mobile-sheet-action sd-icon{flex:0 0 20px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .sd-table-mobile-sheet-panel .sd-mobile-sheet-action .mdc-button__label{display:flex;align-items:center;gap:12px;width:100%}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-title{overflow-wrap:anywhere;font-size:16px;line-height:1.4}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-header{min-height:64px;padding:12px 20px}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-close-btn{width:40px;height:40px}\n"] }]
|
|
785
|
+
args: [{ selector: 'sd-table-mobile-actions', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdQuickAction, SdButton, SdModal, MatButtonModule, SdIcon, SdTranslatePipe], template: "@let _busy = busy();\n@let _error = error();\n@let _autoId = autoId();\n@let _title = title();\n@let _selection = selection();\n@if (_selection) {\n <div class=\"sd-mobile-actions\" role=\"region\" [attr.aria-label]=\"_title\">\n <sd-quick-action opened contained class=\"sd-mobile-quick-action\">\n <span sdMessage class=\"sd-mobile-selection-summary\" [attr.aria-label]=\"_title\">\n <span class=\"sd-mobile-selection-count T14M\">{{ count() }}</span>\n </span>\n <div sdAction class=\"sd-mobile-action-buttons\">\n <div class=\"sd-mobile-action-list\">\n @for (action of direct(); track action.key) {\n <span class=\"sd-mobile-action-direct\">\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-action-' + action.key : null\"\n [title]=\"action.title\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n size=\"sm\"\n [type]=\"action.type || 'text'\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"run(action)\"></sd-button>\n </span>\n }\n @if (overflow().length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-more\"\n [disabled]=\"_busy\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-more' : null\"\n (click)=\"openMore()\">\n <sd-icon name=\"more_horiz\"></sd-icon><span>{{ 'core.component.table.mobile.more' | sdTranslate }}</span>\n </button>\n }\n </div>\n <button\n type=\"button\"\n class=\"sd-mobile-end sd-mobile-clear\"\n [attr.aria-label]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"end.emit()\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-end' : null\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n </div>\n </sd-quick-action>\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n}\n<sd-modal\n #sheet\n [autoId]=\"_autoId ? _autoId + '-mobile-sheet' : undefined\"\n [title]=\"_title\"\n view=\"bottom-sheet\"\n [disableBackdropClose]=\"false\"\n modalClass=\"sd-table-mobile-sheet-panel\"\n (sdClosed)=\"onSheetClosed()\">\n <div class=\"sd-mobile-sheet\">\n @for (action of sheetActions(); track action.key) {\n @if (action.children; as children) {\n <section [attr.aria-label]=\"action.title\" class=\"sd-mobile-action-group\">\n <h3 class=\"T12M\">{{ action.title }}</h3>\n @for (child of children; track child.key) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + child.key : null\"\n [disabled]=\"_busy || action.disabled || child.disabled\"\n (click)=\"runSheet(child)\">\n <sd-icon [name]=\"child.icon || 'chevron_right'\" [fontSet]=\"child.fontSet\" [color]=\"child.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ child.title }}\n @if (child.htmlTemplate) {\n <span [innerHTML]=\"child.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n </section>\n } @else {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + action.key : null\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"runSheet(action)\">\n <sd-icon [name]=\"action.icon || 'chevron_right'\" [fontSet]=\"action.fontSet\" [color]=\"action.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ action.title }}\n @if (action.htmlTemplate) {\n <span [innerHTML]=\"action.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n }\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n</sd-modal>\n", styles: [":host{display:block;min-width:0}.sd-mobile-actions{min-width:0;padding:4px 0 max(4px,env(safe-area-inset-bottom))}.sd-mobile-selection-summary{display:flex;align-items:center}.sd-mobile-selection-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 6px;border-radius:var(--sd-radius-8, 8px);background:var(--sd-success-dark, #2e7d32);color:var(--sd-success-contrast, #fff);font-variant-numeric:tabular-nums}.sd-mobile-action-buttons{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;width:100%;min-width:0;gap:8px}.sd-mobile-action-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,72px),1fr));grid-auto-rows:minmax(40px,1fr);gap:4px 8px;min-width:0}.sd-mobile-action-direct{min-width:0}.sd-mobile-action-direct sd-button{width:100%;height:100%}.sd-mobile-more{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 6px;min-width:0;height:100%}.sd-mobile-end{display:grid;place-items:center;padding:0;width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:var(--sd-text);line-height:0;cursor:pointer}.sd-mobile-end:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}button{min-height:40px;white-space:normal}button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host ::ng-deep .sd-mobile-quick-action .c-quick-action.contained{flex-wrap:nowrap;gap:8px;padding:4px 16px;border-radius:var(--sd-radius-12, 12px)}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-message{flex:0 0 auto}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-action{flex:1 1 auto}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-more .mdc-button__label{display:inline-flex;align-items:center;gap:4px}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct button{width:100%;height:100%;min-height:40px;padding:4px 6px!important;white-space:normal}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct .c-title{white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-mobile-quick-action .mat-mdc-button-touch-target{height:40px}:host ::ng-deep .sd-mobile-quick-action sd-icon,:host ::ng-deep .sd-mobile-quick-action sd-icon mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px);line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct sd-icon mat-icon{width:16px;height:16px;font-size:var(--sd-font-size-16, 16px);line-height:var(--sd-line-height-16, 16px)}.sd-mobile-sheet{padding:0 12px max(12px,env(safe-area-inset-bottom));overflow-wrap:anywhere}.sd-mobile-action-group{padding:8px 0;border-top:1px solid var(--sd-border)}.sd-mobile-action-group:first-child{border-top:0;padding-top:0}.sd-mobile-action-group h3{margin:8px 12px 4px;color:var(--sd-text-secondary)}.sd-mobile-sheet-action{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:48px;padding:12px;text-align:start;border-radius:var(--sd-radius-10, 10px)}.sd-mobile-sheet-label{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4}.sd-mobile-sheet-action sd-icon{flex:0 0 20px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .sd-table-mobile-sheet-panel .sd-mobile-sheet-action .mdc-button__label{display:flex;align-items:center;gap:12px;width:100%}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-title{overflow-wrap:anywhere;font-size:var(--sd-font-size-16, 16px);line-height:1.4}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-header{min-height:64px;padding:12px 20px}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-close-btn{width:40px;height:40px}\n"] }]
|
|
702
786
|
}], ctorParameters: () => [], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], autoOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOpen", required: false }] }], autoId: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], end: [{ type: i0.Output, args: ["end"] }], sheet: [{ type: i0.ViewChild, args: ['sheet', { isSignal: true }] }] } });
|
|
703
787
|
|
|
704
788
|
/**
|
|
@@ -1161,7 +1245,7 @@ class SdTableMobileCardsComponent {
|
|
|
1161
1245
|
this.#commandRevision++;
|
|
1162
1246
|
}
|
|
1163
1247
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdTableMobileCardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1164
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdTableMobileCardsComponent, isStandalone: true, selector: "sd-table-mobile-cards", inputs: { table: { classPropertyName: "table", publicName: "table", isSignal: true, isRequired: true, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, dataRows: { classPropertyName: "dataRows", publicName: "dataRows", isSignal: true, isRequired: false, transformFunction: null }, aggregateTemplate: { classPropertyName: "aggregateTemplate", publicName: "aggregateTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupTemplate: { classPropertyName: "groupTemplate", publicName: "groupTemplate", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n <sd-icon\n [name]=\"_meta.tree?.isExpanding ? 'hourglass_empty' : _meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n <sd-icon\n [name]=\"\n _meta.expand?.isExpanding ? 'hourglass_empty' : _meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\n \"></sd-icon>\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px}.sd-mobile-card{position:relative;border:1px solid var(--sd-border);border-radius:8px;background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1248
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdTableMobileCardsComponent, isStandalone: true, selector: "sd-table-mobile-cards", inputs: { table: { classPropertyName: "table", publicName: "table", isSignal: true, isRequired: true, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, dataRows: { classPropertyName: "dataRows", publicName: "dataRows", isSignal: true, isRequired: false, transformFunction: null }, aggregateTemplate: { classPropertyName: "aggregateTemplate", publicName: "aggregateTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupTemplate: { classPropertyName: "groupTemplate", publicName: "groupTemplate", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n <sd-icon\n [name]=\"_meta.tree?.isExpanding ? 'hourglass_empty' : _meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n <sd-icon\n [name]=\"\n _meta.expand?.isExpanding ? 'hourglass_empty' : _meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\n \"></sd-icon>\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px}.sd-mobile-card{position:relative;border:1px solid var(--sd-border);border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1165
1249
|
}
|
|
1166
1250
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdTableMobileCardsComponent, decorators: [{
|
|
1167
1251
|
type: Component,
|
|
@@ -1175,7 +1259,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1175
1259
|
SdIcon,
|
|
1176
1260
|
SdTranslatePipe,
|
|
1177
1261
|
SdTableMobileActionsComponent,
|
|
1178
|
-
], template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n <sd-icon\n [name]=\"_meta.tree?.isExpanding ? 'hourglass_empty' : _meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n <sd-icon\n [name]=\"\n _meta.expand?.isExpanding ? 'hourglass_empty' : _meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\n \"></sd-icon>\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px}.sd-mobile-card{position:relative;border:1px solid var(--sd-border);border-radius:8px;background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"] }]
|
|
1262
|
+
], template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n <sd-icon\n [name]=\"_meta.tree?.isExpanding ? 'hourglass_empty' : _meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n <sd-icon\n [name]=\"\n _meta.expand?.isExpanding ? 'hourglass_empty' : _meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\n \"></sd-icon>\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px}.sd-mobile-card{position:relative;border:1px solid var(--sd-border);border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"] }]
|
|
1179
1263
|
}], ctorParameters: () => [], propDecorators: { table: [{ type: i0.Input, args: [{ isSignal: true, alias: "table", required: true }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: true }] }], dataRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataRows", required: false }] }], aggregateTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "aggregateTemplate", required: false }] }], groupTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupTemplate", required: true }] }] } });
|
|
1180
1264
|
|
|
1181
1265
|
// why: `columns` nhận `SdTableColumnAnyRow[]` (= `SdTableColumn<never>[]`). Hàm chỉ đọc
|
|
@@ -1566,7 +1650,7 @@ function calculateAggregate(items, context, definition) {
|
|
|
1566
1650
|
validateOperation(context.column, calculate);
|
|
1567
1651
|
if (!context.isComplete)
|
|
1568
1652
|
return undefined;
|
|
1569
|
-
const values = items.map(item =>
|
|
1653
|
+
const values = items.map(item => resolveFieldValue(item, context.column.field));
|
|
1570
1654
|
if (calculate === 'COUNT')
|
|
1571
1655
|
return values.filter(hasAggregateValue).length;
|
|
1572
1656
|
if (context.column.type === 'date' || context.column.type === 'datetime') {
|
|
@@ -1681,7 +1765,7 @@ function buildAggregateSnapshot(args) {
|
|
|
1681
1765
|
for (const item of roots) {
|
|
1682
1766
|
const values = {};
|
|
1683
1767
|
for (const field of option.group.fields)
|
|
1684
|
-
values[field] =
|
|
1768
|
+
values[field] = resolveFieldValue(item, field);
|
|
1685
1769
|
const key = Utilities.hash(values);
|
|
1686
1770
|
if (!buckets.has(key))
|
|
1687
1771
|
buckets.set(key, { values, items: [] });
|
|
@@ -1918,11 +2002,11 @@ class ColumnFilterComponent {
|
|
|
1918
2002
|
};
|
|
1919
2003
|
#filterValueHash = (value) => Utilities.hash({ value });
|
|
1920
2004
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ColumnFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1921
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ColumnFilterComponent, isStandalone: true, selector: "column-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, columnFilter: { classPropertyName: "columnFilter", publicName: "columnFilter", isSignal: true, isRequired: false, transformFunction: null }, cacheValues: { classPropertyName: "cacheValues", publicName: "cacheValues", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, operator: { classPropertyName: "operator", publicName: "operator", isSignal: true, isRequired: false, transformFunction: null }, isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { operator: "operatorChange", filterChange: "filterChange", filterCommit: "filterCommit" }, ngImport: i0, template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator filter -->\n @if (_operators.length) {\n <sd-operator class=\"mr-4\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "mask", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "description", "tooltip", "icon", "size"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2005
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ColumnFilterComponent, isStandalone: true, selector: "column-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, columnFilter: { classPropertyName: "columnFilter", publicName: "columnFilter", isSignal: true, isRequired: false, transformFunction: null }, cacheValues: { classPropertyName: "cacheValues", publicName: "cacheValues", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, operator: { classPropertyName: "operator", publicName: "operator", isSignal: true, isRequired: false, transformFunction: null }, isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { operator: "operatorChange", filterChange: "filterChange", filterCommit: "filterCommit" }, ngImport: i0, template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator filter -->\n @if (_operators.length) {\n <sd-operator class=\"mr-4\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:var(--sd-table-bg, #ffffff)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "description", "tooltip", "icon", "size"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1922
2006
|
}
|
|
1923
2007
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ColumnFilterComponent, decorators: [{
|
|
1924
2008
|
type: Component,
|
|
1925
|
-
args: [{ selector: 'column-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdOperator, SdInput, SdInputNumber, SdSelect, SdDate, SdDateRange, SdBadge], template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator filter -->\n @if (_operators.length) {\n <sd-operator class=\"mr-4\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color
|
|
2009
|
+
args: [{ selector: 'column-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdOperator, SdInput, SdInputNumber, SdSelect, SdDate, SdDateRange, SdBadge], template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator filter -->\n @if (_operators.length) {\n <sd-operator class=\"mr-4\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:var(--sd-table-bg, #ffffff)}\n"] }]
|
|
1926
2010
|
}], ctorParameters: () => [], propDecorators: { autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], columnFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnFilter", required: false }] }], cacheValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "cacheValues", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], operator: [{ type: i0.Input, args: [{ isSignal: true, alias: "operator", required: false }] }, { type: i0.Output, args: ["operatorChange"] }], isMobile: [{ type: i0.Input, args: [{ isSignal: true, alias: "isMobile", required: false }] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], filterCommit: [{ type: i0.Output, args: ["filterCommit"] }] } });
|
|
1927
2011
|
|
|
1928
2012
|
class ExternalFilterComponent {
|
|
@@ -2050,7 +2134,7 @@ class ExternalFilterComponent {
|
|
|
2050
2134
|
});
|
|
2051
2135
|
};
|
|
2052
2136
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ExternalFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2053
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ExternalFilterComponent, isStandalone: true, selector: "external-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, externalFilters: { classPropertyName: "externalFilters", publicName: "externalFilters", isSignal: true, isRequired: false, transformFunction: null }, filterRegister: { classPropertyName: "filterRegister", publicName: "filterRegister", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let _filter = filter();\n@let _autoId = autoId();\n@let _filterItems = filterItems();\n@let _externalFilter = externalFilter();\n@let _inlineExternal = inlineExternal();\n@let _filtered = filtered();\n@let _col = col();\n\n@if (!_filter?.disabled) {\n @if (!isMobileOrTablet && _filterItems.length) {\n <sd-section\n [hideHeader]=\"_filter?.hideExternalFilterToolbar\"\n icon=\"filter_alt\"\n iconColor=\"secondary\"\n [title]=\"'core.component.table.filter' | sdTranslate\"\n [collapsible]=\"_filter?.collapsible ?? true\">\n <div class=\"d-flex gap-8 mr-4\" sdHeaderRight>\n <sd-button\n [autoId]=\"_autoId + 'clear'\"\n [disabled]=\"!_filtered\"\n type=\"text\"\n prefixIcon=\"cleaning_services\"\n [tooltip]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"$event.stopPropagation(); clearFilter($event)\"></sd-button>\n <sd-button\n [autoId]=\"_autoId + 'setting'\"\n type=\"text\"\n prefixIcon=\"settings\"\n [tooltip]=\"'core.component.table.customize' | sdTranslate\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"></sd-button>\n <mat-menu #menu=\"matMenu\" class=\"sd-custom-panel-filter-configuration\" [attr.data-autoid]=\"_autoId + 'setting-menu'\">\n @for (externalFilter of _filterItems; track externalFilter.field) {\n <button\n [attr.data-autoid]=\"_autoId + 'setting-' + externalFilter.field\"\n mat-menu-item\n (click)=\"onCheckboxChange($event, externalFilter)\"\n [disabled]=\"externalFilter.required\">\n <sd-checkbox\n [autoId]=\"_autoId + 'setting-' + externalFilter.field + '-checkbox'\"\n [label]=\"externalFilter.title\"\n [model]=\"_inlineExternal[externalFilter.field]\"\n [disabled]=\"externalFilter.required\" />\n </button>\n }\n </mat-menu>\n </div>\n <div class=\"sd-external-filter-body\">\n <div class=\"row mx-0\" style=\"row-gap: 16px\">\n @for (item of _filterItems; track item.field) {\n @if (_inlineExternal[item.field]) {\n <div class=\"col-md-3 col-sm-6 px-8\" [class.col-lg-2]=\"_col === 2\" [class.col-lg-3]=\"_col === 3\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'AUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'MULTIPLEAUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'lazy-values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { form: form, externalFilter: _externalFilter, autoId: _autoId + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n }\n </div>\n @if (_filter?.manualFilter) {\n <div class=\"d-flex justify-content-end mt-16 px-8\">\n <sd-button\n [autoId]=\"_autoId + 'submit'\"\n [disabled]=\"form.invalid\"\n type=\"fill\"\n color=\"primary\"\n [title]=\"'core.component.table.search' | sdTranslate\"\n prefixIcon=\"filter_alt\"\n (click)=\"onSubmit()\">\n </sd-button>\n </div>\n }\n </div>\n </sd-section>\n }\n}\n", styles: [":host{display:block;padding-left:0;padding-right:0}.sd-external-filter-body{padding:16px 8px}::ng-deep .sd-custom-panel-filter-configuration{width:240px;max-height:550px;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsible", "hideHeader"], outputs: ["collapsedChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "mask", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2137
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ExternalFilterComponent, isStandalone: true, selector: "external-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, externalFilters: { classPropertyName: "externalFilters", publicName: "externalFilters", isSignal: true, isRequired: false, transformFunction: null }, filterRegister: { classPropertyName: "filterRegister", publicName: "filterRegister", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let _filter = filter();\n@let _autoId = autoId();\n@let _filterItems = filterItems();\n@let _externalFilter = externalFilter();\n@let _inlineExternal = inlineExternal();\n@let _filtered = filtered();\n@let _col = col();\n\n@if (!_filter?.disabled) {\n @if (!isMobileOrTablet && _filterItems.length) {\n <sd-section\n [hideHeader]=\"_filter?.hideExternalFilterToolbar\"\n icon=\"filter_alt\"\n iconColor=\"secondary\"\n [title]=\"'core.component.table.filter' | sdTranslate\"\n [collapsible]=\"_filter?.collapsible ?? true\">\n <div class=\"d-flex gap-8 mr-4\" sdHeaderRight>\n <sd-button\n [autoId]=\"_autoId + 'clear'\"\n [disabled]=\"!_filtered\"\n type=\"text\"\n prefixIcon=\"cleaning_services\"\n [tooltip]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"$event.stopPropagation(); clearFilter($event)\"></sd-button>\n <sd-button\n [autoId]=\"_autoId + 'setting'\"\n type=\"text\"\n prefixIcon=\"settings\"\n [tooltip]=\"'core.component.table.customize' | sdTranslate\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"></sd-button>\n <mat-menu #menu=\"matMenu\" class=\"sd-custom-panel-filter-configuration\" [attr.data-autoid]=\"_autoId + 'setting-menu'\">\n @for (externalFilter of _filterItems; track externalFilter.field) {\n <button\n [attr.data-autoid]=\"_autoId + 'setting-' + externalFilter.field\"\n mat-menu-item\n (click)=\"onCheckboxChange($event, externalFilter)\"\n [disabled]=\"externalFilter.required\">\n <sd-checkbox\n [autoId]=\"_autoId + 'setting-' + externalFilter.field + '-checkbox'\"\n [label]=\"externalFilter.title\"\n [model]=\"_inlineExternal[externalFilter.field]\"\n [disabled]=\"externalFilter.required\" />\n </button>\n }\n </mat-menu>\n </div>\n <div class=\"sd-external-filter-body\">\n <div class=\"row mx-0\" style=\"row-gap: 16px\">\n @for (item of _filterItems; track item.field) {\n @if (_inlineExternal[item.field]) {\n <div class=\"col-md-3 col-sm-6 px-8\" [class.col-lg-2]=\"_col === 2\" [class.col-lg-3]=\"_col === 3\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'AUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'MULTIPLEAUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'lazy-values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { form: form, externalFilter: _externalFilter, autoId: _autoId + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n }\n </div>\n @if (_filter?.manualFilter) {\n <div class=\"d-flex justify-content-end mt-16 px-8\">\n <sd-button\n [autoId]=\"_autoId + 'submit'\"\n [disabled]=\"form.invalid\"\n type=\"fill\"\n color=\"primary\"\n [title]=\"'core.component.table.search' | sdTranslate\"\n prefixIcon=\"filter_alt\"\n (click)=\"onSubmit()\">\n </sd-button>\n </div>\n }\n </div>\n </sd-section>\n }\n}\n", styles: [":host{display:block;padding-left:0;padding-right:0}.sd-external-filter-body{padding:16px 8px}::ng-deep .sd-custom-panel-filter-configuration{width:240px;max-height:550px;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "iconShape", "collapsed", "collapsible", "hideHeader"], outputs: ["collapsedChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2054
2138
|
}
|
|
2055
2139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ExternalFilterComponent, decorators: [{
|
|
2056
2140
|
type: Component,
|
|
@@ -2145,7 +2229,7 @@ class MobileFilterComponent {
|
|
|
2145
2229
|
this.drawer().close();
|
|
2146
2230
|
};
|
|
2147
2231
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MobileFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2148
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: MobileFilterComponent, isStandalone: true, selector: "mobile-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, externalFilters: { classPropertyName: "externalFilters", publicName: "externalFilters", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, filterDefs: { classPropertyName: "filterDefs", publicName: "filterDefs", isSignal: true, isRequired: false, transformFunction: null }, filterRegister: { classPropertyName: "filterRegister", publicName: "filterRegister", isSignal: true, isRequired: false, transformFunction: null }, cacheValues: { classPropertyName: "cacheValues", publicName: "cacheValues", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "drawer", first: true, predicate: SdSideDrawer, descendants: true, isSignal: true }], ngImport: i0, template: "@let _autoId = autoId();\n@let _externalFilterItems = externalFilterItems();\n@let _columnItems = columnItems();\n@let _filterDefItems = filterDefItems();\n@let _workingColumnFilter = workingColumnFilter();\n@let _workingColumnOperator = workingColumnOperator();\n@let _workingExternalFilter = workingExternalFilter();\n@let _cacheValues = cacheValues();\n\n<sd-side-drawer\n #drawer\n [title]=\"'core.component.table.filter' | sdTranslate\"\n width=\"90vw\">\n <div class=\"mobile-filter-body\">\n <!-- ============================ -->\n <!-- 1. External filters (inline) -->\n <!-- ============================ -->\n @if (_externalFilterItems.length) {\n <section class=\"mobile-filter-section\">\n @for (item of _externalFilterItems; track item.field) {\n <div class=\"mobile-filter-row\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'lazy-values') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [multiple]=\"item.option.selection === 'MULTIPLE'\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { externalFilter: _workingExternalFilter, autoId: _autoId + 'ext-' + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n </section>\n }\n\n <!-- ============================ -->\n <!-- 2. Custom filterDef templates -->\n <!-- ============================ -->\n @if (_filterDefItems.length) {\n <section class=\"mobile-filter-section\">\n @for (def of _filterDefItems; track def.sdTableFilterDef()) {\n <div class=\"mobile-filter-row\" [attr.data-autoid]=\"_autoId + 'def-' + def.sdTableFilterDef()\">\n <ng-container\n *ngTemplateOutlet=\"def.templateRef!; context: { externalFilter: _workingExternalFilter }\">\n </ng-container>\n </div>\n }\n </section>\n }\n\n <!-- ============================ -->\n <!-- 3. Column filters -->\n <!-- ============================ -->\n @if (_columnItems.length) {\n <section class=\"mobile-filter-section\">\n @for (column of _columnItems; track column.field) {\n <div class=\"mobile-filter-row\" [attr.data-autoid]=\"_autoId + 'col-' + column.field\">\n <column-filter\n [autoId]=\"_autoId + 'col'\"\n [column]=\"column\"\n [columnFilter]=\"_workingColumnFilter\"\n [operator]=\"$any(_workingColumnOperator[column.field])\"\n (operatorChange)=\"_workingColumnOperator[column.field] = $event!\"\n [cacheValues]=\"_cacheValues\"\n isMobile>\n </column-filter>\n </div>\n }\n </section>\n }\n </div>\n\n <ng-container sdFooterRight>\n <div class=\"mobile-filter-footer\">\n <sd-button\n [autoId]=\"_autoId + 'cancel'\"\n class=\"mobile-filter-action\"\n (click)=\"onCancel()\"\n [title]=\"'core.confirm.no' | sdTranslate\"\n type=\"text\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId + 'apply'\"\n class=\"mobile-filter-action\"\n (click)=\"onApply()\"\n [title]=\"'core.confirm.yes' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </div>\n </ng-container>\n</sd-side-drawer>\n", styles: [".mobile-filter-body{display:flex;flex-direction:column;gap:16px;padding:8px 0}.mobile-filter-section{display:flex;flex-direction:column;gap:12px}.mobile-filter-row{display:flex;flex-direction:column}.mobile-filter-footer{display:flex;gap:8px;width:100%}.mobile-filter-action{flex:1 1 50%}.mobile-filter-action ::ng-deep button{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdSideDrawer, selector: "sd-side-drawer", inputs: ["title", "width", "hideClose", "disableBackdropClose", "beforeClose", "container", "drawerClass", "autoId"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["autoId", "column", "columnFilter", "cacheValues", "value", "operator", "isMobile"], outputs: ["operatorChange", "filterChange", "filterCommit"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "mask", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2232
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: MobileFilterComponent, isStandalone: true, selector: "mobile-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, externalFilters: { classPropertyName: "externalFilters", publicName: "externalFilters", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, filterDefs: { classPropertyName: "filterDefs", publicName: "filterDefs", isSignal: true, isRequired: false, transformFunction: null }, filterRegister: { classPropertyName: "filterRegister", publicName: "filterRegister", isSignal: true, isRequired: false, transformFunction: null }, cacheValues: { classPropertyName: "cacheValues", publicName: "cacheValues", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "drawer", first: true, predicate: SdSideDrawer, descendants: true, isSignal: true }], ngImport: i0, template: "@let _autoId = autoId();\n@let _externalFilterItems = externalFilterItems();\n@let _columnItems = columnItems();\n@let _filterDefItems = filterDefItems();\n@let _workingColumnFilter = workingColumnFilter();\n@let _workingColumnOperator = workingColumnOperator();\n@let _workingExternalFilter = workingExternalFilter();\n@let _cacheValues = cacheValues();\n\n<sd-side-drawer\n #drawer\n [title]=\"'core.component.table.filter' | sdTranslate\"\n width=\"90vw\">\n <div class=\"mobile-filter-body\">\n <!-- ============================ -->\n <!-- 1. External filters (inline) -->\n <!-- ============================ -->\n @if (_externalFilterItems.length) {\n <section class=\"mobile-filter-section\">\n @for (item of _externalFilterItems; track item.field) {\n <div class=\"mobile-filter-row\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'lazy-values') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [multiple]=\"item.option.selection === 'MULTIPLE'\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { externalFilter: _workingExternalFilter, autoId: _autoId + 'ext-' + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n </section>\n }\n\n <!-- ============================ -->\n <!-- 2. Custom filterDef templates -->\n <!-- ============================ -->\n @if (_filterDefItems.length) {\n <section class=\"mobile-filter-section\">\n @for (def of _filterDefItems; track def.sdTableFilterDef()) {\n <div class=\"mobile-filter-row\" [attr.data-autoid]=\"_autoId + 'def-' + def.sdTableFilterDef()\">\n <ng-container\n *ngTemplateOutlet=\"def.templateRef!; context: { externalFilter: _workingExternalFilter }\">\n </ng-container>\n </div>\n }\n </section>\n }\n\n <!-- ============================ -->\n <!-- 3. Column filters -->\n <!-- ============================ -->\n @if (_columnItems.length) {\n <section class=\"mobile-filter-section\">\n @for (column of _columnItems; track column.field) {\n <div class=\"mobile-filter-row\" [attr.data-autoid]=\"_autoId + 'col-' + column.field\">\n <column-filter\n [autoId]=\"_autoId + 'col'\"\n [column]=\"column\"\n [columnFilter]=\"_workingColumnFilter\"\n [operator]=\"$any(_workingColumnOperator[column.field])\"\n (operatorChange)=\"_workingColumnOperator[column.field] = $event!\"\n [cacheValues]=\"_cacheValues\"\n isMobile>\n </column-filter>\n </div>\n }\n </section>\n }\n </div>\n\n <ng-container sdFooterRight>\n <div class=\"mobile-filter-footer\">\n <sd-button\n [autoId]=\"_autoId + 'cancel'\"\n class=\"mobile-filter-action\"\n (click)=\"onCancel()\"\n [title]=\"'core.confirm.no' | sdTranslate\"\n type=\"text\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId + 'apply'\"\n class=\"mobile-filter-action\"\n (click)=\"onApply()\"\n [title]=\"'core.confirm.yes' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </div>\n </ng-container>\n</sd-side-drawer>\n", styles: [".mobile-filter-body{display:flex;flex-direction:column;gap:16px;padding:8px 0}.mobile-filter-section{display:flex;flex-direction:column;gap:12px}.mobile-filter-row{display:flex;flex-direction:column}.mobile-filter-footer{display:flex;gap:8px;width:100%}.mobile-filter-action{flex:1 1 50%}.mobile-filter-action ::ng-deep button{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdSideDrawer, selector: "sd-side-drawer", inputs: ["title", "width", "hideClose", "disableBackdropClose", "beforeClose", "container", "drawerClass", "autoId"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["autoId", "column", "columnFilter", "cacheValues", "value", "operator", "isMobile"], outputs: ["operatorChange", "filterChange", "filterCommit"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2149
2233
|
}
|
|
2150
2234
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MobileFilterComponent, decorators: [{
|
|
2151
2235
|
type: Component,
|
|
@@ -2215,11 +2299,11 @@ class SelectorActionComponent {
|
|
|
2215
2299
|
}
|
|
2216
2300
|
};
|
|
2217
2301
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SelectorActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2218
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SelectorActionComponent, isStandalone: true, selector: "selector-action", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, tableOption: { classPropertyName: "tableOption", publicName: "tableOption", isSignal: true, isRequired: false, transformFunction: null }, selectedTableItems: { classPropertyName: "selectedTableItems", publicName: "selectedTableItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clear: "clear" }, ngImport: i0, template: "@let _autoId = autoId();\n@let _moreLabel = moreLabel();\n@let _direct = directActions();\n@let _overflow = overflowActions();\n@if (opened()) {\n <sd-quick-action opened contained>\n <div class=\"sd-selection-message\" sdMessage role=\"status\">\n <span class=\"sd-selection-icon\" aria-hidden=\"true\"><sd-icon name=\"check_circle_outline\" /></span>\n <span>{{ message() }}</span>\n </div>\n <div class=\"sd-selection-actions\" sdAction>\n @for (entry of _direct; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon\"\n [color]=\"action.color\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\"\n (click)=\"onClickAction(action)\" />\n } @else {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon || 'more_horiz'\"\n [color]=\"action.color || 'secondary'\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\">\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n </sd-button>\n }\n }\n @if (_overflow.length) {\n <sd-button\n class=\"sd-selection-more\"\n size=\"sm\"\n suffixIcon=\"more_horiz\"\n [title]=\"_moreLabel\"\n color=\"secondary\"\n type=\"light\"\n [autoId]=\"_autoId ? _autoId + '-more-actions' : null\">\n @for (entry of _overflow; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n [tooltip]=\"action.tooltip\"\n (click)=\"onClickAction(action)\"\n >{{ action.title }}</sd-button-item\n >\n } @else {\n <sd-button-item-divider [title]=\"action.title\" />\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n }\n }\n </sd-button>\n }\n <button\n type=\"button\"\n class=\"sd-selection-clear\"\n [attr.aria-label]=\"clearLabel()\"\n [attr.data-autoid]=\"_autoId ? 'components-button-' + _autoId + '-clear-selection' : null\"\n (click)=\"onClear()\">\n <sd-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n </div>\n </sd-quick-action>\n}\n", styles: [":host{display:block;flex-shrink:0;min-width:0;padding-inline:8px;box-sizing:border-box}.sd-selection-message{display:flex;align-items:center;gap:8px;min-width:0;font-size:13px;line-height:20px}.sd-selection-message>span:last-child{overflow-wrap:anywhere}.sd-selection-icon{display:flex;align-items:center;justify-content:center;flex:0 0 28px;height:28px;border-radius:8px;background:var(--sd-success-light, #e8f5e9);color:var(--sd-success-dark, #2e7d32)}.sd-selection-icon sd-icon,.sd-selection-icon mat-icon{width:18px;height:18px;font-size:18px}.sd-selection-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.sd-selection-clear{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;height:32px;border:0;border-radius:8px;color:var(--sd-text-secondary, #62676d);background:transparent;cursor:pointer}.sd-selection-clear:hover{background:var(--sd-surface-variant, #eef0f3)}.sd-selection-clear:focus-visible{outline:2px solid var(--sd-
|
|
2302
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SelectorActionComponent, isStandalone: true, selector: "selector-action", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, tableOption: { classPropertyName: "tableOption", publicName: "tableOption", isSignal: true, isRequired: false, transformFunction: null }, selectedTableItems: { classPropertyName: "selectedTableItems", publicName: "selectedTableItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clear: "clear" }, ngImport: i0, template: "@let _autoId = autoId();\n@let _moreLabel = moreLabel();\n@let _direct = directActions();\n@let _overflow = overflowActions();\n@if (opened()) {\n <sd-quick-action opened contained>\n <div class=\"sd-selection-message\" sdMessage role=\"status\">\n <span class=\"sd-selection-icon\" aria-hidden=\"true\"><sd-icon name=\"check_circle_outline\" /></span>\n <span>{{ message() }}</span>\n </div>\n <div class=\"sd-selection-actions\" sdAction>\n @for (entry of _direct; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon\"\n [color]=\"action.color\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\"\n (click)=\"onClickAction(action)\" />\n } @else {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon || 'more_horiz'\"\n [color]=\"action.color || 'secondary'\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\">\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n </sd-button>\n }\n }\n @if (_overflow.length) {\n <sd-button\n class=\"sd-selection-more\"\n size=\"sm\"\n suffixIcon=\"more_horiz\"\n [title]=\"_moreLabel\"\n color=\"secondary\"\n type=\"light\"\n [autoId]=\"_autoId ? _autoId + '-more-actions' : null\">\n @for (entry of _overflow; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n [tooltip]=\"action.tooltip\"\n (click)=\"onClickAction(action)\"\n >{{ action.title }}</sd-button-item\n >\n } @else {\n <sd-button-item-divider [title]=\"action.title\" />\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n }\n }\n </sd-button>\n }\n <button\n type=\"button\"\n class=\"sd-selection-clear\"\n [attr.aria-label]=\"clearLabel()\"\n [attr.data-autoid]=\"_autoId ? 'components-button-' + _autoId + '-clear-selection' : null\"\n (click)=\"onClear()\">\n <sd-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n </div>\n </sd-quick-action>\n}\n", styles: [":host{display:block;flex-shrink:0;min-width:0;padding-inline:8px;box-sizing:border-box}.sd-selection-message{display:flex;align-items:center;gap:8px;min-width:0;font-size:var(--sd-font-size-13, 13px);line-height:var(--sd-line-height-20, 20px)}.sd-selection-message>span:last-child{overflow-wrap:anywhere}.sd-selection-icon{display:flex;align-items:center;justify-content:center;flex:0 0 28px;height:28px;border-radius:var(--sd-radius-8, 8px);background:var(--sd-success-light, #e8f5e9);color:var(--sd-success-dark, #2e7d32)}.sd-selection-icon sd-icon,.sd-selection-icon mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px)}.sd-selection-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.sd-selection-clear{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;height:32px;border:0;border-radius:var(--sd-radius-8, 8px);color:var(--sd-text-secondary, #62676d);background:transparent;cursor:pointer}.sd-selection-clear:hover{background:var(--sd-surface-variant, #eef0f3)}.sd-selection-clear:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-selection-clear sd-icon,.sd-selection-clear mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px)}.sd-selection-menu-heading{padding:6px 12px 4px;color:var(--sd-text-secondary, #62676d);font-size:var(--sd-font-size-12, 12px);font-weight:var(--sd-font-weight-semibold, 600)}:host ::ng-deep sd-quick-action .c-quick-action.contained{flex-wrap:nowrap;gap:16px;padding:10px 12px;margin:8px 0;border:1px solid var(--sd-border, #dfe2e7);border-radius:var(--sd-radius-10, 10px);box-shadow:none}:host ::ng-deep sd-quick-action .c-quick-action.contained .c-quick-action-action{flex:0 0 auto!important}@media(max-width:600px){:host ::ng-deep sd-quick-action .c-quick-action.contained{flex-wrap:wrap;gap:8px}:host ::ng-deep sd-quick-action .c-quick-action.contained .c-quick-action-action{flex:1 1 100%!important}.sd-selection-actions{width:100%;gap:6px}.sd-selection-message{padding-right:36px}.sd-selection-actions sd-button{flex:1 1 auto}:host ::ng-deep .sd-selection-actions sd-button button{width:100%;min-height:40px}.sd-selection-clear{position:absolute;top:4px;right:8px;width:40px;flex-basis:40px;height:40px}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "component", type: SdButtonItemDivider, selector: "sd-button-item-divider", inputs: ["title"] }, { kind: "component", type: SdQuickAction, selector: "sd-quick-action", inputs: ["opened", "contained"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2219
2303
|
}
|
|
2220
2304
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SelectorActionComponent, decorators: [{
|
|
2221
2305
|
type: Component,
|
|
2222
|
-
args: [{ selector: 'selector-action', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdIcon, SdButton, SdButtonItem, SdButtonItemDivider, SdQuickAction], template: "@let _autoId = autoId();\n@let _moreLabel = moreLabel();\n@let _direct = directActions();\n@let _overflow = overflowActions();\n@if (opened()) {\n <sd-quick-action opened contained>\n <div class=\"sd-selection-message\" sdMessage role=\"status\">\n <span class=\"sd-selection-icon\" aria-hidden=\"true\"><sd-icon name=\"check_circle_outline\" /></span>\n <span>{{ message() }}</span>\n </div>\n <div class=\"sd-selection-actions\" sdAction>\n @for (entry of _direct; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon\"\n [color]=\"action.color\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\"\n (click)=\"onClickAction(action)\" />\n } @else {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon || 'more_horiz'\"\n [color]=\"action.color || 'secondary'\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\">\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n </sd-button>\n }\n }\n @if (_overflow.length) {\n <sd-button\n class=\"sd-selection-more\"\n size=\"sm\"\n suffixIcon=\"more_horiz\"\n [title]=\"_moreLabel\"\n color=\"secondary\"\n type=\"light\"\n [autoId]=\"_autoId ? _autoId + '-more-actions' : null\">\n @for (entry of _overflow; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n [tooltip]=\"action.tooltip\"\n (click)=\"onClickAction(action)\"\n >{{ action.title }}</sd-button-item\n >\n } @else {\n <sd-button-item-divider [title]=\"action.title\" />\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n }\n }\n </sd-button>\n }\n <button\n type=\"button\"\n class=\"sd-selection-clear\"\n [attr.aria-label]=\"clearLabel()\"\n [attr.data-autoid]=\"_autoId ? 'components-button-' + _autoId + '-clear-selection' : null\"\n (click)=\"onClear()\">\n <sd-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n </div>\n </sd-quick-action>\n}\n", styles: [":host{display:block;flex-shrink:0;min-width:0;padding-inline:8px;box-sizing:border-box}.sd-selection-message{display:flex;align-items:center;gap:8px;min-width:0;font-size:13px;line-height:20px}.sd-selection-message>span:last-child{overflow-wrap:anywhere}.sd-selection-icon{display:flex;align-items:center;justify-content:center;flex:0 0 28px;height:28px;border-radius:8px;background:var(--sd-success-light, #e8f5e9);color:var(--sd-success-dark, #2e7d32)}.sd-selection-icon sd-icon,.sd-selection-icon mat-icon{width:18px;height:18px;font-size:18px}.sd-selection-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.sd-selection-clear{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;height:32px;border:0;border-radius:8px;color:var(--sd-text-secondary, #62676d);background:transparent;cursor:pointer}.sd-selection-clear:hover{background:var(--sd-surface-variant, #eef0f3)}.sd-selection-clear:focus-visible{outline:2px solid var(--sd-
|
|
2306
|
+
args: [{ selector: 'selector-action', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdIcon, SdButton, SdButtonItem, SdButtonItemDivider, SdQuickAction], template: "@let _autoId = autoId();\n@let _moreLabel = moreLabel();\n@let _direct = directActions();\n@let _overflow = overflowActions();\n@if (opened()) {\n <sd-quick-action opened contained>\n <div class=\"sd-selection-message\" sdMessage role=\"status\">\n <span class=\"sd-selection-icon\" aria-hidden=\"true\"><sd-icon name=\"check_circle_outline\" /></span>\n <span>{{ message() }}</span>\n </div>\n <div class=\"sd-selection-actions\" sdAction>\n @for (entry of _direct; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon\"\n [color]=\"action.color\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\"\n (click)=\"onClickAction(action)\" />\n } @else {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon || 'more_horiz'\"\n [color]=\"action.color || 'secondary'\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\">\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n </sd-button>\n }\n }\n @if (_overflow.length) {\n <sd-button\n class=\"sd-selection-more\"\n size=\"sm\"\n suffixIcon=\"more_horiz\"\n [title]=\"_moreLabel\"\n color=\"secondary\"\n type=\"light\"\n [autoId]=\"_autoId ? _autoId + '-more-actions' : null\">\n @for (entry of _overflow; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n [tooltip]=\"action.tooltip\"\n (click)=\"onClickAction(action)\"\n >{{ action.title }}</sd-button-item\n >\n } @else {\n <sd-button-item-divider [title]=\"action.title\" />\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n }\n }\n </sd-button>\n }\n <button\n type=\"button\"\n class=\"sd-selection-clear\"\n [attr.aria-label]=\"clearLabel()\"\n [attr.data-autoid]=\"_autoId ? 'components-button-' + _autoId + '-clear-selection' : null\"\n (click)=\"onClear()\">\n <sd-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n </div>\n </sd-quick-action>\n}\n", styles: [":host{display:block;flex-shrink:0;min-width:0;padding-inline:8px;box-sizing:border-box}.sd-selection-message{display:flex;align-items:center;gap:8px;min-width:0;font-size:var(--sd-font-size-13, 13px);line-height:var(--sd-line-height-20, 20px)}.sd-selection-message>span:last-child{overflow-wrap:anywhere}.sd-selection-icon{display:flex;align-items:center;justify-content:center;flex:0 0 28px;height:28px;border-radius:var(--sd-radius-8, 8px);background:var(--sd-success-light, #e8f5e9);color:var(--sd-success-dark, #2e7d32)}.sd-selection-icon sd-icon,.sd-selection-icon mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px)}.sd-selection-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.sd-selection-clear{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;height:32px;border:0;border-radius:var(--sd-radius-8, 8px);color:var(--sd-text-secondary, #62676d);background:transparent;cursor:pointer}.sd-selection-clear:hover{background:var(--sd-surface-variant, #eef0f3)}.sd-selection-clear:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-selection-clear sd-icon,.sd-selection-clear mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px)}.sd-selection-menu-heading{padding:6px 12px 4px;color:var(--sd-text-secondary, #62676d);font-size:var(--sd-font-size-12, 12px);font-weight:var(--sd-font-weight-semibold, 600)}:host ::ng-deep sd-quick-action .c-quick-action.contained{flex-wrap:nowrap;gap:16px;padding:10px 12px;margin:8px 0;border:1px solid var(--sd-border, #dfe2e7);border-radius:var(--sd-radius-10, 10px);box-shadow:none}:host ::ng-deep sd-quick-action .c-quick-action.contained .c-quick-action-action{flex:0 0 auto!important}@media(max-width:600px){:host ::ng-deep sd-quick-action .c-quick-action.contained{flex-wrap:wrap;gap:8px}:host ::ng-deep sd-quick-action .c-quick-action.contained .c-quick-action-action{flex:1 1 100%!important}.sd-selection-actions{width:100%;gap:6px}.sd-selection-message{padding-right:36px}.sd-selection-actions sd-button{flex:1 1 auto}:host ::ng-deep .sd-selection-actions sd-button button{width:100%;min-height:40px}.sd-selection-clear{position:absolute;top:4px;right:8px;width:40px;flex-basis:40px;height:40px}}\n"] }]
|
|
2223
2307
|
}], propDecorators: { autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], tableOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableOption", required: false }] }], selectedTableItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedTableItems", required: false }] }], clear: [{ type: i0.Output, args: ["clear"] }] } });
|
|
2224
2308
|
|
|
2225
2309
|
const DEFAULT_TABLE_CONFIG = {
|
|
@@ -2549,7 +2633,7 @@ class ConfigComponent {
|
|
|
2549
2633
|
this.dragDisabled = true;
|
|
2550
2634
|
}
|
|
2551
2635
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2552
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ConfigComponent, isStandalone: true, selector: "config", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, tableOption: { classPropertyName: "tableOption", publicName: "tableOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changes: "changes" }, providers: [ConfigService], viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true, isSignal: true }, { propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }], ngImport: i0, template: "@let _configuration = configuration();\n@let _autoId = autoId();\n@let _columns = ['invisible', 'title', 'width', 'fixed', 'truncate'];\n\n<sd-modal width=\"sm\" [title]=\"'core.component.table.setup' | sdTranslate\" #modal>\n @if (_configuration) {\n <div class=\"c-container sd-table-config\">\n <!-- why: drag handle l\u00E0 affordance duy nh\u1EA5t cho vi\u1EC7c \u0111\u1ED5i th\u1EE9 t\u1EF1 c\u1ED9t, v\u00E0 n\u00F3 kh\u00F4ng t\u1EF1 n\u00F3i ra\n \u0111i\u1EC1u \u0111\u00F3 \u2014 m\u1ED9t d\u00F2ng hint tr\u00E1nh vi\u1EC7c ng\u01B0\u1EDDi d\u00F9ng kh\u00F4ng bao gi\u1EDD ph\u00E1t hi\u1EC7n t\u00EDnh n\u0103ng.\n K\u00FD hi\u1EC7u \u283F n\u1EB1m S\u1EB4N trong chu\u1ED7i i18n (\u0111\u00FAng v\u1ECB tr\u00ED trong c\u00E2u), n\u00EAn kh\u00F4ng k\u00E8m icon ri\u00EAng. -->\n <p class=\"c-hint\">{{ 'core.component.table.config.drag-hint' | sdTranslate }}</p>\n\n <div class=\"c-table\">\n <table\n mat-table\n [dataSource]=\"_configuration.columns!\"\n cdkDropList\n [cdkDropListData]=\"_configuration.columns\"\n (cdkDropListDropped)=\"dropTable($event)\">\n <ng-container matColumnDef=\"invisible\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.form-builder.display' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <div class=\"c-display-cell\">\n <button\n type=\"button\"\n class=\"c-handle\"\n [title]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n [attr.aria-label]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n (mousedown)=\"handleMouseDown()\"\n (mouseup)=\"handleMouseUp()\">\n <sd-icon name=\"drag_indicator\" aria-hidden=\"true\"></sd-icon>\n </button>\n <!-- why: \u00F4 \"Hi\u1EC3n th\u1ECB\" KH\u00D4NG bao gi\u1EDD b\u1ECB kho\u00E1 \u2014 n\u00F3 l\u00E0 \u0111\u01B0\u1EDDng duy nh\u1EA5t \u0111\u1EC3 b\u1EADt l\u1EA1i m\u1ED9t\n c\u1ED9t \u0111\u00E3 t\u1EAFt. -->\n <sd-checkbox [model]=\"!item.invisible\" (modelChange)=\"item.invisible = !item.invisible\" />\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.table.column-header' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.title\"\n [(model)]=\"item.title\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"width\">\n <th mat-header-cell class=\"c-th c-col-width\" *matHeaderCellDef>\n {{ 'core.component.table.width' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-width\" *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.width\"\n [(model)]=\"item.width\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"fixed\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.fixed' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.fixed\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"truncate\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.char-limit' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.truncate\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"_columns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: _columns\"\n [class.c-row-hidden]=\"isRowDisabled(row)\"\n cdkDrag\n [cdkDragData]=\"row\"\n cdkDragLockAxis=\"y\"\n [cdkDragDisabled]=\"dragDisabled\">\n </tr>\n </table>\n </div>\n </div>\n }\n <ng-container sdFooterRight>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-skip' : null\"\n (click)=\"close()\"\n [title]=\"'core.component.table.skip' | sdTranslate\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-reset' : null\"\n (click)=\"onReset()\"\n [title]=\"'core.component.form-builder.default' | sdTranslate\"\n color=\"primary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-apply' : null\"\n (click)=\"onSave()\"\n [title]=\"'core.component.table.apply' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </ng-container>\n</sd-modal>\n", styles: [".c-container{position:relative;min-height:200px}.c-hint{margin:0 0 12px;color:var(--sd-text-secondary, #6b7280);font-size:12px;line-height:18px}.c-table{position:relative;overflow:auto;max-height:60vh;border:1px solid var(--sd-border, rgba(0, 0, 0, .08));border-radius:8px}.c-table table{--mat-table-header-container-height: 40px;--mat-table-row-item-container-height: 48px;width:100%;background:transparent}.c-table .c-th{font-weight:500;font-size:13px;line-height:18px;color:var(--sd-text-secondary, #6b7280);background:var(--sd-surface, #f7f8fa);white-space:nowrap}.c-table .mat-mdc-header-cell,.c-table .mat-mdc-cell{padding:4px 12px;vertical-align:middle;border-bottom-color:var(--sd-border, rgba(0, 0, 0, .08))}.c-table .mat-mdc-header-cell:first-of-type,.c-table .mat-mdc-cell:first-of-type{padding-left:12px}.c-table .mat-mdc-row:last-of-type .mat-mdc-cell{border-bottom:none}.c-table .mat-mdc-row:hover .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .02))}.c-table .c-col-width{width:104px}.c-table .c-col-toggle{width:88px;text-align:center}sd-checkbox{display:inline-flex;align-items:center;vertical-align:middle}sd-checkbox ::ng-deep .mat-mdc-checkbox{display:flex}sd-checkbox ::ng-deep .mat-internal-form-field{margin:0}sd-checkbox ::ng-deep .mat-mdc-checkbox .mdc-label{padding:0}.c-display-cell{display:flex;align-items:center;gap:8px}.c-handle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:none;color:var(--sd-text-disabled, #b6bcc6);cursor:grab;transition:color .15s ease}.c-handle:hover,.c-handle:focus-visible{color:var(--sd-text-secondary, #6b7280);outline:none}.c-handle:active{cursor:grabbing}.c-row-hidden .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .015))}.c-row-hidden sd-input,.c-row-hidden .c-col-toggle sd-checkbox{opacity:.55}.cdk-drag-preview{display:table;border-radius:8px;background:var(--sd-surface, #fff);outline:1px solid var(--sd-primary, #2a66f4);box-shadow:0 12px 28px #00000029,0 2px 8px #00000014;opacity:.98}.cdk-drag-preview .mat-mdc-cell{border-bottom:none;padding:4px 12px;vertical-align:middle}.cdk-drag-preview .c-handle{color:var(--sd-primary, #2a66f4);cursor:grabbing}.cdk-drag-placeholder .mat-mdc-cell{background:var(--sd-primary-light, rgba(42, 102, 244, .06));border-bottom:none;box-shadow:inset 0 1px 0 var(--sd-primary, #2a66f4),inset 0 -1px 0 var(--sd-primary, #2a66f4)}.cdk-drag-placeholder .mat-mdc-cell>*{visibility:hidden}.cdk-drag-animating,.c-table.cdk-drop-list-dragging .mat-mdc-row:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(0,0,.2,1)}.c-table.cdk-drop-list-dragging .mat-mdc-row:hover .mat-mdc-cell{background:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: CdkTableModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "mask", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
|
|
2636
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ConfigComponent, isStandalone: true, selector: "config", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, tableOption: { classPropertyName: "tableOption", publicName: "tableOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changes: "changes" }, providers: [ConfigService], viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true, isSignal: true }, { propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }], ngImport: i0, template: "@let _configuration = configuration();\n@let _autoId = autoId();\n@let _columns = ['invisible', 'title', 'width', 'fixed', 'truncate'];\n\n<sd-modal width=\"sm\" [title]=\"'core.component.table.setup' | sdTranslate\" #modal>\n @if (_configuration) {\n <div class=\"c-container sd-table-config\">\n <!-- why: drag handle l\u00E0 affordance duy nh\u1EA5t cho vi\u1EC7c \u0111\u1ED5i th\u1EE9 t\u1EF1 c\u1ED9t, v\u00E0 n\u00F3 kh\u00F4ng t\u1EF1 n\u00F3i ra\n \u0111i\u1EC1u \u0111\u00F3 \u2014 m\u1ED9t d\u00F2ng hint tr\u00E1nh vi\u1EC7c ng\u01B0\u1EDDi d\u00F9ng kh\u00F4ng bao gi\u1EDD ph\u00E1t hi\u1EC7n t\u00EDnh n\u0103ng.\n K\u00FD hi\u1EC7u \u283F n\u1EB1m S\u1EB4N trong chu\u1ED7i i18n (\u0111\u00FAng v\u1ECB tr\u00ED trong c\u00E2u), n\u00EAn kh\u00F4ng k\u00E8m icon ri\u00EAng. -->\n <p class=\"c-hint\">{{ 'core.component.table.config.drag-hint' | sdTranslate }}</p>\n\n <div class=\"c-table\">\n <table\n mat-table\n [dataSource]=\"_configuration.columns!\"\n cdkDropList\n [cdkDropListData]=\"_configuration.columns\"\n (cdkDropListDropped)=\"dropTable($event)\">\n <ng-container matColumnDef=\"invisible\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.form-builder.display' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <div class=\"c-display-cell\">\n <button\n type=\"button\"\n class=\"c-handle\"\n [title]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n [attr.aria-label]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n (mousedown)=\"handleMouseDown()\"\n (mouseup)=\"handleMouseUp()\">\n <sd-icon name=\"drag_indicator\" aria-hidden=\"true\"></sd-icon>\n </button>\n <!-- why: \u00F4 \"Hi\u1EC3n th\u1ECB\" KH\u00D4NG bao gi\u1EDD b\u1ECB kho\u00E1 \u2014 n\u00F3 l\u00E0 \u0111\u01B0\u1EDDng duy nh\u1EA5t \u0111\u1EC3 b\u1EADt l\u1EA1i m\u1ED9t\n c\u1ED9t \u0111\u00E3 t\u1EAFt. -->\n <sd-checkbox [model]=\"!item.invisible\" (modelChange)=\"item.invisible = !item.invisible\" />\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.table.column-header' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.title\"\n [(model)]=\"item.title\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"width\">\n <th mat-header-cell class=\"c-th c-col-width\" *matHeaderCellDef>\n {{ 'core.component.table.width' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-width\" *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.width\"\n [(model)]=\"item.width\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"fixed\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.fixed' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.fixed\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"truncate\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.char-limit' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.truncate\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"_columns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: _columns\"\n [class.c-row-hidden]=\"isRowDisabled(row)\"\n cdkDrag\n [cdkDragData]=\"row\"\n cdkDragLockAxis=\"y\"\n [cdkDragDisabled]=\"dragDisabled\">\n </tr>\n </table>\n </div>\n </div>\n }\n <ng-container sdFooterRight>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-skip' : null\"\n (click)=\"close()\"\n [title]=\"'core.component.table.skip' | sdTranslate\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-reset' : null\"\n (click)=\"onReset()\"\n [title]=\"'core.component.form-builder.default' | sdTranslate\"\n color=\"primary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-apply' : null\"\n (click)=\"onSave()\"\n [title]=\"'core.component.table.apply' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </ng-container>\n</sd-modal>\n", styles: [".c-container{position:relative;min-height:200px}.c-hint{margin:0 0 12px;color:var(--sd-text-secondary, #6b7280);font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px)}.c-table{position:relative;overflow:auto;max-height:60vh;border:1px solid var(--sd-border, rgba(0, 0, 0, .08));border-radius:var(--sd-radius-8, 8px)}.c-table table{--mat-table-header-container-height: 40px;--mat-table-row-item-container-height: 48px;width:100%;background:transparent}.c-table .c-th{font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-13, 13px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #6b7280);background:var(--sd-surface, #f7f8fa);white-space:nowrap}.c-table .mat-mdc-header-cell,.c-table .mat-mdc-cell{padding:4px 12px;vertical-align:middle;border-bottom-color:var(--sd-border, rgba(0, 0, 0, .08))}.c-table .mat-mdc-header-cell:first-of-type,.c-table .mat-mdc-cell:first-of-type{padding-left:12px}.c-table .mat-mdc-row:last-of-type .mat-mdc-cell{border-bottom:none}.c-table .mat-mdc-row:hover .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .02))}.c-table .c-col-width{width:104px}.c-table .c-col-toggle{width:88px;text-align:center}sd-checkbox{display:inline-flex;align-items:center;vertical-align:middle}sd-checkbox ::ng-deep .mat-mdc-checkbox{display:flex}sd-checkbox ::ng-deep .mat-internal-form-field{margin:0}sd-checkbox ::ng-deep .mat-mdc-checkbox .mdc-label{padding:0}.c-display-cell{display:flex;align-items:center;gap:8px}.c-handle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:none;color:var(--sd-text-disabled, #b6bcc6);cursor:grab;transition:color .15s ease}.c-handle:hover,.c-handle:focus-visible{color:var(--sd-text-secondary, #6b7280);outline:none}.c-handle:active{cursor:grabbing}.c-row-hidden .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .015))}.c-row-hidden sd-input,.c-row-hidden .c-col-toggle sd-checkbox{opacity:.55}.cdk-drag-preview{display:table;border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface, #fff);outline:1px solid var(--sd-primary, #2a66f4);box-shadow:0 12px 28px #00000029,0 2px 8px #00000014;opacity:.98}.cdk-drag-preview .mat-mdc-cell{border-bottom:none;padding:4px 12px;vertical-align:middle}.cdk-drag-preview .c-handle{color:var(--sd-primary, #2a66f4);cursor:grabbing}.cdk-drag-placeholder .mat-mdc-cell{background:var(--sd-primary-light, rgba(42, 102, 244, .06));border-bottom:none;box-shadow:inset 0 1px 0 var(--sd-primary, #2a66f4),inset 0 -1px 0 var(--sd-primary, #2a66f4)}.cdk-drag-placeholder .mat-mdc-cell>*{visibility:hidden}.cdk-drag-animating,.c-table.cdk-drop-list-dragging .mat-mdc-row:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(0,0,.2,1)}.c-table.cdk-drop-list-dragging .mat-mdc-row:hover .mat-mdc-cell{background:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: CdkTableModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
|
|
2553
2637
|
}
|
|
2554
2638
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfigComponent, decorators: [{
|
|
2555
2639
|
type: Component,
|
|
@@ -2565,7 +2649,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2565
2649
|
SdInput,
|
|
2566
2650
|
SdModal,
|
|
2567
2651
|
SdTranslatePipe,
|
|
2568
|
-
], providers: [ConfigService], template: "@let _configuration = configuration();\n@let _autoId = autoId();\n@let _columns = ['invisible', 'title', 'width', 'fixed', 'truncate'];\n\n<sd-modal width=\"sm\" [title]=\"'core.component.table.setup' | sdTranslate\" #modal>\n @if (_configuration) {\n <div class=\"c-container sd-table-config\">\n <!-- why: drag handle l\u00E0 affordance duy nh\u1EA5t cho vi\u1EC7c \u0111\u1ED5i th\u1EE9 t\u1EF1 c\u1ED9t, v\u00E0 n\u00F3 kh\u00F4ng t\u1EF1 n\u00F3i ra\n \u0111i\u1EC1u \u0111\u00F3 \u2014 m\u1ED9t d\u00F2ng hint tr\u00E1nh vi\u1EC7c ng\u01B0\u1EDDi d\u00F9ng kh\u00F4ng bao gi\u1EDD ph\u00E1t hi\u1EC7n t\u00EDnh n\u0103ng.\n K\u00FD hi\u1EC7u \u283F n\u1EB1m S\u1EB4N trong chu\u1ED7i i18n (\u0111\u00FAng v\u1ECB tr\u00ED trong c\u00E2u), n\u00EAn kh\u00F4ng k\u00E8m icon ri\u00EAng. -->\n <p class=\"c-hint\">{{ 'core.component.table.config.drag-hint' | sdTranslate }}</p>\n\n <div class=\"c-table\">\n <table\n mat-table\n [dataSource]=\"_configuration.columns!\"\n cdkDropList\n [cdkDropListData]=\"_configuration.columns\"\n (cdkDropListDropped)=\"dropTable($event)\">\n <ng-container matColumnDef=\"invisible\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.form-builder.display' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <div class=\"c-display-cell\">\n <button\n type=\"button\"\n class=\"c-handle\"\n [title]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n [attr.aria-label]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n (mousedown)=\"handleMouseDown()\"\n (mouseup)=\"handleMouseUp()\">\n <sd-icon name=\"drag_indicator\" aria-hidden=\"true\"></sd-icon>\n </button>\n <!-- why: \u00F4 \"Hi\u1EC3n th\u1ECB\" KH\u00D4NG bao gi\u1EDD b\u1ECB kho\u00E1 \u2014 n\u00F3 l\u00E0 \u0111\u01B0\u1EDDng duy nh\u1EA5t \u0111\u1EC3 b\u1EADt l\u1EA1i m\u1ED9t\n c\u1ED9t \u0111\u00E3 t\u1EAFt. -->\n <sd-checkbox [model]=\"!item.invisible\" (modelChange)=\"item.invisible = !item.invisible\" />\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.table.column-header' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.title\"\n [(model)]=\"item.title\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"width\">\n <th mat-header-cell class=\"c-th c-col-width\" *matHeaderCellDef>\n {{ 'core.component.table.width' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-width\" *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.width\"\n [(model)]=\"item.width\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"fixed\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.fixed' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.fixed\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"truncate\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.char-limit' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.truncate\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"_columns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: _columns\"\n [class.c-row-hidden]=\"isRowDisabled(row)\"\n cdkDrag\n [cdkDragData]=\"row\"\n cdkDragLockAxis=\"y\"\n [cdkDragDisabled]=\"dragDisabled\">\n </tr>\n </table>\n </div>\n </div>\n }\n <ng-container sdFooterRight>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-skip' : null\"\n (click)=\"close()\"\n [title]=\"'core.component.table.skip' | sdTranslate\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-reset' : null\"\n (click)=\"onReset()\"\n [title]=\"'core.component.form-builder.default' | sdTranslate\"\n color=\"primary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-apply' : null\"\n (click)=\"onSave()\"\n [title]=\"'core.component.table.apply' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </ng-container>\n</sd-modal>\n", styles: [".c-container{position:relative;min-height:200px}.c-hint{margin:0 0 12px;color:var(--sd-text-secondary, #6b7280);font-size:12px;line-height:18px}.c-table{position:relative;overflow:auto;max-height:60vh;border:1px solid var(--sd-border, rgba(0, 0, 0, .08));border-radius:8px}.c-table table{--mat-table-header-container-height: 40px;--mat-table-row-item-container-height: 48px;width:100%;background:transparent}.c-table .c-th{font-weight:500;font-size:13px;line-height:18px;color:var(--sd-text-secondary, #6b7280);background:var(--sd-surface, #f7f8fa);white-space:nowrap}.c-table .mat-mdc-header-cell,.c-table .mat-mdc-cell{padding:4px 12px;vertical-align:middle;border-bottom-color:var(--sd-border, rgba(0, 0, 0, .08))}.c-table .mat-mdc-header-cell:first-of-type,.c-table .mat-mdc-cell:first-of-type{padding-left:12px}.c-table .mat-mdc-row:last-of-type .mat-mdc-cell{border-bottom:none}.c-table .mat-mdc-row:hover .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .02))}.c-table .c-col-width{width:104px}.c-table .c-col-toggle{width:88px;text-align:center}sd-checkbox{display:inline-flex;align-items:center;vertical-align:middle}sd-checkbox ::ng-deep .mat-mdc-checkbox{display:flex}sd-checkbox ::ng-deep .mat-internal-form-field{margin:0}sd-checkbox ::ng-deep .mat-mdc-checkbox .mdc-label{padding:0}.c-display-cell{display:flex;align-items:center;gap:8px}.c-handle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:none;color:var(--sd-text-disabled, #b6bcc6);cursor:grab;transition:color .15s ease}.c-handle:hover,.c-handle:focus-visible{color:var(--sd-text-secondary, #6b7280);outline:none}.c-handle:active{cursor:grabbing}.c-row-hidden .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .015))}.c-row-hidden sd-input,.c-row-hidden .c-col-toggle sd-checkbox{opacity:.55}.cdk-drag-preview{display:table;border-radius:8px;background:var(--sd-surface, #fff);outline:1px solid var(--sd-primary, #2a66f4);box-shadow:0 12px 28px #00000029,0 2px 8px #00000014;opacity:.98}.cdk-drag-preview .mat-mdc-cell{border-bottom:none;padding:4px 12px;vertical-align:middle}.cdk-drag-preview .c-handle{color:var(--sd-primary, #2a66f4);cursor:grabbing}.cdk-drag-placeholder .mat-mdc-cell{background:var(--sd-primary-light, rgba(42, 102, 244, .06));border-bottom:none;box-shadow:inset 0 1px 0 var(--sd-primary, #2a66f4),inset 0 -1px 0 var(--sd-primary, #2a66f4)}.cdk-drag-placeholder .mat-mdc-cell>*{visibility:hidden}.cdk-drag-animating,.c-table.cdk-drop-list-dragging .mat-mdc-row:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(0,0,.2,1)}.c-table.cdk-drop-list-dragging .mat-mdc-row:hover .mat-mdc-cell{background:transparent}\n"] }]
|
|
2652
|
+
], providers: [ConfigService], template: "@let _configuration = configuration();\n@let _autoId = autoId();\n@let _columns = ['invisible', 'title', 'width', 'fixed', 'truncate'];\n\n<sd-modal width=\"sm\" [title]=\"'core.component.table.setup' | sdTranslate\" #modal>\n @if (_configuration) {\n <div class=\"c-container sd-table-config\">\n <!-- why: drag handle l\u00E0 affordance duy nh\u1EA5t cho vi\u1EC7c \u0111\u1ED5i th\u1EE9 t\u1EF1 c\u1ED9t, v\u00E0 n\u00F3 kh\u00F4ng t\u1EF1 n\u00F3i ra\n \u0111i\u1EC1u \u0111\u00F3 \u2014 m\u1ED9t d\u00F2ng hint tr\u00E1nh vi\u1EC7c ng\u01B0\u1EDDi d\u00F9ng kh\u00F4ng bao gi\u1EDD ph\u00E1t hi\u1EC7n t\u00EDnh n\u0103ng.\n K\u00FD hi\u1EC7u \u283F n\u1EB1m S\u1EB4N trong chu\u1ED7i i18n (\u0111\u00FAng v\u1ECB tr\u00ED trong c\u00E2u), n\u00EAn kh\u00F4ng k\u00E8m icon ri\u00EAng. -->\n <p class=\"c-hint\">{{ 'core.component.table.config.drag-hint' | sdTranslate }}</p>\n\n <div class=\"c-table\">\n <table\n mat-table\n [dataSource]=\"_configuration.columns!\"\n cdkDropList\n [cdkDropListData]=\"_configuration.columns\"\n (cdkDropListDropped)=\"dropTable($event)\">\n <ng-container matColumnDef=\"invisible\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.form-builder.display' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <div class=\"c-display-cell\">\n <button\n type=\"button\"\n class=\"c-handle\"\n [title]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n [attr.aria-label]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n (mousedown)=\"handleMouseDown()\"\n (mouseup)=\"handleMouseUp()\">\n <sd-icon name=\"drag_indicator\" aria-hidden=\"true\"></sd-icon>\n </button>\n <!-- why: \u00F4 \"Hi\u1EC3n th\u1ECB\" KH\u00D4NG bao gi\u1EDD b\u1ECB kho\u00E1 \u2014 n\u00F3 l\u00E0 \u0111\u01B0\u1EDDng duy nh\u1EA5t \u0111\u1EC3 b\u1EADt l\u1EA1i m\u1ED9t\n c\u1ED9t \u0111\u00E3 t\u1EAFt. -->\n <sd-checkbox [model]=\"!item.invisible\" (modelChange)=\"item.invisible = !item.invisible\" />\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.table.column-header' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.title\"\n [(model)]=\"item.title\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"width\">\n <th mat-header-cell class=\"c-th c-col-width\" *matHeaderCellDef>\n {{ 'core.component.table.width' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-width\" *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.width\"\n [(model)]=\"item.width\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"fixed\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.fixed' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.fixed\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"truncate\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.char-limit' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.truncate\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"_columns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: _columns\"\n [class.c-row-hidden]=\"isRowDisabled(row)\"\n cdkDrag\n [cdkDragData]=\"row\"\n cdkDragLockAxis=\"y\"\n [cdkDragDisabled]=\"dragDisabled\">\n </tr>\n </table>\n </div>\n </div>\n }\n <ng-container sdFooterRight>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-skip' : null\"\n (click)=\"close()\"\n [title]=\"'core.component.table.skip' | sdTranslate\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-reset' : null\"\n (click)=\"onReset()\"\n [title]=\"'core.component.form-builder.default' | sdTranslate\"\n color=\"primary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-apply' : null\"\n (click)=\"onSave()\"\n [title]=\"'core.component.table.apply' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </ng-container>\n</sd-modal>\n", styles: [".c-container{position:relative;min-height:200px}.c-hint{margin:0 0 12px;color:var(--sd-text-secondary, #6b7280);font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px)}.c-table{position:relative;overflow:auto;max-height:60vh;border:1px solid var(--sd-border, rgba(0, 0, 0, .08));border-radius:var(--sd-radius-8, 8px)}.c-table table{--mat-table-header-container-height: 40px;--mat-table-row-item-container-height: 48px;width:100%;background:transparent}.c-table .c-th{font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-13, 13px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #6b7280);background:var(--sd-surface, #f7f8fa);white-space:nowrap}.c-table .mat-mdc-header-cell,.c-table .mat-mdc-cell{padding:4px 12px;vertical-align:middle;border-bottom-color:var(--sd-border, rgba(0, 0, 0, .08))}.c-table .mat-mdc-header-cell:first-of-type,.c-table .mat-mdc-cell:first-of-type{padding-left:12px}.c-table .mat-mdc-row:last-of-type .mat-mdc-cell{border-bottom:none}.c-table .mat-mdc-row:hover .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .02))}.c-table .c-col-width{width:104px}.c-table .c-col-toggle{width:88px;text-align:center}sd-checkbox{display:inline-flex;align-items:center;vertical-align:middle}sd-checkbox ::ng-deep .mat-mdc-checkbox{display:flex}sd-checkbox ::ng-deep .mat-internal-form-field{margin:0}sd-checkbox ::ng-deep .mat-mdc-checkbox .mdc-label{padding:0}.c-display-cell{display:flex;align-items:center;gap:8px}.c-handle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:none;color:var(--sd-text-disabled, #b6bcc6);cursor:grab;transition:color .15s ease}.c-handle:hover,.c-handle:focus-visible{color:var(--sd-text-secondary, #6b7280);outline:none}.c-handle:active{cursor:grabbing}.c-row-hidden .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .015))}.c-row-hidden sd-input,.c-row-hidden .c-col-toggle sd-checkbox{opacity:.55}.cdk-drag-preview{display:table;border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface, #fff);outline:1px solid var(--sd-primary, #2a66f4);box-shadow:0 12px 28px #00000029,0 2px 8px #00000014;opacity:.98}.cdk-drag-preview .mat-mdc-cell{border-bottom:none;padding:4px 12px;vertical-align:middle}.cdk-drag-preview .c-handle{color:var(--sd-primary, #2a66f4);cursor:grabbing}.cdk-drag-placeholder .mat-mdc-cell{background:var(--sd-primary-light, rgba(42, 102, 244, .06));border-bottom:none;box-shadow:inset 0 1px 0 var(--sd-primary, #2a66f4),inset 0 -1px 0 var(--sd-primary, #2a66f4)}.cdk-drag-placeholder .mat-mdc-cell>*{visibility:hidden}.cdk-drag-animating,.c-table.cdk-drop-list-dragging .mat-mdc-row:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(0,0,.2,1)}.c-table.cdk-drop-list-dragging .mat-mdc-row:hover .mat-mdc-cell{background:transparent}\n"] }]
|
|
2569
2653
|
}], ctorParameters: () => [], propDecorators: { autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], tableOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableOption", required: false }] }], changes: [{ type: i0.Output, args: ["changes"] }], modal: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdModal), { isSignal: true }] }], table: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatTable), { isSignal: true }] }] } });
|
|
2570
2654
|
|
|
2571
2655
|
class ToStringPipe {
|
|
@@ -2631,11 +2715,11 @@ class ViewComponent {
|
|
|
2631
2715
|
this.item().meta.display[this.column().field]?.click?.();
|
|
2632
2716
|
};
|
|
2633
2717
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2634
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ViewComponent, isStandalone: true, selector: "view", inputs: { autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: true, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [sdTooltip]=\"view.tooltip || ''\"\n (click)=\"!!view.click && view.click()\">\n </sd-badge>\n }\n } @else {\n @if (view.click) {\n <div\n #contentContainer\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_truncateEnable\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n <a [attr.data-autoId]=\"_autoId\" href=\"javascript:;\" (click)=\"view.click()\">\n {{ view.data }}\n </a>\n </div>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_isCollapsed\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n {{ view.data }}\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div [attr.data-autoId]=\"_autoId\" class=\"text-break\" [style]=\"view.cellStyle\" [sdTooltip]=\"view.tooltip || ''\">\n {{ view.data }}\n </div>\n }\n <!-- End -->\n }\n }\n }\n}\n", styles: [".c-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:12px;cursor:pointer;outline:none}.c-collapse:focus-visible{outline:2px solid var(--sd-
|
|
2718
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ViewComponent, isStandalone: true, selector: "view", inputs: { autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: true, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [sdTooltip]=\"view.tooltip || ''\"\n (click)=\"!!view.click && view.click()\">\n </sd-badge>\n }\n } @else {\n @if (view.click) {\n <div\n #contentContainer\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_truncateEnable\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n <a [attr.data-autoId]=\"_autoId\" href=\"javascript:;\" (click)=\"view.click()\">\n {{ view.data }}\n </a>\n </div>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_isCollapsed\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n {{ view.data }}\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div [attr.data-autoId]=\"_autoId\" class=\"text-break\" [style]=\"view.cellStyle\" [sdTooltip]=\"view.tooltip || ''\">\n {{ view.data }}\n </div>\n }\n <!-- End -->\n }\n }\n }\n}\n", styles: [".c-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:var(--sd-font-size-12, 12px);cursor:pointer;outline:none}.c-collapse:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host [role=button]:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "description", "tooltip", "icon", "size"], outputs: ["click"] }, { kind: "directive", type: SdTooltipDirective, selector: "[sdTooltip]", inputs: ["sdTooltip", "sdTooltipPosition", "sdTooltipDelay", "sdTooltipColor"] }, { kind: "pipe", type: SdSafeHtmlPipe, name: "sdSafeHtml" }, { kind: "pipe", type: ToStringPipe, name: "asString" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2635
2719
|
}
|
|
2636
2720
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ViewComponent, decorators: [{
|
|
2637
2721
|
type: Component,
|
|
2638
|
-
args: [{ selector: 'view', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdBadge, SdSafeHtmlPipe, SdTooltipDirective, ToStringPipe, SdTranslatePipe], template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [sdTooltip]=\"view.tooltip || ''\"\n (click)=\"!!view.click && view.click()\">\n </sd-badge>\n }\n } @else {\n @if (view.click) {\n <div\n #contentContainer\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_truncateEnable\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n <a [attr.data-autoId]=\"_autoId\" href=\"javascript:;\" (click)=\"view.click()\">\n {{ view.data }}\n </a>\n </div>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_isCollapsed\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n {{ view.data }}\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div [attr.data-autoId]=\"_autoId\" class=\"text-break\" [style]=\"view.cellStyle\" [sdTooltip]=\"view.tooltip || ''\">\n {{ view.data }}\n </div>\n }\n <!-- End -->\n }\n }\n }\n}\n", styles: [".c-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:12px;cursor:pointer;outline:none}.c-collapse:focus-visible{outline:2px solid var(--sd-
|
|
2722
|
+
args: [{ selector: 'view', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdBadge, SdSafeHtmlPipe, SdTooltipDirective, ToStringPipe, SdTranslatePipe], template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [sdTooltip]=\"view.tooltip || ''\"\n (click)=\"!!view.click && view.click()\">\n </sd-badge>\n }\n } @else {\n @if (view.click) {\n <div\n #contentContainer\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_truncateEnable\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n <a [attr.data-autoId]=\"_autoId\" href=\"javascript:;\" (click)=\"view.click()\">\n {{ view.data }}\n </a>\n </div>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_isCollapsed\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n {{ view.data }}\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div [attr.data-autoId]=\"_autoId\" class=\"text-break\" [style]=\"view.cellStyle\" [sdTooltip]=\"view.tooltip || ''\">\n {{ view.data }}\n </div>\n }\n <!-- End -->\n }\n }\n }\n}\n", styles: [".c-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:var(--sd-font-size-12, 12px);cursor:pointer;outline:none}.c-collapse:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host [role=button]:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}\n"] }]
|
|
2639
2723
|
}], ctorParameters: () => [], propDecorators: { contentContainer: [{ type: i0.ViewChild, args: ['contentContainer', { isSignal: true }] }], autoId: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: true }] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }] } });
|
|
2640
2724
|
|
|
2641
2725
|
class DesktopCellComponent {
|
|
@@ -2648,7 +2732,7 @@ class DesktopCellComponent {
|
|
|
2648
2732
|
item = input.required(...(ngDevMode ? [{ debugName: "item" }] : []));
|
|
2649
2733
|
cellDef = input.required(...(ngDevMode ? [{ debugName: "cellDef" }] : [{}]));
|
|
2650
2734
|
value = computed(() => {
|
|
2651
|
-
return
|
|
2735
|
+
return resolveFieldValue(this.item()?.data, this.column()?.field);
|
|
2652
2736
|
}, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
2653
2737
|
key = computed(() => {
|
|
2654
2738
|
const data = this.item()?.data;
|
|
@@ -2697,11 +2781,11 @@ class DesktopCellComponent {
|
|
|
2697
2781
|
});
|
|
2698
2782
|
};
|
|
2699
2783
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DesktopCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2700
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DesktopCellComponent, isStandalone: true, selector: "desktop-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, cellDef: { classPropertyName: "cellDef", publicName: "cellDef", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@let _templateRef = templateRef();\n@let context =\n {\n item: _item.data,\n column: _column,\n autoId: _autoId,\n };\n\n@if (_templateRef) {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"isCollapsed()\"\n [sdTooltip]=\"isExpandByTooltip ? htmlTooltip : ''\">\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"tooltip\" -->\n <ng-template #htmlTooltip>\n <div\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n </div>\n </ng-template>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">\n {{ isCollapsed() ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}\n </button>\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n }\n} @else {\n <view [column]=\"column()\" [item]=\"item()\" [autoId]=\"context.autoId\" />\n}\n", styles: [".c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:12px;cursor:pointer;outline:none}.c-collapse:focus-visible{outline:2px solid var(--sd-
|
|
2784
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DesktopCellComponent, isStandalone: true, selector: "desktop-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, cellDef: { classPropertyName: "cellDef", publicName: "cellDef", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@let _templateRef = templateRef();\n@let context =\n {\n item: _item.data,\n column: _column,\n autoId: _autoId,\n };\n\n@if (_templateRef) {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"isCollapsed()\"\n [sdTooltip]=\"isExpandByTooltip ? htmlTooltip : ''\">\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"tooltip\" -->\n <ng-template #htmlTooltip>\n <div\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n </div>\n </ng-template>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">\n {{ isCollapsed() ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}\n </button>\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n }\n} @else {\n <view [column]=\"column()\" [item]=\"item()\" [autoId]=\"context.autoId\" />\n}\n", styles: [".c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:var(--sd-font-size-12, 12px);cursor:pointer;outline:none}.c-collapse:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SdTooltipDirective, selector: "[sdTooltip]", inputs: ["sdTooltip", "sdTooltipPosition", "sdTooltipDelay", "sdTooltipColor"] }, { kind: "component", type: ViewComponent, selector: "view", inputs: ["autoId", "column", "item"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2701
2785
|
}
|
|
2702
2786
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DesktopCellComponent, decorators: [{
|
|
2703
2787
|
type: Component,
|
|
2704
|
-
args: [{ selector: 'desktop-cell', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdTooltipDirective, ViewComponent, SdTranslatePipe], template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@let _templateRef = templateRef();\n@let context =\n {\n item: _item.data,\n column: _column,\n autoId: _autoId,\n };\n\n@if (_templateRef) {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"isCollapsed()\"\n [sdTooltip]=\"isExpandByTooltip ? htmlTooltip : ''\">\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"tooltip\" -->\n <ng-template #htmlTooltip>\n <div\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n </div>\n </ng-template>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">\n {{ isCollapsed() ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}\n </button>\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n }\n} @else {\n <view [column]=\"column()\" [item]=\"item()\" [autoId]=\"context.autoId\" />\n}\n", styles: [".c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:12px;cursor:pointer;outline:none}.c-collapse:focus-visible{outline:2px solid var(--sd-
|
|
2788
|
+
args: [{ selector: 'desktop-cell', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdTooltipDirective, ViewComponent, SdTranslatePipe], template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@let _templateRef = templateRef();\n@let context =\n {\n item: _item.data,\n column: _column,\n autoId: _autoId,\n };\n\n@if (_templateRef) {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"isCollapsed()\"\n [sdTooltip]=\"isExpandByTooltip ? htmlTooltip : ''\">\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"tooltip\" -->\n <ng-template #htmlTooltip>\n <div\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n </div>\n </ng-template>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">\n {{ isCollapsed() ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}\n </button>\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: context\" />\n }\n} @else {\n <view [column]=\"column()\" [item]=\"item()\" [autoId]=\"context.autoId\" />\n}\n", styles: [".c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:var(--sd-font-size-12, 12px);cursor:pointer;outline:none}.c-collapse:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}\n"] }]
|
|
2705
2789
|
}], ctorParameters: () => [], propDecorators: { contentContainer: [{ type: i0.ViewChild, args: ['contentContainer', { isSignal: true }] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], cellDef: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellDef", required: true }] }] } });
|
|
2706
2790
|
|
|
2707
2791
|
class DesktopCommand {
|
|
@@ -2721,13 +2805,13 @@ class DesktopCommand {
|
|
|
2721
2805
|
}, ...(ngDevMode ? [{ debugName: "autoId" }] : []));
|
|
2722
2806
|
_commands = computed(() => this.commands() || [], ...(ngDevMode ? [{ debugName: "_commands" }] : []));
|
|
2723
2807
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DesktopCommand, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2724
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DesktopCommand, isStandalone: true, selector: "desktop-command", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, itemIndex: { classPropertyName: "itemIndex", publicName: "itemIndex", isSignal: true, isRequired: true, transformFunction: null }, commands: { classPropertyName: "commands", publicName: "commands", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-autoid": "autoId()" } }, ngImport: i0, template: "@let _autoId = autoId();\n@let _item = item();\n@let filteredCommands = _item | filter: _commands() | async;\n\n@if (filteredCommands?.length) {\n @for (command of filteredCommands; track command.key) {\n @let _meta = _item | command: command;\n @if (command.type === 'normal') {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u0111\u00E2y l\u00E0 <button> TH\u1EACT, v\u1EABn nh\u1EADn tab focus nh\u01B0ng screen reader\n kh\u00F4ng \u0111\u1ECDc \u0111\u01B0\u1EE3c g\u00EC (n\u00FAt ch\u1EC9 c\u00F3 icon, kh\u00F4ng c\u00F3 text). Thay b\u1EB1ng aria-label l\u1EA5y t\u1EEB ch\u00EDnh\n ti\u00EAu \u0111\u1EC1 command \u0111ang hi\u1EC3n th\u1ECB \u1EDF tooltip. -->\n <button\n type=\"button\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n (click)=\"command.click(_item.data)\"\n [matTooltip]=\"_meta.title\"\n [attr.aria-label]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n mat-icon-button>\n <sd-icon class=\"c-icon\" [color]=\"command.color || 'secondary'\" [fontSet]=\"command.fontSet\" [name]=\"_meta.icon\"></sd-icon>\n </button>\n } @else {\n <sd-button\n class=\"sd-command-trigger\"\n type=\"text\"\n size=\"sm\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n [tooltip]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n [prefixIcon]=\"_meta.icon || 'more_vert'\"\n [fontSet]=\"command.fontSet\">\n @for (childCommand of command.children; track childCommand.key) {\n @let _childMeta = _item | command: childCommand;\n <sd-button-item\n [autoId]=\"_autoId + '-' + command.key + '-' + childCommand.key\"\n [disabled]=\"_childMeta.disabled\"\n [color]=\"childCommand.color\"\n [prefixIcon]=\"_childMeta.htmlTemplate ? null : _childMeta.icon\"\n [fontSet]=\"childCommand.fontSet\"\n (click)=\"childCommand.click(item().data)\">\n @if (_childMeta.htmlTemplate) {\n <span [innerHTML]=\"_childMeta.htmlTemplate\"></span>\n } @else {\n {{ _childMeta.title }}\n }\n </sd-button-item>\n }\n </sd-button>\n }\n }\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}:host{display:flex;align-items:center}button[mat-icon-button]{width:24px;height:24px;line-height:24px;padding:0}:host ::ng-deep button[mat-icon-button] .mat-mdc-button-touch-target{width:100%;height:100%}sd-icon.c-icon{color:var(--sd-text-secondary)!important;width:16px;height:16px;font-size:16px;line-height:16px}button[mat-icon-button]:disabled sd-icon.c-icon{color:inherit!important}:host ::ng-deep .sd-command-trigger button.c-button{height:24px;width:24px;padding:0!important;max-width:24px}:host ::ng-deep .sd-command-trigger button.c-button .c-button-content-wrapper{gap:0}:host ::ng-deep .sd-command-trigger button.c-button .mat-mdc-button-touch-target{width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: CommandPipe, name: "command" }, { kind: "pipe", type: CommandFilterPipe, name: "filter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2808
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DesktopCommand, isStandalone: true, selector: "desktop-command", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, itemIndex: { classPropertyName: "itemIndex", publicName: "itemIndex", isSignal: true, isRequired: true, transformFunction: null }, commands: { classPropertyName: "commands", publicName: "commands", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-autoid": "autoId()" } }, ngImport: i0, template: "@let _autoId = autoId();\n@let _item = item();\n@let filteredCommands = _item | filter: _commands() | async;\n\n@if (filteredCommands?.length) {\n @for (command of filteredCommands; track command.key) {\n @let _meta = _item | command: command;\n @if (command.type === 'normal') {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u0111\u00E2y l\u00E0 <button> TH\u1EACT, v\u1EABn nh\u1EADn tab focus nh\u01B0ng screen reader\n kh\u00F4ng \u0111\u1ECDc \u0111\u01B0\u1EE3c g\u00EC (n\u00FAt ch\u1EC9 c\u00F3 icon, kh\u00F4ng c\u00F3 text). Thay b\u1EB1ng aria-label l\u1EA5y t\u1EEB ch\u00EDnh\n ti\u00EAu \u0111\u1EC1 command \u0111ang hi\u1EC3n th\u1ECB \u1EDF tooltip. -->\n <button\n type=\"button\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n (click)=\"command.click(_item.data)\"\n [matTooltip]=\"_meta.title\"\n [attr.aria-label]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n mat-icon-button>\n <sd-icon class=\"c-icon\" [color]=\"command.color || 'secondary'\" [fontSet]=\"command.fontSet\" [name]=\"_meta.icon\"></sd-icon>\n </button>\n } @else {\n <sd-button\n class=\"sd-command-trigger\"\n type=\"text\"\n size=\"sm\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n [tooltip]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n [prefixIcon]=\"_meta.icon || 'more_vert'\"\n [fontSet]=\"command.fontSet\">\n @for (childCommand of command.children; track childCommand.key) {\n @let _childMeta = _item | command: childCommand;\n <sd-button-item\n [autoId]=\"_autoId + '-' + command.key + '-' + childCommand.key\"\n [disabled]=\"_childMeta.disabled\"\n [color]=\"childCommand.color\"\n [prefixIcon]=\"_childMeta.htmlTemplate ? null : _childMeta.icon\"\n [fontSet]=\"childCommand.fontSet\"\n (click)=\"childCommand.click(item().data)\">\n @if (_childMeta.htmlTemplate) {\n <span [innerHTML]=\"_childMeta.htmlTemplate\"></span>\n } @else {\n {{ _childMeta.title }}\n }\n </sd-button-item>\n }\n </sd-button>\n }\n }\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}:host{display:flex;align-items:center}button[mat-icon-button]{width:24px;height:24px;line-height:var(--sd-line-height-24, 24px);padding:0}:host ::ng-deep button[mat-icon-button] .mat-mdc-button-touch-target{width:100%;height:100%}sd-icon.c-icon{color:var(--sd-text-secondary)!important;width:16px;height:16px;font-size:var(--sd-font-size-16, 16px);line-height:var(--sd-line-height-16, 16px)}button[mat-icon-button]:disabled sd-icon.c-icon{color:inherit!important}:host ::ng-deep .sd-command-trigger button.c-button{height:24px;width:24px;padding:0!important;max-width:24px}:host ::ng-deep .sd-command-trigger button.c-button .c-button-content-wrapper{gap:0}:host ::ng-deep .sd-command-trigger button.c-button .mat-mdc-button-touch-target{width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: CommandPipe, name: "command" }, { kind: "pipe", type: CommandFilterPipe, name: "filter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2725
2809
|
}
|
|
2726
2810
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DesktopCommand, decorators: [{
|
|
2727
2811
|
type: Component,
|
|
2728
2812
|
args: [{ selector: 'desktop-command', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, host: {
|
|
2729
2813
|
'[attr.data-autoid]': 'autoId()',
|
|
2730
|
-
}, imports: [SdIcon, CommonModule, MatTooltipModule, SdButton, SdButtonItem, MatButtonModule, CommandPipe, CommandFilterPipe], template: "@let _autoId = autoId();\n@let _item = item();\n@let filteredCommands = _item | filter: _commands() | async;\n\n@if (filteredCommands?.length) {\n @for (command of filteredCommands; track command.key) {\n @let _meta = _item | command: command;\n @if (command.type === 'normal') {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u0111\u00E2y l\u00E0 <button> TH\u1EACT, v\u1EABn nh\u1EADn tab focus nh\u01B0ng screen reader\n kh\u00F4ng \u0111\u1ECDc \u0111\u01B0\u1EE3c g\u00EC (n\u00FAt ch\u1EC9 c\u00F3 icon, kh\u00F4ng c\u00F3 text). Thay b\u1EB1ng aria-label l\u1EA5y t\u1EEB ch\u00EDnh\n ti\u00EAu \u0111\u1EC1 command \u0111ang hi\u1EC3n th\u1ECB \u1EDF tooltip. -->\n <button\n type=\"button\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n (click)=\"command.click(_item.data)\"\n [matTooltip]=\"_meta.title\"\n [attr.aria-label]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n mat-icon-button>\n <sd-icon class=\"c-icon\" [color]=\"command.color || 'secondary'\" [fontSet]=\"command.fontSet\" [name]=\"_meta.icon\"></sd-icon>\n </button>\n } @else {\n <sd-button\n class=\"sd-command-trigger\"\n type=\"text\"\n size=\"sm\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n [tooltip]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n [prefixIcon]=\"_meta.icon || 'more_vert'\"\n [fontSet]=\"command.fontSet\">\n @for (childCommand of command.children; track childCommand.key) {\n @let _childMeta = _item | command: childCommand;\n <sd-button-item\n [autoId]=\"_autoId + '-' + command.key + '-' + childCommand.key\"\n [disabled]=\"_childMeta.disabled\"\n [color]=\"childCommand.color\"\n [prefixIcon]=\"_childMeta.htmlTemplate ? null : _childMeta.icon\"\n [fontSet]=\"childCommand.fontSet\"\n (click)=\"childCommand.click(item().data)\">\n @if (_childMeta.htmlTemplate) {\n <span [innerHTML]=\"_childMeta.htmlTemplate\"></span>\n } @else {\n {{ _childMeta.title }}\n }\n </sd-button-item>\n }\n </sd-button>\n }\n }\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}:host{display:flex;align-items:center}button[mat-icon-button]{width:24px;height:24px;line-height:24px;padding:0}:host ::ng-deep button[mat-icon-button] .mat-mdc-button-touch-target{width:100%;height:100%}sd-icon.c-icon{color:var(--sd-text-secondary)!important;width:16px;height:16px;font-size:16px;line-height:16px}button[mat-icon-button]:disabled sd-icon.c-icon{color:inherit!important}:host ::ng-deep .sd-command-trigger button.c-button{height:24px;width:24px;padding:0!important;max-width:24px}:host ::ng-deep .sd-command-trigger button.c-button .c-button-content-wrapper{gap:0}:host ::ng-deep .sd-command-trigger button.c-button .mat-mdc-button-touch-target{width:100%;height:100%}\n"] }]
|
|
2814
|
+
}, imports: [SdIcon, CommonModule, MatTooltipModule, SdButton, SdButtonItem, MatButtonModule, CommandPipe, CommandFilterPipe], template: "@let _autoId = autoId();\n@let _item = item();\n@let filteredCommands = _item | filter: _commands() | async;\n\n@if (filteredCommands?.length) {\n @for (command of filteredCommands; track command.key) {\n @let _meta = _item | command: command;\n @if (command.type === 'normal') {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u0111\u00E2y l\u00E0 <button> TH\u1EACT, v\u1EABn nh\u1EADn tab focus nh\u01B0ng screen reader\n kh\u00F4ng \u0111\u1ECDc \u0111\u01B0\u1EE3c g\u00EC (n\u00FAt ch\u1EC9 c\u00F3 icon, kh\u00F4ng c\u00F3 text). Thay b\u1EB1ng aria-label l\u1EA5y t\u1EEB ch\u00EDnh\n ti\u00EAu \u0111\u1EC1 command \u0111ang hi\u1EC3n th\u1ECB \u1EDF tooltip. -->\n <button\n type=\"button\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n (click)=\"command.click(_item.data)\"\n [matTooltip]=\"_meta.title\"\n [attr.aria-label]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n mat-icon-button>\n <sd-icon class=\"c-icon\" [color]=\"command.color || 'secondary'\" [fontSet]=\"command.fontSet\" [name]=\"_meta.icon\"></sd-icon>\n </button>\n } @else {\n <sd-button\n class=\"sd-command-trigger\"\n type=\"text\"\n size=\"sm\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n [tooltip]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n [prefixIcon]=\"_meta.icon || 'more_vert'\"\n [fontSet]=\"command.fontSet\">\n @for (childCommand of command.children; track childCommand.key) {\n @let _childMeta = _item | command: childCommand;\n <sd-button-item\n [autoId]=\"_autoId + '-' + command.key + '-' + childCommand.key\"\n [disabled]=\"_childMeta.disabled\"\n [color]=\"childCommand.color\"\n [prefixIcon]=\"_childMeta.htmlTemplate ? null : _childMeta.icon\"\n [fontSet]=\"childCommand.fontSet\"\n (click)=\"childCommand.click(item().data)\">\n @if (_childMeta.htmlTemplate) {\n <span [innerHTML]=\"_childMeta.htmlTemplate\"></span>\n } @else {\n {{ _childMeta.title }}\n }\n </sd-button-item>\n }\n </sd-button>\n }\n }\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}:host{display:flex;align-items:center}button[mat-icon-button]{width:24px;height:24px;line-height:var(--sd-line-height-24, 24px);padding:0}:host ::ng-deep button[mat-icon-button] .mat-mdc-button-touch-target{width:100%;height:100%}sd-icon.c-icon{color:var(--sd-text-secondary)!important;width:16px;height:16px;font-size:var(--sd-font-size-16, 16px);line-height:var(--sd-line-height-16, 16px)}button[mat-icon-button]:disabled sd-icon.c-icon{color:inherit!important}:host ::ng-deep .sd-command-trigger button.c-button{height:24px;width:24px;padding:0!important;max-width:24px}:host ::ng-deep .sd-command-trigger button.c-button .c-button-content-wrapper{gap:0}:host ::ng-deep .sd-command-trigger button.c-button .mat-mdc-button-touch-target{width:100%;height:100%}\n"] }]
|
|
2731
2815
|
}], propDecorators: { autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], itemIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemIndex", required: true }] }], commands: [{ type: i0.Input, args: [{ isSignal: true, alias: "commands", required: false }] }] } });
|
|
2732
2816
|
|
|
2733
2817
|
class SdPopupExport {
|
|
@@ -3006,11 +3090,11 @@ class SdPopupExport {
|
|
|
3006
3090
|
return '';
|
|
3007
3091
|
};
|
|
3008
3092
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdPopupExport, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3009
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: SdPopupExport, isStandalone: true, selector: "sd-popup-export", inputs: { _tableOption: { classPropertyName: "_tableOption", publicName: "tableOption", isSignal: false, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { export: "export" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true }, { propertyName: "listGroups", first: true, predicate: ["listGroups"], descendants: true }], ngImport: i0, template: "<sd-modal width=\"907px\" [title]=\"'Exported template'\" #modal>\n <div class=\"row\">\n <div *ngIf=\"!files?.length\" class=\"col-12\">\n <div class=\"c-empty\">\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" />\n <div class=\"T14R\">{{ 'There are no exported templates' }}</div>\n </div>\n </div>\n <ng-container *ngIf=\"files?.length\">\n <div class=\"col-12\">\n <div class=\"c-table\" style=\"max-height: 50vh\">\n <table mat-table [dataSource]=\"files\">\n <ng-container matColumnDef=\"stt\">\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\n {{ idx + 1 }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"fileName\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>\n {{ 'File name' }}\n </th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n {{ item.fileName }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\"></th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n <div class=\"d-flex\">\n <button mat-icon-button aria-label=\"delete\" (click)=\"removeFile(item)\">\n <sd-icon name=\"delete\"></sd-icon>\n </button>\n <button mat-icon-button aria-label=\"download\" (click)=\"onExport(item)\">\n <sd-icon name=\"download\"></sd-icon>\n </button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'fileName', 'action']; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: ['stt', 'fileName', 'action']\"></tr>\n </table>\n </div>\n </div>\n <div *ngIf=\"files.length < 5\" class=\"col-12 mt-10\">\n <sd-button class=\"mr-4\" [title]=\"'New template'\" (click)=\"enableCreating = true\" color=\"info\" [disabled]=\"enableCreating\">\n </sd-button>\n <sd-button *ngIf=\"exportOption?.enableUpload\" [title]=\"'Upload template'\" (click)=\"uploadTemplate()\" type=\"outline\">\n </sd-button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"enableCreating || !files?.length\">\n <div class=\"col-12 mt-20\">\n <div class=\"T14R\">{{ 'Select columns for creating template' }}:</div>\n </div>\n <div class=\"col-12\">\n <mat-chip-listbox selectable=\"true\" multiple=\"true\">\n <ng-container *ngFor=\"let column of columns\">\n <mat-chip-option [selected]=\"selected[column.field]\" (click)=\"selected[column.field] = !selected[column.field]\">\n {{ column.title }}\n </mat-chip-option>\n </ng-container>\n </mat-chip-listbox>\n </div>\n <div class=\"col-12 row\">\n <div class=\"col-10\">\n <sd-input [form]=\"form\" [label]=\"'Template name'\" [(model)]=\"templateName\" [validator]=\"templateNameValidator\"></sd-input>\n </div>\n <div class=\"col-2 mt-8\">\n <sd-button width=\"100%\" [title]=\"'Save'\" color=\"info\" (click)=\"createTemplate()\"> </sd-button>\n </div>\n </div>\n </ng-container>\n </div>\n</sd-modal>\n", styles: [".c-radio-group{display:flex;flex-direction:column;margin:15px 0}.c-radio-button{margin:5px}.c-empty{display:flex;flex-direction:column;justify-content:center;align-items:center;position:static;height:116px;background
|
|
3093
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: SdPopupExport, isStandalone: true, selector: "sd-popup-export", inputs: { _tableOption: { classPropertyName: "_tableOption", publicName: "tableOption", isSignal: false, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { export: "export" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true }, { propertyName: "listGroups", first: true, predicate: ["listGroups"], descendants: true }], ngImport: i0, template: "<sd-modal width=\"907px\" [title]=\"'Exported template'\" #modal>\n <div class=\"row\">\n <div *ngIf=\"!files?.length\" class=\"col-12\">\n <div class=\"c-empty\">\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" />\n <div class=\"T14R\">{{ 'There are no exported templates' }}</div>\n </div>\n </div>\n <ng-container *ngIf=\"files?.length\">\n <div class=\"col-12\">\n <div class=\"c-table\" style=\"max-height: 50vh\">\n <table mat-table [dataSource]=\"files\">\n <ng-container matColumnDef=\"stt\">\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\n {{ idx + 1 }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"fileName\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>\n {{ 'File name' }}\n </th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n {{ item.fileName }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\"></th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n <div class=\"d-flex\">\n <button mat-icon-button aria-label=\"delete\" (click)=\"removeFile(item)\">\n <sd-icon name=\"delete\"></sd-icon>\n </button>\n <button mat-icon-button aria-label=\"download\" (click)=\"onExport(item)\">\n <sd-icon name=\"download\"></sd-icon>\n </button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'fileName', 'action']; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: ['stt', 'fileName', 'action']\"></tr>\n </table>\n </div>\n </div>\n <div *ngIf=\"files.length < 5\" class=\"col-12 mt-10\">\n <sd-button class=\"mr-4\" [title]=\"'New template'\" (click)=\"enableCreating = true\" color=\"info\" [disabled]=\"enableCreating\">\n </sd-button>\n <sd-button *ngIf=\"exportOption?.enableUpload\" [title]=\"'Upload template'\" (click)=\"uploadTemplate()\" type=\"outline\">\n </sd-button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"enableCreating || !files?.length\">\n <div class=\"col-12 mt-20\">\n <div class=\"T14R\">{{ 'Select columns for creating template' }}:</div>\n </div>\n <div class=\"col-12\">\n <mat-chip-listbox selectable=\"true\" multiple=\"true\">\n <ng-container *ngFor=\"let column of columns\">\n <mat-chip-option [selected]=\"selected[column.field]\" (click)=\"selected[column.field] = !selected[column.field]\">\n {{ column.title }}\n </mat-chip-option>\n </ng-container>\n </mat-chip-listbox>\n </div>\n <div class=\"col-12 row\">\n <div class=\"col-10\">\n <sd-input [form]=\"form\" [label]=\"'Template name'\" [(model)]=\"templateName\" [validator]=\"templateNameValidator\"></sd-input>\n </div>\n <div class=\"col-2 mt-8\">\n <sd-button width=\"100%\" [title]=\"'Save'\" color=\"info\" (click)=\"createTemplate()\"> </sd-button>\n </div>\n </div>\n </ng-container>\n </div>\n</sd-modal>\n", styles: [".c-radio-group{display:flex;flex-direction:column;margin:15px 0}.c-radio-button{margin:5px}.c-empty{display:flex;flex-direction:column;justify-content:center;align-items:center;position:static;height:116px;background:var(--sd-table-export-panel-bg, #f6f6f6);border-radius:var(--sd-radius-4, 4px)}.c-table{position:relative;overflow:auto}.c-table table{width:100%}.c-table .c-th{font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-export-text, #000000)}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i3$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i3$1.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3010
3094
|
}
|
|
3011
3095
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdPopupExport, decorators: [{
|
|
3012
3096
|
type: Component,
|
|
3013
|
-
args: [{ selector: 'sd-popup-export', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SdIcon, CommonModule, MatTableModule, MatChipsModule, SdButton, SdInput, SdModal], template: "<sd-modal width=\"907px\" [title]=\"'Exported template'\" #modal>\n <div class=\"row\">\n <div *ngIf=\"!files?.length\" class=\"col-12\">\n <div class=\"c-empty\">\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" />\n <div class=\"T14R\">{{ 'There are no exported templates' }}</div>\n </div>\n </div>\n <ng-container *ngIf=\"files?.length\">\n <div class=\"col-12\">\n <div class=\"c-table\" style=\"max-height: 50vh\">\n <table mat-table [dataSource]=\"files\">\n <ng-container matColumnDef=\"stt\">\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\n {{ idx + 1 }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"fileName\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>\n {{ 'File name' }}\n </th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n {{ item.fileName }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\"></th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n <div class=\"d-flex\">\n <button mat-icon-button aria-label=\"delete\" (click)=\"removeFile(item)\">\n <sd-icon name=\"delete\"></sd-icon>\n </button>\n <button mat-icon-button aria-label=\"download\" (click)=\"onExport(item)\">\n <sd-icon name=\"download\"></sd-icon>\n </button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'fileName', 'action']; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: ['stt', 'fileName', 'action']\"></tr>\n </table>\n </div>\n </div>\n <div *ngIf=\"files.length < 5\" class=\"col-12 mt-10\">\n <sd-button class=\"mr-4\" [title]=\"'New template'\" (click)=\"enableCreating = true\" color=\"info\" [disabled]=\"enableCreating\">\n </sd-button>\n <sd-button *ngIf=\"exportOption?.enableUpload\" [title]=\"'Upload template'\" (click)=\"uploadTemplate()\" type=\"outline\">\n </sd-button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"enableCreating || !files?.length\">\n <div class=\"col-12 mt-20\">\n <div class=\"T14R\">{{ 'Select columns for creating template' }}:</div>\n </div>\n <div class=\"col-12\">\n <mat-chip-listbox selectable=\"true\" multiple=\"true\">\n <ng-container *ngFor=\"let column of columns\">\n <mat-chip-option [selected]=\"selected[column.field]\" (click)=\"selected[column.field] = !selected[column.field]\">\n {{ column.title }}\n </mat-chip-option>\n </ng-container>\n </mat-chip-listbox>\n </div>\n <div class=\"col-12 row\">\n <div class=\"col-10\">\n <sd-input [form]=\"form\" [label]=\"'Template name'\" [(model)]=\"templateName\" [validator]=\"templateNameValidator\"></sd-input>\n </div>\n <div class=\"col-2 mt-8\">\n <sd-button width=\"100%\" [title]=\"'Save'\" color=\"info\" (click)=\"createTemplate()\"> </sd-button>\n </div>\n </div>\n </ng-container>\n </div>\n</sd-modal>\n", styles: [".c-radio-group{display:flex;flex-direction:column;margin:15px 0}.c-radio-button{margin:5px}.c-empty{display:flex;flex-direction:column;justify-content:center;align-items:center;position:static;height:116px;background
|
|
3097
|
+
args: [{ selector: 'sd-popup-export', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SdIcon, CommonModule, MatTableModule, MatChipsModule, SdButton, SdInput, SdModal], template: "<sd-modal width=\"907px\" [title]=\"'Exported template'\" #modal>\n <div class=\"row\">\n <div *ngIf=\"!files?.length\" class=\"col-12\">\n <div class=\"c-empty\">\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" />\n <div class=\"T14R\">{{ 'There are no exported templates' }}</div>\n </div>\n </div>\n <ng-container *ngIf=\"files?.length\">\n <div class=\"col-12\">\n <div class=\"c-table\" style=\"max-height: 50vh\">\n <table mat-table [dataSource]=\"files\">\n <ng-container matColumnDef=\"stt\">\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\n {{ idx + 1 }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"fileName\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>\n {{ 'File name' }}\n </th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n {{ item.fileName }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\"></th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n <div class=\"d-flex\">\n <button mat-icon-button aria-label=\"delete\" (click)=\"removeFile(item)\">\n <sd-icon name=\"delete\"></sd-icon>\n </button>\n <button mat-icon-button aria-label=\"download\" (click)=\"onExport(item)\">\n <sd-icon name=\"download\"></sd-icon>\n </button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'fileName', 'action']; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: ['stt', 'fileName', 'action']\"></tr>\n </table>\n </div>\n </div>\n <div *ngIf=\"files.length < 5\" class=\"col-12 mt-10\">\n <sd-button class=\"mr-4\" [title]=\"'New template'\" (click)=\"enableCreating = true\" color=\"info\" [disabled]=\"enableCreating\">\n </sd-button>\n <sd-button *ngIf=\"exportOption?.enableUpload\" [title]=\"'Upload template'\" (click)=\"uploadTemplate()\" type=\"outline\">\n </sd-button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"enableCreating || !files?.length\">\n <div class=\"col-12 mt-20\">\n <div class=\"T14R\">{{ 'Select columns for creating template' }}:</div>\n </div>\n <div class=\"col-12\">\n <mat-chip-listbox selectable=\"true\" multiple=\"true\">\n <ng-container *ngFor=\"let column of columns\">\n <mat-chip-option [selected]=\"selected[column.field]\" (click)=\"selected[column.field] = !selected[column.field]\">\n {{ column.title }}\n </mat-chip-option>\n </ng-container>\n </mat-chip-listbox>\n </div>\n <div class=\"col-12 row\">\n <div class=\"col-10\">\n <sd-input [form]=\"form\" [label]=\"'Template name'\" [(model)]=\"templateName\" [validator]=\"templateNameValidator\"></sd-input>\n </div>\n <div class=\"col-2 mt-8\">\n <sd-button width=\"100%\" [title]=\"'Save'\" color=\"info\" (click)=\"createTemplate()\"> </sd-button>\n </div>\n </div>\n </ng-container>\n </div>\n</sd-modal>\n", styles: [".c-radio-group{display:flex;flex-direction:column;margin:15px 0}.c-radio-button{margin:5px}.c-empty{display:flex;flex-direction:column;justify-content:center;align-items:center;position:static;height:116px;background:var(--sd-table-export-panel-bg, #f6f6f6);border-radius:var(--sd-radius-4, 4px)}.c-table{position:relative;overflow:auto}.c-table table{width:100%}.c-table .c-th{font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-export-text, #000000)}\n"] }]
|
|
3014
3098
|
}], ctorParameters: () => [], propDecorators: { modal: [{
|
|
3015
3099
|
type: ViewChild,
|
|
3016
3100
|
args: ['modal']
|
|
@@ -3400,12 +3484,12 @@ class SdGroupPipe {
|
|
|
3400
3484
|
const collapsible = !!group.collapsible;
|
|
3401
3485
|
const defaultExpanded = !group.defaultCollapsed;
|
|
3402
3486
|
// Bucket items theo combined field-value hash.
|
|
3403
|
-
// Field hỗ trợ dot-notation (vd 'customer.id') — resolve qua
|
|
3487
|
+
// Field hỗ trợ dot-notation (vd 'customer.id') và key có khoảng trắng (NSP-5745) — resolve qua resolveFieldValue.
|
|
3404
3488
|
const buckets = new Map();
|
|
3405
3489
|
for (const item of items) {
|
|
3406
3490
|
const values = {};
|
|
3407
3491
|
for (const f of fields)
|
|
3408
|
-
values[f] =
|
|
3492
|
+
values[f] = resolveFieldValue(item.data, f);
|
|
3409
3493
|
const key = Utilities.hash(values);
|
|
3410
3494
|
let bucket = buckets.get(key);
|
|
3411
3495
|
if (!bucket) {
|
|
@@ -3457,6 +3541,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3457
3541
|
class TableExportService {
|
|
3458
3542
|
#excelService = inject(SdExcelService);
|
|
3459
3543
|
#i18n = inject(I18nService);
|
|
3544
|
+
#injector = inject(Injector);
|
|
3460
3545
|
// ==========================================
|
|
3461
3546
|
// SIGNAL STATE (Component sẽ bind trực tiếp vào đây)
|
|
3462
3547
|
// ==========================================
|
|
@@ -3508,6 +3593,13 @@ class TableExportService {
|
|
|
3508
3593
|
if (option.export?.type === 'custom')
|
|
3509
3594
|
return;
|
|
3510
3595
|
const { isCSV } = args;
|
|
3596
|
+
const limit = this.#exportLimit(option);
|
|
3597
|
+
// why: `export.max` trước đây khai báo nhưng không ai đọc — export 100.000 dòng vẫn chạy dù đặt
|
|
3598
|
+
// `max: 5000`. Chặn ngay khi tổng của bảng (server, hoặc số dòng local sau lọc) đã vượt.
|
|
3599
|
+
if (limit !== undefined && total > limit) {
|
|
3600
|
+
this.#warnExportLimit(limit, total);
|
|
3601
|
+
return;
|
|
3602
|
+
}
|
|
3511
3603
|
try {
|
|
3512
3604
|
const columns = this.#getExportColumns(context, args.columns);
|
|
3513
3605
|
const pageSize = option.export?.maxItemsPerRequest || 1000;
|
|
@@ -3518,6 +3610,8 @@ class TableExportService {
|
|
|
3518
3610
|
this.exporting.set(true);
|
|
3519
3611
|
const items = [];
|
|
3520
3612
|
let promises = [];
|
|
3613
|
+
let fetchedCount = 0;
|
|
3614
|
+
let exceededTotal;
|
|
3521
3615
|
const handleData = async () => {
|
|
3522
3616
|
const results = await Promise.all(promises);
|
|
3523
3617
|
promises = [];
|
|
@@ -3531,6 +3625,13 @@ class TableExportService {
|
|
|
3531
3625
|
exportItems = [...exportItems, ...result];
|
|
3532
3626
|
}
|
|
3533
3627
|
}
|
|
3628
|
+
fetchedCount += exportItems.length;
|
|
3629
|
+
// why: tổng thật chỉ biết sau khi nguồn trả về — `total` của context có thể đã cũ, và nguồn
|
|
3630
|
+
// trả mảng thì không báo tổng. Vượt giới hạn thì dừng, không dựng thêm dòng nào.
|
|
3631
|
+
if (limit !== undefined && Math.max(currentTotal, fetchedCount) > limit) {
|
|
3632
|
+
exceededTotal = Math.max(currentTotal, fetchedCount);
|
|
3633
|
+
return;
|
|
3634
|
+
}
|
|
3534
3635
|
if (option.export?.type !== 'custom' && option.export?.mapping) {
|
|
3535
3636
|
const mappedResults = option.export.mapping(exportItems);
|
|
3536
3637
|
exportItems = mappedResults instanceof Promise ? await mappedResults : mappedResults;
|
|
@@ -3544,11 +3645,11 @@ class TableExportService {
|
|
|
3544
3645
|
for (const item of exportItems) {
|
|
3545
3646
|
const obj = {};
|
|
3546
3647
|
const handle = async (exportColumn) => {
|
|
3547
|
-
obj[exportColumn.field] =
|
|
3648
|
+
obj[exportColumn.field] = resolveFieldValue(item, exportColumn.field);
|
|
3548
3649
|
const column = allColumns.find(e => e.field === exportColumn.field);
|
|
3549
3650
|
const exportedColumn = allExportedColumns.find(e => e.field === exportColumn.field);
|
|
3550
3651
|
if (exportedColumn?.transform) {
|
|
3551
|
-
obj[exportedColumn.field] = exportedColumn.transform(
|
|
3652
|
+
obj[exportedColumn.field] = exportedColumn.transform(resolveFieldValue(item, exportedColumn.field), item);
|
|
3552
3653
|
return;
|
|
3553
3654
|
}
|
|
3554
3655
|
if (!column)
|
|
@@ -3563,7 +3664,7 @@ class TableExportService {
|
|
|
3563
3664
|
}
|
|
3564
3665
|
if (!columns.some(e => e.field === column.field))
|
|
3565
3666
|
return;
|
|
3566
|
-
const itemValue =
|
|
3667
|
+
const itemValue = resolveFieldValue(item, column.field);
|
|
3567
3668
|
const fieldStr = column.field;
|
|
3568
3669
|
if (column.transform) {
|
|
3569
3670
|
const transform = column.transform(itemValue, item, { isExport: true });
|
|
@@ -3614,10 +3715,16 @@ class TableExportService {
|
|
|
3614
3715
|
if (promises.length < batch)
|
|
3615
3716
|
continue;
|
|
3616
3717
|
await handleData();
|
|
3718
|
+
if (exceededTotal !== undefined)
|
|
3719
|
+
break;
|
|
3617
3720
|
}
|
|
3618
|
-
if (promises.length > 0) {
|
|
3721
|
+
if (exceededTotal === undefined && promises.length > 0) {
|
|
3619
3722
|
await handleData();
|
|
3620
3723
|
}
|
|
3724
|
+
if (limit !== undefined && exceededTotal !== undefined) {
|
|
3725
|
+
this.#warnExportLimit(limit, exceededTotal);
|
|
3726
|
+
return;
|
|
3727
|
+
}
|
|
3621
3728
|
// Xuất file
|
|
3622
3729
|
if (isCSV) {
|
|
3623
3730
|
await this.#excelService.exportCSV({
|
|
@@ -3651,6 +3758,16 @@ class TableExportService {
|
|
|
3651
3758
|
this.setExportProgress(null);
|
|
3652
3759
|
}
|
|
3653
3760
|
}
|
|
3761
|
+
/** Giới hạn dòng của `export.max`; chỉ số dương hữu hạn mới là giới hạn. */
|
|
3762
|
+
#exportLimit(option) {
|
|
3763
|
+
const max = option.export?.type === 'custom' ? undefined : option.export?.max;
|
|
3764
|
+
return typeof max === 'number' && Number.isFinite(max) && max > 0 ? max : undefined;
|
|
3765
|
+
}
|
|
3766
|
+
#warnExportLimit(limit, total) {
|
|
3767
|
+
// why: resolve lười qua Injector — inject sẵn sẽ buộc mọi sd-table dựng SdNotifyService (kèm toast
|
|
3768
|
+
// container gắn vào <body>) ngay khi khởi tạo, dù không bao giờ vượt giới hạn.
|
|
3769
|
+
this.#injector.get(SdNotifyService).warning(this.#i18n.t('core.component.table.export-max-exceeded', { max: limit, total }));
|
|
3770
|
+
}
|
|
3654
3771
|
#getExportColumns(context, explicitColumns) {
|
|
3655
3772
|
const { option, configuration } = context;
|
|
3656
3773
|
let tableColumns = [];
|
|
@@ -3737,44 +3854,60 @@ class TableFormatService {
|
|
|
3737
3854
|
*/
|
|
3738
3855
|
async loadValues(columns, cacheValues, cacheObjValues) {
|
|
3739
3856
|
const promises = [];
|
|
3857
|
+
// why: lookup chỉ phục vụ nhãn hiển thị và ô lọc; lookup lỗi không được chặn dữ liệu của bảng.
|
|
3858
|
+
// Không ghi cache cho cột lỗi để lần cấu hình sau thử lại, ô tạm hiện mã thô.
|
|
3859
|
+
const reportLookupError = (field, error) => console.error(`[sd-table] Lookup for column "${field}" failed; showing raw values.`, error);
|
|
3740
3860
|
for (const column of columns) {
|
|
3741
3861
|
if (column.type === 'values' && !cacheValues[column.field]) {
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
displayField
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3862
|
+
try {
|
|
3863
|
+
// TRƯỜNG HỢP 1: Nếu items là một Signal
|
|
3864
|
+
if (isSignal(column.option.items)) {
|
|
3865
|
+
// Đọc giá trị hiện tại của Signal
|
|
3866
|
+
const data = column.option.items();
|
|
3867
|
+
cacheValues[column.field] = (Array.isArray(data) ? data : []).map(e => ({
|
|
3868
|
+
...e,
|
|
3869
|
+
[column.option.valueField]: Utilities.getNestedValue(e, column.option.valueField),
|
|
3870
|
+
[column.option.displayField]: Utilities.getNestedValue(e, column.option.displayField),
|
|
3871
|
+
}));
|
|
3872
|
+
cacheObjValues[column.field] = ArrayUtilities.toObject(column.option.valueField, cacheValues[column.field]);
|
|
3873
|
+
}
|
|
3874
|
+
// TRƯỜNG HỢP 2: Nếu items là hàm trả về Promise (API Call)
|
|
3875
|
+
else if (typeof column.option.items === 'function') {
|
|
3876
|
+
const load = column.option.items;
|
|
3877
|
+
const field = column.field;
|
|
3878
|
+
const { valueField, displayField } = column.option;
|
|
3879
|
+
promises.push(
|
|
3880
|
+
// why: bọc trong async để cả lỗi đồng bộ lẫn Promise reject đều rơi vào cùng một catch.
|
|
3881
|
+
(async () => {
|
|
3882
|
+
const data = await load();
|
|
3883
|
+
return { key: field, valueField, displayField, data: Array.isArray(data) ? data : [] };
|
|
3884
|
+
})().catch(error => {
|
|
3885
|
+
reportLookupError(field, error);
|
|
3886
|
+
return undefined;
|
|
3887
|
+
}));
|
|
3888
|
+
}
|
|
3889
|
+
// TRƯỜNG HỢP 3: Mảng tĩnh (K[]) bình thường
|
|
3890
|
+
else {
|
|
3891
|
+
cacheValues[column.field] = column.option.items.map(e => ({
|
|
3892
|
+
...e,
|
|
3893
|
+
[column.option.valueField]: Utilities.getNestedValue(e, column.option.valueField),
|
|
3894
|
+
[column.option.displayField]: Utilities.getNestedValue(e, column.option.displayField),
|
|
3895
|
+
}));
|
|
3896
|
+
cacheObjValues[column.field] = ArrayUtilities.toObject(column.option.valueField, cacheValues[column.field]);
|
|
3897
|
+
}
|
|
3763
3898
|
}
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
[column.option.valueField]: Utilities.getNestedValue(e, column.option.valueField),
|
|
3769
|
-
[column.option.displayField]: Utilities.getNestedValue(e, column.option.displayField),
|
|
3770
|
-
}));
|
|
3771
|
-
cacheObjValues[column.field] = ArrayUtilities.toObject(column.option.valueField, cacheValues[column.field]);
|
|
3899
|
+
catch (error) {
|
|
3900
|
+
delete cacheValues[column.field];
|
|
3901
|
+
delete cacheObjValues[column.field];
|
|
3902
|
+
reportLookupError(column.field, error);
|
|
3772
3903
|
}
|
|
3773
3904
|
}
|
|
3774
3905
|
}
|
|
3775
3906
|
if (promises.length) {
|
|
3776
3907
|
const results = await Promise.all(promises);
|
|
3777
3908
|
for (const result of results) {
|
|
3909
|
+
if (!result)
|
|
3910
|
+
continue;
|
|
3778
3911
|
cacheValues[result.key] = result.data.map(e => ({
|
|
3779
3912
|
...e,
|
|
3780
3913
|
[result.valueField]: Utilities.getNestedValue(e, result.valueField),
|
|
@@ -3799,20 +3932,34 @@ class TableFormatService {
|
|
|
3799
3932
|
const execute = async (column) => {
|
|
3800
3933
|
const { field, click, tooltip, htmlTemplate, transform } = column;
|
|
3801
3934
|
const fieldStr = field;
|
|
3935
|
+
// why: callback hiển thị do consumer cung cấp; lỗi của nó chỉ được làm hỏng ô (hiện giá trị thô),
|
|
3936
|
+
// không được biến một lần đọc API thành công thành "Không thể tải dữ liệu" (NSP-4877).
|
|
3937
|
+
// Log một lần cho mỗi cột mỗi lượt format để không spam theo từng dòng.
|
|
3938
|
+
let reported = false;
|
|
3939
|
+
const report = (error) => {
|
|
3940
|
+
if (reported)
|
|
3941
|
+
return;
|
|
3942
|
+
reported = true;
|
|
3943
|
+
console.error(`[sd-table] Column "${fieldStr}" failed to format; showing raw values.`, error);
|
|
3944
|
+
};
|
|
3802
3945
|
// Xử lý nạp từ điển động (lazy-values)
|
|
3803
3946
|
if (!transform && !htmlTemplate && column.type === 'lazy-values' && typeof column.option.views === 'function') {
|
|
3804
3947
|
const { option: { views, valueField, displayField }, } = column;
|
|
3805
3948
|
cacheObjValues[fieldStr] = cacheObjValues[fieldStr] || {};
|
|
3806
3949
|
const values = ArrayUtilities.distinct(items
|
|
3807
|
-
.map(item =>
|
|
3950
|
+
.map(item => resolveFieldValue(item.data, fieldStr))
|
|
3808
3951
|
.filter(val => val?.toString())
|
|
3809
3952
|
.reduce((current, next) => [...current, ...(Array.isArray(next) ? next : [next])], [])
|
|
3810
3953
|
.filter(val => !Object.keys(cacheObjValues[fieldStr]).includes(val)));
|
|
3811
3954
|
if (values.length) {
|
|
3812
|
-
|
|
3955
|
+
let fetched = [];
|
|
3956
|
+
try {
|
|
3957
|
+
fetched = await views(values);
|
|
3958
|
+
}
|
|
3959
|
+
catch (err) {
|
|
3813
3960
|
console.error(err);
|
|
3814
|
-
|
|
3815
|
-
|
|
3961
|
+
}
|
|
3962
|
+
const lazyItems = (Array.isArray(fetched) ? fetched : [])
|
|
3816
3963
|
.filter((item) => values.includes(Utilities.getNestedValue(item, valueField)))
|
|
3817
3964
|
.map((e) => ({
|
|
3818
3965
|
[valueField]: Utilities.getNestedValue(e, valueField),
|
|
@@ -3824,58 +3971,42 @@ class TableFormatService {
|
|
|
3824
3971
|
// Format dữ liệu cho từng hàng
|
|
3825
3972
|
for (const item of items) {
|
|
3826
3973
|
const rowData = item.data;
|
|
3827
|
-
|
|
3974
|
+
// why: đọc giá trị cũng thuộc phạm vi một ô (NSP-5745) — lỗi bất ngờ khi đọc field chỉ làm ô
|
|
3975
|
+
// hiện rỗng, không được biến lượt đọc thành công thành "Không thể tải dữ liệu".
|
|
3976
|
+
let value;
|
|
3977
|
+
try {
|
|
3978
|
+
value = resolveFieldValue(rowData, fieldStr);
|
|
3979
|
+
}
|
|
3980
|
+
catch (error) {
|
|
3981
|
+
report(error);
|
|
3982
|
+
value = undefined;
|
|
3983
|
+
}
|
|
3828
3984
|
item.meta.display[fieldStr] = {
|
|
3829
3985
|
badge: undefined,
|
|
3830
3986
|
cellStyle: column.align === 'right' ? { 'text-align': 'right!important' } : undefined,
|
|
3831
3987
|
data: value,
|
|
3832
3988
|
isHtml: false,
|
|
3833
|
-
tooltip:
|
|
3989
|
+
tooltip: undefined,
|
|
3834
3990
|
click: typeof click === 'function' ? () => click(value, rowData) : undefined,
|
|
3835
3991
|
};
|
|
3836
3992
|
const display = item.meta.display[fieldStr];
|
|
3837
|
-
if (typeof
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
}
|
|
3841
|
-
else if (typeof transform === 'function') {
|
|
3842
|
-
const newValue = transform(value, rowData);
|
|
3843
|
-
display.data = newValue instanceof Promise ? await newValue : newValue;
|
|
3844
|
-
}
|
|
3845
|
-
else {
|
|
3846
|
-
// Xử lý các type cơ bản
|
|
3847
|
-
if (column.type === 'date' || column.type === 'datetime' || column.type === 'time') {
|
|
3848
|
-
display.data = this.#formatDateDisplay(value, column.type);
|
|
3849
|
-
display.isHtml = column.type === 'datetime';
|
|
3850
|
-
}
|
|
3851
|
-
if (column.type === 'values' || column.type === 'lazy-values') {
|
|
3852
|
-
display.data = this.#processValuesDisplay(value, column, fieldStr, cacheObjValues);
|
|
3993
|
+
if (typeof tooltip === 'function') {
|
|
3994
|
+
try {
|
|
3995
|
+
display.tooltip = tooltip(value, rowData);
|
|
3853
3996
|
}
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
}
|
|
3857
|
-
if (column.type === 'boolean') {
|
|
3858
|
-
const { option } = column;
|
|
3859
|
-
if (value != null && value !== '') {
|
|
3860
|
-
display.data = value === true ? option?.displayOnTrue || 'True' : option?.displayOnFalse || 'False';
|
|
3861
|
-
}
|
|
3862
|
-
else {
|
|
3863
|
-
display.data = '';
|
|
3864
|
-
}
|
|
3865
|
-
}
|
|
3866
|
-
// Xử lý Badge
|
|
3867
|
-
const badgeResult = this.#createBadge(column, value, rowData, cacheValues);
|
|
3868
|
-
if (badgeResult) {
|
|
3869
|
-
display.badge = badgeResult.badge;
|
|
3870
|
-
if (badgeResult.title) {
|
|
3871
|
-
display.data = badgeResult.title;
|
|
3872
|
-
}
|
|
3873
|
-
}
|
|
3874
|
-
if (display.data === null || display.data === undefined || display.data === '') {
|
|
3875
|
-
display.data = EMPTY_STR;
|
|
3876
|
-
display.badge = undefined;
|
|
3997
|
+
catch (error) {
|
|
3998
|
+
report(error);
|
|
3877
3999
|
}
|
|
3878
4000
|
}
|
|
4001
|
+
try {
|
|
4002
|
+
await this.#formatCell(display, column, value, rowData, cacheValues, cacheObjValues);
|
|
4003
|
+
}
|
|
4004
|
+
catch (error) {
|
|
4005
|
+
report(error);
|
|
4006
|
+
display.isHtml = false;
|
|
4007
|
+
display.badge = undefined;
|
|
4008
|
+
display.data = this.#rawDisplay(value);
|
|
4009
|
+
}
|
|
3879
4010
|
}
|
|
3880
4011
|
};
|
|
3881
4012
|
// Duyệt qua tất cả các cột
|
|
@@ -3894,6 +4025,60 @@ class TableFormatService {
|
|
|
3894
4025
|
// ==========================================
|
|
3895
4026
|
// PRIVATE HELPERS
|
|
3896
4027
|
// ==========================================
|
|
4028
|
+
/** Format một ô; ném lỗi nếu callback của consumer lỗi, để `format` rơi về giá trị thô. */
|
|
4029
|
+
async #formatCell(display, column, value, rowData, cacheValues, cacheObjValues) {
|
|
4030
|
+
const { htmlTemplate, transform } = column;
|
|
4031
|
+
if (typeof htmlTemplate === 'function') {
|
|
4032
|
+
display.isHtml = true;
|
|
4033
|
+
display.data = htmlTemplate(value, rowData);
|
|
4034
|
+
return;
|
|
4035
|
+
}
|
|
4036
|
+
if (typeof transform === 'function') {
|
|
4037
|
+
const newValue = transform(value, rowData);
|
|
4038
|
+
display.data = newValue instanceof Promise ? await newValue : newValue;
|
|
4039
|
+
return;
|
|
4040
|
+
}
|
|
4041
|
+
// Xử lý các type cơ bản
|
|
4042
|
+
if (column.type === 'date' || column.type === 'datetime' || column.type === 'time') {
|
|
4043
|
+
display.data = this.#formatDateDisplay(value, column.type);
|
|
4044
|
+
display.isHtml = column.type === 'datetime';
|
|
4045
|
+
}
|
|
4046
|
+
if (column.type === 'values' || column.type === 'lazy-values') {
|
|
4047
|
+
display.data = this.#processValuesDisplay(value, column, column.field, cacheObjValues);
|
|
4048
|
+
}
|
|
4049
|
+
if (column.type === 'number' && NumberUtilities.isNumber(value)) {
|
|
4050
|
+
display.data = this.#formatNumberPipe.transform(value);
|
|
4051
|
+
}
|
|
4052
|
+
if (column.type === 'boolean') {
|
|
4053
|
+
const { option } = column;
|
|
4054
|
+
if (value != null && value !== '') {
|
|
4055
|
+
display.data = value === true ? option?.displayOnTrue || 'True' : option?.displayOnFalse || 'False';
|
|
4056
|
+
}
|
|
4057
|
+
else {
|
|
4058
|
+
display.data = '';
|
|
4059
|
+
}
|
|
4060
|
+
}
|
|
4061
|
+
// Xử lý Badge
|
|
4062
|
+
const badgeResult = this.#createBadge(column, value, rowData, cacheValues);
|
|
4063
|
+
if (badgeResult) {
|
|
4064
|
+
display.badge = badgeResult.badge;
|
|
4065
|
+
if (badgeResult.title) {
|
|
4066
|
+
display.data = badgeResult.title;
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
if (display.data === null || display.data === undefined || display.data === '') {
|
|
4070
|
+
display.data = EMPTY_STR;
|
|
4071
|
+
display.badge = undefined;
|
|
4072
|
+
}
|
|
4073
|
+
}
|
|
4074
|
+
/** Giá trị thô an toàn để hiển thị khi callback format lỗi: primitive giữ nguyên, mảng nối bằng dấu phẩy. */
|
|
4075
|
+
#rawDisplay(value) {
|
|
4076
|
+
const text = (Array.isArray(value) ? value : [value])
|
|
4077
|
+
.filter(entry => entry !== null && entry !== undefined && entry !== '' && typeof entry !== 'object')
|
|
4078
|
+
.map(entry => String(entry))
|
|
4079
|
+
.join(', ');
|
|
4080
|
+
return text || EMPTY_STR;
|
|
4081
|
+
}
|
|
3897
4082
|
#formatDateDisplay(value, type) {
|
|
3898
4083
|
const date = this.#formatDatePipe.transform(value);
|
|
3899
4084
|
const time = this.#formatDatetimePipe.transform(value, 'HH:mm:ss');
|
|
@@ -3997,7 +4182,7 @@ const matchesColumnFilter = (data, columns = [], rawColumnFilter = {}) => {
|
|
|
3997
4182
|
for (const column of columns) {
|
|
3998
4183
|
const { field, type } = column;
|
|
3999
4184
|
const filterValue = (rawColumnFilter[field] || '').toString().trim().toLowerCase();
|
|
4000
|
-
const rawColVal =
|
|
4185
|
+
const rawColVal = resolveFieldValue(data, field);
|
|
4001
4186
|
const columnValue = (rawColVal || '').toString().trim().toLowerCase();
|
|
4002
4187
|
if (filterValue) {
|
|
4003
4188
|
if (!columnValue && type !== 'datetime' && type !== 'date' && type !== 'time') {
|
|
@@ -4100,8 +4285,8 @@ const filterLocalItems = (localItems, option, filterInfo) => {
|
|
|
4100
4285
|
if (column) {
|
|
4101
4286
|
const { type, field } = column;
|
|
4102
4287
|
items.sort((tableItemCurrent, tableItemNext) => {
|
|
4103
|
-
const dataVal =
|
|
4104
|
-
const nextVal =
|
|
4288
|
+
const dataVal = resolveFieldValue(resolveItemData(tableItemCurrent), field);
|
|
4289
|
+
const nextVal = resolveFieldValue(resolveItemData(tableItemNext), field);
|
|
4105
4290
|
return compareLocalValues(dataVal, nextVal, type, orderDirection);
|
|
4106
4291
|
});
|
|
4107
4292
|
}
|
|
@@ -5240,6 +5425,7 @@ class SdTable {
|
|
|
5240
5425
|
return;
|
|
5241
5426
|
this.#retryConfiguration = () => (this.#hydration = this.#hydrateConfiguration(option, configuration, valid));
|
|
5242
5427
|
const revision = this.#read.begin(valid);
|
|
5428
|
+
this.#clearRowsForError();
|
|
5243
5429
|
this.#read.fail(revision, error);
|
|
5244
5430
|
this.loading.set(false);
|
|
5245
5431
|
}
|
|
@@ -5487,6 +5673,7 @@ class SdTable {
|
|
|
5487
5673
|
catch (error) {
|
|
5488
5674
|
if (this.#read.isCurrent(revision)) {
|
|
5489
5675
|
this.#failedRead = request;
|
|
5676
|
+
this.#clearRowsForError();
|
|
5490
5677
|
this.#read.fail(revision, error);
|
|
5491
5678
|
}
|
|
5492
5679
|
return undefined;
|
|
@@ -5498,6 +5685,14 @@ class SdTable {
|
|
|
5498
5685
|
}
|
|
5499
5686
|
}
|
|
5500
5687
|
};
|
|
5688
|
+
// why: end user thấy dòng dữ liệu là hiểu "không lỗi"; lần đọc hiện hành lỗi phải gỡ dòng/total của
|
|
5689
|
+
// lần đọc trước để dữ liệu và vùng lỗi không bao giờ cùng hiển thị (NSP-4877). Retry vẫn dùng snapshot cũ.
|
|
5690
|
+
#clearRowsForError = () => {
|
|
5691
|
+
this.items.set([]);
|
|
5692
|
+
this.total.set(undefined);
|
|
5693
|
+
this.#updateSelectedItems();
|
|
5694
|
+
this.#syncSelectAllState();
|
|
5695
|
+
};
|
|
5501
5696
|
/** Retry current hydration or the still-valid failed server request, without resetting filters or paging. */
|
|
5502
5697
|
retryRead = async () => {
|
|
5503
5698
|
if (this.#destroyed)
|
|
@@ -6179,7 +6374,7 @@ class SdTable {
|
|
|
6179
6374
|
provide: MatPaginatorIntl,
|
|
6180
6375
|
useClass: SdTablePaginatorIntl,
|
|
6181
6376
|
},
|
|
6182
|
-
], queries: [{ propertyName: "dataStateTemplate", first: true, predicate: SdDataStateTemplateDirective, descendants: true, isSignal: true }, { propertyName: "sdSubInformation", first: true, predicate: SdTableExpandDefDirective, descendants: true, isSignal: true }, { propertyName: "sdGroupDef", first: true, predicate: SdTableGroupDefDirective, descendants: true, isSignal: true }, { propertyName: "sdCellDefs", predicate: SdTableCellDefDirective, isSignal: true }, { propertyName: "sdCommandHeaderDef", first: true, predicate: SdTableCommandHeaderDefDirective, descendants: true, isSignal: true }, { propertyName: "sdQuickSearchRightDef", first: true, predicate: SdTableQuickSearchRightDefDirective, descendants: true, isSignal: true }, { propertyName: "sdFooterDefs", predicate: SdMaterialFooterDefDirective, isSignal: true }, { propertyName: "sdFilterDefs", predicate: SdTableFilterDefDirective, isSignal: true }, { propertyName: "sdTitleDefs", predicate: SdTableTitleDefDirective, isSignal: true }, { propertyName: "sdRowMobileDef", first: true, predicate: SdTableRowMobileDefDirective, isSignal: true }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }, { propertyName: "configComponent", first: true, predicate: ConfigComponent, descendants: true, isSignal: true }, { propertyName: "sdPopupExport", first: true, predicate: SdPopupExport, descendants: true, isSignal: true }, { propertyName: "scroll", first: true, predicate: SdScrollDirective, descendants: true, isSignal: true }, { propertyName: "quickAction", first: true, predicate: SdQuickAction, descendants: true, isSignal: true }, { propertyName: "externalFilter", first: true, predicate: ExternalFilterComponent, descendants: true, isSignal: true }, { propertyName: "mobileFilter", first: true, predicate: MobileFilterComponent, descendants: true, isSignal: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "quickSearchControl", first: true, predicate: TableQuickSearchComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _showInlineFilter =\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && _total! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n@if (_configuration) {\n @if (!_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @if (_tree.isExpanding) {\n <span class=\"lds-ring sd-tree-spinner\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </span>\n } @else {\n @let _aid = _autoId;\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n <div class=\"sd-table-surface\" [class.sd-table-surface--quick-search]=\"!!_quickSearch\">\n @if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: b\u1EA3ng t\u1EA3i d\u1EEF li\u1EC7u B\u1EA4T \u0110\u1ED2NG B\u1ED8 nh\u01B0ng tr\u01B0\u1EDBc \u0111\u00E2y ch\u1EC9 c\u00F3 spinner thu\u1EA7n h\u00ECnh \u1EA3nh \u2014 screen\n reader kh\u00F4ng \u0111\u01B0\u1EE3c b\u00E1o g\u00EC c\u1EA3. role=\"status\" + aria-live=\"polite\" \u0111\u1ECDc tr\u1EA1ng th\u00E1i ngay khi\n spinner xu\u1EA5t hi\u1EC7n; aria-busy tr\u00EAn v\u00F9ng b\u1EA3ng cho bi\u1EBFt n\u1ED9i dung \u0111ang \u0111\u01B0\u1EE3c thay th\u1EBF. -->\n @if (_loading) {\n <div class=\"c-loading\" role=\"status\" aria-live=\"polite\" [attr.aria-label]=\"'core.component.table.loading' | sdTranslate\">\n <mat-spinner></mat-spinner>\n </div>\n }\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!element.meta.expand?.isExpanding && !_tableOption.expand?.always) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n @if (element.meta.expand?.isExpanding) {\n <div class=\"lds-ring\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div>\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div>\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n </table>\n }\n @if ((_readState.status === 'error' && !_hideReadError) || _readState.status === 'empty') {\n <sd-data-state\n [state]=\"_readState.status === 'error' ? 'error' : 'empty'\"\n [retryable]=\"_readState.status === 'error'\"\n (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <div class=\"c-no-data-row\" role=\"alert\">\n <p>{{ 'core.component.table.error-occurred' | sdTranslate }}</p>\n <sd-button [title]=\"'core.component.table.reload' | sdTranslate\" (click)=\"reload()\"></sd-button>\n </div>\n } @else if (!_loading && !_total && _readState.status !== 'error' && !loadError()) {\n <div class=\"c-no-data-row\" role=\"status\" aria-live=\"polite\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%}:host:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:6px}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,#f2f3f4);box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:600}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:#e5ecff}:host .c-container .c-table table tr.c-row.selected{background-color:#eef2ff}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:#f5f5f5}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:#f5f5f5}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:#f2f3f4;border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:#f2f2f2!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:500;font-size:14px;line-height:20px;color:#212121}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:#00000014}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-loading{position:absolute;inset:0 0 56px;background:#00000026;z-index:2;display:flex;align-items:center;justify-content:center}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:#fff}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:#fff;border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:#fff;box-shadow:0 2px 4px #2f313629}:host .lds-ring{display:inline-block;position:relative;width:40px;height:40px}:host .lds-ring div{box-sizing:border-box;display:block;position:absolute;width:32px;height:32px;margin:4px;border:4px solid #cef;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#cef transparent transparent transparent}:host .lds-ring div:nth-child(1){animation-delay:-.45s}:host .lds-ring div:nth-child(2){animation-delay:-.3s}:host .lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:#00000061;display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .c-container:not(.sd-table-mobile)>.c-loading{border-radius:6px 6px 0 0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:#fff}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:#a6a6a6}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{background-repeat:no-repeat;background-position:center right 0;background-size:16px 16px;padding-right:24px}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--outlined .mat-mdc-form-field-infix,:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:2px;padding-bottom:2px;min-height:32px}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select mat-select{margin-top:2px!important}:host ::ng-deep .cdk-drag-preview{box-shadow:0 4px 12px #00000026;background:#fff;display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid rgba(0,0,0,.12)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:#f5f7fc;border-top:1px solid #e6e9f2;border-bottom:1px solid #e6e9f2}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:18px;width:18px;height:18px;line-height:18px}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:#0f172a14}:host ::ng-deep .sd-tree-spinner{transform:scale(.45)}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:#fbfcfe}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:500}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:#fff}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:#fafbfd}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:#f6f8fb}:host ::ng-deep .sd-stt-root{font-weight:700;color:#1f2330}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table,:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-loading{border-top-left-radius:0;border-top-right-radius:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:500}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdDataState, selector: "sd-data-state", inputs: ["state", "title", "message", "icon", "fontSet", "retryable", "retryLabel", "actionLabel", "compact", "fullPage"], outputs: ["sdRetry", "sdAction"] }, { kind: "directive", type: SdDataStateTemplateDirective, selector: "ng-template[sdDataStateTemplate]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i4$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i6.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "component", type: DesktopCommand, selector: "desktop-command", inputs: ["autoId", "item", "itemIndex", "commands"] }, { kind: "component", type: DesktopCellComponent, selector: "desktop-cell", inputs: ["column", "item", "cellDef"] }, { kind: "component", type: ColumnTitleComponent, selector: "column-title", inputs: ["column", "titleDef"] }, { kind: "component", type: ExternalFilterComponent, selector: "external-filter", inputs: ["autoId", "filter", "externalFilters", "filterRegister"] }, { kind: "component", type: TableQuickSearchComponent, selector: "sd-table-quick-search", inputs: ["option", "value", "autoId", "rightTemplate"], outputs: ["valueChange"] }, { kind: "component", type: ConfigComponent, selector: "config", inputs: ["autoId", "tableOption"], outputs: ["changes"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["autoId", "column", "columnFilter", "cacheValues", "value", "operator", "isMobile"], outputs: ["operatorChange", "filterChange", "filterCommit"] }, { kind: "component", type: MobileFilterComponent, selector: "mobile-filter", inputs: ["autoId", "filter", "externalFilters", "columns", "filterDefs", "filterRegister", "cacheValues"] }, { kind: "directive", type: SdAggregateLayoutDirective, selector: "table[sdAggregateLayout]" }, { kind: "directive", type: SdTableFooterRowDefDirective, selector: "[sdTableFooterRowDef]", inputs: ["sdTableFooterRowDef", "sdTableFooterRowDefSticky"] }, { kind: "directive", type: SdScrollDirective, selector: "[sdScroll]" }, { kind: "directive", type: SdHoverCopyDirective, selector: "[sdHoverCopy]", inputs: ["sdHoverCopy", "sdHoverCopyDisabled"] }, { kind: "component", type: SelectorActionComponent, selector: "selector-action", inputs: ["autoId", "tableOption", "selectedTableItems"], outputs: ["clear"] }, { kind: "directive", type: StickyShadowDirective, selector: "[stickyShadow]" }, { kind: "directive", type: SdColumnResizeDirective, selector: "[sdColumnResize]", inputs: ["sdColumnResize", "minWidth", "maxWidth"], outputs: ["resizeEnd"] }, { kind: "directive", type: SdTableSortHeaderDirective, selector: "[sdTableSortHeader]", inputs: ["sdTableSortHeader"] }, { kind: "component", type: SdTableMobileCardsComponent, selector: "sd-table-mobile-cards", inputs: ["table", "rows", "dataRows", "aggregateTemplate", "groupTemplate"] }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }, { kind: "pipe", type: SdGroupPipe, name: "sdGroup" }, { kind: "pipe", type: SdTreePipe, name: "sdTree" }, { kind: "pipe", type: SdAggregateRowsPipe, name: "sdAggregateRows" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], animations: [
|
|
6377
|
+
], queries: [{ propertyName: "dataStateTemplate", first: true, predicate: SdDataStateTemplateDirective, descendants: true, isSignal: true }, { propertyName: "sdSubInformation", first: true, predicate: SdTableExpandDefDirective, descendants: true, isSignal: true }, { propertyName: "sdGroupDef", first: true, predicate: SdTableGroupDefDirective, descendants: true, isSignal: true }, { propertyName: "sdCellDefs", predicate: SdTableCellDefDirective, isSignal: true }, { propertyName: "sdCommandHeaderDef", first: true, predicate: SdTableCommandHeaderDefDirective, descendants: true, isSignal: true }, { propertyName: "sdQuickSearchRightDef", first: true, predicate: SdTableQuickSearchRightDefDirective, descendants: true, isSignal: true }, { propertyName: "sdFooterDefs", predicate: SdMaterialFooterDefDirective, isSignal: true }, { propertyName: "sdFilterDefs", predicate: SdTableFilterDefDirective, isSignal: true }, { propertyName: "sdTitleDefs", predicate: SdTableTitleDefDirective, isSignal: true }, { propertyName: "sdRowMobileDef", first: true, predicate: SdTableRowMobileDefDirective, isSignal: true }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }, { propertyName: "configComponent", first: true, predicate: ConfigComponent, descendants: true, isSignal: true }, { propertyName: "sdPopupExport", first: true, predicate: SdPopupExport, descendants: true, isSignal: true }, { propertyName: "scroll", first: true, predicate: SdScrollDirective, descendants: true, isSignal: true }, { propertyName: "quickAction", first: true, predicate: SdQuickAction, descendants: true, isSignal: true }, { propertyName: "externalFilter", first: true, predicate: ExternalFilterComponent, descendants: true, isSignal: true }, { propertyName: "mobileFilter", first: true, predicate: MobileFilterComponent, descendants: true, isSignal: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "quickSearchControl", first: true, predicate: TableQuickSearchComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _showInlineFilter =\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && _total! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n@if (_configuration) {\n @if (!_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @if (_tree.isExpanding) {\n <span class=\"lds-ring sd-tree-spinner\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </span>\n } @else {\n @let _aid = _autoId;\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n <div class=\"sd-table-surface\" [class.sd-table-surface--quick-search]=\"!!_quickSearch\">\n @if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: b\u1EA3ng t\u1EA3i d\u1EEF li\u1EC7u B\u1EA4T \u0110\u1ED2NG B\u1ED8 nh\u01B0ng tr\u01B0\u1EDBc \u0111\u00E2y ch\u1EC9 c\u00F3 spinner thu\u1EA7n h\u00ECnh \u1EA3nh \u2014 screen\n reader kh\u00F4ng \u0111\u01B0\u1EE3c b\u00E1o g\u00EC c\u1EA3. role=\"status\" + aria-live=\"polite\" \u0111\u1ECDc tr\u1EA1ng th\u00E1i ngay khi\n spinner xu\u1EA5t hi\u1EC7n; aria-busy tr\u00EAn v\u00F9ng b\u1EA3ng cho bi\u1EBFt n\u1ED9i dung \u0111ang \u0111\u01B0\u1EE3c thay th\u1EBF. -->\n @if (_loading) {\n <div class=\"c-loading\" role=\"status\" aria-live=\"polite\" [attr.aria-label]=\"'core.component.table.loading' | sdTranslate\">\n <mat-spinner></mat-spinner>\n </div>\n }\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!element.meta.expand?.isExpanding && !_tableOption.expand?.always) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n @if (element.meta.expand?.isExpanding) {\n <div class=\"lds-ring\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div>\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div>\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n </table>\n }\n @let _readError = _readState.status === 'error';\n <!-- why: d\u00F2ng c\u0169 b\u1ECB g\u1EE1 khi l\u1EA7n \u0111\u1ECDc hi\u1EC7n h\u00E0nh l\u1ED7i, n\u00EAn v\u00F9ng l\u1ED7i/empty ch\u1EC9 hi\u1EC7n khi b\u1EA3ng kh\u00F4ng c\u00F2n d\u00F2ng n\u00E0o\n \u2014 end user kh\u00F4ng bao gi\u1EDD th\u1EA5y d\u1EEF li\u1EC7u v\u00E0 l\u1ED7i c\u00F9ng l\u00FAc (NSP-4877). -->\n @let _noRows = !_readError && !_loading && !_total && !_items.length;\n @if ((_readError && !_hideReadError) || (_noRows && _readState.status === 'empty' && !!_dataStateTemplate)) {\n <sd-data-state [state]=\"_readError ? 'error' : 'empty'\" [retryable]=\"_readError\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <div class=\"c-no-data-row\" role=\"alert\">\n <p>{{ 'core.component.table.error-occurred' | sdTranslate }}</p>\n <sd-button [title]=\"'core.component.table.reload' | sdTranslate\" (click)=\"reload()\"></sd-button>\n </div>\n } @else if (_noRows && !loadError()) {\n <!-- why: empty m\u1EB7c \u0111\u1ECBnh gi\u1EEF 3 tr\u1EA1ng th\u00E1i (filter kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 / ch\u01B0a ch\u1ECDn filter b\u1EAFt bu\u1ED9c / ch\u01B0a c\u00F3 d\u1EEF li\u1EC7u)\n c\u00F9ng \u1EA3nh c\u1EA5u h\u00ECnh qua SD_TABLE_CONFIGURATION.images, cho c\u1EA3 b\u1EA3ng server (NSP-5551). -->\n <div class=\"c-no-data-row\" role=\"status\" aria-live=\"polite\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%}:host:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:var(--sd-radius-6, 6px)}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,var(--sd-table-group-header-mix, #f2f3f4));box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:var(--sd-font-weight-semibold, 600)}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:var(--sd-table-row-activated-bg, #e5ecff)}:host .c-container .c-table table tr.c-row.selected{background-color:var(--sd-table-row-selected-bg, #eef2ff)}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:var(--sd-table-header-bg, #f2f3f4);border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:var(--sd-table-row-divider, #f2f2f2)!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-header-text, #212121)}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:#00000014}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-loading{position:absolute;inset:0 0 56px;background:#00000026;z-index:2;display:flex;align-items:center;justify-content:center}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--sd-table-bg, #ffffff)}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:var(--sd-table-bg, #ffffff);border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:var(--sd-table-bg, #ffffff);box-shadow:0 2px 4px #2f313629}:host .lds-ring{display:inline-block;position:relative;width:40px;height:40px}:host .lds-ring div{box-sizing:border-box;display:block;position:absolute;width:32px;height:32px;margin:4px;border:4px solid var(--sd-table-spinner, #cceeff);border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--sd-table-spinner, #cceeff) transparent transparent transparent}:host .lds-ring div:nth-child(1){animation-delay:-.45s}:host .lds-ring div:nth-child(2){animation-delay:-.3s}:host .lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:#00000061;display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .c-container:not(.sd-table-mobile)>.c-loading{border-radius:6px 6px 0 0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:var(--sd-table-bg, #ffffff)}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:var(--sd-table-select-arrow, #a6a6a6)}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{background-repeat:no-repeat;background-position:center right 0;background-size:16px 16px;padding-right:24px}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--outlined .mat-mdc-form-field-infix,:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:2px;padding-bottom:2px;min-height:32px}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select mat-select{margin-top:2px!important}:host ::ng-deep .cdk-drag-preview{box-shadow:0 4px 12px #00000026;background:#fff;display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid rgba(0,0,0,.12)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:var(--sd-table-group-row-bg, #f5f7fc);border-top:1px solid var(--sd-table-group-row-border, #e6e9f2);border-bottom:1px solid var(--sd-table-group-row-border, #e6e9f2)}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;height:18px;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:#0f172a14}:host ::ng-deep .sd-tree-spinner{transform:scale(.45)}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:var(--sd-table-tree-level-0-bg, #fbfcfe)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:var(--sd-font-weight-medium, 500)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:var(--sd-table-tree-level-1-bg, #ffffff)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:var(--sd-table-tree-level-2-bg, #fafbfd)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:var(--sd-table-tree-level-3-bg, #f6f8fb)}:host ::ng-deep .sd-stt-root{font-weight:var(--sd-font-weight-bold, 700);color:var(--sd-table-tree-root-text, #1f2330)}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table,:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-loading{border-top-left-radius:0;border-top-right-radius:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:var(--sd-font-weight-medium, 500)}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdDataState, selector: "sd-data-state", inputs: ["state", "title", "message", "icon", "fontSet", "iconShape", "retryable", "retryLabel", "actionLabel", "compact", "fullPage"], outputs: ["sdRetry", "sdAction"] }, { kind: "directive", type: SdDataStateTemplateDirective, selector: "ng-template[sdDataStateTemplate]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i4$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i6.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "component", type: DesktopCommand, selector: "desktop-command", inputs: ["autoId", "item", "itemIndex", "commands"] }, { kind: "component", type: DesktopCellComponent, selector: "desktop-cell", inputs: ["column", "item", "cellDef"] }, { kind: "component", type: ColumnTitleComponent, selector: "column-title", inputs: ["column", "titleDef"] }, { kind: "component", type: ExternalFilterComponent, selector: "external-filter", inputs: ["autoId", "filter", "externalFilters", "filterRegister"] }, { kind: "component", type: TableQuickSearchComponent, selector: "sd-table-quick-search", inputs: ["option", "value", "autoId", "rightTemplate"], outputs: ["valueChange"] }, { kind: "component", type: ConfigComponent, selector: "config", inputs: ["autoId", "tableOption"], outputs: ["changes"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["autoId", "column", "columnFilter", "cacheValues", "value", "operator", "isMobile"], outputs: ["operatorChange", "filterChange", "filterCommit"] }, { kind: "component", type: MobileFilterComponent, selector: "mobile-filter", inputs: ["autoId", "filter", "externalFilters", "columns", "filterDefs", "filterRegister", "cacheValues"] }, { kind: "directive", type: SdAggregateLayoutDirective, selector: "table[sdAggregateLayout]" }, { kind: "directive", type: SdTableFooterRowDefDirective, selector: "[sdTableFooterRowDef]", inputs: ["sdTableFooterRowDef", "sdTableFooterRowDefSticky"] }, { kind: "directive", type: SdScrollDirective, selector: "[sdScroll]" }, { kind: "directive", type: SdHoverCopyDirective, selector: "[sdHoverCopy]", inputs: ["sdHoverCopy", "sdHoverCopyDisabled"] }, { kind: "component", type: SelectorActionComponent, selector: "selector-action", inputs: ["autoId", "tableOption", "selectedTableItems"], outputs: ["clear"] }, { kind: "directive", type: StickyShadowDirective, selector: "[stickyShadow]" }, { kind: "directive", type: SdColumnResizeDirective, selector: "[sdColumnResize]", inputs: ["sdColumnResize", "minWidth", "maxWidth"], outputs: ["resizeEnd"] }, { kind: "directive", type: SdTableSortHeaderDirective, selector: "[sdTableSortHeader]", inputs: ["sdTableSortHeader"] }, { kind: "component", type: SdTableMobileCardsComponent, selector: "sd-table-mobile-cards", inputs: ["table", "rows", "dataRows", "aggregateTemplate", "groupTemplate"] }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }, { kind: "pipe", type: SdGroupPipe, name: "sdGroup" }, { kind: "pipe", type: SdTreePipe, name: "sdTree" }, { kind: "pipe", type: SdAggregateRowsPipe, name: "sdAggregateRows" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], animations: [
|
|
6183
6378
|
trigger('detailExpand', [
|
|
6184
6379
|
state('collapsed', style({ height: '0', minHeight: '0', visibility: 'hidden' })),
|
|
6185
6380
|
state('expanded', style({ height: '*', visibility: 'visible' })),
|
|
@@ -6250,7 +6445,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6250
6445
|
SdTranslatePipe,
|
|
6251
6446
|
SdTableMobileCardsComponent,
|
|
6252
6447
|
SdTableMobileActionsComponent,
|
|
6253
|
-
], template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _showInlineFilter =\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && _total! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n@if (_configuration) {\n @if (!_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @if (_tree.isExpanding) {\n <span class=\"lds-ring sd-tree-spinner\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </span>\n } @else {\n @let _aid = _autoId;\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n <div class=\"sd-table-surface\" [class.sd-table-surface--quick-search]=\"!!_quickSearch\">\n @if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: b\u1EA3ng t\u1EA3i d\u1EEF li\u1EC7u B\u1EA4T \u0110\u1ED2NG B\u1ED8 nh\u01B0ng tr\u01B0\u1EDBc \u0111\u00E2y ch\u1EC9 c\u00F3 spinner thu\u1EA7n h\u00ECnh \u1EA3nh \u2014 screen\n reader kh\u00F4ng \u0111\u01B0\u1EE3c b\u00E1o g\u00EC c\u1EA3. role=\"status\" + aria-live=\"polite\" \u0111\u1ECDc tr\u1EA1ng th\u00E1i ngay khi\n spinner xu\u1EA5t hi\u1EC7n; aria-busy tr\u00EAn v\u00F9ng b\u1EA3ng cho bi\u1EBFt n\u1ED9i dung \u0111ang \u0111\u01B0\u1EE3c thay th\u1EBF. -->\n @if (_loading) {\n <div class=\"c-loading\" role=\"status\" aria-live=\"polite\" [attr.aria-label]=\"'core.component.table.loading' | sdTranslate\">\n <mat-spinner></mat-spinner>\n </div>\n }\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!element.meta.expand?.isExpanding && !_tableOption.expand?.always) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n @if (element.meta.expand?.isExpanding) {\n <div class=\"lds-ring\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div>\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div>\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n </table>\n }\n @if ((_readState.status === 'error' && !_hideReadError) || _readState.status === 'empty') {\n <sd-data-state\n [state]=\"_readState.status === 'error' ? 'error' : 'empty'\"\n [retryable]=\"_readState.status === 'error'\"\n (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <div class=\"c-no-data-row\" role=\"alert\">\n <p>{{ 'core.component.table.error-occurred' | sdTranslate }}</p>\n <sd-button [title]=\"'core.component.table.reload' | sdTranslate\" (click)=\"reload()\"></sd-button>\n </div>\n } @else if (!_loading && !_total && _readState.status !== 'error' && !loadError()) {\n <div class=\"c-no-data-row\" role=\"status\" aria-live=\"polite\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%}:host:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:6px}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,#f2f3f4);box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:600}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:#e5ecff}:host .c-container .c-table table tr.c-row.selected{background-color:#eef2ff}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:#f5f5f5}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:#f5f5f5}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:#f2f3f4;border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:#f2f2f2!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:500;font-size:14px;line-height:20px;color:#212121}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:#00000014}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-loading{position:absolute;inset:0 0 56px;background:#00000026;z-index:2;display:flex;align-items:center;justify-content:center}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:#fff}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:#fff;border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:#fff;box-shadow:0 2px 4px #2f313629}:host .lds-ring{display:inline-block;position:relative;width:40px;height:40px}:host .lds-ring div{box-sizing:border-box;display:block;position:absolute;width:32px;height:32px;margin:4px;border:4px solid #cef;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#cef transparent transparent transparent}:host .lds-ring div:nth-child(1){animation-delay:-.45s}:host .lds-ring div:nth-child(2){animation-delay:-.3s}:host .lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:#00000061;display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .c-container:not(.sd-table-mobile)>.c-loading{border-radius:6px 6px 0 0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:#fff}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:#a6a6a6}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{background-repeat:no-repeat;background-position:center right 0;background-size:16px 16px;padding-right:24px}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--outlined .mat-mdc-form-field-infix,:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:2px;padding-bottom:2px;min-height:32px}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select mat-select{margin-top:2px!important}:host ::ng-deep .cdk-drag-preview{box-shadow:0 4px 12px #00000026;background:#fff;display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid rgba(0,0,0,.12)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:#f5f7fc;border-top:1px solid #e6e9f2;border-bottom:1px solid #e6e9f2}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:18px;width:18px;height:18px;line-height:18px}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:#0f172a14}:host ::ng-deep .sd-tree-spinner{transform:scale(.45)}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:#fbfcfe}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:500}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:#fff}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:#fafbfd}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:#f6f8fb}:host ::ng-deep .sd-stt-root{font-weight:700;color:#1f2330}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table,:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-loading{border-top-left-radius:0;border-top-right-radius:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:500}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"] }]
|
|
6448
|
+
], template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _showInlineFilter =\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && _total! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n@if (_configuration) {\n @if (!_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @if (_tree.isExpanding) {\n <span class=\"lds-ring sd-tree-spinner\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </span>\n } @else {\n @let _aid = _autoId;\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n <div class=\"sd-table-surface\" [class.sd-table-surface--quick-search]=\"!!_quickSearch\">\n @if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: b\u1EA3ng t\u1EA3i d\u1EEF li\u1EC7u B\u1EA4T \u0110\u1ED2NG B\u1ED8 nh\u01B0ng tr\u01B0\u1EDBc \u0111\u00E2y ch\u1EC9 c\u00F3 spinner thu\u1EA7n h\u00ECnh \u1EA3nh \u2014 screen\n reader kh\u00F4ng \u0111\u01B0\u1EE3c b\u00E1o g\u00EC c\u1EA3. role=\"status\" + aria-live=\"polite\" \u0111\u1ECDc tr\u1EA1ng th\u00E1i ngay khi\n spinner xu\u1EA5t hi\u1EC7n; aria-busy tr\u00EAn v\u00F9ng b\u1EA3ng cho bi\u1EBFt n\u1ED9i dung \u0111ang \u0111\u01B0\u1EE3c thay th\u1EBF. -->\n @if (_loading) {\n <div class=\"c-loading\" role=\"status\" aria-live=\"polite\" [attr.aria-label]=\"'core.component.table.loading' | sdTranslate\">\n <mat-spinner></mat-spinner>\n </div>\n }\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!element.meta.expand?.isExpanding && !_tableOption.expand?.always) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n @if (element.meta.expand?.isExpanding) {\n <div class=\"lds-ring\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div>\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div>\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n </table>\n }\n @let _readError = _readState.status === 'error';\n <!-- why: d\u00F2ng c\u0169 b\u1ECB g\u1EE1 khi l\u1EA7n \u0111\u1ECDc hi\u1EC7n h\u00E0nh l\u1ED7i, n\u00EAn v\u00F9ng l\u1ED7i/empty ch\u1EC9 hi\u1EC7n khi b\u1EA3ng kh\u00F4ng c\u00F2n d\u00F2ng n\u00E0o\n \u2014 end user kh\u00F4ng bao gi\u1EDD th\u1EA5y d\u1EEF li\u1EC7u v\u00E0 l\u1ED7i c\u00F9ng l\u00FAc (NSP-4877). -->\n @let _noRows = !_readError && !_loading && !_total && !_items.length;\n @if ((_readError && !_hideReadError) || (_noRows && _readState.status === 'empty' && !!_dataStateTemplate)) {\n <sd-data-state [state]=\"_readError ? 'error' : 'empty'\" [retryable]=\"_readError\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <div class=\"c-no-data-row\" role=\"alert\">\n <p>{{ 'core.component.table.error-occurred' | sdTranslate }}</p>\n <sd-button [title]=\"'core.component.table.reload' | sdTranslate\" (click)=\"reload()\"></sd-button>\n </div>\n } @else if (_noRows && !loadError()) {\n <!-- why: empty m\u1EB7c \u0111\u1ECBnh gi\u1EEF 3 tr\u1EA1ng th\u00E1i (filter kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 / ch\u01B0a ch\u1ECDn filter b\u1EAFt bu\u1ED9c / ch\u01B0a c\u00F3 d\u1EEF li\u1EC7u)\n c\u00F9ng \u1EA3nh c\u1EA5u h\u00ECnh qua SD_TABLE_CONFIGURATION.images, cho c\u1EA3 b\u1EA3ng server (NSP-5551). -->\n <div class=\"c-no-data-row\" role=\"status\" aria-live=\"polite\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%}:host:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:var(--sd-radius-6, 6px)}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,var(--sd-table-group-header-mix, #f2f3f4));box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:var(--sd-font-weight-semibold, 600)}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:var(--sd-table-row-activated-bg, #e5ecff)}:host .c-container .c-table table tr.c-row.selected{background-color:var(--sd-table-row-selected-bg, #eef2ff)}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:var(--sd-table-header-bg, #f2f3f4);border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:var(--sd-table-row-divider, #f2f2f2)!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-header-text, #212121)}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:#00000014}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-loading{position:absolute;inset:0 0 56px;background:#00000026;z-index:2;display:flex;align-items:center;justify-content:center}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--sd-table-bg, #ffffff)}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:var(--sd-table-bg, #ffffff);border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:var(--sd-table-bg, #ffffff);box-shadow:0 2px 4px #2f313629}:host .lds-ring{display:inline-block;position:relative;width:40px;height:40px}:host .lds-ring div{box-sizing:border-box;display:block;position:absolute;width:32px;height:32px;margin:4px;border:4px solid var(--sd-table-spinner, #cceeff);border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--sd-table-spinner, #cceeff) transparent transparent transparent}:host .lds-ring div:nth-child(1){animation-delay:-.45s}:host .lds-ring div:nth-child(2){animation-delay:-.3s}:host .lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:#00000061;display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .c-container:not(.sd-table-mobile)>.c-loading{border-radius:6px 6px 0 0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:var(--sd-table-bg, #ffffff)}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:var(--sd-table-select-arrow, #a6a6a6)}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{background-repeat:no-repeat;background-position:center right 0;background-size:16px 16px;padding-right:24px}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--outlined .mat-mdc-form-field-infix,:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:2px;padding-bottom:2px;min-height:32px}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select mat-select{margin-top:2px!important}:host ::ng-deep .cdk-drag-preview{box-shadow:0 4px 12px #00000026;background:#fff;display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid rgba(0,0,0,.12)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:var(--sd-table-group-row-bg, #f5f7fc);border-top:1px solid var(--sd-table-group-row-border, #e6e9f2);border-bottom:1px solid var(--sd-table-group-row-border, #e6e9f2)}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;height:18px;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:#0f172a14}:host ::ng-deep .sd-tree-spinner{transform:scale(.45)}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:var(--sd-table-tree-level-0-bg, #fbfcfe)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:var(--sd-font-weight-medium, 500)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:var(--sd-table-tree-level-1-bg, #ffffff)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:var(--sd-table-tree-level-2-bg, #fafbfd)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:var(--sd-table-tree-level-3-bg, #f6f8fb)}:host ::ng-deep .sd-stt-root{font-weight:var(--sd-font-weight-bold, 700);color:var(--sd-table-tree-root-text, #1f2330)}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table,:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-loading{border-top-left-radius:0;border-top-right-radius:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:var(--sd-font-weight-medium, 500)}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"] }]
|
|
6254
6449
|
}], ctorParameters: () => [], propDecorators: { autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: true }] }], hideReadError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideReadError", required: false }] }], sdReadStateChange: [{ type: i0.Output, args: ["sdReadStateChange"] }], dataStateTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdDataStateTemplateDirective), { isSignal: true }] }], table: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatTable), { isSignal: true }] }], configComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ConfigComponent), { isSignal: true }] }], sdPopupExport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdPopupExport), { isSignal: true }] }], scroll: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdScrollDirective), { isSignal: true }] }], quickAction: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdQuickAction), { isSignal: true }] }], externalFilter: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ExternalFilterComponent), { isSignal: true }] }], mobileFilter: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MobileFilterComponent), { isSignal: true }] }], paginator: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatPaginator), { isSignal: true }] }], sort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }], sdSubInformation: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdTableExpandDefDirective), { isSignal: true }] }], sdGroupDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdTableGroupDefDirective), { isSignal: true }] }], sdCellDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdTableCellDefDirective), { isSignal: true }] }], sdCommandHeaderDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdTableCommandHeaderDefDirective), { isSignal: true }] }], sdQuickSearchRightDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdTableQuickSearchRightDefDirective), { isSignal: true }] }], sdFooterDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdMaterialFooterDefDirective), { isSignal: true }] }], sdFilterDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdTableFilterDefDirective), { isSignal: true }] }], sdTitleDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdTableTitleDefDirective), { isSignal: true }] }], sdRowMobileDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdTableRowMobileDefDirective), { ...{ descendants: false }, isSignal: true }] }], quickSearchControl: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TableQuickSearchComponent), { isSignal: true }] }] } });
|
|
6255
6450
|
|
|
6256
6451
|
/**
|