@coreui/angular-pro 4.2.38 → 4.2.40
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/calendar/calendar.utils.mjs +12 -4
- package/esm2020/lib/form/form-check/form-check-input.directive.mjs +19 -6
- package/esm2020/lib/form/form-check/form-check.component.mjs +23 -7
- package/esm2020/lib/multi-select/multi-select/multi-select.component.mjs +3 -3
- package/esm2020/lib/popover/popover.directive.mjs +28 -6
- package/esm2020/lib/shared/html-attr.directive.mjs +1 -1
- package/esm2020/lib/smart-table/smart-table/smart-table.component.mjs +31 -17
- package/esm2020/lib/smart-table/smart-table-head/smart-table-head.component.mjs +35 -3
- package/esm2020/lib/smart-table/smart-table-items-per-page-selector/smart-table-items-per-page-selector.component.mjs +2 -2
- package/esm2020/lib/smart-table/smart-table.type.mjs +1 -1
- package/fesm2015/coreui-angular-pro.mjs +169 -69
- package/fesm2015/coreui-angular-pro.mjs.map +1 -1
- package/fesm2020/coreui-angular-pro.mjs +165 -67
- package/fesm2020/coreui-angular-pro.mjs.map +1 -1
- package/lib/form/form-check/form-check-input.directive.d.ts +3 -1
- package/lib/form/form-check/form-check.component.d.ts +16 -6
- package/lib/popover/popover.directive.d.ts +8 -3
- package/lib/shared/html-attr.directive.d.ts +1 -1
- package/lib/smart-table/smart-table/smart-table.component.d.ts +14 -11
- package/lib/smart-table/smart-table-head/smart-table-head.component.d.ts +12 -6
- package/lib/smart-table/smart-table.type.d.ts +6 -0
- package/package.json +5 -2
|
@@ -1557,8 +1557,9 @@ const getLocalDateFromString = (string, locale, time) => {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
const rgx = RegExp(`${regex}`);
|
|
1559
1559
|
const partials = string.match(rgx);
|
|
1560
|
-
if (partials === null)
|
|
1560
|
+
if (partials === null) {
|
|
1561
1561
|
return;
|
|
1562
|
+
}
|
|
1562
1563
|
const newDate = partials.groups && (time ? new Date(Number(partials.groups['year']), Number(partials.groups['month']) - 1, Number(partials.groups['day']), partials.groups['ampm'] ? partials.groups['ampm'] === 'PM' ? Number(partials.groups['hour']) + 12 : Number(partials.groups['hour']) : Number(partials.groups['hour']), Number(partials.groups['minute']), Number(partials.groups['second'])) : new Date(Number(partials.groups['year']), Number(partials.groups['month']) - 1, Number(partials.groups['day'])));
|
|
1563
1564
|
return newDate;
|
|
1564
1565
|
};
|
|
@@ -1639,8 +1640,12 @@ const getMonthDetails = (year, month, firstDayOfWeek) => {
|
|
|
1639
1640
|
return weeks;
|
|
1640
1641
|
};
|
|
1641
1642
|
const isDateDisabled = (date, min, max, dates) => {
|
|
1642
|
-
if (!date)
|
|
1643
|
-
return;
|
|
1643
|
+
if (!date) {
|
|
1644
|
+
return false;
|
|
1645
|
+
}
|
|
1646
|
+
if (!min && !max && (!dates || !dates.length)) {
|
|
1647
|
+
return false;
|
|
1648
|
+
}
|
|
1644
1649
|
let disabled;
|
|
1645
1650
|
if (dates) {
|
|
1646
1651
|
dates.forEach((_date) => {
|
|
@@ -1718,6 +1723,9 @@ const tryDate = (value, propName = 'date') => {
|
|
|
1718
1723
|
return _value;
|
|
1719
1724
|
};
|
|
1720
1725
|
const isDateInRangeDisabled = (startDate, endDate, dates) => {
|
|
1726
|
+
if (!dates || !dates.length) {
|
|
1727
|
+
return false;
|
|
1728
|
+
}
|
|
1721
1729
|
if (startDate && endDate) {
|
|
1722
1730
|
const date = new Date(startDate);
|
|
1723
1731
|
let disabled = false;
|
|
@@ -6804,6 +6812,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
6804
6812
|
class FormCheckComponent {
|
|
6805
6813
|
constructor() {
|
|
6806
6814
|
this._inline = false;
|
|
6815
|
+
this._reverse = false;
|
|
6807
6816
|
/**
|
|
6808
6817
|
* Size the component large or extra large. Works only with `[switch]="true"` [docs]
|
|
6809
6818
|
* @type {'lg' | 'xl' | ''}
|
|
@@ -6824,10 +6833,22 @@ class FormCheckComponent {
|
|
|
6824
6833
|
return this._inline;
|
|
6825
6834
|
}
|
|
6826
6835
|
/**
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6836
|
+
* Put checkboxes or radios on the opposite side.
|
|
6837
|
+
* @type boolean
|
|
6838
|
+
* @default false
|
|
6839
|
+
* @since 4.4.7
|
|
6840
|
+
*/
|
|
6841
|
+
set reverse(value) {
|
|
6842
|
+
this._reverse = coerceBooleanProperty(value);
|
|
6843
|
+
}
|
|
6844
|
+
get reverse() {
|
|
6845
|
+
return this._reverse;
|
|
6846
|
+
}
|
|
6847
|
+
/**
|
|
6848
|
+
* Render a toggle switch on for checkbox.
|
|
6849
|
+
* @type boolean
|
|
6850
|
+
* @default false
|
|
6851
|
+
*/
|
|
6831
6852
|
set switch(value) {
|
|
6832
6853
|
this._switch = coerceBooleanProperty(value);
|
|
6833
6854
|
}
|
|
@@ -6839,7 +6860,8 @@ class FormCheckComponent {
|
|
|
6839
6860
|
'form-check': this.formCheckClass,
|
|
6840
6861
|
'form-switch': this.switch,
|
|
6841
6862
|
[`form-switch-${this.sizing}`]: this.switch && !!this.sizing,
|
|
6842
|
-
'form-check-inline': this.inline
|
|
6863
|
+
'form-check-inline': this.inline,
|
|
6864
|
+
'form-check-reverse': this.reverse
|
|
6843
6865
|
};
|
|
6844
6866
|
}
|
|
6845
6867
|
get formCheckClass() {
|
|
@@ -6850,7 +6872,7 @@ class FormCheckComponent {
|
|
|
6850
6872
|
}
|
|
6851
6873
|
}
|
|
6852
6874
|
FormCheckComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormCheckComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6853
|
-
FormCheckComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormCheckComponent, selector: "c-form-check", inputs: { inline: "inline", sizing: "sizing", switch: "switch" }, host: { properties: { "class": "this.hostClasses" } }, queries: [{ propertyName: "formCheckLabel", first: true, predicate: FormCheckLabelDirective, descendants: true }], exportAs: ["cFormCheck"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
6875
|
+
FormCheckComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormCheckComponent, selector: "c-form-check", inputs: { inline: "inline", reverse: "reverse", sizing: "sizing", switch: "switch" }, host: { properties: { "class": "this.hostClasses" } }, queries: [{ propertyName: "formCheckLabel", first: true, predicate: FormCheckLabelDirective, descendants: true }], exportAs: ["cFormCheck"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
6854
6876
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormCheckComponent, decorators: [{
|
|
6855
6877
|
type: Component,
|
|
6856
6878
|
args: [{
|
|
@@ -6860,6 +6882,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
6860
6882
|
}]
|
|
6861
6883
|
}], propDecorators: { inline: [{
|
|
6862
6884
|
type: Input
|
|
6885
|
+
}], reverse: [{
|
|
6886
|
+
type: Input
|
|
6863
6887
|
}], sizing: [{
|
|
6864
6888
|
type: Input
|
|
6865
6889
|
}], switch: [{
|
|
@@ -6889,10 +6913,14 @@ class FormCheckInputDirective {
|
|
|
6889
6913
|
* @type boolean
|
|
6890
6914
|
*/
|
|
6891
6915
|
set indeterminate(value) {
|
|
6892
|
-
const
|
|
6893
|
-
if (this._indeterminate !==
|
|
6894
|
-
this._indeterminate =
|
|
6895
|
-
this.
|
|
6916
|
+
const indeterminate = coerceBooleanProperty(value);
|
|
6917
|
+
if (this._indeterminate !== indeterminate) {
|
|
6918
|
+
this._indeterminate = indeterminate;
|
|
6919
|
+
const htmlInputElement = this.hostElement.nativeElement;
|
|
6920
|
+
if (indeterminate) {
|
|
6921
|
+
this.renderer.setProperty(htmlInputElement, 'checked', false);
|
|
6922
|
+
}
|
|
6923
|
+
this.renderer.setProperty(htmlInputElement, 'indeterminate', indeterminate);
|
|
6896
6924
|
}
|
|
6897
6925
|
}
|
|
6898
6926
|
;
|
|
@@ -6906,13 +6934,21 @@ class FormCheckInputDirective {
|
|
|
6906
6934
|
'is-invalid': this.valid === false
|
|
6907
6935
|
};
|
|
6908
6936
|
}
|
|
6937
|
+
set checked(value) {
|
|
6938
|
+
var _a;
|
|
6939
|
+
const checked = coerceBooleanProperty(value);
|
|
6940
|
+
const htmlInputElement = (_a = this.hostElement) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
6941
|
+
if (htmlInputElement) {
|
|
6942
|
+
this.renderer.setProperty(htmlInputElement, 'checked', checked);
|
|
6943
|
+
}
|
|
6944
|
+
}
|
|
6909
6945
|
get checked() {
|
|
6910
6946
|
var _a, _b;
|
|
6911
6947
|
return (_b = (_a = this.hostElement) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.checked;
|
|
6912
6948
|
}
|
|
6913
6949
|
}
|
|
6914
6950
|
FormCheckInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormCheckInputDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6915
|
-
FormCheckInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: { type: "type", indeterminate: "indeterminate", valid: "valid" }, host: { properties: { "attr.type": "this.type", "class": "this.hostClasses" } }, ngImport: i0 });
|
|
6951
|
+
FormCheckInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: { type: "type", indeterminate: "indeterminate", valid: "valid", checked: "checked" }, host: { properties: { "attr.type": "this.type", "class": "this.hostClasses" } }, ngImport: i0 });
|
|
6916
6952
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormCheckInputDirective, decorators: [{
|
|
6917
6953
|
type: Directive,
|
|
6918
6954
|
args: [{
|
|
@@ -6930,6 +6966,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
6930
6966
|
}], hostClasses: [{
|
|
6931
6967
|
type: HostBinding,
|
|
6932
6968
|
args: ['class']
|
|
6969
|
+
}], checked: [{
|
|
6970
|
+
type: Input
|
|
6933
6971
|
}] } });
|
|
6934
6972
|
|
|
6935
6973
|
class FormTextDirective {
|
|
@@ -9854,7 +9892,7 @@ MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
9854
9892
|
{
|
|
9855
9893
|
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MultiSelectComponent), multi: true
|
|
9856
9894
|
}
|
|
9857
|
-
], queries: [{ propertyName: "multiSelectOptionsContent", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], viewQueries: [{ propertyName: "optionsElementRef", first: true, predicate: ["options"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true }, { propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }, { propertyName: "dropdownToggle", first: true, predicate: DropdownToggleDirective, descendants: true, read: ElementRef }, { propertyName: "multiSelectOptionsView", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "scrollViewportView", predicate: ["scrollViewport"], descendants: true }], exportAs: ["cMultiSelect"], usesOnChanges: true, ngImport: i0, template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperjsOptions\"\n class=\"picker\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle>\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <ng-container *ngIf=\"(optionsSelected$ | async) as optionTags\">\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n *ngFor=\"let option of optionTags; index as i\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-container>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'counter'\">\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\n <ng-template #pluralMap>\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\n </ng-template>\n </ng-template>\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\n <!-- </ng-template>-->\n </div>\n\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"optionsSelected.size === 0 && selectionType !== 'counter' ? placeholder : null\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"3\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && optionsSelected.size > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" *ngIf=\"!disabled\" [visible]=\"dropdown.visible\" cDropdownMenu>\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0 && options.length > 0\">\n <button (click)=\"selectAllOptions()\"\n *ngIf=\"selectAll && multiple && !virtualScroller\"\n class=\"form-multi-select-all\"\n >\n {{ selectAllLabel }}\n </button>\n <ng-container\n *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\"></ng-container>\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n </div>\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n *ngIf=\"optionsArray$ | async as optionsArray\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden' } : { 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n >\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [selected]=\"option.selected\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{option.text}}\n </c-multi-select-option>\n</ng-template>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline-block}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "dark", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible", "dark"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: i7.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i7.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i7.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: MultiSelectOptionComponent, selector: "c-multi-select-option", inputs: ["optionsStyle", "label", "text", "visible", "disabled", "selected", "value", "active", "role"], outputs: ["selectedChange", "focusChange"], exportAs: ["cMultiSelectOption"] }, { kind: "component", type: MultiSelectTagComponent, selector: "c-multi-select-tag", inputs: ["option", "disabled", "label", "value"], outputs: ["remove"] }, { kind: "directive", type: MultiSelectSearchDirective, selector: "[cMultiSelectSearch]", inputs: ["delay", "value"], outputs: ["valueChange"], exportAs: ["cMultiSelectSearch"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.I18nPluralPipe, name: "i18nPlural" }] });
|
|
9895
|
+
], queries: [{ propertyName: "multiSelectOptionsContent", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], viewQueries: [{ propertyName: "optionsElementRef", first: true, predicate: ["options"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true }, { propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }, { propertyName: "dropdownToggle", first: true, predicate: DropdownToggleDirective, descendants: true, read: ElementRef }, { propertyName: "multiSelectOptionsView", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "scrollViewportView", predicate: ["scrollViewport"], descendants: true }], exportAs: ["cMultiSelect"], usesOnChanges: true, ngImport: i0, template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperjsOptions\"\n class=\"picker\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle>\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <ng-container *ngIf=\"(optionsSelected$ | async) as optionTags\">\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n *ngFor=\"let option of optionTags; index as i\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-container>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'counter'\">\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\n <ng-template #pluralMap>\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\n </ng-template>\n </ng-template>\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\n <!-- </ng-template>-->\n </div>\n\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"optionsSelected.size === 0 && selectionType !== 'counter' ? placeholder : null\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"3\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && optionsSelected.size > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" *ngIf=\"!disabled\" [visible]=\"dropdown.visible\" cDropdownMenu>\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0 && options.length > 0\">\n <button (click)=\"selectAllOptions()\"\n *ngIf=\"selectAll && multiple && !virtualScroller\"\n class=\"form-multi-select-all\"\n >\n {{ selectAllLabel }}\n </button>\n <ng-container\n *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\"></ng-container>\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n </div>\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n *ngIf=\"optionsArray$ | async as optionsArray\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden' } : { 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n >\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{option.text}}\n </c-multi-select-option>\n</ng-template>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline-block}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "dark", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible", "dark"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: i7.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i7.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i7.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: MultiSelectOptionComponent, selector: "c-multi-select-option", inputs: ["optionsStyle", "label", "text", "visible", "disabled", "selected", "value", "active", "role"], outputs: ["selectedChange", "focusChange"], exportAs: ["cMultiSelectOption"] }, { kind: "component", type: MultiSelectTagComponent, selector: "c-multi-select-tag", inputs: ["option", "disabled", "label", "value"], outputs: ["remove"] }, { kind: "directive", type: MultiSelectSearchDirective, selector: "[cMultiSelectSearch]", inputs: ["delay", "value"], outputs: ["valueChange"], exportAs: ["cMultiSelectSearch"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.I18nPluralPipe, name: "i18nPlural" }] });
|
|
9858
9896
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MultiSelectComponent, decorators: [{
|
|
9859
9897
|
type: Component,
|
|
9860
9898
|
args: [{ selector: 'c-multi-select', exportAs: 'cMultiSelect', providers: [
|
|
@@ -9862,7 +9900,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
9862
9900
|
{
|
|
9863
9901
|
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MultiSelectComponent), multi: true
|
|
9864
9902
|
}
|
|
9865
|
-
], template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperjsOptions\"\n class=\"picker\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle>\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <ng-container *ngIf=\"(optionsSelected$ | async) as optionTags\">\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n *ngFor=\"let option of optionTags; index as i\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-container>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'counter'\">\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\n <ng-template #pluralMap>\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\n </ng-template>\n </ng-template>\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\n <!-- </ng-template>-->\n </div>\n\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"optionsSelected.size === 0 && selectionType !== 'counter' ? placeholder : null\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"3\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && optionsSelected.size > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" *ngIf=\"!disabled\" [visible]=\"dropdown.visible\" cDropdownMenu>\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0 && options.length > 0\">\n <button (click)=\"selectAllOptions()\"\n *ngIf=\"selectAll && multiple && !virtualScroller\"\n class=\"form-multi-select-all\"\n >\n {{ selectAllLabel }}\n </button>\n <ng-container\n *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\"></ng-container>\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n </div>\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n *ngIf=\"optionsArray$ | async as optionsArray\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden' } : { 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n >\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [
|
|
9903
|
+
], template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperjsOptions\"\n class=\"picker\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle>\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <ng-container *ngIf=\"(optionsSelected$ | async) as optionTags\">\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n *ngFor=\"let option of optionTags; index as i\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-container>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'counter'\">\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\n <ng-template #pluralMap>\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\n </ng-template>\n </ng-template>\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\n <!-- </ng-template>-->\n </div>\n\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"optionsSelected.size === 0 && selectionType !== 'counter' ? placeholder : null\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"3\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && optionsSelected.size > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" *ngIf=\"!disabled\" [visible]=\"dropdown.visible\" cDropdownMenu>\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0 && options.length > 0\">\n <button (click)=\"selectAllOptions()\"\n *ngIf=\"selectAll && multiple && !virtualScroller\"\n class=\"form-multi-select-all\"\n >\n {{ selectAllLabel }}\n </button>\n <ng-container\n *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\"></ng-container>\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n </div>\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n *ngIf=\"optionsArray$ | async as optionsArray\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden' } : { 'minWidth.px': itemMinWidth ?? 196, overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n >\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{option.text}}\n </c-multi-select-option>\n</ng-template>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline-block}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"] }]
|
|
9866
9904
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: i1$3.FocusMonitor }, { type: MultiSelectService }, { type: i0.IterableDiffers }]; }, propDecorators: { cleaner: [{
|
|
9867
9905
|
type: Input
|
|
9868
9906
|
}], disabled: [{
|
|
@@ -11791,14 +11829,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
11791
11829
|
args: ['class']
|
|
11792
11830
|
}] } });
|
|
11793
11831
|
|
|
11832
|
+
class ClassToggleService {
|
|
11833
|
+
constructor(document, rendererFactory) {
|
|
11834
|
+
this.document = document;
|
|
11835
|
+
this.rendererFactory = rendererFactory;
|
|
11836
|
+
this.renderer = rendererFactory.createRenderer(null, null);
|
|
11837
|
+
}
|
|
11838
|
+
toggle(selector, className) {
|
|
11839
|
+
const element = document.querySelector(selector);
|
|
11840
|
+
if (element) {
|
|
11841
|
+
element.classList.contains(className) ?
|
|
11842
|
+
this.renderer.removeClass(element, className) :
|
|
11843
|
+
this.renderer.addClass(element, className);
|
|
11844
|
+
}
|
|
11845
|
+
}
|
|
11846
|
+
}
|
|
11847
|
+
ClassToggleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ClassToggleService, deps: [{ token: DOCUMENT }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11848
|
+
ClassToggleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ClassToggleService, providedIn: 'root' });
|
|
11849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ClassToggleService, decorators: [{
|
|
11850
|
+
type: Injectable,
|
|
11851
|
+
args: [{
|
|
11852
|
+
providedIn: 'root'
|
|
11853
|
+
}]
|
|
11854
|
+
}], ctorParameters: function () {
|
|
11855
|
+
return [{ type: undefined, decorators: [{
|
|
11856
|
+
type: Inject,
|
|
11857
|
+
args: [DOCUMENT]
|
|
11858
|
+
}] }, { type: i0.RendererFactory2 }];
|
|
11859
|
+
} });
|
|
11860
|
+
|
|
11794
11861
|
class PopoverDirective {
|
|
11795
|
-
constructor(document, renderer, hostElement, viewContainerRef, listenersService, changeDetectorRef) {
|
|
11862
|
+
constructor(document, renderer, hostElement, viewContainerRef, listenersService, changeDetectorRef, intersectionService) {
|
|
11796
11863
|
this.document = document;
|
|
11797
11864
|
this.renderer = renderer;
|
|
11798
11865
|
this.hostElement = hostElement;
|
|
11799
11866
|
this.viewContainerRef = viewContainerRef;
|
|
11800
11867
|
this.listenersService = listenersService;
|
|
11801
11868
|
this.changeDetectorRef = changeDetectorRef;
|
|
11869
|
+
this.intersectionService = intersectionService;
|
|
11802
11870
|
/**
|
|
11803
11871
|
* Content of popover
|
|
11804
11872
|
* @type {string | TemplateRef}
|
|
@@ -11848,6 +11916,10 @@ class PopoverDirective {
|
|
|
11848
11916
|
get ariaDescribedBy() {
|
|
11849
11917
|
return this.popoverId ? this.popoverId : null;
|
|
11850
11918
|
}
|
|
11919
|
+
ngAfterViewInit() {
|
|
11920
|
+
this.intersectionService.createIntersectionObserver(this.hostElement);
|
|
11921
|
+
this.intersectionServiceSubscribe();
|
|
11922
|
+
}
|
|
11851
11923
|
ngOnChanges(changes) {
|
|
11852
11924
|
if (changes['visible']) {
|
|
11853
11925
|
changes['visible'].currentValue ? this.addPopoverElement() : this.removePopoverElement();
|
|
@@ -11856,6 +11928,7 @@ class PopoverDirective {
|
|
|
11856
11928
|
ngOnDestroy() {
|
|
11857
11929
|
this.clearListeners();
|
|
11858
11930
|
this.destroyPopoverElement();
|
|
11931
|
+
this.intersectionServiceSubscribe(false);
|
|
11859
11932
|
}
|
|
11860
11933
|
ngOnInit() {
|
|
11861
11934
|
this.setListeners();
|
|
@@ -11882,6 +11955,20 @@ class PopoverDirective {
|
|
|
11882
11955
|
clearListeners() {
|
|
11883
11956
|
this.listenersService.clearListeners();
|
|
11884
11957
|
}
|
|
11958
|
+
intersectionServiceSubscribe(subscribe = true) {
|
|
11959
|
+
var _a;
|
|
11960
|
+
if (subscribe) {
|
|
11961
|
+
this.intersectingSubscription = this.intersectionService.intersecting$
|
|
11962
|
+
.pipe(debounceTime(100))
|
|
11963
|
+
.subscribe(isIntersecting => {
|
|
11964
|
+
this.visible = isIntersecting ? this.visible : false;
|
|
11965
|
+
!this.visible && this.removePopoverElement();
|
|
11966
|
+
});
|
|
11967
|
+
}
|
|
11968
|
+
else {
|
|
11969
|
+
(_a = this.intersectingSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
11970
|
+
}
|
|
11971
|
+
}
|
|
11885
11972
|
getUID(prefix) {
|
|
11886
11973
|
let uid = prefix !== null && prefix !== void 0 ? prefix : 'random-id';
|
|
11887
11974
|
do {
|
|
@@ -11950,20 +12037,20 @@ class PopoverDirective {
|
|
|
11950
12037
|
}, 300);
|
|
11951
12038
|
}
|
|
11952
12039
|
}
|
|
11953
|
-
PopoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PopoverDirective, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: ListenersService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
11954
|
-
PopoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: PopoverDirective, selector: "[cPopover]", inputs: { content: ["cPopover", "content"], popperOptions: ["cPopoverOptions", "popperOptions"], placement: ["cPopoverPlacement", "placement"], trigger: ["cPopoverTrigger", "trigger"], visible: ["cPopoverVisible", "visible"] }, host: { properties: { "attr.aria-describedby": "this.ariaDescribedBy" } }, providers: [ListenersService], exportAs: ["cPopover"], usesOnChanges: true, ngImport: i0 });
|
|
12040
|
+
PopoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PopoverDirective, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: ListenersService }, { token: i0.ChangeDetectorRef }, { token: IntersectionService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
12041
|
+
PopoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: PopoverDirective, selector: "[cPopover]", inputs: { content: ["cPopover", "content"], popperOptions: ["cPopoverOptions", "popperOptions"], placement: ["cPopoverPlacement", "placement"], trigger: ["cPopoverTrigger", "trigger"], visible: ["cPopoverVisible", "visible"] }, host: { properties: { "attr.aria-describedby": "this.ariaDescribedBy" } }, providers: [ListenersService, IntersectionService], exportAs: ["cPopover"], usesOnChanges: true, ngImport: i0 });
|
|
11955
12042
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PopoverDirective, decorators: [{
|
|
11956
12043
|
type: Directive,
|
|
11957
12044
|
args: [{
|
|
11958
12045
|
selector: '[cPopover]',
|
|
11959
12046
|
exportAs: 'cPopover',
|
|
11960
|
-
providers: [ListenersService]
|
|
12047
|
+
providers: [ListenersService, IntersectionService],
|
|
11961
12048
|
}]
|
|
11962
12049
|
}], ctorParameters: function () {
|
|
11963
12050
|
return [{ type: Document, decorators: [{
|
|
11964
12051
|
type: Inject,
|
|
11965
12052
|
args: [DOCUMENT]
|
|
11966
|
-
}] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: ListenersService }, { type: i0.ChangeDetectorRef }];
|
|
12053
|
+
}] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: ListenersService }, { type: i0.ChangeDetectorRef }, { type: IntersectionService }];
|
|
11967
12054
|
}, propDecorators: { content: [{
|
|
11968
12055
|
type: Input,
|
|
11969
12056
|
args: ['cPopover']
|
|
@@ -12206,35 +12293,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
12206
12293
|
}]
|
|
12207
12294
|
}] });
|
|
12208
12295
|
|
|
12209
|
-
class ClassToggleService {
|
|
12210
|
-
constructor(document, rendererFactory) {
|
|
12211
|
-
this.document = document;
|
|
12212
|
-
this.rendererFactory = rendererFactory;
|
|
12213
|
-
this.renderer = rendererFactory.createRenderer(null, null);
|
|
12214
|
-
}
|
|
12215
|
-
toggle(selector, className) {
|
|
12216
|
-
const element = document.querySelector(selector);
|
|
12217
|
-
if (element) {
|
|
12218
|
-
element.classList.contains(className) ?
|
|
12219
|
-
this.renderer.removeClass(element, className) :
|
|
12220
|
-
this.renderer.addClass(element, className);
|
|
12221
|
-
}
|
|
12222
|
-
}
|
|
12223
|
-
}
|
|
12224
|
-
ClassToggleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ClassToggleService, deps: [{ token: DOCUMENT }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12225
|
-
ClassToggleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ClassToggleService, providedIn: 'root' });
|
|
12226
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ClassToggleService, decorators: [{
|
|
12227
|
-
type: Injectable,
|
|
12228
|
-
args: [{
|
|
12229
|
-
providedIn: 'root'
|
|
12230
|
-
}]
|
|
12231
|
-
}], ctorParameters: function () {
|
|
12232
|
-
return [{ type: undefined, decorators: [{
|
|
12233
|
-
type: Inject,
|
|
12234
|
-
args: [DOCUMENT]
|
|
12235
|
-
}] }, { type: i0.RendererFactory2 }];
|
|
12236
|
-
} });
|
|
12237
|
-
|
|
12238
12296
|
class SidebarService {
|
|
12239
12297
|
constructor() {
|
|
12240
12298
|
this.sidebarState = new BehaviorSubject({});
|
|
@@ -13877,7 +13935,7 @@ class SmartTableItemsPerPageSelectorComponent {
|
|
|
13877
13935
|
}
|
|
13878
13936
|
_SmartTableItemsPerPageSelectorComponent_itemsPerPage = new WeakMap();
|
|
13879
13937
|
SmartTableItemsPerPageSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartTableItemsPerPageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13880
|
-
SmartTableItemsPerPageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SmartTableItemsPerPageSelectorComponent, selector: "c-smart-table-items-per-page-selector", inputs: { itemsPerPage: "itemsPerPage", itemsPerPageLabel: "itemsPerPageLabel", itemsPerPageOptions: "itemsPerPageOptions" }, outputs: { itemsPerPageChange: "itemsPerPageChange" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<label cLabel=\"col\" class=\"col-sm-auto\">{{itemsPerPageLabel}}</label>\n<div class=\"col-auto\">\n <select [(ngModel)]=\"itemsPerPage\" cSelect name=\"itemsPerPageSelector\">\n <option *ngFor=\"let option of itemsPerPageOptions; let i = index\" [ngValue]=\"option\">{{option}}</option>\n </select>\n</div>\n",
|
|
13938
|
+
SmartTableItemsPerPageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SmartTableItemsPerPageSelectorComponent, selector: "c-smart-table-items-per-page-selector", inputs: { itemsPerPage: "itemsPerPage", itemsPerPageLabel: "itemsPerPageLabel", itemsPerPageOptions: "itemsPerPageOptions" }, outputs: { itemsPerPageChange: "itemsPerPageChange" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<label cLabel=\"col\" class=\"col-sm-auto\">{{itemsPerPageLabel}}</label>\n<div class=\"col-auto\">\n <select [(ngModel)]=\"itemsPerPage\" cSelect name=\"itemsPerPageSelector\">\n <option *ngFor=\"let option of itemsPerPageOptions; let i = index\" [ngValue]=\"option\">{{option}}</option>\n </select>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: FormLabelDirective, selector: "[cLabel]", inputs: ["cLabel", "sizing"] }, { kind: "directive", type: FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
13881
13939
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartTableItemsPerPageSelectorComponent, decorators: [{
|
|
13882
13940
|
type: Component,
|
|
13883
13941
|
args: [{ selector: 'c-smart-table-items-per-page-selector', template: "<label cLabel=\"col\" class=\"col-sm-auto\">{{itemsPerPageLabel}}</label>\n<div class=\"col-auto\">\n <select [(ngModel)]=\"itemsPerPage\" cSelect name=\"itemsPerPageSelector\">\n <option *ngFor=\"let option of itemsPerPageOptions; let i = index\" [ngValue]=\"option\">{{option}}</option>\n </select>\n</div>\n" }]
|
|
@@ -13918,20 +13976,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
13918
13976
|
type: Input
|
|
13919
13977
|
}] } });
|
|
13920
13978
|
|
|
13979
|
+
var _SmartTableHeadComponent_selectAll, _SmartTableHeadComponent_selectedAllPreviousValue, _SmartTableHeadComponent_selectedAll;
|
|
13921
13980
|
class SmartTableHeadComponent {
|
|
13922
13981
|
constructor() {
|
|
13923
13982
|
this.columnFilterState = {};
|
|
13924
13983
|
this.columnSorter = true;
|
|
13925
13984
|
this.component = 'thead';
|
|
13985
|
+
_SmartTableHeadComponent_selectAll.set(this, true);
|
|
13986
|
+
_SmartTableHeadComponent_selectedAllPreviousValue.set(this, void 0);
|
|
13987
|
+
_SmartTableHeadComponent_selectedAll.set(this, false);
|
|
13926
13988
|
this._columnFilterTemplates = {};
|
|
13927
13989
|
// todo
|
|
13928
13990
|
// @Input() sortingIcon?: string | TemplateRef<any>;
|
|
13929
13991
|
// @Input() sortingIconAscending?: string | TemplateRef<any>;
|
|
13930
13992
|
// @Input() sortingIconDescending?: string | TemplateRef<any>;
|
|
13993
|
+
this.indeterminate = new BehaviorSubject(false);
|
|
13931
13994
|
this.columnFilterStateChange = new EventEmitter();
|
|
13932
13995
|
this.sorterStateChange = new EventEmitter();
|
|
13933
13996
|
this.selectAllChange = new EventEmitter();
|
|
13934
13997
|
}
|
|
13998
|
+
set selectAll(value) {
|
|
13999
|
+
__classPrivateFieldSet(this, _SmartTableHeadComponent_selectAll, coerceBooleanProperty(value), "f");
|
|
14000
|
+
}
|
|
14001
|
+
;
|
|
14002
|
+
get selectAll() {
|
|
14003
|
+
return __classPrivateFieldGet(this, _SmartTableHeadComponent_selectAll, "f");
|
|
14004
|
+
}
|
|
14005
|
+
set selectedAll(value) {
|
|
14006
|
+
this.indeterminate.next(value === 'indeterminate');
|
|
14007
|
+
__classPrivateFieldSet(this, _SmartTableHeadComponent_selectedAll, value === 'indeterminate' ? false : coerceBooleanProperty(value), "f");
|
|
14008
|
+
if (value !== 'indeterminate') {
|
|
14009
|
+
__classPrivateFieldSet(this, _SmartTableHeadComponent_selectedAllPreviousValue, __classPrivateFieldGet(this, _SmartTableHeadComponent_selectedAll, "f"), "f");
|
|
14010
|
+
}
|
|
14011
|
+
}
|
|
14012
|
+
;
|
|
14013
|
+
get selectedAll() {
|
|
14014
|
+
return __classPrivateFieldGet(this, _SmartTableHeadComponent_selectedAll, "f");
|
|
14015
|
+
}
|
|
13935
14016
|
set columnFilterTemplates(value) {
|
|
13936
14017
|
this._columnFilterTemplates = Object.assign({}, value);
|
|
13937
14018
|
}
|
|
@@ -14033,6 +14114,9 @@ class SmartTableHeadComponent {
|
|
|
14033
14114
|
this.columnFilterStateChange.emit({ column: columnKey, value: columnFilterValue, type: eventType });
|
|
14034
14115
|
}
|
|
14035
14116
|
handleSelectAllChecked($event) {
|
|
14117
|
+
$event.preventDefault();
|
|
14118
|
+
$event.target.checked = !__classPrivateFieldGet(this, _SmartTableHeadComponent_selectedAllPreviousValue, "f");
|
|
14119
|
+
// ($event.target as HTMLInputElement).checked = !this.selectedAll;
|
|
14036
14120
|
const selectAll = $event.target.checked;
|
|
14037
14121
|
this.selectAllChange.emit(selectAll);
|
|
14038
14122
|
}
|
|
@@ -14045,11 +14129,12 @@ class SmartTableHeadComponent {
|
|
|
14045
14129
|
}
|
|
14046
14130
|
;
|
|
14047
14131
|
}
|
|
14132
|
+
_SmartTableHeadComponent_selectAll = new WeakMap(), _SmartTableHeadComponent_selectedAllPreviousValue = new WeakMap(), _SmartTableHeadComponent_selectedAll = new WeakMap();
|
|
14048
14133
|
SmartTableHeadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartTableHeadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14049
|
-
SmartTableHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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
|
|
14134
|
+
SmartTableHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SmartTableHeadComponent, selector: "c-smart-table-head", inputs: { columnFilter: "columnFilter", columnFilterState: "columnFilterState", columnSorter: "columnSorter", component: "component", columns: "columns", selectable: "selectable", selectAll: "selectAll", selectedAll: "selectedAll", 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\n cFormCheckInput\n (change)=\"handleSelectAllChecked($event)\"\n [checked]=\"selectedAll === true\"\n [indeterminate]=\"indeterminate | async\"\n type=\"checkbox\"\n [disabled]=\"!selectAll\"\n autocomplete=\"off\"\n >\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 <ng-template [ngIf]=\"columnSorter && columnSorterEnabled(column)\">\n <ng-container\n *ngTemplateOutlet=\"columnSorterIconTemplate; context: { $implicit: getColumnSorterState(column) }\">\n </ng-container>\n </ng-template>\n <div class=\"d-inline\">{{ columnLabel(column) }}</div>\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\n *ngTemplateOutlet=\"columnFilterTemplates[getColumnFilter(column)] ?? defaultColumnFilter; context: {$implicit: column, header: this}\">\n </ng-container>\n <ng-template #defaultColumnFilter let-column>\n <c-smart-table-column-filter\n (valueChange)=\"handleColumnFilterValueChange($event)\"\n *ngIf=\"columnFilterEnabled(column)\"\n [column]=\"column\"\n [delay]=\"300\"\n [onEvent]=\"columnFilterEvent\"\n [value]=\"columnFilterState[columnKey(column)] ?? ''\"\n cFilterInput\n sizing=\"sm\"\n ></c-smart-table-column-filter>\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 mx-1\">\n <ng-container *ngTemplateOutlet=\"sortingIconAscendingTemplate\"></ng-container>\n </span>\n <span *ngSwitchCase=\"'desc'\" class=\"float-end mx-1\">\n <ng-container *ngTemplateOutlet=\"sortingIconDescendingTemplate\"></ng-container>\n </span>\n <span *ngSwitchDefault class=\"opacity-25 float-end mx-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: FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid", "checked"] }, { kind: "directive", type: HtmlAttributesDirective, selector: "[cHtmlAttr]", inputs: ["cHtmlAttr"], exportAs: ["cHtmlAttr"] }, { kind: "directive", type: FilterInputDirective, selector: "[cFilterInput]", inputs: ["delay", "onEvent", "value"], outputs: ["valueChange"], exportAs: ["cFilterInput"] }, { kind: "component", type: SmartTableColumnFilterComponent, selector: "c-smart-table-column-filter", inputs: ["column", "sizing"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14050
14135
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartTableHeadComponent, decorators: [{
|
|
14051
14136
|
type: Component,
|
|
14052
|
-
args: [{ selector: 'c-smart-table-head', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tr>\n <th *ngIf=\"selectable\">\n <input
|
|
14137
|
+
args: [{ selector: 'c-smart-table-head', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tr>\n <th *ngIf=\"selectable\">\n <input\n cFormCheckInput\n (change)=\"handleSelectAllChecked($event)\"\n [checked]=\"selectedAll === true\"\n [indeterminate]=\"indeterminate | async\"\n type=\"checkbox\"\n [disabled]=\"!selectAll\"\n autocomplete=\"off\"\n >\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 <ng-template [ngIf]=\"columnSorter && columnSorterEnabled(column)\">\n <ng-container\n *ngTemplateOutlet=\"columnSorterIconTemplate; context: { $implicit: getColumnSorterState(column) }\">\n </ng-container>\n </ng-template>\n <div class=\"d-inline\">{{ columnLabel(column) }}</div>\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\n *ngTemplateOutlet=\"columnFilterTemplates[getColumnFilter(column)] ?? defaultColumnFilter; context: {$implicit: column, header: this}\">\n </ng-container>\n <ng-template #defaultColumnFilter let-column>\n <c-smart-table-column-filter\n (valueChange)=\"handleColumnFilterValueChange($event)\"\n *ngIf=\"columnFilterEnabled(column)\"\n [column]=\"column\"\n [delay]=\"300\"\n [onEvent]=\"columnFilterEvent\"\n [value]=\"columnFilterState[columnKey(column)] ?? ''\"\n cFilterInput\n sizing=\"sm\"\n ></c-smart-table-column-filter>\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 mx-1\">\n <ng-container *ngTemplateOutlet=\"sortingIconAscendingTemplate\"></ng-container>\n </span>\n <span *ngSwitchCase=\"'desc'\" class=\"float-end mx-1\">\n <ng-container *ngTemplateOutlet=\"sortingIconDescendingTemplate\"></ng-container>\n </span>\n <span *ngSwitchDefault class=\"opacity-25 float-end mx-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"] }]
|
|
14053
14138
|
}], ctorParameters: function () { return []; }, propDecorators: { columnFilter: [{
|
|
14054
14139
|
type: Input
|
|
14055
14140
|
}], columnFilterState: [{
|
|
@@ -14064,6 +14149,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
14064
14149
|
type: Input
|
|
14065
14150
|
}], selectAll: [{
|
|
14066
14151
|
type: Input
|
|
14152
|
+
}], selectedAll: [{
|
|
14153
|
+
type: Input
|
|
14067
14154
|
}], sorterValue: [{
|
|
14068
14155
|
type: Input
|
|
14069
14156
|
}], columnFilterTemplates: [{
|
|
@@ -14083,6 +14170,7 @@ class SmartTableComponent {
|
|
|
14083
14170
|
constructor(iterableDiffers, keyValueDiffers) {
|
|
14084
14171
|
this.iterableDiffers = iterableDiffers;
|
|
14085
14172
|
this.keyValueDiffers = keyValueDiffers;
|
|
14173
|
+
this.selectedAllSubject = new BehaviorSubject(false);
|
|
14086
14174
|
this._activePage = 1;
|
|
14087
14175
|
this._cleaner = false;
|
|
14088
14176
|
this._clickableRows = false;
|
|
@@ -14096,6 +14184,7 @@ class SmartTableComponent {
|
|
|
14096
14184
|
this.noItemsLabel = 'No items found';
|
|
14097
14185
|
this._pagination = false;
|
|
14098
14186
|
this._selectable = false;
|
|
14187
|
+
this._selectAll = true;
|
|
14099
14188
|
this._sorterValue = {};
|
|
14100
14189
|
this.tableFilterLabel = 'Filter:';
|
|
14101
14190
|
this.tableFilterPlaceholder = 'type string...';
|
|
@@ -14114,12 +14203,14 @@ class SmartTableComponent {
|
|
|
14114
14203
|
this.tableFilterValueChange = new EventEmitter();
|
|
14115
14204
|
this.templates = { tableDetails: null, tableData: null };
|
|
14116
14205
|
this.columnFilterTemplates = {};
|
|
14117
|
-
this._selectedAll = false;
|
|
14118
14206
|
this._columnFiltered = [];
|
|
14119
14207
|
this.itemsDiffer = this.iterableDiffers.find(this.items).create();
|
|
14120
14208
|
this.itemsFilteredDiffer = this.iterableDiffers.find(this._columnFiltered).create();
|
|
14121
14209
|
this.columFilterValueDiffer = this.keyValueDiffers.find(this.columnFilterValue).create();
|
|
14122
14210
|
this.sorterValueDiffer = this.keyValueDiffers.find(this.sorterValue).create();
|
|
14211
|
+
setTimeout(() => {
|
|
14212
|
+
this.selectedAllSubject.next(this.selectedAll);
|
|
14213
|
+
}, 0);
|
|
14123
14214
|
}
|
|
14124
14215
|
set activePage(value) {
|
|
14125
14216
|
this._activePage = coerceNumberProperty(value) || 1;
|
|
@@ -14200,6 +14291,12 @@ class SmartTableComponent {
|
|
|
14200
14291
|
get selectable() {
|
|
14201
14292
|
return this._selectable;
|
|
14202
14293
|
}
|
|
14294
|
+
set selectAll(value) {
|
|
14295
|
+
this._selectAll = coerceBooleanProperty(value);
|
|
14296
|
+
}
|
|
14297
|
+
get selectAll() {
|
|
14298
|
+
return this._selectAll;
|
|
14299
|
+
}
|
|
14203
14300
|
set sorterValue(value) {
|
|
14204
14301
|
if (this.sorterValueDiffer) {
|
|
14205
14302
|
const changes = this.sorterValueDiffer.diff(value);
|
|
@@ -14244,14 +14341,9 @@ class SmartTableComponent {
|
|
|
14244
14341
|
this.columnFilterTemplates = Object.assign({}, this.columnFilterTemplates);
|
|
14245
14342
|
}
|
|
14246
14343
|
get selectedAll() {
|
|
14247
|
-
const selected = this.items.
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
}
|
|
14251
|
-
set selectedAll(value) {
|
|
14252
|
-
const selected = this.items.filter((item) => item._selected === true);
|
|
14253
|
-
this._selectedAll = selected.length === 0 ? false : selected.length === this.items.length ? true : 'indeterminate';
|
|
14254
|
-
this.selectedItemsChange.emit(selected);
|
|
14344
|
+
const selected = this.items.some((item) => item._selected === true);
|
|
14345
|
+
const unselected = this.items.some((item) => item._selected === false);
|
|
14346
|
+
return selected && unselected ? 'indeterminate' : selected;
|
|
14255
14347
|
}
|
|
14256
14348
|
get tableFilterState() {
|
|
14257
14349
|
return this.tableFilterValue ? this.tableFilterValue : '';
|
|
@@ -14457,15 +14549,21 @@ class SmartTableComponent {
|
|
|
14457
14549
|
}
|
|
14458
14550
|
}
|
|
14459
14551
|
handleRowChecked($event, item) {
|
|
14460
|
-
item._selected = $event.target.checked;
|
|
14461
|
-
|
|
14462
|
-
|
|
14552
|
+
item._selected = item._selectable !== false && $event.target.checked;
|
|
14553
|
+
this.selectedItemsChange.emit(this.items.filter((item) => item._selected === true));
|
|
14554
|
+
setTimeout(() => {
|
|
14555
|
+
this.selectedAllSubject.next(this.selectedAll);
|
|
14556
|
+
}, 0);
|
|
14463
14557
|
}
|
|
14464
14558
|
handleSelectAllChange($event) {
|
|
14465
14559
|
this._items = this.items.map((item) => {
|
|
14466
|
-
return Object.assign(Object.assign({}, item), { _selected: $event });
|
|
14560
|
+
return Object.assign(Object.assign({}, item), { _selected: (item._selectable !== false ? $event : !!item._selected) });
|
|
14467
14561
|
});
|
|
14468
|
-
this.
|
|
14562
|
+
this.selectedAllSubject.next($event);
|
|
14563
|
+
setTimeout(() => {
|
|
14564
|
+
this.selectedItemsChange.emit(this.items.filter((item) => item._selected === true));
|
|
14565
|
+
this.selectedAllSubject.next(this.selectedAll);
|
|
14566
|
+
}, 0);
|
|
14469
14567
|
}
|
|
14470
14568
|
tableDataCellProps(item, colName) {
|
|
14471
14569
|
const props = item['_cellProps'] && Object.assign(Object.assign({}, (item['_cellProps']['_all'] && Object.assign({}, item['_cellProps']['_all']))), (item['_cellProps'][colName] && Object.assign({}, item['_cellProps'][colName])));
|
|
@@ -14505,10 +14603,10 @@ class SmartTableComponent {
|
|
|
14505
14603
|
}
|
|
14506
14604
|
}
|
|
14507
14605
|
SmartTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartTableComponent, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Component });
|
|
14508
|
-
SmartTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SmartTableComponent, selector: "c-smart-table", inputs: { activePage: "activePage", cleaner: "cleaner", clickableRows: "clickableRows", columns: "columns", columnFilter: "columnFilter", columnFilterValue: "columnFilterValue", columnSorter: "columnSorter", footer: "footer", header: "header", items: "items", itemsPerPage: "itemsPerPage", itemsPerPageLabel: "itemsPerPageLabel", itemsPerPageOptions: "itemsPerPageOptions", itemsPerPageSelect: "itemsPerPageSelect", loading: "loading", noItemsLabel: "noItemsLabel", pagination: "pagination", selectable: "selectable", sorterValue: "sorterValue", tableFilter: "tableFilter", tableFilterLabel: "tableFilterLabel", tableFilterPlaceholder: "tableFilterPlaceholder", tableFilterValue: "tableFilterValue", tableBodyProps: "tableBodyProps", tableFootProps: "tableFootProps", tableHeadProps: "tableHeadProps", tableProps: "tableProps" }, outputs: { selectedItemsChange: "selectedItemsChange", sorterValueChange: "sorterValueChange", activePageChange: "activePageChange", itemsPerPageChange: "itemsPerPageChange", rowClick: "rowClick", columnFilterValueChange: "columnFilterValueChange", filteredItemsChange: "filteredItemsChange", tableFilterValueChange: "tableFilterValueChange" }, queries: [{ propertyName: "columnTemplates", predicate: TemplateIdDirective }], exportAs: ["cSmartTable"], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"itemsPerPageSelect || tableFilter || cleaner || templates['tableCustomHeader']\" class=\"row my-2 mx-0\">\n <div class=\"col-auto p-0\" *ngIf=\"tableFilter\">\n <ng-container *ngTemplateOutlet=\"tableFilterTemplate\"></ng-container>\n </div>\n <div class=\"col-auto p-0\" *ngIf=\"cleaner\">\n <ng-container *ngTemplateOutlet=\"tableCleanerTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"templates['tableCustomHeader'] || tableCustomHeaderTemplate\"></ng-container>\n\n <ng-template #tableFilterTemplate>\n <c-smart-table-filter\n (valueChange)=\"handleTableFilterChange($event)\"\n *ngIf=\"tableFilter\"\n [delay]=\"300\"\n [filterLabel]=\"tableFilterLabel\"\n [filterPlaceholder]=\"tableFilterPlaceholder\"\n [onEvent]=\"tableFilterEvent\"\n [value]=\"tableFilterState\"\n cFilterInput\n >\n </c-smart-table-filter>\n </ng-template>\n\n <ng-template #tableCleanerTemplate>\n <button\n (click)=\"clean($event)\"\n *ngIf=\"cleaner\"\n [disabled]=\"!isFiltered\"\n [ngClass]=\"{'ms-1': tableFilter}\"\n [tabindex]=\"0\"\n cButton\n variant=\"ghost\"\n color=\"transparent\"\n >\n <ng-container *ngTemplateOutlet=\"filterIconTemplate\"></ng-container>\n </button>\n </ng-template>\n\n <ng-template #tableCustomHeaderTemplate>\n <div class=\"col-auto p-0 ms-auto\">\n <ng-content select=\"[customHeader]\"></ng-content>\n </div>\n </ng-template>\n</div>\n<div class=\"position-relative\">\n <table [align]=\"tableProps?.align\"\n [borderColor]=\"tableProps?.borderColor\"\n [bordered]=\"tableProps?.bordered\"\n [borderless]=\"tableProps?.borderless\"\n [caption]=\"tableProps?.caption\"\n [color]=\"tableProps?.color\"\n [hover]=\"tableProps?.hover\"\n [responsive]=\"tableProps?.responsive\"\n [small]=\"tableProps?.small\"\n [striped]=\"tableProps?.striped\"\n [cHtmlAttr]=\"tableProps?.attributes ?? {}\"\n [cTableColor]=\"tableProps?.color\"\n cTable\n >\n <c-smart-table-head\n (columnFilterStateChange)=\"handleColumnFilterChange($event)\"\n (selectAllChange)=\"handleSelectAllChange($event)\"\n (sorterStateChange)=\"handleSortChange($event)\"\n *ngIf=\"header\"\n [columnFilterState]=\"columnFilterState\"\n [columnFilter]=\"columnFilter\"\n [columns]=\"columns\"\n [selectAll]=\"selectedAll\"\n [selectable]=\"selectable\"\n [columnSorter]=\"columnSorter\"\n [sorterValue]=\"sorterValue\"\n [cHtmlAttr]=\"tableHeadProps?.attributes ?? {}\"\n [cTableColor]=\"tableHeadProps?.color\"\n [cAlign]=\"tableHeadProps?.align\"\n [columnFilterTemplates]=\"columnFilterTemplates\"\n ></c-smart-table-head>\n\n <ng-container *ngTemplateOutlet=\"tbodyDefaultTemplate\"></ng-container>\n\n <c-smart-table-head\n (selectAllChange)=\"handleSelectAllChange($event)\"\n (sorterStateChange)=\"handleSortChange($event)\"\n *ngIf=\"footer\"\n [columns]=\"columns\"\n [selectAll]=\"selectedAll\"\n [selectable]=\"selectable\"\n [columnSorter]=\"columnSorter\"\n [sorterValue]=\"sorterValue\"\n [cHtmlAttr]=\"tableFootProps?.attributes ?? {}\"\n [cTableColor]=\"tableFootProps?.color\"\n [cAlign]=\"tableFootProps?.align\"\n component=\"tfoot\"\n [columnFilterTemplates]=\"columnFilterTemplates\"\n ></c-smart-table-head>\n\n </table>\n <c-element-cover\n *ngIf=\"loading\"\n [boundaries]=\"[\n { sides: ['top'], query: 'td' },\n { sides: ['bottom'], query: 'tbody' }\n ]\"\n ></c-element-cover>\n</div>\n<ng-template [ngIf]=\"pagination || itemsPerPageSelect\">\n <div class=\"row\">\n <div class=\"col\">\n <c-smart-pagination\n (activePageChange)=\"setActivePage($event)\"\n *ngIf=\"pagination && numberOfPages > 1\"\n [activePage]=\"activePage\"\n [pages]=\"numberOfPages\">\n </c-smart-pagination>\n </div>\n <div class=\"col-auto ms-auto\">\n <c-smart-table-items-per-page-selector\n (itemsPerPageChange)=\"handleItemsPerPageChange($event)\"\n *ngIf=\"itemsPerPageSelect\"\n [itemsPerPageLabel]=\"itemsPerPageLabel\"\n [itemsPerPageOptions]=\"itemsPerPageOptions\"\n [itemsPerPage]=\"itemsPerPage\"\n >\n </c-smart-table-items-per-page-selector>\n </div>\n </div>\n</ng-template>\n\n<ng-template #tbodyDefaultTemplate>\n <tbody [cHtmlAttr]=\"tableBodyProps?.attributes ?? {}\"\n [cTableColor]=\"tableBodyProps?.color\"\n [cAlign]=\"tableBodyProps?.align\"\n >\n <ng-template ngFor let-item [ngForOf]=\"currentItems\" let-cnt=\"count\" let-i=\"index\" let-isEven=\"even\" let-isOdd=\"odd\">\n <tr [tabindex]=\"clickableRows ? 0 : -1\"\n [ngStyle]=\"{cursor: clickableRows ? 'pointer' : 'auto'}\"\n (click)=\"handleRowClick({$event, item, i})\"\n [cTableActive]=\"item._props?.active\"\n [cTableColor]=\"item._props?.color\"\n [cAlign]=\"item._props?.align\"\n >\n <td *ngIf=\"selectable\"\n [cTableActive]=\"item?.['_cellProps']?._all?.active\"\n [cTableColor]=\"item?.['_cellProps']?._all?.color\"\n [cAlign]=\"item?.['_cellProps']?._all?.align\"\n >\n <input (change)=\"handleRowChecked($event, item)\" [checked]=\"item._selected ?? false\" cFormCheckInput>\n </td>\n <ng-template ngFor let-columnName [ngForOf]=\"rawColumnNames\" let-i=\"index\">\n <ng-container\n *ngTemplateOutlet=\"templates['tableData'] || columnDefaultTemplate; context: {item, columnName, tdContent: item[columnName] }\"></ng-container>\n </ng-template>\n </tr>\n <ng-template [ngIf]=\"templates['tableDetails']\">\n <!-- <ng-container *ngTemplateOutlet=\"rowDetailsDefaultTemplate\"></ng-container>-->\n <tr>\n <td [colSpan]=\"colspan\" class=\"p-0\" tabindex=\"-1\" [ngStyle]=\"{borderBottomWidth: 0}\"></td>\n </tr>\n <tr class=\"p-0\">\n <td [colSpan]=\"colspan\" class=\"p-0\" [ngStyle]=\"{border: 0}\">\n <ng-container *ngTemplateOutlet=\"templates['tableDetails']; context: {item, index: i}\"></ng-container>\n </td>\n </tr>\n </ng-template>\n </ng-template>\n <ng-container *ngTemplateOutlet=\"noItemsDefaultTemplate\"></ng-container>\n </tbody>\n</ng-template>\n\n<ng-template #columnDefaultTemplate let-item=\"item\" let-columnName=\"columnName\" let-tdContent=\"tdContent\">\n <td\n [cTableActive]=\"tableDataCellProps(item, columnName)?.['active']\"\n [cTableColor]=\"tableDataCellProps(item, columnName)?.color\"\n [cAlign]=\"tableDataCellProps(item, columnName)?.align\"\n [ngClass]=\"tableDataCellClasses(item, columnName)\"\n >\n {{tdContent}}\n </td>\n</ng-template>\n\n<!--<ng-template #rowDetailsDefaultTemplate let-item let-index>-->\n<!-- <tr><td [colSpan]=\"colspan\" class=\"p-0\" tabindex=\"-1\" [ngStyle]=\"{borderBottomWidth: 0}\"></td></tr>-->\n<!-- <tr class=\"p-0\">-->\n<!-- <td [colSpan]=\"colspan\" class=\"p-0\" [ngStyle]=\"{border: 0}\">-->\n<!-- <ng-container *ngTemplateOutlet=\"templates?.tableDetails\"></ng-container>-->\n<!-- </td>-->\n<!-- </tr>-->\n<!--</ng-template>-->\n\n<ng-template #noItemsDefaultTemplate>\n <tr *ngIf=\"!currentItems.length\">\n <td [colSpan]=\"colspan\" class=\"justify-content-center\">{{noItemsLabel}}</td>\n </tr>\n</ng-template>\n\n<!--todo: filterIconCustomTemplate-->\n<ng-template #filterIconTemplate>\n <svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\" pointer-events=\"none\" role=\"img\"\n class=\"icon icon-custom-size\" width=\"18\">\n <polygon\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"40 16 40 53.828 109.024 136 150.815 136 76.896 48 459.51 48 304 242.388 304 401.373 241.373 464 240 464 240 368 208 368 208 496 254.627 496 336 414.627 336 253.612 496 53.612 496 16 40 16\"\n class=\"ci-primary\">\n </polygon>\n <polygon\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"166.403 248.225 226.864 187.763 204.237 165.135 143.775 225.597 83.313 165.135 60.687 187.763 121.148 248.225 60.687 308.687 83.313 331.314 143.775 270.852 204.237 331.314 226.864 308.687 166.403 248.225\"\n class=\"ci-primary\">\n </polygon>\n </svg>\n</ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "component", type: ElementCoverComponent, selector: "c-element-cover, [cElementCover]", inputs: ["boundaries", "opacity"] }, { kind: "directive", type: TableDirective, selector: "table[cTable]", inputs: ["align", "borderColor", "bordered", "borderless", "caption", "color", "hover", "responsive", "small", "striped", "stripedColumns"] }, { kind: "directive", type: TableColorDirective, selector: "[cTableColor]", inputs: ["cTableColor"] }, { kind: "directive", type: TableActiveDirective, selector: "[cTableActive]", inputs: ["cTableActive"] }, { kind: "component", type: SmartPaginationComponent, selector: "c-smart-pagination", inputs: ["activePage", "arrows", "doubleArrows", "dots", "limit", "pages", "firstButton", "lastButton", "nextButton", "previousButton", "align", "size", "role"], outputs: ["activePageChange"], exportAs: ["cSmartPagination"] }, { kind: "directive", type: FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }, { kind: "directive", type: ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "type", "variant"], exportAs: ["cButton"] }, { kind: "directive", type: HtmlAttributesDirective, selector: "[cHtmlAttr]", inputs: ["cHtmlAttr"], exportAs: ["cHtmlAttr"] }, { kind: "directive", type: AlignDirective, selector: "[cAlign]", inputs: ["cAlign"] }, { kind: "component", type: SmartTableFilterComponent, selector: "c-smart-table-filter", inputs: ["filterLabel", "filterPlaceholder", "sizing"] }, { kind: "component", type: SmartTableItemsPerPageSelectorComponent, selector: "c-smart-table-items-per-page-selector", inputs: ["itemsPerPage", "itemsPerPageLabel", "itemsPerPageOptions"], outputs: ["itemsPerPageChange"] }, { kind: "component", type: SmartTableHeadComponent, selector: "c-smart-table-head", inputs: ["columnFilter", "columnFilterState", "columnSorter", "component", "columns", "selectable", "selectAll", "sorterValue", "columnFilterTemplates"], outputs: ["columnFilterStateChange", "sorterStateChange", "selectAllChange"] }, { kind: "directive", type: FilterInputDirective, selector: "[cFilterInput]", inputs: ["delay", "onEvent", "value"], outputs: ["valueChange"], exportAs: ["cFilterInput"] }] });
|
|
14606
|
+
SmartTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SmartTableComponent, selector: "c-smart-table", inputs: { activePage: "activePage", cleaner: "cleaner", clickableRows: "clickableRows", columns: "columns", columnFilter: "columnFilter", columnFilterValue: "columnFilterValue", columnSorter: "columnSorter", footer: "footer", header: "header", items: "items", itemsPerPage: "itemsPerPage", itemsPerPageLabel: "itemsPerPageLabel", itemsPerPageOptions: "itemsPerPageOptions", itemsPerPageSelect: "itemsPerPageSelect", loading: "loading", noItemsLabel: "noItemsLabel", pagination: "pagination", selectable: "selectable", selectAll: "selectAll", sorterValue: "sorterValue", tableFilter: "tableFilter", tableFilterLabel: "tableFilterLabel", tableFilterPlaceholder: "tableFilterPlaceholder", tableFilterValue: "tableFilterValue", tableBodyProps: "tableBodyProps", tableFootProps: "tableFootProps", tableHeadProps: "tableHeadProps", tableProps: "tableProps" }, outputs: { selectedItemsChange: "selectedItemsChange", sorterValueChange: "sorterValueChange", activePageChange: "activePageChange", itemsPerPageChange: "itemsPerPageChange", rowClick: "rowClick", columnFilterValueChange: "columnFilterValueChange", filteredItemsChange: "filteredItemsChange", tableFilterValueChange: "tableFilterValueChange" }, queries: [{ propertyName: "columnTemplates", predicate: TemplateIdDirective }], exportAs: ["cSmartTable"], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"itemsPerPageSelect || tableFilter || cleaner || templates['tableCustomHeader']\" class=\"row my-2 mx-0\">\n <div class=\"col-auto p-0\" *ngIf=\"tableFilter\">\n <ng-container *ngTemplateOutlet=\"tableFilterTemplate\"></ng-container>\n </div>\n <div class=\"col-auto p-0\" *ngIf=\"cleaner\">\n <ng-container *ngTemplateOutlet=\"tableCleanerTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"templates['tableCustomHeader'] || tableCustomHeaderTemplate\"></ng-container>\n\n <ng-template #tableFilterTemplate>\n <c-smart-table-filter\n (valueChange)=\"handleTableFilterChange($event)\"\n *ngIf=\"tableFilter\"\n [delay]=\"300\"\n [filterLabel]=\"tableFilterLabel\"\n [filterPlaceholder]=\"tableFilterPlaceholder\"\n [onEvent]=\"tableFilterEvent\"\n [value]=\"tableFilterState\"\n cFilterInput\n >\n </c-smart-table-filter>\n </ng-template>\n\n <ng-template #tableCleanerTemplate>\n <button\n (click)=\"clean($event)\"\n *ngIf=\"cleaner\"\n [disabled]=\"!isFiltered\"\n [ngClass]=\"{'ms-1': tableFilter}\"\n [tabindex]=\"0\"\n cButton\n variant=\"ghost\"\n color=\"transparent\"\n >\n <ng-container *ngTemplateOutlet=\"filterIconTemplate\"></ng-container>\n </button>\n </ng-template>\n\n <ng-template #tableCustomHeaderTemplate>\n <div class=\"col-auto p-0 ms-auto\">\n <ng-content select=\"[customHeader]\"></ng-content>\n </div>\n </ng-template>\n</div>\n<div class=\"position-relative\">\n <table [align]=\"tableProps?.align\"\n [borderColor]=\"tableProps?.borderColor\"\n [bordered]=\"tableProps?.bordered\"\n [borderless]=\"tableProps?.borderless\"\n [caption]=\"tableProps?.caption\"\n [color]=\"tableProps?.color\"\n [hover]=\"tableProps?.hover\"\n [responsive]=\"tableProps?.responsive\"\n [small]=\"tableProps?.small\"\n [striped]=\"tableProps?.striped\"\n [cHtmlAttr]=\"tableProps?.attributes ?? {}\"\n [cTableColor]=\"tableProps?.color\"\n cTable\n >\n <c-smart-table-head\n (columnFilterStateChange)=\"handleColumnFilterChange($event)\"\n (selectAllChange)=\"handleSelectAllChange($event)\"\n (sorterStateChange)=\"handleSortChange($event)\"\n *ngIf=\"header\"\n [columnFilterState]=\"columnFilterState\"\n [columnFilter]=\"columnFilter\"\n [columns]=\"columns\"\n [selectAll]=\"selectAll\"\n [selectedAll]=\"(selectedAllSubject | async) ?? false\"\n [selectable]=\"selectable\"\n [columnSorter]=\"columnSorter\"\n [sorterValue]=\"sorterValue\"\n [cHtmlAttr]=\"tableHeadProps?.attributes ?? {}\"\n [cTableColor]=\"tableHeadProps?.color\"\n [cAlign]=\"tableHeadProps?.align\"\n [columnFilterTemplates]=\"columnFilterTemplates\"\n ></c-smart-table-head>\n\n <ng-container *ngTemplateOutlet=\"tbodyDefaultTemplate\"></ng-container>\n\n <c-smart-table-head\n (selectAllChange)=\"handleSelectAllChange($event)\"\n (sorterStateChange)=\"handleSortChange($event)\"\n *ngIf=\"footer\"\n [columns]=\"columns\"\n [selectAll]=\"selectAll\"\n [selectedAll]=\"(selectedAllSubject | async) ?? false\"\n [selectable]=\"selectable\"\n [columnSorter]=\"columnSorter\"\n [sorterValue]=\"sorterValue\"\n [cHtmlAttr]=\"tableFootProps?.attributes ?? {}\"\n [cTableColor]=\"tableFootProps?.color\"\n [cAlign]=\"tableFootProps?.align\"\n component=\"tfoot\"\n [columnFilterTemplates]=\"columnFilterTemplates\"\n ></c-smart-table-head>\n\n </table>\n <c-element-cover\n *ngIf=\"loading\"\n [boundaries]=\"[\n { sides: ['top'], query: 'td' },\n { sides: ['bottom'], query: 'tbody' }\n ]\"\n ></c-element-cover>\n</div>\n<ng-template [ngIf]=\"pagination || itemsPerPageSelect\">\n <div class=\"row\">\n <div class=\"col\">\n <c-smart-pagination\n (activePageChange)=\"setActivePage($event)\"\n *ngIf=\"pagination && numberOfPages > 1\"\n [activePage]=\"activePage\"\n [pages]=\"numberOfPages\">\n </c-smart-pagination>\n </div>\n <div class=\"col-auto ms-auto\">\n <c-smart-table-items-per-page-selector\n (itemsPerPageChange)=\"handleItemsPerPageChange($event)\"\n *ngIf=\"itemsPerPageSelect\"\n [itemsPerPageLabel]=\"itemsPerPageLabel\"\n [itemsPerPageOptions]=\"itemsPerPageOptions\"\n [itemsPerPage]=\"itemsPerPage\"\n >\n </c-smart-table-items-per-page-selector>\n </div>\n </div>\n</ng-template>\n\n<ng-template #tbodyDefaultTemplate>\n <tbody [cHtmlAttr]=\"tableBodyProps?.attributes ?? {}\"\n [cTableColor]=\"tableBodyProps?.color\"\n [cAlign]=\"tableBodyProps?.align\"\n >\n <ng-template ngFor let-item [ngForOf]=\"currentItems\" let-cnt=\"count\" let-i=\"index\" let-isEven=\"even\" let-isOdd=\"odd\">\n <tr [tabindex]=\"clickableRows ? 0 : -1\"\n [ngStyle]=\"{cursor: clickableRows ? 'pointer' : 'auto'}\"\n (click)=\"handleRowClick({$event, item, i})\"\n [cTableActive]=\"item._props?.active\"\n [cTableColor]=\"item._props?.color\"\n [cAlign]=\"item._props?.align\"\n >\n <td *ngIf=\"selectable\"\n [cTableActive]=\"item?.['_cellProps']?._all?.active\"\n [cTableColor]=\"item?.['_cellProps']?._all?.color\"\n [cAlign]=\"item?.['_cellProps']?._all?.align\"\n >\n <input (change)=\"handleRowChecked($event, item)\"\n [checked]=\"item._selected ?? false\"\n cFormCheckInput\n [disabled]=\"(item?._selectable === false) ?? false\"\n autocomplete=\"off\"\n >\n </td>\n <ng-template ngFor let-columnName [ngForOf]=\"rawColumnNames\" let-i=\"index\">\n <ng-container\n *ngTemplateOutlet=\"templates['tableData'] || columnDefaultTemplate; context: {item, columnName, tdContent: item[columnName] }\" >\n </ng-container>\n </ng-template>\n </tr>\n <ng-template [ngIf]=\"templates['tableDetails']\">\n <!-- <ng-container *ngTemplateOutlet=\"rowDetailsDefaultTemplate\"></ng-container>-->\n <tr>\n <td [colSpan]=\"colspan\" class=\"p-0\" tabindex=\"-1\" [ngStyle]=\"{borderBottomWidth: 0}\"></td>\n </tr>\n <tr class=\"p-0\">\n <td [colSpan]=\"colspan\" class=\"p-0\" [ngStyle]=\"{border: 0}\">\n <ng-container *ngTemplateOutlet=\"templates['tableDetails']; context: {item, index: i}\"></ng-container>\n </td>\n </tr>\n </ng-template>\n </ng-template>\n <ng-container *ngTemplateOutlet=\"noItemsDefaultTemplate\"></ng-container>\n </tbody>\n</ng-template>\n\n<ng-template #columnDefaultTemplate let-item=\"item\" let-columnName=\"columnName\" let-tdContent=\"tdContent\">\n <td\n [cTableActive]=\"tableDataCellProps(item, columnName)?.['active']\"\n [cTableColor]=\"tableDataCellProps(item, columnName)?.color\"\n [cAlign]=\"tableDataCellProps(item, columnName)?.align\"\n [ngClass]=\"tableDataCellClasses(item, columnName)\"\n >\n {{tdContent}}\n </td>\n</ng-template>\n\n<!--<ng-template #rowDetailsDefaultTemplate let-item let-index>-->\n<!-- <tr><td [colSpan]=\"colspan\" class=\"p-0\" tabindex=\"-1\" [ngStyle]=\"{borderBottomWidth: 0}\"></td></tr>-->\n<!-- <tr class=\"p-0\">-->\n<!-- <td [colSpan]=\"colspan\" class=\"p-0\" [ngStyle]=\"{border: 0}\">-->\n<!-- <ng-container *ngTemplateOutlet=\"templates?.tableDetails\"></ng-container>-->\n<!-- </td>-->\n<!-- </tr>-->\n<!--</ng-template>-->\n\n<ng-template #noItemsDefaultTemplate>\n <tr *ngIf=\"!currentItems.length\">\n <td [colSpan]=\"colspan\" class=\"justify-content-center\">{{noItemsLabel}}</td>\n </tr>\n</ng-template>\n\n<!--todo: filterIconCustomTemplate-->\n<ng-template #filterIconTemplate>\n <svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\" pointer-events=\"none\" role=\"img\"\n class=\"icon icon-custom-size\" width=\"18\">\n <polygon\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"40 16 40 53.828 109.024 136 150.815 136 76.896 48 459.51 48 304 242.388 304 401.373 241.373 464 240 464 240 368 208 368 208 496 254.627 496 336 414.627 336 253.612 496 53.612 496 16 40 16\"\n class=\"ci-primary\">\n </polygon>\n <polygon\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"166.403 248.225 226.864 187.763 204.237 165.135 143.775 225.597 83.313 165.135 60.687 187.763 121.148 248.225 60.687 308.687 83.313 331.314 143.775 270.852 204.237 331.314 226.864 308.687 166.403 248.225\"\n class=\"ci-primary\">\n </polygon>\n </svg>\n</ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "component", type: ElementCoverComponent, selector: "c-element-cover, [cElementCover]", inputs: ["boundaries", "opacity"] }, { kind: "directive", type: TableDirective, selector: "table[cTable]", inputs: ["align", "borderColor", "bordered", "borderless", "caption", "color", "hover", "responsive", "small", "striped", "stripedColumns"] }, { kind: "directive", type: TableColorDirective, selector: "[cTableColor]", inputs: ["cTableColor"] }, { kind: "directive", type: TableActiveDirective, selector: "[cTableActive]", inputs: ["cTableActive"] }, { kind: "component", type: SmartPaginationComponent, selector: "c-smart-pagination", inputs: ["activePage", "arrows", "doubleArrows", "dots", "limit", "pages", "firstButton", "lastButton", "nextButton", "previousButton", "align", "size", "role"], outputs: ["activePageChange"], exportAs: ["cSmartPagination"] }, { kind: "directive", type: FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid", "checked"] }, { kind: "directive", type: ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "type", "variant"], exportAs: ["cButton"] }, { kind: "directive", type: HtmlAttributesDirective, selector: "[cHtmlAttr]", inputs: ["cHtmlAttr"], exportAs: ["cHtmlAttr"] }, { kind: "directive", type: AlignDirective, selector: "[cAlign]", inputs: ["cAlign"] }, { kind: "component", type: SmartTableFilterComponent, selector: "c-smart-table-filter", inputs: ["filterLabel", "filterPlaceholder", "sizing"] }, { kind: "component", type: SmartTableItemsPerPageSelectorComponent, selector: "c-smart-table-items-per-page-selector", inputs: ["itemsPerPage", "itemsPerPageLabel", "itemsPerPageOptions"], outputs: ["itemsPerPageChange"] }, { kind: "component", type: SmartTableHeadComponent, selector: "c-smart-table-head", inputs: ["columnFilter", "columnFilterState", "columnSorter", "component", "columns", "selectable", "selectAll", "selectedAll", "sorterValue", "columnFilterTemplates"], outputs: ["columnFilterStateChange", "sorterStateChange", "selectAllChange"] }, { kind: "directive", type: FilterInputDirective, selector: "[cFilterInput]", inputs: ["delay", "onEvent", "value"], outputs: ["valueChange"], exportAs: ["cFilterInput"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
|
|
14509
14607
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartTableComponent, decorators: [{
|
|
14510
14608
|
type: Component,
|
|
14511
|
-
args: [{ selector: 'c-smart-table', exportAs: 'cSmartTable', template: "<div *ngIf=\"itemsPerPageSelect || tableFilter || cleaner || templates['tableCustomHeader']\" class=\"row my-2 mx-0\">\n <div class=\"col-auto p-0\" *ngIf=\"tableFilter\">\n <ng-container *ngTemplateOutlet=\"tableFilterTemplate\"></ng-container>\n </div>\n <div class=\"col-auto p-0\" *ngIf=\"cleaner\">\n <ng-container *ngTemplateOutlet=\"tableCleanerTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"templates['tableCustomHeader'] || tableCustomHeaderTemplate\"></ng-container>\n\n <ng-template #tableFilterTemplate>\n <c-smart-table-filter\n (valueChange)=\"handleTableFilterChange($event)\"\n *ngIf=\"tableFilter\"\n [delay]=\"300\"\n [filterLabel]=\"tableFilterLabel\"\n [filterPlaceholder]=\"tableFilterPlaceholder\"\n [onEvent]=\"tableFilterEvent\"\n [value]=\"tableFilterState\"\n cFilterInput\n >\n </c-smart-table-filter>\n </ng-template>\n\n <ng-template #tableCleanerTemplate>\n <button\n (click)=\"clean($event)\"\n *ngIf=\"cleaner\"\n [disabled]=\"!isFiltered\"\n [ngClass]=\"{'ms-1': tableFilter}\"\n [tabindex]=\"0\"\n cButton\n variant=\"ghost\"\n color=\"transparent\"\n >\n <ng-container *ngTemplateOutlet=\"filterIconTemplate\"></ng-container>\n </button>\n </ng-template>\n\n <ng-template #tableCustomHeaderTemplate>\n <div class=\"col-auto p-0 ms-auto\">\n <ng-content select=\"[customHeader]\"></ng-content>\n </div>\n </ng-template>\n</div>\n<div class=\"position-relative\">\n <table [align]=\"tableProps?.align\"\n [borderColor]=\"tableProps?.borderColor\"\n [bordered]=\"tableProps?.bordered\"\n [borderless]=\"tableProps?.borderless\"\n [caption]=\"tableProps?.caption\"\n [color]=\"tableProps?.color\"\n [hover]=\"tableProps?.hover\"\n [responsive]=\"tableProps?.responsive\"\n [small]=\"tableProps?.small\"\n [striped]=\"tableProps?.striped\"\n [cHtmlAttr]=\"tableProps?.attributes ?? {}\"\n [cTableColor]=\"tableProps?.color\"\n cTable\n >\n <c-smart-table-head\n (columnFilterStateChange)=\"handleColumnFilterChange($event)\"\n (selectAllChange)=\"handleSelectAllChange($event)\"\n (sorterStateChange)=\"handleSortChange($event)\"\n *ngIf=\"header\"\n [columnFilterState]=\"columnFilterState\"\n [columnFilter]=\"columnFilter\"\n [columns]=\"columns\"\n [selectAll]=\"selectedAll\"\n [selectable]=\"selectable\"\n [columnSorter]=\"columnSorter\"\n [sorterValue]=\"sorterValue\"\n [cHtmlAttr]=\"tableHeadProps?.attributes ?? {}\"\n [cTableColor]=\"tableHeadProps?.color\"\n [cAlign]=\"tableHeadProps?.align\"\n [columnFilterTemplates]=\"columnFilterTemplates\"\n ></c-smart-table-head>\n\n <ng-container *ngTemplateOutlet=\"tbodyDefaultTemplate\"></ng-container>\n\n <c-smart-table-head\n (selectAllChange)=\"handleSelectAllChange($event)\"\n (sorterStateChange)=\"handleSortChange($event)\"\n *ngIf=\"footer\"\n [columns]=\"columns\"\n [selectAll]=\"selectedAll\"\n [selectable]=\"selectable\"\n [columnSorter]=\"columnSorter\"\n [sorterValue]=\"sorterValue\"\n [cHtmlAttr]=\"tableFootProps?.attributes ?? {}\"\n [cTableColor]=\"tableFootProps?.color\"\n [cAlign]=\"tableFootProps?.align\"\n component=\"tfoot\"\n [columnFilterTemplates]=\"columnFilterTemplates\"\n ></c-smart-table-head>\n\n </table>\n <c-element-cover\n *ngIf=\"loading\"\n [boundaries]=\"[\n { sides: ['top'], query: 'td' },\n { sides: ['bottom'], query: 'tbody' }\n ]\"\n ></c-element-cover>\n</div>\n<ng-template [ngIf]=\"pagination || itemsPerPageSelect\">\n <div class=\"row\">\n <div class=\"col\">\n <c-smart-pagination\n (activePageChange)=\"setActivePage($event)\"\n *ngIf=\"pagination && numberOfPages > 1\"\n [activePage]=\"activePage\"\n [pages]=\"numberOfPages\">\n </c-smart-pagination>\n </div>\n <div class=\"col-auto ms-auto\">\n <c-smart-table-items-per-page-selector\n (itemsPerPageChange)=\"handleItemsPerPageChange($event)\"\n *ngIf=\"itemsPerPageSelect\"\n [itemsPerPageLabel]=\"itemsPerPageLabel\"\n [itemsPerPageOptions]=\"itemsPerPageOptions\"\n [itemsPerPage]=\"itemsPerPage\"\n >\n </c-smart-table-items-per-page-selector>\n </div>\n </div>\n</ng-template>\n\n<ng-template #tbodyDefaultTemplate>\n <tbody [cHtmlAttr]=\"tableBodyProps?.attributes ?? {}\"\n [cTableColor]=\"tableBodyProps?.color\"\n [cAlign]=\"tableBodyProps?.align\"\n >\n <ng-template ngFor let-item [ngForOf]=\"currentItems\" let-cnt=\"count\" let-i=\"index\" let-isEven=\"even\" let-isOdd=\"odd\">\n <tr [tabindex]=\"clickableRows ? 0 : -1\"\n [ngStyle]=\"{cursor: clickableRows ? 'pointer' : 'auto'}\"\n (click)=\"handleRowClick({$event, item, i})\"\n [cTableActive]=\"item._props?.active\"\n [cTableColor]=\"item._props?.color\"\n [cAlign]=\"item._props?.align\"\n >\n <td *ngIf=\"selectable\"\n [cTableActive]=\"item?.['_cellProps']?._all?.active\"\n [cTableColor]=\"item?.['_cellProps']?._all?.color\"\n [cAlign]=\"item?.['_cellProps']?._all?.align\"\n >\n <input (change)=\"handleRowChecked($event, item)\"
|
|
14609
|
+
args: [{ selector: 'c-smart-table', exportAs: 'cSmartTable', template: "<div *ngIf=\"itemsPerPageSelect || tableFilter || cleaner || templates['tableCustomHeader']\" class=\"row my-2 mx-0\">\n <div class=\"col-auto p-0\" *ngIf=\"tableFilter\">\n <ng-container *ngTemplateOutlet=\"tableFilterTemplate\"></ng-container>\n </div>\n <div class=\"col-auto p-0\" *ngIf=\"cleaner\">\n <ng-container *ngTemplateOutlet=\"tableCleanerTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"templates['tableCustomHeader'] || tableCustomHeaderTemplate\"></ng-container>\n\n <ng-template #tableFilterTemplate>\n <c-smart-table-filter\n (valueChange)=\"handleTableFilterChange($event)\"\n *ngIf=\"tableFilter\"\n [delay]=\"300\"\n [filterLabel]=\"tableFilterLabel\"\n [filterPlaceholder]=\"tableFilterPlaceholder\"\n [onEvent]=\"tableFilterEvent\"\n [value]=\"tableFilterState\"\n cFilterInput\n >\n </c-smart-table-filter>\n </ng-template>\n\n <ng-template #tableCleanerTemplate>\n <button\n (click)=\"clean($event)\"\n *ngIf=\"cleaner\"\n [disabled]=\"!isFiltered\"\n [ngClass]=\"{'ms-1': tableFilter}\"\n [tabindex]=\"0\"\n cButton\n variant=\"ghost\"\n color=\"transparent\"\n >\n <ng-container *ngTemplateOutlet=\"filterIconTemplate\"></ng-container>\n </button>\n </ng-template>\n\n <ng-template #tableCustomHeaderTemplate>\n <div class=\"col-auto p-0 ms-auto\">\n <ng-content select=\"[customHeader]\"></ng-content>\n </div>\n </ng-template>\n</div>\n<div class=\"position-relative\">\n <table [align]=\"tableProps?.align\"\n [borderColor]=\"tableProps?.borderColor\"\n [bordered]=\"tableProps?.bordered\"\n [borderless]=\"tableProps?.borderless\"\n [caption]=\"tableProps?.caption\"\n [color]=\"tableProps?.color\"\n [hover]=\"tableProps?.hover\"\n [responsive]=\"tableProps?.responsive\"\n [small]=\"tableProps?.small\"\n [striped]=\"tableProps?.striped\"\n [cHtmlAttr]=\"tableProps?.attributes ?? {}\"\n [cTableColor]=\"tableProps?.color\"\n cTable\n >\n <c-smart-table-head\n (columnFilterStateChange)=\"handleColumnFilterChange($event)\"\n (selectAllChange)=\"handleSelectAllChange($event)\"\n (sorterStateChange)=\"handleSortChange($event)\"\n *ngIf=\"header\"\n [columnFilterState]=\"columnFilterState\"\n [columnFilter]=\"columnFilter\"\n [columns]=\"columns\"\n [selectAll]=\"selectAll\"\n [selectedAll]=\"(selectedAllSubject | async) ?? false\"\n [selectable]=\"selectable\"\n [columnSorter]=\"columnSorter\"\n [sorterValue]=\"sorterValue\"\n [cHtmlAttr]=\"tableHeadProps?.attributes ?? {}\"\n [cTableColor]=\"tableHeadProps?.color\"\n [cAlign]=\"tableHeadProps?.align\"\n [columnFilterTemplates]=\"columnFilterTemplates\"\n ></c-smart-table-head>\n\n <ng-container *ngTemplateOutlet=\"tbodyDefaultTemplate\"></ng-container>\n\n <c-smart-table-head\n (selectAllChange)=\"handleSelectAllChange($event)\"\n (sorterStateChange)=\"handleSortChange($event)\"\n *ngIf=\"footer\"\n [columns]=\"columns\"\n [selectAll]=\"selectAll\"\n [selectedAll]=\"(selectedAllSubject | async) ?? false\"\n [selectable]=\"selectable\"\n [columnSorter]=\"columnSorter\"\n [sorterValue]=\"sorterValue\"\n [cHtmlAttr]=\"tableFootProps?.attributes ?? {}\"\n [cTableColor]=\"tableFootProps?.color\"\n [cAlign]=\"tableFootProps?.align\"\n component=\"tfoot\"\n [columnFilterTemplates]=\"columnFilterTemplates\"\n ></c-smart-table-head>\n\n </table>\n <c-element-cover\n *ngIf=\"loading\"\n [boundaries]=\"[\n { sides: ['top'], query: 'td' },\n { sides: ['bottom'], query: 'tbody' }\n ]\"\n ></c-element-cover>\n</div>\n<ng-template [ngIf]=\"pagination || itemsPerPageSelect\">\n <div class=\"row\">\n <div class=\"col\">\n <c-smart-pagination\n (activePageChange)=\"setActivePage($event)\"\n *ngIf=\"pagination && numberOfPages > 1\"\n [activePage]=\"activePage\"\n [pages]=\"numberOfPages\">\n </c-smart-pagination>\n </div>\n <div class=\"col-auto ms-auto\">\n <c-smart-table-items-per-page-selector\n (itemsPerPageChange)=\"handleItemsPerPageChange($event)\"\n *ngIf=\"itemsPerPageSelect\"\n [itemsPerPageLabel]=\"itemsPerPageLabel\"\n [itemsPerPageOptions]=\"itemsPerPageOptions\"\n [itemsPerPage]=\"itemsPerPage\"\n >\n </c-smart-table-items-per-page-selector>\n </div>\n </div>\n</ng-template>\n\n<ng-template #tbodyDefaultTemplate>\n <tbody [cHtmlAttr]=\"tableBodyProps?.attributes ?? {}\"\n [cTableColor]=\"tableBodyProps?.color\"\n [cAlign]=\"tableBodyProps?.align\"\n >\n <ng-template ngFor let-item [ngForOf]=\"currentItems\" let-cnt=\"count\" let-i=\"index\" let-isEven=\"even\" let-isOdd=\"odd\">\n <tr [tabindex]=\"clickableRows ? 0 : -1\"\n [ngStyle]=\"{cursor: clickableRows ? 'pointer' : 'auto'}\"\n (click)=\"handleRowClick({$event, item, i})\"\n [cTableActive]=\"item._props?.active\"\n [cTableColor]=\"item._props?.color\"\n [cAlign]=\"item._props?.align\"\n >\n <td *ngIf=\"selectable\"\n [cTableActive]=\"item?.['_cellProps']?._all?.active\"\n [cTableColor]=\"item?.['_cellProps']?._all?.color\"\n [cAlign]=\"item?.['_cellProps']?._all?.align\"\n >\n <input (change)=\"handleRowChecked($event, item)\"\n [checked]=\"item._selected ?? false\"\n cFormCheckInput\n [disabled]=\"(item?._selectable === false) ?? false\"\n autocomplete=\"off\"\n >\n </td>\n <ng-template ngFor let-columnName [ngForOf]=\"rawColumnNames\" let-i=\"index\">\n <ng-container\n *ngTemplateOutlet=\"templates['tableData'] || columnDefaultTemplate; context: {item, columnName, tdContent: item[columnName] }\" >\n </ng-container>\n </ng-template>\n </tr>\n <ng-template [ngIf]=\"templates['tableDetails']\">\n <!-- <ng-container *ngTemplateOutlet=\"rowDetailsDefaultTemplate\"></ng-container>-->\n <tr>\n <td [colSpan]=\"colspan\" class=\"p-0\" tabindex=\"-1\" [ngStyle]=\"{borderBottomWidth: 0}\"></td>\n </tr>\n <tr class=\"p-0\">\n <td [colSpan]=\"colspan\" class=\"p-0\" [ngStyle]=\"{border: 0}\">\n <ng-container *ngTemplateOutlet=\"templates['tableDetails']; context: {item, index: i}\"></ng-container>\n </td>\n </tr>\n </ng-template>\n </ng-template>\n <ng-container *ngTemplateOutlet=\"noItemsDefaultTemplate\"></ng-container>\n </tbody>\n</ng-template>\n\n<ng-template #columnDefaultTemplate let-item=\"item\" let-columnName=\"columnName\" let-tdContent=\"tdContent\">\n <td\n [cTableActive]=\"tableDataCellProps(item, columnName)?.['active']\"\n [cTableColor]=\"tableDataCellProps(item, columnName)?.color\"\n [cAlign]=\"tableDataCellProps(item, columnName)?.align\"\n [ngClass]=\"tableDataCellClasses(item, columnName)\"\n >\n {{tdContent}}\n </td>\n</ng-template>\n\n<!--<ng-template #rowDetailsDefaultTemplate let-item let-index>-->\n<!-- <tr><td [colSpan]=\"colspan\" class=\"p-0\" tabindex=\"-1\" [ngStyle]=\"{borderBottomWidth: 0}\"></td></tr>-->\n<!-- <tr class=\"p-0\">-->\n<!-- <td [colSpan]=\"colspan\" class=\"p-0\" [ngStyle]=\"{border: 0}\">-->\n<!-- <ng-container *ngTemplateOutlet=\"templates?.tableDetails\"></ng-container>-->\n<!-- </td>-->\n<!-- </tr>-->\n<!--</ng-template>-->\n\n<ng-template #noItemsDefaultTemplate>\n <tr *ngIf=\"!currentItems.length\">\n <td [colSpan]=\"colspan\" class=\"justify-content-center\">{{noItemsLabel}}</td>\n </tr>\n</ng-template>\n\n<!--todo: filterIconCustomTemplate-->\n<ng-template #filterIconTemplate>\n <svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\" pointer-events=\"none\" role=\"img\"\n class=\"icon icon-custom-size\" width=\"18\">\n <polygon\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"40 16 40 53.828 109.024 136 150.815 136 76.896 48 459.51 48 304 242.388 304 401.373 241.373 464 240 464 240 368 208 368 208 496 254.627 496 336 414.627 336 253.612 496 53.612 496 16 40 16\"\n class=\"ci-primary\">\n </polygon>\n <polygon\n fill=\"var(--ci-primary-color, currentColor)\"\n points=\"166.403 248.225 226.864 187.763 204.237 165.135 143.775 225.597 83.313 165.135 60.687 187.763 121.148 248.225 60.687 308.687 83.313 331.314 143.775 270.852 204.237 331.314 226.864 308.687 166.403 248.225\"\n class=\"ci-primary\">\n </polygon>\n </svg>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
|
|
14512
14610
|
}], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.KeyValueDiffers }]; }, propDecorators: { activePage: [{
|
|
14513
14611
|
type: Input
|
|
14514
14612
|
}], cleaner: [{
|
|
@@ -14545,6 +14643,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
14545
14643
|
type: Input
|
|
14546
14644
|
}], selectable: [{
|
|
14547
14645
|
type: Input
|
|
14646
|
+
}], selectAll: [{
|
|
14647
|
+
type: Input
|
|
14548
14648
|
}], sorterValue: [{
|
|
14549
14649
|
type: Input
|
|
14550
14650
|
}], tableFilter: [{
|