@ecan-bi/sheet 0.0.7 → 0.0.8

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.es.js CHANGED
@@ -1,5 +1,17 @@
1
- import { defineComponent as c, computed as o, isVue2 as p, getCurrentInstance as r, h } from "vue-demi";
2
- const e = "Luckysheet", l = c({
1
+ var l = Object.defineProperty, a = Object.defineProperties;
2
+ var y = Object.getOwnPropertyDescriptors;
3
+ var u = Object.getOwnPropertySymbols;
4
+ var m = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
5
+ var c = (t, e, n) => e in t ? l(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, o = (t, e) => {
6
+ for (var n in e || (e = {}))
7
+ m.call(e, n) && c(t, n, e[n]);
8
+ if (u)
9
+ for (var n of u(e))
10
+ f.call(e, n) && c(t, n, e[n]);
11
+ return t;
12
+ }, r = (t, e) => a(t, y(e));
13
+ import { defineComponent as g, computed as p, isVue2 as w, getCurrentInstance as k, h as A } from "vue-demi";
14
+ const s = "Luckysheet", O = g({
3
15
  inheritAttrs: !1,
4
16
  props: {
5
17
  option: {
@@ -8,24 +20,25 @@ const e = "Luckysheet", l = c({
8
20
  }
9
21
  }
10
22
  },
11
- setup(t, { attrs: n }) {
12
- const s = o(() => {
13
- if (p) {
14
- const u = r() ? r().proxy.$listeners : {};
23
+ setup(t, { attrs: e }) {
24
+ const n = p(() => {
25
+ var i;
26
+ if (w) {
27
+ const d = (i = k()) == null ? void 0 : i.proxy.$listeners;
15
28
  return {
16
- attrs: { ...n, id: e },
17
- on: u
29
+ attrs: r(o({}, e), { id: s }),
30
+ on: d
18
31
  };
19
32
  }
20
- return n;
21
- }), i = o(() => ({
22
- lang: "zh",
23
- ...t.option,
24
- container: e
33
+ return e;
34
+ }), h = p(() => r(o({
35
+ lang: "zh"
36
+ }, t.option), {
37
+ container: s
25
38
  }));
26
39
  return {
27
- myAttrs: s,
28
- myOption: i
40
+ myAttrs: n,
41
+ myOption: h
29
42
  };
30
43
  },
31
44
  mounted() {
@@ -35,7 +48,7 @@ const e = "Luckysheet", l = c({
35
48
  t.create(this.myOption);
36
49
  },
37
50
  render() {
38
- const t = {
51
+ const t = r(o({
39
52
  style: {
40
53
  margin: "0",
41
54
  padding: "0",
@@ -44,14 +57,14 @@ const e = "Luckysheet", l = c({
44
57
  height: "100%",
45
58
  left: "0",
46
59
  top: "0"
47
- },
48
- ...this.myAttrs,
49
- id: e
50
- };
51
- return h("div", t);
60
+ }
61
+ }, this.myAttrs), {
62
+ id: s
63
+ });
64
+ return A("div", t);
52
65
  }
53
66
  });
54
67
  export {
55
- l as default
68
+ O as default
56
69
  };
57
70
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/constant.ts","../src/Sheet.ts"],"sourcesContent":["export const LUCKYSHEET_ID = 'Luckysheet'\n","import { defineComponent, h, computed, getCurrentInstance, isVue2 } from 'vue-demi'\nimport { LUCKYSHEET_ID } from './constant'\nexport default defineComponent({\n inheritAttrs: false,\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n setup (props, { attrs }) {\n const myAttrs = computed(() => {\n if (isVue2) {\n // @ts-expect-error\n const on = getCurrentInstance() ? getCurrentInstance().proxy.$listeners : {}\n return {\n attrs: { ...attrs, id: LUCKYSHEET_ID },\n on\n }\n }\n return attrs\n })\n const myOption = computed(() => ({\n lang: 'zh',\n ...props.option,\n container: LUCKYSHEET_ID\n }))\n return {\n myAttrs,\n myOption\n }\n },\n mounted () {\n // @ts-ignore\n const luckysheet = window.luckysheet\n if (luckysheet == null) {\n throw new Error('未引入 luckysheet 插件')\n }\n luckysheet.create(this.myOption)\n },\n render () {\n const attrs: { [key:string]: any } = {\n style: {\n margin: '0',\n padding: '0',\n position: 'absolute',\n width: '100%',\n height: '100%',\n left: '0',\n top: '0'\n },\n ...this.myAttrs,\n id: LUCKYSHEET_ID\n }\n return h('div', attrs)\n }\n})\n"],"names":["LUCKYSHEET_ID","Sheet","defineComponent","props","attrs","myAttrs","computed","isVue2","on","getCurrentInstance","myOption","luckysheet"],"mappings":";AAAO,MAAMA,IAAgB,cCE7BC,IAAeC,EAAgB;AAAA,EAC7B,cAAc;AAAA,EACd,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS,MAAM;AAAA,MAAC;AAAA,IAClB;AAAA,EACF;AAAA,EACA,MAAOC,GAAO,EAAE,OAAAC,KAAS;AACjB,UAAAC,IAAUC,EAAS,MAAM;AAC7B,UAAIC,GAAQ;AAEV,cAAMC,IAAKC,MAAuBA,EAAqB,EAAA,MAAM,aAAa;AACnE,eAAA;AAAA,UACL,OAAO,EAAE,GAAGL,GAAO,IAAIJ,EAAc;AAAA,UACrC,IAAAQ;AAAA,QAAA;AAAA,MAEJ;AACO,aAAAJ;AAAA,IAAA,CACR,GACKM,IAAWJ,EAAS,OAAO;AAAA,MAC/B,MAAM;AAAA,MACN,GAAGH,EAAM;AAAA,MACT,WAAWH;AAAA,IACX,EAAA;AACK,WAAA;AAAA,MACL,SAAAK;AAAA,MACA,UAAAK;AAAA,IAAA;AAAA,EAEJ;AAAA,EACA,UAAW;AAET,UAAMC,IAAa,OAAO;AAC1B,QAAIA,KAAc;AACV,YAAA,IAAI,MAAM,4CAAmB;AAE1B,IAAAA,EAAA,OAAO,KAAK,QAAQ;AAAA,EACjC;AAAA,EACA,SAAU;AACR,UAAMP,IAA+B;AAAA,MACnC,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,UAAU;AAAA,QACV,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,KAAK;AAAA,MACP;AAAA,MACA,GAAG,KAAK;AAAA,MACR,IAAIJ;AAAA,IAAA;AAEC,WAAA,EAAE,OAAOI,CAAK;AAAA,EACvB;AACF,CAAC;"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/constant.ts","../src/Sheet.ts"],"sourcesContent":["export const LUCKYSHEET_ID = 'Luckysheet'\n","import { defineComponent, h, computed, getCurrentInstance, isVue2 } from 'vue-demi'\nimport { LUCKYSHEET_ID } from './constant'\nexport default defineComponent({\n inheritAttrs: false,\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n setup (props, { attrs }) {\n const myAttrs = computed(() => {\n if (isVue2) {\n // @ts-expect-error\n const on = getCurrentInstance()?.proxy.$listeners\n return {\n attrs: { ...attrs, id: LUCKYSHEET_ID },\n on\n }\n }\n return attrs\n })\n const myOption = computed(() => ({\n lang: 'zh',\n ...props.option,\n container: LUCKYSHEET_ID\n }))\n return {\n myAttrs,\n myOption\n }\n },\n mounted () {\n // @ts-ignore\n const luckysheet = window.luckysheet\n if (luckysheet == null) {\n throw new Error('未引入 luckysheet 插件')\n }\n luckysheet.create(this.myOption)\n },\n render () {\n const attrs: { [key:string]: any } = {\n style: {\n margin: '0',\n padding: '0',\n position: 'absolute',\n width: '100%',\n height: '100%',\n left: '0',\n top: '0'\n },\n ...this.myAttrs,\n id: LUCKYSHEET_ID\n }\n return h('div', attrs)\n }\n})\n"],"names":["LUCKYSHEET_ID","Sheet","defineComponent","props","attrs","myAttrs","computed","isVue2","on","_a","getCurrentInstance","__spreadProps","__spreadValues","myOption","luckysheet","h"],"mappings":";;;;;;;;;;;;;AAAO,MAAMA,IAAgB,cCE7BC,IAAeC,EAAgB;AAAA,EAC7B,cAAc;AAAA,EACd,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS,MAAM;AAAA,MAAC;AAAA,IAClB;AAAA,EACF;AAAA,EACA,MAAOC,GAAO,EAAE,OAAAC,KAAS;AACjB,UAAAC,IAAUC,EAAS,MAAM;;AAC7B,UAAIC,GAAQ;AAEJ,cAAAC,KAAKC,IAAAC,QAAA,gBAAAD,EAAsB,MAAM;AAChC,eAAA;AAAA,UACL,OAAOE,EAAAC,EAAA,IAAKR,IAAL,EAAY,IAAIJ,EAAc;AAAA,UACrC,IAAAQ;AAAA,QAAA;AAAA,MAEJ;AACO,aAAAJ;AAAA,IAAA,CACR,GACKS,IAAWP,EAAS,MAAOK,EAAAC,EAAA;AAAA,MAC/B,MAAM;AAAA,OACHT,EAAM,SAFsB;AAAA,MAG/B,WAAWH;AAAA,IACX,EAAA;AACK,WAAA;AAAA,MACL,SAAAK;AAAA,MACA,UAAAQ;AAAA,IAAA;AAAA,EAEJ;AAAA,EACA,UAAW;AAET,UAAMC,IAAa,OAAO;AAC1B,QAAIA,KAAc;AACV,YAAA,IAAI,MAAM,4CAAmB;AAE1B,IAAAA,EAAA,OAAO,KAAK,QAAQ;AAAA,EACjC;AAAA,EACA,SAAU;AACR,UAAMV,IAA+BO,EAAAC,EAAA;AAAA,MACnC,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,UAAU;AAAA,QACV,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,KAAK;AAAA,MACP;AAAA,OACG,KAAK,UAV2B;AAAA,MAWnC,IAAIZ;AAAA,IAAA;AAEC,WAAAe,EAAE,OAAOX,CAAK;AAAA,EACvB;AACF,CAAC;"}
package/dist/index.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue-demi")):typeof define=="function"&&define.amd?define(["exports","vue-demi"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t["@ecan/bi-sheet"]={},t["vue-demi"]))})(this,function(t,e){"use strict";const o="Luckysheet",i=e.defineComponent({inheritAttrs:!1,props:{option:{type:Object,default:()=>{}}},setup(n,{attrs:s}){const r=e.computed(()=>{if(e.isVue2){const d=e.getCurrentInstance()?e.getCurrentInstance().proxy.$listeners:{};return{attrs:{...s,id:o},on:d}}return s}),u=e.computed(()=>({lang:"zh",...n.option,container:o}));return{myAttrs:r,myOption:u}},mounted(){const n=window.luckysheet;if(n==null)throw new Error("\u672A\u5F15\u5165 luckysheet \u63D2\u4EF6");n.create(this.myOption)},render(){const n={style:{margin:"0",padding:"0",position:"absolute",width:"100%",height:"100%",left:"0",top:"0"},...this.myAttrs,id:o};return e.h("div",n)}});t.default=i,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(t,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue-demi")):typeof define=="function"&&define.amd?define(["exports","vue-demi"],e):(t=typeof globalThis!="undefined"?globalThis:t||self,e(t["@ecan/bi-sheet"]={},t["vue-demi"]))})(this,function(t,e){"use strict";var y=Object.defineProperty,a=Object.defineProperties;var m=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var c=(t,e,n)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i=(t,e)=>{for(var n in e||(e={}))g.call(e,n)&&c(t,n,e[n]);if(d)for(var n of d(e))b.call(e,n)&&c(t,n,e[n]);return t},s=(t,e)=>a(t,m(e));const n="Luckysheet",p=e.defineComponent({inheritAttrs:!1,props:{option:{type:Object,default:()=>{}}},setup(o,{attrs:r}){const f=e.computed(()=>{var u;if(e.isVue2){const l=(u=e.getCurrentInstance())==null?void 0:u.proxy.$listeners;return{attrs:s(i({},r),{id:n}),on:l}}return r}),h=e.computed(()=>s(i({lang:"zh"},o.option),{container:n}));return{myAttrs:f,myOption:h}},mounted(){const o=window.luckysheet;if(o==null)throw new Error("\u672A\u5F15\u5165 luckysheet \u63D2\u4EF6");o.create(this.myOption)},render(){const o=s(i({style:{margin:"0",padding:"0",position:"absolute",width:"100%",height:"100%",left:"0",top:"0"}},this.myAttrs),{id:n});return e.h("div",o)}});t.default=p,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2
2
  //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/constant.ts","../src/Sheet.ts"],"sourcesContent":["export const LUCKYSHEET_ID = 'Luckysheet'\n","import { defineComponent, h, computed, getCurrentInstance, isVue2 } from 'vue-demi'\nimport { LUCKYSHEET_ID } from './constant'\nexport default defineComponent({\n inheritAttrs: false,\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n setup (props, { attrs }) {\n const myAttrs = computed(() => {\n if (isVue2) {\n // @ts-expect-error\n const on = getCurrentInstance() ? getCurrentInstance().proxy.$listeners : {}\n return {\n attrs: { ...attrs, id: LUCKYSHEET_ID },\n on\n }\n }\n return attrs\n })\n const myOption = computed(() => ({\n lang: 'zh',\n ...props.option,\n container: LUCKYSHEET_ID\n }))\n return {\n myAttrs,\n myOption\n }\n },\n mounted () {\n // @ts-ignore\n const luckysheet = window.luckysheet\n if (luckysheet == null) {\n throw new Error('未引入 luckysheet 插件')\n }\n luckysheet.create(this.myOption)\n },\n render () {\n const attrs: { [key:string]: any } = {\n style: {\n margin: '0',\n padding: '0',\n position: 'absolute',\n width: '100%',\n height: '100%',\n left: '0',\n top: '0'\n },\n ...this.myAttrs,\n id: LUCKYSHEET_ID\n }\n return h('div', attrs)\n }\n})\n"],"names":["LUCKYSHEET_ID","Sheet","defineComponent","props","attrs","myAttrs","computed","isVue2","on","getCurrentInstance","myOption","luckysheet","h"],"mappings":"wRAAO,MAAMA,EAAgB,aCE7BC,EAAeC,kBAAgB,CAC7B,aAAc,GACd,MAAO,CACL,OAAQ,CACN,KAAM,OACN,QAAS,IAAM,CAAC,CAClB,CACF,EACA,MAAOC,EAAO,CAAE,MAAAC,GAAS,CACjB,MAAAC,EAAUC,EAAAA,SAAS,IAAM,CAC7B,GAAIC,SAAQ,CAEV,MAAMC,EAAKC,EAAAA,qBAAuBA,EAAAA,mBAAqB,EAAA,MAAM,WAAa,GACnE,MAAA,CACL,MAAO,CAAE,GAAGL,EAAO,GAAIJ,CAAc,EACrC,GAAAQ,CAAA,CAEJ,CACO,OAAAJ,CAAA,CACR,EACKM,EAAWJ,EAAAA,SAAS,KAAO,CAC/B,KAAM,KACN,GAAGH,EAAM,OACT,UAAWH,CACX,EAAA,EACK,MAAA,CACL,QAAAK,EACA,SAAAK,CAAA,CAEJ,EACA,SAAW,CAET,MAAMC,EAAa,OAAO,WAC1B,GAAIA,GAAc,KACV,MAAA,IAAI,MAAM,4CAAmB,EAE1BA,EAAA,OAAO,KAAK,QAAQ,CACjC,EACA,QAAU,CACR,MAAMP,EAA+B,CACnC,MAAO,CACL,OAAQ,IACR,QAAS,IACT,SAAU,WACV,MAAO,OACP,OAAQ,OACR,KAAM,IACN,IAAK,GACP,EACA,GAAG,KAAK,QACR,GAAIJ,CAAA,EAEC,OAAAY,EAAA,EAAE,MAAOR,CAAK,CACvB,CACF,CAAC"}
1
+ {"version":3,"file":"index.umd.js","sources":["../src/constant.ts","../src/Sheet.ts"],"sourcesContent":["export const LUCKYSHEET_ID = 'Luckysheet'\n","import { defineComponent, h, computed, getCurrentInstance, isVue2 } from 'vue-demi'\nimport { LUCKYSHEET_ID } from './constant'\nexport default defineComponent({\n inheritAttrs: false,\n props: {\n option: {\n type: Object,\n default: () => {}\n }\n },\n setup (props, { attrs }) {\n const myAttrs = computed(() => {\n if (isVue2) {\n // @ts-expect-error\n const on = getCurrentInstance()?.proxy.$listeners\n return {\n attrs: { ...attrs, id: LUCKYSHEET_ID },\n on\n }\n }\n return attrs\n })\n const myOption = computed(() => ({\n lang: 'zh',\n ...props.option,\n container: LUCKYSHEET_ID\n }))\n return {\n myAttrs,\n myOption\n }\n },\n mounted () {\n // @ts-ignore\n const luckysheet = window.luckysheet\n if (luckysheet == null) {\n throw new Error('未引入 luckysheet 插件')\n }\n luckysheet.create(this.myOption)\n },\n render () {\n const attrs: { [key:string]: any } = {\n style: {\n margin: '0',\n padding: '0',\n position: 'absolute',\n width: '100%',\n height: '100%',\n left: '0',\n top: '0'\n },\n ...this.myAttrs,\n id: LUCKYSHEET_ID\n }\n return h('div', attrs)\n }\n})\n"],"names":["LUCKYSHEET_ID","Sheet","defineComponent","props","attrs","myAttrs","computed","isVue2","on","getCurrentInstance","__spreadProps","__spreadValues","myOption","luckysheet","h"],"mappings":"utBAAO,MAAMA,EAAgB,aCE7BC,EAAeC,kBAAgB,CAC7B,aAAc,GACd,MAAO,CACL,OAAQ,CACN,KAAM,OACN,QAAS,IAAM,CAAC,CAClB,CACF,EACA,MAAOC,EAAO,CAAE,MAAAC,GAAS,CACjB,MAAAC,EAAUC,EAAAA,SAAS,IAAM,OAC7B,GAAIC,SAAQ,CAEJ,MAAAC,GAAKC,EAAAA,EAAAA,uBAAAA,YAAAA,EAAsB,MAAM,WAChC,MAAA,CACL,MAAOC,EAAAC,EAAA,GAAKP,GAAL,CAAY,GAAIJ,CAAc,GACrC,GAAAQ,CAAA,CAEJ,CACO,OAAAJ,CAAA,CACR,EACKQ,EAAWN,EAAAA,SAAS,IAAOI,EAAAC,EAAA,CAC/B,KAAM,MACHR,EAAM,QAFsB,CAG/B,UAAWH,CACX,EAAA,EACK,MAAA,CACL,QAAAK,EACA,SAAAO,CAAA,CAEJ,EACA,SAAW,CAET,MAAMC,EAAa,OAAO,WAC1B,GAAIA,GAAc,KACV,MAAA,IAAI,MAAM,4CAAmB,EAE1BA,EAAA,OAAO,KAAK,QAAQ,CACjC,EACA,QAAU,CACR,MAAMT,EAA+BM,EAAAC,EAAA,CACnC,MAAO,CACL,OAAQ,IACR,QAAS,IACT,SAAU,WACV,MAAO,OACP,OAAQ,OACR,KAAM,IACN,IAAK,GACP,GACG,KAAK,SAV2B,CAWnC,GAAIX,CAAA,GAEC,OAAAc,EAAA,EAAE,MAAOV,CAAK,CACvB,CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecan-bi/sheet",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",
@@ -0,0 +1,22 @@
1
+ declare const _default: import("vue-demi").DefineComponent<{
2
+ option: {
3
+ type: ObjectConstructor;
4
+ default: () => void;
5
+ };
6
+ }, {
7
+ myAttrs: import("vue-demi").ComputedRef<{
8
+ [x: string]: unknown;
9
+ }>;
10
+ myOption: import("vue-demi").ComputedRef<{
11
+ container: string;
12
+ lang: string;
13
+ }>;
14
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, Record<string, any>, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
15
+ option: {
16
+ type: ObjectConstructor;
17
+ default: () => void;
18
+ };
19
+ }>>, {
20
+ option: Record<string, any>;
21
+ }>;
22
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const LUCKYSHEET_ID = "Luckysheet";
@@ -0,0 +1,2 @@
1
+ import Sheet from './Sheet';
2
+ export default Sheet;