@acorex/components 17.0.23 → 17.0.25
Sign up to get free protection for your applications and to get access to all the features.
- package/common/index.d.ts +1 -0
- package/common/lib/directives/inverted-color.directive.d.ts +11 -0
- package/data-pager/lib/data-pager-base.component.d.ts +1 -0
- package/data-pager/lib/data-pager-numeric-selector.component.d.ts +1 -0
- package/data-pager/lib/data-pager.component.d.ts +4 -1
- package/data-pager/lib/data-pager.module.d.ts +2 -1
- package/data-table/lib/columns/data-table-column.d.ts +1 -0
- package/data-table/lib/columns/data-text-column.component.d.ts +4 -1
- package/data-table/lib/columns/row-command-column.component.d.ts +8 -2
- package/data-table/lib/columns/row-index-column.component.d.ts +4 -1
- package/data-table/lib/columns/row-select-column.component.d.ts +2 -0
- package/data-table/lib/data-table/data-table.component.d.ts +4 -1
- package/esm2022/common/index.mjs +2 -1
- package/esm2022/common/lib/directives/inverted-color.directive.mjs +50 -0
- package/esm2022/data-pager/lib/data-pager-base.component.mjs +4 -8
- package/esm2022/data-pager/lib/data-pager-numeric-selector.component.mjs +39 -28
- package/esm2022/data-pager/lib/data-pager.component.mjs +15 -6
- package/esm2022/data-pager/lib/data-pager.module.mjs +6 -3
- package/esm2022/data-table/lib/columns/data-table-column.mjs +1 -1
- package/esm2022/data-table/lib/columns/data-text-column.component.mjs +13 -3
- package/esm2022/data-table/lib/columns/row-command-column.component.mjs +34 -10
- package/esm2022/data-table/lib/columns/row-index-column.component.mjs +15 -5
- package/esm2022/data-table/lib/columns/row-select-column.component.mjs +12 -4
- package/esm2022/data-table/lib/data-table/data-table.component.mjs +13 -4
- package/fesm2022/acorex-components-common.mjs +50 -2
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +58 -39
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +82 -21
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/package.json +7 -7
@@ -1,6 +1,6 @@
|
|
1
1
|
import { flatten, clone, filter, isEqual } from 'lodash-es';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { Injectable, Directive, Host, Self, Optional, Input, Inject, NgModule, inject, ChangeDetectorRef, ElementRef, ViewContainerRef, EventEmitter, InjectionToken, Output } from '@angular/core';
|
3
|
+
import { Injectable, Directive, Host, Self, Optional, Input, Inject, NgModule, inject, ChangeDetectorRef, ElementRef, ViewContainerRef, EventEmitter, InjectionToken, Output, input, afterNextRender, AfterRenderPhase, effect } from '@angular/core';
|
4
4
|
import { DataSource } from '@angular/cdk/collections';
|
5
5
|
import { Subscription, BehaviorSubject, debounceTime, distinctUntilChanged, Subject, fromEvent, noop, skip } from 'rxjs';
|
6
6
|
import { DOCUMENT } from '@angular/common';
|
@@ -1662,6 +1662,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
1662
1662
|
type: Input
|
1663
1663
|
}] } });
|
1664
1664
|
|
1665
|
+
class AXInvertedColorDirective {
|
1666
|
+
constructor() {
|
1667
|
+
this.color = input.required();
|
1668
|
+
this.ref = inject(ViewContainerRef);
|
1669
|
+
afterNextRender(() => {
|
1670
|
+
this.invertColor();
|
1671
|
+
console.log('changed');
|
1672
|
+
}, { phase: AfterRenderPhase.MixedReadWrite });
|
1673
|
+
effect(() => {
|
1674
|
+
this.invertColor();
|
1675
|
+
console.log('changed');
|
1676
|
+
});
|
1677
|
+
}
|
1678
|
+
invertColor() {
|
1679
|
+
let color;
|
1680
|
+
let foreColor;
|
1681
|
+
const invertedVariables = [];
|
1682
|
+
if (this.color() === 'ghost') {
|
1683
|
+
color = getComputedStyle(document.documentElement).getPropertyValue(`--ax-color-${this.color()}`);
|
1684
|
+
foreColor = getComputedStyle(document.documentElement).getPropertyValue(`--ax-color-${this.color()}-fore`);
|
1685
|
+
invertedVariables.push({ name: `--ax-color-ghost`, value: `${foreColor}` });
|
1686
|
+
invertedVariables.push({ name: `--ax-color-ghost-fore`, value: `${color}` });
|
1687
|
+
}
|
1688
|
+
else {
|
1689
|
+
const range = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
1690
|
+
color = getComputedStyle(document.documentElement).getPropertyValue(`--ax-color-${this.color()}-500`);
|
1691
|
+
foreColor = getComputedStyle(document.documentElement).getPropertyValue(`--ax-color-${this.color()}-fore`);
|
1692
|
+
range.forEach((c) => {
|
1693
|
+
invertedVariables.push({ name: `--ax-color-${this.color()}-${c}`, value: `${foreColor}` });
|
1694
|
+
});
|
1695
|
+
invertedVariables.push({ name: `--ax-color-${this.color()}-fore`, value: `${color}` });
|
1696
|
+
invertedVariables.push({ name: `--ax-color-${this.color()}-fore-tint`, value: `${color}` });
|
1697
|
+
}
|
1698
|
+
invertedVariables.forEach((c) => {
|
1699
|
+
this.ref.element.nativeElement.style.setProperty(c.name, c.value);
|
1700
|
+
});
|
1701
|
+
}
|
1702
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXInvertedColorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1703
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "17.3.2", type: AXInvertedColorDirective, isStandalone: true, selector: "[axInvertedColor]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
1704
|
+
}
|
1705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXInvertedColorDirective, decorators: [{
|
1706
|
+
type: Directive,
|
1707
|
+
args: [{
|
1708
|
+
selector: '[axInvertedColor]',
|
1709
|
+
standalone: true,
|
1710
|
+
}]
|
1711
|
+
}], ctorParameters: () => [] });
|
1712
|
+
|
1665
1713
|
class AXRippleDirective {
|
1666
1714
|
constructor(el, cdr) {
|
1667
1715
|
this.el = el;
|
@@ -1726,5 +1774,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
1726
1774
|
* Generated bundle index. Do not edit.
|
1727
1775
|
*/
|
1728
1776
|
|
1729
|
-
export { AXAutoFocusDirective, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosbaleComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDataSource, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXItemClickEvent, AXListDataSource, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_SELECTION_DATA_TOKEN, AX_STYLE_COLOR_TYPES, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInputBaseValueComponent, MXInteractiveComponent, MXLookComponent, MXLookableComponent, MXSelectionBridgeService, MXSelectionValueComponent, MXValueComponent, TAB_META_KEY, convertArrayToDataSource, convertToPlacement };
|
1777
|
+
export { AXAutoFocusDirective, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosbaleComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDataSource, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXInvertedColorDirective, AXItemClickEvent, AXListDataSource, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_SELECTION_DATA_TOKEN, AX_STYLE_COLOR_TYPES, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInputBaseValueComponent, MXInteractiveComponent, MXLookComponent, MXLookableComponent, MXSelectionBridgeService, MXSelectionValueComponent, MXValueComponent, TAB_META_KEY, convertArrayToDataSource, convertToPlacement };
|
1730
1778
|
//# sourceMappingURL=acorex-components-common.mjs.map
|