@maxax/ui 1.0.0 → 1.0.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.
Files changed (40) hide show
  1. package/dist/components/basic-checkbox-group/BasicCheckboxGroup.d.ts +2 -0
  2. package/dist/components/basic-checkbox-group/BasicCheckboxGroup.d.ts.map +1 -1
  3. package/dist/components/basic-message-box/BasicMessageBox.vue.d.ts +2 -1
  4. package/dist/components/basic-message-box/BasicMessageBox.vue.d.ts.map +1 -1
  5. package/dist/components/basic-table/BasicTable.vue.d.ts +211 -191
  6. package/dist/components/basic-table/BasicTable.vue.d.ts.map +1 -1
  7. package/dist/components/basic-table/helper.d.ts +1 -3
  8. package/dist/components/basic-table/helper.d.ts.map +1 -1
  9. package/dist/components/basic-table/hooks/use-table-config.d.ts +5 -0
  10. package/dist/components/basic-table/hooks/use-table-config.d.ts.map +1 -1
  11. package/dist/components/basic-table/index.d.ts +3 -3
  12. package/dist/components/basic-table/index.d.ts.map +1 -1
  13. package/dist/components/basic-table/setting.d.ts +0 -3
  14. package/dist/components/basic-table/setting.d.ts.map +1 -1
  15. package/dist/components/basic-table/vxe-table.d.ts +3 -3
  16. package/dist/components/basic-table/vxe-table.d.ts.map +1 -1
  17. package/dist/components/basic-upload-core/AjaxUploader.d.ts.map +1 -1
  18. package/dist/components/config-provider/ConfigProvider.d.ts +8 -2
  19. package/dist/components/config-provider/ConfigProvider.d.ts.map +1 -1
  20. package/dist/components/config-provider/hooks/use-global-config.d.ts +1 -0
  21. package/dist/components/config-provider/hooks/use-global-config.d.ts.map +1 -1
  22. package/dist/components/config-provider/interface.d.ts +5 -2
  23. package/dist/components/config-provider/interface.d.ts.map +1 -1
  24. package/dist/composable/index.d.ts +1 -0
  25. package/dist/composable/index.d.ts.map +1 -1
  26. package/dist/composable/use-table-config.d.ts +2 -1
  27. package/dist/composable/use-table-config.d.ts.map +1 -1
  28. package/dist/composable/use-theme-overrides.d.ts +5 -0
  29. package/dist/composable/use-theme-overrides.d.ts.map +1 -0
  30. package/dist/constants/context.d.ts +3 -0
  31. package/dist/constants/context.d.ts.map +1 -1
  32. package/dist/index.cjs +191 -183
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.mjs +185 -183
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/locales.cjs +528 -112
  37. package/dist/locales.cjs.map +1 -1
  38. package/dist/locales.mjs +528 -112
  39. package/dist/locales.mjs.map +1 -1
  40. package/package.json +5 -5
package/dist/index.cjs CHANGED
@@ -8,7 +8,7 @@ const utils$1 = require("./utils-pcMeUjXb.cjs");
8
8
  const hooks = require("@maxax/hooks");
9
9
  const dateFns = require("date-fns");
10
10
  const dayjs = require("dayjs");
11
- const VxeUI = require("vxe-pc-ui");
11
+ const vxePcUi = require("vxe-pc-ui");
12
12
  const vxeTable = require("vxe-table");
13
13
  const elementResizeDetectorMaker = require("element-resize-detector");
14
14
  const isStringNumber = (val) => {
@@ -296,6 +296,7 @@ const namespaceContextKey = Symbol("namespaceContextKey");
296
296
  const localeContextKey = Symbol("localeContextKey");
297
297
  const zIndexContextKey = Symbol("zIndexContextKey");
298
298
  const tableContextKey = Symbol("tableContextKey");
299
+ const themeOverridesContextKey = Symbol("themeOverridesContextKey");
299
300
  function useLocale(localeOverrides) {
300
301
  const locale = localeOverrides || vue.inject(localeContextKey, vue.ref());
301
302
  return utils$1.buildLocaleContext(vue.computed(() => locale.value || utils$1.zhCN));
@@ -587,111 +588,13 @@ const useSameTarget = (handleClick) => {
587
588
  };
588
589
  return { onClick, onMousedown, onMouseup };
589
590
  };
590
- const ROW_KEY$1 = "_MAX_ROW_KEY";
591
- const PAGE_SIZE_OPTIONS$1 = [10, 50, 80, 100];
592
- const PAGE_SIZE$1 = 10;
593
- const FETCH_SETTING$1 = {
594
- // The field name of the current page passed to the background
595
- pageField: "page",
596
- // The number field name of each page displayed in the background
597
- sizeField: "pageSize",
598
- // Field name of the form data returned by the interface
599
- listField: "itemList",
600
- // Total number of tables returned by the interface field name
601
- totalField: "totalCount"
602
- };
603
- const DEFAULT_SIZE = "small";
604
- const setting = {
605
- fit: true,
606
- showHeader: true,
607
- delayHover: 250,
608
- autoResize: true,
609
- padding: false,
610
- minHeight: 180,
611
- size: DEFAULT_SIZE,
612
- border: "inner",
613
- showOverflow: true,
614
- showHeaderOverflow: "tooltip",
615
- showFooterOverflow: "tooltip",
616
- autoCreateKey: true,
617
- showIndexColumn: true,
618
- fetchSetting: FETCH_SETTING$1,
619
- columns: () => [],
620
- sortConfig: () => ({
621
- remote: true
622
- }),
623
- resizeConfig: () => ({
624
- refreshDelay: 250
625
- }),
626
- radioConfig: () => ({
627
- strict: true
628
- }),
629
- rowConfig: () => ({
630
- useKey: true,
631
- isCurrent: true,
632
- isHover: true,
633
- keyField: "_ROW_KEY_"
634
- }),
635
- checkboxConfig: () => ({
636
- strict: true
637
- }),
638
- tooltipConfig: () => ({
639
- enterable: true
640
- }),
641
- validConfig: () => ({
642
- showMessage: true,
643
- autoClear: true,
644
- autoPos: true,
645
- message: "inline",
646
- msgMode: "single"
647
- }),
648
- columnConfig: () => ({
649
- resizable: true,
650
- useKey: true,
651
- maxFixedSize: 4
652
- }),
653
- customConfig: () => ({
654
- mode: "modal"
655
- }),
656
- toolbarConfig: () => ({
657
- custom: true,
658
- zoom: true
659
- })
660
- };
661
- const globalSetting = {
662
- zIndex: 2e3,
663
- table: {
664
- size: "small",
665
- border: true,
666
- fit: true,
667
- showHeader: true,
668
- delayHover: 250,
669
- autoResize: true,
670
- minHeight: 180,
671
- maxHeight: 325,
672
- showOverflow: true,
673
- resizable: true,
674
- showHeaderOverflow: "tooltip",
675
- showFooterOverflow: "tooltip"
676
- },
677
- grid: {
678
- size: "small",
679
- border: true,
680
- fit: true,
681
- showHeader: true,
682
- delayHover: 250,
683
- autoResize: true,
684
- minHeight: 180,
685
- maxHeight: 325,
686
- showOverflow: true,
687
- resizable: true,
688
- showHeaderOverflow: "tooltip",
689
- showFooterOverflow: "tooltip"
690
- }
691
- };
692
591
  function useTableConfig(tableOverrides) {
693
592
  const table = tableOverrides || vue.inject(tableContextKey, vue.ref());
694
- return table.value || globalSetting;
593
+ return table.value;
594
+ }
595
+ function useThemeOverrides(themeOverrides) {
596
+ const overrides = themeOverrides || vue.inject(themeOverridesContextKey, vue.ref());
597
+ return overrides.value;
695
598
  }
696
599
  const zIndex = vue.ref(0);
697
600
  const initial = {
@@ -2635,6 +2538,10 @@ const provideGlobalConfig = (config, app, global = false) => {
2635
2538
  tableContextKey,
2636
2539
  vue.computed(() => context.value.table)
2637
2540
  );
2541
+ provideFn(
2542
+ themeOverridesContextKey,
2543
+ vue.computed(() => context.value.themeOverrides)
2544
+ );
2638
2545
  if (global || !globalConfig.value) {
2639
2546
  globalConfig.value = context.value;
2640
2547
  }
@@ -2657,11 +2564,16 @@ const useConfigProvider = (block) => {
2657
2564
  var _a;
2658
2565
  return ((_a = config.value) == null ? void 0 : _a.zIndex) || DEFAULT_INITIAL_Z_INDEX;
2659
2566
  }));
2567
+ const themeOverrides = useThemeOverrides(vue.computed(() => {
2568
+ var _a;
2569
+ return (_a = config.value) == null ? void 0 : _a.themeOverrides;
2570
+ }));
2660
2571
  provideGlobalConfig(vue.computed(() => vue.unref(config) || {}));
2661
2572
  return {
2662
2573
  ns,
2663
2574
  locale,
2664
- zIndex: zIndex2
2575
+ zIndex: zIndex2,
2576
+ themeOverrides
2665
2577
  };
2666
2578
  };
2667
2579
  const configProviderProps = {
@@ -2689,6 +2601,9 @@ const configProviderProps = {
2689
2601
  /** 全局表格配置 */
2690
2602
  table: {
2691
2603
  type: Object
2604
+ },
2605
+ themeOverrides: {
2606
+ type: Object
2692
2607
  }
2693
2608
  };
2694
2609
  const ConfigProvider = /* @__PURE__ */ vue.defineComponent({
@@ -2760,7 +2675,7 @@ const _sfc_main$B = vue.defineComponent({
2760
2675
  props: basicMessageBoxProps,
2761
2676
  emits: ["vanish", "action"],
2762
2677
  setup(props, { emit }) {
2763
- const { locale, zIndex: zIndex2, ns } = useConfigProvider("basic-message-box");
2678
+ const { locale, zIndex: zIndex2, ns, themeOverrides } = useConfigProvider("basic-message-box");
2764
2679
  const { t } = locale;
2765
2680
  const { nextZIndex } = zIndex2;
2766
2681
  const visible = vue.ref(false);
@@ -2821,6 +2736,7 @@ const _sfc_main$B = vue.defineComponent({
2821
2736
  const inputRef = vue.ref();
2822
2737
  const confirmRef = vue.ref();
2823
2738
  const confirmButtonClasses = vue.computed(() => state.confirmButtonClass);
2739
+ const themeOverridesRef = vue.computed(() => themeOverrides);
2824
2740
  const contentId = utils.guid();
2825
2741
  const inputId = utils.guid();
2826
2742
  const validate = () => {
@@ -2965,6 +2881,7 @@ const _sfc_main$B = vue.defineComponent({
2965
2881
  inputId,
2966
2882
  iconComponent,
2967
2883
  confirmButtonClasses,
2884
+ themeOverridesRef,
2968
2885
  rootRef,
2969
2886
  focusStartRef,
2970
2887
  headerRef,
@@ -3094,12 +3011,13 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
3094
3011
  ref: "inputRef",
3095
3012
  value: _ctx.inputValue,
3096
3013
  "onUpdate:value": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),
3014
+ "theme-overrides": _ctx.themeOverridesRef,
3097
3015
  type: _ctx.inputType,
3098
3016
  placeholder: _ctx.inputPlaceholder,
3099
3017
  "aria-invalid": _ctx.validateError,
3100
3018
  class: vue.normalizeClass({ invalid: _ctx.validateError }),
3101
3019
  onKeydown: vue.withKeys(_ctx.handleInputEnter, ["enter"])
3102
- }, null, 8, ["id", "value", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
3020
+ }, null, 8, ["id", "value", "theme-overrides", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
3103
3021
  vue.createElementVNode("div", {
3104
3022
  class: vue.normalizeClass(_ctx.ns.e("errormsg")),
3105
3023
  style: vue.normalizeStyle({ visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden" })
@@ -3113,6 +3031,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
3113
3031
  }, [
3114
3032
  _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_NButton, {
3115
3033
  key: 0,
3034
+ "theme-overrides": _ctx.themeOverridesRef,
3116
3035
  loading: _ctx.cancelButtonLoading,
3117
3036
  class: vue.normalizeClass([_ctx.cancelButtonClass]),
3118
3037
  round: _ctx.roundButton,
@@ -3123,9 +3042,10 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
3123
3042
  vue.createTextVNode(vue.toDisplayString(_ctx.cancelButtonText || _ctx.t("max.button.cancel")), 1)
3124
3043
  ]),
3125
3044
  _: 1
3126
- }, 8, ["loading", "class", "round"])) : vue.createCommentVNode("", true),
3045
+ }, 8, ["theme-overrides", "loading", "class", "round"])) : vue.createCommentVNode("", true),
3127
3046
  vue.withDirectives(vue.createVNode(_component_NButton, {
3128
3047
  ref: "confirmRef",
3048
+ "theme-overrides": _ctx.themeOverridesRef,
3129
3049
  type: "primary",
3130
3050
  loading: _ctx.confirmButtonLoading,
3131
3051
  class: vue.normalizeClass([_ctx.confirmButtonClasses]),
@@ -3138,7 +3058,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
3138
3058
  vue.createTextVNode(vue.toDisplayString(_ctx.confirmButtonText || _ctx.t("max.button.confirm")), 1)
3139
3059
  ]),
3140
3060
  _: 1
3141
- }, 8, ["loading", "class", "round", "disabled"]), [
3061
+ }, 8, ["theme-overrides", "loading", "class", "round", "disabled"]), [
3142
3062
  [vue.vShow, _ctx.showConfirmButton]
3143
3063
  ])
3144
3064
  ], 2)
@@ -4238,6 +4158,7 @@ const BasicCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4238
4158
  props: basicCheckboxGroupProps,
4239
4159
  emits: {
4240
4160
  "update:value": (_value) => true,
4161
+ "all-change": (_value, _ev) => true,
4241
4162
  /**
4242
4163
  * @zh 值改变时触发
4243
4164
  * @en Trigger when the value changes
@@ -4294,6 +4215,7 @@ const BasicCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4294
4215
  allChecked.value = value;
4295
4216
  const newValue = allChecked.value ? options.value.map((option) => option.value) : [];
4296
4217
  handleChange(newValue, e);
4218
+ emit("all-change", newValue, e);
4297
4219
  };
4298
4220
  const cls = vue.computed(() => [b(), is(`direction-${props.direction}`)]);
4299
4221
  vue.watch(() => props.value, (curValue) => {
@@ -12973,10 +12895,10 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
12973
12895
  }
12974
12896
  });
12975
12897
  const XBasicIconPicker = utils.withInstall(_sfc_main$e);
12976
- const ROW_KEY = "_MAX_ROW_KEY";
12977
- const PAGE_SIZE_OPTIONS = [10, 50, 80, 100];
12978
- const PAGE_SIZE = 10;
12979
- const FETCH_SETTING = {
12898
+ const ROW_KEY$1 = "_MAX_ROW_KEY";
12899
+ const PAGE_SIZE_OPTIONS$1 = [10, 50, 80, 100];
12900
+ const PAGE_SIZE$1 = 10;
12901
+ const FETCH_SETTING$1 = {
12980
12902
  // The field name of the current page passed to the background
12981
12903
  pageField: "page",
12982
12904
  // The number field name of each page displayed in the background
@@ -13003,7 +12925,7 @@ function useDataSource$1(propsRef, { tableData, getPaginationInfo, setPagination
13003
12925
  const getDataSourceRef = vue.ref([]);
13004
12926
  const getRowKey = vue.computed(() => {
13005
12927
  const { rKey } = vue.unref(propsRef);
13006
- return rKey || ROW_KEY;
12928
+ return rKey || ROW_KEY$1;
13007
12929
  });
13008
12930
  vue.watchEffect(() => {
13009
12931
  tableData.value = vue.unref(dataSourceRef);
@@ -13029,11 +12951,11 @@ function useDataSource$1(propsRef, { tableData, getPaginationInfo, setPagination
13029
12951
  const firstItem = dataSource[0];
13030
12952
  const lastItem = dataSource[dataSource.length - 1];
13031
12953
  if (firstItem && lastItem) {
13032
- if (!firstItem[ROW_KEY] || !lastItem[ROW_KEY]) {
12954
+ if (!firstItem[ROW_KEY$1] || !lastItem[ROW_KEY$1]) {
13033
12955
  const data = lodashEs.cloneDeep(vue.unref(dataSourceRef));
13034
12956
  data.forEach((item) => {
13035
- if (!item[ROW_KEY]) {
13036
- item[ROW_KEY] = utils.guid();
12957
+ if (!item[ROW_KEY$1]) {
12958
+ item[ROW_KEY$1] = utils.guid();
13037
12959
  }
13038
12960
  });
13039
12961
  dataSourceRef.value = data;
@@ -13096,7 +13018,7 @@ function useDataSource$1(propsRef, { tableData, getPaginationInfo, setPagination
13096
13018
  function getSearchInfo() {
13097
13019
  return searchInfoRef.value;
13098
13020
  }
13099
- function mergeListDataRecord(records, key2 = ROW_KEY) {
13021
+ function mergeListDataRecord(records, key2 = ROW_KEY$1) {
13100
13022
  const itemList = lodashEs.cloneDeep(getDataSource() || []);
13101
13023
  const items = utils.mergeArray(itemList, records, key2);
13102
13024
  setListData(items);
@@ -13108,11 +13030,11 @@ function useDataSource$1(propsRef, { tableData, getPaginationInfo, setPagination
13108
13030
  try {
13109
13031
  setLoading(true);
13110
13032
  const { pageField, sizeField, listField, totalField } = {
13111
- ...FETCH_SETTING,
13033
+ ...FETCH_SETTING$1,
13112
13034
  ...fetchSetting
13113
13035
  };
13114
13036
  let pageParams = {};
13115
- const { currentPage = 1, pageSize = PAGE_SIZE } = vue.unref(getPaginationInfo);
13037
+ const { currentPage = 1, pageSize = PAGE_SIZE$1 } = vue.unref(getPaginationInfo);
13116
13038
  const isPagination = lodashEs.isBoolean(pagination) ? pagination : lodashEs.isPlainObject(pagination);
13117
13039
  if (lodashEs.isBoolean(pagination) && !pagination) {
13118
13040
  pageParams = {};
@@ -13264,8 +13186,8 @@ function usePagination$1(propsRef) {
13264
13186
  size: "small",
13265
13187
  border: true,
13266
13188
  currentPage: 1,
13267
- pageSize: PAGE_SIZE,
13268
- pageSizes: PAGE_SIZE_OPTIONS,
13189
+ pageSize: PAGE_SIZE$1,
13190
+ pageSizes: PAGE_SIZE_OPTIONS$1,
13269
13191
  layouts: ["PrevJump", "PrevPage", "Number", "NextPage", "NextJump", "Sizes", "Total"],
13270
13192
  total: 0
13271
13193
  });
@@ -13316,7 +13238,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
13316
13238
  beforeFetch: {},
13317
13239
  afterFetch: {},
13318
13240
  handleSearchInfoFn: {},
13319
- fetchSetting: { default: () => FETCH_SETTING },
13241
+ fetchSetting: { default: () => FETCH_SETTING$1 },
13320
13242
  defSort: {},
13321
13243
  searchInfo: {},
13322
13244
  useSearchForm: { type: Boolean },
@@ -13439,13 +13361,13 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
13439
13361
  }, [
13440
13362
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getDataSourceRef), (item, index2) => {
13441
13363
  return vue.openBlock(), vue.createElementBlock("div", {
13442
- key: item[vue.unref(ROW_KEY)],
13364
+ key: item[vue.unref(ROW_KEY$1)],
13443
13365
  class: vue.normalizeClass(["basic-list-page-item", getItemClassName(item)])
13444
13366
  }, [
13445
13367
  vue.renderSlot(_ctx.$slots, "default", {
13446
13368
  rowIndex: index2,
13447
13369
  row: item,
13448
- rowKey: item[vue.unref(ROW_KEY)]
13370
+ rowKey: item[vue.unref(ROW_KEY$1)]
13449
13371
  })
13450
13372
  ], 2);
13451
13373
  }), 128))
@@ -13459,7 +13381,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
13459
13381
  vue.renderSlot(_ctx.$slots, "bottom-before"),
13460
13382
  vue.renderSlot(_ctx.$slots, "bottom-after")
13461
13383
  ], 2),
13462
- ((_a = vue.unref(getPaginationInfo)) == null ? void 0 : _a.total) && __props.pagination ? (vue.openBlock(), vue.createBlock(vue.unref(VxeUI.VxePager), vue.mergeProps({ key: 0 }, vue.unref(getPaginationInfo), { onPageChange: vue.unref(onPageChange) }), null, 16, ["onPageChange"])) : vue.createCommentVNode("", true)
13384
+ ((_a = vue.unref(getPaginationInfo)) == null ? void 0 : _a.total) && __props.pagination ? (vue.openBlock(), vue.createBlock(vue.unref(vxePcUi.VxePager), vue.mergeProps({ key: 0 }, vue.unref(getPaginationInfo), { onPageChange: vue.unref(onPageChange) }), null, 16, ["onPageChange"])) : vue.createCommentVNode("", true)
13463
13385
  ], 2),
13464
13386
  vue.unref(getLoading) ? (vue.openBlock(), vue.createElementBlock("div", {
13465
13387
  key: 1,
@@ -14461,33 +14383,20 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
14461
14383
  });
14462
14384
  const basicSubPanelProps = {};
14463
14385
  const XBasicSubPanel = utils.withInstall(_sfc_main$8);
14464
- function parseRowKey(rowKey, record, autoCreateKey) {
14465
- if (typeof rowKey === "string") {
14466
- return rowKey;
14467
- } else if (rowKey) {
14468
- return rowKey(record);
14469
- }
14470
- return ROW_KEY$1;
14471
- }
14472
- function parseRowKeyValue(rowKey, record, autoCreateKey) {
14473
- return record[parseRowKey(rowKey, record)];
14474
- }
14475
- function setVxeTableTheme(name) {
14476
- const theme = !name || name === "default" ? "light" : name;
14477
- if (typeof document !== "undefined") {
14478
- const documentElement = document.documentElement;
14479
- if (documentElement) {
14480
- documentElement.setAttribute("data-vxe-ui-theme", theme);
14481
- }
14482
- }
14483
- }
14484
- function setVxeUIConfig(config = {}) {
14485
- const globalConfig2 = lodashEs.merge({}, globalSetting, config);
14486
- VxeUI.setConfig(globalConfig2);
14487
- }
14488
- function setVxeUIFormat(format) {
14489
- VxeUI.formats.mixin(format);
14490
- }
14386
+ const ROW_KEY = "_MAX_ROW_KEY";
14387
+ const PAGE_SIZE_OPTIONS = [10, 50, 80, 100];
14388
+ const PAGE_SIZE = 10;
14389
+ const FETCH_SETTING = {
14390
+ // The field name of the current page passed to the background
14391
+ pageField: "page",
14392
+ // The number field name of each page displayed in the background
14393
+ sizeField: "pageSize",
14394
+ // Field name of the form data returned by the interface
14395
+ listField: "itemList",
14396
+ // Total number of tables returned by the interface field name
14397
+ totalField: "totalCount"
14398
+ };
14399
+ const DEFAULT_SIZE = "small";
14491
14400
  function handleFieldColumn(columns) {
14492
14401
  columns.forEach((column) => {
14493
14402
  column.field || (column.field = column.type || "");
@@ -14530,7 +14439,7 @@ function handleIndexColumn(propsRef, getPaginationRef, columns) {
14530
14439
  }
14531
14440
  const {
14532
14441
  currentPage = 1,
14533
- pageSize = PAGE_SIZE$1
14442
+ pageSize = PAGE_SIZE
14534
14443
  } = getPagination;
14535
14444
  const seq = ((currentPage < 1 ? 1 : currentPage) - 1) * pageSize + rowIndex + 1;
14536
14445
  return vue.createVNode("span", null, [seq]);
@@ -14658,6 +14567,29 @@ function useColumns(propsRef, getPaginationRef) {
14658
14567
  setCacheColumns
14659
14568
  };
14660
14569
  }
14570
+ function parseRowKey(rowKey, record, autoCreateKey) {
14571
+ if (typeof rowKey === "string") {
14572
+ return rowKey;
14573
+ } else if (rowKey) {
14574
+ return rowKey(record);
14575
+ }
14576
+ return ROW_KEY;
14577
+ }
14578
+ function parseRowKeyValue(rowKey, record, autoCreateKey) {
14579
+ return record[parseRowKey(rowKey, record)];
14580
+ }
14581
+ function setVxeTableTheme(name) {
14582
+ const theme = !name || name === "default" ? "light" : name;
14583
+ if (typeof document !== "undefined") {
14584
+ const documentElement = document.documentElement;
14585
+ if (documentElement) {
14586
+ documentElement.setAttribute("data-vxe-ui-theme", theme);
14587
+ }
14588
+ }
14589
+ }
14590
+ function setTableGlobalFormat(format) {
14591
+ vxeTable.VxeUI.formats.mixin(format);
14592
+ }
14661
14593
  function useDataSource(propsRef, { tableData, getPaginationInfo, setPagination, setSelection, setLoading, emit }) {
14662
14594
  const searchState = vue.reactive({
14663
14595
  sortInfo: {},
@@ -14683,7 +14615,7 @@ function useDataSource(propsRef, { tableData, getPaginationInfo, setPagination,
14683
14615
  });
14684
14616
  const getRowKey = vue.computed(() => {
14685
14617
  const { rKey } = vue.unref(propsRef);
14686
- return vue.unref(getAutoCreateKey) ? ROW_KEY$1 : rKey;
14618
+ return vue.unref(getAutoCreateKey) ? ROW_KEY : rKey;
14687
14619
  });
14688
14620
  const getRowConfigRef = vue.computed(() => {
14689
14621
  const { rowConfig } = vue.unref(propsRef);
@@ -14718,11 +14650,11 @@ function useDataSource(propsRef, { tableData, getPaginationInfo, setPagination,
14718
14650
  const firstItem = dataSource[0];
14719
14651
  const lastItem = dataSource[dataSource.length - 1];
14720
14652
  if (firstItem && lastItem) {
14721
- if (!firstItem[ROW_KEY$1] || !lastItem[ROW_KEY$1]) {
14653
+ if (!firstItem[ROW_KEY] || !lastItem[ROW_KEY]) {
14722
14654
  const data = lodashEs.cloneDeep(vue.unref(dataSourceRef));
14723
14655
  data.forEach((item) => {
14724
- if (!item[ROW_KEY$1]) {
14725
- item[ROW_KEY$1] = utils.guid();
14656
+ if (!item[ROW_KEY]) {
14657
+ item[ROW_KEY] = utils.guid();
14726
14658
  }
14727
14659
  if (item.children && item.children.length) {
14728
14660
  setTableKey(item.children);
@@ -14742,8 +14674,8 @@ function useDataSource(propsRef, { tableData, getPaginationInfo, setPagination,
14742
14674
  function setTableKey(items) {
14743
14675
  if (!items || !Array.isArray(items)) return;
14744
14676
  items.forEach((item) => {
14745
- if (!item[ROW_KEY$1]) {
14746
- item[ROW_KEY$1] = utils.guid();
14677
+ if (!item[ROW_KEY]) {
14678
+ item[ROW_KEY] = utils.guid();
14747
14679
  }
14748
14680
  if (item.children && item.children.length) {
14749
14681
  setTableKey(item.children);
@@ -14816,7 +14748,7 @@ function useDataSource(propsRef, { tableData, getPaginationInfo, setPagination,
14816
14748
  function getTableRowKey() {
14817
14749
  return vue.unref(getRowKey);
14818
14750
  }
14819
- function mergeTableDataRecord(records, key2 = ROW_KEY$1) {
14751
+ function mergeTableDataRecord(records, key2 = ROW_KEY) {
14820
14752
  const itemList = lodashEs.cloneDeep(getDataSource() || []);
14821
14753
  const items = utils.mergeArray(itemList, records, key2);
14822
14754
  setTableData(items);
@@ -14828,11 +14760,11 @@ function useDataSource(propsRef, { tableData, getPaginationInfo, setPagination,
14828
14760
  try {
14829
14761
  setLoading(true);
14830
14762
  const { pageField, sizeField, listField, totalField } = {
14831
- ...FETCH_SETTING$1,
14763
+ ...FETCH_SETTING,
14832
14764
  ...fetchSetting
14833
14765
  };
14834
14766
  let pageParams = {};
14835
- const { currentPage = 1, pageSize = PAGE_SIZE$1 } = vue.unref(getPaginationInfo);
14767
+ const { currentPage = 1, pageSize = PAGE_SIZE } = vue.unref(getPaginationInfo);
14836
14768
  if (lodashEs.isBoolean(pagination) && !pagination) {
14837
14769
  pageParams = {};
14838
14770
  } else {
@@ -14968,8 +14900,8 @@ function usePagination(propsRef, _emit) {
14968
14900
  size: DEFAULT_SIZE,
14969
14901
  border: true,
14970
14902
  currentPage: 1,
14971
- pageSize: PAGE_SIZE$1,
14972
- pageSizes: PAGE_SIZE_OPTIONS$1,
14903
+ pageSize: PAGE_SIZE,
14904
+ pageSizes: PAGE_SIZE_OPTIONS,
14973
14905
  layouts: ["PrevJump", "PrevPage", "Number", "NextPage", "NextJump", "Sizes", "Total"],
14974
14906
  total: 0
14975
14907
  });
@@ -15048,7 +14980,7 @@ function useRowSelection(propsRef, tableData, emit, tableElRef) {
15048
14980
  });
15049
14981
  const getRowKey = vue.computed(() => {
15050
14982
  const { rKey } = vue.unref(propsRef);
15051
- return vue.unref(getAutoCreateKey) ? ROW_KEY$1 : rKey;
14983
+ return vue.unref(getAutoCreateKey) ? ROW_KEY : rKey;
15052
14984
  });
15053
14985
  function getCurrentPageKeys() {
15054
14986
  const { treeConfig } = vue.unref(propsRef);
@@ -15259,6 +15191,64 @@ function useTableForm(propsRef, { fetch: fetch2, getLoading, setPagination, setS
15259
15191
  handleSearchInfoReload
15260
15192
  };
15261
15193
  }
15194
+ const setting = {
15195
+ size: DEFAULT_SIZE,
15196
+ autoCreateKey: true,
15197
+ showIndexColumn: true,
15198
+ fetchSetting: () => FETCH_SETTING,
15199
+ columns: () => [],
15200
+ fit: true,
15201
+ padding: false,
15202
+ minHeight: 180,
15203
+ border: "inner",
15204
+ showHeader: true,
15205
+ delayHover: 250,
15206
+ autoResize: true,
15207
+ maxHeight: 325,
15208
+ showOverflow: true,
15209
+ showHeaderOverflow: "tooltip",
15210
+ showFooterOverflow: "tooltip",
15211
+ sortConfig: () => ({
15212
+ remote: true
15213
+ }),
15214
+ resizeConfig: () => ({
15215
+ refreshDelay: 250
15216
+ }),
15217
+ radioConfig: () => ({
15218
+ strict: true
15219
+ }),
15220
+ rowConfig: () => ({
15221
+ useKey: true,
15222
+ isCurrent: true,
15223
+ isHover: true,
15224
+ keyField: "_ROW_KEY_"
15225
+ }),
15226
+ checkboxConfig: () => ({
15227
+ strict: true
15228
+ }),
15229
+ tooltipConfig: () => ({
15230
+ enterable: true
15231
+ }),
15232
+ validConfig: () => ({
15233
+ showMessage: true,
15234
+ autoClear: true,
15235
+ autoPos: true,
15236
+ message: "inline",
15237
+ msgMode: "single"
15238
+ }),
15239
+ columnConfig: () => ({
15240
+ resizable: true,
15241
+ useKey: true,
15242
+ maxFixedSize: 4
15243
+ }),
15244
+ customConfig: () => ({
15245
+ mode: "modal"
15246
+ }),
15247
+ toolbarConfig: () => ({
15248
+ custom: true,
15249
+ zoom: true
15250
+ })
15251
+ };
15262
15252
  const _hoisted_1$4 = { class: "max-table-selection-count" };
15263
15253
  const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15264
15254
  __name: "BasicTable",
@@ -15300,7 +15290,10 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15300
15290
  headerRowStyle: { type: [Object, Function] },
15301
15291
  footerRowStyle: { type: [Object, Function] },
15302
15292
  footerCellStyle: { type: [Object, Function] },
15293
+ showCustomHeader: { type: Boolean },
15294
+ mergeHeaderCells: {},
15303
15295
  mergeCells: {},
15296
+ mergeFooterCells: {},
15304
15297
  mergeFooterItems: {},
15305
15298
  spanMethod: { type: Function },
15306
15299
  footerSpanMethod: { type: Function },
@@ -15315,6 +15308,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15315
15308
  cellConfig: {},
15316
15309
  headerCellConfig: {},
15317
15310
  footerCellConfig: {},
15311
+ aggregateConfig: {},
15318
15312
  rowGroupConfig: {},
15319
15313
  currentRowConfig: {},
15320
15314
  currentColumnConfig: {},
@@ -15327,9 +15321,12 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15327
15321
  seqConfig: {},
15328
15322
  sortConfig: {},
15329
15323
  filterConfig: {},
15324
+ floatingFilterConfig: {},
15330
15325
  radioConfig: {},
15331
15326
  checkboxConfig: {},
15327
+ headerTooltipConfig: {},
15332
15328
  tooltipConfig: {},
15329
+ footerTooltipConfig: {},
15333
15330
  exportConfig: {},
15334
15331
  importConfig: {},
15335
15332
  printConfig: {},
@@ -15372,6 +15369,9 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15372
15369
  onPaste: { type: Function },
15373
15370
  onCopy: { type: Function },
15374
15371
  onCut: { type: Function },
15372
+ onColumnsChange: { type: Function },
15373
+ onDataChange: { type: Function },
15374
+ onFooterDataChange: { type: Function },
15375
15375
  onCurrentRowChange: { type: Function },
15376
15376
  onCurrentRowDisabled: { type: Function },
15377
15377
  onCurrentColumnChange: { type: Function },
@@ -15382,6 +15382,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15382
15382
  onCheckboxRangeStart: { type: Function },
15383
15383
  onCheckboxRangeChange: { type: Function },
15384
15384
  onCheckboxRangeEnd: { type: Function },
15385
+ onCheckboxRangeSelect: { type: Function },
15385
15386
  onCellClick: { type: Function },
15386
15387
  onCellDblclick: { type: Function },
15387
15388
  onCellMenu: { type: Function },
@@ -15394,7 +15395,11 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15394
15395
  onFooterCellDblclick: { type: Function },
15395
15396
  onFooterCellMenu: { type: Function },
15396
15397
  onSortChange: { type: Function },
15398
+ onClearSort: { type: Function },
15399
+ onClearAllSort: { type: Function },
15397
15400
  onFilterChange: { type: Function },
15401
+ onClearFilter: { type: Function },
15402
+ onClearAllFilter: { type: Function },
15398
15403
  onFilterVisible: { type: Function },
15399
15404
  onResizableChange: { type: Function },
15400
15405
  onToggleRowGroupExpand: { type: Function },
@@ -15411,6 +15416,8 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15411
15416
  onRowDragstart: { type: Function },
15412
15417
  onRowDragover: { type: Function },
15413
15418
  onRowDragend: { type: Function },
15419
+ onRowRemoveDragend: { type: Function },
15420
+ onRowInsertDragend: { type: Function },
15414
15421
  onColumnDragstart: { type: Function },
15415
15422
  onColumnDragover: { type: Function },
15416
15423
  onColumnDragend: { type: Function },
@@ -15455,13 +15462,11 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15455
15462
  setup(__props, { expose: __expose, emit: __emit }) {
15456
15463
  const props = __props;
15457
15464
  const emit = __emit;
15458
- const tableConfig = useTableConfig();
15459
- setVxeUIConfig(tableConfig || {});
15460
15465
  const attrs = vue.useAttrs();
15461
15466
  const { b, e, is } = useNamespace("basic-table");
15462
15467
  const { t } = useLocale();
15463
15468
  const slots = vue.useSlots();
15464
- const innerPropsRef = vue.ref();
15469
+ const innerPropsRef = vue.ref({});
15465
15470
  const getProps = vue.computed(() => {
15466
15471
  return { ...props, ...vue.unref(innerPropsRef) };
15467
15472
  });
@@ -15503,12 +15508,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15503
15508
  showFooter: vue.unref(showFooter),
15504
15509
  ...vue.unref(getRowSelectionRef),
15505
15510
  ...vue.unref(getSortRef),
15506
- ...vue.unref(getRowConfigRef),
15507
- toolbarConfig: {
15508
- zoom: true,
15509
- custom: true,
15510
- ...vue.unref(getProps).toolbarConfig
15511
- }
15511
+ ...vue.unref(getRowConfigRef)
15512
15512
  };
15513
15513
  return propsData;
15514
15514
  });
@@ -15645,7 +15645,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
15645
15645
  ], 2)) : vue.createCommentVNode("", true),
15646
15646
  vue.renderSlot(_ctx.$slots, "selection-wrapper-after")
15647
15647
  ], 2),
15648
- ((_a = vue.unref(getPaginationInfo)) == null ? void 0 : _a.total) && __props.pagination ? (vue.openBlock(), vue.createBlock(vue.unref(VxeUI.VxePager), vue.mergeProps({ key: 0 }, vue.unref(getPaginationInfo), { onPageChange: vue.unref(onPageChange) }), null, 16, ["onPageChange"])) : vue.createCommentVNode("", true)
15648
+ ((_a = vue.unref(getPaginationInfo)) == null ? void 0 : _a.total) && __props.pagination ? (vue.openBlock(), vue.createBlock(vue.unref(vxePcUi.VxePager), vue.mergeProps({ key: 0 }, vue.unref(getPaginationInfo), { onPageChange: vue.unref(onPageChange) }), null, 16, ["onPageChange"])) : vue.createCommentVNode("", true)
15649
15649
  ], 2)
15650
15650
  ];
15651
15651
  }),
@@ -15703,7 +15703,7 @@ const vxeTableFormatter = {
15703
15703
  }
15704
15704
  }
15705
15705
  };
15706
- VxeUI.formats.mixin(vxeTableFormatter);
15706
+ vxeTable.VxeUI.formats.mixin(vxeTableFormatter);
15707
15707
  const XBasicTable = utils.withInstall(_sfc_main$7);
15708
15708
  const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
15709
15709
  __name: "BasicTag",
@@ -16314,8 +16314,10 @@ const AjaxUpload = /* @__PURE__ */ vue.defineComponent({
16314
16314
  webkitdirectory: "webkitdirectory"
16315
16315
  } : {};
16316
16316
  const eventsFat = {
16317
+ // eslint-disable-next-line prettier/prettier
16317
16318
  onClick: openFileDialogOnClick ? onClick : () => {
16318
16319
  },
16320
+ // eslint-disable-next-line prettier/prettier
16319
16321
  onKeydown: openFileDialogOnClick ? onKeyDown : () => {
16320
16322
  },
16321
16323
  onMouseenter,
@@ -17303,7 +17305,7 @@ const BasicUpload = /* @__PURE__ */ vue.defineComponent({
17303
17305
  } = props;
17304
17306
  const {
17305
17307
  class: className,
17306
- style: styleName,
17308
+ style: _styleName,
17307
17309
  ...transAttrs
17308
17310
  } = attrs;
17309
17311
  const rcUploadProps = {
@@ -20945,11 +20947,18 @@ const makeInstaller = (components2 = []) => {
20945
20947
  };
20946
20948
  const installer = makeInstaller([...components]);
20947
20949
  const install = installer.install;
20950
+ Object.defineProperty(exports, "UIGlobal", {
20951
+ enumerable: true,
20952
+ get: () => vxePcUi.VxeUI
20953
+ });
20948
20954
  Object.defineProperty(exports, "VxePager", {
20949
20955
  enumerable: true,
20950
- get: () => VxeUI.VxePager
20956
+ get: () => vxePcUi.VxePager
20957
+ });
20958
+ Object.defineProperty(exports, "TableGlobal", {
20959
+ enumerable: true,
20960
+ get: () => vxeTable.VxeUI
20951
20961
  });
20952
- exports.VxeUI = VxeUI;
20953
20962
  Object.defineProperty(exports, "VxeColgroup", {
20954
20963
  enumerable: true,
20955
20964
  get: () => vxeTable.VxeColgroup
@@ -20970,7 +20979,6 @@ Object.defineProperty(exports, "VxeToolbar", {
20970
20979
  enumerable: true,
20971
20980
  get: () => vxeTable.VxeToolbar
20972
20981
  });
20973
- exports.VxeUITable = vxeTable;
20974
20982
  exports.LIST_IGNORE = LIST_IGNORE;
20975
20983
  exports.TreeNode = TreeNode;
20976
20984
  exports.XBasicArrow = XBasicArrow;
@@ -21049,9 +21057,8 @@ exports.makeInstaller = makeInstaller;
21049
21057
  exports.notificationTypes = notificationTypes;
21050
21058
  exports.provideGlobalConfig = provideGlobalConfig;
21051
21059
  exports.responsiveArray = responsiveArray;
21060
+ exports.setTableGlobalFormat = setTableGlobalFormat;
21052
21061
  exports.setVxeTableTheme = setVxeTableTheme;
21053
- exports.setVxeUIConfig = setVxeUIConfig;
21054
- exports.setVxeUIFormat = setVxeUIFormat;
21055
21062
  exports.useBasicDrawerModal = useBasicDrawerModal;
21056
21063
  exports.useComponentRegister = useComponentRegister;
21057
21064
  exports.useConfigProvider = useConfigProvider;
@@ -21066,6 +21073,7 @@ exports.useNamespace = useNamespace;
21066
21073
  exports.useResponsiveObserve = useResponsiveObserve;
21067
21074
  exports.useSameTarget = useSameTarget;
21068
21075
  exports.useTableConfig = useTableConfig;
21076
+ exports.useThemeOverrides = useThemeOverrides;
21069
21077
  exports.useZIndex = useZIndex;
21070
21078
  exports.vLoading = vLoading;
21071
21079
  //# sourceMappingURL=index.cjs.map