@mintplayer/vue-bootstrap 3.29.0 → 3.31.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/chunks/{BsDatatable.generated-CLyz-zYI.mjs → BsDatatable.generated-87kABKmn.mjs} +30 -8
- package/datatable/index.mjs +1 -1
- package/datatable/src/generated/BsDatatable.generated.vue.d.ts +40 -9
- package/datatable/src/index.d.ts +1 -1
- package/file-manager/index.mjs +1 -1
- package/file-manager/src/generated/BsFileManager.generated.vue.d.ts +1 -1
- package/machine/index.mjs +49 -29
- package/machine/src/index.d.ts +1 -0
- package/machine/src/transfer-state.d.ts +27 -0
- package/package.json +2 -2
- package/treeview/src/generated/BsTreeview.generated.vue.d.ts +1 -1
|
@@ -93,16 +93,20 @@ var S = [".indeterminate"], C = ["href"], w = [".value"], T = [".value"], E = ["
|
|
|
93
93
|
"data-mps": "datatable",
|
|
94
94
|
key: e.key
|
|
95
95
|
}, { ref_for: !0 }, e.option), h(e.text), 17))), 128))], 16), a("input", u({ "data-mps": "datatable" }, { ref_for: !0 }, e.open.comparison.operand, { ".value": e.open.comparison.operandText }), null, 48, w)], 16)) : r("", !0),
|
|
96
|
-
e.open.
|
|
96
|
+
e.open.comparison && e.open.comparison.applied ? (f(), i("small", u({
|
|
97
97
|
key: 1,
|
|
98
98
|
"data-mps": "datatable"
|
|
99
|
+
}, { ref_for: !0 }, e.open.comparison.applied), h(e.open.comparison.appliedText), 17)) : r("", !0),
|
|
100
|
+
e.open.list ? (f(), i("input", u({
|
|
101
|
+
key: 2,
|
|
102
|
+
"data-mps": "datatable"
|
|
99
103
|
}, { ref_for: !0 }, e.open.list.search, { ".value": e.open.list.term }), null, 48, T)) : r("", !0),
|
|
100
104
|
e.open.list ? (f(), i("button", u({
|
|
101
|
-
key:
|
|
105
|
+
key: 3,
|
|
102
106
|
"data-mps": "datatable"
|
|
103
107
|
}, { ref_for: !0 }, e.open.list.invert), h(e.open.list.invertText), 17)) : r("", !0),
|
|
104
108
|
e.open.list ? (f(), i("div", u({
|
|
105
|
-
key:
|
|
109
|
+
key: 4,
|
|
106
110
|
"data-mps": "datatable"
|
|
107
111
|
}, { ref_for: !0 }, e.open.list.group), [
|
|
108
112
|
e.open.list.loading ? (f(), i("span", u({
|
|
@@ -119,7 +123,7 @@ var S = [".indeterminate"], C = ["href"], w = [".value"], T = [".value"], E = ["
|
|
|
119
123
|
}, { ref_for: !0 }, e.open.list.noValues), h(e.open.list.noValuesText), 17)) : r("", !0)
|
|
120
124
|
], 16)) : r("", !0),
|
|
121
125
|
e.open.list && e.open.list.hasMore ? (f(), i("span", u({
|
|
122
|
-
key:
|
|
126
|
+
key: 5,
|
|
123
127
|
"data-mps": "datatable"
|
|
124
128
|
}, { ref_for: !0 }, e.open.list.hasMore), h(e.open.list.hasMoreText), 17)) : r("", !0)
|
|
125
129
|
], 16)) : r("", !0)], 16)) : r("", !0)], 16))), 128))
|
|
@@ -344,6 +348,18 @@ var S = [".indeterminate"], C = ["href"], w = [".value"], T = [".value"], E = ["
|
|
|
344
348
|
distincts: {
|
|
345
349
|
type: null,
|
|
346
350
|
default: null
|
|
351
|
+
},
|
|
352
|
+
filters: {
|
|
353
|
+
type: null,
|
|
354
|
+
default: {}
|
|
355
|
+
},
|
|
356
|
+
fetchParams: {
|
|
357
|
+
type: null,
|
|
358
|
+
default: null
|
|
359
|
+
},
|
|
360
|
+
stateKey: {
|
|
361
|
+
type: String,
|
|
362
|
+
default: null
|
|
347
363
|
}
|
|
348
364
|
},
|
|
349
365
|
emits: [
|
|
@@ -359,12 +375,14 @@ var S = [".indeterminate"], C = ["href"], w = [".value"], T = [".value"], E = ["
|
|
|
359
375
|
"rowexpand",
|
|
360
376
|
"rowcollapse",
|
|
361
377
|
"loaderror",
|
|
362
|
-
"
|
|
378
|
+
"pageload",
|
|
379
|
+
"filterschange",
|
|
363
380
|
"update:sortColumns",
|
|
364
381
|
"update:page",
|
|
365
382
|
"update:perPage",
|
|
366
383
|
"update:selectedIds",
|
|
367
|
-
"update:expandedIds"
|
|
384
|
+
"update:expandedIds",
|
|
385
|
+
"update:filters"
|
|
368
386
|
],
|
|
369
387
|
setup(t, { expose: r, emit: i }) {
|
|
370
388
|
let a = t, s = i;
|
|
@@ -402,7 +420,10 @@ var S = [".indeterminate"], C = ["href"], w = [".value"], T = [".value"], E = ["
|
|
|
402
420
|
fill: a.fill,
|
|
403
421
|
resizableColumns: a.resizableColumns,
|
|
404
422
|
hrefFor: a.hrefFor,
|
|
405
|
-
distincts: a.distincts
|
|
423
|
+
distincts: a.distincts,
|
|
424
|
+
filters: a.filters,
|
|
425
|
+
fetchParams: a.fetchParams,
|
|
426
|
+
stateKey: a.stateKey
|
|
406
427
|
}), {
|
|
407
428
|
idPrefix: "bs-datatable",
|
|
408
429
|
root: () => c.value?.$el,
|
|
@@ -412,7 +433,8 @@ var S = [".indeterminate"], C = ["href"], w = [".value"], T = [".value"], E = ["
|
|
|
412
433
|
"page",
|
|
413
434
|
"perPage",
|
|
414
435
|
"selectedIds",
|
|
415
|
-
"expandedIds"
|
|
436
|
+
"expandedIds",
|
|
437
|
+
"filters"
|
|
416
438
|
]
|
|
417
439
|
}), h = p.props;
|
|
418
440
|
return r({ reload: (...e) => p.call("reload", e) }), (e, t) => (f(), n(A, u({
|
package/datatable/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as e } from "../chunks/BsDatatable.generated-
|
|
1
|
+
import { t as e } from "../chunks/BsDatatable.generated-87kABKmn.mjs";
|
|
2
2
|
import { DEFAULT_DATATABLE_LABELS as t, cellText as n, computeNextSort as r, sortRows as i } from "@mintplayer/ui-core/datatable";
|
|
3
3
|
export { e as BsDatatable, t as DEFAULT_DATATABLE_LABELS, n as cellText, r as computeNextSort, i as sortRows };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPublicInstance, PropType } from 'vue';
|
|
2
|
-
import { DatatableInputs, DatatableLoadErrorDetail, DatatableMethods,
|
|
2
|
+
import { DatatableInputs, DatatableLoadErrorDetail, DatatableMethods, DatatablePageLoadDetail, RowEventDetail, SelectionChangeEventDetail, SortColumn, TreeRowExpandDetail } from '@mintplayer/ui-core/datatable';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
attrs: Partial<{}>;
|
|
5
5
|
slots: {
|
|
@@ -242,6 +242,18 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
242
242
|
type: PropType<DatatableInputs["distincts"]>;
|
|
243
243
|
default: null;
|
|
244
244
|
};
|
|
245
|
+
filters: {
|
|
246
|
+
type: PropType<DatatableInputs["filters"]>;
|
|
247
|
+
default: {};
|
|
248
|
+
};
|
|
249
|
+
fetchParams: {
|
|
250
|
+
type: PropType<DatatableInputs["fetchParams"]>;
|
|
251
|
+
default: null;
|
|
252
|
+
};
|
|
253
|
+
stateKey: {
|
|
254
|
+
type: PropType<DatatableInputs["stateKey"]>;
|
|
255
|
+
default: null;
|
|
256
|
+
};
|
|
245
257
|
}>, {
|
|
246
258
|
/** Re-query `fetch` for the current sort, page and page size; `{ resetPage: true }` also returns to page 1. */
|
|
247
259
|
reload: (options?: import('@mintplayer/ui-core/datatable').DatatableReloadOptions | undefined) => ReturnType<DatatableMethods["reload"]>;
|
|
@@ -258,12 +270,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
258
270
|
rowexpand: (detail: TreeRowExpandDetail<unknown>) => any;
|
|
259
271
|
rowcollapse: (detail: TreeRowExpandDetail<unknown>) => any;
|
|
260
272
|
loaderror: (detail: DatatableLoadErrorDetail) => any;
|
|
261
|
-
|
|
273
|
+
pageload: (detail: DatatablePageLoadDetail<unknown, import('@mintplayer/ui-core/transfer-state').JsonValue>) => any;
|
|
274
|
+
filterschange: (detail: Readonly<Record<string, import('@mintplayer/ui-core/datatable').DatatableFilter>>) => any;
|
|
262
275
|
"update:sortColumns": (value: SortColumn[]) => any;
|
|
263
276
|
"update:page": (value: number) => any;
|
|
264
277
|
"update:perPage": (value: number) => any;
|
|
265
278
|
"update:selectedIds": (value: string[]) => any;
|
|
266
279
|
"update:expandedIds": (value: unknown[]) => any;
|
|
280
|
+
"update:filters": (value: Readonly<Record<string, import('@mintplayer/ui-core/datatable').DatatableFilter>> | null) => any;
|
|
267
281
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
268
282
|
columns: {
|
|
269
283
|
type: PropType<DatatableInputs["columns"]>;
|
|
@@ -397,6 +411,18 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
397
411
|
type: PropType<DatatableInputs["distincts"]>;
|
|
398
412
|
default: null;
|
|
399
413
|
};
|
|
414
|
+
filters: {
|
|
415
|
+
type: PropType<DatatableInputs["filters"]>;
|
|
416
|
+
default: {};
|
|
417
|
+
};
|
|
418
|
+
fetchParams: {
|
|
419
|
+
type: PropType<DatatableInputs["fetchParams"]>;
|
|
420
|
+
default: null;
|
|
421
|
+
};
|
|
422
|
+
stateKey: {
|
|
423
|
+
type: PropType<DatatableInputs["stateKey"]>;
|
|
424
|
+
default: null;
|
|
425
|
+
};
|
|
400
426
|
}>> & Readonly<{
|
|
401
427
|
onSortcolumnschange?: ((detail: SortColumn[]) => any) | undefined;
|
|
402
428
|
onPagechange?: ((detail: number) => any) | undefined;
|
|
@@ -410,30 +436,36 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
410
436
|
onRowexpand?: ((detail: TreeRowExpandDetail<unknown>) => any) | undefined;
|
|
411
437
|
onRowcollapse?: ((detail: TreeRowExpandDetail<unknown>) => any) | undefined;
|
|
412
438
|
onLoaderror?: ((detail: DatatableLoadErrorDetail) => any) | undefined;
|
|
413
|
-
|
|
439
|
+
onPageload?: ((detail: DatatablePageLoadDetail<unknown, import('@mintplayer/ui-core/transfer-state').JsonValue>) => any) | undefined;
|
|
440
|
+
onFilterschange?: ((detail: Readonly<Record<string, import('@mintplayer/ui-core/datatable').DatatableFilter>>) => any) | undefined;
|
|
414
441
|
"onUpdate:sortColumns"?: ((value: SortColumn[]) => any) | undefined;
|
|
415
442
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
416
443
|
"onUpdate:perPage"?: ((value: number) => any) | undefined;
|
|
417
444
|
"onUpdate:selectedIds"?: ((value: string[]) => any) | undefined;
|
|
418
445
|
"onUpdate:expandedIds"?: ((value: unknown[]) => any) | undefined;
|
|
446
|
+
"onUpdate:filters"?: ((value: Readonly<Record<string, import('@mintplayer/ui-core/datatable').DatatableFilter>> | null) => any) | undefined;
|
|
419
447
|
}>, {
|
|
420
448
|
caption: string | null;
|
|
421
449
|
data: unknown[];
|
|
422
|
-
fetch: import('@mintplayer/ui-core/datatable').DatatableFetch | null;
|
|
450
|
+
fetch: import('@mintplayer/ui-core/datatable').DatatableFetch<any, any> | null;
|
|
423
451
|
fill: boolean;
|
|
424
452
|
labels: Partial<import('@mintplayer/ui-core/datatable').DatatableLabels> | null;
|
|
425
453
|
inputLabel: string | null;
|
|
426
454
|
loading: boolean;
|
|
427
455
|
tree: boolean;
|
|
428
456
|
page: number;
|
|
457
|
+
perPage: number;
|
|
458
|
+
sortColumns: SortColumn[];
|
|
459
|
+
filters: Readonly<Record<string, import('@mintplayer/ui-core/datatable').DatatableFilter>> | null;
|
|
429
460
|
pagination: boolean;
|
|
461
|
+
selectedIds: string[];
|
|
462
|
+
expandedIds: unknown[];
|
|
430
463
|
columns: import('@mintplayer/ui-core/datatable').DatatableColumnDef<unknown>[];
|
|
431
|
-
|
|
432
|
-
|
|
464
|
+
fetchParams: import('@mintplayer/ui-core/transfer-state').JsonValue;
|
|
465
|
+
stateKey: string | null;
|
|
433
466
|
perPageOptions: number[];
|
|
434
467
|
autoSort: boolean;
|
|
435
468
|
selectionMode: import('@mintplayer/ui-core/datatable').DatatableSelectionMode;
|
|
436
|
-
selectedIds: string[];
|
|
437
469
|
cutIds: string[];
|
|
438
470
|
focusedRowKey: string | null;
|
|
439
471
|
rowLabel: ((row: unknown) => string) | null;
|
|
@@ -441,7 +473,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
441
473
|
idKey: import('@mintplayer/ui-core/datatable').TreeIdKey | null;
|
|
442
474
|
childCountKey: string | null;
|
|
443
475
|
treeIndent: number;
|
|
444
|
-
expandedIds: unknown[];
|
|
445
476
|
selectionStrategy: import('@mintplayer/ui-core/datatable').TreeSelectionStrategy;
|
|
446
477
|
emptyMessage: string;
|
|
447
478
|
virtualScroll: boolean;
|
|
@@ -449,7 +480,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
449
480
|
virtualBuffer: number;
|
|
450
481
|
resizableColumns: boolean;
|
|
451
482
|
hrefFor: import('@mintplayer/ui-core/datatable').DatatableHrefFor | null;
|
|
452
|
-
distincts: import('@mintplayer/ui-core/datatable').
|
|
483
|
+
distincts: ((request: import('@mintplayer/ui-core/datatable').DistinctsRequest<any>) => Promise<import('@mintplayer/ui-core/datatable').DistinctValues | null>) | null;
|
|
453
484
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
454
485
|
template: ({
|
|
455
486
|
$: import('vue').ComponentInternalInstance;
|
package/datatable/src/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from './generated';
|
|
2
2
|
export { DEFAULT_DATATABLE_LABELS, cellText, computeNextSort, sortRows } from '@mintplayer/ui-core/datatable';
|
|
3
|
-
export type {
|
|
3
|
+
export type { DatatableFilter, DatatableColumnDef, DatatableDistincts, DatatableFetch, DatatableFetchRequest, DatatableFetchResponse, DatatableHrefFor, DatatableHrefState, DatatableLabels, DatatableLoadErrorDetail, DatatableReloadOptions, DatatableSelectionMode, DistinctValue, DistinctValues, DistinctsRequest, DatatableFilters, FilterContext, FilterInputType, FilterMode, FilterOperator, FilterSelection, RowEventDetail, RowKey, RowRenderContext, SelectionChangeEventDetail, SortColumn, SortDirection, TreeIdKey, TreeRowExpandDetail, TreeSelectionStrategy, } from '@mintplayer/ui-core/datatable';
|
package/file-manager/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCore as e } from "../machine/index.mjs";
|
|
2
|
-
import { t } from "../chunks/BsDatatable.generated-
|
|
2
|
+
import { t } from "../chunks/BsDatatable.generated-87kABKmn.mjs";
|
|
3
3
|
import { n, t as r } from "../chunks/BsSplitterPanel.generated-B84cMuMJ.mjs";
|
|
4
4
|
import { t as i } from "../chunks/BsTreeview.generated-Rf47miZv.mjs";
|
|
5
5
|
import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeProps as p, openBlock as m, renderList as h, toDisplayString as g, unref as _, useTemplateRef as v, withCtx as y } from "vue";
|
|
@@ -179,8 +179,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
179
179
|
"onUpdate:pending"?: ((value: Readonly<Record<string, OperationKind>>) => any) | undefined;
|
|
180
180
|
}>, {
|
|
181
181
|
loadChildren: import('@mintplayer/ui-core/file-manager').FileManagerChildrenLoader | null | undefined;
|
|
182
|
-
selectionMode: import('@mintplayer/ui-core/file-manager').FileManagerSelectionMode;
|
|
183
182
|
selectedIds: readonly string[];
|
|
183
|
+
selectionMode: import('@mintplayer/ui-core/file-manager').FileManagerSelectionMode;
|
|
184
184
|
nodes: readonly import('@mintplayer/ui-core/file-manager').FileSystemNode[];
|
|
185
185
|
iconResolver: import('@mintplayer/ui-core/file-manager').FileManagerIconResolver | null | undefined;
|
|
186
186
|
pending: Readonly<Record<string, OperationKind>>;
|
package/machine/index.mjs
CHANGED
|
@@ -1,66 +1,86 @@
|
|
|
1
1
|
import { n as e, t } from "../chunks/useMachine-DLZ7g_H3.mjs";
|
|
2
2
|
import { n, t as r } from "../chunks/vue-props-NyhME1Ba.mjs";
|
|
3
|
-
import { Comment as i, Text as a, camelize as o, computed as s, inject as c, onBeforeUnmount as l, onMounted as u,
|
|
4
|
-
import { coreRuntime as
|
|
3
|
+
import { Comment as i, Text as a, camelize as o, computed as s, inject as c, onBeforeUnmount as l, onMounted as u, onServerPrefetch as d, provide as f, shallowRef as p, toRaw as m, useAttrs as h, useId as g, useSlots as _, watch as v } from "vue";
|
|
4
|
+
import { coreRuntime as y, sameContent as b } from "@mintplayer/ui-core/component";
|
|
5
|
+
import { DEFAULT_PREFETCH_TIMEOUT as x, readTransferState as S, runPrefetch as C } from "@mintplayer/ui-core/transfer-state";
|
|
6
|
+
//#region libs/mintplayer-vue-bootstrap/machine/src/transfer-state.ts
|
|
7
|
+
var w = Symbol("mp-ssr");
|
|
8
|
+
function T(e = {}) {
|
|
9
|
+
return { install(t) {
|
|
10
|
+
t.provide(w, {
|
|
11
|
+
store: e.store ?? S(),
|
|
12
|
+
server: e.server ?? typeof window > "u",
|
|
13
|
+
prefetchTimeout: e.prefetchTimeout ?? x
|
|
14
|
+
});
|
|
15
|
+
} };
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
5
18
|
//#region libs/mintplayer-vue-bootstrap/machine/src/core.ts
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
let t =
|
|
9
|
-
return t || (t = Symbol(e.name),
|
|
19
|
+
var E = /* @__PURE__ */ new WeakMap();
|
|
20
|
+
function D(e) {
|
|
21
|
+
let t = E.get(e);
|
|
22
|
+
return t || (t = Symbol(e.name), E.set(e, t)), t;
|
|
10
23
|
}
|
|
11
|
-
function
|
|
12
|
-
let r = () => Object.fromEntries(Object.entries(t()).map(([e, t]) => [e,
|
|
24
|
+
function O(e, t, n) {
|
|
25
|
+
let r = () => Object.fromEntries(Object.entries(t()).map(([e, t]) => [e, m(t)])), i = `${n.idPrefix}-${g()}`, a = h(), o = e.consume ? c(D(e.consume), null) : null, _ = p(!1), b = e.transferKey ? c(w, null) : null, x = r(), S = b ? e.transferKey?.(x) : void 0, T = b && S && !b.server ? b.store.get(S) : void 0;
|
|
26
|
+
b && S && !b.server && b.store.remove(S);
|
|
27
|
+
let E = p(e.state ? e.state(x, T) : {});
|
|
28
|
+
b?.server && e.prefetch && e.state && d(async () => {
|
|
29
|
+
let t = r(), n = await C(e, t, { timeout: b.prefetchTimeout });
|
|
30
|
+
n && (b.store.set(n.key, n.seed), E.value = e.state(t, n.seed));
|
|
31
|
+
});
|
|
32
|
+
let O = s(() => ({
|
|
13
33
|
inputs: r(),
|
|
14
|
-
state:
|
|
34
|
+
state: E.value,
|
|
15
35
|
id: i,
|
|
16
|
-
hydrated:
|
|
36
|
+
hydrated: _.value,
|
|
17
37
|
context: o ? o.value : e.consume?.defaultValue,
|
|
18
38
|
label: a["aria-label"] ?? null,
|
|
19
|
-
api: () =>
|
|
39
|
+
api: () => k.api
|
|
20
40
|
}));
|
|
21
|
-
e.provides &&
|
|
22
|
-
let
|
|
41
|
+
e.provides && f(D(e.provides), s(() => e.provide?.(O.value)));
|
|
42
|
+
let k = y(e, {
|
|
23
43
|
inputs: r,
|
|
24
|
-
state: () =>
|
|
25
|
-
setState: (e) =>
|
|
44
|
+
state: () => E.value,
|
|
45
|
+
setState: (e) => E.value = e,
|
|
26
46
|
emit: (e, t) => n.emit(e, t),
|
|
27
47
|
models: n.models,
|
|
28
48
|
writeModel: (e, t) => n.emit(`update:${e}`, t)
|
|
29
49
|
});
|
|
30
50
|
return u(() => {
|
|
31
|
-
|
|
51
|
+
_.value = !0;
|
|
32
52
|
let e = n.root();
|
|
33
|
-
e &&
|
|
34
|
-
}), l(() =>
|
|
35
|
-
props: s(() => e.view(
|
|
36
|
-
call: (e, t) =>
|
|
53
|
+
e && k.attachTo(e);
|
|
54
|
+
}), l(() => k.dispose()), v(r, (e) => k.inputs(e)), {
|
|
55
|
+
props: s(() => e.view(O.value)),
|
|
56
|
+
call: (e, t) => k.call(e, t)
|
|
37
57
|
};
|
|
38
58
|
}
|
|
39
59
|
//#endregion
|
|
40
60
|
//#region libs/mintplayer-vue-bootstrap/machine/src/content.ts
|
|
41
|
-
function
|
|
61
|
+
function k(e) {
|
|
42
62
|
return Object.fromEntries(Object.entries(e.props ?? {}).map(([e, t]) => [o(e), t]));
|
|
43
63
|
}
|
|
44
|
-
function
|
|
64
|
+
function A(e) {
|
|
45
65
|
let t = e.children;
|
|
46
66
|
if (Array.isArray(t)) return t;
|
|
47
67
|
let n = t?.default;
|
|
48
68
|
return typeof n == "function" ? n() : [];
|
|
49
69
|
}
|
|
50
|
-
function
|
|
70
|
+
function j(e, t, n, r) {
|
|
51
71
|
e.forEach((e) => {
|
|
52
72
|
e && typeof e == "object" && e.type !== i && e.type !== a && (e.type === t.type ? r.push({
|
|
53
|
-
inputs:
|
|
73
|
+
inputs: k(e),
|
|
54
74
|
within: n
|
|
55
|
-
}) :
|
|
75
|
+
}) : j(A(e), t, t.within !== void 0 && e.type === t.within ? k(e) : n, r));
|
|
56
76
|
});
|
|
57
77
|
}
|
|
58
|
-
function
|
|
59
|
-
let t =
|
|
78
|
+
function M(e) {
|
|
79
|
+
let t = _(), n = [];
|
|
60
80
|
return () => {
|
|
61
81
|
let r = [];
|
|
62
|
-
return
|
|
82
|
+
return j(t.default?.() ?? [], e, null, r), b(n, r) || (n = r), n;
|
|
63
83
|
};
|
|
64
84
|
}
|
|
65
85
|
//#endregion
|
|
66
|
-
export {
|
|
86
|
+
export { w as MP_SSR, T as mpTransferState, M as useContent, O as useCore, t as useMachine, e as useSnapshot, D as vueCoreContextKey, r as vueProps, n as vueStyle };
|
package/machine/src/index.d.ts
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InjectionKey, Plugin } from 'vue';
|
|
2
|
+
import { TransferStore } from '@mintplayer/ui-core/transfer-state';
|
|
3
|
+
/** What `useCore` reads to prefetch on the server and seed on the client (#448). */
|
|
4
|
+
export interface MpSsrContext {
|
|
5
|
+
readonly store: TransferStore;
|
|
6
|
+
readonly server: boolean;
|
|
7
|
+
readonly prefetchTimeout: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const MP_SSR: InjectionKey<MpSsrContext>;
|
|
10
|
+
export interface MpTransferStateOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Server: a fresh store per request; after `renderToString`, write
|
|
13
|
+
* `serializeTransferState(store)` into the page head. Client: omit it, and
|
|
14
|
+
* the plugin reads the server's `#mp-state` script once.
|
|
15
|
+
*/
|
|
16
|
+
readonly store?: TransferStore;
|
|
17
|
+
/** Default: whether `window` is undefined. */
|
|
18
|
+
readonly server?: boolean;
|
|
19
|
+
/** How long the server waits for one component's prefetch, ms (#448 D6). Default 3000. */
|
|
20
|
+
readonly prefetchTimeout?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Turns on server prefetching and the hand-over to the client for the fronts
|
|
24
|
+
* of this app (a `fetch` datatable with a `stateKey`): `app.use(mpTransferState())`
|
|
25
|
+
* in the client entry, `app.use(mpTransferState({ store }))` per request on the server.
|
|
26
|
+
*/
|
|
27
|
+
export declare function mpTransferState(options?: MpTransferStateOptions): Plugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/vue-bootstrap",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.31.0",
|
|
4
4
|
"description": "Vue 3.5 Bootstrap components. Each sub-entry renders its own template over a framework-neutral core from @mintplayer/ui-core, with v-model on every two-way input, so it server-renders real HTML and defines no custom elements.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
190
|
"peerDependencies": {
|
|
191
|
-
"@mintplayer/ui-core": "^1.
|
|
191
|
+
"@mintplayer/ui-core": "^1.4.0",
|
|
192
192
|
"vue": "^3.5.0"
|
|
193
193
|
},
|
|
194
194
|
"dependencies": {
|
|
@@ -166,9 +166,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
166
166
|
labels: Partial<import('@mintplayer/ui-core/treeview').TreeviewLabels> | null | undefined;
|
|
167
167
|
inputLabel: string | null;
|
|
168
168
|
loadChildren: import('@mintplayer/ui-core/treeview').TreeChildrenLoader | null | undefined;
|
|
169
|
-
selectionMode: import('@mintplayer/ui-core/treeview').TreeviewSelectionMode;
|
|
170
169
|
selectedIds: readonly string[];
|
|
171
170
|
expandedIds: readonly string[];
|
|
171
|
+
selectionMode: import('@mintplayer/ui-core/treeview').TreeviewSelectionMode;
|
|
172
172
|
items: readonly import('@mintplayer/ui-core/tree').TreeNode[];
|
|
173
173
|
hideBorders: boolean;
|
|
174
174
|
iconResolver: import('@mintplayer/ui-core/treeview').IconResolver | null | undefined;
|