@j2inn/fin5-ui-utils 1.0.2-beta.8 → 1.0.3
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/README.md +5 -5
- package/dist/react/components/graphics/GraphicViewer.d.ts +1 -1
- package/dist/react/components/graphics/GraphicViewer.jsx +2 -1
- package/dist/react/components/graphics/GraphicViewer.jsx.map +1 -1
- package/dist/react/components/navigation/MenuPage.d.ts +1 -1
- package/dist_es/react/components/graphics/GraphicViewer.d.ts +1 -1
- package/dist_es/react/components/graphics/GraphicViewer.jsx +2 -1
- package/dist_es/react/components/graphics/GraphicViewer.jsx.map +1 -1
- package/dist_es/react/components/navigation/MenuPage.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# What is fin5-ui-utils? #
|
|
2
|
-
A set of useful client-side utilities useful for creating UI applications on top of the FIN 5 framework.
|
|
3
|
-
|
|
4
|
-
### How do I get set up? ###
|
|
5
|
-
To install this package run `npm i @j2inn/fin5-ui-utils`
|
|
1
|
+
# What is fin5-ui-utils? #
|
|
2
|
+
A set of useful client-side utilities useful for creating UI applications on top of the FIN 5 framework.
|
|
3
|
+
|
|
4
|
+
### How do I get set up? ###
|
|
5
|
+
To install this package run `npm i @j2inn/fin5-ui-utils`
|
|
@@ -10,6 +10,7 @@ exports.GraphicViewer = void 0;
|
|
|
10
10
|
const classnames_1 = __importDefault(require("classnames"));
|
|
11
11
|
const react_1 = __importDefault(require("react"));
|
|
12
12
|
const react_jss_1 = require("react-jss");
|
|
13
|
+
const fin5Top_1 = require("../../../fin5Top/fin5Top");
|
|
13
14
|
const useStyles = (0, react_jss_1.createUseStyles)({
|
|
14
15
|
iframe: {
|
|
15
16
|
width: '100%',
|
|
@@ -18,7 +19,7 @@ const useStyles = (0, react_jss_1.createUseStyles)({
|
|
|
18
19
|
overflow: 'hidden',
|
|
19
20
|
},
|
|
20
21
|
});
|
|
21
|
-
const GraphicViewer = ({ projectName, graphicId, targetRef, className, }) => {
|
|
22
|
+
const GraphicViewer = ({ projectName = fin5Top_1.fin5Top?.finstack?.projectName ?? '', graphicId, targetRef, className, }) => {
|
|
22
23
|
const classes = useStyles();
|
|
23
24
|
const url = new URL(`${window.location.protocol}//${window.location.host}/fin5/${projectName}`);
|
|
24
25
|
url.hash = `targetRef=${targetRef.toAxon()}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicViewer.jsx","sourceRoot":"","sources":["../../../../src/react/components/graphics/GraphicViewer.tsx"],"names":[],"mappings":";AAAA;;GAEG;;;;;;AAEH,4DAA2B;AAE3B,kDAAyB;AACzB,yCAA2C;
|
|
1
|
+
{"version":3,"file":"GraphicViewer.jsx","sourceRoot":"","sources":["../../../../src/react/components/graphics/GraphicViewer.tsx"],"names":[],"mappings":";AAAA;;GAEG;;;;;;AAEH,4DAA2B;AAE3B,kDAAyB;AACzB,yCAA2C;AAC3C,sDAAkD;AAElD,MAAM,SAAS,GAAG,IAAA,2BAAe,EAAC;IACjC,MAAM,EAAE;QACP,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,QAAQ;KAClB;CACD,CAAC,CAAA;AASK,MAAM,aAAa,GAAiC,CAAC,EAC3D,WAAW,GAAG,iBAAO,EAAE,QAAQ,EAAE,WAAW,IAAI,EAAE,EAClD,SAAS,EACT,SAAS,EACT,SAAS,GACT,EAAE,EAAE;IACJ,MAAM,OAAO,GAAG,SAAS,EAAE,CAAA;IAE3B,MAAM,GAAG,GAAG,IAAI,GAAG,CAClB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAS,WAAW,EAAE,CAC1E,CAAA;IACD,GAAG,CAAC,IAAI,GAAG,aAAa,SAAS,CAAC,MAAM,EAAE,EAAE,CAAA;IAC5C,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IAEtD,OAAO,CACN,CAAC,MAAM,CACN,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CACvB,SAAS,CAAC,CAAC,IAAA,oBAAE,EAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CACzC,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,EACnB,CACF,CAAA;AACF,CAAC,CAAA;AArBY,QAAA,aAAa,iBAqBzB"}
|
|
@@ -11,7 +11,7 @@ interface Page<T = Record<string, unknown>> {
|
|
|
11
11
|
key: string;
|
|
12
12
|
component?: React.LazyExoticComponent<React.FC<T>>;
|
|
13
13
|
props?: PropsWithChildren<T>;
|
|
14
|
-
children?:
|
|
14
|
+
children?: MenuPage<T>[];
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
/**
|
|
17
17
|
* Set it to false to avoid showing the page in the menu. It is just used for routing purposes.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import cn from 'classnames';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { createUseStyles } from 'react-jss';
|
|
7
|
+
import { fin5Top } from '../../../fin5Top/fin5Top';
|
|
7
8
|
const useStyles = createUseStyles({
|
|
8
9
|
iframe: {
|
|
9
10
|
width: '100%',
|
|
@@ -12,7 +13,7 @@ const useStyles = createUseStyles({
|
|
|
12
13
|
overflow: 'hidden',
|
|
13
14
|
},
|
|
14
15
|
});
|
|
15
|
-
export const GraphicViewer = ({ projectName, graphicId, targetRef, className, }) => {
|
|
16
|
+
export const GraphicViewer = ({ projectName = fin5Top?.finstack?.projectName ?? '', graphicId, targetRef, className, }) => {
|
|
16
17
|
const classes = useStyles();
|
|
17
18
|
const url = new URL(`${window.location.protocol}//${window.location.host}/fin5/${projectName}`);
|
|
18
19
|
url.hash = `targetRef=${targetRef.toAxon()}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicViewer.jsx","sourceRoot":"","sources":["../../../../src/react/components/graphics/GraphicViewer.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"GraphicViewer.jsx","sourceRoot":"","sources":["../../../../src/react/components/graphics/GraphicViewer.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAElD,MAAM,SAAS,GAAG,eAAe,CAAC;IACjC,MAAM,EAAE;QACP,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,QAAQ;KAClB;CACD,CAAC,CAAA;AASF,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC3D,WAAW,GAAG,OAAO,EAAE,QAAQ,EAAE,WAAW,IAAI,EAAE,EAClD,SAAS,EACT,SAAS,EACT,SAAS,GACT,EAAE,EAAE;IACJ,MAAM,OAAO,GAAG,SAAS,EAAE,CAAA;IAE3B,MAAM,GAAG,GAAG,IAAI,GAAG,CAClB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAS,WAAW,EAAE,CAC1E,CAAA;IACD,GAAG,CAAC,IAAI,GAAG,aAAa,SAAS,CAAC,MAAM,EAAE,EAAE,CAAA;IAC5C,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IAEtD,OAAO,CACN,CAAC,MAAM,CACN,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CACvB,SAAS,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CACzC,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,EACnB,CACF,CAAA;AACF,CAAC,CAAA"}
|
|
@@ -11,7 +11,7 @@ interface Page<T = Record<string, unknown>> {
|
|
|
11
11
|
key: string;
|
|
12
12
|
component?: React.LazyExoticComponent<React.FC<T>>;
|
|
13
13
|
props?: PropsWithChildren<T>;
|
|
14
|
-
children?:
|
|
14
|
+
children?: MenuPage<T>[];
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
/**
|
|
17
17
|
* Set it to false to avoid showing the page in the menu. It is just used for routing purposes.
|
package/package.json
CHANGED