@intable/vue 0.0.3 → 0.0.5

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,7 @@
1
+ import { type TableProps } from 'intable';
2
+ import 'intable/wc';
3
+ import './style.scss';
4
+ export type { TableProps } from 'intable';
5
+ import { type FunctionalComponent } from 'vue';
6
+ export declare const Intable: FunctionalComponent<TableProps>;
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, normalizeStyle, render, toRaw } from "vue";
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: normalizeStyle([c.style]),
12
+ style: stringifyStyle(c.style),
12
13
  renderer: component,
13
14
  plugins: [VModelPlugin, ...c.plugins || []]
14
15
  }
15
16
  }));
16
- var VModelPlugin = { rewriteProps: {
17
- rowSelection: ({ rowSelection: e }, { store: c }) => ({
18
- get value() {
19
- return c.props?.selected;
20
- },
21
- ...e,
22
- onChange(l) {
23
- c.props["onUpdate:selected"]?.(l), e?.onChange?.(...arguments);
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;
@@ -0,0 +1,2 @@
1
+ import type { Plugin } from 'intable';
2
+ export declare const ElementPlusPlugin: Plugin;
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .element-plus .is-editing>.area{display:none}.element-plus .in-cell-edit-wrapper{padding:calc(var(--spacing)*1);align-items:center;display:flex}.element-plus .in-cell-edit-wrapper>.el-input>.el-input__wrapper>.el-input__prefix{display:none}
1
+ .element-plus .is-editing>.area{display:none}.element-plus .in-cell-edit-wrapper{align-items:center;padding:4px;display:flex}.element-plus .in-cell-edit-wrapper>.el-input>.el-input__wrapper>.el-input__prefix{display:none}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intable/vue",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
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.3"
22
+ "intable": "^0.0.5"
22
23
  },
23
24
  "peerDependencies": {
24
25
  "vue": "^3"