@gisce/react-ooui 2.0.0-alpha.47 → 2.0.0-alpha.49
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/common/DatePicker.d.ts.map +1 -1
- package/dist/helpers/dayjs.d.ts +3 -0
- package/dist/helpers/dayjs.d.ts.map +1 -0
- package/dist/react-ooui.es.js +625 -618
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/widgets/base/Time.d.ts.map +1 -1
- package/dist/widgets/custom/Comments.d.ts.map +1 -1
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/common/DatePicker.tsx +1 -5
- package/src/helpers/dayjs.ts +21 -0
- package/src/widgets/base/Time.tsx +3 -6
- package/src/widgets/custom/Comments.tsx +4 -7
- package/src/widgets/views/DashboardGrid/DashboardGridItem.tsx +2 -2
- package/src/widgets/views/Graph/GraphChart.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../../src/widgets/base/Time.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../../src/widgets/base/Time.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,QAAA,MAAM,IAAI,UAAW,WAAW,4CAQ/B,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,cAAc,4CAa9C,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Comments.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Comments.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Comments.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Comments.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAwBtC,KAAK,eAAe,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,eAAe,GAAG,eAAe,CAAC;CAC1C,CAAC;AA0BF,eAAO,MAAM,OAAO,UAAW,YAAY,4CAqB1C,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,iBAAiB,4CAahD,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,4CAiB5D,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAAW,WAAW,4CAMvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardGridItem.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/DashboardGrid/DashboardGridItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DashboardGridItem.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/DashboardGrid/DashboardGridItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAQnE,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,4CAqD9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gisce/react-ooui",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.49",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "20.5.0"
|
|
6
6
|
},
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
|
-
"import": "./dist/react-ooui.es.js"
|
|
19
|
+
"import": "./dist/react-ooui.es.js",
|
|
20
|
+
"types": "./dist/index.d.ts"
|
|
20
21
|
}
|
|
21
22
|
},
|
|
22
23
|
"scripts": {
|
|
@@ -4,12 +4,8 @@ import React from "react";
|
|
|
4
4
|
import Field from "@/common/Field";
|
|
5
5
|
import { WidgetProps } from "@/types";
|
|
6
6
|
import { Date as DateOoui } from "@gisce/ooui";
|
|
7
|
-
import dayjs from "dayjs";
|
|
8
|
-
import weekday from "dayjs/plugin/weekday";
|
|
9
|
-
import localeData from "dayjs/plugin/localeData";
|
|
7
|
+
import dayjs from "@/helpers/dayjs";
|
|
10
8
|
const { useToken } = theme;
|
|
11
|
-
dayjs.extend(weekday);
|
|
12
|
-
dayjs.extend(localeData);
|
|
13
9
|
|
|
14
10
|
type DatePickerProps = WidgetProps & {
|
|
15
11
|
showTime?: boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
|
|
3
|
+
import advancedFormat from "dayjs/plugin/advancedFormat";
|
|
4
|
+
import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
5
|
+
import isoWeek from "dayjs/plugin/isoWeek";
|
|
6
|
+
import timezone from "dayjs/plugin/timezone";
|
|
7
|
+
import duration from "dayjs/plugin/duration";
|
|
8
|
+
import relativeTime from "dayjs/plugin/relativeTime";
|
|
9
|
+
import weekday from "dayjs/plugin/weekday";
|
|
10
|
+
import localeData from "dayjs/plugin/localeData";
|
|
11
|
+
|
|
12
|
+
dayjs.extend(advancedFormat);
|
|
13
|
+
dayjs.extend(customParseFormat);
|
|
14
|
+
dayjs.extend(isoWeek);
|
|
15
|
+
dayjs.extend(timezone);
|
|
16
|
+
dayjs.extend(duration);
|
|
17
|
+
dayjs.extend(relativeTime);
|
|
18
|
+
dayjs.extend(weekday);
|
|
19
|
+
dayjs.extend(localeData);
|
|
20
|
+
|
|
21
|
+
export default dayjs;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TimePicker, theme } from "antd";
|
|
1
|
+
import { TimePicker } from "antd";
|
|
3
2
|
import Field from "@/common/Field";
|
|
4
3
|
import { Time as TimeOoui } from "@gisce/ooui";
|
|
5
4
|
import { WidgetProps } from "@/types";
|
|
6
|
-
import dayjs
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
dayjs.extend(customParseFormat);
|
|
5
|
+
import dayjs from "@/helpers/dayjs";
|
|
6
|
+
import { Dayjs } from "dayjs";
|
|
10
7
|
|
|
11
8
|
const Time = (props: WidgetProps) => {
|
|
12
9
|
const { ooui } = props;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Fragment, useContext } from "react";
|
|
2
2
|
import Field from "@/common/Field";
|
|
3
3
|
import { WidgetProps } from "@/types";
|
|
4
4
|
import {
|
|
@@ -12,15 +12,12 @@ import {
|
|
|
12
12
|
} from "antd";
|
|
13
13
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
14
14
|
|
|
15
|
-
import dayjs from "dayjs";
|
|
16
|
-
import relativeTime from "dayjs/plugin/relativeTime";
|
|
15
|
+
import dayjs from "@/helpers/dayjs";
|
|
17
16
|
import md5 from "md5";
|
|
18
17
|
|
|
19
18
|
const { Meta } = Card;
|
|
20
19
|
const { Text } = Typography;
|
|
21
20
|
|
|
22
|
-
dayjs.extend(relativeTime);
|
|
23
|
-
|
|
24
21
|
type GravatarProps = {
|
|
25
22
|
email: string;
|
|
26
23
|
size?: number;
|
|
@@ -75,10 +72,10 @@ function TextWithNewlines({ text }: { text: string }) {
|
|
|
75
72
|
return (
|
|
76
73
|
<div>
|
|
77
74
|
{textParts.map((part, index) => (
|
|
78
|
-
<
|
|
75
|
+
<Fragment key={index}>
|
|
79
76
|
{part}
|
|
80
77
|
{index !== textParts.length - 1 && <br />}
|
|
81
|
-
</
|
|
78
|
+
</Fragment>
|
|
82
79
|
))}
|
|
83
80
|
</div>
|
|
84
81
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { DashboardGridItemProps } from "./DashboardGridItem.types";
|
|
3
2
|
import { ExportOutlined } from "@ant-design/icons";
|
|
4
3
|
import { Row, Col, Typography, theme } from "antd";
|
|
4
|
+
import ErrorBoundary from "antd/es/alert/ErrorBoundary";
|
|
5
5
|
const { useToken } = theme;
|
|
6
6
|
|
|
7
7
|
const { Text } = Typography;
|
|
@@ -56,7 +56,7 @@ export const DashboardGridItem = (props: DashboardGridItemProps) => {
|
|
|
56
56
|
</Col>
|
|
57
57
|
)}
|
|
58
58
|
</Row>
|
|
59
|
-
{children}
|
|
59
|
+
<ErrorBoundary>{children}</ErrorBoundary>
|
|
60
60
|
</div>
|
|
61
61
|
);
|
|
62
62
|
};
|