@ningboyz/vue 1.0.62 → 1.0.64

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/es/components.js CHANGED
@@ -1,12 +1,14 @@
1
- import { YzDesginer as t } from "./stimulsoft/desginer/index.js";
1
+ import { YzDesginer as r } from "./stimulsoft/desginer/index.js";
2
+ import { StimulsoftFactory as c } from "./stimulsoft/desginer/index.js";
2
3
  import { YzLayout as e } from "./layout/index.js";
3
- import { YzMessage as f } from "./message/index.js";
4
- const s = [t, e], p = (o) => {
5
- s.forEach((r) => o.use(r));
4
+ import { YzMessage as l } from "./message/index.js";
5
+ const s = [r, e], n = (o) => {
6
+ s.forEach((t) => o.use(t));
6
7
  };
7
8
  export {
8
- t as YzDesginer,
9
+ c as StimulsoftFactory,
10
+ r as YzDesginer,
9
11
  e as YzLayout,
10
- f as YzMessage,
11
- p as install
12
+ l as YzMessage,
13
+ n as install
12
14
  };
package/es/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import * as o from "./components.js";
2
- import { install as t } from "./components.js";
3
- import { YzDesginer as p } from "./stimulsoft/desginer/index.js";
4
- import { YzMessage as a } from "./message/index.js";
5
- import { YzLayout as x } from "./layout/index.js";
2
+ import { install as e } from "./components.js";
3
+ import { StimulsoftFactory as s, YzDesginer as a } from "./stimulsoft/desginer/index.js";
4
+ import { YzMessage as p } from "./message/index.js";
5
+ import { YzLayout as i } from "./layout/index.js";
6
6
  export {
7
- p as YzDesginer,
8
- x as YzLayout,
9
- a as YzMessage,
7
+ s as StimulsoftFactory,
8
+ a as YzDesginer,
9
+ i as YzLayout,
10
+ p as YzMessage,
10
11
  o as default,
11
- t as install
12
+ e as install
12
13
  };
@@ -1,53 +1,54 @@
1
- import { defineComponent as u, ref as g, watch as d, createBlock as v, openBlock as D, unref as p } from "vue";
2
- import { Designer as J } from "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
3
- import R from "./factory.js";
4
- import { Stimulsoft as _ } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
1
+ import { defineComponent as u, ref as g, watch as U, createBlock as h, openBlock as L, unref as i } from "vue";
2
+ import { Designer as z } from "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
3
+ import S from "./factory.js";
4
+ import { Stimulsoft as n } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
5
5
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.viewer.js";
6
6
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.designer.js";
7
7
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.blockly.editor.js";
8
- const O = /* @__PURE__ */ u({
8
+ const y = /* @__PURE__ */ u({
9
9
  __name: "desginer",
10
10
  props: {
11
11
  templateJson: {},
12
12
  listData: {}
13
13
  },
14
14
  emits: ["saveReport"],
15
- setup(a, { expose: i, emit: c }) {
16
- const n = a, r = g(), s = new _.Designer.StiDesignerOptions();
17
- s.appearance.fullScreenMode = !0;
18
- const l = c;
19
- d(
20
- () => [n.templateJson, n.listData],
15
+ setup(p, { expose: l, emit: c }) {
16
+ n.Base.StiLicense.key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkVaUjYnRU/wphl9h6TkK9UtvGvwIZ/qCzU7vjHmM5RWbvCAfAhZhn+eMayEo4PRtUFJINrdMkfnVj1/HeyPgSgAKdpQpP1wzGj2ri5UgGNU8p7Pi59UAegRyUxjTI96rT+khTJIcSoTTPkqZwt0uC+IGtEdehlDchk7madvSLA9guSEZZuSHsc+adQ93NZogak6uo7LbqRh2xC23iGH4sValMR9CBxAsjWUYJH0yrcXODeYrX6ARDlVCW40MGOMrYnx/2W3O8L26oTyAFEdQ1TN1KzYjP4zenjvu4KBAWIopWG6Gk2ydffI0zldxHaPeEl0Lt6U77ykFtsXqW5fN/9t040SfeZfzMAq2ZoVGXPXKCjBo+asFZHrxn7iLpsxF7zwWkYIto8ObpimosoY0on8aLx7At7Qo3VaUOST48gIdqBabUpVz3O9h8UULJa23nlwMVMXheIMMmp6ACD9Bupla/giERFXIYIfpE4eFCD93sR2Cq2f8jdm5Z9B/faB8j4iz0IugVhK4BYhw2q9jAufdWTIx3nsE2Qw7ah0jNsgkR9kWWnHQ3qI/lwFLcFr81SVgyNpFzZ/zcV6vM+xaqbuEMivQx5uFx9WLOMU/ZYkyV8Hi/IEmU+O72NObJtWDxnhUkl4iV0WsYT2V2EU8t0NZP9SBCrLU+rd0SERAdGnRUfoJrm8mXPgcN6+FGNyTgiw0Do8oLU/Skqa/TohVeT", n.Base.Localization.StiLocalization.addLocalizationFile("../localizations/zh.xml", !1, "中文"), n.Base.Localization.StiLocalization.cultureName = "中文";
17
+ const a = p, s = g(), r = new n.Designer.StiDesignerOptions();
18
+ r.appearance.fullScreenMode = !0;
19
+ const m = c;
20
+ U(
21
+ () => [a.templateJson, a.listData],
21
22
  (e) => {
22
23
  console.log(e);
23
24
  const o = e[0], t = e[1];
24
- f(o, t);
25
+ d(o, t);
25
26
  },
26
27
  {
27
28
  deep: !0
28
29
  }
29
30
  );
30
- const m = (e) => {
31
+ const f = (e) => {
31
32
  e.preventDefault = !0;
32
33
  const o = e.report.saveToJsonString(), t = e.fileName;
33
- l("saveReport", t, o);
34
- }, f = async (e, o) => {
34
+ m("saveReport", t, o);
35
+ }, d = async (e, o) => {
35
36
  try {
36
- const t = new R();
37
- r.value = t.setListData(o).loadJson(e).getReport();
37
+ const t = new S();
38
+ s.value = t.setListData(o).loadJson(e).getReport();
38
39
  } catch (t) {
39
40
  console.log(t.message);
40
41
  }
41
42
  };
42
- return i({
43
+ return l({
43
44
  getJson: () => "hello world"
44
- }), (e, o) => (D(), v(p(J), {
45
- report: r.value,
46
- options: p(s),
47
- onSaveReport: m
45
+ }), (e, o) => (L(), h(i(z), {
46
+ report: s.value,
47
+ options: i(r),
48
+ onSaveReport: f
48
49
  }, null, 8, ["report", "options"]));
49
50
  }
50
51
  });
51
52
  export {
52
- O as default
53
+ y as default
53
54
  };
@@ -1,6 +1,6 @@
1
- import o from "lodash";
1
+ import s from "lodash";
2
2
  import "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
3
- import { Stimulsoft as r } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
3
+ import { Stimulsoft as o } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
4
4
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.viewer.js";
5
5
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.designer.js";
6
6
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.blockly.editor.js";
@@ -8,7 +8,7 @@ class f {
8
8
  listData = void 0;
9
9
  report;
10
10
  constructor(t) {
11
- o.isNil(t) || (this.listData = t), this.report = new r.Report.StiReport();
11
+ s.isNil(t) || (this.listData = t), this.report = new o.Report.StiReport();
12
12
  }
13
13
  setListData = (t) => (this.listData = t, this);
14
14
  /**
@@ -16,36 +16,42 @@ class f {
16
16
  * @param json
17
17
  * @returns
18
18
  */
19
- loadJson = (t) => (o.isEmpty(t) || this.report.load(t), this);
20
- getReport = () => (this.report.dataSources.clear(), o.isNil(this.listData) || this.listData.length === 0 ? this.report : (this.getDataSet(this.listData), this.report));
19
+ loadJson = (t) => (s.isEmpty(t) || this.report.load(t), this);
20
+ getReport = () => (this.report.dataSources.clear(), s.isNil(this.listData) || this.listData.length === 0 ? this.report : (this.getDataSet(this.listData), this.report));
21
+ print = () => {
22
+ this.report.print();
23
+ };
24
+ printToPdf = () => {
25
+ this.report.printToPdf();
26
+ };
21
27
  getDataSet = (t) => {
22
- const a = new r.System.Data.DataSet("网络打印");
28
+ const a = new o.System.Data.DataSet("网络打印");
23
29
  for (let e = 0; e < t.length; e++) {
24
- const i = t[e], s = new r.System.Data.DataTable(i.dataName);
25
- this.listItem2DataTable(s, i), this.listData2DataTable(s, i), a.tables.add(s), this.report.regData(a.dataSetName, a.dataSetName, a);
30
+ const i = t[e], r = new o.System.Data.DataTable(i.dataName);
31
+ this.listItem2DataTable(r, i), this.listData2DataTable(r, i), a.tables.add(r), this.report.regData(a.dataSetName, a.dataSetName, a);
26
32
  }
27
33
  this.report.dictionary.synchronize();
28
34
  };
29
35
  listItem2DataTable = (t, a) => {
30
36
  for (let e = 0; e < a.listItem.length; e++) {
31
37
  const i = a.listItem[e];
32
- if (o.isEmpty(i.printVal))
38
+ if (s.isEmpty(i.printVal))
33
39
  continue;
34
- const s = new r.System.Data.DataColumn(i.printVal);
35
- t.columns.add(s);
40
+ const r = new o.System.Data.DataColumn(i.printVal);
41
+ t.columns.add(r);
36
42
  }
37
43
  };
38
44
  listData2DataTable = (t, a) => {
39
45
  for (let e = 0; e < a.listData.length; e++) {
40
- const i = a.listData[e], s = this.getRow(t, a.listItem, i);
41
- t.addRow(s);
46
+ const i = a.listData[e], r = this.getRow(t, a.listItem, i);
47
+ t.addRow(r);
42
48
  }
43
49
  };
44
50
  getRow = (t, a, e) => {
45
51
  const i = t.newRow();
46
- for (let s = 0; s < a.length; s++) {
47
- const l = a[s];
48
- o.isEmpty(l.printVal) || i.setValue(l.printVal, Reflect.get(e, l.itemCode));
52
+ for (let r = 0; r < a.length; r++) {
53
+ const l = a[r];
54
+ s.isEmpty(l.printVal) || i.setValue(l.printVal, Reflect.get(e, l.itemCode));
49
55
  }
50
56
  return i;
51
57
  };
@@ -1,8 +1,10 @@
1
- import n from "./desginer.vue.js";
2
- n.install = (o) => {
3
- o.component(n.name, n);
1
+ import o from "./desginer.vue.js";
2
+ import m from "./factory.js";
3
+ o.install = (t) => {
4
+ t.component(o.name, o);
4
5
  };
5
- const m = n;
6
+ const c = o, i = m;
6
7
  export {
7
- m as YzDesginer
8
+ i as StimulsoftFactory,
9
+ c as YzDesginer
8
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/vue",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "宁波甬政vue-ui库",