@flux-ui/components 3.0.0-next.71 → 3.0.0-next.73
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/component/FluxFormField.vue.d.ts +2 -2
- package/dist/index.css +303 -303
- package/dist/index.js +1103 -1057
- package/dist/index.js.map +1 -1
- package/dist/util/index.d.ts +1 -0
- package/dist/util/sanitizeUrl.d.ts +7 -0
- package/package.json +7 -7
- package/src/component/FluxColorPicker.vue +1 -1
- package/src/component/FluxFormField.vue +4 -2
- package/src/component/FluxKanbanColumn.vue +1 -1
- package/src/component/FluxPressable.vue +14 -5
- package/src/component/primitive/DialogLayout.vue +3 -3
- package/src/util/index.ts +1 -0
- package/src/util/sanitizeUrl.ts +40 -0
package/dist/index.js
CHANGED
|
@@ -2369,7 +2369,7 @@ function useTooltipInjection_default() {
|
|
|
2369
2369
|
return inject(FluxTooltipInjectionKey, { calculate: () => void 0 });
|
|
2370
2370
|
}
|
|
2371
2371
|
//#endregion
|
|
2372
|
-
//#region ../../node_modules/.bun/@basmilius+utils@3.
|
|
2372
|
+
//#region ../../node_modules/.bun/@basmilius+utils@3.37.0+f2ed1ec6a4c7f7fd/node_modules/@basmilius/utils/dist/index.mjs
|
|
2373
2373
|
function t$1(e, t) {
|
|
2374
2374
|
return Math.round(e / t) * t;
|
|
2375
2375
|
}
|
|
@@ -6585,7 +6585,7 @@ useMode(definition$2);
|
|
|
6585
6585
|
useMode(definition$1);
|
|
6586
6586
|
useMode(definition);
|
|
6587
6587
|
//#endregion
|
|
6588
|
-
//#region ../../node_modules/.bun/@basmilius+http-client@3.
|
|
6588
|
+
//#region ../../node_modules/.bun/@basmilius+http-client@3.37.0+f97c77f67c914c00/node_modules/@basmilius/http-client/dist/index.mjs
|
|
6589
6589
|
function adapter_default(Parent) {
|
|
6590
6590
|
return class extends Parent {
|
|
6591
6591
|
constructor(...args) {
|
|
@@ -6593,6 +6593,11 @@ function adapter_default(Parent) {
|
|
|
6593
6593
|
}
|
|
6594
6594
|
};
|
|
6595
6595
|
}
|
|
6596
|
+
function bound_default() {
|
|
6597
|
+
return (target, method) => {
|
|
6598
|
+
target[method] = target[method].bind(target);
|
|
6599
|
+
};
|
|
6600
|
+
}
|
|
6596
6601
|
/**
|
|
6597
6602
|
* Checks if the two given values are equal. When both values are a
|
|
6598
6603
|
* dto, the check is done by firstly converthing them to JSON.
|
|
@@ -6616,7 +6621,7 @@ var TRIGGER = Symbol();
|
|
|
6616
6621
|
* Checks if the given object is a dto.
|
|
6617
6622
|
*/
|
|
6618
6623
|
function isDto_default(obj) {
|
|
6619
|
-
return
|
|
6624
|
+
return typeof obj === "object" && obj !== null && NAME in obj;
|
|
6620
6625
|
}
|
|
6621
6626
|
/**
|
|
6622
6627
|
* Asserts that the given object is a dto.
|
|
@@ -6671,6 +6676,9 @@ var markDtoClean = circularProtect_default(function(obj) {
|
|
|
6671
6676
|
if (!obj[CHILDREN] || obj[CHILDREN].length === 0) return;
|
|
6672
6677
|
obj[CHILDREN].filter(isDtoDirty_default).forEach(markDtoClean);
|
|
6673
6678
|
});
|
|
6679
|
+
function isProxiedArray_default(value) {
|
|
6680
|
+
return Array.isArray(value) && PARENT in value;
|
|
6681
|
+
}
|
|
6674
6682
|
/**
|
|
6675
6683
|
* Marks the given dto dirty.
|
|
6676
6684
|
*/
|
|
@@ -6697,7 +6705,7 @@ function relateDtoTo_default(dto, parent, key) {
|
|
|
6697
6705
|
*/
|
|
6698
6706
|
function relateValueTo_default(dto, key, value) {
|
|
6699
6707
|
if (isDto_default(value)) relateDtoTo_default(value, dto, key);
|
|
6700
|
-
else if (
|
|
6708
|
+
else if (isProxiedArray_default(value)) {
|
|
6701
6709
|
for (const item of value) {
|
|
6702
6710
|
if (!isDto_default(item)) continue;
|
|
6703
6711
|
relateDtoTo_default(item, dto, key);
|
|
@@ -6729,7 +6737,7 @@ function unrelateDtoFrom_default(dto, parent) {
|
|
|
6729
6737
|
*/
|
|
6730
6738
|
function unrelateValueFrom_default(dto, value) {
|
|
6731
6739
|
if (isDto_default(value)) unrelateDtoFrom_default(value, dto);
|
|
6732
|
-
else if (
|
|
6740
|
+
else if (isProxiedArray_default(value)) {
|
|
6733
6741
|
for (const item of value) if (isDto_default(item)) unrelateDtoFrom_default(item, dto);
|
|
6734
6742
|
value[PARENT] = void 0;
|
|
6735
6743
|
value[PARENT_KEY] = void 0;
|
|
@@ -6773,7 +6781,7 @@ var arrayProxy_default = {
|
|
|
6773
6781
|
}
|
|
6774
6782
|
};
|
|
6775
6783
|
/**
|
|
6776
|
-
* Checks if the
|
|
6784
|
+
* Checks if the proxy should ignore the given key.
|
|
6777
6785
|
*/
|
|
6778
6786
|
function ignored(target, key) {
|
|
6779
6787
|
return typeof key === "symbol" || typeof target[key] === "function" || key === "length";
|
|
@@ -6818,7 +6826,7 @@ var instanceProxy_default = {
|
|
|
6818
6826
|
const oldValue = descriptor.get?.call(target) ?? void 0;
|
|
6819
6827
|
if (areEqual_default(value, oldValue)) return true;
|
|
6820
6828
|
unrelateValueFrom_default(target, oldValue);
|
|
6821
|
-
if (Array.isArray(value) && !value
|
|
6829
|
+
if (Array.isArray(value) && !isProxiedArray_default(value)) value = new Proxy(value, arrayProxy_default);
|
|
6822
6830
|
descriptor.set.call(target, value);
|
|
6823
6831
|
relateValueTo_default(target, key, value);
|
|
6824
6832
|
markDtoDirty(target, key);
|
|
@@ -6942,7 +6950,7 @@ function dto_default(clazz) {
|
|
|
6942
6950
|
K$2(clazz.prototype, DESCRIPTORS, descriptors);
|
|
6943
6951
|
K$2(clazz.prototype, NAME, clazz.name);
|
|
6944
6952
|
K$2(clazz.prototype, PROPERTIES, properties);
|
|
6945
|
-
K$2(clazz, Symbol.hasInstance, (instance) => typeof instance === "object" && instance
|
|
6953
|
+
K$2(clazz, Symbol.hasInstance, (instance) => typeof instance === "object" && instance !== null && NAME in instance && instance[NAME] === clazz.name);
|
|
6946
6954
|
G$2(clazz, "clone", clone_default);
|
|
6947
6955
|
G$2(clazz, "fill", fill_default);
|
|
6948
6956
|
G$2(clazz, "toJSON", toJSON_default);
|
|
@@ -6963,6 +6971,12 @@ function __decorate(decorators, target, key, desc) {
|
|
|
6963
6971
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6964
6972
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6965
6973
|
}
|
|
6974
|
+
var X$2 = class {
|
|
6975
|
+
test() {
|
|
6976
|
+
return true;
|
|
6977
|
+
}
|
|
6978
|
+
};
|
|
6979
|
+
__decorate([bound_default()], X$2.prototype, "test", null);
|
|
6966
6980
|
var BlobResponse = class BlobResponse {
|
|
6967
6981
|
get blob() {
|
|
6968
6982
|
return this.#blob;
|
|
@@ -7075,7 +7089,7 @@ var HttpAdapter = _HttpAdapter = class HttpAdapter {
|
|
|
7075
7089
|
const defaultFilename = `download-${DateTime.now().toFormat("yyyy-MM-dd HH-mm-ss")}`;
|
|
7076
7090
|
if (!header.startsWith("attachment")) return defaultFilename;
|
|
7077
7091
|
const matches = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(header);
|
|
7078
|
-
if (
|
|
7092
|
+
if (!matches || matches.length < 2) return defaultFilename;
|
|
7079
7093
|
return matches[1].replaceAll("'", "").replaceAll("\"", "").replaceAll("/", "-").replaceAll(":", "-");
|
|
7080
7094
|
}
|
|
7081
7095
|
static parseRequestError(data, statusCode) {
|
|
@@ -7083,12 +7097,7 @@ var HttpAdapter = _HttpAdapter = class HttpAdapter {
|
|
|
7083
7097
|
}
|
|
7084
7098
|
static parseValidationError(data) {
|
|
7085
7099
|
let errors;
|
|
7086
|
-
if (data.errors)
|
|
7087
|
-
errors = {};
|
|
7088
|
-
Object.entries(data.errors).forEach(([key, value]) => {
|
|
7089
|
-
errors[key] = _HttpAdapter.parseValidationError(value);
|
|
7090
|
-
});
|
|
7091
|
-
}
|
|
7100
|
+
if (data.errors) errors = Object.fromEntries(Object.entries(data.errors).map(([key, value]) => [key, _HttpAdapter.parseValidationError(value)]));
|
|
7092
7101
|
return new ValidationError_default(data.code, data.error, data.error_description, errors, data.params);
|
|
7093
7102
|
}
|
|
7094
7103
|
};
|
|
@@ -7195,7 +7204,7 @@ function ye$1(e, t, n) {
|
|
|
7195
7204
|
onScopeDispose(o);
|
|
7196
7205
|
}
|
|
7197
7206
|
//#endregion
|
|
7198
|
-
//#region ../internals/dist/composable-
|
|
7207
|
+
//#region ../internals/dist/composable-BLswOqxr.js
|
|
7199
7208
|
function _$1(e, t) {
|
|
7200
7209
|
let n = ref(!1), r = ref(e), i = computed(() => {
|
|
7201
7210
|
let e = [], t = unref(r).month, n = unref(r).startOf(`month`);
|
|
@@ -7401,11 +7410,13 @@ function O$1(t, n = {}) {
|
|
|
7401
7410
|
function k$1(e, t) {
|
|
7402
7411
|
let n = `flux/${e}`, r = ref(i() ?? t);
|
|
7403
7412
|
function i() {
|
|
7404
|
-
if (n in localStorage)
|
|
7413
|
+
if (!(n in localStorage)) return null;
|
|
7414
|
+
try {
|
|
7405
7415
|
let e = JSON.parse(localStorage.getItem(n));
|
|
7406
7416
|
return Array.isArray(e) && e[0] === `DateTime` && (e = DateTime.fromISO(e[1])), e;
|
|
7417
|
+
} catch {
|
|
7418
|
+
return null;
|
|
7407
7419
|
}
|
|
7408
|
-
return null;
|
|
7409
7420
|
}
|
|
7410
7421
|
return watch(r, (e) => {
|
|
7411
7422
|
let t = e;
|
|
@@ -7682,779 +7693,403 @@ var FluxIcon_default = /* @__PURE__ */ defineComponent({
|
|
|
7682
7693
|
};
|
|
7683
7694
|
}
|
|
7684
7695
|
});
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
const emit = __emit;
|
|
7710
|
-
const hoverListeners = {
|
|
7711
|
-
onMouseenter: (evt) => emit("mouseenter", evt),
|
|
7712
|
-
onMouseleave: (evt) => emit("mouseleave", evt)
|
|
7713
|
-
};
|
|
7714
|
-
function onClick(evt, navigate) {
|
|
7715
|
-
emit("click", evt);
|
|
7716
|
-
if (evt.defaultPrevented) return;
|
|
7717
|
-
navigate?.(evt);
|
|
7718
|
-
}
|
|
7719
|
-
return (_ctx, _cache) => {
|
|
7720
|
-
const _component_router_link = resolveComponent("router-link");
|
|
7721
|
-
return __props.componentType === "route" ? (openBlock(), createBlock(_component_router_link, mergeProps({ key: 0 }, $attrs, toHandlers(hoverListeners), {
|
|
7722
|
-
rel: __props.rel,
|
|
7723
|
-
target: __props.target,
|
|
7724
|
-
to: __props.to,
|
|
7725
|
-
onClick: _cache[0] || (_cache[0] = ($event) => onClick($event))
|
|
7726
|
-
}), {
|
|
7727
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
7728
|
-
_: 3
|
|
7729
|
-
}, 16, [
|
|
7730
|
-
"rel",
|
|
7731
|
-
"target",
|
|
7732
|
-
"to"
|
|
7733
|
-
])) : __props.componentType === "link" ? (openBlock(), createElementBlock("a", mergeProps({ key: 1 }, $attrs, toHandlers(hoverListeners, true), {
|
|
7734
|
-
href: __props.href,
|
|
7735
|
-
rel: __props.rel,
|
|
7736
|
-
target: __props.target,
|
|
7737
|
-
onClick: _cache[1] || (_cache[1] = ($event) => onClick($event))
|
|
7738
|
-
}), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$61)) : __props.componentType === "button" ? (openBlock(), createElementBlock("button", mergeProps({ key: 2 }, $attrs, toHandlers(hoverListeners, true), { onClick: _cache[2] || (_cache[2] = ($event) => onClick($event)) }), [renderSlot(_ctx.$slots, "default")], 16)) : (openBlock(), createElementBlock("div", mergeProps({ key: 3 }, $attrs, toHandlers(hoverListeners, true), { onClick }), [renderSlot(_ctx.$slots, "default")], 16));
|
|
7739
|
-
};
|
|
7740
|
-
}
|
|
7741
|
-
});
|
|
7742
|
-
var Spinner_module_default = {
|
|
7743
|
-
spinner: `spinner`,
|
|
7744
|
-
spinnerTrack: `spinner-track`,
|
|
7745
|
-
spinnerEffect: `spinner-effect`,
|
|
7746
|
-
spinnerValue: `spinner-value`
|
|
7696
|
+
var Overlay_module_default = {
|
|
7697
|
+
overlayView: `overlay-view`,
|
|
7698
|
+
overlayProvider: `overlay-provider overlay-view`,
|
|
7699
|
+
overlayShade: `overlay-shade overlay-view`,
|
|
7700
|
+
overlay: `overlay`,
|
|
7701
|
+
overlayTransitionLeaveActive: `overlay-transition-leave-active`,
|
|
7702
|
+
slideOverTransitionLeaveActive: `slide-over-transition-leave-active`,
|
|
7703
|
+
basePaneStructure: `base-pane-structure`,
|
|
7704
|
+
paneFooter: `pane-footer`,
|
|
7705
|
+
isCurrent: `is-current`,
|
|
7706
|
+
overlaySmall: `overlay-small overlay`,
|
|
7707
|
+
overlayMedium: `overlay-medium overlay`,
|
|
7708
|
+
overlayLarge: `overlay-large overlay`,
|
|
7709
|
+
slideOver: `slide-over overlay`,
|
|
7710
|
+
paneHeader: `pane-header`,
|
|
7711
|
+
tabs: `tabs`,
|
|
7712
|
+
tabBarDefault: `tab-bar-default`,
|
|
7713
|
+
paneHeaderCaption: `pane-header-caption`,
|
|
7714
|
+
overlayTransitionEnterActive: `overlay-transition-enter-active`,
|
|
7715
|
+
overlayTransitionEnterFrom: `overlay-transition-enter-from`,
|
|
7716
|
+
overlayTransitionLeaveTo: `overlay-transition-leave-to`,
|
|
7717
|
+
slideOverTransitionEnterActive: `slide-over-transition-enter-active`,
|
|
7718
|
+
slideOverTransitionEnterFrom: `slide-over-transition-enter-from`,
|
|
7719
|
+
slideOverTransitionLeaveTo: `slide-over-transition-leave-to`
|
|
7747
7720
|
};
|
|
7748
7721
|
//#endregion
|
|
7749
|
-
//#region src/
|
|
7750
|
-
var
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
cy: "12",
|
|
7772
|
-
r: "10",
|
|
7773
|
-
fill: "transparent",
|
|
7774
|
-
"stroke-width": "4",
|
|
7775
|
-
"stroke-dasharray": "21 45",
|
|
7776
|
-
"stroke-dashoffset": "30",
|
|
7777
|
-
"stroke-linecap": "round"
|
|
7778
|
-
}, null, 2),
|
|
7779
|
-
createElementVNode("circle", {
|
|
7780
|
-
class: normalizeClass(unref(Spinner_module_default).spinnerValue),
|
|
7781
|
-
cx: "12",
|
|
7782
|
-
cy: "12",
|
|
7783
|
-
r: "10",
|
|
7784
|
-
fill: "transparent",
|
|
7785
|
-
"stroke-width": "4",
|
|
7786
|
-
"stroke-dasharray": "21 45",
|
|
7787
|
-
"stroke-dashoffset": "30",
|
|
7788
|
-
"stroke-linecap": "round"
|
|
7789
|
-
}, null, 2)
|
|
7790
|
-
], 6);
|
|
7791
|
-
};
|
|
7722
|
+
//#region src/util/createDialogRenderer.ts
|
|
7723
|
+
var TARGET_SELECTOR = `.${Overlay_module_default.overlayProvider.replaceAll(" ", ".")}`;
|
|
7724
|
+
var DIALOG_ID = 0;
|
|
7725
|
+
function createDialogRenderer_default(attrs, props, emit, slots, className, transition) {
|
|
7726
|
+
const dialogId = `flux-dialog:${DIALOG_ID++}`;
|
|
7727
|
+
let unregister = null;
|
|
7728
|
+
let zIndex = 0;
|
|
7729
|
+
const dialogRef = ref();
|
|
7730
|
+
F$1(dialogRef);
|
|
7731
|
+
onUnmounted(() => {
|
|
7732
|
+
unregister?.();
|
|
7733
|
+
});
|
|
7734
|
+
watch(dialogRef, (dialog, _, onCleanup) => {
|
|
7735
|
+
if (!dialog) return;
|
|
7736
|
+
dialog.addEventListener("keydown", onKeyDown, { passive: true });
|
|
7737
|
+
onCleanup(() => {
|
|
7738
|
+
dialog.removeEventListener("keydown", onKeyDown);
|
|
7739
|
+
});
|
|
7740
|
+
});
|
|
7741
|
+
function onKeyDown(evt) {
|
|
7742
|
+
if (evt.key !== "Escape" || !unregister || !props.isCloseable) return;
|
|
7743
|
+
emit("close");
|
|
7792
7744
|
}
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7745
|
+
return () => {
|
|
7746
|
+
const { dialogCount } = useFluxStore();
|
|
7747
|
+
const children = a$2(slots.default?.() ?? []);
|
|
7748
|
+
const isVisible = children.length > 0 && children.some((child) => child.type !== Comment);
|
|
7749
|
+
let content;
|
|
7750
|
+
if (isVisible) {
|
|
7751
|
+
if (!unregister) [zIndex, unregister] = registerDialog();
|
|
7752
|
+
content = h("div", {
|
|
7753
|
+
key: props.viewKey ?? dialogId,
|
|
7754
|
+
ref: dialogRef,
|
|
7755
|
+
class: [className, zIndex === dialogCount && Overlay_module_default.isCurrent],
|
|
7756
|
+
style: { zIndex: zIndex + 1e3 },
|
|
7757
|
+
tabindex: 0
|
|
7758
|
+
}, children);
|
|
7759
|
+
} else {
|
|
7760
|
+
unregister?.();
|
|
7761
|
+
unregister = null;
|
|
7762
|
+
}
|
|
7763
|
+
return h(Teleport, {
|
|
7764
|
+
defer: true,
|
|
7765
|
+
disabled: !content,
|
|
7766
|
+
to: TARGET_SELECTOR
|
|
7767
|
+
}, [h(transition, attrs, { default: () => content })]);
|
|
7768
|
+
};
|
|
7769
|
+
}
|
|
7806
7770
|
//#endregion
|
|
7807
|
-
//#region src/
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
];
|
|
7771
|
+
//#region src/composable/private/useAsyncFilterOptions.ts
|
|
7772
|
+
function useAsyncFilterOptions_default(params) {
|
|
7773
|
+
const { isLoading, loaded } = X$1();
|
|
7774
|
+
const debouncedModelSearch = Y$1(params.modelSearch, 150);
|
|
7775
|
+
const fetchOptions = computed(() => loaded(params.fetchOptions));
|
|
7776
|
+
const fetchRelevant = computed(() => loaded(params.fetchRelevant));
|
|
7777
|
+
const fetchSearch = computed(() => loaded(params.fetchSearch));
|
|
7778
|
+
const selectedOptions = ref([]);
|
|
7779
|
+
const visibleOptions = ref([]);
|
|
7780
|
+
const options = computed(() => {
|
|
7781
|
+
const options = [];
|
|
7782
|
+
const search = unref(params.modelSearch);
|
|
7783
|
+
const selected = unref(selectedOptions);
|
|
7784
|
+
const visible = unref(visibleOptions);
|
|
7785
|
+
visible.forEach((vo) => options.push(vo));
|
|
7786
|
+
selected.forEach((so) => {
|
|
7787
|
+
if (isFluxFilterOptionItem(so) && visible.find((vo) => isFluxFilterOptionItem(vo) && vo.value === so.value)) return;
|
|
7788
|
+
if (isFluxFilterOptionItem(so) && !so.label.toLowerCase().includes(search.toLowerCase())) return;
|
|
7789
|
+
options.push(so);
|
|
7790
|
+
});
|
|
7791
|
+
return options;
|
|
7792
|
+
});
|
|
7793
|
+
watch(params.currentValueIds, async (ids) => {
|
|
7794
|
+
if (ids.length === 0) return;
|
|
7795
|
+
selectedOptions.value = await unref(fetchOptions)(ids);
|
|
7796
|
+
}, { immediate: true });
|
|
7797
|
+
watch(debouncedModelSearch, async (searchQuery) => {
|
|
7798
|
+
if (searchQuery.length > 0) visibleOptions.value = await unref(fetchSearch)(searchQuery);
|
|
7799
|
+
else visibleOptions.value = await unref(fetchRelevant)();
|
|
7800
|
+
}, { immediate: true });
|
|
7801
|
+
return {
|
|
7802
|
+
isLoading,
|
|
7803
|
+
options
|
|
7804
|
+
};
|
|
7805
|
+
}
|
|
7816
7806
|
//#endregion
|
|
7817
|
-
//#region src/
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7807
|
+
//#region src/composable/private/useDateFlyout.ts
|
|
7808
|
+
function useDateFlyout_default(modelValue, flyoutRef, options = {}) {
|
|
7809
|
+
const localValue = ref(null);
|
|
7810
|
+
watch(modelValue, (value) => {
|
|
7811
|
+
localValue.value = options.transformIn ? options.transformIn(value) : value;
|
|
7812
|
+
}, { immediate: true });
|
|
7813
|
+
watch(localValue, (value) => {
|
|
7814
|
+
unref(flyoutRef)?.close();
|
|
7815
|
+
if (options.compareKey && options.compareKey(modelValue.value) === options.compareKey(value)) return;
|
|
7816
|
+
modelValue.value = value;
|
|
7817
|
+
});
|
|
7818
|
+
return localValue;
|
|
7819
|
+
}
|
|
7820
|
+
//#endregion
|
|
7821
|
+
//#region src/composable/private/useDropdownPopup.ts
|
|
7822
|
+
/**
|
|
7823
|
+
* Shared dropdown-popup infrastructure for select-like components. Manages:
|
|
7824
|
+
* - open/close state
|
|
7825
|
+
* - click-outside (close when clicking outside popup + anchor)
|
|
7826
|
+
* - focus-back-to-anchor on close
|
|
7827
|
+
* - focus-the-inner-focus-element on open
|
|
7828
|
+
* - Escape/Tab keyboard handling
|
|
7829
|
+
*/
|
|
7830
|
+
function useDropdownPopup(options) {
|
|
7831
|
+
const isOpen = ref(false);
|
|
7832
|
+
function open() {
|
|
7833
|
+
if (unref(options.disabled) || unref(options.readonly)) return;
|
|
7834
|
+
isOpen.value = true;
|
|
7835
|
+
}
|
|
7836
|
+
function close() {
|
|
7837
|
+
isOpen.value = false;
|
|
7838
|
+
}
|
|
7839
|
+
function toggle() {
|
|
7840
|
+
if (unref(options.disabled) || unref(options.readonly)) return;
|
|
7841
|
+
isOpen.value = !unref(isOpen);
|
|
7842
|
+
}
|
|
7843
|
+
function focusAnchor() {
|
|
7844
|
+
nextTick(() => _$2(options.anchorRef)?.focus());
|
|
7845
|
+
}
|
|
7846
|
+
function onKeyDownBase(evt) {
|
|
7847
|
+
if (evt.key === "Escape" && unref(isOpen)) {
|
|
7848
|
+
evt.preventDefault();
|
|
7849
|
+
isOpen.value = false;
|
|
7850
|
+
focusAnchor();
|
|
7851
|
+
return true;
|
|
7854
7852
|
}
|
|
7855
|
-
|
|
7856
|
-
|
|
7853
|
+
if (evt.key === "Tab" && unref(isOpen)) {
|
|
7854
|
+
isOpen.value = false;
|
|
7855
|
+
return true;
|
|
7857
7856
|
}
|
|
7858
|
-
|
|
7859
|
-
|
|
7857
|
+
return false;
|
|
7858
|
+
}
|
|
7859
|
+
if (typeof window !== "undefined") {
|
|
7860
|
+
K$1([options.anchorRef, options.popupRef], isOpen, () => isOpen.value = false);
|
|
7861
|
+
K$1(options.anchorRef, isOpen, () => unref(options.focusElement)?.focus());
|
|
7862
|
+
}
|
|
7863
|
+
watch(isOpen, (opened) => {
|
|
7864
|
+
if (!opened) {
|
|
7865
|
+
options.onClose?.();
|
|
7866
|
+
return;
|
|
7860
7867
|
}
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7868
|
+
nextTick(() => unref(options.focusElement)?.focus());
|
|
7869
|
+
options.onOpen?.();
|
|
7870
|
+
});
|
|
7871
|
+
return {
|
|
7872
|
+
isOpen,
|
|
7873
|
+
open,
|
|
7874
|
+
close,
|
|
7875
|
+
toggle,
|
|
7876
|
+
focusAnchor,
|
|
7877
|
+
onKeyDownBase
|
|
7878
|
+
};
|
|
7879
|
+
}
|
|
7880
|
+
//#endregion
|
|
7881
|
+
//#region src/composable/private/useFormSelect.ts
|
|
7882
|
+
function useFormSelect_default(modelValue, isMultiple, options, searchQuery) {
|
|
7883
|
+
const values = computed(() => {
|
|
7884
|
+
const model = unref(modelValue);
|
|
7885
|
+
return Array.isArray(model) ? model : [model];
|
|
7886
|
+
});
|
|
7887
|
+
const groups = computed(() => {
|
|
7888
|
+
const groups = [];
|
|
7889
|
+
const search = unref(searchQuery)?.trim().toLowerCase();
|
|
7890
|
+
const available = unref(options).filter((o) => isFluxFormSelectGroup(o) || !search || o.label.toLowerCase().includes(search)).filter((o) => isFluxFormSelectGroup(o) || !isMultiple || !unref(selected).find((s) => s.value === o.value));
|
|
7891
|
+
if (available.length === 0) return [];
|
|
7892
|
+
if (!available.find(isFluxFormSelectGroup)) return [[null, available]];
|
|
7893
|
+
for (let i = 0; i < available.length;) {
|
|
7894
|
+
const item = available[i];
|
|
7895
|
+
if (isFluxFormSelectOption(item)) {
|
|
7896
|
+
++i;
|
|
7897
|
+
groups.push([null, [item]]);
|
|
7898
|
+
continue;
|
|
7899
|
+
}
|
|
7900
|
+
const subItems = [];
|
|
7901
|
+
for (++i; i <= available.length; ++i) {
|
|
7902
|
+
const subItem = available[i];
|
|
7903
|
+
if (isFluxFormSelectGroup(subItem) || i === available.length) {
|
|
7904
|
+
if (subItems.length > 0) groups.push([item, subItems]);
|
|
7905
|
+
break;
|
|
7906
|
+
}
|
|
7907
|
+
subItems.push(subItem);
|
|
7908
|
+
}
|
|
7909
|
+
}
|
|
7910
|
+
return groups;
|
|
7911
|
+
});
|
|
7912
|
+
const selected = computed(() => unref(values).map((v) => unref(options).find((o) => isFluxFormSelectOption(o) && o.value === v)).filter(isFluxFormSelectOption));
|
|
7913
|
+
return {
|
|
7914
|
+
groups,
|
|
7915
|
+
selected,
|
|
7916
|
+
values
|
|
7917
|
+
};
|
|
7918
|
+
}
|
|
7919
|
+
//#endregion
|
|
7920
|
+
//#region src/composable/private/useKanbanAutoScroll.ts
|
|
7921
|
+
var AUTOSCROLL_ZONE = 40;
|
|
7922
|
+
var AUTOSCROLL_MAX_SPEED = 12;
|
|
7923
|
+
/**
|
|
7924
|
+
* Drives horizontal (board) and vertical (column body) auto-scroll while a drag
|
|
7925
|
+
* is in progress. Reads the active scroll containers via the option callbacks.
|
|
7926
|
+
*/
|
|
7927
|
+
function useKanbanAutoScroll(options) {
|
|
7928
|
+
let frame = null;
|
|
7929
|
+
let deltaX = 0;
|
|
7930
|
+
let deltaY = 0;
|
|
7931
|
+
let verticalTarget = null;
|
|
7932
|
+
function onPointerMove(clientX, clientY) {
|
|
7933
|
+
const board = options.getBoardElement();
|
|
7934
|
+
const target = options.getVerticalTarget();
|
|
7935
|
+
deltaX = board ? computeScrollDelta(board.getBoundingClientRect(), clientX, "horizontal") : 0;
|
|
7936
|
+
deltaY = target ? computeScrollDelta(target.getBoundingClientRect(), clientY, "vertical") : 0;
|
|
7937
|
+
verticalTarget = target;
|
|
7938
|
+
if (deltaX !== 0 || deltaY !== 0) start();
|
|
7939
|
+
else stop();
|
|
7940
|
+
}
|
|
7941
|
+
function start() {
|
|
7942
|
+
if (frame !== null) return;
|
|
7943
|
+
const tick = () => {
|
|
7944
|
+
const board = options.getBoardElement();
|
|
7945
|
+
if (deltaX !== 0 && board) board.scrollLeft += deltaX;
|
|
7946
|
+
if (deltaY !== 0 && verticalTarget) verticalTarget.scrollTop += deltaY;
|
|
7947
|
+
if (deltaX === 0 && deltaY === 0) {
|
|
7948
|
+
frame = null;
|
|
7949
|
+
return;
|
|
7950
|
+
}
|
|
7951
|
+
frame = requestAnimationFrame(tick);
|
|
7914
7952
|
};
|
|
7953
|
+
frame = requestAnimationFrame(tick);
|
|
7915
7954
|
}
|
|
7916
|
-
|
|
7955
|
+
function stop() {
|
|
7956
|
+
if (frame !== null) {
|
|
7957
|
+
cancelAnimationFrame(frame);
|
|
7958
|
+
frame = null;
|
|
7959
|
+
}
|
|
7960
|
+
deltaX = 0;
|
|
7961
|
+
deltaY = 0;
|
|
7962
|
+
verticalTarget = null;
|
|
7963
|
+
}
|
|
7964
|
+
return {
|
|
7965
|
+
onPointerMove,
|
|
7966
|
+
stop
|
|
7967
|
+
};
|
|
7968
|
+
}
|
|
7969
|
+
function computeScrollDelta(rect, position, axis) {
|
|
7970
|
+
const start = axis === "horizontal" ? rect.left : rect.top;
|
|
7971
|
+
const end = axis === "horizontal" ? rect.right : rect.bottom;
|
|
7972
|
+
if (position < start + AUTOSCROLL_ZONE) {
|
|
7973
|
+
const distance = Math.max(0, position - start);
|
|
7974
|
+
return -Math.round((AUTOSCROLL_ZONE - distance) / AUTOSCROLL_ZONE * AUTOSCROLL_MAX_SPEED);
|
|
7975
|
+
}
|
|
7976
|
+
if (position > end - AUTOSCROLL_ZONE) {
|
|
7977
|
+
const distance = Math.max(0, end - position);
|
|
7978
|
+
return Math.round((AUTOSCROLL_ZONE - distance) / AUTOSCROLL_ZONE * AUTOSCROLL_MAX_SPEED);
|
|
7979
|
+
}
|
|
7980
|
+
return 0;
|
|
7981
|
+
}
|
|
7917
7982
|
//#endregion
|
|
7918
|
-
//#region src/
|
|
7919
|
-
var
|
|
7920
|
-
var
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
actionIcon: `action-icon ${_0$15}`,
|
|
7924
|
-
isDestructive: `is-destructive`,
|
|
7925
|
-
actionLabel: `action-label ${_1$6}`,
|
|
7926
|
-
actionBar: `action-bar`,
|
|
7927
|
-
separator: `separator`,
|
|
7928
|
-
formInput: `form-input`,
|
|
7929
|
-
basePaneStructure: `base-pane-structure`,
|
|
7930
|
-
actionPane: `action-pane`,
|
|
7931
|
-
actionPaneGrid: `action-pane-grid`,
|
|
7932
|
-
actionPaneBody: `action-pane-body`,
|
|
7933
|
-
paneBody: `pane-body`
|
|
7983
|
+
//#region src/composable/private/useKanban.ts
|
|
7984
|
+
var DRAG_LEAVE_GRACE_MS = 50;
|
|
7985
|
+
var WITHIN_COLUMN_DELTA = {
|
|
7986
|
+
up: -1,
|
|
7987
|
+
down: 1
|
|
7934
7988
|
};
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
__name: "FluxAction",
|
|
7939
|
-
props: {
|
|
7940
|
-
type: {},
|
|
7941
|
-
disabled: { type: Boolean },
|
|
7942
|
-
isLoading: { type: Boolean },
|
|
7943
|
-
isSubmit: { type: Boolean },
|
|
7944
|
-
label: {},
|
|
7945
|
-
tabindex: {},
|
|
7946
|
-
href: {},
|
|
7947
|
-
rel: {},
|
|
7948
|
-
target: {},
|
|
7949
|
-
to: {},
|
|
7950
|
-
icon: {},
|
|
7951
|
-
isDestructive: { type: Boolean }
|
|
7952
|
-
},
|
|
7953
|
-
emits: [
|
|
7954
|
-
"click",
|
|
7955
|
-
"mouseenter",
|
|
7956
|
-
"mouseleave"
|
|
7957
|
-
],
|
|
7958
|
-
setup(__props, { emit: $emit }) {
|
|
7959
|
-
return (_ctx, _cache) => {
|
|
7960
|
-
return openBlock(), createBlock(FluxButton_default, mergeProps({
|
|
7961
|
-
disabled: __props.disabled,
|
|
7962
|
-
isLoading: __props.isLoading,
|
|
7963
|
-
label: __props.label,
|
|
7964
|
-
href: __props.href,
|
|
7965
|
-
rel: __props.rel,
|
|
7966
|
-
target: __props.target,
|
|
7967
|
-
to: __props.to,
|
|
7968
|
-
type: __props.type
|
|
7969
|
-
}, {
|
|
7970
|
-
"css-class": unref(Action_module_default).action,
|
|
7971
|
-
"css-class-icon": unref(Action_module_default).actionIcon,
|
|
7972
|
-
"css-class-label": unref(Action_module_default).actionLabel,
|
|
7973
|
-
class: __props.isDestructive && unref(Action_module_default).isDestructive,
|
|
7974
|
-
"icon-leading": __props.icon,
|
|
7975
|
-
onClick: _cache[0] || (_cache[0] = ($event) => $emit("click", $event)),
|
|
7976
|
-
onMouseenter: _cache[1] || (_cache[1] = ($event) => $emit("mouseenter", $event)),
|
|
7977
|
-
onMouseleave: _cache[2] || (_cache[2] = ($event) => $emit("mouseleave", $event))
|
|
7978
|
-
}), null, 16, [
|
|
7979
|
-
"css-class",
|
|
7980
|
-
"css-class-icon",
|
|
7981
|
-
"css-class-label",
|
|
7982
|
-
"class",
|
|
7983
|
-
"icon-leading"
|
|
7984
|
-
]);
|
|
7985
|
-
};
|
|
7986
|
-
}
|
|
7987
|
-
});
|
|
7988
|
-
var Overlay_module_default = {
|
|
7989
|
-
overlayView: `overlay-view`,
|
|
7990
|
-
overlayProvider: `overlay-provider overlay-view`,
|
|
7991
|
-
overlayShade: `overlay-shade overlay-view`,
|
|
7992
|
-
overlay: `overlay`,
|
|
7993
|
-
overlayTransitionLeaveActive: `overlay-transition-leave-active`,
|
|
7994
|
-
slideOverTransitionLeaveActive: `slide-over-transition-leave-active`,
|
|
7995
|
-
basePaneStructure: `base-pane-structure`,
|
|
7996
|
-
paneFooter: `pane-footer`,
|
|
7997
|
-
isCurrent: `is-current`,
|
|
7998
|
-
overlaySmall: `overlay-small overlay`,
|
|
7999
|
-
overlayMedium: `overlay-medium overlay`,
|
|
8000
|
-
overlayLarge: `overlay-large overlay`,
|
|
8001
|
-
slideOver: `slide-over overlay`,
|
|
8002
|
-
paneHeader: `pane-header`,
|
|
8003
|
-
tabs: `tabs`,
|
|
8004
|
-
tabBarDefault: `tab-bar-default`,
|
|
8005
|
-
paneHeaderCaption: `pane-header-caption`,
|
|
8006
|
-
overlayTransitionEnterActive: `overlay-transition-enter-active`,
|
|
8007
|
-
overlayTransitionEnterFrom: `overlay-transition-enter-from`,
|
|
8008
|
-
overlayTransitionLeaveTo: `overlay-transition-leave-to`,
|
|
8009
|
-
slideOverTransitionEnterActive: `slide-over-transition-enter-active`,
|
|
8010
|
-
slideOverTransitionEnterFrom: `slide-over-transition-enter-from`,
|
|
8011
|
-
slideOverTransitionLeaveTo: `slide-over-transition-leave-to`
|
|
7989
|
+
var ACROSS_COLUMN_DELTA = {
|
|
7990
|
+
left: -1,
|
|
7991
|
+
right: 1
|
|
8012
7992
|
};
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
const
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
7993
|
+
/**
|
|
7994
|
+
* Internal composable for managing kanban drag-and-drop state.
|
|
7995
|
+
* Provides item registration, drag tracking, drop target management,
|
|
7996
|
+
* keyboard drag-and-drop, column reordering, drop validation and auto-scroll.
|
|
7997
|
+
*/
|
|
7998
|
+
function useKanban(options) {
|
|
7999
|
+
const dragState = ref(null);
|
|
8000
|
+
const columnDragState = ref(null);
|
|
8001
|
+
const isOverColumnId = ref(null);
|
|
8002
|
+
const itemRegistry = /* @__PURE__ */ new WeakMap();
|
|
8003
|
+
const itemElementsById = /* @__PURE__ */ new Map();
|
|
8004
|
+
const columnRegistry = /* @__PURE__ */ new WeakMap();
|
|
8005
|
+
const columnElementsById = /* @__PURE__ */ new Map();
|
|
8006
|
+
const columnBodyById = /* @__PURE__ */ new Map();
|
|
8007
|
+
const dragEnterCounts = /* @__PURE__ */ new Map();
|
|
8008
|
+
let boardElement = null;
|
|
8009
|
+
let clearTimer = null;
|
|
8010
|
+
const autoScroll = useKanbanAutoScroll({
|
|
8011
|
+
getBoardElement: () => boardElement,
|
|
8012
|
+
getVerticalTarget: () => {
|
|
8013
|
+
const state = unref(dragState);
|
|
8014
|
+
return state && state.dropColumnId !== null ? columnBodyById.get(state.dropColumnId) ?? null : null;
|
|
8015
|
+
}
|
|
8025
8016
|
});
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
onCleanup(() => {
|
|
8030
|
-
dialog.removeEventListener("keydown", onKeyDown);
|
|
8031
|
-
});
|
|
8017
|
+
const grabbedId = computed(() => {
|
|
8018
|
+
const state = unref(dragState);
|
|
8019
|
+
return state !== null && state.mode === "keyboard" ? state.itemId : null;
|
|
8032
8020
|
});
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8021
|
+
const currentMoveEvent = computed(() => tryBuildMoveEvent(unref(dragState)));
|
|
8022
|
+
const isDropAllowed = computed(() => {
|
|
8023
|
+
const event = unref(currentMoveEvent);
|
|
8024
|
+
return event === null || validateMove(event);
|
|
8025
|
+
});
|
|
8026
|
+
function tryBuildMoveEvent(state) {
|
|
8027
|
+
if (!state || state.dropColumnId === null) return null;
|
|
8028
|
+
return {
|
|
8029
|
+
itemId: state.itemId,
|
|
8030
|
+
fromColumnId: state.fromColumnId,
|
|
8031
|
+
toColumnId: state.dropColumnId,
|
|
8032
|
+
beforeItemId: state.beforeItemId ?? void 0
|
|
8033
|
+
};
|
|
8036
8034
|
}
|
|
8037
|
-
|
|
8038
|
-
const
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
if (
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
key: props.viewKey ?? dialogId,
|
|
8046
|
-
ref: dialogRef,
|
|
8047
|
-
class: [className, zIndex === dialogCount && Overlay_module_default.isCurrent],
|
|
8048
|
-
style: { zIndex: zIndex + 1e3 },
|
|
8049
|
-
tabindex: 0
|
|
8050
|
-
}, children);
|
|
8051
|
-
} else {
|
|
8052
|
-
unregister?.();
|
|
8053
|
-
unregister = null;
|
|
8035
|
+
function validateMove(event) {
|
|
8036
|
+
const validate = unref(options.canMove);
|
|
8037
|
+
return validate ? validate(event) : true;
|
|
8038
|
+
}
|
|
8039
|
+
function clearTimerIfAny() {
|
|
8040
|
+
if (clearTimer !== null) {
|
|
8041
|
+
clearTimeout(clearTimer);
|
|
8042
|
+
clearTimer = null;
|
|
8054
8043
|
}
|
|
8055
|
-
return h(Teleport, {
|
|
8056
|
-
defer: true,
|
|
8057
|
-
disabled: !content,
|
|
8058
|
-
to: TARGET_SELECTOR
|
|
8059
|
-
}, [h(transition, attrs, { default: () => content })]);
|
|
8060
|
-
};
|
|
8061
|
-
}
|
|
8062
|
-
//#endregion
|
|
8063
|
-
//#region src/util/createLabelForDateRange.ts
|
|
8064
|
-
function createLabelForDateRange_default(start, end, preventCustom = false) {
|
|
8065
|
-
const translate = useTranslate_default();
|
|
8066
|
-
if (start.day === end.day && start.month === end.month && start.year === end.year) return start.toLocaleString({
|
|
8067
|
-
day: "numeric",
|
|
8068
|
-
month: "short",
|
|
8069
|
-
year: "numeric"
|
|
8070
|
-
});
|
|
8071
|
-
if (start.month === end.month && start.year === end.year) return `${start.toLocaleString({ day: "numeric" })} – ${end.toLocaleString({
|
|
8072
|
-
day: "numeric",
|
|
8073
|
-
month: "short",
|
|
8074
|
-
year: "numeric"
|
|
8075
|
-
})}`;
|
|
8076
|
-
if (start.year === end.year) return `${start.toLocaleString({
|
|
8077
|
-
day: "numeric",
|
|
8078
|
-
month: "short"
|
|
8079
|
-
})} – ${end.toLocaleString({
|
|
8080
|
-
day: "numeric",
|
|
8081
|
-
month: "short",
|
|
8082
|
-
year: "numeric"
|
|
8083
|
-
})}`;
|
|
8084
|
-
if (preventCustom) return `${start.toLocaleString({
|
|
8085
|
-
day: "numeric",
|
|
8086
|
-
month: "short",
|
|
8087
|
-
year: "numeric"
|
|
8088
|
-
})} – ${end.toLocaleString({
|
|
8089
|
-
day: "numeric",
|
|
8090
|
-
month: "short",
|
|
8091
|
-
year: "numeric"
|
|
8092
|
-
})}`;
|
|
8093
|
-
return translate("flux.customPeriod");
|
|
8094
|
-
}
|
|
8095
|
-
//#endregion
|
|
8096
|
-
//#region src/util/defineFilter.ts
|
|
8097
|
-
function defineFilter(factory) {
|
|
8098
|
-
return factory;
|
|
8099
|
-
}
|
|
8100
|
-
//#endregion
|
|
8101
|
-
//#region src/util/filter.ts
|
|
8102
|
-
function isFluxFilterOptionHeader(obj) {
|
|
8103
|
-
return "title" in obj;
|
|
8104
|
-
}
|
|
8105
|
-
function isFluxFilterOptionItem(obj) {
|
|
8106
|
-
return "label" in obj && "value" in obj;
|
|
8107
|
-
}
|
|
8108
|
-
function isResettable(definition, value) {
|
|
8109
|
-
if (!definition || definition.defaultValue === void 0) return false;
|
|
8110
|
-
return !isFilterValueEqual(value, definition.defaultValue);
|
|
8111
|
-
}
|
|
8112
|
-
function isFilterValueEqual(a, b) {
|
|
8113
|
-
if (a === b) return true;
|
|
8114
|
-
if (DateTime.isDateTime(a) && DateTime.isDateTime(b)) return a.equals(b);
|
|
8115
|
-
if (Array.isArray(a) && Array.isArray(b)) return a.length === b.length && a.every((value, index) => isFilterValueEqual(value, b[index]));
|
|
8116
|
-
return false;
|
|
8117
|
-
}
|
|
8118
|
-
function pickFilterCommon(props) {
|
|
8119
|
-
return {
|
|
8120
|
-
name: props.name,
|
|
8121
|
-
label: props.label,
|
|
8122
|
-
icon: props.icon,
|
|
8123
|
-
disabled: props.disabled,
|
|
8124
|
-
defaultValue: props.defaultValue,
|
|
8125
|
-
onChange: props.onChange,
|
|
8126
|
-
onClear: props.onClear
|
|
8127
|
-
};
|
|
8128
|
-
}
|
|
8129
|
-
function generateMultiOptionsLabel(translate, options, values) {
|
|
8130
|
-
const selected = options.filter((o) => values.includes(o.value)).length;
|
|
8131
|
-
if (selected <= 0) return null;
|
|
8132
|
-
if (selected === 1) return options.find((o) => values.includes(o.value)).label;
|
|
8133
|
-
return translate("flux.nSelected", { n: selected });
|
|
8134
|
-
}
|
|
8135
|
-
//#endregion
|
|
8136
|
-
//#region src/composable/private/useAsyncFilterOptions.ts
|
|
8137
|
-
function useAsyncFilterOptions_default(params) {
|
|
8138
|
-
const { isLoading, loaded } = X$1();
|
|
8139
|
-
const debouncedModelSearch = Y$1(params.modelSearch, 150);
|
|
8140
|
-
const fetchOptions = computed(() => loaded(params.fetchOptions));
|
|
8141
|
-
const fetchRelevant = computed(() => loaded(params.fetchRelevant));
|
|
8142
|
-
const fetchSearch = computed(() => loaded(params.fetchSearch));
|
|
8143
|
-
const selectedOptions = ref([]);
|
|
8144
|
-
const visibleOptions = ref([]);
|
|
8145
|
-
const options = computed(() => {
|
|
8146
|
-
const options = [];
|
|
8147
|
-
const search = unref(params.modelSearch);
|
|
8148
|
-
const selected = unref(selectedOptions);
|
|
8149
|
-
const visible = unref(visibleOptions);
|
|
8150
|
-
visible.forEach((vo) => options.push(vo));
|
|
8151
|
-
selected.forEach((so) => {
|
|
8152
|
-
if (isFluxFilterOptionItem(so) && visible.find((vo) => isFluxFilterOptionItem(vo) && vo.value === so.value)) return;
|
|
8153
|
-
if (isFluxFilterOptionItem(so) && !so.label.toLowerCase().includes(search.toLowerCase())) return;
|
|
8154
|
-
options.push(so);
|
|
8155
|
-
});
|
|
8156
|
-
return options;
|
|
8157
|
-
});
|
|
8158
|
-
watch(params.currentValueIds, async (ids) => {
|
|
8159
|
-
if (ids.length === 0) return;
|
|
8160
|
-
selectedOptions.value = await unref(fetchOptions)(ids);
|
|
8161
|
-
}, { immediate: true });
|
|
8162
|
-
watch(debouncedModelSearch, async (searchQuery) => {
|
|
8163
|
-
if (searchQuery.length > 0) visibleOptions.value = await unref(fetchSearch)(searchQuery);
|
|
8164
|
-
else visibleOptions.value = await unref(fetchRelevant)();
|
|
8165
|
-
}, { immediate: true });
|
|
8166
|
-
return {
|
|
8167
|
-
isLoading,
|
|
8168
|
-
options
|
|
8169
|
-
};
|
|
8170
|
-
}
|
|
8171
|
-
//#endregion
|
|
8172
|
-
//#region src/composable/private/useDateFlyout.ts
|
|
8173
|
-
function useDateFlyout_default(modelValue, flyoutRef, options = {}) {
|
|
8174
|
-
const localValue = ref(null);
|
|
8175
|
-
watch(modelValue, (value) => {
|
|
8176
|
-
localValue.value = options.transformIn ? options.transformIn(value) : value;
|
|
8177
|
-
}, { immediate: true });
|
|
8178
|
-
watch(localValue, (value) => {
|
|
8179
|
-
unref(flyoutRef)?.close();
|
|
8180
|
-
if (options.compareKey && options.compareKey(modelValue.value) === options.compareKey(value)) return;
|
|
8181
|
-
modelValue.value = value;
|
|
8182
|
-
});
|
|
8183
|
-
return localValue;
|
|
8184
|
-
}
|
|
8185
|
-
//#endregion
|
|
8186
|
-
//#region src/composable/private/useDropdownPopup.ts
|
|
8187
|
-
/**
|
|
8188
|
-
* Shared dropdown-popup infrastructure for select-like components. Manages:
|
|
8189
|
-
* - open/close state
|
|
8190
|
-
* - click-outside (close when clicking outside popup + anchor)
|
|
8191
|
-
* - focus-back-to-anchor on close
|
|
8192
|
-
* - focus-the-inner-focus-element on open
|
|
8193
|
-
* - Escape/Tab keyboard handling
|
|
8194
|
-
*/
|
|
8195
|
-
function useDropdownPopup(options) {
|
|
8196
|
-
const isOpen = ref(false);
|
|
8197
|
-
function open() {
|
|
8198
|
-
if (unref(options.disabled) || unref(options.readonly)) return;
|
|
8199
|
-
isOpen.value = true;
|
|
8200
8044
|
}
|
|
8201
|
-
function
|
|
8202
|
-
|
|
8045
|
+
function isSelfDrop(state) {
|
|
8046
|
+
return state.fromColumnId === state.dropColumnId && state.beforeItemId === (state.originBeforeItemId ?? null);
|
|
8203
8047
|
}
|
|
8204
|
-
function
|
|
8205
|
-
if (
|
|
8206
|
-
|
|
8048
|
+
function getColumnIndex(columnId) {
|
|
8049
|
+
if (!boardElement) return -1;
|
|
8050
|
+
return Array.from(boardElement.children).filter((child) => columnRegistry.has(child)).findIndex((elm) => columnRegistry.get(elm)?.columnId === columnId);
|
|
8207
8051
|
}
|
|
8208
|
-
function
|
|
8209
|
-
|
|
8052
|
+
function getColumnByIndex(index) {
|
|
8053
|
+
if (!boardElement) return null;
|
|
8054
|
+
const elm = Array.from(boardElement.children).filter((child) => columnRegistry.has(child))[index];
|
|
8055
|
+
return elm ? columnRegistry.get(elm) : null;
|
|
8210
8056
|
}
|
|
8211
|
-
function
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
focusAnchor();
|
|
8216
|
-
return true;
|
|
8217
|
-
}
|
|
8218
|
-
if (evt.key === "Tab" && unref(isOpen)) {
|
|
8219
|
-
isOpen.value = false;
|
|
8220
|
-
return true;
|
|
8221
|
-
}
|
|
8222
|
-
return false;
|
|
8057
|
+
function getItemsInColumn(columnId) {
|
|
8058
|
+
const body = columnBodyById.get(columnId);
|
|
8059
|
+
if (!body) return [];
|
|
8060
|
+
return Array.from(body.children).map((child) => itemRegistry.get(child)?.itemId).filter((id) => id !== void 0);
|
|
8223
8061
|
}
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8062
|
+
function registerItem(element, itemId) {
|
|
8063
|
+
itemRegistry.set(element, { itemId });
|
|
8064
|
+
itemElementsById.set(itemId, element);
|
|
8227
8065
|
}
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
}
|
|
8233
|
-
nextTick(() => unref(options.focusElement)?.focus());
|
|
8234
|
-
options.onOpen?.();
|
|
8235
|
-
});
|
|
8236
|
-
return {
|
|
8237
|
-
isOpen,
|
|
8238
|
-
open,
|
|
8239
|
-
close,
|
|
8240
|
-
toggle,
|
|
8241
|
-
focusAnchor,
|
|
8242
|
-
onKeyDownBase
|
|
8243
|
-
};
|
|
8244
|
-
}
|
|
8245
|
-
//#endregion
|
|
8246
|
-
//#region src/composable/private/useFormSelect.ts
|
|
8247
|
-
function useFormSelect_default(modelValue, isMultiple, options, searchQuery) {
|
|
8248
|
-
const values = computed(() => {
|
|
8249
|
-
const model = unref(modelValue);
|
|
8250
|
-
return Array.isArray(model) ? model : [model];
|
|
8251
|
-
});
|
|
8252
|
-
const groups = computed(() => {
|
|
8253
|
-
const groups = [];
|
|
8254
|
-
const search = unref(searchQuery)?.trim().toLowerCase();
|
|
8255
|
-
const available = unref(options).filter((o) => isFluxFormSelectGroup(o) || !search || o.label.toLowerCase().includes(search)).filter((o) => isFluxFormSelectGroup(o) || !isMultiple || !unref(selected).find((s) => s.value === o.value));
|
|
8256
|
-
if (available.length === 0) return [];
|
|
8257
|
-
if (!available.find(isFluxFormSelectGroup)) return [[null, available]];
|
|
8258
|
-
for (let i = 0; i < available.length;) {
|
|
8259
|
-
const item = available[i];
|
|
8260
|
-
if (isFluxFormSelectOption(item)) {
|
|
8261
|
-
++i;
|
|
8262
|
-
groups.push([null, [item]]);
|
|
8263
|
-
continue;
|
|
8264
|
-
}
|
|
8265
|
-
const subItems = [];
|
|
8266
|
-
for (++i; i <= available.length; ++i) {
|
|
8267
|
-
const subItem = available[i];
|
|
8268
|
-
if (isFluxFormSelectGroup(subItem) || i === available.length) {
|
|
8269
|
-
if (subItems.length > 0) groups.push([item, subItems]);
|
|
8270
|
-
break;
|
|
8271
|
-
}
|
|
8272
|
-
subItems.push(subItem);
|
|
8273
|
-
}
|
|
8274
|
-
}
|
|
8275
|
-
return groups;
|
|
8276
|
-
});
|
|
8277
|
-
const selected = computed(() => unref(values).map((v) => unref(options).find((o) => isFluxFormSelectOption(o) && o.value === v)).filter(isFluxFormSelectOption));
|
|
8278
|
-
return {
|
|
8279
|
-
groups,
|
|
8280
|
-
selected,
|
|
8281
|
-
values
|
|
8282
|
-
};
|
|
8283
|
-
}
|
|
8284
|
-
//#endregion
|
|
8285
|
-
//#region src/composable/private/useKanbanAutoScroll.ts
|
|
8286
|
-
var AUTOSCROLL_ZONE = 40;
|
|
8287
|
-
var AUTOSCROLL_MAX_SPEED = 12;
|
|
8288
|
-
/**
|
|
8289
|
-
* Drives horizontal (board) and vertical (column body) auto-scroll while a drag
|
|
8290
|
-
* is in progress. Reads the active scroll containers via the option callbacks.
|
|
8291
|
-
*/
|
|
8292
|
-
function useKanbanAutoScroll(options) {
|
|
8293
|
-
let frame = null;
|
|
8294
|
-
let deltaX = 0;
|
|
8295
|
-
let deltaY = 0;
|
|
8296
|
-
let verticalTarget = null;
|
|
8297
|
-
function onPointerMove(clientX, clientY) {
|
|
8298
|
-
const board = options.getBoardElement();
|
|
8299
|
-
const target = options.getVerticalTarget();
|
|
8300
|
-
deltaX = board ? computeScrollDelta(board.getBoundingClientRect(), clientX, "horizontal") : 0;
|
|
8301
|
-
deltaY = target ? computeScrollDelta(target.getBoundingClientRect(), clientY, "vertical") : 0;
|
|
8302
|
-
verticalTarget = target;
|
|
8303
|
-
if (deltaX !== 0 || deltaY !== 0) start();
|
|
8304
|
-
else stop();
|
|
8066
|
+
function unregisterItem(element) {
|
|
8067
|
+
const info = itemRegistry.get(element);
|
|
8068
|
+
if (info) itemElementsById.delete(info.itemId);
|
|
8069
|
+
itemRegistry.delete(element);
|
|
8305
8070
|
}
|
|
8306
|
-
function
|
|
8307
|
-
|
|
8308
|
-
const tick = () => {
|
|
8309
|
-
const board = options.getBoardElement();
|
|
8310
|
-
if (deltaX !== 0 && board) board.scrollLeft += deltaX;
|
|
8311
|
-
if (deltaY !== 0 && verticalTarget) verticalTarget.scrollTop += deltaY;
|
|
8312
|
-
if (deltaX === 0 && deltaY === 0) {
|
|
8313
|
-
frame = null;
|
|
8314
|
-
return;
|
|
8315
|
-
}
|
|
8316
|
-
frame = requestAnimationFrame(tick);
|
|
8317
|
-
};
|
|
8318
|
-
frame = requestAnimationFrame(tick);
|
|
8071
|
+
function getItemInfo(element) {
|
|
8072
|
+
return itemRegistry.get(element);
|
|
8319
8073
|
}
|
|
8320
|
-
function
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8074
|
+
function registerColumn(element, columnId) {
|
|
8075
|
+
columnRegistry.set(element, { columnId });
|
|
8076
|
+
columnElementsById.set(columnId, element);
|
|
8077
|
+
}
|
|
8078
|
+
function unregisterColumn(element) {
|
|
8079
|
+
const info = columnRegistry.get(element);
|
|
8080
|
+
if (info) {
|
|
8081
|
+
columnElementsById.delete(info.columnId);
|
|
8082
|
+
columnBodyById.delete(info.columnId);
|
|
8083
|
+
dragEnterCounts.delete(info.columnId);
|
|
8084
|
+
if (isOverColumnId.value === info.columnId) isOverColumnId.value = null;
|
|
8324
8085
|
}
|
|
8325
|
-
|
|
8326
|
-
deltaY = 0;
|
|
8327
|
-
verticalTarget = null;
|
|
8086
|
+
columnRegistry.delete(element);
|
|
8328
8087
|
}
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
stop
|
|
8332
|
-
};
|
|
8333
|
-
}
|
|
8334
|
-
function computeScrollDelta(rect, position, axis) {
|
|
8335
|
-
const start = axis === "horizontal" ? rect.left : rect.top;
|
|
8336
|
-
const end = axis === "horizontal" ? rect.right : rect.bottom;
|
|
8337
|
-
if (position < start + AUTOSCROLL_ZONE) {
|
|
8338
|
-
const distance = Math.max(0, position - start);
|
|
8339
|
-
return -Math.round((AUTOSCROLL_ZONE - distance) / AUTOSCROLL_ZONE * AUTOSCROLL_MAX_SPEED);
|
|
8088
|
+
function getColumnInfo(element) {
|
|
8089
|
+
return columnRegistry.get(element);
|
|
8340
8090
|
}
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
return Math.round((AUTOSCROLL_ZONE - distance) / AUTOSCROLL_ZONE * AUTOSCROLL_MAX_SPEED);
|
|
8344
|
-
}
|
|
8345
|
-
return 0;
|
|
8346
|
-
}
|
|
8347
|
-
//#endregion
|
|
8348
|
-
//#region src/composable/private/useKanban.ts
|
|
8349
|
-
var DRAG_LEAVE_GRACE_MS = 50;
|
|
8350
|
-
var WITHIN_COLUMN_DELTA = {
|
|
8351
|
-
up: -1,
|
|
8352
|
-
down: 1
|
|
8353
|
-
};
|
|
8354
|
-
var ACROSS_COLUMN_DELTA = {
|
|
8355
|
-
left: -1,
|
|
8356
|
-
right: 1
|
|
8357
|
-
};
|
|
8358
|
-
/**
|
|
8359
|
-
* Internal composable for managing kanban drag-and-drop state.
|
|
8360
|
-
* Provides item registration, drag tracking, drop target management,
|
|
8361
|
-
* keyboard drag-and-drop, column reordering, drop validation and auto-scroll.
|
|
8362
|
-
*/
|
|
8363
|
-
function useKanban(options) {
|
|
8364
|
-
const dragState = ref(null);
|
|
8365
|
-
const columnDragState = ref(null);
|
|
8366
|
-
const isOverColumnId = ref(null);
|
|
8367
|
-
const itemRegistry = /* @__PURE__ */ new WeakMap();
|
|
8368
|
-
const itemElementsById = /* @__PURE__ */ new Map();
|
|
8369
|
-
const columnRegistry = /* @__PURE__ */ new WeakMap();
|
|
8370
|
-
const columnElementsById = /* @__PURE__ */ new Map();
|
|
8371
|
-
const columnBodyById = /* @__PURE__ */ new Map();
|
|
8372
|
-
const dragEnterCounts = /* @__PURE__ */ new Map();
|
|
8373
|
-
let boardElement = null;
|
|
8374
|
-
let clearTimer = null;
|
|
8375
|
-
const autoScroll = useKanbanAutoScroll({
|
|
8376
|
-
getBoardElement: () => boardElement,
|
|
8377
|
-
getVerticalTarget: () => {
|
|
8378
|
-
const state = unref(dragState);
|
|
8379
|
-
return state && state.dropColumnId !== null ? columnBodyById.get(state.dropColumnId) ?? null : null;
|
|
8380
|
-
}
|
|
8381
|
-
});
|
|
8382
|
-
const grabbedId = computed(() => {
|
|
8383
|
-
const state = unref(dragState);
|
|
8384
|
-
return state !== null && state.mode === "keyboard" ? state.itemId : null;
|
|
8385
|
-
});
|
|
8386
|
-
const currentMoveEvent = computed(() => tryBuildMoveEvent(unref(dragState)));
|
|
8387
|
-
const isDropAllowed = computed(() => {
|
|
8388
|
-
const event = unref(currentMoveEvent);
|
|
8389
|
-
return event === null || validateMove(event);
|
|
8390
|
-
});
|
|
8391
|
-
function tryBuildMoveEvent(state) {
|
|
8392
|
-
if (!state || state.dropColumnId === null) return null;
|
|
8393
|
-
return {
|
|
8394
|
-
itemId: state.itemId,
|
|
8395
|
-
fromColumnId: state.fromColumnId,
|
|
8396
|
-
toColumnId: state.dropColumnId,
|
|
8397
|
-
beforeItemId: state.beforeItemId ?? void 0
|
|
8398
|
-
};
|
|
8399
|
-
}
|
|
8400
|
-
function validateMove(event) {
|
|
8401
|
-
const validate = unref(options.canMove);
|
|
8402
|
-
return validate ? validate(event) : true;
|
|
8403
|
-
}
|
|
8404
|
-
function clearTimerIfAny() {
|
|
8405
|
-
if (clearTimer !== null) {
|
|
8406
|
-
clearTimeout(clearTimer);
|
|
8407
|
-
clearTimer = null;
|
|
8408
|
-
}
|
|
8409
|
-
}
|
|
8410
|
-
function isSelfDrop(state) {
|
|
8411
|
-
return state.fromColumnId === state.dropColumnId && state.beforeItemId === (state.originBeforeItemId ?? null);
|
|
8412
|
-
}
|
|
8413
|
-
function getColumnIndex(columnId) {
|
|
8414
|
-
if (!boardElement) return -1;
|
|
8415
|
-
return Array.from(boardElement.children).filter((child) => columnRegistry.has(child)).findIndex((elm) => columnRegistry.get(elm)?.columnId === columnId);
|
|
8416
|
-
}
|
|
8417
|
-
function getColumnByIndex(index) {
|
|
8418
|
-
if (!boardElement) return null;
|
|
8419
|
-
const elm = Array.from(boardElement.children).filter((child) => columnRegistry.has(child))[index];
|
|
8420
|
-
return elm ? columnRegistry.get(elm) : null;
|
|
8421
|
-
}
|
|
8422
|
-
function getItemsInColumn(columnId) {
|
|
8423
|
-
const body = columnBodyById.get(columnId);
|
|
8424
|
-
if (!body) return [];
|
|
8425
|
-
return Array.from(body.children).map((child) => itemRegistry.get(child)?.itemId).filter((id) => id !== void 0);
|
|
8426
|
-
}
|
|
8427
|
-
function registerItem(element, itemId) {
|
|
8428
|
-
itemRegistry.set(element, { itemId });
|
|
8429
|
-
itemElementsById.set(itemId, element);
|
|
8430
|
-
}
|
|
8431
|
-
function unregisterItem(element) {
|
|
8432
|
-
const info = itemRegistry.get(element);
|
|
8433
|
-
if (info) itemElementsById.delete(info.itemId);
|
|
8434
|
-
itemRegistry.delete(element);
|
|
8435
|
-
}
|
|
8436
|
-
function getItemInfo(element) {
|
|
8437
|
-
return itemRegistry.get(element);
|
|
8438
|
-
}
|
|
8439
|
-
function registerColumn(element, columnId) {
|
|
8440
|
-
columnRegistry.set(element, { columnId });
|
|
8441
|
-
columnElementsById.set(columnId, element);
|
|
8442
|
-
}
|
|
8443
|
-
function unregisterColumn(element) {
|
|
8444
|
-
const info = columnRegistry.get(element);
|
|
8445
|
-
if (info) {
|
|
8446
|
-
columnElementsById.delete(info.columnId);
|
|
8447
|
-
columnBodyById.delete(info.columnId);
|
|
8448
|
-
dragEnterCounts.delete(info.columnId);
|
|
8449
|
-
if (isOverColumnId.value === info.columnId) isOverColumnId.value = null;
|
|
8450
|
-
}
|
|
8451
|
-
columnRegistry.delete(element);
|
|
8452
|
-
}
|
|
8453
|
-
function getColumnInfo(element) {
|
|
8454
|
-
return columnRegistry.get(element);
|
|
8455
|
-
}
|
|
8456
|
-
function setBoardElement(element) {
|
|
8457
|
-
boardElement = element;
|
|
8091
|
+
function setBoardElement(element) {
|
|
8092
|
+
boardElement = element;
|
|
8458
8093
|
}
|
|
8459
8094
|
function setColumnBodyElement(columnId, element) {
|
|
8460
8095
|
if (element) columnBodyById.set(columnId, element);
|
|
@@ -9271,48 +8906,456 @@ function useTreeView(params) {
|
|
|
9271
8906
|
return false;
|
|
9272
8907
|
}
|
|
9273
8908
|
}
|
|
9274
|
-
watch(highlightedIndex, (index) => {
|
|
9275
|
-
if (index < 0) return;
|
|
9276
|
-
nextTick(() => unref(params.nodeElementRefs)?.[index]?.scrollIntoView({ block: "nearest" }));
|
|
9277
|
-
});
|
|
9278
|
-
watch(params.visibleNodes, (nodes) => {
|
|
9279
|
-
if (unref(highlightedIndex) >= nodes.length) highlightedIndex.value = Math.max(-1, nodes.length - 1);
|
|
9280
|
-
});
|
|
9281
|
-
return {
|
|
9282
|
-
highlightedIndex,
|
|
9283
|
-
toggleExpand,
|
|
9284
|
-
onExpandClick,
|
|
9285
|
-
onKeyNavigate
|
|
9286
|
-
};
|
|
9287
|
-
}
|
|
8909
|
+
watch(highlightedIndex, (index) => {
|
|
8910
|
+
if (index < 0) return;
|
|
8911
|
+
nextTick(() => unref(params.nodeElementRefs)?.[index]?.scrollIntoView({ block: "nearest" }));
|
|
8912
|
+
});
|
|
8913
|
+
watch(params.visibleNodes, (nodes) => {
|
|
8914
|
+
if (unref(highlightedIndex) >= nodes.length) highlightedIndex.value = Math.max(-1, nodes.length - 1);
|
|
8915
|
+
});
|
|
8916
|
+
return {
|
|
8917
|
+
highlightedIndex,
|
|
8918
|
+
toggleExpand,
|
|
8919
|
+
onExpandClick,
|
|
8920
|
+
onKeyNavigate
|
|
8921
|
+
};
|
|
8922
|
+
}
|
|
8923
|
+
//#endregion
|
|
8924
|
+
//#region src/util/createLabelForDateRange.ts
|
|
8925
|
+
function createLabelForDateRange_default(start, end, preventCustom = false) {
|
|
8926
|
+
const translate = useTranslate_default();
|
|
8927
|
+
if (start.day === end.day && start.month === end.month && start.year === end.year) return start.toLocaleString({
|
|
8928
|
+
day: "numeric",
|
|
8929
|
+
month: "short",
|
|
8930
|
+
year: "numeric"
|
|
8931
|
+
});
|
|
8932
|
+
if (start.month === end.month && start.year === end.year) return `${start.toLocaleString({ day: "numeric" })} – ${end.toLocaleString({
|
|
8933
|
+
day: "numeric",
|
|
8934
|
+
month: "short",
|
|
8935
|
+
year: "numeric"
|
|
8936
|
+
})}`;
|
|
8937
|
+
if (start.year === end.year) return `${start.toLocaleString({
|
|
8938
|
+
day: "numeric",
|
|
8939
|
+
month: "short"
|
|
8940
|
+
})} – ${end.toLocaleString({
|
|
8941
|
+
day: "numeric",
|
|
8942
|
+
month: "short",
|
|
8943
|
+
year: "numeric"
|
|
8944
|
+
})}`;
|
|
8945
|
+
if (preventCustom) return `${start.toLocaleString({
|
|
8946
|
+
day: "numeric",
|
|
8947
|
+
month: "short",
|
|
8948
|
+
year: "numeric"
|
|
8949
|
+
})} – ${end.toLocaleString({
|
|
8950
|
+
day: "numeric",
|
|
8951
|
+
month: "short",
|
|
8952
|
+
year: "numeric"
|
|
8953
|
+
})}`;
|
|
8954
|
+
return translate("flux.customPeriod");
|
|
8955
|
+
}
|
|
8956
|
+
//#endregion
|
|
8957
|
+
//#region src/util/defineFilter.ts
|
|
8958
|
+
function defineFilter(factory) {
|
|
8959
|
+
return factory;
|
|
8960
|
+
}
|
|
8961
|
+
//#endregion
|
|
8962
|
+
//#region src/util/filter.ts
|
|
8963
|
+
function isFluxFilterOptionHeader(obj) {
|
|
8964
|
+
return "title" in obj;
|
|
8965
|
+
}
|
|
8966
|
+
function isFluxFilterOptionItem(obj) {
|
|
8967
|
+
return "label" in obj && "value" in obj;
|
|
8968
|
+
}
|
|
8969
|
+
function isResettable(definition, value) {
|
|
8970
|
+
if (!definition || definition.defaultValue === void 0) return false;
|
|
8971
|
+
return !isFilterValueEqual(value, definition.defaultValue);
|
|
8972
|
+
}
|
|
8973
|
+
function isFilterValueEqual(a, b) {
|
|
8974
|
+
if (a === b) return true;
|
|
8975
|
+
if (DateTime.isDateTime(a) && DateTime.isDateTime(b)) return a.equals(b);
|
|
8976
|
+
if (Array.isArray(a) && Array.isArray(b)) return a.length === b.length && a.every((value, index) => isFilterValueEqual(value, b[index]));
|
|
8977
|
+
return false;
|
|
8978
|
+
}
|
|
8979
|
+
function pickFilterCommon(props) {
|
|
8980
|
+
return {
|
|
8981
|
+
name: props.name,
|
|
8982
|
+
label: props.label,
|
|
8983
|
+
icon: props.icon,
|
|
8984
|
+
disabled: props.disabled,
|
|
8985
|
+
defaultValue: props.defaultValue,
|
|
8986
|
+
onChange: props.onChange,
|
|
8987
|
+
onClear: props.onClear
|
|
8988
|
+
};
|
|
8989
|
+
}
|
|
8990
|
+
function generateMultiOptionsLabel(translate, options, values) {
|
|
8991
|
+
const selected = options.filter((o) => values.includes(o.value)).length;
|
|
8992
|
+
if (selected <= 0) return null;
|
|
8993
|
+
if (selected === 1) return options.find((o) => values.includes(o.value)).label;
|
|
8994
|
+
return translate("flux.nSelected", { n: selected });
|
|
8995
|
+
}
|
|
8996
|
+
//#endregion
|
|
8997
|
+
//#region src/util/sanitizeUrl.ts
|
|
8998
|
+
var DANGEROUS_PROTOCOL = /^(javascript|vbscript|data):/i;
|
|
8999
|
+
/**
|
|
9000
|
+
* Removes control characters (and the Unicode line/paragraph separators) that
|
|
9001
|
+
* browsers ignore inside URLs but which can be used to obfuscate the scheme,
|
|
9002
|
+
* e.g. `java\tscript:alert(1)`.
|
|
9003
|
+
*/
|
|
9004
|
+
function stripControlChars(value) {
|
|
9005
|
+
let out = "";
|
|
9006
|
+
for (let i = 0; i < value.length; i++) {
|
|
9007
|
+
const code = value.charCodeAt(i);
|
|
9008
|
+
if (code <= 32 || code >= 127 && code <= 159 || code === 8232 || code === 8233) continue;
|
|
9009
|
+
out += value[i];
|
|
9010
|
+
}
|
|
9011
|
+
return out;
|
|
9012
|
+
}
|
|
9013
|
+
/**
|
|
9014
|
+
* Sanitizes a URL intended for an `href` attribute. Returns `undefined` when the
|
|
9015
|
+
* URL uses a dangerous scheme (`javascript:`, `vbscript:`, `data:`) so the attribute
|
|
9016
|
+
* is omitted instead of becoming a script-execution or data-injection vector.
|
|
9017
|
+
* Safe and relative URLs are returned unchanged.
|
|
9018
|
+
*/
|
|
9019
|
+
function sanitizeUrl_default(href) {
|
|
9020
|
+
if (!href) return href;
|
|
9021
|
+
if (DANGEROUS_PROTOCOL.test(stripControlChars(href))) return;
|
|
9022
|
+
return href;
|
|
9023
|
+
}
|
|
9024
|
+
//#endregion
|
|
9025
|
+
//#region src/component/FluxPressable.vue?vue&type=script&setup=true&lang.ts
|
|
9026
|
+
var _hoisted_1$61 = [
|
|
9027
|
+
"href",
|
|
9028
|
+
"rel",
|
|
9029
|
+
"target"
|
|
9030
|
+
];
|
|
9031
|
+
//#endregion
|
|
9032
|
+
//#region src/component/FluxPressable.vue
|
|
9033
|
+
var FluxPressable_default = /* @__PURE__ */ defineComponent({
|
|
9034
|
+
__name: "FluxPressable",
|
|
9035
|
+
props: {
|
|
9036
|
+
componentType: {},
|
|
9037
|
+
href: {},
|
|
9038
|
+
rel: {},
|
|
9039
|
+
target: {},
|
|
9040
|
+
to: {}
|
|
9041
|
+
},
|
|
9042
|
+
emits: [
|
|
9043
|
+
"click",
|
|
9044
|
+
"mouseenter",
|
|
9045
|
+
"mouseleave"
|
|
9046
|
+
],
|
|
9047
|
+
setup(__props, { emit: __emit, attrs: $attrs }) {
|
|
9048
|
+
const emit = __emit;
|
|
9049
|
+
const resolvedRel = computed(() => {
|
|
9050
|
+
if (__props.rel) return __props.rel;
|
|
9051
|
+
return __props.target === "_blank" ? "noopener noreferrer" : void 0;
|
|
9052
|
+
});
|
|
9053
|
+
const hoverListeners = {
|
|
9054
|
+
onMouseenter: (evt) => emit("mouseenter", evt),
|
|
9055
|
+
onMouseleave: (evt) => emit("mouseleave", evt)
|
|
9056
|
+
};
|
|
9057
|
+
function onClick(evt, navigate) {
|
|
9058
|
+
emit("click", evt);
|
|
9059
|
+
if (evt.defaultPrevented) return;
|
|
9060
|
+
navigate?.(evt);
|
|
9061
|
+
}
|
|
9062
|
+
return (_ctx, _cache) => {
|
|
9063
|
+
const _component_router_link = resolveComponent("router-link");
|
|
9064
|
+
return __props.componentType === "route" ? (openBlock(), createBlock(_component_router_link, mergeProps({ key: 0 }, $attrs, toHandlers(hoverListeners), {
|
|
9065
|
+
rel: resolvedRel.value,
|
|
9066
|
+
target: __props.target,
|
|
9067
|
+
to: __props.to,
|
|
9068
|
+
onClick: _cache[0] || (_cache[0] = ($event) => onClick($event))
|
|
9069
|
+
}), {
|
|
9070
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
9071
|
+
_: 3
|
|
9072
|
+
}, 16, [
|
|
9073
|
+
"rel",
|
|
9074
|
+
"target",
|
|
9075
|
+
"to"
|
|
9076
|
+
])) : __props.componentType === "link" ? (openBlock(), createElementBlock("a", mergeProps({ key: 1 }, $attrs, toHandlers(hoverListeners, true), {
|
|
9077
|
+
href: unref(sanitizeUrl_default)(__props.href),
|
|
9078
|
+
rel: resolvedRel.value,
|
|
9079
|
+
target: __props.target,
|
|
9080
|
+
onClick: _cache[1] || (_cache[1] = ($event) => onClick($event))
|
|
9081
|
+
}), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$61)) : __props.componentType === "button" ? (openBlock(), createElementBlock("button", mergeProps({ key: 2 }, $attrs, toHandlers(hoverListeners, true), { onClick: _cache[2] || (_cache[2] = ($event) => onClick($event)) }), [renderSlot(_ctx.$slots, "default")], 16)) : (openBlock(), createElementBlock("div", mergeProps({ key: 3 }, $attrs, toHandlers(hoverListeners, true), { onClick }), [renderSlot(_ctx.$slots, "default")], 16));
|
|
9082
|
+
};
|
|
9083
|
+
}
|
|
9084
|
+
});
|
|
9085
|
+
var Spinner_module_default = {
|
|
9086
|
+
spinner: `spinner`,
|
|
9087
|
+
spinnerTrack: `spinner-track`,
|
|
9088
|
+
spinnerEffect: `spinner-effect`,
|
|
9089
|
+
spinnerValue: `spinner-value`
|
|
9090
|
+
};
|
|
9091
|
+
//#endregion
|
|
9092
|
+
//#region src/component/FluxSpinner.vue
|
|
9093
|
+
var FluxSpinner_default = /* @__PURE__ */ defineComponent({
|
|
9094
|
+
__name: "FluxSpinner",
|
|
9095
|
+
props: { size: {} },
|
|
9096
|
+
setup(__props) {
|
|
9097
|
+
return (_ctx, _cache) => {
|
|
9098
|
+
return openBlock(), createElementBlock("svg", {
|
|
9099
|
+
class: normalizeClass(unref(Spinner_module_default).spinner),
|
|
9100
|
+
viewBox: "0 0 24 24",
|
|
9101
|
+
style: normalizeStyle({ fontSize: __props.size && `${__props.size}px` })
|
|
9102
|
+
}, [
|
|
9103
|
+
createElementVNode("circle", {
|
|
9104
|
+
class: normalizeClass(unref(Spinner_module_default).spinnerTrack),
|
|
9105
|
+
cx: "12",
|
|
9106
|
+
cy: "12",
|
|
9107
|
+
r: "10",
|
|
9108
|
+
fill: "transparent",
|
|
9109
|
+
"stroke-width": "4"
|
|
9110
|
+
}, null, 2),
|
|
9111
|
+
createElementVNode("circle", {
|
|
9112
|
+
class: normalizeClass(unref(Spinner_module_default).spinnerEffect),
|
|
9113
|
+
cx: "12",
|
|
9114
|
+
cy: "12",
|
|
9115
|
+
r: "10",
|
|
9116
|
+
fill: "transparent",
|
|
9117
|
+
"stroke-width": "4",
|
|
9118
|
+
"stroke-dasharray": "21 45",
|
|
9119
|
+
"stroke-dashoffset": "30",
|
|
9120
|
+
"stroke-linecap": "round"
|
|
9121
|
+
}, null, 2),
|
|
9122
|
+
createElementVNode("circle", {
|
|
9123
|
+
class: normalizeClass(unref(Spinner_module_default).spinnerValue),
|
|
9124
|
+
cx: "12",
|
|
9125
|
+
cy: "12",
|
|
9126
|
+
r: "10",
|
|
9127
|
+
fill: "transparent",
|
|
9128
|
+
"stroke-width": "4",
|
|
9129
|
+
"stroke-dasharray": "21 45",
|
|
9130
|
+
"stroke-dashoffset": "30",
|
|
9131
|
+
"stroke-linecap": "round"
|
|
9132
|
+
}, null, 2)
|
|
9133
|
+
], 6);
|
|
9134
|
+
};
|
|
9135
|
+
}
|
|
9136
|
+
});
|
|
9137
|
+
var Button_module_default$1 = {
|
|
9138
|
+
button: `button`,
|
|
9139
|
+
isSmall: `is-small`,
|
|
9140
|
+
isMedium: `is-medium`,
|
|
9141
|
+
isLarge: `is-large`,
|
|
9142
|
+
isXl: `is-xl`,
|
|
9143
|
+
isFilled: `is-filled`,
|
|
9144
|
+
spinner: `spinner`,
|
|
9145
|
+
buttonIcon: `button-icon`,
|
|
9146
|
+
buttonLabel: `button-label`,
|
|
9147
|
+
badge: `badge`
|
|
9148
|
+
};
|
|
9149
|
+
//#endregion
|
|
9150
|
+
//#region src/component/FluxButton.vue?vue&type=script&setup=true&lang.ts
|
|
9151
|
+
var SLOTS = [
|
|
9152
|
+
"default",
|
|
9153
|
+
"after",
|
|
9154
|
+
"before",
|
|
9155
|
+
"iconLeading",
|
|
9156
|
+
"iconTrailing",
|
|
9157
|
+
"label"
|
|
9158
|
+
];
|
|
9159
|
+
//#endregion
|
|
9160
|
+
//#region src/component/FluxButton.vue
|
|
9161
|
+
var FluxButton_default = /* @__PURE__ */ defineComponent({
|
|
9162
|
+
__name: "FluxButton",
|
|
9163
|
+
props: {
|
|
9164
|
+
type: { default: "button" },
|
|
9165
|
+
disabled: { type: Boolean },
|
|
9166
|
+
iconLeading: {},
|
|
9167
|
+
iconTrailing: {},
|
|
9168
|
+
isFilled: { type: Boolean },
|
|
9169
|
+
isLoading: { type: Boolean },
|
|
9170
|
+
isSubmit: { type: Boolean },
|
|
9171
|
+
label: {},
|
|
9172
|
+
size: { default: "medium" },
|
|
9173
|
+
tabindex: { default: 0 },
|
|
9174
|
+
href: {},
|
|
9175
|
+
rel: {},
|
|
9176
|
+
target: {},
|
|
9177
|
+
to: {},
|
|
9178
|
+
cssClass: {},
|
|
9179
|
+
cssClassIcon: {},
|
|
9180
|
+
cssClassLabel: {}
|
|
9181
|
+
},
|
|
9182
|
+
emits: [
|
|
9183
|
+
"click",
|
|
9184
|
+
"mouseenter",
|
|
9185
|
+
"mouseleave"
|
|
9186
|
+
],
|
|
9187
|
+
setup(__props, { emit: __emit }) {
|
|
9188
|
+
const emit = __emit;
|
|
9189
|
+
const disabled = useDisabled_default(toRef(() => __props.disabled));
|
|
9190
|
+
function onClick(evt) {
|
|
9191
|
+
if (unref(disabled) || __props.isLoading) {
|
|
9192
|
+
evt.preventDefault();
|
|
9193
|
+
evt.stopPropagation();
|
|
9194
|
+
return;
|
|
9195
|
+
}
|
|
9196
|
+
emit("click", evt);
|
|
9197
|
+
}
|
|
9198
|
+
function onMouseEnter(evt) {
|
|
9199
|
+
emit("mouseenter", evt);
|
|
9200
|
+
}
|
|
9201
|
+
function onMouseLeave(evt) {
|
|
9202
|
+
emit("mouseleave", evt);
|
|
9203
|
+
}
|
|
9204
|
+
return (_ctx, _cache) => {
|
|
9205
|
+
return openBlock(), createBlock(FluxPressable_default, {
|
|
9206
|
+
"component-type": __props.type,
|
|
9207
|
+
class: normalizeClass(unref(clsx)(__props.cssClass, __props.isFilled && unref(Button_module_default$1).isFilled, __props.size === "small" && unref(Button_module_default$1).isSmall, __props.size === "medium" && unref(Button_module_default$1).isMedium, __props.size === "large" && unref(Button_module_default$1).isLarge, __props.size === "xl" && unref(Button_module_default$1).isXl)),
|
|
9208
|
+
type: __props.isSubmit ? "submit" : "button",
|
|
9209
|
+
"aria-disabled": unref(disabled) ? true : void 0,
|
|
9210
|
+
disabled: unref(disabled) ? true : void 0,
|
|
9211
|
+
tabindex: unref(disabled) ? -1 : __props.tabindex,
|
|
9212
|
+
href: __props.href,
|
|
9213
|
+
rel: __props.rel,
|
|
9214
|
+
target: __props.target,
|
|
9215
|
+
to: __props.to,
|
|
9216
|
+
onClick,
|
|
9217
|
+
onMouseenter: onMouseEnter,
|
|
9218
|
+
onMouseleave: onMouseLeave
|
|
9219
|
+
}, {
|
|
9220
|
+
default: withCtx(() => [
|
|
9221
|
+
renderSlot(_ctx.$slots, "before"),
|
|
9222
|
+
renderSlot(_ctx.$slots, "iconLeading", {}, () => [__props.isLoading && (__props.iconLeading || !__props.iconTrailing) ? (openBlock(), createBlock(FluxSpinner_default, {
|
|
9223
|
+
key: 0,
|
|
9224
|
+
size: 20
|
|
9225
|
+
})) : __props.iconLeading ? (openBlock(), createBlock(FluxIcon_default, {
|
|
9226
|
+
key: 1,
|
|
9227
|
+
class: normalizeClass(__props.cssClassIcon),
|
|
9228
|
+
name: __props.iconLeading
|
|
9229
|
+
}, null, 8, ["class", "name"])) : createCommentVNode("", true)]),
|
|
9230
|
+
renderSlot(_ctx.$slots, "label", {}, () => [__props.label ? (openBlock(), createElementBlock("span", {
|
|
9231
|
+
key: 0,
|
|
9232
|
+
class: normalizeClass(__props.cssClassLabel)
|
|
9233
|
+
}, toDisplayString(__props.label), 3)) : createCommentVNode("", true)]),
|
|
9234
|
+
renderSlot(_ctx.$slots, "iconTrailing", {}, () => [__props.isLoading && !__props.iconLeading && __props.iconTrailing ? (openBlock(), createBlock(FluxSpinner_default, {
|
|
9235
|
+
key: 0,
|
|
9236
|
+
size: 20
|
|
9237
|
+
})) : __props.iconTrailing ? (openBlock(), createBlock(FluxIcon_default, {
|
|
9238
|
+
key: 1,
|
|
9239
|
+
class: normalizeClass(__props.cssClassIcon),
|
|
9240
|
+
name: __props.iconTrailing
|
|
9241
|
+
}, null, 8, ["class", "name"])) : createCommentVNode("", true)]),
|
|
9242
|
+
renderSlot(_ctx.$slots, "after")
|
|
9243
|
+
]),
|
|
9244
|
+
_: 3
|
|
9245
|
+
}, 8, [
|
|
9246
|
+
"component-type",
|
|
9247
|
+
"class",
|
|
9248
|
+
"type",
|
|
9249
|
+
"aria-disabled",
|
|
9250
|
+
"disabled",
|
|
9251
|
+
"tabindex",
|
|
9252
|
+
"href",
|
|
9253
|
+
"rel",
|
|
9254
|
+
"target",
|
|
9255
|
+
"to"
|
|
9256
|
+
]);
|
|
9257
|
+
};
|
|
9258
|
+
}
|
|
9259
|
+
});
|
|
9260
|
+
//#endregion
|
|
9261
|
+
//#region src/css/component/Action.module.scss
|
|
9262
|
+
var { "button": _0$15, "buttonIcon": _1$6, "buttonLabel": _2$5 } = Button_module_default$1;
|
|
9263
|
+
var Action_module_default = {
|
|
9264
|
+
action: `action ${_0$15}`,
|
|
9265
|
+
spinner: `spinner`,
|
|
9266
|
+
actionIcon: `action-icon ${_1$6}`,
|
|
9267
|
+
isDestructive: `is-destructive`,
|
|
9268
|
+
actionLabel: `action-label ${_2$5}`,
|
|
9269
|
+
actionBar: `action-bar`,
|
|
9270
|
+
separator: `separator`,
|
|
9271
|
+
formInput: `form-input`,
|
|
9272
|
+
basePaneStructure: `base-pane-structure`,
|
|
9273
|
+
actionPane: `action-pane`,
|
|
9274
|
+
actionPaneGrid: `action-pane-grid`,
|
|
9275
|
+
actionPaneBody: `action-pane-body`,
|
|
9276
|
+
paneBody: `pane-body`
|
|
9277
|
+
};
|
|
9278
|
+
//#endregion
|
|
9279
|
+
//#region src/component/FluxAction.vue
|
|
9280
|
+
var FluxAction_default = /* @__PURE__ */ defineComponent({
|
|
9281
|
+
__name: "FluxAction",
|
|
9282
|
+
props: {
|
|
9283
|
+
type: {},
|
|
9284
|
+
disabled: { type: Boolean },
|
|
9285
|
+
isLoading: { type: Boolean },
|
|
9286
|
+
isSubmit: { type: Boolean },
|
|
9287
|
+
label: {},
|
|
9288
|
+
tabindex: {},
|
|
9289
|
+
href: {},
|
|
9290
|
+
rel: {},
|
|
9291
|
+
target: {},
|
|
9292
|
+
to: {},
|
|
9293
|
+
icon: {},
|
|
9294
|
+
isDestructive: { type: Boolean }
|
|
9295
|
+
},
|
|
9296
|
+
emits: [
|
|
9297
|
+
"click",
|
|
9298
|
+
"mouseenter",
|
|
9299
|
+
"mouseleave"
|
|
9300
|
+
],
|
|
9301
|
+
setup(__props, { emit: $emit }) {
|
|
9302
|
+
return (_ctx, _cache) => {
|
|
9303
|
+
return openBlock(), createBlock(FluxButton_default, mergeProps({
|
|
9304
|
+
disabled: __props.disabled,
|
|
9305
|
+
isLoading: __props.isLoading,
|
|
9306
|
+
label: __props.label,
|
|
9307
|
+
href: __props.href,
|
|
9308
|
+
rel: __props.rel,
|
|
9309
|
+
target: __props.target,
|
|
9310
|
+
to: __props.to,
|
|
9311
|
+
type: __props.type
|
|
9312
|
+
}, {
|
|
9313
|
+
"css-class": unref(Action_module_default).action,
|
|
9314
|
+
"css-class-icon": unref(Action_module_default).actionIcon,
|
|
9315
|
+
"css-class-label": unref(Action_module_default).actionLabel,
|
|
9316
|
+
class: __props.isDestructive && unref(Action_module_default).isDestructive,
|
|
9317
|
+
"icon-leading": __props.icon,
|
|
9318
|
+
onClick: _cache[0] || (_cache[0] = ($event) => $emit("click", $event)),
|
|
9319
|
+
onMouseenter: _cache[1] || (_cache[1] = ($event) => $emit("mouseenter", $event)),
|
|
9320
|
+
onMouseleave: _cache[2] || (_cache[2] = ($event) => $emit("mouseleave", $event))
|
|
9321
|
+
}), null, 16, [
|
|
9322
|
+
"css-class",
|
|
9323
|
+
"css-class-icon",
|
|
9324
|
+
"css-class-label",
|
|
9325
|
+
"class",
|
|
9326
|
+
"icon-leading"
|
|
9327
|
+
]);
|
|
9328
|
+
};
|
|
9329
|
+
}
|
|
9330
|
+
});
|
|
9288
9331
|
//#endregion
|
|
9289
9332
|
//#region src/css/component/Button.module.scss
|
|
9290
|
-
var { "button": _0$14, "
|
|
9333
|
+
var { "button": _0$14, "buttonIcon": _1$5, "buttonLabel": _2$4 } = Button_module_default$1;
|
|
9291
9334
|
var Button_module_default = {
|
|
9292
9335
|
primaryButton: `primary-button ${_0$14}`,
|
|
9293
9336
|
spinner: `spinner`,
|
|
9294
|
-
primaryButtonIcon: `primary-button-icon ${
|
|
9295
|
-
primaryButtonLabel: `primary-button-label ${
|
|
9337
|
+
primaryButtonIcon: `primary-button-icon ${_1$5}`,
|
|
9338
|
+
primaryButtonLabel: `primary-button-label ${_2$4}`,
|
|
9296
9339
|
secondaryButton: `secondary-button ${_0$14}`,
|
|
9297
|
-
secondaryButtonIcon: `secondary-button-icon ${
|
|
9298
|
-
secondaryButtonLabel: `secondary-button-label ${
|
|
9340
|
+
secondaryButtonIcon: `secondary-button-icon ${_1$5}`,
|
|
9341
|
+
secondaryButtonLabel: `secondary-button-label ${_2$4}`,
|
|
9299
9342
|
destructiveButton: `destructive-button ${_0$14}`,
|
|
9300
|
-
destructiveButtonIcon: `destructive-button-icon ${
|
|
9301
|
-
destructiveButtonLabel: `destructive-button-label ${
|
|
9343
|
+
destructiveButtonIcon: `destructive-button-icon ${_1$5}`,
|
|
9344
|
+
destructiveButtonLabel: `destructive-button-label ${_2$4}`,
|
|
9302
9345
|
baseLinkButton: `base-link-button ${_0$14}`,
|
|
9303
9346
|
primaryLinkButton: `primary-link-button base-link-button ${_0$14}`,
|
|
9304
|
-
primaryLinkButtonIcon: `primary-link-button-icon ${
|
|
9305
|
-
primaryLinkButtonLabel: `primary-link-button-label ${
|
|
9347
|
+
primaryLinkButtonIcon: `primary-link-button-icon ${_1$5}`,
|
|
9348
|
+
primaryLinkButtonLabel: `primary-link-button-label ${_2$4}`,
|
|
9306
9349
|
secondaryLinkButton: `secondary-link-button base-link-button ${_0$14}`,
|
|
9307
|
-
secondaryLinkButtonIcon: `secondary-link-button-icon ${
|
|
9308
|
-
secondaryLinkButtonLabel: `secondary-link-button-label ${
|
|
9350
|
+
secondaryLinkButtonIcon: `secondary-link-button-icon ${_1$5}`,
|
|
9351
|
+
secondaryLinkButtonLabel: `secondary-link-button-label ${_2$4}`,
|
|
9309
9352
|
linkButton: `link-button ${_0$14}`,
|
|
9310
|
-
linkButtonIcon: `link-button-icon ${
|
|
9353
|
+
linkButtonIcon: `link-button-icon ${_1$5}`,
|
|
9311
9354
|
icon: `icon`,
|
|
9312
|
-
linkButtonLabel: `link-button-label ${
|
|
9355
|
+
linkButtonLabel: `link-button-label ${_2$4}`,
|
|
9313
9356
|
publishButton: `publish-button primary-button ${_0$14}`,
|
|
9314
|
-
publishButtonIcon: `publish-button-icon primary-button-icon ${
|
|
9315
|
-
publishButtonLabel: `publish-button-label primary-button-label ${
|
|
9357
|
+
publishButtonIcon: `publish-button-icon primary-button-icon ${_1$5}`,
|
|
9358
|
+
publishButtonLabel: `publish-button-label primary-button-label ${_2$4}`,
|
|
9316
9359
|
publishButtonAnimation: `publish-button-animation`,
|
|
9317
9360
|
isDone: `is-done`,
|
|
9318
9361
|
publishButtonAnimationArrow: `publish-button-animation-arrow`,
|
|
@@ -12989,249 +13032,64 @@ var Comment_module_default = {
|
|
|
12989
13032
|
isTyping: `is-typing`,
|
|
12990
13033
|
commentTyping: `comment-typing`
|
|
12991
13034
|
};
|
|
12992
|
-
//#endregion
|
|
12993
|
-
//#region src/component/FluxComment.vue?vue&type=script&setup=true&lang.ts
|
|
12994
|
-
var _hoisted_1$48 = { key: 0 };
|
|
12995
|
-
var _hoisted_2$17 = ["datetime"];
|
|
12996
|
-
//#endregion
|
|
12997
|
-
//#region src/component/FluxComment.vue
|
|
12998
|
-
var FluxComment_default = /* @__PURE__ */ defineComponent({
|
|
12999
|
-
__name: "FluxComment",
|
|
13000
|
-
props: {
|
|
13001
|
-
avatarAlt: {},
|
|
13002
|
-
avatarFallback: { default: "colorized" },
|
|
13003
|
-
avatarFallbackIcon: { default: "user" },
|
|
13004
|
-
avatarFallbackInitials: {},
|
|
13005
|
-
avatarSrc: {},
|
|
13006
|
-
isReceived: { type: Boolean },
|
|
13007
|
-
isTyping: { type: Boolean },
|
|
13008
|
-
postedBy: {},
|
|
13009
|
-
postedOn: {}
|
|
13010
|
-
},
|
|
13011
|
-
setup(__props) {
|
|
13012
|
-
const translate = useTranslate_default();
|
|
13013
|
-
const isJustNowVisible = computed(() => __props.postedOn && Math.abs(__props.postedOn.diffNow().as("seconds")) < 15);
|
|
13014
|
-
const iso = computed(() => __props.postedOn?.toISO() ?? null);
|
|
13015
|
-
const relative = computed(() => __props.postedOn?.toRelative() ?? null);
|
|
13016
|
-
return (_ctx, _cache) => {
|
|
13017
|
-
return openBlock(), createElementBlock("div", {
|
|
13018
|
-
class: normalizeClass(unref(clsx)(unref(Comment_module_default).comment, __props.isTyping && unref(Comment_module_default).isTyping, __props.isReceived && unref(Comment_module_default).isReceived)),
|
|
13019
|
-
role: "article"
|
|
13020
|
-
}, [
|
|
13021
|
-
createVNode(FluxAvatar_default, {
|
|
13022
|
-
alt: __props.avatarAlt,
|
|
13023
|
-
fallback: __props.avatarFallback,
|
|
13024
|
-
"fallback-icon": __props.avatarFallbackIcon,
|
|
13025
|
-
"fallback-initials": __props.avatarFallbackInitials,
|
|
13026
|
-
size: 42,
|
|
13027
|
-
src: __props.avatarSrc
|
|
13028
|
-
}, null, 8, [
|
|
13029
|
-
"alt",
|
|
13030
|
-
"fallback",
|
|
13031
|
-
"fallback-icon",
|
|
13032
|
-
"fallback-initials",
|
|
13033
|
-
"src"
|
|
13034
|
-
]),
|
|
13035
|
-
createElementVNode("div", { class: normalizeClass(unref(Comment_module_default).commentContent) }, [__props.isTyping ? (openBlock(), createElementBlock("div", {
|
|
13036
|
-
key: 0,
|
|
13037
|
-
class: normalizeClass(unref(Comment_module_default).commentTyping)
|
|
13038
|
-
}, null, 2)) : renderSlot(_ctx.$slots, "default", { key: 1 })], 2),
|
|
13039
|
-
createElementVNode("div", { class: normalizeClass(unref(Comment_module_default).commentFooter) }, [__props.isReceived && __props.postedBy ? (openBlock(), createElementBlock("span", _hoisted_1$48, toDisplayString(__props.postedBy), 1)) : createCommentVNode("", true), iso.value && relative.value && !__props.isTyping ? (openBlock(), createElementBlock("time", {
|
|
13040
|
-
key: 1,
|
|
13041
|
-
datetime: iso.value
|
|
13042
|
-
}, toDisplayString(isJustNowVisible.value ? unref(translate)("flux.justNow") : relative.value), 9, _hoisted_2$17)) : createCommentVNode("", true)], 2)
|
|
13043
|
-
], 2);
|
|
13044
|
-
};
|
|
13045
|
-
}
|
|
13046
|
-
});
|
|
13047
|
-
var Slider_module_default = {
|
|
13048
|
-
slider: `slider`,
|
|
13049
|
-
isDisabled: `is-disabled`,
|
|
13050
|
-
isDragging: `is-dragging`,
|
|
13051
|
-
sliderThumb: `slider-thumb`,
|
|
13052
|
-
sliderTrack: `slider-track`,
|
|
13053
|
-
sliderTrackValue: `slider-track-value`,
|
|
13054
|
-
tick: `tick`,
|
|
13055
|
-
tickLarge: `tick-large tick`,
|
|
13056
|
-
tickSmall: `tick-small tick`,
|
|
13057
|
-
ticks: `ticks`
|
|
13058
|
-
};
|
|
13059
|
-
//#endregion
|
|
13060
|
-
//#region src/css/component/primitive/CoordinatePicker.module.scss
|
|
13061
|
-
var { "sliderThumb": _0$10 } = Slider_module_default;
|
|
13062
|
-
var CoordinatePicker_module_default = {
|
|
13063
|
-
coordinatePicker: `coordinate-picker`,
|
|
13064
|
-
coordinatePickerThumb: `coordinate-picker-thumb ${_0$10}`,
|
|
13065
|
-
isDisabled: `is-disabled`,
|
|
13066
|
-
isDragging: `is-dragging`
|
|
13067
|
-
};
|
|
13068
|
-
//#endregion
|
|
13069
|
-
//#region src/component/primitive/CoordinatePickerThumb.vue?vue&type=script&setup=true&lang.ts
|
|
13070
|
-
var _hoisted_1$47 = [
|
|
13071
|
-
"aria-disabled",
|
|
13072
|
-
"aria-valuetext",
|
|
13073
|
-
"tabindex"
|
|
13074
|
-
];
|
|
13075
|
-
//#endregion
|
|
13076
|
-
//#region src/component/primitive/CoordinatePickerThumb.vue
|
|
13077
|
-
var CoordinatePickerThumb_default = /* @__PURE__ */ defineComponent({
|
|
13078
|
-
__name: "CoordinatePickerThumb",
|
|
13079
|
-
props: {
|
|
13080
|
-
disabled: { type: Boolean },
|
|
13081
|
-
isDragging: { type: Boolean },
|
|
13082
|
-
position: {}
|
|
13083
|
-
},
|
|
13084
|
-
emits: [
|
|
13085
|
-
"decrement",
|
|
13086
|
-
"grab",
|
|
13087
|
-
"increment"
|
|
13088
|
-
],
|
|
13089
|
-
setup(__props, { emit: __emit }) {
|
|
13090
|
-
const $emit = __emit;
|
|
13091
|
-
const emit = __emit;
|
|
13092
|
-
const disabled = useDisabled_default(toRef(() => __props.disabled));
|
|
13093
|
-
function onKeyDown(evt) {
|
|
13094
|
-
if (unref(disabled)) return;
|
|
13095
|
-
switch (evt.key) {
|
|
13096
|
-
case "ArrowUp":
|
|
13097
|
-
emit("decrement", false, true);
|
|
13098
|
-
break;
|
|
13099
|
-
case "ArrowDown":
|
|
13100
|
-
emit("increment", false, true);
|
|
13101
|
-
break;
|
|
13102
|
-
case "ArrowLeft":
|
|
13103
|
-
emit("decrement", true, false);
|
|
13104
|
-
break;
|
|
13105
|
-
case "ArrowRight":
|
|
13106
|
-
emit("increment", true, false);
|
|
13107
|
-
break;
|
|
13108
|
-
default: return;
|
|
13109
|
-
}
|
|
13110
|
-
evt.preventDefault();
|
|
13111
|
-
}
|
|
13112
|
-
return (_ctx, _cache) => {
|
|
13113
|
-
return openBlock(), createElementBlock("button", {
|
|
13114
|
-
class: normalizeClass(unref(clsx)(unref(CoordinatePicker_module_default).coordinatePickerThumb, unref(disabled) && unref(CoordinatePicker_module_default).isDisabled, __props.isDragging && unref(CoordinatePicker_module_default).isDragging)),
|
|
13115
|
-
style: normalizeStyle({
|
|
13116
|
-
top: `${__props.position[1] * 100}%`,
|
|
13117
|
-
left: `${__props.position[0] * 100}%`
|
|
13118
|
-
}),
|
|
13119
|
-
role: "slider",
|
|
13120
|
-
"aria-disabled": unref(disabled) ? true : void 0,
|
|
13121
|
-
"aria-valuetext": `X: ${Math.round(__props.position[0] * 100)}%, Y: ${Math.round(__props.position[1] * 100)}%`,
|
|
13122
|
-
tabindex: unref(disabled) ? -1 : 0,
|
|
13123
|
-
type: "button",
|
|
13124
|
-
onKeydown: onKeyDown,
|
|
13125
|
-
onPointerdown: _cache[0] || (_cache[0] = ($event) => $emit("grab", $event))
|
|
13126
|
-
}, null, 46, _hoisted_1$47);
|
|
13127
|
-
};
|
|
13128
|
-
}
|
|
13129
|
-
});
|
|
13130
|
-
//#endregion
|
|
13131
|
-
//#region src/component/primitive/CoordinatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
13132
|
-
var _hoisted_1$46 = ["aria-disabled", "aria-label"];
|
|
13133
|
-
//#endregion
|
|
13134
|
-
//#region src/component/primitive/CoordinatePicker.vue
|
|
13135
|
-
var CoordinatePicker_default = /* @__PURE__ */ defineComponent({
|
|
13136
|
-
__name: "CoordinatePicker",
|
|
13137
|
-
props: /* @__PURE__ */ mergeModels({
|
|
13138
|
-
ariaLabel: {},
|
|
13139
|
-
disabled: { type: Boolean },
|
|
13140
|
-
max: { default: 100 },
|
|
13141
|
-
min: { default: 0 },
|
|
13142
|
-
step: { default: 1 }
|
|
13143
|
-
}, {
|
|
13144
|
-
"modelValue": { default: [0, 0] },
|
|
13145
|
-
"modelModifiers": {}
|
|
13146
|
-
}),
|
|
13147
|
-
emits: /* @__PURE__ */ mergeModels(["dragging"], ["update:modelValue"]),
|
|
13148
|
-
setup(__props, { emit: __emit }) {
|
|
13149
|
-
const emit = __emit;
|
|
13150
|
-
const modelValue = useModel(__props, "modelValue");
|
|
13151
|
-
const disabled = useDisabled_default(toRef(() => __props.disabled));
|
|
13152
|
-
const rootRef = useTemplateRef("root");
|
|
13153
|
-
const isDragging = ref(false);
|
|
13154
|
-
const max = computed(() => Array.isArray(__props.max) ? __props.max : [__props.max, __props.max]);
|
|
13155
|
-
const min = computed(() => Array.isArray(__props.min) ? __props.min : [__props.min, __props.min]);
|
|
13156
|
-
const step = computed(() => Array.isArray(__props.step) ? __props.step : [__props.step, __props.step]);
|
|
13157
|
-
const thumbPosition = computed(() => [(unref(modelValue)[0] - unref(min)[0]) / (unref(max)[0] - unref(min)[0]), (unref(modelValue)[1] - unref(min)[1]) / (unref(max)[1] - unref(min)[1])]);
|
|
13158
|
-
function onDecrement(x, y) {
|
|
13159
|
-
if (unref(disabled)) return;
|
|
13160
|
-
let [valueX, valueY] = unref(modelValue);
|
|
13161
|
-
const [maxX, maxY] = unref(max);
|
|
13162
|
-
const [minX, minY] = unref(min);
|
|
13163
|
-
const [stepX, stepY] = unref(step);
|
|
13164
|
-
if (x) valueX = +t$1(Math.max(minX, Math.min(maxX, valueX - stepX)), stepX).toPrecision(4);
|
|
13165
|
-
if (y) valueY = +t$1(Math.max(minY, Math.min(maxY, valueY - stepY)), stepY).toPrecision(4);
|
|
13166
|
-
modelValue.value = [valueX, valueY];
|
|
13167
|
-
}
|
|
13168
|
-
function onIncrement(x, y) {
|
|
13169
|
-
if (unref(disabled)) return;
|
|
13170
|
-
let [valueX, valueY] = unref(modelValue);
|
|
13171
|
-
const [maxX, maxY] = unref(max);
|
|
13172
|
-
const [minX, minY] = unref(min);
|
|
13173
|
-
const [stepX, stepY] = unref(step);
|
|
13174
|
-
if (x) valueX = +t$1(Math.max(minX, Math.min(maxX, valueX + stepX)), stepX).toPrecision(4);
|
|
13175
|
-
if (y) valueY = +t$1(Math.max(minY, Math.min(maxY, valueY + stepY)), stepY).toPrecision(4);
|
|
13176
|
-
modelValue.value = [valueX, valueY];
|
|
13177
|
-
}
|
|
13178
|
-
function onPointerDown(evt) {
|
|
13179
|
-
if (unref(disabled)) return;
|
|
13180
|
-
isDragging.value = true;
|
|
13181
|
-
document.addEventListener("pointermove", onPointerMove);
|
|
13182
|
-
document.addEventListener("pointerup", onPointerUp, { passive: true });
|
|
13183
|
-
requestAnimationFrame(() => onPointerMove(evt));
|
|
13184
|
-
}
|
|
13185
|
-
function onPointerMove(evt) {
|
|
13186
|
-
const root = _$2(rootRef);
|
|
13187
|
-
if (!unref(isDragging) || !root) return;
|
|
13188
|
-
const [maxX, maxY] = unref(max);
|
|
13189
|
-
const [minX, minY] = unref(min);
|
|
13190
|
-
const [stepX, stepY] = unref(step);
|
|
13191
|
-
let { top, left, width, height } = root.getBoundingClientRect();
|
|
13192
|
-
top += 6;
|
|
13193
|
-
left += 6;
|
|
13194
|
-
width -= 12;
|
|
13195
|
-
height -= 12;
|
|
13196
|
-
const x = Math.max(0, Math.min(1, (evt.clientX - left) / width));
|
|
13197
|
-
const y = Math.max(0, Math.min(1, (evt.clientY - top) / height));
|
|
13198
|
-
modelValue.value = [+t$1(x * (maxX - minX) + minX, stepX).toPrecision(4), +t$1(y * (maxY - minY) + minY, stepY).toPrecision(4)];
|
|
13199
|
-
evt.preventDefault();
|
|
13200
|
-
}
|
|
13201
|
-
function onPointerUp() {
|
|
13202
|
-
isDragging.value = false;
|
|
13203
|
-
document.removeEventListener("pointermove", onPointerMove);
|
|
13204
|
-
document.removeEventListener("pointerup", onPointerUp);
|
|
13205
|
-
}
|
|
13206
|
-
watch(isDragging, (isDragging) => emit("dragging", isDragging));
|
|
13207
|
-
onUnmounted(() => {
|
|
13208
|
-
document.removeEventListener("pointermove", onPointerMove);
|
|
13209
|
-
document.removeEventListener("pointerup", onPointerUp);
|
|
13210
|
-
});
|
|
13035
|
+
//#endregion
|
|
13036
|
+
//#region src/component/FluxComment.vue?vue&type=script&setup=true&lang.ts
|
|
13037
|
+
var _hoisted_1$48 = { key: 0 };
|
|
13038
|
+
var _hoisted_2$17 = ["datetime"];
|
|
13039
|
+
//#endregion
|
|
13040
|
+
//#region src/component/FluxComment.vue
|
|
13041
|
+
var FluxComment_default = /* @__PURE__ */ defineComponent({
|
|
13042
|
+
__name: "FluxComment",
|
|
13043
|
+
props: {
|
|
13044
|
+
avatarAlt: {},
|
|
13045
|
+
avatarFallback: { default: "colorized" },
|
|
13046
|
+
avatarFallbackIcon: { default: "user" },
|
|
13047
|
+
avatarFallbackInitials: {},
|
|
13048
|
+
avatarSrc: {},
|
|
13049
|
+
isReceived: { type: Boolean },
|
|
13050
|
+
isTyping: { type: Boolean },
|
|
13051
|
+
postedBy: {},
|
|
13052
|
+
postedOn: {}
|
|
13053
|
+
},
|
|
13054
|
+
setup(__props) {
|
|
13055
|
+
const translate = useTranslate_default();
|
|
13056
|
+
const isJustNowVisible = computed(() => __props.postedOn && Math.abs(__props.postedOn.diffNow().as("seconds")) < 15);
|
|
13057
|
+
const iso = computed(() => __props.postedOn?.toISO() ?? null);
|
|
13058
|
+
const relative = computed(() => __props.postedOn?.toRelative() ?? null);
|
|
13211
13059
|
return (_ctx, _cache) => {
|
|
13212
13060
|
return openBlock(), createElementBlock("div", {
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13061
|
+
class: normalizeClass(unref(clsx)(unref(Comment_module_default).comment, __props.isTyping && unref(Comment_module_default).isTyping, __props.isReceived && unref(Comment_module_default).isReceived)),
|
|
13062
|
+
role: "article"
|
|
13063
|
+
}, [
|
|
13064
|
+
createVNode(FluxAvatar_default, {
|
|
13065
|
+
alt: __props.avatarAlt,
|
|
13066
|
+
fallback: __props.avatarFallback,
|
|
13067
|
+
"fallback-icon": __props.avatarFallbackIcon,
|
|
13068
|
+
"fallback-initials": __props.avatarFallbackInitials,
|
|
13069
|
+
size: 42,
|
|
13070
|
+
src: __props.avatarSrc
|
|
13071
|
+
}, null, 8, [
|
|
13072
|
+
"alt",
|
|
13073
|
+
"fallback",
|
|
13074
|
+
"fallback-icon",
|
|
13075
|
+
"fallback-initials",
|
|
13076
|
+
"src"
|
|
13077
|
+
]),
|
|
13078
|
+
createElementVNode("div", { class: normalizeClass(unref(Comment_module_default).commentContent) }, [__props.isTyping ? (openBlock(), createElementBlock("div", {
|
|
13079
|
+
key: 0,
|
|
13080
|
+
class: normalizeClass(unref(Comment_module_default).commentTyping)
|
|
13081
|
+
}, null, 2)) : renderSlot(_ctx.$slots, "default", { key: 1 })], 2),
|
|
13082
|
+
createElementVNode("div", { class: normalizeClass(unref(Comment_module_default).commentFooter) }, [__props.isReceived && __props.postedBy ? (openBlock(), createElementBlock("span", _hoisted_1$48, toDisplayString(__props.postedBy), 1)) : createCommentVNode("", true), iso.value && relative.value && !__props.isTyping ? (openBlock(), createElementBlock("time", {
|
|
13083
|
+
key: 1,
|
|
13084
|
+
datetime: iso.value
|
|
13085
|
+
}, toDisplayString(isJustNowVisible.value ? unref(translate)("flux.justNow") : relative.value), 9, _hoisted_2$17)) : createCommentVNode("", true)], 2)
|
|
13086
|
+
], 2);
|
|
13229
13087
|
};
|
|
13230
13088
|
}
|
|
13231
13089
|
});
|
|
13232
13090
|
//#endregion
|
|
13233
13091
|
//#region src/component/FluxFormFieldAddition.vue?vue&type=script&setup=true&lang.ts
|
|
13234
|
-
var _hoisted_1$
|
|
13092
|
+
var _hoisted_1$47 = { key: 1 };
|
|
13235
13093
|
//#endregion
|
|
13236
13094
|
//#region src/component/FluxFormFieldAddition.vue
|
|
13237
13095
|
var FluxFormFieldAddition_default = /* @__PURE__ */ defineComponent({
|
|
@@ -13253,7 +13111,7 @@ var FluxFormFieldAddition_default = /* @__PURE__ */ defineComponent({
|
|
|
13253
13111
|
name: __props.icon,
|
|
13254
13112
|
size: 16
|
|
13255
13113
|
}, null, 8, ["class", "name"])) : createCommentVNode("", true),
|
|
13256
|
-
__props.message ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
13114
|
+
__props.message ? (openBlock(), createElementBlock("span", _hoisted_1$47, toDisplayString(__props.message), 1)) : createCommentVNode("", true),
|
|
13257
13115
|
renderSlot(_ctx.$slots, "default")
|
|
13258
13116
|
], 2);
|
|
13259
13117
|
};
|
|
@@ -13261,7 +13119,7 @@ var FluxFormFieldAddition_default = /* @__PURE__ */ defineComponent({
|
|
|
13261
13119
|
});
|
|
13262
13120
|
//#endregion
|
|
13263
13121
|
//#region src/component/FluxFormField.vue?vue&type=script&setup=true&lang.ts
|
|
13264
|
-
var _hoisted_1$
|
|
13122
|
+
var _hoisted_1$46 = ["for"];
|
|
13265
13123
|
//#endregion
|
|
13266
13124
|
//#region src/component/FluxFormField.vue
|
|
13267
13125
|
var FluxFormField_default = /* @__PURE__ */ defineComponent({
|
|
@@ -13285,13 +13143,16 @@ var FluxFormField_default = /* @__PURE__ */ defineComponent({
|
|
|
13285
13143
|
for: unref(id),
|
|
13286
13144
|
class: normalizeClass(unref(Form_module_default).formFieldHeader)
|
|
13287
13145
|
}, [
|
|
13288
|
-
|
|
13289
|
-
__props.isOptional ? (openBlock(), createElementBlock("span", {
|
|
13146
|
+
__props.label ? (openBlock(), createElementBlock("span", {
|
|
13290
13147
|
key: 0,
|
|
13148
|
+
class: normalizeClass(unref(Form_module_default).formFieldLabel)
|
|
13149
|
+
}, toDisplayString(__props.label), 3)) : createCommentVNode("", true),
|
|
13150
|
+
__props.isOptional ? (openBlock(), createElementBlock("span", {
|
|
13151
|
+
key: 1,
|
|
13291
13152
|
class: normalizeClass(unref(Form_module_default).formFieldOptional)
|
|
13292
13153
|
}, " (" + toDisplayString(unref(translate)("flux.optional")) + ") ", 3)) : createCommentVNode("", true),
|
|
13293
13154
|
"value" in slots ? (openBlock(), createElementBlock("span", {
|
|
13294
|
-
key:
|
|
13155
|
+
key: 2,
|
|
13295
13156
|
class: normalizeClass(unref(Form_module_default).formFieldValue)
|
|
13296
13157
|
}, [renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({
|
|
13297
13158
|
currentLength: __props.currentLength,
|
|
@@ -13302,7 +13163,7 @@ var FluxFormField_default = /* @__PURE__ */ defineComponent({
|
|
|
13302
13163
|
label: __props.label,
|
|
13303
13164
|
maxLength: __props.maxLength
|
|
13304
13165
|
})))], 2)) : createCommentVNode("", true)
|
|
13305
|
-
], 10, _hoisted_1$
|
|
13166
|
+
], 10, _hoisted_1$46),
|
|
13306
13167
|
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ id: unref(id) }))),
|
|
13307
13168
|
__props.currentLength && __props.maxLength && __props.maxLength > 0 ? (openBlock(), createElementBlock("span", {
|
|
13308
13169
|
key: 0,
|
|
@@ -13334,7 +13195,7 @@ var FluxFormField_default = /* @__PURE__ */ defineComponent({
|
|
|
13334
13195
|
});
|
|
13335
13196
|
//#endregion
|
|
13336
13197
|
//#region src/component/FluxFormInput.vue?vue&type=script&setup=true&lang.ts
|
|
13337
|
-
var _hoisted_1$
|
|
13198
|
+
var _hoisted_1$45 = ["aria-disabled"];
|
|
13338
13199
|
var _hoisted_2$16 = [
|
|
13339
13200
|
"id",
|
|
13340
13201
|
"name",
|
|
@@ -13538,7 +13399,7 @@ var FluxFormInput_default = /* @__PURE__ */ defineComponent({
|
|
|
13538
13399
|
class: normalizeClass(unref(Form_module_default).formInputIconTrailing),
|
|
13539
13400
|
size: 18
|
|
13540
13401
|
}, null, 8, ["class"])) : createCommentVNode("", true)
|
|
13541
|
-
], 10, _hoisted_1$
|
|
13402
|
+
], 10, _hoisted_1$45);
|
|
13542
13403
|
};
|
|
13543
13404
|
}
|
|
13544
13405
|
});
|
|
@@ -13709,7 +13570,7 @@ var FluxPaneFooter_default = /* @__PURE__ */ defineComponent({
|
|
|
13709
13570
|
});
|
|
13710
13571
|
//#endregion
|
|
13711
13572
|
//#region src/component/FluxPaneHeader.vue?vue&type=script&setup=true&lang.ts
|
|
13712
|
-
var _hoisted_1$
|
|
13573
|
+
var _hoisted_1$44 = { key: 0 };
|
|
13713
13574
|
var _hoisted_2$15 = { key: 1 };
|
|
13714
13575
|
//#endregion
|
|
13715
13576
|
//#region src/component/FluxPaneHeader.vue
|
|
@@ -13733,7 +13594,7 @@ var FluxPaneHeader_default = /* @__PURE__ */ defineComponent({
|
|
|
13733
13594
|
__props.title || __props.subtitle ? (openBlock(), createElementBlock("div", {
|
|
13734
13595
|
key: 1,
|
|
13735
13596
|
class: normalizeClass(unref(Pane_module_default).paneHeaderCaption)
|
|
13736
|
-
}, [__props.title ? (openBlock(), createElementBlock("strong", _hoisted_1$
|
|
13597
|
+
}, [__props.title ? (openBlock(), createElementBlock("strong", _hoisted_1$44, toDisplayString(__props.title), 1)) : createCommentVNode("", true), __props.subtitle ? (openBlock(), createElementBlock("span", _hoisted_2$15, toDisplayString(__props.subtitle), 1)) : createCommentVNode("", true)], 2)) : createCommentVNode("", true),
|
|
13737
13598
|
renderSlot(_ctx.$slots, "after")
|
|
13738
13599
|
], 2);
|
|
13739
13600
|
};
|
|
@@ -13756,10 +13617,10 @@ var DialogLayout_default = /* @__PURE__ */ defineComponent({
|
|
|
13756
13617
|
icon: __props.icon,
|
|
13757
13618
|
title: __props.title
|
|
13758
13619
|
}, null, 8, ["icon", "title"]),
|
|
13759
|
-
__props.message ? (openBlock(), createBlock(FluxPaneBody_default, {
|
|
13760
|
-
|
|
13761
|
-
|
|
13762
|
-
}
|
|
13620
|
+
__props.message ? (openBlock(), createBlock(FluxPaneBody_default, { key: 0 }, {
|
|
13621
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.message), 1)]),
|
|
13622
|
+
_: 1
|
|
13623
|
+
})) : createCommentVNode("", true),
|
|
13763
13624
|
$slots.default ? (openBlock(), createBlock(FluxPaneBody_default, { key: 1 }, {
|
|
13764
13625
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
13765
13626
|
_: 3
|
|
@@ -13844,7 +13705,7 @@ var FilterBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
13844
13705
|
});
|
|
13845
13706
|
//#endregion
|
|
13846
13707
|
//#region src/css/component/Menu.module.scss
|
|
13847
|
-
var { "
|
|
13708
|
+
var { "button": _0$10, "buttonIcon": _1$3, "buttonLabel": _2$2 } = Button_module_default$1;
|
|
13848
13709
|
var Menu_module_default = {
|
|
13849
13710
|
menu: `menu`,
|
|
13850
13711
|
menuNormal: `menu-normal menu`,
|
|
@@ -13852,9 +13713,9 @@ var Menu_module_default = {
|
|
|
13852
13713
|
menuGroup: `menu-group`,
|
|
13853
13714
|
menuGroupHorizontal: `menu-group-horizontal menu-group`,
|
|
13854
13715
|
menuGroupVertical: `menu-group-vertical menu-group`,
|
|
13855
|
-
menuItem: `menu-item ${
|
|
13716
|
+
menuItem: `menu-item ${_0$10}`,
|
|
13856
13717
|
badge: `badge`,
|
|
13857
|
-
menuItemIcon: `menu-item-icon ${
|
|
13718
|
+
menuItemIcon: `menu-item-icon ${_1$3}`,
|
|
13858
13719
|
menuItemLabel: `menu-item-label ${_2$2}`,
|
|
13859
13720
|
menuItemActive: `menu-item-active`,
|
|
13860
13721
|
menuItemDestructive: `menu-item-destructive`,
|
|
@@ -13864,7 +13725,7 @@ var Menu_module_default = {
|
|
|
13864
13725
|
menuCollapsibleOpened: `menu-collapsible-opened menu-collapsible`,
|
|
13865
13726
|
menuCollapsibleBody: `menu-collapsible-body`,
|
|
13866
13727
|
menuCollapsibleContent: `menu-collapsible-content`,
|
|
13867
|
-
menuItemSelectableIcon: `menu-item-selectable-icon ${
|
|
13728
|
+
menuItemSelectableIcon: `menu-item-selectable-icon ${_1$3}`,
|
|
13868
13729
|
menuItemSelected: `menu-item-selected`,
|
|
13869
13730
|
menuItemCommand: `menu-item-command`,
|
|
13870
13731
|
menuItemCommandIcon: `menu-item-command-icon`,
|
|
@@ -13896,7 +13757,7 @@ var FluxMenuGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
13896
13757
|
});
|
|
13897
13758
|
//#endregion
|
|
13898
13759
|
//#region src/component/FluxMenuItem.vue?vue&type=script&setup=true&lang.ts
|
|
13899
|
-
var _hoisted_1$
|
|
13760
|
+
var _hoisted_1$43 = ["src", "alt"];
|
|
13900
13761
|
//#endregion
|
|
13901
13762
|
//#region src/component/FluxMenuItem.vue
|
|
13902
13763
|
var FluxMenuItem_default = /* @__PURE__ */ defineComponent({
|
|
@@ -13973,7 +13834,7 @@ var FluxMenuItem_default = /* @__PURE__ */ defineComponent({
|
|
|
13973
13834
|
class: normalizeClass(unref(Menu_module_default).menuItemImage),
|
|
13974
13835
|
src: __props.imageSrc,
|
|
13975
13836
|
alt: __props.imageAlt ?? ""
|
|
13976
|
-
}, null, 10, _hoisted_1$
|
|
13837
|
+
}, null, 10, _hoisted_1$43)]),
|
|
13977
13838
|
key: "1"
|
|
13978
13839
|
} : slots.before ? {
|
|
13979
13840
|
name: "iconLeading",
|
|
@@ -14379,6 +14240,18 @@ var SelectBase_default = /* @__PURE__ */ defineComponent({
|
|
|
14379
14240
|
};
|
|
14380
14241
|
}
|
|
14381
14242
|
});
|
|
14243
|
+
var Slider_module_default = {
|
|
14244
|
+
slider: `slider`,
|
|
14245
|
+
isDisabled: `is-disabled`,
|
|
14246
|
+
isDragging: `is-dragging`,
|
|
14247
|
+
sliderThumb: `slider-thumb`,
|
|
14248
|
+
sliderTrack: `slider-track`,
|
|
14249
|
+
sliderTrackValue: `slider-track-value`,
|
|
14250
|
+
tick: `tick`,
|
|
14251
|
+
tickLarge: `tick-large tick`,
|
|
14252
|
+
tickSmall: `tick-small tick`,
|
|
14253
|
+
ticks: `ticks`
|
|
14254
|
+
};
|
|
14382
14255
|
//#endregion
|
|
14383
14256
|
//#region src/component/FluxTicks.vue
|
|
14384
14257
|
var FluxTicks_default = /* @__PURE__ */ defineComponent({
|
|
@@ -14409,7 +14282,7 @@ var FluxTicks_default = /* @__PURE__ */ defineComponent({
|
|
|
14409
14282
|
});
|
|
14410
14283
|
//#endregion
|
|
14411
14284
|
//#region src/component/primitive/SliderBase.vue?vue&type=script&setup=true&lang.ts
|
|
14412
|
-
var _hoisted_1$
|
|
14285
|
+
var _hoisted_1$42 = ["aria-disabled"];
|
|
14413
14286
|
//#endregion
|
|
14414
14287
|
//#region src/component/primitive/SliderBase.vue
|
|
14415
14288
|
var SliderBase_default = /* @__PURE__ */ defineComponent({
|
|
@@ -14462,13 +14335,13 @@ var SliderBase_default = /* @__PURE__ */ defineComponent({
|
|
|
14462
14335
|
key: 0,
|
|
14463
14336
|
lower: __props.min,
|
|
14464
14337
|
upper: __props.max
|
|
14465
|
-
}, null, 8, ["lower", "upper"])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 42, _hoisted_1$
|
|
14338
|
+
}, null, 8, ["lower", "upper"])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 42, _hoisted_1$42);
|
|
14466
14339
|
};
|
|
14467
14340
|
}
|
|
14468
14341
|
});
|
|
14469
14342
|
//#endregion
|
|
14470
14343
|
//#region src/component/primitive/SliderThumb.vue?vue&type=script&setup=true&lang.ts
|
|
14471
|
-
var _hoisted_1$
|
|
14344
|
+
var _hoisted_1$41 = [
|
|
14472
14345
|
"aria-disabled",
|
|
14473
14346
|
"aria-label",
|
|
14474
14347
|
"aria-valuemax",
|
|
@@ -14527,7 +14400,7 @@ var SliderThumb_default = /* @__PURE__ */ defineComponent({
|
|
|
14527
14400
|
type: "button",
|
|
14528
14401
|
onKeydown: onKeyDown,
|
|
14529
14402
|
onPointerdown: _cache[0] || (_cache[0] = ($event) => $emit("grab", $event))
|
|
14530
|
-
}, null, 46, _hoisted_1$
|
|
14403
|
+
}, null, 46, _hoisted_1$41);
|
|
14531
14404
|
};
|
|
14532
14405
|
}
|
|
14533
14406
|
});
|
|
@@ -14632,7 +14505,7 @@ var Divider_module_default = {
|
|
|
14632
14505
|
};
|
|
14633
14506
|
//#endregion
|
|
14634
14507
|
//#region src/component/FluxSeparator.vue?vue&type=script&setup=true&lang.ts
|
|
14635
|
-
var _hoisted_1$
|
|
14508
|
+
var _hoisted_1$40 = ["aria-orientation"];
|
|
14636
14509
|
//#endregion
|
|
14637
14510
|
//#region src/component/FluxSeparator.vue
|
|
14638
14511
|
var FluxSeparator_default = /* @__PURE__ */ defineComponent({
|
|
@@ -14644,7 +14517,7 @@ var FluxSeparator_default = /* @__PURE__ */ defineComponent({
|
|
|
14644
14517
|
class: normalizeClass(__props.direction === "horizontal" ? unref(Divider_module_default).separatorHorizontal : unref(Divider_module_default).separatorVertical),
|
|
14645
14518
|
role: "separator",
|
|
14646
14519
|
"aria-orientation": __props.direction
|
|
14647
|
-
}, null, 10, _hoisted_1$
|
|
14520
|
+
}, null, 10, _hoisted_1$40);
|
|
14648
14521
|
};
|
|
14649
14522
|
}
|
|
14650
14523
|
});
|
|
@@ -14878,6 +14751,179 @@ var FluxFormSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
14878
14751
|
};
|
|
14879
14752
|
}
|
|
14880
14753
|
});
|
|
14754
|
+
//#endregion
|
|
14755
|
+
//#region src/css/component/primitive/CoordinatePicker.module.scss
|
|
14756
|
+
var { "sliderThumb": _0$9 } = Slider_module_default;
|
|
14757
|
+
var CoordinatePicker_module_default = {
|
|
14758
|
+
coordinatePicker: `coordinate-picker`,
|
|
14759
|
+
coordinatePickerThumb: `coordinate-picker-thumb ${_0$9}`,
|
|
14760
|
+
isDisabled: `is-disabled`,
|
|
14761
|
+
isDragging: `is-dragging`
|
|
14762
|
+
};
|
|
14763
|
+
//#endregion
|
|
14764
|
+
//#region src/component/primitive/CoordinatePickerThumb.vue?vue&type=script&setup=true&lang.ts
|
|
14765
|
+
var _hoisted_1$39 = [
|
|
14766
|
+
"aria-disabled",
|
|
14767
|
+
"aria-valuetext",
|
|
14768
|
+
"tabindex"
|
|
14769
|
+
];
|
|
14770
|
+
//#endregion
|
|
14771
|
+
//#region src/component/primitive/CoordinatePickerThumb.vue
|
|
14772
|
+
var CoordinatePickerThumb_default = /* @__PURE__ */ defineComponent({
|
|
14773
|
+
__name: "CoordinatePickerThumb",
|
|
14774
|
+
props: {
|
|
14775
|
+
disabled: { type: Boolean },
|
|
14776
|
+
isDragging: { type: Boolean },
|
|
14777
|
+
position: {}
|
|
14778
|
+
},
|
|
14779
|
+
emits: [
|
|
14780
|
+
"decrement",
|
|
14781
|
+
"grab",
|
|
14782
|
+
"increment"
|
|
14783
|
+
],
|
|
14784
|
+
setup(__props, { emit: __emit }) {
|
|
14785
|
+
const $emit = __emit;
|
|
14786
|
+
const emit = __emit;
|
|
14787
|
+
const disabled = useDisabled_default(toRef(() => __props.disabled));
|
|
14788
|
+
function onKeyDown(evt) {
|
|
14789
|
+
if (unref(disabled)) return;
|
|
14790
|
+
switch (evt.key) {
|
|
14791
|
+
case "ArrowUp":
|
|
14792
|
+
emit("decrement", false, true);
|
|
14793
|
+
break;
|
|
14794
|
+
case "ArrowDown":
|
|
14795
|
+
emit("increment", false, true);
|
|
14796
|
+
break;
|
|
14797
|
+
case "ArrowLeft":
|
|
14798
|
+
emit("decrement", true, false);
|
|
14799
|
+
break;
|
|
14800
|
+
case "ArrowRight":
|
|
14801
|
+
emit("increment", true, false);
|
|
14802
|
+
break;
|
|
14803
|
+
default: return;
|
|
14804
|
+
}
|
|
14805
|
+
evt.preventDefault();
|
|
14806
|
+
}
|
|
14807
|
+
return (_ctx, _cache) => {
|
|
14808
|
+
return openBlock(), createElementBlock("button", {
|
|
14809
|
+
class: normalizeClass(unref(clsx)(unref(CoordinatePicker_module_default).coordinatePickerThumb, unref(disabled) && unref(CoordinatePicker_module_default).isDisabled, __props.isDragging && unref(CoordinatePicker_module_default).isDragging)),
|
|
14810
|
+
style: normalizeStyle({
|
|
14811
|
+
top: `${__props.position[1] * 100}%`,
|
|
14812
|
+
left: `${__props.position[0] * 100}%`
|
|
14813
|
+
}),
|
|
14814
|
+
role: "slider",
|
|
14815
|
+
"aria-disabled": unref(disabled) ? true : void 0,
|
|
14816
|
+
"aria-valuetext": `X: ${Math.round(__props.position[0] * 100)}%, Y: ${Math.round(__props.position[1] * 100)}%`,
|
|
14817
|
+
tabindex: unref(disabled) ? -1 : 0,
|
|
14818
|
+
type: "button",
|
|
14819
|
+
onKeydown: onKeyDown,
|
|
14820
|
+
onPointerdown: _cache[0] || (_cache[0] = ($event) => $emit("grab", $event))
|
|
14821
|
+
}, null, 46, _hoisted_1$39);
|
|
14822
|
+
};
|
|
14823
|
+
}
|
|
14824
|
+
});
|
|
14825
|
+
//#endregion
|
|
14826
|
+
//#region src/component/primitive/CoordinatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
14827
|
+
var _hoisted_1$38 = ["aria-disabled", "aria-label"];
|
|
14828
|
+
//#endregion
|
|
14829
|
+
//#region src/component/primitive/CoordinatePicker.vue
|
|
14830
|
+
var CoordinatePicker_default = /* @__PURE__ */ defineComponent({
|
|
14831
|
+
__name: "CoordinatePicker",
|
|
14832
|
+
props: /* @__PURE__ */ mergeModels({
|
|
14833
|
+
ariaLabel: {},
|
|
14834
|
+
disabled: { type: Boolean },
|
|
14835
|
+
max: { default: 100 },
|
|
14836
|
+
min: { default: 0 },
|
|
14837
|
+
step: { default: 1 }
|
|
14838
|
+
}, {
|
|
14839
|
+
"modelValue": { default: [0, 0] },
|
|
14840
|
+
"modelModifiers": {}
|
|
14841
|
+
}),
|
|
14842
|
+
emits: /* @__PURE__ */ mergeModels(["dragging"], ["update:modelValue"]),
|
|
14843
|
+
setup(__props, { emit: __emit }) {
|
|
14844
|
+
const emit = __emit;
|
|
14845
|
+
const modelValue = useModel(__props, "modelValue");
|
|
14846
|
+
const disabled = useDisabled_default(toRef(() => __props.disabled));
|
|
14847
|
+
const rootRef = useTemplateRef("root");
|
|
14848
|
+
const isDragging = ref(false);
|
|
14849
|
+
const max = computed(() => Array.isArray(__props.max) ? __props.max : [__props.max, __props.max]);
|
|
14850
|
+
const min = computed(() => Array.isArray(__props.min) ? __props.min : [__props.min, __props.min]);
|
|
14851
|
+
const step = computed(() => Array.isArray(__props.step) ? __props.step : [__props.step, __props.step]);
|
|
14852
|
+
const thumbPosition = computed(() => [(unref(modelValue)[0] - unref(min)[0]) / (unref(max)[0] - unref(min)[0]), (unref(modelValue)[1] - unref(min)[1]) / (unref(max)[1] - unref(min)[1])]);
|
|
14853
|
+
function onDecrement(x, y) {
|
|
14854
|
+
if (unref(disabled)) return;
|
|
14855
|
+
let [valueX, valueY] = unref(modelValue);
|
|
14856
|
+
const [maxX, maxY] = unref(max);
|
|
14857
|
+
const [minX, minY] = unref(min);
|
|
14858
|
+
const [stepX, stepY] = unref(step);
|
|
14859
|
+
if (x) valueX = +t$1(Math.max(minX, Math.min(maxX, valueX - stepX)), stepX).toPrecision(4);
|
|
14860
|
+
if (y) valueY = +t$1(Math.max(minY, Math.min(maxY, valueY - stepY)), stepY).toPrecision(4);
|
|
14861
|
+
modelValue.value = [valueX, valueY];
|
|
14862
|
+
}
|
|
14863
|
+
function onIncrement(x, y) {
|
|
14864
|
+
if (unref(disabled)) return;
|
|
14865
|
+
let [valueX, valueY] = unref(modelValue);
|
|
14866
|
+
const [maxX, maxY] = unref(max);
|
|
14867
|
+
const [minX, minY] = unref(min);
|
|
14868
|
+
const [stepX, stepY] = unref(step);
|
|
14869
|
+
if (x) valueX = +t$1(Math.max(minX, Math.min(maxX, valueX + stepX)), stepX).toPrecision(4);
|
|
14870
|
+
if (y) valueY = +t$1(Math.max(minY, Math.min(maxY, valueY + stepY)), stepY).toPrecision(4);
|
|
14871
|
+
modelValue.value = [valueX, valueY];
|
|
14872
|
+
}
|
|
14873
|
+
function onPointerDown(evt) {
|
|
14874
|
+
if (unref(disabled)) return;
|
|
14875
|
+
isDragging.value = true;
|
|
14876
|
+
document.addEventListener("pointermove", onPointerMove);
|
|
14877
|
+
document.addEventListener("pointerup", onPointerUp, { passive: true });
|
|
14878
|
+
requestAnimationFrame(() => onPointerMove(evt));
|
|
14879
|
+
}
|
|
14880
|
+
function onPointerMove(evt) {
|
|
14881
|
+
const root = _$2(rootRef);
|
|
14882
|
+
if (!unref(isDragging) || !root) return;
|
|
14883
|
+
const [maxX, maxY] = unref(max);
|
|
14884
|
+
const [minX, minY] = unref(min);
|
|
14885
|
+
const [stepX, stepY] = unref(step);
|
|
14886
|
+
let { top, left, width, height } = root.getBoundingClientRect();
|
|
14887
|
+
top += 6;
|
|
14888
|
+
left += 6;
|
|
14889
|
+
width -= 12;
|
|
14890
|
+
height -= 12;
|
|
14891
|
+
const x = Math.max(0, Math.min(1, (evt.clientX - left) / width));
|
|
14892
|
+
const y = Math.max(0, Math.min(1, (evt.clientY - top) / height));
|
|
14893
|
+
modelValue.value = [+t$1(x * (maxX - minX) + minX, stepX).toPrecision(4), +t$1(y * (maxY - minY) + minY, stepY).toPrecision(4)];
|
|
14894
|
+
evt.preventDefault();
|
|
14895
|
+
}
|
|
14896
|
+
function onPointerUp() {
|
|
14897
|
+
isDragging.value = false;
|
|
14898
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
14899
|
+
document.removeEventListener("pointerup", onPointerUp);
|
|
14900
|
+
}
|
|
14901
|
+
watch(isDragging, (isDragging) => emit("dragging", isDragging));
|
|
14902
|
+
onUnmounted(() => {
|
|
14903
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
14904
|
+
document.removeEventListener("pointerup", onPointerUp);
|
|
14905
|
+
});
|
|
14906
|
+
return (_ctx, _cache) => {
|
|
14907
|
+
return openBlock(), createElementBlock("div", {
|
|
14908
|
+
ref: "root",
|
|
14909
|
+
class: normalizeClass(unref(CoordinatePicker_module_default).coordinatePicker),
|
|
14910
|
+
"aria-disabled": unref(disabled) ? true : void 0,
|
|
14911
|
+
"aria-label": __props.ariaLabel,
|
|
14912
|
+
onPointerdown: onPointerDown
|
|
14913
|
+
}, [createVNode(CoordinatePickerThumb_default, {
|
|
14914
|
+
disabled: unref(disabled),
|
|
14915
|
+
"is-dragging": isDragging.value,
|
|
14916
|
+
position: thumbPosition.value,
|
|
14917
|
+
onDecrement,
|
|
14918
|
+
onIncrement
|
|
14919
|
+
}, null, 8, [
|
|
14920
|
+
"disabled",
|
|
14921
|
+
"is-dragging",
|
|
14922
|
+
"position"
|
|
14923
|
+
])], 42, _hoisted_1$38);
|
|
14924
|
+
};
|
|
14925
|
+
}
|
|
14926
|
+
});
|
|
14881
14927
|
var Color_module_default = {
|
|
14882
14928
|
colorPicker: `color-picker`,
|
|
14883
14929
|
colorPickerPreview: `color-picker-preview`,
|
|
@@ -15452,7 +15498,7 @@ var FluxFormSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
15452
15498
|
});
|
|
15453
15499
|
//#endregion
|
|
15454
15500
|
//#region src/css/component/Pagination.module.scss
|
|
15455
|
-
var { "secondaryButton": _0$8, "
|
|
15501
|
+
var { "secondaryButton": _0$8, "secondaryButtonIcon": _1$2, "secondaryButtonLabel": _2$1 } = Button_module_default;
|
|
15456
15502
|
var Pagination_module_default = {
|
|
15457
15503
|
pagination: `pagination`,
|
|
15458
15504
|
paginationButton: `pagination-button ${_0$8}`,
|
|
@@ -15460,8 +15506,8 @@ var Pagination_module_default = {
|
|
|
15460
15506
|
paginationButtonArrow: `pagination-button-arrow`,
|
|
15461
15507
|
paginationButtonCurrent: `pagination-button-current`,
|
|
15462
15508
|
paginationButtonSpacer: `pagination-button-spacer`,
|
|
15463
|
-
paginationButtonIcon: `pagination-button-icon ${
|
|
15464
|
-
paginationButtonLabel: `pagination-button-label ${
|
|
15509
|
+
paginationButtonIcon: `pagination-button-icon ${_1$2}`,
|
|
15510
|
+
paginationButtonLabel: `pagination-button-label ${_2$1}`,
|
|
15465
15511
|
paginationBar: `pagination-bar`,
|
|
15466
15512
|
paginationBarLimit: `pagination-bar-limit`,
|
|
15467
15513
|
paginationBarLimitDisplayingOf: `pagination-bar-limit-displaying-of`,
|