UNPKG

ant-design-x-vue-next

Version:

Ant Design X for Vue — community continuation aligned with @ant-design/x

106 lines (105 loc) 2.72 kB
import { defineComponent as u, useSlots as h, computed as l, createVNode as r, mergeProps as f, isVNode as g } from "vue"; import { c as C } from "../chunks/helper-chunk.mjs"; import { XProviderContextProvider as b } from "./context.mjs"; import v from "./hooks/use-x-provider-context.mjs"; import { ConfigProvider as P } from "ant-design-vue"; import x from "../locale/LocaleProvider.mjs"; function s(e) { return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e); } const B = /* @__PURE__ */ u({ name: "AXProvider", inheritAttrs: !1, __name: "index", props: { actions: {}, bubble: {}, conversations: {}, prompts: {}, sender: {}, suggestion: {}, thoughtChain: {}, think: {}, sources: {}, fileCard: {}, folder: {}, codeHighlighter: {}, mermaid: {}, attachments: {}, welcome: {}, iconPrefixCls: {}, getTargetContainer: {}, getPopupContainer: {}, prefixCls: {}, getPrefixCls: {}, renderEmpty: {}, transformCellText: {}, csp: {}, input: {}, autoInsertSpaceInButton: { type: Boolean }, locale: {}, pageHeader: {}, componentSize: {}, componentDisabled: { type: Boolean }, direction: {}, space: {}, virtual: { type: Boolean }, dropdownMatchSelectWidth: {}, form: {}, pagination: {}, theme: {}, select: {}, wave: {} }, setup(e) { const a = C(e, ["actions", "attachments", "bubble", "conversations", "prompts", "sender", "suggestion", "thoughtChain", "think", "sources", "fileCard", "folder", "codeHighlighter", "mermaid", "welcome", "locale"]), o = h(), m = l(() => ({ actions: e.actions, attachments: e.attachments, bubble: e.bubble, conversations: e.conversations, prompts: e.prompts, sender: e.sender, suggestion: e.suggestion, thoughtChain: e.thoughtChain, think: e.think, sources: e.sources, fileCard: e.fileCard, folder: e.folder, codeHighlighter: e.codeHighlighter, mermaid: e.mermaid, welcome: e.welcome })), { theme: n } = v(), d = l(() => ({ ...(n == null ? void 0 : n.value) || {}, ...a.theme })); return () => { var c; const t = (c = o.default) == null ? void 0 : c.call(o), i = e.locale ? r(x, { locale: e.locale }, s(t) ? t : { default: () => [t] }) : t; return r(b, { value: m.value }, { default: () => [r(P, f(a, { locale: e.locale, theme: d.value }), s(i) ? i : { default: () => [i] })] }); }; } }); export { B as _ };