@nanahoshi/mona-ui 0.40.0 → 0.42.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/docs/api/auto-complete.md +2 -0
- package/docs/api/combo-box.md +2 -0
- package/docs/api/common.md +1 -1
- package/docs/api/dropdowns.md +3 -1
- package/docs/api/i18n.md +54 -0
- package/docs/api/kanban.md +222 -0
- package/docs/api/locales.md +14 -14
- package/docs/api/sortable.md +189 -0
- package/docs/api/sparkline.md +85 -0
- package/docs/api/tabs.md +20 -0
- package/docs/auto-complete.md +64 -0
- package/docs/combo-box.md +65 -0
- package/docs/kanban.md +293 -0
- package/docs/sortable.md +320 -0
- package/docs/sparkline.md +303 -0
- package/docs/tabs.md +59 -10
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +95 -30
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +58 -5
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +64 -29
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +87 -0
- package/fesm2022/nanahoshi-mona-ui-kanban.mjs +660 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +44 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +44 -0
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-sortable.mjs +733 -0
- package/fesm2022/nanahoshi-mona-ui-sparkline.mjs +573 -0
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +112 -5
- package/i18n/catalogs/en-US.messages.json +14 -0
- package/kanban/package.json +4 -0
- package/llms.txt +8 -2
- package/locales/ar-sa/ar-sa.messages.json +14 -0
- package/locales/de-de/de-de.messages.json +14 -0
- package/locales/es-es/es-es.messages.json +14 -0
- package/locales/fr-fr/fr-fr.messages.json +14 -0
- package/locales/id-id/id-id.messages.json +14 -0
- package/locales/it-it/it-it.messages.json +14 -0
- package/locales/ja-jp/ja-jp.messages.json +14 -0
- package/locales/ko-kr/ko-kr.messages.json +14 -0
- package/locales/pl-pl/pl-pl.messages.json +14 -0
- package/locales/pt-br/pt-br.messages.json +14 -0
- package/locales/ru-ru/ru-ru.messages.json +14 -0
- package/locales/tr-tr/tr-tr.messages.json +14 -0
- package/locales/zh-cn/zh-cn.messages.json +14 -0
- package/locales/zh-tw/zh-tw.messages.json +14 -0
- package/package.json +13 -1
- package/sortable/package.json +4 -0
- package/sparkline/package.json +4 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +42 -1
- package/types/nanahoshi-mona-ui-combo-box.d.ts +37 -1
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +54 -4
- package/types/nanahoshi-mona-ui-i18n.d.ts +31 -0
- package/types/nanahoshi-mona-ui-kanban.d.ts +270 -0
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +14 -0
- package/types/nanahoshi-mona-ui-sortable.d.ts +245 -0
- package/types/nanahoshi-mona-ui-sparkline.d.ts +228 -0
- package/types/nanahoshi-mona-ui-tabs.d.ts +46 -0
|
@@ -16,6 +16,8 @@ Component.
|
|
|
16
16
|
|
|
17
17
|
| Name | Type | Default | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
+
| `adaptiveMode` | `AdaptiveMode` | `"none"` | Opens the popup as a sheet along the bottom of the screen on a small screen (narrower than 640 pixels), with a text box of its own at the top, where the typing happens. A press on the field opens the sheet, and the field raises no on-screen keyboard. `"none"` always opens the popup under the field. |
|
|
20
|
+
| `adaptiveTitle` | `string` | `""` | Title of the bottom sheet the popup opens as with `adaptiveMode="auto"`, which also names the sheet's text box. When empty, the sheet shows the autocomplete's name, from its label or `aria-label`. |
|
|
19
21
|
| `aria-describedby` | `string` | `""` | ID of an element that provides an extended description for the input. Use this to associate error messages or help text with the input. |
|
|
20
22
|
| `aria-label` | `string` | `""` | Accessible name for the input. Describe what the autocomplete represents. Prefer a visible label, linked through `inputId` or `aria-labelledby`; without any of them, browsers fall back to the `placeholder`. |
|
|
21
23
|
| `aria-labelledby` | `string` | `""` | ID of an external element that provides the accessible name for the input. |
|
package/docs/api/combo-box.md
CHANGED
|
@@ -16,6 +16,8 @@ Component.
|
|
|
16
16
|
|
|
17
17
|
| Name | Type | Default | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
+
| `adaptiveMode` | `AdaptiveMode` | `"none"` | Opens the popup as a sheet along the bottom of the screen on a small screen (narrower than 640 pixels), with a text box of its own at the top, where the typing happens. A press on the field opens the sheet, and the field raises no on-screen keyboard. `"none"` always opens the popup under the field. |
|
|
20
|
+
| `adaptiveTitle` | `string` | `""` | Title of the bottom sheet the popup opens as with `adaptiveMode="auto"`, which also names the sheet's text box. When empty, the sheet shows the combo box's name, from its label or `aria-label`. |
|
|
19
21
|
| `allowCustomValue` | `boolean` | `false` | Allows a custom value to be committed when it doesn't match any item in `data`. |
|
|
20
22
|
| `aria-describedby` | `string` | `""` | ID of an element that provides an extended description for the input. |
|
|
21
23
|
| `aria-label` | `string` | `""` | Accessible name for the input. Describe what the combo box represents. Prefer a visible label, linked through `inputId` or `aria-labelledby`; without any of them, browsers fall back to the `placeholder`. |
|
package/docs/api/common.md
CHANGED
|
@@ -101,7 +101,7 @@ Class.
|
|
|
101
101
|
| `isDefaultPrevented(): boolean` | Whether `preventDefault()` was called. |
|
|
102
102
|
| `preventDefault(): void` | Cancels what the event announces, such as opening or closing a popup, or closing a dialog. |
|
|
103
103
|
|
|
104
|
-
**Used by:** [`AutoCompleteComponent`](auto-complete.md#autocompletecomponent), [`CellEditEvent`](grid.md#celleditevent), [`ColumnReorderEvent`](grid.md#columnreorderevent), [`ColumnSortEvent`](grid.md#columnsortevent), [`ComboBoxComponent`](combo-box.md#comboboxcomponent), [`DatePickerComponent`](date-picker.md#datepickercomponent), [`DateRangePickerComponent`](date-range-picker.md#daterangepickercomponent), [`DateTimePickerComponent`](datetime-picker.md#datetimepickercomponent), [`DialogActionEvent`](dialog.md#dialogactionevent), [`DropdownListComponent`](dropdown-list.md#dropdownlistcomponent), [`DropdownTreeComponent`](dropdown-tree.md#dropdowntreecomponent), [`FilterChangeEvent`](common.md#filterchangeevent), [`GridAddEvent`](grid.md#gridaddevent), [`GridCancelEvent`](grid.md#gridcancelevent), [`GridEditEvent`](grid.md#grideditevent), [`GridRemoveEvent`](grid.md#gridremoveevent), [`GridSaveEvent`](grid.md#gridsaveevent), [`ListBoxClearEvent`](list-box.md#listboxclearevent), [`ListBoxMoveEvent`](list-box.md#listboxmoveevent), [`ListBoxRemoveEvent`](list-box.md#listboxremoveevent), [`ListBoxTransferEvent`](list-box.md#listboxtransferevent), [`MultiSelectComponent`](multi-select.md#multiselectcomponent), [`MultiSelectTreeComponent`](multi-select-tree.md#multiselecttreecomponent), [`NodeCheckEvent`](tree-view.md#nodecheckevent), [`NodeClickEvent`](tree-view.md#nodeclickevent), [`NodeSelectEvent`](tree-view.md#nodeselectevent), [`PageSizeChangeEvent`](pager.md#pagesizechangeevent), [`PopoverHideEvent`](popover.md#popoverhideevent), [`PopoverShowEvent`](popover.md#popovershowevent), [`PopupCloseEvent`](popup.md#popupcloseevent), [`PopupMenuCloseEvent`](popup-menu.md#popupmenucloseevent), [`PopupMenuItemClickEvent`](popup-menu.md#popupmenuitemclickevent), [`RowEditEvent`](grid.md#roweditevent), [`RowReorderEvent`](grid.md#rowreorderevent), [`StepSelectEvent`](stepper.md#stepselectevent), [`TabCloseEvent`](tabs.md#tabcloseevent), [`TabSelectEvent`](tabs.md#tabselectevent), [`TimePickerComponent`](time-picker.md#timepickercomponent), [`ToolbarItemDirective`](toolbar.md#toolbaritemdirective)
|
|
104
|
+
**Used by:** [`AutoCompleteComponent`](auto-complete.md#autocompletecomponent), [`CellEditEvent`](grid.md#celleditevent), [`ColumnReorderEvent`](grid.md#columnreorderevent), [`ColumnSortEvent`](grid.md#columnsortevent), [`ComboBoxComponent`](combo-box.md#comboboxcomponent), [`DatePickerComponent`](date-picker.md#datepickercomponent), [`DateRangePickerComponent`](date-range-picker.md#daterangepickercomponent), [`DateTimePickerComponent`](datetime-picker.md#datetimepickercomponent), [`DialogActionEvent`](dialog.md#dialogactionevent), [`DropdownListComponent`](dropdown-list.md#dropdownlistcomponent), [`DropdownTreeComponent`](dropdown-tree.md#dropdowntreecomponent), [`FilterChangeEvent`](common.md#filterchangeevent), [`GridAddEvent`](grid.md#gridaddevent), [`GridCancelEvent`](grid.md#gridcancelevent), [`GridEditEvent`](grid.md#grideditevent), [`GridRemoveEvent`](grid.md#gridremoveevent), [`GridSaveEvent`](grid.md#gridsaveevent), [`KanbanCardMoveEvent`](kanban.md#kanbancardmoveevent), [`ListBoxClearEvent`](list-box.md#listboxclearevent), [`ListBoxMoveEvent`](list-box.md#listboxmoveevent), [`ListBoxRemoveEvent`](list-box.md#listboxremoveevent), [`ListBoxTransferEvent`](list-box.md#listboxtransferevent), [`MultiSelectComponent`](multi-select.md#multiselectcomponent), [`MultiSelectTreeComponent`](multi-select-tree.md#multiselecttreecomponent), [`NodeCheckEvent`](tree-view.md#nodecheckevent), [`NodeClickEvent`](tree-view.md#nodeclickevent), [`NodeSelectEvent`](tree-view.md#nodeselectevent), [`PageSizeChangeEvent`](pager.md#pagesizechangeevent), [`PopoverHideEvent`](popover.md#popoverhideevent), [`PopoverShowEvent`](popover.md#popovershowevent), [`PopupCloseEvent`](popup.md#popupcloseevent), [`PopupMenuCloseEvent`](popup-menu.md#popupmenucloseevent), [`PopupMenuItemClickEvent`](popup-menu.md#popupmenuitemclickevent), [`RowEditEvent`](grid.md#roweditevent), [`RowReorderEvent`](grid.md#rowreorderevent), [`SortableMoveEvent`](sortable.md#sortablemoveevent), [`StepSelectEvent`](stepper.md#stepselectevent), [`TabCloseEvent`](tabs.md#tabcloseevent), [`TabSelectEvent`](tabs.md#tabselectevent), [`TimePickerComponent`](time-picker.md#timepickercomponent), [`ToolbarItemDirective`](toolbar.md#toolbaritemdirective)
|
|
105
105
|
|
|
106
106
|
## `FilterChangeEvent`
|
|
107
107
|
|
package/docs/api/dropdowns.md
CHANGED
|
@@ -162,7 +162,9 @@ What a dropdown passes to the bottom sheet its popup opens as.
|
|
|
162
162
|
| Name | Type | Description |
|
|
163
163
|
| --- | --- | --- |
|
|
164
164
|
| `content` (read-only) | `TemplateRef<unknown>` | The dropdown's popup template, shown below the sheet's header. |
|
|
165
|
+
| `fillHeight` (read-only) | `boolean` | Whether the sheet takes its full height however short its content is. |
|
|
165
166
|
| `title` (read-only) | `Signal<string>` | The sheet's title: the dropdown's `adaptiveTitle`, or else its name. |
|
|
167
|
+
| `titleId` (read-only) | `string` | The id of the title's element, which names a text box in the sheet. |
|
|
166
168
|
|
|
167
169
|
## `AdaptiveMode`
|
|
168
170
|
|
|
@@ -175,7 +177,7 @@ the screen is narrower than 640 pixels, and `"none"` always opens it under the f
|
|
|
175
177
|
type AdaptiveMode = "auto" | "none";
|
|
176
178
|
```
|
|
177
179
|
|
|
178
|
-
**Used by:** [`DatePickerComponent`](date-picker.md#datepickercomponent), [`DateRangePickerComponent`](date-range-picker.md#daterangepickercomponent), [`DateTimePickerComponent`](datetime-picker.md#datetimepickercomponent), [`DropdownListComponent`](dropdown-list.md#dropdownlistcomponent), [`DropdownTreeComponent`](dropdown-tree.md#dropdowntreecomponent), [`MultiSelectComponent`](multi-select.md#multiselectcomponent), [`MultiSelectTreeComponent`](multi-select-tree.md#multiselecttreecomponent), [`TimePickerComponent`](time-picker.md#timepickercomponent)
|
|
180
|
+
**Used by:** [`AutoCompleteComponent`](auto-complete.md#autocompletecomponent), [`ComboBoxComponent`](combo-box.md#comboboxcomponent), [`DatePickerComponent`](date-picker.md#datepickercomponent), [`DateRangePickerComponent`](date-range-picker.md#daterangepickercomponent), [`DateTimePickerComponent`](datetime-picker.md#datetimepickercomponent), [`DropdownListComponent`](dropdown-list.md#dropdownlistcomponent), [`DropdownTreeComponent`](dropdown-tree.md#dropdowntreecomponent), [`MultiSelectComponent`](multi-select.md#multiselectcomponent), [`MultiSelectTreeComponent`](multi-select-tree.md#multiselecttreecomponent), [`TimePickerComponent`](time-picker.md#timepickercomponent)
|
|
179
181
|
|
|
180
182
|
## `DropdownFieldPredicateType`
|
|
181
183
|
|
package/docs/api/i18n.md
CHANGED
|
@@ -648,6 +648,57 @@ validator's own `message` wins over these.
|
|
|
648
648
|
|
|
649
649
|
**Used by:** [`MonaLocaleMessages`](i18n.md#monalocalemessages)
|
|
650
650
|
|
|
651
|
+
## `MonaKanbanMessages`
|
|
652
|
+
|
|
653
|
+
Interface.
|
|
654
|
+
|
|
655
|
+
### Properties
|
|
656
|
+
|
|
657
|
+
| Name | Type | Description |
|
|
658
|
+
| --- | --- | --- |
|
|
659
|
+
| `emptyColumn` (read-only) | `string` | Shown in a column with no cards. |
|
|
660
|
+
|
|
661
|
+
### Methods
|
|
662
|
+
|
|
663
|
+
| Signature | Description |
|
|
664
|
+
| --- | --- |
|
|
665
|
+
| `cardCount(count: number): string` | How many cards a column holds, read after its title ("3 cards"). |
|
|
666
|
+
| `cardCountWithLimit(count: number, limit: number): string` | How many cards a column with a limit holds, read after its title ("3 of 5 cards"). |
|
|
667
|
+
|
|
668
|
+
**Used by:** [`KANBAN_DEFAULT_MESSAGES`](kanban.md#kanban-default-messages), [`MonaLocaleMessages`](i18n.md#monalocalemessages)
|
|
669
|
+
|
|
670
|
+
## `MonaSortableMessages`
|
|
671
|
+
|
|
672
|
+
Interface.
|
|
673
|
+
|
|
674
|
+
### Methods
|
|
675
|
+
|
|
676
|
+
| Signature | Description |
|
|
677
|
+
| --- | --- |
|
|
678
|
+
| `itemMoved(item: string, position: number, total: number): string` | Announced after an item moves within its list, with its name and new position ("Draft moved to position 2 of 5"). |
|
|
679
|
+
| `itemMovedToList(item: string, list: string, position: number, total: number): string` | Announced after an item moves to another list, with its name, the list's name and its position there ("Draft moved to Done, position 1 of 3"). |
|
|
680
|
+
|
|
681
|
+
**Used by:** [`MonaLocaleMessages`](i18n.md#monalocalemessages), [`SORTABLE_DEFAULT_MESSAGES`](sortable.md#sortable-default-messages)
|
|
682
|
+
|
|
683
|
+
## `MonaSparklineMessages`
|
|
684
|
+
|
|
685
|
+
Interface.
|
|
686
|
+
|
|
687
|
+
### Properties
|
|
688
|
+
|
|
689
|
+
| Name | Type | Description |
|
|
690
|
+
| --- | --- | --- |
|
|
691
|
+
| `noData` (read-only) | `string` | Read in place of a summary when a sparkline has no values. |
|
|
692
|
+
|
|
693
|
+
### Methods
|
|
694
|
+
|
|
695
|
+
| Signature | Description |
|
|
696
|
+
| --- | --- |
|
|
697
|
+
| `summary(count: number, first: string, last: string, min: string, max: string): string` | Summarizes a sparkline's values, formatted already: how many there are, the first, the last, the lowest and the highest ("12 values, first 6, last 15, lowest 4, highest 18"). |
|
|
698
|
+
| `winLossSummary(wins: number, losses: number, draws: number): string` | Summarizes a win-loss sparkline: how many wins, losses and draws it shows ("7 wins, 3 losses, 1 draw"). |
|
|
699
|
+
|
|
700
|
+
**Used by:** [`MonaLocaleMessages`](i18n.md#monalocalemessages), [`SPARKLINE_DEFAULT_MESSAGES`](sparkline.md#sparkline-default-messages)
|
|
701
|
+
|
|
651
702
|
## `MonaAlertMessages`
|
|
652
703
|
|
|
653
704
|
Interface.
|
|
@@ -1347,6 +1398,7 @@ Interface.
|
|
|
1347
1398
|
| `filter` | `MonaFilterMessages` |
|
|
1348
1399
|
| `formField` | `MonaFormFieldMessages` |
|
|
1349
1400
|
| `grid` | `MonaGridMessages` |
|
|
1401
|
+
| `kanban` | `MonaKanbanMessages` |
|
|
1350
1402
|
| `label` | `MonaLabelMessages` |
|
|
1351
1403
|
| `list` | `MonaListMessages` |
|
|
1352
1404
|
| `listBox` | `MonaListBoxMessages` |
|
|
@@ -1364,6 +1416,8 @@ Interface.
|
|
|
1364
1416
|
| `sheet` | `MonaSheetMessages` |
|
|
1365
1417
|
| `sidebar` | `MonaSidebarMessages` |
|
|
1366
1418
|
| `slider` | `MonaSliderMessages` |
|
|
1419
|
+
| `sortable` | `MonaSortableMessages` |
|
|
1420
|
+
| `sparkline` | `MonaSparklineMessages` |
|
|
1367
1421
|
| `spinner` | `MonaSpinnerMessages` |
|
|
1368
1422
|
| `splitButton` | `MonaSplitButtonMessages` |
|
|
1369
1423
|
| `splitter` | `MonaSplitterMessages` |
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# `@nanahoshi/mona-ui/kanban`
|
|
2
|
+
|
|
3
|
+
Everything `@nanahoshi/mona-ui/kanban` exports.
|
|
4
|
+
|
|
5
|
+
**Guides:** [Kanban](../kanban.md)
|
|
6
|
+
|
|
7
|
+
## `KanbanComponent`
|
|
8
|
+
|
|
9
|
+
Component.
|
|
10
|
+
|
|
11
|
+
A board of columns that cards move between, by dragging or with Control+Shift and the arrow keys (Command+Shift on
|
|
12
|
+
macOS). Each card goes in the column whose `status` its status field holds, in the order of `data`. A move emits
|
|
13
|
+
`cardMove`, then the new data through `dataChange`, so bind `[(data)]`. The arrow keys move focus between cards.
|
|
14
|
+
|
|
15
|
+
**Selector:** `mona-kanban`
|
|
16
|
+
**Type parameters:** `T extends object = Record<string, unknown>`
|
|
17
|
+
|
|
18
|
+
### Inputs
|
|
19
|
+
|
|
20
|
+
| Name | Type | Default | Description |
|
|
21
|
+
| --- | --- | --- | --- |
|
|
22
|
+
| `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
|
|
23
|
+
| `columns` (required) | `readonly KanbanColumn[]` | — | The board's columns, in order. A card whose status matches no column isn't shown. |
|
|
24
|
+
| `data` (required) | `readonly T[]` | — | The cards. Each goes in the column whose `status` its status field holds, in the order of this array. Bind it two-way, `[(data)]`, to take each move. |
|
|
25
|
+
| `disabled` | `boolean` | `false` | Stops cards from moving, by pointer or keyboard. Focus still moves between them, and what their template holds still works. |
|
|
26
|
+
| `statusField` | `string` | `"status"` | The field of each card that holds its column's `status`. |
|
|
27
|
+
| `textField` | `string` | `"title"` | The field of each card shown as its text when there's no card template, and used as its name in announcements of its moves. |
|
|
28
|
+
|
|
29
|
+
### Outputs
|
|
30
|
+
|
|
31
|
+
| Name | Type | Description |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `cardMove` | `KanbanCardMoveEvent<T>` | Emitted with a `KanbanCardMoveEvent` when a card moves within its column or into another, before `dataChange`. This event is preventable. |
|
|
34
|
+
| `dataChange` | `T[]` | Emitted with the board's new cards after a move, unless the move was refused. A card that changes column is a copy with its status field set to the column's status. |
|
|
35
|
+
|
|
36
|
+
## `KanbanCardTemplateDirective`
|
|
37
|
+
|
|
38
|
+
Directive.
|
|
39
|
+
|
|
40
|
+
Template for each card of a Kanban board. The card is the template's implicit value (`let-card`), with its column
|
|
41
|
+
(`let-column="column"`) and its index in the column (`let-index="index"`). Bind the board's data to
|
|
42
|
+
`monaKanbanCardTemplateOf` to type the card; without it, the card is `any` in templates.
|
|
43
|
+
|
|
44
|
+
**Selector:** `ng-template[monaKanbanCardTemplate]`
|
|
45
|
+
**Type parameters:** `T = any`
|
|
46
|
+
|
|
47
|
+
### Inputs
|
|
48
|
+
|
|
49
|
+
| Name | Type | Default | Description |
|
|
50
|
+
| --- | --- | --- | --- |
|
|
51
|
+
| `monaKanbanCardTemplateOf` | `Iterable<T> \| null \| undefined` | `null` | The board's data, used only to type the template's card. Optional. |
|
|
52
|
+
|
|
53
|
+
### Template context
|
|
54
|
+
|
|
55
|
+
| Name | Type | Description |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| `$implicit` | `T` | The card (`let-card`). |
|
|
58
|
+
| `column` | `KanbanColumn` | The column the card is in (`let-column="column"`). |
|
|
59
|
+
| `index` | `number` | The card's index in its column (`let-index="index"`). |
|
|
60
|
+
|
|
61
|
+
## `KanbanColumnFooterTemplateDirective`
|
|
62
|
+
|
|
63
|
+
Directive.
|
|
64
|
+
|
|
65
|
+
Template for the foot of each column of a Kanban board, below its cards, such as for an Add card button. The column
|
|
66
|
+
is the template's implicit value (`let-column`), with its cards (`let-cards="cards"`) and how many there are
|
|
67
|
+
(`let-count="count"`).
|
|
68
|
+
|
|
69
|
+
**Selector:** `ng-template[monaKanbanColumnFooterTemplate]`
|
|
70
|
+
**Type parameters:** `T = any`
|
|
71
|
+
|
|
72
|
+
### Inputs
|
|
73
|
+
|
|
74
|
+
| Name | Type | Default | Description |
|
|
75
|
+
| --- | --- | --- | --- |
|
|
76
|
+
| `monaKanbanColumnFooterTemplateOf` | `Iterable<T> \| null \| undefined` | `null` | The board's data, used only to type the template's cards. Optional. |
|
|
77
|
+
|
|
78
|
+
### Template context
|
|
79
|
+
|
|
80
|
+
| Name | Type | Description |
|
|
81
|
+
| --- | --- | --- |
|
|
82
|
+
| `$implicit` | `KanbanColumn` | The column (`let-column`). |
|
|
83
|
+
| `cards` | `readonly T[]` | The column's cards, in order (`let-cards="cards"`). |
|
|
84
|
+
| `count` | `number` | How many cards the column holds (`let-count="count"`). |
|
|
85
|
+
|
|
86
|
+
## `KanbanColumnHeaderTemplateDirective`
|
|
87
|
+
|
|
88
|
+
Directive.
|
|
89
|
+
|
|
90
|
+
Template for the header of each column of a Kanban board, in place of its title and count. The column is the
|
|
91
|
+
template's implicit value (`let-column`), with its cards (`let-cards="cards"`) and how many there are
|
|
92
|
+
(`let-count="count"`). The header names the column's list, so keep the title in it.
|
|
93
|
+
|
|
94
|
+
**Selector:** `ng-template[monaKanbanColumnHeaderTemplate]`
|
|
95
|
+
**Type parameters:** `T = any`
|
|
96
|
+
|
|
97
|
+
### Inputs
|
|
98
|
+
|
|
99
|
+
| Name | Type | Default | Description |
|
|
100
|
+
| --- | --- | --- | --- |
|
|
101
|
+
| `monaKanbanColumnHeaderTemplateOf` | `Iterable<T> \| null \| undefined` | `null` | The board's data, used only to type the template's cards. Optional. |
|
|
102
|
+
|
|
103
|
+
### Template context
|
|
104
|
+
|
|
105
|
+
| Name | Type | Description |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| `$implicit` | `KanbanColumn` | The column (`let-column`). |
|
|
108
|
+
| `cards` | `readonly T[]` | The column's cards, in order (`let-cards="cards"`). |
|
|
109
|
+
| `count` | `number` | How many cards the column holds (`let-count="count"`). |
|
|
110
|
+
|
|
111
|
+
## `KanbanCardMoveEvent`
|
|
112
|
+
|
|
113
|
+
Class.
|
|
114
|
+
|
|
115
|
+
A card dragged, or moved with Control+Shift and the arrow keys, to a new place on a Kanban board: within its column
|
|
116
|
+
or into another. Call `preventDefault()` to refuse the move: the board then doesn't emit its new data, and the card
|
|
117
|
+
goes back where it was.
|
|
118
|
+
|
|
119
|
+
**Type parameters:** `T = unknown`
|
|
120
|
+
**Extends:** `PreventableEvent`
|
|
121
|
+
|
|
122
|
+
### Properties
|
|
123
|
+
|
|
124
|
+
| Name | Type | Description |
|
|
125
|
+
| --- | --- | --- |
|
|
126
|
+
| `card` (read-only) | `T` | The card as it was before the move. |
|
|
127
|
+
| `currentIndex` (read-only) | `number` | The card's index in its column after the move. |
|
|
128
|
+
| `data` (read-only) | `readonly T[]` | The board's cards after the move: what `dataChange` emits unless the move is refused. |
|
|
129
|
+
| `movedCard` (read-only) | `T` | The card after the move. A card that changes column is a copy with its status field set to the new column's status; one that stays in its column is the same object as `card`. |
|
|
130
|
+
| `previousIndex` (read-only) | `number` | The card's index in its column before the move. |
|
|
131
|
+
| `previousStatus` (read-only) | `unknown` | The status of the column the card comes from. |
|
|
132
|
+
| `status` (read-only) | `unknown` | The status of the column the card moves to. |
|
|
133
|
+
|
|
134
|
+
### Inherited from `PreventableEvent`
|
|
135
|
+
|
|
136
|
+
| Name | Type | Description |
|
|
137
|
+
| --- | --- | --- |
|
|
138
|
+
| `originalEvent` (read-only) | `E \| undefined` | The DOM event that caused this one, when there is one. |
|
|
139
|
+
| `type` (read-only) | `string \| undefined` | A name for the kind of event, when the component that emits it sets one. |
|
|
140
|
+
|
|
141
|
+
**Methods**
|
|
142
|
+
|
|
143
|
+
| Signature | Description |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| `isDefaultPrevented(): boolean` | Whether `preventDefault()` was called. |
|
|
146
|
+
| `preventDefault(): void` | Cancels what the event announces, such as opening or closing a popup, or closing a dialog. |
|
|
147
|
+
|
|
148
|
+
**Used by:** [`KanbanComponent`](kanban.md#kanbancomponent)
|
|
149
|
+
|
|
150
|
+
## `KANBAN_DEFAULT_MESSAGES`
|
|
151
|
+
|
|
152
|
+
Constant.
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
const KANBAN_DEFAULT_MESSAGES: MonaKanbanMessages;
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## `KanbanCardMoveEventOptions`
|
|
159
|
+
|
|
160
|
+
Interface.
|
|
161
|
+
|
|
162
|
+
**Type parameters:** `T`
|
|
163
|
+
|
|
164
|
+
### Properties
|
|
165
|
+
|
|
166
|
+
| Name | Type |
|
|
167
|
+
| --- | --- |
|
|
168
|
+
| `card` (read-only) | `T` |
|
|
169
|
+
| `currentIndex` (read-only) | `number` |
|
|
170
|
+
| `data` (read-only) | `readonly T[]` |
|
|
171
|
+
| `movedCard` (read-only) | `T` |
|
|
172
|
+
| `previousIndex` (read-only) | `number` |
|
|
173
|
+
| `previousStatus` (read-only) | `unknown` |
|
|
174
|
+
| `status` (read-only) | `unknown` |
|
|
175
|
+
|
|
176
|
+
## `KanbanCardTemplateContext`
|
|
177
|
+
|
|
178
|
+
Interface.
|
|
179
|
+
|
|
180
|
+
The context of a `monaKanbanCardTemplate`: the card, as `let-card`.
|
|
181
|
+
|
|
182
|
+
**Type parameters:** `T = unknown`
|
|
183
|
+
|
|
184
|
+
### Properties
|
|
185
|
+
|
|
186
|
+
| Name | Type | Description |
|
|
187
|
+
| --- | --- | --- |
|
|
188
|
+
| `$implicit` (read-only) | `T` | The card (`let-card`). |
|
|
189
|
+
| `column` (read-only) | `KanbanColumn` | The column the card is in (`let-column="column"`). |
|
|
190
|
+
| `index` (read-only) | `number` | The card's index in its column (`let-index="index"`). |
|
|
191
|
+
|
|
192
|
+
## `KanbanColumn`
|
|
193
|
+
|
|
194
|
+
Interface.
|
|
195
|
+
|
|
196
|
+
A column of a Kanban board: the cards whose status field holds its `status`.
|
|
197
|
+
|
|
198
|
+
### Properties
|
|
199
|
+
|
|
200
|
+
| Name | Type | Description |
|
|
201
|
+
| --- | --- | --- |
|
|
202
|
+
| `limit?` (read-only) | `number` | The most cards the column takes. Once it holds that many, cards from other columns can't move into it, and its count is highlighted. Without it, the column takes any number. |
|
|
203
|
+
| `status` (read-only) | `unknown` | The value of a card's status field that puts the card in this column. |
|
|
204
|
+
| `title` (read-only) | `string` | The column's title, which also names it in announcements. |
|
|
205
|
+
|
|
206
|
+
**Used by:** [`KanbanCardTemplateContext`](kanban.md#kanbancardtemplatecontext), [`KanbanCardTemplateDirective`](kanban.md#kanbancardtemplatedirective), [`KanbanColumnFooterTemplateDirective`](kanban.md#kanbancolumnfootertemplatedirective), [`KanbanColumnHeaderTemplateDirective`](kanban.md#kanbancolumnheadertemplatedirective), [`KanbanColumnTemplateContext`](kanban.md#kanbancolumntemplatecontext), [`KanbanComponent`](kanban.md#kanbancomponent)
|
|
207
|
+
|
|
208
|
+
## `KanbanColumnTemplateContext`
|
|
209
|
+
|
|
210
|
+
Interface.
|
|
211
|
+
|
|
212
|
+
The context of a `monaKanbanColumnHeaderTemplate` or `monaKanbanColumnFooterTemplate`: the column, as `let-column`.
|
|
213
|
+
|
|
214
|
+
**Type parameters:** `T = unknown`
|
|
215
|
+
|
|
216
|
+
### Properties
|
|
217
|
+
|
|
218
|
+
| Name | Type | Description |
|
|
219
|
+
| --- | --- | --- |
|
|
220
|
+
| `$implicit` (read-only) | `KanbanColumn` | The column (`let-column`). |
|
|
221
|
+
| `cards` (read-only) | `readonly T[]` | The column's cards, in order (`let-cards="cards"`). |
|
|
222
|
+
| `count` (read-only) | `number` | How many cards the column holds (`let-count="count"`). |
|