morghulis 3.0.5 → 3.0.7

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,72 @@
1
+ import { type MorghulisDialogConfig, type MorghulisDialogProps } from "../../types";
2
+ declare function open(data?: any, config?: MorghulisDialogConfig): void;
3
+ declare function close(): void;
4
+ declare var __VLS_11: {
5
+ data: {};
6
+ }, __VLS_16: {
7
+ data: {};
8
+ }, __VLS_34: {
9
+ data: {};
10
+ }, __VLS_40: {
11
+ data: {};
12
+ };
13
+ type __VLS_Slots = {} & {
14
+ header?: (props: typeof __VLS_11) => any;
15
+ } & {
16
+ 'header-tool'?: (props: typeof __VLS_16) => any;
17
+ } & {
18
+ default?: (props: typeof __VLS_34) => any;
19
+ } & {
20
+ 'footer-tool'?: (props: typeof __VLS_40) => any;
21
+ };
22
+ declare const __VLS_component: import("vue").DefineComponent<MorghulisDialogProps, {
23
+ open: typeof open;
24
+ close: typeof close;
25
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ close: (...args: any[]) => void;
27
+ "update:title": (...args: any[]) => void;
28
+ "update:subtitle": (...args: any[]) => void;
29
+ }, string, import("vue").PublicProps, Readonly<MorghulisDialogProps> & Readonly<{
30
+ onClose?: ((...args: any[]) => any) | undefined;
31
+ "onUpdate:title"?: ((...args: any[]) => any) | undefined;
32
+ "onUpdate:subtitle"?: ((...args: any[]) => any) | undefined;
33
+ }>, {
34
+ title: string;
35
+ subtitle: string;
36
+ confirmButtonText: string;
37
+ cancelButtonText: string;
38
+ cancel: (data: any, done: () => void) => void;
39
+ showClose: boolean;
40
+ zIndex: number;
41
+ appendTo: string;
42
+ confirm: (data: any, done: () => void) => void;
43
+ width: string | number;
44
+ fullscreen: boolean;
45
+ top: string;
46
+ modal: boolean;
47
+ modalClass: string;
48
+ headerClass: string;
49
+ bodyClass: string;
50
+ footerClass: string;
51
+ appendToBody: boolean;
52
+ lockScroll: boolean;
53
+ openDelay: number;
54
+ closeDelay: number;
55
+ closeOnClickModal: boolean;
56
+ closeOnPressEscape: boolean;
57
+ beforeClose: (done: () => void) => void;
58
+ draggable: boolean;
59
+ overFlow: boolean;
60
+ center: boolean;
61
+ alignCenter: boolean;
62
+ destroyOnClose: boolean;
63
+ closeIcon: string;
64
+ headerAriaLevel: string;
65
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
66
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
67
+ export default _default;
68
+ type __VLS_WithSlots<T, S> = T & {
69
+ new (): {
70
+ $slots: S;
71
+ };
72
+ };
@@ -0,0 +1,8 @@
1
+ import type { MorghulisDialogConfig } from "../../types.ts";
2
+ type __VLS_Props = {
3
+ title: string;
4
+ subtitle: string;
5
+ config: MorghulisDialogConfig;
6
+ };
7
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
@@ -2,12 +2,14 @@ import { App } from "vue";
2
2
  import MButton from "./components/button/MButton.vue";
3
3
  import './style.css';
4
4
  import type { MorghulisOptions } from "./types";
5
+ import MDialog from "./components/dialog/MDialog.vue";
5
6
  declare module "vue" {
6
7
  interface GlobalComponents {
7
8
  MButton: typeof MButton;
9
+ MDialog: typeof MDialog;
8
10
  }
9
11
  }
10
12
  export declare const createMorghulis: (options?: MorghulisOptions) => {
11
13
  install(Vue: App): void;
12
14
  };
13
- export { MButton };
15
+ export { MButton, MDialog };
@@ -0,0 +1,13 @@
1
+ export declare const SYSTEM_KEY: {
2
+ CLIENT: string;
3
+ USER: string;
4
+ AUTH: string;
5
+ };
6
+ export declare function useMorghulisAuthorize(): {
7
+ $client: string;
8
+ user: () => any;
9
+ check: (uid?: any) => boolean;
10
+ login: (uid: any) => void;
11
+ logout: () => void;
12
+ bearer: () => "Bearer 123" | null;
13
+ };
@@ -0,0 +1,2 @@
1
+ import type { MorghulisCore, MorghulisOptions } from "../types";
2
+ export declare function initMorghulis(options?: MorghulisOptions): MorghulisCore;
@@ -1,7 +1,28 @@
1
+ import { Ref } from "vue";
2
+ /**
3
+ * Core
4
+ */
1
5
  export type MorghulisOptions = {
2
6
  baseURL?: string;
3
7
  minioURL?: string;
4
8
  };
9
+ export type MorghulisCore = {
10
+ status: Ref<string>;
11
+ open: () => void;
12
+ channels: MorghulisChannels;
13
+ options: MorghulisOptions;
14
+ };
15
+ /**
16
+ * Channels
17
+ */
18
+ export type MorghulisChannel = {
19
+ start?: () => void;
20
+ stop?: () => void;
21
+ proceed?: (payload: any) => void;
22
+ };
23
+ export type MorghulisChannels = {
24
+ [key: string]: MorghulisChannel;
25
+ };
5
26
  /**
6
27
  * Feedback
7
28
  */
@@ -17,3 +38,47 @@ export interface MorghulisMessageBoxInterface {
17
38
  warning: (content: string, title?: string) => Promise<any>;
18
39
  error: (content: string, title?: string) => Promise<any>;
19
40
  }
41
+ /**
42
+ * Dialog
43
+ */
44
+ type DialogProps = {
45
+ width?: string | number;
46
+ fullscreen?: boolean;
47
+ top?: string;
48
+ modal?: boolean;
49
+ modalClass?: string;
50
+ headerClass?: string;
51
+ bodyClass?: string;
52
+ footerClass?: string;
53
+ appendToBody?: boolean;
54
+ appendTo?: string;
55
+ lockScroll?: boolean;
56
+ openDelay?: number;
57
+ closeDelay?: number;
58
+ closeOnClickModal?: boolean;
59
+ closeOnPressEscape?: boolean;
60
+ showClose?: boolean;
61
+ beforeClose?: (done: () => void) => void;
62
+ draggable?: boolean;
63
+ overFlow?: boolean;
64
+ center?: boolean;
65
+ alignCenter?: boolean;
66
+ destroyOnClose?: boolean;
67
+ closeIcon?: string;
68
+ zIndex?: number;
69
+ headerAriaLevel?: string;
70
+ };
71
+ export type MorghulisDialogProps = DialogProps & {
72
+ title?: string;
73
+ subtitle?: string;
74
+ confirm?: (data: any, done: () => void) => void;
75
+ cancel?: (data: any, done: () => void) => void;
76
+ confirmButtonText?: string;
77
+ cancelButtonText?: string;
78
+ };
79
+ export declare const morghulisDialogPropsDefaults: MorghulisDialogProps;
80
+ export type MorghulisDialogConfig = {
81
+ title?: string;
82
+ subtitle?: string;
83
+ };
84
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "morghulis",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -22,6 +22,9 @@
22
22
  "preview": "vite preview"
23
23
  },
24
24
  "dependencies": {
25
+ "@fortawesome/fontawesome-svg-core": "^6.7.2",
26
+ "@fortawesome/free-solid-svg-icons": "^6.7.2",
27
+ "@fortawesome/vue-fontawesome": "^3.0.8",
25
28
  "element-plus": "^2.9.8",
26
29
  "js-cookie": "^3.0.5",
27
30
  "vue": "^3.5.13"