formax_sgj-ui 1.0.0 → 1.0.2
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.global.js +3 -3
- package/dist/index.js +17 -7
- package/dist/index.mjs +7 -7
- package/package.json +8 -2
- package/src/components/FormaxButton.ts +6 -6
- package/src/index.ts +2 -2
package/dist/index.global.js
CHANGED
|
@@ -36088,7 +36088,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
|
|
|
36088
36088
|
}
|
|
36089
36089
|
|
|
36090
36090
|
// src/components/FormaxButton.ts
|
|
36091
|
-
var FormaxButton =
|
|
36091
|
+
var FormaxButton = lib_exports.defineComponent({
|
|
36092
36092
|
name: "FormaxButton",
|
|
36093
36093
|
props: {
|
|
36094
36094
|
label: {
|
|
@@ -36114,14 +36114,14 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
|
|
|
36114
36114
|
};
|
|
36115
36115
|
const label = slots.default ? slots.default() : props.label;
|
|
36116
36116
|
if (isVue2) {
|
|
36117
|
-
return
|
|
36117
|
+
return lib_exports.h("button", {
|
|
36118
36118
|
style,
|
|
36119
36119
|
on: {
|
|
36120
36120
|
click: (event) => emit("click", event)
|
|
36121
36121
|
}
|
|
36122
36122
|
}, label);
|
|
36123
36123
|
} else {
|
|
36124
|
-
return
|
|
36124
|
+
return lib_exports.h("button", {
|
|
36125
36125
|
style,
|
|
36126
36126
|
onClick: (event) => emit("click", event)
|
|
36127
36127
|
}, label);
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
10
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -29,6 +31,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
29
31
|
}
|
|
30
32
|
return to;
|
|
31
33
|
};
|
|
34
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
35
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
36
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
37
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
38
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
39
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
40
|
+
mod
|
|
41
|
+
));
|
|
32
42
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
43
|
|
|
34
44
|
// src/index.ts
|
|
@@ -40,11 +50,11 @@ __export(src_exports, {
|
|
|
40
50
|
install: () => install
|
|
41
51
|
});
|
|
42
52
|
module.exports = __toCommonJS(src_exports);
|
|
43
|
-
var
|
|
53
|
+
var VueDemi2 = __toESM(require("vue-demi"));
|
|
44
54
|
|
|
45
55
|
// src/components/FormaxButton.ts
|
|
46
|
-
var
|
|
47
|
-
var FormaxButton =
|
|
56
|
+
var VueDemi = __toESM(require("vue-demi"));
|
|
57
|
+
var FormaxButton = VueDemi.defineComponent({
|
|
48
58
|
name: "FormaxButton",
|
|
49
59
|
props: {
|
|
50
60
|
label: {
|
|
@@ -69,15 +79,15 @@ var FormaxButton = (0, import_vue_demi.defineComponent)({
|
|
|
69
79
|
fontSize: "14px"
|
|
70
80
|
};
|
|
71
81
|
const label = slots.default ? slots.default() : props.label;
|
|
72
|
-
if (
|
|
73
|
-
return
|
|
82
|
+
if (VueDemi.isVue2) {
|
|
83
|
+
return VueDemi.h("button", {
|
|
74
84
|
style,
|
|
75
85
|
on: {
|
|
76
86
|
click: (event) => emit("click", event)
|
|
77
87
|
}
|
|
78
88
|
}, label);
|
|
79
89
|
} else {
|
|
80
|
-
return
|
|
90
|
+
return VueDemi.h("button", {
|
|
81
91
|
style,
|
|
82
92
|
onClick: (event) => emit("click", event)
|
|
83
93
|
}, label);
|
|
@@ -120,7 +130,7 @@ var components = {
|
|
|
120
130
|
};
|
|
121
131
|
function install(app) {
|
|
122
132
|
Object.keys(components).forEach((key) => {
|
|
123
|
-
if (
|
|
133
|
+
if (VueDemi2.isVue2) {
|
|
124
134
|
app.component(key, components[key]);
|
|
125
135
|
} else {
|
|
126
136
|
app.component(key, components[key]);
|
package/dist/index.mjs
CHANGED
|
@@ -16,11 +16,11 @@ var __spreadValues = (a, b) => {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
// src/index.ts
|
|
19
|
-
import
|
|
19
|
+
import * as VueDemi2 from "vue-demi";
|
|
20
20
|
|
|
21
21
|
// src/components/FormaxButton.ts
|
|
22
|
-
import
|
|
23
|
-
var FormaxButton = defineComponent({
|
|
22
|
+
import * as VueDemi from "vue-demi";
|
|
23
|
+
var FormaxButton = VueDemi.defineComponent({
|
|
24
24
|
name: "FormaxButton",
|
|
25
25
|
props: {
|
|
26
26
|
label: {
|
|
@@ -45,15 +45,15 @@ var FormaxButton = defineComponent({
|
|
|
45
45
|
fontSize: "14px"
|
|
46
46
|
};
|
|
47
47
|
const label = slots.default ? slots.default() : props.label;
|
|
48
|
-
if (isVue2) {
|
|
49
|
-
return h("button", {
|
|
48
|
+
if (VueDemi.isVue2) {
|
|
49
|
+
return VueDemi.h("button", {
|
|
50
50
|
style,
|
|
51
51
|
on: {
|
|
52
52
|
click: (event) => emit("click", event)
|
|
53
53
|
}
|
|
54
54
|
}, label);
|
|
55
55
|
} else {
|
|
56
|
-
return h("button", {
|
|
56
|
+
return VueDemi.h("button", {
|
|
57
57
|
style,
|
|
58
58
|
onClick: (event) => emit("click", event)
|
|
59
59
|
}, label);
|
|
@@ -96,7 +96,7 @@ var components = {
|
|
|
96
96
|
};
|
|
97
97
|
function install(app) {
|
|
98
98
|
Object.keys(components).forEach((key) => {
|
|
99
|
-
if (
|
|
99
|
+
if (VueDemi2.isVue2) {
|
|
100
100
|
app.component(key, components[key]);
|
|
101
101
|
} else {
|
|
102
102
|
app.component(key, components[key]);
|
package/package.json
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "formax_sgj-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A cross-compatible Vue component library with metadata extraction",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.
|
|
6
|
+
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"unpkg": "dist/index.global.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
9
15
|
"scripts": {
|
|
10
16
|
"build": "tsup src/index.ts --format cjs,esm,iife --global-name FormaxUI --dts --clean --env.NODE_ENV production"
|
|
11
17
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as VueDemi from 'vue-demi';
|
|
2
2
|
import { FormaxComponent, ComponentMeta } from '../types';
|
|
3
3
|
|
|
4
|
-
export const FormaxButton = defineComponent({
|
|
4
|
+
export const FormaxButton = (VueDemi as any).defineComponent({
|
|
5
5
|
name: 'FormaxButton',
|
|
6
6
|
props: {
|
|
7
7
|
label: {
|
|
@@ -13,7 +13,7 @@ export const FormaxButton = defineComponent({
|
|
|
13
13
|
default: 'default', // primary, danger, default
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
setup(props, { emit, slots }) {
|
|
16
|
+
setup(props: any, { emit, slots }: any) {
|
|
17
17
|
return () => {
|
|
18
18
|
const style = {
|
|
19
19
|
padding: '8px 16px',
|
|
@@ -27,15 +27,15 @@ export const FormaxButton = defineComponent({
|
|
|
27
27
|
|
|
28
28
|
const label = slots.default ? slots.default() : props.label;
|
|
29
29
|
|
|
30
|
-
if (isVue2) {
|
|
31
|
-
return h('button', {
|
|
30
|
+
if ((VueDemi as any).isVue2) {
|
|
31
|
+
return (VueDemi as any).h('button', {
|
|
32
32
|
style,
|
|
33
33
|
on: {
|
|
34
34
|
click: (event: Event) => emit('click', event)
|
|
35
35
|
}
|
|
36
36
|
}, label);
|
|
37
37
|
} else {
|
|
38
|
-
return h('button', {
|
|
38
|
+
return (VueDemi as any).h('button', {
|
|
39
39
|
style,
|
|
40
40
|
onClick: (event: Event) => emit('click', event)
|
|
41
41
|
}, label);
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as VueDemi from 'vue-demi';
|
|
2
2
|
import { FormaxButton } from './components/FormaxButton';
|
|
3
3
|
import { ComponentMeta, FormaxComponent } from './types';
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ const components: Record<string, FormaxComponent> = {
|
|
|
8
8
|
|
|
9
9
|
export function install(app: any) {
|
|
10
10
|
Object.keys(components).forEach(key => {
|
|
11
|
-
if (isVue2) {
|
|
11
|
+
if ((VueDemi as any).isVue2) {
|
|
12
12
|
app.component(key, components[key]);
|
|
13
13
|
} else {
|
|
14
14
|
app.component(key, components[key]);
|