@maxax/ui 1.0.5 → 1.0.6
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/components/basic-button-action/BasicButtonCreate.vue.d.ts.map +1 -1
- package/dist/components/basic-button-action/BasicButtonDelete.vue.d.ts.map +1 -1
- package/dist/components/basic-button-action/BasicButtonEdit.vue.d.ts.map +1 -1
- package/dist/components/basic-button-action/BasicButtonExport.vue.d.ts.map +1 -1
- package/dist/components/basic-button-action/BasicButtonImport.vue.d.ts.map +1 -1
- package/dist/components/basic-button-action/BasicButtonPrint.vue.d.ts.map +1 -1
- package/dist/components/basic-loading/index.d.ts +37 -0
- package/dist/components/basic-loading/index.d.ts.map +1 -0
- package/dist/components/basic-loading/interface.d.ts +1 -1
- package/dist/components/basic-loading/interface.d.ts.map +1 -1
- package/dist/components/basic-loading/loading.d.ts +26 -0
- package/dist/components/basic-loading/loading.d.ts.map +1 -0
- package/dist/components/basic-message-box/BasicMessageBox.vue.d.ts +2605 -0
- package/dist/components/basic-message-box/BasicMessageBox.vue.d.ts.map +1 -0
- package/dist/components/basic-svg-icon/BasicSvgIcon.vue.d.ts.map +1 -1
- package/dist/components/config-provider/ConfigProvider.d.ts +0 -15
- package/dist/components/config-provider/ConfigProvider.d.ts.map +1 -1
- package/dist/components/config-provider/hooks/use-global-config.d.ts +2 -3
- package/dist/components/config-provider/hooks/use-global-config.d.ts.map +1 -1
- package/dist/components/config-provider/interface.d.ts +1 -9
- package/dist/components/config-provider/interface.d.ts.map +1 -1
- package/dist/composable/index.d.ts +1 -1
- package/dist/composable/index.d.ts.map +1 -1
- package/dist/composable/use-local-icon.d.ts +3 -0
- package/dist/composable/use-local-icon.d.ts.map +1 -0
- package/dist/constants/app.d.ts +1 -1
- package/dist/constants/app.d.ts.map +1 -1
- package/dist/constants/context.d.ts +2 -3
- package/dist/constants/context.d.ts.map +1 -1
- package/dist/index.cjs +30 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +30 -30
- package/dist/index.mjs.map +1 -1
- package/dist/locale/lang/en.d.ts.map +1 -1
- package/dist/locale/lang/zh-cn.d.ts.map +1 -1
- package/dist/locale/utils.d.ts +1 -1
- package/dist/locale/utils.d.ts.map +1 -1
- package/dist/locales.cjs +6 -2
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.mjs +6 -2
- package/dist/locales.mjs.map +1 -1
- package/dist/ui.css +1 -1
- package/dist/{utils-fuChD8nl.cjs → utils-DnkXXn8Z.cjs} +6 -2
- package/dist/utils-DnkXXn8Z.cjs.map +1 -0
- package/dist/{utils-Cz4cXLO4.js → utils-DyTfW007.js} +6 -2
- package/dist/utils-DyTfW007.js.map +1 -0
- package/package.json +1 -1
- package/dist/composable/use-table-config.d.ts +0 -5
- package/dist/composable/use-table-config.d.ts.map +0 -1
- package/dist/utils-Cz4cXLO4.js.map +0 -1
- package/dist/utils-fuChD8nl.cjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { camelize, isNumber, isString, removeClass, addClass, pascalCase, isClie
|
|
|
2
2
|
import { nextTick, Fragment, isVNode, Comment, Text, onMounted, watchEffect, onBeforeUnmount, inject, ref, computed, shallowRef, getCurrentInstance, unref, isRef, watch, onScopeDispose, toRaw, defineComponent, onUnmounted, h, useAttrs, createElementBlock, openBlock, mergeProps, createElementVNode, createBlock, createCommentVNode, normalizeClass, createVNode, createSlots, withCtx, renderSlot, provide, reactive, toRefs, resolveComponent, Transition, withDirectives, withModifiers, normalizeStyle, createTextVNode, toDisplayString, withKeys, resolveDynamicComponent, vShow, render as render$1, useSlots, renderList, toRef, normalizeProps, guardReactiveProps, shallowReadonly, getCurrentScope, toValue, vModelText, createApp, mergeDefaults, triggerRef, TransitionGroup, toHandlers, useTemplateRef } from "vue";
|
|
3
3
|
import { NButton, NInput, NCard, NCascader, NDatePicker, NTooltip, NDrawer, NDrawerContent, NSelect, NInputNumber, NUpload, NAutoComplete, NDynamicTags, NTreeSelect, NTimePicker, NSwitch, NCheckbox, NCheckboxGroup, NRadio, NRadioButton, NRadioGroup, NSlider, NTransfer, NDivider, NColorPicker, NRate, NCol, NFormItem, NForm, NRow, NPopover, NTabs, NTabPane, NScrollbar, NEmpty, NPagination, NSpin, NModal, NProgress } from "naive-ui";
|
|
4
4
|
import { merge, cloneDeep, uniqBy, get, omit, has, set, unset, isNumber as isNumber$1, isPlainObject, isBoolean as isBoolean$1, isFunction as isFunction$1, isArray as isArray$1, isString as isString$1, isEqual, concat, partition } from "lodash-es";
|
|
5
|
-
import { b as buildLocaleContext, z as zhCN } from "./utils-
|
|
5
|
+
import { b as buildLocaleContext, z as zhCN } from "./utils-DyTfW007.js";
|
|
6
6
|
import { useBoolean, useMergedState as useMergedState$1, useEventListener as useEventListener$1, useBreakpoint } from "@maxax/hooks";
|
|
7
7
|
import { format } from "date-fns";
|
|
8
8
|
import dayjs from "dayjs";
|
|
@@ -291,12 +291,13 @@ const EVENT_CODE = {
|
|
|
291
291
|
backspace: "Backspace"
|
|
292
292
|
};
|
|
293
293
|
const DEFAULT_NAMESPACE = "max";
|
|
294
|
+
const DEFAULT_ICON_LOCAL_PREFIX = "max";
|
|
294
295
|
const DEFAULT_INITIAL_Z_INDEX = 2e3;
|
|
295
296
|
const namespaceContextKey = Symbol("namespaceContextKey");
|
|
296
297
|
const localeContextKey = Symbol("localeContextKey");
|
|
297
298
|
const zIndexContextKey = Symbol("zIndexContextKey");
|
|
298
|
-
const tableContextKey = Symbol("tableContextKey");
|
|
299
299
|
const themeOverridesContextKey = Symbol("themeOverridesContextKey");
|
|
300
|
+
const iconLocalPrefixContextKey = Symbol("iconLocalPrefixContextKey");
|
|
300
301
|
function useLocale(localeOverrides) {
|
|
301
302
|
const locale = localeOverrides || inject(localeContextKey, ref());
|
|
302
303
|
return buildLocaleContext(computed(() => locale.value || zhCN));
|
|
@@ -359,6 +360,10 @@ function useFlexGapSupport() {
|
|
|
359
360
|
});
|
|
360
361
|
return flexible;
|
|
361
362
|
}
|
|
363
|
+
function useLocalIcon(localIcon) {
|
|
364
|
+
const icon = localIcon || inject(iconLocalPrefixContextKey, ref(DEFAULT_ICON_LOCAL_PREFIX));
|
|
365
|
+
return icon.value;
|
|
366
|
+
}
|
|
362
367
|
const statePrefix = "is-";
|
|
363
368
|
const useGetDerivedNamespace = (namespaceOverrides) => {
|
|
364
369
|
const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref(DEFAULT_NAMESPACE)) : ref(DEFAULT_NAMESPACE));
|
|
@@ -588,10 +593,6 @@ const useSameTarget = (handleClick) => {
|
|
|
588
593
|
};
|
|
589
594
|
return { onClick, onMousedown, onMouseup };
|
|
590
595
|
};
|
|
591
|
-
function useTableConfig(tableOverrides) {
|
|
592
|
-
const table = tableOverrides || inject(tableContextKey, ref());
|
|
593
|
-
return table.value;
|
|
594
|
-
}
|
|
595
596
|
function useThemeOverrides(themeOverrides) {
|
|
596
597
|
const overrides = themeOverrides || inject(themeOverridesContextKey, ref());
|
|
597
598
|
return overrides.value;
|
|
@@ -2313,12 +2314,13 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
2313
2314
|
const props = __props;
|
|
2314
2315
|
const attrs = useAttrs();
|
|
2315
2316
|
const { b } = useNamespace("basic-svg-icon");
|
|
2317
|
+
const iconLocalPrefix = useLocalIcon();
|
|
2316
2318
|
const bindAttrs = computed(() => ({
|
|
2317
2319
|
class: attrs.class || "",
|
|
2318
2320
|
style: attrs.style || ""
|
|
2319
2321
|
}));
|
|
2320
2322
|
const symbolId = computed(() => {
|
|
2321
|
-
const prefix =
|
|
2323
|
+
const prefix = iconLocalPrefix;
|
|
2322
2324
|
const defaultLocalIcon = "no-icon";
|
|
2323
2325
|
const icon = props.localIcon || defaultLocalIcon;
|
|
2324
2326
|
return `#${prefix}-${icon}`;
|
|
@@ -2535,14 +2537,14 @@ const provideGlobalConfig = (config, app, global = false) => {
|
|
|
2535
2537
|
zIndexContextKey,
|
|
2536
2538
|
computed(() => context.value.zIndex)
|
|
2537
2539
|
);
|
|
2538
|
-
provideFn(
|
|
2539
|
-
tableContextKey,
|
|
2540
|
-
computed(() => context.value.table)
|
|
2541
|
-
);
|
|
2542
2540
|
provideFn(
|
|
2543
2541
|
themeOverridesContextKey,
|
|
2544
2542
|
computed(() => context.value.themeOverrides)
|
|
2545
2543
|
);
|
|
2544
|
+
provideFn(
|
|
2545
|
+
iconLocalPrefixContextKey,
|
|
2546
|
+
computed(() => context.value.iconLocalPrefix)
|
|
2547
|
+
);
|
|
2546
2548
|
if (global || !globalConfig.value) {
|
|
2547
2549
|
globalConfig.value = context.value;
|
|
2548
2550
|
}
|
|
@@ -2587,22 +2589,14 @@ const configProviderProps = {
|
|
|
2587
2589
|
/** 全局命名空间 */
|
|
2588
2590
|
namespace: {
|
|
2589
2591
|
type: String,
|
|
2590
|
-
default:
|
|
2591
|
-
},
|
|
2592
|
-
/** 远程全局图标前缀 */
|
|
2593
|
-
iconRemotePrefix: {
|
|
2594
|
-
type: String,
|
|
2595
|
-
default: "imax"
|
|
2592
|
+
default: DEFAULT_NAMESPACE
|
|
2596
2593
|
},
|
|
2597
2594
|
/** 本地全局图标前缀 */
|
|
2598
2595
|
iconLocalPrefix: {
|
|
2599
2596
|
type: String,
|
|
2600
|
-
default:
|
|
2601
|
-
},
|
|
2602
|
-
/** 全局表格配置 */
|
|
2603
|
-
table: {
|
|
2604
|
-
type: Object
|
|
2597
|
+
default: DEFAULT_ICON_LOCAL_PREFIX
|
|
2605
2598
|
},
|
|
2599
|
+
/** 全局主题覆盖 */
|
|
2606
2600
|
themeOverrides: {
|
|
2607
2601
|
type: Object
|
|
2608
2602
|
}
|
|
@@ -20943,6 +20937,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
20943
20937
|
emits: ["click"],
|
|
20944
20938
|
setup(__props, { emit: __emit }) {
|
|
20945
20939
|
const emit = __emit;
|
|
20940
|
+
const { t } = useLocale();
|
|
20946
20941
|
const attrs = useAttrs();
|
|
20947
20942
|
function onClickHandler() {
|
|
20948
20943
|
emit("click");
|
|
@@ -20954,7 +20949,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
20954
20949
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
20955
20950
|
default: withCtx(() => [
|
|
20956
20951
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
20957
|
-
|
|
20952
|
+
createTextVNode(toDisplayString(unref(t)("max.basic.add")), 1)
|
|
20958
20953
|
])
|
|
20959
20954
|
]),
|
|
20960
20955
|
_: 3
|
|
@@ -20967,6 +20962,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
20967
20962
|
emits: ["click"],
|
|
20968
20963
|
setup(__props, { emit: __emit }) {
|
|
20969
20964
|
const emit = __emit;
|
|
20965
|
+
const { t } = useLocale();
|
|
20970
20966
|
const attrs = useAttrs();
|
|
20971
20967
|
function onClickHandler() {
|
|
20972
20968
|
emit("click");
|
|
@@ -20978,7 +20974,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
20978
20974
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
20979
20975
|
default: withCtx(() => [
|
|
20980
20976
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
20981
|
-
|
|
20977
|
+
createTextVNode(toDisplayString(unref(t)("max.basic.delete")), 1)
|
|
20982
20978
|
])
|
|
20983
20979
|
]),
|
|
20984
20980
|
_: 3
|
|
@@ -20991,6 +20987,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
20991
20987
|
emits: ["click"],
|
|
20992
20988
|
setup(__props, { emit: __emit }) {
|
|
20993
20989
|
const emit = __emit;
|
|
20990
|
+
const { t } = useLocale();
|
|
20994
20991
|
const attrs = useAttrs();
|
|
20995
20992
|
function onClickHandler() {
|
|
20996
20993
|
emit("click");
|
|
@@ -21002,7 +20999,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
21002
20999
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
21003
21000
|
default: withCtx(() => [
|
|
21004
21001
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
21005
|
-
|
|
21002
|
+
createTextVNode(toDisplayString(unref(t)("max.basic.edit")), 1)
|
|
21006
21003
|
])
|
|
21007
21004
|
]),
|
|
21008
21005
|
_: 3
|
|
@@ -21023,6 +21020,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
21023
21020
|
},
|
|
21024
21021
|
setup(__props) {
|
|
21025
21022
|
const props = __props;
|
|
21023
|
+
const { t } = useLocale();
|
|
21026
21024
|
const attrs = useAttrs();
|
|
21027
21025
|
async function downloadFileRemote() {
|
|
21028
21026
|
if (!props.exportApi) return false;
|
|
@@ -21052,7 +21050,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
21052
21050
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
21053
21051
|
default: withCtx(() => [
|
|
21054
21052
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
21055
|
-
|
|
21053
|
+
createTextVNode(toDisplayString(unref(t)("max.basic.export")), 1)
|
|
21056
21054
|
])
|
|
21057
21055
|
]),
|
|
21058
21056
|
_: 3
|
|
@@ -21073,6 +21071,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
21073
21071
|
setup(__props, { emit: __emit }) {
|
|
21074
21072
|
const props = __props;
|
|
21075
21073
|
const emit = __emit;
|
|
21074
|
+
const { t } = useLocale();
|
|
21076
21075
|
const attrs = useAttrs();
|
|
21077
21076
|
const uid2 = ref(guid());
|
|
21078
21077
|
const fileInputRef = useTemplateRef("fileInputRef");
|
|
@@ -21143,7 +21142,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
21143
21142
|
onChange: onFileChange
|
|
21144
21143
|
}, null, 40, _hoisted_1)),
|
|
21145
21144
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
21146
|
-
|
|
21145
|
+
createTextVNode(toDisplayString(unref(t)("max.basic.import")), 1)
|
|
21147
21146
|
], true)
|
|
21148
21147
|
]),
|
|
21149
21148
|
_: 3
|
|
@@ -21151,12 +21150,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
21151
21150
|
};
|
|
21152
21151
|
}
|
|
21153
21152
|
});
|
|
21154
|
-
const BasicButtonImport = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
21153
|
+
const BasicButtonImport = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-826acb65"]]);
|
|
21155
21154
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
21156
21155
|
__name: "BasicButtonPrint",
|
|
21157
21156
|
emits: ["click"],
|
|
21158
21157
|
setup(__props, { emit: __emit }) {
|
|
21159
21158
|
const emit = __emit;
|
|
21159
|
+
const { t } = useLocale();
|
|
21160
21160
|
const attrs = useAttrs();
|
|
21161
21161
|
function onClickHandler() {
|
|
21162
21162
|
emit("click");
|
|
@@ -21168,7 +21168,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
21168
21168
|
}, unref(attrs), { onClick: onClickHandler }), {
|
|
21169
21169
|
default: withCtx(() => [
|
|
21170
21170
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
21171
|
-
|
|
21171
|
+
createTextVNode(toDisplayString(unref(t)("max.basic.print")), 1)
|
|
21172
21172
|
])
|
|
21173
21173
|
]),
|
|
21174
21174
|
_: 3
|
|
@@ -21503,13 +21503,13 @@ export {
|
|
|
21503
21503
|
useFlexGapSupport,
|
|
21504
21504
|
useGetDerivedNamespace,
|
|
21505
21505
|
useGlobalConfig,
|
|
21506
|
+
useLocalIcon,
|
|
21506
21507
|
useLocale,
|
|
21507
21508
|
useLockscreen,
|
|
21508
21509
|
useMergedState,
|
|
21509
21510
|
useNamespace,
|
|
21510
21511
|
useResponsiveObserve,
|
|
21511
21512
|
useSameTarget,
|
|
21512
|
-
useTableConfig,
|
|
21513
21513
|
useThemeOverrides,
|
|
21514
21514
|
useZIndex,
|
|
21515
21515
|
vLoading
|