@intable/vue 0.0.4 → 0.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/index.d.ts +2 -2
- package/dist/index.js +19 -16
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { type TableProps } from 'intable';
|
|
|
2
2
|
import 'intable/wc';
|
|
3
3
|
import './style.scss';
|
|
4
4
|
export type { TableProps } from 'intable';
|
|
5
|
-
import { type
|
|
6
|
-
export declare const Intable:
|
|
5
|
+
import { type FunctionalComponent } from 'vue';
|
|
6
|
+
export declare const Intable: FunctionalComponent<TableProps>;
|
|
7
7
|
export default Intable;
|
package/dist/index.js
CHANGED
|
@@ -2,33 +2,36 @@ import './style.css';/* empty css */
|
|
|
2
2
|
import { mapValues } from "./mapValues.js";
|
|
3
3
|
import { createRenderEffect, onCleanup } from "solid-js";
|
|
4
4
|
import "intable/wc";
|
|
5
|
-
import { h, normalizeClass,
|
|
5
|
+
import { h, normalizeClass, render, toRaw } from "vue";
|
|
6
|
+
import { stringifyStyle } from "@vue/shared";
|
|
6
7
|
const Intable = (c) => (c = mapValues(c, (e) => toRaw(e)), h("wc-table", {
|
|
7
8
|
style: "display: contents",
|
|
8
9
|
".options": {
|
|
9
10
|
...c,
|
|
10
11
|
class: normalizeClass(c.class),
|
|
11
|
-
style:
|
|
12
|
+
style: stringifyStyle(c.style),
|
|
12
13
|
renderer: component,
|
|
13
14
|
plugins: [VModelPlugin, ...c.plugins || []]
|
|
14
15
|
}
|
|
15
16
|
}));
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
Intable.inheritAttrs = !1, Intable.__name = "intable", Intable.install = (e) => e.component(Intable.__name, Intable);
|
|
18
|
+
var VModelPlugin = {
|
|
19
|
+
name: "v-model",
|
|
20
|
+
rewriteProps: {
|
|
21
|
+
rowSelection: ({ rowSelection: e }, { store: c }) => ({
|
|
22
|
+
get value() {
|
|
23
|
+
return c.props?.selected;
|
|
24
|
+
},
|
|
25
|
+
...e,
|
|
26
|
+
onChange(l) {
|
|
27
|
+
c.props["onUpdate:selected"]?.(l), e?.onChange?.(...arguments);
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
onDataChange: ({ onDataChange: e }, { store: c }) => (l) => {
|
|
31
|
+
c.props["onUpdate:data"]?.(l), e?.(l);
|
|
24
32
|
}
|
|
25
|
-
}),
|
|
26
|
-
onDataChange: ({ onDataChange: e }, { store: c }) => (l) => {
|
|
27
|
-
c.props["onUpdate:data"]?.(l), e?.(l);
|
|
28
33
|
}
|
|
29
|
-
}
|
|
30
|
-
Intable.inheritAttrs = !1;
|
|
31
|
-
var component = (e) => (u) => {
|
|
34
|
+
}, component = (e) => (u) => {
|
|
32
35
|
let d = document.createDocumentFragment();
|
|
33
36
|
return d.remove ??= () => {}, createRenderEffect(() => render(h(e, { ...u }), d)), onCleanup(() => render(null, d)), d;
|
|
34
37
|
}, src_default = Intable;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intable/vue",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@vue/shared": "^3.5.27",
|
|
20
21
|
"solid-js": "^1.9.9",
|
|
21
|
-
"intable": "^0.0.
|
|
22
|
+
"intable": "^0.0.6"
|
|
22
23
|
},
|
|
23
24
|
"peerDependencies": {
|
|
24
25
|
"vue": "^3"
|