vuesp-components 4.0.1 → 4.1.0

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.
@@ -0,0 +1,64 @@
1
+ const c = (t) => {
2
+ try {
3
+ return t ? JSON.parse(t) : null;
4
+ } catch (o) {
5
+ return console.warn(o), t;
6
+ }
7
+ }, i = (t) => typeof t == "object" ? JSON.stringify(t) : t, g = (t) => c(i(t)), h = (t) => {
8
+ const o = ["B", "KB", "MB"];
9
+ if (t == 0) return "0 B";
10
+ let e = Math.floor(Math.log(t) / Math.log(1024));
11
+ return e > 1 && (e = 1), Math.round(t / Math.pow(1024, e)) + " " + o[e];
12
+ }, p = (t, o = { year: "numeric", month: "numeric", day: "numeric" }, e = []) => new Date(t).toLocaleDateString(e, o), S = (t, o = { minute: "2-digit", hour: "2-digit" }, e = []) => new Date(t).toLocaleTimeString(e, o), s = (t) => t >= 10 ? t : `0${t}`, y = (t) => {
13
+ const o = Math.floor(t % 31536e3 % 2628e3 / 86400), e = Math.floor(t % (3600 * 24) / 3600), n = Math.floor(t % 3600 / 60), u = Math.floor(t % 60);
14
+ return `${o ? o + " days " : ""} ${s(e)}:${s(n)}:${s(u)}`;
15
+ }, w = (t) => t.join("."), M = (t) => t.split(".").map((o) => +o), T = (t = 6) => [...Array(t)].map(() => "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[Math.random() * 62 | 0]).join(""), E = (t, o = "file") => {
16
+ if (typeof document > "u") return;
17
+ const e = document.createElement("a");
18
+ e.setAttribute("download", o), e.href = t, document.body.appendChild(e), e.click(), e.remove();
19
+ }, b = (t) => new Promise((o, e) => {
20
+ if (typeof document > "u") {
21
+ e(new Error("Script loading is available only in a browser"));
22
+ return;
23
+ }
24
+ const n = document.createElement("script");
25
+ n.src = t, n.type = "text/javascript", n.async = !0, n.onload = () => o(n), n.onerror = () => e(new Error(`Ошибка загрузки скрипта: ${t}`)), document.head.appendChild(n);
26
+ }), r = typeof window < "u", a = (t) => (o, e) => e ? c(t.getItem(o)) : t.getItem(o), l = (t) => (o, e) => {
27
+ t.setItem(o, typeof e == "string" ? e : i(e));
28
+ }, m = r ? a(localStorage) : () => null, d = r ? l(localStorage) : () => {
29
+ }, j = r ? a(sessionStorage) : () => null, L = r ? l(sessionStorage) : () => {
30
+ }, k = (t = "isShow") => {
31
+ const o = m(t);
32
+ return o || d(t, "true"), !o;
33
+ }, B = (t) => {
34
+ d("theme", t), !(typeof document > "u") && (document.documentElement.classList.remove("dark"), document.documentElement.classList.remove("light"), document.documentElement.classList.add(t));
35
+ }, f = (t, o) => {
36
+ if (!t) return null;
37
+ for (const e of t)
38
+ if (!(o === "/" || e.path === "/") && e.path && (e.path === o || o.includes(e.path)))
39
+ return e;
40
+ return null;
41
+ }, $ = (t, o) => f(t, o);
42
+ export {
43
+ s as a,
44
+ w as b,
45
+ B as c,
46
+ g as d,
47
+ E as e,
48
+ p as f,
49
+ f as g,
50
+ $ as h,
51
+ k as i,
52
+ c as j,
53
+ i as k,
54
+ b as l,
55
+ m,
56
+ d as n,
57
+ j as o,
58
+ L as p,
59
+ M as q,
60
+ T as r,
61
+ y as s,
62
+ S as t,
63
+ h as u
64
+ };
@@ -1,10 +1,27 @@
1
1
  import { IAppHeaderProps } from './types';
2
- declare const _default: import('vue').DefineComponent<IAppHeaderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ status?(_: {}): any;
6
+ actions?(_: {}): any;
7
+ account?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ rootEl: HTMLElement;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<IAppHeaderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
14
  sidebar: (value: Event) => any;
4
15
  notif: (value: Event) => any;
5
16
  }, string, import('vue').PublicProps, Readonly<IAppHeaderProps> & Readonly<{
6
17
  onSidebar?: ((value: Event) => any) | undefined;
7
18
  onNotif?: ((value: Event) => any) | undefined;
8
19
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
9
21
  export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
10
27
  //# sourceMappingURL=AppHeader.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/app/AppHeader.vue"],"names":[],"mappings":"AAuDA;AAiGA,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,wBAAwB,CAAC;;;;;;;;AAwV/E,wBAQG"}
1
+ {"version":3,"file":"AppHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/app/AppHeader.vue"],"names":[],"mappings":"AA6DA;AAuGA,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,wBAAwB,CAAC;AAyC/E,iBAAS,cAAc;WA+RT,OAAO,IAA6B;;wBAZrB,GAAG;yBACF,GAAG;yBACH,GAAG;;;;EAehC;AAqBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;0FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -9,8 +9,8 @@ declare function __VLS_template(): {
9
9
  'icon-children'?(_: {
10
10
  item: {
11
11
  name: string;
12
- path: string;
13
- icon: string;
12
+ path: string | undefined;
13
+ icon: string | undefined;
14
14
  };
15
15
  }): any;
16
16
  'icon-children'?(_: {
@@ -1 +1 @@
1
- {"version":3,"file":"AppNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/app/AppNav.vue"],"names":[],"mappings":"AA8DA;AAiHA,OAAO,KAAK,EAAE,YAAY,EAAgB,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAiDzC,iBAAS,cAAc;WAsKT,OAAO,IAA6B;;;;YAZxB,GAAG;;;;;;;YACS,GAAG;;;YACH,GAAG;;;;EAexC;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;0FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"AppNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/app/AppNav.vue"],"names":[],"mappings":"AA6FA;AA+NA,OAAO,KAAK,EAAiB,YAAY,EAAgB,MAAM,wBAAwB,CAAC;AACxF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAuGzC,iBAAS,cAAc;WAyPT,OAAO,IAA6B;;;;YAZvB,GAAG;;;;;;;YACQ,GAAG;;;YACH,GAAG;;;;EAexC;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;0FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { IMenuItem } from '../../types';
2
+ type __VLS_Props = {
3
+ item: IMenuItem;
4
+ level: number;
5
+ activePath: string;
6
+ compact: boolean;
7
+ };
8
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ select: () => any;
10
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onSelect?: (() => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
13
+ export default _default;
14
+ //# sourceMappingURL=AppNavItem.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/app/AppNavItem.vue"],"names":[],"mappings":"AAgEA;AAyIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;;;;;;AAyOF,wBAQG"}
@@ -8,14 +8,22 @@ export interface IAppAsideEmits {
8
8
  export interface IAppHeaderProps {
9
9
  changeTheme?: (value?: string) => void;
10
10
  notifications: INotification[];
11
+ showLogout?: boolean;
11
12
  }
12
13
  export interface IAppHeaderEmits {
13
14
  (e: 'sidebar' | 'notif', value: Event): void;
14
15
  }
16
+ export interface IAppMenuGroup {
17
+ key?: string;
18
+ title: string;
19
+ items: IMenuItem[];
20
+ }
15
21
  export interface IAppNavProps {
16
22
  menu?: IMenuItem[];
23
+ groups?: IAppMenuGroup[];
17
24
  fullPath?: string;
18
25
  isSidebar?: boolean;
26
+ storageKey?: string;
19
27
  }
20
28
  export interface IAppNavEmits {
21
29
  (e: 'sidebar', value: boolean): void;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/app/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AACD,MAAM,WAAW,cAAc;IAC7B,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,aAAa,EAAE,aAAa,EAAE,CAAC;CAChC;AACD,MAAM,WAAW,eAAe;IAC9B,CAAC,CAAC,EAAE,SAAS,GAAG,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9C;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AACD,MAAM,WAAW,YAAY;IAC3B,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,aAAa,EAAE,CAAC;CAChC;AACD,MAAM,WAAW,qBAAqB;IACpC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACjC,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;CACnD;AAED,MAAM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