@ivandt/importer-vue 0.1.2 → 0.1.3

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.cjs.js CHANGED
@@ -1,16 +1,49 @@
1
1
  "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
2
24
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
25
  const vue = require("vue");
4
- require("@ivandt/importer/importer");
5
26
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
6
27
  __name: "IvtImporter",
7
28
  props: {
8
- schema: {}
29
+ schema: {},
30
+ className: {},
31
+ style: {}
9
32
  },
10
33
  setup(__props) {
34
+ const ready = vue.ref(false);
35
+ vue.onMounted(async () => {
36
+ await import("@ivandt/importer/importer");
37
+ ready.value = true;
38
+ });
11
39
  return (_ctx, _cache) => {
12
40
  const _component_ivt_importer = vue.resolveComponent("ivt-importer", true);
13
- return vue.openBlock(), vue.createBlock(_component_ivt_importer, { schema: __props.schema }, null, 8, ["schema"]);
41
+ return ready.value ? (vue.openBlock(), vue.createBlock(_component_ivt_importer, {
42
+ key: 0,
43
+ schema: __props.schema,
44
+ class: vue.normalizeClass(__props.className),
45
+ style: vue.normalizeStyle(__props.style)
46
+ }, null, 8, ["schema", "class", "style"])) : vue.createCommentVNode("", true);
14
47
  };
15
48
  }
16
49
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/IvtImporter.vue"],"sourcesContent":["<template>\n <ivt-importer :schema=\"schema\" />\n</template>\n\n<script setup lang=\"ts\">\nimport \"@ivandt/importer/importer\";\nimport type { DefaultTableRowType, IvtSchema } from \"@ivandt/importer\";\n\ninterface Props<TableRow = DefaultTableRowType> {\n schema: IvtSchema<TableRow>;\n}\n\ndefineProps<Props>();\n</script>\n"],"names":["_createBlock"],"mappings":";;;;;;;;;;;;8BACEA,gBAAiC,yBAAA,EAAlB,QAAQ,QAAA,OAAA,GAAM,MAAA,GAAA,CAAA,QAAA,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/IvtImporter.vue"],"sourcesContent":["<template>\n <ivt-importer v-if=\"ready\" :schema=\"schema\" :class=\"className\" :style=\"style\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, onMounted } from \"vue\";\nimport type { DefaultTableRowType, IvtSchema } from \"@ivandt/importer\";\n\ninterface Props<TableRow = DefaultTableRowType> {\n schema: IvtSchema<TableRow>;\n className?: string;\n style?: Record<string, any>;\n}\n\ndefineProps<Props>();\n\nconst ready = ref(false);\n\nonMounted(async () => {\n await import(\"@ivandt/importer/importer\");\n ready.value = true;\n});\n</script>\n"],"names":["ref","onMounted","_createBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,UAAM,QAAQA,IAAAA,IAAI,KAAK;AAEvBC,QAAAA,UAAU,YAAY;AACpB,YAAM,OAAO,2BAA2B;AACxC,YAAM,QAAQ;AAAA,IAChB,CAAC;;;aApBqB,MAAA,0BAApBC,IAAAA,YAAgF,yBAAA;AAAA;QAApD,QAAQ,QAAA;AAAA,QAAS,0BAAO,QAAA,SAAS;AAAA,QAAG,0BAAO,QAAA,KAAK;AAAA,MAAA;;;;;"}
package/dist/index.d.ts CHANGED
@@ -13,6 +13,8 @@ export { IvtSchema }
13
13
 
14
14
  declare interface Props<TableRow = DefaultTableRowType> {
15
15
  schema: IvtSchema<TableRow>;
16
+ className?: string;
17
+ style?: Record<string, any>;
16
18
  }
17
19
 
18
20
  export { }
package/dist/index.es.js CHANGED
@@ -1,14 +1,25 @@
1
- import { defineComponent, resolveComponent, createBlock, openBlock } from "vue";
2
- import "@ivandt/importer/importer";
1
+ import { defineComponent, ref, onMounted, resolveComponent, createBlock, createCommentVNode, openBlock, normalizeStyle, normalizeClass } from "vue";
3
2
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
3
  __name: "IvtImporter",
5
4
  props: {
6
- schema: {}
5
+ schema: {},
6
+ className: {},
7
+ style: {}
7
8
  },
8
9
  setup(__props) {
10
+ const ready = ref(false);
11
+ onMounted(async () => {
12
+ await import("@ivandt/importer/importer");
13
+ ready.value = true;
14
+ });
9
15
  return (_ctx, _cache) => {
10
16
  const _component_ivt_importer = resolveComponent("ivt-importer", true);
11
- return openBlock(), createBlock(_component_ivt_importer, { schema: __props.schema }, null, 8, ["schema"]);
17
+ return ready.value ? (openBlock(), createBlock(_component_ivt_importer, {
18
+ key: 0,
19
+ schema: __props.schema,
20
+ class: normalizeClass(__props.className),
21
+ style: normalizeStyle(__props.style)
22
+ }, null, 8, ["schema", "class", "style"])) : createCommentVNode("", true);
12
23
  };
13
24
  }
14
25
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/IvtImporter.vue"],"sourcesContent":["<template>\n <ivt-importer :schema=\"schema\" />\n</template>\n\n<script setup lang=\"ts\">\nimport \"@ivandt/importer/importer\";\nimport type { DefaultTableRowType, IvtSchema } from \"@ivandt/importer\";\n\ninterface Props<TableRow = DefaultTableRowType> {\n schema: IvtSchema<TableRow>;\n}\n\ndefineProps<Props>();\n</script>\n"],"names":["_createBlock"],"mappings":";;;;;;;;;;0BACEA,YAAiC,yBAAA,EAAlB,QAAQ,QAAA,OAAA,GAAM,MAAA,GAAA,CAAA,QAAA,CAAA;AAAA;;;"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/IvtImporter.vue"],"sourcesContent":["<template>\n <ivt-importer v-if=\"ready\" :schema=\"schema\" :class=\"className\" :style=\"style\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, onMounted } from \"vue\";\nimport type { DefaultTableRowType, IvtSchema } from \"@ivandt/importer\";\n\ninterface Props<TableRow = DefaultTableRowType> {\n schema: IvtSchema<TableRow>;\n className?: string;\n style?: Record<string, any>;\n}\n\ndefineProps<Props>();\n\nconst ready = ref(false);\n\nonMounted(async () => {\n await import(\"@ivandt/importer/importer\");\n ready.value = true;\n});\n</script>\n"],"names":["_createBlock"],"mappings":";;;;;;;;;AAgBA,UAAM,QAAQ,IAAI,KAAK;AAEvB,cAAU,YAAY;AACpB,YAAM,OAAO,2BAA2B;AACxC,YAAM,QAAQ;AAAA,IAChB,CAAC;;;aApBqB,MAAA,sBAApBA,YAAgF,yBAAA;AAAA;QAApD,QAAQ,QAAA;AAAA,QAAS,sBAAO,QAAA,SAAS;AAAA,QAAG,sBAAO,QAAA,KAAK;AAAA,MAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ivandt/importer-vue",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Vue wrapper for @ivandt/importer web component",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",