@v1nt1248/3nclient-lib 0.2.87 → 0.2.89

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.
Files changed (79) hide show
  1. package/dist/components/ui3n-autocomplete/types.d.ts +1 -1
  2. package/dist/components/ui3n-autocomplete/ui3n-autocomplete.vue.d.ts +3 -3
  3. package/dist/components/ui3n-badge/ui3n-badge-simple.vue.d.ts +3 -3
  4. package/dist/components/ui3n-badge/ui3n-badge.vue.d.ts +2 -2
  5. package/dist/components/ui3n-breadcrumbs/types.d.ts +1 -1
  6. package/dist/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue.d.ts +3 -3
  7. package/dist/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue.d.ts +2 -2
  8. package/dist/components/ui3n-button/ui3n-button.vue.d.ts +3 -3
  9. package/dist/components/ui3n-checkbox/types.d.ts +1 -1
  10. package/dist/components/ui3n-checkbox/ui3n-checkbox.vue.d.ts +3 -3
  11. package/dist/components/ui3n-chip/types.d.ts +1 -1
  12. package/dist/components/ui3n-chip/ui3n-chip.vue.d.ts +3 -3
  13. package/dist/components/ui3n-dialog/types.d.ts +3 -3
  14. package/dist/components/ui3n-dialog/ui3n-dialog-provider.vue.d.ts +3 -3
  15. package/dist/components/ui3n-dialog/ui3n-dialog.vue.d.ts +4 -4
  16. package/dist/components/ui3n-drop-files/types.d.ts +1 -1
  17. package/dist/components/ui3n-drop-files/ui3n-drop-files.vue.d.ts +3 -3
  18. package/dist/components/ui3n-editable/ui3n-editable.vue.d.ts +3 -3
  19. package/dist/components/ui3n-editable/useContentEditable.d.ts +2 -2
  20. package/dist/components/ui3n-emoji/ui3n-emoji.vue.d.ts +3 -3
  21. package/dist/components/ui3n-icon/ui3n-icon.vue.d.ts +3 -3
  22. package/dist/components/ui3n-input/ui3n-input.vue.d.ts +6 -6
  23. package/dist/components/ui3n-input-file/ui3n-input-file.vue.d.ts +3 -3
  24. package/dist/components/ui3n-list/types.d.ts +1 -1
  25. package/dist/components/ui3n-list/ui3n-list.vue.d.ts +3 -3
  26. package/dist/components/ui3n-menu/types.d.ts +1 -1
  27. package/dist/components/ui3n-menu/ui3n-menu.vue.d.ts +5 -5
  28. package/dist/components/ui3n-notification/ui3n-notification.vue.d.ts +2 -2
  29. package/dist/components/ui3n-progress/ui3n-progress-circular.vue.d.ts +2 -2
  30. package/dist/components/ui3n-progress/ui3n-progress-linear.vue.d.ts +2 -2
  31. package/dist/components/ui3n-radio-group/types.d.ts +1 -1
  32. package/dist/components/ui3n-radio-group/ui3n-radio-group.vue.d.ts +3 -3
  33. package/dist/components/ui3n-radio-group/ui3n-radio.vue.d.ts +3 -3
  34. package/dist/components/ui3n-slider/ui3n-slider.vue.d.ts +3 -3
  35. package/dist/components/ui3n-step-line-bar/ui3n-step-line-bar.vue.d.ts +2 -2
  36. package/dist/components/ui3n-switch/types.d.ts +1 -1
  37. package/dist/components/ui3n-switch/ui3n-switch.vue.d.ts +3 -3
  38. package/dist/components/ui3n-table/composables/useTable.d.ts +6 -6
  39. package/dist/components/ui3n-table/types.d.ts +1 -1
  40. package/dist/components/ui3n-table/ui3n-table-sort-icon.vue.d.ts +1 -1
  41. package/dist/components/ui3n-table/ui3n-table.vue.d.ts +3 -3
  42. package/dist/components/ui3n-tabs/types.d.ts +1 -1
  43. package/dist/components/ui3n-tabs/ui3n-tabs.vue.d.ts +3 -3
  44. package/dist/components/ui3n-text/ui3n-text.vue.d.ts +3 -3
  45. package/dist/components/ui3n-tooltip/types.d.ts +1 -1
  46. package/dist/components/ui3n-tooltip/ui3n-tooltip.vue.d.ts +3 -3
  47. package/dist/components/ui3n-virtual-scroll/types.d.ts +1 -1
  48. package/dist/components/ui3n-virtual-scroll/ui3n-virtual-scroll.vue.d.ts +3 -3
  49. package/dist/constants/index.d.ts +1 -0
  50. package/dist/constants/plugins-keys.d.ts +9 -0
  51. package/dist/directives/ui3n-click-outside.d.ts +1 -1
  52. package/dist/directives/ui3n-html.d.ts +1 -1
  53. package/dist/directives/ui3n-long-press.d.ts +1 -1
  54. package/dist/directives/ui3n-resize.d.ts +1 -1
  55. package/dist/directives/ui3n-ripple.d.ts +1 -1
  56. package/dist/directives/ui3n-title.d.ts +1 -1
  57. package/dist/index.d.ts +4 -4
  58. package/dist/plugins/dialogs/dialogs.d.ts +3 -15
  59. package/dist/plugins/dialogs/store-dialog.d.ts +2 -2
  60. package/dist/plugins/dialogs/types.d.ts +2 -3
  61. package/dist/plugins/i18n/i18n.d.ts +1 -1
  62. package/dist/plugins/i18n/types.d.ts +0 -2
  63. package/dist/plugins/index.d.ts +5 -5
  64. package/dist/plugins/notifications/notifications.d.ts +1 -1
  65. package/dist/plugins/notifications/types.d.ts +0 -2
  66. package/dist/plugins/vue-bus/types.d.ts +0 -2
  67. package/dist/plugins/vue-bus/vue-bus.d.ts +1 -1
  68. package/dist/types/components.types.d.ts +1 -1
  69. package/dist/types/directives.types.d.ts +1 -1
  70. package/dist/ui3n-components.d.ts +1 -1
  71. package/dist/ui3n-components.js +3317 -3338
  72. package/dist/ui3n-plugins.d.ts +6 -5
  73. package/dist/ui3n-plugins.js +675 -669
  74. package/dist/ui3n-utils.js +69 -65
  75. package/dist/utils/ui/has-slot-content.d.ts +1 -1
  76. package/package.json +1 -1
  77. package/src/components/ui3n-dialog/types.ts +2 -2
  78. package/src/components/ui3n-dialog/ui3n-dialog-provider.vue +6 -5
  79. package/src/components/ui3n-dialog/ui3n-dialog.vue +2 -1
@@ -694,14 +694,14 @@ const IE = /[^@]+@[^@]+\.[^@]+/ui, XB = {
694
694
  large_blue_diamond: { value: "🔷", group: "Symbols" },
695
695
  small_orange_diamond: { value: "🔸", group: "Symbols" },
696
696
  small_blue_diamond: { value: "🔹", group: "Symbols" }
697
- };
698
- function QE() {
697
+ }, QE = /* @__PURE__ */ Symbol.for("ui3n-dialogs-plugin"), BE = /* @__PURE__ */ Symbol.for("ui3n-i18-plugin"), CE = /* @__PURE__ */ Symbol("ui3n-notifications-plugin"), EE = /* @__PURE__ */ Symbol("ui3n-vuebus-plugin");
698
+ function iE() {
699
699
  const E = {};
700
700
  return E.promise = new Promise((C, i) => {
701
701
  E.resolve = C, E.reject = i;
702
702
  }), Object.freeze(E), E;
703
703
  }
704
- function BE(E) {
704
+ function DE(E) {
705
705
  return new Promise((C) => {
706
706
  setTimeout(C, E);
707
707
  });
@@ -742,7 +742,7 @@ Object.freeze(yg.prototype);
742
742
  Object.freeze(yg);
743
743
  function PB() {
744
744
  }
745
- function CE(E, C, i) {
745
+ function oE(E, C, i) {
746
746
  return ((...s) => E.startOrChain(
747
747
  () => i.apply(C, s)
748
748
  ));
@@ -849,7 +849,7 @@ function _B() {
849
849
  setTimeout(E, 0);
850
850
  }));
851
851
  }
852
- class EE {
852
+ class wE {
853
853
  maxNumberOfRunners = 0;
854
854
  arrayOfTasks = [];
855
855
  numberOfRunners = 0;
@@ -872,11 +872,11 @@ class EE {
872
872
  this.arrayOfTasks = [];
873
873
  }
874
874
  }
875
- function iE(E, C) {
875
+ function sE(E, C) {
876
876
  let i = E.toString().split("e");
877
877
  return i = Math.round(+(i[0] + "e" + (i[1] ? +i[1] - C : -C))), i = i.toString().split("e"), +(i[0] + "e" + (i[1] ? +i[1] - +C : C));
878
878
  }
879
- function DE(E) {
879
+ function aE(E) {
880
880
  if (E < 1)
881
881
  throw new Error("number of chars is less than one");
882
882
  const C = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = new Uint8Array(E * 2);
@@ -913,7 +913,7 @@ function gC(E, C) {
913
913
  function QC(E, C) {
914
914
  C.parentNode?.insertBefore(E, C.nextSibling);
915
915
  }
916
- function oE(E, { shadowElement: C = null } = {}) {
916
+ function FE(E, { shadowElement: C = null } = {}) {
917
917
  const i = E.getAttribute("class"), s = E.getAttribute("style"), w = E.getAttribute("rows") || 1, Q = E.getAttribute("max-rows"), N = Number.parseInt(w), S = Number.parseInt(Q), H = !C, k = {
918
918
  class: i,
919
919
  style: `box-sizing: border-box !important; ${s}`,
@@ -2562,7 +2562,7 @@ const HC = {
2562
2562
  zirz: "application/vnd.zul",
2563
2563
  zmm: "application/vnd.handheld-entertainment+xml"
2564
2564
  };
2565
- function wE(E) {
2565
+ function RE(E) {
2566
2566
  const { recipients: C } = E;
2567
2567
  return Object.keys(C).reduce(
2568
2568
  (i, s) => {
@@ -2576,11 +2576,11 @@ function wE(E) {
2576
2576
  {}
2577
2577
  );
2578
2578
  }
2579
- async function sE(E) {
2579
+ async function hE(E) {
2580
2580
  const { path: C } = E, i = await w3n.storage.getSysFS("device", C), { isFile: s, item: w } = i;
2581
2581
  return s && w ? w : void 0;
2582
2582
  }
2583
- async function aE(E) {
2583
+ async function GE(E) {
2584
2584
  const C = PA(E.name), i = HC[C] ?? "text/plain", s = await E.readBytes();
2585
2585
  return s ? new File([new Blob([s], { type: i })], E.name, { type: i }) : null;
2586
2586
  }
@@ -2605,16 +2605,16 @@ function Ng(E, C) {
2605
2605
  Q && Q.removeAllRanges(), Q && Q.addRange(w);
2606
2606
  }
2607
2607
  }
2608
- function FE(E) {
2608
+ function yE(E) {
2609
2609
  Ng(E, "all");
2610
2610
  }
2611
- function RE(E) {
2611
+ function UE(E) {
2612
2612
  Ng(E, "start");
2613
2613
  }
2614
- function hE(E) {
2614
+ function cE(E) {
2615
2615
  Ng(E, "end");
2616
2616
  }
2617
- function GE(E, C) {
2617
+ function NE(E, C) {
2618
2618
  if (!E)
2619
2619
  return "";
2620
2620
  if (C) {
@@ -2624,21 +2624,21 @@ function GE(E, C) {
2624
2624
  const i = new RegExp(" ", "g");
2625
2625
  return E.replace(i, " ");
2626
2626
  }
2627
- function yE(E, C = {}) {
2627
+ function ME(E, C = {}) {
2628
2628
  return E ? E(C).some((i) => i.type === ZB || Array.isArray(i.children) && !i.children.length ? !1 : i.type !== WB || typeof i.children == "string" && i.children.trim() !== "") : !1;
2629
2629
  }
2630
- function UE(E = "?") {
2630
+ function tE(E = "?") {
2631
2631
  const C = E.length === 1 ? E.charCodeAt(0) % 64 : (E.charCodeAt(0) + E.charCodeAt(1)) % 64, i = E[0] === "?" ? "?" : C.toFixed();
2632
2632
  return XB[i];
2633
2633
  }
2634
- function cE(E) {
2634
+ function LE(E) {
2635
2635
  if (E) {
2636
2636
  let C = E.substring(1), i = parseInt(C, 16);
2637
2637
  return i = 16777215 ^ i, C = i.toString(16), C = ("00000" + C).slice(-6), C = `#${C}`, C;
2638
2638
  }
2639
2639
  return "#000";
2640
2640
  }
2641
- function NE(E) {
2641
+ function kE(E) {
2642
2642
  const C = document.createElement("div");
2643
2643
  return C.innerHTML = E, C.innerText;
2644
2644
  }
@@ -2968,16 +2968,16 @@ function xC() {
2968
2968
  }
2969
2969
  var fC = xC();
2970
2970
  const qC = /* @__PURE__ */ Ug(fC);
2971
- function ME(E) {
2971
+ function SE(E) {
2972
2972
  Rg.extend(qC);
2973
2973
  const C = Rg(), i = Rg(E);
2974
2974
  return C.isSame(i, "day") ? i.format("HH:mm") : C.isBefore(i.add(3, "day")) ? i.fromNow() : i.format("YYYY-MM-DD");
2975
2975
  }
2976
- function tE(E) {
2976
+ function JE(E) {
2977
2977
  return `${E[0].toLocaleUpperCase()}${E.slice(1)}`;
2978
2978
  }
2979
2979
  const TQ = ["B", "KB", "MB", "GB", "TB"];
2980
- function LE(E) {
2980
+ function eE(E) {
2981
2981
  if (!E)
2982
2982
  return "0";
2983
2983
  let C = E, i = 0;
@@ -3172,7 +3172,7 @@ const mC = [
3172
3172
  "xpm",
3173
3173
  "xwd"
3174
3174
  ];
3175
- function kE({ type: E, fullName: C }) {
3175
+ function KE({ type: E, fullName: C }) {
3176
3176
  const i = PA(C);
3177
3177
  return E ? mC.includes(E) : i ? bC.includes(i) : !1;
3178
3178
  }
@@ -3222,7 +3222,7 @@ const VC = [
3222
3222
  "video/x-ms-wmx",
3223
3223
  "video/x-ms-wvx"
3224
3224
  ], vC = ["3g2", "3gp", "3gpp", "asf", "asx", "avi", "f4v", "fli", "flv", "fvt", "h261", "h263", "h264", "jpgm", "jpgv", "jpm", "m1v", "m2v", "m4s", "m4u", "mj2", "mjp2", "mk3d", "mks", "mkv", "mp4", "mp4v", "mpg4", "m4v", "mpg", "mpg4", "mpe", "mpeg", "mxu", "qt", "smv", "uvh", "uvm", "uvp", "uvs", "uvu", "uvv", "uvvh", "uvvm", "uvvp", "uvvs", "uvvu", "uvvv", "viv", "vob", "wmv", "wm", "wmv", "wmx", "wvx", "mov", "movie", "ogv", "webm", "mkv"];
3225
- function SE({ type: E, fullName: C }) {
3225
+ function nE({ type: E, fullName: C }) {
3226
3226
  const i = PA(C);
3227
3227
  return E ? VC.includes(E) : i ? vC.includes(i) : !1;
3228
3228
  }
@@ -3270,7 +3270,7 @@ const ZC = [
3270
3270
  "audio/x-ms-wma",
3271
3271
  "audio/xm"
3272
3272
  ], WC = ["au", "aac", "adp", "adts", "aif", "aifc", "aiff", "amr", "caf", "dra", "dts", "dtshd", "eol", "flac", "kar", "m2a", "m3a", "m3u", "mp3", "m4a", "mid", "midi", "mka", "mp2", "mp2a", "mp4a", "mpga", "msmf", "oga", "ogg", "opus", "ra", "ram", "rip", "rmi", "s3m", "snd", "spx", "uva", "uvva", "wav", "wax", "weba", "wma", "xm"];
3273
- function JE({ type: E, fullName: C }) {
3273
+ function YE({ type: E, fullName: C }) {
3274
3274
  const i = PA(C);
3275
3275
  return E ? ZC.includes(E) : i ? WC.includes(i) : !1;
3276
3276
  }
@@ -3309,7 +3309,7 @@ const TC = [
3309
3309
  "application/zip",
3310
3310
  "application/x-zoo"
3311
3311
  ], OC = ["a", "ar", "iso", "tar", "br", "bz2", "genozip", "gzip", "lz", "lzma", "lzo", "sz", "xz", "7z", "s7z", "aar", "ace", "alz", "apk", "arc", "ark", "cdx", "arj", "b1", "cab", "car", "cfs", "xdar", "dmg", "ice", "jar", "lzh", "lha", "lzx", "pea", "rar", "tgz", "txz", "war", "xar", "zip", "zipx", "zoo", "zz"];
3312
- function eE({ type: E, fullName: C }) {
3312
+ function rE({ type: E, fullName: C }) {
3313
3313
  const i = PA(C);
3314
3314
  return E ? TC.includes(E) : i ? OC.includes(i) : !1;
3315
3315
  }
@@ -3321,14 +3321,14 @@ function XC(E, C = "text/plain") {
3321
3321
  const s = [...atob(E)].map((Q) => Q.charCodeAt(0)), w = new Uint8Array(s);
3322
3322
  return new Blob([w], { type: C });
3323
3323
  }
3324
- function KE(E) {
3324
+ function HE(E) {
3325
3325
  const C = E.indexOf(";base64,");
3326
3326
  if (C < 8)
3327
3327
  throw new Error("Fail to parse given string as data url");
3328
3328
  const i = E.substring(5, C);
3329
3329
  return XC(E.substring(C + 8), i);
3330
3330
  }
3331
- function nE(E, C = "image/png") {
3331
+ function lE(E, C = "image/png") {
3332
3332
  let i = E.length;
3333
3333
  const s = new Array(i);
3334
3334
  for (; i--; )
@@ -3336,7 +3336,7 @@ function nE(E, C = "image/png") {
3336
3336
  const w = s.join(""), Q = window.btoa(w);
3337
3337
  return `data:${C};base64,${Q}`;
3338
3338
  }
3339
- function YE(E, C) {
3339
+ function pE(E, C) {
3340
3340
  return new Promise((i, s) => {
3341
3341
  try {
3342
3342
  const w = document.createElement("img");
@@ -3358,7 +3358,7 @@ function YE(E, C) {
3358
3358
  }
3359
3359
  });
3360
3360
  }
3361
- async function rE(E) {
3361
+ async function dE(E) {
3362
3362
  return new Promise((C, i) => {
3363
3363
  const s = new FileReader();
3364
3364
  s.onload = (w) => {
@@ -3370,7 +3370,7 @@ async function rE(E) {
3370
3370
  }, s.readAsArrayBuffer(E);
3371
3371
  });
3372
3372
  }
3373
- async function HE(E, C, i) {
3373
+ async function uE(E, C, i) {
3374
3374
  return new Promise((s) => {
3375
3375
  const w = document.createElement("video");
3376
3376
  w.setAttribute("src", URL.createObjectURL(E)), w.load(), w.addEventListener("error", (Q) => {
@@ -3395,11 +3395,11 @@ async function HE(E, C, i) {
3395
3395
  });
3396
3396
  });
3397
3397
  }
3398
- function lE(E) {
3398
+ function xE(E) {
3399
3399
  const C = TB(E);
3400
3400
  return C?.$el ?? C;
3401
3401
  }
3402
- function pE(E) {
3402
+ function fE(E) {
3403
3403
  return OB() ? (jB(E), !0) : !1;
3404
3404
  }
3405
3405
  var aI = void 0, PC = function(E) {
@@ -5167,48 +5167,52 @@ function $C(E) {
5167
5167
  return E.replace(/[A-Z]/g, (C) => `_${C.toLowerCase()}`);
5168
5168
  }
5169
5169
  export {
5170
+ QE as DIALOGS_KEY,
5171
+ BE as I18N_KEY,
5172
+ CE as NOTIFICATIONS_KEY,
5170
5173
  jQ as NamedProcs,
5171
5174
  zA as SQLiteOn3NStorage,
5172
5175
  OQ as SingleCyclicProc,
5173
5176
  yg as SingleProc,
5174
- EE as TaskRunner,
5177
+ wE as TaskRunner,
5178
+ EE as VUEBUS_KEY,
5175
5179
  XC as b64ToBlob,
5176
- KE as blobFromDataURL,
5180
+ HE as blobFromDataURL,
5177
5181
  jC as blobToB64,
5178
- tE as capitalize,
5182
+ JE as capitalize,
5179
5183
  XB as colorsMap,
5180
- HE as createVideoThumbnail,
5181
- QE as defer,
5184
+ uE as createVideoThumbnail,
5185
+ iE as defer,
5182
5186
  gE as emoticons,
5183
- rE as fileToUint8Array,
5184
- LE as formatFileSize,
5185
- wE as getDeliveryErrors,
5186
- UE as getElementColor,
5187
+ dE as fileToUint8Array,
5188
+ eE as formatFileSize,
5189
+ RE as getDeliveryErrors,
5190
+ tE as getElementColor,
5187
5191
  PA as getFileExtension,
5188
- DE as getRandomId,
5189
- yE as hasSlotContent,
5190
- NE as html2text,
5191
- cE as invertColor,
5192
- eE as isFileArchive,
5193
- JE as isFileAudio,
5194
- kE as isFileImage,
5195
- SE as isFileVideo,
5192
+ aE as getRandomId,
5193
+ ME as hasSlotContent,
5194
+ kE as html2text,
5195
+ LE as invertColor,
5196
+ rE as isFileArchive,
5197
+ YE as isFileAudio,
5198
+ KE as isFileImage,
5199
+ nE as isFileVideo,
5196
5200
  IE as mailReg,
5197
- CE as makeSyncedFunc,
5198
- GE as markSearch,
5201
+ oE as makeSyncedFunc,
5202
+ NE as markSearch,
5199
5203
  HC as mimeTypes,
5200
- oE as patchTextareaMaxRowsSupport,
5201
- ME as prepareDateAsSting,
5202
- YE as resizeImage,
5203
- iE as round,
5204
+ FE as patchTextareaMaxRowsSupport,
5205
+ SE as prepareDateAsSting,
5206
+ pE as resizeImage,
5207
+ sE as round,
5204
5208
  _B as schedulerYield,
5205
- FE as selectAll,
5206
- hE as selectEnd,
5207
- RE as selectStart,
5208
- BE as sleep,
5209
- sE as transformFileToWeb3NFile,
5210
- aE as transformWeb3nFileToFile,
5211
- pE as tryOnScopeDispose,
5212
- nE as uint8ToDataURL,
5213
- lE as unrefElement
5209
+ yE as selectAll,
5210
+ cE as selectEnd,
5211
+ UE as selectStart,
5212
+ DE as sleep,
5213
+ hE as transformFileToWeb3NFile,
5214
+ GE as transformWeb3nFileToFile,
5215
+ fE as tryOnScopeDispose,
5216
+ lE as uint8ToDataURL,
5217
+ xE as unrefElement
5214
5218
  };
@@ -1,2 +1,2 @@
1
- import { Slot } from '../../../vue/dist/vue.esm-bundler.js';
1
+ import { Slot } from 'vue';
2
2
  export declare function hasSlotContent(slot?: Slot, slotProps?: {}): boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@v1nt1248/3nclient-lib",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "author": "v1nt1248",
5
- "version": "0.2.87",
5
+ "version": "0.2.89",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -23,12 +23,12 @@ export interface Ui3nDialogComponentProps<V> {
23
23
  cancelButtonBackground?: string;
24
24
  closeOnClickOverlay?: boolean;
25
25
  closeOnEsc?: boolean;
26
- data?: V | null | Event | undefined;
26
+ data?: V;
27
27
  isValid?: boolean;
28
28
  }
29
29
 
30
30
  export interface Ui3nDialogComponentEmits<V> {
31
- (event: 'action', value: { event: Ui3nDialogEvent; data?: V | null | Event | undefined }): void;
31
+ (event: 'action', value: { event: Ui3nDialogEvent; data?: V }): void;
32
32
  }
33
33
 
34
34
  export interface Ui3nDialogComponentSlots {
@@ -1,30 +1,31 @@
1
1
  <script lang="ts" setup generic="V extends any">
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
3
  import { type Component, inject } from 'vue';
4
- import { DIALOGS_KEY, type DialogsPlugin } from '@/plugins';
4
+ import type { DialogsPlugin } from '@/plugins';
5
5
  import type { ExtractComponentProps } from '@/types';
6
6
  import type { Ui3nDialogComponentProps, Ui3nDialogEvent } from './types';
7
+ import { DIALOGS_KEY } from '@/constants';
7
8
 
8
- const { dialogStack, $closeDialog } = inject<DialogsPlugin>(DIALOGS_KEY)!
9
+ const dialogs = inject<DialogsPlugin>(DIALOGS_KEY)!;
9
10
 
10
11
  function clickOverlay(id: string, modalProps: ExtractComponentProps<Component>) {
11
12
  if (
12
13
  (modalProps as Ui3nDialogComponentProps<any>).closeOnClickOverlay ||
13
14
  ((modalProps as any).dialogProps as Ui3nDialogComponentProps<any>)?.closeOnClickOverlay
14
15
  ) {
15
- $closeDialog(id, { event: 'click-overlay' });
16
+ dialogs.$closeDialog(id, { event: 'click-overlay' });
16
17
  }
17
18
  }
18
19
 
19
20
  function onAction(id: string, value: { event: Ui3nDialogEvent; data?: V }) {
20
- $closeDialog(id, value);
21
+ dialogs.$closeDialog(id, value);
21
22
  }
22
23
  </script>
23
24
 
24
25
  <template>
25
26
  <teleport to="body">
26
27
  <div
27
- v-for="dialog in dialogStack"
28
+ v-for="dialog in dialogs.dialogStack.value"
28
29
  :id="`dialog-wrapper-${dialog.id}`"
29
30
  :key="dialog.id"
30
31
  :class="$style['dialog-provider-overlay']"
@@ -12,13 +12,14 @@
12
12
  cssStyle: () => ({}),
13
13
  contentCssClass: () => [],
14
14
  contentCssStyle: () => ({}),
15
+ confirmButton: true,
16
+ cancelButton: true,
15
17
  confirmButtonText: 'Done',
16
18
  cancelButtonText: 'Cancel',
17
19
  confirmButtonColor: 'var(--color-text-button-primary-default)',
18
20
  cancelButtonColor: 'var(--color-text-button-secondary-default)',
19
21
  confirmButtonBackground: 'var(--color-bg-button-primary-default)',
20
22
  cancelButtonBackground: 'var(--color-bg-button-secondary-default)',
21
- data: null,
22
23
  isValid: true,
23
24
  },
24
25
  );