@mintplayer/web-components 3.5.0 → 3.7.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/accordion/index.mjs +1 -0
- package/chunks/{datatable-wcZQMo-4.mjs → datatable-DDDM3nf1.mjs} +34 -28
- package/context-menu/index.mjs +25 -20
- package/context-menu/src/generated/mp-context-menu-panel.generated.d.ts +5 -4
- package/custom-elements.json +1158 -1158
- package/datatable/index.mjs +1 -1
- package/datatable/src/generated/mp-datatable.generated.d.ts +10 -0
- package/dropdown/index.mjs +13 -7
- package/dropdown/src/generated/mp-dropdown-panel.generated.d.ts +5 -4
- package/file-manager/index.mjs +1 -1
- package/machine/index.mjs +57 -57
- package/machine/src/core-controller.d.ts +5 -0
- package/package.json +2 -2
- package/popover/index.mjs +35 -30
- package/popover/src/generated/mp-popover-panel.generated.d.ts +5 -4
- package/progress-bar/index.mjs +2 -1
- package/tooltip/index.mjs +30 -25
- package/tooltip/src/generated/mp-tooltip-panel.generated.d.ts +5 -4
package/accordion/index.mjs
CHANGED
|
@@ -90,53 +90,53 @@ function x({ view: e, slots: t = {} }) {
|
|
|
90
90
|
` : c}
|
|
91
91
|
${e.panel ? s`
|
|
92
92
|
<div data-mps="datatable" ${i(e.panel)}>
|
|
93
|
-
${e.
|
|
94
|
-
<div data-mps="datatable" ${i(e.
|
|
93
|
+
${e.body && e.body.custom ? s`
|
|
94
|
+
<div data-mps="datatable" ${i(e.body.body)}>
|
|
95
95
|
${t.filter === void 0 ? c : b(t.filter, {
|
|
96
|
-
column: e.
|
|
97
|
-
ctx: e.
|
|
96
|
+
column: e.body.column,
|
|
97
|
+
ctx: e.body.ctx
|
|
98
98
|
})}
|
|
99
99
|
</div>
|
|
100
|
-
` : e.
|
|
101
|
-
<div data-mps="datatable" ${i(e.
|
|
102
|
-
<button data-mps="datatable" ${i(e.
|
|
103
|
-
${e.
|
|
104
|
-
<div data-mps="datatable" ${i(e.
|
|
105
|
-
<select data-mps="datatable" ${i(e.
|
|
106
|
-
${u(e.
|
|
100
|
+
` : e.body ? s`
|
|
101
|
+
<div data-mps="datatable" ${i(e.body.body)}>
|
|
102
|
+
<button data-mps="datatable" ${i(e.body.clear)}>${e.body.clearText}</button>
|
|
103
|
+
${e.body.comparison ? s`
|
|
104
|
+
<div data-mps="datatable" ${i(e.body.comparison.wrap)}>
|
|
105
|
+
<select data-mps="datatable" ${i(e.body.comparison.operator)}>
|
|
106
|
+
${u(e.body.comparison.operators, (e) => e.key, (e) => s`
|
|
107
107
|
<option data-mps="datatable" ${i(e.option)}>${e.text}</option>
|
|
108
108
|
`)}
|
|
109
109
|
</select>
|
|
110
|
-
<input data-mps="datatable" ${i(e.
|
|
110
|
+
<input data-mps="datatable" ${i(e.body.comparison.operand)} .value=${e.body.comparison.operandText}>
|
|
111
111
|
</div>
|
|
112
112
|
` : c}
|
|
113
|
-
${e.
|
|
114
|
-
<small data-mps="datatable" ${i(e.
|
|
113
|
+
${e.body.comparison && e.body.comparison.applied ? s`
|
|
114
|
+
<small data-mps="datatable" ${i(e.body.comparison.applied)}>${e.body.comparison.appliedText}</small>
|
|
115
115
|
` : c}
|
|
116
|
-
${e.
|
|
117
|
-
<input data-mps="datatable" ${i(e.
|
|
116
|
+
${e.body.list ? s`
|
|
117
|
+
<input data-mps="datatable" ${i(e.body.list.search)} .value=${e.body.list.term}>
|
|
118
118
|
` : c}
|
|
119
|
-
${e.
|
|
120
|
-
<button data-mps="datatable" ${i(e.
|
|
119
|
+
${e.body.list ? s`
|
|
120
|
+
<button data-mps="datatable" ${i(e.body.list.invert)}>${e.body.list.invertText}</button>
|
|
121
121
|
` : c}
|
|
122
|
-
${e.
|
|
123
|
-
<div data-mps="datatable" ${i(e.
|
|
124
|
-
${e.
|
|
125
|
-
<span data-mps="datatable" ${i(e.
|
|
122
|
+
${e.body.list ? s`
|
|
123
|
+
<div data-mps="datatable" ${i(e.body.list.group)}>
|
|
124
|
+
${e.body.list.loading ? s`
|
|
125
|
+
<span data-mps="datatable" ${i(e.body.list.loading)}>${e.body.list.loadingText}</span>
|
|
126
126
|
` : c}
|
|
127
|
-
${u(e.
|
|
127
|
+
${u(e.body.list.options, (e) => e.key, (e) => s`
|
|
128
128
|
<label data-mps="datatable" ${i(e.label)}>
|
|
129
129
|
<input data-mps="datatable" ${i(e.input)} .checked=${e.checked}>
|
|
130
130
|
<span data-mps="datatable">${e.text}</span>
|
|
131
131
|
</label>
|
|
132
132
|
`)}
|
|
133
|
-
${e.
|
|
134
|
-
<span data-mps="datatable" ${i(e.
|
|
133
|
+
${e.body.list.noValues ? s`
|
|
134
|
+
<span data-mps="datatable" ${i(e.body.list.noValues)}>${e.body.list.noValuesText}</span>
|
|
135
135
|
` : c}
|
|
136
136
|
</div>
|
|
137
137
|
` : c}
|
|
138
|
-
${e.
|
|
139
|
-
<span data-mps="datatable" ${i(e.
|
|
138
|
+
${e.body.list && e.body.list.hasMore ? s`
|
|
139
|
+
<span data-mps="datatable" ${i(e.body.list.hasMore)}>${e.body.list.hasMoreText}</span>
|
|
140
140
|
` : c}
|
|
141
141
|
</div>
|
|
142
142
|
` : c}
|
|
@@ -358,6 +358,11 @@ var S = class extends o {
|
|
|
358
358
|
hrefFor: { attribute: !1 },
|
|
359
359
|
distincts: { attribute: !1 },
|
|
360
360
|
filters: { attribute: !1 },
|
|
361
|
+
filtersReadonly: {
|
|
362
|
+
type: Boolean,
|
|
363
|
+
converter: n(!1),
|
|
364
|
+
attribute: "filters-readonly"
|
|
365
|
+
},
|
|
361
366
|
fetchParams: { attribute: !1 },
|
|
362
367
|
stateKey: {
|
|
363
368
|
type: String,
|
|
@@ -408,6 +413,7 @@ var S = class extends o {
|
|
|
408
413
|
hrefFor: this.hrefFor,
|
|
409
414
|
distincts: this.distincts,
|
|
410
415
|
filters: this.filters,
|
|
416
|
+
filtersReadonly: this.filtersReadonly,
|
|
411
417
|
fetchParams: this.fetchParams,
|
|
412
418
|
stateKey: this.stateKey
|
|
413
419
|
}),
|
|
@@ -429,7 +435,7 @@ var S = class extends o {
|
|
|
429
435
|
10,
|
|
430
436
|
20,
|
|
431
437
|
50
|
|
432
|
-
], this.pagination = !1, this.autoSort = !0, this.selectionMode = "none", this.selectedIds = [], this.cutIds = [], this.focusedRowKey = null, this.rowLabel = null, this.rowKey = null, this.tree = !1, this.idKey = null, this.childCountKey = null, this.treeIndent = 1.25, this.expandedIds = [], this.selectionStrategy = "flat", this.loading = !1, this.emptyMessage = "No data", this.virtualScroll = !1, this.itemSize = 40, this.virtualBuffer = 10, this.fill = !1, this.resizableColumns = !0, this.hrefFor = null, this.distincts = null, this.filters = {}, this.fetchParams = null, this.stateKey = null;
|
|
438
|
+
], this.pagination = !1, this.autoSort = !0, this.selectionMode = "none", this.selectedIds = [], this.cutIds = [], this.focusedRowKey = null, this.rowLabel = null, this.rowKey = null, this.tree = !1, this.idKey = null, this.childCountKey = null, this.treeIndent = 1.25, this.expandedIds = [], this.selectionStrategy = "flat", this.loading = !1, this.emptyMessage = "No data", this.virtualScroll = !1, this.itemSize = 40, this.virtualBuffer = 10, this.fill = !1, this.resizableColumns = !0, this.hrefFor = null, this.distincts = null, this.filters = {}, this.filtersReadonly = !1, this.fetchParams = null, this.stateKey = null;
|
|
433
439
|
}
|
|
434
440
|
createRenderRoot() {
|
|
435
441
|
return this;
|
package/context-menu/index.mjs
CHANGED
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
import { CoreController as e, LightChildren as t,
|
|
2
|
-
import { LitElement as
|
|
3
|
-
import { installLightStyles as
|
|
4
|
-
import { contextMenuCore as
|
|
1
|
+
import { CoreController as e, LightChildren as t, coreDirective as n, stringAttribute as r } from "../machine/index.mjs";
|
|
2
|
+
import { LitElement as i, html as a, nothing as o } from "lit";
|
|
3
|
+
import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
|
|
4
|
+
import { contextMenuCore as c, contextMenuPanelCore as l, contextMenuScopedStyles as u } from "@mintplayer/ui-core/context-menu";
|
|
5
5
|
//#region libs/mintplayer-web-components/context-menu/src/generated/context-menu-panel.view.generated.ts
|
|
6
|
-
function
|
|
7
|
-
return
|
|
8
|
-
${t.default === void 0 ?
|
|
6
|
+
function d({ root: e, slots: t = {} }) {
|
|
7
|
+
return a`
|
|
8
|
+
${t.default === void 0 ? o : t.default}
|
|
9
9
|
`;
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region libs/mintplayer-web-components/context-menu/src/generated/mp-context-menu-panel.generated.ts
|
|
13
|
-
var
|
|
13
|
+
var f = class extends i {
|
|
14
14
|
static {
|
|
15
15
|
this.properties = {
|
|
16
16
|
overlayId: {
|
|
17
17
|
type: String,
|
|
18
|
-
converter:
|
|
18
|
+
converter: r(""),
|
|
19
19
|
attribute: "overlay-id"
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
type:
|
|
23
|
-
converter:
|
|
21
|
+
phase: {
|
|
22
|
+
type: String,
|
|
23
|
+
converter: r("closed", [
|
|
24
|
+
"closed",
|
|
25
|
+
"entering",
|
|
26
|
+
"shown",
|
|
27
|
+
"leaving"
|
|
28
|
+
])
|
|
24
29
|
},
|
|
25
30
|
defaultRenderer: { attribute: !1 }
|
|
26
31
|
};
|
|
27
32
|
}
|
|
28
33
|
#e = new t(this);
|
|
29
|
-
#t = new e(this,
|
|
34
|
+
#t = new e(this, l, {
|
|
30
35
|
idPrefix: "mp-context-menu-panel",
|
|
31
36
|
inputs: () => ({
|
|
32
37
|
overlayId: this.overlayId,
|
|
33
|
-
|
|
38
|
+
phase: this.phase
|
|
34
39
|
}),
|
|
35
40
|
hostBag: (e) => ({
|
|
36
41
|
...e.root,
|
|
@@ -38,7 +43,7 @@ var p = class extends a {
|
|
|
38
43
|
})
|
|
39
44
|
});
|
|
40
45
|
constructor() {
|
|
41
|
-
super(), this.overlayId = "", this.
|
|
46
|
+
super(), this.overlayId = "", this.phase = "closed";
|
|
42
47
|
}
|
|
43
48
|
createRenderRoot() {
|
|
44
49
|
return this;
|
|
@@ -47,7 +52,7 @@ var p = class extends a {
|
|
|
47
52
|
this.#e.capture();
|
|
48
53
|
}
|
|
49
54
|
render() {
|
|
50
|
-
return
|
|
55
|
+
return d({
|
|
51
56
|
...this.#t.props(),
|
|
52
57
|
slots: {
|
|
53
58
|
...this.#e.slots,
|
|
@@ -58,8 +63,8 @@ var p = class extends a {
|
|
|
58
63
|
};
|
|
59
64
|
//#endregion
|
|
60
65
|
//#region libs/mintplayer-web-components/context-menu/src/generated/context-menu.directive.generated.ts
|
|
61
|
-
typeof document < "u" && document.head &&
|
|
62
|
-
var
|
|
66
|
+
typeof document < "u" && document.head && s("context-menu", u), customElements.get("mp-context-menu-panel") || customElements.define("mp-context-menu-panel", f), typeof document < "u" && document.head && s("context-menu", u);
|
|
67
|
+
var p = n(c, {
|
|
63
68
|
idPrefix: "mp-context-menu",
|
|
64
69
|
bag: (e) => e.anchor,
|
|
65
70
|
defaults: {
|
|
@@ -68,8 +73,8 @@ var m = r(l, {
|
|
|
68
73
|
},
|
|
69
74
|
overlay: (e, t) => {
|
|
70
75
|
let n = e.overlay;
|
|
71
|
-
return n ?
|
|
76
|
+
return n ? a`<mp-context-menu-panel .overlayId=${n.overlayId} .phase=${n.phase} .defaultRenderer=${t ?? null}></mp-context-menu-panel>` : null;
|
|
72
77
|
}
|
|
73
78
|
});
|
|
74
79
|
//#endregion
|
|
75
|
-
export {
|
|
80
|
+
export { f as MpContextMenuPanel, p as bsContextMenu };
|
|
@@ -12,10 +12,10 @@ export declare class MpContextMenuPanel extends LitElement {
|
|
|
12
12
|
};
|
|
13
13
|
attribute: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
type:
|
|
15
|
+
phase: {
|
|
16
|
+
type: StringConstructor;
|
|
17
17
|
converter: {
|
|
18
|
-
fromAttribute: (value: string | null) =>
|
|
18
|
+
fromAttribute: (value: string | null) => string;
|
|
19
19
|
toAttribute: (value: unknown) => string | null;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -25,7 +25,8 @@ export declare class MpContextMenuPanel extends LitElement {
|
|
|
25
25
|
};
|
|
26
26
|
/** The panel's id. */
|
|
27
27
|
overlayId: ContextMenuPanelInputs['overlayId'];
|
|
28
|
-
|
|
28
|
+
/** The overlay phase: `.show` while shown, `hidden` while closed (#465). */
|
|
29
|
+
phase: ContextMenuPanelInputs['phase'];
|
|
29
30
|
/** Renders the default slot; wins over slot="default" children. */
|
|
30
31
|
defaultRenderer: (() => unknown) | null | undefined;
|
|
31
32
|
constructor();
|