@j2inn/fin5-ui-utils 5.2.2-beta.7 → 5.2.2-beta.8
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/react/components/charts/line-bar/ZincGridChart.d.ts +12 -0
- package/dist/react/components/charts/line-bar/ZincGridChart.js +24 -0
- package/dist/react/components/charts/line-bar/ZincGridChart.js.map +1 -0
- package/dist_es/index.d.ts +1 -0
- package/dist_es/index.js +1 -0
- package/dist_es/index.js.map +1 -1
- package/dist_es/react/components/charts/line-bar/ZincGridChart.d.ts +12 -0
- package/dist_es/react/components/charts/line-bar/ZincGridChart.js +17 -0
- package/dist_es/react/components/charts/line-bar/ZincGridChart.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from './react/components/RecordImage';
|
|
|
25
25
|
export * from './react/components/charts/QRCode';
|
|
26
26
|
export * from './react/components/charts/line-bar/Chart';
|
|
27
27
|
export * from './react/components/charts/line-bar/HGridChart';
|
|
28
|
+
export * from './react/components/charts/line-bar/ZincGridChart';
|
|
28
29
|
export * from './react/components/charts/pie/PieChart';
|
|
29
30
|
export * from './react/components/charts/pie/SimplePieChart';
|
|
30
31
|
export * from './react/components/makeCustomElement';
|
package/dist/index.js
CHANGED
|
@@ -53,6 +53,7 @@ __exportStar(require("./react/components/RecordImage"), exports);
|
|
|
53
53
|
__exportStar(require("./react/components/charts/QRCode"), exports);
|
|
54
54
|
__exportStar(require("./react/components/charts/line-bar/Chart"), exports);
|
|
55
55
|
__exportStar(require("./react/components/charts/line-bar/HGridChart"), exports);
|
|
56
|
+
__exportStar(require("./react/components/charts/line-bar/ZincGridChart"), exports);
|
|
56
57
|
__exportStar(require("./react/components/charts/pie/PieChart"), exports);
|
|
57
58
|
__exportStar(require("./react/components/charts/pie/SimplePieChart"), exports);
|
|
58
59
|
__exportStar(require("./react/components/makeCustomElement"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0EAA0E;AAC1E,4BAA4B;AAC5B,0EAA0E;AAE1E,2DAAwC;AACxC,oDAAiC;AACjC,0DAAuC;AACvC,0DAAuC;AACvC,0DAAuC;AACvC,8DAA2C;AAC3C,uEAAoD;AAEpD,0EAA0E;AAC1E,gCAAgC;AAChC,0EAA0E;AAE1E,kDAA+B;AAE/B,0EAA0E;AAC1E,mBAAmB;AACnB,0EAA0E;AAE1E,mEAAgD;AAChD,oEAAiD;AACjD,4DAAyC;AACzC,oEAAiD;AACjD,4EAAyD;AACzD,gFAA6D;AAC7D,4EAAyD;AACzD,yEAAsD;AACtD,kFAA+D;AAC/D,6FAA0E;AAC1E,2FAAwE;AACxE,qFAAkE;AAClE,oGAAiF;AACjF,yGAAsF;AACtF,oGAAiF;AACjF,iEAA8C;AAC9C,mEAAgD;AAChD,2EAAwD;AACxD,gFAA6D;AAC7D,yEAAsD;AACtD,+EAA4D;AAC5D,uEAAoD;AAEpD,0EAA0E;AAC1E,cAAc;AACd,0EAA0E;AAE1E,8DAA2C;AAC3C,mEAAgD;AAChD,8DAA2C;AAE3C,0EAA0E;AAC1E,6BAA6B;AAC7B,0EAA0E;AAE1E,+DAA4C;AAC5C,+DAA4C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0EAA0E;AAC1E,4BAA4B;AAC5B,0EAA0E;AAE1E,2DAAwC;AACxC,oDAAiC;AACjC,0DAAuC;AACvC,0DAAuC;AACvC,0DAAuC;AACvC,8DAA2C;AAC3C,uEAAoD;AAEpD,0EAA0E;AAC1E,gCAAgC;AAChC,0EAA0E;AAE1E,kDAA+B;AAE/B,0EAA0E;AAC1E,mBAAmB;AACnB,0EAA0E;AAE1E,mEAAgD;AAChD,oEAAiD;AACjD,4DAAyC;AACzC,oEAAiD;AACjD,4EAAyD;AACzD,gFAA6D;AAC7D,4EAAyD;AACzD,yEAAsD;AACtD,kFAA+D;AAC/D,6FAA0E;AAC1E,2FAAwE;AACxE,qFAAkE;AAClE,oGAAiF;AACjF,yGAAsF;AACtF,oGAAiF;AACjF,iEAA8C;AAC9C,mEAAgD;AAChD,2EAAwD;AACxD,gFAA6D;AAC7D,mFAAgE;AAChE,yEAAsD;AACtD,+EAA4D;AAC5D,uEAAoD;AAEpD,0EAA0E;AAC1E,cAAc;AACd,0EAA0E;AAE1E,8DAA2C;AAC3C,mEAAgD;AAChD,8DAA2C;AAE3C,0EAA0E;AAC1E,6BAA6B;AAC7B,0EAA0E;AAE1E,+DAA4C;AAC5C,+DAA4C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HGridChartProps } from './HGridChart';
|
|
3
|
+
export declare type ZincGridChartProps = Omit<HGridChartProps, 'data'> & {
|
|
4
|
+
data: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* This component wraps the HGridChart component and allows using Zinc
|
|
8
|
+
* data instead of an HGrid. This should help using the component inside,
|
|
9
|
+
* for example, the Graphic Builder, where finstack returns an HaystackGrid
|
|
10
|
+
* instead of haystack-core types.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ZincGridChart: React.FC<ZincGridChartProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ZincGridChart = void 0;
|
|
7
|
+
const haystack_core_1 = require("haystack-core");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const HGridChart_1 = __importDefault(require("./HGridChart"));
|
|
10
|
+
/**
|
|
11
|
+
* This component wraps the HGridChart component and allows using Zinc
|
|
12
|
+
* data instead of an HGrid. This should help using the component inside,
|
|
13
|
+
* for example, the Graphic Builder, where finstack returns an HaystackGrid
|
|
14
|
+
* instead of haystack-core types.
|
|
15
|
+
*/
|
|
16
|
+
const ZincGridChart = ({ data, ...props }) => {
|
|
17
|
+
const parsedData = haystack_core_1.ZincReader.readValue(data);
|
|
18
|
+
if ((0, haystack_core_1.valueIsKind)(parsedData, haystack_core_1.Kind.Grid)) {
|
|
19
|
+
return react_1.default.createElement(HGridChart_1.default, { data: parsedData, ...props });
|
|
20
|
+
}
|
|
21
|
+
throw new Error('Invalid Zinc data, could not parse a Grid');
|
|
22
|
+
};
|
|
23
|
+
exports.ZincGridChart = ZincGridChart;
|
|
24
|
+
//# sourceMappingURL=ZincGridChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZincGridChart.js","sourceRoot":"","sources":["../../../../../src/react/components/charts/line-bar/ZincGridChart.tsx"],"names":[],"mappings":";;;;;;AAAA,iDAAoE;AACpE,kDAAyB;AACzB,8DAA0D;AAM1D;;;;;GAKG;AACI,MAAM,aAAa,GAAiC,CAAC,EAC3D,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,EAAE;IACJ,MAAM,UAAU,GAAG,0BAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,IAAA,2BAAW,EAAQ,UAAU,EAAE,oBAAI,CAAC,IAAI,CAAC,EAAE;QAC9C,OAAO,8BAAC,oBAAU,IAAC,IAAI,EAAE,UAAU,KAAM,KAAK,GAAI,CAAA;KAClD;IACD,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;AAC7D,CAAC,CAAA;AATY,QAAA,aAAa,iBASzB"}
|
package/dist_es/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from './react/components/RecordImage';
|
|
|
25
25
|
export * from './react/components/charts/QRCode';
|
|
26
26
|
export * from './react/components/charts/line-bar/Chart';
|
|
27
27
|
export * from './react/components/charts/line-bar/HGridChart';
|
|
28
|
+
export * from './react/components/charts/line-bar/ZincGridChart';
|
|
28
29
|
export * from './react/components/charts/pie/PieChart';
|
|
29
30
|
export * from './react/components/charts/pie/SimplePieChart';
|
|
30
31
|
export * from './react/components/makeCustomElement';
|
package/dist_es/index.js
CHANGED
|
@@ -37,6 +37,7 @@ export * from './react/components/RecordImage';
|
|
|
37
37
|
export * from './react/components/charts/QRCode';
|
|
38
38
|
export * from './react/components/charts/line-bar/Chart';
|
|
39
39
|
export * from './react/components/charts/line-bar/HGridChart';
|
|
40
|
+
export * from './react/components/charts/line-bar/ZincGridChart';
|
|
40
41
|
export * from './react/components/charts/pie/PieChart';
|
|
41
42
|
export * from './react/components/charts/pie/SimplePieChart';
|
|
42
43
|
export * from './react/components/makeCustomElement';
|
package/dist_es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,0EAA0E;AAC1E,4BAA4B;AAC5B,0EAA0E;AAE1E,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sCAAsC,CAAA;AAEpD,0EAA0E;AAC1E,gCAAgC;AAChC,0EAA0E;AAE1E,cAAc,iBAAiB,CAAA;AAE/B,0EAA0E;AAC1E,mBAAmB;AACnB,0EAA0E;AAE1E,cAAc,kCAAkC,CAAA;AAChD,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,mCAAmC,CAAA;AACjD,cAAc,2CAA2C,CAAA;AACzD,cAAc,+CAA+C,CA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ACzD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,2CAA2C,CAAA;AACzD,cAAc,wCAAwC,CAAA;AACtD,cAAc,iDAAiD,CAAA;AAC/D,cAAc,4DAA4D,CAAA;AAC1E,cAAc,0DAA0D,CAAA;AACxE,cAAc,oDAAoD,CAAA;AAClE,cAAc,mEAAmE,CAAA;AACjF,cAAc,wEAAwE,CAAA;AACtF,cAAc,mEAAmE,CAAA;AACjF,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,0CAA0C,CAAA;AACxD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,kDAAkD,CAAA;AAChE,cAAc,wCAAwC,CAAA;AACtD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,sCAAsC,CAAA;AAEpD,0EAA0E;AAC1E,cAAc;AACd,0EAA0E;AAE1E,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAE3C,0EAA0E;AAC1E,6BAA6B;AAC7B,0EAA0E;AAE1E,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HGridChartProps } from './HGridChart';
|
|
3
|
+
export declare type ZincGridChartProps = Omit<HGridChartProps, 'data'> & {
|
|
4
|
+
data: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* This component wraps the HGridChart component and allows using Zinc
|
|
8
|
+
* data instead of an HGrid. This should help using the component inside,
|
|
9
|
+
* for example, the Graphic Builder, where finstack returns an HaystackGrid
|
|
10
|
+
* instead of haystack-core types.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ZincGridChart: React.FC<ZincGridChartProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Kind, valueIsKind, ZincReader } from 'haystack-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import HGridChart from './HGridChart';
|
|
4
|
+
/**
|
|
5
|
+
* This component wraps the HGridChart component and allows using Zinc
|
|
6
|
+
* data instead of an HGrid. This should help using the component inside,
|
|
7
|
+
* for example, the Graphic Builder, where finstack returns an HaystackGrid
|
|
8
|
+
* instead of haystack-core types.
|
|
9
|
+
*/
|
|
10
|
+
export const ZincGridChart = ({ data, ...props }) => {
|
|
11
|
+
const parsedData = ZincReader.readValue(data);
|
|
12
|
+
if (valueIsKind(parsedData, Kind.Grid)) {
|
|
13
|
+
return React.createElement(HGridChart, { data: parsedData, ...props });
|
|
14
|
+
}
|
|
15
|
+
throw new Error('Invalid Zinc data, could not parse a Grid');
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=ZincGridChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZincGridChart.js","sourceRoot":"","sources":["../../../../../src/react/components/charts/line-bar/ZincGridChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,UAA+B,MAAM,cAAc,CAAA;AAM1D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC3D,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,EAAE;IACJ,MAAM,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,WAAW,CAAQ,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;QAC9C,OAAO,oBAAC,UAAU,IAAC,IAAI,EAAE,UAAU,KAAM,KAAK,GAAI,CAAA;KAClD;IACD,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;AAC7D,CAAC,CAAA"}
|
package/package.json
CHANGED