@kouji-ui/components 0.2.0 → 0.4.0
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/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import * as _angular_core from '@angular/core';
|
|
|
5
5
|
import { TemplateRef, ModelSignal, AfterViewInit, OnDestroy, EventEmitter, EnvironmentProviders, ElementRef, OnInit, ResourceRef, Type, InjectionToken } from '@angular/core';
|
|
6
6
|
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
7
7
|
import * as _tanstack_angular_table from '@tanstack/angular-table';
|
|
8
|
-
import { RowData,
|
|
8
|
+
import { RowData, Cell, Row, Header, Column, Table } from '@tanstack/angular-table';
|
|
9
9
|
import { VirtualItem } from '@tanstack/virtual-core';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -5987,8 +5987,19 @@ declare class KjTableComponent<TData extends RowData = unknown> {
|
|
|
5987
5987
|
readonly kjEnableResize: _angular_core.InputSignal<boolean>;
|
|
5988
5988
|
readonly kjEnableRowPinning: _angular_core.InputSignal<boolean>;
|
|
5989
5989
|
readonly kjEditOnDoubleClick: _angular_core.InputSignal<boolean>;
|
|
5990
|
+
/**
|
|
5991
|
+
* Rows per page. `'all'` disables paging so every row renders and the
|
|
5992
|
+
* body scrolls (pair with a fixed-height host). `null` keeps the default
|
|
5993
|
+
* page size (25) — project `<kj-table-pagination>` to expose the controls;
|
|
5994
|
+
* without it the rows beyond the page are silently cut off.
|
|
5995
|
+
*/
|
|
5996
|
+
readonly kjPageSize: _angular_core.InputSignal<number | "all" | null>;
|
|
5990
5997
|
/** Template for master-detail row expansion. Receives `$implicit = row`. */
|
|
5991
5998
|
readonly kjRowExpansionTpl: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
5999
|
+
/** Custom cell templates declared as `ng-template[kjCellTemplate]` content. */
|
|
6000
|
+
private readonly cellTemplates;
|
|
6001
|
+
/** Resolve the registered template for a cell's column, if any. */
|
|
6002
|
+
protected cellTpl(cell: Cell<TData, unknown>): TemplateRef<unknown> | null;
|
|
5992
6003
|
readonly cellEdit: _angular_core.OutputEmitterRef<KjCellEditEvent<TData>>;
|
|
5993
6004
|
readonly stateChange: _angular_core.OutputEmitterRef<KjTableState>;
|
|
5994
6005
|
readonly rowClick: _angular_core.OutputEmitterRef<KjRowClickEvent<TData>>;
|
|
@@ -6115,7 +6126,7 @@ declare class KjTableComponent<TData extends RowData = unknown> {
|
|
|
6115
6126
|
/** Editor `(cancel)` from `KjCellEditorOutlet`: just close the editor. */
|
|
6116
6127
|
protected onEditorCancel(): void;
|
|
6117
6128
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjTableComponent<any>, never>;
|
|
6118
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjTableComponent<any>, "kj-table", never, { "kjResource": { "alias": "kjResource"; "required": false; "isSignal": true; }; "kjDensity": { "alias": "kjDensity"; "required": false; "isSignal": true; }; "kjVariant": { "alias": "kjVariant"; "required": false; "isSignal": true; }; "kjLoading": { "alias": "kjLoading"; "required": false; "isSignal": true; }; "kjSelection": { "alias": "kjSelection"; "required": false; "isSignal": true; }; "kjSelectionMode": { "alias": "kjSelectionMode"; "required": false; "isSignal": true; }; "kjShowSelectionColumn": { "alias": "kjShowSelectionColumn"; "required": false; "isSignal": true; }; "kjStorageKey": { "alias": "kjStorageKey"; "required": false; "isSignal": true; }; "kjStorageAdapter": { "alias": "kjStorageAdapter"; "required": false; "isSignal": true; }; "kjVirtual": { "alias": "kjVirtual"; "required": false; "isSignal": true; }; "kjEstimatedRowSize": { "alias": "kjEstimatedRowSize"; "required": false; "isSignal": true; }; "kjEnableFilters": { "alias": "kjEnableFilters"; "required": false; "isSignal": true; }; "kjEnableResize": { "alias": "kjEnableResize"; "required": false; "isSignal": true; }; "kjEnableRowPinning": { "alias": "kjEnableRowPinning"; "required": false; "isSignal": true; }; "kjEditOnDoubleClick": { "alias": "kjEditOnDoubleClick"; "required": false; "isSignal": true; }; }, { "kjSelection": "kjSelectionChange"; "cellEdit": "cellEdit"; "stateChange": "stateChange"; "rowClick": "rowClick"; "rowDoubleClick": "rowDoubleClick"; }, ["kjRowExpansionTpl"], ["kj-table-toolbar, [kjToolbar]", "[kjSidePanel]", "[kjEmpty]", "[kjError]", "[kjLoading]", "*"], true, [{ directive: typeof i1.KjTable; inputs: { "kjTable": "kjColumns"; "kjTableData": "kjData"; "kjGetRowId": "kjGetRowId"; }; outputs: {}; }]>;
|
|
6129
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjTableComponent<any>, "kj-table", never, { "kjResource": { "alias": "kjResource"; "required": false; "isSignal": true; }; "kjDensity": { "alias": "kjDensity"; "required": false; "isSignal": true; }; "kjVariant": { "alias": "kjVariant"; "required": false; "isSignal": true; }; "kjLoading": { "alias": "kjLoading"; "required": false; "isSignal": true; }; "kjSelection": { "alias": "kjSelection"; "required": false; "isSignal": true; }; "kjSelectionMode": { "alias": "kjSelectionMode"; "required": false; "isSignal": true; }; "kjShowSelectionColumn": { "alias": "kjShowSelectionColumn"; "required": false; "isSignal": true; }; "kjStorageKey": { "alias": "kjStorageKey"; "required": false; "isSignal": true; }; "kjStorageAdapter": { "alias": "kjStorageAdapter"; "required": false; "isSignal": true; }; "kjVirtual": { "alias": "kjVirtual"; "required": false; "isSignal": true; }; "kjEstimatedRowSize": { "alias": "kjEstimatedRowSize"; "required": false; "isSignal": true; }; "kjEnableFilters": { "alias": "kjEnableFilters"; "required": false; "isSignal": true; }; "kjEnableResize": { "alias": "kjEnableResize"; "required": false; "isSignal": true; }; "kjEnableRowPinning": { "alias": "kjEnableRowPinning"; "required": false; "isSignal": true; }; "kjEditOnDoubleClick": { "alias": "kjEditOnDoubleClick"; "required": false; "isSignal": true; }; "kjPageSize": { "alias": "kjPageSize"; "required": false; "isSignal": true; }; }, { "kjSelection": "kjSelectionChange"; "cellEdit": "cellEdit"; "stateChange": "stateChange"; "rowClick": "rowClick"; "rowDoubleClick": "rowDoubleClick"; }, ["kjRowExpansionTpl", "cellTemplates"], ["kj-table-toolbar, [kjToolbar]", "[kjSidePanel]", "[kjEmpty]", "[kjError]", "[kjLoading]", "*"], true, [{ directive: typeof i1.KjTable; inputs: { "kjTable": "kjColumns"; "kjTableData": "kjData"; "kjGetRowId": "kjGetRowId"; }; outputs: {}; }]>;
|
|
6119
6130
|
}
|
|
6120
6131
|
|
|
6121
6132
|
/** Density value emitted by the density toggle group. */
|
|
@@ -6856,6 +6867,47 @@ declare class KjFilterCellOutlet<TData = unknown> {
|
|
|
6856
6867
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjFilterCellOutlet<any>, "[kjFilterCell]", never, { "kjColumn": { "alias": "kjColumn"; "required": true; "isSignal": true; }; "kjFilter": { "alias": "kjFilter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
6857
6868
|
}
|
|
6858
6869
|
|
|
6870
|
+
/**
|
|
6871
|
+
* Registers a custom cell template for one column of a `<kj-table>`.
|
|
6872
|
+
*
|
|
6873
|
+
* Declare inside the table's content with the column id, and use the template
|
|
6874
|
+
* context to render arbitrary markup (badges, buttons, avatars…) instead of
|
|
6875
|
+
* the default `getValue()` text:
|
|
6876
|
+
*
|
|
6877
|
+
* ```html
|
|
6878
|
+
* <kj-table [kjData]="rows()" [kjColumns]="cols">
|
|
6879
|
+
* <ng-template kjCellTemplate="role" let-row let-value="value">
|
|
6880
|
+
* <kj-badge [bg]="roleBg(row.role)">{{ value }}</kj-badge>
|
|
6881
|
+
* </ng-template>
|
|
6882
|
+
* </kj-table>
|
|
6883
|
+
* ```
|
|
6884
|
+
*
|
|
6885
|
+
* Context: `$implicit` / `row` — the row data; `value` — `cell.getValue()`;
|
|
6886
|
+
* `cell` — the TanStack cell instance.
|
|
6887
|
+
*
|
|
6888
|
+
* Editing, grouping, and aggregation cells keep their built-in rendering;
|
|
6889
|
+
* the template applies to plain data cells only.
|
|
6890
|
+
*
|
|
6891
|
+
* @doc-category Library/Data display
|
|
6892
|
+
* @doc
|
|
6893
|
+
* @doc-name table
|
|
6894
|
+
*/
|
|
6895
|
+
declare class KjCellTemplateDirective {
|
|
6896
|
+
/** Column id this template renders. */
|
|
6897
|
+
readonly kjCellTemplate: _angular_core.InputSignal<string>;
|
|
6898
|
+
/** @internal */
|
|
6899
|
+
readonly template: TemplateRef<any>;
|
|
6900
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjCellTemplateDirective, never>;
|
|
6901
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjCellTemplateDirective, "ng-template[kjCellTemplate]", never, { "kjCellTemplate": { "alias": "kjCellTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
6902
|
+
}
|
|
6903
|
+
/** Template context passed to `kjCellTemplate` templates. */
|
|
6904
|
+
interface KjCellTemplateContext<TData> {
|
|
6905
|
+
$implicit: TData;
|
|
6906
|
+
row: TData;
|
|
6907
|
+
value: unknown;
|
|
6908
|
+
cell: unknown;
|
|
6909
|
+
}
|
|
6910
|
+
|
|
6859
6911
|
/**
|
|
6860
6912
|
* Styled wrapper around the headless `KjTabs` directive — root of the tabs
|
|
6861
6913
|
* compound. Re-maps the `kjValue`/`kjOrientation`/`kjActivationMode` inputs to
|
|
@@ -8107,5 +8159,5 @@ declare class KjTreeSelectComponent {
|
|
|
8107
8159
|
|
|
8108
8160
|
declare const KJ_COMPONENTS_VERSION = "0.0.1";
|
|
8109
8161
|
|
|
8110
|
-
export { KJ_COMPONENTS_VERSION, KJ_EDITOR_CONTRACT, KJ_FILTER_CONTEXT, KjAccordionComponent, KjAccordionContentComponent, KjAccordionItemComponent, KjAccordionTriggerComponent, KjAlertActionsComponent, KjAlertComponent, KjAlertDescriptionComponent, KjAlertDismissComponent, KjAlertIconComponent, KjAlertTitleComponent, KjAvatarComponent, KjAvatarGroupComponent, KjBadgeComponent, KjBooleanEditor, KjBreadcrumbComponent, KjBreadcrumbCurrentComponent, KjBreadcrumbEllipsisComponent, KjBreadcrumbItemComponent, KjBreadcrumbLinkComponent, KjBreadcrumbListComponent, KjBreadcrumbSeparatorComponent, KjBulkAction, KjButtonComponent, KjButtonGroupComponent, KjCalendarComponent, KjCardComponent, KjCardContentComponent, KjCardCoverComponent, KjCardFooterComponent, KjCardHeaderComponent, KjCardSubtitleComponent, KjCardTitleComponent, KjCarouselAutoplayComponent, KjCarouselComponent, KjCarouselIndicatorsComponent, KjCarouselNextComponent, KjCarouselPauseComponent, KjCarouselPreviousComponent, KjCarouselSlideComponent, KjCarouselViewportComponent, KjCascadeOptionComponent, KjCascadeSelectComponent, KjCascadeSubPanelComponent, KjCellEditorOutlet, KjChatAvatarComponent, KjChatBubbleComponent, KjChatComponent, KjChatFooterComponent, KjChatHeaderComponent, KjChatLogComponent, KjCheckboxComponent, KjColorPickerComponent, KjComboboxComponent, KjComboboxEmptyComponent, KjComboboxLoadingComponent, KjComboboxOptionComponent, KjCommandEmptyComponent, KjCommandGroupComponent, KjCommandInputComponent, KjCommandItemComponent, KjCommandPaletteComponent, KjCommandPaletteFooter, KjCommandPaletteItemTemplate, KjCommandSeparatorComponent, KjConfirmPopupActionComponent, KjConfirmPopupActionsComponent, KjConfirmPopupCancelComponent, KjConfirmPopupComponent, KjConfirmPopupContentComponent, KjConfirmPopupMessageComponent, KjConfirmPopupTriggerComponent, KjDateEditor, KjDateFilter, KjDatePickerComponent, KjDatetimePickerComponent, KjDialogComponent, KjDividerComponent, KjDrawerComponent, KjDropdownMenuComponent, KjEmptyStateActionsComponent, KjEmptyStateComponent, KjEmptyStateDescriptionComponent, KjEmptyStateIconComponent, KjEmptyStateTitleComponent, KjFieldComponent, KjFieldErrorComponent, KjFieldGroupComponent, KjFieldHelpComponent, KjFieldLabelComponent, KjFileUploadComponent, KjFilterCellOutlet, KjFormActionsComponent, KjFormComponent, KjFormSummaryComponent, KjIconGalleryExample, KjIconUsageExample, KjInputComponent, KjInputGroupAddonComponent, KjInputGroupComponent, KjInputMaskComponent, KjInputMaskCreditCardExample, KjInputMaskCustomTokensExample, KjInputMaskDateExample, KjInputMaskExample, KjInputMaskUsageExample, KjInputMaskValidationExample, KjInputOtpComponent, KjKbdComponent, KjLinkComponent, KjListComponent, KjListItemComponent, KjMenubarComponent, KjMenubarItemComponent, KjNumberEditor, KjNumberFilter, KjNumberInputComponent, KjOptionComponent, KjOverlayBadgeComponent, KjOverlayBadgeContentComponent, KjPaginationComponent, KjPaginationDefaultComponent, KjPaginationEllipsisComponent, KjPaginationFirstComponent, KjPaginationInfoComponent, KjPaginationItemComponent, KjPaginationLastComponent, KjPaginationNextComponent, KjPaginationPreviousComponent, KjPasswordInputComponent, KjPopoverComponent, KjProgressBarComponent, KjRadioComponent, KjRadioGroupComponent, KjSelectComponent, KjSelectEditor, KjSelectFilter, KjSkeletonComponent, KjSliderComponent, KjSpeedDialActionComponent, KjSpeedDialActionsComponent, KjSpeedDialComponent, KjSpeedDialTriggerComponent, KjSpinnerComponent, KjStepComponent, KjStepContentComponent, KjStepLabelComponent, KjStepperComponent, KjStepperNextComponent, KjStepperPreviousComponent, KjStepperResetComponent, KjTabComponent, KjTabListComponent, KjTabPanelComponent, KjTableComponent, KjTablePaginationComponent, KjTableSidePanelComponent, KjTableSidePanelContent, KjTableStatusBarComponent, KjTableToolbarComponent, KjTableVirtual, KjTabsComponent, KjTagComponent, KjTagListComponent, KjTagRemoveComponent, KjTextEditor, KjTextFilter, KjTextareaComponent, KjTimePickerComponent, KjToastCloseComponent, KjToastComponent, KjToastViewportComponent, KjToastWrapperComponent, KjToggleComponent, KjTooltipComponent, KjTreeSelectComponent, KjTreeSelectNodeComponent, LUCIDE_ICON_NAMES, copyToClipboard, downloadString, exportCsv, exportJson, provideLucideIcons, toTsv };
|
|
8111
|
-
export type { ExportOptions, KjCellEditEvent, KjChatBubbleSize, KjChatBubbleVariant, KjDateRange, KjEditorContract, KjEmptyStateLevel, KjEmptyStateLive, KjEmptyStateVariant, KjFilterContext, KjInputSize, KjInputType, KjInputVariant, KjNumberRange, KjRowClickEvent, KjSelectEditorOption, KjSelectFilterOption, KjSpeedDialPosition, KjTableDensity, KjTableExportFormat };
|
|
8162
|
+
export { KJ_COMPONENTS_VERSION, KJ_EDITOR_CONTRACT, KJ_FILTER_CONTEXT, KjAccordionComponent, KjAccordionContentComponent, KjAccordionItemComponent, KjAccordionTriggerComponent, KjAlertActionsComponent, KjAlertComponent, KjAlertDescriptionComponent, KjAlertDismissComponent, KjAlertIconComponent, KjAlertTitleComponent, KjAvatarComponent, KjAvatarGroupComponent, KjBadgeComponent, KjBooleanEditor, KjBreadcrumbComponent, KjBreadcrumbCurrentComponent, KjBreadcrumbEllipsisComponent, KjBreadcrumbItemComponent, KjBreadcrumbLinkComponent, KjBreadcrumbListComponent, KjBreadcrumbSeparatorComponent, KjBulkAction, KjButtonComponent, KjButtonGroupComponent, KjCalendarComponent, KjCardComponent, KjCardContentComponent, KjCardCoverComponent, KjCardFooterComponent, KjCardHeaderComponent, KjCardSubtitleComponent, KjCardTitleComponent, KjCarouselAutoplayComponent, KjCarouselComponent, KjCarouselIndicatorsComponent, KjCarouselNextComponent, KjCarouselPauseComponent, KjCarouselPreviousComponent, KjCarouselSlideComponent, KjCarouselViewportComponent, KjCascadeOptionComponent, KjCascadeSelectComponent, KjCascadeSubPanelComponent, KjCellEditorOutlet, KjCellTemplateDirective, KjChatAvatarComponent, KjChatBubbleComponent, KjChatComponent, KjChatFooterComponent, KjChatHeaderComponent, KjChatLogComponent, KjCheckboxComponent, KjColorPickerComponent, KjComboboxComponent, KjComboboxEmptyComponent, KjComboboxLoadingComponent, KjComboboxOptionComponent, KjCommandEmptyComponent, KjCommandGroupComponent, KjCommandInputComponent, KjCommandItemComponent, KjCommandPaletteComponent, KjCommandPaletteFooter, KjCommandPaletteItemTemplate, KjCommandSeparatorComponent, KjConfirmPopupActionComponent, KjConfirmPopupActionsComponent, KjConfirmPopupCancelComponent, KjConfirmPopupComponent, KjConfirmPopupContentComponent, KjConfirmPopupMessageComponent, KjConfirmPopupTriggerComponent, KjDateEditor, KjDateFilter, KjDatePickerComponent, KjDatetimePickerComponent, KjDialogComponent, KjDividerComponent, KjDrawerComponent, KjDropdownMenuComponent, KjEmptyStateActionsComponent, KjEmptyStateComponent, KjEmptyStateDescriptionComponent, KjEmptyStateIconComponent, KjEmptyStateTitleComponent, KjFieldComponent, KjFieldErrorComponent, KjFieldGroupComponent, KjFieldHelpComponent, KjFieldLabelComponent, KjFileUploadComponent, KjFilterCellOutlet, KjFormActionsComponent, KjFormComponent, KjFormSummaryComponent, KjIconGalleryExample, KjIconUsageExample, KjInputComponent, KjInputGroupAddonComponent, KjInputGroupComponent, KjInputMaskComponent, KjInputMaskCreditCardExample, KjInputMaskCustomTokensExample, KjInputMaskDateExample, KjInputMaskExample, KjInputMaskUsageExample, KjInputMaskValidationExample, KjInputOtpComponent, KjKbdComponent, KjLinkComponent, KjListComponent, KjListItemComponent, KjMenubarComponent, KjMenubarItemComponent, KjNumberEditor, KjNumberFilter, KjNumberInputComponent, KjOptionComponent, KjOverlayBadgeComponent, KjOverlayBadgeContentComponent, KjPaginationComponent, KjPaginationDefaultComponent, KjPaginationEllipsisComponent, KjPaginationFirstComponent, KjPaginationInfoComponent, KjPaginationItemComponent, KjPaginationLastComponent, KjPaginationNextComponent, KjPaginationPreviousComponent, KjPasswordInputComponent, KjPopoverComponent, KjProgressBarComponent, KjRadioComponent, KjRadioGroupComponent, KjSelectComponent, KjSelectEditor, KjSelectFilter, KjSkeletonComponent, KjSliderComponent, KjSpeedDialActionComponent, KjSpeedDialActionsComponent, KjSpeedDialComponent, KjSpeedDialTriggerComponent, KjSpinnerComponent, KjStepComponent, KjStepContentComponent, KjStepLabelComponent, KjStepperComponent, KjStepperNextComponent, KjStepperPreviousComponent, KjStepperResetComponent, KjTabComponent, KjTabListComponent, KjTabPanelComponent, KjTableComponent, KjTablePaginationComponent, KjTableSidePanelComponent, KjTableSidePanelContent, KjTableStatusBarComponent, KjTableToolbarComponent, KjTableVirtual, KjTabsComponent, KjTagComponent, KjTagListComponent, KjTagRemoveComponent, KjTextEditor, KjTextFilter, KjTextareaComponent, KjTimePickerComponent, KjToastCloseComponent, KjToastComponent, KjToastViewportComponent, KjToastWrapperComponent, KjToggleComponent, KjTooltipComponent, KjTreeSelectComponent, KjTreeSelectNodeComponent, LUCIDE_ICON_NAMES, copyToClipboard, downloadString, exportCsv, exportJson, provideLucideIcons, toTsv };
|
|
8163
|
+
export type { ExportOptions, KjCellEditEvent, KjCellTemplateContext, KjChatBubbleSize, KjChatBubbleVariant, KjDateRange, KjEditorContract, KjEmptyStateLevel, KjEmptyStateLive, KjEmptyStateVariant, KjFilterContext, KjInputSize, KjInputType, KjInputVariant, KjNumberRange, KjRowClickEvent, KjSelectEditorOption, KjSelectFilterOption, KjSpeedDialPosition, KjTableDensity, KjTableExportFormat };
|