@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.
@@ -8,8 +8,9 @@ var core = require('@linaria/core');
8
8
  var index = require('../../core/AccordionCard/index.js');
9
9
  var index$4 = require('../../core/Button/index.js');
10
10
  var index$3 = require('../../core/Fields/index.js');
11
+ var index$5 = require('../../core/ParrotTrans/index.js');
11
12
  var index$2 = require('../../core/Switch/index.js');
12
- var index$5 = require('../../core/TimePicker/index.js');
13
+ var index$6 = require('../../core/TimePicker/index.js');
13
14
  var index$1 = require('../../core/Typo/index.js');
14
15
  var useParrotTranslation = require('../../hooks/useParrotTranslation.js');
15
16
  var antd = require('antd');
@@ -131,12 +132,12 @@ const Daily = ({
131
132
  daily,
132
133
  setDaily
133
134
  }) => {
134
- const {
135
- t
136
- } = useParrotTranslation();
137
135
  return /* @__PURE__ */React__default.default.createElement("div", {
138
136
  className: Wrapper
139
- }, t("components.per_day_1"), /* @__PURE__ */React__default.default.createElement(index$3.Int, {
137
+ }, /* @__PURE__ */React__default.default.createElement(index$5.ParrotTrans, {
138
+ i18nKey: "components.day_execute_task",
139
+ count: daily.step
140
+ }, /* @__PURE__ */React__default.default.createElement(index$3.Int, {
140
141
  meta: {},
141
142
  input: {
142
143
  value: daily.step,
@@ -150,7 +151,7 @@ const Daily = ({
150
151
  onFocus() {},
151
152
  maxLength: 3
152
153
  }
153
- }), t("components.per_day_2"), /* @__PURE__ */React__default.default.createElement(index$5, {
154
+ }), /* @__PURE__ */React__default.default.createElement(index$6, {
154
155
  format: "HH:mm",
155
156
  value: daily.time,
156
157
  onChange: value => {
@@ -162,7 +163,7 @@ const Daily = ({
162
163
  },
163
164
  clearIcon: null,
164
165
  suffixIcon: null
165
- }), t("components.per_day_3"));
166
+ })));
166
167
  };
167
168
  const WEEK_DAYS = t => [{
168
169
  value: 1,
@@ -205,7 +206,15 @@ const Weekly = ({
205
206
  const week_days = React.useMemo(() => WEEK_DAYS(t), [t]);
206
207
  return /* @__PURE__ */React__default.default.createElement("div", {
207
208
  className: Wrapper
208
- }, t("components.per_day_1"), /* @__PURE__ */React__default.default.createElement(index$3.Int, {
209
+ }, /* @__PURE__ */React__default.default.createElement(index$5.ParrotTrans, {
210
+ i18nKey: "components.week_with_below_date",
211
+ count: weekly.step,
212
+ values: {
213
+ day: t("components.day_date", {
214
+ count: weekly.days.length
215
+ })
216
+ }
217
+ }, /* @__PURE__ */React__default.default.createElement(index$3.Int, {
209
218
  meta: {},
210
219
  input: {
211
220
  value: weekly.step,
@@ -219,7 +228,7 @@ const Weekly = ({
219
228
  onFocus() {},
220
229
  maxLength: 3
221
230
  }
222
- }), t("components.week_with_below_date"), /* @__PURE__ */React__default.default.createElement("div", {
231
+ })), /* @__PURE__ */React__default.default.createElement("div", {
223
232
  className: "options"
224
233
  }, week_days.map(d => {
225
234
  const active = weekly.days.includes(d.value);
@@ -231,7 +240,7 @@ const Weekly = ({
231
240
  days: active ? weekly.days.filter(day => day !== d.value) : weekly.days.concat(d.value).sort((a, b) => a - b)
232
241
  }))
233
242
  }, d.text);
234
- })), t("components.execution_time"), /* @__PURE__ */React__default.default.createElement(index$5, {
243
+ })), t("components.execution_time"), /* @__PURE__ */React__default.default.createElement(index$6, {
235
244
  style: {
236
245
  marginLeft: 0
237
246
  },
@@ -258,10 +267,23 @@ const Monthly = ({
258
267
  t,
259
268
  i18n
260
269
  } = useParrotTranslation();
261
- const mark = i18n.language === parrot.ParrotLngs.en ? " , " : "\u3001";
270
+ let date;
271
+ if (i18n.language === parrot.ParrotLngs.en && mayNotExistDays.length === 3) {
272
+ date = `${mayNotExistDays[0]}, ${mayNotExistDays[1]}, or ${mayNotExistDays[2]}`;
273
+ } else {
274
+ date = mayNotExistDays.join(i18n.t("components.date_mark"));
275
+ }
262
276
  return /* @__PURE__ */React__default.default.createElement("div", {
263
277
  className: Wrapper
264
- }, t("components.per_day_1"), /* @__PURE__ */React__default.default.createElement(index$3.Int, {
278
+ }, /* @__PURE__ */React__default.default.createElement(index$5.ParrotTrans, {
279
+ i18nKey: "components.month_with_below_date",
280
+ count: monthly.step,
281
+ values: {
282
+ day: t("components.day_date", {
283
+ count: monthly.days.length
284
+ })
285
+ }
286
+ }, /* @__PURE__ */React__default.default.createElement(index$3.Int, {
265
287
  meta: {},
266
288
  input: {
267
289
  value: monthly.step,
@@ -275,7 +297,7 @@ const Monthly = ({
275
297
  onFocus() {},
276
298
  maxLength: 3
277
299
  }
278
- }), t("components.month_with_below_date"), /* @__PURE__ */React__default.default.createElement("div", {
300
+ })), /* @__PURE__ */React__default.default.createElement("div", {
279
301
  className: "options"
280
302
  }, MONTH_DAYS.map(d => {
281
303
  const active = monthly.days.includes(d);
@@ -290,8 +312,8 @@ const Monthly = ({
290
312
  }), mayNotExistDays.length > 0 && /* @__PURE__ */React__default.default.createElement("span", {
291
313
  className: core.cx("help", index$1.Typo.Label.l4_regular)
292
314
  }, t("components.will_excute_at_last_day_with_date", {
293
- date: `${mayNotExistDays.join(mark)} `
294
- }))), t("components.execution_time"), /* @__PURE__ */React__default.default.createElement(index$5, {
315
+ date
316
+ }))), t("components.execution_time"), /* @__PURE__ */React__default.default.createElement(index$6, {
295
317
  style: {
296
318
  marginLeft: 0
297
319
  },
@@ -399,7 +421,7 @@ const CronPlan = props => {
399
421
  onChange: v => changeValue({
400
422
  enabled: v
401
423
  })
402
- }, value.enabled ? t("common.enable") : t("common.disable"))), /* @__PURE__ */React__default.default.createElement("span", {
424
+ }, value.enabled ? t("common.enabled") : t("common.disabled"))), /* @__PURE__ */React__default.default.createElement("span", {
403
425
  className: "close",
404
426
  onClick: onRemove
405
427
  }, /* @__PURE__ */React__default.default.createElement(iconsReact.CloseIcon, null)))),