@cloudtower/eagle 0.27.73 → 0.27.75

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.
@@ -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);
@@ -247,10 +256,23 @@ const Monthly = ({
247
256
  t,
248
257
  i18n
249
258
  } = useParrotTranslation();
250
- const mark = i18n.language === ParrotLngs.en ? " , " : "\u3001";
259
+ let date;
260
+ if (i18n.language === ParrotLngs.en && mayNotExistDays.length === 3) {
261
+ date = `${mayNotExistDays[0]}, ${mayNotExistDays[1]}, or ${mayNotExistDays[2]}`;
262
+ } else {
263
+ date = mayNotExistDays.join(i18n.t("components.date_mark"));
264
+ }
251
265
  return /* @__PURE__ */React__default.createElement("div", {
252
266
  className: Wrapper
253
- }, t("components.per_day_1"), /* @__PURE__ */React__default.createElement(fields.Int, {
267
+ }, /* @__PURE__ */React__default.createElement(ParrotTrans, {
268
+ i18nKey: "components.month_with_below_date",
269
+ count: monthly.step,
270
+ values: {
271
+ day: t("components.day_date", {
272
+ count: monthly.days.length
273
+ })
274
+ }
275
+ }, /* @__PURE__ */React__default.createElement(fields.Int, {
254
276
  meta: {},
255
277
  input: {
256
278
  value: monthly.step,
@@ -264,7 +286,7 @@ const Monthly = ({
264
286
  onFocus() {},
265
287
  maxLength: 3
266
288
  }
267
- }), t("components.month_with_below_date"), /* @__PURE__ */React__default.createElement("div", {
289
+ })), /* @__PURE__ */React__default.createElement("div", {
268
290
  className: "options"
269
291
  }, MONTH_DAYS.map(d => {
270
292
  const active = monthly.days.includes(d);
@@ -279,7 +301,7 @@ const Monthly = ({
279
301
  }), mayNotExistDays.length > 0 && /* @__PURE__ */React__default.createElement("span", {
280
302
  className: cx("help", Typo.Label.l4_regular)
281
303
  }, t("components.will_excute_at_last_day_with_date", {
282
- date: `${mayNotExistDays.join(mark)} `
304
+ date
283
305
  }))), t("components.execution_time"), /* @__PURE__ */React__default.createElement(TimePicker, {
284
306
  style: {
285
307
  marginLeft: 0
@@ -388,7 +410,7 @@ const CronPlan = props => {
388
410
  onChange: v => changeValue({
389
411
  enabled: v
390
412
  })
391
- }, value.enabled ? t("common.enable") : t("common.disable"))), /* @__PURE__ */React__default.createElement("span", {
413
+ }, value.enabled ? t("common.enabled") : t("common.disabled"))), /* @__PURE__ */React__default.createElement("span", {
392
414
  className: "close",
393
415
  onClick: onRemove
394
416
  }, /* @__PURE__ */React__default.createElement(CloseIcon, null)))),