@mintplayer/web-components 2.14.0 → 2.15.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/README.md +15 -0
- package/badge/src/styles/badge.styles.d.ts +2 -0
- package/chunks/install-light-styles-DbCAGFOC.mjs +209 -0
- package/chunks/{mp-datatable-GmKqaN8y.mjs → mp-datatable-UJI8E73X.mjs} +484 -476
- package/chunks/{mp-treeview-tkWu28iF.mjs → mp-treeview-C8iltDbq.mjs} +61 -63
- package/datatable/index.mjs +2 -2
- package/datatable/src/components/mp-datatable.d.ts +9 -1
- package/datatable/src/index.d.ts +1 -1
- package/datatable/src/styles/datatable.light.styles.d.ts +2 -0
- package/datatable/src/styles/index.d.ts +1 -1
- package/dock/index.mjs +477 -492
- package/dock/src/components/mint-dock-manager.element.d.ts +10 -8
- package/dock/src/core/index.d.ts +1 -0
- package/dock/src/core/intersection-sizing.d.ts +83 -0
- package/dock/src/core/layout-tree.d.ts +23 -2
- package/dock/src/core/types.d.ts +14 -0
- package/file-manager/index.mjs +30 -29
- package/file-manager/src/components/mp-file-manager.d.ts +2 -0
- package/light-dom/index.d.ts +1 -0
- package/light-dom/index.mjs +11 -0
- package/light-dom/src/index.d.ts +2 -0
- package/light-dom/src/install-light-styles.d.ts +25 -0
- package/light-dom/src/scoped-html.d.ts +26 -0
- package/package.json +5 -1
- package/query-builder/index.mjs +1472 -2651
- package/query-builder/src/index.d.ts +4 -0
- package/query-builder/src/mp-query-builder.element.d.ts +1 -1
- package/query-builder/src/mp-query-builder.light.styles.d.ts +2 -0
- package/query-builder/src/mp-query-condition.element.d.ts +1 -1
- package/query-builder/src/mp-query-condition.light.styles.d.ts +2 -0
- package/query-builder/src/mp-query-group.element.d.ts +1 -1
- package/query-builder/src/mp-query-group.light.styles.d.ts +2 -0
- package/query-builder/src/mp-query-subquery.element.d.ts +1 -1
- package/query-builder/src/mp-query-subquery.light.styles.d.ts +2 -0
- package/tree-select/index.mjs +60 -58
- package/tree-select/src/components/mp-tree-select.d.ts +1 -1
- package/tree-select/src/index.d.ts +1 -1
- package/tree-select/src/styles/index.d.ts +1 -1
- package/tree-select/src/styles/tree-select.light.styles.d.ts +2 -0
- package/treeview/index.mjs +3 -3
- package/treeview/src/components/mp-treeview.d.ts +1 -1
- package/treeview/src/index.d.ts +1 -1
- package/treeview/src/styles/index.d.ts +1 -1
- package/treeview/src/styles/treeview.light.styles.d.ts +2 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { unsafeCSS as I, LitElement as y, nothing as d
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { unsafeCSS as I, LitElement as y, nothing as d } from "lit";
|
|
2
|
+
import { s as $, i as C } from "./install-light-styles-DbCAGFOC.mjs";
|
|
3
|
+
import { L as S } from "./live-announcer-Bi0orG4n.mjs";
|
|
4
|
+
import { repeat as E } from "lit/directives/repeat.js";
|
|
5
|
+
import { unsafeHTML as g } from "lit/directives/unsafe-html.js";
|
|
6
|
+
const R = I(`mp-treeview {
|
|
6
7
|
display: block;
|
|
7
8
|
width: 100%;
|
|
8
9
|
--mp-treeview-indent: 20px;
|
|
@@ -16,28 +17,28 @@ const S = I(`:host {
|
|
|
16
17
|
--mp-treeview-border-color: var(--bs-list-group-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
[data-mps=treeview] {
|
|
20
21
|
box-sizing: border-box;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
ul {
|
|
24
|
+
ul[data-mps=treeview] {
|
|
24
25
|
list-style: none;
|
|
25
26
|
margin: 0;
|
|
26
27
|
padding: 0;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
.treeview-root {
|
|
30
|
+
.treeview-root[data-mps=treeview] {
|
|
30
31
|
border: 1px solid var(--mp-treeview-border-color);
|
|
31
32
|
border-radius: var(--bs-list-group-border-radius, 0.375rem);
|
|
32
33
|
overflow: hidden;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
mp-treeview[hide-borders] .treeview-root[data-mps=treeview] {
|
|
36
37
|
border: 0;
|
|
37
38
|
border-radius: 0;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
.treeview-row {
|
|
41
|
+
.treeview-row[data-mps=treeview] {
|
|
41
42
|
display: flex;
|
|
42
43
|
align-items: center;
|
|
43
44
|
gap: 0.5rem;
|
|
@@ -49,33 +50,33 @@ ul {
|
|
|
49
50
|
color: inherit;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
mp-treeview[hide-borders] .treeview-row[data-mps=treeview] {
|
|
53
54
|
border-top: 0;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
.treeview-row:first-child {
|
|
57
|
+
.treeview-row:first-child[data-mps=treeview] {
|
|
57
58
|
border-top: 0;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
.treeview-row:hover {
|
|
61
|
+
.treeview-row:hover[data-mps=treeview] {
|
|
61
62
|
background-color: var(--mp-treeview-row-hover-bg);
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
.treeview-row[data-selected=true] {
|
|
65
|
+
.treeview-row[data-selected=true][data-mps=treeview] {
|
|
65
66
|
background-color: var(--mp-treeview-row-selected-bg);
|
|
66
67
|
color: var(--mp-treeview-row-selected-color);
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
.treeview-row:focus {
|
|
70
|
+
.treeview-row:focus[data-mps=treeview] {
|
|
70
71
|
outline: none;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
.treeview-row:focus-visible {
|
|
74
|
+
.treeview-row:focus-visible[data-mps=treeview] {
|
|
74
75
|
outline: var(--mp-treeview-row-focus-outline);
|
|
75
76
|
outline-offset: -2px;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
.treeview-chevron {
|
|
79
|
+
.treeview-chevron[data-mps=treeview] {
|
|
79
80
|
display: inline-flex;
|
|
80
81
|
align-items: center;
|
|
81
82
|
justify-content: center;
|
|
@@ -86,24 +87,22 @@ ul {
|
|
|
86
87
|
transition: transform 0.15s ease-in-out;
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
.treeview-chevron[data-expanded=true] {
|
|
90
|
+
.treeview-chevron[data-expanded=true][data-mps=treeview] {
|
|
90
91
|
transform: rotate(90deg);
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
.treeview-chevron.invisible {
|
|
94
|
+
.treeview-chevron.invisible[data-mps=treeview] {
|
|
94
95
|
visibility: hidden;
|
|
95
96
|
}
|
|
96
|
-
|
|
97
|
-
.treeview-chevron svg {
|
|
97
|
+
.treeview-chevron[data-mps=treeview] svg {
|
|
98
98
|
width: 0.75rem;
|
|
99
99
|
height: 0.75rem;
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
.treeview-chevron.loading svg {
|
|
101
|
+
.treeview-chevron.loading[data-mps=treeview] svg {
|
|
103
102
|
display: none;
|
|
104
103
|
}
|
|
105
104
|
|
|
106
|
-
.treeview-spinner {
|
|
105
|
+
.treeview-spinner[data-mps=treeview] {
|
|
107
106
|
display: inline-block;
|
|
108
107
|
width: 0.75rem;
|
|
109
108
|
height: 0.75rem;
|
|
@@ -118,13 +117,13 @@ ul {
|
|
|
118
117
|
transform: rotate(360deg);
|
|
119
118
|
}
|
|
120
119
|
}
|
|
121
|
-
.treeview-row[data-error=true] .treeview-chevron::after {
|
|
120
|
+
.treeview-row[data-error=true][data-mps=treeview] .treeview-chevron[data-mps=treeview]::after {
|
|
122
121
|
content: "!";
|
|
123
122
|
color: var(--bs-danger, #dc3545);
|
|
124
123
|
margin-left: 0.25rem;
|
|
125
124
|
}
|
|
126
125
|
|
|
127
|
-
.treeview-icon {
|
|
126
|
+
.treeview-icon[data-mps=treeview] {
|
|
128
127
|
display: inline-flex;
|
|
129
128
|
align-items: center;
|
|
130
129
|
justify-content: center;
|
|
@@ -132,36 +131,34 @@ ul {
|
|
|
132
131
|
height: 1rem;
|
|
133
132
|
flex: 0 0 auto;
|
|
134
133
|
}
|
|
135
|
-
|
|
136
|
-
.treeview-icon svg {
|
|
134
|
+
.treeview-icon[data-mps=treeview] svg {
|
|
137
135
|
width: 1rem;
|
|
138
136
|
height: 1rem;
|
|
139
137
|
}
|
|
140
|
-
|
|
141
|
-
.treeview-label {
|
|
138
|
+
.treeview-row[data-mps=treeview] .treeview-label {
|
|
142
139
|
flex: 1 1 auto;
|
|
143
140
|
white-space: nowrap;
|
|
144
141
|
overflow: hidden;
|
|
145
142
|
text-overflow: ellipsis;
|
|
146
143
|
}
|
|
147
144
|
|
|
148
|
-
.treeview-body {
|
|
145
|
+
.treeview-body[data-mps=treeview] {
|
|
149
146
|
flex: 1 1 auto;
|
|
150
147
|
min-width: 0;
|
|
151
148
|
}
|
|
152
149
|
|
|
153
150
|
@media (prefers-reduced-motion: reduce) {
|
|
154
|
-
.treeview-chevron {
|
|
151
|
+
.treeview-chevron[data-mps=treeview] {
|
|
155
152
|
transition: none !important;
|
|
156
153
|
}
|
|
157
|
-
}`),
|
|
158
|
-
let
|
|
159
|
-
class
|
|
154
|
+
}`), n = $("treeview"), U = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/></svg>';
|
|
155
|
+
let q = 0;
|
|
156
|
+
class L extends y {
|
|
160
157
|
constructor() {
|
|
161
|
-
super(...arguments), this.instanceId = `mp-treeview-${++
|
|
158
|
+
super(...arguments), this.instanceId = `mp-treeview-${++q}`, this._items = [], this._expandedIds = /* @__PURE__ */ new Set(), this._selectedIds = /* @__PURE__ */ new Set(), this._selectionMode = "single", this._hideBorders = !1, this._loadingIds = /* @__PURE__ */ new Set(), this._errorIds = /* @__PURE__ */ new Map(), this.liveAnnouncer = new S(this, { omitRole: !0 }), this._focusedId = null, this._visibleOrder = [], this._byId = /* @__PURE__ */ new Map(), this._parentById = /* @__PURE__ */ new Map(), this._inputLabel = null;
|
|
162
159
|
}
|
|
163
|
-
|
|
164
|
-
this
|
|
160
|
+
createRenderRoot() {
|
|
161
|
+
return this;
|
|
165
162
|
}
|
|
166
163
|
static get observedAttributes() {
|
|
167
164
|
return [
|
|
@@ -283,7 +280,7 @@ class U extends y {
|
|
|
283
280
|
}
|
|
284
281
|
renderNodes(e, t) {
|
|
285
282
|
return n`
|
|
286
|
-
${
|
|
283
|
+
${E(
|
|
287
284
|
e,
|
|
288
285
|
(s) => s.id,
|
|
289
286
|
(s, i) => this.renderNode(s, t, i, e.length)
|
|
@@ -291,44 +288,44 @@ class U extends y {
|
|
|
291
288
|
`;
|
|
292
289
|
}
|
|
293
290
|
renderNode(e, t, s, i) {
|
|
294
|
-
const r = !!(e.children && e.children.length > 0),
|
|
291
|
+
const r = !!(e.children && e.children.length > 0), p = !!e.lazy && !r, u = r || p, o = this._loadingIds.has(e.id), l = this._errorIds.get(e.id), h = this._expandedIds.has(e.id), v = this._selectedIds.has(e.id), m = this._focusedId === e.id, _ = m ? 0 : -1, f = e.iconKey && this._iconResolver ? this._iconResolver(e.iconKey, e) : void 0, x = (t - 1) * 20, w = `${this.instanceId}-row-${e.id}`, b = this._nodeRenderer ? this._nodeRenderer(e, {
|
|
295
292
|
level: t,
|
|
296
293
|
expanded: h,
|
|
297
294
|
selected: v,
|
|
298
|
-
focused:
|
|
299
|
-
hasChildren:
|
|
295
|
+
focused: m,
|
|
296
|
+
hasChildren: u
|
|
300
297
|
}) : void 0;
|
|
301
298
|
return n`
|
|
302
299
|
<li role="none">
|
|
303
300
|
<div
|
|
304
|
-
id=${
|
|
301
|
+
id=${w}
|
|
305
302
|
class="treeview-row"
|
|
306
303
|
role="treeitem"
|
|
307
304
|
data-node-id=${e.id}
|
|
308
305
|
data-selected=${v ? "true" : "false"}
|
|
309
|
-
data-loading=${
|
|
310
|
-
data-error=${
|
|
306
|
+
data-loading=${o ? "true" : "false"}
|
|
307
|
+
data-error=${l ? "true" : "false"}
|
|
311
308
|
aria-level=${t}
|
|
312
309
|
aria-setsize=${i}
|
|
313
310
|
aria-posinset=${s + 1}
|
|
314
|
-
aria-expanded=${
|
|
315
|
-
aria-busy=${
|
|
311
|
+
aria-expanded=${u ? h ? "true" : "false" : d}
|
|
312
|
+
aria-busy=${o ? "true" : d}
|
|
316
313
|
aria-selected=${this._selectionMode !== "none" ? v ? "true" : "false" : d}
|
|
317
|
-
tabindex=${
|
|
314
|
+
tabindex=${_}
|
|
318
315
|
style=${`padding-left:${x + 12}px`}
|
|
319
|
-
@click=${(
|
|
320
|
-
@keydown=${(
|
|
321
|
-
aria-describedby=${
|
|
316
|
+
@click=${(a) => this.onRowClick(e, a)}
|
|
317
|
+
@keydown=${(a) => this.onRowKeydown(e, a)}
|
|
318
|
+
aria-describedby=${l ? `${w}-error` : d}
|
|
322
319
|
>
|
|
323
|
-
${
|
|
320
|
+
${l ? n`<span id="${w}-error" class="treeview-load-error">${l}</span>` : d}
|
|
324
321
|
<span
|
|
325
|
-
class=${`treeview-chevron${
|
|
322
|
+
class=${`treeview-chevron${u ? "" : " invisible"}${o ? " loading" : ""}`}
|
|
326
323
|
data-expanded=${h ? "true" : "false"}
|
|
327
|
-
@click=${(
|
|
324
|
+
@click=${(a) => this.onChevronClick(e, a)}
|
|
328
325
|
aria-hidden="true"
|
|
329
|
-
>${
|
|
330
|
-
${
|
|
331
|
-
${
|
|
326
|
+
>${o ? n`<span class="treeview-spinner" aria-hidden="true"></span>` : g(U)}</span>
|
|
327
|
+
${b ? n`<span class="treeview-body">${b}</span>` : n`
|
|
328
|
+
${f ? n`<span class="treeview-icon" aria-hidden="true">${g(f)}</span>` : d}
|
|
332
329
|
<span class="treeview-label">${e.label}</span>
|
|
333
330
|
`}
|
|
334
331
|
</div>
|
|
@@ -406,14 +403,14 @@ class U extends y {
|
|
|
406
403
|
}
|
|
407
404
|
}
|
|
408
405
|
focusRelative(e, t) {
|
|
409
|
-
const s = this._visibleOrder, i = s.findIndex((
|
|
406
|
+
const s = this._visibleOrder, i = s.findIndex((p) => p.id === e.id);
|
|
410
407
|
if (i === -1) return;
|
|
411
408
|
const r = Math.max(0, Math.min(s.length - 1, i + t));
|
|
412
409
|
r !== i && this.focusNode(s[r].id);
|
|
413
410
|
}
|
|
414
411
|
focusNode(e) {
|
|
415
412
|
this._focusedId = e, this.requestUpdate(), requestAnimationFrame(() => {
|
|
416
|
-
this.
|
|
413
|
+
this.renderRoot?.querySelector(`[data-node-id="${M(e)}"]`)?.focus({ preventScroll: !1 });
|
|
417
414
|
});
|
|
418
415
|
}
|
|
419
416
|
toggleSelection(e, t) {
|
|
@@ -488,11 +485,12 @@ class U extends y {
|
|
|
488
485
|
);
|
|
489
486
|
}
|
|
490
487
|
}
|
|
491
|
-
function
|
|
488
|
+
function M(c) {
|
|
492
489
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(c) : c.replace(/["\\]/g, "\\$&");
|
|
493
490
|
}
|
|
494
|
-
|
|
491
|
+
C("treeview", R);
|
|
492
|
+
typeof customElements < "u" && !customElements.get("mp-treeview") && customElements.define("mp-treeview", L);
|
|
495
493
|
export {
|
|
496
|
-
|
|
497
|
-
|
|
494
|
+
L as M,
|
|
495
|
+
R as t
|
|
498
496
|
};
|
package/datatable/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { M as s, c as e, d as o, s as r } from "../chunks/mp-datatable-
|
|
1
|
+
import { M as s, c as e, d as o, s as r } from "../chunks/mp-datatable-UJI8E73X.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as MpDatatable,
|
|
4
4
|
e as computeNextSort,
|
|
5
|
-
o as
|
|
5
|
+
o as datatableLightStyles,
|
|
6
6
|
r as sortRows
|
|
7
7
|
};
|
|
@@ -37,7 +37,15 @@ export interface SelectionChangeEventDetail<T = unknown> {
|
|
|
37
37
|
* - Column resize via a 6px handle at the right edge of each header.
|
|
38
38
|
*/
|
|
39
39
|
export declare class MpDatatable extends LitElement {
|
|
40
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Light DOM. Consumer-authored row/cell/header content is mounted here by the
|
|
42
|
+
* render callbacks, and inside a shadow root the page's stylesheets — the
|
|
43
|
+
* consumer's own component CSS and Bootstrap's utilities alike — cannot reach
|
|
44
|
+
* it (issue #408). Rendering in the document tree is what makes that content
|
|
45
|
+
* style correctly; encapsulation is preserved by the build-time rescoping
|
|
46
|
+
* instead of by the boundary.
|
|
47
|
+
*/
|
|
48
|
+
protected createRenderRoot(): HTMLElement;
|
|
41
49
|
static get observedAttributes(): string[];
|
|
42
50
|
private readonly instanceId;
|
|
43
51
|
private _caption;
|
package/datatable/src/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export type { DatatableSelectionMode, RowEventDetail, SortChangeEventDetail, Sel
|
|
|
3
3
|
export type { DatatableColumnDef, CellContent, CellRenderer, HeaderRenderer, RowKey, RowRenderer, RowRenderContext, TreeIdKey, TreeSelectionStrategy, DatatableFetchRequest, DatatableFetchResponse, DatatableFetch, TreeRowExpandDetail, TreeExpandedIdsChangeDetail, } from './types';
|
|
4
4
|
export type { SortColumn, SortDirection } from './sort';
|
|
5
5
|
export { computeNextSort, sortRows } from './sort';
|
|
6
|
-
export {
|
|
6
|
+
export { datatableLightStyles } from './styles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { datatableLightStyles } from './datatable.light.styles';
|