@ngx-smz/ui-kit 21.9.0-next.11 → 21.9.0-next.13
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.
|
@@ -9252,17 +9252,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
9252
9252
|
class SmzTreeTableSortableColumnDirective {
|
|
9253
9253
|
table = inject(SmzTreeTableComponent);
|
|
9254
9254
|
field = input.required({ ...(ngDevMode ? { debugName: "field" } : {}), alias: 'smzTtSortableColumn' });
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
}
|
|
9255
|
+
/** Coluna ordenada agora (inclui o `sortField`/`sortOrder` iniciais da tabela, sem precisar de clique). */
|
|
9256
|
+
sorted = computed(() => this.table.sortField() === this.field(), ...(ngDevMode ? [{ debugName: "sorted" }] : []));
|
|
9257
|
+
classes = computed(() => 'cursor-pointer select-none ' + (this.sorted() ? 'bg-ui-primary/10 text-ui-primary' : ''), ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
9258
|
+
ariaSort = computed(() => (this.sorted() ? (this.table.sortOrder() === 1 ? 'ascending' : 'descending') : 'none'), ...(ngDevMode ? [{ debugName: "ariaSort" }] : []));
|
|
9258
9259
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9259
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: SmzTreeTableSortableColumnDirective, isStandalone: true, selector: "th[smzTtSortableColumn]", inputs: { field: { classPropertyName: "field", publicName: "smzTtSortableColumn", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "table.sortBy(field())" }, properties: { "
|
|
9260
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: SmzTreeTableSortableColumnDirective, isStandalone: true, selector: "th[smzTtSortableColumn]", inputs: { field: { classPropertyName: "field", publicName: "smzTtSortableColumn", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "table.sortBy(field())" }, properties: { "class": "classes()", "class.p-highlight": "sorted()", "attr.aria-sort": "ariaSort()" } }, ngImport: i0 });
|
|
9260
9261
|
}
|
|
9261
9262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortableColumnDirective, decorators: [{
|
|
9262
9263
|
type: Directive,
|
|
9263
9264
|
args: [{
|
|
9264
9265
|
selector: 'th[smzTtSortableColumn]',
|
|
9265
|
-
host: {
|
|
9266
|
+
host: {
|
|
9267
|
+
'[class]': 'classes()',
|
|
9268
|
+
'[class.p-highlight]': 'sorted()',
|
|
9269
|
+
'(click)': 'table.sortBy(field())',
|
|
9270
|
+
'[attr.aria-sort]': 'ariaSort()',
|
|
9271
|
+
},
|
|
9266
9272
|
}]
|
|
9267
9273
|
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "smzTtSortableColumn", required: true }] }] } });
|
|
9268
9274
|
class SmzTreeTableSortIconComponent {
|
|
@@ -9272,10 +9278,10 @@ class SmzTreeTableSortIconComponent {
|
|
|
9272
9278
|
return this.table.sortField() === this.field() ? this.table.sortOrder() : 0;
|
|
9273
9279
|
}
|
|
9274
9280
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeTableSortIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9275
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzTreeTableSortIconComponent, isStandalone: true, selector: "ui-tree-table-sort-icon", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "ml-1 inline-flex align-middle text-ui-fg-muted" }, ngImport: i0, template: `
|
|
9281
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: SmzTreeTableSortIconComponent, isStandalone: true, selector: "ui-tree-table-sort-icon", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.data-sort-dir": "dir()" }, classAttribute: "ml-1 inline-flex align-middle text-ui-fg-muted" }, ngImport: i0, template: `
|
|
9276
9282
|
<svg viewBox="0 0 16 16" class="h-3.5 w-3.5" fill="none" aria-hidden="true">
|
|
9277
|
-
<path d="M5 6l3-3 3 3" [attr.stroke]="dir() === 1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
9278
|
-
<path d="M5 10l3 3 3-3" [attr.stroke]="dir() === -1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
9283
|
+
<path d="M5 6l3-3 3 3" [attr.stroke]="dir() === 1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" [attr.stroke-width]="dir() === 1 ? 2.25 : 1.5" [attr.opacity]="dir() === -1 ? 0.3 : 1" stroke-linecap="round" stroke-linejoin="round" />
|
|
9284
|
+
<path d="M5 10l3 3 3-3" [attr.stroke]="dir() === -1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" [attr.stroke-width]="dir() === -1 ? 2.25 : 1.5" [attr.opacity]="dir() === 1 ? 0.3 : 1" stroke-linecap="round" stroke-linejoin="round" />
|
|
9279
9285
|
</svg>
|
|
9280
9286
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9281
9287
|
}
|
|
@@ -9284,11 +9290,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
9284
9290
|
args: [{
|
|
9285
9291
|
selector: 'ui-tree-table-sort-icon',
|
|
9286
9292
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9287
|
-
host: { class: 'ml-1 inline-flex align-middle text-ui-fg-muted' },
|
|
9293
|
+
host: { class: 'ml-1 inline-flex align-middle text-ui-fg-muted', '[attr.data-sort-dir]': 'dir()' },
|
|
9288
9294
|
template: `
|
|
9289
9295
|
<svg viewBox="0 0 16 16" class="h-3.5 w-3.5" fill="none" aria-hidden="true">
|
|
9290
|
-
<path d="M5 6l3-3 3 3" [attr.stroke]="dir() === 1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
9291
|
-
<path d="M5 10l3 3 3-3" [attr.stroke]="dir() === -1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
9296
|
+
<path d="M5 6l3-3 3 3" [attr.stroke]="dir() === 1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" [attr.stroke-width]="dir() === 1 ? 2.25 : 1.5" [attr.opacity]="dir() === -1 ? 0.3 : 1" stroke-linecap="round" stroke-linejoin="round" />
|
|
9297
|
+
<path d="M5 10l3 3 3-3" [attr.stroke]="dir() === -1 ? 'rgb(var(--smz-color-primary))' : 'currentColor'" [attr.stroke-width]="dir() === -1 ? 2.25 : 1.5" [attr.opacity]="dir() === 1 ? 0.3 : 1" stroke-linecap="round" stroke-linejoin="round" />
|
|
9292
9298
|
</svg>
|
|
9293
9299
|
`,
|
|
9294
9300
|
}]
|