hy-dispatch-ui-v3 0.2.53 → 0.2.55

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 (116) hide show
  1. package/dist/tailwind.css +53 -0
  2. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +39 -10
  3. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +12 -22
  4. package/es/components/hyDialog/dialog.vue.mjs +9 -7
  5. package/es/components/hyForm/cpns/arrayItem.vue.mjs +5 -5
  6. package/es/components/hyForm/cpns/extraItem.vue.mjs +6 -1
  7. package/es/components/hyForm/cpns/formItem.vue.mjs +29 -14
  8. package/es/components/hyForm/js/index.mjs +29 -25
  9. package/es/components/hyForm/js/useAppForm.mjs +15 -30
  10. package/es/components/hyIconBox/iconBox.vue.mjs +1 -1
  11. package/es/components/hyIconBox/style/iconBox.scss +1 -1
  12. package/es/components/hyMap/index.mjs +6 -0
  13. package/es/components/hyMap/js/index.mjs +59 -0
  14. package/es/components/hyMap/map.vue.mjs +59 -0
  15. package/es/components/hyOrgCascader/js/index.mjs +53 -0
  16. package/es/components/hyOrgCascader/orgCascader.vue.mjs +22 -25
  17. package/es/components/hySearch/search.vue.mjs +6 -8
  18. package/es/components/hyTable/cpns/columnSelect.vue.mjs +10 -18
  19. package/es/components/hyTable/table.vue.mjs +8 -11
  20. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +6 -3
  21. package/es/components/hyTableForm/batchTableForm.vue.mjs +182 -135
  22. package/es/components/hyTableForm/js/index.mjs +2 -2
  23. package/es/components/hyTableForm/tableForm.vue.mjs +29 -20
  24. package/es/components/hyTooltip/tooltip.vue.mjs +1 -1
  25. package/es/components/hyTree/js/index.mjs +5 -4
  26. package/es/components/hyTree/tree.vue.mjs +5 -0
  27. package/es/components/index.mjs +1 -0
  28. package/es/hooks/index.mjs +1 -0
  29. package/es/hooks/useApi.mjs +11 -5
  30. package/es/hooks/useAudioPlayerConfig.mjs +13 -5
  31. package/es/hooks/useEnsureHyIcon.mjs +11 -5
  32. package/es/hooks/useLocale.mjs +6 -5
  33. package/es/hooks/usePermissionMap.mjs +13 -5
  34. package/es/hooks/useSubscribe.mjs +28 -0
  35. package/es/hooks/useTooltipConfig.mjs +11 -5
  36. package/es/hooks/useUserAvatarMap.mjs +13 -5
  37. package/es/hooks/useVideoPlayerConfig.mjs +13 -5
  38. package/es/index.mjs +3 -2
  39. package/es/static/map/CFCASIPInput.min.js +258 -0
  40. package/es/static/map/MarkerCluster.css +75 -0
  41. package/es/static/map/bigemap.css +838 -0
  42. package/es/static/map/bigemap.js +5 -0
  43. package/es/static/map/bm.geometryutil.js +754 -0
  44. package/es/static/map/bmDraw.css +329 -0
  45. package/es/static/map/bmDraw.js +181 -0
  46. package/es/static/map/car.png +0 -0
  47. package/es/static/map/markercluster.js +2679 -0
  48. package/es/static/map/moveMarker.js +74 -0
  49. package/es/utils/form.mjs +38 -2
  50. package/es/utils/index.mjs +1 -2
  51. package/es/utils/map/hook/bigMap.mjs +1136 -0
  52. package/es/utils/map/hook/gaode.mjs +683 -0
  53. package/es/utils/map/hook/leafletjs.mjs +1336 -0
  54. package/es/utils/map/index.mjs +291 -0
  55. package/es/utils/map/js/mapProxy.mjs +38 -0
  56. package/es/utils/map/js/webgis.mjs +153 -0
  57. package/es/version.mjs +1 -1
  58. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +40 -11
  59. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +13 -23
  60. package/lib/components/hyDialog/dialog.vue.js +9 -7
  61. package/lib/components/hyForm/cpns/arrayItem.vue.js +4 -4
  62. package/lib/components/hyForm/cpns/extraItem.vue.js +6 -1
  63. package/lib/components/hyForm/cpns/formItem.vue.js +26 -11
  64. package/lib/components/hyForm/js/index.js +29 -23
  65. package/lib/components/hyForm/js/useAppForm.js +14 -29
  66. package/lib/components/hyIconBox/iconBox.vue.js +1 -1
  67. package/lib/components/hyIconBox/style/iconBox.scss +1 -1
  68. package/lib/components/hyMap/index.js +11 -0
  69. package/lib/components/hyMap/js/index.js +61 -0
  70. package/lib/components/hyMap/map.vue.js +63 -0
  71. package/lib/components/hyOrgCascader/js/index.js +56 -0
  72. package/lib/components/hyOrgCascader/orgCascader.vue.js +21 -24
  73. package/lib/components/hySearch/search.vue.js +4 -6
  74. package/lib/components/hyTable/cpns/columnSelect.vue.js +12 -20
  75. package/lib/components/hyTable/table.vue.js +17 -20
  76. package/lib/components/hyTableActionButton/tableActionButton.vue.js +5 -2
  77. package/lib/components/hyTableForm/batchTableForm.vue.js +181 -134
  78. package/lib/components/hyTableForm/js/index.js +1 -1
  79. package/lib/components/hyTableForm/tableForm.vue.js +29 -20
  80. package/lib/components/hyTooltip/tooltip.vue.js +1 -1
  81. package/lib/components/hyTree/js/index.js +5 -4
  82. package/lib/components/hyTree/tree.vue.js +5 -0
  83. package/lib/components/index.js +22 -20
  84. package/lib/hooks/index.js +3 -0
  85. package/lib/hooks/useApi.js +10 -4
  86. package/lib/hooks/useAudioPlayerConfig.js +12 -4
  87. package/lib/hooks/useEnsureHyIcon.js +10 -4
  88. package/lib/hooks/useLocale.js +5 -4
  89. package/lib/hooks/usePermissionMap.js +12 -4
  90. package/lib/hooks/useSubscribe.js +31 -0
  91. package/lib/hooks/useTooltipConfig.js +10 -4
  92. package/lib/hooks/useUserAvatarMap.js +12 -4
  93. package/lib/hooks/useVideoPlayerConfig.js +12 -4
  94. package/lib/index.js +27 -22
  95. package/lib/static/map/CFCASIPInput.min.js +258 -0
  96. package/lib/static/map/MarkerCluster.css +75 -0
  97. package/lib/static/map/bigemap.css +838 -0
  98. package/lib/static/map/bigemap.js +5 -0
  99. package/lib/static/map/bm.geometryutil.js +754 -0
  100. package/lib/static/map/bmDraw.css +329 -0
  101. package/lib/static/map/bmDraw.js +181 -0
  102. package/lib/static/map/car.png +0 -0
  103. package/lib/static/map/markercluster.js +2679 -0
  104. package/lib/static/map/moveMarker.js +74 -0
  105. package/lib/utils/form.js +38 -0
  106. package/lib/utils/index.js +2 -2
  107. package/lib/utils/map/hook/bigMap.js +1140 -0
  108. package/lib/utils/map/hook/gaode.js +687 -0
  109. package/lib/utils/map/hook/leafletjs.js +1360 -0
  110. package/lib/utils/map/index.js +298 -0
  111. package/lib/utils/map/js/mapProxy.js +44 -0
  112. package/lib/utils/map/js/webgis.js +162 -0
  113. package/lib/version.js +1 -1
  114. package/package.json +16 -1
  115. package/es/utils/bus.mjs +0 -5
  116. package/lib/utils/bus.js +0 -7
@@ -1,12 +1,18 @@
1
- import { inject, ref, unref } from 'vue';
1
+ import { getCurrentInstance, inject, ref, unref } from 'vue';
2
2
  import { useGlobalConfig } from './useGlobalConfig.mjs';
3
3
 
4
4
  const localEnsureHyIconMapKey = /* @__PURE__ */ Symbol("ensureHyIcon");
5
5
  const useEnsureHyIcon = () => {
6
- const ensureHyIcon = inject(localEnsureHyIconMapKey, ref());
7
- return {
8
- ensureHyIcon: unref(ensureHyIcon) ? unref(ensureHyIcon) : unref(useGlobalConfig()).ensureHyIcon
9
- };
6
+ if (getCurrentInstance()) {
7
+ const ensureHyIcon = inject(localEnsureHyIconMapKey, ref());
8
+ return {
9
+ ensureHyIcon: unref(ensureHyIcon) ? unref(ensureHyIcon) : unref(useGlobalConfig()).ensureHyIcon
10
+ };
11
+ } else {
12
+ return {
13
+ ensureHyIcon: unref(useGlobalConfig()).ensureHyIcon
14
+ };
15
+ }
10
16
  };
11
17
 
12
18
  export { localEnsureHyIconMapKey, useEnsureHyIcon };
@@ -1,13 +1,14 @@
1
- import { inject, ref, computed, unref, isRef } from 'vue';
1
+ import { getCurrentInstance, inject, ref, computed, unref, isRef } from 'vue';
2
2
  import { get } from 'lodash-unified';
3
- import { useGlobalConfig } from './useGlobalConfig.mjs';
4
3
  import * as index from '../locale/index.mjs';
4
+ import { useGlobalConfig } from './useGlobalConfig.mjs';
5
+ import { isEmpty } from '../utils/is.mjs';
5
6
  import zh_CN from '../locale/zh_CN.mjs';
6
7
 
7
8
  const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
8
9
  const translate = (path, option, locale) => get(locale, path, path).replace(
9
10
  /\{(\w+)\}/g,
10
- (_, key) => `${option?.[key] ?? `{${key}}`}`
11
+ (_, key) => `${!isEmpty(option?.[key]) ? option[key] : ""}`
11
12
  );
12
13
  const buildLocaleContext = (locale, conifg) => {
13
14
  const lang = computed(() => unref(locale).name);
@@ -20,11 +21,11 @@ const buildLocaleContext = (locale, conifg) => {
20
21
  };
21
22
  const localeContextKey = /* @__PURE__ */ Symbol("localeContextKey");
22
23
  const getLanguage = (localeOverrides) => {
23
- const locale = localeOverrides || inject(localeContextKey, ref());
24
+ const locale = localeOverrides || (getCurrentInstance() ? inject(localeContextKey, ref()) : void 0);
24
25
  return unref(locale)?.name || Chinese?.name;
25
26
  };
26
27
  const useLocale = (localeOverrides) => {
27
- const locale = localeOverrides || inject(localeContextKey, ref());
28
+ const locale = localeOverrides || (getCurrentInstance() ? inject(localeContextKey, ref()) : void 0);
28
29
  return buildLocaleContext(
29
30
  computed(
30
31
  () => unref(locale) || index[unref(useGlobalConfig())?.locale] || zh_CN
@@ -1,12 +1,20 @@
1
- import { inject, ref, unref, computed } from 'vue';
1
+ import { getCurrentInstance, inject, ref, unref, computed } from 'vue';
2
2
  import { useGlobalConfig } from './useGlobalConfig.mjs';
3
3
 
4
4
  const localPermissionMapKey = /* @__PURE__ */ Symbol("permissionMap");
5
5
  const usePermissionMap = () => {
6
- const permissionMap = inject(localPermissionMapKey, ref());
7
- return {
8
- permissionMap: unref(permissionMap) ? permissionMap : computed(() => unref(useGlobalConfig()).permissionMap || /* @__PURE__ */ new Map())
9
- };
6
+ if (getCurrentInstance()) {
7
+ const permissionMap = inject(localPermissionMapKey, ref());
8
+ return {
9
+ permissionMap: unref(permissionMap) ? permissionMap : computed(() => unref(useGlobalConfig()).permissionMap || /* @__PURE__ */ new Map())
10
+ };
11
+ } else {
12
+ return {
13
+ permissionMap: computed(
14
+ () => unref(useGlobalConfig()).permissionMap || /* @__PURE__ */ new Map()
15
+ )
16
+ };
17
+ }
10
18
  };
11
19
 
12
20
  export { localPermissionMapKey, usePermissionMap };
@@ -0,0 +1,28 @@
1
+ import mitt from 'mitt';
2
+
3
+ const bus = mitt();
4
+ const UPDATE_ORG_CASCADER = "UPDATE_ORG_CASCADER";
5
+ function useSubscribe() {
6
+ const subOrgCascader = (callback) => {
7
+ bus.on(UPDATE_ORG_CASCADER, callback);
8
+ };
9
+ const unsubOrgCascader = (callback) => {
10
+ bus.on(UPDATE_ORG_CASCADER, callback);
11
+ };
12
+ return {
13
+ // 部门级联组件
14
+ subOrgCascader,
15
+ unsubOrgCascader
16
+ };
17
+ }
18
+ function usePublish() {
19
+ const pubOrgCascader = () => {
20
+ bus.emit(UPDATE_ORG_CASCADER);
21
+ };
22
+ return {
23
+ // 部门级联组件
24
+ pubOrgCascader
25
+ };
26
+ }
27
+
28
+ export { usePublish, useSubscribe };
@@ -1,12 +1,18 @@
1
- import { inject, ref, unref, computed } from 'vue';
1
+ import { getCurrentInstance, inject, ref, unref, computed } from 'vue';
2
2
  import { useGlobalConfig } from './useGlobalConfig.mjs';
3
3
 
4
4
  const localTooltipConfigKey = /* @__PURE__ */ Symbol("useTooltipConfig");
5
5
  const useTooltipConfig = () => {
6
- const tooltipConfig = inject(localTooltipConfigKey, ref());
7
- return {
8
- tooltipConfig: unref(tooltipConfig) ? tooltipConfig : computed(() => unref(useGlobalConfig()).tooltip || {})
9
- };
6
+ if (getCurrentInstance()) {
7
+ const tooltipConfig = inject(localTooltipConfigKey, ref());
8
+ return {
9
+ tooltipConfig: unref(tooltipConfig) ? tooltipConfig : computed(() => unref(useGlobalConfig()).tooltip || {})
10
+ };
11
+ } else {
12
+ return {
13
+ tooltipConfig: computed(() => unref(useGlobalConfig()).tooltip || {})
14
+ };
15
+ }
10
16
  };
11
17
 
12
18
  export { localTooltipConfigKey, useTooltipConfig };
@@ -1,12 +1,20 @@
1
- import { inject, ref, unref, computed } from 'vue';
1
+ import { getCurrentInstance, inject, ref, unref, computed } from 'vue';
2
2
  import { useGlobalConfig } from './useGlobalConfig.mjs';
3
3
 
4
4
  const localUserAvatarMapKey = /* @__PURE__ */ Symbol("userAvatarMap");
5
5
  const useUserAvatarMap = () => {
6
- const userAvatarMap = inject(localUserAvatarMapKey, ref());
7
- return {
8
- userAvatarMap: unref(userAvatarMap) ? userAvatarMap : computed(() => unref(useGlobalConfig()).userAvatarMap || /* @__PURE__ */ new Map())
9
- };
6
+ if (getCurrentInstance()) {
7
+ const userAvatarMap = inject(localUserAvatarMapKey, ref());
8
+ return {
9
+ userAvatarMap: unref(userAvatarMap) ? userAvatarMap : computed(() => unref(useGlobalConfig()).userAvatarMap || /* @__PURE__ */ new Map())
10
+ };
11
+ } else {
12
+ return {
13
+ userAvatarMap: computed(
14
+ () => unref(useGlobalConfig()).userAvatarMap || /* @__PURE__ */ new Map()
15
+ )
16
+ };
17
+ }
10
18
  };
11
19
 
12
20
  export { localUserAvatarMapKey, useUserAvatarMap };
@@ -1,12 +1,20 @@
1
- import { inject, ref, unref, computed } from 'vue';
1
+ import { getCurrentInstance, inject, ref, unref, computed } from 'vue';
2
2
  import { useGlobalConfig } from './useGlobalConfig.mjs';
3
3
 
4
4
  const localVideoPlayerConfigKey = /* @__PURE__ */ Symbol("useVideoPlayerConfig");
5
5
  const useVideoPlayerConfig = () => {
6
- const videoPlayerConfig = inject(localVideoPlayerConfigKey, ref());
7
- return {
8
- videoPlayerConfig: unref(videoPlayerConfig) ? videoPlayerConfig : computed(() => unref(useGlobalConfig()).videoPlayer || {})
9
- };
6
+ if (getCurrentInstance()) {
7
+ const videoPlayerConfig = inject(localVideoPlayerConfigKey, ref());
8
+ return {
9
+ videoPlayerConfig: unref(videoPlayerConfig) ? videoPlayerConfig : computed(() => unref(useGlobalConfig()).videoPlayer || {})
10
+ };
11
+ } else {
12
+ return {
13
+ videoPlayerConfig: computed(
14
+ () => unref(useGlobalConfig()).videoPlayer || {}
15
+ )
16
+ };
17
+ }
10
18
  };
11
19
 
12
20
  export { localVideoPlayerConfigKey, useVideoPlayerConfig };
package/es/index.mjs CHANGED
@@ -14,6 +14,7 @@ export { HyDialog } from './components/hyDialog/index.mjs';
14
14
  export { HyForm } from './components/hyForm/index.mjs';
15
15
  export { HyIcon } from './components/hyIcon/index.mjs';
16
16
  export { HyIconBox } from './components/hyIconBox/index.mjs';
17
+ export { HyMap } from './components/hyMap/index.mjs';
17
18
  export { HyMenu } from './components/hyMenu/index.mjs';
18
19
  export { HyNoPermissions } from './components/hyNoPermissions/index.mjs';
19
20
  export { HyNoPermissionsMap } from './components/hyNoPermissionsMap/index.mjs';
@@ -28,9 +29,8 @@ export { PERMISSION } from './utils/permission.mjs';
28
29
  export { base64Decrypt, encryptToBase64, generateRandomCode } from './utils/crypto.mjs';
29
30
  export { blobToDataURL, fileFormUpload, fileJsonUplaod, fileUpload, presignedUrl, sizeToTextHandler } from './utils/file.mjs';
30
31
  export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale } from './hooks/useLocale.mjs';
31
- export { bus } from './utils/bus.mjs';
32
32
  export { clearResizeObserver, useResizeObserver } from './hooks/useResizeObserver.mjs';
33
- export { clearSpace, genValueByProp, getValueByProp, setValueByProp } from './utils/form.mjs';
33
+ export { clearSpace, columnRuleHandler, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp } from './utils/form.mjs';
34
34
  export { cloneDeep, copyText, createUniqueId, funRunHandler, mergeDeep, withInstall } from './utils/handler.mjs';
35
35
  export { configProviderContextKey, provideGlobalConfig, useGlobalConfig } from './hooks/useGlobalConfig.mjs';
36
36
  export { defaultAxios, localApiKey, useApi } from './hooks/useApi.mjs';
@@ -48,6 +48,7 @@ export { resetAppSearchValue, useAppSearch } from './components/hySearch/js/useA
48
48
  export { useAppTable } from './components/hyTable/js/useAppTable.mjs';
49
49
  export { useAppTableForm } from './components/hyTableForm/js/useAppTableForm.mjs';
50
50
  export { useMixins } from './hooks/useMixins.mjs';
51
+ export { usePublish, useSubscribe } from './hooks/useSubscribe.mjs';
51
52
  export { useResizeHandler } from './hooks/useResizeHandler.mjs';
52
53
 
53
54
  import "./style/index.scss";