@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.
@@ -42,6 +42,110 @@
42
42
  const createContextMenuPlugin = () => {
43
43
  return new BSContextMenuPlugin();
44
44
  };
45
+ const modalPluginKey = "BlueseaModalPlugin";
46
+ const modalHandleKey = "BlueseaModalHandle";
47
+ class ModalHandleImpl {
48
+ constructor(modal, modalId) {
49
+ this.modal = modal;
50
+ this.modalId = modalId;
51
+ }
52
+ maximized = false;
53
+ defaultStyleListener;
54
+ defaultPositionListener;
55
+ close() {
56
+ this.modal.closeModal(this.modalId);
57
+ }
58
+ setDefaultStyle(modalStyle) {
59
+ this.defaultStyleListener?.(modalStyle);
60
+ }
61
+ setDefaultPosition(modalPosition) {
62
+ this.defaultPositionListener?.(modalPosition);
63
+ }
64
+ setDefaultStyleListener(listener) {
65
+ this.defaultStyleListener = listener;
66
+ }
67
+ setDefaultPositionListener(listener) {
68
+ this.defaultPositionListener = listener;
69
+ }
70
+ }
71
+ class BSModal {
72
+ modalItems = vue.reactive([]);
73
+ openModal(modalItem) {
74
+ const modalId = Math.random().toString(36);
75
+ const handle = new ModalHandleImpl(this, modalId);
76
+ const registered = {
77
+ modalId,
78
+ pageId: modalItem.pageId,
79
+ component: vue.markRaw(modalItem.component),
80
+ style: modalItem.style,
81
+ position: modalItem.position,
82
+ bind: modalItem.bind,
83
+ on: modalItem.on,
84
+ slots: modalItem.slots,
85
+ modalHandle: handle
86
+ };
87
+ this.modalItems.push(registered);
88
+ return registered;
89
+ }
90
+ closeModal(modalItem) {
91
+ let index = -1;
92
+ if (typeof modalItem === "string") {
93
+ index = this.modalItems.findIndex((item) => item.modalId === modalItem);
94
+ } else {
95
+ index = this.modalItems.findIndex((item) => item === modalItem);
96
+ }
97
+ if (index >= 0) this.modalItems.splice(index, 1);
98
+ }
99
+ closeAllModals() {
100
+ this.modalItems.splice(0, this.modalItems.length);
101
+ }
102
+ openAlert(title, message, clickHandler) {
103
+ const option = {
104
+ component: vue.defineAsyncComponent(() => Promise.resolve().then(() => BSAlertModal)),
105
+ bind: {
106
+ title,
107
+ message
108
+ },
109
+ on: {
110
+ click: async () => await clickHandler?.()
111
+ }
112
+ };
113
+ return this.openModal(option);
114
+ }
115
+ openYesNo(title, message, yesHandler, noHandler) {
116
+ const option = {
117
+ component: vue.defineAsyncComponent(() => Promise.resolve().then(() => BSYesNoModal)),
118
+ bind: {
119
+ title,
120
+ message
121
+ },
122
+ on: {
123
+ clickYes: async () => await yesHandler?.(),
124
+ clickNo: async () => await noHandler?.()
125
+ }
126
+ };
127
+ return this.openModal(option);
128
+ }
129
+ install(app) {
130
+ app.provide(modalPluginKey, this);
131
+ }
132
+ }
133
+ const useModal = () => {
134
+ const modal = vue.inject(modalPluginKey);
135
+ if (!modal) throw new Error("BSModal is not initialized.");
136
+ return modal;
137
+ };
138
+ const provideModalHandle = (modalHandle) => {
139
+ vue.provide(modalHandleKey, modalHandle);
140
+ };
141
+ const useModalHandle = () => {
142
+ const modalHandle = vue.inject(modalHandleKey);
143
+ if (!modalHandle) throw new Error("ModalHandle not found. Maybe not inside modal component.");
144
+ return modalHandle;
145
+ };
146
+ const createModalPlugin = () => {
147
+ return new BSModal();
148
+ };
45
149
  class BlueseaConfig {
46
150
  dateFormat = "YYYY-MM-DD HH:mm";
47
151
  dateFormatDay = "YYYY-MM-DD";
@@ -80,8 +184,10 @@
80
184
  install(app, options) {
81
185
  const config = new BlueseaConfig(options);
82
186
  app.provide(BlueseaConfigKey, config);
83
- const contextMenu = new BSContextMenuPlugin();
187
+ const contextMenu = createContextMenuPlugin();
84
188
  app.provide(ContextMenuPluginKey, contextMenu);
189
+ const modal = createModalPlugin();
190
+ app.use(modal);
85
191
  }
86
192
  };
87
193
  const notificationEntries = vue.reactive([]);
@@ -196,14 +302,12 @@
196
302
  hideTooltip();
197
303
  }
198
304
  };
199
- const _hoisted_1$u = ["textContent"];
200
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
305
+ const _hoisted_1$v = ["textContent"];
306
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
201
307
  __name: "BSButton",
202
308
  props: {
203
309
  caption: {},
204
310
  buttonColor: { default: "default" },
205
- leftIcon: {},
206
- rightIcon: {},
207
311
  disabled: { type: Boolean, default: false },
208
312
  linkUrl: {},
209
313
  linkTarget: {},
@@ -211,6 +315,9 @@
211
315
  tooltip: {}
212
316
  },
213
317
  setup(__props) {
318
+ const slots = vue.useSlots();
319
+ const hasLeftSlot = vue.computed(() => !!slots.left);
320
+ const hasRightSlot = vue.computed(() => !!slots.right);
214
321
  return (_ctx, _cache) => {
215
322
  return vue.withDirectives((vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.linkUrl ? "a" : __props.routePath ? "router-link" : "button"), {
216
323
  class: vue.normalizeClass([[__props.buttonColor], "bs-button position-relative"]),
@@ -220,25 +327,118 @@
220
327
  to: __props.routePath
221
328
  }, {
222
329
  default: vue.withCtx(() => [
223
- __props.leftIcon ? (vue.openBlock(), vue.createElementBlock("span", {
330
+ hasLeftSlot.value ? (vue.openBlock(), vue.createElementBlock("span", {
224
331
  key: 0,
225
- class: vue.normalizeClass([{ "mr-1": !!__props.caption }, "font-icon left"])
226
- }, vue.toDisplayString(__props.leftIcon), 3)) : vue.createCommentVNode("", true),
332
+ class: vue.normalizeClass([{ "mr-1": !!__props.caption }, "left"])
333
+ }, [
334
+ vue.renderSlot(_ctx.$slots, "left")
335
+ ], 2)) : vue.createCommentVNode("", true),
227
336
  vue.createElementVNode("span", {
228
337
  textContent: vue.toDisplayString(__props.caption)
229
- }, null, 8, _hoisted_1$u),
230
- __props.rightIcon ? (vue.openBlock(), vue.createElementBlock("span", {
338
+ }, null, 8, _hoisted_1$v),
339
+ hasRightSlot.value ? (vue.openBlock(), vue.createElementBlock("span", {
231
340
  key: 1,
232
- class: vue.normalizeClass([{ "ml-1": !!__props.caption }, "font-icon right"])
233
- }, vue.toDisplayString(__props.rightIcon), 3)) : vue.createCommentVNode("", true)
341
+ class: vue.normalizeClass([{ "ml-1": !!__props.caption }, "right"])
342
+ }, [
343
+ vue.renderSlot(_ctx.$slots, "right")
344
+ ], 2)) : vue.createCommentVNode("", true)
234
345
  ]),
235
- _: 1
346
+ _: 3
236
347
  }, 8, ["class", "disabled", "href", "target", "to"])), [
237
348
  [vue.unref(vTooltip), { content: __props.tooltip }]
238
349
  ]);
239
350
  };
240
351
  }
241
352
  });
353
+ 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>';
354
+ 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>';
355
+ 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>';
356
+ 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>';
357
+ 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>';
358
+ 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>';
359
+ 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>';
360
+ 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>';
361
+ 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>';
362
+ 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>';
363
+ 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>';
364
+ 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>';
365
+ 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>';
366
+ 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>';
367
+ 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>';
368
+ 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>';
369
+ 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>';
370
+ 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>';
371
+ 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>';
372
+ 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>';
373
+ 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>';
374
+ 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>';
375
+ 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>';
376
+ 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>';
377
+ 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>';
378
+ 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>';
379
+ 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>';
380
+ 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>';
381
+ const iconRegistry = {
382
+ add: Add,
383
+ calendar_month: CalendarMonth,
384
+ check: Check,
385
+ check_box: CheckBox,
386
+ check_box_outline_blank: CheckBoxOutlineBlank,
387
+ check_circle: CheckCircle,
388
+ close: Close,
389
+ cancel: Cancel,
390
+ drag_handle: DragHandle,
391
+ edit: Edit,
392
+ expand_more: ExpandMore,
393
+ keyboard_arrow_left: KeyboardArrowLeft,
394
+ keyboard_arrow_right: KeyboardArrowRight,
395
+ keyboard_double_arrow_left: KeyboardDoubleArrowLeft,
396
+ keyboard_double_arrow_right: KeyboardDoubleArrowRight,
397
+ label: Label,
398
+ maximize: Maximize,
399
+ minimize: Minimize,
400
+ north: North,
401
+ numbers: Numbers,
402
+ progress_activity: ProgressActivity,
403
+ radio_button_checked: RadioButtonChecked,
404
+ radio_button_unchecked: RadioButtonUnchecked,
405
+ remove: Remove,
406
+ replay: Replay,
407
+ south: South,
408
+ straight: Straight,
409
+ swap_vert: SwapVert
410
+ };
411
+ const registerIcon = (name, svg) => {
412
+ iconRegistry[name] = svg;
413
+ };
414
+ const registerIcons = (icons2) => {
415
+ Object.entries(icons2).forEach(([name, svg]) => {
416
+ iconRegistry[name] = svg;
417
+ });
418
+ };
419
+ const getIcon = (name) => {
420
+ return iconRegistry[name];
421
+ };
422
+ const _hoisted_1$u = ["innerHTML"];
423
+ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
424
+ __name: "BSIcon",
425
+ props: {
426
+ name: {},
427
+ spin: { type: Boolean, default: false }
428
+ },
429
+ setup(__props) {
430
+ const props = __props;
431
+ const svgContent = vue.computed(() => {
432
+ return getIcon(props.name) || "";
433
+ });
434
+ return (_ctx, _cache) => {
435
+ return vue.openBlock(), vue.createElementBlock("span", {
436
+ class: vue.normalizeClass(["bs-icon", { spin: __props.spin }]),
437
+ innerHTML: svgContent.value
438
+ }, null, 10, _hoisted_1$u);
439
+ };
440
+ }
441
+ });
242
442
  const _hoisted_1$t = { class: "page-navigation" };
243
443
  const _hoisted_2$o = ["data-page", "onClick"];
244
444
  const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
@@ -303,13 +503,17 @@
303
503
  return (_ctx, _cache) => {
304
504
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$t, [
305
505
  vue.createElementVNode("span", {
306
- class: vue.normalizeClass([{ "disabled": isFirstSet.value }, "font-icon first"]),
506
+ class: vue.normalizeClass([{ "disabled": isFirstSet.value }, "nav-icon first"]),
307
507
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => !isFirstSet.value && goToPage(1), ["prevent"]))
308
- }, "keyboard_double_arrow_left", 2),
508
+ }, [
509
+ vue.createVNode(_sfc_main$w, { name: "keyboard_double_arrow_left" })
510
+ ], 2),
309
511
  vue.createElementVNode("span", {
310
- class: vue.normalizeClass([{ "disabled": isFirstSet.value }, "font-icon prev"]),
512
+ class: vue.normalizeClass([{ "disabled": isFirstSet.value }, "nav-icon prev"]),
311
513
  onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => !isFirstSet.value && goToPage(prevArrowPage.value), ["prevent"]))
312
- }, "keyboard_arrow_left", 2),
514
+ }, [
515
+ vue.createVNode(_sfc_main$w, { name: "keyboard_arrow_left" })
516
+ ], 2),
313
517
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(visiblePages.value, (page) => {
314
518
  return vue.openBlock(), vue.createElementBlock("span", {
315
519
  key: page,
@@ -319,32 +523,35 @@
319
523
  }, vue.toDisplayString(page), 11, _hoisted_2$o);
320
524
  }), 128)),
321
525
  vue.createElementVNode("span", {
322
- class: vue.normalizeClass([{ "disabled": isLastSet.value }, "font-icon next"]),
526
+ class: vue.normalizeClass([{ "disabled": isLastSet.value }, "nav-icon next"]),
323
527
  onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => !isLastSet.value && goToPage(nextArrowPage.value), ["prevent"]))
324
- }, "keyboard_arrow_right", 2),
528
+ }, [
529
+ vue.createVNode(_sfc_main$w, { name: "keyboard_arrow_right" })
530
+ ], 2),
325
531
  vue.createElementVNode("span", {
326
- class: vue.normalizeClass([{ "disabled": isLastSet.value }, "font-icon last"]),
532
+ class: vue.normalizeClass([{ "disabled": isLastSet.value }, "nav-icon last"]),
327
533
  onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => !isLastSet.value && goToPage(totalPage.value), ["prevent"]))
328
- }, "keyboard_double_arrow_right", 2)
534
+ }, [
535
+ vue.createVNode(_sfc_main$w, { name: "keyboard_double_arrow_right" })
536
+ ], 2)
329
537
  ]);
330
538
  };
331
539
  }
332
540
  });
333
- const _export_sfc = (sfc, props) => {
334
- const target = sfc.__vccOpts || sfc;
335
- for (const [key, val] of props) {
336
- target[key] = val;
337
- }
338
- return target;
339
- };
340
- const _sfc_main$u = {};
341
541
  const _hoisted_1$s = { class: "bs-loading-icon" };
342
- function _sfc_render(_ctx, _cache) {
343
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [..._cache[0] || (_cache[0] = [
344
- vue.createElementVNode("span", { class: "font-icon" }, "progress_activity", -1)
345
- ])]);
346
- }
347
- const BSLoadingIcon = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render]]);
542
+ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
543
+ __name: "BSLoadingIcon",
544
+ setup(__props) {
545
+ return (_ctx, _cache) => {
546
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
547
+ vue.createVNode(_sfc_main$w, {
548
+ name: "progress_activity",
549
+ spin: ""
550
+ })
551
+ ]);
552
+ };
553
+ }
554
+ });
348
555
  const waitUntil = async (condition, intervalMilliseconds = 200, maxTrial = 15) => {
349
556
  return await new Promise((resolve) => {
350
557
  let tried = 0;
@@ -643,8 +850,9 @@
643
850
  class: "popup-search"
644
851
  };
645
852
  const _hoisted_2$n = ["data-value", "onMouseover", "onClick"];
646
- const _hoisted_3$h = ["textContent"];
647
- const _hoisted_4$b = ["textContent"];
853
+ const _hoisted_3$g = { class: "checkbox" };
854
+ const _hoisted_4$c = ["textContent"];
855
+ const _hoisted_5$6 = ["textContent"];
648
856
  const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
649
857
  __name: "BSSelectPopup",
650
858
  props: {
@@ -826,16 +1034,21 @@
826
1034
  onMouseover: ($event) => setHoveredPopupItem(item?.original),
827
1035
  onClick: vue.withModifiers(($event) => selectPopupItem(item?.original), ["stop"])
828
1036
  }, [
829
- _cache[3] || (_cache[3] = vue.createElementVNode("span", { class: "checkbox" }, null, -1)),
1037
+ vue.createElementVNode("span", _hoisted_3$g, [
1038
+ item !== void 0 && __props.selectedItems?.includes(item?.original) ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
1039
+ key: 0,
1040
+ name: "check"
1041
+ })) : vue.createCommentVNode("", true)
1042
+ ]),
830
1043
  item !== void 0 ? (vue.openBlock(), vue.createElementBlock("label", {
831
1044
  key: 0,
832
1045
  textContent: vue.toDisplayString(item?.label),
833
1046
  class: "label"
834
- }, null, 8, _hoisted_3$h)) : (vue.openBlock(), vue.createElementBlock("label", {
1047
+ }, null, 8, _hoisted_4$c)) : (vue.openBlock(), vue.createElementBlock("label", {
835
1048
  key: 1,
836
1049
  textContent: vue.toDisplayString(__props.nullLabel),
837
1050
  class: "label null-label"
838
- }, null, 8, _hoisted_4$b))
1051
+ }, null, 8, _hoisted_5$6))
839
1052
  ], 42, _hoisted_2$n);
840
1053
  }), 128))
841
1054
  ], 512)
@@ -1241,13 +1454,9 @@
1241
1454
  };
1242
1455
  const _hoisted_1$n = ["tabindex", "onKeydown"];
1243
1456
  const _hoisted_2$l = ["textContent"];
1244
- const _hoisted_3$g = ["data-field-name"];
1245
- const _hoisted_4$a = ["textContent"];
1457
+ const _hoisted_3$f = ["data-field-name"];
1458
+ const _hoisted_4$b = ["textContent"];
1246
1459
  const _hoisted_5$5 = ["textContent"];
1247
- const _hoisted_6$2 = {
1248
- key: 2,
1249
- class: "small-progress"
1250
- };
1251
1460
  const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
1252
1461
  __name: "BSSelect",
1253
1462
  props: {
@@ -1395,14 +1604,22 @@
1395
1604
  key: 0,
1396
1605
  textContent: vue.toDisplayString(__props.placeholder),
1397
1606
  class: "placeholder grow"
1398
- }, null, 8, _hoisted_4$a)) : (vue.openBlock(), vue.createElementBlock("span", {
1607
+ }, null, 8, _hoisted_4$b)) : (vue.openBlock(), vue.createElementBlock("span", {
1399
1608
  key: 1,
1400
1609
  textContent: vue.toDisplayString(selectedItemLabel.value),
1401
1610
  class: "label"
1402
1611
  }, null, 8, _hoisted_5$5)),
1403
- _cache[4] || (_cache[4] = vue.createElementVNode("span", { class: "dropdown-btn" }, "expand_more", -1)),
1404
- loadingItems.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$2, "progress_activity")) : vue.createCommentVNode("", true)
1405
- ], 8, _hoisted_3$g),
1612
+ vue.createVNode(_sfc_main$w, {
1613
+ name: "expand_more",
1614
+ class: "dropdown-btn"
1615
+ }),
1616
+ loadingItems.value ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
1617
+ key: 2,
1618
+ name: "progress_activity",
1619
+ class: "small-progress",
1620
+ spin: ""
1621
+ })) : vue.createCommentVNode("", true)
1622
+ ], 8, _hoisted_3$f),
1406
1623
  !__props.disabled && showPopup.value ? (vue.openBlock(), vue.createBlock(_sfc_main$r, {
1407
1624
  key: 0,
1408
1625
  ref_key: "selectPopup",
@@ -1439,8 +1656,8 @@
1439
1656
  });
1440
1657
  const _hoisted_1$m = { class: "bs-calendar" };
1441
1658
  const _hoisted_2$k = { class: "bs-calendar-head" };
1442
- const _hoisted_3$f = { class: "year-month" };
1443
- const _hoisted_4$9 = {
1659
+ const _hoisted_3$e = { class: "year-month" };
1660
+ const _hoisted_4$a = {
1444
1661
  key: 0,
1445
1662
  class: "timezone"
1446
1663
  };
@@ -1643,11 +1860,15 @@
1643
1860
  return (_ctx, _cache) => {
1644
1861
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
1645
1862
  vue.createElementVNode("div", _hoisted_2$k, [
1646
- vue.createElementVNode("div", _hoisted_3$f, [
1647
- vue.createVNode(_sfc_main$w, {
1648
- class: "",
1649
- "left-icon": "chevron_left",
1863
+ vue.createElementVNode("div", _hoisted_3$e, [
1864
+ vue.createVNode(_sfc_main$x, {
1865
+ class: "min-w-[2em]",
1650
1866
  onClick: prevMonth
1867
+ }, {
1868
+ left: vue.withCtx(() => [
1869
+ vue.createVNode(_sfc_main$w, { name: "chevron_left" })
1870
+ ]),
1871
+ _: 1
1651
1872
  }),
1652
1873
  vue.createVNode(_sfc_main$p, {
1653
1874
  modelValue: year.value,
@@ -1661,13 +1882,17 @@
1661
1882
  disabled: __props.disabled,
1662
1883
  items: vue.unref(months)
1663
1884
  }, null, 8, ["modelValue", "disabled", "items"]),
1664
- vue.createVNode(_sfc_main$w, {
1665
- class: "",
1666
- "left-icon": "chevron_right",
1885
+ vue.createVNode(_sfc_main$x, {
1886
+ class: "min-w-[2em]",
1667
1887
  onClick: nextMonth
1888
+ }, {
1889
+ left: vue.withCtx(() => [
1890
+ vue.createVNode(_sfc_main$w, { name: "chevron_right" })
1891
+ ]),
1892
+ _: 1
1668
1893
  })
1669
1894
  ]),
1670
- __props.showTimeZone ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$9, "(" + vue.toDisplayString(actualTimeZone.value) + ")", 1)) : vue.createCommentVNode("", true)
1895
+ __props.showTimeZone ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$a, "(" + vue.toDisplayString(actualTimeZone.value) + ")", 1)) : vue.createCommentVNode("", true)
1671
1896
  ]),
1672
1897
  vue.createElementVNode("table", {
1673
1898
  class: vue.normalizeClass([{ disabled: __props.disabled }, "align-self-center"])
@@ -1728,7 +1953,7 @@
1728
1953
  });
1729
1954
  const _hoisted_1$l = { class: "bs-calendar-range flex flex-row" };
1730
1955
  const _hoisted_2$j = { class: "flex flex-col" };
1731
- const _hoisted_3$e = { class: "flex flex-row items-center" };
1956
+ const _hoisted_3$d = { class: "flex flex-row items-center" };
1732
1957
  const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
1733
1958
  __name: "BSCalendarRange",
1734
1959
  props: {
@@ -1769,7 +1994,7 @@
1769
1994
  return (_ctx, _cache) => {
1770
1995
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [
1771
1996
  vue.createElementVNode("div", _hoisted_2$j, [
1772
- vue.createElementVNode("div", _hoisted_3$e, [
1997
+ vue.createElementVNode("div", _hoisted_3$d, [
1773
1998
  vue.createVNode(_sfc_main$o, {
1774
1999
  modelValue: fromValue.value,
1775
2000
  "onUpdate:modelValue": [
@@ -1868,8 +2093,7 @@
1868
2093
  }
1869
2094
  };
1870
2095
  const _hoisted_1$k = ["textContent"];
1871
- const _hoisted_2$i = { class: "font-icon" };
1872
- const _hoisted_3$d = ["src", "alt"];
2096
+ const _hoisted_2$i = ["src", "alt"];
1873
2097
  const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
1874
2098
  __name: "BSPrefixSuffix",
1875
2099
  props: {
@@ -1886,11 +2110,13 @@
1886
2110
  textContent: vue.toDisplayString(item.value),
1887
2111
  key: JSON.stringify(item.value),
1888
2112
  class: vue.normalizeClass(__props.type)
1889
- }, null, 10, _hoisted_1$k)) : item.type === "font-icon" ? (vue.openBlock(), vue.createElementBlock("span", {
2113
+ }, null, 10, _hoisted_1$k)) : item.type === "icon" ? (vue.openBlock(), vue.createElementBlock("span", {
1890
2114
  key: 1,
1891
2115
  class: vue.normalizeClass(__props.type)
1892
2116
  }, [
1893
- vue.createElementVNode("span", _hoisted_2$i, vue.toDisplayString(item.value), 1)
2117
+ vue.createVNode(_sfc_main$w, {
2118
+ name: item.value
2119
+ }, null, 8, ["name"])
1894
2120
  ], 2)) : item.type === "image-url" ? (vue.openBlock(), vue.createElementBlock("span", {
1895
2121
  key: 2,
1896
2122
  class: vue.normalizeClass(__props.type)
@@ -1898,7 +2124,7 @@
1898
2124
  vue.createElementVNode("img", {
1899
2125
  src: item.value,
1900
2126
  alt: __props.type
1901
- }, null, 8, _hoisted_3$d)
2127
+ }, null, 8, _hoisted_2$i)
1902
2128
  ], 2)) : vue.createCommentVNode("", true)
1903
2129
  ], 64);
1904
2130
  }), 256);
@@ -1914,7 +2140,7 @@
1914
2140
  key: 1,
1915
2141
  class: "input-area"
1916
2142
  };
1917
- const _hoisted_4$8 = ["id", "placeholder", "autocomplete", "disabled", "maxlength", "name", "tabindex", "type"];
2143
+ const _hoisted_4$9 = ["id", "placeholder", "autocomplete", "disabled", "maxlength", "name", "tabindex", "type"];
1918
2144
  const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
1919
2145
  __name: "BSTextInput",
1920
2146
  props: {
@@ -2068,7 +2294,7 @@
2068
2294
  name: __props.name,
2069
2295
  tabindex: __props.tabindex,
2070
2296
  type: __props.inputType
2071
- }, vue.toHandlers(handlers, true)), null, 16, _hoisted_4$8), [
2297
+ }, vue.toHandlers(handlers, true)), null, 16, _hoisted_4$9), [
2072
2298
  [vue.vModelDynamic, vue.unref(stringValue)]
2073
2299
  ]),
2074
2300
  vue.createVNode(_sfc_main$m, {
@@ -2367,7 +2593,7 @@
2367
2593
  key: 1,
2368
2594
  class: "input-area"
2369
2595
  };
2370
- const _hoisted_4$7 = ["id", "placeholder", "autocomplete", "disabled", "maxlength", "name", "tabindex", "value"];
2596
+ const _hoisted_4$8 = ["id", "placeholder", "autocomplete", "disabled", "maxlength", "name", "tabindex", "value"];
2371
2597
  const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
2372
2598
  __name: "BSNumberInput",
2373
2599
  props: {
@@ -2529,7 +2755,7 @@
2529
2755
  tabindex: __props.tabindex,
2530
2756
  value: focused.value || !__props.formatOnBlur ? vue.unref(stringValue) : formattedStringValue.value,
2531
2757
  type: "text"
2532
- }, vue.toHandlers(handlers, true)), null, 16, _hoisted_4$7),
2758
+ }, vue.toHandlers(handlers, true)), null, 16, _hoisted_4$8),
2533
2759
  vue.createVNode(_sfc_main$m, {
2534
2760
  value: __props.suffix,
2535
2761
  type: "suffix"
@@ -2553,7 +2779,7 @@
2553
2779
  key: 1,
2554
2780
  class: "input-area flex flex-row items-start"
2555
2781
  };
2556
- const _hoisted_4$6 = ["placeholder", "disabled", "maxlength", "name", "tabindex"];
2782
+ const _hoisted_4$7 = ["placeholder", "disabled", "maxlength", "name", "tabindex"];
2557
2783
  const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
2558
2784
  __name: "BSTextArea",
2559
2785
  props: {
@@ -2699,7 +2925,7 @@
2699
2925
  class: "grow",
2700
2926
  onPointerdown: capturePointer,
2701
2927
  onPointerup: preserveResizedHeight
2702
- }, vue.toHandlers(handlers, true)), null, 16, _hoisted_4$6), [
2928
+ }, vue.toHandlers(handlers, true)), null, 16, _hoisted_4$7), [
2703
2929
  [vue.vModelText, vue.unref(stringValue)]
2704
2930
  ]),
2705
2931
  vue.createVNode(_sfc_main$m, {
@@ -2717,8 +2943,9 @@
2717
2943
  }
2718
2944
  });
2719
2945
  const _hoisted_1$g = ["id", "checked", "disabled", "name", "tabindex"];
2720
- const _hoisted_2$e = ["textContent", "for"];
2721
- const _hoisted_3$9 = ["for"];
2946
+ const _hoisted_2$e = ["for"];
2947
+ const _hoisted_3$9 = ["textContent", "for"];
2948
+ const _hoisted_4$6 = ["for"];
2722
2949
  const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
2723
2950
  __name: "BSCheckbox",
2724
2951
  props: {
@@ -2776,19 +3003,27 @@
2776
3003
  class: "",
2777
3004
  type: "checkbox"
2778
3005
  }, vue.toHandlers(handlers, true)), null, 16, _hoisted_1$g),
3006
+ vue.createElementVNode("label", {
3007
+ for: __props.id,
3008
+ class: "icon-label"
3009
+ }, [
3010
+ vue.createVNode(_sfc_main$w, {
3011
+ name: checked.value ? "check_box" : "check_box_outline_blank"
3012
+ }, null, 8, ["name"])
3013
+ ], 8, _hoisted_2$e),
2779
3014
  __props.label ? (vue.openBlock(), vue.createElementBlock("label", {
2780
3015
  key: 0,
2781
3016
  textContent: vue.toDisplayString(__props.label),
2782
3017
  for: __props.id,
2783
3018
  class: "text-label"
2784
- }, null, 8, _hoisted_2$e)) : vue.createCommentVNode("", true),
3019
+ }, null, 8, _hoisted_3$9)) : vue.createCommentVNode("", true),
2785
3020
  hasLabelSlot.value ? (vue.openBlock(), vue.createElementBlock("label", {
2786
3021
  key: 1,
2787
3022
  for: __props.id,
2788
3023
  class: "slot-label cursor-pointer"
2789
3024
  }, [
2790
3025
  vue.renderSlot(_ctx.$slots, "default", { disabled: __props.disabled })
2791
- ], 8, _hoisted_3$9)) : vue.createCommentVNode("", true)
3026
+ ], 8, _hoisted_4$6)) : vue.createCommentVNode("", true)
2792
3027
  ], 2);
2793
3028
  };
2794
3029
  }
@@ -2931,10 +3166,7 @@
2931
3166
  });
2932
3167
  const _hoisted_1$e = ["id", "checked", "disabled", "name", "tabindex"];
2933
3168
  const _hoisted_2$c = ["for"];
2934
- const _hoisted_3$7 = {
2935
- key: 0,
2936
- class: "font-icon"
2937
- };
3169
+ const _hoisted_3$7 = ["for"];
2938
3170
  const _hoisted_4$5 = ["textContent"];
2939
3171
  const _hoisted_5$3 = ["for"];
2940
3172
  const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
@@ -2981,14 +3213,25 @@
2981
3213
  role: "radio",
2982
3214
  type: "radio"
2983
3215
  }, vue.toHandlers(handlers, true)), null, 16, _hoisted_1$e),
3216
+ vue.createElementVNode("label", {
3217
+ for: __props.id,
3218
+ class: "icon-label"
3219
+ }, [
3220
+ vue.createVNode(_sfc_main$w, {
3221
+ name: checked.value ? "radio_button_checked" : "radio_button_unchecked"
3222
+ }, null, 8, ["name"])
3223
+ ], 8, _hoisted_2$c),
2984
3224
  vue.createElementVNode("label", { for: __props.id }, [
2985
- __props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$7, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
3225
+ __props.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
3226
+ key: 0,
3227
+ name: __props.icon
3228
+ }, null, 8, ["name"])) : vue.createCommentVNode("", true),
2986
3229
  __props.label ? (vue.openBlock(), vue.createElementBlock("span", {
2987
3230
  key: 1,
2988
3231
  textContent: vue.toDisplayString(__props.label),
2989
3232
  class: "text-label"
2990
3233
  }, null, 8, _hoisted_4$5)) : vue.createCommentVNode("", true)
2991
- ], 8, _hoisted_2$c),
3234
+ ], 8, _hoisted_3$7),
2992
3235
  hasLabelSlot.value ? (vue.openBlock(), vue.createElementBlock("label", {
2993
3236
  key: 0,
2994
3237
  for: __props.id,
@@ -3128,10 +3371,6 @@
3128
3371
  };
3129
3372
  const _hoisted_8 = ["textContent"];
3130
3373
  const _hoisted_9 = ["textContent"];
3131
- const _hoisted_10 = {
3132
- key: 2,
3133
- class: "small-progress"
3134
- };
3135
3374
  const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
3136
3375
  __name: "BSMultiSelect",
3137
3376
  props: {
@@ -3292,8 +3531,16 @@
3292
3531
  }, null, 8, _hoisted_9);
3293
3532
  }), 128))
3294
3533
  ])),
3295
- _cache[5] || (_cache[5] = vue.createElementVNode("span", { class: "dropdown-btn" }, "expand_more", -1)),
3296
- loadingItems.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_10, "progress_activity")) : vue.createCommentVNode("", true)
3534
+ vue.createVNode(_sfc_main$w, {
3535
+ name: "expand_more",
3536
+ class: "dropdown-btn"
3537
+ }),
3538
+ loadingItems.value ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
3539
+ key: 2,
3540
+ name: "progress_activity",
3541
+ class: "small-progress",
3542
+ spin: ""
3543
+ })) : vue.createCommentVNode("", true)
3297
3544
  ], 8, _hoisted_5$2),
3298
3545
  !__props.disabled && showPopup.value ? (vue.openBlock(), vue.createBlock(_sfc_main$r, {
3299
3546
  key: 0,
@@ -3434,13 +3681,13 @@
3434
3681
  "time-zone": __props.timeZone
3435
3682
  }, null, 8, ["modelValue", "display-format", "end-year", "resolution", "start-year", "time-zone"]),
3436
3683
  vue.createElementVNode("div", _hoisted_2$9, [
3437
- vue.createVNode(_sfc_main$w, {
3684
+ vue.createVNode(_sfc_main$x, {
3438
3685
  caption: __props.okButtonCaption,
3439
3686
  "button-color": "blue",
3440
3687
  class: "min-w-80",
3441
3688
  onClick: emitValue
3442
3689
  }, null, 8, ["caption"]),
3443
- vue.createVNode(_sfc_main$w, {
3690
+ vue.createVNode(_sfc_main$x, {
3444
3691
  caption: __props.cancelButtonCaption,
3445
3692
  class: "min-w-80",
3446
3693
  onClick: close
@@ -3672,10 +3919,11 @@
3672
3919
  __props.viewMode ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
3673
3920
  vue.createElementVNode("span", null, vue.toDisplayString(viewModeValue.value), 1)
3674
3921
  ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$8, [
3675
- vue.createElementVNode("span", {
3676
- class: vue.normalizeClass([{ "bs-clickable": !__props.disabled }, "font-icon"]),
3922
+ vue.createVNode(_sfc_main$w, {
3923
+ name: "calendar_month",
3924
+ class: vue.normalizeClass({ "bs-clickable": !__props.disabled }),
3677
3925
  onClick: _cache[0] || (_cache[0] = ($event) => togglePopup())
3678
- }, " calendar_month ", 2),
3926
+ }, null, 8, ["class"]),
3679
3927
  vue.createElementVNode("input", vue.mergeProps({
3680
3928
  id: __props.id,
3681
3929
  ref_key: "field",
@@ -3772,13 +4020,13 @@
3772
4020
  "time-zone": __props.timeZone
3773
4021
  }, null, 8, ["from", "to", "disabled-from", "disabled-to", "display-format", "end-year", "resolution", "start-year", "time-zone"]),
3774
4022
  vue.createElementVNode("div", _hoisted_2$7, [
3775
- vue.createVNode(_sfc_main$w, {
4023
+ vue.createVNode(_sfc_main$x, {
3776
4024
  caption: __props.okButtonCaption,
3777
4025
  "button-color": "blue",
3778
4026
  class: "min-w-80",
3779
4027
  onClick: emitValue
3780
4028
  }, null, 8, ["caption"]),
3781
- vue.createVNode(_sfc_main$w, {
4029
+ vue.createVNode(_sfc_main$x, {
3782
4030
  caption: __props.cancelButtonCaption,
3783
4031
  class: "min-w-80",
3784
4032
  onClick: close
@@ -4182,10 +4430,11 @@
4182
4430
  __props.viewMode ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
4183
4431
  vue.createElementVNode("span", null, vue.toDisplayString(formattedDateRange.value), 1)
4184
4432
  ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$6, [
4185
- vue.createElementVNode("span", {
4186
- class: vue.normalizeClass([{ "bs-clickable": !disabled.value }, "font-icon"]),
4433
+ vue.createVNode(_sfc_main$w, {
4434
+ name: "calendar_month",
4435
+ class: vue.normalizeClass({ "bs-clickable": !disabled.value }),
4187
4436
  onClick: _cache[0] || (_cache[0] = () => togglePopup())
4188
- }, " calendar_month ", 2),
4437
+ }, null, 8, ["class"]),
4189
4438
  vue.createElementVNode("input", vue.mergeProps({
4190
4439
  id: __props.idFrom,
4191
4440
  ref_key: "fieldFrom",
@@ -4325,10 +4574,11 @@
4325
4574
  class: vue.normalizeClass([{ expanded: expanded.value }, "bs-card-layout"])
4326
4575
  }, [
4327
4576
  !__props.hideTitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
4328
- vue.createElementVNode("span", {
4329
- class: "expand-btn font-icon bs-clickable",
4577
+ vue.createVNode(_sfc_main$w, {
4578
+ name: "label",
4579
+ class: "expand-btn bs-clickable",
4330
4580
  onClick: toggleExpand
4331
- }, "label"),
4581
+ }),
4332
4582
  vue.createElementVNode("div", {
4333
4583
  textContent: vue.toDisplayString(__props.title),
4334
4584
  class: "card-layout-title"
@@ -4354,110 +4604,6 @@
4354
4604
  };
4355
4605
  }
4356
4606
  });
4357
- const modalPluginKey = "BlueseaModalPlugin";
4358
- const modalHandleKey = "BlueseaModalHandle";
4359
- class ModalHandleImpl {
4360
- constructor(modal, modalId) {
4361
- this.modal = modal;
4362
- this.modalId = modalId;
4363
- }
4364
- maximized = false;
4365
- defaultStyleListener;
4366
- defaultPositionListener;
4367
- close() {
4368
- this.modal.closeModal(this.modalId);
4369
- }
4370
- setDefaultStyle(modalStyle) {
4371
- this.defaultStyleListener?.(modalStyle);
4372
- }
4373
- setDefaultPosition(modalPosition) {
4374
- this.defaultPositionListener?.(modalPosition);
4375
- }
4376
- setDefaultStyleListener(listener) {
4377
- this.defaultStyleListener = listener;
4378
- }
4379
- setDefaultPositionListener(listener) {
4380
- this.defaultPositionListener = listener;
4381
- }
4382
- }
4383
- class BSModal {
4384
- modalItems = vue.reactive([]);
4385
- openModal(modalItem) {
4386
- const modalId = Math.random().toString(36);
4387
- const handle = new ModalHandleImpl(this, modalId);
4388
- const registered = {
4389
- modalId,
4390
- pageId: modalItem.pageId,
4391
- component: vue.markRaw(modalItem.component),
4392
- style: modalItem.style,
4393
- position: modalItem.position,
4394
- bind: modalItem.bind,
4395
- on: modalItem.on,
4396
- slots: modalItem.slots,
4397
- modalHandle: handle
4398
- };
4399
- this.modalItems.push(registered);
4400
- return registered;
4401
- }
4402
- closeModal(modalItem) {
4403
- let index = -1;
4404
- if (typeof modalItem === "string") {
4405
- index = this.modalItems.findIndex((item) => item.modalId === modalItem);
4406
- } else {
4407
- index = this.modalItems.findIndex((item) => item === modalItem);
4408
- }
4409
- if (index >= 0) this.modalItems.splice(index, 1);
4410
- }
4411
- closeAllModals() {
4412
- this.modalItems.splice(0, this.modalItems.length);
4413
- }
4414
- openAlert(title, message, clickHandler) {
4415
- const option = {
4416
- component: vue.defineAsyncComponent(() => Promise.resolve().then(() => BSAlertModal)),
4417
- bind: {
4418
- title,
4419
- message
4420
- },
4421
- on: {
4422
- click: async () => await clickHandler?.()
4423
- }
4424
- };
4425
- return this.openModal(option);
4426
- }
4427
- openYesNo(title, message, yesHandler, noHandler) {
4428
- const option = {
4429
- component: vue.defineAsyncComponent(() => Promise.resolve().then(() => BSYesNoModal)),
4430
- bind: {
4431
- title,
4432
- message
4433
- },
4434
- on: {
4435
- clickYes: async () => await yesHandler?.(),
4436
- clickNo: async () => await noHandler?.()
4437
- }
4438
- };
4439
- return this.openModal(option);
4440
- }
4441
- install(app) {
4442
- app.provide(modalPluginKey, this);
4443
- }
4444
- }
4445
- const useModal = () => {
4446
- const modal = vue.inject(modalPluginKey);
4447
- if (!modal) throw new Error("BSModal is not initialized.");
4448
- return modal;
4449
- };
4450
- const provideModalHandle = (modalHandle) => {
4451
- vue.provide(modalHandleKey, modalHandle);
4452
- };
4453
- const useModalHandle = () => {
4454
- const modalHandle = vue.inject(modalHandleKey);
4455
- if (!modalHandle) throw new Error("ModalHandle not found. Maybe not inside modal component.");
4456
- return modalHandle;
4457
- };
4458
- const createModalPlugin = () => {
4459
- return new BSModal();
4460
- };
4461
4607
  const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
4462
4608
  __name: "BSModalWrapper",
4463
4609
  props: {
@@ -4941,20 +5087,30 @@
4941
5087
  vue.renderSlot(_ctx.$slots, "title-buttons")
4942
5088
  ]),
4943
5089
  vue.createElementVNode("div", null, [
4944
- !__props.hideMaximizeButton ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
5090
+ !__props.hideMaximizeButton ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
4945
5091
  key: 0,
4946
- "left-icon": vue.unref(modalHandle).maximized ? "minimize" : "maximize",
4947
5092
  title: vue.unref(modalHandle).maximized ? "Restore" : "Maximize",
4948
5093
  class: "border-0 maximize-btn",
4949
5094
  onClick: toggleMaximize
4950
- }, null, 8, ["left-icon", "title"])) : vue.createCommentVNode("", true),
4951
- !__props.hideCloseButton ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
5095
+ }, {
5096
+ left: vue.withCtx(() => [
5097
+ vue.createVNode(_sfc_main$w, {
5098
+ name: vue.unref(modalHandle).maximized ? "minimize" : "maximize"
5099
+ }, null, 8, ["name"])
5100
+ ]),
5101
+ _: 1
5102
+ }, 8, ["title"])) : vue.createCommentVNode("", true),
5103
+ !__props.hideCloseButton ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
4952
5104
  key: 1,
4953
5105
  title: __props.closeCaption,
4954
5106
  class: "border-0 close-btn",
4955
- "left-icon": "close",
4956
5107
  onClick: closeModal
4957
- }, null, 8, ["title"])) : vue.createCommentVNode("", true)
5108
+ }, {
5109
+ left: vue.withCtx(() => [
5110
+ vue.createVNode(_sfc_main$w, { name: "close" })
5111
+ ]),
5112
+ _: 1
5113
+ }, 8, ["title"])) : vue.createCommentVNode("", true)
4958
5114
  ])
4959
5115
  ])) : vue.createCommentVNode("", true),
4960
5116
  vue.createElementVNode("div", {
@@ -5006,7 +5162,7 @@
5006
5162
  }, {
5007
5163
  buttons: vue.withCtx(() => [
5008
5164
  vue.createElementVNode("div", _hoisted_2$3, [
5009
- vue.withDirectives(vue.createVNode(_sfc_main$w, {
5165
+ vue.withDirectives(vue.createVNode(_sfc_main$x, {
5010
5166
  caption: __props.okCaption,
5011
5167
  "button-color": "blue",
5012
5168
  class: "min-w-80",
@@ -5061,13 +5217,13 @@
5061
5217
  return vue.openBlock(), vue.createBlock(_sfc_main$5, { title: __props.title }, {
5062
5218
  buttons: vue.withCtx(() => [
5063
5219
  vue.createElementVNode("div", _hoisted_2$2, [
5064
- vue.createVNode(_sfc_main$w, {
5220
+ vue.createVNode(_sfc_main$x, {
5065
5221
  caption: __props.noCaption,
5066
5222
  class: "min-w-80",
5067
5223
  "data-id": "noBtn",
5068
5224
  onClick: clickNo
5069
5225
  }, null, 8, ["caption"]),
5070
- vue.createVNode(_sfc_main$w, {
5226
+ vue.createVNode(_sfc_main$x, {
5071
5227
  caption: __props.yesCaption,
5072
5228
  "button-color": "blue",
5073
5229
  class: "ml-8 min-w-80",
@@ -5113,9 +5269,16 @@
5113
5269
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(notificationEntries), (entry) => {
5114
5270
  return vue.openBlock(), vue.createElementBlock("div", {
5115
5271
  key: entry.entryId,
5116
- textContent: vue.toDisplayString(entry.message),
5117
5272
  class: vue.normalizeClass(entry.style)
5118
- }, null, 10, _hoisted_3$1);
5273
+ }, [
5274
+ vue.createVNode(_sfc_main$w, {
5275
+ name: entry.style === "error" ? "cancel" : "check_circle",
5276
+ class: "notification-icon"
5277
+ }, null, 8, ["name"]),
5278
+ vue.createElementVNode("span", {
5279
+ textContent: vue.toDisplayString(entry.message)
5280
+ }, null, 8, _hoisted_3$1)
5281
+ ], 2);
5119
5282
  }), 128))
5120
5283
  ]),
5121
5284
  _: 1
@@ -5146,7 +5309,7 @@
5146
5309
  onMouseover: _cache[1] || (_cache[1] = ($event) => setCursorInTooltip(true, $event))
5147
5310
  }, null, 8, ["content", "target"])) : vue.createCommentVNode("", true)
5148
5311
  ]),
5149
- vue.unref(showLoadingIcon) ? (vue.openBlock(), vue.createBlock(BSLoadingIcon, { key: 0 })) : vue.createCommentVNode("", true)
5312
+ vue.unref(showLoadingIcon) ? (vue.openBlock(), vue.createBlock(_sfc_main$u, { key: 0 })) : vue.createCommentVNode("", true)
5150
5313
  ]);
5151
5314
  };
5152
5315
  }
@@ -5305,7 +5468,7 @@
5305
5468
  class IllegalAccessError {
5306
5469
  }
5307
5470
  exports2.BSAlertModal = _sfc_main$4;
5308
- exports2.BSButton = _sfc_main$w;
5471
+ exports2.BSButton = _sfc_main$x;
5309
5472
  exports2.BSCalendar = _sfc_main$o;
5310
5473
  exports2.BSCalendarRange = _sfc_main$n;
5311
5474
  exports2.BSCardLayout = _sfc_main$8;
@@ -5318,7 +5481,8 @@
5318
5481
  exports2.BSDateInputPopup = _sfc_main$d;
5319
5482
  exports2.BSDateRange = _sfc_main$a;
5320
5483
  exports2.BSDateRangeInputPopup = _sfc_main$b;
5321
- exports2.BSLoadingIcon = BSLoadingIcon;
5484
+ exports2.BSIcon = _sfc_main$w;
5485
+ exports2.BSLoadingIcon = _sfc_main$u;
5322
5486
  exports2.BSModal = BSModal;
5323
5487
  exports2.BSModalContainer = _sfc_main$6;
5324
5488
  exports2.BSModalFrame = _sfc_main$5;
@@ -5360,6 +5524,7 @@
5360
5524
  exports2.focusLastElement = focusLastElement;
5361
5525
  exports2.formatUtil = formatUtil;
5362
5526
  exports2.getComponentRootElement = getComponentRootElement;
5527
+ exports2.getIcon = getIcon;
5363
5528
  exports2.getSelfIndex = getSelfIndex;
5364
5529
  exports2.hideLoading = hideLoading;
5365
5530
  exports2.hideTooltip = hideTooltip;
@@ -5371,6 +5536,8 @@
5371
5536
  exports2.provideFieldContext = provideFieldContext;
5372
5537
  exports2.provideModalHandle = provideModalHandle;
5373
5538
  exports2.provideSavePoint = provideSavePoint;
5539
+ exports2.registerIcon = registerIcon;
5540
+ exports2.registerIcons = registerIcons;
5374
5541
  exports2.showAlarm = showAlarm;
5375
5542
  exports2.showLoading = showLoading;
5376
5543
  exports2.showLoadingIcon = showLoadingIcon;