@design.estate/dees-catalog 21.29.0 → 21.30.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/dist_bundle/bundle.js +2560 -1290
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-CJVVAKHG.js → chunk-NKLF624Z.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-QFJ7LA5L.js → chunk-Q2W326R5.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-YBZRR5YD.js → chunk-W57NRRM4.js} +41 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-YBZRR5YD.js.map → chunk-W57NRRM4.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-ZU5CNY4P.js → de-J7BORZFB.js} +41 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-J7BORZFB.js.map +1 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-NVJRWZKO.js → dees-modal-UURRHHYX.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-BSBYG5IX.js → dees-workspace-terminal-ZBGBOINI.js} +4 -4
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-dataview/dees-table/filters.d.ts +2 -0
- package/dist_ts_web/elements/00group-dataview/dees-table/filters.js +11 -13
- package/dist_ts_web/elements/00group-dataview/dees-table/styles.d.ts +6 -0
- package/dist_ts_web/elements/00group-dataview/dees-table/styles.js +33 -23
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.d.ts +80 -6
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.demo.d.ts +1 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.demo.js +38 -9
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.js +502 -73
- package/dist_ts_web/elements/00group-kanban/dees-kanban-activity/dees-kanban-activity.d.ts +40 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban-activity/dees-kanban-activity.js +373 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.d.ts +2 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.js +35 -2
- package/dist_ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.d.ts +5 -1
- package/dist_ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.js +24 -3
- package/dist_ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.d.ts +2 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.js +31 -70
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.d.ts +26 -3
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.js +475 -21
- package/dist_ts_web/elements/00group-kanban/index.d.ts +1 -0
- package/dist_ts_web/elements/00group-kanban/index.js +2 -1
- package/dist_ts_web/elements/00group-kanban/interfaces.d.ts +114 -0
- package/dist_ts_web/elements/00group-kanban/kanban.demodata.d.ts +9 -3
- package/dist_ts_web/elements/00group-kanban/kanban.demodata.js +210 -17
- package/dist_ts_web/elements/00group-kanban/kanban.helpers.d.ts +23 -1
- package/dist_ts_web/elements/00group-kanban/kanban.helpers.js +57 -1
- package/dist_ts_web/elements/00group-kanban/kanban.styles.d.ts +2 -0
- package/dist_ts_web/elements/00group-kanban/kanban.styles.js +54 -1
- package/dist_ts_web/i18n/de.d.ts +156 -0
- package/dist_ts_web/i18n/de.js +40 -1
- package/dist_ts_web/i18n/messages.d.ts +156 -0
- package/dist_ts_web/i18n/messages.js +40 -1
- package/package.json +1 -1
- package/readme.md +59 -10
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-dataview/dees-table/filters.ts +14 -12
- package/ts_web/elements/00group-dataview/dees-table/styles.ts +33 -22
- package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.demo.ts +43 -8
- package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts +521 -60
- package/ts_web/elements/00group-kanban/dees-kanban-activity/dees-kanban-activity.ts +328 -0
- package/ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.ts +28 -0
- package/ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.ts +13 -2
- package/ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.ts +25 -68
- package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts +476 -17
- package/ts_web/elements/00group-kanban/index.ts +1 -0
- package/ts_web/elements/00group-kanban/interfaces.ts +98 -0
- package/ts_web/elements/00group-kanban/kanban.demodata.ts +231 -17
- package/ts_web/elements/00group-kanban/kanban.helpers.ts +79 -1
- package/ts_web/elements/00group-kanban/kanban.styles.ts +54 -0
- package/ts_web/i18n/de.ts +39 -0
- package/ts_web/i18n/messages.ts +39 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-ZU5CNY4P.js.map +0 -1
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-CJVVAKHG.js.map → chunk-NKLF624Z.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-QFJ7LA5L.js.map → chunk-Q2W326R5.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-NVJRWZKO.js.map → dees-modal-UURRHHYX.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-BSBYG5IX.js.map → dees-workspace-terminal-ZBGBOINI.js.map} +0 -0
package/readme.md
CHANGED
|
@@ -37,7 +37,7 @@ switcher**, **view-toggle**, and **single-selection toggle** all lead to
|
|
|
37
37
|
| Collect and submit form values | [`dees-form`](#deesform), [`dees-form-submit`](#deesformsubmit) | Give each input a stable `key`; use the form's collection and validation flow. |
|
|
38
38
|
| Choose, photograph or drop files, and show each file's upload | [`dees-input-fileupload`](#deesinputfileupload), [`dees-dropzone-overlay`](#deesdropzoneoverlay) | The field selects files (`capture` opens a phone camera) and shows the upload state the host reports with `setFileState()`; the overlay receives files dropped anywhere in the window. |
|
|
39
39
|
| Edit multiline plain text | [`dees-input-textarea`](#deesinputtextarea) | Notes and descriptions as strings, with validation and form reset; no rich-text editor. |
|
|
40
|
-
| Track epics, tasks and subtasks across workflow columns | [`dees-kanban`](#deeskanban) | Board, ordering, ticket detail, discussion and stable ticket references. |
|
|
40
|
+
| Track epics, tasks and subtasks across workflow columns | [`dees-kanban`](#deeskanban) | Board, ordering, projects, filters, ticket detail with links, source and history, discussion, live refresh and stable ticket references. |
|
|
41
41
|
| Compose comments with searchable inline references | [`dees-input-reference`](#deesinputreference) | Typing `#_` opens a searchable picker at the caret; the value contains text and stable reference IDs. |
|
|
42
42
|
| Search, filter, sort, edit and act on records | [`dees-table`](#deestable) | Use its columns, selection and data actions before building a table toolbar or row-action layer. |
|
|
43
43
|
| Offer an action about what a tile shows: open its details, export it, add to it | [`dees-tile`](#deestile) `actions` | Footer or header actions, drawn and held while they run exactly like a table's header and footer actions. Never a footer bar of buttons built by hand; actions on a table's rows or on the table itself are the table's own. See [Where actions go](#where-actions-go). |
|
|
@@ -426,6 +426,7 @@ task guide and examples deliberately; the generated table does not replace them.
|
|
|
426
426
|
| `dees-input-typelist` | input | [DeesInputTypelist](#deesinputtypelist) | [Source](ts_web/elements/00group-input/dees-input-typelist/dees-input-typelist.ts) |
|
|
427
427
|
| `dees-input-wysiwyg` | input | [DeesInputWysiwyg](#deesinputwysiwyg) | [Source](ts_web/elements/00group-input/dees-input-wysiwyg/dees-input-wysiwyg.ts) |
|
|
428
428
|
| `dees-kanban` | kanban | [DeesKanban](#deeskanban) | [Source](ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts) |
|
|
429
|
+
| `dees-kanban-activity` | kanban | [DeesKanbanActivity](#deeskanbanactivity) | [Source](ts_web/elements/00group-kanban/dees-kanban-activity/dees-kanban-activity.ts) |
|
|
429
430
|
| `dees-kanban-card` | kanban | [DeesKanbanCard](#deeskanbancard) | [Source](ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.ts) |
|
|
430
431
|
| `dees-kanban-column` | kanban | [DeesKanbanColumn](#deeskanbancolumn) | [Source](ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.ts) |
|
|
431
432
|
| `dees-kanban-discussion` | kanban | [DeesKanbanDiscussion](#deeskanbandiscussion) | [Source](ts_web/elements/00group-kanban/dees-kanban-discussion/dees-kanban-discussion.ts) |
|
|
@@ -5066,8 +5067,9 @@ IDE-style bottom status bar for the workspace.
|
|
|
5066
5067
|
#### DeesKanban
|
|
5067
5068
|
|
|
5068
5069
|
`dees-kanban` assembles the Kanban family: configurable workflow columns, task
|
|
5069
|
-
cards,
|
|
5070
|
-
`dees-modal`. The **Kanban** catalog demo includes a working in-memory provider
|
|
5070
|
+
cards, projects, filters, search, expandable subtask progress, and ticket detail in
|
|
5071
|
+
`dees-modal`. The **Kanban** catalog demo includes a working in-memory provider and
|
|
5072
|
+
a teammate button that changes the board through `refresh()`.
|
|
5071
5073
|
|
|
5072
5074
|
```typescript
|
|
5073
5075
|
import '@design.estate/dees-catalog';
|
|
@@ -5099,10 +5101,12 @@ must enforce the same permissions.
|
|
|
5099
5101
|
| `getTicket` | `(id, signal)` | Full `IKanbanTicket`, including tickets outside the current board |
|
|
5100
5102
|
| `searchTickets` | `(query, signal)` | Tickets matching key or title; omitted uses the supplied board tickets |
|
|
5101
5103
|
| `loadComments` | `(ticketId, signal)` | `IKanbanComment[]` for that ticket |
|
|
5104
|
+
| `loadActivity` | `(ticketId, signal)` | `IKanbanActivity[]`, oldest first; omitted shows no history |
|
|
5105
|
+
| `loadBoard` | `(signal)` | `IKanbanBoardSnapshot` (`tickets`, optional `columns` and `revision`) for `refresh()` |
|
|
5102
5106
|
| `addComment` | `{ ticketId, body }` | Saved `IKanbanComment` with stable ID, author and ISO timestamp |
|
|
5103
5107
|
| `updateTicket` | `{ ticketId, changes }` | Saved `IKanbanTicket`; nullable assignee/parent clears that field |
|
|
5104
5108
|
| `moveTicket` | `{ ticketId, columnId, beforeTicketId? }` | All `IKanbanTicket` records whose order/column changed |
|
|
5105
|
-
| `createTicket` | `{ kind, title, columnId, parentId? }` | Created `IKanbanTicket` |
|
|
5109
|
+
| `createTicket` | `{ kind, title, columnId, parentId?, project? }` | Created `IKanbanTicket` |
|
|
5106
5110
|
|
|
5107
5111
|
Provider reads receive an `AbortSignal`; obsolete reads cannot overwrite a newer
|
|
5108
5112
|
selection. Reject mutations with an `Error` to show the failure and preserve the
|
|
@@ -5117,6 +5121,29 @@ containers, and reduced motion removes lift, rearrangement and landing animation
|
|
|
5117
5121
|
Touch retains normal scrolling. The keyboard-accessible Move menu supports both
|
|
5118
5122
|
within-column ordering and column selection.
|
|
5119
5123
|
|
|
5124
|
+
Projects group tickets across one shared board. A ticket's `project` is an
|
|
5125
|
+
`IKanbanProject` id; supply `.projects` for their names. Cards show their
|
|
5126
|
+
project unless the board is filtered to one. A new task takes the filtered
|
|
5127
|
+
project, else its epic's. The detail edits the project and the labels and sends
|
|
5128
|
+
them in `updateTicket` changes.
|
|
5129
|
+
|
|
5130
|
+
The filters follow the catalog's filter standard, as `dees-table` does: the
|
|
5131
|
+
search field's filter button counts the active filters and opens Project, Epic,
|
|
5132
|
+
Assignee, Label and "Assigned to me" in a speech bubble with Clear filters in its
|
|
5133
|
+
action footer, and the active-filter bar below the header shows each filter and
|
|
5134
|
+
the search as a removable chip with Clear all. `.filterValues` (`IKanbanFilterValues`: `text`, `project`, `epic`,
|
|
5135
|
+
`assignee` with `'none'` for unassigned, `label`, `mine`) starts the board
|
|
5136
|
+
filtered; the reader's changes emit `kanban-filter-change`. "Assigned to me"
|
|
5137
|
+
appears when `.currentPersonId` is set. `clearFilters()` clears them.
|
|
5138
|
+
|
|
5139
|
+
A ticket's `links` (`TKanbanLink`) name where its work lives: a branch with
|
|
5140
|
+
an optional sha, a commit, a release with its version, or any page. A link with
|
|
5141
|
+
a `url` opens it in a new tab. `source` (`IKanbanSource`) keeps the words the
|
|
5142
|
+
ticket was written from, with their author, time and attachments. `createdAt`,
|
|
5143
|
+
`updatedAt`, `createdBy` and `updatedBy` show as sentences below the fields.
|
|
5144
|
+
With `loadActivity`, the detail switches between the discussion and the history
|
|
5145
|
+
of changes; comments stay in the discussion.
|
|
5146
|
+
|
|
5120
5147
|
Hierarchy is independent of workflow: tasks optionally belong to epics, and
|
|
5121
5148
|
subtasks belong to tasks. Each ticket has its own `columnId`; moving a parent
|
|
5122
5149
|
does not move its children. Column array order controls board order, and `done`
|
|
@@ -5132,33 +5159,45 @@ Public methods and events:
|
|
|
5132
5159
|
- `moveTicket(input)` invokes the same permission-aware move path as the UI.
|
|
5133
5160
|
- `refreshComments(ticketId?)` reloads discussion; `setComments(ticketId, comments)`
|
|
5134
5161
|
accepts authoritative realtime snapshots without introducing transport coupling.
|
|
5162
|
+
`refreshActivity(ticketId?)` reloads the history.
|
|
5163
|
+
- `refresh()` is the live update: it loads the board through `loadBoard` and
|
|
5164
|
+
shows it in place. The open ticket keeps its unsaved changes and comment
|
|
5165
|
+
draft, its comments and history reload quietly, and the filters and scroll
|
|
5166
|
+
position stay. Calls made during a load share it and one more load follows;
|
|
5167
|
+
a snapshot older than `.revision`, or loaded while the board saved its own
|
|
5168
|
+
change, is dropped. Call it from the host's push channel.
|
|
5135
5169
|
- `kanban-change`: `detail.tickets` contains saved/created/moved records to merge
|
|
5136
5170
|
into the host's state.
|
|
5137
5171
|
- `kanban-ticket-opened`: `detail.ticketId` identifies the selected ticket.
|
|
5138
5172
|
- `kanban-comment-saved`: `detail.comment` contains the saved comment.
|
|
5139
5173
|
- `kanban-error`: `detail.error` and `detail.message` report failed operations.
|
|
5174
|
+
- `kanban-filter-change`: `detail.filterValues` holds the reader's filters.
|
|
5140
5175
|
|
|
5141
5176
|
#### DeesKanbanColumn
|
|
5142
5177
|
|
|
5143
5178
|
`dees-kanban-column` accepts `.column`, `.tickets`, `.allTickets`, `.columns`,
|
|
5144
|
-
`.movable`, `.canCreate`, `.pendingTicketId
|
|
5179
|
+
`.movable`, `.canCreate`, `.pendingTicketId`, `.draggingTicketId`, `.projects`
|
|
5180
|
+
and `.showProjects`. It composes
|
|
5145
5181
|
cards and forwards their open, create and Move menu requests. Standalone columns
|
|
5146
5182
|
retain native dragging and emit `kanban-ticket-move` with the insertion target.
|
|
5147
5183
|
Use it through `dees-kanban` for provider handling and board-local drag ownership.
|
|
5148
5184
|
|
|
5149
5185
|
#### DeesKanbanCard
|
|
5150
5186
|
|
|
5151
|
-
`dees-kanban-card` accepts `.ticket`, `.epic`, `.subtasks`, `.columns`, `.movable
|
|
5152
|
-
and `.
|
|
5187
|
+
`dees-kanban-card` accepts `.ticket`, `.epic`, `.subtasks`, `.columns`, `.movable`,
|
|
5188
|
+
`.pending` and `.projectName`. It displays priority, assignee, labels, its project
|
|
5189
|
+
and completion counts.
|
|
5153
5190
|
`kanban-ticket-open` identifies a requested ticket, and `kanban-move-menu` carries
|
|
5154
5191
|
the ticket ID and anchor element. Secondary cards remain usable independently.
|
|
5155
5192
|
|
|
5156
5193
|
#### DeesKanbanTicketDetail
|
|
5157
5194
|
|
|
5158
5195
|
`dees-kanban-ticket-detail` is the reusable detail content, composed into the
|
|
5159
|
-
board's modal. It displays the parent, child tickets, description,
|
|
5160
|
-
|
|
5161
|
-
`.
|
|
5196
|
+
board's modal. It displays the parent, child tickets, description, links, source,
|
|
5197
|
+
fields, created and updated stamps, and the discussion beside the history. It
|
|
5198
|
+
accepts `.ticket`, `.tickets`, `.columns`, `.people`, `.projects`, `.provider`,
|
|
5199
|
+
`.draft`, `.comments`, `.commentDraft`, `.activity`, `.loadingActivity` and
|
|
5200
|
+
`.activityError`. It emits `kanban-ticket-save` and
|
|
5162
5201
|
`kanban-ticket-draft` intents; `dees-kanban` owns persistence, navigation and draft
|
|
5163
5202
|
caching. `finishEditing()` returns to the saved view after a successful update.
|
|
5164
5203
|
The ticket key is visible by default. Set `.showTicketKey = false` only when the
|
|
@@ -5173,6 +5212,16 @@ leave the draft intact. Ctrl/⌘ Enter submits; Enter inserts a newline.
|
|
|
5173
5212
|
Standalone consumers handle `kanban-comment-draft` (`ticketId`, `body`),
|
|
5174
5213
|
`kanban-comment-added` (`comment`, `submittedBody`), `kanban-ticket-open` and
|
|
5175
5214
|
`kanban-comments-refresh`. The assembled board handles these events itself.
|
|
5215
|
+
Set `.showHeader = false` where the host's own header names the discussion.
|
|
5216
|
+
|
|
5217
|
+
#### DeesKanbanActivity
|
|
5218
|
+
|
|
5219
|
+
`dees-kanban-activity` renders a ticket's history, oldest first: who changed what,
|
|
5220
|
+
marked by the kind of change, with the fields each change touched in words.
|
|
5221
|
+
Provide `.ticketId`, `.activity` (`IKanbanActivity[]`), `.columns`, `.tickets`,
|
|
5222
|
+
`.projects`, `.loading` and `.error`. An entry's `summary` replaces the board's
|
|
5223
|
+
sentence. Its refresh button emits `kanban-activity-refresh` (`ticketId`); set
|
|
5224
|
+
`.showHeader = false` where the host's own header names the history.
|
|
5176
5225
|
|
|
5177
5226
|
#### DeesInputReference
|
|
5178
5227
|
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-catalog',
|
|
6
|
-
version: '21.
|
|
6
|
+
version: '21.30.0',
|
|
7
7
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
|
8
8
|
}
|
|
@@ -119,32 +119,34 @@ export const tableFilterPanelStyles: CSSResult = css`
|
|
|
119
119
|
`;
|
|
120
120
|
|
|
121
121
|
/** Renders one filter as its field; a choice applies as it is made. */
|
|
122
|
-
const renderFilterField = (
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
export const renderFilterField = (
|
|
123
|
+
filterArg: ITableFilter,
|
|
124
|
+
valueArg: TTableFilterValue,
|
|
125
|
+
setArg: (valueArg: TTableFilterValue) => void,
|
|
126
|
+
): TemplateResult => {
|
|
125
127
|
switch (filterArg.type) {
|
|
126
128
|
case 'select': {
|
|
127
129
|
const options = (filterArg.options ?? []).map((option) => ({ key: option.key, option: option.label }));
|
|
128
130
|
return html`<dees-input-dropdown class="filterField" data-filter-key=${filterArg.key}
|
|
129
131
|
.label=${filterArg.label} .options=${options} .enableSearch=${options.length > 8}
|
|
130
|
-
.selectedOption=${options.find((option) => option.key ===
|
|
131
|
-
@change=${(event: CustomEvent<{ value: { key: string } | null }>) =>
|
|
132
|
+
.selectedOption=${options.find((option) => option.key === valueArg) ?? null}
|
|
133
|
+
@change=${(event: CustomEvent<{ value: { key: string } | null }>) => setArg(event.detail.value?.key ?? null)}
|
|
132
134
|
></dees-input-dropdown>`;
|
|
133
135
|
}
|
|
134
136
|
case 'toggle':
|
|
135
137
|
return html`<dees-input-checkbox class="filterField" data-filter-key=${filterArg.key}
|
|
136
|
-
.label=${filterArg.label} .value=${
|
|
137
|
-
@change=${(event: CustomEvent<{ value: boolean }>) =>
|
|
138
|
+
.label=${filterArg.label} .value=${valueArg === true}
|
|
139
|
+
@change=${(event: CustomEvent<{ value: boolean }>) => setArg(event.detail.value)}
|
|
138
140
|
></dees-input-checkbox>`;
|
|
139
141
|
case 'date':
|
|
140
142
|
return html`<dees-input-datepicker class="filterField" data-filter-key=${filterArg.key}
|
|
141
|
-
.label=${filterArg.label} .value=${typeof
|
|
142
|
-
@change=${(event: CustomEvent<{ value: string }>) =>
|
|
143
|
+
.label=${filterArg.label} .value=${typeof valueArg === 'string' ? valueArg : ''}
|
|
144
|
+
@change=${(event: CustomEvent<{ value: string }>) => setArg(event.detail.value || null)}
|
|
143
145
|
></dees-input-datepicker>`;
|
|
144
146
|
default:
|
|
145
147
|
return html`<dees-input-text class="filterField" data-filter-key=${filterArg.key}
|
|
146
|
-
.label=${filterArg.label} .value=${typeof
|
|
147
|
-
@input=${(event: Event) =>
|
|
148
|
+
.label=${filterArg.label} .value=${typeof valueArg === 'string' ? valueArg : ''}
|
|
149
|
+
@input=${(event: Event) => setArg((event.currentTarget as HTMLElement & { value: string }).value)}
|
|
148
150
|
></dees-input-text>`;
|
|
149
151
|
}
|
|
150
152
|
};
|
|
@@ -158,7 +160,7 @@ export const renderTableFilterPanel = (tableArg: DeesTable<any>, t: TDcLocalizer
|
|
|
158
160
|
const filterable = tableArg.hasFilterableColumns;
|
|
159
161
|
return html`<div class="filterPanel">
|
|
160
162
|
${tableArg.filters.length
|
|
161
|
-
? html`<div class="filterPanelSection">${tableArg.filters.map((filter) => renderFilterField(tableArg, filter))}</div>`
|
|
163
|
+
? html`<div class="filterPanelSection">${tableArg.filters.map((filter) => renderFilterField(filter, filterValueOf(filter, tableArg.filterValues), (next) => tableArg.setFilterValue(filter.key, next)))}</div>`
|
|
162
164
|
: ''}
|
|
163
165
|
<div class="filterPanelSection">
|
|
164
166
|
${filterable
|
|
@@ -52,6 +52,38 @@ export const tableSearchFieldStyles: CSSResult = css`
|
|
|
52
52
|
}
|
|
53
53
|
`;
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* The active-filter bar: a chip per filter that narrows the view, each removing its filter, and
|
|
57
|
+
* "Clear all". One look below the table's header and below the board's (dees-kanban); a view sets
|
|
58
|
+
* its own inset and frame on `.activeFilters`.
|
|
59
|
+
*/
|
|
60
|
+
export const activeFilterBarStyles: CSSResult = css`
|
|
61
|
+
/* Between the header and the column headers, across the table, a soft accent tint at the region
|
|
62
|
+
inset, its chips wrapping onto further lines. */
|
|
63
|
+
.activeFilters {
|
|
64
|
+
box-sizing: border-box; display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 6px 8px; width: 100%;
|
|
65
|
+
min-height: 40px; padding: 6px var(--table-inset-inline, 20px);
|
|
66
|
+
background: color-mix(in srgb, var(--dees-color-accent-primary) 8%, transparent);
|
|
67
|
+
border-bottom: var(--dees-line-width-hairline) solid color-mix(in srgb, var(--dees-color-accent-primary) 16%, transparent);
|
|
68
|
+
color: var(--dees-color-text-primary); font-size: 12px;
|
|
69
|
+
}
|
|
70
|
+
.activeFiltersIcon { flex: 0 0 auto; color: var(--dees-color-accent-primary); }
|
|
71
|
+
.activeFilterChip {
|
|
72
|
+
min-width: 0; max-width: 100%; height: 26px; gap: 4px; padding: 0 6px 0 10px; border-radius: 13px;
|
|
73
|
+
background: color-mix(in srgb, var(--dees-color-accent-primary) 14%, transparent); color: var(--dees-color-text-primary); font-size: 12px;
|
|
74
|
+
}
|
|
75
|
+
.activeFilterLabel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
76
|
+
.activeFilterChip dees-icon { flex: 0 0 auto; color: var(--dees-color-text-secondary); }
|
|
77
|
+
.clearAllFilters { height: 26px; padding: 0 8px; color: var(--dees-color-accent-primary); font-size: 12px; font-weight: 500; }
|
|
78
|
+
@media (hover: hover) {
|
|
79
|
+
.activeFilterChip:hover { background: color-mix(in srgb, var(--dees-color-accent-primary) 22%, transparent); }
|
|
80
|
+
}
|
|
81
|
+
@media (pointer: coarse) {
|
|
82
|
+
.activeFilterChip, .clearAllFilters { height: var(--dees-control-height-touch); }
|
|
83
|
+
.activeFilterChip { border-radius: 22px; }
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
|
|
55
87
|
export const tableStyles: CSSResult[] = [
|
|
56
88
|
themeDefaultStyles,
|
|
57
89
|
cssManager.defaultStyles,
|
|
@@ -66,6 +98,7 @@ export const tableStyles: CSSResult[] = [
|
|
|
66
98
|
barInfoStyles,
|
|
67
99
|
tableSearchFieldStyles,
|
|
68
100
|
tableFilterPanelStyles,
|
|
101
|
+
activeFilterBarStyles,
|
|
69
102
|
scrollEdgeShadowStyles,
|
|
70
103
|
css`
|
|
71
104
|
:host {
|
|
@@ -332,26 +365,6 @@ export const tableStyles: CSSResult[] = [
|
|
|
332
365
|
.skeletonList .skeletonRow:last-child { border-bottom: 0; }
|
|
333
366
|
@keyframes dees-table-skeleton { 0%, 100% { opacity: 1; } 50% { opacity: var(--dees-loading-pulse-opacity); } }
|
|
334
367
|
.loadingStatus, .filterStatus { ${visuallyHidden} }
|
|
335
|
-
/* The active-filter bar: between the header and the column headers, across the table, a soft
|
|
336
|
-
accent tint at the region inset, its chips wrapping onto further lines. */
|
|
337
|
-
.activeFilters {
|
|
338
|
-
box-sizing: border-box; display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 6px 8px; width: 100%;
|
|
339
|
-
min-height: 40px; padding: 6px var(--table-inset-inline, 20px);
|
|
340
|
-
background: color-mix(in srgb, var(--dees-color-accent-primary) 8%, transparent);
|
|
341
|
-
border-bottom: var(--dees-line-width-hairline) solid color-mix(in srgb, var(--dees-color-accent-primary) 16%, transparent);
|
|
342
|
-
color: var(--dees-color-text-primary); font-size: 12px;
|
|
343
|
-
}
|
|
344
|
-
.activeFiltersIcon { flex: 0 0 auto; color: var(--dees-color-accent-primary); }
|
|
345
|
-
.activeFilterChip {
|
|
346
|
-
min-width: 0; max-width: 100%; height: 26px; gap: 4px; padding: 0 6px 0 10px; border-radius: 13px;
|
|
347
|
-
background: color-mix(in srgb, var(--dees-color-accent-primary) 14%, transparent); color: var(--dees-color-text-primary); font-size: 12px;
|
|
348
|
-
}
|
|
349
|
-
.activeFilterLabel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
350
|
-
.activeFilterChip dees-icon { flex: 0 0 auto; color: var(--dees-color-text-secondary); }
|
|
351
|
-
.clearAllFilters { height: 26px; padding: 0 8px; color: var(--dees-color-accent-primary); font-size: 12px; font-weight: 500; }
|
|
352
|
-
@media (hover: hover) {
|
|
353
|
-
.activeFilterChip:hover { background: color-mix(in srgb, var(--dees-color-accent-primary) 22%, transparent); }
|
|
354
|
-
}
|
|
355
368
|
.emptyRow td { padding: 0; }
|
|
356
369
|
/* The row spans the whole table; its state keeps to the scroll viewport, centred in what the reader sees. */
|
|
357
370
|
.emptyRow td > .noDataSet { position: sticky; inset-inline-start: 0; width: var(--table-viewport-width, auto); }
|
|
@@ -411,8 +424,6 @@ export const tableStyles: CSSResult[] = [
|
|
|
411
424
|
.header .searchOptions:not(.filtering) { width: var(--dees-control-height-touch); }
|
|
412
425
|
.header .filterButton.filtering { min-width: var(--dees-control-height-touch); }
|
|
413
426
|
.control, .sortControl, .filtersRow input { min-height: var(--dees-control-height-touch); }
|
|
414
|
-
.activeFilterChip, .clearAllFilters { height: var(--dees-control-height-touch); }
|
|
415
|
-
.activeFilterChip { border-radius: 22px; }
|
|
416
427
|
thead tr:first-child th { padding-block: var(--dees-spacing-2xs); }
|
|
417
428
|
td { height: 48px; padding-block: var(--dees-spacing-2xs); }
|
|
418
429
|
.selectionCol { min-width: 52px; padding-inline: var(--table-inset-inline, 4px) 4px !important; }
|
|
@@ -1,14 +1,49 @@
|
|
|
1
1
|
import { html } from '@design.estate/dees-element';
|
|
2
2
|
import { demoApp } from '../../../demos/templates.js';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
createKanbanDemo,
|
|
5
|
+
kanbanDemoColumns,
|
|
6
|
+
kanbanDemoPeople,
|
|
7
|
+
kanbanDemoProjects,
|
|
8
|
+
} from '../kanban.demodata.js';
|
|
9
|
+
import type { DeesKanban } from './dees-kanban.js';
|
|
10
|
+
import '../../00group-button/dees-button/dees-button.js';
|
|
4
11
|
|
|
5
12
|
export const demoFunc = () => {
|
|
6
13
|
const demo = createKanbanDemo();
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
const [mara, jonas, alex] = kanbanDemoPeople;
|
|
15
|
+
// A teammate's changes, one per click: the board fetches them through `refresh()`.
|
|
16
|
+
const teammate = [
|
|
17
|
+
() => demo.provider.moveTicket!({ ticketId: 'task-1', columnId: 'progress' }),
|
|
18
|
+
() => demo.provider.addComment!({
|
|
19
|
+
ticketId: 'task-2',
|
|
20
|
+
body: [{ type: 'text', text: 'The branch is rebased; the picker keeps focus now.' }],
|
|
21
|
+
}),
|
|
22
|
+
() => demo.provider.updateTicket!({ ticketId: 'task-3', changes: { priority: 'high' } }),
|
|
23
|
+
() => demo.provider.moveTicket!({ ticketId: 'task-2', columnId: 'review' }),
|
|
24
|
+
];
|
|
25
|
+
let step = 0;
|
|
26
|
+
const simulate = async (event: Event) => {
|
|
27
|
+
const board = (event.currentTarget as HTMLElement)
|
|
28
|
+
.closest('.dees-demo-app')!
|
|
29
|
+
.querySelector<DeesKanban>('dees-kanban')!;
|
|
30
|
+
demo.actAs(step % 2 ? alex : jonas);
|
|
31
|
+
await teammate[step++ % teammate.length]();
|
|
32
|
+
demo.actAs(mara);
|
|
33
|
+
await board.refresh();
|
|
34
|
+
};
|
|
35
|
+
return demoApp(html`<div class="dees-demo-row" style="padding: 0 24px 4px">
|
|
36
|
+
<p class="dees-demo-caption">Signed in as Mara Chen. Jonas and Alex work on the same board.</p>
|
|
37
|
+
<dees-button type="outline" size="sm" text="Simulate a teammate's change" @clicked=${simulate}></dees-button>
|
|
38
|
+
</div>
|
|
39
|
+
<dees-kanban
|
|
40
|
+
heading="Product workspace"
|
|
41
|
+
currentPersonId=${mara.id}
|
|
42
|
+
.tickets=${demo.tickets}
|
|
43
|
+
.columns=${kanbanDemoColumns}
|
|
44
|
+
.people=${kanbanDemoPeople}
|
|
45
|
+
.projects=${kanbanDemoProjects}
|
|
46
|
+
.revision=${demo.revision}
|
|
47
|
+
.provider=${demo.provider}
|
|
48
|
+
></dees-kanban>`);
|
|
14
49
|
};
|