zzz-pc-view 0.0.93 → 0.0.95
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.
package/package.json
CHANGED
package/src/index.es.js
CHANGED
|
@@ -1911,8 +1911,21 @@ const useHttpRequestInterval = (request, ms) => {
|
|
|
1911
1911
|
abort
|
|
1912
1912
|
};
|
|
1913
1913
|
};
|
|
1914
|
+
const useDebounce = (callback, wait = 300) => {
|
|
1915
|
+
let timeout;
|
|
1916
|
+
return (...args) => {
|
|
1917
|
+
if (timeout !== void 0) {
|
|
1918
|
+
clearTimeout(timeout);
|
|
1919
|
+
}
|
|
1920
|
+
timeout = setTimeout(() => {
|
|
1921
|
+
timeout = void 0;
|
|
1922
|
+
callback(...args);
|
|
1923
|
+
}, wait);
|
|
1924
|
+
};
|
|
1925
|
+
};
|
|
1914
1926
|
const index$d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1915
1927
|
__proto__: null,
|
|
1928
|
+
useDebounce,
|
|
1916
1929
|
useHttpRequestInterval,
|
|
1917
1930
|
useInterval
|
|
1918
1931
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3974,6 +3987,71 @@ const useBaseEChartViewUtil = (responseKey, eventHandler) => {
|
|
|
3974
3987
|
}
|
|
3975
3988
|
return response2;
|
|
3976
3989
|
};
|
|
3990
|
+
var LegendChangeType = /* @__PURE__ */ ((LegendChangeType2) => {
|
|
3991
|
+
LegendChangeType2[LegendChangeType2["CHART"] = 0] = "CHART";
|
|
3992
|
+
LegendChangeType2[LegendChangeType2["SELECT_BY_ALL"] = 1] = "SELECT_BY_ALL";
|
|
3993
|
+
LegendChangeType2[LegendChangeType2["SELECT_BY_INVERT"] = 2] = "SELECT_BY_INVERT";
|
|
3994
|
+
LegendChangeType2[LegendChangeType2["SELECT_BY_CLEAR"] = 3] = "SELECT_BY_CLEAR";
|
|
3995
|
+
return LegendChangeType2;
|
|
3996
|
+
})(LegendChangeType || {});
|
|
3997
|
+
const useLegendSelectCtrl = (dimensions, callback, defaultSelected) => {
|
|
3998
|
+
const legendSelectedRef = shallowRef(
|
|
3999
|
+
defaultSelected ?? {}
|
|
4000
|
+
);
|
|
4001
|
+
const onLegendSelectChanged = (event) => {
|
|
4002
|
+
legendSelectedRef.value = event.selected;
|
|
4003
|
+
callback(
|
|
4004
|
+
0
|
|
4005
|
+
/* CHART */
|
|
4006
|
+
);
|
|
4007
|
+
};
|
|
4008
|
+
const onSelectByAllBtnClick = () => {
|
|
4009
|
+
legendSelectedRef.value = selectCtrlByAll({
|
|
4010
|
+
list: dimensions,
|
|
4011
|
+
keyProp: "id",
|
|
4012
|
+
toMap: true
|
|
4013
|
+
});
|
|
4014
|
+
callback(
|
|
4015
|
+
1
|
|
4016
|
+
/* SELECT_BY_ALL */
|
|
4017
|
+
);
|
|
4018
|
+
};
|
|
4019
|
+
const onSelectByInvertBtnClick = () => {
|
|
4020
|
+
legendSelectedRef.value = selectCtrlByInvert({
|
|
4021
|
+
list: dimensions,
|
|
4022
|
+
keyProp: "id",
|
|
4023
|
+
defaultBoolean: true,
|
|
4024
|
+
selected: legendSelectedRef.value,
|
|
4025
|
+
toMap: true
|
|
4026
|
+
});
|
|
4027
|
+
callback(
|
|
4028
|
+
2
|
|
4029
|
+
/* SELECT_BY_INVERT */
|
|
4030
|
+
);
|
|
4031
|
+
};
|
|
4032
|
+
const onSelectByClearBtnClick = () => {
|
|
4033
|
+
legendSelectedRef.value = selectCtrlByClear({
|
|
4034
|
+
list: dimensions,
|
|
4035
|
+
keyProp: "id",
|
|
4036
|
+
toMap: true
|
|
4037
|
+
});
|
|
4038
|
+
callback(
|
|
4039
|
+
3
|
|
4040
|
+
/* SELECT_BY_CLEAR */
|
|
4041
|
+
);
|
|
4042
|
+
};
|
|
4043
|
+
const setDimensions = (_dimensions) => {
|
|
4044
|
+
dimensions = _dimensions;
|
|
4045
|
+
};
|
|
4046
|
+
return {
|
|
4047
|
+
legendSelectedRef,
|
|
4048
|
+
onLegendSelectChanged,
|
|
4049
|
+
onSelectByAllBtnClick,
|
|
4050
|
+
onSelectByInvertBtnClick,
|
|
4051
|
+
onSelectByClearBtnClick,
|
|
4052
|
+
setDimensions
|
|
4053
|
+
};
|
|
4054
|
+
};
|
|
3977
4055
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
3978
4056
|
__name: "BaseEChartView",
|
|
3979
4057
|
props: {
|
|
@@ -4074,12 +4152,14 @@ const index$b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
4074
4152
|
BaseEChartView: _sfc_main$n,
|
|
4075
4153
|
CN_TEXT_FONT_FAMILY,
|
|
4076
4154
|
EN_TEXT_FONT_FAMILY,
|
|
4155
|
+
LegendChangeType,
|
|
4077
4156
|
NUMBER_FONT_FAMILY,
|
|
4078
4157
|
getRelatedChartOption,
|
|
4079
4158
|
getTrendChartOption,
|
|
4080
4159
|
setLegend,
|
|
4081
4160
|
useBaseEChartViewUtil,
|
|
4082
4161
|
useChartStyleConfig,
|
|
4162
|
+
useLegendSelectCtrl,
|
|
4083
4163
|
yAxisFormatterMap
|
|
4084
4164
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4085
4165
|
const ZWebUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|