@deenruv/dashboard-widgets-plugin 1.0.6 → 1.0.10
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/plugin-server/controllers/admin-ui-controller.js +2 -2
- package/dist/plugin-server/zeus/index.d.ts +1 -1
- package/dist/plugin-server/zeus/index.js +1 -1
- package/dist/plugin-ui/components/LatestOrdersWidget/index.js +1 -1
- package/dist/plugin-ui/components/OrdersWidget/OrdersChart.js +4 -1
- package/dist/plugin-ui/components/ProductsChartWidget/index.js +4 -1
- package/dist/plugin-ui/zeus/index.d.ts +1 -1
- package/dist/plugin-ui/zeus/index.js +1 -1
- package/package.json +7 -7
|
@@ -22,8 +22,8 @@ let AdminUIController = class AdminUIController {
|
|
|
22
22
|
<head>
|
|
23
23
|
<title>Deenruv - Admin UI</title>
|
|
24
24
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
25
|
-
<script type="module" crossorigin src="http://localhost:
|
|
26
|
-
<link rel="stylesheet" crossorigin href="http://localhost:
|
|
25
|
+
<script type="module" crossorigin src="http://localhost:60900/assets/assets/index.js"></script>
|
|
26
|
+
<link rel="stylesheet" crossorigin href="http://localhost:60900/assets/assets/index.css">
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
29
29
|
<div id="root"></div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ops } from './const';
|
|
2
|
-
export declare const HOST = "http://localhost:
|
|
2
|
+
export declare const HOST = "http://localhost:6100/admin-api";
|
|
3
3
|
export declare const HEADERS: {};
|
|
4
4
|
export declare const apiSubscription: (options: chainOptions) => (query: string) => {
|
|
5
5
|
ws: WebSocket;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.MetricType = exports.MetricInterval = exports.ChartMetricType = exports.MetricIntervalType = exports.MetricRangeType = exports.OrderType = exports.LanguageCode = exports.HistoryEntryType = exports.CurrencyCode = exports.LogicalOperator = exports.ErrorCode = exports.SortOrder = exports.Permission = exports.DeletionResult = exports.AdjustmentType = exports.GlobalFlag = exports.AssetType = exports.StockMovementType = exports.JobState = exports.$ = exports.GRAPHQL_TYPE_SEPARATOR = exports.START_VAR_NAME = exports.resolverFor = exports.InternalArgsBuilt = exports.ResolveFromPath = exports.purifyGraphQLKey = exports.PrepareScalarPaths = exports.GraphQLError = exports.SEPARATOR = exports.traverseResponse = exports.decodeScalarsInResponse = exports.fields = exports.ZeusScalars = exports.Gql = exports.TypeFromSelector = exports.Selector = exports.ZeusSelect = exports.Zeus = exports.Subscription = exports.SubscriptionThunder = exports.Chain = exports.Thunder = exports.InternalsBuildQuery = exports.apiFetch = exports.apiSubscription = exports.HEADERS = exports.HOST = void 0;
|
|
5
5
|
const const_1 = require("./const");
|
|
6
|
-
exports.HOST = "http://localhost:
|
|
6
|
+
exports.HOST = "http://localhost:6100/admin-api";
|
|
7
7
|
exports.HEADERS = {};
|
|
8
8
|
const apiSubscription = (options) => (query) => {
|
|
9
9
|
var _a, _b, _c;
|
|
@@ -5,7 +5,7 @@ import { formatDistanceToNow } from "date-fns";
|
|
|
5
5
|
import { pl } from "date-fns/locale/pl";
|
|
6
6
|
import { ArrowRight, Hash, RefreshCw } from "lucide-react";
|
|
7
7
|
import React, { useEffect, useState } from "react";
|
|
8
|
-
import { NavLink, useNavigate } from "react-router
|
|
8
|
+
import { NavLink, useNavigate } from "react-router";
|
|
9
9
|
export const LatestOrdersWidget = () => {
|
|
10
10
|
const { t } = useTranslation("dashboard-widgets-plugin");
|
|
11
11
|
const navigate = useNavigate();
|
|
@@ -29,7 +29,10 @@ export const OrdersChart = ({ data, language, selectedAvailableProducts, metricT
|
|
|
29
29
|
metricType === ChartMetricType.OrderTotalProductsCount
|
|
30
30
|
? value
|
|
31
31
|
: priceFormatter((value ?? 0) * 100, currencyCode ?? CurrencyCode.PLN) }),
|
|
32
|
-
React.createElement(ChartTooltip, { wrapperStyle: { zIndex: 1000 }, cursor: false,
|
|
32
|
+
React.createElement(ChartTooltip, { wrapperStyle: { zIndex: 1000 }, cursor: false,
|
|
33
|
+
// Recharts v2/v3 have incompatible TooltipContentProps vs TooltipProps types;
|
|
34
|
+
// cast through unknown to bridge the readonly payload array mismatch.
|
|
35
|
+
content: (p) => (React.createElement(CustomTooltip, { currencyCode: currencyCode, valueStroke: options.stroke, prevValueStroke: "#82FF9E", shouldShowCompare: shouldShowCompare, selectedAvailableProducts: selectedAvailableProducts, chartProps: p, language: language })) }),
|
|
33
36
|
React.createElement("defs", null,
|
|
34
37
|
React.createElement("linearGradient", { id: "fill", x1: "0", y1: "0", x2: "0", y2: "1" },
|
|
35
38
|
React.createElement("stop", { offset: "0%", stopColor: options.colorFrom, stopOpacity: 0.9 }),
|
|
@@ -111,6 +111,9 @@ export const ProductsChartWidget = () => {
|
|
|
111
111
|
React.createElement(BarChart, { data: showData === "FIRST_FIVE" ? chartData.slice(0, 5) : chartData, layout: "vertical" },
|
|
112
112
|
React.createElement(YAxis, { dataKey: "product", type: "category", tickLine: false, tickMargin: 10, axisLine: false, width: 180, tick: { fontSize: 12, fontSizeAdjust: 0.5 } }),
|
|
113
113
|
React.createElement(XAxis, { type: "number", hide: true }),
|
|
114
|
-
React.createElement(ChartTooltip, { wrapperStyle: { zIndex: 1000 }, cursor: false,
|
|
114
|
+
React.createElement(ChartTooltip, { wrapperStyle: { zIndex: 1000 }, cursor: false,
|
|
115
|
+
// Recharts v2/v3 have incompatible TooltipContentProps vs TooltipProps types;
|
|
116
|
+
// cast through unknown to bridge the readonly payload array mismatch.
|
|
117
|
+
content: (p) => (React.createElement(CustomBarChartTooltip, { currencyCode: currencyCode ?? CurrencyCode.PLN, chartProps: p })) }),
|
|
115
118
|
React.createElement(Bar, { minPointSize: 5, dataKey: "value", radius: 5, barSize: 40 }, chartData.map((entry, index) => (React.createElement(Cell, { key: `cell-${index}`, fill: chartConfig[entry.product].color }))))))))));
|
|
116
119
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ops } from './const';
|
|
2
|
-
export declare const HOST = "http://localhost:
|
|
2
|
+
export declare const HOST = "http://localhost:6100/admin-api";
|
|
3
3
|
export declare const HEADERS: {};
|
|
4
4
|
export declare const apiSubscription: (options: chainOptions) => (query: string) => {
|
|
5
5
|
ws: WebSocket;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import { AllTypesProps, ReturnTypes, Ops } from './const';
|
|
3
|
-
export const HOST = "http://localhost:
|
|
3
|
+
export const HOST = "http://localhost:6100/admin-api";
|
|
4
4
|
export const HEADERS = {};
|
|
5
5
|
export const apiSubscription = (options) => (query) => {
|
|
6
6
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deenruv/dashboard-widgets-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"homepage": "https://deenruv.com/",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"graphql-tag": "^2.12.6",
|
|
24
24
|
"graphql-zeus": "^7.0.0",
|
|
25
25
|
"react-i18next": "^14.0.5",
|
|
26
|
-
"react-router
|
|
26
|
+
"react-router": "^7.13.0",
|
|
27
27
|
"recharts": "^2.12.7",
|
|
28
28
|
"sonner": "^1.4.41",
|
|
29
|
-
"@deenruv/
|
|
30
|
-
"@deenruv/
|
|
31
|
-
"@deenruv/
|
|
29
|
+
"@deenruv/admin-types": "^1.0.10",
|
|
30
|
+
"@deenruv/react-ui-devkit": "^1.0.10",
|
|
31
|
+
"@deenruv/common": "^1.0.10"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"rimraf": "^5.0.10",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/react": "^19.0.0",
|
|
37
37
|
"@types/react-dom": "^19.0.0",
|
|
38
38
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
39
|
-
"@deenruv/core": "^1.0.
|
|
39
|
+
"@deenruv/core": "^1.0.10"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@deenruv/core": "^1.0.0",
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
"watch": "tsc --build --watch",
|
|
48
48
|
"lint": "eslint .",
|
|
49
49
|
"lint:fix": "eslint --fix .",
|
|
50
|
-
"zeus": "zeus http://localhost:
|
|
50
|
+
"zeus": "zeus http://localhost:6100/admin-api ./src/plugin-server --td && zeus http://localhost:6100/admin-api ./src/plugin-ui --td"
|
|
51
51
|
}
|
|
52
52
|
}
|