mrxy-yk 1.1.9 → 1.1.11

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.
@@ -1,6 +1,7 @@
1
1
  import { defineComponent, shallowRef, onMounted, createElementBlock, openBlock, createBlock, createCommentVNode, createElementVNode, unref, normalizeClass, normalizeStyle, renderSlot } from "vue";
2
- import * as echarts from "echarts";
3
2
  import { EChartsUtil } from "../../utils/echarts/utils/index.js";
3
+ import { echarts } from "../../utils/echarts/index.js";
4
+ import { initDarkTheme } from "../../utils/echarts/themes/index.js";
4
5
  import _sfc_main$1 from "../empty/Empty.vue.js";
5
6
  /* empty css */
6
7
  import { EcBasicOption } from "../../utils/echarts/modules/coordinate/basic.js";
@@ -38,6 +39,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
38
39
  if (props.theme === "auto") {
39
40
  const classList = [...document.documentElement.classList.values()];
40
41
  if (classList.includes("dark")) {
42
+ initDarkTheme();
41
43
  chartTheme = "dark";
42
44
  }
43
45
  }
@@ -1,16 +1,15 @@
1
1
  import { ElLoadingDirective } from "element-plus/es";
2
- import { defineComponent, onMounted, ref, computed, watch, withDirectives, createElementBlock, openBlock, createCommentVNode, createElementVNode, unref, normalizeStyle, toDisplayString, renderSlot, normalizeClass } from "vue";
2
+ import { defineComponent, onMounted, ref, computed, watch, withDirectives, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString, renderSlot } from "vue";
3
3
  import { ObjectUtil } from "../../utils/prototype/lib/ObjectUtil.js";
4
4
  import { EmptyStatusConfig } from "./config.js";
5
5
  import { EmptyStatusExtendConfig } from "../../config/index.js";
6
6
  import { EmptyGlobal } from "./index.js";
7
- const _hoisted_1 = { class: "yk-empty" };
8
- const _hoisted_2 = {
7
+ const _hoisted_1 = {
9
8
  key: 0,
10
9
  class: "empty_error"
11
10
  };
12
- const _hoisted_3 = { class: "empty__description" };
13
- const _hoisted_4 = { class: "empty__bottom" };
11
+ const _hoisted_2 = { class: "empty__description" };
12
+ const _hoisted_3 = { class: "empty__bottom" };
14
13
  var _sfc_main = /* @__PURE__ */ defineComponent({
15
14
  __name: "Empty",
16
15
  props: {
@@ -41,29 +40,28 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
41
40
  Object.assign(tempEmpty, state || {});
42
41
  }
43
42
  tempEmpty.type = emptyType;
44
- if (tempEmpty.hueRotate === void 0) tempEmpty.hueRotate = EmptyGlobal.emptyOption.hueRotate;
45
43
  currentEmpty.value = ObjectUtil.toJSON(tempEmpty);
46
44
  }
47
45
  const emptyImageStyle = computed(() => {
48
46
  const empty = currentEmpty.value;
49
47
  return {
50
48
  "--yk-empty-image-size": `${props.imageSize}px`,
51
- "--yk-empty-image-hue-rotate": `var(--yk-empty-${empty.type}-hue-rotate, ${empty.hueRotate || 0}deg)`,
52
- "--yk-empty-image-opacity": `var(--yk-empty-${empty.type}-opacity, ${empty.hueRotate ? 0.9 : 1})`,
53
- "--yk-empty-image-url": `var(--yk-empty-${empty.type}-url, url('${empty.src}'))`
49
+ "background-image": `var(--yk-empty-image-url, url('${empty.src}'))`
54
50
  };
55
51
  });
56
52
  watch(() => props.hook.state.value, updateStatus, { deep: true });
57
53
  return (_ctx, _cache) => {
58
54
  const _directive_loading = ElLoadingDirective;
59
- return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
60
- unref(isShowEmpty) ? (openBlock(), createElementBlock("div", _hoisted_2, [
55
+ return withDirectives((openBlock(), createElementBlock("div", {
56
+ class: normalizeClass(["yk-empty", [`yk-empty--${unref(currentEmpty).type}`]])
57
+ }, [
58
+ unref(isShowEmpty) ? (openBlock(), createElementBlock("div", _hoisted_1, [
61
59
  createElementVNode("div", {
62
60
  class: "empty__image",
63
61
  style: normalizeStyle(unref(emptyImageStyle))
64
62
  }, null, 4),
65
- createElementVNode("div", _hoisted_3, toDisplayString(unref(currentEmpty).description), 1),
66
- createElementVNode("div", _hoisted_4, [
63
+ createElementVNode("div", _hoisted_2, toDisplayString(unref(currentEmpty).description), 1),
64
+ createElementVNode("div", _hoisted_3, [
67
65
  renderSlot(_ctx.$slots, "footer", {
68
66
  type: unref(currentEmpty).type
69
67
  })
@@ -74,7 +72,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
74
72
  }, [
75
73
  renderSlot(_ctx.$slots, "default")
76
74
  ], 2)
77
- ])), [
75
+ ], 2)), [
78
76
  [_directive_loading, unref(currentEmpty).type === "LOADING"]
79
77
  ]);
80
78
  };
@@ -7,6 +7,5 @@ export declare const EmptyGlobal: {
7
7
  };
8
8
  emptyOption: {
9
9
  type: EmptyType;
10
- hueRotate: number;
11
10
  };
12
11
  };
@@ -5,8 +5,7 @@ const EmptyGlobal = {
5
5
  }
6
6
  },
7
7
  emptyOption: {
8
- type: null,
9
- hueRotate: null
8
+ type: null
10
9
  }
11
10
  };
12
11
  export {
package/dist/index.d.ts CHANGED
@@ -6,8 +6,6 @@ export * from './hooks';
6
6
  export * from './utils';
7
7
  export * from './entity';
8
8
  export * from './icons';
9
- import * as ec from 'echarts';
10
- export declare const echarts: typeof ec;
11
9
  declare const _default: {
12
10
  install(app: App): void;
13
11
  };
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import "./utils/echarts/themes/dark.js";
2
1
  import * as index$1 from "./components/index.js";
3
2
  import * as index$2 from "./directives/index.js";
4
3
  import "./element-plus/index.js";
@@ -7,13 +6,13 @@ import { useInjectEventsHooks } from "./hooks/inject-events/index.js";
7
6
  import { useEmptyHooks } from "./components/empty/hooks/index.js";
8
7
  import { MatchUnit } from "./utils/match-unit/index.js";
9
8
  import { TransitionFade } from "./utils/transition-fade/index.js";
9
+ import { echarts } from "./utils/echarts/index.js";
10
10
  import { AMapLoader } from "./utils/amap/index.js";
11
11
  import { Pages } from "./entity/Pages.js";
12
12
  import { BigFloat } from "./entity/BigFloat.js";
13
13
  import { RejectError } from "./entity/RejectError.js";
14
14
  import { YsVideo } from "./components/ys-video/type.js";
15
15
  import { IcImage, IcImageError } from "./icons/index.js";
16
- import * as echarts$1 from "echarts";
17
16
  import { useElDialogHooks } from "./element-plus/hooks/dialog/index.js";
18
17
  import { useElFormHooks } from "./element-plus/hooks/form/index.js";
19
18
  import { useElTableSortHooks } from "./element-plus/hooks/table-sort/index.js";
@@ -36,7 +35,6 @@ import { EcPieOption, EcPieSeries } from "./utils/echarts/modules/series/pie.js"
36
35
  import { useEChartsRef, useEcBarOption, useEcBasicOption, useEcCartesianOption, useEcLineOption, useEcPieOption } from "./utils/echarts/hooks/index.js";
37
36
  import { EChartsUtil } from "./utils/echarts/utils/index.js";
38
37
  import { AMapUtil } from "./utils/amap/utils/index.js";
39
- const echarts = echarts$1;
40
38
  var index = {
41
39
  install(app) {
42
40
  Object.entries(index$1).forEach(([name, component]) => {
@@ -1 +1 @@
1
- .yk-position-anchor{position:absolute;width:0;height:0;display:flex}.yk-position-anchor.position-anchor--center{justify-content:center;align-items:center}.yk-position-anchor.position-anchor--top-left{justify-content:left;align-items:flex-start}.yk-position-anchor.position-anchor--top-right{justify-content:right;align-items:flex-start}.yk-position-anchor.position-anchor--bottom-left{justify-content:left;align-items:flex-end}.yk-position-anchor.position-anchor--bottom-right{justify-content:right;align-items:flex-end}.yk-position-anchor.position-anchor--bottom{justify-content:center;align-items:flex-end}.yk-position-anchor.position-anchor--top{justify-content:center;align-items:flex-start}.yk-position-anchor.position-anchor--right{justify-content:flex-end;align-items:center}.yk-position-anchor.position-anchor--left{justify-content:flex-start;align-items:center}.yk-progress-ring{display:block}.yk-progress-ring circle{transform-box:fill-box;transform-origin:center;transition:all var(--duration) ease-in-out}.yk-adaptive-box .adaptive-box__body{overflow:hidden;margin-left:auto;margin-right:auto}.yk-adaptive-box .adaptive-box__content{transform-origin:left top;width:fit-content;--adaptive-height: initial}.yk-coordinate-pickup-autocomplete li{margin-bottom:8px}.yk-coordinate-pickup-autocomplete .autocomplete-subtitle{font-size:12px;color:var(--el-text-color-secondary);line-height:12px}.yk-coordinate-pickup-form .el-form-item{margin-right:16px}.coordinate-pickup{height:50vh;min-height:400px;max-height:920px}.amap-content-body,.amap-content-body .amap-lib-infowindow{background:inherit}.yk-drag-drop-box{position:absolute}.yk-drag-drop-container .drag-drop-content{width:fit-content;height:fit-content}.yk-progress-bar{position:relative;display:flex;align-items:center}.yk-ys-video .icon--replay{color:#fff}.yk-ys-video .icon--replay.is-active{color:#157edf}.yk-ys-video .header-controls div:nth-child(2) .theme-icon-item{width:32px!important;display:flex;justify-content:center;align-items:center;padding-top:6px}.yk-ys-video .header-controls div:nth-child(2) .theme-icon-item svg{height:48px!important;width:48px!important}.yk-ys-video .header-controls div:nth-child(2) .theme-icon-item:last-child{padding-left:16px}.yk-ys-video .play-mask{background-color:#626365;background-repeat:no-repeat;background-size:100% 100%;top:0;left:0}.yk-ys-video .play-mask .header{height:20%;inset:0 auto auto 0;min-height:48px;background:linear-gradient(to bottom,#0008 0,#0006 30%,#0003 50%,#0000);padding:10px 8px;width:100%}.yk-ys-video .play-mask .header .title-box{max-width:50%;height:48px}.yk-show-log{background:#fff;border-radius:5px;padding:10px;-webkit-user-select:none;user-select:none;box-shadow:0 2px 4px #ccc;min-width:150px}.yk-show-log.is-min{overflow:hidden}.yk-empty{position:relative;--yk-empty-description-font-size: var(--el-font-size-base, 14px);--yk-empty-description-color: var(--el-text-color-secondary, #909399);--yk-empty-description-margin-top: var(--el-empty-description-margin-top, 20px);--yk-empty-bottom-margin-top: var(--el-empty-bottom-margin-top, 20px)}.yk-empty .empty_content{width:100%;height:100%}.yk-empty .empty_content.is-hide{opacity:0}.yk-empty .empty_error{width:100%;height:100%;position:absolute;z-index:5;display:flex;flex-direction:column;justify-content:center;align-items:center}.yk-empty .empty_error .empty__image{background:var(--yk-empty-image-url);background-size:cover;width:var(--yk-empty-image-size);height:var(--yk-empty-image-size);opacity:var(--yk-empty-image-opacity);filter:hue-rotate(var(--yk-empty-image-hue-rotate))}.yk-empty .empty_error .empty__description{font-size:var(--yk-empty-description-font-size);color:var(--yk-empty-description-color);margin-top:var(--yk-empty-description-margin-top)}.yk-empty .empty_error .empty__bottom{margin-top:var(--yk-empty-bottom-margin-top)}.yk-echarts-canvas{position:relative;container-type:size}.yk-echarts-canvas .echarts-canvas__inner{width:100%;height:100%;position:absolute;z-index:2}.yk-echarts-canvas .echarts-canvas__inner.is-empty{opacity:0}.yk-scroll-container{overflow:auto}.yk-scroll-container::-webkit-scrollbar{width:0;height:0}.yk-scroll-container .scroll-inner{display:flex;width:100%;flex-direction:column}.yk-pagination{padding:16px 0 8px}.yk-pagination .el-pagination{--el-pagination-bg-color: transparent;--el-pagination-button-disabled-bg-color: transparent}.yk-upload-image{margin-bottom:-8px}.yk-upload-image.limit_is-max .el-upload-list--picture-card .el-upload--picture-card{display:none}.yk-upload-image .el-upload-list--picture-card .el-upload-list__item{width:var(--upload-size-w);height:var(--upload-size-h)}.yk-upload-image .el-upload-list--picture-card .el-upload-list__item.is-success:focus:not(:hover) .el-icon--close-tip{display:none!important}.yk-upload-image .el-upload-list--picture-card .el-upload-list__item.is-success:focus .el-upload-list__item-status-label{display:inline-flex;opacity:1}.yk-upload-image .el-upload-list--picture-card .el-upload--picture-card{margin-bottom:8px;width:var(--upload-size-w);height:var(--upload-size-h)}.yk-upload-files .el-upload.is-drag{width:var(--upload-size-w);height:var(--upload-size-h)}.yk-upload-files .el-upload .el-upload-dragger{padding:unset;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.yk-upload-files .el-upload-list{margin:unset}.yk-upload-file :deep(.el-upload-list){margin:unset}.yk-images{display:flex;flex-wrap:wrap;gap:8px}.yk-images :deep(.el-image){width:var(--size-w);height:var(--size-h)}
1
+ .yk-position-anchor{position:absolute;width:0;height:0;display:flex}.yk-position-anchor.position-anchor--center{justify-content:center;align-items:center}.yk-position-anchor.position-anchor--top-left{justify-content:left;align-items:flex-start}.yk-position-anchor.position-anchor--top-right{justify-content:right;align-items:flex-start}.yk-position-anchor.position-anchor--bottom-left{justify-content:left;align-items:flex-end}.yk-position-anchor.position-anchor--bottom-right{justify-content:right;align-items:flex-end}.yk-position-anchor.position-anchor--bottom{justify-content:center;align-items:flex-end}.yk-position-anchor.position-anchor--top{justify-content:center;align-items:flex-start}.yk-position-anchor.position-anchor--right{justify-content:flex-end;align-items:center}.yk-position-anchor.position-anchor--left{justify-content:flex-start;align-items:center}.yk-progress-ring{display:block}.yk-progress-ring circle{transform-box:fill-box;transform-origin:center;transition:all var(--duration) ease-in-out}.yk-adaptive-box .adaptive-box__body{overflow:hidden;margin-left:auto;margin-right:auto}.yk-adaptive-box .adaptive-box__content{transform-origin:left top;width:fit-content;--adaptive-height: initial}.yk-coordinate-pickup-autocomplete li{margin-bottom:8px}.yk-coordinate-pickup-autocomplete .autocomplete-subtitle{font-size:12px;color:var(--el-text-color-secondary);line-height:12px}.yk-coordinate-pickup-form .el-form-item{margin-right:16px}.coordinate-pickup{height:50vh;min-height:400px;max-height:920px}.amap-content-body,.amap-content-body .amap-lib-infowindow{background:inherit}.yk-drag-drop-box{position:absolute}.yk-drag-drop-container .drag-drop-content{width:fit-content;height:fit-content}.yk-progress-bar{position:relative;display:flex;align-items:center}.yk-ys-video .icon--replay{color:#fff}.yk-ys-video .icon--replay.is-active{color:#157edf}.yk-ys-video .header-controls div:nth-child(2) .theme-icon-item{width:32px!important;display:flex;justify-content:center;align-items:center;padding-top:6px}.yk-ys-video .header-controls div:nth-child(2) .theme-icon-item svg{height:48px!important;width:48px!important}.yk-ys-video .header-controls div:nth-child(2) .theme-icon-item:last-child{padding-left:16px}.yk-ys-video .play-mask{background-color:#626365;background-repeat:no-repeat;background-size:100% 100%;top:0;left:0}.yk-ys-video .play-mask .header{height:20%;inset:0 auto auto 0;min-height:48px;background:linear-gradient(to bottom,#0008 0,#0006 30%,#0003 50%,#0000);padding:10px 8px;width:100%}.yk-ys-video .play-mask .header .title-box{max-width:50%;height:48px}.yk-show-log{background:#fff;border-radius:5px;padding:10px;-webkit-user-select:none;user-select:none;box-shadow:0 2px 4px #ccc;min-width:150px}.yk-show-log.is-min{overflow:hidden}.yk-empty{position:relative;--yk-empty-description-font-size: var(--el-font-size-base, 14px);--yk-empty-description-color: var(--el-text-color-secondary, #909399);--yk-empty-description-margin-top: var(--el-empty-description-margin-top, 20px);--yk-empty-bottom-margin-top: var(--el-empty-bottom-margin-top, 20px);--yk-empty-image-opacity: 1;--yk-empty-image-hue-rotate: 0deg}.yk-empty .empty_content{width:100%;height:100%}.yk-empty .empty_content.is-hide{opacity:0}.yk-empty .empty_error{width:100%;height:100%;position:absolute;z-index:5;display:flex;flex-direction:column;justify-content:center;align-items:center}.yk-empty .empty_error .empty__image{background-repeat:no-repeat;background-position:center;background-size:contain;width:var(--yk-empty-image-size);height:var(--yk-empty-image-size);opacity:var(--yk-empty-image-opacity);filter:hue-rotate(var(--yk-empty-image-hue-rotate))}.yk-empty .empty_error .empty__description{font-size:var(--yk-empty-description-font-size);color:var(--yk-empty-description-color);margin-top:var(--yk-empty-description-margin-top)}.yk-empty .empty_error .empty__bottom{margin-top:var(--yk-empty-bottom-margin-top)}.yk-echarts-canvas{position:relative;container-type:size}.yk-echarts-canvas .echarts-canvas__inner{width:100%;height:100%;position:absolute;z-index:2}.yk-echarts-canvas .echarts-canvas__inner.is-empty{opacity:0}.yk-scroll-container{overflow:auto}.yk-scroll-container::-webkit-scrollbar{width:0;height:0}.yk-scroll-container .scroll-inner{display:flex;width:100%;flex-direction:column}.yk-pagination{padding:16px 0 8px}.yk-pagination .el-pagination{--el-pagination-bg-color: transparent;--el-pagination-button-disabled-bg-color: transparent}.yk-upload-image{margin-bottom:-8px}.yk-upload-image.limit_is-max .el-upload-list--picture-card .el-upload--picture-card{display:none}.yk-upload-image .el-upload-list--picture-card .el-upload-list__item{width:var(--upload-size-w);height:var(--upload-size-h)}.yk-upload-image .el-upload-list--picture-card .el-upload-list__item.is-success:focus:not(:hover) .el-icon--close-tip{display:none!important}.yk-upload-image .el-upload-list--picture-card .el-upload-list__item.is-success:focus .el-upload-list__item-status-label{display:inline-flex;opacity:1}.yk-upload-image .el-upload-list--picture-card .el-upload--picture-card{margin-bottom:8px;width:var(--upload-size-w);height:var(--upload-size-h)}.yk-upload-files .el-upload.is-drag{width:var(--upload-size-w);height:var(--upload-size-h)}.yk-upload-files .el-upload .el-upload-dragger{padding:unset;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.yk-upload-files .el-upload-list{margin:unset}.yk-upload-file :deep(.el-upload-list){margin:unset}.yk-images{display:flex;flex-wrap:wrap;gap:8px}.yk-images :deep(.el-image){width:var(--size-w);height:var(--size-h)}
@@ -1,3 +1,5 @@
1
1
  export * from './modules';
2
2
  export * from './hooks';
3
3
  export * from './utils';
4
+ import * as ec from 'echarts';
5
+ export declare const echarts: typeof ec;
@@ -0,0 +1,5 @@
1
+ import * as ec from "echarts";
2
+ const echarts = ec;
3
+ export {
4
+ echarts
5
+ };
@@ -1 +1,2 @@
1
- export {};
1
+ declare const theme: any;
2
+ export default theme;
@@ -1,4 +1,3 @@
1
- import * as echarts from "echarts";
2
1
  const contrastColor = "#ededf3";
3
2
  const backgroundColor = "rgba(0, 0, 0, 0)";
4
3
  const axisCommon = function() {
@@ -178,4 +177,6 @@ const theme = {
178
177
  }
179
178
  };
180
179
  theme.categoryAxis.splitLine.show = false;
181
- echarts.registerTheme("dark", theme);
180
+ export {
181
+ theme as default
182
+ };
@@ -0,0 +1 @@
1
+ export declare function initDarkTheme(): void;
@@ -0,0 +1,11 @@
1
+ import { echarts } from "../index.js";
2
+ import theme from "./dark.js";
3
+ let isDarkThemeInit = false;
4
+ function initDarkTheme() {
5
+ if (isDarkThemeInit) return;
6
+ echarts.registerTheme("dark", theme);
7
+ isDarkThemeInit = true;
8
+ }
9
+ export {
10
+ initDarkTheme
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mrxy-yk",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "A collection of Vue 3 components and utilities",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "mrxy-yk",
4
- "version": "1.1.9",
4
+ "version": "1.1.11",
5
5
  "js-types-syntax": "typescript",
6
6
  "contributions": {
7
7
  "html": {