@bagelink/vue 0.0.331 → 0.0.335
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/components/MaterialIcon.vue.d.ts +4 -2
- package/dist/components/MaterialIcon.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts +22 -16
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/layout/Layout.vue.d.ts +8 -0
- package/dist/components/layout/Layout.vue.d.ts.map +1 -1
- package/dist/components/layout/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/components/layout/TabbedLayout.vue.d.ts +38 -0
- package/dist/components/layout/TabbedLayout.vue.d.ts.map +1 -0
- package/dist/components/layout/Tabs.vue.d.ts +24 -0
- package/dist/components/layout/Tabs.vue.d.ts.map +1 -0
- package/dist/components/layout/TabsBody.vue.d.ts +21 -0
- package/dist/components/layout/TabsBody.vue.d.ts.map +1 -0
- package/dist/components/layout/TabsNav.vue.d.ts +25 -0
- package/dist/components/layout/TabsNav.vue.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +4 -0
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/components/layout/tabsManager.d.ts +4 -0
- package/dist/components/layout/tabsManager.d.ts.map +1 -0
- package/dist/index.cjs +778 -2031
- package/dist/index.mjs +780 -2033
- package/dist/style.css +415 -499
- package/dist/types/index.d.ts +7 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/materialIcons.d.ts +1 -1
- package/dist/types/materialIcons.d.ts.map +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/MaterialIcon.vue +3 -2
- package/src/components/PageTitle.vue +10 -20
- package/src/components/form/BglField.vue +2 -2
- package/src/components/form/BglForm.vue +0 -1
- package/src/components/form/inputs/SelectInput.vue +128 -484
- package/src/components/index.ts +0 -2
- package/src/components/layout/Layout.vue +34 -13
- package/src/components/layout/SidebarMenu.vue +22 -22
- package/src/components/layout/TabbedLayout.vue +79 -0
- package/src/components/layout/Tabs.vue +19 -0
- package/src/components/layout/TabsBody.vue +15 -0
- package/src/components/layout/TabsNav.vue +48 -0
- package/src/components/layout/index.ts +4 -0
- package/src/components/layout/tabsManager.ts +18 -0
- package/src/styles/appearance.css +42 -0
- package/src/styles/layout.css +74 -12
- package/src/styles/mobilLayout.css +77 -17
- package/src/styles/text.css +153 -1
- package/src/types/index.ts +9 -1
- package/src/types/materialIcons.ts +1180 -1178
- package/src/utils/index.ts +0 -1
- package/src/components/ComboBox.vue +0 -171
- package/src/components/TabbedLayout.vue +0 -87
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ var __publicField2 = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
import { pushScopeId, popScopeId, defineComponent, nextTick, openBlock, createBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeStyle, withKeys, createElementVNode, Fragment as Fragment$1, createCommentVNode, mergeProps, withCtx, createVNode, ref, createApp, h as h$2, toDisplayString, inject, watch, onMounted, withModifiers, unref, renderList, resolveDynamicComponent, useCssVars, useSlots, computed, createTextVNode, onUnmounted, mergeModels, useModel, createSlots, Transition, isRef, reactive, provide, withDirectives,
|
|
7
|
+
import { pushScopeId, popScopeId, defineComponent, nextTick, openBlock, createBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeStyle, withKeys, createElementVNode, Fragment as Fragment$1, createCommentVNode, mergeProps, withCtx, createVNode, ref, createApp, h as h$2, toDisplayString, inject, watch, onMounted, withModifiers, unref, renderList, resolveDynamicComponent, useCssVars, useSlots, computed, createTextVNode, onUnmounted, mergeModels, useModel, createSlots, Transition, isRef, reactive, provide, withDirectives, vModelCheckbox, toRef, Teleport, render as render$e, onBeforeUpdate, vShow, getCurrentScope, onScopeDispose, vModelText, TransitionGroup, vModelDynamic, vModelRadio, resolveDirective } from "vue";
|
|
8
8
|
const sides = ["top", "right", "bottom", "left"];
|
|
9
9
|
const alignments = ["start", "end"];
|
|
10
10
|
const placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
@@ -260,7 +260,7 @@ const computePosition = async (reference, floating, config) => {
|
|
|
260
260
|
middlewareData
|
|
261
261
|
};
|
|
262
262
|
};
|
|
263
|
-
async function detectOverflow(
|
|
263
|
+
async function detectOverflow(state2, options) {
|
|
264
264
|
var _await$platform$isEle;
|
|
265
265
|
if (options === void 0) {
|
|
266
266
|
options = {};
|
|
@@ -272,14 +272,14 @@ async function detectOverflow(state, options) {
|
|
|
272
272
|
rects,
|
|
273
273
|
elements,
|
|
274
274
|
strategy
|
|
275
|
-
} =
|
|
275
|
+
} = state2;
|
|
276
276
|
const {
|
|
277
277
|
boundary = "clippingAncestors",
|
|
278
278
|
rootBoundary = "viewport",
|
|
279
279
|
elementContext = "floating",
|
|
280
280
|
altBoundary = false,
|
|
281
281
|
padding = 0
|
|
282
|
-
} = evaluate(options,
|
|
282
|
+
} = evaluate(options, state2);
|
|
283
283
|
const paddingObject = getPaddingObject(padding);
|
|
284
284
|
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
285
285
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
@@ -318,7 +318,7 @@ async function detectOverflow(state, options) {
|
|
|
318
318
|
const arrow = (options) => ({
|
|
319
319
|
name: "arrow",
|
|
320
320
|
options,
|
|
321
|
-
async fn(
|
|
321
|
+
async fn(state2) {
|
|
322
322
|
const {
|
|
323
323
|
x: x2,
|
|
324
324
|
y: y2,
|
|
@@ -327,11 +327,11 @@ const arrow = (options) => ({
|
|
|
327
327
|
platform: platform2,
|
|
328
328
|
elements,
|
|
329
329
|
middlewareData
|
|
330
|
-
} =
|
|
330
|
+
} = state2;
|
|
331
331
|
const {
|
|
332
332
|
element,
|
|
333
333
|
padding = 0
|
|
334
|
-
} = evaluate(options,
|
|
334
|
+
} = evaluate(options, state2) || {};
|
|
335
335
|
if (element == null) {
|
|
336
336
|
return {};
|
|
337
337
|
}
|
|
@@ -393,7 +393,7 @@ const autoPlacement = function(options) {
|
|
|
393
393
|
return {
|
|
394
394
|
name: "autoPlacement",
|
|
395
395
|
options,
|
|
396
|
-
async fn(
|
|
396
|
+
async fn(state2) {
|
|
397
397
|
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
|
398
398
|
const {
|
|
399
399
|
rects,
|
|
@@ -401,16 +401,16 @@ const autoPlacement = function(options) {
|
|
|
401
401
|
placement,
|
|
402
402
|
platform: platform2,
|
|
403
403
|
elements
|
|
404
|
-
} =
|
|
404
|
+
} = state2;
|
|
405
405
|
const {
|
|
406
406
|
crossAxis = false,
|
|
407
407
|
alignment,
|
|
408
408
|
allowedPlacements = placements,
|
|
409
409
|
autoAlignment = true,
|
|
410
410
|
...detectOverflowOptions
|
|
411
|
-
} = evaluate(options,
|
|
411
|
+
} = evaluate(options, state2);
|
|
412
412
|
const placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
413
|
-
const overflow = await detectOverflow(
|
|
413
|
+
const overflow = await detectOverflow(state2, detectOverflowOptions);
|
|
414
414
|
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
415
415
|
const currentPlacement = placements$1[currentIndex];
|
|
416
416
|
if (currentPlacement == null) {
|
|
@@ -480,7 +480,7 @@ const flip = function(options) {
|
|
|
480
480
|
return {
|
|
481
481
|
name: "flip",
|
|
482
482
|
options,
|
|
483
|
-
async fn(
|
|
483
|
+
async fn(state2) {
|
|
484
484
|
var _middlewareData$arrow, _middlewareData$flip;
|
|
485
485
|
const {
|
|
486
486
|
placement,
|
|
@@ -489,7 +489,7 @@ const flip = function(options) {
|
|
|
489
489
|
initialPlacement,
|
|
490
490
|
platform: platform2,
|
|
491
491
|
elements
|
|
492
|
-
} =
|
|
492
|
+
} = state2;
|
|
493
493
|
const {
|
|
494
494
|
mainAxis: checkMainAxis = true,
|
|
495
495
|
crossAxis: checkCrossAxis = true,
|
|
@@ -498,7 +498,7 @@ const flip = function(options) {
|
|
|
498
498
|
fallbackAxisSideDirection = "none",
|
|
499
499
|
flipAlignment = true,
|
|
500
500
|
...detectOverflowOptions
|
|
501
|
-
} = evaluate(options,
|
|
501
|
+
} = evaluate(options, state2);
|
|
502
502
|
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
503
503
|
return {};
|
|
504
504
|
}
|
|
@@ -510,7 +510,7 @@ const flip = function(options) {
|
|
|
510
510
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
511
511
|
}
|
|
512
512
|
const placements2 = [initialPlacement, ...fallbackPlacements];
|
|
513
|
-
const overflow = await detectOverflow(
|
|
513
|
+
const overflow = await detectOverflow(state2, detectOverflowOptions);
|
|
514
514
|
const overflows = [];
|
|
515
515
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
516
516
|
if (checkMainAxis) {
|
|
@@ -567,19 +567,19 @@ const flip = function(options) {
|
|
|
567
567
|
}
|
|
568
568
|
};
|
|
569
569
|
};
|
|
570
|
-
async function convertValueToCoords(
|
|
570
|
+
async function convertValueToCoords(state2, options) {
|
|
571
571
|
const {
|
|
572
572
|
placement,
|
|
573
573
|
platform: platform2,
|
|
574
574
|
elements
|
|
575
|
-
} =
|
|
575
|
+
} = state2;
|
|
576
576
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
577
577
|
const side = getSide$1(placement);
|
|
578
578
|
const alignment = getAlignment(placement);
|
|
579
579
|
const isVertical = getSideAxis(placement) === "y";
|
|
580
580
|
const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
|
|
581
581
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
582
|
-
const rawValue = evaluate(options,
|
|
582
|
+
const rawValue = evaluate(options, state2);
|
|
583
583
|
let {
|
|
584
584
|
mainAxis,
|
|
585
585
|
crossAxis,
|
|
@@ -612,15 +612,15 @@ const offset = function(options) {
|
|
|
612
612
|
return {
|
|
613
613
|
name: "offset",
|
|
614
614
|
options,
|
|
615
|
-
async fn(
|
|
615
|
+
async fn(state2) {
|
|
616
616
|
var _middlewareData$offse, _middlewareData$arrow;
|
|
617
617
|
const {
|
|
618
618
|
x: x2,
|
|
619
619
|
y: y2,
|
|
620
620
|
placement,
|
|
621
621
|
middlewareData
|
|
622
|
-
} =
|
|
623
|
-
const diffCoords = await convertValueToCoords(
|
|
622
|
+
} = state2;
|
|
623
|
+
const diffCoords = await convertValueToCoords(state2, options);
|
|
624
624
|
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
625
625
|
return {};
|
|
626
626
|
}
|
|
@@ -642,12 +642,12 @@ const shift$1 = function(options) {
|
|
|
642
642
|
return {
|
|
643
643
|
name: "shift",
|
|
644
644
|
options,
|
|
645
|
-
async fn(
|
|
645
|
+
async fn(state2) {
|
|
646
646
|
const {
|
|
647
647
|
x: x2,
|
|
648
648
|
y: y2,
|
|
649
649
|
placement
|
|
650
|
-
} =
|
|
650
|
+
} = state2;
|
|
651
651
|
const {
|
|
652
652
|
mainAxis: checkMainAxis = true,
|
|
653
653
|
crossAxis: checkCrossAxis = false,
|
|
@@ -664,12 +664,12 @@ const shift$1 = function(options) {
|
|
|
664
664
|
}
|
|
665
665
|
},
|
|
666
666
|
...detectOverflowOptions
|
|
667
|
-
} = evaluate(options,
|
|
667
|
+
} = evaluate(options, state2);
|
|
668
668
|
const coords = {
|
|
669
669
|
x: x2,
|
|
670
670
|
y: y2
|
|
671
671
|
};
|
|
672
|
-
const overflow = await detectOverflow(
|
|
672
|
+
const overflow = await detectOverflow(state2, detectOverflowOptions);
|
|
673
673
|
const crossAxis = getSideAxis(getSide$1(placement));
|
|
674
674
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
675
675
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -689,7 +689,7 @@ const shift$1 = function(options) {
|
|
|
689
689
|
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
690
690
|
}
|
|
691
691
|
const limitedCoords = limiter.fn({
|
|
692
|
-
...
|
|
692
|
+
...state2,
|
|
693
693
|
[mainAxis]: mainAxisCoord,
|
|
694
694
|
[crossAxis]: crossAxisCoord
|
|
695
695
|
});
|
|
@@ -710,19 +710,19 @@ const size = function(options) {
|
|
|
710
710
|
return {
|
|
711
711
|
name: "size",
|
|
712
712
|
options,
|
|
713
|
-
async fn(
|
|
713
|
+
async fn(state2) {
|
|
714
714
|
const {
|
|
715
715
|
placement,
|
|
716
716
|
rects,
|
|
717
717
|
platform: platform2,
|
|
718
718
|
elements
|
|
719
|
-
} =
|
|
719
|
+
} = state2;
|
|
720
720
|
const {
|
|
721
721
|
apply: apply2 = () => {
|
|
722
722
|
},
|
|
723
723
|
...detectOverflowOptions
|
|
724
|
-
} = evaluate(options,
|
|
725
|
-
const overflow = await detectOverflow(
|
|
724
|
+
} = evaluate(options, state2);
|
|
725
|
+
const overflow = await detectOverflow(state2, detectOverflowOptions);
|
|
726
726
|
const side = getSide$1(placement);
|
|
727
727
|
const alignment = getAlignment(placement);
|
|
728
728
|
const isYAxis = getSideAxis(placement) === "y";
|
|
@@ -741,7 +741,7 @@ const size = function(options) {
|
|
|
741
741
|
}
|
|
742
742
|
const overflowAvailableHeight = height - overflow[heightSide];
|
|
743
743
|
const overflowAvailableWidth = width - overflow[widthSide];
|
|
744
|
-
const noShift = !
|
|
744
|
+
const noShift = !state2.middlewareData.shift;
|
|
745
745
|
let availableHeight = overflowAvailableHeight;
|
|
746
746
|
let availableWidth = overflowAvailableWidth;
|
|
747
747
|
if (isYAxis) {
|
|
@@ -763,7 +763,7 @@ const size = function(options) {
|
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
await apply2({
|
|
766
|
-
...
|
|
766
|
+
...state2,
|
|
767
767
|
availableWidth,
|
|
768
768
|
availableHeight
|
|
769
769
|
});
|
|
@@ -4017,7 +4017,7 @@ const adapters = {
|
|
|
4017
4017
|
}
|
|
4018
4018
|
if (!adapter) {
|
|
4019
4019
|
const reasons = Object.entries(rejectedReasons).map(
|
|
4020
|
-
([id,
|
|
4020
|
+
([id, state2]) => `adapter ${id} ` + (state2 === false ? "is not supported by the environment" : "is not available in the build")
|
|
4021
4021
|
);
|
|
4022
4022
|
let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
4023
4023
|
throw new AxiosError(
|
|
@@ -4878,7 +4878,7 @@ const ModalPlugin = {
|
|
|
4878
4878
|
const props2 = { ...modal.modalOptions, visible: true, "onUpdate:visible": () => hideModal(index2) };
|
|
4879
4879
|
if (modal.modalType === "modalForm")
|
|
4880
4880
|
return h$2(ModalForm, props2, modal.componentSlots);
|
|
4881
|
-
return h$2(_sfc_main$
|
|
4881
|
+
return h$2(_sfc_main$E, props2, modal.componentSlots);
|
|
4882
4882
|
});
|
|
4883
4883
|
}
|
|
4884
4884
|
});
|
|
@@ -4989,8 +4989,6 @@ function bindAttrs(attrs, fieldVal, row) {
|
|
|
4989
4989
|
key,
|
|
4990
4990
|
typeof value === "function" ? value(fieldVal, row) : value
|
|
4991
4991
|
]);
|
|
4992
|
-
if (attrs.options)
|
|
4993
|
-
console.log("arr", arr);
|
|
4994
4992
|
const resolvedAttrs = Object.fromEntries(arr);
|
|
4995
4993
|
return resolvedAttrs;
|
|
4996
4994
|
}
|
|
@@ -6968,19 +6966,19 @@ function dfa(nfa2) {
|
|
|
6968
6966
|
});
|
|
6969
6967
|
});
|
|
6970
6968
|
});
|
|
6971
|
-
let
|
|
6969
|
+
let state2 = labeled[states.join(",")] = new ContentMatch(states.indexOf(nfa2.length - 1) > -1);
|
|
6972
6970
|
for (let i2 = 0; i2 < out.length; i2++) {
|
|
6973
6971
|
let states2 = out[i2][1].sort(cmp);
|
|
6974
|
-
|
|
6972
|
+
state2.next.push({ type: out[i2][0], next: labeled[states2.join(",")] || explore(states2) });
|
|
6975
6973
|
}
|
|
6976
|
-
return
|
|
6974
|
+
return state2;
|
|
6977
6975
|
}
|
|
6978
6976
|
}
|
|
6979
6977
|
function checkForDeadEnds(match2, stream) {
|
|
6980
6978
|
for (let i2 = 0, work = [match2]; i2 < work.length; i2++) {
|
|
6981
|
-
let
|
|
6982
|
-
for (let j = 0; j <
|
|
6983
|
-
let { type: type3, next } =
|
|
6979
|
+
let state2 = work[i2], dead = !state2.validEnd, nodes2 = [];
|
|
6980
|
+
for (let j = 0; j < state2.next.length; j++) {
|
|
6981
|
+
let { type: type3, next } = state2.next[j];
|
|
6984
6982
|
nodes2.push(type3.name);
|
|
6985
6983
|
if (dead && !(type3.isText || type3.hasRequiredAttrs()))
|
|
6986
6984
|
dead = false;
|
|
@@ -10377,14 +10375,14 @@ class Transaction extends Transform {
|
|
|
10377
10375
|
/**
|
|
10378
10376
|
@internal
|
|
10379
10377
|
*/
|
|
10380
|
-
constructor(
|
|
10381
|
-
super(
|
|
10378
|
+
constructor(state2) {
|
|
10379
|
+
super(state2.doc);
|
|
10382
10380
|
this.curSelectionFor = 0;
|
|
10383
10381
|
this.updated = 0;
|
|
10384
10382
|
this.meta = /* @__PURE__ */ Object.create(null);
|
|
10385
10383
|
this.time = Date.now();
|
|
10386
|
-
this.curSelection =
|
|
10387
|
-
this.storedMarks =
|
|
10384
|
+
this.curSelection = state2.selection;
|
|
10385
|
+
this.storedMarks = state2.storedMarks;
|
|
10388
10386
|
}
|
|
10389
10387
|
/**
|
|
10390
10388
|
The transaction's current selection. This defaults to the editor
|
|
@@ -10591,8 +10589,8 @@ const baseFields = [
|
|
|
10591
10589
|
init(config) {
|
|
10592
10590
|
return config.storedMarks || null;
|
|
10593
10591
|
},
|
|
10594
|
-
apply(tr2, _marks, _old,
|
|
10595
|
-
return
|
|
10592
|
+
apply(tr2, _marks, _old, state2) {
|
|
10593
|
+
return state2.selection.$cursor ? tr2.storedMarks : null;
|
|
10596
10594
|
}
|
|
10597
10595
|
}),
|
|
10598
10596
|
new FieldDesc("scrollToSelection", {
|
|
@@ -10756,9 +10754,9 @@ class EditorState {
|
|
|
10756
10754
|
for (let prop3 in pluginFields) {
|
|
10757
10755
|
if (prop3 == "doc" || prop3 == "selection")
|
|
10758
10756
|
throw new RangeError("The JSON fields `doc` and `selection` are reserved");
|
|
10759
|
-
let plugin = pluginFields[prop3],
|
|
10760
|
-
if (
|
|
10761
|
-
result[prop3] =
|
|
10757
|
+
let plugin = pluginFields[prop3], state2 = plugin.spec.state;
|
|
10758
|
+
if (state2 && state2.toJSON)
|
|
10759
|
+
result[prop3] = state2.toJSON.call(plugin, this[plugin.key]);
|
|
10762
10760
|
}
|
|
10763
10761
|
return result;
|
|
10764
10762
|
}
|
|
@@ -10787,9 +10785,9 @@ class EditorState {
|
|
|
10787
10785
|
} else {
|
|
10788
10786
|
if (pluginFields)
|
|
10789
10787
|
for (let prop3 in pluginFields) {
|
|
10790
|
-
let plugin = pluginFields[prop3],
|
|
10791
|
-
if (plugin.key == field.name &&
|
|
10792
|
-
instance[field.name] =
|
|
10788
|
+
let plugin = pluginFields[prop3], state2 = plugin.spec.state;
|
|
10789
|
+
if (plugin.key == field.name && state2 && state2.fromJSON && Object.prototype.hasOwnProperty.call(json, prop3)) {
|
|
10790
|
+
instance[field.name] = state2.fromJSON.call(plugin, config, json[prop3], instance);
|
|
10793
10791
|
return;
|
|
10794
10792
|
}
|
|
10795
10793
|
}
|
|
@@ -10824,8 +10822,8 @@ class Plugin {
|
|
|
10824
10822
|
/**
|
|
10825
10823
|
Extract the plugin's state field from an editor state.
|
|
10826
10824
|
*/
|
|
10827
|
-
getState(
|
|
10828
|
-
return
|
|
10825
|
+
getState(state2) {
|
|
10826
|
+
return state2[this.key];
|
|
10829
10827
|
}
|
|
10830
10828
|
}
|
|
10831
10829
|
const keys$1 = /* @__PURE__ */ Object.create(null);
|
|
@@ -10846,14 +10844,14 @@ class PluginKey {
|
|
|
10846
10844
|
Get the active plugin with this key, if any, from an editor
|
|
10847
10845
|
state.
|
|
10848
10846
|
*/
|
|
10849
|
-
get(
|
|
10850
|
-
return
|
|
10847
|
+
get(state2) {
|
|
10848
|
+
return state2.config.pluginsByKey[this.key];
|
|
10851
10849
|
}
|
|
10852
10850
|
/**
|
|
10853
10851
|
Get the plugin's state from an editor state.
|
|
10854
10852
|
*/
|
|
10855
|
-
getState(
|
|
10856
|
-
return
|
|
10853
|
+
getState(state2) {
|
|
10854
|
+
return state2[this.key];
|
|
10857
10855
|
}
|
|
10858
10856
|
}
|
|
10859
10857
|
const domIndex = function(node) {
|
|
@@ -11339,25 +11337,25 @@ function flattenH(rect, top2) {
|
|
|
11339
11337
|
let y2 = top2 ? rect.top : rect.bottom;
|
|
11340
11338
|
return { top: y2, bottom: y2, left: rect.left, right: rect.right };
|
|
11341
11339
|
}
|
|
11342
|
-
function withFlushedState(view,
|
|
11340
|
+
function withFlushedState(view, state2, f2) {
|
|
11343
11341
|
let viewState = view.state, active = view.root.activeElement;
|
|
11344
|
-
if (viewState !=
|
|
11345
|
-
view.updateState(
|
|
11342
|
+
if (viewState != state2)
|
|
11343
|
+
view.updateState(state2);
|
|
11346
11344
|
if (active != view.dom)
|
|
11347
11345
|
view.focus();
|
|
11348
11346
|
try {
|
|
11349
11347
|
return f2();
|
|
11350
11348
|
} finally {
|
|
11351
|
-
if (viewState !=
|
|
11349
|
+
if (viewState != state2)
|
|
11352
11350
|
view.updateState(viewState);
|
|
11353
11351
|
if (active != view.dom && active)
|
|
11354
11352
|
active.focus();
|
|
11355
11353
|
}
|
|
11356
11354
|
}
|
|
11357
|
-
function endOfTextblockVertical(view,
|
|
11358
|
-
let sel =
|
|
11355
|
+
function endOfTextblockVertical(view, state2, dir) {
|
|
11356
|
+
let sel = state2.selection;
|
|
11359
11357
|
let $pos = dir == "up" ? sel.$from : sel.$to;
|
|
11360
|
-
return withFlushedState(view,
|
|
11358
|
+
return withFlushedState(view, state2, () => {
|
|
11361
11359
|
let { node: dom } = view.docView.domFromPos($pos.pos, dir == "up" ? -1 : 1);
|
|
11362
11360
|
for (; ; ) {
|
|
11363
11361
|
let nearest = view.docView.nearestDesc(dom, true);
|
|
@@ -11388,15 +11386,15 @@ function endOfTextblockVertical(view, state, dir) {
|
|
|
11388
11386
|
});
|
|
11389
11387
|
}
|
|
11390
11388
|
const maybeRTL = /[\u0590-\u08ac]/;
|
|
11391
|
-
function endOfTextblockHorizontal(view,
|
|
11392
|
-
let { $head } =
|
|
11389
|
+
function endOfTextblockHorizontal(view, state2, dir) {
|
|
11390
|
+
let { $head } = state2.selection;
|
|
11393
11391
|
if (!$head.parent.isTextblock)
|
|
11394
11392
|
return false;
|
|
11395
11393
|
let offset2 = $head.parentOffset, atStart = !offset2, atEnd = offset2 == $head.parent.content.size;
|
|
11396
11394
|
let sel = view.domSelection();
|
|
11397
11395
|
if (!maybeRTL.test($head.parent.textContent) || !sel.modify)
|
|
11398
11396
|
return dir == "left" || dir == "backward" ? atStart : atEnd;
|
|
11399
|
-
return withFlushedState(view,
|
|
11397
|
+
return withFlushedState(view, state2, () => {
|
|
11400
11398
|
let { focusNode: oldNode, focusOffset: oldOff, anchorNode, anchorOffset } = view.domSelectionRange();
|
|
11401
11399
|
let oldBidiLevel = sel.caretBidiLevel;
|
|
11402
11400
|
sel.modify("move", dir, "character");
|
|
@@ -11417,12 +11415,12 @@ function endOfTextblockHorizontal(view, state, dir) {
|
|
|
11417
11415
|
let cachedState = null;
|
|
11418
11416
|
let cachedDir = null;
|
|
11419
11417
|
let cachedResult = false;
|
|
11420
|
-
function endOfTextblock(view,
|
|
11421
|
-
if (cachedState ==
|
|
11418
|
+
function endOfTextblock(view, state2, dir) {
|
|
11419
|
+
if (cachedState == state2 && cachedDir == dir)
|
|
11422
11420
|
return cachedResult;
|
|
11423
|
-
cachedState =
|
|
11421
|
+
cachedState = state2;
|
|
11424
11422
|
cachedDir = dir;
|
|
11425
|
-
return cachedResult = dir == "up" || dir == "down" ? endOfTextblockVertical(view,
|
|
11423
|
+
return cachedResult = dir == "up" || dir == "down" ? endOfTextblockVertical(view, state2, dir) : endOfTextblockHorizontal(view, state2, dir);
|
|
11426
11424
|
}
|
|
11427
11425
|
const NOT_DIRTY = 0, CHILD_DIRTY = 1, CONTENT_DIRTY = 2, NODE_DIRTY = 3;
|
|
11428
11426
|
class ViewDesc {
|
|
@@ -12927,10 +12925,10 @@ function anchorInRightPlace(view) {
|
|
|
12927
12925
|
let domSel = view.domSelectionRange();
|
|
12928
12926
|
return isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset);
|
|
12929
12927
|
}
|
|
12930
|
-
function moveSelectionBlock(
|
|
12931
|
-
let { $anchor, $head } =
|
|
12928
|
+
function moveSelectionBlock(state2, dir) {
|
|
12929
|
+
let { $anchor, $head } = state2.selection;
|
|
12932
12930
|
let $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);
|
|
12933
|
-
let $start = !$side.parent.inlineContent ? $side : $side.depth ?
|
|
12931
|
+
let $start = !$side.parent.inlineContent ? $side : $side.depth ? state2.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;
|
|
12934
12932
|
return $start && Selection$1.findFrom($start, dir);
|
|
12935
12933
|
}
|
|
12936
12934
|
function apply(view, sel) {
|
|
@@ -13132,9 +13130,9 @@ function setSelFocus(view, node, offset2) {
|
|
|
13132
13130
|
sel.extend(node, offset2);
|
|
13133
13131
|
}
|
|
13134
13132
|
view.domObserver.setCurSelection();
|
|
13135
|
-
let { state } = view;
|
|
13133
|
+
let { state: state2 } = view;
|
|
13136
13134
|
setTimeout(() => {
|
|
13137
|
-
if (view.state ==
|
|
13135
|
+
if (view.state == state2)
|
|
13138
13136
|
selectionToDOM(view);
|
|
13139
13137
|
}, 50);
|
|
13140
13138
|
}
|
|
@@ -13199,9 +13197,9 @@ function stopNativeHorizontalDelete(view, dir) {
|
|
|
13199
13197
|
}
|
|
13200
13198
|
return false;
|
|
13201
13199
|
}
|
|
13202
|
-
function switchEditable(view, node,
|
|
13200
|
+
function switchEditable(view, node, state2) {
|
|
13203
13201
|
view.domObserver.stop();
|
|
13204
|
-
node.contentEditable =
|
|
13202
|
+
node.contentEditable = state2;
|
|
13205
13203
|
view.domObserver.start();
|
|
13206
13204
|
}
|
|
13207
13205
|
function safariDownArrowBug(view) {
|
|
@@ -13848,14 +13846,14 @@ const timeoutComposition = android ? 5e3 : -1;
|
|
|
13848
13846
|
editHandlers.compositionstart = editHandlers.compositionupdate = (view) => {
|
|
13849
13847
|
if (!view.composing) {
|
|
13850
13848
|
view.domObserver.flush();
|
|
13851
|
-
let { state } = view, $pos =
|
|
13852
|
-
if (
|
|
13849
|
+
let { state: state2 } = view, $pos = state2.selection.$from;
|
|
13850
|
+
if (state2.selection.empty && (state2.storedMarks || !$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some((m2) => m2.type.spec.inclusive === false))) {
|
|
13853
13851
|
view.markCursor = view.state.storedMarks || $pos.marks();
|
|
13854
13852
|
endComposition(view, true);
|
|
13855
13853
|
view.markCursor = null;
|
|
13856
13854
|
} else {
|
|
13857
13855
|
endComposition(view);
|
|
13858
|
-
if (gecko &&
|
|
13856
|
+
if (gecko && state2.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {
|
|
13859
13857
|
let sel = view.domSelectionRange();
|
|
13860
13858
|
for (let node = sel.focusNode, offset2 = sel.focusOffset; node && node.nodeType == 1 && offset2 != 0; ) {
|
|
13861
13859
|
let before = offset2 < 0 ? node.lastChild : node.childNodes[offset2 - 1];
|
|
@@ -15427,18 +15425,18 @@ class EditorView {
|
|
|
15427
15425
|
Update the editor's `state` prop, without touching any of the
|
|
15428
15426
|
other props.
|
|
15429
15427
|
*/
|
|
15430
|
-
updateState(
|
|
15431
|
-
this.updateStateInner(
|
|
15428
|
+
updateState(state2) {
|
|
15429
|
+
this.updateStateInner(state2, this._props);
|
|
15432
15430
|
}
|
|
15433
|
-
updateStateInner(
|
|
15431
|
+
updateStateInner(state2, prevProps) {
|
|
15434
15432
|
var _a2;
|
|
15435
15433
|
let prev = this.state, redraw = false, updateSel = false;
|
|
15436
|
-
if (
|
|
15434
|
+
if (state2.storedMarks && this.composing) {
|
|
15437
15435
|
clearComposition(this);
|
|
15438
15436
|
updateSel = true;
|
|
15439
15437
|
}
|
|
15440
|
-
this.state =
|
|
15441
|
-
let pluginsChanged = prev.plugins !=
|
|
15438
|
+
this.state = state2;
|
|
15439
|
+
let pluginsChanged = prev.plugins != state2.plugins || this._props.plugins != prevProps.plugins;
|
|
15442
15440
|
if (pluginsChanged || this._props.plugins != prevProps.plugins || this._props.nodeViews != prevProps.nodeViews) {
|
|
15443
15441
|
let nodeViews = buildNodeViews(this);
|
|
15444
15442
|
if (changedNodeViews(nodeViews, this.nodeViews)) {
|
|
@@ -15452,20 +15450,20 @@ class EditorView {
|
|
|
15452
15450
|
this.editable = getEditable(this);
|
|
15453
15451
|
updateCursorWrapper(this);
|
|
15454
15452
|
let innerDeco = viewDecorations(this), outerDeco = computeDocDeco(this);
|
|
15455
|
-
let scroll = prev.plugins !=
|
|
15456
|
-
let updateDoc = redraw || !this.docView.matchesNode(
|
|
15457
|
-
if (updateDoc || !
|
|
15453
|
+
let scroll = prev.plugins != state2.plugins && !prev.doc.eq(state2.doc) ? "reset" : state2.scrollToSelection > prev.scrollToSelection ? "to selection" : "preserve";
|
|
15454
|
+
let updateDoc = redraw || !this.docView.matchesNode(state2.doc, outerDeco, innerDeco);
|
|
15455
|
+
if (updateDoc || !state2.selection.eq(prev.selection))
|
|
15458
15456
|
updateSel = true;
|
|
15459
15457
|
let oldScrollPos = scroll == "preserve" && updateSel && this.dom.style.overflowAnchor == null && storeScrollPos(this);
|
|
15460
15458
|
if (updateSel) {
|
|
15461
15459
|
this.domObserver.stop();
|
|
15462
|
-
let forceSelUpdate = updateDoc && (ie$1 || chrome) && !this.composing && !prev.selection.empty && !
|
|
15460
|
+
let forceSelUpdate = updateDoc && (ie$1 || chrome) && !this.composing && !prev.selection.empty && !state2.selection.empty && selectionContextChanged(prev.selection, state2.selection);
|
|
15463
15461
|
if (updateDoc) {
|
|
15464
15462
|
let chromeKludge = chrome ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
15465
|
-
if (redraw || !this.docView.update(
|
|
15463
|
+
if (redraw || !this.docView.update(state2.doc, outerDeco, innerDeco, this)) {
|
|
15466
15464
|
this.docView.updateOuterDeco([]);
|
|
15467
15465
|
this.docView.destroy();
|
|
15468
|
-
this.docView = docViewDesc(
|
|
15466
|
+
this.docView = docViewDesc(state2.doc, outerDeco, innerDeco, this.dom, this);
|
|
15469
15467
|
}
|
|
15470
15468
|
if (chromeKludge && !this.trackWrites)
|
|
15471
15469
|
forceSelUpdate = true;
|
|
@@ -15473,13 +15471,13 @@ class EditorView {
|
|
|
15473
15471
|
if (forceSelUpdate || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && anchorInRightPlace(this))) {
|
|
15474
15472
|
selectionToDOM(this, forceSelUpdate);
|
|
15475
15473
|
} else {
|
|
15476
|
-
syncNodeSelection(this,
|
|
15474
|
+
syncNodeSelection(this, state2.selection);
|
|
15477
15475
|
this.domObserver.setCurSelection();
|
|
15478
15476
|
}
|
|
15479
15477
|
this.domObserver.start();
|
|
15480
15478
|
}
|
|
15481
15479
|
this.updatePluginViews(prev);
|
|
15482
|
-
if (((_a2 = this.dragging) === null || _a2 === void 0 ? void 0 : _a2.node) && !prev.doc.eq(
|
|
15480
|
+
if (((_a2 = this.dragging) === null || _a2 === void 0 ? void 0 : _a2.node) && !prev.doc.eq(state2.doc))
|
|
15483
15481
|
this.updateDraggedNode(this.dragging, prev);
|
|
15484
15482
|
if (scroll == "reset") {
|
|
15485
15483
|
this.dom.scrollTop = 0;
|
|
@@ -15689,8 +15687,8 @@ class EditorView {
|
|
|
15689
15687
|
to the view's current state by default, but it is possible to
|
|
15690
15688
|
pass a different state.
|
|
15691
15689
|
*/
|
|
15692
|
-
endOfTextblock(dir,
|
|
15693
|
-
return endOfTextblock(this,
|
|
15690
|
+
endOfTextblock(dir, state2) {
|
|
15691
|
+
return endOfTextblock(this, state2 || this.state, dir);
|
|
15694
15692
|
}
|
|
15695
15693
|
/**
|
|
15696
15694
|
Run the editor's paste logic with the given HTML string. The
|
|
@@ -16017,21 +16015,21 @@ function keydownHandler(bindings) {
|
|
|
16017
16015
|
return false;
|
|
16018
16016
|
};
|
|
16019
16017
|
}
|
|
16020
|
-
const deleteSelection = (
|
|
16021
|
-
if (
|
|
16018
|
+
const deleteSelection = (state2, dispatch) => {
|
|
16019
|
+
if (state2.selection.empty)
|
|
16022
16020
|
return false;
|
|
16023
16021
|
if (dispatch)
|
|
16024
|
-
dispatch(
|
|
16022
|
+
dispatch(state2.tr.deleteSelection().scrollIntoView());
|
|
16025
16023
|
return true;
|
|
16026
16024
|
};
|
|
16027
|
-
function atBlockStart(
|
|
16028
|
-
let { $cursor } =
|
|
16029
|
-
if (!$cursor || (view ? !view.endOfTextblock("backward",
|
|
16025
|
+
function atBlockStart(state2, view) {
|
|
16026
|
+
let { $cursor } = state2.selection;
|
|
16027
|
+
if (!$cursor || (view ? !view.endOfTextblock("backward", state2) : $cursor.parentOffset > 0))
|
|
16030
16028
|
return null;
|
|
16031
16029
|
return $cursor;
|
|
16032
16030
|
}
|
|
16033
|
-
const joinBackward = (
|
|
16034
|
-
let $cursor = atBlockStart(
|
|
16031
|
+
const joinBackward = (state2, dispatch, view) => {
|
|
16032
|
+
let $cursor = atBlockStart(state2, view);
|
|
16035
16033
|
if (!$cursor)
|
|
16036
16034
|
return false;
|
|
16037
16035
|
let $cut = findCutBefore($cursor);
|
|
@@ -16040,17 +16038,17 @@ const joinBackward = (state, dispatch, view) => {
|
|
|
16040
16038
|
if (target == null)
|
|
16041
16039
|
return false;
|
|
16042
16040
|
if (dispatch)
|
|
16043
|
-
dispatch(
|
|
16041
|
+
dispatch(state2.tr.lift(range2, target).scrollIntoView());
|
|
16044
16042
|
return true;
|
|
16045
16043
|
}
|
|
16046
16044
|
let before = $cut.nodeBefore;
|
|
16047
|
-
if (!before.type.spec.isolating && deleteBarrier(
|
|
16045
|
+
if (!before.type.spec.isolating && deleteBarrier(state2, $cut, dispatch))
|
|
16048
16046
|
return true;
|
|
16049
16047
|
if ($cursor.parent.content.size == 0 && (textblockAt(before, "end") || NodeSelection.isSelectable(before))) {
|
|
16050
|
-
let delStep = replaceStep(
|
|
16048
|
+
let delStep = replaceStep(state2.doc, $cursor.before(), $cursor.after(), Slice.empty);
|
|
16051
16049
|
if (delStep && delStep.slice.size < delStep.to - delStep.from) {
|
|
16052
16050
|
if (dispatch) {
|
|
16053
|
-
let tr2 =
|
|
16051
|
+
let tr2 = state2.tr.step(delStep);
|
|
16054
16052
|
tr2.setSelection(textblockAt(before, "end") ? Selection$1.findFrom(tr2.doc.resolve(tr2.mapping.map($cut.pos, -1)), -1) : NodeSelection.create(tr2.doc, $cut.pos - before.nodeSize));
|
|
16055
16053
|
dispatch(tr2.scrollIntoView());
|
|
16056
16054
|
}
|
|
@@ -16059,7 +16057,7 @@ const joinBackward = (state, dispatch, view) => {
|
|
|
16059
16057
|
}
|
|
16060
16058
|
if (before.isAtom && $cut.depth == $cursor.depth - 1) {
|
|
16061
16059
|
if (dispatch)
|
|
16062
|
-
dispatch(
|
|
16060
|
+
dispatch(state2.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView());
|
|
16063
16061
|
return true;
|
|
16064
16062
|
}
|
|
16065
16063
|
return false;
|
|
@@ -16073,12 +16071,12 @@ function textblockAt(node, side, only = false) {
|
|
|
16073
16071
|
}
|
|
16074
16072
|
return false;
|
|
16075
16073
|
}
|
|
16076
|
-
const selectNodeBackward = (
|
|
16077
|
-
let { $head, empty: empty2 } =
|
|
16074
|
+
const selectNodeBackward = (state2, dispatch, view) => {
|
|
16075
|
+
let { $head, empty: empty2 } = state2.selection, $cut = $head;
|
|
16078
16076
|
if (!empty2)
|
|
16079
16077
|
return false;
|
|
16080
16078
|
if ($head.parent.isTextblock) {
|
|
16081
|
-
if (view ? !view.endOfTextblock("backward",
|
|
16079
|
+
if (view ? !view.endOfTextblock("backward", state2) : $head.parentOffset > 0)
|
|
16082
16080
|
return false;
|
|
16083
16081
|
$cut = findCutBefore($head);
|
|
16084
16082
|
}
|
|
@@ -16086,7 +16084,7 @@ const selectNodeBackward = (state, dispatch, view) => {
|
|
|
16086
16084
|
if (!node || !NodeSelection.isSelectable(node))
|
|
16087
16085
|
return false;
|
|
16088
16086
|
if (dispatch)
|
|
16089
|
-
dispatch(
|
|
16087
|
+
dispatch(state2.tr.setSelection(NodeSelection.create(state2.doc, $cut.pos - node.nodeSize)).scrollIntoView());
|
|
16090
16088
|
return true;
|
|
16091
16089
|
};
|
|
16092
16090
|
function findCutBefore($pos) {
|
|
@@ -16099,27 +16097,27 @@ function findCutBefore($pos) {
|
|
|
16099
16097
|
}
|
|
16100
16098
|
return null;
|
|
16101
16099
|
}
|
|
16102
|
-
function atBlockEnd(
|
|
16103
|
-
let { $cursor } =
|
|
16104
|
-
if (!$cursor || (view ? !view.endOfTextblock("forward",
|
|
16100
|
+
function atBlockEnd(state2, view) {
|
|
16101
|
+
let { $cursor } = state2.selection;
|
|
16102
|
+
if (!$cursor || (view ? !view.endOfTextblock("forward", state2) : $cursor.parentOffset < $cursor.parent.content.size))
|
|
16105
16103
|
return null;
|
|
16106
16104
|
return $cursor;
|
|
16107
16105
|
}
|
|
16108
|
-
const joinForward = (
|
|
16109
|
-
let $cursor = atBlockEnd(
|
|
16106
|
+
const joinForward = (state2, dispatch, view) => {
|
|
16107
|
+
let $cursor = atBlockEnd(state2, view);
|
|
16110
16108
|
if (!$cursor)
|
|
16111
16109
|
return false;
|
|
16112
16110
|
let $cut = findCutAfter($cursor);
|
|
16113
16111
|
if (!$cut)
|
|
16114
16112
|
return false;
|
|
16115
16113
|
let after = $cut.nodeAfter;
|
|
16116
|
-
if (deleteBarrier(
|
|
16114
|
+
if (deleteBarrier(state2, $cut, dispatch))
|
|
16117
16115
|
return true;
|
|
16118
16116
|
if ($cursor.parent.content.size == 0 && (textblockAt(after, "start") || NodeSelection.isSelectable(after))) {
|
|
16119
|
-
let delStep = replaceStep(
|
|
16117
|
+
let delStep = replaceStep(state2.doc, $cursor.before(), $cursor.after(), Slice.empty);
|
|
16120
16118
|
if (delStep && delStep.slice.size < delStep.to - delStep.from) {
|
|
16121
16119
|
if (dispatch) {
|
|
16122
|
-
let tr2 =
|
|
16120
|
+
let tr2 = state2.tr.step(delStep);
|
|
16123
16121
|
tr2.setSelection(textblockAt(after, "start") ? Selection$1.findFrom(tr2.doc.resolve(tr2.mapping.map($cut.pos)), 1) : NodeSelection.create(tr2.doc, tr2.mapping.map($cut.pos)));
|
|
16124
16122
|
dispatch(tr2.scrollIntoView());
|
|
16125
16123
|
}
|
|
@@ -16128,17 +16126,17 @@ const joinForward = (state, dispatch, view) => {
|
|
|
16128
16126
|
}
|
|
16129
16127
|
if (after.isAtom && $cut.depth == $cursor.depth - 1) {
|
|
16130
16128
|
if (dispatch)
|
|
16131
|
-
dispatch(
|
|
16129
|
+
dispatch(state2.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView());
|
|
16132
16130
|
return true;
|
|
16133
16131
|
}
|
|
16134
16132
|
return false;
|
|
16135
16133
|
};
|
|
16136
|
-
const selectNodeForward = (
|
|
16137
|
-
let { $head, empty: empty2 } =
|
|
16134
|
+
const selectNodeForward = (state2, dispatch, view) => {
|
|
16135
|
+
let { $head, empty: empty2 } = state2.selection, $cut = $head;
|
|
16138
16136
|
if (!empty2)
|
|
16139
16137
|
return false;
|
|
16140
16138
|
if ($head.parent.isTextblock) {
|
|
16141
|
-
if (view ? !view.endOfTextblock("forward",
|
|
16139
|
+
if (view ? !view.endOfTextblock("forward", state2) : $head.parentOffset < $head.parent.content.size)
|
|
16142
16140
|
return false;
|
|
16143
16141
|
$cut = findCutAfter($head);
|
|
16144
16142
|
}
|
|
@@ -16146,7 +16144,7 @@ const selectNodeForward = (state, dispatch, view) => {
|
|
|
16146
16144
|
if (!node || !NodeSelection.isSelectable(node))
|
|
16147
16145
|
return false;
|
|
16148
16146
|
if (dispatch)
|
|
16149
|
-
dispatch(
|
|
16147
|
+
dispatch(state2.tr.setSelection(NodeSelection.create(state2.doc, $cut.pos)).scrollIntoView());
|
|
16150
16148
|
return true;
|
|
16151
16149
|
};
|
|
16152
16150
|
function findCutAfter($pos) {
|
|
@@ -16160,12 +16158,12 @@ function findCutAfter($pos) {
|
|
|
16160
16158
|
}
|
|
16161
16159
|
return null;
|
|
16162
16160
|
}
|
|
16163
|
-
const newlineInCode = (
|
|
16164
|
-
let { $head, $anchor } =
|
|
16161
|
+
const newlineInCode = (state2, dispatch) => {
|
|
16162
|
+
let { $head, $anchor } = state2.selection;
|
|
16165
16163
|
if (!$head.parent.type.spec.code || !$head.sameParent($anchor))
|
|
16166
16164
|
return false;
|
|
16167
16165
|
if (dispatch)
|
|
16168
|
-
dispatch(
|
|
16166
|
+
dispatch(state2.tr.insertText("\n").scrollIntoView());
|
|
16169
16167
|
return true;
|
|
16170
16168
|
};
|
|
16171
16169
|
function defaultBlockAt(match2) {
|
|
@@ -16176,22 +16174,22 @@ function defaultBlockAt(match2) {
|
|
|
16176
16174
|
}
|
|
16177
16175
|
return null;
|
|
16178
16176
|
}
|
|
16179
|
-
const exitCode = (
|
|
16180
|
-
let { $head, $anchor } =
|
|
16177
|
+
const exitCode = (state2, dispatch) => {
|
|
16178
|
+
let { $head, $anchor } = state2.selection;
|
|
16181
16179
|
if (!$head.parent.type.spec.code || !$head.sameParent($anchor))
|
|
16182
16180
|
return false;
|
|
16183
16181
|
let above = $head.node(-1), after = $head.indexAfter(-1), type3 = defaultBlockAt(above.contentMatchAt(after));
|
|
16184
16182
|
if (!type3 || !above.canReplaceWith(after, after, type3))
|
|
16185
16183
|
return false;
|
|
16186
16184
|
if (dispatch) {
|
|
16187
|
-
let pos = $head.after(), tr2 =
|
|
16185
|
+
let pos = $head.after(), tr2 = state2.tr.replaceWith(pos, pos, type3.createAndFill());
|
|
16188
16186
|
tr2.setSelection(Selection$1.near(tr2.doc.resolve(pos), 1));
|
|
16189
16187
|
dispatch(tr2.scrollIntoView());
|
|
16190
16188
|
}
|
|
16191
16189
|
return true;
|
|
16192
16190
|
};
|
|
16193
|
-
const createParagraphNear = (
|
|
16194
|
-
let sel =
|
|
16191
|
+
const createParagraphNear = (state2, dispatch) => {
|
|
16192
|
+
let sel = state2.selection, { $from, $to } = sel;
|
|
16195
16193
|
if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent)
|
|
16196
16194
|
return false;
|
|
16197
16195
|
let type3 = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter()));
|
|
@@ -16199,21 +16197,21 @@ const createParagraphNear = (state, dispatch) => {
|
|
|
16199
16197
|
return false;
|
|
16200
16198
|
if (dispatch) {
|
|
16201
16199
|
let side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos;
|
|
16202
|
-
let tr2 =
|
|
16200
|
+
let tr2 = state2.tr.insert(side, type3.createAndFill());
|
|
16203
16201
|
tr2.setSelection(TextSelection.create(tr2.doc, side + 1));
|
|
16204
16202
|
dispatch(tr2.scrollIntoView());
|
|
16205
16203
|
}
|
|
16206
16204
|
return true;
|
|
16207
16205
|
};
|
|
16208
|
-
const liftEmptyBlock = (
|
|
16209
|
-
let { $cursor } =
|
|
16206
|
+
const liftEmptyBlock = (state2, dispatch) => {
|
|
16207
|
+
let { $cursor } = state2.selection;
|
|
16210
16208
|
if (!$cursor || $cursor.parent.content.size)
|
|
16211
16209
|
return false;
|
|
16212
16210
|
if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) {
|
|
16213
16211
|
let before = $cursor.before();
|
|
16214
|
-
if (canSplit(
|
|
16212
|
+
if (canSplit(state2.doc, before)) {
|
|
16215
16213
|
if (dispatch)
|
|
16216
|
-
dispatch(
|
|
16214
|
+
dispatch(state2.tr.split(before).scrollIntoView());
|
|
16217
16215
|
return true;
|
|
16218
16216
|
}
|
|
16219
16217
|
}
|
|
@@ -16221,25 +16219,25 @@ const liftEmptyBlock = (state, dispatch) => {
|
|
|
16221
16219
|
if (target == null)
|
|
16222
16220
|
return false;
|
|
16223
16221
|
if (dispatch)
|
|
16224
|
-
dispatch(
|
|
16222
|
+
dispatch(state2.tr.lift(range2, target).scrollIntoView());
|
|
16225
16223
|
return true;
|
|
16226
16224
|
};
|
|
16227
16225
|
function splitBlockAs(splitNode) {
|
|
16228
|
-
return (
|
|
16229
|
-
let { $from, $to } =
|
|
16230
|
-
if (
|
|
16231
|
-
if (!$from.parentOffset || !canSplit(
|
|
16226
|
+
return (state2, dispatch) => {
|
|
16227
|
+
let { $from, $to } = state2.selection;
|
|
16228
|
+
if (state2.selection instanceof NodeSelection && state2.selection.node.isBlock) {
|
|
16229
|
+
if (!$from.parentOffset || !canSplit(state2.doc, $from.pos))
|
|
16232
16230
|
return false;
|
|
16233
16231
|
if (dispatch)
|
|
16234
|
-
dispatch(
|
|
16232
|
+
dispatch(state2.tr.split($from.pos).scrollIntoView());
|
|
16235
16233
|
return true;
|
|
16236
16234
|
}
|
|
16237
16235
|
if (!$from.parent.isBlock)
|
|
16238
16236
|
return false;
|
|
16239
16237
|
if (dispatch) {
|
|
16240
16238
|
let atEnd = $to.parentOffset == $to.parent.content.size;
|
|
16241
|
-
let tr2 =
|
|
16242
|
-
if (
|
|
16239
|
+
let tr2 = state2.tr;
|
|
16240
|
+
if (state2.selection instanceof TextSelection || state2.selection instanceof AllSelection)
|
|
16243
16241
|
tr2.deleteSelection();
|
|
16244
16242
|
let deflt = $from.depth == 0 ? null : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));
|
|
16245
16243
|
let splitType = splitNode && splitNode($to.parent, atEnd);
|
|
@@ -16264,31 +16262,31 @@ function splitBlockAs(splitNode) {
|
|
|
16264
16262
|
};
|
|
16265
16263
|
}
|
|
16266
16264
|
const splitBlock = splitBlockAs();
|
|
16267
|
-
const selectAll = (
|
|
16265
|
+
const selectAll = (state2, dispatch) => {
|
|
16268
16266
|
if (dispatch)
|
|
16269
|
-
dispatch(
|
|
16267
|
+
dispatch(state2.tr.setSelection(new AllSelection(state2.doc)));
|
|
16270
16268
|
return true;
|
|
16271
16269
|
};
|
|
16272
|
-
function joinMaybeClear(
|
|
16270
|
+
function joinMaybeClear(state2, $pos, dispatch) {
|
|
16273
16271
|
let before = $pos.nodeBefore, after = $pos.nodeAfter, index2 = $pos.index();
|
|
16274
16272
|
if (!before || !after || !before.type.compatibleContent(after.type))
|
|
16275
16273
|
return false;
|
|
16276
16274
|
if (!before.content.size && $pos.parent.canReplace(index2 - 1, index2)) {
|
|
16277
16275
|
if (dispatch)
|
|
16278
|
-
dispatch(
|
|
16276
|
+
dispatch(state2.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView());
|
|
16279
16277
|
return true;
|
|
16280
16278
|
}
|
|
16281
|
-
if (!$pos.parent.canReplace(index2, index2 + 1) || !(after.isTextblock || canJoin(
|
|
16279
|
+
if (!$pos.parent.canReplace(index2, index2 + 1) || !(after.isTextblock || canJoin(state2.doc, $pos.pos)))
|
|
16282
16280
|
return false;
|
|
16283
16281
|
if (dispatch)
|
|
16284
|
-
dispatch(
|
|
16282
|
+
dispatch(state2.tr.clearIncompatible($pos.pos, before.type, before.contentMatchAt(before.childCount)).join($pos.pos).scrollIntoView());
|
|
16285
16283
|
return true;
|
|
16286
16284
|
}
|
|
16287
|
-
function deleteBarrier(
|
|
16285
|
+
function deleteBarrier(state2, $cut, dispatch) {
|
|
16288
16286
|
let before = $cut.nodeBefore, after = $cut.nodeAfter, conn, match2;
|
|
16289
16287
|
if (before.type.spec.isolating || after.type.spec.isolating)
|
|
16290
16288
|
return false;
|
|
16291
|
-
if (joinMaybeClear(
|
|
16289
|
+
if (joinMaybeClear(state2, $cut, dispatch))
|
|
16292
16290
|
return true;
|
|
16293
16291
|
let canDelAfter = $cut.parent.canReplace($cut.index(), $cut.index() + 1);
|
|
16294
16292
|
if (canDelAfter && (conn = (match2 = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match2.matchType(conn[0] || after.type).validEnd) {
|
|
@@ -16297,7 +16295,7 @@ function deleteBarrier(state, $cut, dispatch) {
|
|
|
16297
16295
|
for (let i2 = conn.length - 1; i2 >= 0; i2--)
|
|
16298
16296
|
wrap2 = Fragment.from(conn[i2].create(null, wrap2));
|
|
16299
16297
|
wrap2 = Fragment.from(before.copy(wrap2));
|
|
16300
|
-
let tr2 =
|
|
16298
|
+
let tr2 = state2.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap2, 1, 0), conn.length, true));
|
|
16301
16299
|
let joinAt = end + 2 * conn.length;
|
|
16302
16300
|
if (canJoin(tr2.doc, joinAt))
|
|
16303
16301
|
tr2.join(joinAt);
|
|
@@ -16309,7 +16307,7 @@ function deleteBarrier(state, $cut, dispatch) {
|
|
|
16309
16307
|
let range2 = selAfter && selAfter.$from.blockRange(selAfter.$to), target = range2 && liftTarget(range2);
|
|
16310
16308
|
if (target != null && target >= $cut.depth) {
|
|
16311
16309
|
if (dispatch)
|
|
16312
|
-
dispatch(
|
|
16310
|
+
dispatch(state2.tr.lift(range2, target).scrollIntoView());
|
|
16313
16311
|
return true;
|
|
16314
16312
|
}
|
|
16315
16313
|
if (canDelAfter && textblockAt(after, "start", true) && textblockAt(before, "end")) {
|
|
@@ -16328,7 +16326,7 @@ function deleteBarrier(state, $cut, dispatch) {
|
|
|
16328
16326
|
let end = Fragment.empty;
|
|
16329
16327
|
for (let i2 = wrap2.length - 1; i2 >= 0; i2--)
|
|
16330
16328
|
end = Fragment.from(wrap2[i2].copy(end));
|
|
16331
|
-
let tr2 =
|
|
16329
|
+
let tr2 = state2.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end, wrap2.length, 0), 0, true));
|
|
16332
16330
|
dispatch(tr2.scrollIntoView());
|
|
16333
16331
|
}
|
|
16334
16332
|
return true;
|
|
@@ -16337,8 +16335,8 @@ function deleteBarrier(state, $cut, dispatch) {
|
|
|
16337
16335
|
return false;
|
|
16338
16336
|
}
|
|
16339
16337
|
function selectTextblockSide(side) {
|
|
16340
|
-
return function(
|
|
16341
|
-
let sel =
|
|
16338
|
+
return function(state2, dispatch) {
|
|
16339
|
+
let sel = state2.selection, $pos = side < 0 ? sel.$from : sel.$to;
|
|
16342
16340
|
let depth = $pos.depth;
|
|
16343
16341
|
while ($pos.node(depth).isInline) {
|
|
16344
16342
|
if (!depth)
|
|
@@ -16348,16 +16346,16 @@ function selectTextblockSide(side) {
|
|
|
16348
16346
|
if (!$pos.node(depth).isTextblock)
|
|
16349
16347
|
return false;
|
|
16350
16348
|
if (dispatch)
|
|
16351
|
-
dispatch(
|
|
16349
|
+
dispatch(state2.tr.setSelection(TextSelection.create(state2.doc, side < 0 ? $pos.start(depth) : $pos.end(depth))));
|
|
16352
16350
|
return true;
|
|
16353
16351
|
};
|
|
16354
16352
|
}
|
|
16355
16353
|
const selectTextblockStart = selectTextblockSide(-1);
|
|
16356
16354
|
const selectTextblockEnd = selectTextblockSide(1);
|
|
16357
16355
|
function chainCommands(...commands) {
|
|
16358
|
-
return function(
|
|
16356
|
+
return function(state2, dispatch, view) {
|
|
16359
16357
|
for (let i2 = 0; i2 < commands.length; i2++)
|
|
16360
|
-
if (commands[i2](
|
|
16358
|
+
if (commands[i2](state2, dispatch, view))
|
|
16361
16359
|
return true;
|
|
16362
16360
|
return false;
|
|
16363
16361
|
};
|
|
@@ -16584,7 +16582,7 @@ class Branch {
|
|
|
16584
16582
|
}
|
|
16585
16583
|
// Pop the latest event off the branch's history and apply it
|
|
16586
16584
|
// to a document transform.
|
|
16587
|
-
popEvent(
|
|
16585
|
+
popEvent(state2, preserveItems) {
|
|
16588
16586
|
if (this.eventCount == 0)
|
|
16589
16587
|
return null;
|
|
16590
16588
|
let end = this.items.length;
|
|
@@ -16600,7 +16598,7 @@ class Branch {
|
|
|
16600
16598
|
remap = this.remapping(end, this.items.length);
|
|
16601
16599
|
mapFrom = remap.maps.length;
|
|
16602
16600
|
}
|
|
16603
|
-
let transform =
|
|
16601
|
+
let transform = state2.tr;
|
|
16604
16602
|
let selection, remaining;
|
|
16605
16603
|
let addAfter = [], addBefore = [];
|
|
16606
16604
|
this.items.forEach((item, i2) => {
|
|
@@ -16797,7 +16795,7 @@ class HistoryState {
|
|
|
16797
16795
|
}
|
|
16798
16796
|
}
|
|
16799
16797
|
const DEPTH_OVERFLOW = 20;
|
|
16800
|
-
function applyTransaction(history2,
|
|
16798
|
+
function applyTransaction(history2, state2, tr2, options) {
|
|
16801
16799
|
let historyTr = tr2.getMeta(historyKey), rebased;
|
|
16802
16800
|
if (historyTr)
|
|
16803
16801
|
return historyTr.historyState;
|
|
@@ -16808,14 +16806,14 @@ function applyTransaction(history2, state, tr2, options) {
|
|
|
16808
16806
|
return history2;
|
|
16809
16807
|
} else if (appended && appended.getMeta(historyKey)) {
|
|
16810
16808
|
if (appended.getMeta(historyKey).redo)
|
|
16811
|
-
return new HistoryState(history2.done.addTransform(tr2, void 0, options, mustPreserveItems(
|
|
16809
|
+
return new HistoryState(history2.done.addTransform(tr2, void 0, options, mustPreserveItems(state2)), history2.undone, rangesFor(tr2.mapping.maps[tr2.steps.length - 1]), history2.prevTime, history2.prevComposition);
|
|
16812
16810
|
else
|
|
16813
|
-
return new HistoryState(history2.done, history2.undone.addTransform(tr2, void 0, options, mustPreserveItems(
|
|
16811
|
+
return new HistoryState(history2.done, history2.undone.addTransform(tr2, void 0, options, mustPreserveItems(state2)), null, history2.prevTime, history2.prevComposition);
|
|
16814
16812
|
} else if (tr2.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) {
|
|
16815
16813
|
let composition = tr2.getMeta("composition");
|
|
16816
16814
|
let newGroup = history2.prevTime == 0 || !appended && history2.prevComposition != composition && (history2.prevTime < (tr2.time || 0) - options.newGroupDelay || !isAdjacentTo(tr2, history2.prevRanges));
|
|
16817
16815
|
let prevRanges = appended ? mapRanges(history2.prevRanges, tr2.mapping) : rangesFor(tr2.mapping.maps[tr2.steps.length - 1]);
|
|
16818
|
-
return new HistoryState(history2.done.addTransform(tr2, newGroup ?
|
|
16816
|
+
return new HistoryState(history2.done.addTransform(tr2, newGroup ? state2.selection.getBookmark() : void 0, options, mustPreserveItems(state2)), Branch.empty, prevRanges, tr2.time, composition == null ? history2.prevComposition : composition);
|
|
16819
16817
|
} else if (rebased = tr2.getMeta("rebased")) {
|
|
16820
16818
|
return new HistoryState(history2.done.rebased(tr2, rebased), history2.undone.rebased(tr2, rebased), mapRanges(history2.prevRanges, tr2.mapping), history2.prevTime, history2.prevComposition);
|
|
16821
16819
|
} else {
|
|
@@ -16851,20 +16849,20 @@ function mapRanges(ranges, mapping) {
|
|
|
16851
16849
|
}
|
|
16852
16850
|
return result;
|
|
16853
16851
|
}
|
|
16854
|
-
function histTransaction(history2,
|
|
16855
|
-
let preserveItems = mustPreserveItems(
|
|
16856
|
-
let histOptions = historyKey.get(
|
|
16857
|
-
let pop = (redo2 ? history2.undone : history2.done).popEvent(
|
|
16852
|
+
function histTransaction(history2, state2, dispatch, redo2) {
|
|
16853
|
+
let preserveItems = mustPreserveItems(state2);
|
|
16854
|
+
let histOptions = historyKey.get(state2).spec.config;
|
|
16855
|
+
let pop = (redo2 ? history2.undone : history2.done).popEvent(state2, preserveItems);
|
|
16858
16856
|
if (!pop)
|
|
16859
16857
|
return;
|
|
16860
16858
|
let selection = pop.selection.resolve(pop.transform.doc);
|
|
16861
|
-
let added = (redo2 ? history2.done : history2.undone).addTransform(pop.transform,
|
|
16859
|
+
let added = (redo2 ? history2.done : history2.undone).addTransform(pop.transform, state2.selection.getBookmark(), histOptions, preserveItems);
|
|
16862
16860
|
let newHist = new HistoryState(redo2 ? added : pop.remaining, redo2 ? pop.remaining : added, null, 0, -1);
|
|
16863
16861
|
dispatch(pop.transform.setSelection(selection).setMeta(historyKey, { redo: redo2, historyState: newHist }).scrollIntoView());
|
|
16864
16862
|
}
|
|
16865
16863
|
let cachedPreserveItems = false, cachedPreserveItemsPlugins = null;
|
|
16866
|
-
function mustPreserveItems(
|
|
16867
|
-
let plugins2 =
|
|
16864
|
+
function mustPreserveItems(state2) {
|
|
16865
|
+
let plugins2 = state2.plugins;
|
|
16868
16866
|
if (cachedPreserveItemsPlugins != plugins2) {
|
|
16869
16867
|
cachedPreserveItems = false;
|
|
16870
16868
|
cachedPreserveItemsPlugins = plugins2;
|
|
@@ -16889,8 +16887,8 @@ function history(config = {}) {
|
|
|
16889
16887
|
init() {
|
|
16890
16888
|
return new HistoryState(Branch.empty, Branch.empty, null, 0, -1);
|
|
16891
16889
|
},
|
|
16892
|
-
apply(tr2, hist,
|
|
16893
|
-
return applyTransaction(hist,
|
|
16890
|
+
apply(tr2, hist, state2) {
|
|
16891
|
+
return applyTransaction(hist, state2, tr2, config);
|
|
16894
16892
|
}
|
|
16895
16893
|
},
|
|
16896
16894
|
config,
|
|
@@ -16908,20 +16906,20 @@ function history(config = {}) {
|
|
|
16908
16906
|
}
|
|
16909
16907
|
});
|
|
16910
16908
|
}
|
|
16911
|
-
const undo = (
|
|
16912
|
-
let hist = historyKey.getState(
|
|
16909
|
+
const undo = (state2, dispatch) => {
|
|
16910
|
+
let hist = historyKey.getState(state2);
|
|
16913
16911
|
if (!hist || hist.done.eventCount == 0)
|
|
16914
16912
|
return false;
|
|
16915
16913
|
if (dispatch)
|
|
16916
|
-
histTransaction(hist,
|
|
16914
|
+
histTransaction(hist, state2, dispatch, false);
|
|
16917
16915
|
return true;
|
|
16918
16916
|
};
|
|
16919
|
-
const redo = (
|
|
16920
|
-
let hist = historyKey.getState(
|
|
16917
|
+
const redo = (state2, dispatch) => {
|
|
16918
|
+
let hist = historyKey.getState(state2);
|
|
16921
16919
|
if (!hist || hist.undone.eventCount == 0)
|
|
16922
16920
|
return false;
|
|
16923
16921
|
if (dispatch)
|
|
16924
|
-
histTransaction(hist,
|
|
16922
|
+
histTransaction(hist, state2, dispatch, true);
|
|
16925
16923
|
return true;
|
|
16926
16924
|
};
|
|
16927
16925
|
const pDOM = ["p", 0], blockquoteDOM = ["blockquote", 0], hrDOM = ["hr"], preDOM = ["pre", ["code", 0]], brDOM = ["br"];
|
|
@@ -17114,8 +17112,8 @@ const marks = {
|
|
|
17114
17112
|
}
|
|
17115
17113
|
};
|
|
17116
17114
|
const schema = new Schema({ nodes, marks });
|
|
17117
|
-
const _hoisted_1$
|
|
17118
|
-
const _sfc_main$
|
|
17115
|
+
const _hoisted_1$F = ["id"];
|
|
17116
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
17119
17117
|
__name: "RTXEditor",
|
|
17120
17118
|
props: {
|
|
17121
17119
|
elementId: { default: Math.random().toString(36).substr(2, 9) },
|
|
@@ -17136,7 +17134,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
17136
17134
|
} catch (err) {
|
|
17137
17135
|
content = { type: "doc", content: [] };
|
|
17138
17136
|
}
|
|
17139
|
-
const
|
|
17137
|
+
const state2 = EditorState.create({
|
|
17140
17138
|
doc: DOMParser.fromSchema(schema).schema.nodeFromJSON(content),
|
|
17141
17139
|
plugins: [
|
|
17142
17140
|
history(),
|
|
@@ -17144,7 +17142,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
17144
17142
|
keymap(baseKeymap)
|
|
17145
17143
|
]
|
|
17146
17144
|
});
|
|
17147
|
-
return
|
|
17145
|
+
return state2;
|
|
17148
17146
|
};
|
|
17149
17147
|
function handleChange(newState) {
|
|
17150
17148
|
const dom = document.createElement("div");
|
|
@@ -17153,10 +17151,10 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
17153
17151
|
html.value = (dom == null ? void 0 : dom.innerHTML) || "";
|
|
17154
17152
|
emit2("update:modelValue", html.value);
|
|
17155
17153
|
}
|
|
17156
|
-
const createEditorView = (
|
|
17154
|
+
const createEditorView = (state2) => {
|
|
17157
17155
|
const editorDiv = document.getElementById(`canvas-${props2.elementId}`);
|
|
17158
17156
|
view = new EditorView(editorDiv, {
|
|
17159
|
-
state,
|
|
17157
|
+
state: state2,
|
|
17160
17158
|
// editable: () => props.editable,
|
|
17161
17159
|
dispatchTransaction(transaction) {
|
|
17162
17160
|
const newState = view.state.apply(transaction);
|
|
@@ -17169,8 +17167,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
17169
17167
|
});
|
|
17170
17168
|
};
|
|
17171
17169
|
function loadContent() {
|
|
17172
|
-
const
|
|
17173
|
-
createEditorView(
|
|
17170
|
+
const state2 = createEditorStateFromHTML(props2.modelValue);
|
|
17171
|
+
createEditorView(state2);
|
|
17174
17172
|
}
|
|
17175
17173
|
watch(
|
|
17176
17174
|
() => props2.modelValue,
|
|
@@ -17192,14 +17190,15 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
17192
17190
|
onClick: focusEditor,
|
|
17193
17191
|
id: `canvas-${_ctx.elementId}`,
|
|
17194
17192
|
onKeydown: _cache[0] || (_cache[0] = withKeys(withModifiers(($event) => _ctx.$emit("keydown.meta.enter"), ["meta"]), ["enter"]))
|
|
17195
|
-
}, null, 40, _hoisted_1$
|
|
17193
|
+
}, null, 40, _hoisted_1$F);
|
|
17196
17194
|
};
|
|
17197
17195
|
}
|
|
17198
17196
|
});
|
|
17199
|
-
const _sfc_main$
|
|
17197
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
17200
17198
|
__name: "MaterialIcon",
|
|
17201
17199
|
props: {
|
|
17202
17200
|
icon: {},
|
|
17201
|
+
name: {},
|
|
17203
17202
|
size: {},
|
|
17204
17203
|
color: {}
|
|
17205
17204
|
},
|
|
@@ -17208,17 +17207,17 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
17208
17207
|
return openBlock(), createElementBlock("div", {
|
|
17209
17208
|
class: "bgl_icon-font",
|
|
17210
17209
|
style: normalizeStyle({ fontSize: `${_ctx.size}rem`, color: _ctx.color })
|
|
17211
|
-
}, toDisplayString(_ctx.icon), 5);
|
|
17210
|
+
}, toDisplayString(_ctx.icon || _ctx.name), 5);
|
|
17212
17211
|
};
|
|
17213
17212
|
}
|
|
17214
17213
|
});
|
|
17215
|
-
const _hoisted_1$
|
|
17216
|
-
const _hoisted_2$
|
|
17217
|
-
const _hoisted_3$
|
|
17218
|
-
const _hoisted_4$
|
|
17219
|
-
const _hoisted_5$
|
|
17220
|
-
const _hoisted_6$
|
|
17221
|
-
const _sfc_main$
|
|
17214
|
+
const _hoisted_1$E = { class: "full-nav" };
|
|
17215
|
+
const _hoisted_2$x = { class: "nav-scroll" };
|
|
17216
|
+
const _hoisted_3$n = { class: "nav-links-wrapper" };
|
|
17217
|
+
const _hoisted_4$f = { class: "tooltip" };
|
|
17218
|
+
const _hoisted_5$c = { class: "bot-buttons-wrapper" };
|
|
17219
|
+
const _hoisted_6$8 = { class: "tooltip" };
|
|
17220
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
17222
17221
|
__name: "NavBar",
|
|
17223
17222
|
props: {
|
|
17224
17223
|
footerLinks: { default: () => [] },
|
|
@@ -17242,14 +17241,14 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
17242
17241
|
"aria-label": "Toggle Navigation",
|
|
17243
17242
|
tabindex: "0"
|
|
17244
17243
|
}, [
|
|
17245
|
-
createVNode(unref(_sfc_main$
|
|
17244
|
+
createVNode(unref(_sfc_main$H), {
|
|
17246
17245
|
icon: "chevron_right",
|
|
17247
17246
|
class: "top-arrow"
|
|
17248
17247
|
})
|
|
17249
17248
|
], 32),
|
|
17250
|
-
createElementVNode("div", _hoisted_1$
|
|
17251
|
-
createElementVNode("div", _hoisted_2$
|
|
17252
|
-
createElementVNode("div", _hoisted_3$
|
|
17249
|
+
createElementVNode("div", _hoisted_1$E, [
|
|
17250
|
+
createElementVNode("div", _hoisted_2$x, [
|
|
17251
|
+
createElementVNode("div", _hoisted_3$n, [
|
|
17253
17252
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.links, (link) => {
|
|
17254
17253
|
return openBlock(), createBlock(resolveDynamicComponent(link.to ? "router-link" : "div"), {
|
|
17255
17254
|
class: "nav-button",
|
|
@@ -17261,17 +17260,17 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
17261
17260
|
}
|
|
17262
17261
|
}, {
|
|
17263
17262
|
default: withCtx(() => [
|
|
17264
|
-
createVNode(unref(_sfc_main$
|
|
17263
|
+
createVNode(unref(_sfc_main$H), {
|
|
17265
17264
|
icon: link.icon
|
|
17266
17265
|
}, null, 8, ["icon"]),
|
|
17267
|
-
createElementVNode("div", _hoisted_4$
|
|
17266
|
+
createElementVNode("div", _hoisted_4$f, toDisplayString(link.label), 1)
|
|
17268
17267
|
]),
|
|
17269
17268
|
_: 2
|
|
17270
17269
|
}, 1032, ["to", "onClick"]);
|
|
17271
17270
|
}), 128))
|
|
17272
17271
|
])
|
|
17273
17272
|
]),
|
|
17274
|
-
createElementVNode("div", _hoisted_5$
|
|
17273
|
+
createElementVNode("div", _hoisted_5$c, [
|
|
17275
17274
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.footerLinks, (link) => {
|
|
17276
17275
|
return openBlock(), createBlock(resolveDynamicComponent(link.to ? "router-link" : "div"), {
|
|
17277
17276
|
class: "nav-button",
|
|
@@ -17283,10 +17282,10 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
17283
17282
|
key: link.label
|
|
17284
17283
|
}, {
|
|
17285
17284
|
default: withCtx(() => [
|
|
17286
|
-
createVNode(unref(_sfc_main$
|
|
17285
|
+
createVNode(unref(_sfc_main$H), {
|
|
17287
17286
|
icon: link.icon
|
|
17288
17287
|
}, null, 8, ["icon"]),
|
|
17289
|
-
createElementVNode("div", _hoisted_6$
|
|
17288
|
+
createElementVNode("div", _hoisted_6$8, toDisplayString(link.label), 1)
|
|
17290
17289
|
]),
|
|
17291
17290
|
_: 2
|
|
17292
17291
|
}, 1032, ["to", "onClick"]);
|
|
@@ -17305,16 +17304,16 @@ const _export_sfc = (sfc, props2) => {
|
|
|
17305
17304
|
}
|
|
17306
17305
|
return target;
|
|
17307
17306
|
};
|
|
17308
|
-
const NavBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17309
|
-
const _hoisted_1$
|
|
17307
|
+
const NavBar = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-727b754a"]]);
|
|
17308
|
+
const _hoisted_1$D = {
|
|
17310
17309
|
key: 0,
|
|
17311
17310
|
class: "loading"
|
|
17312
17311
|
};
|
|
17313
|
-
const _hoisted_2$
|
|
17312
|
+
const _hoisted_2$w = {
|
|
17314
17313
|
key: 1,
|
|
17315
17314
|
class: "bgl_btn-flex"
|
|
17316
17315
|
};
|
|
17317
|
-
const _sfc_main$
|
|
17316
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
17318
17317
|
__name: "Btn",
|
|
17319
17318
|
props: {
|
|
17320
17319
|
disabled: { type: Boolean, default: false },
|
|
@@ -17400,8 +17399,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
17400
17399
|
})
|
|
17401
17400
|
}, {
|
|
17402
17401
|
default: withCtx(() => [
|
|
17403
|
-
_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
17404
|
-
_ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$
|
|
17402
|
+
_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1$D)) : (openBlock(), createElementBlock("div", _hoisted_2$w, [
|
|
17403
|
+
_ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
17405
17404
|
key: 0,
|
|
17406
17405
|
icon: _ctx.icon
|
|
17407
17406
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
@@ -17409,7 +17408,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
17409
17408
|
!unref(slots)["default"] && _ctx.value ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
|
|
17410
17409
|
createTextVNode(toDisplayString(_ctx.value), 1)
|
|
17411
17410
|
], 64)) : createCommentVNode("", true),
|
|
17412
|
-
props2["icon.end"] ? (openBlock(), createBlock(unref(_sfc_main$
|
|
17411
|
+
props2["icon.end"] ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
17413
17412
|
key: 2,
|
|
17414
17413
|
icon: props2["icon.end"]
|
|
17415
17414
|
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
@@ -17420,10 +17419,10 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
17420
17419
|
};
|
|
17421
17420
|
}
|
|
17422
17421
|
});
|
|
17423
|
-
const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17424
|
-
const _hoisted_1$
|
|
17425
|
-
const _hoisted_2$
|
|
17426
|
-
const _sfc_main$
|
|
17422
|
+
const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-0c8d9a95"]]);
|
|
17423
|
+
const _hoisted_1$C = { class: "tool-bar" };
|
|
17424
|
+
const _hoisted_2$v = { class: "modal-footer mt-3" };
|
|
17425
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
17427
17426
|
__name: "Modal",
|
|
17428
17427
|
props: {
|
|
17429
17428
|
side: { type: Boolean },
|
|
@@ -17464,13 +17463,13 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
17464
17463
|
onClick: _cache[1] || (_cache[1] = () => _ctx.dismissable ? closeModal() : ""),
|
|
17465
17464
|
onKeydown: withKeys(closeModal, ["esc"])
|
|
17466
17465
|
}, [
|
|
17467
|
-
createVNode(unref(_sfc_main$
|
|
17466
|
+
createVNode(unref(_sfc_main$t), {
|
|
17468
17467
|
class: "modal",
|
|
17469
17468
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
17470
17469
|
}, ["stop"]))
|
|
17471
17470
|
}, {
|
|
17472
17471
|
default: withCtx(() => [
|
|
17473
|
-
createElementVNode("header", _hoisted_1$
|
|
17472
|
+
createElementVNode("header", _hoisted_1$C, [
|
|
17474
17473
|
renderSlot(_ctx.$slots, "toolbar"),
|
|
17475
17474
|
createVNode(unref(Btn), {
|
|
17476
17475
|
style: normalizeStyle({ float: _ctx.side ? "left" : "right" }),
|
|
@@ -17478,7 +17477,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
17478
17477
|
icon: "close",
|
|
17479
17478
|
onClick: closeModal
|
|
17480
17479
|
}, null, 8, ["style"]),
|
|
17481
|
-
_ctx.title ? (openBlock(), createBlock(unref(_sfc_main$
|
|
17480
|
+
_ctx.title ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
17482
17481
|
key: 0,
|
|
17483
17482
|
class: "modal-title",
|
|
17484
17483
|
tag: "h3",
|
|
@@ -17486,7 +17485,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
17486
17485
|
}, null, 8, ["label"])) : createCommentVNode("", true)
|
|
17487
17486
|
]),
|
|
17488
17487
|
renderSlot(_ctx.$slots, "default"),
|
|
17489
|
-
createElementVNode("footer", _hoisted_2$
|
|
17488
|
+
createElementVNode("footer", _hoisted_2$v, [
|
|
17490
17489
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.actions, (action, i2) => {
|
|
17491
17490
|
return openBlock(), createBlock(unref(Btn), mergeProps({
|
|
17492
17491
|
key: i2,
|
|
@@ -17503,7 +17502,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
17503
17502
|
};
|
|
17504
17503
|
}
|
|
17505
17504
|
});
|
|
17506
|
-
const _sfc_main$
|
|
17505
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
17507
17506
|
__name: "ModalForm",
|
|
17508
17507
|
props: /* @__PURE__ */ mergeModels({
|
|
17509
17508
|
side: { type: Boolean },
|
|
@@ -17560,7 +17559,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
17560
17559
|
}
|
|
17561
17560
|
__expose({ setFormValues });
|
|
17562
17561
|
return (_ctx, _cache) => {
|
|
17563
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
17562
|
+
return openBlock(), createBlock(unref(_sfc_main$E), {
|
|
17564
17563
|
"onOnUpdate:isModalVisible": props2["onUpdate:isModalVisible"],
|
|
17565
17564
|
side: _ctx.side,
|
|
17566
17565
|
ref_key: "modal",
|
|
@@ -17569,7 +17568,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
17569
17568
|
title: _ctx.title
|
|
17570
17569
|
}, createSlots({
|
|
17571
17570
|
default: withCtx(() => [
|
|
17572
|
-
createVNode(unref(_sfc_main$
|
|
17571
|
+
createVNode(unref(_sfc_main$l), {
|
|
17573
17572
|
onSubmit: runSubmit,
|
|
17574
17573
|
ref_key: "form",
|
|
17575
17574
|
ref: form,
|
|
@@ -17611,12 +17610,12 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
17611
17610
|
};
|
|
17612
17611
|
}
|
|
17613
17612
|
});
|
|
17614
|
-
const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17615
|
-
const _hoisted_1$
|
|
17616
|
-
const _hoisted_2$
|
|
17617
|
-
const _hoisted_3$
|
|
17618
|
-
const _hoisted_4$
|
|
17619
|
-
const _sfc_main$
|
|
17613
|
+
const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-7e6899c7"]]);
|
|
17614
|
+
const _hoisted_1$B = { class: "accordion-item" };
|
|
17615
|
+
const _hoisted_2$u = ["aria-expanded", "aria-controls"];
|
|
17616
|
+
const _hoisted_3$m = { class: "accordion-label" };
|
|
17617
|
+
const _hoisted_4$e = ["id", "aria-hidden"];
|
|
17618
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
17620
17619
|
__name: "AccordionItem",
|
|
17621
17620
|
props: {
|
|
17622
17621
|
label: {},
|
|
@@ -17640,20 +17639,20 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
17640
17639
|
accordionState.openItem = null;
|
|
17641
17640
|
}
|
|
17642
17641
|
return (_ctx, _cache) => {
|
|
17643
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
17642
|
+
return openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
17644
17643
|
createElementVNode("button", {
|
|
17645
17644
|
onClick: _cache[0] || (_cache[0] = ($event) => toggle()),
|
|
17646
17645
|
"aria-expanded": unref(open) ? "true" : "false",
|
|
17647
17646
|
class: "accordion-head",
|
|
17648
17647
|
"aria-controls": `accordion-body-${unref(id)}`
|
|
17649
17648
|
}, [
|
|
17650
|
-
createElementVNode("span", _hoisted_3$
|
|
17649
|
+
createElementVNode("span", _hoisted_3$m, toDisplayString(_ctx.label), 1),
|
|
17651
17650
|
createElementVNode("div", {
|
|
17652
17651
|
class: normalizeClass(["accordion-icon", { open: unref(open) }])
|
|
17653
17652
|
}, [
|
|
17654
|
-
createVNode(unref(_sfc_main$
|
|
17653
|
+
createVNode(unref(_sfc_main$H), { icon: "expand_more" })
|
|
17655
17654
|
], 2)
|
|
17656
|
-
], 8, _hoisted_2$
|
|
17655
|
+
], 8, _hoisted_2$u),
|
|
17657
17656
|
createVNode(Transition, { name: "expand" }, {
|
|
17658
17657
|
default: withCtx(() => [
|
|
17659
17658
|
unref(open) ? (openBlock(), createElementBlock("div", {
|
|
@@ -17663,7 +17662,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
17663
17662
|
"aria-hidden": unref(open) ? "false" : "true"
|
|
17664
17663
|
}, [
|
|
17665
17664
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
17666
|
-
], 8, _hoisted_4$
|
|
17665
|
+
], 8, _hoisted_4$e)) : createCommentVNode("", true)
|
|
17667
17666
|
]),
|
|
17668
17667
|
_: 3
|
|
17669
17668
|
})
|
|
@@ -17671,28 +17670,28 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
17671
17670
|
};
|
|
17672
17671
|
}
|
|
17673
17672
|
});
|
|
17674
|
-
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17675
|
-
const _hoisted_1$
|
|
17676
|
-
const _hoisted_2$
|
|
17677
|
-
const _hoisted_3$
|
|
17678
|
-
const _sfc_main$
|
|
17673
|
+
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-bf74738b"]]);
|
|
17674
|
+
const _hoisted_1$A = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
|
|
17675
|
+
const _hoisted_2$t = { class: "p-1" };
|
|
17676
|
+
const _hoisted_3$l = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
|
|
17677
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
17679
17678
|
__name: "ListView",
|
|
17680
17679
|
setup(__props) {
|
|
17681
17680
|
return (_ctx, _cache) => {
|
|
17682
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
17683
|
-
createElementVNode("div", _hoisted_2$
|
|
17681
|
+
return openBlock(), createElementBlock("div", _hoisted_1$A, [
|
|
17682
|
+
createElementVNode("div", _hoisted_2$t, [
|
|
17684
17683
|
renderSlot(_ctx.$slots, "header")
|
|
17685
17684
|
]),
|
|
17686
|
-
createElementVNode("div", _hoisted_3$
|
|
17685
|
+
createElementVNode("div", _hoisted_3$l, [
|
|
17687
17686
|
renderSlot(_ctx.$slots, "default")
|
|
17688
17687
|
])
|
|
17689
17688
|
]);
|
|
17690
17689
|
};
|
|
17691
17690
|
}
|
|
17692
17691
|
});
|
|
17693
|
-
const _hoisted_1$
|
|
17694
|
-
const _hoisted_2$
|
|
17695
|
-
const _sfc_main$
|
|
17692
|
+
const _hoisted_1$z = { class: "txt16 no-margin ellipsis" };
|
|
17693
|
+
const _hoisted_2$s = { class: "txt14 no-margin txt-gray ellipsis" };
|
|
17694
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
17696
17695
|
__name: "ListItem",
|
|
17697
17696
|
props: {
|
|
17698
17697
|
src: {},
|
|
@@ -17716,11 +17715,11 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
17716
17715
|
size: 40
|
|
17717
17716
|
}, null, 8, ["name", "src"])) : createCommentVNode("", true),
|
|
17718
17717
|
createElementVNode("div", null, [
|
|
17719
|
-
createElementVNode("p", _hoisted_1$
|
|
17718
|
+
createElementVNode("p", _hoisted_1$z, [
|
|
17720
17719
|
createTextVNode(toDisplayString(_ctx.title) + " ", 1),
|
|
17721
17720
|
renderSlot(_ctx.$slots, "default")
|
|
17722
17721
|
]),
|
|
17723
|
-
createElementVNode("p", _hoisted_2$
|
|
17722
|
+
createElementVNode("p", _hoisted_2$s, [
|
|
17724
17723
|
createTextVNode(toDisplayString(_ctx.subtitle) + " ", 1),
|
|
17725
17724
|
renderSlot(_ctx.$slots, "subtitle")
|
|
17726
17725
|
])
|
|
@@ -17731,81 +17730,15 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
17731
17730
|
};
|
|
17732
17731
|
}
|
|
17733
17732
|
});
|
|
17734
|
-
const _hoisted_1$
|
|
17735
|
-
const _hoisted_2$s = { class: "tabs grid auto-flow-columns fit-content" };
|
|
17736
|
-
const _hoisted_3$l = ["onClick"];
|
|
17737
|
-
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
17738
|
-
__name: "TabbedLayout",
|
|
17739
|
-
props: {
|
|
17740
|
-
title: {},
|
|
17741
|
-
tabs: {},
|
|
17742
|
-
modelValue: {},
|
|
17743
|
-
router: {},
|
|
17744
|
-
sideTabs: { type: Boolean }
|
|
17745
|
-
},
|
|
17746
|
-
emits: ["update:modelValue"],
|
|
17747
|
-
setup(__props, { emit: __emit }) {
|
|
17748
|
-
const emit2 = __emit;
|
|
17749
|
-
let activeTab = ref();
|
|
17750
|
-
const props2 = __props;
|
|
17751
|
-
function changeTab(tab) {
|
|
17752
|
-
var _a2;
|
|
17753
|
-
activeTab.value = tab;
|
|
17754
|
-
emit2("update:modelValue", activeTab.value);
|
|
17755
|
-
if (!props2.router)
|
|
17756
|
-
return;
|
|
17757
|
-
void ((_a2 = props2.router) == null ? void 0 : _a2.push({
|
|
17758
|
-
path: props2.router.currentRoute.value.path,
|
|
17759
|
-
query: { ...props2.router.currentRoute.value.query, t: tab },
|
|
17760
|
-
hash: props2.router.currentRoute.value.hash
|
|
17761
|
-
}));
|
|
17762
|
-
}
|
|
17763
|
-
onMounted(() => {
|
|
17764
|
-
var _a2;
|
|
17765
|
-
const firstTab = props2.modelValue || ((_a2 = props2.router) == null ? void 0 : _a2.currentRoute.value.query.t) || props2.tabs[0];
|
|
17766
|
-
activeTab.value = firstTab;
|
|
17767
|
-
});
|
|
17768
|
-
return (_ctx, _cache) => {
|
|
17769
|
-
return openBlock(), createElementBlock("div", {
|
|
17770
|
-
class: normalizeClass(["h-100 grid list-view gap-1", { "side-tabs": _ctx.sideTabs }])
|
|
17771
|
-
}, [
|
|
17772
|
-
createElementVNode("div", _hoisted_1$B, [
|
|
17773
|
-
renderSlot(_ctx.$slots, "top-section", {}, void 0, true),
|
|
17774
|
-
createElementVNode("div", _hoisted_2$s, [
|
|
17775
|
-
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.tabs, (tab) => {
|
|
17776
|
-
var _a2;
|
|
17777
|
-
return openBlock(), createElementBlock("div", {
|
|
17778
|
-
class: normalizeClass([{
|
|
17779
|
-
active: tab === unref(activeTab) || tab === ((_a2 = _ctx.router) == null ? void 0 : _a2.currentRoute.value.path.split("/").slice(-1)[0])
|
|
17780
|
-
}, "tab"]),
|
|
17781
|
-
key: tab,
|
|
17782
|
-
onClick: ($event) => changeTab(tab)
|
|
17783
|
-
}, toDisplayString(tab), 11, _hoisted_3$l);
|
|
17784
|
-
}), 128))
|
|
17785
|
-
])
|
|
17786
|
-
]),
|
|
17787
|
-
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.tabs.filter((item) => item === unref(activeTab)), (tab) => {
|
|
17788
|
-
return openBlock(), createElementBlock("div", {
|
|
17789
|
-
class: "list-content",
|
|
17790
|
-
key: tab
|
|
17791
|
-
}, [
|
|
17792
|
-
renderSlot(_ctx.$slots, tab, { key: tab }, void 0, true)
|
|
17793
|
-
]);
|
|
17794
|
-
}), 128))
|
|
17795
|
-
], 2);
|
|
17796
|
-
};
|
|
17797
|
-
}
|
|
17798
|
-
});
|
|
17799
|
-
const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-37337215"]]);
|
|
17800
|
-
const _hoisted_1$A = { class: "comments-wrap" };
|
|
17733
|
+
const _hoisted_1$y = { class: "comments-wrap" };
|
|
17801
17734
|
const _hoisted_2$r = { class: "comment-list" };
|
|
17802
17735
|
const _hoisted_3$k = { class: "comment-top" };
|
|
17803
|
-
const _hoisted_4$
|
|
17804
|
-
const _hoisted_5$
|
|
17805
|
-
const _hoisted_6$
|
|
17806
|
-
const _hoisted_7$
|
|
17807
|
-
const _hoisted_8$
|
|
17808
|
-
const _sfc_main$
|
|
17736
|
+
const _hoisted_4$d = { class: "comment-owner" };
|
|
17737
|
+
const _hoisted_5$b = { class: "comment-time" };
|
|
17738
|
+
const _hoisted_6$7 = { class: "comment-actions" };
|
|
17739
|
+
const _hoisted_7$3 = ["innerHTML"];
|
|
17740
|
+
const _hoisted_8$1 = { class: "new-comment" };
|
|
17741
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
17809
17742
|
__name: "Comments",
|
|
17810
17743
|
props: {
|
|
17811
17744
|
ref_table: {},
|
|
@@ -17848,7 +17781,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
17848
17781
|
void fetchData();
|
|
17849
17782
|
};
|
|
17850
17783
|
return (_ctx, _cache) => {
|
|
17851
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
17784
|
+
return openBlock(), createElementBlock("div", _hoisted_1$y, [
|
|
17852
17785
|
createElementVNode("div", _hoisted_2$r, [
|
|
17853
17786
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(comments), (comment) => {
|
|
17854
17787
|
var _a2, _b, _c;
|
|
@@ -17860,22 +17793,22 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
17860
17793
|
key: comment.id
|
|
17861
17794
|
}, [
|
|
17862
17795
|
createElementVNode("div", _hoisted_3$k, [
|
|
17863
|
-
createElementVNode("div", _hoisted_4$
|
|
17864
|
-
createElementVNode("div", _hoisted_5$
|
|
17865
|
-
createElementVNode("div", _hoisted_6$
|
|
17866
|
-
createVNode(unref(_sfc_main$
|
|
17796
|
+
createElementVNode("div", _hoisted_4$d, toDisplayString(comment.sender.first_name) + " " + toDisplayString(comment.sender.last_name), 1),
|
|
17797
|
+
createElementVNode("div", _hoisted_5$b, toDisplayString(comment.updated_at.split("T")[0]), 1),
|
|
17798
|
+
createElementVNode("div", _hoisted_6$7, [
|
|
17799
|
+
createVNode(unref(_sfc_main$H), {
|
|
17867
17800
|
size: 1,
|
|
17868
17801
|
class: "edit",
|
|
17869
17802
|
icon: "edit",
|
|
17870
17803
|
onClick: ($event) => isRef(editComment) ? editComment.value = comment : editComment = comment
|
|
17871
17804
|
}, null, 8, ["onClick"]),
|
|
17872
|
-
createVNode(unref(_sfc_main$
|
|
17805
|
+
createVNode(unref(_sfc_main$H), {
|
|
17873
17806
|
size: 1.2,
|
|
17874
17807
|
class: "delete",
|
|
17875
17808
|
icon: "delete",
|
|
17876
17809
|
onClick: ($event) => deleteComment(comment.id)
|
|
17877
17810
|
}, null, 8, ["onClick"]),
|
|
17878
|
-
createVNode(unref(_sfc_main$
|
|
17811
|
+
createVNode(unref(_sfc_main$H), {
|
|
17879
17812
|
size: 1.2,
|
|
17880
17813
|
class: "save",
|
|
17881
17814
|
icon: "save",
|
|
@@ -17883,7 +17816,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
17883
17816
|
})
|
|
17884
17817
|
])
|
|
17885
17818
|
]),
|
|
17886
|
-
unref(editComment) !== null && ((_c = unref(editComment)) == null ? void 0 : _c.id) === comment.id ? (openBlock(), createBlock(unref(_sfc_main$
|
|
17819
|
+
unref(editComment) !== null && ((_c = unref(editComment)) == null ? void 0 : _c.id) === comment.id ? (openBlock(), createBlock(unref(_sfc_main$I), {
|
|
17887
17820
|
key: 0,
|
|
17888
17821
|
modelValue: unref(editComment).body_html,
|
|
17889
17822
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(editComment).body_html = $event),
|
|
@@ -17892,12 +17825,12 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
17892
17825
|
key: 1,
|
|
17893
17826
|
class: "editor-wrapper",
|
|
17894
17827
|
innerHTML: comment.body_html
|
|
17895
|
-
}, null, 8, _hoisted_7$
|
|
17828
|
+
}, null, 8, _hoisted_7$3))
|
|
17896
17829
|
], 2);
|
|
17897
17830
|
}), 128))
|
|
17898
17831
|
]),
|
|
17899
|
-
createElementVNode("div", _hoisted_8$
|
|
17900
|
-
createVNode(unref(_sfc_main$
|
|
17832
|
+
createElementVNode("div", _hoisted_8$1, [
|
|
17833
|
+
createVNode(unref(_sfc_main$I), {
|
|
17901
17834
|
class: "comment-input",
|
|
17902
17835
|
modelValue: unref(bodyHtml),
|
|
17903
17836
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(bodyHtml) ? bodyHtml.value = $event : bodyHtml = $event),
|
|
@@ -17917,10 +17850,10 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
17917
17850
|
};
|
|
17918
17851
|
}
|
|
17919
17852
|
});
|
|
17920
|
-
const Comments = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17921
|
-
const _hoisted_1$
|
|
17853
|
+
const Comments = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-c4b41dc0"]]);
|
|
17854
|
+
const _hoisted_1$x = { class: "page-top" };
|
|
17922
17855
|
const _hoisted_2$q = { class: "top-title" };
|
|
17923
|
-
const _sfc_main$
|
|
17856
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
17924
17857
|
__name: "PageTitle",
|
|
17925
17858
|
props: {
|
|
17926
17859
|
value: {
|
|
@@ -17930,7 +17863,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17930
17863
|
},
|
|
17931
17864
|
setup(__props) {
|
|
17932
17865
|
return (_ctx, _cache) => {
|
|
17933
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
17866
|
+
return openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
17934
17867
|
createElementVNode("h1", _hoisted_2$q, [
|
|
17935
17868
|
renderSlot(_ctx.$slots, "default"),
|
|
17936
17869
|
createTextVNode(" " + toDisplayString(__props.value), 1)
|
|
@@ -17939,14 +17872,14 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17939
17872
|
};
|
|
17940
17873
|
}
|
|
17941
17874
|
});
|
|
17942
|
-
const _hoisted_1$
|
|
17875
|
+
const _hoisted_1$w = { class: "table-list-wrap h-100" };
|
|
17943
17876
|
const _hoisted_2$p = { class: "infinite-wrapper" };
|
|
17944
17877
|
const _hoisted_3$j = { class: "row first-row" };
|
|
17945
|
-
const _hoisted_4$
|
|
17946
|
-
const _hoisted_5$
|
|
17947
|
-
const _hoisted_6$
|
|
17948
|
-
const _hoisted_7$
|
|
17949
|
-
const _sfc_main$
|
|
17878
|
+
const _hoisted_4$c = ["onClick"];
|
|
17879
|
+
const _hoisted_5$a = { class: "flex" };
|
|
17880
|
+
const _hoisted_6$6 = ["onClick"];
|
|
17881
|
+
const _hoisted_7$2 = { key: 1 };
|
|
17882
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
17950
17883
|
__name: "TableSchema",
|
|
17951
17884
|
props: {
|
|
17952
17885
|
data: {},
|
|
@@ -17980,7 +17913,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
17980
17913
|
emit2("orderBy", `${fieldname} ${sortDirection.value}`.trim());
|
|
17981
17914
|
};
|
|
17982
17915
|
return (_ctx, _cache) => {
|
|
17983
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
17916
|
+
return openBlock(), createElementBlock("div", _hoisted_1$w, [
|
|
17984
17917
|
createElementVNode("table", _hoisted_2$p, [
|
|
17985
17918
|
createElementVNode("thead", _hoisted_3$j, [
|
|
17986
17919
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, (field) => {
|
|
@@ -17989,18 +17922,18 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
17989
17922
|
key: field.id,
|
|
17990
17923
|
onClick: ($event) => sort2((field == null ? void 0 : field.id) || "")
|
|
17991
17924
|
}, [
|
|
17992
|
-
createElementVNode("div", _hoisted_5$
|
|
17925
|
+
createElementVNode("div", _hoisted_5$a, [
|
|
17993
17926
|
createTextVNode(toDisplayString(field.label || unref(keyToLabel)(field.id)) + " ", 1),
|
|
17994
17927
|
createElementVNode("div", {
|
|
17995
17928
|
class: normalizeClass(["list-arrows", { sorted: unref(sortField) === field.id }])
|
|
17996
17929
|
}, [
|
|
17997
|
-
createVNode(unref(_sfc_main$
|
|
17930
|
+
createVNode(unref(_sfc_main$H), {
|
|
17998
17931
|
class: normalizeClass({ desc: unref(sortDirection) === "DESC" }),
|
|
17999
17932
|
icon: "keyboard_arrow_up"
|
|
18000
17933
|
}, null, 8, ["class"])
|
|
18001
17934
|
], 2)
|
|
18002
17935
|
])
|
|
18003
|
-
], 8, _hoisted_4$
|
|
17936
|
+
], 8, _hoisted_4$c);
|
|
18004
17937
|
}), 128))
|
|
18005
17938
|
]),
|
|
18006
17939
|
createElementVNode("tbody", {
|
|
@@ -18022,15 +17955,15 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18022
17955
|
key: 0,
|
|
18023
17956
|
row,
|
|
18024
17957
|
field
|
|
18025
|
-
}, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_7$
|
|
18026
|
-
createVNode(unref(_sfc_main$
|
|
17958
|
+
}, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_7$2, [
|
|
17959
|
+
createVNode(unref(_sfc_main$k), {
|
|
18027
17960
|
field,
|
|
18028
17961
|
modelValue: row
|
|
18029
17962
|
}, null, 8, ["field", "modelValue"])
|
|
18030
17963
|
]))
|
|
18031
17964
|
]);
|
|
18032
17965
|
}), 128))
|
|
18033
|
-
], 8, _hoisted_6$
|
|
17966
|
+
], 8, _hoisted_6$6);
|
|
18034
17967
|
}), 128))
|
|
18035
17968
|
], 2)
|
|
18036
17969
|
])
|
|
@@ -18038,16 +17971,16 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18038
17971
|
};
|
|
18039
17972
|
}
|
|
18040
17973
|
});
|
|
18041
|
-
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18042
|
-
const _sfc_main$
|
|
18043
|
-
const _hoisted_1$
|
|
17974
|
+
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-f3641508"]]);
|
|
17975
|
+
const _sfc_main$w = {};
|
|
17976
|
+
const _hoisted_1$v = { class: "flex space-between" };
|
|
18044
17977
|
function _sfc_render$1(_ctx, _cache) {
|
|
18045
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
17978
|
+
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
18046
17979
|
renderSlot(_ctx.$slots, "default")
|
|
18047
17980
|
]);
|
|
18048
17981
|
}
|
|
18049
|
-
const TopBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18050
|
-
const _sfc_main$
|
|
17982
|
+
const TopBar = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$1]]);
|
|
17983
|
+
const _sfc_main$v = {};
|
|
18051
17984
|
function _sfc_render(_ctx, _cache) {
|
|
18052
17985
|
const _component_router_view = resolveComponent("router-view");
|
|
18053
17986
|
return openBlock(), createBlock(_component_router_view, null, {
|
|
@@ -18069,8 +18002,8 @@ function _sfc_render(_ctx, _cache) {
|
|
|
18069
18002
|
_: 1
|
|
18070
18003
|
});
|
|
18071
18004
|
}
|
|
18072
|
-
const RouterWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18073
|
-
const _hoisted_1$
|
|
18005
|
+
const RouterWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render]]);
|
|
18006
|
+
const _hoisted_1$u = {
|
|
18074
18007
|
key: 0,
|
|
18075
18008
|
class: "data"
|
|
18076
18009
|
};
|
|
@@ -18079,10 +18012,10 @@ const _hoisted_2$o = {
|
|
|
18079
18012
|
class: "data-row"
|
|
18080
18013
|
};
|
|
18081
18014
|
const _hoisted_3$i = { class: "key" };
|
|
18082
|
-
const _hoisted_4$
|
|
18083
|
-
const _hoisted_5$
|
|
18084
|
-
const _hoisted_6$
|
|
18085
|
-
const _sfc_main$
|
|
18015
|
+
const _hoisted_4$b = { key: 1 };
|
|
18016
|
+
const _hoisted_5$9 = { class: "key" };
|
|
18017
|
+
const _hoisted_6$5 = { class: "vlue" };
|
|
18018
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
18086
18019
|
__name: "DataPreview",
|
|
18087
18020
|
props: /* @__PURE__ */ mergeModels({
|
|
18088
18021
|
schema: {},
|
|
@@ -18096,8 +18029,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18096
18029
|
const itemData = useModel(__props, "data");
|
|
18097
18030
|
return (_ctx, _cache) => {
|
|
18098
18031
|
var _a2;
|
|
18099
|
-
return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
18100
|
-
_ctx.title ? (openBlock(), createBlock(unref(_sfc_main$
|
|
18032
|
+
return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
18033
|
+
_ctx.title ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
18101
18034
|
key: 0,
|
|
18102
18035
|
label: _ctx.title
|
|
18103
18036
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
@@ -18107,7 +18040,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18107
18040
|
}, [
|
|
18108
18041
|
unref(iffer)(field, itemData.value) ? (openBlock(), createElementBlock("div", _hoisted_2$o, [
|
|
18109
18042
|
createElementVNode("div", _hoisted_3$i, toDisplayString((field == null ? void 0 : field.label) || unref(keyToLabel)(field.id)), 1),
|
|
18110
|
-
createVNode(unref(_sfc_main$
|
|
18043
|
+
createVNode(unref(_sfc_main$k), {
|
|
18111
18044
|
field,
|
|
18112
18045
|
modelValue: itemData.value,
|
|
18113
18046
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => itemData.value = $event)
|
|
@@ -18115,14 +18048,14 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18115
18048
|
])) : createCommentVNode("", true)
|
|
18116
18049
|
], 64);
|
|
18117
18050
|
}), 128)),
|
|
18118
|
-
!((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
18051
|
+
!((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_4$b, [
|
|
18119
18052
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(Object.entries(itemData.value), ([key, value]) => {
|
|
18120
18053
|
return openBlock(), createElementBlock("div", {
|
|
18121
18054
|
class: "data-row",
|
|
18122
18055
|
key
|
|
18123
18056
|
}, [
|
|
18124
|
-
createElementVNode("div", _hoisted_5$
|
|
18125
|
-
createElementVNode("div", _hoisted_6$
|
|
18057
|
+
createElementVNode("div", _hoisted_5$9, toDisplayString(unref(keyToLabel)(key)), 1),
|
|
18058
|
+
createElementVNode("div", _hoisted_6$5, toDisplayString(value), 1)
|
|
18126
18059
|
]);
|
|
18127
18060
|
}), 128))
|
|
18128
18061
|
])) : createCommentVNode("", true),
|
|
@@ -18131,8 +18064,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18131
18064
|
};
|
|
18132
18065
|
}
|
|
18133
18066
|
});
|
|
18134
|
-
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18135
|
-
const _sfc_main$
|
|
18067
|
+
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-bb2526f9"]]);
|
|
18068
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
18136
18069
|
__name: "Card",
|
|
18137
18070
|
props: {
|
|
18138
18071
|
thin: { type: Boolean },
|
|
@@ -18159,8 +18092,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
18159
18092
|
};
|
|
18160
18093
|
}
|
|
18161
18094
|
});
|
|
18162
|
-
const _hoisted_1$
|
|
18163
|
-
const _sfc_main$
|
|
18095
|
+
const _hoisted_1$t = ["src", "alt"];
|
|
18096
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
18164
18097
|
__name: "Avatar",
|
|
18165
18098
|
props: {
|
|
18166
18099
|
fallback: {},
|
|
@@ -18178,7 +18111,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
18178
18111
|
key: 0,
|
|
18179
18112
|
src: _ctx.src,
|
|
18180
18113
|
alt: _ctx.name
|
|
18181
|
-
}, null, 8, _hoisted_1$
|
|
18114
|
+
}, null, 8, _hoisted_1$t)) : (openBlock(), createElementBlock("p", {
|
|
18182
18115
|
key: 1,
|
|
18183
18116
|
style: normalizeStyle({ "line-height": `${_ctx.size}px`, "font-size": `calc(1.5rem * ${_ctx.size} / 50)` })
|
|
18184
18117
|
}, toDisplayString(_ctx.fallback || unref(initials)(_ctx.name || "")), 5))
|
|
@@ -18186,8 +18119,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
18186
18119
|
};
|
|
18187
18120
|
}
|
|
18188
18121
|
});
|
|
18189
|
-
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18190
|
-
const _sfc_main$
|
|
18122
|
+
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-c38bc02a"]]);
|
|
18123
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
18191
18124
|
__name: "Title",
|
|
18192
18125
|
props: {
|
|
18193
18126
|
value: {
|
|
@@ -18215,13 +18148,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
18215
18148
|
};
|
|
18216
18149
|
}
|
|
18217
18150
|
});
|
|
18218
|
-
const _sfc_main$
|
|
18151
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
18219
18152
|
__name: "Accordion",
|
|
18220
18153
|
setup(__props) {
|
|
18221
|
-
const
|
|
18154
|
+
const state2 = reactive({
|
|
18222
18155
|
openItem: null
|
|
18223
18156
|
});
|
|
18224
|
-
provide("accordionState",
|
|
18157
|
+
provide("accordionState", state2);
|
|
18225
18158
|
return (_ctx, _cache) => {
|
|
18226
18159
|
return openBlock(), createElementBlock("div", null, [
|
|
18227
18160
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -18229,159 +18162,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
18229
18162
|
};
|
|
18230
18163
|
}
|
|
18231
18164
|
});
|
|
18232
|
-
const _hoisted_1$
|
|
18233
|
-
const _sfc_main$
|
|
18234
|
-
__name: "ComboBox",
|
|
18235
|
-
props: {
|
|
18236
|
-
options: {},
|
|
18237
|
-
placeholder: {},
|
|
18238
|
-
disabled: { type: Boolean },
|
|
18239
|
-
modelValue: {},
|
|
18240
|
-
searchable: { type: Boolean },
|
|
18241
|
-
required: { type: Boolean },
|
|
18242
|
-
label: {},
|
|
18243
|
-
fullWidth: { type: Boolean }
|
|
18244
|
-
},
|
|
18245
|
-
emits: ["update:modelValue"],
|
|
18246
|
-
setup(__props, { emit: __emit }) {
|
|
18247
|
-
let open = ref(false);
|
|
18248
|
-
const searchInput = ref(null);
|
|
18249
|
-
const props2 = __props;
|
|
18250
|
-
let selectedItem = ref();
|
|
18251
|
-
let search = ref("");
|
|
18252
|
-
const toggle = () => {
|
|
18253
|
-
open.value = !open.value;
|
|
18254
|
-
if (!open.value)
|
|
18255
|
-
search.value = "";
|
|
18256
|
-
if (open.value)
|
|
18257
|
-
setTimeout(() => {
|
|
18258
|
-
var _a2, _b, _c;
|
|
18259
|
-
return (_c = (_b = (_a2 = searchInput.value) == null ? void 0 : _a2.$el) == null ? void 0 : _b.querySelector("input")) == null ? void 0 : _c.focus();
|
|
18260
|
-
}, 100);
|
|
18261
|
-
};
|
|
18262
|
-
const valueToLabel = (value) => {
|
|
18263
|
-
if (!value)
|
|
18264
|
-
return "";
|
|
18265
|
-
const option2 = props2.options.find((option22) => {
|
|
18266
|
-
if (typeof option22 === "string" || typeof option22 === "number")
|
|
18267
|
-
return option22 === value;
|
|
18268
|
-
return option22.value === value;
|
|
18269
|
-
});
|
|
18270
|
-
if (!option2)
|
|
18271
|
-
return value;
|
|
18272
|
-
return getLabel(option2);
|
|
18273
|
-
};
|
|
18274
|
-
const emit2 = __emit;
|
|
18275
|
-
const getLabel = (option2) => {
|
|
18276
|
-
if (typeof option2 === "string")
|
|
18277
|
-
return option2;
|
|
18278
|
-
if (typeof option2 === "number")
|
|
18279
|
-
return `${option2}`;
|
|
18280
|
-
return option2.label;
|
|
18281
|
-
};
|
|
18282
|
-
const isSelected = (option2) => {
|
|
18283
|
-
if (typeof option2 === "string" || typeof option2 === "number")
|
|
18284
|
-
return option2 === selectedItem.value;
|
|
18285
|
-
return option2.value === selectedItem.value;
|
|
18286
|
-
};
|
|
18287
|
-
const filteredOptions = computed(() => props2.options.filter((option2) => {
|
|
18288
|
-
const searchTerm = new RegExp(search.value, "gi");
|
|
18289
|
-
if (typeof option2 === "string")
|
|
18290
|
-
return option2.match(searchTerm);
|
|
18291
|
-
if (typeof option2 === "number")
|
|
18292
|
-
return `${option2}`.match(searchTerm);
|
|
18293
|
-
return option2.label.match(searchTerm);
|
|
18294
|
-
}));
|
|
18295
|
-
const select2 = (option2) => {
|
|
18296
|
-
if (typeof option2 === "string")
|
|
18297
|
-
selectedItem.value = option2;
|
|
18298
|
-
else if (typeof option2 === "number")
|
|
18299
|
-
selectedItem.value = option2;
|
|
18300
|
-
else
|
|
18301
|
-
selectedItem.value = option2.value;
|
|
18302
|
-
emit2("update:modelValue", selectedItem.value);
|
|
18303
|
-
open.value = false;
|
|
18304
|
-
};
|
|
18305
|
-
watch(() => props2.modelValue, (value) => {
|
|
18306
|
-
if (value !== selectedItem.value)
|
|
18307
|
-
selectedItem.value = value;
|
|
18308
|
-
}, { immediate: true });
|
|
18309
|
-
return (_ctx, _cache) => {
|
|
18310
|
-
return openBlock(), createBlock(unref(kt$1), {
|
|
18311
|
-
placement: "bottom-start",
|
|
18312
|
-
class: "bagel-input combobox"
|
|
18313
|
-
}, {
|
|
18314
|
-
popper: withCtx(({ hide }) => [
|
|
18315
|
-
createVNode(unref(_sfc_main$q), {
|
|
18316
|
-
class: "combobox-options p-05",
|
|
18317
|
-
style: normalizeStyle({ width: _ctx.fullWidth ? "100%" : "auto" })
|
|
18318
|
-
}, {
|
|
18319
|
-
default: withCtx(() => [
|
|
18320
|
-
_ctx.searchable ? (openBlock(), createBlock(unref(TextInput), {
|
|
18321
|
-
key: 0,
|
|
18322
|
-
ref_key: "searchInput",
|
|
18323
|
-
ref: searchInput,
|
|
18324
|
-
dense: "",
|
|
18325
|
-
placeholder: "Search",
|
|
18326
|
-
icon: "search",
|
|
18327
|
-
modelValue: unref(search),
|
|
18328
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(search) ? search.value = $event : search = $event)
|
|
18329
|
-
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
18330
|
-
(openBlock(true), createElementBlock(Fragment$1, null, renderList(filteredOptions.value, (option2, i2) => {
|
|
18331
|
-
return openBlock(), createElementBlock("div", {
|
|
18332
|
-
class: normalizeClass(["combobox-option hover gap-1", { selected: option2 === unref(selectedItem) }]),
|
|
18333
|
-
key: `${option2}${i2}`,
|
|
18334
|
-
onClick: () => {
|
|
18335
|
-
select2(option2);
|
|
18336
|
-
hide();
|
|
18337
|
-
}
|
|
18338
|
-
}, [
|
|
18339
|
-
isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$F), {
|
|
18340
|
-
key: 0,
|
|
18341
|
-
icon: "check"
|
|
18342
|
-
})) : createCommentVNode("", true),
|
|
18343
|
-
!isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$F), {
|
|
18344
|
-
key: 1,
|
|
18345
|
-
class: "opacity-3",
|
|
18346
|
-
icon: "fiber_manual_record"
|
|
18347
|
-
})) : createCommentVNode("", true),
|
|
18348
|
-
createElementVNode("span", null, toDisplayString(getLabel(option2)), 1)
|
|
18349
|
-
], 10, _hoisted_1$u);
|
|
18350
|
-
}), 128)),
|
|
18351
|
-
renderSlot(_ctx.$slots, "last", {}, void 0, true)
|
|
18352
|
-
]),
|
|
18353
|
-
_: 2
|
|
18354
|
-
}, 1032, ["style"])
|
|
18355
|
-
]),
|
|
18356
|
-
default: withCtx(() => [
|
|
18357
|
-
createElementVNode("label", null, [
|
|
18358
|
-
createTextVNode(toDisplayString(_ctx.label) + " ", 1),
|
|
18359
|
-
createElementVNode("button", {
|
|
18360
|
-
type: "button",
|
|
18361
|
-
class: "combobox-btn",
|
|
18362
|
-
onClick: toggle
|
|
18363
|
-
}, [
|
|
18364
|
-
createTextVNode(toDisplayString(valueToLabel(unref(selectedItem)) || _ctx.placeholder || "Select") + " ", 1),
|
|
18365
|
-
createVNode(unref(_sfc_main$F), normalizeProps(guardReactiveProps({ "icon": unref(open) ? "unfold_less" : "unfold_more" })), null, 16)
|
|
18366
|
-
]),
|
|
18367
|
-
_ctx.required ? withDirectives((openBlock(), createElementBlock("input", {
|
|
18368
|
-
key: 0,
|
|
18369
|
-
style: { "width": "0", "height": "0", "position": "absolute", "opacity": "0", "z-index": "-1" },
|
|
18370
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(selectedItem) ? selectedItem.value = $event : selectedItem = $event),
|
|
18371
|
-
required: ""
|
|
18372
|
-
}, null, 512)), [
|
|
18373
|
-
[vModelText, unref(selectedItem)]
|
|
18374
|
-
]) : createCommentVNode("", true)
|
|
18375
|
-
])
|
|
18376
|
-
]),
|
|
18377
|
-
_: 3
|
|
18378
|
-
});
|
|
18379
|
-
};
|
|
18380
|
-
}
|
|
18381
|
-
});
|
|
18382
|
-
const ComboBox = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-14fbb20b"]]);
|
|
18383
|
-
const _hoisted_1$t = ["dismissable"];
|
|
18384
|
-
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
18165
|
+
const _hoisted_1$s = ["dismissable"];
|
|
18166
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
18385
18167
|
__name: "Alert",
|
|
18386
18168
|
props: {
|
|
18387
18169
|
message: {},
|
|
@@ -18401,7 +18183,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
18401
18183
|
class: normalizeClass(["alert", [_ctx.type]]),
|
|
18402
18184
|
dismissable: _ctx.dismissable
|
|
18403
18185
|
}, [
|
|
18404
|
-
createVNode(unref(_sfc_main$
|
|
18186
|
+
createVNode(unref(_sfc_main$H), {
|
|
18405
18187
|
class: "alert_icon",
|
|
18406
18188
|
icon: _ctx.type,
|
|
18407
18189
|
size: 2,
|
|
@@ -18415,12 +18197,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
18415
18197
|
class: "alert_close",
|
|
18416
18198
|
icon: "close"
|
|
18417
18199
|
})
|
|
18418
|
-
], 10, _hoisted_1$
|
|
18200
|
+
], 10, _hoisted_1$s)) : createCommentVNode("", true);
|
|
18419
18201
|
};
|
|
18420
18202
|
}
|
|
18421
18203
|
});
|
|
18422
|
-
const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18423
|
-
const _sfc_main$
|
|
18204
|
+
const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-94bfcb05"]]);
|
|
18205
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
18424
18206
|
__name: "Badge",
|
|
18425
18207
|
props: {
|
|
18426
18208
|
color: {},
|
|
@@ -18435,13 +18217,13 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
18435
18217
|
return openBlock(), createElementBlock("div", {
|
|
18436
18218
|
class: normalizeClass(["pill", [_ctx.color]])
|
|
18437
18219
|
}, [
|
|
18438
|
-
_ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$
|
|
18220
|
+
_ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
18439
18221
|
key: 0,
|
|
18440
18222
|
class: "inline",
|
|
18441
18223
|
icon: _ctx.icon
|
|
18442
18224
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
18443
18225
|
createTextVNode(" " + toDisplayString(_ctx.text) + " ", 1),
|
|
18444
|
-
props2["icon.end"] ? (openBlock(), createBlock(unref(_sfc_main$
|
|
18226
|
+
props2["icon.end"] ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
18445
18227
|
key: 1,
|
|
18446
18228
|
class: "inline",
|
|
18447
18229
|
icon: props2["icon.end"]
|
|
@@ -18450,11 +18232,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
18450
18232
|
};
|
|
18451
18233
|
}
|
|
18452
18234
|
});
|
|
18453
|
-
const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18454
|
-
const _hoisted_1$
|
|
18235
|
+
const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-10743b06"]]);
|
|
18236
|
+
const _hoisted_1$r = { class: "bgl_vid" };
|
|
18455
18237
|
const _hoisted_2$n = ["src"];
|
|
18456
18238
|
const _hoisted_3$h = ["src", "autoplay", "muted", "loop", "controls"];
|
|
18457
|
-
const _sfc_main$
|
|
18239
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
18458
18240
|
__name: "BglVideo",
|
|
18459
18241
|
props: {
|
|
18460
18242
|
src: {},
|
|
@@ -18493,7 +18275,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
18493
18275
|
});
|
|
18494
18276
|
console.log("Video URL:", videoUrl.value);
|
|
18495
18277
|
return (_ctx, _cache) => {
|
|
18496
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
18278
|
+
return openBlock(), createElementBlock("div", _hoisted_1$r, [
|
|
18497
18279
|
embedType.value ? (openBlock(), createElementBlock("iframe", {
|
|
18498
18280
|
key: 0,
|
|
18499
18281
|
src: videoUrl.value,
|
|
@@ -18515,13 +18297,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
18515
18297
|
};
|
|
18516
18298
|
}
|
|
18517
18299
|
});
|
|
18518
|
-
const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18519
|
-
const _hoisted_1$
|
|
18300
|
+
const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-23835d69"]]);
|
|
18301
|
+
const _hoisted_1$q = {
|
|
18520
18302
|
key: 0,
|
|
18521
18303
|
class: "blocker"
|
|
18522
18304
|
};
|
|
18523
18305
|
const _hoisted_2$m = { class: "Handlers" };
|
|
18524
|
-
const _sfc_main$
|
|
18306
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
18525
18307
|
__name: "Carousel",
|
|
18526
18308
|
props: {
|
|
18527
18309
|
autoHeight: {
|
|
@@ -18671,7 +18453,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
18671
18453
|
ref_key: "bglSlider",
|
|
18672
18454
|
ref: bglSlider
|
|
18673
18455
|
}, [
|
|
18674
|
-
unref(isDragging) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
18456
|
+
unref(isDragging) ? (openBlock(), createElementBlock("div", _hoisted_1$q)) : createCommentVNode("", true),
|
|
18675
18457
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
18676
18458
|
], 34),
|
|
18677
18459
|
createElementVNode("div", _hoisted_2$m, [
|
|
@@ -18686,8 +18468,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
18686
18468
|
};
|
|
18687
18469
|
}
|
|
18688
18470
|
});
|
|
18689
|
-
const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18690
|
-
const _sfc_main$
|
|
18471
|
+
const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-7e8d16cb"]]);
|
|
18472
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
18691
18473
|
__name: "BglForm",
|
|
18692
18474
|
props: {
|
|
18693
18475
|
label: {},
|
|
@@ -18727,7 +18509,6 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
18727
18509
|
let formStatus = ref("idle");
|
|
18728
18510
|
const runSubmit = () => {
|
|
18729
18511
|
var _a2;
|
|
18730
|
-
console.log("runSubmit");
|
|
18731
18512
|
try {
|
|
18732
18513
|
validateForm();
|
|
18733
18514
|
(_a2 = props2.onSubmit) == null ? void 0 : _a2.call(props2, data2.value);
|
|
@@ -18762,7 +18543,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
18762
18543
|
return (_ctx, _cache) => {
|
|
18763
18544
|
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
18764
18545
|
_ctx.id ? (openBlock(true), createElementBlock(Fragment$1, { key: 0 }, renderList(_ctx.schema, (field, i2) => {
|
|
18765
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
18546
|
+
return openBlock(), createBlock(unref(_sfc_main$k), {
|
|
18766
18547
|
key: field.id || `${i2}p`,
|
|
18767
18548
|
field,
|
|
18768
18549
|
modelValue: data2.value,
|
|
@@ -18774,13 +18555,13 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
18774
18555
|
ref: form,
|
|
18775
18556
|
onSubmit: withModifiers(runSubmit, ["prevent"])
|
|
18776
18557
|
}, [
|
|
18777
|
-
_ctx.label ? (openBlock(), createBlock(unref(_sfc_main$
|
|
18558
|
+
_ctx.label ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
18778
18559
|
key: 0,
|
|
18779
18560
|
tag: "h4",
|
|
18780
18561
|
label: _ctx.label
|
|
18781
18562
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
18782
18563
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.schema, (field, i2) => {
|
|
18783
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
18564
|
+
return openBlock(), createBlock(unref(_sfc_main$k), {
|
|
18784
18565
|
key: field.id || `${i2}p`,
|
|
18785
18566
|
field,
|
|
18786
18567
|
modelValue: data2.value,
|
|
@@ -18795,7 +18576,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
18795
18576
|
};
|
|
18796
18577
|
}
|
|
18797
18578
|
});
|
|
18798
|
-
const _sfc_main$
|
|
18579
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
18799
18580
|
__name: "BglField",
|
|
18800
18581
|
props: {
|
|
18801
18582
|
field: {},
|
|
@@ -18808,7 +18589,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
18808
18589
|
if (props2.field.$el === "text")
|
|
18809
18590
|
return TextInput;
|
|
18810
18591
|
if (props2.field.$el === "select")
|
|
18811
|
-
return
|
|
18592
|
+
return SelectInput;
|
|
18812
18593
|
if (props2.field.$el === "toggle")
|
|
18813
18594
|
return ToggleInput;
|
|
18814
18595
|
if (props2.field.$el === "check")
|
|
@@ -18886,7 +18667,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
18886
18667
|
}
|
|
18887
18668
|
});
|
|
18888
18669
|
const _withScopeId$1 = (n2) => (pushScopeId("data-v-e8219826"), n2 = n2(), popScopeId(), n2);
|
|
18889
|
-
const _hoisted_1$
|
|
18670
|
+
const _hoisted_1$p = ["title"];
|
|
18890
18671
|
const _hoisted_2$l = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
18891
18672
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18892
18673
|
height: "24",
|
|
@@ -18898,8 +18679,8 @@ const _hoisted_2$l = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ create
|
|
|
18898
18679
|
const _hoisted_3$g = [
|
|
18899
18680
|
_hoisted_2$l
|
|
18900
18681
|
];
|
|
18901
|
-
const _hoisted_4$
|
|
18902
|
-
const _sfc_main$
|
|
18682
|
+
const _hoisted_4$a = ["required", "id"];
|
|
18683
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
18903
18684
|
__name: "CheckInput",
|
|
18904
18685
|
props: /* @__PURE__ */ mergeModels({
|
|
18905
18686
|
label: {},
|
|
@@ -18929,18 +18710,18 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
18929
18710
|
id: _ctx.id,
|
|
18930
18711
|
type: "checkbox",
|
|
18931
18712
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => checked.value = $event)
|
|
18932
|
-
}, null, 8, _hoisted_4$
|
|
18713
|
+
}, null, 8, _hoisted_4$a), [
|
|
18933
18714
|
[vModelCheckbox, checked.value]
|
|
18934
18715
|
]),
|
|
18935
18716
|
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
18936
18717
|
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
18937
18718
|
], true)
|
|
18938
18719
|
])
|
|
18939
|
-
], 10, _hoisted_1$
|
|
18720
|
+
], 10, _hoisted_1$p);
|
|
18940
18721
|
};
|
|
18941
18722
|
}
|
|
18942
18723
|
});
|
|
18943
|
-
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18724
|
+
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-e8219826"]]);
|
|
18944
18725
|
function toDate(argument) {
|
|
18945
18726
|
const argStr = Object.prototype.toString.call(argument);
|
|
18946
18727
|
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
|
@@ -23810,7 +23591,7 @@ const ar = ({
|
|
|
23810
23591
|
Object.keys(d2).filter((p2) => ["right-sidebar", "left-sidebar"].includes(p2)).map((p2) => [p2, d2[p2]])
|
|
23811
23592
|
)
|
|
23812
23593
|
);
|
|
23813
|
-
render$
|
|
23594
|
+
render$e(o2, z2), M.value = (B2 = o2.el) == null ? void 0 : B2.getBoundingClientRect(), render$e(null, z2), s2.removeChild(z2);
|
|
23814
23595
|
}
|
|
23815
23596
|
};
|
|
23816
23597
|
}, ft = [
|
|
@@ -27549,9 +27330,9 @@ const ar = ({
|
|
|
27549
27330
|
Object.entries(Mo).forEach(([e, t]) => {
|
|
27550
27331
|
e !== "default" && (Va[e] = t);
|
|
27551
27332
|
});
|
|
27552
|
-
const _hoisted_1$
|
|
27333
|
+
const _hoisted_1$o = ["title"];
|
|
27553
27334
|
const _hoisted_2$k = { key: 0 };
|
|
27554
|
-
const _sfc_main$
|
|
27335
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
27555
27336
|
__name: "DateInput",
|
|
27556
27337
|
props: {
|
|
27557
27338
|
label: {},
|
|
@@ -27597,14 +27378,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
27597
27378
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => date2.value = $event),
|
|
27598
27379
|
"enable-time-picker": _ctx.enableTime
|
|
27599
27380
|
}, _ctx.extraProps), null, 16, ["modelValue", "enable-time-picker"])
|
|
27600
|
-
], 10, _hoisted_1$
|
|
27381
|
+
], 10, _hoisted_1$o);
|
|
27601
27382
|
};
|
|
27602
27383
|
}
|
|
27603
27384
|
});
|
|
27604
|
-
const _hoisted_1$
|
|
27385
|
+
const _hoisted_1$n = ["title"];
|
|
27605
27386
|
const _hoisted_2$j = { key: 0 };
|
|
27606
27387
|
const _hoisted_3$f = ["value", "placeholder"];
|
|
27607
|
-
const _sfc_main$
|
|
27388
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
27608
27389
|
__name: "JSONInput",
|
|
27609
27390
|
props: {
|
|
27610
27391
|
description: { default: "" },
|
|
@@ -27636,1384 +27417,168 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
27636
27417
|
class: normalizeClass({ "no-edit": !_ctx.editMode }),
|
|
27637
27418
|
placeholder: _ctx.placeholder
|
|
27638
27419
|
}, null, 42, _hoisted_3$f)
|
|
27639
|
-
], 10, _hoisted_1$
|
|
27420
|
+
], 10, _hoisted_1$n);
|
|
27640
27421
|
};
|
|
27641
27422
|
}
|
|
27642
27423
|
});
|
|
27643
|
-
const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
27644
|
-
|
|
27645
|
-
|
|
27646
|
-
|
|
27647
|
-
if (Array.isArray(opt) && opt.length === 0)
|
|
27648
|
-
return true;
|
|
27649
|
-
return !opt;
|
|
27650
|
-
}
|
|
27651
|
-
function not(fun) {
|
|
27652
|
-
return (...params) => !fun(...params);
|
|
27653
|
-
}
|
|
27654
|
-
function includes(str, query) {
|
|
27655
|
-
if (str === void 0)
|
|
27656
|
-
str = "undefined";
|
|
27657
|
-
if (str === null)
|
|
27658
|
-
str = "null";
|
|
27659
|
-
if (str === false)
|
|
27660
|
-
str = "false";
|
|
27661
|
-
const text = str.toString().toLowerCase();
|
|
27662
|
-
return text.indexOf(query.trim()) !== -1;
|
|
27663
|
-
}
|
|
27664
|
-
function filterOptions(options, search, label, customLabel) {
|
|
27665
|
-
return search ? options.filter((option2) => includes(customLabel(option2, label), search)).sort((a2, b2) => customLabel(a2, label).length - customLabel(b2, label).length) : options;
|
|
27666
|
-
}
|
|
27667
|
-
function stripGroups(options) {
|
|
27668
|
-
return options.filter((option2) => !option2.$isLabel);
|
|
27669
|
-
}
|
|
27670
|
-
function flattenOptions(values3, label) {
|
|
27671
|
-
return (options) => options.reduce((prev, curr) => {
|
|
27672
|
-
if (curr[values3] && curr[values3].length) {
|
|
27673
|
-
prev.push({
|
|
27674
|
-
$groupLabel: curr[label],
|
|
27675
|
-
$isLabel: true
|
|
27676
|
-
});
|
|
27677
|
-
return prev.concat(curr[values3]);
|
|
27678
|
-
}
|
|
27679
|
-
return prev;
|
|
27680
|
-
}, []);
|
|
27681
|
-
}
|
|
27682
|
-
function filterGroups(search, label, values3, groupLabel, customLabel) {
|
|
27683
|
-
return (groups) => groups.map((group) => {
|
|
27684
|
-
if (!group[values3]) {
|
|
27685
|
-
console.warn(`Options passed to vue-multiselect do not contain groups, despite the config.`);
|
|
27686
|
-
return [];
|
|
27687
|
-
}
|
|
27688
|
-
const groupOptions = filterOptions(group[values3], search, label, customLabel);
|
|
27689
|
-
return groupOptions.length ? {
|
|
27690
|
-
[groupLabel]: group[groupLabel],
|
|
27691
|
-
[values3]: groupOptions
|
|
27692
|
-
} : [];
|
|
27693
|
-
});
|
|
27694
|
-
}
|
|
27695
|
-
const flow = (...fns) => (x2) => fns.reduce((v2, f2) => f2(v2), x2);
|
|
27696
|
-
var multiselectMixin = {
|
|
27697
|
-
data() {
|
|
27698
|
-
return {
|
|
27699
|
-
search: "",
|
|
27700
|
-
isOpen: false,
|
|
27701
|
-
preferredOpenDirection: "below",
|
|
27702
|
-
optimizedHeight: this.maxHeight
|
|
27703
|
-
};
|
|
27704
|
-
},
|
|
27705
|
-
props: {
|
|
27706
|
-
/**
|
|
27707
|
-
* Decide whether to filter the results based on search query.
|
|
27708
|
-
* Useful for async filtering, where we search through more complex data.
|
|
27709
|
-
* @type {Boolean}
|
|
27710
|
-
*/
|
|
27711
|
-
internalSearch: {
|
|
27712
|
-
type: Boolean,
|
|
27713
|
-
default: true
|
|
27714
|
-
},
|
|
27715
|
-
/**
|
|
27716
|
-
* Array of available options: Objects, Strings or Integers.
|
|
27717
|
-
* If array of objects, visible label will default to option.label.
|
|
27718
|
-
* If `labal` prop is passed, label will equal option['label']
|
|
27719
|
-
* @type {Array}
|
|
27720
|
-
*/
|
|
27721
|
-
options: {
|
|
27722
|
-
type: Array,
|
|
27723
|
-
required: true
|
|
27724
|
-
},
|
|
27725
|
-
/**
|
|
27726
|
-
* Equivalent to the `multiple` attribute on a `<select>` input.
|
|
27727
|
-
* @default false
|
|
27728
|
-
* @type {Boolean}
|
|
27729
|
-
*/
|
|
27730
|
-
multiple: {
|
|
27731
|
-
type: Boolean,
|
|
27732
|
-
default: false
|
|
27733
|
-
},
|
|
27734
|
-
/**
|
|
27735
|
-
* Key to compare objects
|
|
27736
|
-
* @default 'id'
|
|
27737
|
-
* @type {String}
|
|
27738
|
-
*/
|
|
27739
|
-
trackBy: {
|
|
27740
|
-
type: String
|
|
27741
|
-
},
|
|
27742
|
-
/**
|
|
27743
|
-
* Label to look for in option Object
|
|
27744
|
-
* @default 'label'
|
|
27745
|
-
* @type {String}
|
|
27746
|
-
*/
|
|
27747
|
-
label: {
|
|
27748
|
-
type: String
|
|
27749
|
-
},
|
|
27750
|
-
/**
|
|
27751
|
-
* Enable/disable search in options
|
|
27752
|
-
* @default true
|
|
27753
|
-
* @type {Boolean}
|
|
27754
|
-
*/
|
|
27755
|
-
searchable: {
|
|
27756
|
-
type: Boolean,
|
|
27757
|
-
default: true
|
|
27758
|
-
},
|
|
27759
|
-
/**
|
|
27760
|
-
* Clear the search input after `)
|
|
27761
|
-
* @default true
|
|
27762
|
-
* @type {Boolean}
|
|
27763
|
-
*/
|
|
27764
|
-
clearOnSelect: {
|
|
27765
|
-
type: Boolean,
|
|
27766
|
-
default: true
|
|
27767
|
-
},
|
|
27768
|
-
/**
|
|
27769
|
-
* Hide already selected options
|
|
27770
|
-
* @default false
|
|
27771
|
-
* @type {Boolean}
|
|
27772
|
-
*/
|
|
27773
|
-
hideSelected: {
|
|
27774
|
-
type: Boolean,
|
|
27775
|
-
default: false
|
|
27776
|
-
},
|
|
27777
|
-
/**
|
|
27778
|
-
* Equivalent to the `placeholder` attribute on a `<select>` input.
|
|
27779
|
-
* @default 'Select option'
|
|
27780
|
-
* @type {String}
|
|
27781
|
-
*/
|
|
27782
|
-
placeholder: {
|
|
27783
|
-
type: String,
|
|
27784
|
-
default: "Select option"
|
|
27785
|
-
},
|
|
27786
|
-
/**
|
|
27787
|
-
* Allow to remove all selected values
|
|
27788
|
-
* @default true
|
|
27789
|
-
* @type {Boolean}
|
|
27790
|
-
*/
|
|
27791
|
-
allowEmpty: {
|
|
27792
|
-
type: Boolean,
|
|
27793
|
-
default: true
|
|
27794
|
-
},
|
|
27795
|
-
/**
|
|
27796
|
-
* Reset this.internalValue, this.search after this.internalValue changes.
|
|
27797
|
-
* Useful if want to create a stateless dropdown.
|
|
27798
|
-
* @default false
|
|
27799
|
-
* @type {Boolean}
|
|
27800
|
-
*/
|
|
27801
|
-
resetAfter: {
|
|
27802
|
-
type: Boolean,
|
|
27803
|
-
default: false
|
|
27804
|
-
},
|
|
27805
|
-
/**
|
|
27806
|
-
* Enable/disable closing after selecting an option
|
|
27807
|
-
* @default true
|
|
27808
|
-
* @type {Boolean}
|
|
27809
|
-
*/
|
|
27810
|
-
closeOnSelect: {
|
|
27811
|
-
type: Boolean,
|
|
27812
|
-
default: true
|
|
27813
|
-
},
|
|
27814
|
-
/**
|
|
27815
|
-
* Function to interpolate the custom label
|
|
27816
|
-
* @default false
|
|
27817
|
-
* @type {Function}
|
|
27818
|
-
*/
|
|
27819
|
-
customLabel: {
|
|
27820
|
-
type: Function,
|
|
27821
|
-
default(option2, label) {
|
|
27822
|
-
if (isEmpty(option2))
|
|
27823
|
-
return "";
|
|
27824
|
-
return label ? option2[label] : option2;
|
|
27825
|
-
}
|
|
27826
|
-
},
|
|
27827
|
-
/**
|
|
27828
|
-
* Disable / Enable tagging
|
|
27829
|
-
* @default false
|
|
27830
|
-
* @type {Boolean}
|
|
27831
|
-
*/
|
|
27832
|
-
taggable: {
|
|
27833
|
-
type: Boolean,
|
|
27834
|
-
default: false
|
|
27835
|
-
},
|
|
27836
|
-
/**
|
|
27837
|
-
* String to show when highlighting a potential tag
|
|
27838
|
-
* @default 'Press enter to create a tag'
|
|
27839
|
-
* @type {String}
|
|
27840
|
-
*/
|
|
27841
|
-
tagPlaceholder: {
|
|
27842
|
-
type: String,
|
|
27843
|
-
default: "Press enter to create a tag"
|
|
27844
|
-
},
|
|
27845
|
-
/**
|
|
27846
|
-
* By default new tags will appear above the search results.
|
|
27847
|
-
* Changing to 'bottom' will revert this behaviour
|
|
27848
|
-
* and will proritize the search results
|
|
27849
|
-
* @default 'top'
|
|
27850
|
-
* @type {String}
|
|
27851
|
-
*/
|
|
27852
|
-
tagPosition: {
|
|
27853
|
-
type: String,
|
|
27854
|
-
default: "top"
|
|
27855
|
-
},
|
|
27856
|
-
/**
|
|
27857
|
-
* Number of allowed selected options. No limit if 0.
|
|
27858
|
-
* @default 0
|
|
27859
|
-
* @type {Number}
|
|
27860
|
-
*/
|
|
27861
|
-
max: {
|
|
27862
|
-
type: [Number, Boolean],
|
|
27863
|
-
default: false
|
|
27864
|
-
},
|
|
27865
|
-
/**
|
|
27866
|
-
* Will be passed with all events as second param.
|
|
27867
|
-
* Useful for identifying events origin.
|
|
27868
|
-
* @default null
|
|
27869
|
-
* @type {String|Integer}
|
|
27870
|
-
*/
|
|
27871
|
-
id: {
|
|
27872
|
-
default: null
|
|
27873
|
-
},
|
|
27874
|
-
/**
|
|
27875
|
-
* Limits the options displayed in the dropdown
|
|
27876
|
-
* to the first X options.
|
|
27877
|
-
* @default 1000
|
|
27878
|
-
* @type {Integer}
|
|
27879
|
-
*/
|
|
27880
|
-
optionsLimit: {
|
|
27881
|
-
type: Number,
|
|
27882
|
-
default: 1e3
|
|
27883
|
-
},
|
|
27884
|
-
/**
|
|
27885
|
-
* Name of the property containing
|
|
27886
|
-
* the group values
|
|
27887
|
-
* @default 1000
|
|
27888
|
-
* @type {String}
|
|
27889
|
-
*/
|
|
27890
|
-
groupValues: {
|
|
27891
|
-
type: String
|
|
27892
|
-
},
|
|
27893
|
-
/**
|
|
27894
|
-
* Name of the property containing
|
|
27895
|
-
* the group label
|
|
27896
|
-
* @default 1000
|
|
27897
|
-
* @type {String}
|
|
27898
|
-
*/
|
|
27899
|
-
groupLabel: {
|
|
27900
|
-
type: String
|
|
27901
|
-
},
|
|
27902
|
-
/**
|
|
27903
|
-
* Allow to select all group values
|
|
27904
|
-
* by selecting the group label
|
|
27905
|
-
* @default false
|
|
27906
|
-
* @type {Boolean}
|
|
27907
|
-
*/
|
|
27908
|
-
groupSelect: {
|
|
27909
|
-
type: Boolean,
|
|
27910
|
-
default: false
|
|
27911
|
-
},
|
|
27912
|
-
/**
|
|
27913
|
-
* Array of keyboard keys to block
|
|
27914
|
-
* when selecting
|
|
27915
|
-
* @default 1000
|
|
27916
|
-
* @type {String}
|
|
27917
|
-
*/
|
|
27918
|
-
blockKeys: {
|
|
27919
|
-
type: Array,
|
|
27920
|
-
default() {
|
|
27921
|
-
return [];
|
|
27922
|
-
}
|
|
27923
|
-
},
|
|
27924
|
-
/**
|
|
27925
|
-
* Prevent from wiping up the search value
|
|
27926
|
-
* @default false
|
|
27927
|
-
* @type {Boolean}
|
|
27928
|
-
*/
|
|
27929
|
-
preserveSearch: {
|
|
27930
|
-
type: Boolean,
|
|
27931
|
-
default: false
|
|
27932
|
-
},
|
|
27933
|
-
/**
|
|
27934
|
-
* Select 1st options if value is empty
|
|
27935
|
-
* @default false
|
|
27936
|
-
* @type {Boolean}
|
|
27937
|
-
*/
|
|
27938
|
-
preselectFirst: {
|
|
27939
|
-
type: Boolean,
|
|
27940
|
-
default: false
|
|
27941
|
-
},
|
|
27942
|
-
/**
|
|
27943
|
-
* Prevent autofocus
|
|
27944
|
-
* @default false
|
|
27945
|
-
* @type {Boolean}
|
|
27946
|
-
*/
|
|
27947
|
-
preventAutofocus: {
|
|
27948
|
-
type: Boolean,
|
|
27949
|
-
default: false
|
|
27950
|
-
}
|
|
27951
|
-
},
|
|
27952
|
-
mounted() {
|
|
27953
|
-
if (!this.multiple && this.max) {
|
|
27954
|
-
console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false.");
|
|
27955
|
-
}
|
|
27956
|
-
if (this.preselectFirst && !this.internalValue.length && this.options.length) {
|
|
27957
|
-
this.select(this.filteredOptions[0]);
|
|
27958
|
-
}
|
|
27959
|
-
},
|
|
27960
|
-
computed: {
|
|
27961
|
-
internalValue() {
|
|
27962
|
-
return this.modelValue || this.modelValue === 0 ? Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue] : [];
|
|
27963
|
-
},
|
|
27964
|
-
filteredOptions() {
|
|
27965
|
-
const search = this.search || "";
|
|
27966
|
-
const normalizedSearch = search.toLowerCase().trim();
|
|
27967
|
-
let options = this.options.concat();
|
|
27968
|
-
if (this.internalSearch) {
|
|
27969
|
-
options = this.groupValues ? this.filterAndFlat(options, normalizedSearch, this.label) : filterOptions(options, normalizedSearch, this.label, this.customLabel);
|
|
27970
|
-
} else {
|
|
27971
|
-
options = this.groupValues ? flattenOptions(this.groupValues, this.groupLabel)(options) : options;
|
|
27972
|
-
}
|
|
27973
|
-
options = this.hideSelected ? options.filter(not(this.isSelected)) : options;
|
|
27974
|
-
if (this.taggable && normalizedSearch.length && !this.isExistingOption(normalizedSearch)) {
|
|
27975
|
-
if (this.tagPosition === "bottom") {
|
|
27976
|
-
options.push({ isTag: true, label: search });
|
|
27977
|
-
} else {
|
|
27978
|
-
options.unshift({ isTag: true, label: search });
|
|
27979
|
-
}
|
|
27980
|
-
}
|
|
27981
|
-
return options.slice(0, this.optionsLimit);
|
|
27982
|
-
},
|
|
27983
|
-
valueKeys() {
|
|
27984
|
-
if (this.trackBy) {
|
|
27985
|
-
return this.internalValue.map((element) => element[this.trackBy]);
|
|
27986
|
-
} else {
|
|
27987
|
-
return this.internalValue;
|
|
27988
|
-
}
|
|
27989
|
-
},
|
|
27990
|
-
optionKeys() {
|
|
27991
|
-
const options = this.groupValues ? this.flatAndStrip(this.options) : this.options;
|
|
27992
|
-
return options.map((element) => this.customLabel(element, this.label).toString().toLowerCase());
|
|
27993
|
-
},
|
|
27994
|
-
currentOptionLabel() {
|
|
27995
|
-
return this.multiple ? this.searchable ? "" : this.placeholder : this.internalValue.length ? this.getOptionLabel(this.internalValue[0]) : this.searchable ? "" : this.placeholder;
|
|
27996
|
-
}
|
|
27997
|
-
},
|
|
27998
|
-
watch: {
|
|
27999
|
-
internalValue: {
|
|
28000
|
-
handler() {
|
|
28001
|
-
if (this.resetAfter && this.internalValue.length) {
|
|
28002
|
-
this.search = "";
|
|
28003
|
-
this.$emit("update:modelValue", this.multiple ? [] : null);
|
|
28004
|
-
}
|
|
28005
|
-
},
|
|
28006
|
-
deep: true
|
|
28007
|
-
},
|
|
28008
|
-
search() {
|
|
28009
|
-
this.$emit("search-change", this.search);
|
|
28010
|
-
}
|
|
28011
|
-
},
|
|
28012
|
-
emits: ["open", "search-change", "close", "select", "update:modelValue", "remove", "tag"],
|
|
28013
|
-
methods: {
|
|
28014
|
-
/**
|
|
28015
|
-
* Returns the internalValue in a way it can be emited to the parent
|
|
28016
|
-
* @returns {Object||Array||String||Integer}
|
|
28017
|
-
*/
|
|
28018
|
-
getValue() {
|
|
28019
|
-
return this.multiple ? this.internalValue : this.internalValue.length === 0 ? null : this.internalValue[0];
|
|
28020
|
-
},
|
|
28021
|
-
/**
|
|
28022
|
-
* Filters and then flattens the options list
|
|
28023
|
-
* @param {Array}
|
|
28024
|
-
* @return {Array} returns a filtered and flat options list
|
|
28025
|
-
*/
|
|
28026
|
-
filterAndFlat(options, search, label) {
|
|
28027
|
-
return flow(
|
|
28028
|
-
filterGroups(search, label, this.groupValues, this.groupLabel, this.customLabel),
|
|
28029
|
-
flattenOptions(this.groupValues, this.groupLabel)
|
|
28030
|
-
)(options);
|
|
28031
|
-
},
|
|
28032
|
-
/**
|
|
28033
|
-
* Flattens and then strips the group labels from the options list
|
|
28034
|
-
* @param {Array}
|
|
28035
|
-
* @return {Array} returns a flat options list without group labels
|
|
28036
|
-
*/
|
|
28037
|
-
flatAndStrip(options) {
|
|
28038
|
-
return flow(
|
|
28039
|
-
flattenOptions(this.groupValues, this.groupLabel),
|
|
28040
|
-
stripGroups
|
|
28041
|
-
)(options);
|
|
28042
|
-
},
|
|
28043
|
-
/**
|
|
28044
|
-
* Updates the search value
|
|
28045
|
-
* @param {String}
|
|
28046
|
-
*/
|
|
28047
|
-
updateSearch(query) {
|
|
28048
|
-
this.search = query;
|
|
28049
|
-
},
|
|
28050
|
-
/**
|
|
28051
|
-
* Finds out if the given query is already present
|
|
28052
|
-
* in the available options
|
|
28053
|
-
* @param {String}
|
|
28054
|
-
* @return {Boolean} returns true if element is available
|
|
28055
|
-
*/
|
|
28056
|
-
isExistingOption(query) {
|
|
28057
|
-
return !this.options ? false : this.optionKeys.indexOf(query) > -1;
|
|
28058
|
-
},
|
|
28059
|
-
/**
|
|
28060
|
-
* Finds out if the given element is already present
|
|
28061
|
-
* in the result value
|
|
28062
|
-
* @param {Object||String||Integer} option passed element to check
|
|
28063
|
-
* @returns {Boolean} returns true if element is selected
|
|
28064
|
-
*/
|
|
28065
|
-
isSelected(option2) {
|
|
28066
|
-
const opt = this.trackBy ? option2[this.trackBy] : option2;
|
|
28067
|
-
return this.valueKeys.indexOf(opt) > -1;
|
|
28068
|
-
},
|
|
28069
|
-
/**
|
|
28070
|
-
* Finds out if the given option is disabled
|
|
28071
|
-
* @param {Object||String||Integer} option passed element to check
|
|
28072
|
-
* @returns {Boolean} returns true if element is disabled
|
|
28073
|
-
*/
|
|
28074
|
-
isOptionDisabled(option2) {
|
|
28075
|
-
return !!option2.$isDisabled;
|
|
28076
|
-
},
|
|
28077
|
-
/**
|
|
28078
|
-
* Returns empty string when options is null/undefined
|
|
28079
|
-
* Returns tag query if option is tag.
|
|
28080
|
-
* Returns the customLabel() results and casts it to string.
|
|
28081
|
-
*
|
|
28082
|
-
* @param {Object||String||Integer} Passed option
|
|
28083
|
-
* @returns {Object||String}
|
|
28084
|
-
*/
|
|
28085
|
-
getOptionLabel(option2) {
|
|
28086
|
-
if (isEmpty(option2))
|
|
28087
|
-
return "";
|
|
28088
|
-
if (option2.isTag)
|
|
28089
|
-
return option2.label;
|
|
28090
|
-
if (option2.$isLabel)
|
|
28091
|
-
return option2.$groupLabel;
|
|
28092
|
-
const label = this.customLabel(option2, this.label);
|
|
28093
|
-
if (isEmpty(label))
|
|
28094
|
-
return "";
|
|
28095
|
-
return label;
|
|
28096
|
-
},
|
|
28097
|
-
/**
|
|
28098
|
-
* Add the given option to the list of selected options
|
|
28099
|
-
* or sets the option as the selected option.
|
|
28100
|
-
* If option is already selected -> remove it from the results.
|
|
28101
|
-
*
|
|
28102
|
-
* @param {Object||String||Integer} option to select/deselect
|
|
28103
|
-
* @param {Boolean} block removing
|
|
28104
|
-
*/
|
|
28105
|
-
select(option2, key) {
|
|
28106
|
-
if (option2.$isLabel && this.groupSelect) {
|
|
28107
|
-
this.selectGroup(option2);
|
|
28108
|
-
return;
|
|
28109
|
-
}
|
|
28110
|
-
if (this.blockKeys.indexOf(key) !== -1 || this.disabled || option2.$isDisabled || option2.$isLabel)
|
|
28111
|
-
return;
|
|
28112
|
-
if (this.max && this.multiple && this.internalValue.length === this.max)
|
|
28113
|
-
return;
|
|
28114
|
-
if (key === "Tab" && !this.pointerDirty)
|
|
28115
|
-
return;
|
|
28116
|
-
if (option2.isTag) {
|
|
28117
|
-
this.$emit("tag", option2.label, this.id);
|
|
28118
|
-
this.search = "";
|
|
28119
|
-
if (this.closeOnSelect && !this.multiple)
|
|
28120
|
-
this.deactivate();
|
|
28121
|
-
} else {
|
|
28122
|
-
const isSelected = this.isSelected(option2);
|
|
28123
|
-
if (isSelected) {
|
|
28124
|
-
if (key !== "Tab")
|
|
28125
|
-
this.removeElement(option2);
|
|
28126
|
-
return;
|
|
28127
|
-
}
|
|
28128
|
-
if (this.multiple) {
|
|
28129
|
-
this.$emit("update:modelValue", this.internalValue.concat([option2]));
|
|
28130
|
-
} else {
|
|
28131
|
-
this.$emit("update:modelValue", option2);
|
|
28132
|
-
}
|
|
28133
|
-
this.$emit("select", option2, this.id);
|
|
28134
|
-
if (this.clearOnSelect)
|
|
28135
|
-
this.search = "";
|
|
28136
|
-
}
|
|
28137
|
-
if (this.closeOnSelect)
|
|
28138
|
-
this.deactivate();
|
|
28139
|
-
},
|
|
28140
|
-
/**
|
|
28141
|
-
* Add the given group options to the list of selected options
|
|
28142
|
-
* If all group optiona are already selected -> remove it from the results.
|
|
28143
|
-
*
|
|
28144
|
-
* @param {Object||String||Integer} group to select/deselect
|
|
28145
|
-
*/
|
|
28146
|
-
selectGroup(selectedGroup) {
|
|
28147
|
-
const group = this.options.find((option2) => {
|
|
28148
|
-
return option2[this.groupLabel] === selectedGroup.$groupLabel;
|
|
28149
|
-
});
|
|
28150
|
-
if (!group)
|
|
28151
|
-
return;
|
|
28152
|
-
if (this.wholeGroupSelected(group)) {
|
|
28153
|
-
this.$emit("remove", group[this.groupValues], this.id);
|
|
28154
|
-
const newValue = this.internalValue.filter(
|
|
28155
|
-
(option2) => group[this.groupValues].indexOf(option2) === -1
|
|
28156
|
-
);
|
|
28157
|
-
this.$emit("update:modelValue", newValue);
|
|
28158
|
-
} else {
|
|
28159
|
-
let optionsToAdd = group[this.groupValues].filter(
|
|
28160
|
-
(option2) => !(this.isOptionDisabled(option2) || this.isSelected(option2))
|
|
28161
|
-
);
|
|
28162
|
-
if (this.max) {
|
|
28163
|
-
optionsToAdd.splice(this.max - this.internalValue.length);
|
|
28164
|
-
}
|
|
28165
|
-
this.$emit("select", optionsToAdd, this.id);
|
|
28166
|
-
this.$emit(
|
|
28167
|
-
"update:modelValue",
|
|
28168
|
-
this.internalValue.concat(optionsToAdd)
|
|
28169
|
-
);
|
|
28170
|
-
}
|
|
28171
|
-
if (this.closeOnSelect)
|
|
28172
|
-
this.deactivate();
|
|
28173
|
-
},
|
|
28174
|
-
/**
|
|
28175
|
-
* Helper to identify if all values in a group are selected
|
|
28176
|
-
*
|
|
28177
|
-
* @param {Object} group to validated selected values against
|
|
28178
|
-
*/
|
|
28179
|
-
wholeGroupSelected(group) {
|
|
28180
|
-
return group[this.groupValues].every(
|
|
28181
|
-
(option2) => this.isSelected(option2) || this.isOptionDisabled(option2)
|
|
28182
|
-
);
|
|
28183
|
-
},
|
|
28184
|
-
/**
|
|
28185
|
-
* Helper to identify if all values in a group are disabled
|
|
28186
|
-
*
|
|
28187
|
-
* @param {Object} group to check for disabled values
|
|
28188
|
-
*/
|
|
28189
|
-
wholeGroupDisabled(group) {
|
|
28190
|
-
return group[this.groupValues].every(this.isOptionDisabled);
|
|
28191
|
-
},
|
|
28192
|
-
/**
|
|
28193
|
-
* Removes the given option from the selected options.
|
|
28194
|
-
* Additionally checks this.allowEmpty prop if option can be removed when
|
|
28195
|
-
* it is the last selected option.
|
|
28196
|
-
*
|
|
28197
|
-
* @param {type} option description
|
|
28198
|
-
* @return {type} description
|
|
28199
|
-
*/
|
|
28200
|
-
removeElement(option2, shouldClose = true) {
|
|
28201
|
-
if (this.disabled)
|
|
28202
|
-
return;
|
|
28203
|
-
if (option2.$isDisabled)
|
|
28204
|
-
return;
|
|
28205
|
-
if (!this.allowEmpty && this.internalValue.length <= 1) {
|
|
28206
|
-
this.deactivate();
|
|
28207
|
-
return;
|
|
28208
|
-
}
|
|
28209
|
-
const index2 = typeof option2 === "object" ? this.valueKeys.indexOf(option2[this.trackBy]) : this.valueKeys.indexOf(option2);
|
|
28210
|
-
if (this.multiple) {
|
|
28211
|
-
const newValue = this.internalValue.slice(0, index2).concat(this.internalValue.slice(index2 + 1));
|
|
28212
|
-
this.$emit("update:modelValue", newValue);
|
|
28213
|
-
} else {
|
|
28214
|
-
this.$emit("update:modelValue", null);
|
|
28215
|
-
}
|
|
28216
|
-
this.$emit("remove", option2, this.id);
|
|
28217
|
-
if (this.closeOnSelect && shouldClose)
|
|
28218
|
-
this.deactivate();
|
|
28219
|
-
},
|
|
28220
|
-
/**
|
|
28221
|
-
* Calls this.removeElement() with the last element
|
|
28222
|
-
* from this.internalValue (selected element Array)
|
|
28223
|
-
*
|
|
28224
|
-
* @fires this#removeElement
|
|
28225
|
-
*/
|
|
28226
|
-
removeLastElement() {
|
|
28227
|
-
if (this.blockKeys.indexOf("Delete") !== -1)
|
|
28228
|
-
return;
|
|
28229
|
-
if (this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length) {
|
|
28230
|
-
this.removeElement(this.internalValue[this.internalValue.length - 1], false);
|
|
28231
|
-
}
|
|
28232
|
-
},
|
|
28233
|
-
/**
|
|
28234
|
-
* Opens the multiselect’s dropdown.
|
|
28235
|
-
* Sets this.isOpen to TRUE
|
|
28236
|
-
*/
|
|
28237
|
-
activate() {
|
|
28238
|
-
if (this.isOpen || this.disabled)
|
|
28239
|
-
return;
|
|
28240
|
-
this.adjustPosition();
|
|
28241
|
-
if (this.groupValues && this.pointer === 0 && this.filteredOptions.length) {
|
|
28242
|
-
this.pointer = 1;
|
|
28243
|
-
}
|
|
28244
|
-
this.isOpen = true;
|
|
28245
|
-
if (this.searchable) {
|
|
28246
|
-
if (!this.preserveSearch)
|
|
28247
|
-
this.search = "";
|
|
28248
|
-
if (!this.preventAutofocus)
|
|
28249
|
-
this.$nextTick(() => this.$refs.search && this.$refs.search.focus());
|
|
28250
|
-
} else if (!this.preventAutofocus) {
|
|
28251
|
-
if (typeof this.$el !== "undefined")
|
|
28252
|
-
this.$el.focus();
|
|
28253
|
-
}
|
|
28254
|
-
this.$emit("open", this.id);
|
|
28255
|
-
},
|
|
28256
|
-
/**
|
|
28257
|
-
* Closes the multiselect’s dropdown.
|
|
28258
|
-
* Sets this.isOpen to FALSE
|
|
28259
|
-
*/
|
|
28260
|
-
deactivate() {
|
|
28261
|
-
if (!this.isOpen)
|
|
28262
|
-
return;
|
|
28263
|
-
this.isOpen = false;
|
|
28264
|
-
if (this.searchable) {
|
|
28265
|
-
if (this.$refs.search !== null && typeof this.$refs.search !== "undefined")
|
|
28266
|
-
this.$refs.search.blur();
|
|
28267
|
-
} else {
|
|
28268
|
-
if (typeof this.$el !== "undefined")
|
|
28269
|
-
this.$el.blur();
|
|
28270
|
-
}
|
|
28271
|
-
if (!this.preserveSearch)
|
|
28272
|
-
this.search = "";
|
|
28273
|
-
this.$emit("close", this.getValue(), this.id);
|
|
28274
|
-
},
|
|
28275
|
-
/**
|
|
28276
|
-
* Call this.activate() or this.deactivate()
|
|
28277
|
-
* depending on this.isOpen value.
|
|
28278
|
-
*
|
|
28279
|
-
* @fires this#activate || this#deactivate
|
|
28280
|
-
* @property {Boolean} isOpen indicates if dropdown is open
|
|
28281
|
-
*/
|
|
28282
|
-
toggle() {
|
|
28283
|
-
this.isOpen ? this.deactivate() : this.activate();
|
|
28284
|
-
},
|
|
28285
|
-
/**
|
|
28286
|
-
* Updates the hasEnoughSpace variable used for
|
|
28287
|
-
* detecting where to expand the dropdown
|
|
28288
|
-
*/
|
|
28289
|
-
adjustPosition() {
|
|
28290
|
-
if (typeof window === "undefined")
|
|
28291
|
-
return;
|
|
28292
|
-
const spaceAbove = this.$el.getBoundingClientRect().top;
|
|
28293
|
-
const spaceBelow = window.innerHeight - this.$el.getBoundingClientRect().bottom;
|
|
28294
|
-
const hasEnoughSpaceBelow = spaceBelow > this.maxHeight;
|
|
28295
|
-
if (hasEnoughSpaceBelow || spaceBelow > spaceAbove || this.openDirection === "below" || this.openDirection === "bottom") {
|
|
28296
|
-
this.preferredOpenDirection = "below";
|
|
28297
|
-
this.optimizedHeight = Math.min(spaceBelow - 40, this.maxHeight);
|
|
28298
|
-
} else {
|
|
28299
|
-
this.preferredOpenDirection = "above";
|
|
28300
|
-
this.optimizedHeight = Math.min(spaceAbove - 40, this.maxHeight);
|
|
28301
|
-
}
|
|
28302
|
-
}
|
|
28303
|
-
}
|
|
28304
|
-
};
|
|
28305
|
-
var pointerMixin = {
|
|
28306
|
-
data() {
|
|
28307
|
-
return {
|
|
28308
|
-
pointer: 0,
|
|
28309
|
-
pointerDirty: false
|
|
28310
|
-
};
|
|
28311
|
-
},
|
|
28312
|
-
props: {
|
|
28313
|
-
/**
|
|
28314
|
-
* Enable/disable highlighting of the pointed value.
|
|
28315
|
-
* @type {Boolean}
|
|
28316
|
-
* @default true
|
|
28317
|
-
*/
|
|
28318
|
-
showPointer: {
|
|
28319
|
-
type: Boolean,
|
|
28320
|
-
default: true
|
|
28321
|
-
},
|
|
28322
|
-
optionHeight: {
|
|
28323
|
-
type: Number,
|
|
28324
|
-
default: 40
|
|
28325
|
-
}
|
|
28326
|
-
},
|
|
28327
|
-
computed: {
|
|
28328
|
-
pointerPosition() {
|
|
28329
|
-
return this.pointer * this.optionHeight;
|
|
28330
|
-
},
|
|
28331
|
-
visibleElements() {
|
|
28332
|
-
return this.optimizedHeight / this.optionHeight;
|
|
28333
|
-
}
|
|
28334
|
-
},
|
|
28335
|
-
watch: {
|
|
28336
|
-
filteredOptions() {
|
|
28337
|
-
this.pointerAdjust();
|
|
28338
|
-
},
|
|
28339
|
-
isOpen() {
|
|
28340
|
-
this.pointerDirty = false;
|
|
28341
|
-
},
|
|
28342
|
-
pointer() {
|
|
28343
|
-
this.$refs.search && this.$refs.search.setAttribute("aria-activedescendant", this.id + "-" + this.pointer.toString());
|
|
28344
|
-
}
|
|
28345
|
-
},
|
|
28346
|
-
methods: {
|
|
28347
|
-
optionHighlight(index2, option2) {
|
|
28348
|
-
return {
|
|
28349
|
-
"multiselect__option--highlight": index2 === this.pointer && this.showPointer,
|
|
28350
|
-
"multiselect__option--selected": this.isSelected(option2)
|
|
28351
|
-
};
|
|
28352
|
-
},
|
|
28353
|
-
groupHighlight(index2, selectedGroup) {
|
|
28354
|
-
if (!this.groupSelect) {
|
|
28355
|
-
return [
|
|
28356
|
-
"multiselect__option--disabled",
|
|
28357
|
-
{ "multiselect__option--group": selectedGroup.$isLabel }
|
|
28358
|
-
];
|
|
28359
|
-
}
|
|
28360
|
-
const group = this.options.find((option2) => {
|
|
28361
|
-
return option2[this.groupLabel] === selectedGroup.$groupLabel;
|
|
28362
|
-
});
|
|
28363
|
-
return group && !this.wholeGroupDisabled(group) ? [
|
|
28364
|
-
"multiselect__option--group",
|
|
28365
|
-
{ "multiselect__option--highlight": index2 === this.pointer && this.showPointer },
|
|
28366
|
-
{ "multiselect__option--group-selected": this.wholeGroupSelected(group) }
|
|
28367
|
-
] : "multiselect__option--disabled";
|
|
28368
|
-
},
|
|
28369
|
-
addPointerElement({ key } = "Enter") {
|
|
28370
|
-
if (this.filteredOptions.length > 0) {
|
|
28371
|
-
this.select(this.filteredOptions[this.pointer], key);
|
|
28372
|
-
}
|
|
28373
|
-
this.pointerReset();
|
|
28374
|
-
},
|
|
28375
|
-
pointerForward() {
|
|
28376
|
-
if (this.pointer < this.filteredOptions.length - 1) {
|
|
28377
|
-
this.pointer++;
|
|
28378
|
-
if (this.$refs.list.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight) {
|
|
28379
|
-
this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight;
|
|
28380
|
-
}
|
|
28381
|
-
if (this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect)
|
|
28382
|
-
this.pointerForward();
|
|
28383
|
-
}
|
|
28384
|
-
this.pointerDirty = true;
|
|
28385
|
-
},
|
|
28386
|
-
pointerBackward() {
|
|
28387
|
-
if (this.pointer > 0) {
|
|
28388
|
-
this.pointer--;
|
|
28389
|
-
if (this.$refs.list.scrollTop >= this.pointerPosition) {
|
|
28390
|
-
this.$refs.list.scrollTop = this.pointerPosition;
|
|
28391
|
-
}
|
|
28392
|
-
if (this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect)
|
|
28393
|
-
this.pointerBackward();
|
|
28394
|
-
} else {
|
|
28395
|
-
if (this.filteredOptions[this.pointer] && this.filteredOptions[0].$isLabel && !this.groupSelect)
|
|
28396
|
-
this.pointerForward();
|
|
28397
|
-
}
|
|
28398
|
-
this.pointerDirty = true;
|
|
28399
|
-
},
|
|
28400
|
-
pointerReset() {
|
|
28401
|
-
if (!this.closeOnSelect)
|
|
28402
|
-
return;
|
|
28403
|
-
this.pointer = 0;
|
|
28404
|
-
if (this.$refs.list) {
|
|
28405
|
-
this.$refs.list.scrollTop = 0;
|
|
28406
|
-
}
|
|
28407
|
-
},
|
|
28408
|
-
pointerAdjust() {
|
|
28409
|
-
if (this.pointer >= this.filteredOptions.length - 1) {
|
|
28410
|
-
this.pointer = this.filteredOptions.length ? this.filteredOptions.length - 1 : 0;
|
|
28411
|
-
}
|
|
28412
|
-
if (this.filteredOptions.length > 0 && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect) {
|
|
28413
|
-
this.pointerForward();
|
|
28414
|
-
}
|
|
28415
|
-
},
|
|
28416
|
-
pointerSet(index2) {
|
|
28417
|
-
this.pointer = index2;
|
|
28418
|
-
this.pointerDirty = true;
|
|
28419
|
-
}
|
|
28420
|
-
}
|
|
28421
|
-
};
|
|
28422
|
-
var script$e = {
|
|
28423
|
-
name: "vue-multiselect",
|
|
28424
|
-
mixins: [multiselectMixin, pointerMixin],
|
|
28425
|
-
compatConfig: {
|
|
28426
|
-
MODE: 3,
|
|
28427
|
-
ATTR_ENUMERATED_COERCION: false
|
|
28428
|
-
},
|
|
28429
|
-
props: {
|
|
28430
|
-
/**
|
|
28431
|
-
* name attribute to match optional label element
|
|
28432
|
-
* @default ''
|
|
28433
|
-
* @type {String}
|
|
28434
|
-
*/
|
|
28435
|
-
name: {
|
|
28436
|
-
type: String,
|
|
28437
|
-
default: ""
|
|
28438
|
-
},
|
|
28439
|
-
/**
|
|
28440
|
-
* Presets the selected options value.
|
|
28441
|
-
* @type {Object||Array||String||Integer}
|
|
28442
|
-
*/
|
|
28443
|
-
modelValue: {
|
|
28444
|
-
type: null,
|
|
28445
|
-
default() {
|
|
28446
|
-
return [];
|
|
28447
|
-
}
|
|
28448
|
-
},
|
|
28449
|
-
/**
|
|
28450
|
-
* String to show when pointing to an option
|
|
28451
|
-
* @default 'Press enter to select'
|
|
28452
|
-
* @type {String}
|
|
28453
|
-
*/
|
|
28454
|
-
selectLabel: {
|
|
28455
|
-
type: String,
|
|
28456
|
-
default: "Press enter to select"
|
|
28457
|
-
},
|
|
28458
|
-
/**
|
|
28459
|
-
* String to show when pointing to an option
|
|
28460
|
-
* @default 'Press enter to select'
|
|
28461
|
-
* @type {String}
|
|
28462
|
-
*/
|
|
28463
|
-
selectGroupLabel: {
|
|
28464
|
-
type: String,
|
|
28465
|
-
default: "Press enter to select group"
|
|
28466
|
-
},
|
|
28467
|
-
/**
|
|
28468
|
-
* String to show next to selected option
|
|
28469
|
-
* @default 'Selected'
|
|
28470
|
-
* @type {String}
|
|
28471
|
-
*/
|
|
28472
|
-
selectedLabel: {
|
|
28473
|
-
type: String,
|
|
28474
|
-
default: "Selected"
|
|
28475
|
-
},
|
|
28476
|
-
/**
|
|
28477
|
-
* String to show when pointing to an already selected option
|
|
28478
|
-
* @default 'Press enter to remove'
|
|
28479
|
-
* @type {String}
|
|
28480
|
-
*/
|
|
28481
|
-
deselectLabel: {
|
|
28482
|
-
type: String,
|
|
28483
|
-
default: "Press enter to remove"
|
|
28484
|
-
},
|
|
28485
|
-
/**
|
|
28486
|
-
* String to show when pointing to an already selected option
|
|
28487
|
-
* @default 'Press enter to remove'
|
|
28488
|
-
* @type {String}
|
|
28489
|
-
*/
|
|
28490
|
-
deselectGroupLabel: {
|
|
28491
|
-
type: String,
|
|
28492
|
-
default: "Press enter to deselect group"
|
|
28493
|
-
},
|
|
28494
|
-
/**
|
|
28495
|
-
* Decide whether to show pointer labels
|
|
28496
|
-
* @default true
|
|
28497
|
-
* @type {Boolean}
|
|
28498
|
-
*/
|
|
28499
|
-
showLabels: {
|
|
28500
|
-
type: Boolean,
|
|
28501
|
-
default: true
|
|
28502
|
-
},
|
|
28503
|
-
/**
|
|
28504
|
-
* Limit the display of selected options. The rest will be hidden within the limitText string.
|
|
28505
|
-
* @default 99999
|
|
28506
|
-
* @type {Integer}
|
|
28507
|
-
*/
|
|
28508
|
-
limit: {
|
|
28509
|
-
type: Number,
|
|
28510
|
-
default: 99999
|
|
28511
|
-
},
|
|
28512
|
-
/**
|
|
28513
|
-
* Sets maxHeight style value of the dropdown
|
|
28514
|
-
* @default 300
|
|
28515
|
-
* @type {Integer}
|
|
28516
|
-
*/
|
|
28517
|
-
maxHeight: {
|
|
28518
|
-
type: Number,
|
|
28519
|
-
default: 300
|
|
28520
|
-
},
|
|
28521
|
-
/**
|
|
28522
|
-
* Function that process the message shown when selected
|
|
28523
|
-
* elements pass the defined limit.
|
|
28524
|
-
* @default 'and * more'
|
|
28525
|
-
* @param {Int} count Number of elements more than limit
|
|
28526
|
-
* @type {Function}
|
|
28527
|
-
*/
|
|
28528
|
-
limitText: {
|
|
28529
|
-
type: Function,
|
|
28530
|
-
default: (count2) => `and ${count2} more`
|
|
28531
|
-
},
|
|
28532
|
-
/**
|
|
28533
|
-
* Set true to trigger the loading spinner.
|
|
28534
|
-
* @default False
|
|
28535
|
-
* @type {Boolean}
|
|
28536
|
-
*/
|
|
28537
|
-
loading: {
|
|
28538
|
-
type: Boolean,
|
|
28539
|
-
default: false
|
|
28540
|
-
},
|
|
28541
|
-
/**
|
|
28542
|
-
* Disables the multiselect if true.
|
|
28543
|
-
* @default false
|
|
28544
|
-
* @type {Boolean}
|
|
28545
|
-
*/
|
|
28546
|
-
disabled: {
|
|
28547
|
-
type: Boolean,
|
|
28548
|
-
default: false
|
|
28549
|
-
},
|
|
28550
|
-
/**
|
|
28551
|
-
* Fixed opening direction
|
|
28552
|
-
* @default ''
|
|
28553
|
-
* @type {String}
|
|
28554
|
-
*/
|
|
28555
|
-
openDirection: {
|
|
28556
|
-
type: String,
|
|
28557
|
-
default: ""
|
|
28558
|
-
},
|
|
28559
|
-
/**
|
|
28560
|
-
* Shows slot with message about empty options
|
|
28561
|
-
* @default true
|
|
28562
|
-
* @type {Boolean}
|
|
28563
|
-
*/
|
|
28564
|
-
showNoOptions: {
|
|
28565
|
-
type: Boolean,
|
|
28566
|
-
default: true
|
|
28567
|
-
},
|
|
28568
|
-
showNoResults: {
|
|
28569
|
-
type: Boolean,
|
|
28570
|
-
default: true
|
|
28571
|
-
},
|
|
28572
|
-
tabindex: {
|
|
28573
|
-
type: Number,
|
|
28574
|
-
default: 0
|
|
28575
|
-
}
|
|
28576
|
-
},
|
|
28577
|
-
computed: {
|
|
28578
|
-
hasOptionGroup() {
|
|
28579
|
-
return this.groupValues && this.groupLabel && this.groupSelect;
|
|
28580
|
-
},
|
|
28581
|
-
isSingleLabelVisible() {
|
|
28582
|
-
return (this.singleValue || this.singleValue === 0) && (!this.isOpen || !this.searchable) && !this.visibleValues.length;
|
|
28583
|
-
},
|
|
28584
|
-
isPlaceholderVisible() {
|
|
28585
|
-
return !this.internalValue.length && (!this.searchable || !this.isOpen);
|
|
28586
|
-
},
|
|
28587
|
-
visibleValues() {
|
|
28588
|
-
return this.multiple ? this.internalValue.slice(0, this.limit) : [];
|
|
28589
|
-
},
|
|
28590
|
-
singleValue() {
|
|
28591
|
-
return this.internalValue[0];
|
|
28592
|
-
},
|
|
28593
|
-
deselectLabelText() {
|
|
28594
|
-
return this.showLabels ? this.deselectLabel : "";
|
|
28595
|
-
},
|
|
28596
|
-
deselectGroupLabelText() {
|
|
28597
|
-
return this.showLabels ? this.deselectGroupLabel : "";
|
|
28598
|
-
},
|
|
28599
|
-
selectLabelText() {
|
|
28600
|
-
return this.showLabels ? this.selectLabel : "";
|
|
28601
|
-
},
|
|
28602
|
-
selectGroupLabelText() {
|
|
28603
|
-
return this.showLabels ? this.selectGroupLabel : "";
|
|
28604
|
-
},
|
|
28605
|
-
selectedLabelText() {
|
|
28606
|
-
return this.showLabels ? this.selectedLabel : "";
|
|
28607
|
-
},
|
|
28608
|
-
inputStyle() {
|
|
28609
|
-
if (this.searchable || this.multiple && this.modelValue && this.modelValue.length) {
|
|
28610
|
-
return this.isOpen ? { width: "100%" } : { width: "0", position: "absolute", padding: "0" };
|
|
28611
|
-
}
|
|
28612
|
-
return "";
|
|
28613
|
-
},
|
|
28614
|
-
contentStyle() {
|
|
28615
|
-
return this.options.length ? { display: "inline-block" } : { display: "block" };
|
|
28616
|
-
},
|
|
28617
|
-
isAbove() {
|
|
28618
|
-
if (this.openDirection === "above" || this.openDirection === "top") {
|
|
28619
|
-
return true;
|
|
28620
|
-
} else if (this.openDirection === "below" || this.openDirection === "bottom") {
|
|
28621
|
-
return false;
|
|
28622
|
-
} else {
|
|
28623
|
-
return this.preferredOpenDirection === "above";
|
|
28624
|
-
}
|
|
28625
|
-
},
|
|
28626
|
-
showSearchInput() {
|
|
28627
|
-
return this.searchable && (this.hasSingleSelectedSlot && (this.visibleSingleValue || this.visibleSingleValue === 0) ? this.isOpen : true);
|
|
28628
|
-
}
|
|
28629
|
-
}
|
|
28630
|
-
};
|
|
28631
|
-
const _hoisted_1$n = {
|
|
28632
|
-
ref: "tags",
|
|
28633
|
-
class: "multiselect__tags"
|
|
28634
|
-
};
|
|
28635
|
-
const _hoisted_2$i = { class: "multiselect__tags-wrap" };
|
|
28636
|
-
const _hoisted_3$e = { class: "multiselect__spinner" };
|
|
28637
|
-
const _hoisted_4$a = { key: 0 };
|
|
28638
|
-
const _hoisted_5$9 = { class: "multiselect__option" };
|
|
28639
|
-
const _hoisted_6$5 = { class: "multiselect__option" };
|
|
28640
|
-
const _hoisted_7$2 = /* @__PURE__ */ createTextVNode("No elements found. Consider changing the search query.");
|
|
28641
|
-
const _hoisted_8$1 = { class: "multiselect__option" };
|
|
28642
|
-
const _hoisted_9$1 = /* @__PURE__ */ createTextVNode("List is empty.");
|
|
28643
|
-
function render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
28644
|
-
return openBlock(), createBlock("div", {
|
|
28645
|
-
tabindex: _ctx.searchable ? -1 : $props.tabindex,
|
|
28646
|
-
class: [{ "multiselect--active": _ctx.isOpen, "multiselect--disabled": $props.disabled, "multiselect--above": $options.isAbove, "multiselect--has-options-group": $options.hasOptionGroup }, "multiselect"],
|
|
28647
|
-
onFocus: _cache[14] || (_cache[14] = ($event) => _ctx.activate()),
|
|
28648
|
-
onBlur: _cache[15] || (_cache[15] = ($event) => _ctx.searchable ? false : _ctx.deactivate()),
|
|
28649
|
-
onKeydown: [
|
|
28650
|
-
_cache[16] || (_cache[16] = withKeys(withModifiers(($event) => _ctx.pointerForward(), ["self", "prevent"]), ["down"])),
|
|
28651
|
-
_cache[17] || (_cache[17] = withKeys(withModifiers(($event) => _ctx.pointerBackward(), ["self", "prevent"]), ["up"]))
|
|
28652
|
-
],
|
|
28653
|
-
onKeypress: _cache[18] || (_cache[18] = withKeys(withModifiers(($event) => _ctx.addPointerElement($event), ["stop", "self"]), ["enter", "tab"])),
|
|
28654
|
-
onKeyup: _cache[19] || (_cache[19] = withKeys(($event) => _ctx.deactivate(), ["esc"])),
|
|
28655
|
-
role: "combobox",
|
|
28656
|
-
"aria-owns": "listbox-" + _ctx.id
|
|
28657
|
-
}, [
|
|
28658
|
-
renderSlot(_ctx.$slots, "caret", { toggle: _ctx.toggle }, () => [
|
|
28659
|
-
createVNode(
|
|
28660
|
-
"div",
|
|
28661
|
-
{
|
|
28662
|
-
onMousedown: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.toggle(), ["prevent", "stop"])),
|
|
28663
|
-
class: "multiselect__select"
|
|
28664
|
-
},
|
|
28665
|
-
null,
|
|
28666
|
-
32
|
|
28667
|
-
/* HYDRATE_EVENTS */
|
|
28668
|
-
)
|
|
28669
|
-
]),
|
|
28670
|
-
renderSlot(_ctx.$slots, "clear", { search: _ctx.search }),
|
|
28671
|
-
createVNode(
|
|
28672
|
-
"div",
|
|
28673
|
-
_hoisted_1$n,
|
|
28674
|
-
[
|
|
28675
|
-
renderSlot(_ctx.$slots, "selection", {
|
|
28676
|
-
search: _ctx.search,
|
|
28677
|
-
remove: _ctx.removeElement,
|
|
28678
|
-
values: $options.visibleValues,
|
|
28679
|
-
isOpen: _ctx.isOpen
|
|
28680
|
-
}, () => [
|
|
28681
|
-
withDirectives(createVNode(
|
|
28682
|
-
"div",
|
|
28683
|
-
_hoisted_2$i,
|
|
28684
|
-
[
|
|
28685
|
-
(openBlock(true), createBlock(
|
|
28686
|
-
Fragment$1,
|
|
28687
|
-
null,
|
|
28688
|
-
renderList($options.visibleValues, (option2, index2) => {
|
|
28689
|
-
return renderSlot(_ctx.$slots, "tag", {
|
|
28690
|
-
option: option2,
|
|
28691
|
-
search: _ctx.search,
|
|
28692
|
-
remove: _ctx.removeElement
|
|
28693
|
-
}, () => [
|
|
28694
|
-
(openBlock(), createBlock("span", {
|
|
28695
|
-
class: "multiselect__tag",
|
|
28696
|
-
key: index2
|
|
28697
|
-
}, [
|
|
28698
|
-
createVNode("span", {
|
|
28699
|
-
textContent: toDisplayString(_ctx.getOptionLabel(option2))
|
|
28700
|
-
}, null, 8, ["textContent"]),
|
|
28701
|
-
createVNode("i", {
|
|
28702
|
-
tabindex: "1",
|
|
28703
|
-
onKeypress: withKeys(withModifiers(($event) => _ctx.removeElement(option2), ["prevent"]), ["enter"]),
|
|
28704
|
-
onMousedown: withModifiers(($event) => _ctx.removeElement(option2), ["prevent"]),
|
|
28705
|
-
class: "multiselect__tag-icon"
|
|
28706
|
-
}, null, 40, ["onKeypress", "onMousedown"])
|
|
28707
|
-
]))
|
|
28708
|
-
]);
|
|
28709
|
-
}),
|
|
28710
|
-
256
|
|
28711
|
-
/* UNKEYED_FRAGMENT */
|
|
28712
|
-
))
|
|
28713
|
-
],
|
|
28714
|
-
512
|
|
28715
|
-
/* NEED_PATCH */
|
|
28716
|
-
), [
|
|
28717
|
-
[vShow, $options.visibleValues.length > 0]
|
|
28718
|
-
]),
|
|
28719
|
-
_ctx.internalValue && _ctx.internalValue.length > $props.limit ? renderSlot(_ctx.$slots, "limit", { key: 0 }, () => [
|
|
28720
|
-
createVNode("strong", {
|
|
28721
|
-
class: "multiselect__strong",
|
|
28722
|
-
textContent: toDisplayString($props.limitText(_ctx.internalValue.length - $props.limit))
|
|
28723
|
-
}, null, 8, ["textContent"])
|
|
28724
|
-
]) : createCommentVNode("v-if", true)
|
|
28725
|
-
]),
|
|
28726
|
-
createVNode(Transition, { name: "multiselect__loading" }, {
|
|
28727
|
-
default: withCtx(() => [
|
|
28728
|
-
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
28729
|
-
withDirectives(createVNode(
|
|
28730
|
-
"div",
|
|
28731
|
-
_hoisted_3$e,
|
|
28732
|
-
null,
|
|
28733
|
-
512
|
|
28734
|
-
/* NEED_PATCH */
|
|
28735
|
-
), [
|
|
28736
|
-
[vShow, $props.loading]
|
|
28737
|
-
])
|
|
28738
|
-
])
|
|
28739
|
-
]),
|
|
28740
|
-
_: 3
|
|
28741
|
-
/* FORWARDED */
|
|
28742
|
-
}),
|
|
28743
|
-
_ctx.searchable ? (openBlock(), createBlock("input", {
|
|
28744
|
-
key: 0,
|
|
28745
|
-
ref: "search",
|
|
28746
|
-
name: $props.name,
|
|
28747
|
-
id: _ctx.id,
|
|
28748
|
-
type: "text",
|
|
28749
|
-
autocomplete: "off",
|
|
28750
|
-
spellcheck: false,
|
|
28751
|
-
placeholder: _ctx.placeholder,
|
|
28752
|
-
style: $options.inputStyle,
|
|
28753
|
-
value: _ctx.search,
|
|
28754
|
-
disabled: $props.disabled,
|
|
28755
|
-
tabindex: $props.tabindex,
|
|
28756
|
-
onInput: _cache[2] || (_cache[2] = ($event) => _ctx.updateSearch($event.target.value)),
|
|
28757
|
-
onFocus: _cache[3] || (_cache[3] = withModifiers(($event) => _ctx.activate(), ["prevent"])),
|
|
28758
|
-
onBlur: _cache[4] || (_cache[4] = withModifiers(($event) => _ctx.deactivate(), ["prevent"])),
|
|
28759
|
-
onKeyup: _cache[5] || (_cache[5] = withKeys(($event) => _ctx.deactivate(), ["esc"])),
|
|
28760
|
-
onKeydown: [
|
|
28761
|
-
_cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.pointerForward(), ["prevent"]), ["down"])),
|
|
28762
|
-
_cache[7] || (_cache[7] = withKeys(withModifiers(($event) => _ctx.pointerBackward(), ["prevent"]), ["up"])),
|
|
28763
|
-
_cache[9] || (_cache[9] = withKeys(withModifiers(($event) => _ctx.removeLastElement(), ["stop"]), ["delete"]))
|
|
28764
|
-
],
|
|
28765
|
-
onKeypress: _cache[8] || (_cache[8] = withKeys(withModifiers(($event) => _ctx.addPointerElement($event), ["prevent", "stop", "self"]), ["enter"])),
|
|
28766
|
-
class: "multiselect__input",
|
|
28767
|
-
"aria-controls": "listbox-" + _ctx.id
|
|
28768
|
-
}, null, 44, ["name", "id", "placeholder", "value", "disabled", "tabindex", "aria-controls"])) : createCommentVNode("v-if", true),
|
|
28769
|
-
$options.isSingleLabelVisible ? (openBlock(), createBlock(
|
|
28770
|
-
"span",
|
|
28771
|
-
{
|
|
28772
|
-
key: 1,
|
|
28773
|
-
class: "multiselect__single",
|
|
28774
|
-
onMousedown: _cache[10] || (_cache[10] = withModifiers((...args) => _ctx.toggle && _ctx.toggle(...args), ["prevent"]))
|
|
28775
|
-
},
|
|
28776
|
-
[
|
|
28777
|
-
renderSlot(_ctx.$slots, "singleLabel", { option: $options.singleValue }, () => [
|
|
28778
|
-
createTextVNode(
|
|
28779
|
-
toDisplayString(_ctx.currentOptionLabel),
|
|
28780
|
-
1
|
|
28781
|
-
/* TEXT */
|
|
28782
|
-
)
|
|
28783
|
-
])
|
|
28784
|
-
],
|
|
28785
|
-
32
|
|
28786
|
-
/* HYDRATE_EVENTS */
|
|
28787
|
-
)) : createCommentVNode("v-if", true),
|
|
28788
|
-
$options.isPlaceholderVisible ? (openBlock(), createBlock(
|
|
28789
|
-
"span",
|
|
28790
|
-
{
|
|
28791
|
-
key: 2,
|
|
28792
|
-
class: "multiselect__placeholder",
|
|
28793
|
-
onMousedown: _cache[11] || (_cache[11] = withModifiers((...args) => _ctx.toggle && _ctx.toggle(...args), ["prevent"]))
|
|
28794
|
-
},
|
|
28795
|
-
[
|
|
28796
|
-
renderSlot(_ctx.$slots, "placeholder", {}, () => [
|
|
28797
|
-
createTextVNode(
|
|
28798
|
-
toDisplayString(_ctx.placeholder),
|
|
28799
|
-
1
|
|
28800
|
-
/* TEXT */
|
|
28801
|
-
)
|
|
28802
|
-
])
|
|
28803
|
-
],
|
|
28804
|
-
32
|
|
28805
|
-
/* HYDRATE_EVENTS */
|
|
28806
|
-
)) : createCommentVNode("v-if", true)
|
|
28807
|
-
],
|
|
28808
|
-
512
|
|
28809
|
-
/* NEED_PATCH */
|
|
28810
|
-
),
|
|
28811
|
-
createVNode(Transition, { name: "multiselect" }, {
|
|
28812
|
-
default: withCtx(() => [
|
|
28813
|
-
withDirectives(createVNode(
|
|
28814
|
-
"div",
|
|
28815
|
-
{
|
|
28816
|
-
class: "multiselect__content-wrapper",
|
|
28817
|
-
onFocus: _cache[12] || (_cache[12] = (...args) => _ctx.activate && _ctx.activate(...args)),
|
|
28818
|
-
tabindex: "-1",
|
|
28819
|
-
onMousedown: _cache[13] || (_cache[13] = withModifiers(() => {
|
|
28820
|
-
}, ["prevent"])),
|
|
28821
|
-
style: { maxHeight: _ctx.optimizedHeight + "px" },
|
|
28822
|
-
ref: "list"
|
|
28823
|
-
},
|
|
28824
|
-
[
|
|
28825
|
-
createVNode("ul", {
|
|
28826
|
-
class: "multiselect__content",
|
|
28827
|
-
style: $options.contentStyle,
|
|
28828
|
-
role: "listbox",
|
|
28829
|
-
id: "listbox-" + _ctx.id
|
|
28830
|
-
}, [
|
|
28831
|
-
renderSlot(_ctx.$slots, "beforeList"),
|
|
28832
|
-
_ctx.multiple && _ctx.max === _ctx.internalValue.length ? (openBlock(), createBlock("li", _hoisted_4$a, [
|
|
28833
|
-
createVNode("span", _hoisted_5$9, [
|
|
28834
|
-
renderSlot(_ctx.$slots, "maxElements", {}, () => [
|
|
28835
|
-
createTextVNode(
|
|
28836
|
-
"Maximum of " + toDisplayString(_ctx.max) + " options selected. First remove a selected option to select another.",
|
|
28837
|
-
1
|
|
28838
|
-
/* TEXT */
|
|
28839
|
-
)
|
|
28840
|
-
])
|
|
28841
|
-
])
|
|
28842
|
-
])) : createCommentVNode("v-if", true),
|
|
28843
|
-
!_ctx.max || _ctx.internalValue.length < _ctx.max ? (openBlock(true), createBlock(
|
|
28844
|
-
Fragment$1,
|
|
28845
|
-
{ key: 1 },
|
|
28846
|
-
renderList(_ctx.filteredOptions, (option2, index2) => {
|
|
28847
|
-
return openBlock(), createBlock("li", {
|
|
28848
|
-
class: "multiselect__element",
|
|
28849
|
-
key: index2,
|
|
28850
|
-
id: _ctx.id + "-" + index2,
|
|
28851
|
-
role: !(option2 && (option2.$isLabel || option2.$isDisabled)) ? "option" : null
|
|
28852
|
-
}, [
|
|
28853
|
-
!(option2 && (option2.$isLabel || option2.$isDisabled)) ? (openBlock(), createBlock("span", {
|
|
28854
|
-
key: 0,
|
|
28855
|
-
class: [_ctx.optionHighlight(index2, option2), "multiselect__option"],
|
|
28856
|
-
onClick: withModifiers(($event) => _ctx.select(option2), ["stop"]),
|
|
28857
|
-
onMouseenter: withModifiers(($event) => _ctx.pointerSet(index2), ["self"]),
|
|
28858
|
-
"data-select": option2 && option2.isTag ? _ctx.tagPlaceholder : $options.selectLabelText,
|
|
28859
|
-
"data-selected": $options.selectedLabelText,
|
|
28860
|
-
"data-deselect": $options.deselectLabelText
|
|
28861
|
-
}, [
|
|
28862
|
-
renderSlot(_ctx.$slots, "option", {
|
|
28863
|
-
option: option2,
|
|
28864
|
-
search: _ctx.search,
|
|
28865
|
-
index: index2
|
|
28866
|
-
}, () => [
|
|
28867
|
-
createVNode(
|
|
28868
|
-
"span",
|
|
28869
|
-
null,
|
|
28870
|
-
toDisplayString(_ctx.getOptionLabel(option2)),
|
|
28871
|
-
1
|
|
28872
|
-
/* TEXT */
|
|
28873
|
-
)
|
|
28874
|
-
])
|
|
28875
|
-
], 42, ["onClick", "onMouseenter", "data-select", "data-selected", "data-deselect"])) : createCommentVNode("v-if", true),
|
|
28876
|
-
option2 && (option2.$isLabel || option2.$isDisabled) ? (openBlock(), createBlock("span", {
|
|
28877
|
-
key: 1,
|
|
28878
|
-
"data-select": _ctx.groupSelect && $options.selectGroupLabelText,
|
|
28879
|
-
"data-deselect": _ctx.groupSelect && $options.deselectGroupLabelText,
|
|
28880
|
-
class: [_ctx.groupHighlight(index2, option2), "multiselect__option"],
|
|
28881
|
-
onMouseenter: withModifiers(($event) => _ctx.groupSelect && _ctx.pointerSet(index2), ["self"]),
|
|
28882
|
-
onMousedown: withModifiers(($event) => _ctx.selectGroup(option2), ["prevent"])
|
|
28883
|
-
}, [
|
|
28884
|
-
renderSlot(_ctx.$slots, "option", {
|
|
28885
|
-
option: option2,
|
|
28886
|
-
search: _ctx.search,
|
|
28887
|
-
index: index2
|
|
28888
|
-
}, () => [
|
|
28889
|
-
createVNode(
|
|
28890
|
-
"span",
|
|
28891
|
-
null,
|
|
28892
|
-
toDisplayString(_ctx.getOptionLabel(option2)),
|
|
28893
|
-
1
|
|
28894
|
-
/* TEXT */
|
|
28895
|
-
)
|
|
28896
|
-
])
|
|
28897
|
-
], 42, ["data-select", "data-deselect", "onMouseenter", "onMousedown"])) : createCommentVNode("v-if", true)
|
|
28898
|
-
], 8, ["id", "role"]);
|
|
28899
|
-
}),
|
|
28900
|
-
128
|
|
28901
|
-
/* KEYED_FRAGMENT */
|
|
28902
|
-
)) : createCommentVNode("v-if", true),
|
|
28903
|
-
withDirectives(createVNode(
|
|
28904
|
-
"li",
|
|
28905
|
-
null,
|
|
28906
|
-
[
|
|
28907
|
-
createVNode("span", _hoisted_6$5, [
|
|
28908
|
-
renderSlot(_ctx.$slots, "noResult", { search: _ctx.search }, () => [
|
|
28909
|
-
_hoisted_7$2
|
|
28910
|
-
])
|
|
28911
|
-
])
|
|
28912
|
-
],
|
|
28913
|
-
512
|
|
28914
|
-
/* NEED_PATCH */
|
|
28915
|
-
), [
|
|
28916
|
-
[vShow, $props.showNoResults && (_ctx.filteredOptions.length === 0 && _ctx.search && !$props.loading)]
|
|
28917
|
-
]),
|
|
28918
|
-
withDirectives(createVNode(
|
|
28919
|
-
"li",
|
|
28920
|
-
null,
|
|
28921
|
-
[
|
|
28922
|
-
createVNode("span", _hoisted_8$1, [
|
|
28923
|
-
renderSlot(_ctx.$slots, "noOptions", {}, () => [
|
|
28924
|
-
_hoisted_9$1
|
|
28925
|
-
])
|
|
28926
|
-
])
|
|
28927
|
-
],
|
|
28928
|
-
512
|
|
28929
|
-
/* NEED_PATCH */
|
|
28930
|
-
), [
|
|
28931
|
-
[vShow, $props.showNoOptions && ((_ctx.options.length === 0 || $options.hasOptionGroup === true && _ctx.filteredOptions.length === 0) && !_ctx.search && !$props.loading)]
|
|
28932
|
-
]),
|
|
28933
|
-
renderSlot(_ctx.$slots, "afterList")
|
|
28934
|
-
], 12, ["id"])
|
|
28935
|
-
],
|
|
28936
|
-
36
|
|
28937
|
-
/* STYLE, HYDRATE_EVENTS */
|
|
28938
|
-
), [
|
|
28939
|
-
[vShow, _ctx.isOpen]
|
|
28940
|
-
])
|
|
28941
|
-
]),
|
|
28942
|
-
_: 3
|
|
28943
|
-
/* FORWARDED */
|
|
28944
|
-
})
|
|
28945
|
-
], 42, ["tabindex", "aria-owns"]);
|
|
28946
|
-
}
|
|
28947
|
-
script$e.render = render$e;
|
|
28948
|
-
const Multiselect = script$e;
|
|
28949
|
-
const _hoisted_1$m = ["for"];
|
|
28950
|
-
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
27424
|
+
const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-1fc4f739"]]);
|
|
27425
|
+
const _hoisted_1$m = ["disabled"];
|
|
27426
|
+
const _hoisted_2$i = ["onClick"];
|
|
27427
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
28951
27428
|
__name: "SelectInput",
|
|
28952
27429
|
props: {
|
|
27430
|
+
options: {},
|
|
27431
|
+
placeholder: {},
|
|
27432
|
+
disabled: { type: Boolean },
|
|
27433
|
+
modelValue: {},
|
|
27434
|
+
searchable: { type: Boolean },
|
|
28953
27435
|
required: { type: Boolean },
|
|
28954
27436
|
label: {},
|
|
28955
|
-
|
|
28956
|
-
modelValue: {},
|
|
28957
|
-
placeholder: {},
|
|
28958
|
-
defaultValue: {},
|
|
28959
|
-
options: {},
|
|
28960
|
-
extraProps: {}
|
|
27437
|
+
fullWidth: { type: Boolean }
|
|
28961
27438
|
},
|
|
28962
27439
|
emits: ["update:modelValue"],
|
|
28963
27440
|
setup(__props, { emit: __emit }) {
|
|
27441
|
+
let open = ref(false);
|
|
27442
|
+
const searchInput = ref(null);
|
|
28964
27443
|
const props2 = __props;
|
|
28965
|
-
let
|
|
28966
|
-
|
|
27444
|
+
let selectedItem = ref();
|
|
27445
|
+
let search = ref("");
|
|
27446
|
+
const toggle = () => {
|
|
27447
|
+
open.value = !open.value;
|
|
27448
|
+
if (!open.value)
|
|
27449
|
+
search.value = "";
|
|
27450
|
+
if (open.value)
|
|
27451
|
+
setTimeout(() => {
|
|
27452
|
+
var _a2, _b, _c;
|
|
27453
|
+
return (_c = (_b = (_a2 = searchInput.value) == null ? void 0 : _a2.$el) == null ? void 0 : _b.querySelector("input")) == null ? void 0 : _c.focus();
|
|
27454
|
+
}, 100);
|
|
27455
|
+
};
|
|
27456
|
+
const valueToLabel = (value) => {
|
|
27457
|
+
if (!value)
|
|
27458
|
+
return "";
|
|
27459
|
+
const option2 = props2.options.find((option22) => {
|
|
27460
|
+
if (typeof option22 === "string" || typeof option22 === "number")
|
|
27461
|
+
return option22 === value;
|
|
27462
|
+
return option22.value === value;
|
|
27463
|
+
});
|
|
27464
|
+
if (!option2)
|
|
27465
|
+
return value;
|
|
27466
|
+
return getLabel(option2);
|
|
27467
|
+
};
|
|
28967
27468
|
const emit2 = __emit;
|
|
28968
|
-
const
|
|
28969
|
-
|
|
28970
|
-
|
|
28971
|
-
|
|
28972
|
-
|
|
28973
|
-
|
|
28974
|
-
|
|
28975
|
-
|
|
28976
|
-
|
|
28977
|
-
|
|
28978
|
-
|
|
28979
|
-
|
|
28980
|
-
|
|
28981
|
-
|
|
28982
|
-
|
|
28983
|
-
|
|
28984
|
-
|
|
28985
|
-
|
|
28986
|
-
|
|
28987
|
-
|
|
27469
|
+
const getLabel = (option2) => {
|
|
27470
|
+
if (typeof option2 === "string")
|
|
27471
|
+
return option2;
|
|
27472
|
+
if (typeof option2 === "number")
|
|
27473
|
+
return `${option2}`;
|
|
27474
|
+
return option2.label;
|
|
27475
|
+
};
|
|
27476
|
+
const isSelected = (option2) => {
|
|
27477
|
+
if (typeof option2 === "string" || typeof option2 === "number")
|
|
27478
|
+
return option2 === selectedItem.value;
|
|
27479
|
+
return option2.value === selectedItem.value;
|
|
27480
|
+
};
|
|
27481
|
+
const filteredOptions = computed(() => props2.options.filter((option2) => {
|
|
27482
|
+
const searchTerm = new RegExp(search.value, "gi");
|
|
27483
|
+
if (typeof option2 === "string")
|
|
27484
|
+
return option2.match(searchTerm);
|
|
27485
|
+
if (typeof option2 === "number")
|
|
27486
|
+
return `${option2}`.match(searchTerm);
|
|
27487
|
+
return option2.label.match(searchTerm);
|
|
27488
|
+
}));
|
|
27489
|
+
const select2 = (option2) => {
|
|
27490
|
+
if (typeof option2 === "string")
|
|
27491
|
+
selectedItem.value = option2;
|
|
27492
|
+
else if (typeof option2 === "number")
|
|
27493
|
+
selectedItem.value = option2;
|
|
27494
|
+
else
|
|
27495
|
+
selectedItem.value = option2.value;
|
|
27496
|
+
emit2("update:modelValue", selectedItem.value);
|
|
27497
|
+
open.value = false;
|
|
27498
|
+
};
|
|
27499
|
+
watch(() => props2.modelValue, (value) => {
|
|
27500
|
+
if (value !== selectedItem.value)
|
|
27501
|
+
selectedItem.value = value;
|
|
27502
|
+
}, { immediate: true });
|
|
28988
27503
|
return (_ctx, _cache) => {
|
|
28989
|
-
return openBlock(),
|
|
28990
|
-
|
|
28991
|
-
|
|
28992
|
-
|
|
28993
|
-
}
|
|
28994
|
-
|
|
28995
|
-
|
|
28996
|
-
|
|
28997
|
-
|
|
28998
|
-
|
|
28999
|
-
|
|
29000
|
-
|
|
29001
|
-
|
|
29002
|
-
|
|
29003
|
-
|
|
29004
|
-
|
|
29005
|
-
|
|
29006
|
-
|
|
29007
|
-
|
|
29008
|
-
|
|
29009
|
-
|
|
27504
|
+
return openBlock(), createBlock(unref(kt$1), {
|
|
27505
|
+
placement: "bottom-start",
|
|
27506
|
+
class: "bagel-input selectinput"
|
|
27507
|
+
}, {
|
|
27508
|
+
popper: withCtx(({ hide }) => [
|
|
27509
|
+
createVNode(unref(_sfc_main$t), {
|
|
27510
|
+
class: "selectinput-options p-05",
|
|
27511
|
+
style: normalizeStyle({ width: _ctx.fullWidth ? "100%" : "auto" })
|
|
27512
|
+
}, {
|
|
27513
|
+
default: withCtx(() => [
|
|
27514
|
+
_ctx.searchable ? (openBlock(), createBlock(unref(TextInput), {
|
|
27515
|
+
key: 0,
|
|
27516
|
+
ref_key: "searchInput",
|
|
27517
|
+
ref: searchInput,
|
|
27518
|
+
dense: "",
|
|
27519
|
+
placeholder: "Search",
|
|
27520
|
+
icon: "search",
|
|
27521
|
+
modelValue: unref(search),
|
|
27522
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(search) ? search.value = $event : search = $event)
|
|
27523
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
27524
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(filteredOptions.value, (option2, i2) => {
|
|
27525
|
+
return openBlock(), createElementBlock("div", {
|
|
27526
|
+
class: normalizeClass(["selectinput-option hover gap-1", { selected: option2 === unref(selectedItem) }]),
|
|
27527
|
+
key: `${option2}${i2}`,
|
|
27528
|
+
onClick: () => {
|
|
27529
|
+
select2(option2);
|
|
27530
|
+
hide();
|
|
27531
|
+
}
|
|
27532
|
+
}, [
|
|
27533
|
+
isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
27534
|
+
key: 0,
|
|
27535
|
+
icon: "check"
|
|
27536
|
+
})) : createCommentVNode("", true),
|
|
27537
|
+
!isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
27538
|
+
key: 1,
|
|
27539
|
+
class: "opacity-3",
|
|
27540
|
+
icon: "fiber_manual_record"
|
|
27541
|
+
})) : createCommentVNode("", true),
|
|
27542
|
+
createElementVNode("span", null, toDisplayString(getLabel(option2)), 1)
|
|
27543
|
+
], 10, _hoisted_2$i);
|
|
27544
|
+
}), 128)),
|
|
27545
|
+
renderSlot(_ctx.$slots, "last", {}, void 0, true)
|
|
27546
|
+
]),
|
|
27547
|
+
_: 2
|
|
27548
|
+
}, 1032, ["style"])
|
|
27549
|
+
]),
|
|
27550
|
+
default: withCtx(() => [
|
|
27551
|
+
createElementVNode("label", null, [
|
|
27552
|
+
createTextVNode(toDisplayString(_ctx.label) + " ", 1),
|
|
27553
|
+
createElementVNode("button", {
|
|
27554
|
+
disabled: _ctx.disabled,
|
|
27555
|
+
type: "button",
|
|
27556
|
+
class: "selectinput-btn",
|
|
27557
|
+
onClick: toggle
|
|
27558
|
+
}, [
|
|
27559
|
+
createTextVNode(toDisplayString(valueToLabel(unref(selectedItem)) || _ctx.placeholder || "Select") + " ", 1),
|
|
27560
|
+
createVNode(unref(_sfc_main$H), normalizeProps(guardReactiveProps({ "icon": unref(open) ? "unfold_less" : "unfold_more" })), null, 16)
|
|
27561
|
+
], 8, _hoisted_1$m),
|
|
27562
|
+
_ctx.required ? withDirectives((openBlock(), createElementBlock("input", {
|
|
27563
|
+
key: 0,
|
|
27564
|
+
style: { "width": "0", "height": "0", "position": "absolute", "opacity": "0", "z-index": "-1" },
|
|
27565
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(selectedItem) ? selectedItem.value = $event : selectedItem = $event),
|
|
27566
|
+
required: ""
|
|
27567
|
+
}, null, 512)), [
|
|
27568
|
+
[vModelText, unref(selectedItem)]
|
|
27569
|
+
]) : createCommentVNode("", true)
|
|
27570
|
+
])
|
|
27571
|
+
]),
|
|
27572
|
+
_: 3
|
|
27573
|
+
});
|
|
29010
27574
|
};
|
|
29011
27575
|
}
|
|
29012
27576
|
});
|
|
27577
|
+
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-8845266b"]]);
|
|
29013
27578
|
const _hoisted_1$l = ["title"];
|
|
29014
27579
|
const _hoisted_2$h = { key: 0 };
|
|
29015
|
-
const _hoisted_3$
|
|
29016
|
-
const _sfc_main$
|
|
27580
|
+
const _hoisted_3$e = ["value", "placeholder"];
|
|
27581
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
29017
27582
|
__name: "RichTextEditor",
|
|
29018
27583
|
props: {
|
|
29019
27584
|
description: { default: "" },
|
|
@@ -29044,12 +27609,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
29044
27609
|
onInput: handleInput,
|
|
29045
27610
|
placeholder: _ctx.placeholder,
|
|
29046
27611
|
class: normalizeClass({ "no-edit": !_ctx.editMode })
|
|
29047
|
-
}, null, 42, _hoisted_3$
|
|
27612
|
+
}, null, 42, _hoisted_3$e)
|
|
29048
27613
|
], 10, _hoisted_1$l);
|
|
29049
27614
|
};
|
|
29050
27615
|
}
|
|
29051
27616
|
});
|
|
29052
|
-
const RichTextEditor = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
27617
|
+
const RichTextEditor = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-69a60381"]]);
|
|
29053
27618
|
/*!
|
|
29054
27619
|
* vue-draggable-next v2.2.0
|
|
29055
27620
|
* (c) 2023 Anish George
|
|
@@ -29221,13 +27786,13 @@ function closest(el, selector2, ctx, includeCTX) {
|
|
|
29221
27786
|
return null;
|
|
29222
27787
|
}
|
|
29223
27788
|
var R_SPACE = /\s+/g;
|
|
29224
|
-
function toggleClass(el, name,
|
|
27789
|
+
function toggleClass(el, name, state2) {
|
|
29225
27790
|
if (el && name) {
|
|
29226
27791
|
if (el.classList) {
|
|
29227
|
-
el.classList[
|
|
27792
|
+
el.classList[state2 ? "add" : "remove"](name);
|
|
29228
27793
|
} else {
|
|
29229
27794
|
var className = (" " + el.className + " ").replace(R_SPACE, " ").replace(" " + name + " ", " ");
|
|
29230
|
-
el.className = (className + (
|
|
27795
|
+
el.className = (className + (state2 ? " " + name : "")).replace(R_SPACE, " ");
|
|
29231
27796
|
}
|
|
29232
27797
|
}
|
|
29233
27798
|
}
|
|
@@ -29504,8 +28069,8 @@ function AnimationStateManager() {
|
|
|
29504
28069
|
child.fromRect = fromRect;
|
|
29505
28070
|
});
|
|
29506
28071
|
},
|
|
29507
|
-
addAnimationState: function addAnimationState(
|
|
29508
|
-
animationStates.push(
|
|
28072
|
+
addAnimationState: function addAnimationState(state2) {
|
|
28073
|
+
animationStates.push(state2);
|
|
29509
28074
|
},
|
|
29510
28075
|
removeAnimationState: function removeAnimationState(target) {
|
|
29511
28076
|
animationStates.splice(indexOfObject(animationStates, {
|
|
@@ -29521,8 +28086,8 @@ function AnimationStateManager() {
|
|
|
29521
28086
|
return;
|
|
29522
28087
|
}
|
|
29523
28088
|
var animating = false, animationTime = 0;
|
|
29524
|
-
animationStates.forEach(function(
|
|
29525
|
-
var time = 0, target =
|
|
28089
|
+
animationStates.forEach(function(state2) {
|
|
28090
|
+
var time = 0, target = state2.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state2.rect, targetMatrix = matrix(target, true);
|
|
29526
28091
|
if (targetMatrix) {
|
|
29527
28092
|
toRect.top -= targetMatrix.f;
|
|
29528
28093
|
toRect.left -= targetMatrix.e;
|
|
@@ -31574,11 +30139,11 @@ const VueDraggableNext = defineComponent({
|
|
|
31574
30139
|
});
|
|
31575
30140
|
const _hoisted_1$k = ["title"];
|
|
31576
30141
|
const _hoisted_2$g = { class: "bagel-input" };
|
|
31577
|
-
const _hoisted_3$
|
|
30142
|
+
const _hoisted_3$d = { class: "table-side-scroll" };
|
|
31578
30143
|
const _hoisted_4$9 = { class: "table-header" };
|
|
31579
30144
|
const _hoisted_5$8 = { class: "table-reorder" };
|
|
31580
30145
|
const _hoisted_6$4 = { class: "table-action" };
|
|
31581
|
-
const _sfc_main$
|
|
30146
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
31582
30147
|
__name: "TableField",
|
|
31583
30148
|
props: {
|
|
31584
30149
|
description: { default: "" },
|
|
@@ -31646,7 +30211,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
31646
30211
|
createElementVNode("div", _hoisted_2$g, [
|
|
31647
30212
|
createElementVNode("label", null, toDisplayString((_a2 = unref(fieldMeta)) == null ? void 0 : _a2.label), 1)
|
|
31648
30213
|
]),
|
|
31649
|
-
createElementVNode("div", _hoisted_3$
|
|
30214
|
+
createElementVNode("div", _hoisted_3$d, [
|
|
31650
30215
|
createElementVNode("div", _hoisted_4$9, [
|
|
31651
30216
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList((_b = unref(entityMeta)) == null ? void 0 : _b.fields, (field) => {
|
|
31652
30217
|
return openBlock(), createElementBlock("div", {
|
|
@@ -31675,7 +30240,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
31675
30240
|
key: row.id
|
|
31676
30241
|
}, [
|
|
31677
30242
|
createElementVNode("div", _hoisted_5$8, [
|
|
31678
|
-
createVNode(unref(_sfc_main$
|
|
30243
|
+
createVNode(unref(_sfc_main$H), { icon: "more_vert" })
|
|
31679
30244
|
]),
|
|
31680
30245
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList((_a3 = unref(entityMeta)) == null ? void 0 : _a3.fields, (field) => {
|
|
31681
30246
|
return openBlock(), createElementBlock("div", {
|
|
@@ -31692,7 +30257,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
31692
30257
|
], 2);
|
|
31693
30258
|
}), 128)),
|
|
31694
30259
|
createElementVNode("div", _hoisted_6$4, [
|
|
31695
|
-
createVNode(unref(_sfc_main$
|
|
30260
|
+
createVNode(unref(_sfc_main$H), {
|
|
31696
30261
|
icon: "delete",
|
|
31697
30262
|
onClick: ($event) => removeRow(index2)
|
|
31698
30263
|
}, null, 8, ["onClick"])
|
|
@@ -31722,13 +30287,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
31722
30287
|
};
|
|
31723
30288
|
}
|
|
31724
30289
|
});
|
|
31725
|
-
const TableField = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
30290
|
+
const TableField = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-cdacf10e"]]);
|
|
31726
30291
|
const _hoisted_1$j = ["title"];
|
|
31727
30292
|
const _hoisted_2$f = ["for"];
|
|
31728
|
-
const _hoisted_3$
|
|
30293
|
+
const _hoisted_3$c = ["title", "autocomplete", "id", "type", "placeholder", "disabled", "required", "pattern"];
|
|
31729
30294
|
const _hoisted_4$8 = ["title", "id", "type", "rows", "placeholder", "disabled", "required", "pattern"];
|
|
31730
30295
|
const _hoisted_5$7 = { key: 2 };
|
|
31731
|
-
const _sfc_main$
|
|
30296
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
31732
30297
|
__name: "TextInput",
|
|
31733
30298
|
props: {
|
|
31734
30299
|
id: {},
|
|
@@ -31842,7 +30407,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
31842
30407
|
disabled: !unref(editMode),
|
|
31843
30408
|
required: _ctx.required,
|
|
31844
30409
|
pattern: _ctx.pattern
|
|
31845
|
-
}, _ctx.nativeInputAttrs, { onDblclick: toggleEditAction }), null, 16, _hoisted_3$
|
|
30410
|
+
}, _ctx.nativeInputAttrs, { onDblclick: toggleEditAction }), null, 16, _hoisted_3$c)), [
|
|
31846
30411
|
[vModelDynamic, unref(inputVal)]
|
|
31847
30412
|
]) : withDirectives((openBlock(), createElementBlock("textarea", mergeProps({
|
|
31848
30413
|
key: 1,
|
|
@@ -31862,12 +30427,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
31862
30427
|
]),
|
|
31863
30428
|
_ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_5$7, toDisplayString(_ctx.helptext), 1)) : createCommentVNode("", true)
|
|
31864
30429
|
], 8, _hoisted_2$f),
|
|
31865
|
-
_ctx.iconStart ? (openBlock(), createBlock(unref(_sfc_main$
|
|
30430
|
+
_ctx.iconStart ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
31866
30431
|
key: 0,
|
|
31867
30432
|
class: "iconStart",
|
|
31868
30433
|
icon: _ctx.iconStart
|
|
31869
30434
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
31870
|
-
_ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$
|
|
30435
|
+
_ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
31871
30436
|
key: 1,
|
|
31872
30437
|
icon: _ctx.icon
|
|
31873
30438
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
@@ -31883,9 +30448,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
31883
30448
|
};
|
|
31884
30449
|
}
|
|
31885
30450
|
});
|
|
31886
|
-
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
30451
|
+
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-cd4c27ad"]]);
|
|
31887
30452
|
const _hoisted_1$i = { class: "primary-checkbox" };
|
|
31888
|
-
const _sfc_main$
|
|
30453
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
31889
30454
|
__name: "Checkbox",
|
|
31890
30455
|
props: {
|
|
31891
30456
|
"modelValue": {
|
|
@@ -31906,16 +30471,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
31906
30471
|
[vModelCheckbox, val.value]
|
|
31907
30472
|
]),
|
|
31908
30473
|
createElementVNode("span", null, [
|
|
31909
|
-
createVNode(unref(_sfc_main$
|
|
30474
|
+
createVNode(unref(_sfc_main$H), { icon: "check" })
|
|
31910
30475
|
])
|
|
31911
30476
|
]);
|
|
31912
30477
|
};
|
|
31913
30478
|
}
|
|
31914
30479
|
});
|
|
31915
|
-
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
30480
|
+
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-e4cbb088"]]);
|
|
31916
30481
|
const _hoisted_1$h = ["title"];
|
|
31917
30482
|
const _hoisted_2$e = ["id", "placeholder", "required"];
|
|
31918
|
-
const _sfc_main$
|
|
30483
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
31919
30484
|
__name: "ColorPicker",
|
|
31920
30485
|
props: {
|
|
31921
30486
|
label: {},
|
|
@@ -31961,13 +30526,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
31961
30526
|
});
|
|
31962
30527
|
const _hoisted_1$g = { class: "datetime-wrap" };
|
|
31963
30528
|
const _hoisted_2$d = { class: "date-wrap" };
|
|
31964
|
-
const _hoisted_3$
|
|
30529
|
+
const _hoisted_3$b = {
|
|
31965
30530
|
key: 0,
|
|
31966
30531
|
class: "time-wrap"
|
|
31967
30532
|
};
|
|
31968
30533
|
const _hoisted_4$7 = ["id", "name", "value"];
|
|
31969
30534
|
const _hoisted_5$6 = ["for"];
|
|
31970
|
-
const _sfc_main$
|
|
30535
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
31971
30536
|
__name: "DatePicker",
|
|
31972
30537
|
props: {
|
|
31973
30538
|
name: {},
|
|
@@ -31999,7 +30564,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
31999
30564
|
_: 1
|
|
32000
30565
|
}, 16, ["modelValue"])
|
|
32001
30566
|
]),
|
|
32002
|
-
_ctx.showTimeWrap ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
30567
|
+
_ctx.showTimeWrap ? (openBlock(), createElementBlock("div", _hoisted_3$b, [
|
|
32003
30568
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(hours), (hr2) => {
|
|
32004
30569
|
return openBlock(), createElementBlock(Fragment$1, { key: hr2 }, [
|
|
32005
30570
|
withDirectives(createElementVNode("input", {
|
|
@@ -32023,10 +30588,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
32023
30588
|
});
|
|
32024
30589
|
const _hoisted_1$f = { class: "bagel-input" };
|
|
32025
30590
|
const _hoisted_2$c = { class: "pb-025" };
|
|
32026
|
-
const _hoisted_3$
|
|
30591
|
+
const _hoisted_3$a = { class: "flex gap-05 flex-wrap" };
|
|
32027
30592
|
const _hoisted_4$6 = ["id", "name", "value", "checked"];
|
|
32028
30593
|
const _hoisted_5$5 = ["for"];
|
|
32029
|
-
const _sfc_main$
|
|
30594
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
32030
30595
|
__name: "RadioPillsInput",
|
|
32031
30596
|
props: {
|
|
32032
30597
|
options: {},
|
|
@@ -32067,7 +30632,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
32067
30632
|
return (_ctx, _cache) => {
|
|
32068
30633
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
32069
30634
|
createElementVNode("label", _hoisted_2$c, toDisplayString(_ctx.label), 1),
|
|
32070
|
-
createElementVNode("div", _hoisted_3$
|
|
30635
|
+
createElementVNode("div", _hoisted_3$a, [
|
|
32071
30636
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(cumputedOptions.value, ({ optioId, label, value }, index2) => {
|
|
32072
30637
|
return openBlock(), createElementBlock("div", {
|
|
32073
30638
|
class: "radio-pill",
|
|
@@ -32089,13 +30654,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
32089
30654
|
};
|
|
32090
30655
|
}
|
|
32091
30656
|
});
|
|
32092
|
-
const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
30657
|
+
const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-e47ae8b5"]]);
|
|
32093
30658
|
const _hoisted_1$e = { class: "bagel-input" };
|
|
32094
30659
|
const _hoisted_2$b = {
|
|
32095
30660
|
key: 0,
|
|
32096
30661
|
class: "imagePreviewWrap"
|
|
32097
30662
|
};
|
|
32098
|
-
const _hoisted_3$
|
|
30663
|
+
const _hoisted_3$9 = ["src"];
|
|
32099
30664
|
const _hoisted_4$5 = { class: "previewName" };
|
|
32100
30665
|
const _hoisted_5$4 = ["src"];
|
|
32101
30666
|
const _hoisted_6$3 = { class: "no-margin" };
|
|
@@ -32111,7 +30676,7 @@ const _hoisted_12 = {
|
|
|
32111
30676
|
key: 0,
|
|
32112
30677
|
class: "progress"
|
|
32113
30678
|
};
|
|
32114
|
-
const _sfc_main$
|
|
30679
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
32115
30680
|
__name: "FileUpload",
|
|
32116
30681
|
props: /* @__PURE__ */ mergeModels({
|
|
32117
30682
|
label: {},
|
|
@@ -32225,7 +30790,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
32225
30790
|
class: "preview",
|
|
32226
30791
|
src: file.url,
|
|
32227
30792
|
alt: ""
|
|
32228
|
-
}, null, 8, _hoisted_3$
|
|
30793
|
+
}, null, 8, _hoisted_3$9)
|
|
32229
30794
|
])) : createCommentVNode("", true),
|
|
32230
30795
|
createElementVNode("div", _hoisted_4$5, [
|
|
32231
30796
|
_ctx.multiple ? (openBlock(), createElementBlock("img", {
|
|
@@ -32271,7 +30836,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
32271
30836
|
style: normalizeStyle([`--p:${fileQ.progress}`, { "--b": "2px" }])
|
|
32272
30837
|
}, [
|
|
32273
30838
|
fileQ.progress < 100 ? (openBlock(), createElementBlock("span", _hoisted_12, toDisplayString(`${fileQ.progress.toFixed(0)}`), 1)) : createCommentVNode("", true),
|
|
32274
|
-
createVNode(unref(_sfc_main$
|
|
30839
|
+
createVNode(unref(_sfc_main$H), {
|
|
32275
30840
|
class: "success",
|
|
32276
30841
|
icon: "check"
|
|
32277
30842
|
})
|
|
@@ -32284,15 +30849,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
32284
30849
|
};
|
|
32285
30850
|
}
|
|
32286
30851
|
});
|
|
32287
|
-
const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
30852
|
+
const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-1be8d7b1"]]);
|
|
32288
30853
|
const _withScopeId = (n2) => (pushScopeId("data-v-b87221d6"), n2 = n2(), popScopeId(), n2);
|
|
32289
30854
|
const _hoisted_1$d = ["title"];
|
|
32290
30855
|
const _hoisted_2$a = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "slider round" }, null, -1));
|
|
32291
|
-
const _hoisted_3$
|
|
30856
|
+
const _hoisted_3$8 = [
|
|
32292
30857
|
_hoisted_2$a
|
|
32293
30858
|
];
|
|
32294
30859
|
const _hoisted_4$4 = ["id"];
|
|
32295
|
-
const _sfc_main$
|
|
30860
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
32296
30861
|
__name: "ToggleInput",
|
|
32297
30862
|
props: /* @__PURE__ */ mergeModels({
|
|
32298
30863
|
label: {},
|
|
@@ -32313,7 +30878,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
32313
30878
|
}, [
|
|
32314
30879
|
createElementVNode("div", {
|
|
32315
30880
|
class: normalizeClass(["switch", { checked: checked.value }])
|
|
32316
|
-
}, _hoisted_3$
|
|
30881
|
+
}, _hoisted_3$8, 2),
|
|
32317
30882
|
createElementVNode("label", null, [
|
|
32318
30883
|
createTextVNode(toDisplayString(_ctx.label) + " ", 1),
|
|
32319
30884
|
withDirectives(createElementVNode("input", {
|
|
@@ -32328,7 +30893,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
32328
30893
|
};
|
|
32329
30894
|
}
|
|
32330
30895
|
});
|
|
32331
|
-
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
30896
|
+
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-b87221d6"]]);
|
|
32332
30897
|
function _isPlaceholder(a2) {
|
|
32333
30898
|
return a2 != null && typeof a2 === "object" && a2["@@functional/placeholder"] === true;
|
|
32334
30899
|
}
|
|
@@ -37359,11 +35924,11 @@ var script$6 = defineComponent({
|
|
|
37359
35924
|
return { el, width, height };
|
|
37360
35925
|
}
|
|
37361
35926
|
});
|
|
37362
|
-
const _hoisted_1$5 = { ref: "el" };
|
|
35927
|
+
const _hoisted_1$5$1 = { ref: "el" };
|
|
37363
35928
|
function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
37364
35929
|
return openBlock(), createElementBlock(
|
|
37365
35930
|
"div",
|
|
37366
|
-
_hoisted_1$5,
|
|
35931
|
+
_hoisted_1$5$1,
|
|
37367
35932
|
[
|
|
37368
35933
|
renderSlot(_ctx.$slots, "main", {
|
|
37369
35934
|
width: _ctx.width,
|
|
@@ -37435,7 +36000,7 @@ var script$5 = defineComponent({
|
|
|
37435
36000
|
return { data: data2, canvas, xLines, yLines };
|
|
37436
36001
|
}
|
|
37437
36002
|
});
|
|
37438
|
-
const _hoisted_1$4 = ["stroke-dasharray"];
|
|
36003
|
+
const _hoisted_1$4$1 = ["stroke-dasharray"];
|
|
37439
36004
|
const _hoisted_2$3 = {
|
|
37440
36005
|
key: 0,
|
|
37441
36006
|
class: "grid-x"
|
|
@@ -37505,7 +36070,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
37505
36070
|
y2: _ctx.canvas.height
|
|
37506
36071
|
}, null, 8, _hoisted_7)
|
|
37507
36072
|
])
|
|
37508
|
-
], 8, _hoisted_1$4)) : createCommentVNode("v-if", true);
|
|
36073
|
+
], 8, _hoisted_1$4$1)) : createCommentVNode("v-if", true);
|
|
37509
36074
|
}
|
|
37510
36075
|
script$5.render = render$5;
|
|
37511
36076
|
script$5.__file = "src/components/Grid/index.vue";
|
|
@@ -37598,7 +36163,7 @@ var script$4 = defineComponent({
|
|
|
37598
36163
|
return { el, show, canvas, direction, style, styleContent, position, items, isRight };
|
|
37599
36164
|
}
|
|
37600
36165
|
});
|
|
37601
|
-
const _hoisted_1$3 = { key: 0 };
|
|
36166
|
+
const _hoisted_1$3$1 = { key: 0 };
|
|
37602
36167
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
37603
36168
|
return _ctx.show ? (openBlock(), createElementBlock(
|
|
37604
36169
|
"div",
|
|
@@ -37663,7 +36228,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
37663
36228
|
4
|
|
37664
36229
|
/* STYLE */
|
|
37665
36230
|
),
|
|
37666
|
-
!_ctx.hideLine ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
36231
|
+
!_ctx.hideLine ? (openBlock(), createElementBlock("div", _hoisted_1$3$1, [
|
|
37667
36232
|
_ctx.direction === "horizontal" ? (openBlock(), createElementBlock(
|
|
37668
36233
|
"div",
|
|
37669
36234
|
{
|
|
@@ -37767,11 +36332,11 @@ var script$2 = defineComponent({
|
|
|
37767
36332
|
return { y: y2, canvas, direction };
|
|
37768
36333
|
}
|
|
37769
36334
|
});
|
|
37770
|
-
const _hoisted_1$2 = {
|
|
36335
|
+
const _hoisted_1$2$1 = {
|
|
37771
36336
|
key: 0,
|
|
37772
36337
|
class: "layer-marker"
|
|
37773
36338
|
};
|
|
37774
|
-
const _hoisted_2$2 = ["x", "y", "fill"];
|
|
36339
|
+
const _hoisted_2$2$1 = ["x", "y", "fill"];
|
|
37775
36340
|
const _hoisted_3$1 = ["x1", "y1", "x2", "y2", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray"];
|
|
37776
36341
|
const _hoisted_4$1 = {
|
|
37777
36342
|
key: 1,
|
|
@@ -37780,13 +36345,13 @@ const _hoisted_4$1 = {
|
|
|
37780
36345
|
const _hoisted_5$1 = ["x", "y", "fill"];
|
|
37781
36346
|
const _hoisted_6$1 = ["x1", "y1", "x2", "y2", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray"];
|
|
37782
36347
|
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
37783
|
-
return _ctx.direction === "horizontal" ? (openBlock(), createElementBlock("g", _hoisted_1$2, [
|
|
36348
|
+
return _ctx.direction === "horizontal" ? (openBlock(), createElementBlock("g", _hoisted_1$2$1, [
|
|
37784
36349
|
createElementVNode("text", {
|
|
37785
36350
|
x: _ctx.canvas.x + 5,
|
|
37786
36351
|
y: _ctx.y - 5,
|
|
37787
36352
|
"text-anchor": "start",
|
|
37788
36353
|
fill: _ctx.color
|
|
37789
|
-
}, toDisplayString(_ctx.label), 9, _hoisted_2$2),
|
|
36354
|
+
}, toDisplayString(_ctx.label), 9, _hoisted_2$2$1),
|
|
37790
36355
|
createElementVNode("line", {
|
|
37791
36356
|
x1: _ctx.canvas.x,
|
|
37792
36357
|
y1: _ctx.y,
|
|
@@ -38400,8 +36965,8 @@ const _hoisted_1$1$1 = {
|
|
|
38400
36965
|
class: "treemap",
|
|
38401
36966
|
style: { display: "flex", position: "relative" }
|
|
38402
36967
|
};
|
|
38403
|
-
const _hoisted_2$1 = ["width", "height", "viewBox"];
|
|
38404
|
-
const _hoisted_3 = { class: "layer-rectangles" };
|
|
36968
|
+
const _hoisted_2$1$1 = ["width", "height", "viewBox"];
|
|
36969
|
+
const _hoisted_3$7 = { class: "layer-rectangles" };
|
|
38405
36970
|
const _hoisted_4 = ["transform", "onMouseover"];
|
|
38406
36971
|
const _hoisted_5 = ["width", "height"];
|
|
38407
36972
|
const _hoisted_6 = {
|
|
@@ -38419,7 +36984,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
38419
36984
|
viewBox: `0 0 ${_ctx.size.width} ${_ctx.size.height}`,
|
|
38420
36985
|
ref: "el"
|
|
38421
36986
|
}, [
|
|
38422
|
-
createElementVNode("g", _hoisted_3, [
|
|
36987
|
+
createElementVNode("g", _hoisted_3$7, [
|
|
38423
36988
|
(openBlock(true), createElementBlock(
|
|
38424
36989
|
Fragment$1,
|
|
38425
36990
|
null,
|
|
@@ -38460,7 +37025,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
38460
37025
|
/* KEYED_FRAGMENT */
|
|
38461
37026
|
))
|
|
38462
37027
|
])
|
|
38463
|
-
], 8, _hoisted_2$1)),
|
|
37028
|
+
], 8, _hoisted_2$1$1)),
|
|
38464
37029
|
renderSlot(_ctx.$slots, "widgets")
|
|
38465
37030
|
]);
|
|
38466
37031
|
}
|
|
@@ -38528,13 +37093,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
38528
37093
|
}
|
|
38529
37094
|
script.render = render;
|
|
38530
37095
|
script.__file = "src/components/HoverBar/index.vue";
|
|
38531
|
-
const _hoisted_1$
|
|
37096
|
+
const _hoisted_1$5 = /* @__PURE__ */ createElementVNode("stop", {
|
|
38532
37097
|
offset: "100%",
|
|
38533
37098
|
"stop-color": "white",
|
|
38534
37099
|
"stop-opacity": "0.4"
|
|
38535
37100
|
}, null, -1);
|
|
38536
37101
|
const BRAND_COLOR = "var(--bgl-primary)";
|
|
38537
|
-
const _sfc_main$
|
|
37102
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
38538
37103
|
__name: "Lineart",
|
|
38539
37104
|
props: {
|
|
38540
37105
|
data: {},
|
|
@@ -38663,7 +37228,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
38663
37228
|
"stop-color": BRAND_COLOR,
|
|
38664
37229
|
"stop-opacity": "1"
|
|
38665
37230
|
}),
|
|
38666
|
-
_hoisted_1$
|
|
37231
|
+
_hoisted_1$5
|
|
38667
37232
|
])
|
|
38668
37233
|
])
|
|
38669
37234
|
]),
|
|
@@ -38679,37 +37244,53 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
38679
37244
|
};
|
|
38680
37245
|
}
|
|
38681
37246
|
});
|
|
38682
|
-
const _sfc_main$
|
|
37247
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
38683
37248
|
__name: "Layout",
|
|
38684
37249
|
props: {
|
|
38685
37250
|
gap: { default: 1 },
|
|
38686
37251
|
h100: { type: Boolean, default: false },
|
|
38687
37252
|
columns: { default: () => [] },
|
|
37253
|
+
mColumns: { default: () => [] },
|
|
37254
|
+
mRows: { default: () => [] },
|
|
38688
37255
|
rows: { default: () => [] }
|
|
38689
37256
|
},
|
|
38690
37257
|
setup(__props) {
|
|
37258
|
+
useCssVars((_ctx) => ({
|
|
37259
|
+
"7a00a82c": gapSize.value,
|
|
37260
|
+
"30493178": gridTemplateRows.value,
|
|
37261
|
+
"5b203692": gridTemplateColumns.value,
|
|
37262
|
+
"7cba085b": mGridTemplateRows.value,
|
|
37263
|
+
"7abc6a1b": mGridTemplateColumns.value
|
|
37264
|
+
}));
|
|
38691
37265
|
const props2 = __props;
|
|
38692
|
-
const
|
|
38693
|
-
|
|
38694
|
-
|
|
38695
|
-
|
|
38696
|
-
if (props2.
|
|
38697
|
-
|
|
38698
|
-
return
|
|
37266
|
+
const gridTemplateRows = computed(() => props2.rows.length ? props2.rows.join(" ") : "auto");
|
|
37267
|
+
const gapSize = computed(() => `${props2.gap}rem`);
|
|
37268
|
+
const mGridTemplateRows = computed(() => {
|
|
37269
|
+
var _a2;
|
|
37270
|
+
if ((_a2 = props2.mRows) == null ? void 0 : _a2.length)
|
|
37271
|
+
return props2.mRows.join(" ");
|
|
37272
|
+
return gridTemplateRows.value;
|
|
37273
|
+
});
|
|
37274
|
+
const gridTemplateColumns = computed(() => props2.columns.length ? props2.columns.join(" ") : "auto");
|
|
37275
|
+
const mGridTemplateColumns = computed(() => {
|
|
37276
|
+
var _a2;
|
|
37277
|
+
if ((_a2 = props2.mColumns) == null ? void 0 : _a2.length)
|
|
37278
|
+
return props2.mColumns.join(" ");
|
|
37279
|
+
return gridTemplateColumns.value;
|
|
38699
37280
|
});
|
|
38700
37281
|
return (_ctx, _cache) => {
|
|
38701
37282
|
return openBlock(), createElementBlock("div", {
|
|
38702
|
-
class: normalizeClass(["layout", { "layout-h-100": _ctx.h100 }])
|
|
38703
|
-
style: normalizeStyle(style.value)
|
|
37283
|
+
class: normalizeClass(["layout", { "layout-h-100": _ctx.h100 }])
|
|
38704
37284
|
}, [
|
|
38705
|
-
renderSlot(_ctx.$slots, "default")
|
|
38706
|
-
],
|
|
37285
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
37286
|
+
], 2);
|
|
38707
37287
|
};
|
|
38708
37288
|
}
|
|
38709
37289
|
});
|
|
38710
|
-
const
|
|
38711
|
-
const
|
|
38712
|
-
const
|
|
37290
|
+
const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-977dfbf4"]]);
|
|
37291
|
+
const _hoisted_1$4 = { class: "w-100 px-075" };
|
|
37292
|
+
const _hoisted_2$2 = { key: 0 };
|
|
37293
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
38713
37294
|
__name: "SidebarMenu",
|
|
38714
37295
|
props: {
|
|
38715
37296
|
navLinks: {},
|
|
@@ -38727,13 +37308,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38727
37308
|
emit2("update:open", isOpen.value);
|
|
38728
37309
|
}
|
|
38729
37310
|
return (_ctx, _cache) => {
|
|
38730
|
-
const _component_Card = resolveComponent("Card");
|
|
38731
37311
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
38732
|
-
return openBlock(), createBlock(
|
|
37312
|
+
return openBlock(), createBlock(unref(_sfc_main$t), {
|
|
38733
37313
|
class: normalizeClass(["flex column gap-05 pt-1 bgl_sidebar", { "wideNav": unref(isOpen) }])
|
|
38734
37314
|
}, {
|
|
38735
37315
|
default: withCtx(() => [
|
|
38736
|
-
createElementVNode("div", _hoisted_1, [
|
|
37316
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
38737
37317
|
createVNode(unref(Btn), {
|
|
38738
37318
|
thin: "",
|
|
38739
37319
|
color: "light",
|
|
@@ -38742,7 +37322,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38742
37322
|
onClick: toggleMenu
|
|
38743
37323
|
})
|
|
38744
37324
|
]),
|
|
38745
|
-
createTextVNode(),
|
|
38746
37325
|
!unref(isOpen) || !unref(slots)["brand-open"] ? renderSlot(_ctx.$slots, "brand", { key: 0 }, void 0, true) : createCommentVNode("", true),
|
|
38747
37326
|
unref(isOpen) ? renderSlot(_ctx.$slots, "brand-open", { key: 1 }, void 0, true) : createCommentVNode("", true),
|
|
38748
37327
|
!_ctx.navLinks ? renderSlot(_ctx.$slots, "default", { key: 2 }, void 0, true) : createCommentVNode("", true),
|
|
@@ -38753,11 +37332,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38753
37332
|
class: "nav-button px-075"
|
|
38754
37333
|
}, {
|
|
38755
37334
|
default: withCtx(() => [
|
|
38756
|
-
createVNode(unref(_sfc_main$
|
|
37335
|
+
createVNode(unref(_sfc_main$H), {
|
|
38757
37336
|
icon: nav2.icon,
|
|
38758
37337
|
size: 1.4
|
|
38759
37338
|
}, null, 8, ["icon"]),
|
|
38760
|
-
_ctx.open ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(nav2.label), 1)) : createCommentVNode("", true)
|
|
37339
|
+
_ctx.open ? (openBlock(), createElementBlock("p", _hoisted_2$2, toDisplayString(nav2.label), 1)) : createCommentVNode("", true)
|
|
38761
37340
|
]),
|
|
38762
37341
|
_: 2
|
|
38763
37342
|
}, 1032, ["to"])), [
|
|
@@ -38776,53 +37355,221 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38776
37355
|
};
|
|
38777
37356
|
}
|
|
38778
37357
|
});
|
|
38779
|
-
const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
37358
|
+
const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-8713ae4a"]]);
|
|
37359
|
+
const state = reactive(/* @__PURE__ */ new Map());
|
|
37360
|
+
function useTabs(group) {
|
|
37361
|
+
if (!state.has(group)) {
|
|
37362
|
+
state.set(group, reactive({ currentTab: null }));
|
|
37363
|
+
}
|
|
37364
|
+
const currentTab = computed({
|
|
37365
|
+
get: () => state.get(group).currentTab,
|
|
37366
|
+
set: (val) => {
|
|
37367
|
+
state.get(group).currentTab = val;
|
|
37368
|
+
}
|
|
37369
|
+
});
|
|
37370
|
+
return { currentTab };
|
|
37371
|
+
}
|
|
37372
|
+
const _hoisted_1$3 = { key: 0 };
|
|
37373
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
37374
|
+
__name: "Tabs",
|
|
37375
|
+
props: {
|
|
37376
|
+
tabs: {},
|
|
37377
|
+
modelValue: {}
|
|
37378
|
+
},
|
|
37379
|
+
setup(__props) {
|
|
37380
|
+
const group = Math.random().toString(36).substring(7);
|
|
37381
|
+
const { currentTab } = useTabs(group);
|
|
37382
|
+
return (_ctx, _cache) => {
|
|
37383
|
+
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
37384
|
+
createVNode(unref(TabsNav), {
|
|
37385
|
+
tabs: _ctx.tabs,
|
|
37386
|
+
group: unref(group)
|
|
37387
|
+
}, null, 8, ["tabs", "group"]),
|
|
37388
|
+
unref(currentTab) ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
37389
|
+
renderSlot(_ctx.$slots, unref(currentTab))
|
|
37390
|
+
])) : createCommentVNode("", true)
|
|
37391
|
+
], 64);
|
|
37392
|
+
};
|
|
37393
|
+
}
|
|
37394
|
+
});
|
|
37395
|
+
const _hoisted_1$2 = { class: "tabs grid auto-flow-columns fit-content" };
|
|
37396
|
+
const _hoisted_2$1 = ["onClick"];
|
|
37397
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
37398
|
+
__name: "TabsNav",
|
|
37399
|
+
props: {
|
|
37400
|
+
title: {},
|
|
37401
|
+
tabs: {},
|
|
37402
|
+
modelValue: {},
|
|
37403
|
+
sideTabs: { type: Boolean },
|
|
37404
|
+
group: {}
|
|
37405
|
+
},
|
|
37406
|
+
setup(__props) {
|
|
37407
|
+
const props2 = __props;
|
|
37408
|
+
const { currentTab } = useTabs(props2.group);
|
|
37409
|
+
currentTab.value = props2.modelValue || typeof props2.tabs[0] === "string" ? props2.tabs[0] : props2.tabs[0].id;
|
|
37410
|
+
const selectTab = (tab) => {
|
|
37411
|
+
currentTab.value = typeof tab === "string" ? tab : tab.id;
|
|
37412
|
+
};
|
|
37413
|
+
const isActive = (tab) => {
|
|
37414
|
+
if (typeof tab === "string")
|
|
37415
|
+
return currentTab.value === tab;
|
|
37416
|
+
return currentTab.value === tab.id;
|
|
37417
|
+
};
|
|
37418
|
+
const tabLabel = (tab) => {
|
|
37419
|
+
if (typeof tab === "string")
|
|
37420
|
+
return tab;
|
|
37421
|
+
return tab.label;
|
|
37422
|
+
};
|
|
37423
|
+
return (_ctx, _cache) => {
|
|
37424
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
37425
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.tabs, (tab, i2) => {
|
|
37426
|
+
return openBlock(), createElementBlock("button", {
|
|
37427
|
+
class: normalizeClass([{ active: isActive(tab) }, "tab"]),
|
|
37428
|
+
onClick: ($event) => selectTab(tab),
|
|
37429
|
+
key: i2
|
|
37430
|
+
}, [
|
|
37431
|
+
typeof tab !== "string" && tab.icon ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
37432
|
+
key: 0,
|
|
37433
|
+
icon: tab.icon
|
|
37434
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
37435
|
+
createTextVNode(" " + toDisplayString(tabLabel(tab)), 1)
|
|
37436
|
+
], 10, _hoisted_2$1);
|
|
37437
|
+
}), 128))
|
|
37438
|
+
]);
|
|
37439
|
+
};
|
|
37440
|
+
}
|
|
37441
|
+
});
|
|
37442
|
+
const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f737d297"]]);
|
|
37443
|
+
const _hoisted_1$1 = { key: 0 };
|
|
37444
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
37445
|
+
__name: "TabsBody",
|
|
37446
|
+
props: {
|
|
37447
|
+
group: {}
|
|
37448
|
+
},
|
|
37449
|
+
setup(__props) {
|
|
37450
|
+
const props2 = __props;
|
|
37451
|
+
const { currentTab } = useTabs(props2.group);
|
|
37452
|
+
return (_ctx, _cache) => {
|
|
37453
|
+
return unref(currentTab) ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
37454
|
+
renderSlot(_ctx.$slots, unref(currentTab))
|
|
37455
|
+
])) : createCommentVNode("", true);
|
|
37456
|
+
};
|
|
37457
|
+
}
|
|
37458
|
+
});
|
|
37459
|
+
const _hoisted_1 = { class: "bgl_card tabs-top" };
|
|
37460
|
+
const _hoisted_2 = { class: "tabs grid auto-flow-columns fit-content" };
|
|
37461
|
+
const _hoisted_3 = ["onClick"];
|
|
37462
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
37463
|
+
__name: "TabbedLayout",
|
|
37464
|
+
props: {
|
|
37465
|
+
title: {},
|
|
37466
|
+
tabs: {},
|
|
37467
|
+
modelValue: {},
|
|
37468
|
+
router: {},
|
|
37469
|
+
sideTabs: { type: Boolean }
|
|
37470
|
+
},
|
|
37471
|
+
emits: ["update:modelValue"],
|
|
37472
|
+
setup(__props, { emit: __emit }) {
|
|
37473
|
+
const emit2 = __emit;
|
|
37474
|
+
let activeTab = ref();
|
|
37475
|
+
const props2 = __props;
|
|
37476
|
+
function changeTab(tab) {
|
|
37477
|
+
var _a2;
|
|
37478
|
+
activeTab.value = tab;
|
|
37479
|
+
emit2("update:modelValue", activeTab.value);
|
|
37480
|
+
if (!props2.router)
|
|
37481
|
+
return;
|
|
37482
|
+
void ((_a2 = props2.router) == null ? void 0 : _a2.push({
|
|
37483
|
+
path: props2.router.currentRoute.value.path,
|
|
37484
|
+
query: { ...props2.router.currentRoute.value.query, t: tab },
|
|
37485
|
+
hash: props2.router.currentRoute.value.hash
|
|
37486
|
+
}));
|
|
37487
|
+
}
|
|
37488
|
+
onMounted(() => {
|
|
37489
|
+
var _a2;
|
|
37490
|
+
const firstTab = props2.modelValue || ((_a2 = props2.router) == null ? void 0 : _a2.currentRoute.value.query.t) || props2.tabs[0];
|
|
37491
|
+
activeTab.value = firstTab;
|
|
37492
|
+
});
|
|
37493
|
+
return (_ctx, _cache) => {
|
|
37494
|
+
return openBlock(), createElementBlock("div", {
|
|
37495
|
+
class: normalizeClass(["h-100 grid list-view gap-1", { "side-tabs": _ctx.sideTabs }])
|
|
37496
|
+
}, [
|
|
37497
|
+
createElementVNode("div", _hoisted_1, [
|
|
37498
|
+
renderSlot(_ctx.$slots, "top-section", {}, void 0, true),
|
|
37499
|
+
createElementVNode("div", _hoisted_2, [
|
|
37500
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.tabs, (tab) => {
|
|
37501
|
+
var _a2;
|
|
37502
|
+
return openBlock(), createElementBlock("div", {
|
|
37503
|
+
class: normalizeClass([{
|
|
37504
|
+
active: tab === unref(activeTab) || tab === ((_a2 = _ctx.router) == null ? void 0 : _a2.currentRoute.value.path.split("/").slice(-1)[0])
|
|
37505
|
+
}, "tab"]),
|
|
37506
|
+
key: tab,
|
|
37507
|
+
onClick: ($event) => changeTab(tab)
|
|
37508
|
+
}, toDisplayString(tab), 11, _hoisted_3);
|
|
37509
|
+
}), 128))
|
|
37510
|
+
])
|
|
37511
|
+
]),
|
|
37512
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.tabs.filter((item) => item === unref(activeTab)), (tab) => {
|
|
37513
|
+
return openBlock(), createElementBlock("div", {
|
|
37514
|
+
class: "list-content",
|
|
37515
|
+
key: tab
|
|
37516
|
+
}, [
|
|
37517
|
+
renderSlot(_ctx.$slots, tab, { key: tab }, void 0, true)
|
|
37518
|
+
]);
|
|
37519
|
+
}), 128))
|
|
37520
|
+
], 2);
|
|
37521
|
+
};
|
|
37522
|
+
}
|
|
37523
|
+
});
|
|
37524
|
+
const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fd61196d"]]);
|
|
38780
37525
|
export {
|
|
38781
|
-
_sfc_main$
|
|
37526
|
+
_sfc_main$q as Accordion,
|
|
38782
37527
|
AccordionItem,
|
|
38783
37528
|
Alert,
|
|
38784
37529
|
Avatar,
|
|
38785
37530
|
Badge,
|
|
38786
|
-
_sfc_main$
|
|
37531
|
+
_sfc_main$l as BagelForm,
|
|
38787
37532
|
BagelVue,
|
|
38788
|
-
_sfc_main$
|
|
38789
|
-
_sfc_main$
|
|
37533
|
+
_sfc_main$k as BglField,
|
|
37534
|
+
_sfc_main$l as BglForm,
|
|
38790
37535
|
BglVideo,
|
|
38791
37536
|
Btn,
|
|
38792
|
-
_sfc_main$
|
|
37537
|
+
_sfc_main$t as Card,
|
|
38793
37538
|
Carousel,
|
|
38794
37539
|
CheckInput,
|
|
38795
37540
|
Checkbox,
|
|
38796
|
-
_sfc_main$
|
|
38797
|
-
ComboBox,
|
|
37541
|
+
_sfc_main$b as ColorPicker,
|
|
38798
37542
|
Comments,
|
|
38799
37543
|
DataPreview,
|
|
38800
|
-
_sfc_main$
|
|
38801
|
-
_sfc_main$
|
|
37544
|
+
_sfc_main$i as DateInput,
|
|
37545
|
+
_sfc_main$a as DatePicker,
|
|
38802
37546
|
FileUpload,
|
|
38803
|
-
_sfc_main$
|
|
37547
|
+
_sfc_main$H as Icon,
|
|
38804
37548
|
JSONInput,
|
|
38805
|
-
|
|
38806
|
-
_sfc_main$
|
|
38807
|
-
_sfc_main$
|
|
38808
|
-
_sfc_main$
|
|
38809
|
-
_sfc_main$
|
|
38810
|
-
_sfc_main$
|
|
37549
|
+
Layout,
|
|
37550
|
+
_sfc_main$6 as Lineart,
|
|
37551
|
+
_sfc_main$A as ListItem,
|
|
37552
|
+
_sfc_main$B as ListView,
|
|
37553
|
+
_sfc_main$H as MaterialIcon,
|
|
37554
|
+
_sfc_main$E as Modal,
|
|
38811
37555
|
ModalForm,
|
|
38812
37556
|
ModalPlugin,
|
|
38813
37557
|
NavBar,
|
|
38814
|
-
_sfc_main$
|
|
38815
|
-
_sfc_main$
|
|
37558
|
+
_sfc_main$y as PageTitle,
|
|
37559
|
+
_sfc_main$I as RTXEditor,
|
|
38816
37560
|
RadioPillsInput,
|
|
38817
37561
|
RichTextEditor,
|
|
38818
37562
|
RouterWrapper,
|
|
38819
|
-
|
|
37563
|
+
SelectInput,
|
|
38820
37564
|
SidebarMenu,
|
|
38821
37565
|
TabbedLayout,
|
|
38822
37566
|
TableField,
|
|
38823
37567
|
TableSchema,
|
|
37568
|
+
_sfc_main$3 as Tabs,
|
|
37569
|
+
_sfc_main$1 as TabsBody,
|
|
37570
|
+
TabsNav,
|
|
38824
37571
|
TextInput,
|
|
38825
|
-
_sfc_main$
|
|
37572
|
+
_sfc_main$r as Title,
|
|
38826
37573
|
ToggleInput,
|
|
38827
37574
|
TopBar,
|
|
38828
37575
|
BagelFormUtils as bagelFormUtils,
|