@g1cloud/open-bluesea-core 1.0.0-alpha.7 → 1.0.0-alpha.9
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/css/bluesea.css +0 -4
- package/dist/index.d.ts +145 -96
- package/dist/open-bluesea-core.css +769 -1264
- package/dist/open-bluesea-core.es.js +388 -221
- package/dist/open-bluesea-core.umd.js +387 -220
- package/package.json +4 -1
- package/tailwind.preset.js +221 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject, ref, markRaw, reactive, defineComponent, withDirectives, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, createElementBlock, createCommentVNode, createElementVNode, toDisplayString, unref,
|
|
1
|
+
import { inject, ref, markRaw, provide, reactive, defineAsyncComponent, defineComponent, useSlots, computed, withDirectives, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, createElementBlock, createCommentVNode, createElementVNode, renderSlot, toDisplayString, unref, withModifiers, createVNode, Fragment, renderList, onMounted, onBeforeUnmount, Teleport, Transition, normalizeStyle, watch, nextTick, withKeys, shallowRef, useTemplateRef, mergeProps, isRef, toHandlers, vModelDynamic, vModelText, vShow, TransitionGroup, resolveComponent } from "vue";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
3
|
const ContextMenuPluginKey = Symbol("BlueseaContextMenuPlugin");
|
|
4
4
|
class BSContextMenuPlugin {
|
|
@@ -40,6 +40,110 @@ const useContextMenuOptional = () => {
|
|
|
40
40
|
const createContextMenuPlugin = () => {
|
|
41
41
|
return new BSContextMenuPlugin();
|
|
42
42
|
};
|
|
43
|
+
const modalPluginKey = "BlueseaModalPlugin";
|
|
44
|
+
const modalHandleKey = "BlueseaModalHandle";
|
|
45
|
+
class ModalHandleImpl {
|
|
46
|
+
constructor(modal, modalId) {
|
|
47
|
+
this.modal = modal;
|
|
48
|
+
this.modalId = modalId;
|
|
49
|
+
}
|
|
50
|
+
maximized = false;
|
|
51
|
+
defaultStyleListener;
|
|
52
|
+
defaultPositionListener;
|
|
53
|
+
close() {
|
|
54
|
+
this.modal.closeModal(this.modalId);
|
|
55
|
+
}
|
|
56
|
+
setDefaultStyle(modalStyle) {
|
|
57
|
+
this.defaultStyleListener?.(modalStyle);
|
|
58
|
+
}
|
|
59
|
+
setDefaultPosition(modalPosition) {
|
|
60
|
+
this.defaultPositionListener?.(modalPosition);
|
|
61
|
+
}
|
|
62
|
+
setDefaultStyleListener(listener) {
|
|
63
|
+
this.defaultStyleListener = listener;
|
|
64
|
+
}
|
|
65
|
+
setDefaultPositionListener(listener) {
|
|
66
|
+
this.defaultPositionListener = listener;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
class BSModal {
|
|
70
|
+
modalItems = reactive([]);
|
|
71
|
+
openModal(modalItem) {
|
|
72
|
+
const modalId = Math.random().toString(36);
|
|
73
|
+
const handle = new ModalHandleImpl(this, modalId);
|
|
74
|
+
const registered = {
|
|
75
|
+
modalId,
|
|
76
|
+
pageId: modalItem.pageId,
|
|
77
|
+
component: markRaw(modalItem.component),
|
|
78
|
+
style: modalItem.style,
|
|
79
|
+
position: modalItem.position,
|
|
80
|
+
bind: modalItem.bind,
|
|
81
|
+
on: modalItem.on,
|
|
82
|
+
slots: modalItem.slots,
|
|
83
|
+
modalHandle: handle
|
|
84
|
+
};
|
|
85
|
+
this.modalItems.push(registered);
|
|
86
|
+
return registered;
|
|
87
|
+
}
|
|
88
|
+
closeModal(modalItem) {
|
|
89
|
+
let index = -1;
|
|
90
|
+
if (typeof modalItem === "string") {
|
|
91
|
+
index = this.modalItems.findIndex((item) => item.modalId === modalItem);
|
|
92
|
+
} else {
|
|
93
|
+
index = this.modalItems.findIndex((item) => item === modalItem);
|
|
94
|
+
}
|
|
95
|
+
if (index >= 0) this.modalItems.splice(index, 1);
|
|
96
|
+
}
|
|
97
|
+
closeAllModals() {
|
|
98
|
+
this.modalItems.splice(0, this.modalItems.length);
|
|
99
|
+
}
|
|
100
|
+
openAlert(title, message, clickHandler) {
|
|
101
|
+
const option = {
|
|
102
|
+
component: defineAsyncComponent(() => import("./BSAlertModal-ZEIUM0ut.js")),
|
|
103
|
+
bind: {
|
|
104
|
+
title,
|
|
105
|
+
message
|
|
106
|
+
},
|
|
107
|
+
on: {
|
|
108
|
+
click: async () => await clickHandler?.()
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return this.openModal(option);
|
|
112
|
+
}
|
|
113
|
+
openYesNo(title, message, yesHandler, noHandler) {
|
|
114
|
+
const option = {
|
|
115
|
+
component: defineAsyncComponent(() => import("./BSYesNoModal-Cs6mgXcP.js")),
|
|
116
|
+
bind: {
|
|
117
|
+
title,
|
|
118
|
+
message
|
|
119
|
+
},
|
|
120
|
+
on: {
|
|
121
|
+
clickYes: async () => await yesHandler?.(),
|
|
122
|
+
clickNo: async () => await noHandler?.()
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
return this.openModal(option);
|
|
126
|
+
}
|
|
127
|
+
install(app) {
|
|
128
|
+
app.provide(modalPluginKey, this);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const useModal = () => {
|
|
132
|
+
const modal = inject(modalPluginKey);
|
|
133
|
+
if (!modal) throw new Error("BSModal is not initialized.");
|
|
134
|
+
return modal;
|
|
135
|
+
};
|
|
136
|
+
const provideModalHandle = (modalHandle) => {
|
|
137
|
+
provide(modalHandleKey, modalHandle);
|
|
138
|
+
};
|
|
139
|
+
const useModalHandle = () => {
|
|
140
|
+
const modalHandle = inject(modalHandleKey);
|
|
141
|
+
if (!modalHandle) throw new Error("ModalHandle not found. Maybe not inside modal component.");
|
|
142
|
+
return modalHandle;
|
|
143
|
+
};
|
|
144
|
+
const createModalPlugin = () => {
|
|
145
|
+
return new BSModal();
|
|
146
|
+
};
|
|
43
147
|
class BlueseaConfig {
|
|
44
148
|
dateFormat = "YYYY-MM-DD HH:mm";
|
|
45
149
|
dateFormatDay = "YYYY-MM-DD";
|
|
@@ -78,8 +182,10 @@ const BlueseaPlugin = {
|
|
|
78
182
|
install(app, options) {
|
|
79
183
|
const config = new BlueseaConfig(options);
|
|
80
184
|
app.provide(BlueseaConfigKey, config);
|
|
81
|
-
const contextMenu =
|
|
185
|
+
const contextMenu = createContextMenuPlugin();
|
|
82
186
|
app.provide(ContextMenuPluginKey, contextMenu);
|
|
187
|
+
const modal = createModalPlugin();
|
|
188
|
+
app.use(modal);
|
|
83
189
|
}
|
|
84
190
|
};
|
|
85
191
|
const notificationEntries = reactive([]);
|
|
@@ -194,14 +300,12 @@ const vTooltip = {
|
|
|
194
300
|
hideTooltip();
|
|
195
301
|
}
|
|
196
302
|
};
|
|
197
|
-
const _hoisted_1$
|
|
198
|
-
const _sfc_main$
|
|
303
|
+
const _hoisted_1$v = ["textContent"];
|
|
304
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
199
305
|
__name: "BSButton",
|
|
200
306
|
props: {
|
|
201
307
|
caption: {},
|
|
202
308
|
buttonColor: { default: "default" },
|
|
203
|
-
leftIcon: {},
|
|
204
|
-
rightIcon: {},
|
|
205
309
|
disabled: { type: Boolean, default: false },
|
|
206
310
|
linkUrl: {},
|
|
207
311
|
linkTarget: {},
|
|
@@ -209,6 +313,9 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
209
313
|
tooltip: {}
|
|
210
314
|
},
|
|
211
315
|
setup(__props) {
|
|
316
|
+
const slots = useSlots();
|
|
317
|
+
const hasLeftSlot = computed(() => !!slots.left);
|
|
318
|
+
const hasRightSlot = computed(() => !!slots.right);
|
|
212
319
|
return (_ctx, _cache) => {
|
|
213
320
|
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(__props.linkUrl ? "a" : __props.routePath ? "router-link" : "button"), {
|
|
214
321
|
class: normalizeClass([[__props.buttonColor], "bs-button position-relative"]),
|
|
@@ -218,25 +325,118 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
218
325
|
to: __props.routePath
|
|
219
326
|
}, {
|
|
220
327
|
default: withCtx(() => [
|
|
221
|
-
|
|
328
|
+
hasLeftSlot.value ? (openBlock(), createElementBlock("span", {
|
|
222
329
|
key: 0,
|
|
223
|
-
class: normalizeClass([{ "mr-1": !!__props.caption }, "
|
|
224
|
-
},
|
|
330
|
+
class: normalizeClass([{ "mr-1": !!__props.caption }, "left"])
|
|
331
|
+
}, [
|
|
332
|
+
renderSlot(_ctx.$slots, "left")
|
|
333
|
+
], 2)) : createCommentVNode("", true),
|
|
225
334
|
createElementVNode("span", {
|
|
226
335
|
textContent: toDisplayString(__props.caption)
|
|
227
|
-
}, null, 8, _hoisted_1$
|
|
228
|
-
|
|
336
|
+
}, null, 8, _hoisted_1$v),
|
|
337
|
+
hasRightSlot.value ? (openBlock(), createElementBlock("span", {
|
|
229
338
|
key: 1,
|
|
230
|
-
class: normalizeClass([{ "ml-1": !!__props.caption }, "
|
|
231
|
-
},
|
|
339
|
+
class: normalizeClass([{ "ml-1": !!__props.caption }, "right"])
|
|
340
|
+
}, [
|
|
341
|
+
renderSlot(_ctx.$slots, "right")
|
|
342
|
+
], 2)) : createCommentVNode("", true)
|
|
232
343
|
]),
|
|
233
|
-
_:
|
|
344
|
+
_: 3
|
|
234
345
|
}, 8, ["class", "disabled", "href", "target", "to"])), [
|
|
235
346
|
[unref(vTooltip), { content: __props.tooltip }]
|
|
236
347
|
]);
|
|
237
348
|
};
|
|
238
349
|
}
|
|
239
350
|
});
|
|
351
|
+
const Add = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>';
|
|
352
|
+
const CalendarMonth = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z"/></svg>';
|
|
353
|
+
const Check = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41L9 16.17z"/></svg>';
|
|
354
|
+
const CheckBox = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm-9 14l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>';
|
|
355
|
+
const CheckBoxOutlineBlank = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>';
|
|
356
|
+
const CheckCircle = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4l8-8z"/></svg>';
|
|
357
|
+
const Close = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z"/></svg>';
|
|
358
|
+
const Cancel = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10s10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm3.59-13L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41z"/></svg>';
|
|
359
|
+
const DragHandle = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 9H4v2h16V9zM4 15h16v-2H4v2z"/></svg>';
|
|
360
|
+
const Edit = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M14.06 9.02l.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83l3.75 3.75l1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"/></svg>';
|
|
361
|
+
const ExpandMore = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M16.59 8.59L12 13.17L7.41 8.59L6 10l6 6l6-6l-1.41-1.41z"/></svg>';
|
|
362
|
+
const KeyboardArrowLeft = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6l6 6l1.41-1.41z"/></svg>';
|
|
363
|
+
const KeyboardArrowRight = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12L8.59 7.41L10 6l6 6l-6 6l-1.41-1.41z"/></svg>';
|
|
364
|
+
const KeyboardDoubleArrowLeft = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M17.59 18L19 16.59L14.42 12L19 7.41L17.59 6l-6 6z"/><path d="M11 18l1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6z"/></svg>';
|
|
365
|
+
const KeyboardDoubleArrowRight = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M6.41 6L5 7.41L9.58 12L5 16.59L6.41 18l6-6z"/><path d="M13 6l-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6z"/></svg>';
|
|
366
|
+
const Label = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"/></svg>';
|
|
367
|
+
const Maximize = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M21 11V3h-8l3.29 3.29l-10 10L3 13v8h8l-3.29-3.29l10-10z"/></svg>';
|
|
368
|
+
const Minimize = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M22 3.41L16.71 8.7L20 12h-8V4l3.29 3.29L20.59 2L22 3.41zM3.41 22l5.29-5.29L12 20v-8H4l3.29 3.29L2 20.59L3.41 22z"/></svg>';
|
|
369
|
+
const North = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M5 9l1.41 1.41L11 5.83V22h2V5.83l4.59 4.59L19 9l-7-7l-7 7z"/></svg>';
|
|
370
|
+
const Numbers = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20.5 10l.5-2h-4l1-4h-2l-1 4h-4l1-4h-2L9 8H5l-.5 2h4l-1 4h-4L3 16h4l-1 4h2l1-4h4l-1 4h2l1-4h4l.5-2h-4l1-4h4zm-7 4h-4l1-4h4l-1 4z"/></svg>';
|
|
371
|
+
const ProgressActivity = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 6v3l4-4l-4-4v3c-4.42 0-8 3.58-8 8c0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8c0 3.31-2.69 6-6 6v-3l-4 4l4 4v-3c4.42 0 8-3.58 8-8c0-1.57-.46-3.03-1.24-4.26z"/></svg>';
|
|
372
|
+
const RadioButtonChecked = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5s5-2.24 5-5s-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8z"/></svg>';
|
|
373
|
+
const RadioButtonUnchecked = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8z"/></svg>';
|
|
374
|
+
const Remove = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>';
|
|
375
|
+
const Replay = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6s-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8s-3.58-8-8-8z"/></svg>';
|
|
376
|
+
const South = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 15l-1.41-1.41L13 18.17V2h-2v16.17l-4.59-4.59L5 15l7 7l7-7z"/></svg>';
|
|
377
|
+
const Straight = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M11 6.83L9.41 8.41L8 7l4-4l4 4l-1.41 1.41L13 6.83V21h-2z"/></svg>';
|
|
378
|
+
const SwapVert = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"/></svg>';
|
|
379
|
+
const iconRegistry = {
|
|
380
|
+
add: Add,
|
|
381
|
+
calendar_month: CalendarMonth,
|
|
382
|
+
check: Check,
|
|
383
|
+
check_box: CheckBox,
|
|
384
|
+
check_box_outline_blank: CheckBoxOutlineBlank,
|
|
385
|
+
check_circle: CheckCircle,
|
|
386
|
+
close: Close,
|
|
387
|
+
cancel: Cancel,
|
|
388
|
+
drag_handle: DragHandle,
|
|
389
|
+
edit: Edit,
|
|
390
|
+
expand_more: ExpandMore,
|
|
391
|
+
keyboard_arrow_left: KeyboardArrowLeft,
|
|
392
|
+
keyboard_arrow_right: KeyboardArrowRight,
|
|
393
|
+
keyboard_double_arrow_left: KeyboardDoubleArrowLeft,
|
|
394
|
+
keyboard_double_arrow_right: KeyboardDoubleArrowRight,
|
|
395
|
+
label: Label,
|
|
396
|
+
maximize: Maximize,
|
|
397
|
+
minimize: Minimize,
|
|
398
|
+
north: North,
|
|
399
|
+
numbers: Numbers,
|
|
400
|
+
progress_activity: ProgressActivity,
|
|
401
|
+
radio_button_checked: RadioButtonChecked,
|
|
402
|
+
radio_button_unchecked: RadioButtonUnchecked,
|
|
403
|
+
remove: Remove,
|
|
404
|
+
replay: Replay,
|
|
405
|
+
south: South,
|
|
406
|
+
straight: Straight,
|
|
407
|
+
swap_vert: SwapVert
|
|
408
|
+
};
|
|
409
|
+
const registerIcon = (name, svg) => {
|
|
410
|
+
iconRegistry[name] = svg;
|
|
411
|
+
};
|
|
412
|
+
const registerIcons = (icons2) => {
|
|
413
|
+
Object.entries(icons2).forEach(([name, svg]) => {
|
|
414
|
+
iconRegistry[name] = svg;
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
const getIcon = (name) => {
|
|
418
|
+
return iconRegistry[name];
|
|
419
|
+
};
|
|
420
|
+
const _hoisted_1$u = ["innerHTML"];
|
|
421
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
422
|
+
__name: "BSIcon",
|
|
423
|
+
props: {
|
|
424
|
+
name: {},
|
|
425
|
+
spin: { type: Boolean, default: false }
|
|
426
|
+
},
|
|
427
|
+
setup(__props) {
|
|
428
|
+
const props = __props;
|
|
429
|
+
const svgContent = computed(() => {
|
|
430
|
+
return getIcon(props.name) || "";
|
|
431
|
+
});
|
|
432
|
+
return (_ctx, _cache) => {
|
|
433
|
+
return openBlock(), createElementBlock("span", {
|
|
434
|
+
class: normalizeClass(["bs-icon", { spin: __props.spin }]),
|
|
435
|
+
innerHTML: svgContent.value
|
|
436
|
+
}, null, 10, _hoisted_1$u);
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
});
|
|
240
440
|
const _hoisted_1$t = { class: "page-navigation" };
|
|
241
441
|
const _hoisted_2$o = ["data-page", "onClick"];
|
|
242
442
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
@@ -301,13 +501,17 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
301
501
|
return (_ctx, _cache) => {
|
|
302
502
|
return openBlock(), createElementBlock("div", _hoisted_1$t, [
|
|
303
503
|
createElementVNode("span", {
|
|
304
|
-
class: normalizeClass([{ "disabled": isFirstSet.value }, "
|
|
504
|
+
class: normalizeClass([{ "disabled": isFirstSet.value }, "nav-icon first"]),
|
|
305
505
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => !isFirstSet.value && goToPage(1), ["prevent"]))
|
|
306
|
-
},
|
|
506
|
+
}, [
|
|
507
|
+
createVNode(_sfc_main$w, { name: "keyboard_double_arrow_left" })
|
|
508
|
+
], 2),
|
|
307
509
|
createElementVNode("span", {
|
|
308
|
-
class: normalizeClass([{ "disabled": isFirstSet.value }, "
|
|
510
|
+
class: normalizeClass([{ "disabled": isFirstSet.value }, "nav-icon prev"]),
|
|
309
511
|
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => !isFirstSet.value && goToPage(prevArrowPage.value), ["prevent"]))
|
|
310
|
-
},
|
|
512
|
+
}, [
|
|
513
|
+
createVNode(_sfc_main$w, { name: "keyboard_arrow_left" })
|
|
514
|
+
], 2),
|
|
311
515
|
(openBlock(true), createElementBlock(Fragment, null, renderList(visiblePages.value, (page) => {
|
|
312
516
|
return openBlock(), createElementBlock("span", {
|
|
313
517
|
key: page,
|
|
@@ -317,32 +521,35 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
317
521
|
}, toDisplayString(page), 11, _hoisted_2$o);
|
|
318
522
|
}), 128)),
|
|
319
523
|
createElementVNode("span", {
|
|
320
|
-
class: normalizeClass([{ "disabled": isLastSet.value }, "
|
|
524
|
+
class: normalizeClass([{ "disabled": isLastSet.value }, "nav-icon next"]),
|
|
321
525
|
onClick: _cache[2] || (_cache[2] = withModifiers(($event) => !isLastSet.value && goToPage(nextArrowPage.value), ["prevent"]))
|
|
322
|
-
},
|
|
526
|
+
}, [
|
|
527
|
+
createVNode(_sfc_main$w, { name: "keyboard_arrow_right" })
|
|
528
|
+
], 2),
|
|
323
529
|
createElementVNode("span", {
|
|
324
|
-
class: normalizeClass([{ "disabled": isLastSet.value }, "
|
|
530
|
+
class: normalizeClass([{ "disabled": isLastSet.value }, "nav-icon last"]),
|
|
325
531
|
onClick: _cache[3] || (_cache[3] = withModifiers(($event) => !isLastSet.value && goToPage(totalPage.value), ["prevent"]))
|
|
326
|
-
},
|
|
532
|
+
}, [
|
|
533
|
+
createVNode(_sfc_main$w, { name: "keyboard_double_arrow_right" })
|
|
534
|
+
], 2)
|
|
327
535
|
]);
|
|
328
536
|
};
|
|
329
537
|
}
|
|
330
538
|
});
|
|
331
|
-
const _export_sfc = (sfc, props) => {
|
|
332
|
-
const target = sfc.__vccOpts || sfc;
|
|
333
|
-
for (const [key, val] of props) {
|
|
334
|
-
target[key] = val;
|
|
335
|
-
}
|
|
336
|
-
return target;
|
|
337
|
-
};
|
|
338
|
-
const _sfc_main$u = {};
|
|
339
539
|
const _hoisted_1$s = { class: "bs-loading-icon" };
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
540
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
541
|
+
__name: "BSLoadingIcon",
|
|
542
|
+
setup(__props) {
|
|
543
|
+
return (_ctx, _cache) => {
|
|
544
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
545
|
+
createVNode(_sfc_main$w, {
|
|
546
|
+
name: "progress_activity",
|
|
547
|
+
spin: ""
|
|
548
|
+
})
|
|
549
|
+
]);
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
});
|
|
346
553
|
const waitUntil = async (condition, intervalMilliseconds = 200, maxTrial = 15) => {
|
|
347
554
|
return await new Promise((resolve) => {
|
|
348
555
|
let tried = 0;
|
|
@@ -641,8 +848,9 @@ const _hoisted_1$p = {
|
|
|
641
848
|
class: "popup-search"
|
|
642
849
|
};
|
|
643
850
|
const _hoisted_2$n = ["data-value", "onMouseover", "onClick"];
|
|
644
|
-
const _hoisted_3$
|
|
645
|
-
const _hoisted_4$
|
|
851
|
+
const _hoisted_3$g = { class: "checkbox" };
|
|
852
|
+
const _hoisted_4$c = ["textContent"];
|
|
853
|
+
const _hoisted_5$6 = ["textContent"];
|
|
646
854
|
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
647
855
|
__name: "BSSelectPopup",
|
|
648
856
|
props: {
|
|
@@ -824,16 +1032,21 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
824
1032
|
onMouseover: ($event) => setHoveredPopupItem(item?.original),
|
|
825
1033
|
onClick: withModifiers(($event) => selectPopupItem(item?.original), ["stop"])
|
|
826
1034
|
}, [
|
|
827
|
-
|
|
1035
|
+
createElementVNode("span", _hoisted_3$g, [
|
|
1036
|
+
item !== void 0 && __props.selectedItems?.includes(item?.original) ? (openBlock(), createBlock(_sfc_main$w, {
|
|
1037
|
+
key: 0,
|
|
1038
|
+
name: "check"
|
|
1039
|
+
})) : createCommentVNode("", true)
|
|
1040
|
+
]),
|
|
828
1041
|
item !== void 0 ? (openBlock(), createElementBlock("label", {
|
|
829
1042
|
key: 0,
|
|
830
1043
|
textContent: toDisplayString(item?.label),
|
|
831
1044
|
class: "label"
|
|
832
|
-
}, null, 8,
|
|
1045
|
+
}, null, 8, _hoisted_4$c)) : (openBlock(), createElementBlock("label", {
|
|
833
1046
|
key: 1,
|
|
834
1047
|
textContent: toDisplayString(__props.nullLabel),
|
|
835
1048
|
class: "label null-label"
|
|
836
|
-
}, null, 8,
|
|
1049
|
+
}, null, 8, _hoisted_5$6))
|
|
837
1050
|
], 42, _hoisted_2$n);
|
|
838
1051
|
}), 128))
|
|
839
1052
|
], 512)
|
|
@@ -1239,13 +1452,9 @@ const executeKeyProviderOrDefault = (item, keyProvider, defaultKey) => {
|
|
|
1239
1452
|
};
|
|
1240
1453
|
const _hoisted_1$n = ["tabindex", "onKeydown"];
|
|
1241
1454
|
const _hoisted_2$l = ["textContent"];
|
|
1242
|
-
const _hoisted_3$
|
|
1243
|
-
const _hoisted_4$
|
|
1455
|
+
const _hoisted_3$f = ["data-field-name"];
|
|
1456
|
+
const _hoisted_4$b = ["textContent"];
|
|
1244
1457
|
const _hoisted_5$5 = ["textContent"];
|
|
1245
|
-
const _hoisted_6$2 = {
|
|
1246
|
-
key: 2,
|
|
1247
|
-
class: "small-progress"
|
|
1248
|
-
};
|
|
1249
1458
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
1250
1459
|
__name: "BSSelect",
|
|
1251
1460
|
props: {
|
|
@@ -1393,14 +1602,22 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1393
1602
|
key: 0,
|
|
1394
1603
|
textContent: toDisplayString(__props.placeholder),
|
|
1395
1604
|
class: "placeholder grow"
|
|
1396
|
-
}, null, 8, _hoisted_4$
|
|
1605
|
+
}, null, 8, _hoisted_4$b)) : (openBlock(), createElementBlock("span", {
|
|
1397
1606
|
key: 1,
|
|
1398
1607
|
textContent: toDisplayString(selectedItemLabel.value),
|
|
1399
1608
|
class: "label"
|
|
1400
1609
|
}, null, 8, _hoisted_5$5)),
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1610
|
+
createVNode(_sfc_main$w, {
|
|
1611
|
+
name: "expand_more",
|
|
1612
|
+
class: "dropdown-btn"
|
|
1613
|
+
}),
|
|
1614
|
+
loadingItems.value ? (openBlock(), createBlock(_sfc_main$w, {
|
|
1615
|
+
key: 2,
|
|
1616
|
+
name: "progress_activity",
|
|
1617
|
+
class: "small-progress",
|
|
1618
|
+
spin: ""
|
|
1619
|
+
})) : createCommentVNode("", true)
|
|
1620
|
+
], 8, _hoisted_3$f),
|
|
1404
1621
|
!__props.disabled && showPopup.value ? (openBlock(), createBlock(_sfc_main$r, {
|
|
1405
1622
|
key: 0,
|
|
1406
1623
|
ref_key: "selectPopup",
|
|
@@ -1437,8 +1654,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1437
1654
|
});
|
|
1438
1655
|
const _hoisted_1$m = { class: "bs-calendar" };
|
|
1439
1656
|
const _hoisted_2$k = { class: "bs-calendar-head" };
|
|
1440
|
-
const _hoisted_3$
|
|
1441
|
-
const _hoisted_4$
|
|
1657
|
+
const _hoisted_3$e = { class: "year-month" };
|
|
1658
|
+
const _hoisted_4$a = {
|
|
1442
1659
|
key: 0,
|
|
1443
1660
|
class: "timezone"
|
|
1444
1661
|
};
|
|
@@ -1641,11 +1858,15 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1641
1858
|
return (_ctx, _cache) => {
|
|
1642
1859
|
return openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
1643
1860
|
createElementVNode("div", _hoisted_2$k, [
|
|
1644
|
-
createElementVNode("div", _hoisted_3$
|
|
1645
|
-
createVNode(_sfc_main$
|
|
1646
|
-
class: "",
|
|
1647
|
-
"left-icon": "chevron_left",
|
|
1861
|
+
createElementVNode("div", _hoisted_3$e, [
|
|
1862
|
+
createVNode(_sfc_main$x, {
|
|
1863
|
+
class: "min-w-[2em]",
|
|
1648
1864
|
onClick: prevMonth
|
|
1865
|
+
}, {
|
|
1866
|
+
left: withCtx(() => [
|
|
1867
|
+
createVNode(_sfc_main$w, { name: "chevron_left" })
|
|
1868
|
+
]),
|
|
1869
|
+
_: 1
|
|
1649
1870
|
}),
|
|
1650
1871
|
createVNode(_sfc_main$p, {
|
|
1651
1872
|
modelValue: year.value,
|
|
@@ -1659,13 +1880,17 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1659
1880
|
disabled: __props.disabled,
|
|
1660
1881
|
items: unref(months)
|
|
1661
1882
|
}, null, 8, ["modelValue", "disabled", "items"]),
|
|
1662
|
-
createVNode(_sfc_main$
|
|
1663
|
-
class: "",
|
|
1664
|
-
"left-icon": "chevron_right",
|
|
1883
|
+
createVNode(_sfc_main$x, {
|
|
1884
|
+
class: "min-w-[2em]",
|
|
1665
1885
|
onClick: nextMonth
|
|
1886
|
+
}, {
|
|
1887
|
+
left: withCtx(() => [
|
|
1888
|
+
createVNode(_sfc_main$w, { name: "chevron_right" })
|
|
1889
|
+
]),
|
|
1890
|
+
_: 1
|
|
1666
1891
|
})
|
|
1667
1892
|
]),
|
|
1668
|
-
__props.showTimeZone ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
1893
|
+
__props.showTimeZone ? (openBlock(), createElementBlock("div", _hoisted_4$a, "(" + toDisplayString(actualTimeZone.value) + ")", 1)) : createCommentVNode("", true)
|
|
1669
1894
|
]),
|
|
1670
1895
|
createElementVNode("table", {
|
|
1671
1896
|
class: normalizeClass([{ disabled: __props.disabled }, "align-self-center"])
|
|
@@ -1726,7 +1951,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1726
1951
|
});
|
|
1727
1952
|
const _hoisted_1$l = { class: "bs-calendar-range flex flex-row" };
|
|
1728
1953
|
const _hoisted_2$j = { class: "flex flex-col" };
|
|
1729
|
-
const _hoisted_3$
|
|
1954
|
+
const _hoisted_3$d = { class: "flex flex-row items-center" };
|
|
1730
1955
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
1731
1956
|
__name: "BSCalendarRange",
|
|
1732
1957
|
props: {
|
|
@@ -1767,7 +1992,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1767
1992
|
return (_ctx, _cache) => {
|
|
1768
1993
|
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
1769
1994
|
createElementVNode("div", _hoisted_2$j, [
|
|
1770
|
-
createElementVNode("div", _hoisted_3$
|
|
1995
|
+
createElementVNode("div", _hoisted_3$d, [
|
|
1771
1996
|
createVNode(_sfc_main$o, {
|
|
1772
1997
|
modelValue: fromValue.value,
|
|
1773
1998
|
"onUpdate:modelValue": [
|
|
@@ -1866,8 +2091,7 @@ const componentUtil = {
|
|
|
1866
2091
|
}
|
|
1867
2092
|
};
|
|
1868
2093
|
const _hoisted_1$k = ["textContent"];
|
|
1869
|
-
const _hoisted_2$i =
|
|
1870
|
-
const _hoisted_3$d = ["src", "alt"];
|
|
2094
|
+
const _hoisted_2$i = ["src", "alt"];
|
|
1871
2095
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
1872
2096
|
__name: "BSPrefixSuffix",
|
|
1873
2097
|
props: {
|
|
@@ -1884,11 +2108,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1884
2108
|
textContent: toDisplayString(item.value),
|
|
1885
2109
|
key: JSON.stringify(item.value),
|
|
1886
2110
|
class: normalizeClass(__props.type)
|
|
1887
|
-
}, null, 10, _hoisted_1$k)) : item.type === "
|
|
2111
|
+
}, null, 10, _hoisted_1$k)) : item.type === "icon" ? (openBlock(), createElementBlock("span", {
|
|
1888
2112
|
key: 1,
|
|
1889
2113
|
class: normalizeClass(__props.type)
|
|
1890
2114
|
}, [
|
|
1891
|
-
|
|
2115
|
+
createVNode(_sfc_main$w, {
|
|
2116
|
+
name: item.value
|
|
2117
|
+
}, null, 8, ["name"])
|
|
1892
2118
|
], 2)) : item.type === "image-url" ? (openBlock(), createElementBlock("span", {
|
|
1893
2119
|
key: 2,
|
|
1894
2120
|
class: normalizeClass(__props.type)
|
|
@@ -1896,7 +2122,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1896
2122
|
createElementVNode("img", {
|
|
1897
2123
|
src: item.value,
|
|
1898
2124
|
alt: __props.type
|
|
1899
|
-
}, null, 8,
|
|
2125
|
+
}, null, 8, _hoisted_2$i)
|
|
1900
2126
|
], 2)) : createCommentVNode("", true)
|
|
1901
2127
|
], 64);
|
|
1902
2128
|
}), 256);
|
|
@@ -1912,7 +2138,7 @@ const _hoisted_3$c = {
|
|
|
1912
2138
|
key: 1,
|
|
1913
2139
|
class: "input-area"
|
|
1914
2140
|
};
|
|
1915
|
-
const _hoisted_4$
|
|
2141
|
+
const _hoisted_4$9 = ["id", "placeholder", "autocomplete", "disabled", "maxlength", "name", "tabindex", "type"];
|
|
1916
2142
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
1917
2143
|
__name: "BSTextInput",
|
|
1918
2144
|
props: {
|
|
@@ -2066,7 +2292,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2066
2292
|
name: __props.name,
|
|
2067
2293
|
tabindex: __props.tabindex,
|
|
2068
2294
|
type: __props.inputType
|
|
2069
|
-
}, toHandlers(handlers, true)), null, 16, _hoisted_4$
|
|
2295
|
+
}, toHandlers(handlers, true)), null, 16, _hoisted_4$9), [
|
|
2070
2296
|
[vModelDynamic, unref(stringValue)]
|
|
2071
2297
|
]),
|
|
2072
2298
|
createVNode(_sfc_main$m, {
|
|
@@ -2365,7 +2591,7 @@ const _hoisted_3$b = {
|
|
|
2365
2591
|
key: 1,
|
|
2366
2592
|
class: "input-area"
|
|
2367
2593
|
};
|
|
2368
|
-
const _hoisted_4$
|
|
2594
|
+
const _hoisted_4$8 = ["id", "placeholder", "autocomplete", "disabled", "maxlength", "name", "tabindex", "value"];
|
|
2369
2595
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
2370
2596
|
__name: "BSNumberInput",
|
|
2371
2597
|
props: {
|
|
@@ -2527,7 +2753,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2527
2753
|
tabindex: __props.tabindex,
|
|
2528
2754
|
value: focused.value || !__props.formatOnBlur ? unref(stringValue) : formattedStringValue.value,
|
|
2529
2755
|
type: "text"
|
|
2530
|
-
}, toHandlers(handlers, true)), null, 16, _hoisted_4$
|
|
2756
|
+
}, toHandlers(handlers, true)), null, 16, _hoisted_4$8),
|
|
2531
2757
|
createVNode(_sfc_main$m, {
|
|
2532
2758
|
value: __props.suffix,
|
|
2533
2759
|
type: "suffix"
|
|
@@ -2551,7 +2777,7 @@ const _hoisted_3$a = {
|
|
|
2551
2777
|
key: 1,
|
|
2552
2778
|
class: "input-area flex flex-row items-start"
|
|
2553
2779
|
};
|
|
2554
|
-
const _hoisted_4$
|
|
2780
|
+
const _hoisted_4$7 = ["placeholder", "disabled", "maxlength", "name", "tabindex"];
|
|
2555
2781
|
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
2556
2782
|
__name: "BSTextArea",
|
|
2557
2783
|
props: {
|
|
@@ -2697,7 +2923,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2697
2923
|
class: "grow",
|
|
2698
2924
|
onPointerdown: capturePointer,
|
|
2699
2925
|
onPointerup: preserveResizedHeight
|
|
2700
|
-
}, toHandlers(handlers, true)), null, 16, _hoisted_4$
|
|
2926
|
+
}, toHandlers(handlers, true)), null, 16, _hoisted_4$7), [
|
|
2701
2927
|
[vModelText, unref(stringValue)]
|
|
2702
2928
|
]),
|
|
2703
2929
|
createVNode(_sfc_main$m, {
|
|
@@ -2715,8 +2941,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2715
2941
|
}
|
|
2716
2942
|
});
|
|
2717
2943
|
const _hoisted_1$g = ["id", "checked", "disabled", "name", "tabindex"];
|
|
2718
|
-
const _hoisted_2$e = ["
|
|
2719
|
-
const _hoisted_3$9 = ["for"];
|
|
2944
|
+
const _hoisted_2$e = ["for"];
|
|
2945
|
+
const _hoisted_3$9 = ["textContent", "for"];
|
|
2946
|
+
const _hoisted_4$6 = ["for"];
|
|
2720
2947
|
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2721
2948
|
__name: "BSCheckbox",
|
|
2722
2949
|
props: {
|
|
@@ -2774,19 +3001,27 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2774
3001
|
class: "",
|
|
2775
3002
|
type: "checkbox"
|
|
2776
3003
|
}, toHandlers(handlers, true)), null, 16, _hoisted_1$g),
|
|
3004
|
+
createElementVNode("label", {
|
|
3005
|
+
for: __props.id,
|
|
3006
|
+
class: "icon-label"
|
|
3007
|
+
}, [
|
|
3008
|
+
createVNode(_sfc_main$w, {
|
|
3009
|
+
name: checked.value ? "check_box" : "check_box_outline_blank"
|
|
3010
|
+
}, null, 8, ["name"])
|
|
3011
|
+
], 8, _hoisted_2$e),
|
|
2777
3012
|
__props.label ? (openBlock(), createElementBlock("label", {
|
|
2778
3013
|
key: 0,
|
|
2779
3014
|
textContent: toDisplayString(__props.label),
|
|
2780
3015
|
for: __props.id,
|
|
2781
3016
|
class: "text-label"
|
|
2782
|
-
}, null, 8,
|
|
3017
|
+
}, null, 8, _hoisted_3$9)) : createCommentVNode("", true),
|
|
2783
3018
|
hasLabelSlot.value ? (openBlock(), createElementBlock("label", {
|
|
2784
3019
|
key: 1,
|
|
2785
3020
|
for: __props.id,
|
|
2786
3021
|
class: "slot-label cursor-pointer"
|
|
2787
3022
|
}, [
|
|
2788
3023
|
renderSlot(_ctx.$slots, "default", { disabled: __props.disabled })
|
|
2789
|
-
], 8,
|
|
3024
|
+
], 8, _hoisted_4$6)) : createCommentVNode("", true)
|
|
2790
3025
|
], 2);
|
|
2791
3026
|
};
|
|
2792
3027
|
}
|
|
@@ -2929,10 +3164,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2929
3164
|
});
|
|
2930
3165
|
const _hoisted_1$e = ["id", "checked", "disabled", "name", "tabindex"];
|
|
2931
3166
|
const _hoisted_2$c = ["for"];
|
|
2932
|
-
const _hoisted_3$7 =
|
|
2933
|
-
key: 0,
|
|
2934
|
-
class: "font-icon"
|
|
2935
|
-
};
|
|
3167
|
+
const _hoisted_3$7 = ["for"];
|
|
2936
3168
|
const _hoisted_4$5 = ["textContent"];
|
|
2937
3169
|
const _hoisted_5$3 = ["for"];
|
|
2938
3170
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
@@ -2979,14 +3211,25 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2979
3211
|
role: "radio",
|
|
2980
3212
|
type: "radio"
|
|
2981
3213
|
}, toHandlers(handlers, true)), null, 16, _hoisted_1$e),
|
|
3214
|
+
createElementVNode("label", {
|
|
3215
|
+
for: __props.id,
|
|
3216
|
+
class: "icon-label"
|
|
3217
|
+
}, [
|
|
3218
|
+
createVNode(_sfc_main$w, {
|
|
3219
|
+
name: checked.value ? "radio_button_checked" : "radio_button_unchecked"
|
|
3220
|
+
}, null, 8, ["name"])
|
|
3221
|
+
], 8, _hoisted_2$c),
|
|
2982
3222
|
createElementVNode("label", { for: __props.id }, [
|
|
2983
|
-
__props.icon ? (openBlock(),
|
|
3223
|
+
__props.icon ? (openBlock(), createBlock(_sfc_main$w, {
|
|
3224
|
+
key: 0,
|
|
3225
|
+
name: __props.icon
|
|
3226
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
2984
3227
|
__props.label ? (openBlock(), createElementBlock("span", {
|
|
2985
3228
|
key: 1,
|
|
2986
3229
|
textContent: toDisplayString(__props.label),
|
|
2987
3230
|
class: "text-label"
|
|
2988
3231
|
}, null, 8, _hoisted_4$5)) : createCommentVNode("", true)
|
|
2989
|
-
], 8,
|
|
3232
|
+
], 8, _hoisted_3$7),
|
|
2990
3233
|
hasLabelSlot.value ? (openBlock(), createElementBlock("label", {
|
|
2991
3234
|
key: 0,
|
|
2992
3235
|
for: __props.id,
|
|
@@ -3126,10 +3369,6 @@ const _hoisted_7 = {
|
|
|
3126
3369
|
};
|
|
3127
3370
|
const _hoisted_8 = ["textContent"];
|
|
3128
3371
|
const _hoisted_9 = ["textContent"];
|
|
3129
|
-
const _hoisted_10 = {
|
|
3130
|
-
key: 2,
|
|
3131
|
-
class: "small-progress"
|
|
3132
|
-
};
|
|
3133
3372
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
3134
3373
|
__name: "BSMultiSelect",
|
|
3135
3374
|
props: {
|
|
@@ -3290,8 +3529,16 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
3290
3529
|
}, null, 8, _hoisted_9);
|
|
3291
3530
|
}), 128))
|
|
3292
3531
|
])),
|
|
3293
|
-
|
|
3294
|
-
|
|
3532
|
+
createVNode(_sfc_main$w, {
|
|
3533
|
+
name: "expand_more",
|
|
3534
|
+
class: "dropdown-btn"
|
|
3535
|
+
}),
|
|
3536
|
+
loadingItems.value ? (openBlock(), createBlock(_sfc_main$w, {
|
|
3537
|
+
key: 2,
|
|
3538
|
+
name: "progress_activity",
|
|
3539
|
+
class: "small-progress",
|
|
3540
|
+
spin: ""
|
|
3541
|
+
})) : createCommentVNode("", true)
|
|
3295
3542
|
], 8, _hoisted_5$2),
|
|
3296
3543
|
!__props.disabled && showPopup.value ? (openBlock(), createBlock(_sfc_main$r, {
|
|
3297
3544
|
key: 0,
|
|
@@ -3432,13 +3679,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3432
3679
|
"time-zone": __props.timeZone
|
|
3433
3680
|
}, null, 8, ["modelValue", "display-format", "end-year", "resolution", "start-year", "time-zone"]),
|
|
3434
3681
|
createElementVNode("div", _hoisted_2$9, [
|
|
3435
|
-
createVNode(_sfc_main$
|
|
3682
|
+
createVNode(_sfc_main$x, {
|
|
3436
3683
|
caption: __props.okButtonCaption,
|
|
3437
3684
|
"button-color": "blue",
|
|
3438
3685
|
class: "min-w-80",
|
|
3439
3686
|
onClick: emitValue
|
|
3440
3687
|
}, null, 8, ["caption"]),
|
|
3441
|
-
createVNode(_sfc_main$
|
|
3688
|
+
createVNode(_sfc_main$x, {
|
|
3442
3689
|
caption: __props.cancelButtonCaption,
|
|
3443
3690
|
class: "min-w-80",
|
|
3444
3691
|
onClick: close
|
|
@@ -3670,10 +3917,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3670
3917
|
__props.viewMode ? (openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
3671
3918
|
createElementVNode("span", null, toDisplayString(viewModeValue.value), 1)
|
|
3672
3919
|
])) : (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
3673
|
-
|
|
3674
|
-
|
|
3920
|
+
createVNode(_sfc_main$w, {
|
|
3921
|
+
name: "calendar_month",
|
|
3922
|
+
class: normalizeClass({ "bs-clickable": !__props.disabled }),
|
|
3675
3923
|
onClick: _cache[0] || (_cache[0] = ($event) => togglePopup())
|
|
3676
|
-
},
|
|
3924
|
+
}, null, 8, ["class"]),
|
|
3677
3925
|
createElementVNode("input", mergeProps({
|
|
3678
3926
|
id: __props.id,
|
|
3679
3927
|
ref_key: "field",
|
|
@@ -3770,13 +4018,13 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3770
4018
|
"time-zone": __props.timeZone
|
|
3771
4019
|
}, null, 8, ["from", "to", "disabled-from", "disabled-to", "display-format", "end-year", "resolution", "start-year", "time-zone"]),
|
|
3772
4020
|
createElementVNode("div", _hoisted_2$7, [
|
|
3773
|
-
createVNode(_sfc_main$
|
|
4021
|
+
createVNode(_sfc_main$x, {
|
|
3774
4022
|
caption: __props.okButtonCaption,
|
|
3775
4023
|
"button-color": "blue",
|
|
3776
4024
|
class: "min-w-80",
|
|
3777
4025
|
onClick: emitValue
|
|
3778
4026
|
}, null, 8, ["caption"]),
|
|
3779
|
-
createVNode(_sfc_main$
|
|
4027
|
+
createVNode(_sfc_main$x, {
|
|
3780
4028
|
caption: __props.cancelButtonCaption,
|
|
3781
4029
|
class: "min-w-80",
|
|
3782
4030
|
onClick: close
|
|
@@ -4180,10 +4428,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4180
4428
|
__props.viewMode ? (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
4181
4429
|
createElementVNode("span", null, toDisplayString(formattedDateRange.value), 1)
|
|
4182
4430
|
])) : (openBlock(), createElementBlock("div", _hoisted_2$6, [
|
|
4183
|
-
|
|
4184
|
-
|
|
4431
|
+
createVNode(_sfc_main$w, {
|
|
4432
|
+
name: "calendar_month",
|
|
4433
|
+
class: normalizeClass({ "bs-clickable": !disabled.value }),
|
|
4185
4434
|
onClick: _cache[0] || (_cache[0] = () => togglePopup())
|
|
4186
|
-
},
|
|
4435
|
+
}, null, 8, ["class"]),
|
|
4187
4436
|
createElementVNode("input", mergeProps({
|
|
4188
4437
|
id: __props.idFrom,
|
|
4189
4438
|
ref_key: "fieldFrom",
|
|
@@ -4323,10 +4572,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
4323
4572
|
class: normalizeClass([{ expanded: expanded.value }, "bs-card-layout"])
|
|
4324
4573
|
}, [
|
|
4325
4574
|
!__props.hideTitle ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
4326
|
-
|
|
4327
|
-
|
|
4575
|
+
createVNode(_sfc_main$w, {
|
|
4576
|
+
name: "label",
|
|
4577
|
+
class: "expand-btn bs-clickable",
|
|
4328
4578
|
onClick: toggleExpand
|
|
4329
|
-
}
|
|
4579
|
+
}),
|
|
4330
4580
|
createElementVNode("div", {
|
|
4331
4581
|
textContent: toDisplayString(__props.title),
|
|
4332
4582
|
class: "card-layout-title"
|
|
@@ -4352,110 +4602,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
4352
4602
|
};
|
|
4353
4603
|
}
|
|
4354
4604
|
});
|
|
4355
|
-
const modalPluginKey = "BlueseaModalPlugin";
|
|
4356
|
-
const modalHandleKey = "BlueseaModalHandle";
|
|
4357
|
-
class ModalHandleImpl {
|
|
4358
|
-
constructor(modal, modalId) {
|
|
4359
|
-
this.modal = modal;
|
|
4360
|
-
this.modalId = modalId;
|
|
4361
|
-
}
|
|
4362
|
-
maximized = false;
|
|
4363
|
-
defaultStyleListener;
|
|
4364
|
-
defaultPositionListener;
|
|
4365
|
-
close() {
|
|
4366
|
-
this.modal.closeModal(this.modalId);
|
|
4367
|
-
}
|
|
4368
|
-
setDefaultStyle(modalStyle) {
|
|
4369
|
-
this.defaultStyleListener?.(modalStyle);
|
|
4370
|
-
}
|
|
4371
|
-
setDefaultPosition(modalPosition) {
|
|
4372
|
-
this.defaultPositionListener?.(modalPosition);
|
|
4373
|
-
}
|
|
4374
|
-
setDefaultStyleListener(listener) {
|
|
4375
|
-
this.defaultStyleListener = listener;
|
|
4376
|
-
}
|
|
4377
|
-
setDefaultPositionListener(listener) {
|
|
4378
|
-
this.defaultPositionListener = listener;
|
|
4379
|
-
}
|
|
4380
|
-
}
|
|
4381
|
-
class BSModal {
|
|
4382
|
-
modalItems = reactive([]);
|
|
4383
|
-
openModal(modalItem) {
|
|
4384
|
-
const modalId = Math.random().toString(36);
|
|
4385
|
-
const handle = new ModalHandleImpl(this, modalId);
|
|
4386
|
-
const registered = {
|
|
4387
|
-
modalId,
|
|
4388
|
-
pageId: modalItem.pageId,
|
|
4389
|
-
component: markRaw(modalItem.component),
|
|
4390
|
-
style: modalItem.style,
|
|
4391
|
-
position: modalItem.position,
|
|
4392
|
-
bind: modalItem.bind,
|
|
4393
|
-
on: modalItem.on,
|
|
4394
|
-
slots: modalItem.slots,
|
|
4395
|
-
modalHandle: handle
|
|
4396
|
-
};
|
|
4397
|
-
this.modalItems.push(registered);
|
|
4398
|
-
return registered;
|
|
4399
|
-
}
|
|
4400
|
-
closeModal(modalItem) {
|
|
4401
|
-
let index = -1;
|
|
4402
|
-
if (typeof modalItem === "string") {
|
|
4403
|
-
index = this.modalItems.findIndex((item) => item.modalId === modalItem);
|
|
4404
|
-
} else {
|
|
4405
|
-
index = this.modalItems.findIndex((item) => item === modalItem);
|
|
4406
|
-
}
|
|
4407
|
-
if (index >= 0) this.modalItems.splice(index, 1);
|
|
4408
|
-
}
|
|
4409
|
-
closeAllModals() {
|
|
4410
|
-
this.modalItems.splice(0, this.modalItems.length);
|
|
4411
|
-
}
|
|
4412
|
-
openAlert(title, message, clickHandler) {
|
|
4413
|
-
const option = {
|
|
4414
|
-
component: defineAsyncComponent(() => import("./BSAlertModal-ZEIUM0ut.js")),
|
|
4415
|
-
bind: {
|
|
4416
|
-
title,
|
|
4417
|
-
message
|
|
4418
|
-
},
|
|
4419
|
-
on: {
|
|
4420
|
-
click: async () => await clickHandler?.()
|
|
4421
|
-
}
|
|
4422
|
-
};
|
|
4423
|
-
return this.openModal(option);
|
|
4424
|
-
}
|
|
4425
|
-
openYesNo(title, message, yesHandler, noHandler) {
|
|
4426
|
-
const option = {
|
|
4427
|
-
component: defineAsyncComponent(() => import("./BSYesNoModal-Cs6mgXcP.js")),
|
|
4428
|
-
bind: {
|
|
4429
|
-
title,
|
|
4430
|
-
message
|
|
4431
|
-
},
|
|
4432
|
-
on: {
|
|
4433
|
-
clickYes: async () => await yesHandler?.(),
|
|
4434
|
-
clickNo: async () => await noHandler?.()
|
|
4435
|
-
}
|
|
4436
|
-
};
|
|
4437
|
-
return this.openModal(option);
|
|
4438
|
-
}
|
|
4439
|
-
install(app) {
|
|
4440
|
-
app.provide(modalPluginKey, this);
|
|
4441
|
-
}
|
|
4442
|
-
}
|
|
4443
|
-
const useModal = () => {
|
|
4444
|
-
const modal = inject(modalPluginKey);
|
|
4445
|
-
if (!modal) throw new Error("BSModal is not initialized.");
|
|
4446
|
-
return modal;
|
|
4447
|
-
};
|
|
4448
|
-
const provideModalHandle = (modalHandle) => {
|
|
4449
|
-
provide(modalHandleKey, modalHandle);
|
|
4450
|
-
};
|
|
4451
|
-
const useModalHandle = () => {
|
|
4452
|
-
const modalHandle = inject(modalHandleKey);
|
|
4453
|
-
if (!modalHandle) throw new Error("ModalHandle not found. Maybe not inside modal component.");
|
|
4454
|
-
return modalHandle;
|
|
4455
|
-
};
|
|
4456
|
-
const createModalPlugin = () => {
|
|
4457
|
-
return new BSModal();
|
|
4458
|
-
};
|
|
4459
4605
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
4460
4606
|
__name: "BSModalWrapper",
|
|
4461
4607
|
props: {
|
|
@@ -4939,20 +5085,30 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4939
5085
|
renderSlot(_ctx.$slots, "title-buttons")
|
|
4940
5086
|
]),
|
|
4941
5087
|
createElementVNode("div", null, [
|
|
4942
|
-
!__props.hideMaximizeButton ? (openBlock(), createBlock(_sfc_main$
|
|
5088
|
+
!__props.hideMaximizeButton ? (openBlock(), createBlock(_sfc_main$x, {
|
|
4943
5089
|
key: 0,
|
|
4944
|
-
"left-icon": unref(modalHandle).maximized ? "minimize" : "maximize",
|
|
4945
5090
|
title: unref(modalHandle).maximized ? "Restore" : "Maximize",
|
|
4946
5091
|
class: "border-0 maximize-btn",
|
|
4947
5092
|
onClick: toggleMaximize
|
|
4948
|
-
},
|
|
4949
|
-
|
|
5093
|
+
}, {
|
|
5094
|
+
left: withCtx(() => [
|
|
5095
|
+
createVNode(_sfc_main$w, {
|
|
5096
|
+
name: unref(modalHandle).maximized ? "minimize" : "maximize"
|
|
5097
|
+
}, null, 8, ["name"])
|
|
5098
|
+
]),
|
|
5099
|
+
_: 1
|
|
5100
|
+
}, 8, ["title"])) : createCommentVNode("", true),
|
|
5101
|
+
!__props.hideCloseButton ? (openBlock(), createBlock(_sfc_main$x, {
|
|
4950
5102
|
key: 1,
|
|
4951
5103
|
title: __props.closeCaption,
|
|
4952
5104
|
class: "border-0 close-btn",
|
|
4953
|
-
"left-icon": "close",
|
|
4954
5105
|
onClick: closeModal
|
|
4955
|
-
},
|
|
5106
|
+
}, {
|
|
5107
|
+
left: withCtx(() => [
|
|
5108
|
+
createVNode(_sfc_main$w, { name: "close" })
|
|
5109
|
+
]),
|
|
5110
|
+
_: 1
|
|
5111
|
+
}, 8, ["title"])) : createCommentVNode("", true)
|
|
4956
5112
|
])
|
|
4957
5113
|
])) : createCommentVNode("", true),
|
|
4958
5114
|
createElementVNode("div", {
|
|
@@ -5004,7 +5160,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
5004
5160
|
}, {
|
|
5005
5161
|
buttons: withCtx(() => [
|
|
5006
5162
|
createElementVNode("div", _hoisted_2$3, [
|
|
5007
|
-
withDirectives(createVNode(_sfc_main$
|
|
5163
|
+
withDirectives(createVNode(_sfc_main$x, {
|
|
5008
5164
|
caption: __props.okCaption,
|
|
5009
5165
|
"button-color": "blue",
|
|
5010
5166
|
class: "min-w-80",
|
|
@@ -5055,13 +5211,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5055
5211
|
return openBlock(), createBlock(_sfc_main$5, { title: __props.title }, {
|
|
5056
5212
|
buttons: withCtx(() => [
|
|
5057
5213
|
createElementVNode("div", _hoisted_2$2, [
|
|
5058
|
-
createVNode(_sfc_main$
|
|
5214
|
+
createVNode(_sfc_main$x, {
|
|
5059
5215
|
caption: __props.noCaption,
|
|
5060
5216
|
class: "min-w-80",
|
|
5061
5217
|
"data-id": "noBtn",
|
|
5062
5218
|
onClick: clickNo
|
|
5063
5219
|
}, null, 8, ["caption"]),
|
|
5064
|
-
createVNode(_sfc_main$
|
|
5220
|
+
createVNode(_sfc_main$x, {
|
|
5065
5221
|
caption: __props.yesCaption,
|
|
5066
5222
|
"button-color": "blue",
|
|
5067
5223
|
class: "ml-8 min-w-80",
|
|
@@ -5103,9 +5259,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5103
5259
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(notificationEntries), (entry) => {
|
|
5104
5260
|
return openBlock(), createElementBlock("div", {
|
|
5105
5261
|
key: entry.entryId,
|
|
5106
|
-
textContent: toDisplayString(entry.message),
|
|
5107
5262
|
class: normalizeClass(entry.style)
|
|
5108
|
-
},
|
|
5263
|
+
}, [
|
|
5264
|
+
createVNode(_sfc_main$w, {
|
|
5265
|
+
name: entry.style === "error" ? "cancel" : "check_circle",
|
|
5266
|
+
class: "notification-icon"
|
|
5267
|
+
}, null, 8, ["name"]),
|
|
5268
|
+
createElementVNode("span", {
|
|
5269
|
+
textContent: toDisplayString(entry.message)
|
|
5270
|
+
}, null, 8, _hoisted_3$1)
|
|
5271
|
+
], 2);
|
|
5109
5272
|
}), 128))
|
|
5110
5273
|
]),
|
|
5111
5274
|
_: 1
|
|
@@ -5136,7 +5299,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5136
5299
|
onMouseover: _cache[1] || (_cache[1] = ($event) => setCursorInTooltip(true, $event))
|
|
5137
5300
|
}, null, 8, ["content", "target"])) : createCommentVNode("", true)
|
|
5138
5301
|
]),
|
|
5139
|
-
unref(showLoadingIcon) ? (openBlock(), createBlock(
|
|
5302
|
+
unref(showLoadingIcon) ? (openBlock(), createBlock(_sfc_main$u, { key: 0 })) : createCommentVNode("", true)
|
|
5140
5303
|
]);
|
|
5141
5304
|
};
|
|
5142
5305
|
}
|
|
@@ -5296,7 +5459,7 @@ class IllegalAccessError {
|
|
|
5296
5459
|
}
|
|
5297
5460
|
export {
|
|
5298
5461
|
_sfc_main$4 as BSAlertModal,
|
|
5299
|
-
_sfc_main$
|
|
5462
|
+
_sfc_main$x as BSButton,
|
|
5300
5463
|
_sfc_main$o as BSCalendar,
|
|
5301
5464
|
_sfc_main$n as BSCalendarRange,
|
|
5302
5465
|
_sfc_main$8 as BSCardLayout,
|
|
@@ -5309,7 +5472,8 @@ export {
|
|
|
5309
5472
|
_sfc_main$d as BSDateInputPopup,
|
|
5310
5473
|
_sfc_main$a as BSDateRange,
|
|
5311
5474
|
_sfc_main$b as BSDateRangeInputPopup,
|
|
5312
|
-
|
|
5475
|
+
_sfc_main$w as BSIcon,
|
|
5476
|
+
_sfc_main$u as BSLoadingIcon,
|
|
5313
5477
|
BSModal,
|
|
5314
5478
|
_sfc_main$6 as BSModalContainer,
|
|
5315
5479
|
_sfc_main$5 as BSModalFrame,
|
|
@@ -5351,6 +5515,7 @@ export {
|
|
|
5351
5515
|
focusLastElement,
|
|
5352
5516
|
formatUtil,
|
|
5353
5517
|
getComponentRootElement,
|
|
5518
|
+
getIcon,
|
|
5354
5519
|
getSelfIndex,
|
|
5355
5520
|
hideLoading,
|
|
5356
5521
|
hideTooltip,
|
|
@@ -5362,6 +5527,8 @@ export {
|
|
|
5362
5527
|
provideFieldContext,
|
|
5363
5528
|
provideModalHandle,
|
|
5364
5529
|
provideSavePoint,
|
|
5530
|
+
registerIcon,
|
|
5531
|
+
registerIcons,
|
|
5365
5532
|
showAlarm,
|
|
5366
5533
|
showLoading,
|
|
5367
5534
|
showLoadingIcon,
|