@kouji-ui/components 0.2.0 → 0.3.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
|
/**
|
|
@@ -5989,6 +5989,10 @@ declare class KjTableComponent<TData extends RowData = unknown> {
|
|
|
5989
5989
|
readonly kjEditOnDoubleClick: _angular_core.InputSignal<boolean>;
|
|
5990
5990
|
/** Template for master-detail row expansion. Receives `$implicit = row`. */
|
|
5991
5991
|
readonly kjRowExpansionTpl: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
5992
|
+
/** Custom cell templates declared as `ng-template[kjCellTemplate]` content. */
|
|
5993
|
+
private readonly cellTemplates;
|
|
5994
|
+
/** Resolve the registered template for a cell's column, if any. */
|
|
5995
|
+
protected cellTpl(cell: Cell<TData, unknown>): TemplateRef<unknown> | null;
|
|
5992
5996
|
readonly cellEdit: _angular_core.OutputEmitterRef<KjCellEditEvent<TData>>;
|
|
5993
5997
|
readonly stateChange: _angular_core.OutputEmitterRef<KjTableState>;
|
|
5994
5998
|
readonly rowClick: _angular_core.OutputEmitterRef<KjRowClickEvent<TData>>;
|
|
@@ -6115,7 +6119,7 @@ declare class KjTableComponent<TData extends RowData = unknown> {
|
|
|
6115
6119
|
/** Editor `(cancel)` from `KjCellEditorOutlet`: just close the editor. */
|
|
6116
6120
|
protected onEditorCancel(): void;
|
|
6117
6121
|
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: {}; }]>;
|
|
6122
|
+
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", "cellTemplates"], ["kj-table-toolbar, [kjToolbar]", "[kjSidePanel]", "[kjEmpty]", "[kjError]", "[kjLoading]", "*"], true, [{ directive: typeof i1.KjTable; inputs: { "kjTable": "kjColumns"; "kjTableData": "kjData"; "kjGetRowId": "kjGetRowId"; }; outputs: {}; }]>;
|
|
6119
6123
|
}
|
|
6120
6124
|
|
|
6121
6125
|
/** Density value emitted by the density toggle group. */
|
|
@@ -6856,6 +6860,47 @@ declare class KjFilterCellOutlet<TData = unknown> {
|
|
|
6856
6860
|
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
6861
|
}
|
|
6858
6862
|
|
|
6863
|
+
/**
|
|
6864
|
+
* Registers a custom cell template for one column of a `<kj-table>`.
|
|
6865
|
+
*
|
|
6866
|
+
* Declare inside the table's content with the column id, and use the template
|
|
6867
|
+
* context to render arbitrary markup (badges, buttons, avatars…) instead of
|
|
6868
|
+
* the default `getValue()` text:
|
|
6869
|
+
*
|
|
6870
|
+
* ```html
|
|
6871
|
+
* <kj-table [kjData]="rows()" [kjColumns]="cols">
|
|
6872
|
+
* <ng-template kjCellTemplate="role" let-row let-value="value">
|
|
6873
|
+
* <kj-badge [bg]="roleBg(row.role)">{{ value }}</kj-badge>
|
|
6874
|
+
* </ng-template>
|
|
6875
|
+
* </kj-table>
|
|
6876
|
+
* ```
|
|
6877
|
+
*
|
|
6878
|
+
* Context: `$implicit` / `row` — the row data; `value` — `cell.getValue()`;
|
|
6879
|
+
* `cell` — the TanStack cell instance.
|
|
6880
|
+
*
|
|
6881
|
+
* Editing, grouping, and aggregation cells keep their built-in rendering;
|
|
6882
|
+
* the template applies to plain data cells only.
|
|
6883
|
+
*
|
|
6884
|
+
* @doc-category Library/Data display
|
|
6885
|
+
* @doc
|
|
6886
|
+
* @doc-name table
|
|
6887
|
+
*/
|
|
6888
|
+
declare class KjCellTemplateDirective {
|
|
6889
|
+
/** Column id this template renders. */
|
|
6890
|
+
readonly kjCellTemplate: _angular_core.InputSignal<string>;
|
|
6891
|
+
/** @internal */
|
|
6892
|
+
readonly template: TemplateRef<any>;
|
|
6893
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjCellTemplateDirective, never>;
|
|
6894
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjCellTemplateDirective, "ng-template[kjCellTemplate]", never, { "kjCellTemplate": { "alias": "kjCellTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
6895
|
+
}
|
|
6896
|
+
/** Template context passed to `kjCellTemplate` templates. */
|
|
6897
|
+
interface KjCellTemplateContext<TData> {
|
|
6898
|
+
$implicit: TData;
|
|
6899
|
+
row: TData;
|
|
6900
|
+
value: unknown;
|
|
6901
|
+
cell: unknown;
|
|
6902
|
+
}
|
|
6903
|
+
|
|
6859
6904
|
/**
|
|
6860
6905
|
* Styled wrapper around the headless `KjTabs` directive — root of the tabs
|
|
6861
6906
|
* compound. Re-maps the `kjValue`/`kjOrientation`/`kjActivationMode` inputs to
|
|
@@ -8107,5 +8152,5 @@ declare class KjTreeSelectComponent {
|
|
|
8107
8152
|
|
|
8108
8153
|
declare const KJ_COMPONENTS_VERSION = "0.0.1";
|
|
8109
8154
|
|
|
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 };
|
|
8155
|
+
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 };
|
|
8156
|
+
export type { ExportOptions, KjCellEditEvent, KjCellTemplateContext, KjChatBubbleSize, KjChatBubbleVariant, KjDateRange, KjEditorContract, KjEmptyStateLevel, KjEmptyStateLive, KjEmptyStateVariant, KjFilterContext, KjInputSize, KjInputType, KjInputVariant, KjNumberRange, KjRowClickEvent, KjSelectEditorOption, KjSelectFilterOption, KjSpeedDialPosition, KjTableDensity, KjTableExportFormat };
|