@coreui/angular-pro 4.2.22 → 4.2.23
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/esm2020/lib/sidebar/sidebar/sidebar.component.mjs +57 -41
- package/esm2020/lib/smart-table/smart-table-head/smart-table-head.component.mjs +3 -3
- package/esm2020/lib/smart-table/smart-table.module.mjs +1 -1
- package/fesm2015/coreui-angular-pro.mjs +51 -39
- package/fesm2015/coreui-angular-pro.mjs.map +1 -1
- package/fesm2020/coreui-angular-pro.mjs +54 -39
- package/fesm2020/coreui-angular-pro.mjs.map +1 -1
- package/lib/sidebar/sidebar/sidebar.component.d.ts +8 -14
- package/package.json +1 -1
|
@@ -11393,6 +11393,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
11393
11393
|
}] }, { type: SidebarService }];
|
|
11394
11394
|
} });
|
|
11395
11395
|
|
|
11396
|
+
var _SidebarComponent_narrow, _SidebarComponent_overlaid, _SidebarComponent_unfoldable, _SidebarComponent_visible, _SidebarComponent_onMobile, _SidebarComponent_layoutChangeSubscription, _SidebarComponent_stateToggleSubscription, _SidebarComponent_stateInitial;
|
|
11396
11397
|
class SidebarComponent {
|
|
11397
11398
|
constructor(document, renderer, breakpointObserver, sidebarService, backdropService) {
|
|
11398
11399
|
this.document = document;
|
|
@@ -11400,14 +11401,21 @@ class SidebarComponent {
|
|
|
11400
11401
|
this.breakpointObserver = breakpointObserver;
|
|
11401
11402
|
this.sidebarService = sidebarService;
|
|
11402
11403
|
this.backdropService = backdropService;
|
|
11403
|
-
this
|
|
11404
|
-
this
|
|
11405
|
-
this
|
|
11406
|
-
this
|
|
11407
|
-
this
|
|
11404
|
+
_SidebarComponent_narrow.set(this, false);
|
|
11405
|
+
_SidebarComponent_overlaid.set(this, false);
|
|
11406
|
+
_SidebarComponent_unfoldable.set(this, false);
|
|
11407
|
+
_SidebarComponent_visible.set(this, false);
|
|
11408
|
+
_SidebarComponent_onMobile.set(this, false);
|
|
11409
|
+
_SidebarComponent_layoutChangeSubscription.set(this, void 0);
|
|
11410
|
+
_SidebarComponent_stateToggleSubscription.set(this, void 0);
|
|
11408
11411
|
this.state = {
|
|
11409
11412
|
sidebar: this
|
|
11410
11413
|
};
|
|
11414
|
+
_SidebarComponent_stateInitial.set(this, {
|
|
11415
|
+
narrow: false,
|
|
11416
|
+
visible: false,
|
|
11417
|
+
unfoldable: false
|
|
11418
|
+
});
|
|
11411
11419
|
/**
|
|
11412
11420
|
* Place sidebar in non-static positions. [docs]
|
|
11413
11421
|
* @default 'fixed'
|
|
@@ -11425,42 +11433,42 @@ class SidebarComponent {
|
|
|
11425
11433
|
* @type boolean
|
|
11426
11434
|
*/
|
|
11427
11435
|
set narrow(value) {
|
|
11428
|
-
this
|
|
11436
|
+
__classPrivateFieldSet(this, _SidebarComponent_narrow, coerceBooleanProperty(value), "f");
|
|
11429
11437
|
}
|
|
11430
11438
|
get narrow() {
|
|
11431
|
-
return this
|
|
11439
|
+
return __classPrivateFieldGet(this, _SidebarComponent_narrow, "f");
|
|
11432
11440
|
}
|
|
11433
11441
|
/**
|
|
11434
11442
|
* Set sidebar to overlaid variant.
|
|
11435
11443
|
* @type boolean
|
|
11436
11444
|
*/
|
|
11437
11445
|
set overlaid(value) {
|
|
11438
|
-
this
|
|
11446
|
+
__classPrivateFieldSet(this, _SidebarComponent_overlaid, coerceBooleanProperty(value), "f");
|
|
11439
11447
|
}
|
|
11440
11448
|
get overlaid() {
|
|
11441
|
-
return this
|
|
11449
|
+
return __classPrivateFieldGet(this, _SidebarComponent_overlaid, "f");
|
|
11442
11450
|
}
|
|
11443
11451
|
/**
|
|
11444
11452
|
* Expand narrowed sidebar on hover. [docs]
|
|
11445
11453
|
*/
|
|
11446
11454
|
set unfoldable(value) {
|
|
11447
|
-
this
|
|
11455
|
+
__classPrivateFieldSet(this, _SidebarComponent_unfoldable, coerceBooleanProperty(value), "f");
|
|
11448
11456
|
}
|
|
11449
11457
|
get unfoldable() {
|
|
11450
|
-
return this
|
|
11458
|
+
return __classPrivateFieldGet(this, _SidebarComponent_unfoldable, "f");
|
|
11451
11459
|
}
|
|
11452
11460
|
/**
|
|
11453
11461
|
* Toggle the visibility of sidebar component. [docs]
|
|
11454
11462
|
*/
|
|
11455
11463
|
set visible(value) {
|
|
11456
11464
|
const visible = coerceBooleanProperty(value);
|
|
11457
|
-
if (this
|
|
11458
|
-
this
|
|
11459
|
-
this.visibleChange.emit(this
|
|
11465
|
+
if (__classPrivateFieldGet(this, _SidebarComponent_visible, "f") !== visible) {
|
|
11466
|
+
__classPrivateFieldSet(this, _SidebarComponent_visible, visible, "f");
|
|
11467
|
+
this.visibleChange.emit(__classPrivateFieldGet(this, _SidebarComponent_visible, "f"));
|
|
11460
11468
|
}
|
|
11461
11469
|
}
|
|
11462
11470
|
get visible() {
|
|
11463
|
-
return this
|
|
11471
|
+
return __classPrivateFieldGet(this, _SidebarComponent_visible, "f");
|
|
11464
11472
|
}
|
|
11465
11473
|
set sidebarState(value) {
|
|
11466
11474
|
var _a;
|
|
@@ -11468,7 +11476,7 @@ class SidebarComponent {
|
|
|
11468
11476
|
if ('toggle' in newState) {
|
|
11469
11477
|
if (newState.toggle === 'visible') {
|
|
11470
11478
|
newState.visible = !this.state.visible;
|
|
11471
|
-
this.visible = newState.visible
|
|
11479
|
+
this.visible = newState.visible;
|
|
11472
11480
|
}
|
|
11473
11481
|
else if (newState.toggle === 'unfoldable') {
|
|
11474
11482
|
newState.unfoldable = !this.state.unfoldable;
|
|
@@ -11479,19 +11487,22 @@ class SidebarComponent {
|
|
|
11479
11487
|
this.visible = ((_a = newState.visible) !== null && _a !== void 0 ? _a : this.visible) && !this.overlaid;
|
|
11480
11488
|
}
|
|
11481
11489
|
this.state = Object.assign(Object.assign({}, this.state), newState);
|
|
11482
|
-
this.state.mobile && this.state.visible
|
|
11490
|
+
this.state.mobile && this.state.visible
|
|
11491
|
+
? this.backdropService.setBackdrop(this)
|
|
11492
|
+
: this.backdropService.clearBackdrop();
|
|
11483
11493
|
}
|
|
11484
11494
|
get sidebarState() {
|
|
11485
11495
|
return this.state;
|
|
11486
11496
|
}
|
|
11487
11497
|
get getMobileBreakpoint() {
|
|
11488
|
-
const element = this.document.
|
|
11489
|
-
const mobileBreakpoint = getComputedStyle(element).getPropertyValue('--cui-mobile-breakpoint') ||
|
|
11498
|
+
const element = this.document.documentElement;
|
|
11499
|
+
const mobileBreakpoint = getComputedStyle(element).getPropertyValue('--cui-mobile-breakpoint') ||
|
|
11500
|
+
'md';
|
|
11490
11501
|
const breakpointValue = getComputedStyle(element).getPropertyValue(`--cui-breakpoint-${mobileBreakpoint.trim()}`) || '768px';
|
|
11491
|
-
return `${parseFloat(breakpointValue.trim()) - .02}px` || '767.98px';
|
|
11502
|
+
return `${parseFloat(breakpointValue.trim()) - 0.02}px` || '767.98px';
|
|
11492
11503
|
}
|
|
11493
11504
|
get getClasses() {
|
|
11494
|
-
const { mobile,
|
|
11505
|
+
const { mobile, visible } = this.sidebarState;
|
|
11495
11506
|
return {
|
|
11496
11507
|
sidebar: true,
|
|
11497
11508
|
'sidebar-fixed': this.position === 'fixed' && !mobile,
|
|
@@ -11501,8 +11512,8 @@ class SidebarComponent {
|
|
|
11501
11512
|
[`sidebar-${this.placement}`]: !!this.placement,
|
|
11502
11513
|
[`sidebar-${this.colorScheme}`]: !!this.colorScheme,
|
|
11503
11514
|
[`sidebar-${this.size}`]: !!this.size,
|
|
11504
|
-
show: visible && this
|
|
11505
|
-
hide: !visible
|
|
11515
|
+
show: visible && __classPrivateFieldGet(this, _SidebarComponent_onMobile, "f"),
|
|
11516
|
+
hide: !visible,
|
|
11506
11517
|
};
|
|
11507
11518
|
}
|
|
11508
11519
|
ngOnInit() {
|
|
@@ -11535,48 +11546,49 @@ class SidebarComponent {
|
|
|
11535
11546
|
}
|
|
11536
11547
|
}
|
|
11537
11548
|
setInitialState() {
|
|
11538
|
-
this
|
|
11549
|
+
__classPrivateFieldSet(this, _SidebarComponent_stateInitial, {
|
|
11539
11550
|
narrow: this.narrow,
|
|
11540
11551
|
visible: this.visible,
|
|
11541
11552
|
unfoldable: this.unfoldable,
|
|
11542
|
-
|
|
11543
|
-
});
|
|
11553
|
+
}, "f");
|
|
11554
|
+
this.sidebarService.toggle(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _SidebarComponent_stateInitial, "f")), { sidebar: this }));
|
|
11544
11555
|
}
|
|
11545
11556
|
stateToggleSubscribe(subscribe = true) {
|
|
11546
11557
|
if (subscribe) {
|
|
11547
|
-
this
|
|
11558
|
+
__classPrivateFieldSet(this, _SidebarComponent_stateToggleSubscription, this.sidebarService.sidebarState$.subscribe((state) => {
|
|
11548
11559
|
if (this === state.sidebar || this.id === state.id) {
|
|
11549
11560
|
this.sidebarState = state;
|
|
11550
11561
|
}
|
|
11551
|
-
});
|
|
11562
|
+
}), "f");
|
|
11552
11563
|
}
|
|
11553
11564
|
else {
|
|
11554
|
-
this.
|
|
11565
|
+
__classPrivateFieldGet(this, _SidebarComponent_stateToggleSubscription, "f").unsubscribe();
|
|
11555
11566
|
}
|
|
11556
11567
|
}
|
|
11557
11568
|
layoutChangeSubscribe(subscribe = true) {
|
|
11558
11569
|
const onMobile = `(max-width: ${this.getMobileBreakpoint})`;
|
|
11559
11570
|
if (subscribe) {
|
|
11560
11571
|
const layoutChanges = this.breakpointObserver.observe([onMobile]);
|
|
11561
|
-
this
|
|
11572
|
+
__classPrivateFieldSet(this, _SidebarComponent_layoutChangeSubscription, layoutChanges.subscribe((result) => {
|
|
11562
11573
|
const isOnMobile = result.breakpoints[onMobile];
|
|
11563
11574
|
const isUnfoldable = isOnMobile ? false : this.unfoldable;
|
|
11564
|
-
if (this
|
|
11565
|
-
this
|
|
11575
|
+
if (__classPrivateFieldGet(this, _SidebarComponent_onMobile, "f") !== isOnMobile) {
|
|
11576
|
+
__classPrivateFieldSet(this, _SidebarComponent_onMobile, isOnMobile, "f");
|
|
11566
11577
|
this.sidebarService.toggle({
|
|
11567
11578
|
mobile: isOnMobile,
|
|
11568
11579
|
unfoldable: isUnfoldable,
|
|
11569
|
-
visible:
|
|
11570
|
-
sidebar: this
|
|
11580
|
+
visible: isOnMobile ? !isOnMobile : __classPrivateFieldGet(this, _SidebarComponent_stateInitial, "f").visible,
|
|
11581
|
+
sidebar: this,
|
|
11571
11582
|
});
|
|
11572
11583
|
}
|
|
11573
|
-
});
|
|
11584
|
+
}), "f");
|
|
11574
11585
|
}
|
|
11575
11586
|
else {
|
|
11576
|
-
this.
|
|
11587
|
+
__classPrivateFieldGet(this, _SidebarComponent_layoutChangeSubscription, "f").unsubscribe();
|
|
11577
11588
|
}
|
|
11578
11589
|
}
|
|
11579
11590
|
}
|
|
11591
|
+
_SidebarComponent_narrow = new WeakMap(), _SidebarComponent_overlaid = new WeakMap(), _SidebarComponent_unfoldable = new WeakMap(), _SidebarComponent_visible = new WeakMap(), _SidebarComponent_onMobile = new WeakMap(), _SidebarComponent_layoutChangeSubscription = new WeakMap(), _SidebarComponent_stateToggleSubscription = new WeakMap(), _SidebarComponent_stateInitial = new WeakMap();
|
|
11580
11592
|
SidebarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SidebarComponent, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i1$2.BreakpointObserver }, { token: SidebarService }, { token: SidebarBackdropService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11581
11593
|
SidebarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: SidebarComponent, selector: "c-sidebar", inputs: { colorScheme: "colorScheme", id: "id", narrow: "narrow", overlaid: "overlaid", placement: "placement", position: "position", size: "size", unfoldable: "unfoldable", visible: "visible" }, outputs: { visibleChange: "visibleChange" }, host: { properties: { "class": "this.getClasses" } }, exportAs: ["cSidebar"], usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
11582
11594
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
@@ -11587,7 +11599,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
11587
11599
|
template: '<ng-content></ng-content>'
|
|
11588
11600
|
}]
|
|
11589
11601
|
}], ctorParameters: function () {
|
|
11590
|
-
return [{ type:
|
|
11602
|
+
return [{ type: Document, decorators: [{
|
|
11591
11603
|
type: Inject,
|
|
11592
11604
|
args: [DOCUMENT]
|
|
11593
11605
|
}] }, { type: i0.Renderer2 }, { type: i1$2.BreakpointObserver }, { type: SidebarService }, { type: SidebarBackdropService }];
|
|
@@ -13064,10 +13076,10 @@ class SmartTableHeadComponent {
|
|
|
13064
13076
|
}
|
|
13065
13077
|
}
|
|
13066
13078
|
SmartTableHeadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SmartTableHeadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13067
|
-
SmartTableHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: SmartTableHeadComponent, selector: "c-smart-table-head", inputs: { columnFilter: "columnFilter", columnFilterState: "columnFilterState", columnSorter: "columnSorter", component: "component", columns: "columns", selectable: "selectable", selectAll: "selectAll", sorterValue: "sorterValue", columnFilterTemplates: "columnFilterTemplates" }, outputs: { columnFilterStateChange: "columnFilterStateChange", sorterStateChange: "sorterStateChange", selectAllChange: "selectAllChange" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<tr>\n <th *ngIf=\"selectable\">\n <input (change)=\"handleSelectAllChecked($event)\"\n [checked]=\"selectAll === true\"\n [indeterminate]=\"selectAll === 'indeterminate'\"\n cFormCheckInput>\n </th>\n <th\n (click)=\"handleSortClick(column, i)\"\n *ngFor=\"let column of columns; let i = index\"\n [cHtmlAttr]=\"tableHeaderCellProps(column)\"\n [cTableColor]=\"tableHeaderCellColor(column)\"\n [ngStyle]=\"tableHeaderCellStyles(column)\"\n >\n <div class=\"d-inline\">{{ columnLabel(column) }}</div>\n <ng-template [ngIf]=\"columnSorter && columnSorterEnabled(column)\">\n <ng-container\n *ngTemplateOutlet=\"columnSorterIconTemplate; context: { $implicit: getColumnSorterState(column) }\"\n ></ng-container>\n </ng-template>\n </th>\n</tr>\n<tr *ngIf=\"columnFilter\">\n <th *ngIf=\"selectable\"></th>\n <th *ngFor=\"let column of columns; let i = index\"\n [cHtmlAttr]=\"tableHeaderCellProps(column)\"\n [cTableColor]=\"tableHeaderCellColor(column)\"\n [ngStyle]=\"tableHeaderCellStyles(column)\"\n >\n <ng-container *ngTemplateOutlet=\"columnFilterTemplates[getColumnFilter(column)] ?? defaultColumnFilter; context: {$implicit: column, header: this}\"></ng-container>\n <ng-template #defaultColumnFilter let-column>\n <input\n (change)=\"handleColumnFilterValueChange($event, column)\"\n (input)=\"handleColumnFilterValueChange($event, column)\"\n *ngIf=\"columnFilterEnabled(column)\"\n [value]=\"columnFilterState[columnKey(column)] ?? ''\"\n cFormControl\n sizing=\"sm\"\n />\n </ng-template>\n </th>\n</tr>\n\n<ng-template #columnSorterIconTemplate let-columnSorterState>\n <ng-container [ngSwitch]=\"columnSorterState\">\n <span *ngSwitchCase=\"'asc'\" class=\"float-end me-1\">\n <ng-container *ngTemplateOutlet=\"sortingIconAscendingTemplate\"></ng-container>\n </span>\n <span *ngSwitchCase=\"'desc'\" class=\"float-end me-1\">\n <ng-container *ngTemplateOutlet=\"sortingIconDescendingTemplate\"></ng-container>\n </span>\n <span *ngSwitchDefault class=\"opacity-25 float-end me-1\">\n <ng-container *ngTemplateOutlet=\"sortingIconTemplate\"></ng-container>\n </span>\n </ng-container>\n</ng-template>\n\n<!--todo: sortingIconCustom Templates-->\n<ng-template #sortingIconTemplate>\n <svg\n class=\"icon icon-custom-size\"\n role=\"img\"\n viewBox=\"0 0 512 512\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <polygon\n class=\"ci-primary\"\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"384 433.373 384 160 352 160 352 434.51 282.177 364.687 259.55 387.313 367.432 495.196 475.313 387.313 452.687 364.687 384 433.373\"\n ></polygon>\n <polygon\n class=\"ci-primary\"\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"159.432 17.372 51.55 125.255 74.177 147.882 144 78.059 144 352 176 352 176 79.195 244.687 147.882 267.313 125.255 159.432 17.372\"\n ></polygon>\n </svg>\n</ng-template>\n\n<ng-template #sortingIconAscendingTemplate>\n <svg\n class=\"icon icon-custom-size\"\n role=\"img\"\n viewBox=\"0 0 512 512\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <polygon\n class=\"ci-primary\"\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"390.624 150.625 256 16 121.376 150.625 144.004 173.252 240.001 77.254 240.001 495.236 272.001 495.236 272.001 77.257 367.996 173.252 390.624 150.625\"\n ></polygon>\n </svg>\n</ng-template>\n\n<ng-template #sortingIconDescendingTemplate>\n <svg\n class=\"icon icon-custom-size\"\n role=\"img\"\n viewBox=\"0 0 512 512\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <polygon\n class=\"ci-primary\"\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"367.997 338.75 271.999 434.747 271.999 17.503 239.999 17.503 239.999 434.745 144.003 338.75 121.376 361.377 256 496 390.624 361.377 367.997 338.75\"\n ></polygon>\n </svg>\n</ng-template>\n", styles: [":host{-webkit-user-select:none;user-select:none}:host.thead{display:table-header-group;vertical-align:middle;border-color:inherit}:host.tfoot{display:table-footer-group;vertical-align:middle;border-color:inherit}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: TableColorDirective, selector: "[cTableColor]", inputs: ["cTableColor"] }, { kind: "directive", type: FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "directive", type: FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }, { kind: "directive", type: HtmlAttributesDirective, selector: "[cHtmlAttr]", inputs: ["cHtmlAttr"], exportAs: ["cHtmlAttr"] }] });
|
|
13079
|
+
SmartTableHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: SmartTableHeadComponent, selector: "c-smart-table-head", inputs: { columnFilter: "columnFilter", columnFilterState: "columnFilterState", columnSorter: "columnSorter", component: "component", columns: "columns", selectable: "selectable", selectAll: "selectAll", sorterValue: "sorterValue", columnFilterTemplates: "columnFilterTemplates" }, outputs: { columnFilterStateChange: "columnFilterStateChange", sorterStateChange: "sorterStateChange", selectAllChange: "selectAllChange" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<tr>\r\n <th *ngIf=\"selectable\">\r\n <input (change)=\"handleSelectAllChecked($event)\"\r\n [checked]=\"selectAll === true\"\r\n [indeterminate]=\"selectAll === 'indeterminate'\"\r\n cFormCheckInput>\r\n </th>\r\n <th\r\n (click)=\"handleSortClick(column, i)\"\r\n *ngFor=\"let column of columns; let i = index\"\r\n [cHtmlAttr]=\"tableHeaderCellProps(column)\"\r\n [cTableColor]=\"tableHeaderCellColor(column)\"\r\n [ngStyle]=\"tableHeaderCellStyles(column)\"\r\n >\r\n <div class=\"d-inline\">{{ columnLabel(column) }}</div>\r\n <ng-template [ngIf]=\"columnSorter && columnSorterEnabled(column)\">\r\n <ng-container\r\n *ngTemplateOutlet=\"columnSorterIconTemplate; context: { $implicit: getColumnSorterState(column) }\"\r\n ></ng-container>\r\n </ng-template>\r\n </th>\r\n</tr>\r\n<tr *ngIf=\"columnFilter\">\r\n <th *ngIf=\"selectable\"></th>\r\n <th *ngFor=\"let column of columns; let i = index\"\r\n [cHtmlAttr]=\"tableHeaderCellProps(column)\"\r\n [cTableColor]=\"tableHeaderCellColor(column)\"\r\n [ngStyle]=\"tableHeaderCellStyles(column)\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"columnFilterTemplates[getColumnFilter(column)] ?? defaultColumnFilter; context: {$implicit: column, header: this}\"></ng-container>\r\n <ng-template #defaultColumnFilter let-column>\r\n <input\r\n (change)=\"handleColumnFilterValueChange($event, column)\"\r\n (input)=\"handleColumnFilterValueChange($event, column)\"\r\n *ngIf=\"columnFilterEnabled(column)\"\r\n [value]=\"columnFilterState[columnKey(column)] ?? ''\"\r\n cFormControl\r\n sizing=\"sm\"\r\n />\r\n </ng-template>\r\n </th>\r\n</tr>\r\n\r\n<ng-template #columnSorterIconTemplate let-columnSorterState>\r\n <ng-container [ngSwitch]=\"columnSorterState\">\r\n <span *ngSwitchCase=\"'asc'\" class=\"float-end me-1\">\r\n <ng-container *ngTemplateOutlet=\"sortingIconAscendingTemplate\"></ng-container>\r\n </span>\r\n <span *ngSwitchCase=\"'desc'\" class=\"float-end me-1\">\r\n <ng-container *ngTemplateOutlet=\"sortingIconDescendingTemplate\"></ng-container>\r\n </span>\r\n <span *ngSwitchDefault class=\"opacity-25 float-end me-1\">\r\n <ng-container *ngTemplateOutlet=\"sortingIconTemplate\"></ng-container>\r\n </span>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!--todo: sortingIconCustom Templates-->\r\n<ng-template #sortingIconTemplate>\r\n <svg\r\n class=\"icon icon-custom-size\"\r\n role=\"img\"\r\n viewBox=\"0 0 512 512\"\r\n width=\"18\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n >\r\n <polygon\r\n class=\"ci-primary\"\r\n fill=\"var(--ci-primary-color, currentColor)\"\r\n points=\"384 433.373 384 160 352 160 352 434.51 282.177 364.687 259.55 387.313 367.432 495.196 475.313 387.313 452.687 364.687 384 433.373\"\r\n ></polygon>\r\n <polygon\r\n class=\"ci-primary\"\r\n fill=\"var(--ci-primary-color, currentColor)\"\r\n points=\"159.432 17.372 51.55 125.255 74.177 147.882 144 78.059 144 352 176 352 176 79.195 244.687 147.882 267.313 125.255 159.432 17.372\"\r\n ></polygon>\r\n </svg>\r\n</ng-template>\r\n\r\n<ng-template #sortingIconAscendingTemplate>\r\n <svg\r\n class=\"icon icon-custom-size\"\r\n role=\"img\"\r\n viewBox=\"0 0 512 512\"\r\n width=\"18\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n >\r\n <polygon\r\n class=\"ci-primary\"\r\n fill=\"var(--ci-primary-color, currentColor)\"\r\n points=\"390.624 150.625 256 16 121.376 150.625 144.004 173.252 240.001 77.254 240.001 495.236 272.001 495.236 272.001 77.257 367.996 173.252 390.624 150.625\"\r\n ></polygon>\r\n </svg>\r\n</ng-template>\r\n\r\n<ng-template #sortingIconDescendingTemplate>\r\n <svg\r\n class=\"icon icon-custom-size\"\r\n role=\"img\"\r\n viewBox=\"0 0 512 512\"\r\n width=\"18\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n >\r\n <polygon\r\n class=\"ci-primary\"\r\n fill=\"var(--ci-primary-color, currentColor)\"\r\n points=\"367.997 338.75 271.999 434.747 271.999 17.503 239.999 17.503 239.999 434.745 144.003 338.75 121.376 361.377 256 496 390.624 361.377 367.997 338.75\"\r\n ></polygon>\r\n </svg>\r\n</ng-template>\r\n", styles: [":host{-webkit-user-select:none;user-select:none}:host.thead{display:table-header-group;vertical-align:middle;border-color:inherit}:host.tfoot{display:table-footer-group;vertical-align:middle;border-color:inherit}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: TableColorDirective, selector: "[cTableColor]", inputs: ["cTableColor"] }, { kind: "directive", type: FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "directive", type: FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }, { kind: "directive", type: HtmlAttributesDirective, selector: "[cHtmlAttr]", inputs: ["cHtmlAttr"], exportAs: ["cHtmlAttr"] }] });
|
|
13068
13080
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SmartTableHeadComponent, decorators: [{
|
|
13069
13081
|
type: Component,
|
|
13070
|
-
args: [{ selector: 'c-smart-table-head', template: "<tr>\n <th *ngIf=\"selectable\">\n <input (change)=\"handleSelectAllChecked($event)\"\n [checked]=\"selectAll === true\"\n [indeterminate]=\"selectAll === 'indeterminate'\"\n cFormCheckInput>\n </th>\n <th\n (click)=\"handleSortClick(column, i)\"\n *ngFor=\"let column of columns; let i = index\"\n [cHtmlAttr]=\"tableHeaderCellProps(column)\"\n [cTableColor]=\"tableHeaderCellColor(column)\"\n [ngStyle]=\"tableHeaderCellStyles(column)\"\n >\n <div class=\"d-inline\">{{ columnLabel(column) }}</div>\n <ng-template [ngIf]=\"columnSorter && columnSorterEnabled(column)\">\n <ng-container\n *ngTemplateOutlet=\"columnSorterIconTemplate; context: { $implicit: getColumnSorterState(column) }\"\n ></ng-container>\n </ng-template>\n </th>\n</tr>\n<tr *ngIf=\"columnFilter\">\n <th *ngIf=\"selectable\"></th>\n <th *ngFor=\"let column of columns; let i = index\"\n [cHtmlAttr]=\"tableHeaderCellProps(column)\"\n [cTableColor]=\"tableHeaderCellColor(column)\"\n [ngStyle]=\"tableHeaderCellStyles(column)\"\n >\n <ng-container *ngTemplateOutlet=\"columnFilterTemplates[getColumnFilter(column)] ?? defaultColumnFilter; context: {$implicit: column, header: this}\"></ng-container>\n <ng-template #defaultColumnFilter let-column>\n <input\n (change)=\"handleColumnFilterValueChange($event, column)\"\n (input)=\"handleColumnFilterValueChange($event, column)\"\n *ngIf=\"columnFilterEnabled(column)\"\n [value]=\"columnFilterState[columnKey(column)] ?? ''\"\n cFormControl\n sizing=\"sm\"\n />\n </ng-template>\n </th>\n</tr>\n\n<ng-template #columnSorterIconTemplate let-columnSorterState>\n <ng-container [ngSwitch]=\"columnSorterState\">\n <span *ngSwitchCase=\"'asc'\" class=\"float-end me-1\">\n <ng-container *ngTemplateOutlet=\"sortingIconAscendingTemplate\"></ng-container>\n </span>\n <span *ngSwitchCase=\"'desc'\" class=\"float-end me-1\">\n <ng-container *ngTemplateOutlet=\"sortingIconDescendingTemplate\"></ng-container>\n </span>\n <span *ngSwitchDefault class=\"opacity-25 float-end me-1\">\n <ng-container *ngTemplateOutlet=\"sortingIconTemplate\"></ng-container>\n </span>\n </ng-container>\n</ng-template>\n\n<!--todo: sortingIconCustom Templates-->\n<ng-template #sortingIconTemplate>\n <svg\n class=\"icon icon-custom-size\"\n role=\"img\"\n viewBox=\"0 0 512 512\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <polygon\n class=\"ci-primary\"\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"384 433.373 384 160 352 160 352 434.51 282.177 364.687 259.55 387.313 367.432 495.196 475.313 387.313 452.687 364.687 384 433.373\"\n ></polygon>\n <polygon\n class=\"ci-primary\"\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"159.432 17.372 51.55 125.255 74.177 147.882 144 78.059 144 352 176 352 176 79.195 244.687 147.882 267.313 125.255 159.432 17.372\"\n ></polygon>\n </svg>\n</ng-template>\n\n<ng-template #sortingIconAscendingTemplate>\n <svg\n class=\"icon icon-custom-size\"\n role=\"img\"\n viewBox=\"0 0 512 512\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <polygon\n class=\"ci-primary\"\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"390.624 150.625 256 16 121.376 150.625 144.004 173.252 240.001 77.254 240.001 495.236 272.001 495.236 272.001 77.257 367.996 173.252 390.624 150.625\"\n ></polygon>\n </svg>\n</ng-template>\n\n<ng-template #sortingIconDescendingTemplate>\n <svg\n class=\"icon icon-custom-size\"\n role=\"img\"\n viewBox=\"0 0 512 512\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <polygon\n class=\"ci-primary\"\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"367.997 338.75 271.999 434.747 271.999 17.503 239.999 17.503 239.999 434.745 144.003 338.75 121.376 361.377 256 496 390.624 361.377 367.997 338.75\"\n ></polygon>\n </svg>\n</ng-template>\n", styles: [":host{-webkit-user-select:none;user-select:none}:host.thead{display:table-header-group;vertical-align:middle;border-color:inherit}:host.tfoot{display:table-footer-group;vertical-align:middle;border-color:inherit}\n"] }]
|
|
13082
|
+
args: [{ selector: 'c-smart-table-head', template: "<tr>\r\n <th *ngIf=\"selectable\">\r\n <input (change)=\"handleSelectAllChecked($event)\"\r\n [checked]=\"selectAll === true\"\r\n [indeterminate]=\"selectAll === 'indeterminate'\"\r\n cFormCheckInput>\r\n </th>\r\n <th\r\n (click)=\"handleSortClick(column, i)\"\r\n *ngFor=\"let column of columns; let i = index\"\r\n [cHtmlAttr]=\"tableHeaderCellProps(column)\"\r\n [cTableColor]=\"tableHeaderCellColor(column)\"\r\n [ngStyle]=\"tableHeaderCellStyles(column)\"\r\n >\r\n <div class=\"d-inline\">{{ columnLabel(column) }}</div>\r\n <ng-template [ngIf]=\"columnSorter && columnSorterEnabled(column)\">\r\n <ng-container\r\n *ngTemplateOutlet=\"columnSorterIconTemplate; context: { $implicit: getColumnSorterState(column) }\"\r\n ></ng-container>\r\n </ng-template>\r\n </th>\r\n</tr>\r\n<tr *ngIf=\"columnFilter\">\r\n <th *ngIf=\"selectable\"></th>\r\n <th *ngFor=\"let column of columns; let i = index\"\r\n [cHtmlAttr]=\"tableHeaderCellProps(column)\"\r\n [cTableColor]=\"tableHeaderCellColor(column)\"\r\n [ngStyle]=\"tableHeaderCellStyles(column)\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"columnFilterTemplates[getColumnFilter(column)] ?? defaultColumnFilter; context: {$implicit: column, header: this}\"></ng-container>\r\n <ng-template #defaultColumnFilter let-column>\r\n <input\r\n (change)=\"handleColumnFilterValueChange($event, column)\"\r\n (input)=\"handleColumnFilterValueChange($event, column)\"\r\n *ngIf=\"columnFilterEnabled(column)\"\r\n [value]=\"columnFilterState[columnKey(column)] ?? ''\"\r\n cFormControl\r\n sizing=\"sm\"\r\n />\r\n </ng-template>\r\n </th>\r\n</tr>\r\n\r\n<ng-template #columnSorterIconTemplate let-columnSorterState>\r\n <ng-container [ngSwitch]=\"columnSorterState\">\r\n <span *ngSwitchCase=\"'asc'\" class=\"float-end me-1\">\r\n <ng-container *ngTemplateOutlet=\"sortingIconAscendingTemplate\"></ng-container>\r\n </span>\r\n <span *ngSwitchCase=\"'desc'\" class=\"float-end me-1\">\r\n <ng-container *ngTemplateOutlet=\"sortingIconDescendingTemplate\"></ng-container>\r\n </span>\r\n <span *ngSwitchDefault class=\"opacity-25 float-end me-1\">\r\n <ng-container *ngTemplateOutlet=\"sortingIconTemplate\"></ng-container>\r\n </span>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!--todo: sortingIconCustom Templates-->\r\n<ng-template #sortingIconTemplate>\r\n <svg\r\n class=\"icon icon-custom-size\"\r\n role=\"img\"\r\n viewBox=\"0 0 512 512\"\r\n width=\"18\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n >\r\n <polygon\r\n class=\"ci-primary\"\r\n fill=\"var(--ci-primary-color, currentColor)\"\r\n points=\"384 433.373 384 160 352 160 352 434.51 282.177 364.687 259.55 387.313 367.432 495.196 475.313 387.313 452.687 364.687 384 433.373\"\r\n ></polygon>\r\n <polygon\r\n class=\"ci-primary\"\r\n fill=\"var(--ci-primary-color, currentColor)\"\r\n points=\"159.432 17.372 51.55 125.255 74.177 147.882 144 78.059 144 352 176 352 176 79.195 244.687 147.882 267.313 125.255 159.432 17.372\"\r\n ></polygon>\r\n </svg>\r\n</ng-template>\r\n\r\n<ng-template #sortingIconAscendingTemplate>\r\n <svg\r\n class=\"icon icon-custom-size\"\r\n role=\"img\"\r\n viewBox=\"0 0 512 512\"\r\n width=\"18\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n >\r\n <polygon\r\n class=\"ci-primary\"\r\n fill=\"var(--ci-primary-color, currentColor)\"\r\n points=\"390.624 150.625 256 16 121.376 150.625 144.004 173.252 240.001 77.254 240.001 495.236 272.001 495.236 272.001 77.257 367.996 173.252 390.624 150.625\"\r\n ></polygon>\r\n </svg>\r\n</ng-template>\r\n\r\n<ng-template #sortingIconDescendingTemplate>\r\n <svg\r\n class=\"icon icon-custom-size\"\r\n role=\"img\"\r\n viewBox=\"0 0 512 512\"\r\n width=\"18\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n >\r\n <polygon\r\n class=\"ci-primary\"\r\n fill=\"var(--ci-primary-color, currentColor)\"\r\n points=\"367.997 338.75 271.999 434.747 271.999 17.503 239.999 17.503 239.999 434.745 144.003 338.75 121.376 361.377 256 496 390.624 361.377 367.997 338.75\"\r\n ></polygon>\r\n </svg>\r\n</ng-template>\r\n", styles: [":host{-webkit-user-select:none;user-select:none}:host.thead{display:table-header-group;vertical-align:middle;border-color:inherit}:host.tfoot{display:table-footer-group;vertical-align:middle;border-color:inherit}\n"] }]
|
|
13071
13083
|
}], ctorParameters: function () { return []; }, propDecorators: { columnFilter: [{
|
|
13072
13084
|
type: Input
|
|
13073
13085
|
}], columnFilterState: [{
|