codexly-ui 0.10.103 → 0.10.105
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/fesm2022/codexly-ui.mjs +41 -6
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +49 -12
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -603,6 +603,18 @@ class ClxThemeService {
|
|
|
603
603
|
timelineTitleStyle = computed(() => ({
|
|
604
604
|
weight: this._config().timelineTitle?.weight ?? 600,
|
|
605
605
|
}), ...(ngDevMode ? [{ debugName: "timelineTitleStyle" }] : /* istanbul ignore next */ []));
|
|
606
|
+
/** Resolved style for ClxTableComponent — falls back to primaryColor's subtle tint header /
|
|
607
|
+
* no shadow / bordered. Per-instance `[headerColor]`/`[shadow]`/`[bordered]` inputs on
|
|
608
|
+
* clx-table itself still take precedence over this theme-wide default. */
|
|
609
|
+
tableStyle = computed(() => {
|
|
610
|
+
const t = this._config().table;
|
|
611
|
+
return {
|
|
612
|
+
headerColor: t?.headerColor ?? this._config().primaryColor,
|
|
613
|
+
headerTextColor: t?.headerTextColor ?? t?.headerColor ?? this._config().primaryColor,
|
|
614
|
+
shadow: t?.shadow ?? 'none',
|
|
615
|
+
bordered: t?.bordered ?? true,
|
|
616
|
+
};
|
|
617
|
+
}, ...(ngDevMode ? [{ debugName: "tableStyle" }] : /* istanbul ignore next */ []));
|
|
606
618
|
constructor() {
|
|
607
619
|
effect(() => {
|
|
608
620
|
if (!this._isBrowser)
|
|
@@ -13644,6 +13656,21 @@ class ClxTableComponent {
|
|
|
13644
13656
|
emptyIcon = input('table_chart', ...(ngDevMode ? [{ debugName: "emptyIcon" }] : /* istanbul ignore next */ []));
|
|
13645
13657
|
emptyTitle = input('', ...(ngDevMode ? [{ debugName: "emptyTitle" }] : /* istanbul ignore next */ []));
|
|
13646
13658
|
emptyDescription = input('', ...(ngDevMode ? [{ debugName: "emptyDescription" }] : /* istanbul ignore next */ []));
|
|
13659
|
+
/** Per-instance overrides — each falls back to ClxThemeService.tableStyle (the app-wide table
|
|
13660
|
+
* theme configured in Editar tema → Tablas) when unset. */
|
|
13661
|
+
headerColor = input(undefined, ...(ngDevMode ? [{ debugName: "headerColor" }] : /* istanbul ignore next */ []));
|
|
13662
|
+
headerTextColor = input(undefined, ...(ngDevMode ? [{ debugName: "headerTextColor" }] : /* istanbul ignore next */ []));
|
|
13663
|
+
shadow = input(undefined, ...(ngDevMode ? [{ debugName: "shadow" }] : /* istanbul ignore next */ []));
|
|
13664
|
+
bordered = input(undefined, ...(ngDevMode ? [{ debugName: "bordered" }] : /* istanbul ignore next */ []));
|
|
13665
|
+
_tableStyle = computed(() => {
|
|
13666
|
+
const theme = this._themeSvc.tableStyle();
|
|
13667
|
+
return {
|
|
13668
|
+
headerColor: this.headerColor() ?? theme.headerColor,
|
|
13669
|
+
headerTextColor: this.headerTextColor() ?? theme.headerTextColor,
|
|
13670
|
+
shadow: this.shadow() ?? theme.shadow,
|
|
13671
|
+
bordered: this.bordered() ?? theme.bordered,
|
|
13672
|
+
};
|
|
13673
|
+
}, ...(ngDevMode ? [{ debugName: "_tableStyle" }] : /* istanbul ignore next */ []));
|
|
13647
13674
|
// ── Models ─────────────────────────────────────────────────────────────────
|
|
13648
13675
|
sortKey = model(null, ...(ngDevMode ? [{ debugName: "sortKey" }] : /* istanbul ignore next */ []));
|
|
13649
13676
|
sortDir = model(null, ...(ngDevMode ? [{ debugName: "sortDir" }] : /* istanbul ignore next */ []));
|
|
@@ -13664,14 +13691,22 @@ class ClxTableComponent {
|
|
|
13664
13691
|
this.pageChange.emit({ pageIndex: idx, pageSize: this.pageSize() });
|
|
13665
13692
|
}
|
|
13666
13693
|
// ── Computed ───────────────────────────────────────────────────────────────
|
|
13694
|
+
static _SHADOW_CLASS = {
|
|
13695
|
+
none: '', sm: 'shadow-sm', md: 'shadow-md', lg: 'shadow-lg', xl: 'shadow-xl',
|
|
13696
|
+
};
|
|
13667
13697
|
_tableWrapperClass = computed(() => {
|
|
13668
|
-
const
|
|
13669
|
-
|
|
13698
|
+
const s = this._tableStyle();
|
|
13699
|
+
const { color } = parseColorInput(s.headerColor);
|
|
13700
|
+
const border = s.bordered ? `border border-${color}-200` : '';
|
|
13701
|
+
const shadow = ClxTableComponent._SHADOW_CLASS[s.shadow];
|
|
13702
|
+
return `overflow-x-auto overflow-y-hidden rounded-lg ${border} ${shadow}`.trim();
|
|
13670
13703
|
}, ...(ngDevMode ? [{ debugName: "_tableWrapperClass" }] : /* istanbul ignore next */ []));
|
|
13671
13704
|
_tableClass = computed(() => TABLE_BASE_CLASS, ...(ngDevMode ? [{ debugName: "_tableClass" }] : /* istanbul ignore next */ []));
|
|
13672
13705
|
_headerClass = computed(() => {
|
|
13673
|
-
const
|
|
13674
|
-
|
|
13706
|
+
const s = this._tableStyle();
|
|
13707
|
+
const bg = resolveColor(s.headerColor).bg;
|
|
13708
|
+
const text = resolveColor(s.headerTextColor).textSubtle;
|
|
13709
|
+
return `${bg} ${text}`;
|
|
13675
13710
|
}, ...(ngDevMode ? [{ debugName: "_headerClass" }] : /* istanbul ignore next */ []));
|
|
13676
13711
|
_headerCellClass = computed(() => TABLE_HEADER_CELL_CLASS, ...(ngDevMode ? [{ debugName: "_headerCellClass" }] : /* istanbul ignore next */ []));
|
|
13677
13712
|
_cellClass = computed(() => TABLE_CELL_CLASS, ...(ngDevMode ? [{ debugName: "_cellClass" }] : /* istanbul ignore next */ []));
|
|
@@ -13788,7 +13823,7 @@ class ClxTableComponent {
|
|
|
13788
13823
|
this.selectionChange.emit({ selected: this.selectedItems(), allSelected: false });
|
|
13789
13824
|
}
|
|
13790
13825
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13791
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxTableComponent, isStandalone: true, selector: "clx-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, singleSelect: { classPropertyName: "singleSelect", publicName: "singleSelect", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, serverSide: { classPropertyName: "serverSide", publicName: "serverSide", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, emptyIcon: { classPropertyName: "emptyIcon", publicName: "emptyIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyTitle: { classPropertyName: "emptyTitle", publicName: "emptyTitle", isSignal: true, isRequired: false, transformFunction: null }, emptyDescription: { classPropertyName: "emptyDescription", publicName: "emptyDescription", isSignal: true, isRequired: false, transformFunction: null }, sortKey: { classPropertyName: "sortKey", publicName: "sortKey", isSignal: true, isRequired: false, transformFunction: null }, sortDir: { classPropertyName: "sortDir", publicName: "sortDir", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, _currentPage: { classPropertyName: "_currentPage", publicName: "_currentPage", isSignal: true, isRequired: false, transformFunction: null }, searchQuery: { classPropertyName: "searchQuery", publicName: "searchQuery", isSignal: true, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortKey: "sortKeyChange", sortDir: "sortDirChange", pageIndex: "pageIndexChange", pageSize: "pageSizeChange", _currentPage: "_currentPageChange", searchQuery: "searchQueryChange", selectedItems: "selectedItemsChange", sortChange: "sortChange", pageChange: "pageChange", selectionChange: "selectionChange" }, host: { classAttribute: "block" }, queries: [{ propertyName: "_columnDefs", predicate: ClxColumnDefDirective, isSignal: true }], ngImport: i0, template: `
|
|
13826
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxTableComponent, isStandalone: true, selector: "clx-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, singleSelect: { classPropertyName: "singleSelect", publicName: "singleSelect", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, serverSide: { classPropertyName: "serverSide", publicName: "serverSide", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, emptyIcon: { classPropertyName: "emptyIcon", publicName: "emptyIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyTitle: { classPropertyName: "emptyTitle", publicName: "emptyTitle", isSignal: true, isRequired: false, transformFunction: null }, emptyDescription: { classPropertyName: "emptyDescription", publicName: "emptyDescription", isSignal: true, isRequired: false, transformFunction: null }, headerColor: { classPropertyName: "headerColor", publicName: "headerColor", isSignal: true, isRequired: false, transformFunction: null }, headerTextColor: { classPropertyName: "headerTextColor", publicName: "headerTextColor", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, sortKey: { classPropertyName: "sortKey", publicName: "sortKey", isSignal: true, isRequired: false, transformFunction: null }, sortDir: { classPropertyName: "sortDir", publicName: "sortDir", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, _currentPage: { classPropertyName: "_currentPage", publicName: "_currentPage", isSignal: true, isRequired: false, transformFunction: null }, searchQuery: { classPropertyName: "searchQuery", publicName: "searchQuery", isSignal: true, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortKey: "sortKeyChange", sortDir: "sortDirChange", pageIndex: "pageIndexChange", pageSize: "pageSizeChange", _currentPage: "_currentPageChange", searchQuery: "searchQueryChange", selectedItems: "selectedItemsChange", sortChange: "sortChange", pageChange: "pageChange", selectionChange: "selectionChange" }, host: { classAttribute: "block" }, queries: [{ propertyName: "_columnDefs", predicate: ClxColumnDefDirective, isSignal: true }], ngImport: i0, template: `
|
|
13792
13827
|
<!-- ── Toolbar: búsqueda ──────────────────────────────────────────────── -->
|
|
13793
13828
|
@if (searchable() && !serverSide() && !loading() && _filteredData().length > 0) {
|
|
13794
13829
|
<div class="mb-3 max-w-80 min-w-40">
|
|
@@ -14070,7 +14105,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
14070
14105
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14071
14106
|
host: { class: 'block' },
|
|
14072
14107
|
}]
|
|
14073
|
-
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], singleSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "singleSelect", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], pagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagination", required: false }] }], serverSide: [{ type: i0.Input, args: [{ isSignal: true, alias: "serverSide", required: false }] }], totalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalItems", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], emptyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyIcon", required: false }] }], emptyTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTitle", required: false }] }], emptyDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyDescription", required: false }] }], sortKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortKey", required: false }] }, { type: i0.Output, args: ["sortKeyChange"] }], sortDir: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortDir", required: false }] }, { type: i0.Output, args: ["sortDirChange"] }], pageIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageIndex", required: false }] }, { type: i0.Output, args: ["pageIndexChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], _currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "_currentPage", required: false }] }, { type: i0.Output, args: ["_currentPageChange"] }], searchQuery: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchQuery", required: false }] }, { type: i0.Output, args: ["searchQueryChange"] }], selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: false }] }, { type: i0.Output, args: ["selectedItemsChange"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], _columnDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ClxColumnDefDirective), { isSignal: true }] }] } });
|
|
14108
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], singleSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "singleSelect", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], pagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagination", required: false }] }], serverSide: [{ type: i0.Input, args: [{ isSignal: true, alias: "serverSide", required: false }] }], totalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalItems", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], emptyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyIcon", required: false }] }], emptyTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTitle", required: false }] }], emptyDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyDescription", required: false }] }], headerColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerColor", required: false }] }], headerTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTextColor", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], sortKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortKey", required: false }] }, { type: i0.Output, args: ["sortKeyChange"] }], sortDir: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortDir", required: false }] }, { type: i0.Output, args: ["sortDirChange"] }], pageIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageIndex", required: false }] }, { type: i0.Output, args: ["pageIndexChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], _currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "_currentPage", required: false }] }, { type: i0.Output, args: ["_currentPageChange"] }], searchQuery: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchQuery", required: false }] }, { type: i0.Output, args: ["searchQueryChange"] }], selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: false }] }, { type: i0.Output, args: ["selectedItemsChange"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], _columnDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ClxColumnDefDirective), { isSignal: true }] }] } });
|
|
14074
14109
|
|
|
14075
14110
|
class ClxPageNotFoundComponent {
|
|
14076
14111
|
title = input('Página no encontrada', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|