@cloudtower/eagle 0.27.72 → 0.27.74

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.
@@ -16,10 +16,14 @@ var DonutChartColor = /* @__PURE__ */(DonutChartColor2 => {
16
16
  DonutChartColor2["PURPLE"] = "purple";
17
17
  return DonutChartColor2;
18
18
  })(DonutChartColor || {});
19
+ const _exp = /*#__PURE__*/() => props => `${props.width}`;
19
20
  const DonutChartWrapper = /*#__PURE__*/styled('div')({
20
21
  name: "DonutChartWrapper",
21
22
  class: "E_d1bw7c5z",
22
- propsAsIs: false
23
+ propsAsIs: false,
24
+ vars: {
25
+ "d1bw7c5z-0": [_exp(), "px"]
26
+ }
23
27
  });
24
28
  const TooltipDefaultClass = "E_t10pqbtc";
25
29
  const ColorMap = {
@@ -87,7 +91,13 @@ const DonutChart = ({
87
91
  overlayClassName,
88
92
  color,
89
93
  otherData,
90
- collapseText
94
+ collapseText,
95
+ width = 148,
96
+ height = 100,
97
+ innerRadius = 45,
98
+ outerRadius = 50,
99
+ widthPadding = true,
100
+ showLegend = true
91
101
  }) => {
92
102
  const initColorMap = color ? ColorMap[color] : [];
93
103
  const {
@@ -101,28 +111,37 @@ const DonutChart = ({
101
111
  t
102
112
  });
103
113
  }, [data, otherData, t, collapseText]);
104
- return /* @__PURE__ */React__default.createElement(DonutChartWrapper, null, /* @__PURE__ */React__default.createElement(PieChart, {
105
- width: 148,
106
- height: 116,
114
+ return /* @__PURE__ */React__default.createElement(DonutChartWrapper, {
115
+ width
116
+ }, /* @__PURE__ */React__default.createElement(PieChart, {
117
+ width,
118
+ height,
107
119
  style: {
108
120
  width: "100%"
109
121
  },
110
- className
122
+ className,
123
+ margin: {
124
+ left: 0,
125
+ top: 0,
126
+ right: 0,
127
+ bottom: 0
128
+ }
111
129
  }, /* @__PURE__ */React__default.createElement(Pie, {
112
130
  dataKey: "value",
113
131
  data: formatData,
114
- innerRadius: 45,
115
- outerRadius: 50,
116
- cx: 74,
117
- cy: 53,
118
- paddingAngle: 4,
132
+ innerRadius,
133
+ outerRadius: outerRadius != null ? outerRadius : height / 2,
134
+ cx: width / 2,
135
+ cy: height / 2,
136
+ paddingAngle: widthPadding ? 4 : 0,
137
+ blendStroke: !widthPadding,
119
138
  startAngle: 90,
120
139
  endAngle: -270,
121
140
  stroke: "none"
122
141
  }, formatData.map((data2, index) => /* @__PURE__ */React__default.createElement(Cell, {
123
142
  key: `cell-${index}`,
124
143
  fill: (data2 == null ? void 0 : data2.color) || initColorMap[index]
125
- }))), /* @__PURE__ */React__default.createElement(Legend, {
144
+ }))), showLegend && /* @__PURE__ */React__default.createElement(Legend, {
126
145
  iconSize: 8,
127
146
  iconType: "square",
128
147
  layout: "vertical",
@@ -155,9 +174,9 @@ const DonutChart = ({
155
174
  className: cs(Typo.Label.l4_regular, "value")
156
175
  }, legendData.value));
157
176
  }
158
- })), !!centerRender && /* @__PURE__ */React__default.createElement("div", {
177
+ })), !!centerRender && /* @__PURE__ */React__default.createElement("div", null, "text" in centerRender ? /* @__PURE__ */React__default.createElement("div", {
159
178
  className: "center"
160
- }, "text" in centerRender ? /* @__PURE__ */React__default.createElement(React__default.Fragment, null, /* @__PURE__ */React__default.createElement("div", {
179
+ }, /* @__PURE__ */React__default.createElement("div", {
161
180
  className: "number"
162
181
  }, centerRender.number), /* @__PURE__ */React__default.createElement(OverflowTooltip, {
163
182
  className: "text",
@@ -7,6 +7,7 @@ export { TitleArea } from './progress.widgets.js';
7
7
  import { isStringArray } from '../../utils/isStringArr.js';
8
8
  import { Progress as Progress$1 } from 'antd5';
9
9
  import React__default from 'react';
10
+ import { Antd5PrefixCls } from '../../utils/constants.js';
10
11
 
11
12
  var __defProp = Object.defineProperty;
12
13
  var __defProps = Object.defineProperties;
@@ -118,6 +119,7 @@ const Progress = _a => {
118
119
  strokeWidth: storkeWidth,
119
120
  showInfo: false
120
121
  }, props), {
122
+ prefixCls: `${Antd5PrefixCls}-progress`,
121
123
  status: finalStatus === "active" ? "active" : void 0,
122
124
  percent: indeterminate ? 100 : percent,
123
125
  strokeColor: StatusColorMap[finalStatus]
@@ -1,6 +1,7 @@
1
1
  import { Segmented } from 'antd5';
2
2
  import cs from 'classnames';
3
3
  import React__default from 'react';
4
+ import { Antd5PrefixCls } from '../../utils/constants.js';
4
5
 
5
6
  var __defProp = Object.defineProperty;
6
7
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -33,7 +34,8 @@ const SegmentControl = props => {
33
34
  [SmallSegment]: size === "small",
34
35
  [MediumSegment]: size === "middle"
35
36
  }, Segment, ColorSegment),
36
- size
37
+ size,
38
+ prefixCls: Antd5PrefixCls
37
39
  }, props));
38
40
  };
39
41
  var SegmentControl$1 = SegmentControl;
@@ -1,5 +1,6 @@
1
1
  import { Menu } from 'antd5';
2
2
  import React__default from 'react';
3
+ import { Antd5PrefixCls } from '../../utils/constants.js';
3
4
 
4
5
  var __defProp = Object.defineProperty;
5
6
  var __defProps = Object.defineProperties;
@@ -21,7 +22,7 @@ var __spreadValues = (a, b) => {
21
22
  };
22
23
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
24
  const SidebarMenu = (props) => {
24
- return /* @__PURE__ */ React__default.createElement(Menu, __spreadProps(__spreadValues({}, props), { mode: "inline" }));
25
+ return /* @__PURE__ */ React__default.createElement(Menu, __spreadProps(__spreadValues({}, props), { prefixCls: Antd5PrefixCls, mode: "inline" }));
25
26
  };
26
27
 
27
28
  export { SidebarMenu };
@@ -14,7 +14,7 @@ const BarChart = ({
14
14
  total
15
15
  }) => /* @__PURE__ */React__default.createElement("div", {
16
16
  className: StackBar
17
- }, (data || []).map(item => {
17
+ }, (data || []).map((item, index) => {
18
18
  const {
19
19
  value,
20
20
  color
@@ -22,6 +22,7 @@ const BarChart = ({
22
22
  const width = total === 0 ? 0 : getWidth(100 * value / total);
23
23
  return /* @__PURE__ */React__default.createElement("div", {
24
24
  className: "stack-bar-item",
25
+ key: index,
25
26
  style: {
26
27
  width,
27
28
  background: color,
@@ -4,6 +4,7 @@ import { cx } from '@linaria/core';
4
4
  import AccordionCard from '../../core/AccordionCard/index.js';
5
5
  import Button from '../../core/Button/index.js';
6
6
  import fields from '../../core/Fields/index.js';
7
+ import { ParrotTrans } from '../../core/ParrotTrans/index.js';
7
8
  import Switch from '../../core/Switch/index.js';
8
9
  import TimePicker from '../../core/TimePicker/index.js';
9
10
  import { Typo } from '../../core/Typo/index.js';
@@ -120,12 +121,12 @@ const Daily = ({
120
121
  daily,
121
122
  setDaily
122
123
  }) => {
123
- const {
124
- t
125
- } = useParrotTranslation();
126
124
  return /* @__PURE__ */React__default.createElement("div", {
127
125
  className: Wrapper
128
- }, t("components.per_day_1"), /* @__PURE__ */React__default.createElement(fields.Int, {
126
+ }, /* @__PURE__ */React__default.createElement(ParrotTrans, {
127
+ i18nKey: "components.day_execute_task",
128
+ count: daily.step
129
+ }, /* @__PURE__ */React__default.createElement(fields.Int, {
129
130
  meta: {},
130
131
  input: {
131
132
  value: daily.step,
@@ -139,7 +140,7 @@ const Daily = ({
139
140
  onFocus() {},
140
141
  maxLength: 3
141
142
  }
142
- }), t("components.per_day_2"), /* @__PURE__ */React__default.createElement(TimePicker, {
143
+ }), /* @__PURE__ */React__default.createElement(TimePicker, {
143
144
  format: "HH:mm",
144
145
  value: daily.time,
145
146
  onChange: value => {
@@ -151,7 +152,7 @@ const Daily = ({
151
152
  },
152
153
  clearIcon: null,
153
154
  suffixIcon: null
154
- }), t("components.per_day_3"));
155
+ })));
155
156
  };
156
157
  const WEEK_DAYS = t => [{
157
158
  value: 1,
@@ -194,7 +195,15 @@ const Weekly = ({
194
195
  const week_days = useMemo(() => WEEK_DAYS(t), [t]);
195
196
  return /* @__PURE__ */React__default.createElement("div", {
196
197
  className: Wrapper
197
- }, t("components.per_day_1"), /* @__PURE__ */React__default.createElement(fields.Int, {
198
+ }, /* @__PURE__ */React__default.createElement(ParrotTrans, {
199
+ i18nKey: "components.week_with_below_date",
200
+ count: weekly.step,
201
+ values: {
202
+ day: t("components.day_date", {
203
+ count: weekly.days.length
204
+ })
205
+ }
206
+ }, /* @__PURE__ */React__default.createElement(fields.Int, {
198
207
  meta: {},
199
208
  input: {
200
209
  value: weekly.step,
@@ -208,7 +217,7 @@ const Weekly = ({
208
217
  onFocus() {},
209
218
  maxLength: 3
210
219
  }
211
- }), t("components.week_with_below_date"), /* @__PURE__ */React__default.createElement("div", {
220
+ })), /* @__PURE__ */React__default.createElement("div", {
212
221
  className: "options"
213
222
  }, week_days.map(d => {
214
223
  const active = weekly.days.includes(d.value);
@@ -250,7 +259,15 @@ const Monthly = ({
250
259
  const mark = i18n.language === ParrotLngs.en ? " , " : "\u3001";
251
260
  return /* @__PURE__ */React__default.createElement("div", {
252
261
  className: Wrapper
253
- }, t("components.per_day_1"), /* @__PURE__ */React__default.createElement(fields.Int, {
262
+ }, /* @__PURE__ */React__default.createElement(ParrotTrans, {
263
+ i18nKey: "components.month_with_below_date",
264
+ count: monthly.step,
265
+ values: {
266
+ day: t("components.day_date", {
267
+ count: monthly.days.length
268
+ })
269
+ }
270
+ }, /* @__PURE__ */React__default.createElement(fields.Int, {
254
271
  meta: {},
255
272
  input: {
256
273
  value: monthly.step,
@@ -264,7 +281,7 @@ const Monthly = ({
264
281
  onFocus() {},
265
282
  maxLength: 3
266
283
  }
267
- }), t("components.month_with_below_date"), /* @__PURE__ */React__default.createElement("div", {
284
+ })), /* @__PURE__ */React__default.createElement("div", {
268
285
  className: "options"
269
286
  }, MONTH_DAYS.map(d => {
270
287
  const active = monthly.days.includes(d);