zzz-pc-view 0.0.94 → 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
|
@@ -3987,6 +3987,71 @@ const useBaseEChartViewUtil = (responseKey, eventHandler) => {
|
|
|
3987
3987
|
}
|
|
3988
3988
|
return response2;
|
|
3989
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
|
+
};
|
|
3990
4055
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
3991
4056
|
__name: "BaseEChartView",
|
|
3992
4057
|
props: {
|
|
@@ -4087,12 +4152,14 @@ const index$b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
4087
4152
|
BaseEChartView: _sfc_main$n,
|
|
4088
4153
|
CN_TEXT_FONT_FAMILY,
|
|
4089
4154
|
EN_TEXT_FONT_FAMILY,
|
|
4155
|
+
LegendChangeType,
|
|
4090
4156
|
NUMBER_FONT_FAMILY,
|
|
4091
4157
|
getRelatedChartOption,
|
|
4092
4158
|
getTrendChartOption,
|
|
4093
4159
|
setLegend,
|
|
4094
4160
|
useBaseEChartViewUtil,
|
|
4095
4161
|
useChartStyleConfig,
|
|
4162
|
+
useLegendSelectCtrl,
|
|
4096
4163
|
yAxisFormatterMap
|
|
4097
4164
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4098
4165
|
const ZWebUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|