@juit/vue-modal 1.0.5 → 1.0.6
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/plugin.d.ts +8 -8
- package/dist-cjs/plugin.js +2 -2
- package/dist-cjs/plugin.js.map +1 -1
- package/dist-esm/plugin.js.map +1 -1
- package/eslint.config.mjs +35 -0
- package/package.json +4 -7
- package/src/plugin.ts +13 -10
package/dist/plugin.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { App, DefineComponent, EmitsOptions, Prop } from '@vue/runtime-core';
|
|
2
|
-
|
|
1
|
+
import type { App, DefineComponent, EmitsOptions, Prop } from '@vue/runtime-core';
|
|
2
|
+
type RequiredPropKeys<T> = {
|
|
3
3
|
[K in keyof T]: T[K] extends {
|
|
4
4
|
required: true;
|
|
5
5
|
} ? K : never;
|
|
6
6
|
}[keyof T];
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type OptionalKeys<T> = Exclude<keyof T, RequiredPropKeys<T>>;
|
|
8
|
+
type InferPropType<T> = [T] extends [null] ? any : [T] extends [
|
|
9
9
|
{
|
|
10
10
|
type: null | true;
|
|
11
11
|
}
|
|
@@ -22,7 +22,7 @@ declare type InferPropType<T> = [T] extends [null] ? any : [T] extends [
|
|
|
22
22
|
type: DateConstructor;
|
|
23
23
|
}
|
|
24
24
|
] ? Date : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? D : V : T;
|
|
25
|
-
|
|
25
|
+
type InjectablePropTypes<O> = O extends object ? {
|
|
26
26
|
[K in RequiredPropKeys<O>]: InferPropType<O[K]>;
|
|
27
27
|
} & {
|
|
28
28
|
[K in OptionalKeys<O>]?: InferPropType<O[K]>;
|
|
@@ -32,16 +32,16 @@ declare type InjectablePropTypes<O> = O extends object ? {
|
|
|
32
32
|
declare type DismissModalType<E> = E extends {
|
|
33
33
|
dismissModal: (...args: any[]) => any;
|
|
34
34
|
} ? Parameters<E['dismissModal']>[0] : unknown;
|
|
35
|
-
export
|
|
35
|
+
export type ModalStack = InstanceType<typeof ModalStackComponent>;
|
|
36
36
|
export declare const ModalStackComponent: DefineComponent<{}, {}, {
|
|
37
37
|
stack: string[];
|
|
38
38
|
}, {
|
|
39
39
|
hasModals(): boolean;
|
|
40
|
-
}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("modals" | "modalCreated" | "modalDismissed")[], "modals" | "modalCreated" | "modalDismissed", import("@vue/runtime-core").
|
|
40
|
+
}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("modals" | "modalCreated" | "modalDismissed")[], "modals" | "modalCreated" | "modalDismissed", import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{
|
|
41
41
|
onModals?: ((...args: any[]) => any) | undefined;
|
|
42
42
|
onModalCreated?: ((...args: any[]) => any) | undefined;
|
|
43
43
|
onModalDismissed?: ((...args: any[]) => any) | undefined;
|
|
44
|
-
}, {}>;
|
|
44
|
+
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
45
45
|
export declare function createModal<P, E extends EmitsOptions>(component: DefineComponent<P, any, any, any, any, any, any, E, any>, props?: InjectablePropTypes<P>): Promise<DismissModalType<E>>;
|
|
46
46
|
declare module '@vue/runtime-core' {
|
|
47
47
|
interface ComponentCustomProperties {
|
package/dist-cjs/plugin.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.modals = exports.
|
|
3
|
+
exports.modals = exports.ModalStackComponent = void 0;
|
|
4
|
+
exports.createModal = createModal;
|
|
4
5
|
const runtime_core_1 = require("@vue/runtime-core");
|
|
5
6
|
// A record of modal entries keyed by their IDs. This is necessary so that only
|
|
6
7
|
// the `stack` array in `ModalStackComponent` is _reactive_ while all the
|
|
@@ -78,7 +79,6 @@ function createModal(component, props) {
|
|
|
78
79
|
modalStack === null || modalStack === void 0 ? void 0 : modalStack.stack.push(id);
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
exports.createModal = createModal;
|
|
82
82
|
/**
|
|
83
83
|
* The `vue-modals` plugin, instrumenting the `$createModal()` function on
|
|
84
84
|
* components instances and providing the `<modal-stack/>` component.
|
package/dist-cjs/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":";;;AAmJA,kCAkBC;AArKD,oDAI0B;AAmE1B,+EAA+E;AAC/E,yEAAyE;AACzE,mDAAmD;AACnD,MAAM,OAAO,GAA+B,EAAE,CAAA;AAK9C,mCAAmC;AACnC,IAAI,UAAU,GAA2B,SAAS,CAAA;AAElD,yEAAyE;AAC5D,QAAA,mBAAmB,GAAG,IAAA,8BAAe,EAAC;IACjD,KAAK,EAAE,CAAE,QAAQ,EAAE,cAAc,EAAE,gBAAgB,CAAE;IACrD,IAAI;QACF,OAAO,EAAE,KAAK,EAAE,EAAc,EAAE,CAAA;IAClC,CAAC;IACD,QAAQ,EAAE;QACR,SAAS;YACP,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;QAC9B,CAAC;KACF;IAED,0EAA0E;IAC1E,OAAO;QACL,IAAI,UAAU;YAAE,IAAA,mBAAI,EAAC,kDAAkD,CAAC,CAAA;;YACnE,UAAU,GAAG,IAAW,CAAA;IAC/B,CAAC;IAED,qDAAqD;IACrD,aAAa;QACX,IAAI,UAAU,KAAK,IAAI;YAAE,UAAU,GAAG,SAAS,CAAA;IACjD,CAAC;IAED,gDAAgD;IAChD,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;Y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CACvB,SAAmE,EACnE,KAA8B;IAEhC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,CAAE,UAAU,EAAE,CAAC;YACjB,IAAA,mBAAI,EAAC,wDAAwD,CAAC,CAAA;YAC9D,MAAM,CAAC,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAA;QAC5C,CAAC;QAED,kDAAkD;QAClD,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;aAC3D,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;QAE/C,mEAAmE;QACnE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,CAAA;QAC3C,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC5B,CAAC,CAAC,CAAA;AACJ,CAAC;AAoBD;;;GAGG;AACU,QAAA,MAAM,GAAG;IACpB,OAAO,CAAC,GAAQ;QACd,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,YAAY,GAAG,WAAW,CAAA;QACtD,GAAG,CAAC,SAAS,CAAC,YAAY,EAAE,2BAAmB,CAAC,CAAA;IAClD,CAAC;CACF,CAAA"}
|
package/dist-esm/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,CAAC,EACD,IAAI,GACL,MAAM,mBAAmB,CAAA;AAmE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AAG,CAAC,CAAA;QAE/C,mEAAmE;QACnE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,CAAA;QAC3C,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC5B,CAAC,CAAC,CAAA;AACJ,CAAC;AAoBD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,CAAC,GAAQ;QACd,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,YAAY,GAAG,WAAW,CAAA;QACtD,GAAG,CAAC,SAAS,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAA;IAClD,CAAC;CACF,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import configurations from '@plugjs/eslint-plugin-vue'
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
...configurations,
|
|
5
|
+
|
|
6
|
+
// ===== DEFINE THE LOCATION OF OUR TSCONFIG.JSON FILES ======================
|
|
7
|
+
{
|
|
8
|
+
name: 'local/options',
|
|
9
|
+
|
|
10
|
+
languageOptions: {
|
|
11
|
+
parserOptions: {
|
|
12
|
+
createDefaultProgram: true,
|
|
13
|
+
project: [
|
|
14
|
+
'./tsconfig.json',
|
|
15
|
+
'./tsconfig.app.json',
|
|
16
|
+
'./tsconfig.node.json',
|
|
17
|
+
'./worker/tsconfig.json',
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
// ===== IGNORED FILES =======================================================
|
|
24
|
+
// REMEMBER! Ignores *must* be in its own configuration, they can not coexist
|
|
25
|
+
// with "rules", "languageOptions", "files", ... or anything else, otherwise
|
|
26
|
+
// ESLint will blaantly ignore the ignore files!
|
|
27
|
+
{
|
|
28
|
+
name: 'local/ignores',
|
|
29
|
+
|
|
30
|
+
ignores: [
|
|
31
|
+
'dist/',
|
|
32
|
+
'public/',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juit/vue-modal",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "TypeScript Modals for Vue.js 3",
|
|
5
5
|
"main": "dist-cjs/plugin.js",
|
|
6
6
|
"module": "dist-esm/plugin.js",
|
|
@@ -27,12 +27,9 @@
|
|
|
27
27
|
"@vue/runtime-core": ">=3"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@
|
|
31
|
-
"@typescript-eslint/parser": "^4.32.0",
|
|
30
|
+
"@plugjs/eslint-plugin-vue": "^0.1.6",
|
|
32
31
|
"@vue/runtime-core": ">=3",
|
|
33
|
-
"eslint": "^
|
|
34
|
-
"
|
|
35
|
-
"eslint-plugin-deprecation": "^1.2.1",
|
|
36
|
-
"typescript": "^4.4.3"
|
|
32
|
+
"eslint": "^9.38.0",
|
|
33
|
+
"typescript": "^5.9.3"
|
|
37
34
|
}
|
|
38
35
|
}
|
package/src/plugin.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
+
defineComponent,
|
|
3
|
+
h,
|
|
4
|
+
warn,
|
|
5
|
+
} from '@vue/runtime-core'
|
|
6
|
+
|
|
7
|
+
import type {
|
|
2
8
|
App,
|
|
3
9
|
DefineComponent,
|
|
4
10
|
EmitsOptions,
|
|
5
11
|
Prop,
|
|
6
12
|
VNode,
|
|
7
|
-
defineComponent,
|
|
8
|
-
h,
|
|
9
|
-
warn,
|
|
10
13
|
} from '@vue/runtime-core'
|
|
11
14
|
|
|
12
15
|
/* ========================================================================== *
|
|
@@ -18,11 +21,11 @@ import {
|
|
|
18
21
|
// in the prop definition, and ignore defaults.
|
|
19
22
|
type RequiredPropKeys<T> = {
|
|
20
23
|
[K in keyof T]: T[K] extends { required: true } ? K : never
|
|
21
|
-
} [keyof T]
|
|
24
|
+
} [keyof T]
|
|
22
25
|
|
|
23
26
|
// Extract the _optional_ property keys for a given component: this simply
|
|
24
27
|
// negates `RequiredPropKeys` above.
|
|
25
|
-
type OptionalKeys<T> = Exclude<keyof T, RequiredPropKeys<T
|
|
28
|
+
type OptionalKeys<T> = Exclude<keyof T, RequiredPropKeys<T>>
|
|
26
29
|
|
|
27
30
|
// Infer the type for a property: this is cloned straight from Vue's source,
|
|
28
31
|
// as it's not an exported type, dammit!!! :-)
|
|
@@ -34,7 +37,7 @@ type InferPropType<T> = [T] extends [null] ? any : [T] extends [{
|
|
|
34
37
|
type: BooleanConstructor;
|
|
35
38
|
}] ? boolean : [T] extends [DateConstructor | {
|
|
36
39
|
type: DateConstructor;
|
|
37
|
-
}] ? Date : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? D : V : T
|
|
40
|
+
}] ? Date : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? D : V : T
|
|
38
41
|
|
|
39
42
|
// All _injectable_ properties (and types) for a component: this differs from
|
|
40
43
|
// Vue's `ExtractPropTypes` (and it's simpler) as we simply want a Record of
|
|
@@ -45,13 +48,13 @@ type InjectablePropTypes<O> = O extends object ? {
|
|
|
45
48
|
[K in OptionalKeys<O>]?: InferPropType<O[K]>;
|
|
46
49
|
} : {
|
|
47
50
|
[K in string]: any;
|
|
48
|
-
}
|
|
51
|
+
}
|
|
49
52
|
|
|
50
53
|
// The type of the _first_ parameter of the `dismissModal` emitter in a
|
|
51
54
|
// component or `unknown`, to properly return the typed value to our callers
|
|
52
55
|
declare type DismissModalType<E> =
|
|
53
|
-
E extends { dismissModal
|
|
54
|
-
Parameters<E['dismissModal']>[0] : unknown
|
|
56
|
+
E extends { dismissModal: (...args: any[]) => any } ?
|
|
57
|
+
Parameters<E['dismissModal']>[0] : unknown
|
|
55
58
|
|
|
56
59
|
/* ========================================================================== *
|
|
57
60
|
* COMPONENTS *
|
|
@@ -92,7 +95,7 @@ export const ModalStackComponent = defineComponent({
|
|
|
92
95
|
// Mounted here simply warns the about using <modal-stack/> multiple times
|
|
93
96
|
mounted() {
|
|
94
97
|
if (modalStack) warn('Vue modal stack component mounted multiple times')
|
|
95
|
-
else modalStack = this
|
|
98
|
+
else modalStack = this as any
|
|
96
99
|
},
|
|
97
100
|
|
|
98
101
|
// BeforeUnmount removes the ability to create modals
|