@emamid/svelte-data-table 0.0.22 → 1.0.1
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/dist/DataTable.svelte +303 -239
- package/dist/DataTable.svelte.d.ts +30 -60
- package/dist/DataTableDataCell.svelte +157 -90
- package/dist/DataTableDataCell.svelte.d.ts +18 -27
- package/dist/DataTableHeaderCell.svelte +63 -21
- package/dist/DataTableHeaderCell.svelte.d.ts +9 -23
- package/dist/DataTableIcon.svelte +25 -0
- package/dist/DataTableIcon.svelte.d.ts +9 -0
- package/dist/DataTableRow.svelte +150 -80
- package/dist/DataTableRow.svelte.d.ts +26 -34
- package/dist/cells/Actions.d.ts +1 -1
- package/dist/cells/Actions.js +10 -11
- package/dist/cells/ActionsCell.svelte +56 -33
- package/dist/cells/ActionsCell.svelte.d.ts +9 -47
- package/dist/cells/ButtonCell.svelte +58 -16
- package/dist/cells/ButtonCell.svelte.d.ts +11 -20
- package/dist/cells/CheckboxCell.svelte +72 -19
- package/dist/cells/CheckboxCell.svelte.d.ts +11 -22
- package/dist/cells/InputCell.svelte +93 -48
- package/dist/cells/InputCell.svelte.d.ts +14 -25
- package/dist/cells/MultiSelectCell.svelte +85 -25
- package/dist/cells/MultiSelectCell.svelte.d.ts +15 -26
- package/dist/cells/NumberInputCell.svelte +90 -44
- package/dist/cells/NumberInputCell.svelte.d.ts +13 -24
- package/dist/cells/RadioCell.svelte +66 -0
- package/dist/cells/RadioCell.svelte.d.ts +12 -0
- package/dist/cells/RangeCell.svelte +66 -17
- package/dist/cells/RangeCell.svelte.d.ts +13 -22
- package/dist/cells/SelectCell.svelte +87 -25
- package/dist/cells/SelectCell.svelte.d.ts +15 -26
- package/dist/cells/SpinCell.svelte +91 -42
- package/dist/cells/SpinCell.svelte.d.ts +13 -28
- package/dist/cells/TabWrapper.svelte +23 -21
- package/dist/cells/TabWrapper.svelte.d.ts +10 -22
- package/dist/cells/index.d.ts +2 -4
- package/dist/cells/index.js +2 -4
- package/dist/common.d.ts +199 -53
- package/dist/common.js +30 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/themes/active.d.ts +4 -0
- package/dist/themes/active.js +12 -0
- package/dist/themes/daisyUI.d.ts +2 -0
- package/dist/themes/daisyUI.js +47 -0
- package/dist/themes/default.d.ts +2 -0
- package/dist/themes/default.js +57 -0
- package/dist/themes/iconify.d.ts +2 -0
- package/dist/themes/iconify.js +33 -0
- package/dist/themes/index.d.ts +4 -0
- package/dist/themes/index.js +4 -0
- package/package.json +28 -32
- package/dist/DataTable.doc.d.ts +0 -81
- package/dist/DataTable.doc.js +0 -81
- package/dist/cells/ActionsCell.doc.d.ts +0 -28
- package/dist/cells/ActionsCell.doc.js +0 -28
- package/dist/cells/ButtonCell.doc.d.ts +0 -9
- package/dist/cells/ButtonCell.doc.js +0 -9
- package/dist/cells/CheckboxCell.doc.d.ts +0 -6
- package/dist/cells/CheckboxCell.doc.js +0 -6
- package/dist/cells/InputCell.doc.d.ts +0 -6
- package/dist/cells/InputCell.doc.js +0 -6
- package/dist/cells/MultiSelectCell.doc.d.ts +0 -8
- package/dist/cells/MultiSelectCell.doc.js +0 -8
- package/dist/cells/NumberInputCell.doc.d.ts +0 -6
- package/dist/cells/NumberInputCell.doc.js +0 -6
- package/dist/cells/RangeCell.doc.d.ts +0 -7
- package/dist/cells/RangeCell.doc.js +0 -7
- package/dist/cells/RatingCell.doc.d.ts +0 -7
- package/dist/cells/RatingCell.doc.js +0 -7
- package/dist/cells/RatingCell.svelte +0 -13
- package/dist/cells/RatingCell.svelte.d.ts +0 -22
- package/dist/cells/SelectCell.doc.d.ts +0 -8
- package/dist/cells/SelectCell.doc.js +0 -8
- package/dist/cells/SpinCell.doc.d.ts +0 -13
- package/dist/cells/SpinCell.doc.js +0 -13
- package/dist/cells/TabWrapper.doc.d.ts +0 -5
- package/dist/cells/TabWrapper.doc.js +0 -5
- 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/DataTable.doc.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The DataTable component based on {@link https://flowbite-svelte.com/docs/components/table}
|
|
3
|
-
* @typedef {object} DataTable
|
|
4
|
-
* @property {ColumnConfig[]} columns - Configuration for each column to be displayed in the table.
|
|
5
|
-
* @property {any[]} items - Data for the rows in the table.
|
|
6
|
-
* @property {RowBoolean} [allowRowDrag] -
|
|
7
|
-
* @property {RowDropBoolean} [allowRowDrop] -
|
|
8
|
-
* @property {string} [sortKey] - Data property to sort by.
|
|
9
|
-
* @property {SortFunction} [sortFunction] - Function for more complex-sorting.
|
|
10
|
-
* @property {boolean} [reverseSort] - True when sorting is reversed.
|
|
11
|
-
* @property {string} [sortColumnID] - The id (or key) property of the column being sorted by.
|
|
12
|
-
* @property {ConstructorOfATypedSvelteComponent} [sortAscendingIcon] - Svelte component class to be displayed in columns that are sorting ascended. Defaults to AngleDownSolid from {@link https://flowbite.com/icons/}
|
|
13
|
-
* @property {ConstructorOfATypedSvelteComponent} [sortDescendingIcon] - Svelte component class to be displayed in columns that are sorting descended. Defaults to AngleUpSolid from {@link https://flowbite.com/icons/}
|
|
14
|
-
* @property {string} [itemKey] - Property to use when distinguish between rows. If not populated, the array index is used.
|
|
15
|
-
* @property {EnterAction} [enterAction] - Determines what pressing the enter key in a focused cell does. Can be 'next', 'down', or 'stay'. Default is 'next'. If 'next', enter will act the same as tab. If 'down', focus will move down to the row below the current one. If 'stay', the enter key will not cause movement.
|
|
16
|
-
* @property {string} [divClassAppend] - Classes to be appended to Table.divClass .
|
|
17
|
-
* @property {string} [divClassOverride] - Classes to replace Table.divClass with.
|
|
18
|
-
* @property {string} [tableClassAppend] - Classes to be appended to Table.class .
|
|
19
|
-
* @property {string} [tableClassOverride] - Classes to replace Table.class with.
|
|
20
|
-
* @property {string} [theadClassAppend] - Classes to be appended to TableHead.theadClass .
|
|
21
|
-
* @property {string} [theadClassOverride] - Classes to replace TableHead.theadClass with.
|
|
22
|
-
* @property {string} [thClassAppend] - Classes to be appended to TableHeadCell.class .
|
|
23
|
-
* @property {string} [thClassOverride] - Classes to replace TableHeadCell.class with.
|
|
24
|
-
* @property {string} [tableBodyClassAppend] - Classes to be appended to TableBody.tableBodyClass .
|
|
25
|
-
* @property {string} [tableBodyClassOverride] - Classes to replace TableBody.tableBodyClass with.
|
|
26
|
-
* @property {string} [tdClassAppend] - Classes to be appended to TableBodyCell.tdClass . Column configs can further modify this.
|
|
27
|
-
* @property {string} [tdClassOverride] - Classes to replace TableBodyCell.tdClass with. Column configs can further modify this.
|
|
28
|
-
* @property {string} [tdFocusedClassAppend] - Classes to be appended to TableBodyCell.tdClass when a cell is focused. Column configs can further modify this.
|
|
29
|
-
* @property {string} [tdFocusedClassOverride] - Classes to replace TableBodyCell.tdClass with with a cell is focused. Column configs can further modify this.
|
|
30
|
-
* @property {string} [trClassAppend] - Classes to be appended to TableBodyRow.class . trClassGetter can further modify this.
|
|
31
|
-
* @property {string} [trClassOverride] - Classes to replace TableBodyRow.class with. trClassGetter can further modify this.
|
|
32
|
-
* @property {RowClassFunction} [trClassGetter] - Calculates the CSS classes for a TableBodyRow .
|
|
33
|
-
* @property {boolean} [striped] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
34
|
-
* @property {boolean} [hoverable] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
35
|
-
* @property {boolean} [noborder] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
36
|
-
* @property {boolean} [shadow] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
37
|
-
* @property {string} [color] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
38
|
-
* @property {string} [customColor] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
39
|
-
|
|
40
|
-
* @fires action
|
|
41
|
-
* @fires cellChanged
|
|
42
|
-
* @fires cellClicked
|
|
43
|
-
* @fires headerClicked
|
|
44
|
-
* @fires rowClicked
|
|
45
|
-
*/
|
|
46
|
-
export {};
|
|
47
|
-
/**
|
|
48
|
-
* @event cellClicked
|
|
49
|
-
* @type {object}
|
|
50
|
-
* @property {any} detail.item - Data for the cell's row.
|
|
51
|
-
* @property {ColumnConfig} detail.column - Configuration for the cell's column.
|
|
52
|
-
*/
|
|
53
|
-
/**
|
|
54
|
-
* @event headerClicked
|
|
55
|
-
* @type {object}
|
|
56
|
-
* @property {ColumnConfig} detail.column - Configuration for the header's column.
|
|
57
|
-
* @property {string} detail.sortColumnID - The current sortColumnID.
|
|
58
|
-
* @property {string} detail.sortKey - The current sortKey.
|
|
59
|
-
* @property {SortFunction} detail.sortFunction The current sortFunction.
|
|
60
|
-
* @property {boolean} detail.reverseSort - True if the grid is currently sorting in reverse.
|
|
61
|
-
*/
|
|
62
|
-
/**
|
|
63
|
-
* @event rowClicked
|
|
64
|
-
* @type {object}
|
|
65
|
-
* @property {any} detail.item - Data for the row.
|
|
66
|
-
*/
|
|
67
|
-
/**
|
|
68
|
-
* @event action
|
|
69
|
-
* @type {object}
|
|
70
|
-
* @property {string} detail.action - The name property of the action whose button was clicked.
|
|
71
|
-
* @property {any} detail.item - Data for the action cell's row.
|
|
72
|
-
* @property {ColumnConfig} detail.column - Configuration for the action cell's column.
|
|
73
|
-
*/
|
|
74
|
-
/**
|
|
75
|
-
* @event cellChanged
|
|
76
|
-
* @type {object}
|
|
77
|
-
* @property {any} detail.item - Data for the cell's row, prior to the change.
|
|
78
|
-
* @property {ColumnConfig} detail.column - Configuration for the cell's column.
|
|
79
|
-
* @property {any} detail.oldValue - The data value of the cell before the change.
|
|
80
|
-
* @property {any} detail.newValue - The new value that needs to be applied to the cell.
|
|
81
|
-
*/
|
package/dist/DataTable.doc.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The DataTable component based on {@link https://flowbite-svelte.com/docs/components/table}
|
|
3
|
-
* @typedef {object} DataTable
|
|
4
|
-
* @property {ColumnConfig[]} columns - Configuration for each column to be displayed in the table.
|
|
5
|
-
* @property {any[]} items - Data for the rows in the table.
|
|
6
|
-
* @property {RowBoolean} [allowRowDrag] -
|
|
7
|
-
* @property {RowDropBoolean} [allowRowDrop] -
|
|
8
|
-
* @property {string} [sortKey] - Data property to sort by.
|
|
9
|
-
* @property {SortFunction} [sortFunction] - Function for more complex-sorting.
|
|
10
|
-
* @property {boolean} [reverseSort] - True when sorting is reversed.
|
|
11
|
-
* @property {string} [sortColumnID] - The id (or key) property of the column being sorted by.
|
|
12
|
-
* @property {ConstructorOfATypedSvelteComponent} [sortAscendingIcon] - Svelte component class to be displayed in columns that are sorting ascended. Defaults to AngleDownSolid from {@link https://flowbite.com/icons/}
|
|
13
|
-
* @property {ConstructorOfATypedSvelteComponent} [sortDescendingIcon] - Svelte component class to be displayed in columns that are sorting descended. Defaults to AngleUpSolid from {@link https://flowbite.com/icons/}
|
|
14
|
-
* @property {string} [itemKey] - Property to use when distinguish between rows. If not populated, the array index is used.
|
|
15
|
-
* @property {EnterAction} [enterAction] - Determines what pressing the enter key in a focused cell does. Can be 'next', 'down', or 'stay'. Default is 'next'. If 'next', enter will act the same as tab. If 'down', focus will move down to the row below the current one. If 'stay', the enter key will not cause movement.
|
|
16
|
-
* @property {string} [divClassAppend] - Classes to be appended to Table.divClass .
|
|
17
|
-
* @property {string} [divClassOverride] - Classes to replace Table.divClass with.
|
|
18
|
-
* @property {string} [tableClassAppend] - Classes to be appended to Table.class .
|
|
19
|
-
* @property {string} [tableClassOverride] - Classes to replace Table.class with.
|
|
20
|
-
* @property {string} [theadClassAppend] - Classes to be appended to TableHead.theadClass .
|
|
21
|
-
* @property {string} [theadClassOverride] - Classes to replace TableHead.theadClass with.
|
|
22
|
-
* @property {string} [thClassAppend] - Classes to be appended to TableHeadCell.class .
|
|
23
|
-
* @property {string} [thClassOverride] - Classes to replace TableHeadCell.class with.
|
|
24
|
-
* @property {string} [tableBodyClassAppend] - Classes to be appended to TableBody.tableBodyClass .
|
|
25
|
-
* @property {string} [tableBodyClassOverride] - Classes to replace TableBody.tableBodyClass with.
|
|
26
|
-
* @property {string} [tdClassAppend] - Classes to be appended to TableBodyCell.tdClass . Column configs can further modify this.
|
|
27
|
-
* @property {string} [tdClassOverride] - Classes to replace TableBodyCell.tdClass with. Column configs can further modify this.
|
|
28
|
-
* @property {string} [tdFocusedClassAppend] - Classes to be appended to TableBodyCell.tdClass when a cell is focused. Column configs can further modify this.
|
|
29
|
-
* @property {string} [tdFocusedClassOverride] - Classes to replace TableBodyCell.tdClass with with a cell is focused. Column configs can further modify this.
|
|
30
|
-
* @property {string} [trClassAppend] - Classes to be appended to TableBodyRow.class . trClassGetter can further modify this.
|
|
31
|
-
* @property {string} [trClassOverride] - Classes to replace TableBodyRow.class with. trClassGetter can further modify this.
|
|
32
|
-
* @property {RowClassFunction} [trClassGetter] - Calculates the CSS classes for a TableBodyRow .
|
|
33
|
-
* @property {boolean} [striped] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
34
|
-
* @property {boolean} [hoverable] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
35
|
-
* @property {boolean} [noborder] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
36
|
-
* @property {boolean} [shadow] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
37
|
-
* @property {string} [color] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
38
|
-
* @property {string} [customColor] - Passes through to on {@link https://flowbite-svelte.com/docs/components/table}
|
|
39
|
-
|
|
40
|
-
* @fires action
|
|
41
|
-
* @fires cellChanged
|
|
42
|
-
* @fires cellClicked
|
|
43
|
-
* @fires headerClicked
|
|
44
|
-
* @fires rowClicked
|
|
45
|
-
*/
|
|
46
|
-
export {};
|
|
47
|
-
/**
|
|
48
|
-
* @event cellClicked
|
|
49
|
-
* @type {object}
|
|
50
|
-
* @property {any} detail.item - Data for the cell's row.
|
|
51
|
-
* @property {ColumnConfig} detail.column - Configuration for the cell's column.
|
|
52
|
-
*/
|
|
53
|
-
/**
|
|
54
|
-
* @event headerClicked
|
|
55
|
-
* @type {object}
|
|
56
|
-
* @property {ColumnConfig} detail.column - Configuration for the header's column.
|
|
57
|
-
* @property {string} detail.sortColumnID - The current sortColumnID.
|
|
58
|
-
* @property {string} detail.sortKey - The current sortKey.
|
|
59
|
-
* @property {SortFunction} detail.sortFunction The current sortFunction.
|
|
60
|
-
* @property {boolean} detail.reverseSort - True if the grid is currently sorting in reverse.
|
|
61
|
-
*/
|
|
62
|
-
/**
|
|
63
|
-
* @event rowClicked
|
|
64
|
-
* @type {object}
|
|
65
|
-
* @property {any} detail.item - Data for the row.
|
|
66
|
-
*/
|
|
67
|
-
/**
|
|
68
|
-
* @event action
|
|
69
|
-
* @type {object}
|
|
70
|
-
* @property {string} detail.action - The name property of the action whose button was clicked.
|
|
71
|
-
* @property {any} detail.item - Data for the action cell's row.
|
|
72
|
-
* @property {ColumnConfig} detail.column - Configuration for the action cell's column.
|
|
73
|
-
*/
|
|
74
|
-
/**
|
|
75
|
-
* @event cellChanged
|
|
76
|
-
* @type {object}
|
|
77
|
-
* @property {any} detail.item - Data for the cell's row, prior to the change.
|
|
78
|
-
* @property {ColumnConfig} detail.column - Configuration for the cell's column.
|
|
79
|
-
* @property {any} detail.oldValue - The data value of the cell before the change.
|
|
80
|
-
* @property {any} detail.newValue - The new value that needs to be applied to the cell.
|
|
81
|
-
*/
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns true if the action should be disabled for the row.
|
|
3
|
-
* @callback ActionDisablementFunction
|
|
4
|
-
* @param {any} item - The row of data
|
|
5
|
-
* @param {ColumnConfig} column - The configuration for the ActionCell's column
|
|
6
|
-
* @param {Action} action - The action to disable or enable
|
|
7
|
-
* @returns {boolean}
|
|
8
|
-
*/
|
|
9
|
-
export {};
|
|
10
|
-
/**
|
|
11
|
-
* An action to be displayed inside an ActionCell
|
|
12
|
-
* @interface Action
|
|
13
|
-
* @property {string} [buttonClass] - Class for the button. If not populated, the cell's buttonClass will be used.
|
|
14
|
-
* @property {ButtonColor} [buttonColor] - See {@link https://flowbite-svelte.com/docs/pages/typescript}. If not populated, the cell's buttonColor will be used.
|
|
15
|
-
* @property {string} [caption] - Text displayed with the icon.
|
|
16
|
-
* @property {string} name - Name of the action. Returned as part of the action event on DataGrid when the button is clicked.
|
|
17
|
-
* @property {ConstructorOfATypedSvelteComponent} icon - Icon to be displayed in the button.
|
|
18
|
-
* @property {string} [iconClass] - Class for the icon to be displayed in the button. If not populated, the cell's iconClass will be used.
|
|
19
|
-
* @property {ActionDisablementFunction} [isDisabled] - If populated, will be called to check whether the button should be enabled or disabled for each row.
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* Cell containing an array of Button ({@link https://flowbite-svelte.com/docs/components/buttons}) components which fire the action event on the grid when clicked.
|
|
23
|
-
* @typedef {object} ActionsCell
|
|
24
|
-
* @property [Action[]] actions - The actions to be displayed inside the cell.
|
|
25
|
-
* @property {string} [buttonClass] - Class for the cell's buttons. Defaults to 'border-0 p-1'.
|
|
26
|
-
* @property {ButtonColor} [buttonColor] - See {@link https://flowbite-svelte.com/docs/pages/typescript}. Defaults to 'light'.
|
|
27
|
-
* @property {string} [iconClass] - Class for the icon to be displayed in the button. Defaults to 'w-4 h-4'.
|
|
28
|
-
*/
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Returns true if the action should be disabled for the row.
|
|
4
|
-
* @callback ActionDisablementFunction
|
|
5
|
-
* @param {any} item - The row of data
|
|
6
|
-
* @param {ColumnConfig} column - The configuration for the ActionCell's column
|
|
7
|
-
* @param {Action} action - The action to disable or enable
|
|
8
|
-
* @returns {boolean}
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* An action to be displayed inside an ActionCell
|
|
12
|
-
* @interface Action
|
|
13
|
-
* @property {string} [buttonClass] - Class for the button. If not populated, the cell's buttonClass will be used.
|
|
14
|
-
* @property {ButtonColor} [buttonColor] - See {@link https://flowbite-svelte.com/docs/pages/typescript}. If not populated, the cell's buttonColor will be used.
|
|
15
|
-
* @property {string} [caption] - Text displayed with the icon.
|
|
16
|
-
* @property {string} name - Name of the action. Returned as part of the action event on DataGrid when the button is clicked.
|
|
17
|
-
* @property {ConstructorOfATypedSvelteComponent} icon - Icon to be displayed in the button.
|
|
18
|
-
* @property {string} [iconClass] - Class for the icon to be displayed in the button. If not populated, the cell's iconClass will be used.
|
|
19
|
-
* @property {ActionDisablementFunction} [isDisabled] - If populated, will be called to check whether the button should be enabled or disabled for each row.
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* Cell containing an array of Button ({@link https://flowbite-svelte.com/docs/components/buttons}) components which fire the action event on the grid when clicked.
|
|
23
|
-
* @typedef {object} ActionsCell
|
|
24
|
-
* @property [Action[]] actions - The actions to be displayed inside the cell.
|
|
25
|
-
* @property {string} [buttonClass] - Class for the cell's buttons. Defaults to 'border-0 p-1'.
|
|
26
|
-
* @property {ButtonColor} [buttonColor] - See {@link https://flowbite-svelte.com/docs/pages/typescript}. Defaults to 'light'.
|
|
27
|
-
* @property {string} [iconClass] - Class for the icon to be displayed in the button. Defaults to 'w-4 h-4'.
|
|
28
|
-
*/
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing a Button ({@link https://flowbite-svelte.com/docs/components/buttons}) component.
|
|
4
|
-
* @typedef {object} ButtonCell
|
|
5
|
-
* @property {string} [caption] - Text to be displayed inside the button.
|
|
6
|
-
* @property {ConstructorOfATypedSvelteComponent} [icon] - Icon to be displayed inside the button.
|
|
7
|
-
* @property {string} [iconClass] - CSS class of the icon to be displayed inside the button.
|
|
8
|
-
* @property {'left' | 'right'} [iconPosition] - Position of the icon, relative to the caption. Defaults to 'right'.
|
|
9
|
-
*/
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing a Button ({@link https://flowbite-svelte.com/docs/components/buttons}) component.
|
|
4
|
-
* @typedef {object} ButtonCell
|
|
5
|
-
* @property {string} [caption] - Text to be displayed inside the button.
|
|
6
|
-
* @property {ConstructorOfATypedSvelteComponent} [icon] - Icon to be displayed inside the button.
|
|
7
|
-
* @property {string} [iconClass] - CSS class of the icon to be displayed inside the button.
|
|
8
|
-
* @property {'left' | 'right'} [iconPosition] - Position of the icon, relative to the caption. Defaults to 'right'.
|
|
9
|
-
*/
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing an Input {@link (https://flowbite-svelte.com/docs/forms/input-field}) component.
|
|
4
|
-
* @typedef {object} InputCell
|
|
5
|
-
* @property {string} [inputType] - See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types}
|
|
6
|
-
*/
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing an Input {@link (https://flowbite-svelte.com/docs/forms/input-field}) component.
|
|
4
|
-
* @typedef {object} InputCell
|
|
5
|
-
* @property {string} [inputType] - See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types}
|
|
6
|
-
*/
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing a MultiSelect ({@link https://flowbite-svelte.com/docs/forms/select#MultiSelect}) component.
|
|
4
|
-
* @typedef {object} MultiSelectCell
|
|
5
|
-
* @property {string} [displayProp] - Property within items which displays in the list. Defaults to 'name'.
|
|
6
|
-
* @property {string} [valueProp] - Property within tems used to populate the cell's value when picked. Defaults to 'id'.
|
|
7
|
-
* @property {any[]} items - Array of objects the user can select from.
|
|
8
|
-
*/
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing a MultiSelect ({@link https://flowbite-svelte.com/docs/forms/select#MultiSelect}) component.
|
|
4
|
-
* @typedef {object} MultiSelectCell
|
|
5
|
-
* @property {string} [displayProp] - Property within items which displays in the list. Defaults to 'name'.
|
|
6
|
-
* @property {string} [valueProp] - Property within tems used to populate the cell's value when picked. Defaults to 'id'.
|
|
7
|
-
* @property {any[]} items - Array of objects the user can select from.
|
|
8
|
-
*/
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing a NumberInput ({@link https://flowbite-svelte.com/docs/forms/input-field#Number_input}) component.
|
|
4
|
-
* @typedef {object} NumberInputCell
|
|
5
|
-
* @property {string} [inputType] - See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
|
|
6
|
-
*/
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing a NumberInput ({@link https://flowbite-svelte.com/docs/forms/input-field#Number_input}) component.
|
|
4
|
-
* @typedef {object} NumberInputCell
|
|
5
|
-
* @property {string} [inputType] - See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
|
|
6
|
-
*/
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<script>import { Rating } from "flowbite-svelte";
|
|
2
|
-
export let column;
|
|
3
|
-
export let item;
|
|
4
|
-
export let value;
|
|
5
|
-
export let icon = null;
|
|
6
|
-
let localValue = value;
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
{#if icon}
|
|
10
|
-
<Rating {...$$props} bind:rating={localValue} {icon}/>
|
|
11
|
-
{:else}
|
|
12
|
-
<Rating {...$$props} bind:rating={localValue}/>
|
|
13
|
-
{/if}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { ComponentType } from 'svelte';
|
|
3
|
-
import type { ColumnConfig } from '../common.ts';
|
|
4
|
-
declare const __propDef: {
|
|
5
|
-
props: {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
column: ColumnConfig;
|
|
8
|
-
item: any;
|
|
9
|
-
value: any;
|
|
10
|
-
icon?: ComponentType | null | undefined;
|
|
11
|
-
};
|
|
12
|
-
events: {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {};
|
|
16
|
-
};
|
|
17
|
-
export type RatingCellProps = typeof __propDef.props;
|
|
18
|
-
export type RatingCellEvents = typeof __propDef.events;
|
|
19
|
-
export type RatingCellSlots = typeof __propDef.slots;
|
|
20
|
-
export default class RatingCell extends SvelteComponent<RatingCellProps, RatingCellEvents, RatingCellSlots> {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing a Select ({@link https://flowbite-svelte.com/docs/forms/select}) component.
|
|
4
|
-
* @typedef {object} SelectCell
|
|
5
|
-
* @property {string} [displayProp] - Property within items which displays in the list. Defaults to 'name'.
|
|
6
|
-
* @property {string} [valueProp] - Property within tems used to populate the cell's value when picked. Defaults to 'id'.
|
|
7
|
-
* @property {any[]} items - Array of objects the user can select from.
|
|
8
|
-
*/
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing a Select ({@link https://flowbite-svelte.com/docs/forms/select}) component.
|
|
4
|
-
* @typedef {object} SelectCell
|
|
5
|
-
* @property {string} [displayProp] - Property within items which displays in the list. Defaults to 'name'.
|
|
6
|
-
* @property {string} [valueProp] - Property within tems used to populate the cell's value when picked. Defaults to 'id'.
|
|
7
|
-
* @property {any[]} items - Array of objects the user can select from.
|
|
8
|
-
*/
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing a numeric value and plus and minus buttons. The value is decremented or incremented when the buttons are clicked.
|
|
4
|
-
* @typedef {object} SpinCell
|
|
5
|
-
* @property {number} [decValue] - Amount to decrement the value by when the minus button is clicked. Defaults to 1.
|
|
6
|
-
* @property {number} [incValue] - Amount to increment the value by when the plus button is clicked. Defaults to 1.
|
|
7
|
-
* @property {number} [minValue] - If specified, the minus button cannot make the value go lower than this.
|
|
8
|
-
* @property {number} [maxValue] - If specified, the plus button cannot make the value go higher than this.
|
|
9
|
-
* @property {ConstructorOfATypedSvelteComponent} [minusIcon] Svelte component class for the minus icon. Defaults to MinusSolid from {@link https://flowbite.com/icons/}
|
|
10
|
-
* @property {string} [minusIconClass] - CSS class of the minus icon, defaults to 'pr-1 w-3 h-3'
|
|
11
|
-
* @property {ConstructorOfATypedSvelteComponent} [plusIcon] Svelte component class for the plus icon. Defaults to PlusSolid from {@link https://flowbite.com/icons/}
|
|
12
|
-
* @property {string} [plusIconClass] - CSS class of the plus icon, defaults to 'pr-1 w-3 h-3'
|
|
13
|
-
*/
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Cell containing a numeric value and plus and minus buttons. The value is decremented or incremented when the buttons are clicked.
|
|
4
|
-
* @typedef {object} SpinCell
|
|
5
|
-
* @property {number} [decValue] - Amount to decrement the value by when the minus button is clicked. Defaults to 1.
|
|
6
|
-
* @property {number} [incValue] - Amount to increment the value by when the plus button is clicked. Defaults to 1.
|
|
7
|
-
* @property {number} [minValue] - If specified, the minus button cannot make the value go lower than this.
|
|
8
|
-
* @property {number} [maxValue] - If specified, the plus button cannot make the value go higher than this.
|
|
9
|
-
* @property {ConstructorOfATypedSvelteComponent} [minusIcon] Svelte component class for the minus icon. Defaults to MinusSolid from {@link https://flowbite.com/icons/}
|
|
10
|
-
* @property {string} [minusIconClass] - CSS class of the minus icon, defaults to 'pr-1 w-3 h-3'
|
|
11
|
-
* @property {ConstructorOfATypedSvelteComponent} [plusIcon] Svelte component class for the plus icon. Defaults to PlusSolid from {@link https://flowbite.com/icons/}
|
|
12
|
-
* @property {string} [plusIconClass] - CSS class of the plus icon, defaults to 'pr-1 w-3 h-3'
|
|
13
|
-
*/
|
|
@@ -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 {};
|