bani-ui 1.0.2-alpha.11 → 1.0.2-alpha.13
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/es/{Button-CsYVYbtY.js → Button-CXgL_cy-.js} +3 -3
- package/dist/es/{ButtonGroup-CUSVCVC9.js → ButtonGroup-CaS3gDGZ.js} +2 -2
- package/dist/es/ConfigProvider-D9t6WiKl.js +74 -0
- package/dist/es/{Dropdown-BVnXCHJZ.js → Dropdown-Dpxc04an.js} +6 -6
- package/dist/es/{Icon-C5WM3GNh.js → Icon-iDz_Qer5.js} +2 -2
- package/dist/es/{Loading-DEDOSX2q.js → Loading-C74t-nhW.js} +3 -3
- package/dist/es/{Message-DxBWtBTF.js → Message-BgIJwDhw.js} +4 -4
- package/dist/es/{Popconfirm-C_5V4HaP.js → Popconfirm-Ci3tfYVS.js} +5 -5
- package/dist/es/{Tooltip-BF6cY52d.js → Tooltip-dn3Q0rhI.js} +3 -3
- package/dist/es/{hooks-D92zul9o.js → hooks-D0GGRZg1.js} +1 -1
- package/dist/es/index.js +15 -12
- package/dist/es/{utils-Uf9tqvV5.js → utils-mFOE2DND.js} +1 -1
- package/dist/es/{vendor-R0ZbR4ac.js → vendor-mcUuP0dl.js} +129 -11
- package/dist/theme/ConfigProvider.css +1 -0
- package/dist/types/components/ConfigProvider/constants.d.ts +5 -0
- package/dist/types/components/ConfigProvider/hooks.d.ts +6 -0
- package/dist/types/components/ConfigProvider/index.d.ts +41 -0
- package/dist/types/components/ConfigProvider/types.d.ts +6 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/umd/index.umd.cjs +12 -12
- package/dist/umd/index.umd.cjs.br +0 -0
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/dist/umd/locale/lang.umd.cjs +1 -0
- package/package.json +11 -5
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, useSlots, ref, openBlock, createBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, renderSlot, createVNode, normalizeStyle, createCommentVNode } from "vue";
|
|
2
|
-
import { _ as _sfc_main$1 } from "./Icon-
|
|
2
|
+
import { _ as _sfc_main$1 } from "./Icon-iDz_Qer5.js";
|
|
3
3
|
import { faSpinner } from "@fortawesome/free-solid-svg-icons";
|
|
4
4
|
import { library } from "@fortawesome/fontawesome-svg-core";
|
|
5
|
-
import { t as throttle } from "./vendor-
|
|
6
|
-
import { w as withInstall } from "./utils-
|
|
5
|
+
import { t as throttle } from "./vendor-mcUuP0dl.js";
|
|
6
|
+
import { w as withInstall } from "./utils-mFOE2DND.js";
|
|
7
7
|
const BUTTON_GROUP_CTX_KEY = Symbol(
|
|
8
8
|
"BUTTON_GROUP_CTX_KEY"
|
|
9
9
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, provide, reactive, toRef, openBlock, createElementBlock, renderSlot } from "vue";
|
|
2
|
-
import { B as BUTTON_GROUP_CTX_KEY } from "./Button-
|
|
3
|
-
import { w as withInstall } from "./utils-
|
|
2
|
+
import { B as BUTTON_GROUP_CTX_KEY } from "./Button-CXgL_cy-.js";
|
|
3
|
+
import { w as withInstall } from "./utils-mFOE2DND.js";
|
|
4
4
|
import "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
const _hoisted_1 = { class: "er-button-group" };
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ref, getCurrentInstance, computed, unref, inject, provide, defineComponent, renderSlot } from "vue";
|
|
2
|
+
import { n as merge, o as n, p as o } from "./vendor-mcUuP0dl.js";
|
|
3
|
+
import { E as English } from "./locale/lang/en.js";
|
|
4
|
+
import { w as withInstall } from "./utils-mFOE2DND.js";
|
|
5
|
+
import "@fortawesome/free-solid-svg-icons";
|
|
6
|
+
const configProviderContextKey = Symbol();
|
|
7
|
+
const globalConfig = ref();
|
|
8
|
+
function useGlobalConfig(key, defaultVal = void 0) {
|
|
9
|
+
const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
|
|
10
|
+
return config;
|
|
11
|
+
}
|
|
12
|
+
const _createI18n = (opts) => {
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
const mergeMsg = (msg) => merge(msg, (opts == null ? void 0 : opts.extendsI18nMsg) ?? {});
|
|
15
|
+
if (!(opts == null ? void 0 : opts.locale))
|
|
16
|
+
return o({
|
|
17
|
+
locale: "en",
|
|
18
|
+
messages: mergeMsg({
|
|
19
|
+
en: English.el
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
return o({
|
|
23
|
+
locale: ((_a = opts.locale) == null ? void 0 : _a.name) || "en",
|
|
24
|
+
messages: mergeMsg({
|
|
25
|
+
[((_b = opts.locale) == null ? void 0 : _b.name) || "en"]: ((_c = opts.locale) == null ? void 0 : _c.el) || {}
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
function provideGlobalConfig(config = { locale: English }, app, global = false) {
|
|
30
|
+
const instance = getCurrentInstance();
|
|
31
|
+
const oldConfig = instance ? useGlobalConfig() : void 0;
|
|
32
|
+
const provideFn = instance ? provide : void 0;
|
|
33
|
+
if (!provideFn) {
|
|
34
|
+
console.warn(
|
|
35
|
+
"provideGlobalConfig",
|
|
36
|
+
"provideGlobalConfig() can only be used inside setup()"
|
|
37
|
+
);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const context = computed(() => {
|
|
41
|
+
const cfg = unref(config);
|
|
42
|
+
if (!(oldConfig == null ? void 0 : oldConfig.value)) return cfg;
|
|
43
|
+
return merge(oldConfig.value, cfg);
|
|
44
|
+
});
|
|
45
|
+
const i18n = computed(() => {
|
|
46
|
+
return _createI18n(context.value);
|
|
47
|
+
});
|
|
48
|
+
provideFn(configProviderContextKey, context);
|
|
49
|
+
provideFn(n, i18n.value);
|
|
50
|
+
if (global || !globalConfig.value) globalConfig.value = context.value;
|
|
51
|
+
return context;
|
|
52
|
+
}
|
|
53
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
54
|
+
...{
|
|
55
|
+
name: "BnConfigProvider",
|
|
56
|
+
inheritAttrs: false
|
|
57
|
+
},
|
|
58
|
+
__name: "ConfigProvider",
|
|
59
|
+
props: {
|
|
60
|
+
locale: {},
|
|
61
|
+
extendsI18nMsg: {}
|
|
62
|
+
},
|
|
63
|
+
setup(__props) {
|
|
64
|
+
const props = __props;
|
|
65
|
+
const config = provideGlobalConfig(props);
|
|
66
|
+
return (_ctx, _cache) => {
|
|
67
|
+
return renderSlot(_ctx.$slots, "default", { config: unref(config) });
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
const BnConfigProvider = withInstall(_sfc_main);
|
|
72
|
+
export {
|
|
73
|
+
BnConfigProvider as B
|
|
74
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, unref, renderSlot, createTextVNode, toDisplayString, useSlots, ref, provide, createVNode, mergeProps, withCtx, createBlock, renderList } from "vue";
|
|
2
|
-
import { b as useId } from "./hooks-
|
|
3
|
-
import { _ as _sfc_main$2 } from "./ButtonGroup-
|
|
4
|
-
import { _ as _sfc_main$3 } from "./Button-
|
|
5
|
-
import { B as BnTooltip } from "./Tooltip-
|
|
2
|
+
import { b as useId } from "./hooks-D0GGRZg1.js";
|
|
3
|
+
import { _ as _sfc_main$2 } from "./ButtonGroup-CaS3gDGZ.js";
|
|
4
|
+
import { _ as _sfc_main$3 } from "./Button-CXgL_cy-.js";
|
|
5
|
+
import { B as BnTooltip } from "./Tooltip-dn3Q0rhI.js";
|
|
6
6
|
import { faAngleDown } from "@fortawesome/free-solid-svg-icons";
|
|
7
7
|
import { library } from "@fortawesome/fontawesome-svg-core";
|
|
8
|
-
import {
|
|
9
|
-
import { w as withInstall } from "./utils-
|
|
8
|
+
import { q as omit, k as isNil } from "./vendor-mcUuP0dl.js";
|
|
9
|
+
import { w as withInstall } from "./utils-mFOE2DND.js";
|
|
10
10
|
const DROPDOWN_CTX_KEY = Symbol("dropdownContext");
|
|
11
11
|
const _hoisted_1$1 = {
|
|
12
12
|
key: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createElementBlock, mergeProps, createVNode, unref, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
|
3
|
-
import {
|
|
4
|
-
import { w as withInstall } from "./utils-
|
|
3
|
+
import { q as omit } from "./vendor-mcUuP0dl.js";
|
|
4
|
+
import { w as withInstall } from "./utils-mFOE2DND.js";
|
|
5
5
|
import "@fortawesome/free-solid-svg-icons";
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
...{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useCssVars, computed, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, createCommentVNode, createElementBlock, toDisplayString, vShow, nextTick, ref, reactive, createApp } from "vue";
|
|
2
|
-
import { e as useZIndex } from "./hooks-
|
|
3
|
-
import { _ as _sfc_main$1 } from "./Icon-
|
|
4
|
-
import { m as isString, k as isNil, a as defer, e as delay } from "./vendor-
|
|
2
|
+
import { e as useZIndex } from "./hooks-D0GGRZg1.js";
|
|
3
|
+
import { _ as _sfc_main$1 } from "./Icon-iDz_Qer5.js";
|
|
4
|
+
import { m as isString, k as isNil, a as defer, e as delay } from "./vendor-mcUuP0dl.js";
|
|
5
5
|
const _hoisted_1 = { class: "er-loading__spinner" };
|
|
6
6
|
const _hoisted_2 = {
|
|
7
7
|
key: 1,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, onMounted, watch, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeStyle, normalizeClass, createVNode, renderSlot, unref, createCommentVNode, createElementBlock, withModifiers, vShow, shallowReactive, isVNode, h, render } from "vue";
|
|
2
|
-
import { d as useOffset, a as useEventListener, e as useZIndex, b as useId } from "./hooks-
|
|
3
|
-
import { t as typeIconMap, R as RenderVnode, b as withInstallFunction } from "./utils-
|
|
4
|
-
import { _ as _sfc_main$1 } from "./Icon-
|
|
2
|
+
import { d as useOffset, a as useEventListener, e as useZIndex, b as useId } from "./hooks-D0GGRZg1.js";
|
|
3
|
+
import { t as typeIconMap, R as RenderVnode, b as withInstallFunction } from "./utils-mFOE2DND.js";
|
|
4
|
+
import { _ as _sfc_main$1 } from "./Icon-iDz_Qer5.js";
|
|
5
5
|
import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
-
import { b as bind, e as delay, g as forEach, m as isString, f as findIndex, h as get, s as set } from "./vendor-
|
|
6
|
+
import { b as bind, e as delay, g as forEach, m as isString, f as findIndex, h as get, s as set } from "./vendor-mcUuP0dl.js";
|
|
7
7
|
const messageTypes = [
|
|
8
8
|
"info",
|
|
9
9
|
"success",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, openBlock, createBlock, createSlots, withCtx, createElementVNode, normalizeStyle, createCommentVNode, createTextVNode, toDisplayString, createVNode, unref, renderSlot } from "vue";
|
|
2
|
-
import { _ as _sfc_main$2 } from "./Button-
|
|
3
|
-
import { _ as _sfc_main$1 } from "./Icon-
|
|
4
|
-
import { B as BnTooltip } from "./Tooltip-
|
|
2
|
+
import { _ as _sfc_main$2 } from "./Button-CXgL_cy-.js";
|
|
3
|
+
import { _ as _sfc_main$1 } from "./Icon-iDz_Qer5.js";
|
|
4
|
+
import { B as BnTooltip } from "./Tooltip-dn3Q0rhI.js";
|
|
5
5
|
import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
-
import { a as addUnit, w as withInstall } from "./utils-
|
|
7
|
-
import { c as useLocale } from "./hooks-
|
|
6
|
+
import { a as addUnit, w as withInstall } from "./utils-mFOE2DND.js";
|
|
7
|
+
import { c as useLocale } from "./hooks-D0GGRZg1.js";
|
|
8
8
|
const _hoisted_1 = { class: "er-popconfirm__main" };
|
|
9
9
|
const _hoisted_2 = { class: "er-popconfirm__action" };
|
|
10
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { onMounted, watch, onUnmounted, defineComponent, ref, computed, watchEffect, openBlock, createElementBlock, mergeProps, toHandlers, renderSlot, createVNode, Transition, withCtx, createTextVNode, toDisplayString, createElementVNode, createCommentVNode } from "vue";
|
|
2
|
-
import { u as useClickOutside } from "./hooks-
|
|
3
|
-
import { i as isElement, g as forEach, c as createPopper, d as debounce, b as bind, k as isNil } from "./vendor-
|
|
4
|
-
import { _ as _export_sfc, w as withInstall } from "./utils-
|
|
2
|
+
import { u as useClickOutside } from "./hooks-D0GGRZg1.js";
|
|
3
|
+
import { i as isElement, g as forEach, c as createPopper, d as debounce, b as bind, k as isNil } from "./vendor-mcUuP0dl.js";
|
|
4
|
+
import { _ as _export_sfc, w as withInstall } from "./utils-mFOE2DND.js";
|
|
5
5
|
import "@fortawesome/free-solid-svg-icons";
|
|
6
6
|
function useEvenstToTiggerNode(props, triggerNode, events, closeMethod) {
|
|
7
7
|
let watchEventsStopHandle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRef, watch, onMounted, onBeforeUnmount, unref, computed, ref, inject } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { q as omit, o as n, p as o } from "./vendor-mcUuP0dl.js";
|
|
3
3
|
import { E as English } from "./locale/lang/en.js";
|
|
4
4
|
function useEventListener(target, event, handler) {
|
|
5
5
|
if (isRef(target)) {
|
package/dist/es/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { m as makeInstaller } from "./utils-
|
|
1
|
+
import { m as makeInstaller } from "./utils-mFOE2DND.js";
|
|
2
2
|
import "@fortawesome/free-solid-svg-icons";
|
|
3
|
-
import { a as BnButton } from "./Button-
|
|
4
|
-
import { B as BnButtonGroup } from "./ButtonGroup-
|
|
5
|
-
import { B as BnMessage } from "./Message-
|
|
6
|
-
import { m } from "./Message-
|
|
7
|
-
import { B as BnIcon } from "./Icon-
|
|
8
|
-
import { B as BnLoading } from "./Loading-
|
|
9
|
-
import { v, L, v as v2 } from "./Loading-
|
|
10
|
-
import { a as BnTooltip } from "./Tooltip-
|
|
11
|
-
import { B as BnPopconfirm } from "./Popconfirm-
|
|
12
|
-
import { B as BnDropdown, a as BnDropdownItem } from "./Dropdown-
|
|
3
|
+
import { a as BnButton } from "./Button-CXgL_cy-.js";
|
|
4
|
+
import { B as BnButtonGroup } from "./ButtonGroup-CaS3gDGZ.js";
|
|
5
|
+
import { B as BnMessage } from "./Message-BgIJwDhw.js";
|
|
6
|
+
import { m } from "./Message-BgIJwDhw.js";
|
|
7
|
+
import { B as BnIcon } from "./Icon-iDz_Qer5.js";
|
|
8
|
+
import { B as BnLoading } from "./Loading-C74t-nhW.js";
|
|
9
|
+
import { v, L, v as v2 } from "./Loading-C74t-nhW.js";
|
|
10
|
+
import { a as BnTooltip } from "./Tooltip-dn3Q0rhI.js";
|
|
11
|
+
import { B as BnPopconfirm } from "./Popconfirm-Ci3tfYVS.js";
|
|
12
|
+
import { B as BnDropdown, a as BnDropdownItem } from "./Dropdown-Dpxc04an.js";
|
|
13
|
+
import { B as BnConfigProvider } from "./ConfigProvider-D9t6WiKl.js";
|
|
13
14
|
const components = [
|
|
14
15
|
BnButton,
|
|
15
16
|
BnButtonGroup,
|
|
@@ -19,12 +20,14 @@ const components = [
|
|
|
19
20
|
BnTooltip,
|
|
20
21
|
BnPopconfirm,
|
|
21
22
|
BnDropdown,
|
|
22
|
-
BnDropdownItem
|
|
23
|
+
BnDropdownItem,
|
|
24
|
+
BnConfigProvider
|
|
23
25
|
];
|
|
24
26
|
const installer = makeInstaller(components);
|
|
25
27
|
export {
|
|
26
28
|
BnButton,
|
|
27
29
|
BnButtonGroup,
|
|
30
|
+
BnConfigProvider,
|
|
28
31
|
BnDropdown,
|
|
29
32
|
BnDropdownItem,
|
|
30
33
|
BnIcon,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as forEach, j as isFunction, l as isNumber, m as isString } from "./vendor-
|
|
1
|
+
import { g as forEach, j as isFunction, l as isNumber, m as isString } from "./vendor-mcUuP0dl.js";
|
|
2
2
|
import { faCircleInfo, faCheckCircle, faCircleExclamation, faCircleXmark } from "@fortawesome/free-solid-svg-icons";
|
|
3
3
|
import { defineComponent } from "vue";
|
|
4
4
|
function makeInstaller(components) {
|
|
@@ -807,6 +807,34 @@ function isLength(value) {
|
|
|
807
807
|
function isArrayLike(value) {
|
|
808
808
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
809
809
|
}
|
|
810
|
+
function isIterateeCall(value, index, object) {
|
|
811
|
+
if (!isObject(object)) {
|
|
812
|
+
return false;
|
|
813
|
+
}
|
|
814
|
+
var type = typeof index;
|
|
815
|
+
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
|
|
816
|
+
return eq(object[index], value);
|
|
817
|
+
}
|
|
818
|
+
return false;
|
|
819
|
+
}
|
|
820
|
+
function createAssigner(assigner) {
|
|
821
|
+
return baseRest(function(object, sources) {
|
|
822
|
+
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
|
|
823
|
+
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
|
|
824
|
+
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
825
|
+
customizer = length < 3 ? void 0 : customizer;
|
|
826
|
+
length = 1;
|
|
827
|
+
}
|
|
828
|
+
object = Object(object);
|
|
829
|
+
while (++index < length) {
|
|
830
|
+
var source = sources[index];
|
|
831
|
+
if (source) {
|
|
832
|
+
assigner(object, source, index, customizer);
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
return object;
|
|
836
|
+
});
|
|
837
|
+
}
|
|
810
838
|
var objectProto$c = Object.prototype;
|
|
811
839
|
function isPrototype(value) {
|
|
812
840
|
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$c;
|
|
@@ -1287,12 +1315,14 @@ Stack.prototype.set = stackSet;
|
|
|
1287
1315
|
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1288
1316
|
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1289
1317
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1290
|
-
var Buffer = moduleExports ? root.Buffer : void 0;
|
|
1291
|
-
Buffer ? Buffer.allocUnsafe : void 0;
|
|
1318
|
+
var Buffer = moduleExports ? root.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
|
|
1292
1319
|
function cloneBuffer(buffer, isDeep) {
|
|
1293
|
-
{
|
|
1320
|
+
if (isDeep) {
|
|
1294
1321
|
return buffer.slice();
|
|
1295
1322
|
}
|
|
1323
|
+
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
1324
|
+
buffer.copy(result);
|
|
1325
|
+
return result;
|
|
1296
1326
|
}
|
|
1297
1327
|
function arrayFilter(array, predicate) {
|
|
1298
1328
|
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
@@ -1396,7 +1426,7 @@ function cloneSymbol(symbol) {
|
|
|
1396
1426
|
return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
|
|
1397
1427
|
}
|
|
1398
1428
|
function cloneTypedArray(typedArray, isDeep) {
|
|
1399
|
-
var buffer = cloneArrayBuffer(typedArray.buffer);
|
|
1429
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
1400
1430
|
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
1401
1431
|
}
|
|
1402
1432
|
var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$3 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$3 = "[object String]", symbolTag$2 = "[object Symbol]";
|
|
@@ -1420,7 +1450,7 @@ function initCloneByTag(object, tag, isDeep) {
|
|
|
1420
1450
|
case uint8ClampedTag$1:
|
|
1421
1451
|
case uint16Tag$1:
|
|
1422
1452
|
case uint32Tag$1:
|
|
1423
|
-
return cloneTypedArray(object);
|
|
1453
|
+
return cloneTypedArray(object, isDeep);
|
|
1424
1454
|
case mapTag$3:
|
|
1425
1455
|
return new Ctor();
|
|
1426
1456
|
case numberTag$3:
|
|
@@ -1434,6 +1464,9 @@ function initCloneByTag(object, tag, isDeep) {
|
|
|
1434
1464
|
return cloneSymbol(object);
|
|
1435
1465
|
}
|
|
1436
1466
|
}
|
|
1467
|
+
function initCloneObject(object) {
|
|
1468
|
+
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
|
1469
|
+
}
|
|
1437
1470
|
var mapTag$2 = "[object Map]";
|
|
1438
1471
|
function baseIsMap(value) {
|
|
1439
1472
|
return isObjectLike(value) && getTag(value) == mapTag$2;
|
|
@@ -1446,13 +1479,14 @@ function baseIsSet(value) {
|
|
|
1446
1479
|
}
|
|
1447
1480
|
var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
|
1448
1481
|
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
1482
|
+
var CLONE_DEEP_FLAG$1 = 1;
|
|
1449
1483
|
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$2 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$2 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
|
|
1450
1484
|
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
1451
1485
|
var cloneableTags = {};
|
|
1452
1486
|
cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$2] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$2] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
1453
1487
|
cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
1454
1488
|
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
1455
|
-
var result;
|
|
1489
|
+
var result, isDeep = bitmask & CLONE_DEEP_FLAG$1;
|
|
1456
1490
|
if (customizer) {
|
|
1457
1491
|
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
1458
1492
|
}
|
|
@@ -1468,7 +1502,7 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
|
1468
1502
|
} else {
|
|
1469
1503
|
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
|
1470
1504
|
if (isBuffer(value)) {
|
|
1471
|
-
return cloneBuffer(value);
|
|
1505
|
+
return cloneBuffer(value, isDeep);
|
|
1472
1506
|
}
|
|
1473
1507
|
if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
|
|
1474
1508
|
result = {};
|
|
@@ -1476,7 +1510,7 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
|
1476
1510
|
if (!cloneableTags[tag]) {
|
|
1477
1511
|
return object ? value : {};
|
|
1478
1512
|
}
|
|
1479
|
-
result = initCloneByTag(value, tag);
|
|
1513
|
+
result = initCloneByTag(value, tag, isDeep);
|
|
1480
1514
|
}
|
|
1481
1515
|
}
|
|
1482
1516
|
stack || (stack = new Stack());
|
|
@@ -1966,6 +2000,86 @@ function debounce$1(func, wait, options) {
|
|
|
1966
2000
|
debounced.flush = flush;
|
|
1967
2001
|
return debounced;
|
|
1968
2002
|
}
|
|
2003
|
+
function assignMergeValue(object, key, value) {
|
|
2004
|
+
if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) {
|
|
2005
|
+
baseAssignValue(object, key, value);
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
function isArrayLikeObject(value) {
|
|
2009
|
+
return isObjectLike(value) && isArrayLike(value);
|
|
2010
|
+
}
|
|
2011
|
+
function safeGet(object, key) {
|
|
2012
|
+
if (key === "constructor" && typeof object[key] === "function") {
|
|
2013
|
+
return;
|
|
2014
|
+
}
|
|
2015
|
+
if (key == "__proto__") {
|
|
2016
|
+
return;
|
|
2017
|
+
}
|
|
2018
|
+
return object[key];
|
|
2019
|
+
}
|
|
2020
|
+
function toPlainObject(value) {
|
|
2021
|
+
return copyObject(value, keysIn(value));
|
|
2022
|
+
}
|
|
2023
|
+
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
2024
|
+
var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
|
|
2025
|
+
if (stacked) {
|
|
2026
|
+
assignMergeValue(object, key, stacked);
|
|
2027
|
+
return;
|
|
2028
|
+
}
|
|
2029
|
+
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
|
|
2030
|
+
var isCommon = newValue === void 0;
|
|
2031
|
+
if (isCommon) {
|
|
2032
|
+
var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|
2033
|
+
newValue = srcValue;
|
|
2034
|
+
if (isArr || isBuff || isTyped) {
|
|
2035
|
+
if (isArray(objValue)) {
|
|
2036
|
+
newValue = objValue;
|
|
2037
|
+
} else if (isArrayLikeObject(objValue)) {
|
|
2038
|
+
newValue = copyArray(objValue);
|
|
2039
|
+
} else if (isBuff) {
|
|
2040
|
+
isCommon = false;
|
|
2041
|
+
newValue = cloneBuffer(srcValue, true);
|
|
2042
|
+
} else if (isTyped) {
|
|
2043
|
+
isCommon = false;
|
|
2044
|
+
newValue = cloneTypedArray(srcValue, true);
|
|
2045
|
+
} else {
|
|
2046
|
+
newValue = [];
|
|
2047
|
+
}
|
|
2048
|
+
} else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
|
2049
|
+
newValue = objValue;
|
|
2050
|
+
if (isArguments(objValue)) {
|
|
2051
|
+
newValue = toPlainObject(objValue);
|
|
2052
|
+
} else if (!isObject(objValue) || isFunction(objValue)) {
|
|
2053
|
+
newValue = initCloneObject(srcValue);
|
|
2054
|
+
}
|
|
2055
|
+
} else {
|
|
2056
|
+
isCommon = false;
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
if (isCommon) {
|
|
2060
|
+
stack.set(srcValue, newValue);
|
|
2061
|
+
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
|
2062
|
+
stack["delete"](srcValue);
|
|
2063
|
+
}
|
|
2064
|
+
assignMergeValue(object, key, newValue);
|
|
2065
|
+
}
|
|
2066
|
+
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
2067
|
+
if (object === source) {
|
|
2068
|
+
return;
|
|
2069
|
+
}
|
|
2070
|
+
baseFor(source, function(srcValue, key) {
|
|
2071
|
+
stack || (stack = new Stack());
|
|
2072
|
+
if (isObject(srcValue)) {
|
|
2073
|
+
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
2074
|
+
} else {
|
|
2075
|
+
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
|
|
2076
|
+
if (newValue === void 0) {
|
|
2077
|
+
newValue = srcValue;
|
|
2078
|
+
}
|
|
2079
|
+
assignMergeValue(object, key, newValue);
|
|
2080
|
+
}
|
|
2081
|
+
}, keysIn);
|
|
2082
|
+
}
|
|
1969
2083
|
var FUNC_ERROR_TEXT$1 = "Expected a function";
|
|
1970
2084
|
function baseDelay(func, wait, args) {
|
|
1971
2085
|
if (typeof func != "function") {
|
|
@@ -2017,6 +2131,9 @@ function isNumber(value) {
|
|
|
2017
2131
|
function isNil(value) {
|
|
2018
2132
|
return value == null;
|
|
2019
2133
|
}
|
|
2134
|
+
var merge = createAssigner(function(object, source, srcIndex) {
|
|
2135
|
+
baseMerge(object, source, srcIndex);
|
|
2136
|
+
});
|
|
2020
2137
|
var objectProto = Object.prototype;
|
|
2021
2138
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2022
2139
|
function baseUnset(object, path) {
|
|
@@ -3507,9 +3624,10 @@ export {
|
|
|
3507
3624
|
isNil as k,
|
|
3508
3625
|
isNumber as l,
|
|
3509
3626
|
isString as m,
|
|
3510
|
-
n,
|
|
3511
|
-
o,
|
|
3512
|
-
|
|
3627
|
+
merge as n,
|
|
3628
|
+
n as o,
|
|
3629
|
+
o as p,
|
|
3630
|
+
omit as q,
|
|
3513
3631
|
set as s,
|
|
3514
3632
|
throttle as t
|
|
3515
3633
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MaybeRef, Ref, App } from 'vue';
|
|
2
|
+
import { ConfigProviderContext } from './constants';
|
|
3
|
+
|
|
4
|
+
export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultVal?: D): Ref<Exclude<ConfigProviderContext[K], void>>;
|
|
5
|
+
export declare function useGlobalConfig(): Ref<ConfigProviderContext>;
|
|
6
|
+
export declare function provideGlobalConfig(config?: MaybeRef<ConfigProviderContext>, app?: App, global?: boolean): import('vue').ComputedRef<Partial<import('../../core').ConfigProviderProps>> | undefined;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const BnConfigProvider: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
+
locale: {
|
|
4
|
+
type: import('vue').PropType<import('../../locale').Language>;
|
|
5
|
+
};
|
|
6
|
+
extendsI18nMsg: {
|
|
7
|
+
type: import('vue').PropType<import('../../locale').TranslatePair>;
|
|
8
|
+
};
|
|
9
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
10
|
+
P: {};
|
|
11
|
+
B: {};
|
|
12
|
+
D: {};
|
|
13
|
+
C: {};
|
|
14
|
+
M: {};
|
|
15
|
+
Defaults: {};
|
|
16
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
locale: {
|
|
18
|
+
type: import('vue').PropType<import('../../locale').Language>;
|
|
19
|
+
};
|
|
20
|
+
extendsI18nMsg: {
|
|
21
|
+
type: import('vue').PropType<import('../../locale').TranslatePair>;
|
|
22
|
+
};
|
|
23
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
24
|
+
__isFragment?: never;
|
|
25
|
+
__isTeleport?: never;
|
|
26
|
+
__isSuspense?: never;
|
|
27
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
28
|
+
locale: {
|
|
29
|
+
type: import('vue').PropType<import('../../locale').Language>;
|
|
30
|
+
};
|
|
31
|
+
extendsI18nMsg: {
|
|
32
|
+
type: import('vue').PropType<import('../../locale').TranslatePair>;
|
|
33
|
+
};
|
|
34
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
35
|
+
$slots: {
|
|
36
|
+
default?(_: {
|
|
37
|
+
config: Partial<import('../../core').ConfigProviderProps> | undefined;
|
|
38
|
+
}): any;
|
|
39
|
+
};
|
|
40
|
+
}) & import('vue').Plugin;
|
|
41
|
+
export * from './types';
|