pro-design-vue 1.0.0-rc.1 → 1.0.0-rc.2

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.
Files changed (66) hide show
  1. package/dist/index.full.js +56 -50
  2. package/dist/index.full.min.js +6 -6
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +6 -6
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +56 -50
  7. package/es/components/counter/src/counter.vue.d.ts +2 -4
  8. package/es/components/counter/src/counter.vue2.mjs +2 -4
  9. package/es/components/counter/src/counter.vue2.mjs.map +1 -1
  10. package/es/components/form/src/components/FormGroup.d.ts +12 -12
  11. package/es/components/form/src/components/FormList.d.ts +12 -12
  12. package/es/components/form/src/components/FormListContainer.d.ts +12 -12
  13. package/es/components/form/src/components/FormListItem.d.ts +12 -12
  14. package/es/components/form/src/components/FormRowWrapper.d.ts +12 -12
  15. package/es/components/form/src/components/FormSet.d.ts +12 -12
  16. package/es/components/layout/src/components/layout-sidebar.vue.d.ts +5 -0
  17. package/es/components/layout/src/components/layout-sidebar.vue2.mjs +4 -3
  18. package/es/components/layout/src/components/layout-sidebar.vue2.mjs.map +1 -1
  19. package/es/components/layout/src/layout.vue.d.ts +1 -0
  20. package/es/components/layout/src/layout.vue2.mjs +3 -1
  21. package/es/components/layout/src/layout.vue2.mjs.map +1 -1
  22. package/es/components/layout/src/typing.d.ts +5 -0
  23. package/es/components/table/src/components/Form/Form.d.ts +7 -7
  24. package/es/components/table/src/components/Form/Form.mjs +2 -36
  25. package/es/components/table/src/components/Form/Form.mjs.map +1 -1
  26. package/es/components/table/src/components/Table.mjs +28 -4
  27. package/es/components/table/src/components/Table.mjs.map +1 -1
  28. package/es/components/table/src/utils/flatColumnsHandle.d.ts +2 -0
  29. package/es/components/table/src/utils/flatColumnsHandle.mjs +18 -0
  30. package/es/components/table/src/utils/flatColumnsHandle.mjs.map +1 -0
  31. package/es/index.d.ts +8 -4
  32. package/es/version.d.ts +1 -1
  33. package/es/version.mjs +1 -1
  34. package/es/version.mjs.map +1 -1
  35. package/lib/components/counter/src/counter.vue.d.ts +2 -4
  36. package/lib/components/counter/src/counter.vue2.js +2 -4
  37. package/lib/components/counter/src/counter.vue2.js.map +1 -1
  38. package/lib/components/form/src/components/FormGroup.d.ts +12 -12
  39. package/lib/components/form/src/components/FormList.d.ts +12 -12
  40. package/lib/components/form/src/components/FormListContainer.d.ts +12 -12
  41. package/lib/components/form/src/components/FormListItem.d.ts +12 -12
  42. package/lib/components/form/src/components/FormRowWrapper.d.ts +12 -12
  43. package/lib/components/form/src/components/FormSet.d.ts +12 -12
  44. package/lib/components/layout/src/components/layout-sidebar.vue.d.ts +5 -0
  45. package/lib/components/layout/src/components/layout-sidebar.vue2.js +4 -3
  46. package/lib/components/layout/src/components/layout-sidebar.vue2.js.map +1 -1
  47. package/lib/components/layout/src/layout.vue.d.ts +1 -0
  48. package/lib/components/layout/src/layout.vue2.js +3 -1
  49. package/lib/components/layout/src/layout.vue2.js.map +1 -1
  50. package/lib/components/layout/src/typing.d.ts +5 -0
  51. package/lib/components/table/src/components/Form/Form.d.ts +7 -7
  52. package/lib/components/table/src/components/Form/Form.js +2 -36
  53. package/lib/components/table/src/components/Form/Form.js.map +1 -1
  54. package/lib/components/table/src/components/Table.js +28 -4
  55. package/lib/components/table/src/components/Table.js.map +1 -1
  56. package/lib/components/table/src/utils/flatColumnsHandle.d.ts +2 -0
  57. package/lib/components/table/src/utils/flatColumnsHandle.js +20 -0
  58. package/lib/components/table/src/utils/flatColumnsHandle.js.map +1 -0
  59. package/lib/index.d.ts +8 -4
  60. package/lib/version.d.ts +1 -1
  61. package/lib/version.js +1 -1
  62. package/lib/version.js.map +1 -1
  63. package/package.json +1 -1
  64. package/theme-chalk/src/index.less +1 -1
  65. package/theme-chalk/pro-table.css +0 -1
  66. package/theme-chalk/src/table.less +0 -1
@@ -1,4 +1,4 @@
1
- /*! Pro Design Vue v1.0.0-rc.1 */
1
+ /*! Pro Design Vue v1.0.0-rc.2 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ant-design-vue'), require('vue')) :
@@ -16,7 +16,7 @@
16
16
  const SCROLL_FIXED_CLASS = `_scroll__fixed_`;
17
17
  const DEFAULT_NAMESPACE = "pro";
18
18
 
19
- const version$1 = "1.0.0-rc.1";
19
+ const version$1 = "1.0.0-rc.2";
20
20
 
21
21
  const makeInstaller = (components = []) => {
22
22
  const install = (app) => {
@@ -8815,7 +8815,7 @@
8815
8815
  transition: { type: null, required: false, default: "linear" },
8816
8816
  useEasing: { type: Boolean, required: false, default: true }
8817
8817
  },
8818
- emits: ["finished", "onFinished", "onStarted", "started"],
8818
+ emits: ["finished", "started"],
8819
8819
  setup(__props, { expose: __expose, emit: __emit }) {
8820
8820
  const props = __props;
8821
8821
  const emit = __emit;
@@ -8848,11 +8848,9 @@
8848
8848
  duration: props.duration,
8849
8849
  onFinished: () => {
8850
8850
  emit("finished");
8851
- emit("onFinished");
8852
8851
  },
8853
8852
  onStarted: () => {
8854
8853
  emit("started");
8855
- emit("onStarted");
8856
8854
  },
8857
8855
  ...props.useEasing ? { transition: TransitionPresets[props.transition] } : {}
8858
8856
  });
@@ -8875,7 +8873,7 @@
8875
8873
  }
8876
8874
  return prefix + x1 + x2 + suffix;
8877
8875
  }
8878
- __expose({ reset });
8876
+ __expose({ start, reset });
8879
8877
  return (_ctx, _cache) => {
8880
8878
  return vue.openBlock(), vue.createElementBlock(
8881
8879
  "span",
@@ -18162,7 +18160,8 @@
18162
18160
  showFixedButton: { type: Boolean, required: false, default: true },
18163
18161
  theme: { type: String, required: true },
18164
18162
  width: { type: Number, required: true },
18165
- zIndex: { type: Number, required: false, default: 0 }
18163
+ zIndex: { type: Number, required: false, default: 0 },
18164
+ fixed: { type: Boolean, required: false, default: true }
18166
18165
  }, {
18167
18166
  "collapse": { type: Boolean },
18168
18167
  "collapseModifiers": {},
@@ -18299,7 +18298,7 @@
18299
18298
  vue.Fragment,
18300
18299
  null,
18301
18300
  [
18302
- _ctx.domVisible ? (vue.openBlock(), vue.createElementBlock(
18301
+ _ctx.domVisible && _ctx.fixed ? (vue.openBlock(), vue.createElementBlock(
18303
18302
  "div",
18304
18303
  {
18305
18304
  key: 0,
@@ -18315,9 +18314,9 @@
18315
18314
  {
18316
18315
  class: vue.normalizeClass([
18317
18316
  vue.unref(prefixCls),
18318
- `${vue.unref(prefixCls)}--fixed`,
18319
18317
  _ctx.theme,
18320
18318
  {
18319
+ [`${vue.unref(prefixCls)}--fixed`]: _ctx.fixed,
18321
18320
  [`${vue.unref(prefixCls)}--mixed`]: _ctx.isSidebarMixed,
18322
18321
  [`${vue.unref(prefixCls)}--no-mixed`]: !_ctx.isSidebarMixed
18323
18322
  }
@@ -18549,6 +18548,7 @@
18549
18548
  sidebarTheme: { type: String, required: false, default: "light" },
18550
18549
  sidebarWidth: { type: Number, required: false, default: 200 },
18551
18550
  sideCollapseWidth: { type: Number, required: false, default: 60 },
18551
+ sidebarFixed: { type: Boolean, required: false, default: true },
18552
18552
  tabbarEnable: { type: Boolean, required: false, default: true },
18553
18553
  tabbarHeight: { type: Number, required: false, default: 40 },
18554
18554
  zIndex: { type: Number, required: false, default: 200 }
@@ -18884,6 +18884,7 @@
18884
18884
  "margin-top": sidebarMarginTop.value,
18885
18885
  "mixed-width": _ctx.sidebarMixedWidth,
18886
18886
  show: showSidebar.value,
18887
+ fixed: _ctx.sidebarFixed,
18887
18888
  theme: _ctx.sidebarTheme,
18888
18889
  width: getSidebarWidth.value,
18889
18890
  "z-index": sidebarZIndex.value,
@@ -18908,7 +18909,7 @@
18908
18909
  ]),
18909
18910
  key: "0"
18910
18911
  } : void 0
18911
- ]), 1032, ["collapse", "expand-on-hover", "expand-on-hovering", "extra-collapse", "extra-visible", "show-collapse-button", "show-fixed-button", "collapse-width", "dom-visible", "extra-width", "fixed-extra", "header-height", "is-sidebar-mixed", "margin-top", "mixed-width", "show", "theme", "width", "z-index"])) : vue.createCommentVNode("v-if", true),
18912
+ ]), 1032, ["collapse", "expand-on-hover", "expand-on-hovering", "extra-collapse", "extra-visible", "show-collapse-button", "show-fixed-button", "collapse-width", "dom-visible", "extra-width", "fixed-extra", "header-height", "is-sidebar-mixed", "margin-top", "mixed-width", "show", "fixed", "theme", "width", "z-index"])) : vue.createCommentVNode("v-if", true),
18912
18913
  vue.createElementVNode(
18913
18914
  "div",
18914
18915
  {
@@ -20786,6 +20787,22 @@
20786
20787
  return (a.index || 0) - (b.index || 0);
20787
20788
  };
20788
20789
 
20790
+ const flatColumnsHandle = (columns) => {
20791
+ const flatColumns = [];
20792
+ const loopColumns = (columns2) => {
20793
+ columns2.forEach((column) => {
20794
+ var _a;
20795
+ if ((_a = column == null ? void 0 : column.children) == null ? void 0 : _a.length) {
20796
+ loopColumns(column == null ? void 0 : column.children);
20797
+ } else {
20798
+ flatColumns.push(column);
20799
+ }
20800
+ });
20801
+ };
20802
+ loopColumns(columns);
20803
+ return flatColumns;
20804
+ };
20805
+
20789
20806
  function useMergedState(defaultStateValue, option) {
20790
20807
  const { defaultValue, value = vue.ref() } = option || {};
20791
20808
  let initValue = typeof defaultStateValue === "function" ? defaultStateValue() : defaultStateValue;
@@ -33356,25 +33373,10 @@
33356
33373
  function _isSlot$3(s) {
33357
33374
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
33358
33375
  }
33359
- const flatColumnsHandle = (columns) => {
33360
- const flatColumns = [];
33361
- const loopColumns = (columns2) => {
33362
- columns2.forEach((column) => {
33363
- var _a;
33364
- if ((_a = column == null ? void 0 : column.children) == null ? void 0 : _a.length) {
33365
- loopColumns(column == null ? void 0 : column.children);
33366
- } else {
33367
- flatColumns.push(column);
33368
- }
33369
- });
33370
- };
33371
- loopColumns(columns);
33372
- return flatColumns;
33373
- };
33374
33376
  var FormRender = /* @__PURE__ */ vue.defineComponent({
33375
33377
  props: {
33376
33378
  prefixCls: String,
33377
- columns: {
33379
+ items: {
33378
33380
  type: Array,
33379
33381
  default: () => []
33380
33382
  },
@@ -33412,25 +33414,6 @@
33412
33414
  setup: (props) => {
33413
33415
  var _a, _b, _c;
33414
33416
  const activeTabKey = vue.ref(((_a = props.search) == null ? void 0 : _a.cardProps) !== false ? (_c = (_b = props.search) == null ? void 0 : _b.cardProps) == null ? void 0 : _c.activeTabKey : "");
33415
- const formItems = vue.computed(() => {
33416
- var _a2, _b2, _c2;
33417
- if ((_b2 = (_a2 = props.search) == null ? void 0 : _a2.items) == null ? void 0 : _b2.length) {
33418
- return (_c2 = props.search) == null ? void 0 : _c2.items;
33419
- }
33420
- return flatColumnsHandle(props.columns).filter((item) => {
33421
- if (item.hideInSearch) {
33422
- return false;
33423
- }
33424
- return true;
33425
- }).map((item) => {
33426
- return {
33427
- ...item,
33428
- width: void 0,
33429
- tooltip: item.headerTooltip,
33430
- name: item.dataIndex
33431
- };
33432
- });
33433
- });
33434
33417
  const cardProps = vue.computed(() => {
33435
33418
  var _a2, _b2;
33436
33419
  if (!((_a2 = props.search) == null ? void 0 : _a2.cardProps)) {
@@ -33465,7 +33448,7 @@
33465
33448
  const searchDom = vue.createVNode(ProQueryFilter, vue.mergeProps({
33466
33449
  "class": `${props.prefixCls}-form`
33467
33450
  }, omit(props.search || {}, ["cardProps", "tabName"]), {
33468
- "items": formItems.value,
33451
+ "items": props.items,
33469
33452
  "loading": props.loading,
33470
33453
  "style": {
33471
33454
  marginBlockEnd: ((_a2 = props.search) == null ? void 0 : _a2.cardProps) !== false ? 0 : "40px"
@@ -33635,6 +33618,28 @@
33635
33618
  };
33636
33619
  return loopFilter(tableColumn.value);
33637
33620
  });
33621
+ const formItems = vue.computed(() => {
33622
+ var _a2, _b, _c;
33623
+ if (!props.search) {
33624
+ return [];
33625
+ }
33626
+ if ((_b = (_a2 = props.search) == null ? void 0 : _a2.items) == null ? void 0 : _b.length) {
33627
+ return (_c = props.search) == null ? void 0 : _c.items;
33628
+ }
33629
+ return flatColumnsHandle(props.columns).filter((item) => {
33630
+ if (item.hideInSearch) {
33631
+ return false;
33632
+ }
33633
+ return true;
33634
+ }).map((item) => {
33635
+ return {
33636
+ ...item,
33637
+ width: void 0,
33638
+ tooltip: item.headerTooltip,
33639
+ name: item.dataIndex
33640
+ };
33641
+ });
33642
+ });
33638
33643
  const preserveRecordsRef = vue.ref(/* @__PURE__ */ new Map());
33639
33644
  const getRowKey = vue.computed(() => typeof props.rowKey == "function" ? props.rowKey : (record) => {
33640
33645
  return record == null ? void 0 : record[props.rowKey || "id"];
@@ -33682,7 +33687,8 @@
33682
33687
  };
33683
33688
  const hideToolbar = vue.computed(() => props.options === false && !props.title && !slots.title && !slots.toolbar && !slots.searchExtra && !slots.toolbarActions);
33684
33689
  const notNeedCardDom = vue.computed(() => {
33685
- if (props.search === false && props.toolBar === false) {
33690
+ var _a2;
33691
+ if ((props.search === false || !((_a2 = formItems.value) == null ? void 0 : _a2.length)) && props.toolBar === false) {
33686
33692
  return true;
33687
33693
  }
33688
33694
  return false;
@@ -33749,7 +33755,7 @@
33749
33755
  reset
33750
33756
  });
33751
33757
  return () => {
33752
- var _a2, _b;
33758
+ var _a2, _b, _c;
33753
33759
  const {
33754
33760
  expandIcon = slots.expandIcon,
33755
33761
  expandedRowRender = slots.expandedRowRender
@@ -33818,9 +33824,9 @@
33818
33824
  }, attrs, {
33819
33825
  "class": [`${mergedPrefixCls.value}-wrapper ${props.bordered ? mergedPrefixCls.value + "-wrapper-bordered" : ""} ${"dark" === theme.value ? mergedPrefixCls.value + "-wrapper-dark" : ""} ${pollingLoading.value ? mergedPrefixCls.value + "-wrapper-polling" : ""}`, attrs.class],
33820
33826
  "onKeydown": onKeydown
33821
- }), [props.search !== false && vue.createVNode(FormRender, {
33827
+ }), [props.search !== false && !!((_c = formItems.value) == null ? void 0 : _c.length) && vue.createVNode(FormRender, {
33822
33828
  "prefixCls": mergedPrefixCls.value,
33823
- "columns": props.columns,
33829
+ "items": formItems.value,
33824
33830
  "cardBordered": props.cardBordered,
33825
33831
  "search": props.search,
33826
33832
  "loading": formSubmitLoading.value,