@emamid/svelte-data-table 0.0.11 → 0.0.12
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 +1 -1
- package/dist/DataTable.doc.d.ts +0 -79
- package/dist/DataTable.doc.js +0 -79
- package/dist/DataTable.svelte +0 -244
- package/dist/DataTable.svelte.d.ts +0 -55
- package/dist/DataTableDataCell.svelte +0 -46
- package/dist/DataTableDataCell.svelte.d.ts +0 -26
- package/dist/DataTableHeaderCell.svelte +0 -25
- package/dist/DataTableHeaderCell.svelte.d.ts +0 -24
- package/dist/cells/Actions.d.ts +0 -71
- package/dist/cells/Actions.js +0 -101
- package/dist/cells/ActionsCell.doc.d.ts +0 -28
- package/dist/cells/ActionsCell.doc.js +0 -28
- package/dist/cells/ActionsCell.svelte +0 -31
- package/dist/cells/ActionsCell.svelte.d.ts +0 -35
- package/dist/cells/ButtonCell.doc.d.ts +0 -6
- package/dist/cells/ButtonCell.doc.js +0 -6
- package/dist/cells/ButtonCell.svelte +0 -17
- package/dist/cells/ButtonCell.svelte.d.ts +0 -22
- package/dist/cells/CheckboxCell.doc.d.ts +0 -6
- package/dist/cells/CheckboxCell.doc.js +0 -6
- package/dist/cells/CheckboxCell.svelte +0 -21
- package/dist/cells/CheckboxCell.svelte.d.ts +0 -23
- package/dist/cells/InputCell.doc.d.ts +0 -6
- package/dist/cells/InputCell.doc.js +0 -6
- package/dist/cells/InputCell.svelte +0 -55
- package/dist/cells/InputCell.svelte.d.ts +0 -26
- package/dist/cells/NumberInputCell.doc.d.ts +0 -6
- package/dist/cells/NumberInputCell.doc.js +0 -6
- package/dist/cells/NumberInputCell.svelte +0 -48
- package/dist/cells/NumberInputCell.svelte.d.ts +0 -25
- package/dist/cells/SelectCell.doc.d.ts +0 -8
- package/dist/cells/SelectCell.doc.js +0 -8
- package/dist/cells/SelectCell.svelte +0 -30
- package/dist/cells/SelectCell.svelte.d.ts +0 -27
- package/dist/cells/SpinCell.doc.d.ts +0 -13
- package/dist/cells/SpinCell.doc.js +0 -13
- package/dist/cells/SpinCell.svelte +0 -59
- package/dist/cells/SpinCell.svelte.d.ts +0 -29
- package/dist/cells/TabWrapper.doc.d.ts +0 -5
- package/dist/cells/TabWrapper.doc.js +0 -5
- package/dist/cells/TabWrapper.svelte +0 -23
- package/dist/cells/TabWrapper.svelte.d.ts +0 -23
- package/dist/cells/ToggleCell.doc.d.ts +0 -6
- package/dist/cells/ToggleCell.doc.js +0 -6
- package/dist/cells/ToggleCell.svelte +0 -21
- package/dist/cells/ToggleCell.svelte.d.ts +0 -23
- package/dist/cells/index.d.ts +0 -19
- package/dist/cells/index.js +0 -19
- package/dist/common.d.ts +0 -136
- package/dist/common.js +0 -14
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -3
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<script>import { createEventDispatcher } from "svelte";
|
|
2
|
-
import { Button } from "flowbite-svelte";
|
|
3
|
-
import { MinusSolid, PlusSolid } from "flowbite-svelte-icons";
|
|
4
|
-
export let item;
|
|
5
|
-
export let column;
|
|
6
|
-
export let value;
|
|
7
|
-
export let decValue = 1;
|
|
8
|
-
export let incValue = 1;
|
|
9
|
-
export let minValue = void 0;
|
|
10
|
-
export let maxValue = void 0;
|
|
11
|
-
export let minusIcon = MinusSolid;
|
|
12
|
-
export let minusIconClass = "pr-1 w-3 h-3";
|
|
13
|
-
export let plusIcon = PlusSolid;
|
|
14
|
-
export let plusIconClass = "pr-1 w-3 h-3";
|
|
15
|
-
const dispatch = createEventDispatcher();
|
|
16
|
-
const decrement = () => {
|
|
17
|
-
dispatch("cellChanged", {
|
|
18
|
-
column,
|
|
19
|
-
item,
|
|
20
|
-
oldValue: value,
|
|
21
|
-
newValue: (value || 0) - decValue
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
const increment = () => {
|
|
25
|
-
dispatch("cellChanged", {
|
|
26
|
-
column,
|
|
27
|
-
item,
|
|
28
|
-
oldValue: value,
|
|
29
|
-
newValue: (value || 0) + incValue
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<div class="spinner">
|
|
35
|
-
<Button
|
|
36
|
-
color="none"
|
|
37
|
-
class="pr-1"
|
|
38
|
-
on:click={decrement}
|
|
39
|
-
disabled={minValue !== undefined && value - decValue < minValue}
|
|
40
|
-
><svelte:component this={minusIcon} class={minusIconClass} /></Button
|
|
41
|
-
>
|
|
42
|
-
{value || 0}
|
|
43
|
-
<Button
|
|
44
|
-
color="none"
|
|
45
|
-
class="pl-1"
|
|
46
|
-
on:click={increment}
|
|
47
|
-
disabled={maxValue !== undefined && value + incValue > maxValue}
|
|
48
|
-
><svelte:component this={plusIcon} class={plusIconClass} /></Button
|
|
49
|
-
>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<style>
|
|
53
|
-
.spinner {
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: row;
|
|
56
|
-
justify-content: center;
|
|
57
|
-
align-items: center;
|
|
58
|
-
}
|
|
59
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { ColumnConfig } from '../common.js';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
item: any;
|
|
6
|
-
column: ColumnConfig;
|
|
7
|
-
value: any;
|
|
8
|
-
decValue?: number | undefined;
|
|
9
|
-
incValue?: number | undefined;
|
|
10
|
-
minValue?: number | undefined;
|
|
11
|
-
maxValue?: number | undefined;
|
|
12
|
-
minusIcon?: ConstructorOfATypedSvelteComponent | undefined;
|
|
13
|
-
minusIconClass?: string | undefined;
|
|
14
|
-
plusIcon?: ConstructorOfATypedSvelteComponent | undefined;
|
|
15
|
-
plusIconClass?: string | undefined;
|
|
16
|
-
};
|
|
17
|
-
events: {
|
|
18
|
-
cellChanged: CustomEvent<any>;
|
|
19
|
-
} & {
|
|
20
|
-
[evt: string]: CustomEvent<any>;
|
|
21
|
-
};
|
|
22
|
-
slots: {};
|
|
23
|
-
};
|
|
24
|
-
export type SpinCellProps = typeof __propDef.props;
|
|
25
|
-
export type SpinCellEvents = typeof __propDef.events;
|
|
26
|
-
export type SpinCellSlots = typeof __propDef.slots;
|
|
27
|
-
export default class SpinCell extends SvelteComponent<SpinCellProps, SpinCellEvents, SpinCellSlots> {
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script>import { createEventDispatcher } from "svelte";
|
|
2
|
-
export let item = null;
|
|
3
|
-
export let column = null;
|
|
4
|
-
const dispatch = createEventDispatcher();
|
|
5
|
-
const prevTab = (_event) => {
|
|
6
|
-
dispatch("prevTab", {
|
|
7
|
-
column,
|
|
8
|
-
item
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
const nextTab = (_event) => {
|
|
12
|
-
dispatch("nextTab", {
|
|
13
|
-
column,
|
|
14
|
-
item
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<!-- svelte-ignore a11y-no-noninteractive-tabindex-->
|
|
20
|
-
<div tabindex="0" on:focus={prevTab} />
|
|
21
|
-
<slot />
|
|
22
|
-
<!-- svelte-ignore a11y-no-noninteractive-tabindex-->
|
|
23
|
-
<div tabindex="0" on:focus={nextTab} />
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { ColumnConfig } from '../common.js';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
item?: any;
|
|
6
|
-
column?: ColumnConfig | null | undefined;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
prevTab: CustomEvent<any>;
|
|
10
|
-
nextTab: CustomEvent<any>;
|
|
11
|
-
} & {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
};
|
|
14
|
-
slots: {
|
|
15
|
-
default: {};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export type TabWrapperProps = typeof __propDef.props;
|
|
19
|
-
export type TabWrapperEvents = typeof __propDef.events;
|
|
20
|
-
export type TabWrapperSlots = typeof __propDef.slots;
|
|
21
|
-
export default class TabWrapper extends SvelteComponent<TabWrapperProps, TabWrapperEvents, TabWrapperSlots> {
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script>import { createEventDispatcher } from "svelte";
|
|
2
|
-
import { Toggle } from "flowbite-svelte";
|
|
3
|
-
export let caption = "";
|
|
4
|
-
export let column;
|
|
5
|
-
export let item;
|
|
6
|
-
export let value;
|
|
7
|
-
let localValue = value;
|
|
8
|
-
const dispatch = createEventDispatcher();
|
|
9
|
-
const toggleChanged = () => {
|
|
10
|
-
dispatch("cellChanged", {
|
|
11
|
-
column,
|
|
12
|
-
item,
|
|
13
|
-
oldValue: value,
|
|
14
|
-
newValue: localValue
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<Toggle {...$$props} bind:checked={localValue} on:change={toggleChanged}
|
|
20
|
-
>{#if caption}{caption}{/if}</Toggle
|
|
21
|
-
>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { ColumnConfig } from '../common.js';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
caption?: string | undefined;
|
|
7
|
-
column: ColumnConfig;
|
|
8
|
-
item: any;
|
|
9
|
-
value: any;
|
|
10
|
-
};
|
|
11
|
-
events: {
|
|
12
|
-
cellChanged: CustomEvent<any>;
|
|
13
|
-
} & {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
};
|
|
16
|
-
slots: {};
|
|
17
|
-
};
|
|
18
|
-
export type ToggleCellProps = typeof __propDef.props;
|
|
19
|
-
export type ToggleCellEvents = typeof __propDef.events;
|
|
20
|
-
export type ToggleCellSlots = typeof __propDef.slots;
|
|
21
|
-
export default class ToggleCell extends SvelteComponent<ToggleCellProps, ToggleCellEvents, ToggleCellSlots> {
|
|
22
|
-
}
|
|
23
|
-
export {};
|
package/dist/cells/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export * from './Actions.js';
|
|
2
|
-
export * from './ActionsCell.svelte';
|
|
3
|
-
export { default as ActionsCell } from './ActionsCell.svelte';
|
|
4
|
-
export * from './ButtonCell.svelte';
|
|
5
|
-
export { default as ButtonCell } from './ButtonCell.svelte';
|
|
6
|
-
export * from './CheckboxCell.svelte';
|
|
7
|
-
export { default as CheckboxCell } from './CheckboxCell.svelte';
|
|
8
|
-
export * from './InputCell.svelte';
|
|
9
|
-
export { default as InputCell } from './InputCell.svelte';
|
|
10
|
-
export * from './NumberInputCell.svelte';
|
|
11
|
-
export { default as NumberInputCell } from './NumberInputCell.svelte';
|
|
12
|
-
export * from './SelectCell.svelte';
|
|
13
|
-
export { default as SelectCell } from './SelectCell.svelte';
|
|
14
|
-
export * from './SpinCell.svelte';
|
|
15
|
-
export { default as SpinCell } from './SpinCell.svelte';
|
|
16
|
-
export * from './TabWrapper.svelte';
|
|
17
|
-
export { default as TabWrapper } from './TabWrapper.svelte';
|
|
18
|
-
export * from './ToggleCell.svelte';
|
|
19
|
-
export { default as ToggleCell } from './ToggleCell.svelte';
|
package/dist/cells/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export * from './Actions.js';
|
|
2
|
-
export * from './ActionsCell.svelte';
|
|
3
|
-
export { default as ActionsCell } from './ActionsCell.svelte';
|
|
4
|
-
export * from './ButtonCell.svelte';
|
|
5
|
-
export { default as ButtonCell } from './ButtonCell.svelte';
|
|
6
|
-
export * from './CheckboxCell.svelte';
|
|
7
|
-
export { default as CheckboxCell } from './CheckboxCell.svelte';
|
|
8
|
-
export * from './InputCell.svelte';
|
|
9
|
-
export { default as InputCell } from './InputCell.svelte';
|
|
10
|
-
export * from './NumberInputCell.svelte';
|
|
11
|
-
export { default as NumberInputCell } from './NumberInputCell.svelte';
|
|
12
|
-
export * from './SelectCell.svelte';
|
|
13
|
-
export { default as SelectCell } from './SelectCell.svelte';
|
|
14
|
-
export * from './SpinCell.svelte';
|
|
15
|
-
export { default as SpinCell } from './SpinCell.svelte';
|
|
16
|
-
export * from './TabWrapper.svelte';
|
|
17
|
-
export { default as TabWrapper } from './TabWrapper.svelte';
|
|
18
|
-
export * from './ToggleCell.svelte';
|
|
19
|
-
export { default as ToggleCell } from './ToggleCell.svelte';
|
package/dist/common.d.ts
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Values for a given column/row, returned by cellRenderer (or the default renderer).
|
|
3
|
-
* @typedef {object} CellValue
|
|
4
|
-
* @property {any} dataValue The data value for the cell.
|
|
5
|
-
* @property {any} [displayValue] The value to be displayed for the cell. If this is not set, value will be used instead.
|
|
6
|
-
*/
|
|
7
|
-
export interface CellValue {
|
|
8
|
-
dataValue: any;
|
|
9
|
-
displayValue?: any;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Returns the value for a given column/row combination.
|
|
13
|
-
* @callback CellRenderer
|
|
14
|
-
* @returns {CellValue}
|
|
15
|
-
*/
|
|
16
|
-
export type CellRenderer = (
|
|
17
|
-
/** Configuration for the cell's column. */
|
|
18
|
-
column: ColumnConfig,
|
|
19
|
-
/** Data for the cell's row. */
|
|
20
|
-
item: any) => Promise<CellValue>;
|
|
21
|
-
/**
|
|
22
|
-
* Returns the a class string for a data cell.
|
|
23
|
-
* @callback DataCellClassFunction
|
|
24
|
-
* @returns {string}
|
|
25
|
-
*/
|
|
26
|
-
export type DataCellClassFunction = (
|
|
27
|
-
/** Data for the cell's row. */
|
|
28
|
-
item: any,
|
|
29
|
-
/** Configuration for the cell's column. */
|
|
30
|
-
column: ColumnConfig,
|
|
31
|
-
/** Value for the data cell, after Column.cellRenderer (if any) has been called. */
|
|
32
|
-
value: CellValue,
|
|
33
|
-
/** True if the cell is focused. */
|
|
34
|
-
isFocused: boolean,
|
|
35
|
-
/** Classes as determined by grid and column properties and focus state. */
|
|
36
|
-
calcClass: string,
|
|
37
|
-
/** Default classes for a TableBodyCell component as defined by FlowBite. */
|
|
38
|
-
defaultClass: string,
|
|
39
|
-
/** tdClassAppend from DataTable. */
|
|
40
|
-
appendClass: string,
|
|
41
|
-
/** tdClassOveride from DataTable. */
|
|
42
|
-
overrideClass: string) => string;
|
|
43
|
-
/**
|
|
44
|
-
* Returns a comparison between two values, used for sorting.
|
|
45
|
-
* @callback SortFunction
|
|
46
|
-
* @returns {number}
|
|
47
|
-
*/
|
|
48
|
-
export type SortFunction = (
|
|
49
|
-
/** First value to compare. */
|
|
50
|
-
a: any,
|
|
51
|
-
/** Second value to compare. */
|
|
52
|
-
b: any) => number;
|
|
53
|
-
/**
|
|
54
|
-
* Configuration options for a grid column
|
|
55
|
-
* @typedef {object} ColumnConfig
|
|
56
|
-
* @property {string} [id] - Used to distinguish between multiple columns that have the same key.
|
|
57
|
-
* @property {string} [key] - Name of the property in each row item that will be used for this column's value.
|
|
58
|
-
* @property {string} [title] - Text to display in the column's header.
|
|
59
|
-
* @property {CellRenderer} [cellRenderer] - Dynamically determines the data value and display value for a cell.
|
|
60
|
-
* @property {ConstructorOfATypedSvelteComponent} [viewComponent] - Svelte component class to be displayed in the cell regardless of focus. If set, focusComponent will be ignored.
|
|
61
|
-
* @property {object} [viewComponentConfig] - Properties to be passed when creating viewComponent.
|
|
62
|
-
* @property {ConstructorOfATypedSvelteComponent} [focusComponent] - Svelte component class to be displayed in the cell when it has focus.
|
|
63
|
-
* @property {object} [focusComponentConfig] - Properties to be passed when creating focusComponent.
|
|
64
|
-
* @property {string} [tdClassAppend] - Classes to append to existing CSS when not focused.
|
|
65
|
-
* @property {string} [tdClassOverride] - Classes to replace existing CSS with when not focused.
|
|
66
|
-
* @property {string} [tdFocusedClassAppend] - Classes to append to existing CSS when focused.
|
|
67
|
-
* @property {string} [tdFocusedClassOverride] - Classes to replace existing CSS with when focused.
|
|
68
|
-
* @property {DataCellClassFunction} [tdClassGetter] - Dynamically determines CSS classes for a cell.
|
|
69
|
-
* @property {string} [thClassAppend] - Classes to append to existing CSS for header cells.
|
|
70
|
-
* @property {string} [thClassOverride] - Class to replace existing CSS for header cells.
|
|
71
|
-
* @property {boolean} [canFocus] - True if cells in this column can be focused.
|
|
72
|
-
* @property {boolean} [canSort] - If true, clicking the column's header will set sorting to sortFunction or sortKey, or reverse it if already set.
|
|
73
|
-
* @property {ConstructorOfATypedSvelteComponent} [sortAscendingIcon] - Svelte component class to be displayed in the column is sorting ascended (overrides table).
|
|
74
|
-
* @property {ConstructorOfATypedSvelteComponent} [sortDescendingIcon] - Svelte component class to be displayed in the column is sorting descended (overrides table).
|
|
75
|
-
* @property {SortFunction} [sortFunction] - Comparison function for complex sorting.
|
|
76
|
-
* @property {string} [sortKey] - Item property to sort by, if sortFunction is not defined.
|
|
77
|
-
*/
|
|
78
|
-
export interface ColumnConfig {
|
|
79
|
-
id?: string;
|
|
80
|
-
key?: string;
|
|
81
|
-
title?: string;
|
|
82
|
-
cellRenderer?: CellRenderer;
|
|
83
|
-
viewComponent?: ConstructorOfATypedSvelteComponent;
|
|
84
|
-
viewComponentConfig?: any;
|
|
85
|
-
focusComponent?: ConstructorOfATypedSvelteComponent;
|
|
86
|
-
focusComponentConfig?: any;
|
|
87
|
-
tdClassAppend?: string;
|
|
88
|
-
tdClassOverride?: string;
|
|
89
|
-
tdFocusedClassAppend?: string;
|
|
90
|
-
tdFocusedClassOverride?: string;
|
|
91
|
-
tdClassGetter?: DataCellClassFunction;
|
|
92
|
-
thClassAppend?: string;
|
|
93
|
-
thClassOverride?: string;
|
|
94
|
-
canFocus?: boolean;
|
|
95
|
-
canSort?: boolean;
|
|
96
|
-
sortFunction?: SortFunction;
|
|
97
|
-
sortKey?: string;
|
|
98
|
-
sortAscendingIcon?: ConstructorOfATypedSvelteComponent;
|
|
99
|
-
sortDescendingIcon?: ConstructorOfATypedSvelteComponent;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Returns the a class string for a data row.
|
|
103
|
-
* @callback RowClassFunction
|
|
104
|
-
* @returns {string}
|
|
105
|
-
*/
|
|
106
|
-
export type RowClassFunction = (
|
|
107
|
-
/** Data for the cell's row. */
|
|
108
|
-
item: any,
|
|
109
|
-
/** True if a cell on this row is focused. */
|
|
110
|
-
isFocused: boolean,
|
|
111
|
-
/** Classes as termined by grid properties. */
|
|
112
|
-
calcClass: string,
|
|
113
|
-
/** Default classes for a TableBodyRow component as defined by FlowBite. */
|
|
114
|
-
defaultClass: string,
|
|
115
|
-
/** trClassAppend from DataTable. */
|
|
116
|
-
appendClass: string,
|
|
117
|
-
/** trClassOveride from DataTable. */
|
|
118
|
-
overrideClass: string) => string;
|
|
119
|
-
/**
|
|
120
|
-
* Joins an array of classes into a string, removing any falsey values.
|
|
121
|
-
* @function joinClasses
|
|
122
|
-
* @param {...string} items - Strings of CSS classes to join.
|
|
123
|
-
* @returns {string}
|
|
124
|
-
*/
|
|
125
|
-
export declare const joinClasses: (...classes: (string | false | null | undefined)[]) => string;
|
|
126
|
-
/**
|
|
127
|
-
* Values for enterAction on DataTable.
|
|
128
|
-
* @enum {string} EnterAction
|
|
129
|
-
*/
|
|
130
|
-
export type EnterAction = 'next' | 'down' | 'stay';
|
|
131
|
-
export type GetTDClassFunction = (item: any, value: any, isFocused: boolean) => string;
|
|
132
|
-
export interface InternalColumnConfig extends ColumnConfig {
|
|
133
|
-
getTDClass: GetTDClassFunction;
|
|
134
|
-
}
|
|
135
|
-
export declare const blankCellValue: CellValue;
|
|
136
|
-
export declare const defaultCellRenderer: CellRenderer;
|
package/dist/common.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Joins an array of classes into a string, removing any falsey values.
|
|
3
|
-
* @function joinClasses
|
|
4
|
-
* @param {...string} items - Strings of CSS classes to join.
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
7
|
-
export const joinClasses = (...classes) => (classes || []).filter((value) => !!value).join(' ');
|
|
8
|
-
export const blankCellValue = {
|
|
9
|
-
dataValue: null,
|
|
10
|
-
displayValue: '',
|
|
11
|
-
};
|
|
12
|
-
export const defaultCellRenderer = async (column, item) => column.key
|
|
13
|
-
? { dataValue: item[column.key], displayValue: item[column.key] || '' }
|
|
14
|
-
: blankCellValue;
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED