@webitel/ui-sdk 26.4.30 → 26.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BgvQJ55B.js → index-CWYU_mwG.js} +1 -1
- package/dist/{index-BDiSa4-m.js → index-Cm3e6GRo.js} +1 -1
- package/dist/{install-CmnYn4Q5.js → install-MeHxIEWi.js} +37 -36
- package/dist/{isObject-KF_Ebg5z.js → isObject-D71pqbIt.js} +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +1 -1
- package/dist/{useVidstackSrc-B0xwIfTb.js → useVidstackSrc-CpHWbv6g.js} +1 -1
- package/dist/{vidstack-Bq6c3Bam-DhvXCxPV.js → vidstack-Bq6c3Bam-Bt_4I4OY.js} +3 -3
- package/dist/{vidstack-D2pY00kU-sPoBbX0L.js → vidstack-D2pY00kU-TAqIAVUC.js} +3 -3
- package/dist/{vidstack-DDXt6fpN-BM2BGxFz.js → vidstack-DDXt6fpN-BwFa-8yL.js} +2 -2
- package/dist/{vidstack-D_-9AA6_-C2DgO-os.js → vidstack-D_-9AA6_-Fj0XhDLk.js} +2 -2
- package/dist/{vidstack-DqAw8m9J-Ysy5Vb6Y.js → vidstack-DqAw8m9J-B_83AagG.js} +1 -1
- package/dist/{vidstack-audio-B37XwcY8.js → vidstack-audio-_sHFibxB.js} +2 -2
- package/dist/{vidstack-dash-BXHoBGdo.js → vidstack-dash-osW7_t7U.js} +4 -4
- package/dist/{vidstack-google-cast-D9nG4uOf.js → vidstack-google-cast-Dojpp59m.js} +4 -4
- package/dist/{vidstack-hls-BcaqlMdk.js → vidstack-hls-DXkSTucY.js} +4 -4
- package/dist/{vidstack-video-DhvV6yuT.js → vidstack-video-C7Qptkzg.js} +3 -3
- package/dist/{vidstack-vimeo-BIOQ72l9.js → vidstack-vimeo-CeaMORm2.js} +4 -4
- package/dist/{vidstack-youtube-LPvkuIr0.js → vidstack-youtube-BdX6H3uU.js} +3 -3
- package/dist/{wt-action-bar-5Y74_D0e.js → wt-action-bar-CBibsTjl.js} +1 -1
- package/dist/{wt-button-select-DZslcZ1V.js → wt-button-select-Pons2KxM.js} +1 -1
- package/dist/{wt-chat-emoji-D3g6pOHE.js → wt-chat-emoji-gtRYtqkJ.js} +2 -2
- package/dist/{wt-confirm-dialog-ZFQkFkvI.js → wt-confirm-dialog-C-zIlk7t.js} +1 -1
- package/dist/{wt-context-menu-C4yrbjs6.js → wt-context-menu-gqhg9Dut.js} +1 -1
- package/dist/{wt-copy-action-B4_vhvMK.js → wt-copy-action-q5aQb8MF.js} +1 -1
- package/dist/{wt-datepicker-B7l8plHH.js → wt-datepicker-DpDI_kB8.js} +1 -1
- package/dist/{wt-display-chip-items-CfngGHWP.js → wt-display-chip-items-mlhCN3fk.js} +1 -1
- package/dist/{wt-dual-panel-YwIAy-CK.js → wt-dual-panel-BsgUBc28.js} +1 -1
- package/dist/{wt-dummy-CvpMQfG2.js → wt-dummy-BJqC03G2.js} +1 -1
- package/dist/{wt-error-page-D-Y9PhH1.js → wt-error-page-fD1n6Ca8.js} +1 -1
- package/dist/{wt-expansion-card-tqRrluyb.js → wt-expansion-card-BA4S2ek-.js} +1 -1
- package/dist/{wt-expansion-panel-30caNqys.js → wt-expansion-panel-z2cHIrtf.js} +1 -1
- package/dist/{wt-filters-panel-wrapper-D76zEG78.js → wt-filters-panel-wrapper-CMaOQ4qA.js} +1 -1
- package/dist/{wt-galleria-cwy7Tvf-.js → wt-galleria-BM3Xor8E.js} +1 -1
- package/dist/{wt-navigation-menu-BYbM07l8.js → wt-navigation-menu-C5TQqfjM.js} +1 -1
- package/dist/{wt-notifications-bar-DezuiAAo.js → wt-notifications-bar-Coqv4RKY.js} +2 -2
- package/dist/{wt-pagination-BGmYgSMp.js → wt-pagination-C7XbmBD5.js} +1 -1
- package/dist/{wt-player-DQ8YcvKj.js → wt-player-DVXm-whp.js} +2 -2
- package/dist/{wt-screen-recordings-action-iak2FA0l.js → wt-screen-recordings-action-Bs5d5Qza.js} +1 -1
- package/dist/{wt-search-bar-B_a0nLqc.js → wt-search-bar-Q7WOxr_e.js} +1 -1
- package/dist/{wt-selection-popup-Bs5eyX7a.js → wt-selection-popup-XSUoyYXq.js} +1 -1
- package/dist/{wt-start-page-DfMKqk3M.js → wt-start-page-DSLIDt4I.js} +1 -1
- package/dist/{wt-status-select-zfarytHm.js → wt-status-select-k7fT8EML.js} +1 -1
- package/dist/{wt-stepper-DUG3Xaez.js → wt-stepper-B8hTikvF.js} +1 -1
- package/dist/{wt-table-hMzPySzt.js → wt-table-CTQFqBOY.js} +1 -1
- package/dist/{wt-table-actions-u2XOfySQ.js → wt-table-actions-BpjPRhUw.js} +1 -1
- package/dist/{wt-table-column-select-DbZqK3Qm.js → wt-table-column-select-Rxr-d2pp.js} +2 -2
- package/dist/{wt-tabs-DTvCfvL6.js → wt-tabs-DJ64mvrE.js} +1 -1
- package/dist/{wt-tags-input-D3aSj0H_.js → wt-tags-input-CTp5WHMb.js} +2 -2
- package/dist/{wt-timepicker-CtEEP15t.js → wt-timepicker-NAD78264.js} +1 -1
- package/dist/{wt-tree-table-DBI1YzTG.js → wt-tree-table-Cz4fvtT7.js} +1 -1
- package/dist/{wt-tree-DKIlJ5Lj.js → wt-tree-wViLtwUK.js} +2 -2
- package/dist/{wt-type-extension-value-input-D2-w-B9U.js → wt-type-extension-value-input-DlAUGobl.js} +2 -2
- package/dist/{wt-vidstack-player-71xF8aro.js → wt-vidstack-player-1ALWyNaS.js} +10 -10
- package/package.json +1 -1
- package/src/components/wt-button/wt-button.vue +9 -0
- package/src/locale/en/en.js +1 -1
- package/src/locale/es/es.js +1 -1
- package/src/locale/kz/kz.js +1 -1
- package/src/locale/pl/pl.js +1 -1
- package/src/locale/ro/ro.js +1 -1
- package/src/locale/ru/ru.js +1 -1
- package/src/locale/uk/uk.js +1 -1
- package/src/locale/uz/uz.js +1 -1
- package/src/locale/vi/vi.js +1 -1
- package/src/modules/UserNotifications/api/UserNotifications.ts +18 -0
- package/src/modules/UserNotifications/maps/userNotificationConfigsMap.ts +16 -0
- package/src/modules/UserNotifications/stores/__tests__/userNotificationsStore.spec.ts +118 -0
- package/src/modules/UserNotifications/stores/userNotificationsStore.ts +76 -0
- package/src/modules/UserNotifications/types/UserNotifications.ts +15 -0
- package/src/modules/Userinfo/stores/__tests__/UserinfoAccessControl.spec.ts +19 -11
- package/src/modules/Userinfo/stores/userinfoStore.ts +10 -1
- package/types/locale/en/en.d.ts +1 -1
- package/types/locale/es/es.d.ts +1 -1
- package/types/locale/i18n.d.ts +9 -9
- package/types/locale/index.d.ts +9 -9
- package/types/locale/kz/kz.d.ts +1 -1
- package/types/locale/pl/pl.d.ts +1 -1
- package/types/locale/ro/ro.d.ts +1 -1
- package/types/locale/ru/ru.d.ts +1 -1
- package/types/locale/uk/uk.d.ts +1 -1
- package/types/locale/uz/uz.d.ts +1 -1
- package/types/locale/vi/vi.d.ts +1 -1
- package/types/modules/UserNotifications/api/UserNotifications.d.ts +2 -0
- package/types/modules/UserNotifications/maps/userNotificationConfigsMap.d.ts +1 -0
- package/types/modules/UserNotifications/stores/userNotificationsStore.d.ts +105 -0
- package/types/modules/UserNotifications/types/UserNotifications.d.ts +13 -0
- package/types/modules/Userinfo/stores/userinfoStore.d.ts +4 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as k, onMounted as P, onUnmounted as D, useAttrs as Z, computed as $, resolveComponent as w, createBlock as A, openBlock as y, mergeProps as j, unref as i, withCtx as s, createVNode as a, createTextVNode as x, toDisplayString as g, createElementVNode as m, renderSlot as J, defineComponent as K, mergeModels as B, useModel as S, watch as F, nextTick as Q, createElementBlock as L, Fragment as W, createCommentVNode as q, normalizeClass as M, withDirectives as X, vShow as Y } from "vue";
|
|
2
|
-
import { _ as ee, B as te } from "./install-
|
|
2
|
+
import { _ as ee, B as te } from "./install-MeHxIEWi.js";
|
|
3
3
|
const le = () => {
|
|
4
4
|
const e = k(!1), c = () => {
|
|
5
5
|
e.value ? l() : v();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent as h, createElementBlock as l, openBlock as c, Fragment as w, renderList as b, createElementVNode as p, withDirectives as N, normalizeClass as C, createVNode as _, createTextVNode as k, toDisplayString as $, renderSlot as S, vShow as E, withCtx as A, ref as L, computed as v } from "vue";
|
|
2
|
-
import { _ as g } from "./install-
|
|
2
|
+
import { _ as g } from "./install-MeHxIEWi.js";
|
|
3
3
|
const V = { class: "nav-menu__category nav-menu-lvl-1" }, B = ["onClick"], D = {
|
|
4
4
|
__name: "nav-menu-lvl-1",
|
|
5
5
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as p, e as _ } from "./isObject-
|
|
1
|
+
import { i as p, e as _ } from "./isObject-D71pqbIt.js";
|
|
2
2
|
import { resolveComponent as v, createElementBlock as d, openBlock as c, createVNode as B, TransitionGroup as $, withCtx as w, Fragment as g, renderList as x, createBlock as N, createTextVNode as b, toDisplayString as y } from "vue";
|
|
3
|
-
import { _ as k } from "./install-
|
|
3
|
+
import { _ as k } from "./install-MeHxIEWi.js";
|
|
4
4
|
const C = (t) => p(t) && (t.entity || t.module), i = (t) => (o) => (...n) => {
|
|
5
5
|
if (C(n[0])) {
|
|
6
6
|
const u = n[0], { app: f = t, entity: s = "", module: r = "" } = u, e = /* @__PURE__ */ new Date(), a = window?.location?.href || "non-browser env";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as u, D as h } from "./install-
|
|
1
|
+
import { _ as u, D as h } from "./install-MeHxIEWi.js";
|
|
2
2
|
import { resolveComponent as r, resolveDirective as g, createElementBlock as m, openBlock as z, createElementVNode as o, createVNode as a, toDisplayString as b, withDirectives as d } from "vue";
|
|
3
3
|
const t = 10, f = {
|
|
4
4
|
name: "WtPagination",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveComponent as w, createElementBlock as l, openBlock as t, createVNode as o, defineComponent as p, toRefs as k, unref as z, normalizeClass as C, createElementVNode as _, createBlock as y, createCommentVNode as u } from "vue";
|
|
2
|
-
import { u as E, T as x } from "./useVidstackSrc-
|
|
3
|
-
import { _ as i, E as f } from "./install-
|
|
2
|
+
import { u as E, T as x } from "./useVidstackSrc-CpHWbv6g.js";
|
|
3
|
+
import { _ as i, E as f } from "./install-MeHxIEWi.js";
|
|
4
4
|
import { _ as b } from "./wt-slider.vue_vue_type_script_setup_true_lang-DlaRDHxo.js";
|
|
5
5
|
const S = {}, V = { class: "mute-button" };
|
|
6
6
|
function M(n, d) {
|
package/dist/{wt-screen-recordings-action-iak2FA0l.js → wt-screen-recordings-action-Bs5d5Qza.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as h, computed as x, resolveComponent as i, createElementBlock as y, openBlock as r, createVNode as a, createElementVNode as p, withCtx as l, createTextVNode as C, toDisplayString as _, createBlock as k, createCommentVNode as S, unref as T } from "vue";
|
|
2
2
|
import { E } from "./displayText-Cbh4IOfM.js";
|
|
3
|
-
import { _ as B } from "./install-
|
|
3
|
+
import { _ as B } from "./install-MeHxIEWi.js";
|
|
4
4
|
const m = {
|
|
5
5
|
FileTypeScreensharing: "file_type_screensharing"
|
|
6
6
|
}, F = { class: "wt-screen-recordings-action" }, N = { class: "wt-screen-recordings-action__option" }, V = /* @__PURE__ */ h({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as O, toRefs as $, computed as _, resolveComponent as o, resolveDirective as A, createBlock as s, openBlock as d, unref as a, normalizeClass as E, createSlots as U, withCtx as n, createVNode as p, createElementVNode as j, createCommentVNode as m, renderSlot as z, createTextVNode as K, toDisplayString as W, withDirectives as H } from "vue";
|
|
2
|
-
import { z as P, D as R, _ as T } from "./install-
|
|
2
|
+
import { z as P, D as R, _ as T } from "./install-MeHxIEWi.js";
|
|
3
3
|
const q = { class: "wt-search-bar__icon-controls" }, F = /* @__PURE__ */ O({
|
|
4
4
|
__name: "wt-search-bar",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent as i, resolveDirective as $, createBlock as r, openBlock as t, mergeProps as x, withCtx as c, createVNode as f, createTextVNode as a, toDisplayString as s, unref as w, createElementVNode as h, renderSlot as k, createElementBlock as d, Fragment as z, renderList as D, normalizeClass as E, createCommentVNode as p, withDirectives as I } from "vue";
|
|
2
|
-
import { _ as O, B as P } from "./install-
|
|
2
|
+
import { _ as O, B as P } from "./install-MeHxIEWi.js";
|
|
3
3
|
const j = { class: "wt-selection-popup__options" }, A = ["onClick"], F = { class: "wt-selection-popup__item-header typo-subtitle-2" }, L = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "popup-options__item-text"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject as y, resolveComponent as _, createElementBlock as d, openBlock as a, createElementVNode as o, createBlock as u, createCommentVNode as v, createTextVNode as g, toDisplayString as l, createVNode as N, withCtx as f, defineComponent as k, provide as w, computed as m, Fragment as E, renderList as S } from "vue";
|
|
2
|
-
import { N as n, _ as p } from "./install-
|
|
2
|
+
import { N as n, _ as p } from "./install-MeHxIEWi.js";
|
|
3
3
|
n.env.NODE_ENV;
|
|
4
4
|
n.env.NODE_ENV;
|
|
5
5
|
n.env.NODE_ENV;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent as u, createBlock as d, openBlock as f, withCtx as c, createVNode as i } from "vue";
|
|
2
|
-
import { _ as h } from "./install-
|
|
2
|
+
import { _ as h } from "./install-MeHxIEWi.js";
|
|
3
3
|
const s = Object.freeze({
|
|
4
4
|
ONLINE: "online",
|
|
5
5
|
PAUSE: "pause",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as i, resolveComponent as w, createElementBlock as s, openBlock as p, createElementVNode as r, renderSlot as n, Fragment as h, renderList as f, createCommentVNode as y, createVNode as S, normalizeClass as C, withCtx as N, createTextVNode as V, toDisplayString as d } from "vue";
|
|
2
|
-
import { _ as k } from "./install-
|
|
2
|
+
import { _ as k } from "./install-MeHxIEWi.js";
|
|
3
3
|
const x = { class: "wt-stepper" }, b = { class: "wt-stepper-header" }, g = { class: "wt-stepper-steps" }, B = { class: "wt-stepper-steps__wrapper" }, E = { class: "wt-stepper-description" }, $ = {
|
|
4
4
|
__name: "wt-stepper",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as ee, useSlots as te, useTemplateRef as oe, ref as H, computed as _, onMounted as le, onUnmounted as ae, resolveComponent as L, resolveDirective as re, createBlock as f, openBlock as c, createSlots as U, withCtx as i, createCommentVNode as b, createElementBlock as W, createVNode as V, withModifiers as ne, Fragment as se, renderList as de, createElementVNode as $, normalizeStyle as ie, renderSlot as h, createTextVNode as q, toDisplayString as K, withDirectives as ce, nextTick as ue } from "vue";
|
|
2
|
-
import { B as pe, F as fe, _ as me } from "./install-
|
|
2
|
+
import { B as pe, F as fe, _ as me } from "./install-MeHxIEWi.js";
|
|
3
3
|
const ye = (r, E) => {
|
|
4
4
|
let o = null, p = null, w = null, d = !1;
|
|
5
5
|
const v = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as C, computed as l, resolveComponent as p, resolveDirective as g, createElementBlock as S, openBlock as n, renderSlot as y, withDirectives as r, createCommentVNode as u, createVNode as A, createBlock as a, withCtx as B, normalizeClass as I } from "vue";
|
|
2
|
-
import { _ as O } from "./install-
|
|
2
|
+
import { _ as O } from "./install-MeHxIEWi.js";
|
|
3
3
|
const R = { class: "wt-table-actions" }, U = /* @__PURE__ */ C({
|
|
4
4
|
__name: "wt-table-actions",
|
|
5
5
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as C } from "./index-
|
|
1
|
+
import { d as C } from "./index-Cm3e6GRo.js";
|
|
2
2
|
import { resolveComponent as a, resolveDirective as g, createElementBlock as c, openBlock as r, withDirectives as v, createVNode as s, withCtx as n, createTextVNode as i, toDisplayString as p, createElementVNode as h, normalizeClass as S, Fragment as k, renderList as D, withModifiers as y } from "vue";
|
|
3
|
-
import { _ as P } from "./install-
|
|
3
|
+
import { _ as P } from "./install-MeHxIEWi.js";
|
|
4
4
|
const H = {
|
|
5
5
|
name: "WtTableColumnSelect",
|
|
6
6
|
model: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as s, openBlock as a, normalizeClass as o, createElementVNode as r, Fragment as c, renderList as d, renderSlot as u, normalizeProps as f, guardReactiveProps as h, toDisplayString as v, normalizeStyle as m } from "vue";
|
|
2
|
-
import { _ as p } from "./install-
|
|
2
|
+
import { _ as p } from "./install-MeHxIEWi.js";
|
|
3
3
|
const _ = {
|
|
4
4
|
name: "WtTabs",
|
|
5
5
|
model: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as O } from "./index-
|
|
2
|
-
import { G as h, _ as E, C as S, M as z, H as A, J as B } from "./install-
|
|
1
|
+
import { d as O } from "./index-CWYU_mwG.js";
|
|
2
|
+
import { G as h, _ as E, C as S, M as z, H as A, J as B } from "./install-MeHxIEWi.js";
|
|
3
3
|
import { resolveComponent as n, resolveDirective as R, createElementBlock as I, openBlock as v, normalizeClass as P, createBlock as p, createCommentVNode as c, createVNode as o, mergeProps as g, withCtx as a, renderSlot as b, normalizeProps as f, guardReactiveProps as $, createTextVNode as d, toDisplayString as r, toHandlers as j, createSlots as q, withDirectives as V, createElementVNode as w, vShow as H, withModifiers as N } from "vue";
|
|
4
4
|
const D = {
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as q, toRefs as R, computed as o, resolveComponent as w, createElementBlock as O, openBlock as d, normalizeClass as j, unref as t, createBlock as r, createCommentVNode as m, createElementVNode as A, mergeProps as F, withCtx as x, renderSlot as G, normalizeProps as J, guardReactiveProps as K, createTextVNode as S, toDisplayString as y, nextTick as Q } from "vue";
|
|
2
|
-
import { B as W, z as X, C as Y, M as Z, _ as ee } from "./install-
|
|
2
|
+
import { B as W, z as X, C as Y, M as Z, _ as ee } from "./install-MeHxIEWi.js";
|
|
3
3
|
const le = { class: "wt-timepicker__wrapper" }, c = 3600, M = 60, ae = /* @__PURE__ */ q({
|
|
4
4
|
__name: "wt-timepicker",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as C, unref as B, defineComponent as z, ref as M, onMounted as D, resolveComponent as L, createElementBlock as d, openBlock as l, Fragment as $, createElementVNode as u, createCommentVNode as b, normalizeClass as T, renderList as m, renderSlot as p, createBlock as x, createTextVNode as U, toDisplayString as H, createSlots as W, withCtx as I, toRef as O, normalizeStyle as Q, withModifiers as j, createVNode as q } from "vue";
|
|
2
|
-
import { B as G, P as R, Q as J, _ as F, F as X } from "./install-
|
|
2
|
+
import { B as G, P as R, Q as J, _ as F, F as X } from "./install-MeHxIEWi.js";
|
|
3
3
|
const Y = ({ headers: e }) => {
|
|
4
4
|
const { t: y } = G();
|
|
5
5
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as z, computed as L, ref as J, onMounted as K, watch as Q, resolveComponent as I, createElementBlock as v, openBlock as i, Fragment as x, createElementVNode as D, withDirectives as X, renderSlot as T, createBlock as w, createCommentVNode as b, renderList as A, normalizeClass as M, toDisplayString as O, createVNode as Y, withCtx as W, createSlots as U, normalizeProps as q, guardReactiveProps as F, vShow as Z, unref as N } from "vue";
|
|
2
|
-
import { d as P } from "./index-
|
|
3
|
-
import { W as _, _ as R } from "./install-
|
|
2
|
+
import { d as P } from "./index-CWYU_mwG.js";
|
|
3
|
+
import { W as _, _ as R } from "./install-MeHxIEWi.js";
|
|
4
4
|
const ee = { class: "wt-tree-line" }, te = { class: "wt-tree-line__icon-wrapper" }, ae = { class: "wt-tree-line__label typo-body-1" }, le = /* @__PURE__ */ z({
|
|
5
5
|
__name: "wt-tree-line",
|
|
6
6
|
props: {
|
package/dist/{wt-type-extension-value-input-D2-w-B9U.js → wt-type-extension-value-input-DlAUGobl.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as we, mergeModels as Re, useModel as Ae, computed as S, resolveComponent as $, createBlock as Z, renderSlot as F, createCommentVNode as De, unref as D, openBlock as ee, mergeProps as _, createVNode as P } from "vue";
|
|
2
|
-
import { ag as ve, ah as Oe, O as Ee, ai as Ce, aj as qe, B as ke, ak as xe, al as te, am as Se } from "./install-
|
|
3
|
-
import { d as _e } from "./index-
|
|
2
|
+
import { ag as ve, ah as Oe, O as Ee, ai as Ce, aj as qe, B as ke, ak as xe, al as te, am as Se } from "./install-MeHxIEWi.js";
|
|
3
|
+
import { d as _e } from "./index-Cm3e6GRo.js";
|
|
4
4
|
import { get as Ue, set as Be } from "lodash-es";
|
|
5
5
|
import "@aliasedDeps/api-services/axios";
|
|
6
6
|
import * as e from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as lt, inject as ye, createElementBlock as ft, openBlock as G, normalizeClass as be, unref as ot, createElementVNode as at, renderSlot as pt, createVNode as U, useTemplateRef as _i, onMounted as Ii, onBeforeUnmount as Vi, createBlock as Ut, createCommentVNode as Kt, toDisplayString as Di, createSlots as Ds, withCtx as Qt, resolveComponent as Ri, ref as us, provide as Oi, toRefs as Ni } from "vue";
|
|
2
|
-
import { a as q, c as gt, i as B, b as Ie, d as S, e as nt, f as Ve, l as O, s as te, g as Rs, E as Os, D as L, h as Q, o as P, j as Hi, k as f, m as l, n as M, p as Ns, q as Fi, r as he, t as W, V as J, v as w, C as b, S as yt, w as Vt, x as p, y as rt, z, I as Hs, A as Bi, B as Gi, F as tt, G as Ge, H as Fs, J as ps, K as Ue, L as Bs, M as kt, N as Ke, O as ce, P as Ui, Q as xt, R as Ki, U as Qi, W as Wi, X as zi, Y as ji, Z as Yi, _ as Xi, $ as Ji, a0 as Zi, a1 as Gs, a2 as T, a3 as _, a4 as ue, a5 as ta, a6 as Dt, a7 as K, a8 as ea, a9 as sa, aa as ia, ab as aa, ac as ms, ad as na, ae as ra, af as v, ag as y, ah as oa, ai as ha, T as la, u as da } from "./useVidstackSrc-
|
|
3
|
-
import { T as ca, U as ua, V as pa, X as ma, _ as dt, Q as jt, Y as fa, C as Y } from "./install-
|
|
2
|
+
import { a as q, c as gt, i as B, b as Ie, d as S, e as nt, f as Ve, l as O, s as te, g as Rs, E as Os, D as L, h as Q, o as P, j as Hi, k as f, m as l, n as M, p as Ns, q as Fi, r as he, t as W, V as J, v as w, C as b, S as yt, w as Vt, x as p, y as rt, z, I as Hs, A as Bi, B as Gi, F as tt, G as Ge, H as Fs, J as ps, K as Ue, L as Bs, M as kt, N as Ke, O as ce, P as Ui, Q as xt, R as Ki, U as Qi, W as Wi, X as zi, Y as ji, Z as Yi, _ as Xi, $ as Ji, a0 as Zi, a1 as Gs, a2 as T, a3 as _, a4 as ue, a5 as ta, a6 as Dt, a7 as K, a8 as ea, a9 as sa, aa as ia, ab as aa, ac as ms, ad as na, ae as ra, af as v, ag as y, ah as oa, ai as ha, T as la, u as da } from "./useVidstackSrc-CpHWbv6g.js";
|
|
3
|
+
import { T as ca, U as ua, V as pa, X as ma, _ as dt, Q as jt, Y as fa, C as Y } from "./install-MeHxIEWi.js";
|
|
4
4
|
import { _ as ga } from "./wt-slider.vue_vue_type_script_setup_true_lang-DlaRDHxo.js";
|
|
5
5
|
const Us = gt();
|
|
6
6
|
function $() {
|
|
@@ -2070,7 +2070,7 @@ class un {
|
|
|
2070
2070
|
return "audio";
|
|
2071
2071
|
}
|
|
2072
2072
|
async load(t) {
|
|
2073
|
-
return new (await import("./vidstack-audio-
|
|
2073
|
+
return new (await import("./vidstack-audio-_sHFibxB.js")).AudioProvider(this.target, t);
|
|
2074
2074
|
}
|
|
2075
2075
|
}
|
|
2076
2076
|
class je {
|
|
@@ -2083,7 +2083,7 @@ class je {
|
|
|
2083
2083
|
return "video";
|
|
2084
2084
|
}
|
|
2085
2085
|
async load(t) {
|
|
2086
|
-
return new (await import("./vidstack-video-
|
|
2086
|
+
return new (await import("./vidstack-video-C7Qptkzg.js")).VideoProvider(this.target, t);
|
|
2087
2087
|
}
|
|
2088
2088
|
}
|
|
2089
2089
|
class Ye extends je {
|
|
@@ -2093,7 +2093,7 @@ class Ye extends je {
|
|
|
2093
2093
|
return Ye.supported && Ge(t);
|
|
2094
2094
|
}
|
|
2095
2095
|
async load(t) {
|
|
2096
|
-
return new (await import("./vidstack-hls-
|
|
2096
|
+
return new (await import("./vidstack-hls-DXkSTucY.js")).HLSProvider(this.target, t);
|
|
2097
2097
|
}
|
|
2098
2098
|
}
|
|
2099
2099
|
class Xe extends je {
|
|
@@ -2103,7 +2103,7 @@ class Xe extends je {
|
|
|
2103
2103
|
return Xe.supported && Ue(t);
|
|
2104
2104
|
}
|
|
2105
2105
|
async load(t) {
|
|
2106
|
-
return new (await import("./vidstack-dash-
|
|
2106
|
+
return new (await import("./vidstack-dash-osW7_t7U.js")).DASHProvider(this.target, t);
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
2109
|
class pn {
|
|
@@ -2125,7 +2125,7 @@ class pn {
|
|
|
2125
2125
|
return "video";
|
|
2126
2126
|
}
|
|
2127
2127
|
async load(t) {
|
|
2128
|
-
return new (await import("./vidstack-vimeo-
|
|
2128
|
+
return new (await import("./vidstack-vimeo-CeaMORm2.js")).VimeoProvider(this.target, t);
|
|
2129
2129
|
}
|
|
2130
2130
|
async loadPoster(t, e, s) {
|
|
2131
2131
|
const { resolveVimeoVideoId: i, getVimeoVideoInfo: n } = await import("./vidstack-krOAtKMi-C50BTxmn.js");
|
|
@@ -2157,7 +2157,7 @@ class mn {
|
|
|
2157
2157
|
return "video";
|
|
2158
2158
|
}
|
|
2159
2159
|
async load(t) {
|
|
2160
|
-
return new (await import("./vidstack-youtube-
|
|
2160
|
+
return new (await import("./vidstack-youtube-BdX6H3uU.js")).YouTubeProvider(this.target, t);
|
|
2161
2161
|
}
|
|
2162
2162
|
async loadPoster(t, e, s) {
|
|
2163
2163
|
const { findYouTubePoster: i, resolveYouTubeVideoId: n } = await import("./vidstack-Dm1xEU9Q-CXHNvShT.js"), r = S(t.src) && n(t.src);
|
|
@@ -2625,7 +2625,7 @@ class vn extends Ct {
|
|
|
2625
2625
|
throw i.code = "CAST_NOT_AVAILABLE", i;
|
|
2626
2626
|
}
|
|
2627
2627
|
if (ee("https://www.gstatic.com"), !this.#v) {
|
|
2628
|
-
const i = await import("./vidstack-D2pY00kU-
|
|
2628
|
+
const i = await import("./vidstack-D2pY00kU-TAqIAVUC.js").then((n) => n.v);
|
|
2629
2629
|
this.#v = new i.GoogleCastLoader();
|
|
2630
2630
|
}
|
|
2631
2631
|
await this.#v.prompt(this.#s), t && this.#e.queue.enqueue("media-google-cast-request", t);
|
|
@@ -8022,7 +8022,7 @@ class Lr extends v(HTMLElement, ai) {
|
|
|
8022
8022
|
if (this.#e?.classList.contains("vds-google-cast"))
|
|
8023
8023
|
return this.#e;
|
|
8024
8024
|
const t = document.createElement("div");
|
|
8025
|
-
return t.classList.add("vds-google-cast"), import("./vidstack-D_-9AA6_-
|
|
8025
|
+
return t.classList.add("vds-google-cast"), import("./vidstack-D_-9AA6_-Fj0XhDLk.js").then(({ insertContent: e }) => {
|
|
8026
8026
|
e(t, this.#t.$state);
|
|
8027
8027
|
}), t;
|
|
8028
8028
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "26.4.
|
|
3
|
+
"version": "26.4.32",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run biome:format:all || true) && npm run publish-lib",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
<wt-icon
|
|
43
43
|
v-if="icon"
|
|
44
|
+
:class="{ 'wt-button__icon--hidden': showLoader }"
|
|
44
45
|
:icon="icon"
|
|
45
46
|
:icon-prefix="iconPrefix"
|
|
46
47
|
:size="iconButtonSizeMap[size]"
|
|
@@ -175,6 +176,14 @@ watch(
|
|
|
175
176
|
display: contents;
|
|
176
177
|
}
|
|
177
178
|
|
|
179
|
+
/*
|
|
180
|
+
@author HlukhovYe
|
|
181
|
+
Hides the icon instantly when the loader is shown.
|
|
182
|
+
*/
|
|
183
|
+
.wt-button__icon--hidden {
|
|
184
|
+
opacity: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
178
187
|
.wt-badge.wt-badge--absolute {
|
|
179
188
|
position: absolute;
|
|
180
189
|
top: 0;
|
package/src/locale/en/en.js
CHANGED
package/src/locale/es/es.js
CHANGED
package/src/locale/kz/kz.js
CHANGED
|
@@ -838,7 +838,7 @@ export default {
|
|
|
838
838
|
create: ({ named }) => `${named('entity').toLowerCase()} сақталды`,
|
|
839
839
|
delete: ({ named }) => `${named('entity').toLowerCase()} жойылды`,
|
|
840
840
|
},
|
|
841
|
-
|
|
841
|
+
warnings: {
|
|
842
842
|
passwordExpirationMessage:
|
|
843
843
|
'Сіздің құпия сөзіңіз { days } күннен кейін мерзімі аяқталады',
|
|
844
844
|
},
|
package/src/locale/pl/pl.js
CHANGED
|
@@ -838,7 +838,7 @@ export default {
|
|
|
838
838
|
create: ({ named }) => `${named('entity').toLowerCase()} został zapisany`,
|
|
839
839
|
delete: ({ named }) => `${named('entity').toLowerCase()} został usunięty`,
|
|
840
840
|
},
|
|
841
|
-
|
|
841
|
+
warnings: {
|
|
842
842
|
passwordExpirationMessage: 'Twoje hasło wygaśnie za { days } dni',
|
|
843
843
|
},
|
|
844
844
|
},
|
package/src/locale/ro/ro.js
CHANGED
|
@@ -843,7 +843,7 @@ export default {
|
|
|
843
843
|
create: ({ named }) => `${named('entity').toLowerCase()} a fost salvat`,
|
|
844
844
|
delete: ({ named }) => `${named('entity').toLowerCase()} a fost șters`,
|
|
845
845
|
},
|
|
846
|
-
|
|
846
|
+
warnings: {
|
|
847
847
|
passwordExpirationMessage: 'Parola ta va expira în { days } zile',
|
|
848
848
|
},
|
|
849
849
|
},
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -833,7 +833,7 @@ export default {
|
|
|
833
833
|
create: ({ named }) => `${named('entity')} был сохранён`,
|
|
834
834
|
delete: ({ named }) => `${named('entity')} был удалён`,
|
|
835
835
|
},
|
|
836
|
-
|
|
836
|
+
warnings: {
|
|
837
837
|
passwordExpirationMessage: 'Ваш пароль истечёт через { days } дн(я/ей)',
|
|
838
838
|
},
|
|
839
839
|
},
|
package/src/locale/uk/uk.js
CHANGED
|
@@ -832,7 +832,7 @@ export default {
|
|
|
832
832
|
create: ({ named }) => `${named('entity')} було збережено`,
|
|
833
833
|
delete: ({ named }) => `${named('entity')} було видалено`,
|
|
834
834
|
},
|
|
835
|
-
|
|
835
|
+
warnings: {
|
|
836
836
|
passwordExpirationMessage: 'Пароль спливе через { days } дн(і/ів)',
|
|
837
837
|
},
|
|
838
838
|
},
|
package/src/locale/uz/uz.js
CHANGED
|
@@ -841,7 +841,7 @@ export default {
|
|
|
841
841
|
create: ({ named }) => `${named('entity').toLowerCase()} saqlandi`,
|
|
842
842
|
delete: ({ named }) => `${named('entity').toLowerCase()} o'chirildi`,
|
|
843
843
|
},
|
|
844
|
-
|
|
844
|
+
warnings: {
|
|
845
845
|
passwordExpirationMessage:
|
|
846
846
|
'Parolingiz { days } kundan keyin amal qilishdan chiqadi',
|
|
847
847
|
},
|
package/src/locale/vi/vi.js
CHANGED
|
@@ -841,7 +841,7 @@ export default {
|
|
|
841
841
|
create: ({ named }) => `${named('entity').toLowerCase()} đã được lưu`,
|
|
842
842
|
delete: ({ named }) => `${named('entity').toLowerCase()} đã bị xóa`,
|
|
843
843
|
},
|
|
844
|
-
|
|
844
|
+
warnings: {
|
|
845
845
|
passwordExpirationMessage:
|
|
846
846
|
'Mật khẩu của bạn sẽ hết hạn sau { days } ngày',
|
|
847
847
|
},
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyTransform,
|
|
3
|
+
snakeToCamel,
|
|
4
|
+
} from '@webitel/api-services/api/transformers';
|
|
5
|
+
import { getUsers } from '@webitel/api-services/gen';
|
|
6
|
+
|
|
7
|
+
const getUserWarnings = async () => {
|
|
8
|
+
try {
|
|
9
|
+
const response = await getUsers().getUserWarnings();
|
|
10
|
+
return applyTransform(response.data, [
|
|
11
|
+
snakeToCamel(),
|
|
12
|
+
]);
|
|
13
|
+
} catch (err) {
|
|
14
|
+
throw applyTransform(err, []);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { getUserWarnings };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApiUserWarningId } from '@webitel/api-services/gen/models';
|
|
2
|
+
import type { UserNotificationsConfigsMap } from '../types/UserWarnings';
|
|
3
|
+
|
|
4
|
+
export const USER_NOTIFICATION_CONFIGS_MAP = new Map<
|
|
5
|
+
string,
|
|
6
|
+
UserNotificationsConfigsMap
|
|
7
|
+
>([
|
|
8
|
+
[
|
|
9
|
+
ApiUserWarningId.PasswordExpiresSoon,
|
|
10
|
+
{
|
|
11
|
+
type: 'info',
|
|
12
|
+
localeKey: 'passwordExpirationMessage',
|
|
13
|
+
getDays: (warningData) => warningData.passwordExpiry.daysRemaining || 0,
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
]);
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { ApiUserWarningId } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { createPinia, setActivePinia } from 'pinia';
|
|
3
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
4
|
+
import { createApp } from 'vue';
|
|
5
|
+
|
|
6
|
+
type ViMock = ReturnType<typeof vi.fn>;
|
|
7
|
+
|
|
8
|
+
// Mocks for modules used by the store
|
|
9
|
+
vi.mock('../../api/UserNotifications', () => {
|
|
10
|
+
return {
|
|
11
|
+
getUserWarnings: vi.fn(),
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
vi.mock('../../../../locale/i18n', () => {
|
|
16
|
+
return {
|
|
17
|
+
default: {
|
|
18
|
+
global: {
|
|
19
|
+
t: (key: string, payload?: number) =>
|
|
20
|
+
`${key}:${JSON.stringify(payload)}`,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
vi.mock('../../../../scripts/eventBus', () => {
|
|
27
|
+
const emitMock = vi.fn();
|
|
28
|
+
return {
|
|
29
|
+
default: {
|
|
30
|
+
$on: vi.fn(),
|
|
31
|
+
$off: vi.fn(),
|
|
32
|
+
$emit: emitMock,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
import eventBus from '../../../../scripts/eventBus';
|
|
38
|
+
import { getUserWarnings } from '../../api/UserNotifications';
|
|
39
|
+
import { USER_NOTIFICATION_CONFIGS_MAP } from '../../maps/userNotificationConfigsMap';
|
|
40
|
+
import { createUserNotificationsStore } from '../userNotificationsStore';
|
|
41
|
+
|
|
42
|
+
describe('createUserNotificationsStore', () => {
|
|
43
|
+
let useStore: ReturnType<typeof createUserNotificationsStore>;
|
|
44
|
+
let pinia: ReturnType<typeof createPinia>;
|
|
45
|
+
|
|
46
|
+
beforeEach(() => {
|
|
47
|
+
vi.clearAllMocks();
|
|
48
|
+
|
|
49
|
+
pinia = createPinia();
|
|
50
|
+
const app = createApp({});
|
|
51
|
+
app.use(pinia);
|
|
52
|
+
setActivePinia(pinia);
|
|
53
|
+
|
|
54
|
+
useStore = createUserNotificationsStore();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('fetch should call API and populate notifications', async () => {
|
|
58
|
+
// Arrange: mock API to return warnings
|
|
59
|
+
const notificationsResponse = {
|
|
60
|
+
warnings: [
|
|
61
|
+
{
|
|
62
|
+
id: ApiUserWarningId.PasswordExpiresSoon,
|
|
63
|
+
warningData: {
|
|
64
|
+
passwordExpiry: {
|
|
65
|
+
daysRemaining: 5,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
(getUserWarnings as ViMock).mockResolvedValue(notificationsResponse);
|
|
73
|
+
|
|
74
|
+
const store = useStore();
|
|
75
|
+
|
|
76
|
+
// Act
|
|
77
|
+
await store.initialize();
|
|
78
|
+
|
|
79
|
+
// Assert
|
|
80
|
+
expect(store.notifications.length).toBe(1);
|
|
81
|
+
expect(store.notifications[0].days).toBe(5);
|
|
82
|
+
expect(store.notifications[0].localeKey).toBe(
|
|
83
|
+
USER_NOTIFICATION_CONFIGS_MAP.get(ApiUserWarningId.PasswordExpiresSoon)
|
|
84
|
+
?.localeKey,
|
|
85
|
+
);
|
|
86
|
+
expect(getUserWarnings).toHaveBeenCalledOnce();
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('show should emit notification for mapped warnings', async () => {
|
|
90
|
+
const notificationsResponse = {
|
|
91
|
+
warnings: [
|
|
92
|
+
{
|
|
93
|
+
id: ApiUserWarningId.PasswordExpiresSoon,
|
|
94
|
+
warningData: {
|
|
95
|
+
passwordExpiry: {
|
|
96
|
+
daysRemaining: 3,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
(getUserWarnings as ViMock).mockResolvedValue(notificationsResponse);
|
|
104
|
+
|
|
105
|
+
const store = useStore();
|
|
106
|
+
await store.initialize();
|
|
107
|
+
|
|
108
|
+
// Act: show should emit once
|
|
109
|
+
store.show();
|
|
110
|
+
expect(eventBus.$emit).toHaveBeenCalledOnce();
|
|
111
|
+
const [[eventName, payload]] = (eventBus.$emit as ViMock).mock.calls;
|
|
112
|
+
expect(eventName).toBe('notification');
|
|
113
|
+
expect(payload.type).toBe('info');
|
|
114
|
+
expect(payload.text).toContain(
|
|
115
|
+
'systemNotifications.warnings.passwordExpirationMessage',
|
|
116
|
+
);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ApiUserWarning } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { defineStore } from 'pinia';
|
|
3
|
+
import { computed, ref } from 'vue';
|
|
4
|
+
import i18n from '../../../locale/i18n';
|
|
5
|
+
import eventBus from '../../../scripts/eventBus';
|
|
6
|
+
import { getUserWarnings } from '../api/UserNotifications';
|
|
7
|
+
import { USER_NOTIFICATION_CONFIGS_MAP } from '../maps/userNotificationConfigsMap';
|
|
8
|
+
import type {
|
|
9
|
+
NotificationsType,
|
|
10
|
+
UserNotificationsConfigsMap,
|
|
11
|
+
} from '../types/UserNotifications';
|
|
12
|
+
|
|
13
|
+
export const createUserNotificationsStore = () => {
|
|
14
|
+
const namespace = 'userNotifications';
|
|
15
|
+
|
|
16
|
+
const store = defineStore(namespace, () => {
|
|
17
|
+
const rawNotifications = ref<ApiUserWarning[]>([]);
|
|
18
|
+
|
|
19
|
+
const initialize = async () => {
|
|
20
|
+
await fetch();
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const fetch = async () => {
|
|
24
|
+
const response = await getUserWarnings();
|
|
25
|
+
rawNotifications.value =
|
|
26
|
+
(response && (response.warnings as ApiUserWarning[])) ?? [];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const notifications = computed<NotificationsType[]>(() => {
|
|
30
|
+
return rawNotifications.value
|
|
31
|
+
.map((notification) => {
|
|
32
|
+
const config: UserNotificationsConfigsMap =
|
|
33
|
+
USER_NOTIFICATION_CONFIGS_MAP.get(notification.id);
|
|
34
|
+
if (!config) return null;
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
type: config.type,
|
|
38
|
+
localeKey: config.localeKey,
|
|
39
|
+
days: config.getDays(notification.warningData),
|
|
40
|
+
shown: false,
|
|
41
|
+
};
|
|
42
|
+
})
|
|
43
|
+
.filter(Boolean) as NotificationsType[];
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const show = () => {
|
|
47
|
+
notifications.value.forEach((notification) => {
|
|
48
|
+
// @author @Lera24
|
|
49
|
+
//notification should only be displayed the first time you visit the page
|
|
50
|
+
if (notification.shown) return;
|
|
51
|
+
|
|
52
|
+
eventBus.$emit('notification', {
|
|
53
|
+
type: notification.type,
|
|
54
|
+
text: i18n.global.t(
|
|
55
|
+
`systemNotifications.warnings.${notification.localeKey}`,
|
|
56
|
+
{
|
|
57
|
+
days: notification.days,
|
|
58
|
+
},
|
|
59
|
+
),
|
|
60
|
+
});
|
|
61
|
+
notification.shown = true;
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
initialize,
|
|
67
|
+
show,
|
|
68
|
+
|
|
69
|
+
/** internal for devtools/debug */
|
|
70
|
+
rawNotifications,
|
|
71
|
+
notifications,
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
return store;
|
|
76
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface UserNotificationsConfigsMap {
|
|
2
|
+
id: string;
|
|
3
|
+
type: 'info' | 'warning' | 'error';
|
|
4
|
+
localeKey: string;
|
|
5
|
+
getDays: (warningData: number) => number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface NotificationsType {
|
|
9
|
+
type: 'info' | 'warning' | 'error';
|
|
10
|
+
localeKey: string;
|
|
11
|
+
days: number;
|
|
12
|
+
shown?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type { NotificationsType, UserNotificationsConfigsMap };
|