hy-dispatch-ui-v3 0.1.5 → 0.2.0

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 (174) hide show
  1. package/README.md +47 -0
  2. package/dist/tailwind.css +408 -4
  3. package/es/components/appAudioPlayer/appAudioPlayer.vue.mjs +462 -0
  4. package/es/components/appAudioPlayer/index.mjs +6 -0
  5. package/es/components/appAudioPlayer/js/index.mjs +327 -0
  6. package/es/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
  7. package/es/components/appButton/style/appButton.scss +0 -1
  8. package/es/components/appConfigProvider/appConfigProvider.vue.mjs +25 -4
  9. package/es/components/appConfirmDialog/appConfirmDialog.vue.mjs +3 -3
  10. package/es/components/appConfirmDialog/appConfirmMethod.mjs +13 -13
  11. package/es/components/appCutter/appCutter.vue.mjs +358 -0
  12. package/es/components/appCutter/index.mjs +6 -0
  13. package/es/components/appCutter/style/appCutter.scss +51 -0
  14. package/es/components/appDatePicker/appDatePicker.vue.mjs +1 -1
  15. package/es/components/appDialog/appDialog.vue.mjs +205 -0
  16. package/es/components/appDialog/index.mjs +6 -0
  17. package/es/components/appDialog/style/appDialog.scss +0 -0
  18. package/es/components/appForm/appForm.vue.mjs +132 -209
  19. package/es/components/appForm/cpns/appFormItem.vue.mjs +312 -0
  20. package/es/components/appForm/cpns/arrayItem.vue.mjs +305 -0
  21. package/es/components/appForm/cpns/extraItem.vue.mjs +140 -0
  22. package/es/components/appForm/js/index.mjs +46 -24
  23. package/es/components/appForm/js/useAppForm.mjs +30 -6
  24. package/es/components/appForm/style/appForm.scss +53 -0
  25. package/es/components/appIcon/appIcon.vue.mjs +2 -1
  26. package/es/components/appIconBox/style/appIconBox.scss +0 -1
  27. package/es/components/appInput/appInput.vue.mjs +99 -0
  28. package/es/components/appInput/index.mjs +6 -0
  29. package/es/components/appMenu/appMenu.vue.mjs +129 -0
  30. package/es/components/appMenu/index.mjs +6 -0
  31. package/es/components/appMenu/style/appMenu.scss +145 -0
  32. package/es/components/appOrgCascader/appOrgCascader.vue.mjs +14 -10
  33. package/es/components/appSearch/appSearch.vue.mjs +55 -211
  34. package/es/components/appSearch/cpns/appSearchItem.vue.mjs +238 -0
  35. package/es/components/appSearch/js/index.mjs +20 -8
  36. package/es/components/appSearch/js/useAppSearch.mjs +10 -5
  37. package/es/components/appSearch/style/appSearch.scss +10 -0
  38. package/es/components/appTable/appTable.vue.mjs +313 -159
  39. package/es/components/appTable/cpns/columnSelect.vue.mjs +151 -156
  40. package/es/components/appTable/cpns/columnSelectItem.vue2.mjs +104 -110
  41. package/es/components/appTable/cpns/headerItem.vue.mjs +98 -0
  42. package/es/components/appTable/cpns/virtualTable.vue.mjs +560 -0
  43. package/es/components/appTable/js/index.mjs +46 -20
  44. package/es/components/appTable/js/search.mjs +1 -2
  45. package/es/components/appTable/js/useAppTable.mjs +58 -14
  46. package/es/components/appTable/style/appTable.scss +16 -0
  47. package/es/components/appTooltip/appTooltip.vue.mjs +24 -13
  48. package/es/components/appTree/appTree.vue.mjs +304 -0
  49. package/es/components/appTree/index.mjs +6 -0
  50. package/es/components/appTree/js/index.mjs +531 -0
  51. package/es/components/appUserAvatar/appUserAvatar.vue.mjs +9 -8
  52. package/es/components/appUserAvatar/style/appUserAvatar.scss +0 -1
  53. package/es/components/appVideoPlayer/appVideoPlayer.vue.mjs +647 -0
  54. package/es/components/appVideoPlayer/cpns/mediaLoading.vue.mjs +35 -0
  55. package/es/components/appVideoPlayer/index.mjs +6 -0
  56. package/es/components/appVideoPlayer/js/index.mjs +426 -0
  57. package/es/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
  58. package/es/components/appVideoPlayer/style/mediaLoading.scss +62 -0
  59. package/es/components/index.mjs +7 -0
  60. package/es/hooks/index.mjs +3 -0
  61. package/es/hooks/useApi.mjs +7 -3
  62. package/es/hooks/useAudioPlayerConfig.mjs +12 -0
  63. package/es/hooks/useGlobalConfig.mjs +20 -9
  64. package/es/hooks/useLocale.mjs +10 -8
  65. package/es/hooks/useMixins.mjs +1 -1
  66. package/es/hooks/usePermissionMap.mjs +12 -0
  67. package/es/hooks/useUserAvatarMap.mjs +6 -3
  68. package/es/hooks/useVideoPlayerConfig.mjs +12 -0
  69. package/es/index.mjs +16 -3
  70. package/es/locale/en.mjs +58 -4
  71. package/es/locale/zh_CN.mjs +56 -6
  72. package/es/make-installer.mjs +2 -0
  73. package/es/static/hy-svg-icons.js +462 -0
  74. package/es/static/protocolcheck.js +247 -0
  75. package/es/style/element/element.scss +9 -0
  76. package/es/style/element/index.scss +6 -3
  77. package/es/style/index.scss +11 -0
  78. package/es/style/theme.scss +73 -0
  79. package/es/utils/date.mjs +25 -1
  80. package/es/utils/file.mjs +69 -0
  81. package/es/utils/form.mjs +52 -0
  82. package/es/utils/handler.mjs +22 -2
  83. package/es/utils/index.mjs +6 -3
  84. package/es/utils/is.mjs +26 -2
  85. package/es/utils/loadScript.mjs +33 -0
  86. package/es/version.mjs +1 -1
  87. package/lib/components/appAudioPlayer/appAudioPlayer.vue.js +466 -0
  88. package/lib/components/appAudioPlayer/index.js +11 -0
  89. package/lib/components/appAudioPlayer/js/index.js +329 -0
  90. package/lib/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
  91. package/lib/components/appButton/style/appButton.scss +0 -1
  92. package/lib/components/appConfigProvider/appConfigProvider.vue.js +23 -2
  93. package/lib/components/appConfirmDialog/appConfirmDialog.vue.js +3 -3
  94. package/lib/components/appConfirmDialog/appConfirmMethod.js +13 -13
  95. package/lib/components/appCutter/appCutter.vue.js +362 -0
  96. package/lib/components/appCutter/index.js +11 -0
  97. package/lib/components/appCutter/style/appCutter.scss +51 -0
  98. package/lib/components/appDatePicker/appDatePicker.vue.js +1 -1
  99. package/lib/components/appDialog/appDialog.vue.js +209 -0
  100. package/lib/components/appDialog/index.js +11 -0
  101. package/lib/components/appDialog/style/appDialog.scss +0 -0
  102. package/lib/components/appForm/appForm.vue.js +129 -206
  103. package/lib/components/appForm/cpns/appFormItem.vue.js +316 -0
  104. package/lib/components/appForm/cpns/arrayItem.vue.js +309 -0
  105. package/lib/components/appForm/cpns/extraItem.vue.js +144 -0
  106. package/lib/components/appForm/js/index.js +48 -23
  107. package/lib/components/appForm/js/useAppForm.js +30 -6
  108. package/lib/components/appForm/style/appForm.scss +53 -0
  109. package/lib/components/appIcon/appIcon.vue.js +2 -1
  110. package/lib/components/appIconBox/style/appIconBox.scss +0 -1
  111. package/lib/components/appInput/appInput.vue.js +103 -0
  112. package/lib/components/appInput/index.js +11 -0
  113. package/lib/components/appMenu/appMenu.vue.js +133 -0
  114. package/lib/components/appMenu/index.js +11 -0
  115. package/lib/components/appMenu/style/appMenu.scss +145 -0
  116. package/lib/components/appOrgCascader/appOrgCascader.vue.js +14 -10
  117. package/lib/components/appSearch/appSearch.vue.js +51 -207
  118. package/lib/components/appSearch/cpns/appSearchItem.vue.js +242 -0
  119. package/lib/components/appSearch/js/index.js +20 -7
  120. package/lib/components/appSearch/js/useAppSearch.js +10 -5
  121. package/lib/components/appSearch/style/appSearch.scss +10 -0
  122. package/lib/components/appTable/appTable.vue.js +320 -166
  123. package/lib/components/appTable/cpns/columnSelect.vue.js +151 -156
  124. package/lib/components/appTable/cpns/columnSelectItem.vue2.js +105 -111
  125. package/lib/components/appTable/cpns/headerItem.vue.js +102 -0
  126. package/lib/components/appTable/cpns/virtualTable.vue.js +564 -0
  127. package/lib/components/appTable/js/index.js +47 -19
  128. package/lib/components/appTable/js/search.js +1 -2
  129. package/lib/components/appTable/js/useAppTable.js +57 -13
  130. package/lib/components/appTable/style/appTable.scss +16 -0
  131. package/lib/components/appTooltip/appTooltip.vue.js +23 -12
  132. package/lib/components/appTree/appTree.vue.js +308 -0
  133. package/lib/components/appTree/index.js +11 -0
  134. package/lib/components/appTree/js/index.js +533 -0
  135. package/lib/components/appUserAvatar/appUserAvatar.vue.js +9 -8
  136. package/lib/components/appUserAvatar/style/appUserAvatar.scss +0 -1
  137. package/lib/components/appVideoPlayer/appVideoPlayer.vue.js +651 -0
  138. package/lib/components/appVideoPlayer/cpns/mediaLoading.vue.js +39 -0
  139. package/lib/components/appVideoPlayer/index.js +11 -0
  140. package/lib/components/appVideoPlayer/js/index.js +429 -0
  141. package/lib/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
  142. package/lib/components/appVideoPlayer/style/mediaLoading.scss +62 -0
  143. package/lib/components/index.js +42 -28
  144. package/lib/hooks/index.js +9 -0
  145. package/lib/hooks/useApi.js +7 -3
  146. package/lib/hooks/useAudioPlayerConfig.js +15 -0
  147. package/lib/hooks/useGlobalConfig.js +18 -7
  148. package/lib/hooks/useLocale.js +9 -7
  149. package/lib/hooks/useMixins.js +1 -1
  150. package/lib/hooks/usePermissionMap.js +15 -0
  151. package/lib/hooks/useUserAvatarMap.js +5 -2
  152. package/lib/hooks/useVideoPlayerConfig.js +15 -0
  153. package/lib/index.js +70 -28
  154. package/lib/locale/en.js +58 -4
  155. package/lib/locale/zh_CN.js +56 -6
  156. package/lib/make-installer.js +2 -0
  157. package/lib/static/hy-svg-icons.js +459 -8
  158. package/lib/static/protocolcheck.js +249 -0
  159. package/lib/style/element/element.scss +9 -0
  160. package/lib/style/element/index.scss +6 -3
  161. package/lib/style/index.scss +11 -0
  162. package/lib/style/theme.scss +73 -0
  163. package/lib/utils/date.js +25 -0
  164. package/lib/utils/file.js +76 -0
  165. package/lib/utils/form.js +57 -0
  166. package/lib/utils/handler.js +22 -1
  167. package/lib/utils/index.js +19 -0
  168. package/lib/utils/is.js +27 -1
  169. package/lib/utils/loadScript.js +37 -0
  170. package/lib/version.js +1 -1
  171. package/package.json +13 -12
  172. package/es/config/index.mjs +0 -1
  173. package/es/static/hy-svg-icons.mjs +0 -11
  174. package/lib/config/index.js +0 -2
@@ -0,0 +1,62 @@
1
+ /* 动效组件保持不变 */
2
+ .tech-loader {
3
+ position: relative;
4
+ z-index: 2;
5
+ &::before {
6
+ content: '';
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ right: 0;
11
+ bottom: 0;
12
+ border-radius: 50%;
13
+ border: 2px solid rgba(0, 255, 255, 0.1);
14
+ }
15
+ &::after {
16
+ content: '';
17
+ position: absolute;
18
+ top: -2px;
19
+ left: -2px;
20
+ right: -2px;
21
+ bottom: -2px;
22
+ border-radius: 50%;
23
+ border: 2px solid transparent;
24
+ border-top-color: #00ffff;
25
+ border-right-color: #00ffff;
26
+ box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
27
+ animation: spin 1s linear infinite;
28
+ }
29
+ .tech-center-dot {
30
+ position: absolute;
31
+ top: 50%;
32
+ left: 50%;
33
+ transform: translate(-50%, -50%);
34
+ width: 6px;
35
+ height: 6px;
36
+ background-color: #00ffff;
37
+ border-radius: 50%;
38
+ box-shadow: 0 0 10px #00ffff;
39
+ animation: pulse 1.5s ease-in-out infinite;
40
+ }
41
+ }
42
+
43
+ @keyframes spin {
44
+ 0% {
45
+ transform: rotate(0deg);
46
+ }
47
+ 100% {
48
+ transform: rotate(360deg);
49
+ }
50
+ }
51
+
52
+ @keyframes pulse {
53
+ 0%,
54
+ 100% {
55
+ opacity: 0.5;
56
+ scale: 1;
57
+ }
58
+ 50% {
59
+ opacity: 1;
60
+ scale: 1.2;
61
+ }
62
+ }
@@ -12,6 +12,13 @@ export { AppButton } from './appButton/index.mjs';
12
12
  export { AppUserAvatar } from './appUserAvatar/index.mjs';
13
13
  export { AppNoPermissions } from './appNoPermissions/index.mjs';
14
14
  export { AppNoPermissionsMap } from './appNoPermissionsMap/index.mjs';
15
+ export { AppCutter } from './appCutter/index.mjs';
16
+ export { AppDialog } from './appDialog/index.mjs';
17
+ export { AppMenu } from './appMenu/index.mjs';
18
+ export { AppTree } from './appTree/index.mjs';
19
+ export { AppVideoPlayer } from './appVideoPlayer/index.mjs';
20
+ export { AppAudioPlayer } from './appAudioPlayer/index.mjs';
21
+ export { AppInput } from './appInput/index.mjs';
15
22
  export { useAppForm } from './appForm/js/useAppForm.mjs';
16
23
  export { useAppSearch } from './appSearch/js/useAppSearch.mjs';
17
24
  export { useAppTable } from './appTable/js/useAppTable.mjs';
@@ -2,5 +2,8 @@ export { defaultAxios, localApiKey, useApi } from './useApi.mjs';
2
2
  export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale } from './useLocale.mjs';
3
3
  export { configProviderContextKey, provideGlobalConfig, useGlobalConfig } from './useGlobalConfig.mjs';
4
4
  export { useMixins } from './useMixins.mjs';
5
+ export { localPermissionMapKey, usePermissionMap } from './usePermissionMap.mjs';
5
6
  export { localUserAvatarMapKey, useUserAvatarMap } from './useUserAvatarMap.mjs';
6
7
  export { useResizeHandler } from './useResizeHandler.mjs';
8
+ export { localAudioPlayerConfigKey, useAudioPlayerConfig } from './useAudioPlayerConfig.mjs';
9
+ export { localVideoPlayerConfigKey, useVideoPlayerConfig } from './useVideoPlayerConfig.mjs';
@@ -1,16 +1,18 @@
1
1
  import axios from 'axios';
2
2
  import { ref, inject, unref } from 'vue';
3
+ import { useGlobalConfig } from './useGlobalConfig.mjs';
3
4
 
4
5
  const localApiKey = /* @__PURE__ */ Symbol("localApiKey");
5
6
  const defaultAxios = ref(
6
7
  axios.create({
8
+ baseURL: "/api/admin",
7
9
  withCredentials: false,
8
10
  timeout: 6e4
9
11
  })
10
12
  );
11
13
  defaultAxios.value.interceptors.response.use(
12
14
  (response) => {
13
- const data = response == null ? void 0 : response.data;
15
+ const data = response?.data;
14
16
  return Promise.resolve(data);
15
17
  },
16
18
  (error) => {
@@ -18,8 +20,10 @@ defaultAxios.value.interceptors.response.use(
18
20
  }
19
21
  );
20
22
  const useApi = () => {
21
- const api = inject(localApiKey, defaultAxios);
22
- return { api: unref(api) ? api : defaultAxios };
23
+ const api = inject(localApiKey, ref());
24
+ return {
25
+ api: unref(api) ? api : unref(useGlobalConfig())?.api || defaultAxios
26
+ };
23
27
  };
24
28
 
25
29
  export { defaultAxios, localApiKey, useApi };
@@ -0,0 +1,12 @@
1
+ import { inject, ref, unref } from 'vue';
2
+ import { useGlobalConfig } from './useGlobalConfig.mjs';
3
+
4
+ const localAudioPlayerConfigKey = /* @__PURE__ */ Symbol("useAudioPlayerConfig");
5
+ const useAudioPlayerConfig = () => {
6
+ const audioPlayerConfig = inject(localAudioPlayerConfigKey, ref());
7
+ return {
8
+ audioPlayerConfig: unref(audioPlayerConfig) ? audioPlayerConfig : unref(useGlobalConfig()).audioPlayer || ref(/* @__PURE__ */ new Map())
9
+ };
10
+ };
11
+
12
+ export { localAudioPlayerConfigKey, useAudioPlayerConfig };
@@ -3,7 +3,10 @@ import * as index from '../locale/index.mjs';
3
3
  import { localeContextKey } from './useLocale.mjs';
4
4
  import { localApiKey } from './useApi.mjs';
5
5
  import { localUserAvatarMapKey } from './useUserAvatarMap.mjs';
6
- import Chinese from '../locale/zh_CN.mjs';
6
+ import { localPermissionMapKey } from './usePermissionMap.mjs';
7
+ import { localAudioPlayerConfigKey } from './useAudioPlayerConfig.mjs';
8
+ import { localVideoPlayerConfigKey } from './useVideoPlayerConfig.mjs';
9
+ import zh_CN from '../locale/zh_CN.mjs';
7
10
 
8
11
  const globalConfig = ref();
9
12
  const mergeConfig = (a, b) => {
@@ -18,19 +21,15 @@ const configProviderContextKey = /* @__PURE__ */ Symbol("configProviderContextKe
18
21
  function useGlobalConfig(key, defaultValue = void 0) {
19
22
  const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
20
23
  if (key) {
21
- return computed(() => {
22
- var _a, _b;
23
- return (_b = (_a = config.value) == null ? void 0 : _a[key]) != null ? _b : defaultValue;
24
- });
24
+ return computed(() => config.value?.[key] ?? defaultValue);
25
25
  } else {
26
26
  return config;
27
27
  }
28
28
  }
29
29
  const provideGlobalConfig = (config, app, global = false) => {
30
- var _a;
31
30
  const inSetup = !!getCurrentInstance();
32
31
  const oldConfig = inSetup ? useGlobalConfig() : void 0;
33
- const provideFn = (_a = app == null ? void 0 : app.provide) != null ? _a : inSetup ? provide : void 0;
32
+ const provideFn = app?.provide ?? (inSetup ? provide : void 0);
34
33
  if (!provideFn) {
35
34
  console.warn(
36
35
  "provideGlobalConfig",
@@ -40,13 +39,13 @@ const provideGlobalConfig = (config, app, global = false) => {
40
39
  }
41
40
  const context = computed(() => {
42
41
  const cfg = unref(config);
43
- if (!(oldConfig == null ? void 0 : oldConfig.value)) return cfg;
42
+ if (!oldConfig?.value) return cfg;
44
43
  return mergeConfig(oldConfig.value, cfg);
45
44
  });
46
45
  provideFn(configProviderContextKey, context);
47
46
  provideFn(
48
47
  localeContextKey,
49
- computed(() => index[context.value.locale] || Chinese)
48
+ computed(() => index[context.value.locale] || zh_CN)
50
49
  );
51
50
  provideFn(
52
51
  localApiKey,
@@ -56,6 +55,18 @@ const provideGlobalConfig = (config, app, global = false) => {
56
55
  localUserAvatarMapKey,
57
56
  computed(() => context.value.userAvatarMap)
58
57
  );
58
+ provideFn(
59
+ localPermissionMapKey,
60
+ computed(() => context.value.permissionMap)
61
+ );
62
+ provideFn(
63
+ localAudioPlayerConfigKey,
64
+ computed(() => context.value.audioPlayer)
65
+ );
66
+ provideFn(
67
+ localVideoPlayerConfigKey,
68
+ computed(() => context.value.videoPlayer)
69
+ );
59
70
  if (global || !globalConfig.value) {
60
71
  globalConfig.value = context.value;
61
72
  }
@@ -1,14 +1,13 @@
1
1
  import { inject, ref, computed, unref, isRef } from 'vue';
2
2
  import { get } from 'lodash-unified';
3
- import Chinese from '../locale/zh_CN.mjs';
3
+ import { useGlobalConfig } from './useGlobalConfig.mjs';
4
+ import * as index from '../locale/index.mjs';
5
+ import zh_CN from '../locale/zh_CN.mjs';
4
6
 
5
7
  const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
6
8
  const translate = (path, option, locale) => get(locale, path, path).replace(
7
9
  /\{(\w+)\}/g,
8
- (_, key) => {
9
- var _a;
10
- return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
11
- }
10
+ (_, key) => `${option?.[key] ?? `{${key}}`}`
12
11
  );
13
12
  const buildLocaleContext = (locale, conifg) => {
14
13
  const lang = computed(() => unref(locale).name);
@@ -21,13 +20,16 @@ const buildLocaleContext = (locale, conifg) => {
21
20
  };
22
21
  const localeContextKey = /* @__PURE__ */ Symbol("localeContextKey");
23
22
  const getLanguage = (localeOverrides) => {
24
- var _a, _b;
25
23
  const locale = localeOverrides || inject(localeContextKey, ref());
26
- return ((_a = unref(locale)) == null ? void 0 : _a.name) || ((_b = Chinese) == null ? void 0 : _b.name);
24
+ return unref(locale)?.name || Chinese?.name;
27
25
  };
28
26
  const useLocale = (localeOverrides) => {
29
27
  const locale = localeOverrides || inject(localeContextKey, ref());
30
- return buildLocaleContext(computed(() => unref(locale) || Chinese));
28
+ return buildLocaleContext(
29
+ computed(
30
+ () => unref(locale) || index[unref(useGlobalConfig())?.locale] || zh_CN
31
+ )
32
+ );
31
33
  };
32
34
 
33
35
  export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale };
@@ -3,7 +3,7 @@ const useMixins = (hy = {}, options) => {
3
3
  if (Array.isArray(options)) {
4
4
  mixins = options;
5
5
  } else {
6
- mixins = (options == null ? void 0 : options.mixins) || [];
6
+ mixins = options?.mixins || [];
7
7
  options = {};
8
8
  }
9
9
  mixins.forEach((useFn) => {
@@ -0,0 +1,12 @@
1
+ import { inject, ref, unref } from 'vue';
2
+ import { useGlobalConfig } from './useGlobalConfig.mjs';
3
+
4
+ const localPermissionMapKey = /* @__PURE__ */ Symbol("permissionMap");
5
+ const usePermissionMap = () => {
6
+ const permissionMap = inject(localPermissionMapKey, ref());
7
+ return {
8
+ permissionMap: unref(permissionMap) ? permissionMap : unref(useGlobalConfig()).permissionMap || ref(/* @__PURE__ */ new Map())
9
+ };
10
+ };
11
+
12
+ export { localPermissionMapKey, usePermissionMap };
@@ -1,9 +1,12 @@
1
- import { inject, ref } from 'vue';
1
+ import { inject, ref, unref } from 'vue';
2
+ import { useGlobalConfig } from './useGlobalConfig.mjs';
2
3
 
3
4
  const localUserAvatarMapKey = /* @__PURE__ */ Symbol("userAvatarMap");
4
5
  const useUserAvatarMap = () => {
5
- const userAvatarMap = inject(localUserAvatarMapKey, ref(/* @__PURE__ */ new Map()));
6
- return { userAvatarMap };
6
+ const userAvatarMap = inject(localUserAvatarMapKey, ref());
7
+ return {
8
+ userAvatarMap: unref(userAvatarMap) ? userAvatarMap : unref(useGlobalConfig()).userAvatarMap || ref(/* @__PURE__ */ new Map())
9
+ };
7
10
  };
8
11
 
9
12
  export { localUserAvatarMapKey, useUserAvatarMap };
@@ -0,0 +1,12 @@
1
+ import { inject, ref, unref } from 'vue';
2
+ import { useGlobalConfig } from './useGlobalConfig.mjs';
3
+
4
+ const localVideoPlayerConfigKey = /* @__PURE__ */ Symbol("useVideoPlayerConfig");
5
+ const useVideoPlayerConfig = () => {
6
+ const videoPlayerConfig = inject(localVideoPlayerConfigKey, ref());
7
+ return {
8
+ videoPlayerConfig: unref(videoPlayerConfig) ? videoPlayerConfig : unref(useGlobalConfig()).videoPlayer || ref(/* @__PURE__ */ new Map())
9
+ };
10
+ };
11
+
12
+ export { localVideoPlayerConfigKey, useVideoPlayerConfig };
package/es/index.mjs CHANGED
@@ -1,28 +1,41 @@
1
1
  import installer from './make-installer.mjs';
2
+ export { AppAudioPlayer } from './components/appAudioPlayer/index.mjs';
2
3
  export { AppButton } from './components/appButton/index.mjs';
3
4
  export { AppConfigProvider } from './components/appConfigProvider/index.mjs';
4
5
  export { AppConfirmDialog } from './components/appConfirmDialog/index.mjs';
6
+ export { AppCutter } from './components/appCutter/index.mjs';
5
7
  export { AppDatePicker } from './components/appDatePicker/index.mjs';
8
+ export { AppDialog } from './components/appDialog/index.mjs';
6
9
  export { AppForm } from './components/appForm/index.mjs';
7
10
  export { AppIcon } from './components/appIcon/index.mjs';
8
11
  export { AppIconBox } from './components/appIconBox/index.mjs';
12
+ export { AppInput } from './components/appInput/index.mjs';
13
+ export { AppMenu } from './components/appMenu/index.mjs';
9
14
  export { AppNoPermissions } from './components/appNoPermissions/index.mjs';
10
15
  export { AppNoPermissionsMap } from './components/appNoPermissionsMap/index.mjs';
11
16
  export { AppOrgCascader } from './components/appOrgCascader/index.mjs';
12
17
  export { AppSearch } from './components/appSearch/index.mjs';
13
18
  export { AppTable } from './components/appTable/index.mjs';
14
19
  export { AppTooltip } from './components/appTooltip/index.mjs';
20
+ export { AppTree } from './components/appTree/index.mjs';
15
21
  export { AppUserAvatar } from './components/appUserAvatar/index.mjs';
22
+ export { AppVideoPlayer } from './components/appVideoPlayer/index.mjs';
16
23
  export { base64Decrypt, encryptToBase64, generateRandomCode } from './utils/crypto.mjs';
24
+ export { blobToDataURL, fileFormUpload, fileJsonUplaod, fileUpload, presignedUrl, sizeToTextHandler } from './utils/file.mjs';
17
25
  export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale } from './hooks/useLocale.mjs';
18
26
  export { bus } from './utils/bus.mjs';
19
- export { cloneDeep, createUniqueId, funRunHandler, mergeDeep, withInstall } from './utils/handler.mjs';
27
+ export { clearSpace, genValueByProp, getValueByProp, setValueByProp } from './utils/form.mjs';
28
+ export { cloneDeep, copyText, createUniqueId, funRunHandler, mergeDeep, withInstall } from './utils/handler.mjs';
20
29
  export { configProviderContextKey, provideGlobalConfig, useGlobalConfig } from './hooks/useGlobalConfig.mjs';
21
30
  export { defaultAxios, localApiKey, useApi } from './hooks/useApi.mjs';
22
- export { getDefaultValueFormatByType } from './utils/date.mjs';
23
- export { isArray, isBoolean, isEmpty, isFunction, isNull, isNumber, isObject, isOverflowing, isString, isSymbol, isUndefined, isVueProxy } from './utils/is.mjs';
31
+ export { formatDuration, getDefaultValueFormatByType } from './utils/date.mjs';
32
+ export { isArray, isBoolean, isEmpty, isFile, isFunction, isNull, isNumber, isObject, isOverflowing, isString, isSupportH265, isSymbol, isUndefined, isVueProxy } from './utils/is.mjs';
33
+ export { localAudioPlayerConfigKey, useAudioPlayerConfig } from './hooks/useAudioPlayerConfig.mjs';
34
+ export { localPermissionMapKey, usePermissionMap } from './hooks/usePermissionMap.mjs';
24
35
  export { localUserAvatarMapKey, useUserAvatarMap } from './hooks/useUserAvatarMap.mjs';
36
+ export { localVideoPlayerConfigKey, useVideoPlayerConfig } from './hooks/useVideoPlayerConfig.mjs';
25
37
  export { parseRem, pxTorem, remToPx, vwToPx } from './utils/adaptive.mjs';
38
+ export { protocolcheckLoad, svgIconLoad } from './utils/loadScript.mjs';
26
39
  export { useAppForm } from './components/appForm/js/useAppForm.mjs';
27
40
  export { useAppSearch } from './components/appSearch/js/useAppSearch.mjs';
28
41
  export { useAppTable } from './components/appTable/js/useAppTable.mjs';
package/es/locale/en.mjs CHANGED
@@ -29,10 +29,15 @@ var en = {
29
29
  years: "Years",
30
30
  noData: "No Data",
31
31
  confirm: "Confirm",
32
- loading: "Loading"
32
+ loading: "Loading",
33
+ copySuccessfully: "Copy Successfully"
33
34
  },
34
35
  form: {
35
- department: "Department"
36
+ department: "Department",
37
+ additionalInformationTip: "Editor's Supplementary Information (Optional)",
38
+ additionalInformationHoverTip: "Click To Expand And View More Detailed Information. (This Is An Optional Field)",
39
+ dynamicFormItem: "Dynamic Form Item",
40
+ addFormItem: "Add Form Item"
36
41
  },
37
42
  table: {
38
43
  hideFilter: "Hide filter",
@@ -44,14 +49,17 @@ var en = {
44
49
  notShown: "Not Shown",
45
50
  theColumnsDisplayedInTheTableCannotBeLeftBlank: "The Columns Displayed In The Table Cannot Be Left Blank",
46
51
  aTotalOfPiecesOfData: "A total of {0} pieces of data",
52
+ more: "More",
47
53
  moreOperations: "More Operations",
48
54
  nonsupport: "Nonsupport",
49
55
  editColumn: "Edit Column",
50
56
  Index: "\u5E8F\u53F7",
51
57
  searchFor: "Search For {0}",
52
- example: "Example"
58
+ searchByInput: 'Search by input <span class="text-theme font-bold">{0}</span>',
59
+ example: "Example",
60
+ operator: "Operator"
53
61
  },
54
- confirmDialog: {
62
+ dialog: {
55
63
  content: "Secondary Confirmation Operation",
56
64
  close: "Close",
57
65
  cancel: "Cancel",
@@ -73,6 +81,52 @@ var en = {
73
81
  pleaseContactTheAdministrator: "Please Contact The Administrator",
74
82
  youDoNotHaveAMapConfigurationForThisModule: "You Do Not Have A Map Configuration For This Module",
75
83
  pleaseContactTheAdministratorToGoToTheSettingsCenterForConfiguration: "Please Contact The Administrator To Go To The Settings Center For Configuration"
84
+ },
85
+ cutter: {
86
+ uploadPictures: "Upload Picture",
87
+ uploadPictureLimit: "The Image Upload Failed. The File Size Cannot Exceed {0}",
88
+ imageSegmentation: "Image Segmentation"
89
+ },
90
+ videoPlayer: {
91
+ clickPlay: "Click To Play",
92
+ videoResourcesAreLoading: "Video Resources Are Loading",
93
+ theVideoCannotBePlayed: "The Video Cannot Be Played",
94
+ fileLoadingFailed: "File Loading Failed",
95
+ pleaseCheckWhetherTheCollectionStationIsOnlineAndWhetherTheFileExists: "Please Check Whether The Collection Station Is Online And Whether The File Exists",
96
+ toDownloadVlc: "Go To Download VLC Player",
97
+ yourBrowserDoesNotSupportHTMLVideoPlayback: "Your Browser Does Not Support HTML5 Video Playback.",
98
+ multiples: "Multiples",
99
+ stopAfterPlayback: "Stop After Playback",
100
+ continuousPlayback: "Continuous Playback",
101
+ loopPlayback: "Loop Playback",
102
+ adjustPlaybackVolume: "Adjust Playback Volume",
103
+ currentIsTheFirstItem: "Current Is The First Item",
104
+ currentIsTheLastItem: "Current Is The Last Item",
105
+ fileCompressionPackage_: "File Compression Package_",
106
+ fileDownload: "File Download",
107
+ downloadFile: "Download File",
108
+ startDownloading: "Start Downloading",
109
+ downloadFailed: "Download Failed",
110
+ vlcPlayerTip: "The Video Format Needs To Be Played By VLC Media Player",
111
+ notInstallVlcTips: "You Haven't Installed VLC Media Player. Please Click To Download And Install",
112
+ operationSuccessful: "Operation Successful",
113
+ theCurrentBrowserBlocksTheOpeningOfNewWindows: "The Current Browser Blocks The Opening Of New Windows",
114
+ pleaseGoToTheBrowserSettingsAndClickOnTheDownloadOrCopyLinkToOpenInTheBrowser: "Please Go To The Browser Settings And Click On The Download Or Copy Link To Open In The Browser",
115
+ copyLink: "Copy Link",
116
+ fullScreenSwitch: "Full Screen Switch",
117
+ pleaseConfigureTheAddressForDownloadingVLC: "Please Configure The Address For Downloading VLC"
118
+ },
119
+ audioPlayer: {
120
+ clickPlay: "Click To Play",
121
+ audioResourcesAreLoading: "Audio Resources Are Loading",
122
+ multiples: "Multiples",
123
+ stopAfterPlayback: "Stop After Playback",
124
+ continuousPlayback: "Continuous Playback",
125
+ loopPlayback: "Loop Playback",
126
+ adjustPlaybackVolume: "Adjust Playback Volume",
127
+ currentIsTheFirstItem: "Current Is The First Item",
128
+ currentIsTheLastItem: "Current Is The Last Item",
129
+ downloadFile: "Download File"
76
130
  }
77
131
  };
78
132
 
@@ -1,4 +1,4 @@
1
- var Chinese = {
1
+ var zh_CN = {
2
2
  name: "zh_CN",
3
3
  hy: {
4
4
  language: "\u8BED\u8A00",
@@ -29,10 +29,15 @@ var Chinese = {
29
29
  years: "\u5E74",
30
30
  noData: "\u6682\u65E0\u6570\u636E",
31
31
  confirm: "\u786E\u8BA4",
32
- loading: "\u52A0\u8F7D\u4E2D"
32
+ loading: "\u52A0\u8F7D\u4E2D",
33
+ copySuccessfully: "\u590D\u5236\u6210\u529F"
33
34
  },
34
35
  form: {
35
- department: "\u6240\u5C5E\u90E8\u95E8"
36
+ department: "\u6240\u5C5E\u90E8\u95E8",
37
+ additionalInformationTip: "\u7F16\u8F91\u8865\u5145\u4FE1\u606F (\u9009\u586B)",
38
+ additionalInformationHoverTip: "\u70B9\u51FB\u53EF\u5C55\u5F00\u8865\u5145\u66F4\u591A\u4FE1\u606F\uFF0C\u975E\u5FC5\u586B\u9879",
39
+ dynamicFormItem: "\u52A8\u6001\u8868\u5355\u9879",
40
+ addFormItem: "\u6DFB\u52A0\u8868\u5355\u9879"
36
41
  },
37
42
  table: {
38
43
  hideFilter: "\u9690\u85CF\u7B5B\u9009\u5668",
@@ -44,15 +49,18 @@ var Chinese = {
44
49
  notShown: "\u672A\u663E\u793A",
45
50
  theColumnsDisplayedInTheTableCannotBeLeftBlank: "\u8868\u683C\u663E\u793A\u7684\u5217\u4E0D\u80FD\u4E3A\u7A7A",
46
51
  aTotalOfPiecesOfData: "\u5171 {0} \u6761\u6570\u636E",
52
+ more: "\u66F4\u591A",
47
53
  moreOperations: "\u66F4\u591A\u64CD\u4F5C",
48
54
  nonsupport: "\u4E0D\u652F\u6301",
49
55
  editColumn: "\u7F16\u8F91\u5217",
50
56
  index: "\u5E8F\u53F7",
51
57
  searchFor: "\u641C\u7D22{0}",
58
+ searchByInput: '\u53EF\u8F93\u5165 <span class="text-theme font-bold">{0}</span> \u8FDB\u884C\u641C\u7D22',
52
59
  maxColumnLimitTip: "\u5DF2\u8FBE\u5230\u5B57\u6BB5\u6570\u91CF\u4E0A\u9650(\u6700\u591A15\u4E2A)\uFF0C\u8BF7\u53D6\u6D88\u90E8\u5206\u5B57\u6BB5\u540E\u518D\u786E\u8BA4",
53
- example: "\u793A\u4F8B"
60
+ example: "\u793A\u4F8B",
61
+ operator: "\u64CD\u4F5C"
54
62
  },
55
- confirmDialog: {
63
+ dialog: {
56
64
  content: "\u4E8C\u6B21\u786E\u8BA4\u64CD\u4F5C",
57
65
  close: "\u5173\u95ED",
58
66
  cancel: "\u53D6\u6D88",
@@ -73,7 +81,49 @@ var Chinese = {
73
81
  pleaseContactTheAdministrator: "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458",
74
82
  youDoNotHaveAMapConfigurationForThisModule: "\u60A8\u6CA1\u6709\u8BE5\u6A21\u5757\u7684\u5730\u56FE\u914D\u7F6E",
75
83
  pleaseContactTheAdministratorToGoToTheSettingsCenterForConfiguration: "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u524D\u5F80\u8BBE\u7F6E\u4E2D\u5FC3\u8FDB\u884C\u914D\u7F6E"
84
+ },
85
+ cutter: {
86
+ uploadPicture: "\u4E0A\u4F20\u56FE\u7247",
87
+ uploadPictureLimit: "\u56FE\u7247\u4E0A\u4F20\u5931\u8D25\uFF0C\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E{0}",
88
+ imageSegmentation: "\u56FE\u50CF\u5207\u5272"
89
+ },
90
+ videoPlayer: {
91
+ clickPlay: "\u70B9\u51FB\u64AD\u653E",
92
+ videoResourcesAreLoading: "\u89C6\u9891\u8D44\u6E90\u52A0\u8F7D\u4E2D",
93
+ theVideoCannotBePlayed: "\u89C6\u9891\u65E0\u6CD5\u64AD\u653E",
94
+ fileLoadingFailed: "\u6587\u4EF6\u52A0\u8F7D\u5931\u8D25",
95
+ pleaseCheckWhetherTheCollectionStationIsOnlineAndWhetherTheFileExists: "\u8BF7\u68C0\u67E5\u91C7\u96C6\u7AD9\u662F\u5426\u5728\u7EBF\u4E0E\u6587\u4EF6\u662F\u5426\u5B58\u5728",
96
+ toDownloadVlc: "\u524D\u5F80\u4E0B\u8F7DVLC\u64AD\u653E\u5668",
97
+ yourBrowserDoesNotSupportHTMLVideoPlayback: "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301HTML5\u89C6\u9891\u64AD\u653E\u3002",
98
+ multiples: "\u500D \u6570",
99
+ stopAfterPlayback: "\u64AD\u5B8C\u5373\u505C",
100
+ continuousPlayback: "\u8FDE\u7EED\u64AD\u653E",
101
+ loopPlayback: "\u5FAA\u73AF\u64AD\u653E",
102
+ adjustPlaybackVolume: "\u8C03\u8282\u64AD\u653E\u97F3\u91CF",
103
+ currentIsTheFirstItem: "\u5F53\u524D\u662F\u7B2C\u4E00\u6761",
104
+ currentIsTheLastItem: "\u5F53\u524D\u662F\u6700\u540E\u4E00\u6761",
105
+ downloadFile: "\u4E0B\u8F7D\u6587\u4EF6",
106
+ vlcPlayerTip: "\u89C6\u9891\u683C\u5F0F\u9700\u8981VLC\u5A92\u4F53\u64AD\u653E\u5668\u64AD\u653E",
107
+ notInstallVlcTips: "\u60A8\u6CA1\u6709\u5B89\u88C5VLC\u5A92\u4F53\u64AD\u653E\u5668\uFF0C\u8BF7\u70B9\u51FB\u4E0B\u8F7D\u5B89\u88C5",
108
+ operationSuccessful: "\u64CD\u4F5C\u6210\u529F",
109
+ theCurrentBrowserBlocksTheOpeningOfNewWindows: "\u5F53\u524D\u6D4F\u89C8\u5668\u62E6\u622A\u65B0\u7A97\u53E3\u6253\u5F00",
110
+ pleaseGoToTheBrowserSettingsAndClickOnTheDownloadOrCopyLinkToOpenInTheBrowser: "\u8BF7\u524D\u5F80\u6D4F\u89C8\u5668\u8BBE\u7F6E\u540E\u5728\u70B9\u51FB\u4E0B\u8F7D \u6216 \u590D\u5236\u94FE\u63A5\u5230\u6D4F\u89C8\u5668\u6253\u5F00",
111
+ copyLink: "\u590D\u5236\u94FE\u63A5",
112
+ fullScreenSwitch: "\u5168\u5C4F\u5207\u6362",
113
+ pleaseConfigureTheAddressForDownloadingVLC: "\u8BF7\u914D\u7F6E\u524D\u5F80\u4E0B\u8F7DVLC\u7684\u5730\u5740"
114
+ },
115
+ audioPlayer: {
116
+ clickPlay: "\u70B9\u51FB\u64AD\u653E",
117
+ audioResourcesAreLoading: "\u97F3\u9891\u8D44\u6E90\u52A0\u8F7D\u4E2D",
118
+ multiples: "\u500D \u6570",
119
+ stopAfterPlayback: "\u64AD\u5B8C\u5373\u505C",
120
+ continuousPlayback: "\u8FDE\u7EED\u64AD\u653E",
121
+ loopPlayback: "\u5FAA\u73AF\u64AD\u653E",
122
+ adjustPlaybackVolume: "\u8C03\u8282\u64AD\u653E\u97F3\u91CF",
123
+ currentIsTheFirstItem: "\u5F53\u524D\u662F\u7B2C\u4E00\u6761",
124
+ currentIsTheLastItem: "\u5F53\u524D\u662F\u6700\u540E\u4E00\u6761",
125
+ downloadFile: "\u4E0B\u8F7D\u6587\u4EF6"
76
126
  }
77
127
  };
78
128
 
79
- export { Chinese as default };
129
+ export { zh_CN as default };
@@ -1,6 +1,7 @@
1
1
  import { INSTALLED_KEY } from './constants/index.mjs';
2
2
  import * as index from './components/index.mjs';
3
3
  import { version } from './version.mjs';
4
+ import { AppInput } from './components/appInput/index.mjs';
4
5
  import { provideGlobalConfig } from './hooks/useGlobalConfig.mjs';
5
6
 
6
7
  const makeInstaller = () => {
@@ -11,6 +12,7 @@ const makeInstaller = () => {
11
12
  if (!component.install) return;
12
13
  app.use(component);
13
14
  });
15
+ app.component("ElInput", AppInput);
14
16
  if (options) provideGlobalConfig(options, app, true);
15
17
  };
16
18
  return {