@pinnacle0/web-ui 0.2.101 → 0.3.0
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/admin/AdminApp/WithErrorBoundary.d.ts +2 -1
- package/admin/AdminApp/WithErrorBoundary.js +1 -1
- package/admin/AdminApp/WithErrorBoundary.js.map +1 -1
- package/core/DocumentTitle.d.ts +1 -1
- package/core/TypedTabs/index.d.ts +1 -0
- package/core/TypedTabs/index.js +1 -1
- package/core/TypedTabs/index.js.map +1 -1
- package/core/WithExplanation/index.d.ts +1 -1
- package/package.json +10 -10
- package/util/MediaUtil/index.js +7 -5
- package/util/MediaUtil/index.js.map +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface Props {
|
|
3
3
|
onLifecycleError?: (error: unknown, componentStack: string) => void;
|
|
4
|
+
children: React.ReactChild;
|
|
4
5
|
}
|
|
5
6
|
interface State {
|
|
6
7
|
error: Error | null;
|
|
@@ -9,6 +10,6 @@ export declare class WithErrorBoundary extends React.PureComponent<Props, State>
|
|
|
9
10
|
static displayName: string;
|
|
10
11
|
constructor(props: Props);
|
|
11
12
|
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
12
|
-
render():
|
|
13
|
+
render(): string | number | JSX.Element;
|
|
13
14
|
}
|
|
14
15
|
export {};
|
|
@@ -30,7 +30,7 @@ var WithErrorBoundary = /** @class */ (function (_super) {
|
|
|
30
30
|
WithErrorBoundary.prototype.render = function () {
|
|
31
31
|
var error = this.state.error;
|
|
32
32
|
return error ? (React.createElement(AdminPage, null,
|
|
33
|
-
React.createElement(AdminPage.Result, { type: "error", title: "Page Script Error", subtitle: error.message }))) : (this.props.children
|
|
33
|
+
React.createElement(AdminPage.Result, { type: "error", title: "Page Script Error", subtitle: error.message }))) : (this.props.children);
|
|
34
34
|
};
|
|
35
35
|
WithErrorBoundary.displayName = "WithErrorBoundary";
|
|
36
36
|
return WithErrorBoundary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithErrorBoundary.js","sourceRoot":"","sources":["../../../src/admin/AdminApp/WithErrorBoundary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"WithErrorBoundary.js","sourceRoot":"","sources":["../../../src/admin/AdminApp/WithErrorBoundary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAWvC;IAAuC,qCAAiC;IAGpE,2BAAY,KAAY;QAAxB,YACI,kBAAM,KAAK,CAAC,SAEf;QADG,KAAI,CAAC,KAAK,GAAG,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC;;IAC/B,CAAC;IAED,6CAAiB,GAAjB,UAAkB,KAAY,EAAE,SAA0B;;QACtD,IAAI,CAAC,QAAQ,CAAC,EAAC,KAAK,OAAA,EAAC,CAAC,CAAC;QACvB,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,gBAAgB,mDAAG,KAAK,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACnE,CAAC;IAED,kCAAM,GAAN;QACW,IAAA,KAAK,GAAI,IAAI,CAAC,KAAK,MAAd,CAAe;QAC3B,OAAO,KAAK,CAAC,CAAC,CAAC,CACX,oBAAC,SAAS;YACN,oBAAC,SAAS,CAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,mBAAmB,EAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,GAAI,CAC5E,CACf,CAAC,CAAC,CAAC,CACA,IAAI,CAAC,KAAK,CAAC,QAAQ,CACtB,CAAC;IACN,CAAC;IArBM,6BAAW,GAAG,mBAAmB,CAAC;IAsB7C,wBAAC;CAAA,AAvBD,CAAuC,KAAK,CAAC,aAAa,GAuBzD;SAvBY,iBAAiB"}
|
package/core/DocumentTitle.d.ts
CHANGED
|
@@ -23,6 +23,6 @@ export declare class DocumentTitle extends React.PureComponent<Props> {
|
|
|
23
23
|
componentDidUpdate(prevProps: Readonly<Props>): void;
|
|
24
24
|
componentWillUnmount(): void;
|
|
25
25
|
updateTitle: () => void;
|
|
26
|
-
render(): React.ReactElement<any, string | React.JSXElementConstructor<any
|
|
26
|
+
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
27
27
|
}
|
|
28
28
|
export {};
|
|
@@ -6,6 +6,7 @@ export interface TabData {
|
|
|
6
6
|
title: React.ReactElement | string;
|
|
7
7
|
content: SafeReactChildren;
|
|
8
8
|
display?: "default" | "hidden";
|
|
9
|
+
disabled?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare type TypedTabMap<T extends string> = Record<T, TabData>;
|
|
11
12
|
export declare type TypedTabList<T extends string> = Array<TabData & {
|
package/core/TypedTabs/index.js
CHANGED
|
@@ -67,7 +67,7 @@ var TypedTabs = /** @class */ (function (_super) {
|
|
|
67
67
|
});
|
|
68
68
|
return (React.createElement(Tabs, __assign({ onChange: onChange }, restProps), tabList
|
|
69
69
|
.filter(function (_) { return _.display !== "hidden"; })
|
|
70
|
-
.map(function (_) { return (React.createElement(Tabs.TabPane, { tab: _.title, key: _.key }, _.content)); })));
|
|
70
|
+
.map(function (_) { return (React.createElement(Tabs.TabPane, { tab: _.title, key: _.key, disabled: _.disabled }, _.content)); })));
|
|
71
71
|
};
|
|
72
72
|
TypedTabs.displayName = "TypedTabs";
|
|
73
73
|
return TypedTabs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/TypedTabs/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO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CACV,CAAC;IACN,CAAC;IAjBM,qBAAW,GAAG,WAAW,CAAC;IAkBrC,gBAAC;CAAA,AAnBD,CAAiD,KAAK,CAAC,aAAa,GAmBnE;SAnBY,SAAS"}
|
|
@@ -17,5 +17,5 @@ export interface Props {
|
|
|
17
17
|
export declare class WithExplanation extends React.PureComponent<Props> {
|
|
18
18
|
static displayName: string;
|
|
19
19
|
static defaultProps: PickOptional<Props>;
|
|
20
|
-
render(): string | number | true | JSX.Element | import("../../internal/type").SafeReactChild[]
|
|
20
|
+
render(): string | number | true | JSX.Element | import("../../internal/type").SafeReactChild[];
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinnacle0/web-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"author": "Pinnacle",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@ant-design/icons": "4.7.0",
|
|
27
|
-
"antd": "4.
|
|
27
|
+
"antd": "4.20.1",
|
|
28
28
|
"braft-editor": "2.3.9",
|
|
29
|
-
"moment": "2.29.
|
|
29
|
+
"moment": "2.29.3"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@babel/runtime": ">=7.12.1",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@babel/core": "7.17.8",
|
|
39
39
|
"@babel/runtime": "7.17.8",
|
|
40
|
-
"@testing-library/dom": "8.
|
|
41
|
-
"@testing-library/jest-dom": "5.16.
|
|
42
|
-
"@testing-library/react": "
|
|
43
|
-
"@testing-library/user-event": "
|
|
40
|
+
"@testing-library/dom": "8.13.0",
|
|
41
|
+
"@testing-library/jest-dom": "5.16.4",
|
|
42
|
+
"@testing-library/react": "13.1.1",
|
|
43
|
+
"@testing-library/user-event": "14.1.1",
|
|
44
44
|
"@types/draft-js": "0.11.9",
|
|
45
45
|
"@types/history": "4.7.11",
|
|
46
|
-
"@types/react": "
|
|
46
|
+
"@types/react": "18.0.8",
|
|
47
47
|
"@types/react-dom": "17.0.14",
|
|
48
48
|
"@types/react-router-dom": "5.3.2",
|
|
49
49
|
"less": "4.1.2",
|
|
50
|
-
"react": "
|
|
51
|
-
"react-dom": "
|
|
50
|
+
"react": "18.1.0",
|
|
51
|
+
"react-dom": "18.1.0",
|
|
52
52
|
"react-router-dom": "5.3.0"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/util/MediaUtil/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import ReactDOM from "react-dom";
|
|
2
|
+
import ReactDOM from "react-dom/client";
|
|
3
3
|
import CloseOutlined from "@ant-design/icons/CloseOutlined";
|
|
4
4
|
import "./index.less";
|
|
5
5
|
function openImage(url) {
|
|
@@ -10,9 +10,10 @@ function openImage(url) {
|
|
|
10
10
|
bodyElement.removeChild(divElement);
|
|
11
11
|
resolve();
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
bodyElement.appendChild(divElement);
|
|
14
|
+
ReactDOM.createRoot(divElement).render(React.createElement("div", { onClick: closeModal, className: "g-media-modal" },
|
|
14
15
|
React.createElement("img", { src: url }),
|
|
15
|
-
React.createElement(CloseOutlined, null))
|
|
16
|
+
React.createElement(CloseOutlined, null)));
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
19
|
function openVideo(url) {
|
|
@@ -23,9 +24,10 @@ function openVideo(url) {
|
|
|
23
24
|
bodyElement.removeChild(divElement);
|
|
24
25
|
resolve();
|
|
25
26
|
};
|
|
26
|
-
ReactDOM.render(React.createElement("div", { onClick: closeModal, className: "g-media-modal" },
|
|
27
|
+
ReactDOM.createRoot(divElement).render(React.createElement("div", { onClick: closeModal, className: "g-media-modal" },
|
|
27
28
|
React.createElement("video", { src: url, autoPlay: true, controls: true, controlsList: "nodownload", muted: true }),
|
|
28
|
-
React.createElement(CloseOutlined, null))
|
|
29
|
+
React.createElement(CloseOutlined, null)));
|
|
30
|
+
bodyElement.appendChild(divElement);
|
|
29
31
|
});
|
|
30
32
|
}
|
|
31
33
|
function playAudio(url, amplitude) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/util/MediaUtil/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/util/MediaUtil/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAC5D,OAAO,cAAc,CAAC;AAEtB,SAAS,SAAS,CAAC,GAAW;IAC1B,OAAO,IAAI,OAAO,CAAO,UAAA,OAAO;QAC5B,IAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC;QAClC,IAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACjD,IAAM,UAAU,GAAG;YACf,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YACpC,OAAO,EAAE,CAAC;QACd,CAAC,CAAC;QAEF,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACpC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,MAAM,CAClC,6BAAK,OAAO,EAAE,UAAU,EAAE,SAAS,EAAC,eAAe;YAC/C,6BAAK,GAAG,EAAE,GAAG,GAAI;YACjB,oBAAC,aAAa,OAAG,CACf,CACT,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAC1B,OAAO,IAAI,OAAO,CAAO,UAAA,OA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