orion-design 0.1.42 → 0.1.43

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # Vue 3 + TypeScript + Vite
2
-
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
1
+ # Vue 3 + TypeScript + Vite
2
+
3
+ This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
+
5
+ Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
@@ -1 +1 @@
1
- {"version":3,"file":"use-throne-context.js","sources":["../../../src/Throne/hooks/use-throne-context.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, provide, ref, unref } from 'vue'\n\nimport type { InjectionKey } from 'vue'\n\nexport const throneContextKey: InjectionKey<Ref<Record<string, any> | undefined>> = Symbol('throneContext')\n\nimport type { App, Ref } from 'vue'\nimport type { ThroneContextProviderContext } from '../../components/Throne/ThroneContextProvider'\n\n\nexport function useThroneContext(): Ref<Record<string, any> | undefined> | undefined {\n const context = inject(throneContextKey, undefined)\n return context\n}\n\nexport const provideThroneContext = (props: ThroneContextProviderContext) => {\n const context = computed(() => {\n return props.context || undefined\n })\n\n provide(throneContextKey, context)\n\n return context\n}\n"],"names":["throneContextKey","useThroneContext","inject","provideThroneContext","props","context","computed","provide"],"mappings":";AAIa,MAAAA,IAAuE,OAAO,eAAe;AAMnG,SAASC,IAAqE;AAE5E,SADSC,EAAOF,GAAkB,MAAS;AAEpD;AAEa,MAAAG,IAAuB,CAACC,MAAwC;AACrE,QAAAC,IAAUC,EAAS,MAChBF,EAAM,WAAW,MACzB;AAED,SAAAG,EAAQP,GAAkBK,CAAO,GAE1BA;AACT;"}
1
+ {"version":3,"file":"use-throne-context.js","sources":["../../../src/Throne/hooks/use-throne-context.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, provide, ref, unref } from 'vue'\r\n\r\nimport type { InjectionKey } from 'vue'\r\n\r\nexport const throneContextKey: InjectionKey<Ref<Record<string, any> | undefined>> = Symbol('throneContext')\r\n\r\nimport type { App, Ref } from 'vue'\r\nimport type { ThroneContextProviderContext } from '../../components/Throne/ThroneContextProvider'\r\n\r\n\r\nexport function useThroneContext(): Ref<Record<string, any> | undefined> | undefined {\r\n const context = inject(throneContextKey, undefined)\r\n return context\r\n}\r\n\r\nexport const provideThroneContext = (props: ThroneContextProviderContext) => {\r\n const context = computed(() => {\r\n return props.context || undefined\r\n })\r\n\r\n provide(throneContextKey, context)\r\n\r\n return context\r\n}\r\n"],"names":["throneContextKey","useThroneContext","inject","provideThroneContext","props","context","computed","provide"],"mappings":";AAIa,MAAAA,IAAuE,OAAO,eAAe;AAMnG,SAASC,IAAqE;AAE5E,SADSC,EAAOF,GAAkB,MAAS;AAEpD;AAEa,MAAAG,IAAuB,CAACC,MAAwC;AACrE,QAAAC,IAAUC,EAAS,MAChBF,EAAM,WAAW,MACzB;AAED,SAAAG,EAAQP,GAAkBK,CAAO,GAE1BA;AACT;"}
@@ -3,3 +3,4 @@ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineCo
3
3
  ModalLocator: typeof ModalLocator;
4
4
  };
5
5
  export default _default;
6
+ export { default as useOModal } from './useModal';
@@ -1,10 +1,11 @@
1
1
  import "lodash-es";
2
- import { defineComponent as _, inject as L, ref as o, shallowRef as P, provide as g, createVNode as f, Fragment as O, useTemplateRef as k, openBlock as E, createElementBlock as T, renderSlot as b } from "vue";
2
+ import { defineComponent as _, inject as L, ref as o, shallowRef as O, provide as g, createVNode as v, Fragment as P, useTemplateRef as k, openBlock as E, createElementBlock as T, renderSlot as b } from "vue";
3
3
  import { withInstall as j } from "../_util/vue/install.js";
4
4
  import { ElDialog as B } from "element-plus";
5
5
  import { addUnit as I } from "../_util/dom/style.js";
6
6
  import { modalLocatorContextKey as w, modalContextKey as K } from "./types.js";
7
7
  import { _ as R } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
8
+ import { default as Y } from "./useModal.js";
8
9
  const V = /* @__PURE__ */ _({
9
10
  name: "OModal",
10
11
  setup(C, {
@@ -13,21 +14,21 @@ const V = /* @__PURE__ */ _({
13
14
  emit: M,
14
15
  expose: x
15
16
  }) {
16
- const r = L(w), l = o(!1), a = o(), s = P(), t = o(), u = o(), c = o(), d = o(), i = o(!0), n = o();
17
+ const r = L(w), l = o(!1), a = o(), s = O(), t = o(), u = o(), c = o(), d = o(), i = o(!0), n = o();
17
18
  x({
18
19
  open: async (e) => (l.value = !0, a.value = e.title, s.value = e.content, e.contentProps ? t.value = e.contentProps : t.value = {}, e.width && (u.value = e.width), e.height && (c.value = I(e.height)), e.showClose != null && e.showClose == !1 && (i.value = !1), e.locator ? n.value = e.locator : r && r.locator.value && (n.value = r.locator.value), new Promise((y, S) => {
19
20
  d.value = y;
20
21
  }))
21
22
  });
22
23
  const p = (e) => {
23
- const v = d.value;
24
- l.value = !1, a.value = void 0, s.value = void 0, t.value = void 0, u.value = void 0, c.value = void 0, d.value = void 0, i.value = !0, n.value = void 0, v && v(e);
24
+ const f = d.value;
25
+ l.value = !1, a.value = void 0, s.value = void 0, t.value = void 0, u.value = void 0, c.value = void 0, d.value = void 0, i.value = !0, n.value = void 0, f && f(e);
25
26
  };
26
27
  return g(K, {
27
28
  close: p
28
29
  }), () => {
29
30
  const e = s.value;
30
- return l.value ? f(B, {
31
+ return l.value ? v(B, {
31
32
  class: a.value ? "orion-dialog" : "orion-dialog notitle",
32
33
  "modal-class": "orion-dialog-overlay",
33
34
  title: a.value,
@@ -44,8 +45,8 @@ const V = /* @__PURE__ */ _({
44
45
  },
45
46
  appendTo: n.value
46
47
  }, {
47
- default: () => [f(e, t.value, null)]
48
- }) : f(O, null, null);
48
+ default: () => [v(e, t.value, null)]
49
+ }) : v(P, null, null);
49
50
  };
50
51
  }
51
52
  }), A = {
@@ -65,6 +66,7 @@ const V = /* @__PURE__ */ _({
65
66
  }
66
67
  }), F = /* @__PURE__ */ R(D, [["__scopeId", "data-v-0fd5a1a9"]]), Q = j(V, { ModalLocator: F });
67
68
  export {
68
- Q as default
69
+ Q as default,
70
+ Y as useOModal
69
71
  };
70
72
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Modal/Modal.tsx","../../../src/components/Modal/ModalLocator.vue","../../../src/components/Modal/index.ts"],"sourcesContent":["import { defineComponent, inject, provide, ref, shallowRef } from 'vue'\r\nimport { ElDialog } from 'element-plus'\r\nimport { addUnit } from '../_util'\r\nimport { modalContextKey, modalLocatorContextKey, ModalOptions } from './types'\r\n\r\nconst Modal = defineComponent({\r\n name: 'OModal',\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const modalLocator = inject(modalLocatorContextKey)\r\n\r\n const show = ref(false)\r\n const title = ref<string>()\r\n const content = shallowRef()\r\n const contentProps = ref<Record<string, any>>()\r\n const width = ref<number | string>()\r\n const height = ref<number | string>()\r\n const __resolve = ref<(value: Record<string, any> | PromiseLike<Record<string, any>>) => void>()\r\n const showClose = ref(true)\r\n const appendTo = ref<HTMLElement>()\r\n\r\n const _open: (options: ModalOptions) => Promise<Record<string, any>> = async (options) => {\r\n show.value = true\r\n title.value = options.title\r\n content.value = options.content\r\n if (options.contentProps) {\r\n contentProps.value = options.contentProps\r\n } else {\r\n contentProps.value = {}\r\n }\r\n if (options.width) {\r\n width.value = options.width\r\n }\r\n if (options.height) {\r\n height.value = addUnit(options.height)\r\n }\r\n if (options.showClose != undefined && options.showClose == false) {\r\n showClose.value = false\r\n }\r\n if (options.locator) {\r\n appendTo.value = options.locator\r\n } else {\r\n if (modalLocator && modalLocator.locator.value) {\r\n appendTo.value = modalLocator.locator.value\r\n }\r\n }\r\n\r\n const promise = new Promise<Record<string, any>>((resolve, reject) => {\r\n __resolve.value = resolve\r\n })\r\n\r\n return promise\r\n }\r\n expose({\r\n open: _open,\r\n })\r\n\r\n const _close: (options: Record<string, any>) => void = (options) => {\r\n const resolve = __resolve.value\r\n\r\n show.value = false\r\n title.value = undefined\r\n content.value = undefined\r\n contentProps.value = undefined\r\n width.value = undefined\r\n height.value = undefined\r\n __resolve.value = undefined\r\n showClose.value = true\r\n appendTo.value = undefined\r\n\r\n resolve && resolve(options)\r\n }\r\n provide(modalContextKey, { close: _close })\r\n\r\n return () => {\r\n const Children = content.value\r\n return show.value ? (\r\n <ElDialog\r\n class={title.value ? 'orion-dialog' : 'orion-dialog notitle'}\r\n modal-class=\"orion-dialog-overlay\"\r\n title={title.value}\r\n width={width.value}\r\n modelValue={show.value}\r\n beforeClose={_close}\r\n draggable={true}\r\n closeOnClickModal={false}\r\n closeOnPressEscape={false}\r\n showClose={showClose.value}\r\n alignCenter={true}\r\n style={{ height: height.value }}\r\n appendTo={appendTo.value}\r\n >\r\n <Children {...contentProps.value}></Children>\r\n </ElDialog>\r\n ) : (\r\n <></>\r\n )\r\n }\r\n },\r\n})\r\n\r\nexport default Modal\r\n","<template>\r\n <div ref=\"modal-locator\" class=\"orion-modal-locator\"><slot></slot></div>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { provide, useTemplateRef } from 'vue'\r\nimport { modalLocatorContextKey } from './types'\r\n\r\ndefineOptions({ name: 'OModalLocator', inheritAttrs: true })\r\nconst locator = useTemplateRef('modal-locator')\r\n\r\nprovide(modalLocatorContextKey, {\r\n locator,\r\n})\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.orion-modal-locator {\r\n width: 100%;\r\n height: 100%;\r\n overflow: auto;\r\n box-sizing: border-box;\r\n position: relative;\r\n\r\n :deep(> .el-overlay) {\r\n position: absolute;\r\n\r\n > .el-overlay-dialog {\r\n position: absolute;\r\n }\r\n }\r\n}\r\n</style>\r\n","import { withInstall } from '../_util'\r\n\r\nimport Modal from './Modal'\r\nimport ModalLocator from './ModalLocator.vue'\r\n\r\nexport default withInstall<typeof Modal, { ModalLocator: typeof ModalLocator }>(Modal, { ModalLocator })\r\n"],"names":["Modal","defineComponent","name","setup","props","slots","attrs","emit","expose","modalLocator","inject","modalLocatorContextKey","show","ref","title","content","shallowRef","contentProps","width","height","__resolve","showClose","appendTo","open","options","value","addUnit","undefined","locator","Promise","resolve","reject","_close","provide","modalContextKey","close","Children","_createVNode","ElDialog","default","_Fragment","useTemplateRef","index","withInstall","ModalLocator"],"mappings":";;;;;;;AAKA,MAAMA,IAAQC,gBAAAA,EAAgB;AAAA,EAC5BC,MAAM;AAAA,EACNC,MAAMC,GAAO;AAAA,IAAEC,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,UAAMC,IAAeC,EAAOC,CAAsB,GAE5CC,IAAOC,EAAI,EAAK,GAChBC,IAAQD,KACRE,IAAUC,KACVC,IAAeJ,KACfK,IAAQL,KACRM,IAASN,KACTO,IAAYP,KACZQ,IAAYR,EAAI,EAAI,GACpBS,IAAWT;AAkCjBL,IAAAA,EAAO;AAAA,MACLe,MAjCqE,OAAOC,OAC5EZ,EAAKa,QAAQ,IACbX,EAAMW,QAAQD,EAAQV,OACtBC,EAAQU,QAAQD,EAAQT,SACpBS,EAAQP,eACVA,EAAaQ,QAAQD,EAAQP,eAE7BA,EAAaQ,QAAQ,IAEnBD,EAAQN,UACVA,EAAMO,QAAQD,EAAQN,QAEpBM,EAAQL,WACVA,EAAOM,QAAQC,EAAQF,EAAQL,MAAM,IAEnCK,EAAQH,aAAaM,QAAaH,EAAQH,aAAa,OACzDA,EAAUI,QAAQ,KAEhBD,EAAQI,UACVN,EAASG,QAAQD,EAAQI,UAErBnB,KAAgBA,EAAamB,QAAQH,UACvCH,EAASG,QAAQhB,EAAamB,QAAQH,QAI1B,IAAII,QAA6B,CAACC,GAASC,MAAW;AACpEX,QAAAA,EAAUK,QAAQK;AAAAA,MACpB,CAAC;AAAA,IAMH,CAAC;AAED,UAAME,IAAkDR,CAAAA,MAAY;AAClE,YAAMM,IAAUV,EAAUK;AAE1Bb,MAAAA,EAAKa,QAAQ,IACbX,EAAMW,QAAQE,QACdZ,EAAQU,QAAQE,QAChBV,EAAaQ,QAAQE,QACrBT,EAAMO,QAAQE,QACdR,EAAOM,QAAQE,QACfP,EAAUK,QAAQE,QAClBN,EAAUI,QAAQ,IAClBH,EAASG,QAAQE,QAEjBG,KAAWA,EAAQN,CAAO;AAAA;AAE5BS,WAAAA,EAAQC,GAAiB;AAAA,MAAEC,OAAOH;AAAAA,IAAO,CAAC,GAEnC,MAAM;AACX,YAAMI,IAAWrB,EAAQU;AACzB,aAAOb,EAAKa,QAAKY,EAAAC,GAAA;AAAA,QAAA,OAENxB,EAAMW,QAAQ,iBAAiB;AAAA,QAAsB,eAAA;AAAA,QAAA,OAErDX,EAAMW;AAAAA,QAAK,OACXP,EAAMO;AAAAA,QAAK,YACNb,EAAKa;AAAAA,QAAK,aACTO;AAAAA,QAAM,WACR;AAAA,QAAI,mBACI;AAAA,QAAK,oBACJ;AAAA,QAAK,WACdX,EAAUI;AAAAA,QAAK,aACb;AAAA,QAAI,OACV;AAAA,UAAEN,QAAQA,EAAOM;AAAAA,QAAO;AAAA,QAAA,UACrBH,EAASG;AAAAA,MAAK,GAAA;AAAA,QAAAc,SAAAA,MAAAF,CAAAA,EAAAD,GAEVnB,EAAaQ,OAAK,IAAA,CAAA;AAAA,MAAAY,CAAAA,IAAAA,EAAAG,GAInC,MAAA,IAAA;AAAA;EAEL;AACF,CAAC;;;;;;;;AC1FK,UAAAZ,IAAUa,EAAe,eAAe;AAE9C,WAAAR,EAAQtB,GAAwB;AAAA,MAC9B,SAAAiB;AAAA,IAAA,CACD;;;;kECPDc,IAAeC,EAAiE3C,GAAO,EAAE,cAAA4C,GAAc;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Modal/Modal.tsx","../../../src/components/Modal/ModalLocator.vue","../../../src/components/Modal/index.ts"],"sourcesContent":["import { defineComponent, inject, provide, ref, shallowRef } from 'vue'\r\nimport { ElDialog } from 'element-plus'\r\nimport { addUnit } from '../_util'\r\nimport { modalContextKey, modalLocatorContextKey, ModalOptions } from './types'\r\n\r\nconst Modal = defineComponent({\r\n name: 'OModal',\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const modalLocator = inject(modalLocatorContextKey)\r\n\r\n const show = ref(false)\r\n const title = ref<string>()\r\n const content = shallowRef()\r\n const contentProps = ref<Record<string, any>>()\r\n const width = ref<number | string>()\r\n const height = ref<number | string>()\r\n const __resolve = ref<(value: Record<string, any> | PromiseLike<Record<string, any>>) => void>()\r\n const showClose = ref(true)\r\n const appendTo = ref<HTMLElement>()\r\n\r\n const _open: (options: ModalOptions) => Promise<Record<string, any>> = async (options) => {\r\n show.value = true\r\n title.value = options.title\r\n content.value = options.content\r\n if (options.contentProps) {\r\n contentProps.value = options.contentProps\r\n } else {\r\n contentProps.value = {}\r\n }\r\n if (options.width) {\r\n width.value = options.width\r\n }\r\n if (options.height) {\r\n height.value = addUnit(options.height)\r\n }\r\n if (options.showClose != undefined && options.showClose == false) {\r\n showClose.value = false\r\n }\r\n if (options.locator) {\r\n appendTo.value = options.locator\r\n } else {\r\n if (modalLocator && modalLocator.locator.value) {\r\n appendTo.value = modalLocator.locator.value\r\n }\r\n }\r\n\r\n const promise = new Promise<Record<string, any>>((resolve, reject) => {\r\n __resolve.value = resolve\r\n })\r\n\r\n return promise\r\n }\r\n expose({\r\n open: _open,\r\n })\r\n\r\n const _close: (options: Record<string, any>) => void = (options) => {\r\n const resolve = __resolve.value\r\n\r\n show.value = false\r\n title.value = undefined\r\n content.value = undefined\r\n contentProps.value = undefined\r\n width.value = undefined\r\n height.value = undefined\r\n __resolve.value = undefined\r\n showClose.value = true\r\n appendTo.value = undefined\r\n\r\n resolve && resolve(options)\r\n }\r\n provide(modalContextKey, { close: _close })\r\n\r\n return () => {\r\n const Children = content.value\r\n return show.value ? (\r\n <ElDialog\r\n class={title.value ? 'orion-dialog' : 'orion-dialog notitle'}\r\n modal-class=\"orion-dialog-overlay\"\r\n title={title.value}\r\n width={width.value}\r\n modelValue={show.value}\r\n beforeClose={_close}\r\n draggable={true}\r\n closeOnClickModal={false}\r\n closeOnPressEscape={false}\r\n showClose={showClose.value}\r\n alignCenter={true}\r\n style={{ height: height.value }}\r\n appendTo={appendTo.value}\r\n >\r\n <Children {...contentProps.value}></Children>\r\n </ElDialog>\r\n ) : (\r\n <></>\r\n )\r\n }\r\n },\r\n})\r\n\r\nexport default Modal\r\n","<template>\r\n <div ref=\"modal-locator\" class=\"orion-modal-locator\"><slot></slot></div>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { provide, useTemplateRef } from 'vue'\r\nimport { modalLocatorContextKey } from './types'\r\n\r\ndefineOptions({ name: 'OModalLocator', inheritAttrs: true })\r\nconst locator = useTemplateRef('modal-locator')\r\n\r\nprovide(modalLocatorContextKey, {\r\n locator,\r\n})\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.orion-modal-locator {\r\n width: 100%;\r\n height: 100%;\r\n overflow: auto;\r\n box-sizing: border-box;\r\n position: relative;\r\n\r\n :deep(> .el-overlay) {\r\n position: absolute;\r\n\r\n > .el-overlay-dialog {\r\n position: absolute;\r\n }\r\n }\r\n}\r\n</style>\r\n","import { withInstall } from '../_util'\r\n\r\nimport Modal from './Modal'\r\nimport ModalLocator from './ModalLocator.vue'\r\n\r\nexport default withInstall<typeof Modal, { ModalLocator: typeof ModalLocator }>(Modal, { ModalLocator })\r\n\r\nexport { default as useOModal } from './useModal'\r\n"],"names":["Modal","defineComponent","name","setup","props","slots","attrs","emit","expose","modalLocator","inject","modalLocatorContextKey","show","ref","title","content","shallowRef","contentProps","width","height","__resolve","showClose","appendTo","open","options","value","addUnit","undefined","locator","Promise","resolve","reject","_close","provide","modalContextKey","close","Children","_createVNode","ElDialog","default","_Fragment","useTemplateRef","index","withInstall","ModalLocator"],"mappings":";;;;;;;;AAKA,MAAMA,IAAQC,gBAAAA,EAAgB;AAAA,EAC5BC,MAAM;AAAA,EACNC,MAAMC,GAAO;AAAA,IAAEC,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,UAAMC,IAAeC,EAAOC,CAAsB,GAE5CC,IAAOC,EAAI,EAAK,GAChBC,IAAQD,KACRE,IAAUC,KACVC,IAAeJ,KACfK,IAAQL,KACRM,IAASN,KACTO,IAAYP,KACZQ,IAAYR,EAAI,EAAI,GACpBS,IAAWT;AAkCjBL,IAAAA,EAAO;AAAA,MACLe,MAjCqE,OAAOC,OAC5EZ,EAAKa,QAAQ,IACbX,EAAMW,QAAQD,EAAQV,OACtBC,EAAQU,QAAQD,EAAQT,SACpBS,EAAQP,eACVA,EAAaQ,QAAQD,EAAQP,eAE7BA,EAAaQ,QAAQ,IAEnBD,EAAQN,UACVA,EAAMO,QAAQD,EAAQN,QAEpBM,EAAQL,WACVA,EAAOM,QAAQC,EAAQF,EAAQL,MAAM,IAEnCK,EAAQH,aAAaM,QAAaH,EAAQH,aAAa,OACzDA,EAAUI,QAAQ,KAEhBD,EAAQI,UACVN,EAASG,QAAQD,EAAQI,UAErBnB,KAAgBA,EAAamB,QAAQH,UACvCH,EAASG,QAAQhB,EAAamB,QAAQH,QAI1B,IAAII,QAA6B,CAACC,GAASC,MAAW;AACpEX,QAAAA,EAAUK,QAAQK;AAAAA,MACpB,CAAC;AAAA,IAMH,CAAC;AAED,UAAME,IAAkDR,CAAAA,MAAY;AAClE,YAAMM,IAAUV,EAAUK;AAE1Bb,MAAAA,EAAKa,QAAQ,IACbX,EAAMW,QAAQE,QACdZ,EAAQU,QAAQE,QAChBV,EAAaQ,QAAQE,QACrBT,EAAMO,QAAQE,QACdR,EAAOM,QAAQE,QACfP,EAAUK,QAAQE,QAClBN,EAAUI,QAAQ,IAClBH,EAASG,QAAQE,QAEjBG,KAAWA,EAAQN,CAAO;AAAA;AAE5BS,WAAAA,EAAQC,GAAiB;AAAA,MAAEC,OAAOH;AAAAA,IAAO,CAAC,GAEnC,MAAM;AACX,YAAMI,IAAWrB,EAAQU;AACzB,aAAOb,EAAKa,QAAKY,EAAAC,GAAA;AAAA,QAAA,OAENxB,EAAMW,QAAQ,iBAAiB;AAAA,QAAsB,eAAA;AAAA,QAAA,OAErDX,EAAMW;AAAAA,QAAK,OACXP,EAAMO;AAAAA,QAAK,YACNb,EAAKa;AAAAA,QAAK,aACTO;AAAAA,QAAM,WACR;AAAA,QAAI,mBACI;AAAA,QAAK,oBACJ;AAAA,QAAK,WACdX,EAAUI;AAAAA,QAAK,aACb;AAAA,QAAI,OACV;AAAA,UAAEN,QAAQA,EAAOM;AAAAA,QAAO;AAAA,QAAA,UACrBH,EAASG;AAAAA,MAAK,GAAA;AAAA,QAAAc,SAAAA,MAAAF,CAAAA,EAAAD,GAEVnB,EAAaQ,OAAK,IAAA,CAAA;AAAA,MAAAY,CAAAA,IAAAA,EAAAG,GAInC,MAAA,IAAA;AAAA;EAEL;AACF,CAAC;;;;;;;;AC1FK,UAAAZ,IAAUa,EAAe,eAAe;AAE9C,WAAAR,EAAQtB,GAAwB;AAAA,MAC9B,SAAAiB;AAAA,IAAA,CACD;;;;kECPDc,IAAeC,EAAiE3C,GAAO,EAAE,cAAA4C,GAAc;"}
@@ -0,0 +1,45 @@
1
+ import { TreeNodeData as ElTreeNodeData, TreeData as ElTreeData, TreeKey as ElTreeKey, FilterNodeMethodFunction as ElFilterNodeMethodFunction } from 'element-plus/es/components/tree/src/tree.type';
2
+ import { default as ElNode } from 'element-plus/es/components/tree/src/model/node';
3
+ export type TreeNodeData = ElTreeNodeData;
4
+ export type TreeData = ElTreeData;
5
+ export type TreeKey = ElTreeKey;
6
+ export type FilterNodeMethodFunction = ElFilterNodeMethodFunction;
7
+ export type TreeNode = ElNode;
8
+ export interface TreeProps {
9
+ data: TreeData;
10
+ emptyText: string;
11
+ nodeKey: string;
12
+ nodeLabel?: string | ((data: TreeNodeData, node: TreeNode) => string);
13
+ nodeChildren?: string;
14
+ nodeDisabled?: string | ((data: TreeNodeData, node: TreeNode) => boolean);
15
+ nodeClass?: (data: TreeNodeData, node: TreeNode) => string | {
16
+ [key: string]: boolean;
17
+ };
18
+ renderAfterExpand: boolean;
19
+ highlightCurrent: boolean;
20
+ defaultExpandAll: boolean;
21
+ expandOnClickNode: boolean;
22
+ checkOnClickNode: boolean;
23
+ autoExpandParent: boolean;
24
+ defaultExpandedKeys: TreeKey[];
25
+ showCheckbox: boolean;
26
+ checkStrictly: boolean;
27
+ defaultCheckedKeys: TreeKey[];
28
+ currentNodeKey: TreeKey;
29
+ filterNodeMethod: FilterNodeMethodFunction;
30
+ accordion: boolean;
31
+ indent: number;
32
+ }
33
+ export interface TransformOptions {
34
+ idKey?: string;
35
+ pIdKey?: string;
36
+ rootPId?: string;
37
+ childrenKey?: string;
38
+ }
39
+ export interface TreeExpose {
40
+ filter: (value: any) => void;
41
+ getCheckedKeys: (leafOnly?: boolean) => TreeKey[];
42
+ setCheckedKeys: (keys: TreeKey[]) => void;
43
+ getCurrentKey: () => any;
44
+ setCurrentKey: (key?: TreeKey, shouldAutoExpandParent?: boolean) => void;
45
+ }
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=Tree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tree.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}