@polyv/vue-components 1.8.0 → 1.8.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyv/vue-components",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "main": "./vue/index.es.js",
5
5
  "types": "./vue/src/index.d.ts",
6
6
  "dependencies": {
package/vue2/index.es.js CHANGED
@@ -20432,14 +20432,16 @@ const Gw = Yw.exports, _S = G("PwcSlider", Gw), Kw = (n) => {
20432
20432
  totalPages: 0,
20433
20433
  contents: e.data
20434
20434
  } : e.data), t = k(o.value);
20435
- H(o, () => {
20435
+ return H(o, () => {
20436
20436
  t.value = o.value;
20437
20437
  }, {
20438
20438
  deep: !0
20439
20439
  }), ne(Y1, {
20440
20440
  propsData: o,
20441
20441
  paginationModelValue: t
20442
- });
20442
+ }), {
20443
+ tablePaginationVisible: b(() => !Array.isArray(e.data) && "pageNumber" in e.data ? !0 : !!e.pagination)
20444
+ };
20443
20445
  }, G1 = () => Y(Y1), K1 = Symbol("table-render-data-inject-key"), eb = (n) => {
20444
20446
  const { tableProps: e } = n, o = b(() => Array.isArray(e.data) ? e.data : e.data.contents), t = b(() => o.value.length === 0);
20445
20447
  return ne(K1, {
@@ -20504,7 +20506,9 @@ const Gw = Yw.exports, _S = G("PwcSlider", Gw), Kw = (n) => {
20504
20506
  };
20505
20507
  }, On = () => Y(X1), el = Symbol("table-inject-key"), ob = (n) => {
20506
20508
  const { props: e, emit: o } = n, t = H1(), r = ir("left"), s = ir("center"), a = ir("right"), i = Jw(), { allColumnWidth: l, allColumnList: c } = Kw({ ...i, leftColumnListInstance: r, centerColumnListInstance: s, rightColumnListInstance: a }), u = tb({ ...i, allColumnWidth: l });
20507
- return eb({ tableProps: e }), nb({ tableProps: e }), Xw({ tableProps: e }), ne(el, {
20509
+ eb({ tableProps: e }), nb({ tableProps: e });
20510
+ const d = Xw({ tableProps: e });
20511
+ return ne(el, {
20508
20512
  tableProps: e,
20509
20513
  tableEmit: o,
20510
20514
  originalColumnListInstance: t,
@@ -20517,6 +20521,7 @@ const Gw = Yw.exports, _S = G("PwcSlider", Gw), Kw = (n) => {
20517
20521
  }), {
20518
20522
  ...i,
20519
20523
  ...u,
20524
+ ...d,
20520
20525
  leftColumnListInstance: r,
20521
20526
  centerColumnListInstance: s,
20522
20527
  rightColumnListInstance: a
@@ -21507,10 +21512,11 @@ const Jy = Ky.exports, Xy = () => ({
21507
21512
  setup(n, { emit: e }) {
21508
21513
  const o = n, {
21509
21514
  wrapRef: t,
21510
- hasHorizontalScroll: r,
21511
- hasVerticalScroll: s
21512
- } = ob({ props: o, emit: e }), { footerClass: a } = ox({ props: o });
21513
- return { __sfc: !0, props: o, emit: e, wrapRef: t, hasHorizontalScroll: r, hasVerticalScroll: s, footerClass: a, TableBody: sy, TableFixedShadow: fy, TableHeader: $y, HorizontalScrollbar: Vy, VerticalScrollbar: Hy, TablePagination: Jy };
21515
+ tablePaginationVisible: r,
21516
+ hasHorizontalScroll: s,
21517
+ hasVerticalScroll: a
21518
+ } = ob({ props: o, emit: e }), { footerClass: i } = ox({ props: o });
21519
+ return { __sfc: !0, props: o, emit: e, wrapRef: t, tablePaginationVisible: r, hasHorizontalScroll: s, hasVerticalScroll: a, footerClass: i, TableBody: sy, TableFixedShadow: fy, TableHeader: $y, HorizontalScrollbar: Vy, VerticalScrollbar: Hy, TablePagination: Jy };
21514
21520
  }
21515
21521
  });
21516
21522
  var sx = function() {
@@ -21520,7 +21526,7 @@ var sx = function() {
21520
21526
  "is-flex-height": e.flexHeight,
21521
21527
  "has-horizontal-scroll": t.hasHorizontalScroll,
21522
21528
  "has-vertical-scroll": t.hasVerticalScroll
21523
- } }, [o("div", { staticClass: "pwc-table__hidden-column" }, [e._t("default")], 2), o("div", { staticClass: "pwc-table__content" }, [o("div", { staticClass: "pwc-table__inner" }, [o(t.TableHeader), o(t.TableBody), o(t.TableFixedShadow, { attrs: { position: "left" } }), o(t.TableFixedShadow, { attrs: { position: "right" } })], 1), o(t.HorizontalScrollbar), o(t.VerticalScrollbar)], 1), e.pagination ? o("div", { staticClass: "pwc-table__footer", class: t.footerClass }, [e.pagination ? o(t.TablePagination) : e._e()], 1) : e._e()]);
21529
+ } }, [o("div", { staticClass: "pwc-table__hidden-column" }, [e._t("default")], 2), o("div", { staticClass: "pwc-table__content" }, [o("div", { staticClass: "pwc-table__inner" }, [o(t.TableHeader), o(t.TableBody), o(t.TableFixedShadow, { attrs: { position: "left" } }), o(t.TableFixedShadow, { attrs: { position: "right" } })], 1), o(t.HorizontalScrollbar), o(t.VerticalScrollbar)], 1), t.tablePaginationVisible ? o("div", { staticClass: "pwc-table__footer", class: t.footerClass }, [t.tablePaginationVisible ? o(t.TablePagination) : e._e()], 1) : e._e()]);
21524
21530
  }, ax = [], ix = /* @__PURE__ */ B(
21525
21531
  rx,
21526
21532
  sx,
@@ -8,5 +8,7 @@ export interface TablePaginationInjectData {
8
8
  }
9
9
  export declare const useTablePagination: (options: {
10
10
  tableProps: VueProps<typeof tableProps>;
11
- }) => void;
11
+ }) => {
12
+ tablePaginationVisible: ComputedRef<boolean>;
13
+ };
12
14
  export declare const useTablePaginationInject: () => TablePaginationInjectData;
@@ -210,6 +210,7 @@ export declare const useTable: (options: {
210
210
  columnCount: ComputedRef<number>;
211
211
  columnWidthTotal: ComputedRef<number>;
212
212
  };
213
+ tablePaginationVisible: ComputedRef<boolean>;
213
214
  hasHorizontalScroll: ComputedRef<boolean>;
214
215
  hasVerticalScroll: ComputedRef<boolean>;
215
216
  wrapRef: import('vue').Ref<HTMLDivElement | undefined>;
package/vue3/index.es.js CHANGED
@@ -20437,14 +20437,16 @@ const Kw = Gw.exports, CS = G("PwcSlider", Kw), Jw = (n) => {
20437
20437
  totalPages: 0,
20438
20438
  contents: e.data
20439
20439
  } : e.data), t = k(o.value);
20440
- H(o, () => {
20440
+ return H(o, () => {
20441
20441
  t.value = o.value;
20442
20442
  }, {
20443
20443
  deep: !0
20444
20444
  }), ne(G1, {
20445
20445
  propsData: o,
20446
20446
  paginationModelValue: t
20447
- });
20447
+ }), {
20448
+ tablePaginationVisible: b(() => !Array.isArray(e.data) && "pageNumber" in e.data ? !0 : !!e.pagination)
20449
+ };
20448
20450
  }, K1 = () => Y(G1), J1 = Symbol("table-render-data-inject-key"), tb = (n) => {
20449
20451
  const { tableProps: e } = n, o = b(() => Array.isArray(e.data) ? e.data : e.data.contents), t = b(() => o.value.length === 0);
20450
20452
  return ne(J1, {
@@ -20509,7 +20511,9 @@ const Kw = Gw.exports, CS = G("PwcSlider", Kw), Jw = (n) => {
20509
20511
  };
20510
20512
  }, Nn = () => Y(el), tl = Symbol("table-inject-key"), rb = (n) => {
20511
20513
  const { props: e, emit: o } = n, t = j1(), r = ar("left"), s = ar("center"), a = ar("right"), i = Xw(), { allColumnWidth: l, allColumnList: u } = Jw({ ...i, leftColumnListInstance: r, centerColumnListInstance: s, rightColumnListInstance: a }), c = nb({ ...i, allColumnWidth: l });
20512
- return tb({ tableProps: e }), ob({ tableProps: e }), eb({ tableProps: e }), ne(tl, {
20514
+ tb({ tableProps: e }), ob({ tableProps: e });
20515
+ const d = eb({ tableProps: e });
20516
+ return ne(tl, {
20513
20517
  tableProps: e,
20514
20518
  tableEmit: o,
20515
20519
  originalColumnListInstance: t,
@@ -20522,6 +20526,7 @@ const Kw = Gw.exports, CS = G("PwcSlider", Kw), Jw = (n) => {
20522
20526
  }), {
20523
20527
  ...i,
20524
20528
  ...c,
20529
+ ...d,
20525
20530
  leftColumnListInstance: r,
20526
20531
  centerColumnListInstance: s,
20527
20532
  rightColumnListInstance: a
@@ -21512,10 +21517,11 @@ const Xy = Jy.exports, ex = () => ({
21512
21517
  setup(n, { emit: e }) {
21513
21518
  const o = n, {
21514
21519
  wrapRef: t,
21515
- hasHorizontalScroll: r,
21516
- hasVerticalScroll: s
21517
- } = rb({ props: o, emit: e }), { footerClass: a } = rx({ props: o });
21518
- return { __sfc: !0, props: o, emit: e, wrapRef: t, hasHorizontalScroll: r, hasVerticalScroll: s, footerClass: a, TableBody: ay, TableFixedShadow: my, TableHeader: zy, HorizontalScrollbar: Oy, VerticalScrollbar: jy, TablePagination: Xy };
21520
+ tablePaginationVisible: r,
21521
+ hasHorizontalScroll: s,
21522
+ hasVerticalScroll: a
21523
+ } = rb({ props: o, emit: e }), { footerClass: i } = rx({ props: o });
21524
+ return { __sfc: !0, props: o, emit: e, wrapRef: t, tablePaginationVisible: r, hasHorizontalScroll: s, hasVerticalScroll: a, footerClass: i, TableBody: ay, TableFixedShadow: my, TableHeader: zy, HorizontalScrollbar: Oy, VerticalScrollbar: jy, TablePagination: Xy };
21519
21525
  }
21520
21526
  });
21521
21527
  var ax = function() {
@@ -21525,7 +21531,7 @@ var ax = function() {
21525
21531
  "is-flex-height": e.flexHeight,
21526
21532
  "has-horizontal-scroll": t.hasHorizontalScroll,
21527
21533
  "has-vertical-scroll": t.hasVerticalScroll
21528
- } }, [o("div", { staticClass: "pwc-table__hidden-column" }, [e._t("default")], 2), o("div", { staticClass: "pwc-table__content" }, [o("div", { staticClass: "pwc-table__inner" }, [o(t.TableHeader), o(t.TableBody), o(t.TableFixedShadow, { attrs: { position: "left" } }), o(t.TableFixedShadow, { attrs: { position: "right" } })], 1), o(t.HorizontalScrollbar), o(t.VerticalScrollbar)], 1), e.pagination ? o("div", { staticClass: "pwc-table__footer", class: t.footerClass }, [e.pagination ? o(t.TablePagination) : e._e()], 1) : e._e()]);
21534
+ } }, [o("div", { staticClass: "pwc-table__hidden-column" }, [e._t("default")], 2), o("div", { staticClass: "pwc-table__content" }, [o("div", { staticClass: "pwc-table__inner" }, [o(t.TableHeader), o(t.TableBody), o(t.TableFixedShadow, { attrs: { position: "left" } }), o(t.TableFixedShadow, { attrs: { position: "right" } })], 1), o(t.HorizontalScrollbar), o(t.VerticalScrollbar)], 1), t.tablePaginationVisible ? o("div", { staticClass: "pwc-table__footer", class: t.footerClass }, [t.tablePaginationVisible ? o(t.TablePagination) : e._e()], 1) : e._e()]);
21529
21535
  }, ix = [], lx = /* @__PURE__ */ B(
21530
21536
  sx,
21531
21537
  ax,
@@ -8,5 +8,7 @@ export interface TablePaginationInjectData {
8
8
  }
9
9
  export declare const useTablePagination: (options: {
10
10
  tableProps: VueProps<typeof tableProps>;
11
- }) => void;
11
+ }) => {
12
+ tablePaginationVisible: ComputedRef<boolean>;
13
+ };
12
14
  export declare const useTablePaginationInject: () => TablePaginationInjectData;
@@ -210,6 +210,7 @@ export declare const useTable: (options: {
210
210
  columnCount: ComputedRef<number>;
211
211
  columnWidthTotal: ComputedRef<number>;
212
212
  };
213
+ tablePaginationVisible: ComputedRef<boolean>;
213
214
  hasHorizontalScroll: ComputedRef<boolean>;
214
215
  hasVerticalScroll: ComputedRef<boolean>;
215
216
  wrapRef: import('vue').Ref<HTMLDivElement | undefined>;