@cloudtower/eagle 0.23.0 → 0.23.2
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/dist/UIKitProvider/index.d.ts +2 -0
- package/dist/esm/index.js +60 -55
- package/dist/esm/stats1.html +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/spec/base.d.ts +2 -0
- package/dist/style.css +1558 -1558
- package/dist/umd/index.js +61 -54
- package/dist/umd/stats1.html +1 -1
- package/package.json +5 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfigProviderProps } from "antd/lib/config-provider";
|
|
1
2
|
import React, { PropsWithChildren } from "react";
|
|
2
3
|
import { BatchHelper } from "../components";
|
|
3
4
|
import { Kit } from "../spec";
|
|
@@ -6,6 +7,7 @@ interface IProps {
|
|
|
6
7
|
message?: {
|
|
7
8
|
batch?: BatchHelper;
|
|
8
9
|
};
|
|
10
|
+
antdConfig?: ConfigProviderProps;
|
|
9
11
|
}
|
|
10
12
|
export declare const kitContext: React.Context<Kit<any, HTMLElement>>;
|
|
11
13
|
declare const UIKitProvider: (props: PropsWithChildren<IProps>) => JSX.Element;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Alert as Alert$1, Badge as Badge$1, Button as Button$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, DatePicker, Select as Select$1, InputNumber as InputNumber$1, Input as Input$1, TimePicker as TimePicker$1, message, Modal as Modal$1, Steps as Steps$1, Dropdown, Menu, Progress as Progress$1, Radio as Radio$1, Switch as Switch$1, Table as Table$1, Space, Form, List, Tag, Row, Col, Tree, Divider, Skeleton, Layout, AutoComplete, Popover, Timeline, Typography, Cascader, Upload, Calendar, Tabs } from 'antd';
|
|
1
|
+
import { Alert as Alert$1, Badge as Badge$1, Button as Button$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, DatePicker, Select as Select$1, InputNumber as InputNumber$1, Input as Input$1, TimePicker as TimePicker$1, message, Modal as Modal$1, Steps as Steps$1, Dropdown, Menu, Progress as Progress$1, Radio as Radio$1, Switch as Switch$1, Table as Table$1, Space, Form, List, Tag, Row, Col, Tree, Divider, Skeleton, Layout, AutoComplete, Popover, Timeline, Typography, Cascader, Upload, Calendar, Tabs, ConfigProvider } from 'antd';
|
|
2
2
|
export { Col, Row } from 'antd';
|
|
3
3
|
import React, { useState, useMemo, useRef, useCallback, useEffect, Fragment, useLayoutEffect, createContext, memo, useImperativeHandle, useContext } from 'react';
|
|
4
4
|
import cs from 'classnames';
|
|
5
5
|
import _, { uniqBy, groupBy, sortBy, toPairs } from 'lodash';
|
|
6
|
-
import {
|
|
7
|
-
export * from '@cloudtower/parrot';
|
|
6
|
+
import { useTranslation, withTranslation, I18nextProvider } from 'react-i18next';
|
|
8
7
|
import { cx } from '@linaria/core';
|
|
9
8
|
import { styled } from '@linaria/react';
|
|
10
9
|
import moment from 'moment';
|
|
@@ -16,7 +15,8 @@ import { createDispatchHook, createSelectorHook, Provider } from 'react-redux';
|
|
|
16
15
|
import { XmarkRemove16SecondaryIcon, XmarkRemove16RegularRedIcon, HandlePoint816SecondaryIcon, HandlePoint816BlueIcon, CheckmarkDoneSuccessCorrect16BlueIcon } from '@cloudtower/icons-react';
|
|
17
16
|
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
18
17
|
import TimeZones from 'timezones.json';
|
|
19
|
-
import {
|
|
18
|
+
import { parrotI18n } from '@cloudtower/parrot';
|
|
19
|
+
export * from '@cloudtower/parrot';
|
|
20
20
|
import dayjs from 'dayjs';
|
|
21
21
|
import 'recharts';
|
|
22
22
|
|
|
@@ -477,10 +477,11 @@ const Alert = (_a) => {
|
|
|
477
477
|
};
|
|
478
478
|
|
|
479
479
|
const Arch = (props) => {
|
|
480
|
+
const { t } = useTranslation();
|
|
480
481
|
const { architecture } = props;
|
|
481
482
|
let text = "";
|
|
482
483
|
if (architecture) {
|
|
483
|
-
text =
|
|
484
|
+
text = t(`components.Architecture_${architecture}`);
|
|
484
485
|
}
|
|
485
486
|
return /* @__PURE__ */ React.createElement("span", null, text);
|
|
486
487
|
};
|
|
@@ -975,11 +976,12 @@ const Byte = ({
|
|
|
975
976
|
valueClassName,
|
|
976
977
|
unitClassName
|
|
977
978
|
}) => {
|
|
979
|
+
const { t } = useTranslation();
|
|
978
980
|
if (isEmpty(rawValue)) {
|
|
979
981
|
return Empty;
|
|
980
982
|
}
|
|
981
983
|
if (rawValue === -1) {
|
|
982
|
-
return /* @__PURE__ */ React.createElement("span", null,
|
|
984
|
+
return /* @__PURE__ */ React.createElement("span", null, t("common.calculation"));
|
|
983
985
|
}
|
|
984
986
|
const { value, unit } = formatBytes(rawValue, decimals);
|
|
985
987
|
if (noUnitOnZero && value === 0) {
|
|
@@ -2597,10 +2599,11 @@ var __objRest$5 = (source, exclude) => {
|
|
|
2597
2599
|
};
|
|
2598
2600
|
const Modal = (props) => {
|
|
2599
2601
|
var _b;
|
|
2602
|
+
const { t } = useTranslation();
|
|
2600
2603
|
const _a = props, {
|
|
2601
2604
|
error,
|
|
2602
|
-
okText =
|
|
2603
|
-
cancelText =
|
|
2605
|
+
okText = t("common.confirm"),
|
|
2606
|
+
cancelText = t("common.cancel"),
|
|
2604
2607
|
confirmLoading,
|
|
2605
2608
|
okButtonProps,
|
|
2606
2609
|
onOk,
|
|
@@ -2649,12 +2652,12 @@ const Modal = (props) => {
|
|
|
2649
2652
|
let text = (okButtonProps == null ? void 0 : okButtonProps.children) || okText;
|
|
2650
2653
|
if (wizard && typeof wizard === "object" && wizard.steps[wizard.step]) {
|
|
2651
2654
|
const { step, steps } = wizard;
|
|
2652
|
-
text = step < steps.length - 1 ? steps[step].okText ||
|
|
2655
|
+
text = step < steps.length - 1 ? steps[step].okText || t("common.next_step") : steps[step].okText || text;
|
|
2653
2656
|
}
|
|
2654
2657
|
return text;
|
|
2655
|
-
}, [okButtonProps, okText, wizard]);
|
|
2658
|
+
}, [okButtonProps == null ? void 0 : okButtonProps.children, okText, t, wizard]);
|
|
2656
2659
|
const prevText = useMemo(() => {
|
|
2657
|
-
let text = /* @__PURE__ */ React.createElement("span", null, "< ",
|
|
2660
|
+
let text = /* @__PURE__ */ React.createElement("span", null, "< ", t("common.prev_step"));
|
|
2658
2661
|
if (wizard && typeof wizard === "object" && wizard.steps[wizard.step]) {
|
|
2659
2662
|
const { step, steps } = wizard;
|
|
2660
2663
|
if (typeof steps[step].prevText === "string") {
|
|
@@ -2664,7 +2667,7 @@ const Modal = (props) => {
|
|
|
2664
2667
|
}
|
|
2665
2668
|
}
|
|
2666
2669
|
return text;
|
|
2667
|
-
}, [wizard]);
|
|
2670
|
+
}, [t, wizard]);
|
|
2668
2671
|
const stepsRef = useRef([]);
|
|
2669
2672
|
if (wizard && typeof wizard === "object" && !wizard.destroyOtherStep && wizard.steps[wizard.step]) {
|
|
2670
2673
|
stepsRef.current[wizard.step] = wizard.steps[wizard.step].render;
|
|
@@ -2781,6 +2784,9 @@ const Pagination = props => {
|
|
|
2781
2784
|
selectorVisible = true
|
|
2782
2785
|
} = props;
|
|
2783
2786
|
const sizeRef = useRef(size);
|
|
2787
|
+
const {
|
|
2788
|
+
t
|
|
2789
|
+
} = useTranslation();
|
|
2784
2790
|
useEffect(() => {
|
|
2785
2791
|
if (sizeRef.current === size) return;
|
|
2786
2792
|
sizeRef.current = size;
|
|
@@ -2795,18 +2801,18 @@ const Pagination = props => {
|
|
|
2795
2801
|
const lastRange2 = value + size;
|
|
2796
2802
|
return {
|
|
2797
2803
|
value: i + 1,
|
|
2798
|
-
text:
|
|
2804
|
+
text: t("components.pagination_range", {
|
|
2799
2805
|
range1: value + 1,
|
|
2800
2806
|
range2: lastRange2 > count ? count : lastRange2
|
|
2801
2807
|
})
|
|
2802
2808
|
};
|
|
2803
2809
|
});
|
|
2804
|
-
}, [selectorVisible, count, size]);
|
|
2810
|
+
}, [selectorVisible, count, size, t]);
|
|
2805
2811
|
let lastRange = current * size;
|
|
2806
2812
|
lastRange = lastRange > count ? count : lastRange;
|
|
2807
2813
|
const renderLeft = () => {
|
|
2808
2814
|
if (!showTotal) return null;
|
|
2809
|
-
const content =
|
|
2815
|
+
const content = t("components.pagination_total", {
|
|
2810
2816
|
range1: (current - 1) * size + 1,
|
|
2811
2817
|
range2: lastRange,
|
|
2812
2818
|
total: count
|
|
@@ -2816,7 +2822,7 @@ const Pagination = props => {
|
|
|
2816
2822
|
placement: "topLeft",
|
|
2817
2823
|
overlayClassName: DropdownOverlayStyle,
|
|
2818
2824
|
overlay: /* @__PURE__ */React.createElement(Menu, null, /* @__PURE__ */React.createElement(Menu.ItemGroup, {
|
|
2819
|
-
title:
|
|
2825
|
+
title: t("components.push_to")
|
|
2820
2826
|
}, selectOptions.map(option => /* @__PURE__ */React.createElement(Menu.Item, {
|
|
2821
2827
|
key: option.value,
|
|
2822
2828
|
onClick: () => onChange(option.value)
|
|
@@ -2851,7 +2857,7 @@ const Pagination = props => {
|
|
|
2851
2857
|
onClick: () => {
|
|
2852
2858
|
onChange == null ? void 0 : onChange(current - 1);
|
|
2853
2859
|
}
|
|
2854
|
-
},
|
|
2860
|
+
}, t("components.previous_items", {
|
|
2855
2861
|
size
|
|
2856
2862
|
})), current * size < count && /* @__PURE__ */React.createElement(Button, {
|
|
2857
2863
|
className: "next-btn",
|
|
@@ -2864,7 +2870,7 @@ const Pagination = props => {
|
|
|
2864
2870
|
onClick: () => {
|
|
2865
2871
|
onChange == null ? void 0 : onChange(current + 1);
|
|
2866
2872
|
}
|
|
2867
|
-
},
|
|
2873
|
+
}, t("components.next_items", {
|
|
2868
2874
|
size
|
|
2869
2875
|
}))));
|
|
2870
2876
|
};
|
|
@@ -3075,11 +3081,12 @@ const Second = ({
|
|
|
3075
3081
|
unitClassName,
|
|
3076
3082
|
abbreviate
|
|
3077
3083
|
}) => {
|
|
3084
|
+
const { t } = useTranslation();
|
|
3078
3085
|
if (isEmpty(rawValue)) {
|
|
3079
3086
|
return Empty;
|
|
3080
3087
|
}
|
|
3081
3088
|
const { value, unit } = formatSeconds(rawValue, decimals);
|
|
3082
|
-
return /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", { className: cx("value", valueClassName) }, value, " "), /* @__PURE__ */ React.createElement("span", { className: cx("unit", unitClassName) },
|
|
3089
|
+
return /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", { className: cx("value", valueClassName) }, value, " "), /* @__PURE__ */ React.createElement("span", { className: cx("unit", unitClassName) }, t(`common.${abbreviate ? `${unit}_abbreviation` : unit}`)));
|
|
3083
3090
|
};
|
|
3084
3091
|
|
|
3085
3092
|
const inputStyle = "igz4le8";
|
|
@@ -3091,6 +3098,9 @@ const SimplePagination = props => {
|
|
|
3091
3098
|
size,
|
|
3092
3099
|
onPageChange
|
|
3093
3100
|
} = props;
|
|
3101
|
+
const {
|
|
3102
|
+
t
|
|
3103
|
+
} = useTranslation();
|
|
3094
3104
|
const pageLength = Math.ceil(count / size);
|
|
3095
3105
|
const showPrev = current > 1;
|
|
3096
3106
|
const showNext = current * size < count;
|
|
@@ -3106,7 +3116,7 @@ const SimplePagination = props => {
|
|
|
3106
3116
|
className: cs(PaginationStyle, "pagination-wrapper", className)
|
|
3107
3117
|
}, /* @__PURE__ */React.createElement("span", {
|
|
3108
3118
|
className: Typo.Label.l3_regular_title
|
|
3109
|
-
},
|
|
3119
|
+
}, t("components.pagination_lots_total", {
|
|
3110
3120
|
total: count
|
|
3111
3121
|
})), /* @__PURE__ */React.createElement("span", {
|
|
3112
3122
|
className: "pagination-right"
|
|
@@ -3540,6 +3550,7 @@ const AddRowButton = (props) => {
|
|
|
3540
3550
|
updateData,
|
|
3541
3551
|
data
|
|
3542
3552
|
} = props;
|
|
3553
|
+
const { t } = useTranslation();
|
|
3543
3554
|
const _a = buttonProps || {}, {
|
|
3544
3555
|
disabled: disabledFromProp,
|
|
3545
3556
|
onClick
|
|
@@ -3580,7 +3591,7 @@ const AddRowButton = (props) => {
|
|
|
3580
3591
|
},
|
|
3581
3592
|
disabled
|
|
3582
3593
|
}),
|
|
3583
|
-
CustomizedButtonText ||
|
|
3594
|
+
CustomizedButtonText || t("components.add")
|
|
3584
3595
|
), typeof maximum === "number" ? /* @__PURE__ */ React.createElement(
|
|
3585
3596
|
"span",
|
|
3586
3597
|
{
|
|
@@ -3590,7 +3601,7 @@ const AddRowButton = (props) => {
|
|
|
3590
3601
|
disabled && "disabled"
|
|
3591
3602
|
)
|
|
3592
3603
|
},
|
|
3593
|
-
|
|
3604
|
+
t("components.maximum_row_count_desc", {
|
|
3594
3605
|
count: maximum
|
|
3595
3606
|
})
|
|
3596
3607
|
) : null);
|
|
@@ -3599,6 +3610,7 @@ const AddRowButton = (props) => {
|
|
|
3599
3610
|
const AffixColumnHeaderCell = ({ data, column, onChange, onBlur }) => {
|
|
3600
3611
|
const [suffix, setSuffix] = useState("");
|
|
3601
3612
|
const [prefix, setPrefix] = useState("");
|
|
3613
|
+
const { t } = useTranslation();
|
|
3602
3614
|
const onPrefixChange = useCallback(
|
|
3603
3615
|
(e) => {
|
|
3604
3616
|
const newPrefix = e.target.value;
|
|
@@ -3619,7 +3631,7 @@ const AffixColumnHeaderCell = ({ data, column, onChange, onBlur }) => {
|
|
|
3619
3631
|
Input$1,
|
|
3620
3632
|
{
|
|
3621
3633
|
value: prefix,
|
|
3622
|
-
placeholder:
|
|
3634
|
+
placeholder: t("components.prefix"),
|
|
3623
3635
|
size: "small",
|
|
3624
3636
|
onChange: onPrefixChange,
|
|
3625
3637
|
onBlur
|
|
@@ -3628,7 +3640,7 @@ const AffixColumnHeaderCell = ({ data, column, onChange, onBlur }) => {
|
|
|
3628
3640
|
Input$1,
|
|
3629
3641
|
{
|
|
3630
3642
|
value: suffix,
|
|
3631
|
-
placeholder:
|
|
3643
|
+
placeholder: t("components.suffix"),
|
|
3632
3644
|
size: "small",
|
|
3633
3645
|
onChange: onSuffixChange,
|
|
3634
3646
|
onBlur
|
|
@@ -4019,6 +4031,7 @@ const TableFormRow = (props) => {
|
|
|
4019
4031
|
rowValidator,
|
|
4020
4032
|
validateAll
|
|
4021
4033
|
} = props;
|
|
4034
|
+
const { t } = useTranslation();
|
|
4022
4035
|
const rowData = data[rowIndex];
|
|
4023
4036
|
const [rowError, setRowError] = useState();
|
|
4024
4037
|
const deleteRow = useCallback(
|
|
@@ -4049,7 +4062,7 @@ const TableFormRow = (props) => {
|
|
|
4049
4062
|
}
|
|
4050
4063
|
}
|
|
4051
4064
|
);
|
|
4052
|
-
const FinalRenderIcon = isRowDeleteDisabled ? DeleteIcon : /* @__PURE__ */ React.createElement(Tooltip, { title:
|
|
4065
|
+
const FinalRenderIcon = isRowDeleteDisabled ? DeleteIcon : /* @__PURE__ */ React.createElement(Tooltip, { title: t("components.remove") }, DeleteIcon);
|
|
4053
4066
|
return (deleteConfig == null ? void 0 : deleteConfig.deletable) ? [FinalRenderIcon] : void 0;
|
|
4054
4067
|
}, [rowIndex, deleteConfig, data, deleteRow]);
|
|
4055
4068
|
const getRowValidateResult = useCallback(
|
|
@@ -4432,7 +4445,6 @@ const OptionFirstLineStyle = cx("oiy0apc", Typo.Label.l3_regular);
|
|
|
4432
4445
|
const OptionSecondLineStyle = cx("of4y382", Typo.Label.l4_regular);
|
|
4433
4446
|
const TagStyle = "t19903l9";
|
|
4434
4447
|
const BrowserTimeValue = "browser_time_zone";
|
|
4435
|
-
const DefaultTimeValue = "default_time_zone";
|
|
4436
4448
|
const browserTzName = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
4437
4449
|
const browserTz = allTimeZones.find(tz => tz.value === browserTzName) || allTimeZones[0];
|
|
4438
4450
|
const TimeZoneSelect = props => {
|
|
@@ -4442,23 +4454,20 @@ const TimeZoneSelect = props => {
|
|
|
4442
4454
|
disabled,
|
|
4443
4455
|
defaultUseBrowserTime,
|
|
4444
4456
|
className,
|
|
4445
|
-
placeholder
|
|
4446
|
-
defaultOptionValue
|
|
4457
|
+
placeholder
|
|
4447
4458
|
} = props;
|
|
4448
4459
|
const [innerValue, setInnerValue] = useState(value);
|
|
4449
|
-
const
|
|
4450
|
-
|
|
4451
|
-
}
|
|
4460
|
+
const {
|
|
4461
|
+
t
|
|
4462
|
+
} = useTranslation();
|
|
4452
4463
|
const _onChange = useCallback(val => {
|
|
4453
4464
|
setInnerValue(val);
|
|
4454
4465
|
if (val === BrowserTimeValue) {
|
|
4455
4466
|
onChange(browserTzName);
|
|
4456
|
-
} else if (val === DefaultTimeValue && defaultTz) {
|
|
4457
|
-
onChange(defaultTz == null ? void 0 : defaultTz.value);
|
|
4458
4467
|
} else {
|
|
4459
4468
|
onChange(val);
|
|
4460
4469
|
}
|
|
4461
|
-
}, [
|
|
4470
|
+
}, [onChange]);
|
|
4462
4471
|
useEffect(() => {
|
|
4463
4472
|
if (defaultUseBrowserTime && !value) {
|
|
4464
4473
|
setInnerValue(BrowserTimeValue);
|
|
@@ -4467,16 +4476,15 @@ const TimeZoneSelect = props => {
|
|
|
4467
4476
|
}, []);
|
|
4468
4477
|
useEffect(() => {
|
|
4469
4478
|
if (innerValue === BrowserTimeValue && value === browserTzName) return;
|
|
4470
|
-
if (innerValue === DefaultTimeValue && value === (defaultTz == null ? void 0 : defaultTz.value)) return;
|
|
4471
4479
|
if (innerValue === value) return;
|
|
4472
4480
|
setInnerValue(value);
|
|
4473
|
-
}, [
|
|
4481
|
+
}, [innerValue, value]);
|
|
4474
4482
|
const timeZoneOptionGroups = timeZoneGroups.map(([key, timezones]) => {
|
|
4475
4483
|
return /* @__PURE__ */React.createElement(Select$1.OptGroup, {
|
|
4476
4484
|
label: key.toUpperCase()
|
|
4477
4485
|
}, timezones.map(zone => {
|
|
4478
4486
|
return /* @__PURE__ */React.createElement(Select$1.Option, {
|
|
4479
|
-
label: zone.value
|
|
4487
|
+
label: `${zone.value} (${getUTCOffsetText(zone.offset)})`,
|
|
4480
4488
|
value: zone.value,
|
|
4481
4489
|
className: OptionWrapperStyle
|
|
4482
4490
|
}, /* @__PURE__ */React.createElement(TimeZoneOption, {
|
|
@@ -4488,7 +4496,7 @@ const TimeZoneSelect = props => {
|
|
|
4488
4496
|
return /* @__PURE__ */React.createElement(Select, {
|
|
4489
4497
|
className: cx(SelectStyle, className),
|
|
4490
4498
|
dropdownClassName: DropdownStyle,
|
|
4491
|
-
placeholder: /* @__PURE__ */React.createElement("span", null, placeholder ||
|
|
4499
|
+
placeholder: /* @__PURE__ */React.createElement("span", null, placeholder || t("components.time_zone_select_placeholder")),
|
|
4492
4500
|
value: innerValue,
|
|
4493
4501
|
onChange: _onChange,
|
|
4494
4502
|
showSearch: true,
|
|
@@ -4498,28 +4506,20 @@ const TimeZoneSelect = props => {
|
|
|
4498
4506
|
},
|
|
4499
4507
|
optionLabelProp: "label",
|
|
4500
4508
|
input: {}
|
|
4501
|
-
},
|
|
4502
|
-
value: DefaultTimeValue,
|
|
4503
|
-
label: `${parrotI18n.t("components.default_time_zone")} (${getUTCOffsetText(defaultTz.offset)})`,
|
|
4504
|
-
className: OptionWrapperStyle
|
|
4505
|
-
}, /* @__PURE__ */React.createElement(TimeZoneOption, {
|
|
4506
|
-
key: DefaultTimeValue,
|
|
4507
|
-
customLabel: parrotI18n.t("components.default_time_zone"),
|
|
4508
|
-
timeZone: defaultTz
|
|
4509
|
-
})) : void 0, /* @__PURE__ */React.createElement(Select$1.Option, {
|
|
4509
|
+
}, /* @__PURE__ */React.createElement(Select$1.Option, {
|
|
4510
4510
|
value: BrowserTimeValue,
|
|
4511
|
-
label: `${
|
|
4511
|
+
label: `${t("components.browser_time_zone")} (${getUTCOffsetText(browserTz.offset)})`,
|
|
4512
4512
|
className: OptionWrapperStyle
|
|
4513
4513
|
}, /* @__PURE__ */React.createElement(TimeZoneOption, {
|
|
4514
4514
|
key: BrowserTimeValue,
|
|
4515
|
-
customLabel:
|
|
4515
|
+
customLabel: t("components.browser_time_zone"),
|
|
4516
4516
|
timeZone: browserTz
|
|
4517
4517
|
})), /* @__PURE__ */React.createElement(Select$1.Option, {
|
|
4518
4518
|
value: "UTC",
|
|
4519
4519
|
className: OptionWrapperStyle
|
|
4520
4520
|
}, /* @__PURE__ */React.createElement(TimeZoneOption, {
|
|
4521
4521
|
key: "utc",
|
|
4522
|
-
customLabel:
|
|
4522
|
+
customLabel: t("components.coorddinated_universal_time"),
|
|
4523
4523
|
timeZone: {
|
|
4524
4524
|
value: "UTC",
|
|
4525
4525
|
text: "UTC",
|
|
@@ -4565,6 +4565,7 @@ function getAntdKit() {
|
|
|
4565
4565
|
pagination: Pagination,
|
|
4566
4566
|
select: Select,
|
|
4567
4567
|
option: Select$1.Option,
|
|
4568
|
+
selectOptGroup: Select$1.OptGroup,
|
|
4568
4569
|
table: Table,
|
|
4569
4570
|
row: Row,
|
|
4570
4571
|
col: Col,
|
|
@@ -4636,7 +4637,8 @@ function getAntdKit() {
|
|
|
4636
4637
|
antdMessage: message,
|
|
4637
4638
|
antdButton: Button$1,
|
|
4638
4639
|
antdSelect: Select$1,
|
|
4639
|
-
antdTooltip: Tooltip$1
|
|
4640
|
+
antdTooltip: Tooltip$1,
|
|
4641
|
+
antdModal: Modal$1
|
|
4640
4642
|
};
|
|
4641
4643
|
kit.option.isSelectOption = true;
|
|
4642
4644
|
kit.button.__ANT_BUTTON = true;
|
|
@@ -4670,6 +4672,9 @@ const FailedLoad = props => {
|
|
|
4670
4672
|
title,
|
|
4671
4673
|
refetchText
|
|
4672
4674
|
} = props;
|
|
4675
|
+
const {
|
|
4676
|
+
t
|
|
4677
|
+
} = useTranslation();
|
|
4673
4678
|
return /* @__PURE__ */React.createElement("div", {
|
|
4674
4679
|
className: cs(FailedLoadStyle, className),
|
|
4675
4680
|
title
|
|
@@ -4678,7 +4683,7 @@ const FailedLoad = props => {
|
|
|
4678
4683
|
}, String(error)), /* @__PURE__ */React.createElement(Button, {
|
|
4679
4684
|
type: "ordinary",
|
|
4680
4685
|
onClick: () => refetch()
|
|
4681
|
-
}, refetchText ||
|
|
4686
|
+
}, refetchText || t("common.retry")));
|
|
4682
4687
|
};
|
|
4683
4688
|
|
|
4684
4689
|
function getRangeTimestamp(dateRange) {
|
|
@@ -4781,7 +4786,7 @@ var __spreadValues = (a, b) => {
|
|
|
4781
4786
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
4782
4787
|
const kitContext = createContext(antdKit);
|
|
4783
4788
|
const UIKitProvider = (props) => {
|
|
4784
|
-
const { children, kit = antdKit, message } = props;
|
|
4789
|
+
const { children, kit = antdKit, message, antdConfig } = props;
|
|
4785
4790
|
const _kit = useMemo(() => {
|
|
4786
4791
|
if ((message == null ? void 0 : message.batch) != null) {
|
|
4787
4792
|
return __spreadProps(__spreadValues({}, kit), {
|
|
@@ -4790,10 +4795,10 @@ const UIKitProvider = (props) => {
|
|
|
4790
4795
|
}
|
|
4791
4796
|
return kit;
|
|
4792
4797
|
}, [kit, message == null ? void 0 : message.batch]);
|
|
4793
|
-
return /* @__PURE__ */ React.createElement(kitContext.Provider, { value: _kit }, children);
|
|
4798
|
+
return /* @__PURE__ */ React.createElement(I18nextProvider, { i18n: parrotI18n }, /* @__PURE__ */ React.createElement(kitContext.Provider, { value: _kit }, /* @__PURE__ */ React.createElement(ConfigProvider, __spreadValues({ autoInsertSpaceInButton: false }, antdConfig), children)));
|
|
4794
4799
|
};
|
|
4795
4800
|
const useUIKit = () => {
|
|
4796
4801
|
return useContext(kitContext);
|
|
4797
4802
|
};
|
|
4798
4803
|
|
|
4799
|
-
export { Architecture, Button, ButtonStyle, EntityAsyncStatus, FailedLoad, Icon, InputTagItem, KitStoreProvider, ModalActions, ModalStack, TaskStatus, Typo, UIKitProvider, UIKitStore, UserSource, ValidateTriggerType, antdKit, closeModal, createBatchMessageMethods, kitContext, popModal, pushModal, tableStyleCover, tickFormatter, useElementsSize, useKitDispatch, useKitSelector, useUIKit };
|
|
4804
|
+
export { Architecture, Button, ButtonStyle, EntityAsyncStatus, FailedLoad, FullView, Icon, InputTagItem, KitStoreProvider, ModalActions, ModalStack, TaskStatus, Typo, UIKitProvider, UIKitStore, UserSource, ValidateTriggerType, WizardBody, antdKit, closeModal, createBatchMessageMethods, kitContext, popModal, pushModal, tableStyleCover, tickFormatter, useElementsSize, useKitDispatch, useKitSelector, useUIKit };
|