@itrocks/list 0.28.2 → 0.28.3
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/README.md +1 -1
- package/cjs/filter-summary.html +2 -1
- package/cjs/list.html +1 -1
- package/list.css +11 -11
- package/package.json +2 -1
- package/search-focus.js +4 -0
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ HTML rendering provides columns, filters, ordered sorting and session preference
|
|
|
31
31
|
business objects for API consumers. See the public methods below for their shared contracts.
|
|
32
32
|
|
|
33
33
|
Column filter values use the same text highlight as the toolbar summary.
|
|
34
|
-
|
|
34
|
+
When a filter is active, the toolbar shows the read-only summary beside a button that focuses the first column filter.
|
|
35
35
|
The summary uses unique single-word column labels when available.
|
|
36
36
|
Applying a search from a column filter returns focus to that field and selects its full value.
|
|
37
37
|
When the toolbar runs out of space, the filter and add-column button move to a second row.
|
package/cjs/filter-summary.html
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<!--criteria-->
|
|
2
|
-
<
|
|
2
|
+
<button aria-label="Edit the filter" class="list-filter-icon" data-focus-column-filter
|
|
3
|
+
title="Edit the filter" type="button"></button>
|
|
3
4
|
<span aria-label="Active list filters" class="list-filter-text" role="group"
|
|
4
5
|
><!--items--><code class="list-filter-criterion"
|
|
5
6
|
>{caption}<span class="list-filter-value">{value}</span></code>{space}<!--end--></span>
|
package/cjs/list.html
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<thead>
|
|
42
42
|
<tr class="properties">
|
|
43
43
|
<th class="select" data-freeze><!--selection-->{{template}}<!--end-->
|
|
44
|
-
<input class="search-submit" title="
|
|
44
|
+
<input class="search-submit" title="Filter" type="submit" value="Filter">
|
|
45
45
|
</th>
|
|
46
46
|
<!--columns-->
|
|
47
47
|
<th data-property="{name}" data-reverse="{?reverse}" data-sort="{?sort}"
|
package/list.css
CHANGED
|
@@ -327,6 +327,9 @@ main > article[data-action=list] > header > .list-toolbar > .summary {
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
.list-filter {
|
|
330
|
+
--list-filter-criterion-color: #888;
|
|
331
|
+
--list-filter-value-background: #d5edff;
|
|
332
|
+
--list-filter-value-color: #12365b;
|
|
330
333
|
align-items: center;
|
|
331
334
|
display: flex;
|
|
332
335
|
flex: 1;
|
|
@@ -335,20 +338,18 @@ main > article[data-action=list] > header > .list-toolbar > .summary {
|
|
|
335
338
|
.list-filter .list-filter-icon {
|
|
336
339
|
background: url("filter.svg") center/18px no-repeat;
|
|
337
340
|
}
|
|
338
|
-
.list-filter
|
|
341
|
+
.list-filter .list-filter-icon, .list-filter > .list-filter-reset {
|
|
342
|
+
box-sizing: border-box;
|
|
339
343
|
flex: none;
|
|
340
|
-
height:
|
|
341
|
-
|
|
344
|
+
height: 36px;
|
|
345
|
+
padding: 0;
|
|
346
|
+
width: 32px;
|
|
342
347
|
}
|
|
343
348
|
.list-filter button.list-filter-icon, .list-filter > .list-filter-reset {
|
|
344
349
|
border: 0;
|
|
345
350
|
border-radius: 2px;
|
|
346
351
|
cursor: pointer;
|
|
347
|
-
flex: none;
|
|
348
|
-
height: 36px;
|
|
349
|
-
padding: 0;
|
|
350
352
|
touch-action: manipulation;
|
|
351
|
-
width: 32px;
|
|
352
353
|
}
|
|
353
354
|
.list-filter button.list-filter-icon:hover, .list-filter > .list-filter-reset:hover {
|
|
354
355
|
background-color: #eee;
|
|
@@ -364,7 +365,6 @@ main > article[data-action=list] > header > .list-toolbar > .summary {
|
|
|
364
365
|
display: block;
|
|
365
366
|
}
|
|
366
367
|
.list-filter .list-filter-text {
|
|
367
|
-
flex: 1;
|
|
368
368
|
min-width: 0;
|
|
369
369
|
overflow-x: auto;
|
|
370
370
|
white-space: pre;
|
|
@@ -373,9 +373,9 @@ main > article[data-action=list] > header > .list-toolbar > .summary {
|
|
|
373
373
|
font: inherit;
|
|
374
374
|
}
|
|
375
375
|
.list-filter .list-filter-criterion {
|
|
376
|
-
text-decoration: underline dotted
|
|
376
|
+
text-decoration: underline dotted var(--list-filter-criterion-color);
|
|
377
377
|
}
|
|
378
378
|
.list-filter .list-filter-value {
|
|
379
|
-
background:
|
|
380
|
-
color:
|
|
379
|
+
background: var(--list-filter-value-background);
|
|
380
|
+
color: var(--list-filter-value-color);
|
|
381
381
|
}
|
package/package.json
CHANGED
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"@itrocks/class-file": "latest",
|
|
34
34
|
"@itrocks/fastify-file-session-store": "latest",
|
|
35
35
|
"@types/node": "^24.10",
|
|
36
|
+
"pdf-lib": "^1.17.1",
|
|
36
37
|
"sass": "^1.95",
|
|
37
38
|
"typescript": "^7.0"
|
|
38
39
|
},
|
|
@@ -102,5 +103,5 @@
|
|
|
102
103
|
"build:front": "tsc -p src/front/tsconfig.json",
|
|
103
104
|
"test": "npm run build:cjs && node --test \"test/**/*.test.mjs\""
|
|
104
105
|
},
|
|
105
|
-
"version": "0.28.
|
|
106
|
+
"version": "0.28.3"
|
|
106
107
|
}
|
package/search-focus.js
CHANGED
|
@@ -42,6 +42,10 @@ build({
|
|
|
42
42
|
priority: 2000,
|
|
43
43
|
selector: 'article[data-action="list"] > form'
|
|
44
44
|
});
|
|
45
|
+
build('.list-filter > button[data-focus-column-filter]', 'click', function () {
|
|
46
|
+
this.closest('article[data-action="list"]')
|
|
47
|
+
?.querySelector(':scope > form input[data-property-filter]:enabled')?.focus();
|
|
48
|
+
});
|
|
45
49
|
build('.list-filter > .list-filter-reset', 'click', function () {
|
|
46
50
|
const form = this.closest('article[data-action="list"]')?.querySelector(':scope > form');
|
|
47
51
|
if (!form)
|