@xplortech/insights-elements-react 0.0.1-draft.7729525
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
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @xplortech/insights-elements-react
|
|
2
|
+
|
|
3
|
+
React components for Xplor Insights.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @xplortech/insights-elements-react
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### With Static Token
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import {
|
|
17
|
+
InsightsWrapper,
|
|
18
|
+
InsightsLineChart,
|
|
19
|
+
} from "@xplortech/insights-elements-react";
|
|
20
|
+
|
|
21
|
+
function App() {
|
|
22
|
+
return (
|
|
23
|
+
<InsightsWrapper
|
|
24
|
+
apiUrl="https://api.insights.example.com"
|
|
25
|
+
token="your-token"
|
|
26
|
+
onTokenExpired={() => console.log("Token expired")}
|
|
27
|
+
>
|
|
28
|
+
<InsightsLineChart
|
|
29
|
+
reportName="sales-data"
|
|
30
|
+
filters={{ region: "north" }}
|
|
31
|
+
/>
|
|
32
|
+
</InsightsWrapper>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
3
|
+
import { InsightsBarChart as InsightsBarChartElement, defineCustomElement as defineInsightsBarChart } from "@xplortech/insights-elements/dist/components/insights-bar-chart.js";
|
|
4
|
+
import { InsightsDonutChart as InsightsDonutChartElement, defineCustomElement as defineInsightsDonutChart } from "@xplortech/insights-elements/dist/components/insights-donut-chart.js";
|
|
5
|
+
import { InsightsWrapper as InsightsWrapperElement, defineCustomElement as defineInsightsWrapper } from "@xplortech/insights-elements/dist/components/insights-wrapper.js";
|
|
6
|
+
import React from 'react';
|
|
7
|
+
export const InsightsBarChart = /*@__PURE__*/ createComponent({
|
|
8
|
+
tagName: 'insights-bar-chart',
|
|
9
|
+
elementClass: InsightsBarChartElement,
|
|
10
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
11
|
+
react: React,
|
|
12
|
+
events: {},
|
|
13
|
+
defineCustomElement: defineInsightsBarChart
|
|
14
|
+
});
|
|
15
|
+
export const InsightsDonutChart = /*@__PURE__*/ createComponent({
|
|
16
|
+
tagName: 'insights-donut-chart',
|
|
17
|
+
elementClass: InsightsDonutChartElement,
|
|
18
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
19
|
+
react: React,
|
|
20
|
+
events: {},
|
|
21
|
+
defineCustomElement: defineInsightsDonutChart
|
|
22
|
+
});
|
|
23
|
+
export const InsightsWrapper = /*@__PURE__*/ createComponent({
|
|
24
|
+
tagName: 'insights-wrapper',
|
|
25
|
+
elementClass: InsightsWrapperElement,
|
|
26
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
27
|
+
react: React,
|
|
28
|
+
events: {},
|
|
29
|
+
defineCustomElement: defineInsightsWrapper
|
|
30
|
+
});
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by the Stencil React Output Target.
|
|
3
|
+
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
4
|
+
*/
|
|
5
|
+
import type { StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
6
|
+
import { InsightsBarChart as InsightsBarChartElement } from "@xplortech/insights-elements/dist/components/insights-bar-chart.js";
|
|
7
|
+
import { InsightsDonutChart as InsightsDonutChartElement } from "@xplortech/insights-elements/dist/components/insights-donut-chart.js";
|
|
8
|
+
import { InsightsWrapper as InsightsWrapperElement } from "@xplortech/insights-elements/dist/components/insights-wrapper.js";
|
|
9
|
+
export type InsightsBarChartEvents = NonNullable<unknown>;
|
|
10
|
+
export declare const InsightsBarChart: StencilReactComponent<InsightsBarChartElement, InsightsBarChartEvents>;
|
|
11
|
+
export type InsightsDonutChartEvents = NonNullable<unknown>;
|
|
12
|
+
export declare const InsightsDonutChart: StencilReactComponent<InsightsDonutChartElement, InsightsDonutChartEvents>;
|
|
13
|
+
export type InsightsWrapperEvents = NonNullable<unknown>;
|
|
14
|
+
export declare const InsightsWrapper: StencilReactComponent<InsightsWrapperElement, InsightsWrapperEvents>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components/stencil-generated/components";
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xplortech/insights-elements-react",
|
|
3
|
+
"version": "0.0.1-draft.7729525",
|
|
4
|
+
"description": "React components for Xplor Insights",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"sideEffects": true,
|
|
9
|
+
"author": "Xplor Technologies",
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public",
|
|
12
|
+
"provenance": false
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/xplor/insights-api.git",
|
|
17
|
+
"directory": "packages/insights-elements-react"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "npm run clean && npm run compile",
|
|
25
|
+
"clean": "rm -rf dist",
|
|
26
|
+
"compile": "tsc",
|
|
27
|
+
"prepublishOnly": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@stencil/react-output-target": "^1.2.0",
|
|
31
|
+
"@xplortech/insights-elements": "0.0.1-draft.7729525"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"react": ">=16.8.0",
|
|
35
|
+
"react-dom": ">=16.8.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/react": "^18.3.18",
|
|
39
|
+
"@types/react-dom": "^18.3.5",
|
|
40
|
+
"react": "^18.3.1",
|
|
41
|
+
"react-dom": "^18.3.1",
|
|
42
|
+
"typescript": "^5.9.3"
|
|
43
|
+
},
|
|
44
|
+
"license": "MIT"
|
|
45
|
+
}
|